--- eselect-php-0.6.2.orig 2011-02-25 17:14:13.000000000 +0100 +++ eselect-php-0.6.2 2011-02-25 17:17:24.000000000 +0100 @@ -10,10 +10,10 @@ get_libdir() { local dir if has lib64 $(list_libdirs); then - echo /usr/lib64 + echo @GENTOO_PORTAGE_EPREFIX@/usr/lib64 return fi - echo /usr/lib + echo @GENTOO_PORTAGE_EPREFIX@/usr/lib } find_targets() { @@ -49,15 +49,15 @@ } 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 @GENTOO_PORTAGE_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 @GENTOO_PORTAGE_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 @GENTOO_PORTAGE_EPREFIX@/usr/bin/php-fpm | sed -ne "s:$(get_libdir)/\(php[0-9]\.[0-9]\)/bin/php-fpm:\1:p" } get_active_apache2() { @@ -137,7 +137,7 @@ [[ -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 $(get_libdir)/$t/bin/$file @GENTOO_PORTAGE_EPREFIX@/usr/bin/$file || \ die -q "Failed to create symlink for ${file}" done } @@ -146,14 +146,14 @@ 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 $(get_libdir)/$t/bin/php-cgi @GENTOO_PORTAGE_EPREFIX@/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 $(get_libdir)/$t/bin/php-fpm @GENTOO_PORTAGE_EPREFIX@/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" }