From a5b568c6315b8fedbdd2bbda77c2539738cb02db Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 15 Jan 2024 07:11:18 +0000 Subject: [PATCH] dev-libs/libpcre2: Sync with Gentoo It's from Gentoo commit 5e3d413c90ed50a6f9582ee1e3817398d4a82319. --- .../portage-stable/dev-libs/libpcre2/Manifest | 2 + .../libpcre2-10.43-fix-loong-sljit.patch | 30 ++++++ .../libpcre2/libpcre2-10.42-r1.ebuild | 4 +- .../libpcre2/libpcre2-10.43_rc1.ebuild | 93 +++++++++++++++++++ 4 files changed, 127 insertions(+), 2 deletions(-) create mode 100644 sdk_container/src/third_party/portage-stable/dev-libs/libpcre2/files/libpcre2-10.43-fix-loong-sljit.patch create mode 100644 sdk_container/src/third_party/portage-stable/dev-libs/libpcre2/libpcre2-10.43_rc1.ebuild diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libpcre2/Manifest b/sdk_container/src/third_party/portage-stable/dev-libs/libpcre2/Manifest index f7ea84a487..0148bb3f04 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/libpcre2/Manifest +++ b/sdk_container/src/third_party/portage-stable/dev-libs/libpcre2/Manifest @@ -1,2 +1,4 @@ DIST pcre2-10.42.tar.bz2 1799866 BLAKE2B 40aa096745548c489a00ead87a191a4d24ecd924a5b8f00401c1273176de15ccb23510882467c8e2b5c1256b97db46fba5fcdfbd9f0d61d86a29d74bb4bca7a0 SHA512 72fbde87fecec3aa4b47225dd919ea1d55e97f2cbcf02aba26e5a0d3b1ffb58c25a80a9ef069eb99f9cf4e41ba9604ad06a7ec159870e1e875d86820e12256d3 DIST pcre2-10.42.tar.bz2.sig 310 BLAKE2B 2125d7e23f7e75847573e3caeb8d55da5d8e0df3d166bf8b638b998aebacaefb4e88df7e813d6977af2dc7d82c93b7179ad0043c4f46fc4e06d99d214b0b7fcf SHA512 22ce3c7903835b1cf835ac6cfa725badecc982f1504382e62525c88307b2e3bd8951f2221fdd3d73920843e69f714b6df99fe741069e610f1f809087512a31f7 +DIST pcre2-10.43-RC1.tar.bz2 1901289 BLAKE2B 94ba878ed7a02d359d094daa22517c645b5d660dfab4ce65e9f56c1750abb56280dc0be05b6f675d12891bf9fa857ba7339d9e703b0360d72ee746afcecc6dba SHA512 2b33a50fbff0f7832d40682e7a43bef301016d8a8d74d838f1ab473f09a19c5ea98dcf73cdfa4cda4a01968e50930bb2fc40948c0e4e9c43d9762ee3dd0b1fc7 +DIST pcre2-10.43-RC1.tar.bz2.sig 310 BLAKE2B 4bfaf5209fbeb89fbc0f134921d18d15b35ef24503b910de7d0a420fbfc84831ddd79f8f61fe8a12776eb154e264ac7ff4f55d548a1e1c0ae8f53c32a4ba90e1 SHA512 09b9166f4edc6fc0d4cab66bcc572d9b081ceda3398c510348fab7746c520c4b607c26e13937e45cf3d27e0a94eefca2dddaf4210d2a754c277f1837b9a7f96d diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libpcre2/files/libpcre2-10.43-fix-loong-sljit.patch b/sdk_container/src/third_party/portage-stable/dev-libs/libpcre2/files/libpcre2-10.43-fix-loong-sljit.patch new file mode 100644 index 0000000000..30fe49410b --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/libpcre2/files/libpcre2-10.43-fix-loong-sljit.patch @@ -0,0 +1,30 @@ +https://github.com/zherczeg/sljit/commit/7a821cd714d132e46e748275a80d402beea24764 +with file path adjusted to libpcre2 layout + +From: lrzlin <54242813+lrzlin@users.noreply.github.com> +Date: Wed, 10 Jan 2024 07:13:55 +0800 +Subject: [PATCH] Add LoongArch float to integer conversion special cases + (#226) + +--- a/src/sljit/sljitConfigInternal.h ++++ b/src/sljit/sljitConfigInternal.h +@@ -198,7 +198,7 @@ extern "C" { + /* Type of public API functions. */ + /*********************************/ + +-#ifndef SLJIT_API_FUNC_ATTRIBUTE ++#ifndef SLJIT_API_FUNC_ATTRIBUTE + #if (defined SLJIT_CONFIG_STATIC && SLJIT_CONFIG_STATIC) + /* Static ABI functions. For all-in-one programs. */ + +@@ -399,6 +399,10 @@ typedef double sljit_f64; + #define SLJIT_CONV_MAX_FLOAT SLJIT_CONV_RESULT_MAX_INT + #define SLJIT_CONV_MIN_FLOAT SLJIT_CONV_RESULT_MIN_INT + #define SLJIT_CONV_NAN_FLOAT SLJIT_CONV_RESULT_MIN_INT ++#elif (defined SLJIT_CONFIG_LOONGARCH && SLJIT_CONFIG_LOONGARCH) ++#define SLJIT_CONV_MAX_FLOAT SLJIT_CONV_RESULT_MAX_INT ++#define SLJIT_CONV_MIN_FLOAT SLJIT_CONV_RESULT_MIN_INT ++#define SLJIT_CONV_NAN_FLOAT SLJIT_CONV_RESULT_ZERO + #else + #error "Result for float to integer conversion is not defined" + #endif diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libpcre2/libpcre2-10.42-r1.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/libpcre2/libpcre2-10.42-r1.ebuild index 9d03f3ad45..759b7d9870 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/libpcre2/libpcre2-10.42-r1.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-libs/libpcre2/libpcre2-10.42-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -35,7 +35,7 @@ RDEPEND=" " DEPEND=" ${RDEPEND} - valgrind? ( dev-util/valgrind ) + valgrind? ( dev-debug/valgrind ) " BDEPEND=" virtual/pkgconfig diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libpcre2/libpcre2-10.43_rc1.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/libpcre2/libpcre2-10.43_rc1.ebuild new file mode 100644 index 0000000000..f12355bd6b --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/libpcre2/libpcre2-10.43_rc1.ebuild @@ -0,0 +1,93 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/philiphazel.asc +inherit libtool multilib-minimal usr-ldscript verify-sig + +MY_P="pcre2-${PV/_rc/-RC}" + +DESCRIPTION="Perl-compatible regular expression library" +HOMEPAGE="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 +#KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +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-philiphazel ) +" + +MULTILIB_CHOST_TOOLS=( + /usr/bin/pcre2-config +) + +PATCHES=( + "${FILESDIR}"/${PN}-10.10-000-Fix-multilib.patch + "${FILESDIR}"/${PN}-10.43-fix-loong-sljit.patch +) + +src_prepare() { + default + + elibtoolize +} + +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 + multilib_is_native_abi && gen_usr_ldscript -a pcre2-posix pcre2-8 +} + +multilib_src_install_all() { + find "${ED}" -type f -name "*.la" -delete || die +}