Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [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 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 9 | # gawk <= 3.1.5: GPL-2.0-only |
| 10 | # gawk >= 3.1.6: GPL-3.0-only |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 11 | LICENSE = "GPL-3.0-only" |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 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] = "6168d8d1dc8f74bd17d9dc22fa9634c49070f232343b744901da15fb4f06bffd" |
| 24 | |
| 25 | inherit autotools gettext texinfo update-alternatives |
| 26 | |
| 27 | FILES:${PN} += "${datadir}/awk" |
| 28 | FILES:${PN}-dev += "${libdir}/${BPN}/*.la" |
| 29 | |
| 30 | ALTERNATIVE:${PN} = "awk" |
| 31 | ALTERNATIVE_TARGET[awk] = "${bindir}/gawk" |
| 32 | ALTERNATIVE_PRIORITY = "100" |
| 33 | |
| 34 | do_install:append() { |
| 35 | # remove the link since we don't package it |
| 36 | rm ${D}${bindir}/awk |
| 37 | } |
| 38 | |
| 39 | inherit ptest |
| 40 | |
| 41 | do_install_ptest() { |
| 42 | mkdir ${D}${PTEST_PATH}/test |
| 43 | ln -s ${bindir}/gawk ${D}${PTEST_PATH}/gawk |
| 44 | # The list of tests is all targets in Maketests, apart from the dummy Gt-dummy |
| 45 | TESTS=$(awk -F: '$1 == "Gt-dummy" { next } /[[:alnum:]]+:$/ { print $1 }' ${S}/test/Maketests) |
| 46 | for i in $TESTS Maketests inclib.awk; do |
| 47 | cp ${S}/test/$i* ${D}${PTEST_PATH}/test |
| 48 | done |
| 49 | sed -i -e 's|/usr/local/bin|${bindir}|g' \ |
| 50 | -e 's|#!${base_bindir}/awk|#!${bindir}/awk|g' ${D}${PTEST_PATH}/test/*.awk |
| 51 | |
| 52 | sed -i -e "s|GAWKLOCALE|LANG|g" ${D}${PTEST_PATH}/test/Maketests |
| 53 | |
| 54 | # These tests require an unloaded host as otherwise timing sensitive tests can fail |
| 55 | # https://bugzilla.yoctoproject.org/show_bug.cgi?id=14371 |
| 56 | rm -f ${D}${PTEST_PATH}/test/time.* |
| 57 | rm -f ${D}${PTEST_PATH}/test/timeout.* |
| 58 | } |
| 59 | |
| 60 | RDEPENDS:${PN}-ptest += "make" |
| 61 | |
| 62 | RDEPENDS:${PN}-ptest:append:libc-glibc = " locale-base-en-us.iso-8859-1" |
| 63 | |
| 64 | BBCLASSEXTEND = "native nativesdk" |