diff options
Diffstat (limited to 'meta/recipes-extended/gawk/gawk_5.3.0.bb')
-rw-r--r-- | meta/recipes-extended/gawk/gawk_5.3.0.bb | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/meta/recipes-extended/gawk/gawk_5.3.0.bb b/meta/recipes-extended/gawk/gawk_5.3.0.bb new file mode 100644 index 0000000000..d7a0fc616d --- /dev/null +++ b/meta/recipes-extended/gawk/gawk_5.3.0.bb | |||
@@ -0,0 +1,87 @@ | |||
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://run-ptest \ | ||
20 | " | ||
21 | |||
22 | SRC_URI[sha256sum] = "378f8864ec21cfceaa048f7e1869ac9b4597b449087caf1eb55e440d30273336" | ||
23 | |||
24 | inherit autotools gettext texinfo update-alternatives | ||
25 | |||
26 | FILES:${PN} += "${datadir}/awk" | ||
27 | FILES:${PN}-dev += "${libdir}/${BPN}/*.la" | ||
28 | |||
29 | PACKAGES =+ "${PN}-gawkbug" | ||
30 | FILES:${PN}-gawkbug += "${bindir}/gawkbug" | ||
31 | |||
32 | ALTERNATIVE:${PN} = "awk" | ||
33 | ALTERNATIVE_TARGET[awk] = "${bindir}/gawk" | ||
34 | ALTERNATIVE_PRIORITY = "100" | ||
35 | |||
36 | do_install:append() { | ||
37 | # remove the link since we don't package it | ||
38 | rm ${D}${bindir}/awk | ||
39 | # Strip non-reproducible build flags (containing build paths) | ||
40 | sed -i -e 's|^CC.*|CC=""|g' -e 's|^CFLAGS.*|CFLAGS=""|g' ${D}${bindir}/gawkbug | ||
41 | } | ||
42 | |||
43 | inherit ptest | ||
44 | |||
45 | do_install_ptest() { | ||
46 | mkdir ${D}${PTEST_PATH}/test | ||
47 | ln -s ${bindir}/gawk ${D}${PTEST_PATH}/gawk | ||
48 | # The list of tests is all targets in Maketests, apart from the dummy Gt-dummy | ||
49 | TESTS=$(awk -F: '$1 == "Gt-dummy" { next } /[[:alnum:]]+:$/ { print $1 }' ${S}/test/Maketests) | ||
50 | for i in $TESTS Maketests inclib.awk; do | ||
51 | cp ${S}/test/$i* ${D}${PTEST_PATH}/test | ||
52 | done | ||
53 | sed -i \ | ||
54 | -e 's|#!${base_bindir}/awk|#!${bindir}/awk|g' ${D}${PTEST_PATH}/test/*.awk | ||
55 | |||
56 | sed -i -e "s|GAWKLOCALE|LANG|g" ${D}${PTEST_PATH}/test/Maketests | ||
57 | |||
58 | # These tests require an unloaded host as otherwise timing sensitive tests can fail | ||
59 | # https://bugzilla.yoctoproject.org/show_bug.cgi?id=14371 | ||
60 | rm -f ${D}${PTEST_PATH}/test/time.* | ||
61 | rm -f ${D}${PTEST_PATH}/test/timeout.* | ||
62 | for t in time timeout; do | ||
63 | echo $t >> ${D}${PTEST_PATH}/test/skipped.txt | ||
64 | done | ||
65 | } | ||
66 | |||
67 | do_install_ptest:append:libc-musl() { | ||
68 | # Reported https://lists.gnu.org/archive/html/bug-gawk/2021-02/msg00005.html | ||
69 | rm -f ${D}${PTEST_PATH}/test/clos1way6.* | ||
70 | # Needs en_US.UTF-8 but then does not work with musl | ||
71 | rm -f ${D}${PTEST_PATH}/test/backsmalls1.* | ||
72 | # Needs en_US.UTF-8 but then does not work with musl | ||
73 | rm -f ${D}${PTEST_PATH}/test/commas.* | ||
74 | # The below two need LANG=C inside the make rule for musl | ||
75 | rm -f ${D}${PTEST_PATH}/test/rebt8b1.* | ||
76 | rm -f ${D}${PTEST_PATH}/test/regx8bit.* | ||
77 | for t in clos1way6 backsmalls1 commas rebt8b1 regx8bit; do | ||
78 | echo $t >> ${D}${PTEST_PATH}/test/skipped.txt | ||
79 | done | ||
80 | } | ||
81 | |||
82 | RDEPENDS:${PN}-ptest += "make locale-base-en-us coreutils" | ||
83 | |||
84 | RDEPENDS:${PN}-ptest:append:libc-glibc = " locale-base-en-us.iso-8859-1" | ||
85 | RDEPENDS:${PN}-ptest:append:libc-musl = " musl-locales" | ||
86 | |||
87 | BBCLASSEXTEND = "native nativesdk" | ||