<commit_before>DESCRIPTION = "This is a cross development C compiler, assembler and linker environment for the production of 8086 executables (Optionally MSDOS COM)"
HOMEPAGE = "http://www.debath.co.uk/dev86/"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b"
SECTION = "console/tools"

BASE_PV="0.16.21"
PV = "${BASE_PV}+git${SRCPV}"
SRCREV = "e254e0b19651d3b8a20225b40281c9974a95dec4"
SRC_URI = "git://github.com/jbruchon/${BPN}.git;protocol=https \
    file://0001-cpp-Makefile-respect-LDFLAGS-when-building-bcc-cpp.patch \
    file://0003-cpp-update-token1.tok-to-make-new-gperf-happy-regen..patch \
    file://0004-regen-token2.h-token1.h-with-gperf-3.1.patch \
"
SRC_URI_append_class-target = " \
    file://0002-Makefile-use-ifdefg-from-dev86-native-instead-of-tar.patch \
"

S = "${WORKDIR}/git"

DEPENDS = "gperf-native dev86-native"

BBCLASSEXTEND = "native"
EXTRA_OEMAKE = "VERSION=${BASE_PV} PREFIX=${prefix} DIST=${D} LDFLAGS='${LDFLAGS}'"

do_compile() {
	# always regenerate token1.h, token2.h for deterministic behavior
	rm -f ${S}/cpp/token1.h ${S}/cpp/token2.h
	oe_runmake make.fil
	oe_runmake -f make.fil bcc86 as86 ld86
}

do_install() {

	if [ "${prefix}"=="" ] ; then
		export prefix=/usr
	fi

	oe_runmake install-bcc
	ln -s ../lib/bcc/bcc-cpp ${D}${prefix}/bin/bcc-cpp
	ln -s ../lib/bcc/bcc-cc1 ${D}${prefix}/bin/bcc-cc1
}

do_install_append_class-native() {
        install -v -m 755 ${B}/ifdefg ${D}${bindir}
}

COMPATIBLE_HOST = "(i.86|x86_64).*-linux"
FILES_${PN} += "${libdir}/bcc"

INSANE_SKIP_${PN} = "already-stripped"
<commit_msg>dev86: work on all hosts, other cleanups<commit_after>DESCRIPTION = "This is a cross development C compiler, assembler and linker environment for the production of 8086 executables (Optionally MSDOS COM)"
HOMEPAGE = "http://www.debath.co.uk/dev86/"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b"
SECTION = "console/tools"

BASE_PV="0.16.21"
PV = "${BASE_PV}+git${SRCPV}"
SRCREV = "e254e0b19651d3b8a20225b40281c9974a95dec4"
SRC_URI = "git://github.com/jbruchon/${BPN}.git;protocol=https \
    file://0001-cpp-Makefile-respect-LDFLAGS-when-building-bcc-cpp.patch \
    file://0003-cpp-update-token1.tok-to-make-new-gperf-happy-regen..patch \
    file://0004-regen-token2.h-token1.h-with-gperf-3.1.patch \
"
SRC_URI_append_class-target = " \
    file://0002-Makefile-use-ifdefg-from-dev86-native-instead-of-tar.patch \
"

S = "${WORKDIR}/git"

DEPENDS = "gperf-native dev86-native"

BBCLASSEXTEND = "native"
EXTRA_OEMAKE = "VERSION=${BASE_PV} PREFIX=${prefix} DIST=${D} LDFLAGS='${LDFLAGS}' INEXE=''"

do_compile() {
	# always regenerate token1.h, token2.h for deterministic behavior
	rm -f ${S}/cpp/token1.h ${S}/cpp/token2.h
	oe_runmake make.fil
	oe_runmake -f make.fil bcc86 as86 ld86
}

do_install() {

	if [ "${prefix}"=="" ] ; then
		export prefix=/usr
	fi

	oe_runmake install-bcc
	ln -s ../lib/bcc/bcc-cpp ${D}${prefix}/bin/bcc-cpp
	ln -s ../lib/bcc/bcc-cc1 ${D}${prefix}/bin/bcc-cc1
}

do_install_append_class-native() {
        install -v -m 755 ${B}/ifdefg ${D}${bindir}
}

FILES_${PN} += "${libdir}/bcc"

{'fraction_non_alphanumeric': 0.1778481012658228, 'fraction_numerical': 0.06772151898734177, 'mean_word_length': 4.224793388429752, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6701314', 'n_tokens_mistral': 1462, 'n_tokens_neox': 1312, 'n_words': 209}