Gentoo Archives: gentoo-commits

From: Thomas Deutschmann <whissi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/libpcre/, dev-libs/libpcre/files/
Date: Mon, 30 Oct 2017 22:31:59
Message-Id: 1509402710.181bc2b406fcf7c401b543181d0af6f6562602e7.whissi@gentoo
1 commit: 181bc2b406fcf7c401b543181d0af6f6562602e7
2 Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
3 AuthorDate: Mon Oct 30 22:26:59 2017 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Mon Oct 30 22:31:50 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=181bc2b4
7
8 dev-libs/libpcre: Rev bump to fix stack size detection
9
10 Needed for dev-db/mariadb and friends.
11
12 Bug: https://jira.mariadb.org/browse/MDEV-13412
13 Package-Manager: Portage-2.3.13, Repoman-2.3.4
14
15 .../libpcre-8.41-fix-stack-size-detection.patch | 18 ++++
16 dev-libs/libpcre/libpcre-8.41-r1.ebuild | 104 +++++++++++++++++++++
17 2 files changed, 122 insertions(+)
18
19 diff --git a/dev-libs/libpcre/files/libpcre-8.41-fix-stack-size-detection.patch b/dev-libs/libpcre/files/libpcre-8.41-fix-stack-size-detection.patch
20 new file mode 100644
21 index 00000000000..0fd6b5f3b22
22 --- /dev/null
23 +++ b/dev-libs/libpcre/files/libpcre-8.41-fix-stack-size-detection.patch
24 @@ -0,0 +1,18 @@
25 +https://bugs.exim.org/show_bug.cgi?id=2173#c4
26 +
27 +diff --git a/pcre/pcre_exec.c b/pcre/pcre_exec.c
28 +--- a/pcre/pcre_exec.c
29 ++++ b/pcre/pcre_exec.c
30 +@@ -509,6 +509,12 @@
31 + (e.g. stopped by repeated call or recursion limit)
32 + */
33 +
34 ++#ifdef __GNUC__
35 ++static int
36 ++match(REGISTER PCRE_PUCHAR eptr, REGISTER const pcre_uchar *ecode,
37 ++ PCRE_PUCHAR mstart, int offset_top, match_data *md, eptrblock *eptrb,
38 ++ unsigned int rdepth) __attribute__((noinline,noclone));
39 ++#endif
40 + static int
41 + match(REGISTER PCRE_PUCHAR eptr, REGISTER const pcre_uchar *ecode,
42 + PCRE_PUCHAR mstart, int offset_top, match_data *md, eptrblock *eptrb,
43
44 diff --git a/dev-libs/libpcre/libpcre-8.41-r1.ebuild b/dev-libs/libpcre/libpcre-8.41-r1.ebuild
45 new file mode 100644
46 index 00000000000..eed796ef4bf
47 --- /dev/null
48 +++ b/dev-libs/libpcre/libpcre-8.41-r1.ebuild
49 @@ -0,0 +1,104 @@
50 +# Copyright 1999-2017 Gentoo Foundation
51 +# Distributed under the terms of the GNU General Public License v2
52 +
53 +EAPI=5
54 +
55 +inherit eutils multilib libtool flag-o-matic toolchain-funcs multilib-minimal
56 +
57 +DESCRIPTION="Perl-compatible regular expression library"
58 +HOMEPAGE="http://www.pcre.org/"
59 +MY_P="pcre-${PV/_rc/-RC}"
60 +if [[ ${PV} != *_rc* ]] ; then
61 + # Only the final releases are available here.
62 + SRC_URI="mirror://sourceforge/pcre/${MY_P}.tar.bz2
63 + ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/${MY_P}.tar.bz2"
64 +else
65 + SRC_URI="ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/Testing/${MY_P}.tar.bz2"
66 +fi
67 +
68 +LICENSE="BSD"
69 +SLOT="3"
70 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
71 +IUSE="bzip2 +cxx +jit libedit pcre16 pcre32 +readline +recursion-limit static-libs unicode zlib"
72 +REQUIRED_USE="readline? ( !libedit )
73 + libedit? ( !readline )"
74 +
75 +RDEPEND="
76 + bzip2? ( app-arch/bzip2 )
77 + zlib? ( sys-libs/zlib )
78 + libedit? ( dev-libs/libedit )
79 + readline? ( sys-libs/readline:0= )
80 +"
81 +DEPEND="
82 + ${RDEPEND}
83 + virtual/pkgconfig
84 +"
85 +RDEPEND="
86 + ${RDEPEND}
87 + abi_x86_32? (
88 + !<=app-emulation/emul-linux-x86-baselibs-20131008-r2
89 + !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
90 + )
91 +"
92 +
93 +S="${WORKDIR}/${MY_P}"
94 +
95 +MULTILIB_CHOST_TOOLS=(
96 + /usr/bin/pcre-config
97 +)
98 +
99 +PATCHES=(
100 + "${FILESDIR}"/${PN}-8.41-sljit_mips-label-statement-fix.patch
101 + "${FILESDIR}"/${PN}-8.41-fix-stack-size-detection.patch
102 +)
103 +
104 +src_prepare() {
105 + epatch "${PATCHES[@]}"
106 + sed -i -e "s:-lpcre ::" libpcrecpp.pc.in || die
107 + elibtoolize
108 +}
109 +
110 +multilib_src_configure() {
111 + local myeconfargs=(
112 + --with-match-limit-recursion=$(usex recursion-limit 8192 MATCH_LIMIT)
113 + $(multilib_native_use_enable bzip2 pcregrep-libbz2)
114 + $(use_enable cxx cpp)
115 + $(use_enable jit) $(use_enable jit pcregrep-jit)
116 + $(use_enable pcre16)
117 + $(use_enable pcre32)
118 + $(multilib_native_use_enable libedit pcretest-libedit)
119 + $(multilib_native_use_enable readline pcretest-libreadline)
120 + $(use_enable static-libs static)
121 + $(use_enable unicode utf) $(use_enable unicode unicode-properties)
122 + $(multilib_native_use_enable zlib pcregrep-libz)
123 + --enable-pcre8
124 + --enable-shared
125 + --htmldir="${EPREFIX}"/usr/share/doc/${PF}/html
126 + --docdir="${EPREFIX}"/usr/share/doc/${PF}
127 + )
128 + ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
129 +}
130 +
131 +multilib_src_compile() {
132 + emake V=1 $(multilib_is_native_abi || echo "bin_PROGRAMS=")
133 +}
134 +
135 +multilib_src_install() {
136 + emake \
137 + DESTDIR="${D}" \
138 + $(multilib_is_native_abi || echo "bin_PROGRAMS= dist_html_DATA=") \
139 + install
140 + gen_usr_ldscript -a pcre
141 +}
142 +
143 +multilib_src_install_all() {
144 + prune_libtool_files
145 +}
146 +
147 +pkg_preinst() {
148 + preserve_old_lib /$(get_libdir)/libpcre.so.0
149 +}
150 +
151 +pkg_postinst() {
152 + preserve_old_lib_notify /$(get_libdir)/libpcre.so.0
153 +}