Gentoo Archives: gentoo-commits

From: Brian Evans <grknight@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Sat, 19 Jan 2019 19:31:40
Message-Id: 1547926252.c95baab3e63cd24ded7a77fbf02ffbbb0b6b9c8d.grknight@gentoo
1 commit: c95baab3e63cd24ded7a77fbf02ffbbb0b6b9c8d
2 Author: Brian Evans <grknight <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jan 19 19:30:52 2019 +0000
4 Commit: Brian Evans <grknight <AT> gentoo <DOT> org>
5 CommitDate: Sat Jan 19 19:30:52 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c95baab3
7
8 php-ext-source-r3.eclass: Add EAPI=7 support
9
10 Signed-off-by: Brian Evans <grknight <AT> gentoo.org>
11
12 eclass/php-ext-source-r3.eclass | 31 +++++++++++++++----------------
13 1 file changed, 15 insertions(+), 16 deletions(-)
14
15 diff --git a/eclass/php-ext-source-r3.eclass b/eclass/php-ext-source-r3.eclass
16 index 66d32d5c5eb..5ef879a2be2 100644
17 --- a/eclass/php-ext-source-r3.eclass
18 +++ b/eclass/php-ext-source-r3.eclass
19 @@ -1,10 +1,10 @@
20 -# Copyright 1999-2018 Gentoo Foundation
21 +# Copyright 1999-2019 Gentoo Authors
22 # Distributed under the terms of the GNU General Public License v2
23
24 # @ECLASS: php-ext-source-r3.eclass
25 # @MAINTAINER:
26 # Gentoo PHP team <php-bugs@g.o>
27 -# @SUPPORTED_EAPIS: 6
28 +# @SUPPORTED_EAPIS: 6 7
29 # @BLURB: Compile and install standalone PHP extensions.
30 # @DESCRIPTION:
31 # A unified interface for compiling and installing standalone PHP
32 @@ -14,8 +14,8 @@ inherit autotools
33
34 EXPORT_FUNCTIONS src_prepare src_configure src_compile src_install src_test
35
36 -case ${EAPI} in
37 - 6) ;;
38 +case ${EAPI:-0} in
39 + 6|7) ;;
40 *)
41 die "${ECLASS} is not compatible with EAPI=${EAPI}"
42 esac
43 @@ -106,6 +106,7 @@ esac
44 # conditional like "php?", but only when PHP_EXT_OPTIONAL_USE is
45 # non-null. The option group "|| (..." is always started here.
46 REQUIRED_USE="${PHP_EXT_OPTIONAL_USE}${PHP_EXT_OPTIONAL_USE:+? ( }|| ( "
47 +PHPDEPEND="${PHP_EXT_OPTIONAL_USE}${PHP_EXT_OPTIONAL_USE:+? ( } "
48 for _php_target in ${USE_PHP}; do
49 # Now loop through each USE_PHP target and add the corresponding
50 # dev-lang/php slot to PHPDEPEND.
51 @@ -125,19 +126,17 @@ unset _php_slot _php_target
52 # Finally, end the optional group that we started before the loop. Close
53 # the USE-conditional if PHP_EXT_OPTIONAL_USE is non-null.
54 REQUIRED_USE+=") ${PHP_EXT_OPTIONAL_USE:+ )}"
55 +PHPDEPEND+=" ${PHP_EXT_OPTIONAL_USE:+ )}"
56 +TOOLDEPS="sys-devel/m4 sys-devel/libtool"
57
58 -RDEPEND="${RDEPEND}
59 - ${PHP_EXT_OPTIONAL_USE}${PHP_EXT_OPTIONAL_USE:+? ( }
60 - ${PHPDEPEND}
61 - ${PHP_EXT_OPTIONAL_USE:+ )}"
62 +RDEPEND="${PHPDEPEND}"
63
64 -DEPEND="${DEPEND}
65 - sys-devel/m4
66 - sys-devel/libtool
67 - ${PHP_EXT_OPTIONAL_USE}${PHP_EXT_OPTIONAL_USE:+? ( }
68 - ${PHPDEPEND}
69 - ${PHP_EXT_OPTIONAL_USE:+ )}
70 -"
71 +case ${EAPI:-0} in
72 + 6) DEPEND="${TOOLDEPS} ${PHPDEPEND}" ;;
73 + 7) DEPEND="${PHPDEPEND}" ; BDEPEND="${TOOLDEPS} ${PHPDEPEND}" ;;
74 +esac
75 +
76 +unset PHPDEPEND TOOLDEPS
77
78 # @ECLASS-VARIABLE: PHP_EXT_SKIP_PHPIZE
79 # @DEFAULT_UNSET
80 @@ -209,7 +208,7 @@ php-ext-source-r3_src_configure() {
81
82 # Support either a string or an array for PHP_EXT_ECONF_ARGS.
83 local econf_args
84 - if [[ $(declare -p PHP_EXT_ECONF_ARGS) == "declare -a"* ]]; then
85 + if [[ -n "${PHP_EXT_ECONF_ARGS}" && $(declare -p PHP_EXT_ECONF_ARGS) == "declare -a"* ]]; then
86 econf_args=( "${PHP_EXT_ECONF_ARGS[@]}" )
87 else
88 econf_args=( ${PHP_EXT_ECONF_ARGS} )