Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [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: GPLv2 |
| 10 | # gawk >= 3.1.6: GPLv3 |
| 11 | LICENSE = "GPLv3" |
| 12 | LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" |
| 13 | |
Brad Bishop | 64c979e | 2019-11-04 13:55:29 -0500 | [diff] [blame] | 14 | PACKAGECONFIG ??= "readline" |
| 15 | PACKAGECONFIG[readline] = "--with-readline,--without-readline,readline" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 16 | PACKAGECONFIG[mpfr] = "--with-mpfr,--without-mpfr, mpfr" |
| 17 | |
| 18 | SRC_URI = "${GNU_MIRROR}/gawk/gawk-${PV}.tar.gz \ |
| 19 | file://run-ptest \ |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 20 | file://0001-Use-cross-AR-during-compile.patch \ |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 21 | " |
| 22 | |
Andrew Geissler | 4ed12e1 | 2020-06-05 18:00:41 -0500 | [diff] [blame] | 23 | SRC_URI[md5sum] = "f719bc9966df28e67fc6ebc405e7ea03" |
| 24 | SRC_URI[sha256sum] = "03a0360edcd84bec156fe211bbc4fc8c78790973ce4e8b990a11d778d40b1a26" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 25 | |
| 26 | inherit autotools gettext texinfo update-alternatives |
| 27 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 28 | FILES:${PN} += "${datadir}/awk" |
| 29 | FILES:${PN}-dev += "${libdir}/${BPN}/*.la" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 30 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 31 | ALTERNATIVE:${PN} = "awk" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 32 | ALTERNATIVE_TARGET[awk] = "${bindir}/gawk" |
| 33 | ALTERNATIVE_PRIORITY = "100" |
| 34 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 35 | do_install:append() { |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 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 |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 44 | ln -s ${bindir}/gawk ${D}${PTEST_PATH}/gawk |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 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 |
Brad Bishop | d5ae7d9 | 2018-06-14 09:52:03 -0700 | [diff] [blame] | 48 | sed -i -e 's|/usr/local/bin|${bindir}|g' \ |
| 49 | -e 's|#!${base_bindir}/awk|#!${bindir}/awk|g' ${D}${PTEST_PATH}/test/*.awk |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 50 | |
| 51 | sed -i -e "s|GAWKLOCALE|LANG|g" ${D}${PTEST_PATH}/test/Maketests |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 52 | } |
| 53 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 54 | RDEPENDS:${PN}-ptest += "make" |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 55 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 56 | RDEPENDS:${PN}-ptest:append:libc-glibc = "\ |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 57 | locale-base-en-us.iso-8859-1 \ |
| 58 | " |
| 59 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 60 | BBCLASSEXTEND = "native nativesdk" |