* [gentoo-commits] proj/php:master commit in: eselect-php/
@ 2011-02-28 12:22 99% Ole Markus With
0 siblings, 0 replies; 1+ results
From: Ole Markus With @ 2011-02-28 12:22 UTC (permalink / raw
To: gentoo-commits
commit: 2d1409ebcf3819cbfbeb189ba2da350777477dd4
Author: Ole Markus With <o.with <AT> sportradar <DOT> com>
AuthorDate: Mon Feb 28 12:22:20 2011 +0000
Commit: Ole Markus With <olemarkus <AT> olemarkus <DOT> org>
CommitDate: Mon Feb 28 12:22:20 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/php.git;a=commit;h=2d1409eb
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() {
}
find_targets() {
- for dir in $(get_libdir)/php*.*; do
+ for dir in "${EPREFIX}"$(get_libdir)/php*.*; do
t=$(basename $dir)
has $t $dirs || dirs="${dirs} $t"
done
@@ -30,42 +30,42 @@ find_targets() {
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 $target
done
}
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
}
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
}
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
}
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"
}
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)/\(php[0-9]\.[0-9]\)/bin/php-cgi:\1:p"
}
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)/\(php[0-9]\.[0-9]\)/bin/php-fpm:\1:p"
}
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"
}
resolv_target() {
@@ -130,9 +130,9 @@ list_fpm() {
set_apache2() {
local t=$(resolv_target apache2 $1)
[[ -z $t ]] && die -q "Bad target"
- ln -sf $(get_libdir)/$t/apache2/libphp5.so $(get_libdir)/apache2/modules/ || \
+ ln -sf "${EPREFIX}"$(get_libdir)/$t/apache2/libphp5.so $(get_libdir)/apache2/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"
}
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=$(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"
}
set_fpm() {
local t=$(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
^ permalink raw reply related [relevance 99%]
Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2011-02-28 12:22 99% [gentoo-commits] proj/php:master commit in: eselect-php/ Ole Markus With
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox