commit:     263ff6b63d6e891b4e49b81afcf75da939827075
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Sep 10 07:59:09 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Sep 10 08:11:16 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=263ff6b6

dev-libs/libpcre2: add 10.46

Bug: https://bugs.gentoo.org/962686
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-libs/libpcre2/Manifest              |   2 +
 dev-libs/libpcre2/libpcre2-10.46.ebuild | 109 ++++++++++++++++++++++++++++++++
 2 files changed, 111 insertions(+)

diff --git a/dev-libs/libpcre2/Manifest b/dev-libs/libpcre2/Manifest
index d64ce7fbb6b5..aa329497d23b 100644
--- a/dev-libs/libpcre2/Manifest
+++ b/dev-libs/libpcre2/Manifest
@@ -1,2 +1,4 @@
 DIST pcre2-10.45.tar.bz2 2072403 BLAKE2B 
ec8a76cb28ef6680f8655828462551baf4e48019ff01e40bda2732b43b849bd69f8321238d7fa8f6b650ec88f7229a72928ad95d57423643f995d95264f5a4db
 SHA512 
4c1f0cf793624516d7eeb15745d6c07c9f678dd2c2b349062c6b614e88bf42262972d133576e85140dee2a882984aaf2d688953fc9c69ec7105b2daaeae89845
 DIST pcre2-10.45.tar.bz2.sig 566 BLAKE2B 
21a7fc4d6a116c5fde78a8abc99445bd3ce8da70083e65b4117cec2520ed10fee810b8b82226cecb1e5649643be96bb8c89ec80f9dd907bbf95373477febc83d
 SHA512 
ff8a0f036d98b902fa2476cf5875089685cc712294629fc385c8c84c8288674e83f278fe36141b4c109eb68a64b3e6a29d0049c799bd5ab77cf15142de3c8e20
+DIST pcre2-10.46.tar.bz2 2035354 BLAKE2B 
ebd501ba2105c847bb830c932bbfafef2e14583743f62b46af7671aa801eff0ca8b1ed9ce8252f9b091f18ef6e5ef38d47777f657d3ba3813be3d94856558080
 SHA512 
795b0d74efb898347990c29fefc85f37ac81e7795f9d6a5598d1169a03c547df7ff7eac280f708b1fef68d3e7686e0d4cd55f0c6364e287ff2a983bbd1a3c334
+DIST pcre2-10.46.tar.bz2.sig 566 BLAKE2B 
6ffd9ea22526ab371f916d980af26b6b1b64e464c2b98d631712abfe2b8aa32c6de7f4eb6dd661d67bc308e18c113e705f9d52f9057fb3cec527d59ca4c92bbd
 SHA512 
e755150e291f39222cd09cde046ce72e838a1c16f520fce3f63265126c5c6c5d143dc2f11ad8fabea45ce5e3d3cd482c434da1968354b2470e163ebfc3cc9bba

diff --git a/dev-libs/libpcre2/libpcre2-10.46.ebuild 
b/dev-libs/libpcre2/libpcre2-10.46.ebuild
new file mode 100644
index 000000000000..a0db9d66b434
--- /dev/null
+++ b/dev-libs/libpcre2/libpcre2-10.46.ebuild
@@ -0,0 +1,109 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# https://pcre2project.github.io/pcre2/project/security/
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/nicholaswilson.asc
+inherit dot-a libtool multilib multilib-minimal toolchain-funcs verify-sig
+
+MY_P="pcre2-${PV/_rc/-RC}"
+
+DESCRIPTION="Perl-compatible regular expression library"
+HOMEPAGE="https://pcre2project.github.io/pcre2/ https://www.pcre.org/";
+SRC_URI="
+       
https://github.com/PCRE2Project/pcre2/releases/download/${MY_P}/${MY_P}.tar.bz2
+       https://ftp.pcre.org/pub/pcre/${MY_P}.tar.bz2
+       verify-sig? ( 
https://github.com/PCRE2Project/pcre2/releases/download/${MY_P}/${MY_P}.tar.bz2.sig
 )
+"
+
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="BSD"
+SLOT="0/3" # libpcre2-posix.so version
+if [[ ${PV} != *_rc* ]] ; then
+       KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc 
~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos 
~x64-macos ~x64-solaris"
+fi
+IUSE="bzip2 +jit libedit +pcre16 +pcre32 +readline static-libs unicode 
valgrind zlib"
+REQUIRED_USE="?? ( libedit readline )"
+
+RDEPEND="
+       bzip2? ( app-arch/bzip2 )
+       libedit? ( dev-libs/libedit )
+       readline? ( sys-libs/readline:= )
+       zlib? ( sys-libs/zlib )
+"
+DEPEND="
+       ${RDEPEND}
+       valgrind? ( dev-debug/valgrind )
+"
+BDEPEND="
+       virtual/pkgconfig
+       verify-sig? ( >=sec-keys/openpgp-keys-nicholaswilson-20250910 )
+"
+
+MULTILIB_CHOST_TOOLS=(
+       /usr/bin/pcre2-config
+)
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-10.10-000-Fix-multilib.patch
+)
+
+src_prepare() {
+       default
+
+       elibtoolize
+}
+
+src_configure() {
+       use static-libs && lto-guarantee-fat
+       multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+       local myeconfargs=(
+               --enable-pcre2-8
+               --enable-shared
+               $(multilib_native_use_enable bzip2 pcre2grep-libbz2)
+               $(multilib_native_use_enable libedit pcre2test-libedit)
+               $(multilib_native_use_enable readline pcre2test-libreadline)
+               $(multilib_native_use_enable valgrind)
+               $(multilib_native_use_enable zlib pcre2grep-libz)
+               $(use_enable jit)
+               $(use_enable jit pcre2grep-jit)
+               $(use_enable pcre16 pcre2-16)
+               $(use_enable pcre32 pcre2-32)
+               $(use_enable static-libs static)
+               $(use_enable unicode)
+       )
+
+       ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
+}
+
+multilib_src_compile() {
+       emake V=1 $(multilib_is_native_abi || echo "bin_PROGRAMS=")
+}
+
+multilib_src_test() {
+       emake check VERBOSE=yes
+}
+
+multilib_src_install() {
+       emake \
+               DESTDIR="${D}" \
+               $(multilib_is_native_abi || echo "bin_PROGRAMS= 
dist_html_DATA=") \
+               install
+
+       # bug #934977
+       if ! tc-is-static-only && [[ ! -f 
"${ED}/usr/$(get_libdir)/libpcre2-8$(get_libname)" ]] ; then
+               eerror "Sanity check for libpcre2-8$(get_libname) failed."
+               eerror "Shared library wasn't built, possible libtool bug"
+               [[ -z ${I_KNOW_WHAT_I_AM_DOING} ]] && die 
"libpcre2-8$(get_libname) not found in build, aborting"
+       fi
+}
+
+multilib_src_install_all() {
+       find "${ED}" -type f -name "*.la" -delete || die
+       strip-lto-bytecode
+}

Reply via email to