1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 inherit eutils multilib libtool flag-o-matic toolchain-funcs multilib-minimal
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"
17 SRC_URI="ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/Testing/${MY_P}.tar.bz2"
22 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 ~x86-interix ~amd64-linux ~arm-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 libedit pcre16 pcre32 +readline +recursion-limit static-libs unicode zlib"
24 REQUIRED_USE="readline? ( !libedit )
25 libedit? ( !readline )"
27 RDEPEND="bzip2? ( app-arch/bzip2 )
28 zlib? ( sys-libs/zlib )
29 libedit? ( dev-libs/libedit )
30 readline? ( sys-libs/readline:0= )"
35 !<=app-emulation/emul-linux-x86-baselibs-20131008-r2
36 !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
41 MULTILIB_CHOST_TOOLS=(
49 #epatch "${PATCHES[@]}"
50 sed -i -e "s:-lpcre ::" libpcrecpp.pc.in || die
54 multilib_src_configure() {
55 ECONF_SOURCE="${S}" econf \
56 --with-match-limit-recursion=$(usex recursion-limit 8192 MATCH_LIMIT) \
57 $(multilib_native_use_enable bzip2 pcregrep-libbz2) \
58 $(use_enable cxx cpp) \
59 $(use_enable jit) $(use_enable jit pcregrep-jit) \
60 $(use_enable pcre16) \
61 $(use_enable pcre32) \
62 $(multilib_native_use_enable libedit pcretest-libedit) \
63 $(multilib_native_use_enable readline pcretest-libreadline) \
64 $(use_enable static-libs static) \
65 $(use_enable unicode utf) $(use_enable unicode unicode-properties) \
66 $(multilib_native_use_enable zlib pcregrep-libz) \
69 --htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
70 --docdir="${EPREFIX}"/usr/share/doc/${PF}
73 multilib_src_compile() {
74 emake V=1 $(multilib_is_native_abi || echo "bin_PROGRAMS=")
77 multilib_src_install() {
80 $(multilib_is_native_abi || echo "bin_PROGRAMS= dist_html_DATA=") \
82 gen_usr_ldscript -a pcre
85 multilib_src_install_all() {
90 preserve_old_lib /$(get_libdir)/libpcre.so.0
94 preserve_old_lib_notify /$(get_libdir)/libpcre.so.0