| 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.20.ebuild,v 1.2 2011/12/12 23:24:20 radhermit 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 +jit +readline +recursion-limit static-libs unicode zlib"
|
| 24 |
|
| 25 |
RDEPEND="bzip2? ( app-arch/bzip2 )
|
| 26 |
zlib? ( sys-libs/zlib )
|
| 27 |
readline? ( sys-libs/readline )"
|
| 28 |
DEPEND="${RDEPEND}
|
| 29 |
virtual/pkgconfig
|
| 30 |
userland_GNU? ( >=sys-apps/findutils-4.4.0 )"
|
| 31 |
|
| 32 |
S=${WORKDIR}/${MY_P}
|
| 33 |
|
| 34 |
src_prepare() {
|
| 35 |
sed -i -e "s:-lpcre ::" libpcrecpp.pc.in || die
|
| 36 |
elibtoolize
|
| 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 |
$(use_enable jit) $(use_enable jit pcregrep-jit) \
|
| 49 |
$(use_enable readline pcretest-libreadline) \
|
| 50 |
--enable-shared \
|
| 51 |
--htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
|
| 52 |
--docdir="${EPREFIX}"/usr/share/doc/${PF}
|
| 53 |
}
|
| 54 |
|
| 55 |
src_install() {
|
| 56 |
emake DESTDIR="${D}" install
|
| 57 |
gen_usr_ldscript -a pcre
|
| 58 |
find "${D}" -type f -name '*.la' -exec rm -f {} +
|
| 59 |
}
|