sys-apps/grep: upgraded package to upstream 2.20
Upgraded sys-apps/grep to version 2.20 on amd64, arm, x86
BUG=chromium:406221
TEST=cbuildbot chromiumos-sdk mipsel-o32-generic
Change-Id: I1f2f5696f59536e02fd21037f6d8cfe2595aa540
Reviewed-on: https://chromium-review.googlesource.com/213742
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Alex Deymo <deymo@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
diff --git a/metadata/md5-cache/sys-apps/grep-2.14 b/metadata/md5-cache/sys-apps/grep-2.14
deleted file mode 100644
index 9bb5629..0000000
--- a/metadata/md5-cache/sys-apps/grep-2.14
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=configure install
-DEPEND=nls? ( virtual/libintl ) pcre? ( >=dev-libs/libpcre-7.8-r1 ) virtual/libiconv nls? ( sys-devel/gettext )
-DESCRIPTION=GNU regular expression matcher
-EAPI=3
-HOMEPAGE=http://www.gnu.org/software/grep/
-IUSE=nls pcre
-KEYWORDS=*
-LICENSE=GPL-3
-RDEPEND=nls? ( virtual/libintl ) pcre? ( >=dev-libs/libpcre-7.8-r1 ) virtual/libiconv
-SLOT=0
-SRC_URI=mirror://gnu/grep/grep-2.14.tar.xz mirror://gentoo/grep-2.14.tar.xz
-_md5_=08efd3791a72777f5ff13553c093866a
diff --git a/metadata/md5-cache/sys-apps/grep-2.20 b/metadata/md5-cache/sys-apps/grep-2.20
new file mode 100644
index 0000000..b555032
--- /dev/null
+++ b/metadata/md5-cache/sys-apps/grep-2.20
@@ -0,0 +1,13 @@
+DEFINED_PHASES=configure
+DEPEND=!static? ( pcre? ( >=dev-libs/libpcre-7.8-r1 ) ) nls? ( virtual/libintl ) virtual/libiconv virtual/pkgconfig nls? ( sys-devel/gettext ) static? ( pcre? ( >=dev-libs/libpcre-7.8-r1[static-libs(+)] ) )
+DESCRIPTION=GNU regular expression matcher
+EAPI=4
+HOMEPAGE=http://www.gnu.org/software/grep/
+IUSE=nls pcre static
+KEYWORDS=*
+LICENSE=GPL-3
+RDEPEND=!static? ( pcre? ( >=dev-libs/libpcre-7.8-r1 ) ) nls? ( virtual/libintl ) virtual/libiconv
+SLOT=0
+SRC_URI=mirror://gnu/grep/grep-2.20.tar.xz mirror://gentoo/grep-2.20.tar.xz
+_eclasses_=eutils a108f00cccac414097bcbbbb5de01762 flag-o-matic c3131dc67d3bd39f044e92b8280505e4 multilib fac675dcccf94392371a6abee62d909f toolchain-funcs 48b38a216afb92db6314d6c3187abea3
+_md5_=11fe416cf24f372a8365dc6cc3fe400c
diff --git a/sys-apps/grep/Manifest b/sys-apps/grep/Manifest
index c3250f1..b20af5f 100644
--- a/sys-apps/grep/Manifest
+++ b/sys-apps/grep/Manifest
@@ -1 +1 @@
-DIST grep-2.14.tar.xz 1195640 RMD160 4157376c36ebb7b5da83687f241745ca6df9058b SHA1 fb6ea404a0ef915334ca6212c7b517432ffe193e SHA256 e70e801d4fbb16e761654a58ae48bf5020621c95c8e35bd864742577685872e1
+DIST grep-2.20.tar.xz 1237196 SHA256 f0af452bc0d09464b6d089b6d56a0a3c16672e9ed9118fbe37b0b6aeaf069a65 SHA512 97e0a92a84727eb590099ffdd44f296eff2232d1f3d508a9391e8a9976993da2b49ea80381d9b711609cb86d889a2d5903aaf2f14d79ad10b2bea1027a8a498e WHIRLPOOL 79cd992bf1c631442186cf19d1f7770fd986fef9c4d852c756f95c93639c82c1aff79a43cf37febf29152b07bf1c0c0bcffa7d9ad66442edc2cbd252c8540a1e
diff --git a/sys-apps/grep/files/grep-2.5.3-nls.patch b/sys-apps/grep/files/grep-2.5.3-nls.patch
deleted file mode 100644
index eec06be..0000000
--- a/sys-apps/grep/files/grep-2.5.3-nls.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-Fixes compilation with -nls useflag on FreeBSD (and probably others).
-
-See http://bugs.gentoo.org/253777.
-
---- grep-2.5.3.orig/lib/error.c
-+++ grep-2.5.3/lib/error.c
-@@ -26,8 +26,8 @@
- #endif
-
- #include <stdio.h>
--#if HAVE_LIBINTL_H
--# include <libintl.h>
-+#if defined(HAVE_LIBINTL_H) && defined(ENABLE_NLS)
-+# include <libintl.h>
- #endif
-
- #if HAVE_VPRINTF || HAVE_DOPRNT || _LIBC
---- grep-2.5.3.orig/lib/getopt.c
-+++ grep-2.5.3/lib/getopt.c
-@@ -77,7 +77,7 @@
- #ifndef _
- /* This is for other GNU distributions with internationalized messages.
- When compiling libc, the _ macro is predefined. */
--# ifdef HAVE_LIBINTL_H
-+# if defined(HAVE_LIBINTL_H) && defined(ENABLE_NLS)
- # include <libintl.h>
- # define _(msgid) gettext (msgid)
- # else
---- grep-2.5.3.orig/lib/obstack.c
-+++ grep-2.5.3/lib/obstack.c
-@@ -451,7 +451,7 @@
-
- /* Define the error handler. */
- #ifndef _
--# ifdef HAVE_LIBINTL_H
-+# if defined(HAVE_LIBINTL_H) && defined(ENABLE_NLS)
- # include <libintl.h>
- # ifndef _
- # define _(Str) gettext (Str)
---- grep-2.5.3.orig/lib/regex.c
-+++ grep-2.5.3/lib/regex.c
-@@ -116,7 +116,7 @@
- #endif
-
- /* This is for other GNU distributions with internationalized messages. */
--#if HAVE_LIBINTL_H || defined _LIBC
-+#if ENABLE_NLS && (HAVE_LIBINTL_H || defined _LIBC)
- # include <libintl.h>
- # ifdef _LIBC
- # undef gettext
diff --git a/sys-apps/grep/files/grep-2.5.3-po-builddir-fix.patch b/sys-apps/grep/files/grep-2.5.3-po-builddir-fix.patch
deleted file mode 100644
index 7d3e334..0000000
--- a/sys-apps/grep/files/grep-2.5.3-po-builddir-fix.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- grep-2.5.3/po/Makefile.in.in.orig 2006-11-24 20:53:21 -0300
-+++ grep-2.5.3/po/Makefile.in.in 2008-10-26 18:31:06 -0200
-@@ -13,6 +13,7 @@
- @SET_MAKE@
-
- srcdir = @srcdir@
-+top_builddir = @top_builddir@
- top_srcdir = @top_srcdir@
- VPATH = @srcdir@
-
diff --git a/sys-apps/grep/grep-2.14.ebuild b/sys-apps/grep/grep-2.14.ebuild
deleted file mode 100644
index 3f730cf..0000000
--- a/sys-apps/grep/grep-2.14.ebuild
+++ /dev/null
@@ -1,33 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/grep/grep-2.14.ebuild,v 1.8 2012/12/24 01:32:46 vapier Exp $
-
-EAPI="3"
-
-DESCRIPTION="GNU regular expression matcher"
-HOMEPAGE="http://www.gnu.org/software/grep/"
-SRC_URI="mirror://gnu/${PN}/${P}.tar.xz
- mirror://gentoo/${P}.tar.xz"
-
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="*"
-IUSE="nls pcre"
-
-RDEPEND="nls? ( virtual/libintl )
- pcre? ( >=dev-libs/libpcre-7.8-r1 )
- virtual/libiconv"
-DEPEND="${RDEPEND}
- nls? ( sys-devel/gettext )"
-
-src_configure() {
- econf \
- --bindir="${EPREFIX}"/bin \
- $(use_enable nls) \
- $(use_enable pcre perl-regexp)
-}
-
-src_install() {
- emake DESTDIR="${D}" install || die
- dodoc AUTHORS ChangeLog NEWS README THANKS TODO
-}
diff --git a/sys-apps/grep/grep-2.20.ebuild b/sys-apps/grep/grep-2.20.ebuild
new file mode 100644
index 0000000..30b600a
--- /dev/null
+++ b/sys-apps/grep/grep-2.20.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/grep/grep-2.20.ebuild,v 1.1 2014/06/04 05:15:09 ssuominen Exp $
+
+EAPI="4"
+
+inherit flag-o-matic toolchain-funcs
+
+DESCRIPTION="GNU regular expression matcher"
+HOMEPAGE="http://www.gnu.org/software/grep/"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.xz
+ mirror://gentoo/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="*"
+IUSE="nls pcre static"
+
+LIB_DEPEND="pcre? ( >=dev-libs/libpcre-7.8-r1[static-libs(+)] )"
+RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )
+ nls? ( virtual/libintl )
+ virtual/libiconv"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )
+ static? ( ${LIB_DEPEND} )"
+
+DOCS=( AUTHORS ChangeLog NEWS README THANKS TODO )
+
+src_configure() {
+ use static && append-ldflags -static
+ # Always use pkg-config to get lib info for pcre.
+ export ac_cv_search_pcre_compile=$(
+ usex pcre "$($(tc-getPKG_CONFIG) --libs $(usex static --static '') libpcre)" ''
+ )
+ econf \
+ --bindir="${EPREFIX}"/bin \
+ $(use_enable nls) \
+ $(use_enable pcre perl-regexp)
+}