From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 70DBB15800A for ; Thu, 3 Aug 2023 19:08:55 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B184B2BC01D; Thu, 3 Aug 2023 19:08:54 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 9C0512BC01D for ; Thu, 3 Aug 2023 19:08:54 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id D7B5A335DAE for ; Thu, 3 Aug 2023 19:08:53 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 49D3BE8F for ; Thu, 3 Aug 2023 19:08:52 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1691089689.c7ebd2b053695929b4028cabac2744b23a0bb4c6.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/libpcre/files/, dev-libs/libpcre/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-libs/libpcre/files/libpcre-8.45-fix-stack-size-detection.patch dev-libs/libpcre/libpcre-8.45-r2.ebuild X-VCS-Directories: dev-libs/libpcre/ dev-libs/libpcre/files/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: c7ebd2b053695929b4028cabac2744b23a0bb4c6 X-VCS-Branch: master Date: Thu, 3 Aug 2023 19:08:52 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: e5c2ee52-8a19-4fca-828a-8d3d60158f0b X-Archives-Hash: 3551535077712de8dde21eab001a1587 commit: c7ebd2b053695929b4028cabac2744b23a0bb4c6 Author: Sam James gentoo org> AuthorDate: Thu Aug 3 19:08:09 2023 +0000 Commit: Sam James gentoo org> CommitDate: Thu Aug 3 19:08:09 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c7ebd2b0 dev-libs/libpcre: fix attributes w/ clang 16 pcre_exec was optimised, despite the attributes asking it not to, because Clang 16 recognises different tokens. Thanks to Zhixu Liu for the wonderful analysis. Closes: https://bugs.gentoo.org/910188 Signed-off-by: Sam James gentoo.org> .../libpcre-8.45-fix-stack-size-detection.patch | 18 ++++ dev-libs/libpcre/libpcre-8.45-r2.ebuild | 106 +++++++++++++++++++++ 2 files changed, 124 insertions(+) diff --git a/dev-libs/libpcre/files/libpcre-8.45-fix-stack-size-detection.patch b/dev-libs/libpcre/files/libpcre-8.45-fix-stack-size-detection.patch new file mode 100644 index 000000000000..2b5af062d36a --- /dev/null +++ b/dev-libs/libpcre/files/libpcre-8.45-fix-stack-size-detection.patch @@ -0,0 +1,18 @@ +https://bugs.exim.org/show_bug.cgi?id=2173#c4 +https://bugs.gentoo.org/910188 +https://github.com/MariaDB/server/pull/2700 +--- a/pcre_exec.c ++++ b/pcre_exec.c +@@ -509,6 +509,12 @@ + (e.g. stopped by repeated call or recursion limit) + */ + ++#ifdef __GNUC__ ++static int ++match(REGISTER PCRE_PUCHAR eptr, REGISTER const pcre_uchar *ecode, ++ PCRE_PUCHAR mstart, int offset_top, match_data *md, eptrblock *eptrb, ++ unsigned int rdepth) __attribute__((optnone,noinline,noclone)); ++#endif + static int + match(REGISTER PCRE_PUCHAR eptr, REGISTER const pcre_uchar *ecode, + PCRE_PUCHAR mstart, int offset_top, match_data *md, eptrblock *eptrb, diff --git a/dev-libs/libpcre/libpcre-8.45-r2.ebuild b/dev-libs/libpcre/libpcre-8.45-r2.ebuild new file mode 100644 index 000000000000..0f71104bd917 --- /dev/null +++ b/dev-libs/libpcre/libpcre-8.45-r2.ebuild @@ -0,0 +1,106 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit libtool multilib-minimal preserve-libs usr-ldscript + +DESCRIPTION="Perl-compatible regular expression library" +HOMEPAGE="http://www.pcre.org/" +MY_P="pcre-${PV/_rc/-RC}" +if [[ ${PV} != *_rc* ]] ; then + # Only the final releases are available here. + SRC_URI=" + mirror://sourceforge/pcre/${MY_P}.tar.bz2 + https://ftp.pcre.org/pub/pcre/${MY_P}.tar.bz2 + ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/${MY_P}.tar.bz2 + " +else + SRC_URI="ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/Testing/${MY_P}.tar.bz2" +fi + +S="${WORKDIR}/${MY_P}" + +LICENSE="BSD" +SLOT="3" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris" +IUSE="bzip2 +cxx +jit libedit pcre16 pcre32 +readline static-libs unicode valgrind zlib" +REQUIRED_USE=" + readline? ( !libedit ) + libedit? ( !readline ) +" + +RDEPEND=" + bzip2? ( app-arch/bzip2 ) + zlib? ( sys-libs/zlib ) + libedit? ( dev-libs/libedit ) + readline? ( sys-libs/readline:= ) +" +DEPEND=" + ${RDEPEND} + valgrind? ( dev-util/valgrind ) +" +BDEPEND="virtual/pkgconfig" + +MULTILIB_CHOST_TOOLS=( + /usr/bin/pcre-config +) + +PATCHES=( + "${FILESDIR}"/${PN}-8.45-fix-stack-size-detection.patch +) + +src_prepare() { + default + + sed -i -e "s:-lpcre ::" libpcrecpp.pc.in || die + elibtoolize +} + +multilib_src_configure() { + local myeconfargs=( + $(multilib_native_use_enable bzip2 pcregrep-libbz2) + $(use_enable cxx cpp) + $(use_enable jit) + $(use_enable jit pcregrep-jit) + $(use_enable pcre16) + $(use_enable pcre32) + $(multilib_native_use_enable libedit pcretest-libedit) + $(multilib_native_use_enable readline pcretest-libreadline) + $(use_enable static-libs static) + $(use_enable unicode utf) + $(use_enable unicode unicode-properties) + $(multilib_native_use_enable valgrind) + $(multilib_native_use_enable zlib pcregrep-libz) + + --enable-pcre8 + --enable-shared + ) + + ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" +} + +multilib_src_compile() { + emake V=1 $(multilib_is_native_abi || echo "bin_PROGRAMS=") +} + +multilib_src_install() { + emake \ + DESTDIR="${D}" \ + $(multilib_is_native_abi || echo "bin_PROGRAMS= dist_html_DATA=") \ + install + + gen_usr_ldscript -a pcre +} + +multilib_src_install_all() { + find "${ED}" -type f -name "*.la" -delete || die +} + +pkg_preinst() { + preserve_old_lib /$(get_libdir)/libpcre.so.0 +} + +pkg_postinst() { + preserve_old_lib_notify /$(get_libdir)/libpcre.so.0 +}