summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorSebastian Bergmann <sebastian@gentoo.org>2006-01-05 09:11:39 +0000
committerSebastian Bergmann <sebastian@gentoo.org>2006-01-05 09:11:39 +0000
commitd82ed5e097744af54b271717eabfbec7815b866d (patch)
treefbe0d19640dcd0d208152b0cdc092153cf5d3e3a /eclass
parentalbumart-1.5.0-r1 x86 stable per bug #117246. (diff)
downloadgentoo-2-d82ed5e097744af54b271717eabfbec7815b866d.tar.gz
gentoo-2-d82ed5e097744af54b271717eabfbec7815b866d.tar.bz2
gentoo-2-d82ed5e097744af54b271717eabfbec7815b866d.zip
Sync with overlay: Pass correct PHP_BIN to PEAR Installer, fixes problems with Agavi, Phing, PHPUnit2, and Propel.
Diffstat (limited to 'eclass')
-rw-r--r--eclass/php-pear-lib-r1.eclass16
-rw-r--r--eclass/php-pear-r1.eclass16
2 files changed, 28 insertions, 4 deletions
diff --git a/eclass/php-pear-lib-r1.eclass b/eclass/php-pear-lib-r1.eclass
index ea135662ab35..fe56bfd7d30b 100644
--- a/eclass/php-pear-lib-r1.eclass
+++ b/eclass/php-pear-lib-r1.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/php-pear-lib-r1.eclass,v 1.2 2005/11/20 01:35:05 chtekk Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/php-pear-lib-r1.eclass,v 1.3 2006/01/05 09:11:39 sebastian Exp $
#
# Author: Luca Longinotti <chtekk@gentoo.org>
# Maintained by the PHP Herd <php-bugs@gentoo.org>
@@ -27,9 +27,21 @@ php-pear-lib-r1_src_install() {
addpredict /usr/share/snmp/mibs/.index
addpredict /var/lib/net-snmp/
+ case "${CATEGORY}" in
+ dev-php)
+ if has_version '=dev-lang/php-5*' ; then
+ PHP_BIN="/usr/lib/php5/bin/php"
+ else
+ PHP_BIN="/usr/lib/php4/bin/php"
+ fi ;;
+ dev-php4) PHP_BIN="/usr/lib/php4/bin/php" ;;
+ dev-php5) PHP_BIN="/usr/lib/php5/bin/php" ;;
+ *) die "I don't know which version of PHP packages in ${CATEGORY} require"
+ esac
+
cd "${S}"
mv "${WORKDIR}/package.xml" "${S}"
- pear install --nodeps --installroot="${D}" "${S}/package.xml" || die "Unable to install PEAR package"
+ pear -d php_bin="${PHP_BIN}" install --nodeps --installroot="${D}" "${S}/package.xml" || die "Unable to install PEAR package"
rm -rf "${D}/usr/share/php/.filemap" \
"${D}/usr/share/php/.lock" \
diff --git a/eclass/php-pear-r1.eclass b/eclass/php-pear-r1.eclass
index 0c0789959e69..62017c12f5ff 100644
--- a/eclass/php-pear-r1.eclass
+++ b/eclass/php-pear-r1.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/php-pear-r1.eclass,v 1.7 2005/11/20 01:35:05 chtekk Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/php-pear-r1.eclass,v 1.8 2006/01/05 09:11:39 sebastian Exp $
#
# Author: Tal Peer <coredumb@gentoo.org>
# Maintained by the PHP Herd <php-bugs@gentoo.org>
@@ -44,9 +44,21 @@ php-pear-r1_src_install() {
addpredict /usr/share/snmp/mibs/.index
addpredict /var/lib/net-snmp/
+ case "${CATEGORY}" in
+ dev-php)
+ if has_version '=dev-lang/php-5*' ; then
+ PHP_BIN="/usr/lib/php5/bin/php"
+ else
+ PHP_BIN="/usr/lib/php4/bin/php"
+ fi ;;
+ dev-php4) PHP_BIN="/usr/lib/php4/bin/php" ;;
+ dev-php5) PHP_BIN="/usr/lib/php5/bin/php" ;;
+ *) die "I don't know which version of PHP packages in ${CATEGORY} require"
+ esac
+
cd "${S}"
mv "${WORKDIR}/package.xml" "${S}"
- pear install --nodeps --installroot="${D}" "${S}/package.xml" || die "Unable to install PEAR package"
+ pear -d php_bin="${PHP_BIN}" install --nodeps --installroot="${D}" "${S}/package.xml" || die "Unable to install PEAR package"
rm -rf "${D}/usr/share/php/.filemap" \
"${D}/usr/share/php/.lock"
}