1 |
# Copyright 1999-2012 Gentoo Foundation |
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
# $Header: /var/cvsroot/gentoo-x86/dev-libs/libpcre/libpcre-8.13-r1.ebuild,v 1.2 2011/10/23 16:06:55 flameeyes Exp $ |
4 |
|
5 |
EAPI="4" |
6 |
|
7 |
inherit libtool eutils toolchain-funcs flag-o-matic |
8 |
|
9 |
DESCRIPTION="Perl-compatible regular expression library" |
10 |
HOMEPAGE="http://www.pcre.org/" |
11 |
MY_P="pcre-${PV/_rc/-RC}" |
12 |
if [[ ${PV} != *_rc* ]] ; then |
13 |
# Only the final releases are available here. |
14 |
SRC_URI="mirror://sourceforge/pcre/${MY_P}.tar.bz2 |
15 |
ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/${MY_P}.tar.bz2" |
16 |
else |
17 |
SRC_URI="ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/Testing/${MY_P}.tar.bz2" |
18 |
fi |
19 |
|
20 |
LICENSE="BSD" |
21 |
SLOT="3" |
22 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~x86-interix ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
23 |
IUSE="bzip2 +cxx +recursion-limit static-libs unicode zlib" |
24 |
|
25 |
RDEPEND="bzip2? ( app-arch/bzip2 ) |
26 |
zlib? ( sys-libs/zlib )" |
27 |
DEPEND="${RDEPEND} |
28 |
virtual/pkgconfig |
29 |
userland_GNU? ( >=sys-apps/findutils-4.4.0 )" |
30 |
|
31 |
S=${WORKDIR}/${MY_P} |
32 |
|
33 |
src_prepare() { |
34 |
sed -i -e "s:-lpcre ::" libpcrecpp.pc.in || die |
35 |
elibtoolize |
36 |
epatch "${FILESDIR}"/${P}-posix-regex.patch #382919 |
37 |
} |
38 |
|
39 |
src_configure() { |
40 |
[[ ${CHOST} == *-mint* ]] && append-flags -D_GNU_SOURCE |
41 |
econf \ |
42 |
--with-match-limit-recursion=$(use recursion-limit && echo 8192 || echo MATCH_LIMIT) \ |
43 |
$(use_enable unicode utf8) $(use_enable unicode unicode-properties) \ |
44 |
$(use_enable cxx cpp) \ |
45 |
$(use_enable zlib pcregrep-libz) \ |
46 |
$(use_enable bzip2 pcregrep-libbz2) \ |
47 |
$(use_enable static-libs static) \ |
48 |
--enable-shared \ |
49 |
--htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \ |
50 |
--docdir="${EPREFIX}"/usr/share/doc/${PF} |
51 |
} |
52 |
|
53 |
src_install() { |
54 |
emake DESTDIR="${D}" install |
55 |
gen_usr_ldscript -a pcre |
56 |
find "${D}" -type f -name '*.la' -exec rm -f {} + |
57 |
} |