1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit flag-o-matic libtool multilib-minimal toolchain-funcs usr-ldscript
8 PATCH_SET="${P}-patchset-1.0.tar.xz"
10 DESCRIPTION="Perl-compatible regular expression library"
11 HOMEPAGE="http://www.pcre.org/"
12 MY_P="pcre2-${PV/_rc/-RC}"
13 if [[ ${PV} != *_rc* ]] ; then
14 # Only the final releases are available here.
15 SRC_URI="mirror://sourceforge/pcre/${MY_P}.tar.bz2
16 ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/${MY_P}.tar.bz2
17 https://dev.gentoo.org/~whissi/dist/${PN}/${PATCH_SET}"
19 SRC_URI="ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/Testing/${MY_P}.tar.bz2"
24 KEYWORDS="~alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~riscv s390 ~sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
25 IUSE="bzip2 +jit libedit pcre16 pcre32 +readline +recursion-limit static-libs unicode zlib"
26 REQUIRED_USE="?? ( libedit readline )"
28 BDEPEND="virtual/pkgconfig
29 userland_GNU? ( >=sys-apps/findutils-4.4.0 )"
30 RDEPEND="bzip2? ( app-arch/bzip2 )
31 zlib? ( sys-libs/zlib )
32 libedit? ( dev-libs/libedit )
33 readline? ( sys-libs/readline:0= )"
36 S="${WORKDIR}/${MY_P}"
38 MULTILIB_CHOST_TOOLS=(
43 [[ -d ${WORKDIR}/patches ]] && eapply "${WORKDIR}"/patches
50 multilib_src_configure() {
54 --htmldir="${EPREFIX}"/usr/share/doc/${PF}/html
55 --with-match-limit-depth=$(usex recursion-limit 8192 MATCH_LIMIT)
56 $(multilib_native_use_enable bzip2 pcre2grep-libbz2)
57 $(multilib_native_use_enable libedit pcre2test-libedit)
58 $(multilib_native_use_enable readline pcre2test-libreadline)
59 $(multilib_native_use_enable zlib pcre2grep-libz)
61 $(use_enable jit pcre2grep-jit)
62 $(use_enable pcre16 pcre2-16)
63 $(use_enable pcre32 pcre2-32)
64 $(use_enable static-libs static)
67 ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
70 multilib_src_compile() {
71 emake V=1 $(multilib_is_native_abi || echo "bin_PROGRAMS=")
74 multilib_src_install() {
77 $(multilib_is_native_abi || echo "bin_PROGRAMS= dist_html_DATA=") \
79 multilib_is_native_abi && gen_usr_ldscript -a pcre2-posix
82 multilib_src_install_all() {
83 find "${ED}" -name "*.la" -delete || die