public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Ole Markus With (olemarkus)" <olemarkus@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] gentoo-x86 commit in eclass: php-ext-source-r2.eclass
Date: Mon, 15 Aug 2011 12:48:28 +0000 (UTC)	[thread overview]
Message-ID: <20110815124828.145202004C@flycatcher.gentoo.org> (raw)

olemarkus    11/08/15 12:48:28

  Modified:             php-ext-source-r2.eclass
  Log:
  Fixed a bug with ini files and multiple slots (bug 379127)

Revision  Changes    Path
1.13                 eclass/php-ext-source-r2.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/php-ext-source-r2.eclass?rev=1.13&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/php-ext-source-r2.eclass?rev=1.13&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/php-ext-source-r2.eclass?r1=1.12&r2=1.13

Index: php-ext-source-r2.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/php-ext-source-r2.eclass,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- php-ext-source-r2.eclass	22 Jul 2011 12:13:27 -0000	1.12
+++ php-ext-source-r2.eclass	15 Aug 2011 12:48:27 -0000	1.13
@@ -1,6 +1,6 @@
 # Copyright 1999-2007 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/php-ext-source-r2.eclass,v 1.12 2011/07/22 12:13:27 olemarkus Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/php-ext-source-r2.eclass,v 1.13 2011/08/15 12:48:27 olemarkus Exp $
 #
 # Author: Tal Peer <coredumb@gentoo.org>
 # Author: Stuart Herbert <stuart@gentoo.org>
@@ -247,19 +247,21 @@
 		# Build the list of <ext>.ini files to edit/add to
 		php-ext-source-r2_buildinilist ${slot}
 
-		PHPFULLINIFILELISTbak="${PHPFULLINIFILELIST}"
-		PHPFULLINIFILELIST="${PHPINIFILELIST}"
+
 		# Add the needed lines to the <ext>.ini files
+		local file
 		if [[ "${PHP_EXT_INI}" = "yes" ]] ; then
-			php-ext-source-r2_addextension "${PHP_EXT_NAME}.so"
+			for file in ${PHPINIFILELIST}; do 
+				php-ext-source-r2_addextension "${PHP_EXT_NAME}.so" "${file}"
+			done
 		fi
 		
-		PHPFULLINIFILELIST=${PHPFULLINIFILELISTbak}
 
 		# Symlink the <ext>.ini files from ext/ to ext-active/
+		local inifile
 		for inifile in ${PHPINIFILELIST} ; do
 			if [[ -n "${PHP_EXT_INIFILE}" ]]; then
-				cat "${FILESDIR}/${PHP_EXT_INIFILE}" >> "${D}/${inifile}"
+				cat "${FILESDIR}/${PHP_EXT_INIFILE}" > "${inifile}"
 				einfo "Added content of ${FILESDIR}/${PHP_EXT_INIFILE} to ${inifile}"
 			fi
 
@@ -272,7 +274,6 @@
 			dosym "/${inifile}" "/${inifile/ext/ext-active}"
 		done
 
-
 		# Add support for installing PHP files into a version dependant directory
 		PHP_EXT_SHARED_DIR="/usr/share/php/${PHP_EXT_NAME}"
 	done
@@ -312,7 +313,7 @@
 		ext_file="${1}"
 	fi
 
-	php-ext-source-r2_addtoinifiles "${ext_type}" "${ext_file}" "Extension added"
+	php-ext-source-r2_addtoinifile "${ext_type}" "${ext_file}" "${2}" "Extension added"
 }
 
 # $1 - Setting name
@@ -320,16 +321,17 @@
 # $3 - File to add to
 # $4 - Sanitized text to output
 php-ext-source-r2_addtoinifile() {
-	if [[ ! -d $(dirname ${3}) ]] ; then
-		mkdir -p $(dirname ${3})
+	local inifile="${WORKDIR}/${3}"
+	if [[ ! -d $(dirname ${inifile}) ]] ; then
+		mkdir -p $(dirname ${inifile})
 	fi
 
 	# Are we adding the name of a section?
 	if [[ ${1:0:1} == "[" ]] ; then
-		echo "${1}" >> "${3}"
+		echo "${1}" >> "${inifile}"
 		my_added="${1}"
 	else
-		echo "${1}=${2}" >> "${3}"
+		echo "${1}=${2}" >> "${inifile}"
 		my_added="${1}=${2}"
 	fi
 
@@ -340,7 +342,7 @@
 	fi
 
 	insinto /$(dirname ${3})
-	doins "${3}"
+	doins "${inifile}"
 }
 
 # @FUNCTION: php-ext-source-r2_addtoinifiles






             reply	other threads:[~2011-08-15 12:48 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-15 12:48 Ole Markus With (olemarkus) [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-08-01 10:55 [gentoo-commits] gentoo-x86 commit in eclass: php-ext-source-r2.eclass Ole Markus With (olemarkus)
2012-06-22 20:05 Ole Markus With (olemarkus)
2012-02-16 11:25 Ole Markus With (olemarkus)
2012-01-15 17:18 Ole Markus With (olemarkus)
2012-01-13  5:38 Ole Markus With (olemarkus)
2012-01-12 11:10 Ole Markus With (olemarkus)
2012-01-11 18:30 Ole Markus With (olemarkus)
2011-11-24  0:04 Mike Frysinger (vapier)
2011-09-09 14:39 Ole Markus With (olemarkus)
2011-08-19  9:15 Ole Markus With (olemarkus)
2011-07-22 12:13 Ole Markus With (olemarkus)
2011-07-22  9:19 Ole Markus With (olemarkus)
2011-06-29  7:04 Ole Markus With (olemarkus)
2011-05-22  7:18 Ole Markus With (olemarkus)
2011-01-10 11:25 Ole Markus With (olemarkus)
2011-01-09  0:05 Robin H. Johnson (robbat2)
2010-12-27 22:19 Jeremy Olexa (darkside)
2010-11-03 22:47 Ole Markus With (olemarkus)
2010-11-02 21:46 Ole Markus With (olemarkus)
2010-11-02 17:09 Ole Markus With (olemarkus)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110815124828.145202004C@flycatcher.gentoo.org \
    --to=olemarkus@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox