diff options
author | 2020-12-07 21:21:45 -0500 | |
---|---|---|
committer | 2020-12-07 21:21:45 -0500 | |
commit | ebb669221f6e8d0c871431a78aa90be2eacde112 (patch) | |
tree | 67c5e7ab5c633ed83a4fa2d7eae8f1ca5235a482 | |
parent | src/php.eselect.in.in: only create links to targets that exist. (diff) | |
download | eselect-php-ebb669221f6e8d0c871431a78aa90be2eacde112.tar.gz eselect-php-ebb669221f6e8d0c871431a78aa90be2eacde112.tar.bz2 eselect-php-ebb669221f6e8d0c871431a78aa90be2eacde112.zip |
Add support for PHP 8
Signed-off-by: Brian Evans <grknight@gentoo.org>
-rw-r--r-- | src/php.eselect.in.in | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/php.eselect.in.in b/src/php.eselect.in.in index d243c64..77f1635 100644 --- a/src/php.eselect.in.in +++ b/src/php.eselect.in.in @@ -165,7 +165,7 @@ parse_target_major_version() { local target="${1}" local major="${target:3:1}" case "${major}" in - 5|7) echo "${major}" ;; + 5|7|8) echo "${major}" ;; *) die "invalid PHP target name: ${target}" ;; esac } @@ -275,7 +275,7 @@ find_sapi_targets() { local pattern_suffix case "${sapi}" in - apache2) pattern_suffix="apache2/libphp[57].so" ;; + apache2) pattern_suffix="apache2/libphp[578].so" ;; cli) pattern_suffix="bin/php" ;; fpm) pattern_suffix="bin/php-fpm" ;; cgi) pattern_suffix="bin/php-cgi" ;; @@ -345,6 +345,9 @@ write_mod_php_conf() { @MKDIR_P@ "${conf_dir}" || die "failed to create ${conf_dir}" local major=$(parse_target_major_version "${target}") + if [[ $major -gt 7 ]] ; then + major='' + fi cat <<-EOF > "${conf_path}" || die "failed to write mod_php.conf" <IfModule !php${major}_module> LoadModule php${major}_module modules/mod_php.so |