diff options
author | Brian Evans <grknight@gentoo.org> | 2018-01-26 09:52:27 -0500 |
---|---|---|
committer | Brian Evans <grknight@gentoo.org> | 2018-01-29 08:47:12 -0500 |
commit | 2c3113fdedacb36b9b38482640ca6d14dd006438 (patch) | |
tree | bbe1cd882c98d666fd23ccaee19328fefb8b4783 /eclass | |
parent | dev-python/pyfeyn: add python3_6 (diff) | |
download | gentoo-2c3113fdedacb36b9b38482640ca6d14dd006438.tar.gz gentoo-2c3113fdedacb36b9b38482640ca6d14dd006438.tar.bz2 gentoo-2c3113fdedacb36b9b38482640ca6d14dd006438.zip |
php-ext-source-r3.eclass: Introduce PHP_INI_NAME variable
Currently php-ext-source-r3 saves the enabling ini file as
"${PHP_EXT_NAME}.ini". This is problematic when foo module needs to be
loaded before bar module as things are read in directory order.
This patch introduces PHP_INI_NAME which defaults to PHP_EXT_NAME for
backwards-compatibility.
Bug: https://bugs.gentoo.org/586446
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/php-ext-source-r3.eclass | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/eclass/php-ext-source-r3.eclass b/eclass/php-ext-source-r3.eclass index bc6751562a54..315ce32887f6 100644 --- a/eclass/php-ext-source-r3.eclass +++ b/eclass/php-ext-source-r3.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2016 Gentoo Foundation +# Copyright 1999-2018 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # @ECLASS: php-ext-source-r3.eclass @@ -73,6 +73,17 @@ esac # the tree. [[ -z "${PHP_EXT_SAPIS}" ]] && PHP_EXT_SAPIS="apache2 cli cgi fpm embed phpdbg" +# @ECLASS-VARIABLE: PHP_INI_NAME +# @DESCRIPTION +# An optional file name of the saved ini file minis the ini extension +# This allows ordering of extensions such that one is loaded before +# or after another. Defaults to the PHP_EXT_NAME. +# Example (produces 40-foo.ini file): +# @CODE@ +# PHP_INI_NAME="40-foo" +# @CODE@ +: ${PHP_INI_NAME:=${PHP_EXT_NAME}} + # Make sure at least one target is installed. First, start a USE # conditional like "php?", but only when PHP_EXT_OPTIONAL_USE is @@ -295,7 +306,7 @@ php_slot_ini_files() { local x for x in ${PHP_EXT_SAPIS} ; do if [[ -f "${EPREFIX}/etc/php/${x}-${1}/php.ini" ]] ; then - slot_ini_files+=" etc/php/${x}-${1}/ext/${PHP_EXT_NAME}.ini" + slot_ini_files+=" etc/php/${x}-${1}/ext/${PHP_INI_NAME}.ini" fi done @@ -324,7 +335,7 @@ php-ext-source-r3_createinifiles() { einfo "Added contents of ${FILESDIR}/${PHP_EXT_INIFILE}" \ "to ${file}" fi - inidir="${file/${PHP_EXT_NAME}.ini/}" + inidir="${file/${PHP_INI_NAME}.ini/}" inidir="${inidir/ext/ext-active}" dodir "/${inidir}" dosym "/${file}" "/${file/ext/ext-active}" |