<commit_before>SUMMARY = "Tools to manipulate UEFI variables"
DESCRIPTION = "efivar provides a simple command line interface to the UEFI variable facility"
HOMEPAGE = "https://github.com/rhinstaller/efivar"

LICENSE = "LGPLv2.1"
LIC_FILES_CHKSUM = "file://COPYING;md5=6626bb1e20189cfa95f2c508ba286393"

DEPENDS = "popt"
DEPENDS_append_class-target = " efivar-native"

inherit pkgconfig

COMPATIBLE_HOST = "(i.86|x86_64|arm|aarch64).*-linux"

SRCREV = "11324799c68193116e1dd5f94b416591bd324f90"
SRC_URI = "git://github.com/rhinstaller/efivar.git \
           file://allow-multi-definitions-for-native.patch \
           file://0001-makeguids-Do-not-use-__bswap_constant_-16-32-macros.patch \
           file://musl-strndupa.patch \
           file://0001-efivar-dp.h-Add-Wunknown-attributes-when-using-clang.patch \
           "
SRC_URI_append_class-target = " file://0001-efivar-fix-for-cross-compile.patch \
                                file://0003-efivar-fix-for-cross-compile.patch \
                                ${@<EMAIL>.contains('DISTRO_FEATURES', 'ld-is-gold', 'file://0004-fix-unknow-option-for-gold-linker.patch', '', d)} \
                              "
SRC_URI_append_class-native = " file://fix-compile-failure-with-host-gcc-4.6.patch \
                              "

S = "${WORKDIR}/git"

# Setting CROSS_COMPILE breaks pkgconfig, so just set AR
EXTRA_OEMAKE = "AR=${TARGET_PREFIX}gcc-ar"

do_compile_prepend() {
    sed -i -e s:-Werror::g ${S}/gcc.specs
}

do_install() {
    oe_runmake install DESTDIR=${D}
}

do_install_append_class-native() {
    install -D -m 0755 ${B}/src/makeguids ${D}${bindir}/makeguids
}
<commit_msg>efivar: fix build when host gcc version is < 4.9<commit_after>SUMMARY = "Tools to manipulate UEFI variables"
DESCRIPTION = "efivar provides a simple command line interface to the UEFI variable facility"
HOMEPAGE = "https://github.com/rhinstaller/efivar"

LICENSE = "LGPLv2.1"
LIC_FILES_CHKSUM = "file://COPYING;md5=6626bb1e20189cfa95f2c508ba286393"

DEPENDS = "popt"
DEPENDS_append_class-target = " efivar-native"

inherit pkgconfig

COMPATIBLE_HOST = "(i.86|x86_64|arm|aarch64).*-linux"

SRCREV = "11324799c68193116e1dd5f94b416591bd324f90"
SRC_URI = "git://github.com/rhinstaller/efivar.git \
           file://allow-multi-definitions-for-native.patch \
           file://0001-makeguids-Do-not-use-__bswap_constant_-16-32-macros.patch \
           file://musl-strndupa.patch \
           file://0001-efivar-dp.h-Add-Wunknown-attributes-when-using-clang.patch \
           "
SRC_URI_append_class-target = " file://0001-efivar-fix-for-cross-compile.patch \
                                file://0003-efivar-fix-for-cross-compile.patch \
                                ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', 'file://0004-fix-unknow-option-for-gold-linker.patch', '', d)} \
                              "
SRC_URI_append_class-native = " file://fix-compile-failure-with-host-gcc-4.6.patch \
                              "

S = "${WORKDIR}/git"

# Setting CROSS_COMPILE breaks pkgconfig, so just set AR
EXTRA_OEMAKE = "AR=${TARGET_PREFIX}gcc-ar"

do_compile_prepend() {
    sed -i -e s:-Werror::g ${S}/gcc.specs
}

do_compile_class-native() {
    oe_runmake -C src makeguids
}

do_install() {
    oe_runmake install DESTDIR=${D}
}

do_install_class-native() {
    install -D -m 0755 ${B}/src/makeguids ${D}${bindir}/makeguids
}

{'fraction_non_alphanumeric': 0.14327830188679244, 'fraction_numerical': 0.05601415094339623, 'mean_word_length': 2.8123595505617978, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 4, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, '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': '1879317', 'n_tokens_mistral': 1375, 'n_tokens_neox': 1241, 'n_words': 171}