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 871E41382C5 for ; Fri, 26 Jan 2018 15:39:52 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 711B9E09C6; Fri, 26 Jan 2018 15:39:03 +0000 (UTC) Received: from mx1.scent-team.com (mx1.scent-team.com [50.120.197.141]) (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 0FFFBE0992 for ; Fri, 26 Jan 2018 15:39:02 +0000 (UTC) X-Virus-Scanned: amavisd-new at scent-team.com Received: from rukia.scent-team.com (unknown [192.168.123.75]) by mx1.scent-team.com (Postfix) with ESMTP id 3zSjkF5w40zBYvkL; Fri, 26 Jan 2018 10:39:01 -0500 (EST) From: Brian Evans To: gentoo-dev@lists.gentoo.org Cc: Brian Evans Subject: [gentoo-dev] [PATCH 1/2] php-ext-source-r3.eclass: Introduce PHP_INI_NAME variable Date: Fri, 26 Jan 2018 10:38:56 -0500 Message-Id: <20180126153857.30315-2-grknight@gentoo.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180126153857.30315-1-grknight@gentoo.org> References: <20180126153857.30315-1-grknight@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Archives-Salt: a733c429-52a0-44d2-a743-81e2d32962f1 X-Archives-Hash: cdf46c03fef8156f1eb49df1f4d6679e 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. --- 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}" -- 2.16.1