diff options
author | Ole Markus With <olemarkus@gentoo.org> | 2011-01-10 11:25:21 +0000 |
---|---|---|
committer | Ole Markus With <olemarkus@gentoo.org> | 2011-01-10 11:25:21 +0000 |
commit | 90e9cc18ba9b39109b64532dbf377e9e806296d9 (patch) | |
tree | 61a8d1a4e55d19d6d9e93f43a904acb9670cdfb5 /eclass | |
parent | Version bump. Fixes bug #343085. Maintainer bump. Thanks to Opportunist and N... (diff) | |
download | gentoo-2-90e9cc18ba9b39109b64532dbf377e9e806296d9.tar.gz gentoo-2-90e9cc18ba9b39109b64532dbf377e9e806296d9.tar.bz2 gentoo-2-90e9cc18ba9b39109b64532dbf377e9e806296d9.zip |
Added a PHP_EXT_S to aid packages with bundled extensions
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/php-ext-source-r2.eclass | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/eclass/php-ext-source-r2.eclass b/eclass/php-ext-source-r2.eclass index 84f053765dc1..38fa9cd54708 100644 --- a/eclass/php-ext-source-r2.eclass +++ b/eclass/php-ext-source-r2.eclass @@ -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.7 2011/01/09 00:05:10 robbat2 Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/php-ext-source-r2.eclass,v 1.8 2011/01/10 11:25:21 olemarkus Exp $ # # Author: Tal Peer <coredumb@gentoo.org> # Author: Stuart Herbert <stuart@gentoo.org> @@ -68,6 +68,13 @@ esac # Most commonly set as PHP_EXT_OPTIONAL_USE=php to get the dependencies behind # USE=php. +# @ECLASS-VARIABLE: PHP_EXT_S +# @DESCRIPTION: +# The relative location of the temporary build directory for the PHP extension within +# the source package. This is useful for packages that bundle the PHP extension. +# Defaults to ${S} +[[ -z "${PHP_EXT_S}" ]] && PHP_EXT_S="${S}" + #Make sure at least one target is installed. Abuses USE dependencies. for target in ${USE_PHP}; do IUSE="${IUSE} php_targets_${target}" @@ -97,14 +104,14 @@ RDEPEND="${RDEPEND} # Set PHP_EXT_SKIP_PHPIZE="yes" in your ebuild if you do not want to run phpize. php-ext-source-r2_src_unpack() { unpack ${A} - local slot orig_s="$S" + local slot orig_s="${PHP_EXT_S}" for slot in $(php_get_slots); do cp -r "${orig_s}" "${WORKDIR}/${slot}" done } php-ext-source-r2_src_prepare() { - local slot orig_s="$S" + local slot orig_s="${PHP_EXT_S}" for slot in $(php_get_slots); do php_init_slot_env ${slot} php-ext-source-r2_phpize @@ -141,6 +148,7 @@ php-ext-source-r2_src_configure() { # Set the correct config options # We cannot use econf here, phpize/php-config deals with setting # --prefix etc to whatever the php slot was configured to use + echo ./configure --with-php-config=${PHPCONFIG} ${my_conf} ./configure --with-php-config=${PHPCONFIG} ${my_conf} || die "Unable to configure code to compile" done } @@ -207,8 +215,8 @@ php_init_slot_env() { EXT_DIR="$(${PHPCONFIG} --extension-dir 2>/dev/null)" PHP_CURRENTSLOT=${1:3} - S="${WORKDIR}/${1}" - cd "${S}" + PHP_EXT_S="${WORKDIR}/${1}" + cd "${PHP_EXT_S}" } php-ext-source-r2_buildinilist() { |