summaryrefslogtreecommitdiffstats
path: root/meta/packages/grep
diff options
context:
space:
mode:
authorScott Garman <scott.a.garman@intel.com>2010-08-18 08:26:26 -0700
committerRichard Purdie <rpurdie@linux.intel.com>2010-08-27 13:29:51 +0100
commitdd30a64fc1e3f306421d38d3333b70a422759fd6 (patch)
treecdfa301b55879e113ccab38d94ed7b75759d6ef7 /meta/packages/grep
parent119b69dd266c0e71d448815eb0722186d9f69c6d (diff)
downloadpoky-dd30a64fc1e3f306421d38d3333b70a422759fd6.tar.gz
grep: new recipe v2.5.1a
This is the last GPLv2 version of grep. This recipe was dervied from OpenEmbedded's version. Signed-off-by: Scott Garman <scott.a.garman@intel.com>
Diffstat (limited to 'meta/packages/grep')
-rw-r--r--meta/packages/grep/grep-2.5.1a/uclibc-fix.patch53
-rw-r--r--meta/packages/grep/grep_2.5.1a.bb40
2 files changed, 93 insertions, 0 deletions
diff --git a/meta/packages/grep/grep-2.5.1a/uclibc-fix.patch b/meta/packages/grep/grep-2.5.1a/uclibc-fix.patch
new file mode 100644
index 0000000000..8fc7c4852f
--- /dev/null
+++ b/meta/packages/grep/grep-2.5.1a/uclibc-fix.patch
@@ -0,0 +1,53 @@
1# Fix to use mempcpy instead of __mempcpy. This is needed for uclibc which
2# doesn't define __mempcpy, only mempcpy. Since both uclibc and glibc have
3# mempcpy, we'll just use that instead.
4# Patch source: OpenEmbedded
5
6Index: grep-2.5.1/intl/localealias.c
7===================================================================
8--- grep-2.5.1.orig/intl/localealias.c 2002-03-14 00:39:06.000000000 +1100
9+++ grep-2.5.1/intl/localealias.c 2007-05-17 13:53:58.000000000 +1000
10@@ -65,7 +65,7 @@
11 # define strcasecmp __strcasecmp
12
13 # ifndef mempcpy
14-# define mempcpy __mempcpy
15+# error "mempcpy not detected"
16 # endif
17 # define HAVE_MEMPCPY 1
18 # define HAVE___FSETLOCKING 1
19Index: grep-2.5.1/lib/getopt.c
20===================================================================
21--- grep-2.5.1.orig/lib/getopt.c 2001-03-04 16:33:12.000000000 +1100
22+++ grep-2.5.1/lib/getopt.c 2007-05-17 13:51:44.000000000 +1000
23@@ -326,7 +326,7 @@
24 nonoption_flags_len = nonoption_flags_max_len = 0;
25 else
26 {
27- memset (__mempcpy (new_str, __getopt_nonoption_flags,
28+ memset (mempcpy (new_str, __getopt_nonoption_flags,
29 nonoption_flags_max_len),
30 '\0', top + 1 - nonoption_flags_max_len);
31 nonoption_flags_max_len = top + 1;
32@@ -437,7 +437,7 @@
33 if (__getopt_nonoption_flags == NULL)
34 nonoption_flags_max_len = -1;
35 else
36- memset (__mempcpy (__getopt_nonoption_flags, orig_str, len),
37+ memset (mempcpy (__getopt_nonoption_flags, orig_str, len),
38 '\0', nonoption_flags_max_len - len);
39 }
40 }
41Index: grep-2.5.1/lib/regex.c
42===================================================================
43--- grep-2.5.1.orig/lib/regex.c 2001-04-03 04:04:45.000000000 +1000
44+++ grep-2.5.1/lib/regex.c 2007-05-17 13:51:48.000000000 +1000
45@@ -7842,7 +7842,7 @@
46 if (msg_size > errbuf_size)
47 {
48 #if defined HAVE_MEMPCPY || defined _LIBC
49- *((char *) __mempcpy (errbuf, msg, errbuf_size - 1)) = '\0';
50+ *((char *) mempcpy (errbuf, msg, errbuf_size - 1)) = '\0';
51 #else
52 memcpy (errbuf, msg, errbuf_size - 1);
53 errbuf[errbuf_size - 1] = 0;
diff --git a/meta/packages/grep/grep_2.5.1a.bb b/meta/packages/grep/grep_2.5.1a.bb
new file mode 100644
index 0000000000..d50d5a374e
--- /dev/null
+++ b/meta/packages/grep/grep_2.5.1a.bb
@@ -0,0 +1,40 @@
1DESCRIPTION = "grep GNU utility"
2SECTION = "console/utils"
3LICENSE = "GPLv2"
4LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
5
6PR = "r1"
7
8SRC_URI = "${GNU_MIRROR}/grep/grep-${PV}.tar.bz2 \
9 file://uclibc-fix.patch"
10
11SRC_URI[md5sum] = "52202fe462770fa6be1bb667bd6cf30c"
12SRC_URI[sha256sum] = "38c8a2bb9223d1fb1b10bdd607cf44830afc92fd451ac4cd07619bf92bdd3132"
13
14inherit autotools gettext
15
16EXTRA_OECONF = "--disable-perl-regexp --disable-ncurses"
17
18do_configure_prepend () {
19 rm -f ${S}/m4/init.m4
20}
21
22do_install () {
23 autotools_do_install
24 install -d ${D}${base_bindir}
25 mv ${D}${bindir}/grep ${D}${base_bindir}/grep.${PN}
26 mv ${D}${bindir}/egrep ${D}${base_bindir}/egrep.${PN}
27 mv ${D}${bindir}/fgrep ${D}${base_bindir}/fgrep.${PN}
28}
29
30pkg_postinst_${PN} () {
31 update-alternatives --install ${base_bindir}/grep grep grep.${PN} 100
32 update-alternatives --install ${base_bindir}/egrep egrep egrep.${PN} 100
33 update-alternatives --install ${base_bindir}/fgrep fgrep fgrep.${PN} 100
34}
35
36pkg_prerm_${PN} () {
37 update-alternatives --remove grep grep.${PN}
38 update-alternatives --remove egrep egrep.${PN}
39 update-alternatives --remove fgrep fgrep.${PN}
40}