* [PATCH] grep: update 2.6.3 to 2.7
@ 2010-09-28 4:47 Scott Garman
2010-09-28 8:21 ` Holger Freyther
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Scott Garman @ 2010-09-28 4:47 UTC (permalink / raw)
To: openembedded-devel; +Cc: Scott Garman
Signed-off-by: Scott Garman <sgarman@zenlinux.com>
---
recipes/grep/grep-2.6.3/uclibc-fix.patch | 50 ---------------------------
recipes/grep/grep-2.7/uclibc_libiconv.patch | 18 ++++++++++
recipes/grep/grep_2.6.3.bb | 45 ------------------------
recipes/grep/grep_2.7.bb | 42 ++++++++++++++++++++++
4 files changed, 60 insertions(+), 95 deletions(-)
delete mode 100644 recipes/grep/grep-2.6.3/uclibc-fix.patch
create mode 100644 recipes/grep/grep-2.7/uclibc_libiconv.patch
delete mode 100644 recipes/grep/grep_2.6.3.bb
create mode 100644 recipes/grep/grep_2.7.bb
diff --git a/recipes/grep/grep-2.6.3/uclibc-fix.patch b/recipes/grep/grep-2.6.3/uclibc-fix.patch
deleted file mode 100644
index 2e1c584..0000000
--- a/recipes/grep/grep-2.6.3/uclibc-fix.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-Fix to use mempcpy instead of __mempcpy. This is needed for uclibc which
-doesn't define __mempcpy only mempcpy. Since both uclibc and glibc have
-mempcpy we'll just use that instead.
-
-Index: grep-2.6.3/lib/getopt.c
-===================================================================
---- grep-2.6.3.orig/lib/getopt.c 2010-03-21 00:34:02.000000000 -0700
-+++ grep-2.6.3/lib/getopt.c 2010-05-22 21:37:11.352740539 -0700
-@@ -41,6 +41,10 @@
- # include <wchar.h>
- #endif
-
-+#ifdef __UCLIBC__
-+#define __mempcpy mempcpy
-+#endif
-+
- /* This version of `getopt' appears to the caller like standard Unix `getopt'
- but it behaves differently for the user, since it allows the user
- to intersperse the options with the other arguments.
-Index: grep-2.6.3/gnulib-tests/setenv.c
-===================================================================
---- grep-2.6.3.orig/gnulib-tests/setenv.c 2010-05-22 21:37:53.655168151 -0700
-+++ grep-2.6.3/gnulib-tests/setenv.c 2010-05-22 21:38:42.792745476 -0700
-@@ -68,6 +68,10 @@ __libc_lock_define_initialized (static,
- # define tsearch __tsearch
- #endif
-
-+#ifdef __UCLIBC__
-+#define __mempcpy mempcpy
-+#endif
-+
- /* In the GNU C library implementation we try to be more clever and
- allow arbitrarily many changes of the environment given that the used
- values are from a small set. Outside glibc this will eat up all
-Index: grep-2.6.3/lib/regexec.c
-===================================================================
---- grep-2.6.3.orig/lib/regexec.c 2010-05-22 21:36:02.655154671 -0700
-+++ grep-2.6.3/lib/regexec.c 2010-05-22 21:37:26.212743273 -0700
-@@ -22,6 +22,11 @@
-
- #include "verify.h"
- #include "intprops.h"
-+
-+#ifdef __UCLIBC__
-+#define __mempcpy mempcpy
-+#endif
-+
- static reg_errcode_t match_ctx_init (re_match_context_t *cache, int eflags,
- Idx n) internal_function;
- static void match_ctx_clean (re_match_context_t *mctx) internal_function;
diff --git a/recipes/grep/grep-2.7/uclibc_libiconv.patch b/recipes/grep/grep-2.7/uclibc_libiconv.patch
new file mode 100644
index 0000000..de83a61
--- /dev/null
+++ b/recipes/grep/grep-2.7/uclibc_libiconv.patch
@@ -0,0 +1,18 @@
+# Needed to get grep to build with uclibc.
+# Patch submitted by Bruno Haible to the grep ML on 2010-09-23.
+#
+# Signed-off-by: Scott Garman <sgarman@zenlinux.com>
+diff -ur grep-2.7.orig/src/Makefile.am grep-2.7/src/Makefile.am
+--- grep-2.7.orig/src/Makefile.am 2010-04-04 05:22:24.000000000 -0700
++++ grep-2.7/src/Makefile.am 2010-09-27 21:07:39.370222501 -0700
+@@ -36,7 +36,9 @@
+ # must precede $(LIBINTL) in order to ensure we use GNU getopt.
+ # But libgreputils.a must also follow $(LIBINTL), since libintl uses
+ # replacement functions defined in libgreputils.a.
+-LDADD = libgrep.a ../lib/libgreputils.a $(LIBINTL) ../lib/libgreputils.a
++LDADD = \
++ libgrep.a \
++ ../lib/libgreputils.a $(LIBINTL) ../lib/libgreputils.a $(LIBICONV)
+
+ grep_LDADD = $(LDADD) $(LIB_PCRE)
+ localedir = $(datadir)/locale
diff --git a/recipes/grep/grep_2.6.3.bb b/recipes/grep/grep_2.6.3.bb
deleted file mode 100644
index 25c2a19..0000000
--- a/recipes/grep/grep_2.6.3.bb
+++ /dev/null
@@ -1,45 +0,0 @@
-LICENSE = "GPL"
-SECTION = "console/utils"
-DESCRIPTION = "grep GNU utility"
-PR = "r2"
-
-SRC_URI = "${GNU_MIRROR}/grep/grep-${PV}.tar.gz \
- file://uclibc-fix.patch"
-
-inherit autotools gettext
-
-EXTRA_OECONF = "--disable-perl-regexp --disable-ncurses"
-EXTRA_OECONF_virtclass-native = "--with-included-regex --disable-ncurses"
-
-do_configure () {
- rm -f ${S}/m4/init.m4
- autotools_do_configure
-}
-
-do_install () {
- autotools_do_install
- install -d ${D}${base_bindir}
- mv ${D}${bindir}/grep ${D}${base_bindir}/grep.${PN}
- mv ${D}${bindir}/egrep ${D}${base_bindir}/egrep.${PN}
- mv ${D}${bindir}/fgrep ${D}${base_bindir}/fgrep.${PN}
-}
-
-do_install_virtclass-native () {
- autotools_do_install
-}
-
-pkg_postinst_${PN} () {
- update-alternatives --install ${base_bindir}/grep grep grep.${PN} 100
- update-alternatives --install ${base_bindir}/egrep egrep egrep.${PN} 100
- update-alternatives --install ${base_bindir}/fgrep fgrep fgrep.${PN} 100
-}
-
-pkg_prerm_${PN} () {
- update-alternatives --remove grep grep.${PN}
- update-alternatives --remove egrep egrep.${PN}
- update-alternatives --remove fgrep fgrep.${PN}
-}
-
-BBCLASSEXTEND = "native"
-SRC_URI[md5sum] = "3095b57837b312f087c0680559de7f13"
-SRC_URI[sha256sum] = "a340e5d1544d9a964072196be627bad3e434ff7a87f3a57ea15aaccbbea4d666"
diff --git a/recipes/grep/grep_2.7.bb b/recipes/grep/grep_2.7.bb
new file mode 100644
index 0000000..6267162
--- /dev/null
+++ b/recipes/grep/grep_2.7.bb
@@ -0,0 +1,42 @@
+DESCRIPTION = "grep GNU utility"
+SECTION = "console/utils"
+HOMEPAGE = "http://savannah.gnu.org/projects/grep/"
+LICENSE = "GPLv3"
+
+PR = "r0"
+
+SRC_URI = "${GNU_MIRROR}/grep/grep-${PV}.tar.gz \
+ file://uclibc_libiconv.patch"
+
+SRC_URI[md5sum] = "e848f07e3e79aa7899345d17c7e4115e"
+SRC_URI[sha256sum] = "ad14831015a79cea36785aa47415f6c0653a6ac4eaf9c15456f0d9d09c9e1bad"
+
+inherit autotools gettext
+
+BBCLASSEXTEND = "native"
+
+EXTRA_OECONF = "--disable-perl-regexp"
+
+do_configure_prepend () {
+ rm -f ${S}/m4/init.m4
+}
+
+do_install () {
+ autotools_do_install
+ install -d ${D}${base_bindir}
+ mv ${D}${bindir}/grep ${D}${base_bindir}/grep.${PN}
+ mv ${D}${bindir}/egrep ${D}${base_bindir}/egrep.${PN}
+ mv ${D}${bindir}/fgrep ${D}${base_bindir}/fgrep.${PN}
+}
+
+pkg_postinst_${PN} () {
+ update-alternatives --install ${base_bindir}/grep grep grep.${PN} 100
+ update-alternatives --install ${base_bindir}/egrep egrep egrep.${PN} 100
+ update-alternatives --install ${base_bindir}/fgrep fgrep fgrep.${PN} 100
+}
+
+pkg_prerm_${PN} () {
+ update-alternatives --remove grep grep.${PN}
+ update-alternatives --remove egrep egrep.${PN}
+ update-alternatives --remove fgrep fgrep.${PN}
+}
--
1.6.3.3
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH] grep: update 2.6.3 to 2.7
2010-09-28 4:47 [PATCH] grep: update 2.6.3 to 2.7 Scott Garman
@ 2010-09-28 8:21 ` Holger Freyther
2010-09-28 16:35 ` Scott Garman
2010-09-28 15:32 ` Khem Raj
2010-09-28 16:42 ` [PATCH v2] " Scott Garman
2 siblings, 1 reply; 6+ messages in thread
From: Holger Freyther @ 2010-09-28 8:21 UTC (permalink / raw)
To: openembedded-devel
On 09/28/2010 12:47 PM, Scott Garman wrote:
> Signed-off-by: Scott Garman <sgarman@zenlinux.com>
> ---
> recipes/grep/grep-2.6.3/uclibc-fix.patch | 50 ---------------------------
> recipes/grep/grep-2.7/uclibc_libiconv.patch | 18 ++++++++++
> recipes/grep/grep_2.6.3.bb | 45 ------------------------
> recipes/grep/grep_2.7.bb | 42 ++++++++++++++++++++++
> 4 files changed, 60 insertions(+), 95 deletions(-)
> delete mode 100644 recipes/grep/grep-2.6.3/uclibc-fix.patch
> create mode 100644 recipes/grep/grep-2.7/uclibc_libiconv.patch
> delete mode 100644 recipes/grep/grep_2.6.3.bb
> create mode 100644 recipes/grep/grep_2.7.bb
Could you please regenerate with rename detection (man git-format-patch, man
git-diff)?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] grep: update 2.6.3 to 2.7
2010-09-28 8:21 ` Holger Freyther
@ 2010-09-28 16:35 ` Scott Garman
0 siblings, 0 replies; 6+ messages in thread
From: Scott Garman @ 2010-09-28 16:35 UTC (permalink / raw)
To: openembedded-devel
On 09/28/2010 01:21 AM, Holger Freyther wrote:
> On 09/28/2010 12:47 PM, Scott Garman wrote:
>> Signed-off-by: Scott Garman<sgarman@zenlinux.com>
>> ---
>> recipes/grep/grep-2.6.3/uclibc-fix.patch | 50 ---------------------------
>> recipes/grep/grep-2.7/uclibc_libiconv.patch | 18 ++++++++++
>> recipes/grep/grep_2.6.3.bb | 45 ------------------------
>> recipes/grep/grep_2.7.bb | 42 ++++++++++++++++++++++
>> 4 files changed, 60 insertions(+), 95 deletions(-)
>> delete mode 100644 recipes/grep/grep-2.6.3/uclibc-fix.patch
>> create mode 100644 recipes/grep/grep-2.7/uclibc_libiconv.patch
>> delete mode 100644 recipes/grep/grep_2.6.3.bb
>> create mode 100644 recipes/grep/grep_2.7.bb
>
> Could you please regenerate with rename detection (man git-format-patch, man
> git-diff)?
Sure thing - I didn't realize rename detection wasn't included by
default until you pointed it out.
Thanks,
Scott
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] grep: update 2.6.3 to 2.7
2010-09-28 4:47 [PATCH] grep: update 2.6.3 to 2.7 Scott Garman
2010-09-28 8:21 ` Holger Freyther
@ 2010-09-28 15:32 ` Khem Raj
2010-09-28 16:40 ` Scott Garman
2010-09-28 16:42 ` [PATCH v2] " Scott Garman
2 siblings, 1 reply; 6+ messages in thread
From: Khem Raj @ 2010-09-28 15:32 UTC (permalink / raw)
To: openembedded-devel; +Cc: Scott Garman
On Mon, Sep 27, 2010 at 9:47 PM, Scott Garman <sgarman@zenlinux.com> wrote:
> Signed-off-by: Scott Garman <sgarman@zenlinux.com>
> ---
> recipes/grep/grep-2.6.3/uclibc-fix.patch | 50 ---------------------------
> recipes/grep/grep-2.7/uclibc_libiconv.patch | 18 ++++++++++
> recipes/grep/grep_2.6.3.bb | 45 ------------------------
> recipes/grep/grep_2.7.bb | 42 ++++++++++++++++++++++
> 4 files changed, 60 insertions(+), 95 deletions(-)
> delete mode 100644 recipes/grep/grep-2.6.3/uclibc-fix.patch
> create mode 100644 recipes/grep/grep-2.7/uclibc_libiconv.patch
> delete mode 100644 recipes/grep/grep_2.6.3.bb
> create mode 100644 recipes/grep/grep_2.7.bb
Please also do a build for uclibc based system if you have not done so.
and see if new grep builds/works
>
> diff --git a/recipes/grep/grep-2.6.3/uclibc-fix.patch b/recipes/grep/grep-2.6.3/uclibc-fix.patch
> deleted file mode 100644
> index 2e1c584..0000000
> --- a/recipes/grep/grep-2.6.3/uclibc-fix.patch
> +++ /dev/null
> @@ -1,50 +0,0 @@
> -Fix to use mempcpy instead of __mempcpy. This is needed for uclibc which
> -doesn't define __mempcpy only mempcpy. Since both uclibc and glibc have
> -mempcpy we'll just use that instead.
> -
> -Index: grep-2.6.3/lib/getopt.c
> -===================================================================
> ---- grep-2.6.3.orig/lib/getopt.c 2010-03-21 00:34:02.000000000 -0700
> -+++ grep-2.6.3/lib/getopt.c 2010-05-22 21:37:11.352740539 -0700
> -@@ -41,6 +41,10 @@
> - # include <wchar.h>
> - #endif
> -
> -+#ifdef __UCLIBC__
> -+#define __mempcpy mempcpy
> -+#endif
> -+
> - /* This version of `getopt' appears to the caller like standard Unix `getopt'
> - but it behaves differently for the user, since it allows the user
> - to intersperse the options with the other arguments.
> -Index: grep-2.6.3/gnulib-tests/setenv.c
> -===================================================================
> ---- grep-2.6.3.orig/gnulib-tests/setenv.c 2010-05-22 21:37:53.655168151 -0700
> -+++ grep-2.6.3/gnulib-tests/setenv.c 2010-05-22 21:38:42.792745476 -0700
> -@@ -68,6 +68,10 @@ __libc_lock_define_initialized (static,
> - # define tsearch __tsearch
> - #endif
> -
> -+#ifdef __UCLIBC__
> -+#define __mempcpy mempcpy
> -+#endif
> -+
> - /* In the GNU C library implementation we try to be more clever and
> - allow arbitrarily many changes of the environment given that the used
> - values are from a small set. Outside glibc this will eat up all
> -Index: grep-2.6.3/lib/regexec.c
> -===================================================================
> ---- grep-2.6.3.orig/lib/regexec.c 2010-05-22 21:36:02.655154671 -0700
> -+++ grep-2.6.3/lib/regexec.c 2010-05-22 21:37:26.212743273 -0700
> -@@ -22,6 +22,11 @@
> -
> - #include "verify.h"
> - #include "intprops.h"
> -+
> -+#ifdef __UCLIBC__
> -+#define __mempcpy mempcpy
> -+#endif
> -+
> - static reg_errcode_t match_ctx_init (re_match_context_t *cache, int eflags,
> - Idx n) internal_function;
> - static void match_ctx_clean (re_match_context_t *mctx) internal_function;
> diff --git a/recipes/grep/grep-2.7/uclibc_libiconv.patch b/recipes/grep/grep-2.7/uclibc_libiconv.patch
> new file mode 100644
> index 0000000..de83a61
> --- /dev/null
> +++ b/recipes/grep/grep-2.7/uclibc_libiconv.patch
> @@ -0,0 +1,18 @@
> +# Needed to get grep to build with uclibc.
> +# Patch submitted by Bruno Haible to the grep ML on 2010-09-23.
> +#
> +# Signed-off-by: Scott Garman <sgarman@zenlinux.com>
> +diff -ur grep-2.7.orig/src/Makefile.am grep-2.7/src/Makefile.am
> +--- grep-2.7.orig/src/Makefile.am 2010-04-04 05:22:24.000000000 -0700
> ++++ grep-2.7/src/Makefile.am 2010-09-27 21:07:39.370222501 -0700
> +@@ -36,7 +36,9 @@
> + # must precede $(LIBINTL) in order to ensure we use GNU getopt.
> + # But libgreputils.a must also follow $(LIBINTL), since libintl uses
> + # replacement functions defined in libgreputils.a.
> +-LDADD = libgrep.a ../lib/libgreputils.a $(LIBINTL) ../lib/libgreputils.a
> ++LDADD = \
> ++ libgrep.a \
> ++ ../lib/libgreputils.a $(LIBINTL) ../lib/libgreputils.a $(LIBICONV)
> +
> + grep_LDADD = $(LDADD) $(LIB_PCRE)
> + localedir = $(datadir)/locale
> diff --git a/recipes/grep/grep_2.6.3.bb b/recipes/grep/grep_2.6.3.bb
> deleted file mode 100644
> index 25c2a19..0000000
> --- a/recipes/grep/grep_2.6.3.bb
> +++ /dev/null
> @@ -1,45 +0,0 @@
> -LICENSE = "GPL"
> -SECTION = "console/utils"
> -DESCRIPTION = "grep GNU utility"
> -PR = "r2"
> -
> -SRC_URI = "${GNU_MIRROR}/grep/grep-${PV}.tar.gz \
> - file://uclibc-fix.patch"
> -
> -inherit autotools gettext
> -
> -EXTRA_OECONF = "--disable-perl-regexp --disable-ncurses"
> -EXTRA_OECONF_virtclass-native = "--with-included-regex --disable-ncurses"
> -
> -do_configure () {
> - rm -f ${S}/m4/init.m4
> - autotools_do_configure
> -}
> -
> -do_install () {
> - autotools_do_install
> - install -d ${D}${base_bindir}
> - mv ${D}${bindir}/grep ${D}${base_bindir}/grep.${PN}
> - mv ${D}${bindir}/egrep ${D}${base_bindir}/egrep.${PN}
> - mv ${D}${bindir}/fgrep ${D}${base_bindir}/fgrep.${PN}
> -}
> -
> -do_install_virtclass-native () {
> - autotools_do_install
> -}
> -
> -pkg_postinst_${PN} () {
> - update-alternatives --install ${base_bindir}/grep grep grep.${PN} 100
> - update-alternatives --install ${base_bindir}/egrep egrep egrep.${PN} 100
> - update-alternatives --install ${base_bindir}/fgrep fgrep fgrep.${PN} 100
> -}
> -
> -pkg_prerm_${PN} () {
> - update-alternatives --remove grep grep.${PN}
> - update-alternatives --remove egrep egrep.${PN}
> - update-alternatives --remove fgrep fgrep.${PN}
> -}
> -
> -BBCLASSEXTEND = "native"
> -SRC_URI[md5sum] = "3095b57837b312f087c0680559de7f13"
> -SRC_URI[sha256sum] = "a340e5d1544d9a964072196be627bad3e434ff7a87f3a57ea15aaccbbea4d666"
> diff --git a/recipes/grep/grep_2.7.bb b/recipes/grep/grep_2.7.bb
> new file mode 100644
> index 0000000..6267162
> --- /dev/null
> +++ b/recipes/grep/grep_2.7.bb
> @@ -0,0 +1,42 @@
> +DESCRIPTION = "grep GNU utility"
> +SECTION = "console/utils"
> +HOMEPAGE = "http://savannah.gnu.org/projects/grep/"
> +LICENSE = "GPLv3"
> +
> +PR = "r0"
> +
> +SRC_URI = "${GNU_MIRROR}/grep/grep-${PV}.tar.gz \
> + file://uclibc_libiconv.patch"
> +
> +SRC_URI[md5sum] = "e848f07e3e79aa7899345d17c7e4115e"
> +SRC_URI[sha256sum] = "ad14831015a79cea36785aa47415f6c0653a6ac4eaf9c15456f0d9d09c9e1bad"
> +
> +inherit autotools gettext
> +
> +BBCLASSEXTEND = "native"
> +
> +EXTRA_OECONF = "--disable-perl-regexp"
> +
> +do_configure_prepend () {
> + rm -f ${S}/m4/init.m4
> +}
> +
> +do_install () {
> + autotools_do_install
> + install -d ${D}${base_bindir}
> + mv ${D}${bindir}/grep ${D}${base_bindir}/grep.${PN}
> + mv ${D}${bindir}/egrep ${D}${base_bindir}/egrep.${PN}
> + mv ${D}${bindir}/fgrep ${D}${base_bindir}/fgrep.${PN}
> +}
> +
> +pkg_postinst_${PN} () {
> + update-alternatives --install ${base_bindir}/grep grep grep.${PN} 100
> + update-alternatives --install ${base_bindir}/egrep egrep egrep.${PN} 100
> + update-alternatives --install ${base_bindir}/fgrep fgrep fgrep.${PN} 100
> +}
> +
> +pkg_prerm_${PN} () {
> + update-alternatives --remove grep grep.${PN}
> + update-alternatives --remove egrep egrep.${PN}
> + update-alternatives --remove fgrep fgrep.${PN}
> +}
> --
> 1.6.3.3
>
>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
>
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] grep: update 2.6.3 to 2.7
2010-09-28 15:32 ` Khem Raj
@ 2010-09-28 16:40 ` Scott Garman
0 siblings, 0 replies; 6+ messages in thread
From: Scott Garman @ 2010-09-28 16:40 UTC (permalink / raw)
To: openembedded-devel
On 09/28/2010 08:32 AM, Khem Raj wrote:
> On Mon, Sep 27, 2010 at 9:47 PM, Scott Garman<sgarman@zenlinux.com> wrote:
>> Signed-off-by: Scott Garman<sgarman@zenlinux.com>
>> ---
>> recipes/grep/grep-2.6.3/uclibc-fix.patch | 50 ---------------------------
>> recipes/grep/grep-2.7/uclibc_libiconv.patch | 18 ++++++++++
>> recipes/grep/grep_2.6.3.bb | 45 ------------------------
>> recipes/grep/grep_2.7.bb | 42 ++++++++++++++++++++++
>> 4 files changed, 60 insertions(+), 95 deletions(-)
>> delete mode 100644 recipes/grep/grep-2.6.3/uclibc-fix.patch
>> create mode 100644 recipes/grep/grep-2.7/uclibc_libiconv.patch
>> delete mode 100644 recipes/grep/grep_2.6.3.bb
>> create mode 100644 recipes/grep/grep_2.7.bb
>
> Please also do a build for uclibc based system if you have not done so.
> and see if new grep builds/works
Oh yes, I tested it by setting ANGSTROMLIBC to uclibc. I also check the
output packages generated to make sure things look sane.
FWIW the Poky version of grep 2.7 I just added has been tested to build
on 5 qemu machine arches (x86, x86-64, arm, mips, and ppc), and I even
installed it in a QEMU session to ensure the command works interactively.
BTW, in this patch I am removing the uclibc patch included with grep
2.6.3 as it is no longer needed with grep 2.7. However, a different
patch was needed with grep 2.7 - so there in no intention of renaming
the patch file in my commit, just to be clear.
v2 patch incoming shortly...
Thanks,
Scott
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2] grep: update 2.6.3 to 2.7
2010-09-28 4:47 [PATCH] grep: update 2.6.3 to 2.7 Scott Garman
2010-09-28 8:21 ` Holger Freyther
2010-09-28 15:32 ` Khem Raj
@ 2010-09-28 16:42 ` Scott Garman
2 siblings, 0 replies; 6+ messages in thread
From: Scott Garman @ 2010-09-28 16:42 UTC (permalink / raw)
To: openembedded-devel; +Cc: Scott Garman
Signed-off-by: Scott Garman <sgarman@zenlinux.com>
---
recipes/grep/grep-2.6.3/uclibc-fix.patch | 50 ---------------------------
recipes/grep/grep-2.7/uclibc_libiconv.patch | 18 ++++++++++
recipes/grep/{grep_2.6.3.bb => grep_2.7.bb} | 29 +++++++--------
3 files changed, 31 insertions(+), 66 deletions(-)
delete mode 100644 recipes/grep/grep-2.6.3/uclibc-fix.patch
create mode 100644 recipes/grep/grep-2.7/uclibc_libiconv.patch
rename recipes/grep/{grep_2.6.3.bb => grep_2.7.bb} (65%)
diff --git a/recipes/grep/grep-2.6.3/uclibc-fix.patch b/recipes/grep/grep-2.6.3/uclibc-fix.patch
deleted file mode 100644
index 2e1c584..0000000
--- a/recipes/grep/grep-2.6.3/uclibc-fix.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-Fix to use mempcpy instead of __mempcpy. This is needed for uclibc which
-doesn't define __mempcpy only mempcpy. Since both uclibc and glibc have
-mempcpy we'll just use that instead.
-
-Index: grep-2.6.3/lib/getopt.c
-===================================================================
---- grep-2.6.3.orig/lib/getopt.c 2010-03-21 00:34:02.000000000 -0700
-+++ grep-2.6.3/lib/getopt.c 2010-05-22 21:37:11.352740539 -0700
-@@ -41,6 +41,10 @@
- # include <wchar.h>
- #endif
-
-+#ifdef __UCLIBC__
-+#define __mempcpy mempcpy
-+#endif
-+
- /* This version of `getopt' appears to the caller like standard Unix `getopt'
- but it behaves differently for the user, since it allows the user
- to intersperse the options with the other arguments.
-Index: grep-2.6.3/gnulib-tests/setenv.c
-===================================================================
---- grep-2.6.3.orig/gnulib-tests/setenv.c 2010-05-22 21:37:53.655168151 -0700
-+++ grep-2.6.3/gnulib-tests/setenv.c 2010-05-22 21:38:42.792745476 -0700
-@@ -68,6 +68,10 @@ __libc_lock_define_initialized (static,
- # define tsearch __tsearch
- #endif
-
-+#ifdef __UCLIBC__
-+#define __mempcpy mempcpy
-+#endif
-+
- /* In the GNU C library implementation we try to be more clever and
- allow arbitrarily many changes of the environment given that the used
- values are from a small set. Outside glibc this will eat up all
-Index: grep-2.6.3/lib/regexec.c
-===================================================================
---- grep-2.6.3.orig/lib/regexec.c 2010-05-22 21:36:02.655154671 -0700
-+++ grep-2.6.3/lib/regexec.c 2010-05-22 21:37:26.212743273 -0700
-@@ -22,6 +22,11 @@
-
- #include "verify.h"
- #include "intprops.h"
-+
-+#ifdef __UCLIBC__
-+#define __mempcpy mempcpy
-+#endif
-+
- static reg_errcode_t match_ctx_init (re_match_context_t *cache, int eflags,
- Idx n) internal_function;
- static void match_ctx_clean (re_match_context_t *mctx) internal_function;
diff --git a/recipes/grep/grep-2.7/uclibc_libiconv.patch b/recipes/grep/grep-2.7/uclibc_libiconv.patch
new file mode 100644
index 0000000..de83a61
--- /dev/null
+++ b/recipes/grep/grep-2.7/uclibc_libiconv.patch
@@ -0,0 +1,18 @@
+# Needed to get grep to build with uclibc.
+# Patch submitted by Bruno Haible to the grep ML on 2010-09-23.
+#
+# Signed-off-by: Scott Garman <sgarman@zenlinux.com>
+diff -ur grep-2.7.orig/src/Makefile.am grep-2.7/src/Makefile.am
+--- grep-2.7.orig/src/Makefile.am 2010-04-04 05:22:24.000000000 -0700
++++ grep-2.7/src/Makefile.am 2010-09-27 21:07:39.370222501 -0700
+@@ -36,7 +36,9 @@
+ # must precede $(LIBINTL) in order to ensure we use GNU getopt.
+ # But libgreputils.a must also follow $(LIBINTL), since libintl uses
+ # replacement functions defined in libgreputils.a.
+-LDADD = libgrep.a ../lib/libgreputils.a $(LIBINTL) ../lib/libgreputils.a
++LDADD = \
++ libgrep.a \
++ ../lib/libgreputils.a $(LIBINTL) ../lib/libgreputils.a $(LIBICONV)
+
+ grep_LDADD = $(LDADD) $(LIB_PCRE)
+ localedir = $(datadir)/locale
diff --git a/recipes/grep/grep_2.6.3.bb b/recipes/grep/grep_2.7.bb
similarity index 65%
rename from recipes/grep/grep_2.6.3.bb
rename to recipes/grep/grep_2.7.bb
index 25c2a19..6267162 100644
--- a/recipes/grep/grep_2.6.3.bb
+++ b/recipes/grep/grep_2.7.bb
@@ -1,19 +1,24 @@
-LICENSE = "GPL"
-SECTION = "console/utils"
DESCRIPTION = "grep GNU utility"
-PR = "r2"
+SECTION = "console/utils"
+HOMEPAGE = "http://savannah.gnu.org/projects/grep/"
+LICENSE = "GPLv3"
+
+PR = "r0"
SRC_URI = "${GNU_MIRROR}/grep/grep-${PV}.tar.gz \
- file://uclibc-fix.patch"
+ file://uclibc_libiconv.patch"
+
+SRC_URI[md5sum] = "e848f07e3e79aa7899345d17c7e4115e"
+SRC_URI[sha256sum] = "ad14831015a79cea36785aa47415f6c0653a6ac4eaf9c15456f0d9d09c9e1bad"
inherit autotools gettext
-EXTRA_OECONF = "--disable-perl-regexp --disable-ncurses"
-EXTRA_OECONF_virtclass-native = "--with-included-regex --disable-ncurses"
+BBCLASSEXTEND = "native"
+
+EXTRA_OECONF = "--disable-perl-regexp"
-do_configure () {
+do_configure_prepend () {
rm -f ${S}/m4/init.m4
- autotools_do_configure
}
do_install () {
@@ -24,10 +29,6 @@ do_install () {
mv ${D}${bindir}/fgrep ${D}${base_bindir}/fgrep.${PN}
}
-do_install_virtclass-native () {
- autotools_do_install
-}
-
pkg_postinst_${PN} () {
update-alternatives --install ${base_bindir}/grep grep grep.${PN} 100
update-alternatives --install ${base_bindir}/egrep egrep egrep.${PN} 100
@@ -39,7 +40,3 @@ pkg_prerm_${PN} () {
update-alternatives --remove egrep egrep.${PN}
update-alternatives --remove fgrep fgrep.${PN}
}
-
-BBCLASSEXTEND = "native"
-SRC_URI[md5sum] = "3095b57837b312f087c0680559de7f13"
-SRC_URI[sha256sum] = "a340e5d1544d9a964072196be627bad3e434ff7a87f3a57ea15aaccbbea4d666"
--
1.6.3.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-09-28 16:42 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-28 4:47 [PATCH] grep: update 2.6.3 to 2.7 Scott Garman
2010-09-28 8:21 ` Holger Freyther
2010-09-28 16:35 ` Scott Garman
2010-09-28 15:32 ` Khem Raj
2010-09-28 16:40 ` Scott Garman
2010-09-28 16:42 ` [PATCH v2] " Scott Garman
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.