summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-apps/grep')
-rw-r--r--sys-apps/grep/Manifest2
-rw-r--r--sys-apps/grep/grep-2.21-r1.ebuild54
-rw-r--r--sys-apps/grep/metadata.xml8
3 files changed, 64 insertions, 0 deletions
diff --git a/sys-apps/grep/Manifest b/sys-apps/grep/Manifest
new file mode 100644
index 000000000000..9bd956abcea4
--- /dev/null
+++ b/sys-apps/grep/Manifest
@@ -0,0 +1,2 @@
+DIST grep-2.21-heap_buffer_overrun.patch 3302 SHA256 4bc7e744fd34b268a798daf6a5aa85f55c141747149fa7b015eefbf9318ed478 SHA512 eaea33238f179b17dd152ed27a07c211646d9572be250eb7997c25ea0c8de232d21d8bc1b1e865b26545e6817e5c116e18d9115fb497d39426ac8212839f0f82 WHIRLPOOL 5ead7c22c8fe98289322a03685e9fc04e834a01144c55c9ea3b1970fa61b400ce669e6947cb3564fbbba5c7ddf079fd30e66352e4f6eed888e8fe883e369e601
+DIST grep-2.21.tar.xz 1261548 SHA256 5244a11c00dee8e7e5e714b9aaa053ac6cbfa27e104abee20d3c778e4bb0e5de SHA512 bc894325f89d37413c773d4812cb24180560037ccc8d72c015462043ef3479ea7eefd62557e3a9d191d6d94c68262563d3c68e634acd4e77ba56e96c92805dfd WHIRLPOOL 2272286c10695a51eecafcc5ca8986adb5486d4494b284904f588717c6fb06de37933faa5f62eabf0ecc856334b3a1179b864dedc06f223047471168d2d86bb0
diff --git a/sys-apps/grep/grep-2.21-r1.ebuild b/sys-apps/grep/grep-2.21-r1.ebuild
new file mode 100644
index 000000000000..194baac7d3d5
--- /dev/null
+++ b/sys-apps/grep/grep-2.21-r1.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils 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
+ http://dev.gentoo.org/~polynomial-c/${P}-heap_buffer_overrun.patch"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+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_prepare() {
+ # Disable gnulib build test that has no impact on the source.
+ # Re-enable w/next version bump (and gnulib is updated). #554728
+ [[ ${PV} != "2.21" ]] && die "re-enable test #554728"
+ echo 'exit 0' > gnulib-tests/test-update-copyright.sh || die
+
+ sed -i \
+ -e "s:@SHELL@:${EPREFIX}/bin/sh:g" \
+ src/egrep.sh || die #523898
+
+ epatch "${DISTDIR}/${P}-heap_buffer_overrun.patch"
+}
+
+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)
+}
diff --git a/sys-apps/grep/metadata.xml b/sys-apps/grep/metadata.xml
new file mode 100644
index 000000000000..c9e284040953
--- /dev/null
+++ b/sys-apps/grep/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>base-system</herd>
+<upstream>
+ <remote-id type="cpe">cpe:/a:gnu:grep</remote-id>
+</upstream>
+</pkgmetadata>