Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1 | SUMMARY = "GNU awk text processing utility" |
| 2 | DESCRIPTION = "The GNU version of awk, a text processing utility. \ |
| 3 | Awk interprets a special-purpose programming language to do \ |
| 4 | quick and easy text pattern matching and reformatting jobs." |
| 5 | HOMEPAGE = "https://www.gnu.org/software/gawk/" |
| 6 | BUGTRACKER = "bug-gawk@gnu.org" |
| 7 | SECTION = "console/utils" |
| 8 | |
| 9 | # gawk <= 3.1.5: GPL-2.0-only |
| 10 | # gawk >= 3.1.6: GPL-3.0-only |
| 11 | LICENSE = "GPL-3.0-only" |
| 12 | LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" |
| 13 | |
| 14 | PACKAGECONFIG ??= "readline" |
| 15 | PACKAGECONFIG[readline] = "--with-readline,--without-readline,readline" |
| 16 | PACKAGECONFIG[mpfr] = "--with-mpfr,--without-mpfr, mpfr" |
| 17 | |
| 18 | SRC_URI = "${GNU_MIRROR}/gawk/gawk-${PV}.tar.gz \ |
| 19 | file://remove-sensitive-tests.patch \ |
| 20 | file://run-ptest \ |
| 21 | " |
| 22 | |
| 23 | SRC_URI[sha256sum] = "529e7c8c6acf21ff3a6183f4d763c632810908989c24675c77995d51ac37b79c" |
| 24 | |
| 25 | inherit autotools gettext texinfo update-alternatives |
| 26 | |
| 27 | FILES:${PN} += "${datadir}/awk" |
| 28 | FILES:${PN}-dev += "${libdir}/${BPN}/*.la" |
| 29 | |
| 30 | PACKAGES =+ "${PN}-gawkbug" |
| 31 | FILES:${PN}-gawkbug += "${bindir}/gawkbug" |
| 32 | |
| 33 | ALTERNATIVE:${PN} = "awk" |
| 34 | ALTERNATIVE_TARGET[awk] = "${bindir}/gawk" |
| 35 | ALTERNATIVE_PRIORITY = "100" |
| 36 | |
| 37 | do_install:append() { |
| 38 | # remove the link since we don't package it |
| 39 | rm ${D}${bindir}/awk |
| 40 | # Strip non-reproducible build flags (containing build paths) |
| 41 | sed -i -e 's|^CC.*|CC=""|g' -e 's|^CFLAGS.*|CFLAGS=""|g' ${D}${bindir}/gawkbug |
| 42 | } |
| 43 | |
| 44 | inherit ptest |
| 45 | |
| 46 | do_install_ptest() { |
| 47 | mkdir ${D}${PTEST_PATH}/test |
| 48 | ln -s ${bindir}/gawk ${D}${PTEST_PATH}/gawk |
| 49 | # The list of tests is all targets in Maketests, apart from the dummy Gt-dummy |
| 50 | TESTS=$(awk -F: '$1 == "Gt-dummy" { next } /[[:alnum:]]+:$/ { print $1 }' ${S}/test/Maketests) |
| 51 | for i in $TESTS Maketests inclib.awk; do |
| 52 | cp ${S}/test/$i* ${D}${PTEST_PATH}/test |
| 53 | done |
| 54 | sed -i \ |
| 55 | -e 's|#!${base_bindir}/awk|#!${bindir}/awk|g' ${D}${PTEST_PATH}/test/*.awk |
| 56 | |
| 57 | sed -i -e "s|GAWKLOCALE|LANG|g" ${D}${PTEST_PATH}/test/Maketests |
| 58 | |
| 59 | # These tests require an unloaded host as otherwise timing sensitive tests can fail |
| 60 | # https://bugzilla.yoctoproject.org/show_bug.cgi?id=14371 |
| 61 | rm -f ${D}${PTEST_PATH}/test/time.* |
| 62 | rm -f ${D}${PTEST_PATH}/test/timeout.* |
| 63 | } |
| 64 | |
| 65 | RDEPENDS:${PN}-ptest += "make" |
| 66 | |
Andrew Geissler | fc113ea | 2023-03-31 09:59:46 -0500 | [diff] [blame] | 67 | RDEPENDS:${PN}-ptest:append:libc-glibc = " locale-base-en-us locale-base-en-us.iso-8859-1" |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 68 | |
| 69 | BBCLASSEXTEND = "native nativesdk" |