/[gentoo-alt]/trunk/prefix-overlay/sys-apps/grep/grep-2.5.1-r9.ebuild
Gentoo

Contents of /trunk/prefix-overlay/sys-apps/grep/grep-2.5.1-r9.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 908 - (show annotations) (download)
Tue Nov 29 20:23:28 2005 UTC (8 years, 4 months ago) by grobian
File size: 2186 byte(s)
Updated to newest grep version (with a new patch) and added portnotes.


1 # Copyright 1999-2005 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sys-apps/grep/grep-2.5.1-r9.ebuild,v 1.1 2005/11/26 20:09:20 vapier Exp $
4
5 EAPI="prefix"
6
7 inherit flag-o-matic eutils
8
9 DESCRIPTION="GNU regular expression matcher"
10 HOMEPAGE="http://www.gnu.org/software/grep/grep.html"
11 SRC_URI="mirror://gnu/${PN}/${P}.tar.gz
12 mirror://gentoo/${P}.tar.gz"
13
14 LICENSE="GPL-2"
15 SLOT="0"
16 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc-macos ~ppc64 ~s390 ~sh ~sparc ~x86"
17 IUSE="build nls pcre static"
18
19 RDEPEND=""
20 DEPEND="${RDEPEND}
21 pcre? ( dev-libs/libpcre )
22 nls? ( sys-devel/gettext )"
23
24 src_unpack() {
25 unpack ${A}
26 cd "${S}"
27
28 # Fix a weird sparc32 compiler bug
29 echo "" >> src/dfa.h
30
31 epatch "${FILESDIR}"/${PV}-manpage.patch
32 epatch "${FILESDIR}"/${PV}-manpage-line-buffering.patch
33 epatch "${FILESDIR}"/${P}-fgrep.patch.bz2
34 epatch "${FILESDIR}"/${P}-i18n.patch.bz2
35 epatch "${FILESDIR}"/${P}-gofast.patch.bz2
36 epatch "${FILESDIR}"/${P}-oi.patch
37 epatch "${FILESDIR}"/${P}-restrict_arr.patch
38 epatch "${FILESDIR}"/${PV}-utf8-case.patch
39 epatch "${FILESDIR}"/${P}-perl-segv.patch #95495
40 epatch "${FILESDIR}"/${P}-libintl.patch #92586
41 epatch "${FILESDIR}"/${P}-fix-devices-skip.patch #113640
42
43 # uclibc does not suffer from this glibc bug.
44 use elibc_uclibc || epatch "${FILESDIR}"/${PV}-tests.patch
45 }
46
47 src_compile() {
48 if use static ; then
49 append-flags -static
50 append-ldflags -static
51 fi
52
53 econf \
54 $(with_bindir) \
55 $(use_enable nls) \
56 $(use_enable pcre perl-regexp) \
57 || die "econf failed"
58
59 # force static linking so we dont have to move it into /
60 sed -i \
61 -e 's:-lpcre:-Wl,-Bstatic -lpcre -Wl,-Bdynamic:g' \
62 src/Makefile || die "sed static pcre failed"
63
64 emake || die "emake failed"
65 }
66
67 src_install() {
68 make DESTDIR="${DEST}" install || die "make install failed"
69
70 # Override the default shell scripts... grep knows how to act
71 # based on how it's called
72 ln -sfn grep "${D}"/bin/egrep || die "ln egrep failed"
73 ln -sfn grep "${D}"/bin/fgrep || die "ln fgrep failed"
74
75 if use build ; then
76 rm -r "${D}"/usr/share
77 else
78 dodoc AUTHORS ChangeLog NEWS README THANKS TODO
79 fi
80 }

  ViewVC Help
Powered by ViewVC 1.1.20