summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Longinotti <chtekk@gentoo.org>2007-03-05 01:50:47 +0000
committerLuca Longinotti <chtekk@gentoo.org>2007-03-05 01:50:47 +0000
commit3866af48f35422b30b80deefcf0de589c569ddf7 (patch)
treeb543212474a6c4d3d0c296fcc01716ecd5e14711 /eclass/php-pear-lib-r1.eclass
parentFix compile on 5.2. (diff)
downloadgentoo-2-3866af48f35422b30b80deefcf0de589c569ddf7.tar.gz
gentoo-2-3866af48f35422b30b80deefcf0de589c569ddf7.tar.bz2
gentoo-2-3866af48f35422b30b80deefcf0de589c569ddf7.zip
New updated PHP eclasses, fix lots of bugs, introduce PHP 5.2 support.
Diffstat (limited to 'eclass/php-pear-lib-r1.eclass')
-rw-r--r--eclass/php-pear-lib-r1.eclass34
1 files changed, 13 insertions, 21 deletions
diff --git a/eclass/php-pear-lib-r1.eclass b/eclass/php-pear-lib-r1.eclass
index 019a564136f6..7716af2950b7 100644
--- a/eclass/php-pear-lib-r1.eclass
+++ b/eclass/php-pear-lib-r1.eclass
@@ -1,24 +1,20 @@
-# Copyright 1999-2005 Gentoo Foundation
+# Copyright 1999-2007 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.9 2006/03/10 10:47:49 sebastian Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/php-pear-lib-r1.eclass,v 1.10 2007/03/05 01:50:47 chtekk Exp $
#
# Author: Luca Longinotti <chtekk@gentoo.org>
-# Maintained by the PHP Herd <php-bugs@gentoo.org>
-#
-# Based on Tal Peer's <coredumb@gentoo.org> work on php-pear.eclass.
+# Maintained by the PHP Team <php-bugs@gentoo.org>
#
# The php-pear-lib-r1 eclass provides means for an easy installation of PEAR
# based libraries, such as Creole, Jargon, Phing etc., while retaining
-# the functionality to put the libraries into version-dependant dirs.
+# the functionality to put the libraries into version-dependant directories.
inherit depend.php
EXPORT_FUNCTIONS src_install
-# We must depend on the base package as we need it to let
-# PEAR work, as well as PEAR itself.
-DEPEND="${DEPEND} dev-lang/php >=dev-php/PEAR-PEAR-1.3.6"
-RDEPEND="${RDEPEND} ${DEPEND}"
+DEPEND="dev-lang/php >=dev-php/PEAR-PEAR-1.4.6"
+RDEPEND="${DEPEND}"
php-pear-lib-r1_src_install() {
has_php
@@ -36,23 +32,19 @@ php-pear-lib-r1_src_install() {
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"
+ *) die "Version of PHP required by packages in category ${CATEGORY} unknown"
esac
cd "${S}"
- mv "${WORKDIR}/package.xml" "${S}"
+ mv -f "${WORKDIR}/package.xml" "${S}"
- if has_version '=dev-php/PEAR-PEAR-1.3*' ; then
- pear -d php_bin="${PHP_BIN}" install --nodeps --installroot="${D}" "${S}/package.xml" > /dev/null || die "Unable to install PEAR package"
+ if has_version '>=dev-php/PEAR-PEAR-1.4.8' ; then
+ pear -d php_bin="${PHP_BIN}" install --force --loose --nodeps --offline --packagingroot="${D}" "${S}/package.xml" > /dev/null || die "Unable to install PEAR package"
else
- if has_version '>=dev-php/PEAR-PEAR-1.4.8' ; then
- pear -d php_bin="${PHP_BIN}" install --force --loose --nodeps --offline --packagingroot="${D}" "${S}/package.xml" > /dev/null || die "Unable to install PEAR package"
- else
- pear -d php_bin="${PHP_BIN}" install --nodeps --packagingroot="${D}" "${S}/package.xml" > /dev/null || die "Unable to install PEAR package"
- fi
+ pear -d php_bin="${PHP_BIN}" install --nodeps --packagingroot="${D}" "${S}/package.xml" > /dev/null || die "Unable to install PEAR package"
fi
- rm -rf "${D}/usr/share/php/.channels" \
+ rm -Rf "${D}/usr/share/php/.channels" \
"${D}/usr/share/php/.depdblock" \
"${D}/usr/share/php/.depdb" \
"${D}/usr/share/php/.filemap" \
@@ -62,7 +54,7 @@ php-pear-lib-r1_src_install() {
# install to the correct phpX folder, if not specified
# /usr/share/php will be kept, also sedding to substitute
# the path, many files can specify it wrongly
- if [ -n "${PHP_SHARED_CAT}" ] && [ "${PHP_SHARED_CAT}" != "php" ] ; then
+ if [[ -n "${PHP_SHARED_CAT}" ]] && [[ "${PHP_SHARED_CAT}" != "php" ]] ; then
mv -f "${D}/usr/share/php" "${D}/usr/share/${PHP_SHARED_CAT}" || die "Unable to move files"
find "${D}/" -type f -exec sed -e "s|/usr/share/php|/usr/share/${PHP_SHARED_CAT}|g" -i {} \; || die "Unable to change PHP path"
einfo