* [gentoo-commits] proj/php:master commit in: eselect-php/
@ 2011-02-07 12:33 Ole Markus With
0 siblings, 0 replies; 2+ messages in thread
From: Ole Markus With @ 2011-02-07 12:33 UTC (permalink / raw
To: gentoo-commits
commit: 38bb6c8942d72ec52dc1a44ff25174dc41358a65
Author: Ole Markus With <olemarkus <AT> olemarkus <DOT> org>
AuthorDate: Mon Feb 7 12:27:46 2011 +0000
Commit: Ole Markus With <olemarkus <AT> olemarkus <DOT> org>
CommitDate: Mon Feb 7 12:33:37 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/php.git;a=commit;h=38bb6c89
Fixed another libdir issue in php.eselect
---
eselect-php/php.eselect | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/eselect-php/php.eselect b/eselect-php/php.eselect
index 0593a85..c410954 100644
--- a/eselect-php/php.eselect
+++ b/eselect-php/php.eselect
@@ -10,11 +10,12 @@ MODULES="cli apache2 fpm cgi"
get_libdir() {
local dir
for dir in $(list_libdirs); do
- ls /usr/${dir}/php*.* 2>&1 > /dev/null
- if [[ $? -eq 0 ]] ; then
- echo /usr/$dir
- return
- fi
+ [[ -L /usr/${dir} ]] && continue
+ ls /usr/${dir}/php*.* > /dev/null 2>&1
+ if [[ $? -eq 0 ]] ; then
+ echo /usr/$dir
+ return
+ fi
done
echo /usr/lib
}
@@ -77,14 +78,13 @@ resolv_target() {
}
check_module() {
-
has $1 $(echo $MODULES) || die -q "Please chose one of the following modules: ${MODULES}"
}
## Actual actions
list_apache2() {
- local targets
+ local targets
local a
targets=( $(find_targets_apache2) )
a=$(get_active_apache2)
@@ -131,7 +131,7 @@ 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/ || \
- die -q "Failed to set symlink for libphp5.so"
+ 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"
}
@@ -141,7 +141,7 @@ set_cli() {
local file
for file in php phpize php-config; do
ln -sf $(get_libdir)/$t/bin/$file /usr/bin/$file || \
- die -q "Failed to create symlink for ${file}"
+ die -q "Failed to create symlink for ${file}"
done
}
@@ -157,7 +157,7 @@ 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 || \
- die -q "Failed to create symlink for the php-fpm binary"
+ 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"
}
## set action
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] proj/php:master commit in: eselect-php/
@ 2011-02-28 12:22 Ole Markus With
0 siblings, 0 replies; 2+ messages in thread
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 [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-02-28 12:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-07 12:33 [gentoo-commits] proj/php:master commit in: eselect-php/ Ole Markus With
-- strict thread matches above, loose matches on Subject: below --
2011-02-28 12:22 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