grep: Fix gplv2 version to work with recent gettext
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 19 Oct 2012 13:02:49 +0000 (13:02 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 19 Oct 2012 13:06:09 +0000 (14:06 +0100)
(From OE-Core rev: 2433846255767d5a22fb2c7b2b723f290ac12fbf)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-extended/grep/grep-2.5.1a/Makevars [new file with mode: 0644]
meta/recipes-extended/grep/grep-2.5.1a/gettext.patch [new file with mode: 0644]
meta/recipes-extended/grep/grep_2.5.1a.bb

diff --git a/meta/recipes-extended/grep/grep-2.5.1a/Makevars b/meta/recipes-extended/grep/grep-2.5.1a/Makevars
new file mode 100644 (file)
index 0000000..8b09f53
--- /dev/null
@@ -0,0 +1,25 @@
+# Makefile variables for PO directory in any package using GNU gettext.
+
+# Usually the message domain is the same as the package name.
+DOMAIN = $(PACKAGE)
+
+# These two variables depend on the location of this directory.
+subdir = po
+top_builddir = ..
+
+# These options get passed to xgettext.
+XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
+
+# This is the copyright holder that gets inserted into the header of the
+# $(DOMAIN).pot file.  Set this to the copyright holder of the surrounding
+# package.  (Note that the msgstr strings, extracted from the package's
+# sources, belong to the copyright holder of the package.)  Translators are
+# expected to transfer the copyright for their translations to this person
+# or entity, or to disclaim their copyright.  The empty string stands for
+# the public domain; in this case the translators are expected to disclaim
+# their copyright.
+COPYRIGHT_HOLDER = Free Software Foundation, Inc.
+
+# This is the list of locale categories, beyond LC_MESSAGES, for which the
+# message catalogs shall be used.  It is usually empty.
+EXTRA_LOCALE_CATEGORIES =
diff --git a/meta/recipes-extended/grep/grep-2.5.1a/gettext.patch b/meta/recipes-extended/grep/grep-2.5.1a/gettext.patch
new file mode 100644 (file)
index 0000000..5746335
--- /dev/null
@@ -0,0 +1,15 @@
+Enable operation with later versions of gettext.
+
+Upstream-Status: Inappropriate
+RP 2012/10/19
+
+Index: grep-2.5.1a/configure.in
+===================================================================
+--- grep-2.5.1a.orig/configure.in      2012-10-19 12:57:51.646970204 +0000
++++ grep-2.5.1a/configure.in   2012-10-19 12:59:49.946968803 +0000
+@@ -140,4 +140,4 @@
+       AC_CHECK_LIB(pcre, pcre_exec)
+ fi
+-AC_OUTPUT(Makefile lib/Makefile lib/posix/Makefile src/Makefile tests/Makefile po/Makefile.in intl/Makefile doc/Makefile m4/Makefile vms/Makefile bootstrap/Makefile, [sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile; echo timestamp > stamp-h])
++AC_OUTPUT(Makefile lib/Makefile lib/posix/Makefile src/Makefile tests/Makefile po/Makefile.in intl/Makefile doc/Makefile m4/Makefile vms/Makefile bootstrap/Makefile, [echo timestamp > stamp-h])
index 3a8bcbf..ebcbe23 100644 (file)
@@ -10,6 +10,8 @@ PR = "r2"
 SRC_URI = "${GNU_MIRROR}/grep/grep-${PV}.tar.bz2 \
            file://uclibc-fix.patch \
            file://grep_fix_for_automake-1.12.patch \
+           file://gettext.patch \
+           file://Makevars \
            "
 
 SRC_URI[md5sum] = "52202fe462770fa6be1bb667bd6cf30c"
@@ -22,6 +24,7 @@ EXTRA_OECONF = "--disable-perl-regexp --disable-ncurses"
 CFLAGS += "-D PROTOTYPES"
 do_configure_prepend () {
        rm -f ${S}/m4/init.m4
+       cp -f ${WORKDIR}/Makevars ${S}/po/
 }
 
 do_install () {