mod_php_install.sh: finish support fo debian 12 (bookworm).

This commit is contained in:
2023-10-26 21:26:39 +02:00
parent 3959e37839
commit 7b17ac342a
2 changed files with 107 additions and 35 deletions

View File

@@ -1888,8 +1888,8 @@ if ([[ "$PHP_MAJOR_VERSION" -eq 7 ]] && [[ "$PHP_MINOR_VERSION" -lt 4 ]]) \
_install_freetype=true
if [[ "$PHP_MAJOR_VERSION" -lt 7 ]] \
|| ([[ "$PHP_MAJOR_VERSION" -eq 7 ]] && [[ "$PHP_MINOR_VERSION" -eq 0 ]]) ; then
if [[ $PHP_MAJOR_VERSION -lt 7 ]] \
|| ([[ $PHP_MAJOR_VERSION -eq 7 ]] && [[ $PHP_MINOR_VERSION -eq 0 ]]) ; then
echo ""
@@ -1955,40 +1955,44 @@ if ([[ "$PHP_MAJOR_VERSION" -eq 7 ]] && [[ "$PHP_MINOR_VERSION" -lt 4 ]]) \
fi
if [[ "$PHP_MAJOR_VERSION" -lt 7 ]] \
|| ([[ "$PHP_MAJOR_VERSION" -eq 7 ]] && [[ "$PHP_MINOR_VERSION" -lt 2 ]]) ; then
|| ([[ "$PHP_MAJOR_VERSION" -eq 7 ]] && [[ "$PHP_MINOR_VERSION" -lt 4 ]]) ; then
echo ""
echo ""
echo -e "\033[32m--\033[m"
echo ""
echo -e "We need to install a version of libicu (icu4c), which supports"
echo -e "service 'icu-config'. The development library libicu-dev"
echo -e "of this distribution doesn't."
echo -e ""
echo -e "Which version of icu4c should be installed?"
echo ""
ICU4C_VERSION=
if [[ -n "$_ICU4C_VERSION" ]]; then
echononl "ICU4C Version [${_ICU4C_VERSION}]: "
read ICU4C_VERSION
if [[ "X$ICU4C_VERSION" = "X" ]] ; then
ICU4C_VERSION="$_ICU4C_VERSION"
fi
else
echononl "ICU4C Version: "
read ICU4C_VERSION
while [[ "X$ICU4C_VERSION" = "X" ]]; do
echo -e "\n \033[33m\033[1ICU4C Version must not be empty!\033[m\n"
echononl "ICU4C Version : "
if [[ "$PHP_MINOR_VERSION" -eq 0 ]] || ([[ "$os_dist" = "debian" ]] && [[ $os_version -gt 11 ]]); then
echo ""
echo ""
echo -e "\033[32m--\033[m"
echo ""
echo -e "We need to install a version of libicu (icu4c), which supports"
echo -e "service 'icu-config'. The development library libicu-dev"
echo -e "of this distribution doesn't."
echo -e ""
echo -e "Which version of icu4c should be installed?"
echo ""
ICU4C_VERSION=
if [[ -n "$_ICU4C_VERSION" ]]; then
echononl "ICU4C Version [${_ICU4C_VERSION}]: "
read ICU4C_VERSION
done
if [[ "X$ICU4C_VERSION" = "X" ]] ; then
ICU4C_VERSION="$_ICU4C_VERSION"
fi
else
echononl "ICU4C Version: "
read ICU4C_VERSION
while [[ "X$ICU4C_VERSION" = "X" ]]; do
echo -e "\n \033[33m\033[1ICU4C Version must not be empty!\033[m\n"
echononl "ICU4C Version : "
read ICU4C_VERSION
done
fi
ICU4C_MAJOR_VERSION=`echo $ICU4C_VERSION | cut -d '-' -f1`
ICU4C_MINOR_VERSION=`echo $ICU4C_VERSION | cut -d '-' -f2`
_install_icu4c=true
fi
ICU4C_MAJOR_VERSION=`echo $ICU4C_VERSION | cut -d '-' -f1`
ICU4C_MINOR_VERSION=`echo $ICU4C_VERSION | cut -d '-' -f2`
_install_icu4c=true
if [[ "$os_dist" = "debian" ]] && [[ $os_version -gt 11 ]] ; then
echo ""
@@ -3799,7 +3803,7 @@ else
fi
echononl "\tApply patch to compile against OpenSSL 3.0.."
if [[ "$os_dist" = "debian" ]] && [[ $os_version -gt 11 ]] && [[ $PHP_MAJOR_VERSION = 7 ]]; then
if [[ "$os_dist" = "debian" ]] && [[ $os_version -gt 11 ]] && [[ $PHP_MAJOR_VERSION -eq 7 ]] ; then
if [[ -f ${_srcdir}/PHP-7.4-OpenSSL-3.0-compatibility.patch ]] ; then
patch -d $_builddir/ext -p 0 < ${_srcdir}/PHP-7.4-OpenSSL-3.0-compatibility.patch > $tmp_err_msg 2>&1
if [[ $? -eq 0 ]]; then
@@ -3812,6 +3816,20 @@ if [[ "$os_dist" = "debian" ]] && [[ $os_version -gt 11 ]] && [[ $PHP_MAJOR_VER
echo_failed
fatal "Can't find patchfile '${_srcdir}/PHP-7.4-OpenSSL-3.0-compatibility.patch'"
fi
elif [[ "$os_dist" = "debian" ]] && [[ $os_version -gt 11 ]] && ([[ $PHP_MAJOR_VERSION -eq 8 ]] \
&& [[ $PHP_MINOR_VERSION -eq 0 ]]); then
if [[ -f ${_srcdir}/PHP-8.0-OpenSSL-3.0-compatibility.patch ]] ; then
patch -d $_builddir/ext -p 0 < ${_srcdir}/PHP-8.0-OpenSSL-3.0-compatibility.patch > $tmp_err_msg 2>&1
if [[ $? -eq 0 ]]; then
echo_ok
else
echo_failed
fatal "$(cat $tmp_err_msg)"
fi
else
echo_failed
fatal "Can't find patchfile '${_srcdir}/PHP-8.0-OpenSSL-3.0-compatibility.patch'"
fi
else
echo_skipped
fi
@@ -3940,14 +3958,14 @@ else
fi
if ([[ "$PHP_MAJOR_VERSION" -eq "5" ]] || ([[ "$PHP_MAJOR_VERSION" -eq "7" ]] && [[ "$PHP_MINOR_VERSION" -eq 0 ]])) \
if ([[ $PHP_MAJOR_VERSION -eq 5 ]] || ([[ $PHP_MAJOR_VERSION -eq 7 ]] && [[ $PHP_MINOR_VERSION -eq 0 ]])) \
&& [[ "$os_dist" = "debian" ]] && [[ $os_version -ge 10 ]]; then
config_params="$config_params
--with-libxml-dir=/usr/local/libxml2
--with-icu-dir=/usr/local/icu4c"
fi
if ([[ "$PHP_MAJOR_VERSION" -eq "7" ]] && [[ "$PHP_MINOR_VERSION" -gt 0 ]] && [[ "$PHP_MINOR_VERSION" -lt 2 ]]) \
if ([[ $PHP_MAJOR_VERSION -eq 7 ]] && [[ $PHP_MINOR_VERSION -gt 0 ]] && [[ $PHP_MINOR_VERSION -lt 4 ]]) \
&& [[ "$os_dist" = "debian" ]] && [[ $os_version -ge 11 ]]; then
config_params="$config_params
--with-icu-dir=/usr/local/icu4c"