From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Pu27X-0000OF-Kt for garchives@archives.gentoo.org; Mon, 28 Feb 2011 12:22:35 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C1D1C1C013; Mon, 28 Feb 2011 12:22:27 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 7E4811C013 for ; Mon, 28 Feb 2011 12:22:27 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id AB8C61B4172 for ; Mon, 28 Feb 2011 12:22:26 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 1889D8006A for ; Mon, 28 Feb 2011 12:22:26 +0000 (UTC) From: "Ole Markus With" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Ole Markus With" Message-ID: <2d1409ebcf3819cbfbeb189ba2da350777477dd4.ole_markus_with@gentoo> Subject: [gentoo-commits] proj/php:master commit in: eselect-php/ X-VCS-Repository: proj/php X-VCS-Files: eselect-php/php.eselect X-VCS-Directories: eselect-php/ X-VCS-Committer: ole_markus_with X-VCS-Committer-Name: Ole Markus With X-VCS-Revision: 2d1409ebcf3819cbfbeb189ba2da350777477dd4 Date: Mon, 28 Feb 2011 12:22:26 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 72394207817eeae53879326880537666 commit: 2d1409ebcf3819cbfbeb189ba2da350777477dd4 Author: Ole Markus With sportradar com> AuthorDate: Mon Feb 28 12:22:20 2011 +0000 Commit: Ole Markus With olemarkus org> CommitDate: Mon Feb 28 12:22:20 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/php.git;a=3Dc= ommit;h=3D2d1409eb Added prefix support --- eselect-php/php.eselect | 30 +++++++++++++++--------------- 1 files changed, 15 insertions(+), 15 deletions(-) diff --git a/eselect-php/php.eselect b/eselect-php/php.eselect index c410954..27808d6 100644 --- a/eselect-php/php.eselect +++ b/eselect-php/php.eselect @@ -21,7 +21,7 @@ get_libdir() { } =20 find_targets() { - for dir in $(get_libdir)/php*.*; do + for dir in "${EPREFIX}"$(get_libdir)/php*.*; do t=3D$(basename $dir) has $t $dirs || dirs=3D"${dirs} $t" done @@ -30,42 +30,42 @@ find_targets() { =20 find_targets_apache2() { for target in $(find_targets); do - [[ -f $(get_libdir)/$target/apache2/libphp5.so ]] && echo $target + [[ -f ${EPREFIX}$(get_libdir)/$target/apache2/libphp5.so ]] && echo $t= arget done } =20 find_targets_cli() { for target in $(find_targets); do - [[ -f $(get_libdir)/$target/bin/php ]] && echo $target + [[ -f ${EPREFIX}$(get_libdir)/$target/bin/php ]] && echo $target done } =20 find_targets_fpm() { for target in $(find_targets); do - [[ -f $(get_libdir)/$target/bin/php-fpm ]] && echo $target + [[ -f ${EPREFIX}$(get_libdir)/$target/bin/php-fpm ]] && echo $target done } =20 find_targets_cgi() { for target in $(find_targets); do - [[ -f $(get_libdir)/$target/bin/php-cgi ]] && echo $target + [[ -f ${EPREFIX}$(get_libdir)/$target/bin/php-cgi ]] && echo $target done } =20 get_active_cli() { - readlink -e /usr/bin/php | sed -ne "s:$(get_libdir)/\(php[0-9]\.[0-9][0= -9]*\)/bin/php:\1:p" + readlink -e "${EPREFIX}"/usr/bin/php | sed -ne "s:$(get_libdir)/\(php[0= -9]\.[0-9][0-9]*\)/bin/php:\1:p" } =20 get_active_cgi() { - readlink -e /usr/bin/php-cgi | sed -ne "s:$(get_libdir)/\(php[0-9]\.[0-= 9]\)/bin/php-cgi:\1:p" + readlink -e "${EPREFIX}"/usr/bin/php-cgi | sed -ne "s:$(get_libdir)/\(p= hp[0-9]\.[0-9]\)/bin/php-cgi:\1:p" } =20 get_active_fpm() { - readlink -e /usr/bin/php-fpm | sed -ne "s:$(get_libdir)/\(php[0-9]\.[0-= 9]\)/bin/php-fpm:\1:p" + readlink -e "${EPREFIX}"/usr/bin/php-fpm | sed -ne "s:$(get_libdir)/\(p= hp[0-9]\.[0-9]\)/bin/php-fpm:\1:p" } =20 get_active_apache2() { - readlink -e $(get_libdir)/apache2/modules/libphp5.so | sed -ne "s:$(get= _libdir)/\(php[0-9]\.[0-9]\)/apache2/libphp5.so:\1:p" + readlink -e "${EPREFIX}"$(get_libdir)/apache2/modules/libphp5.so | sed = -ne "s:$(get_libdir)/\(php[0-9]\.[0-9]\)/apache2/libphp5.so:\1:p" } =20 resolv_target() { @@ -130,9 +130,9 @@ list_fpm() { set_apache2() { local t=3D$(resolv_target apache2 $1) [[ -z $t ]] && die -q "Bad target" - ln -sf $(get_libdir)/$t/apache2/libphp5.so $(get_libdir)/apache2/module= s/ || \ + ln -sf "${EPREFIX}"$(get_libdir)/$t/apache2/libphp5.so $(get_libdir)/ap= ache2/modules/ || \ die -q "Failed to set symlink for libphp5.so" - echo "You have to run \`/etc/init.d/apache2 restart' for the changes to= take effect" + echo "You have to run \`${EPREFIX}/etc/init.d/apache2 restart' for the = changes to take effect" } =20 set_cli() { @@ -140,7 +140,7 @@ set_cli() { [[ -z $t ]] && die -q "Bad target" local file for file in php phpize php-config; do - ln -sf $(get_libdir)/$t/bin/$file /usr/bin/$file || \ + ln -sf "${EPREFIX}"$(get_libdir)/$t/bin/$file /usr/bin/$file || \ die -q "Failed to create symlink for ${file}" done } @@ -149,16 +149,16 @@ set_cgi() { t=3D$(resolv_target cgi $1) [[ -z $t ]] && die -q "Bad target" local file - ln -sf $(get_libdir)/$t/bin/php-cgi /usr/bin/php-cgi || \ + ln -sf "${EPREFIX}"$(get_libdir)/$t/bin/php-cgi /usr/bin/php-cgi || \ die -q "Failed to create symlink for php-cgi" } =20 set_fpm() { local t=3D$(resolv_target fpm $1) [[ -z $t ]] && die -q "Bad target" - ln -sf $(get_libdir)/$t/bin/php-fpm /usr/bin/php-fpm || \ + ln -sf "${EPREFIX}"$(get_libdir)/$t/bin/php-fpm /usr/bin/php-fpm || \ die -q "Failed to create symlink for the php-fpm binary" - echo "You have to run \`/etc/init.d/php-fpm restart' for the changes to= take effect" + echo "You have to run \`${EPREFIX}/etc/init.d/php-fpm restart' for the = changes to take effect" } ## set action =20