From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 57338138331 for ; Mon, 29 Jan 2018 13:48:18 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 62FCEE09D6; Mon, 29 Jan 2018 13:48:16 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 3C0DFE09D6 for ; Mon, 29 Jan 2018 13:48:15 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 8C705335C07 for ; Mon, 29 Jan 2018 13:48:14 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id A8E5D1A4 for ; Mon, 29 Jan 2018 13:48:12 +0000 (UTC) From: "Brian Evans" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Brian Evans" Message-ID: <1517233632.2c3113fdedacb36b9b38482640ca6d14dd006438.grknight@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/ X-VCS-Repository: repo/gentoo X-VCS-Files: eclass/php-ext-source-r3.eclass X-VCS-Directories: eclass/ X-VCS-Committer: grknight X-VCS-Committer-Name: Brian Evans X-VCS-Revision: 2c3113fdedacb36b9b38482640ca6d14dd006438 X-VCS-Branch: master Date: Mon, 29 Jan 2018 13:48:12 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: e9f1260c-040e-4d90-8268-e010acb5a820 X-Archives-Hash: 3642a7c912eda43197dfdc31dbc44073 commit: 2c3113fdedacb36b9b38482640ca6d14dd006438 Author: Brian Evans gentoo org> AuthorDate: Fri Jan 26 14:52:27 2018 +0000 Commit: Brian Evans gentoo org> CommitDate: Mon Jan 29 13:47:12 2018 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2c3113fd 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 eclass/php-ext-source-r3.eclass | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/eclass/php-ext-source-r3.eclass b/eclass/php-ext-source-r3.eclass index bc6751562a5..315ce32887f 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}"