blob: eaba6c78eda2c94aa6ae5044b50a973b09413967 [file] [log] [blame]
Brad Bishop316dfdd2018-06-25 12:45:53 -04001SUMMARY = "GNU awk text processing utility"
2DESCRIPTION = "The GNU version of awk, a text processing utility. \
3Awk interprets a special-purpose programming language to do \
4quick and easy text pattern matching and reformatting jobs."
5HOMEPAGE = "https://www.gnu.org/software/gawk/"
6BUGTRACKER = "bug-gawk@gnu.org"
7SECTION = "console/utils"
8
9# gawk <= 3.1.5: GPLv2
10# gawk >= 3.1.6: GPLv3
11LICENSE = "GPLv3"
12LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
13
Brad Bishop64c979e2019-11-04 13:55:29 -050014PACKAGECONFIG ??= "readline"
15PACKAGECONFIG[readline] = "--with-readline,--without-readline,readline"
Brad Bishop316dfdd2018-06-25 12:45:53 -040016PACKAGECONFIG[mpfr] = "--with-mpfr,--without-mpfr, mpfr"
17
18SRC_URI = "${GNU_MIRROR}/gawk/gawk-${PV}.tar.gz \
19 file://run-ptest \
20"
21
Brad Bishop96ff1982019-08-19 13:50:42 -040022SRC_URI[md5sum] = "c5441c73cc451764055ee65e9a4292bb"
23SRC_URI[sha256sum] = "625bf3718e25a84dc4486135d5cb5388174682362c70107fd13f21572f5603bb"
Brad Bishop316dfdd2018-06-25 12:45:53 -040024
25inherit autotools gettext texinfo update-alternatives
26
27FILES_${PN} += "${datadir}/awk"
28FILES_${PN}-dev += "${libdir}/${BPN}/*.la"
29
30ALTERNATIVE_${PN} = "awk"
31ALTERNATIVE_TARGET[awk] = "${bindir}/gawk"
32ALTERNATIVE_PRIORITY = "100"
33
34do_install_append() {
35 # remove the link since we don't package it
36 rm ${D}${bindir}/awk
37}
38
39inherit ptest
40
41do_install_ptest() {
42 mkdir ${D}${PTEST_PATH}/test
Brad Bishop15ae2502019-06-18 21:44:24 -040043 ln -s ${bindir}/gawk ${D}${PTEST_PATH}/gawk
Brad Bishop316dfdd2018-06-25 12:45:53 -040044 for i in `grep -vE "@|^$|#|Gt-dummy" ${S}/test/Maketests |awk -F: '{print $1}'` Maketests inclib.awk; \
45 do cp ${S}/test/$i* ${D}${PTEST_PATH}/test; \
46 done
Brad Bishopd5ae7d92018-06-14 09:52:03 -070047 sed -i -e 's|/usr/local/bin|${bindir}|g' \
48 -e 's|#!${base_bindir}/awk|#!${bindir}/awk|g' ${D}${PTEST_PATH}/test/*.awk
Brad Bishop316dfdd2018-06-25 12:45:53 -040049}
50
Brad Bishop15ae2502019-06-18 21:44:24 -040051RDEPENDS_${PN}-ptest += "make"
52
Brad Bishop316dfdd2018-06-25 12:45:53 -040053BBCLASSEXTEND = "native nativesdk"