--- a/php.eselect 2015-12-03 08:43:32.574669101 -0500 +++ b/php.eselect 2015-12-03 08:43:04.668149372 -0500 @@ -83,8 +83,6 @@ echo ${ret} } -apache2_link="${EROOT}"$(get_active_libdir)/apache2/modules/libphp5$(get_libname) - cleanup() { local target=$(find_targets_$1 | tail -n 1) [[ -z $target ]] && @@ -107,6 +105,7 @@ for target in $(find_targets); do for libdir in $(get_libdirs); do [[ -f ${EROOT}${libdir}/$target/apache2/libphp5$(get_libname) ]] && echo $target + [[ -f ${EROOT}${libdir}/$target/apache2/libphp7$(get_libname) ]] && echo $target done done | sort -u } @@ -151,7 +150,11 @@ } get_active_apache2() { - readlink -e "${EROOT}"$(get_active_libdir)/apache2/modules/libphp5$(get_libname) | sed -ne "s:.*/usr/.*/\(php[0-9]\.[0-9]\)/apache2/libphp5$(get_libname):\1:p" + if [[ -e "${EROOT}"$(get_active_libdir)/apache2/modules/libphp5$(get_libname) ]] ; then + readlink -e "${EROOT}"$(get_active_libdir)/apache2/modules/libphp5$(get_libname) | sed -ne "s:.*/usr/.*/\(php[0-9]\.[0-9]\)/apache2/libphp5$(get_libname):\1:p" + elif [[ -e "${EROOT}"$(get_active_libdir)/apache2/modules/libphp7$(get_libname) ]] + readlink -e "${EROOT}"$(get_active_libdir)/apache2/modules/libphp7$(get_libname) | sed -ne "s:.*/usr/.*/\(php[0-9]\.[0-9]\)/apache2/libphp7$(get_libname):\1:p" + fi } resolv_target() { @@ -217,8 +220,8 @@ local libdir t=$(resolv_target apache2 $1) [[ -z $t ]] && die -q "Bad target" for libdir in $(get_libdirs); do - ln -sf ../../$t/apache2/libphp5$(get_libname) "${EROOT}"${libdir}/apache2/modules/ || \ - die -q "Failed to set symlink for ${EPREFIX}${libdir}/apache2/modules/libphp5$(get_libname)" + ln -sf ../../$t/apache2/libphp{$t:0:1}$(get_libname) "${EROOT}"${libdir}/apache2/modules/ || \ + die -q "Failed to set symlink for ${EPREFIX}${libdir}/apache2/modules/libphp${t:0:1}$(get_libname)" done echo "You have to run \`${EPREFIX}/etc/init.d/apache2 restart' for the changes to take effect" }