summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/gawk
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-extended/gawk')
-rw-r--r--meta/recipes-extended/gawk/gawk-3.1.5/gawk-3.1.5_fix_for_automake-1.12.patch41
-rw-r--r--meta/recipes-extended/gawk/gawk-4.0.2/fflash.sh-awk-variable.patch33
-rw-r--r--meta/recipes-extended/gawk/gawk-4.0.2/run-ptest10
-rw-r--r--meta/recipes-extended/gawk/gawk-4.0.2/run-ptest.awk32
-rw-r--r--meta/recipes-extended/gawk/gawk_3.1.5.bb42
-rw-r--r--meta/recipes-extended/gawk/gawk_4.0.2.bb52
6 files changed, 210 insertions, 0 deletions
diff --git a/meta/recipes-extended/gawk/gawk-3.1.5/gawk-3.1.5_fix_for_automake-1.12.patch b/meta/recipes-extended/gawk/gawk-3.1.5/gawk-3.1.5_fix_for_automake-1.12.patch
new file mode 100644
index 0000000000..b3e7987cef
--- /dev/null
+++ b/meta/recipes-extended/gawk/gawk-3.1.5/gawk-3.1.5_fix_for_automake-1.12.patch
@@ -0,0 +1,41 @@
1Upstream-Status: Pending
2
3automake 1.12 has depricated automatic de-ANSI-fication support
4
5this patch avoids these kinds of errors:
6
7| configure.ac:127: error: automatic de-ANSI-fication support has been removed
8| /srv/home/nitin/builds/build-gcc47/tmp/sysroots/x86_64-linux/usr/share/aclocal-1.12/protos.m4:12: AM_C_PROTOTYPES is expanded from...
9| configure.ac:127: the top level
10| autom4te: m4 failed with exit status: 1
11...
12| Makefile.am:27: error: automatic de-ANSI-fication support has been removed
13
14Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
152012/05/04
16
17Index: gawk-3.1.5/configure.ac
18===================================================================
19--- gawk-3.1.5.orig/configure.ac
20+++ gawk-3.1.5/configure.ac
21@@ -124,7 +124,6 @@ fi
22
23 dnl check for C compiler for automake
24 AM_PROG_CC_STDC
25-AM_C_PROTOTYPES
26
27 dnl Cygwin doesn't like to get libs with full paths
28 dnl since that overrides linking against DLLs.
29Index: gawk-3.1.5/Makefile.am
30===================================================================
31--- gawk-3.1.5.orig/Makefile.am
32+++ gawk-3.1.5/Makefile.am
33@@ -24,7 +24,7 @@
34 ## process this file with automake to produce Makefile.in
35
36 # Automatic de-ANSI-fication if needed, make .bz2 files also.
37-AUTOMAKE_OPTIONS = ansi2knr dist-bzip2
38+AUTOMAKE_OPTIONS = dist-bzip2
39
40 # This undocumented variable insures that aclocal runs
41 # correctly after changing configure.ac
diff --git a/meta/recipes-extended/gawk/gawk-4.0.2/fflash.sh-awk-variable.patch b/meta/recipes-extended/gawk/gawk-4.0.2/fflash.sh-awk-variable.patch
new file mode 100644
index 0000000000..b241097571
--- /dev/null
+++ b/meta/recipes-extended/gawk/gawk-4.0.2/fflash.sh-awk-variable.patch
@@ -0,0 +1,33 @@
1test/fflush.sh: Remove hardcoded gawk path.
2
3Signed-off-by: Anders Roxell <anders.roxell@enea.com>
4Upstream-Status: Pending
5---
6--- a/test/fflush.sh 2012-05-03 20:13:57.000000000 +0200
7+++ b/test/fflush.sh 2013-04-08 16:28:00.170796200 +0200
8@@ -1,16 +1,17 @@
9 #! /bin/sh
10-../gawk 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"cat"}'
11+AWK=${AWK-../gawk}
12+$AWK 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"cat"}'
13
14-../gawk 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"cat"}'|cat
15+$AWK 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"cat"}'|cat
16
17-../gawk 'BEGIN{print "1st";fflush("/dev/stdout");close("/dev/stdout");print "2nd"|"cat"}'|cat
18+$AWK 'BEGIN{print "1st";fflush("/dev/stdout");close("/dev/stdout");print "2nd"|"cat"}'|cat
19
20-../gawk 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"cat";close("cat")}'|cat
21+$AWK 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"cat";close("cat")}'|cat
22
23-../gawk 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"cat";close("cat")}'|cat
24+$AWK 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"cat";close("cat")}'|cat
25
26-../gawk 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"cat";close("cat")}'|cat
27+$AWK 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"cat";close("cat")}'|cat
28
29-../gawk 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"sort"}'|cat
30+$AWK 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"sort"}'|cat
31
32-../gawk 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"sort";close("sort")}'|cat
33+$AWK 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"sort";close("sort")}'|cat
diff --git a/meta/recipes-extended/gawk/gawk-4.0.2/run-ptest b/meta/recipes-extended/gawk/gawk-4.0.2/run-ptest
new file mode 100644
index 0000000000..7d214eafbe
--- /dev/null
+++ b/meta/recipes-extended/gawk/gawk-4.0.2/run-ptest
@@ -0,0 +1,10 @@
1#!/bin/sh
2
3cd test
4for i in `grep -vE "@|^$|#|Gt-dummy" Maketests |awk -F: '{print $1}'`; \
5 do LC_ALL=${GAWKLOCALE:-C} LANG=${GAWKLOCALE:-C} srcdir=`pwd` AWK=gawk CMP=cmp \
6 make -f Maketests $i &>$i.tmp; \
7 grep -q "Error" $i.tmp; \
8 if [ $? == 0 ]; then echo "FAIL: $i"; \
9 else echo "PASS: $i"; rm -f $i.tmp; fi; \
10done
diff --git a/meta/recipes-extended/gawk/gawk-4.0.2/run-ptest.awk b/meta/recipes-extended/gawk/gawk-4.0.2/run-ptest.awk
new file mode 100644
index 0000000000..6f651d8105
--- /dev/null
+++ b/meta/recipes-extended/gawk/gawk-4.0.2/run-ptest.awk
@@ -0,0 +1,32 @@
1# The awk test suite prints test names prior to running the test and shows
2# results in the form of "make" errors.
3# This script post-processes the output to detect failure and print PASS
4# only if there was no subsequent error message for the test.
5
6function print_prev()
7{
8 if (length(testname))
9 if (fail == 1)
10 printf "FAIL: %s\n", testname
11 else
12 printf "PASS: %s\n", testname
13}
14
15{
16 print $0
17
18 if (match($0, /^(\w+)$/, result)) {
19 print_prev()
20 testname = result[1];
21 fail = 0
22 }
23
24 if (match($0, /^make: \[(.+?)\]/)) {
25 fail = 1
26 }
27
28}
29
30END {
31 print_prev()
32}
diff --git a/meta/recipes-extended/gawk/gawk_3.1.5.bb b/meta/recipes-extended/gawk/gawk_3.1.5.bb
new file mode 100644
index 0000000000..4d9d6e4c43
--- /dev/null
+++ b/meta/recipes-extended/gawk/gawk_3.1.5.bb
@@ -0,0 +1,42 @@
1SUMMARY = "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 = "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 = "GPLv2"
12LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
13
14RDEPENDS_gawk += "gawk-common"
15RDEPENDS_pgawk += "gawk-common"
16PR = "r2"
17
18SRC_URI = "${GNU_MIRROR}/gawk/gawk-${PV}.tar.gz \
19 file://gawk-3.1.5_fix_for_automake-1.12.patch"
20
21SRC_URI[md5sum] = "4760325489479cac17fe0114b8f62f30"
22SRC_URI[sha256sum] = "463dcb9d0ca398b1d4f5a332f6cd9cec56441265fca616f2ea1b44d459e9f0f8"
23
24inherit autotools gettext update-alternatives
25
26PACKAGES += "gawk-common pgawk"
27
28FILES_${PN} = "${bindir}/gawk* ${bindir}/igawk"
29FILES_gawk-common += "${datadir}/awk/* ${libexecdir}/awk/*"
30FILES_pgawk = "${bindir}/pgawk*"
31FILES_${PN}-dbg += "${libexecdir}/awk/.debug"
32
33ALTERNATIVE_${PN} = "awk"
34ALTERNATIVE_TARGET[awk] = "${bindir}/gawk"
35ALTERNATIVE_PRIORITY = "100"
36
37CFLAGS += "-D PROTOTYPES"
38
39do_install_append() {
40 # remove the link since we don't package it
41 rm ${D}${bindir}/awk
42}
diff --git a/meta/recipes-extended/gawk/gawk_4.0.2.bb b/meta/recipes-extended/gawk/gawk_4.0.2.bb
new file mode 100644
index 0000000000..eb86af39da
--- /dev/null
+++ b/meta/recipes-extended/gawk/gawk_4.0.2.bb
@@ -0,0 +1,52 @@
1SUMMARY = "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 = "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
14DEPENDS += "readline"
15
16RDEPENDS_gawk += "gawk-common"
17RDEPENDS_pgawk += "gawk-common"
18
19SRC_URI = "${GNU_MIRROR}/gawk/gawk-${PV}.tar.gz \
20 file://run-ptest \
21"
22
23SRC_URI[md5sum] = "4d505dc2c9f1eb3e9f8d6cac87d4bd1a"
24SRC_URI[sha256sum] = "6e0de117c3713aa8d7fa347fc9fd645b10038ae49d8cf947d8c1d51cbb76141a"
25
26inherit autotools gettext update-alternatives
27
28PACKAGES += "gawk-common pgawk dgawk"
29
30FILES_${PN} = "${bindir}/gawk* ${bindir}/igawk"
31FILES_gawk-common += "${datadir}/awk/* ${libexecdir}/awk/*"
32FILES_pgawk = "${bindir}/pgawk*"
33FILES_${PN}-dbg += "${libexecdir}/awk/.debug"
34FILES_dgawk = "${bindir}/dgawk*"
35
36ALTERNATIVE_${PN} = "awk"
37ALTERNATIVE_TARGET[awk] = "${bindir}/gawk"
38ALTERNATIVE_PRIORITY = "100"
39
40do_install_append() {
41 # remove the link since we don't package it
42 rm ${D}${bindir}/awk
43}
44
45inherit ptest
46
47do_install_ptest() {
48 mkdir ${D}${PTEST_PATH}/test
49 for i in `grep -vE "@|^$|#|Gt-dummy" ${S}/test/Maketests |awk -F: '{print $1}'` Maketests; \
50 do cp ${S}/test/$i* ${D}${PTEST_PATH}/test; \
51 done
52}