Gentoo Archives: gentoo-dev

From: Brian Evans <grknight@g.o>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] [PATCH] eclass update for php-ext-source-r3
Date: Tue, 17 Sep 2019 17:53:03
Message-Id: 1c5a05e8-2a5b-c286-e1e6-e98bd2e1ef03@gentoo.org
1 This diff is required to get proper support for PHP 7.4 and newer.
2
3 Upstream has discontinued acinclude.m4 and this has been breaking our
4 call to eautoreconf. Instead, we are now simulating their ./buildconf
5 script with our own toolchain functions to ensure cross-build compatibility.
6
7 diff --git a/eclass/php-ext-source-r3.eclass
8 b/eclass/php-ext-source-r3.eclass
9 index 5ef879a2be2..385bdb9dae0 100644
10 --- a/eclass/php-ext-source-r3.eclass
11 +++ b/eclass/php-ext-source-r3.eclass
12 @@ -15,7 +15,8 @@ inherit autotools
13 EXPORT_FUNCTIONS src_prepare src_configure src_compile src_install src_test
14
15 case ${EAPI:-0} in
16 - 6|7) ;;
17 + 6) inherit eapi7-ver ;;
18 + 7) ;;
19 *)
20 die "${ECLASS} is not compatible with EAPI=${EAPI}"
21 esac
22 @@ -183,10 +184,18 @@ php-ext-source-r3_phpize() {
23 # WANT_AUTOMAKE (see bugs #329071 and #549268).
24 autotools_run_tool "${PHPIZE}"
25
26 - # Force libtoolize to run and regenerate autotools files (bug
27 - # #220519).
28 - rm aclocal.m4 || die "failed to remove aclocal.m4"
29 - eautoreconf
30 + # PHP >=7.4 no longer works with eautoreconf
31 + if ver_test $PHP_CURRENTSLOT -ge 7.4 ; then
32 + rm -fr aclocal.m4 autom4te.cache config.cache \
33 + configure main/php_config.h.in || die
34 + eautoconf --force
35 + eautoheader
36 + else
37 + # Force libtoolize to run and regenerate autotools files (bug
38 + # #220519).
39 + rm aclocal.m4 || die "failed to remove aclocal.m4"
40 + eautoreconf
41 + fi
42 fi
43 }

Attachments

File name MIME type
signature.asc application/pgp-signature