summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMatti Bickel <mabi@gentoo.org>2013-11-25 23:22:57 +0000
committerMatti Bickel <mabi@gentoo.org>2013-11-25 23:22:57 +0000
commit2078a34246baadea8036aa9a29ad018781e3d200 (patch)
tree001105f4f786bd0bb24f2a99b73888e085ebb5a6 /eclass
parentintegrate php-pear-lib-r1 into php-pear-r1 eclass (diff)
downloadgentoo-2-2078a34246baadea8036aa9a29ad018781e3d200.tar.gz
gentoo-2-2078a34246baadea8036aa9a29ad018781e3d200.tar.bz2
gentoo-2-2078a34246baadea8036aa9a29ad018781e3d200.zip
export pkg_setup and default PHP_PEAR_CHANNEL to ${FILESDIR}/channel.xml (all current packages set this value)
Diffstat (limited to 'eclass')
-rw-r--r--eclass/ChangeLog6
-rw-r--r--eclass/php-pear-r1.eclass15
2 files changed, 11 insertions, 10 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog
index 0727ab20742b..8c887eb147f3 100644
--- a/eclass/ChangeLog
+++ b/eclass/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for eclass directory
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1071 2013/11/25 23:11:16 mabi Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1072 2013/11/25 23:22:57 mabi Exp $
+
+ 26 Nov 2013; Matti Bickel <mabi@gentoo.org> php-pear-r1.eclass:
+ export pkg_setup and default PHP_PEAR_CHANNEL to ${FILESDIR}/channel.xml (all
+ current packages set this value)
26 Nov 2013; Matti Bickel <mabi@gentoo.org> php-pear-r1.eclass:
Merge pkg_setup from php-pear-lib-r1.eclass and generify so that php-pear-r1
diff --git a/eclass/php-pear-r1.eclass b/eclass/php-pear-r1.eclass
index a5f4245cbaf1..c78d8aaed2aa 100644
--- a/eclass/php-pear-r1.eclass
+++ b/eclass/php-pear-r1.eclass
@@ -1,6 +1,6 @@
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2013 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.31 2013/11/25 23:11:16 mabi Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/php-pear-r1.eclass,v 1.32 2013/11/25 23:22:57 mabi Exp $
# @ECLASS: php-pear-r1.eclass
# @MAINTAINER:
@@ -17,7 +17,7 @@
inherit multilib
-EXPORT_FUNCTIONS src_install
+EXPORT_FUNCTIONS pkg_setup src_install
DEPEND="dev-lang/php
>=dev-php/pear-1.8.1"
@@ -45,6 +45,7 @@ fix_PEAR_PV() {
PEAR_PN="${PHP_PEAR_PKG_NAME}-${PEAR_PV}"
: ${PHP_PEAR_URI:=pear.php.net}
+: ${PHP_PEAR_CHANNEL:=${FILESDIR}/channel.xml}
[[ -z "${SRC_URI}" ]] && SRC_URI="http://${PHP_PEAR_URI}/get/${PEAR_PN}.tgz"
[[ -z "${HOMEPAGE}" ]] && HOMEPAGE="http://${PHP_PEAR_URI}/${PHP_PEAR_PKG_NAME}"
@@ -55,12 +56,8 @@ S="${WORKDIR}/${PEAR_PN}"
# @DESCRIPTION:
# Adds required PEAR channel if necessary
php-pear-r1_pkg_setup() {
- if [[ -n $PHP_PEAR_CHANNEL ]] ; then
- if [[ -f $PHP_PEAR_CHANNEL ]]; then
- pear channel-add $PHP_PEAR_CHANNEL || einfo "Ignore any errors about existing channels"
- else
- die "PHP_PEAR_CHANNEL must point to a (local) channel file"
- fi
+ if [[ -f $PHP_PEAR_CHANNEL ]]; then
+ pear channel-add $PHP_PEAR_CHANNEL || einfo "Ignore any errors about existing channels"
fi
}