1 |
commit: 807c50548fe64456d6b7373cb1091675faaa0501 |
2 |
Author: Brian Evans <grknight <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Sep 20 13:01:49 2019 +0000 |
4 |
Commit: Brian Evans <grknight <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Sep 20 13:01:49 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=807c5054 |
7 |
|
8 |
eclass: php-ext-source-r3 - Add support for building with PHP 7.4+ |
9 |
|
10 |
Signed-off-by: Brian Evans <grknight <AT> gentoo.org> |
11 |
|
12 |
eclass/php-ext-source-r3.eclass | 19 ++++++++++++++----- |
13 |
1 file changed, 14 insertions(+), 5 deletions(-) |
14 |
|
15 |
diff --git a/eclass/php-ext-source-r3.eclass b/eclass/php-ext-source-r3.eclass |
16 |
index 5ef879a2be2..385bdb9dae0 100644 |
17 |
--- a/eclass/php-ext-source-r3.eclass |
18 |
+++ b/eclass/php-ext-source-r3.eclass |
19 |
@@ -15,7 +15,8 @@ inherit autotools |
20 |
EXPORT_FUNCTIONS src_prepare src_configure src_compile src_install src_test |
21 |
|
22 |
case ${EAPI:-0} in |
23 |
- 6|7) ;; |
24 |
+ 6) inherit eapi7-ver ;; |
25 |
+ 7) ;; |
26 |
*) |
27 |
die "${ECLASS} is not compatible with EAPI=${EAPI}" |
28 |
esac |
29 |
@@ -183,10 +184,18 @@ php-ext-source-r3_phpize() { |
30 |
# WANT_AUTOMAKE (see bugs #329071 and #549268). |
31 |
autotools_run_tool "${PHPIZE}" |
32 |
|
33 |
- # Force libtoolize to run and regenerate autotools files (bug |
34 |
- # #220519). |
35 |
- rm aclocal.m4 || die "failed to remove aclocal.m4" |
36 |
- eautoreconf |
37 |
+ # PHP >=7.4 no longer works with eautoreconf |
38 |
+ if ver_test $PHP_CURRENTSLOT -ge 7.4 ; then |
39 |
+ rm -fr aclocal.m4 autom4te.cache config.cache \ |
40 |
+ configure main/php_config.h.in || die |
41 |
+ eautoconf --force |
42 |
+ eautoheader |
43 |
+ else |
44 |
+ # Force libtoolize to run and regenerate autotools files (bug |
45 |
+ # #220519). |
46 |
+ rm aclocal.m4 || die "failed to remove aclocal.m4" |
47 |
+ eautoreconf |
48 |
+ fi |
49 |
fi |
50 |
} |