diff options
Diffstat (limited to 'meta/recipes-extended/gawk')
5 files changed, 132 insertions, 96 deletions
diff --git a/meta/recipes-extended/gawk/gawk/0001-Use-cross-AR-during-compile.patch b/meta/recipes-extended/gawk/gawk/0001-Use-cross-AR-during-compile.patch deleted file mode 100644 index ca0d668ce9..0000000000 --- a/meta/recipes-extended/gawk/gawk/0001-Use-cross-AR-during-compile.patch +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | From 207b94e37c84007b294e57878c913271aad544ef Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 11 Nov 2020 23:13:23 -0800 | ||
4 | Subject: [PATCH] Use cross AR during compile | ||
5 | |||
6 | If AR is specifcied then it should be used instead of defaulting to 'ar' | ||
7 | from host | ||
8 | |||
9 | Upstream-Status: Pending | ||
10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
11 | --- | ||
12 | configure.ac | 7 +++++++ | ||
13 | 1 file changed, 7 insertions(+) | ||
14 | |||
15 | diff --git a/configure.ac b/configure.ac | ||
16 | index 31364ab..4804f7b 100644 | ||
17 | --- a/configure.ac | ||
18 | +++ b/configure.ac | ||
19 | @@ -92,6 +92,13 @@ GAWK_CANONICAL_HOST | ||
20 | AC_USE_SYSTEM_EXTENSIONS | ||
21 | |||
22 | dnl checks for programs | ||
23 | +m4_ifndef([AC_PROG_AR],[dnl | ||
24 | + AN_MAKEVAR([AR], [AC_PROG_AR]) | ||
25 | + AN_PROGRAM([ar], [AC_PROG_AR]) | ||
26 | + AC_DEFUN([AC_PROG_AR], | ||
27 | + [AC_CHECK_TOOL(AR, ar, :)]) | ||
28 | +]) | ||
29 | +AC_PROG_AR | ||
30 | AC_PROG_EGREP | ||
31 | AC_PROG_YACC | ||
32 | AC_PROG_LN_S | ||
33 | -- | ||
34 | 2.29.2 | ||
35 | |||
diff --git a/meta/recipes-extended/gawk/gawk/0001-m4-readline-add-missing-includes.patch b/meta/recipes-extended/gawk/gawk/0001-m4-readline-add-missing-includes.patch new file mode 100644 index 0000000000..5be2fd97ee --- /dev/null +++ b/meta/recipes-extended/gawk/gawk/0001-m4-readline-add-missing-includes.patch | |||
@@ -0,0 +1,38 @@ | |||
1 | From 4f4e84f139e2a8682f1374a592f2636c43ad857b Mon Sep 17 00:00:00 2001 | ||
2 | From: Ross Burton <ross.burton@arm.com> | ||
3 | Date: Tue, 21 May 2024 15:10:11 +0000 | ||
4 | Subject: [PATCH] m4/readline: add missing includes | ||
5 | |||
6 | The cross-specific code fragment only includes stdio.h, where the native | ||
7 | fragment also includes fcntl.h and unistd.h. This is important because | ||
8 | GCC 14.1 has made the implicit definitions an error: | ||
9 | |||
10 | conftest.c: In function 'main': | ||
11 | conftest.c:144:9: error: implicit declaration of function 'close'; did you mean 'pclose'? [-Wimplicit-function-declaration] | ||
12 | conftest.c:146:14: error: implicit declaration of function 'open'; did you mean 'popen'? [-Wimplicit-function-declaration] | ||
13 | |||
14 | Add the missing includes so that the check doesn't always fail due to | ||
15 | these errors. | ||
16 | |||
17 | Upstream-Status: Submitted [https://lists.gnu.org/archive/html/bug-gawk/2024-05/msg00000.html] | ||
18 | Signed-off-by: Ross Burton <ross.burton@arm.com> | ||
19 | --- | ||
20 | m4/readline.m4 | 2 ++ | ||
21 | 1 file changed, 2 insertions(+) | ||
22 | |||
23 | diff --git a/m4/readline.m4 b/m4/readline.m4 | ||
24 | index 38f96326..efd52d4e 100644 | ||
25 | --- a/m4/readline.m4 | ||
26 | +++ b/m4/readline.m4 | ||
27 | @@ -66,6 +66,8 @@ dnl action if false: | ||
28 | dnl action if cross compiling: | ||
29 | [AC_LINK_IFELSE( | ||
30 | [AC_LANG_PROGRAM([[#include <stdio.h> | ||
31 | +#include <fcntl.h> | ||
32 | +#include <unistd.h> | ||
33 | #include <readline/readline.h> | ||
34 | #include <readline/history.h>]], dnl includes | ||
35 | dnl function body | ||
36 | -- | ||
37 | 2.34.1 | ||
38 | |||
diff --git a/meta/recipes-extended/gawk/gawk/run-ptest b/meta/recipes-extended/gawk/gawk/run-ptest index f67a95874f..f4ef3e7bd4 100644 --- a/meta/recipes-extended/gawk/gawk/run-ptest +++ b/meta/recipes-extended/gawk/gawk/run-ptest | |||
@@ -2,7 +2,12 @@ | |||
2 | 2 | ||
3 | cd test | 3 | cd test |
4 | for i in `grep -E "^[a-z0-9_-]*:$" Maketests |awk -F: '{print $1}'`; do | 4 | for i in `grep -E "^[a-z0-9_-]*:$" Maketests |awk -F: '{print $1}'`; do |
5 | #LC_ALL=${GAWKLOCALE:-C} LANG=${GAWKLOCALE:-C} | 5 | unset LANG |
6 | grep -q "^$i$" skipped.txt | ||
7 | if [ $? -eq 0 ]; then | ||
8 | echo "SKIP: $i" | ||
9 | continue | ||
10 | fi | ||
6 | srcdir=`pwd` AWKPROG=gawk AWK=gawk CMP=cmp make -f Maketests $i >$i.tmp 2>&1 | 11 | srcdir=`pwd` AWKPROG=gawk AWK=gawk CMP=cmp make -f Maketests $i >$i.tmp 2>&1 |
7 | if [ -e _$i ]; then | 12 | if [ -e _$i ]; then |
8 | cat _$i | 13 | cat _$i |
diff --git a/meta/recipes-extended/gawk/gawk_5.1.0.bb b/meta/recipes-extended/gawk/gawk_5.1.0.bb deleted file mode 100644 index ae897be62e..0000000000 --- a/meta/recipes-extended/gawk/gawk_5.1.0.bb +++ /dev/null | |||
@@ -1,60 +0,0 @@ | |||
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: GPLv2 | ||
10 | # gawk >= 3.1.6: GPLv3 | ||
11 | LICENSE = "GPLv3" | ||
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 | file://0001-Use-cross-AR-during-compile.patch \ | ||
21 | " | ||
22 | |||
23 | SRC_URI[md5sum] = "f719bc9966df28e67fc6ebc405e7ea03" | ||
24 | SRC_URI[sha256sum] = "03a0360edcd84bec156fe211bbc4fc8c78790973ce4e8b990a11d778d40b1a26" | ||
25 | |||
26 | inherit autotools gettext texinfo update-alternatives | ||
27 | |||
28 | FILES_${PN} += "${datadir}/awk" | ||
29 | FILES_${PN}-dev += "${libdir}/${BPN}/*.la" | ||
30 | |||
31 | ALTERNATIVE_${PN} = "awk" | ||
32 | ALTERNATIVE_TARGET[awk] = "${bindir}/gawk" | ||
33 | ALTERNATIVE_PRIORITY = "100" | ||
34 | |||
35 | do_install_append() { | ||
36 | # remove the link since we don't package it | ||
37 | rm ${D}${bindir}/awk | ||
38 | } | ||
39 | |||
40 | inherit ptest | ||
41 | |||
42 | do_install_ptest() { | ||
43 | mkdir ${D}${PTEST_PATH}/test | ||
44 | ln -s ${bindir}/gawk ${D}${PTEST_PATH}/gawk | ||
45 | for i in `grep -vE "@|^$|#|Gt-dummy" ${S}/test/Maketests |awk -F: '{print $1}'` Maketests inclib.awk; \ | ||
46 | do cp ${S}/test/$i* ${D}${PTEST_PATH}/test; \ | ||
47 | done | ||
48 | sed -i -e 's|/usr/local/bin|${bindir}|g' \ | ||
49 | -e 's|#!${base_bindir}/awk|#!${bindir}/awk|g' ${D}${PTEST_PATH}/test/*.awk | ||
50 | |||
51 | sed -i -e "s|GAWKLOCALE|LANG|g" ${D}${PTEST_PATH}/test/Maketests | ||
52 | } | ||
53 | |||
54 | RDEPENDS_${PN}-ptest += "make" | ||
55 | |||
56 | RDEPENDS_${PN}-ptest_append_libc-glibc = "\ | ||
57 | locale-base-en-us.iso-8859-1 \ | ||
58 | " | ||
59 | |||
60 | BBCLASSEXTEND = "native nativesdk" | ||
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..e94cf19db4 --- /dev/null +++ b/meta/recipes-extended/gawk/gawk_5.3.0.bb | |||
@@ -0,0 +1,88 @@ | |||
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://0001-m4-readline-add-missing-includes.patch \ | ||
20 | file://run-ptest \ | ||
21 | " | ||
22 | |||
23 | SRC_URI[sha256sum] = "378f8864ec21cfceaa048f7e1869ac9b4597b449087caf1eb55e440d30273336" | ||
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 | for t in time timeout; do | ||
64 | echo $t >> ${D}${PTEST_PATH}/test/skipped.txt | ||
65 | done | ||
66 | } | ||
67 | |||
68 | do_install_ptest:append:libc-musl() { | ||
69 | # Reported https://lists.gnu.org/archive/html/bug-gawk/2021-02/msg00005.html | ||
70 | rm -f ${D}${PTEST_PATH}/test/clos1way6.* | ||
71 | # Needs en_US.UTF-8 but then does not work with musl | ||
72 | rm -f ${D}${PTEST_PATH}/test/backsmalls1.* | ||
73 | # Needs en_US.UTF-8 but then does not work with musl | ||
74 | rm -f ${D}${PTEST_PATH}/test/commas.* | ||
75 | # The below two need LANG=C inside the make rule for musl | ||
76 | rm -f ${D}${PTEST_PATH}/test/rebt8b1.* | ||
77 | rm -f ${D}${PTEST_PATH}/test/regx8bit.* | ||
78 | for t in clos1way6 backsmalls1 commas rebt8b1 regx8bit; do | ||
79 | echo $t >> ${D}${PTEST_PATH}/test/skipped.txt | ||
80 | done | ||
81 | } | ||
82 | |||
83 | RDEPENDS:${PN}-ptest += "make locale-base-en-us coreutils" | ||
84 | |||
85 | RDEPENDS:${PN}-ptest:append:libc-glibc = " locale-base-en-us.iso-8859-1" | ||
86 | RDEPENDS:${PN}-ptest:append:libc-musl = " musl-locales" | ||
87 | |||
88 | BBCLASSEXTEND = "native nativesdk" | ||