This commit is contained in:
Christoph 2020-02-18 00:48:22 +01:00
commit bd0808bbff

View File

@ -317,6 +317,16 @@ PHP_MAJOR_VERSION=`echo $VERSION | cut -d '.' -f1`
PHP_MINOR_VERSION=`echo $VERSION | cut -d '.' -f2`
PHP_PATCH_LEVEL=`echo $VERSION | cut -d '.' -f3`
# Since version 7.4 package 'libsqlite3-dev' is needed
# Since version 7.4 package 'libonig-dev' is needed
#
if ([[ "$PHP_MAJOR_VERSION" -eq 7 ]] && [[ "$PHP_MINOR_VERSION" -gt 3 ]]) \
|| [[ "$PHP_MAJOR_VERSION" -gt 7 ]] ; then
needed_debian_packages="$needed_debian_packages
libsqlite3-dev
libonig-dev"
fi
# - A hack, because configure don't work with systemd on version 5.4.x
## -
if [[ "$PHP_MAIN_VERSION" = "5.4" ]]; then
@ -2040,48 +2050,41 @@ echononl "\tGoing to configure.."
## CPP="/usr/bin/cpp-3.4" \
## CFLAGS="$_cflags" LDFLAGS="-s" \
config_params="
--prefix=$PREFIX_PHP \
--with-gd \
--with-pgsql \
--with-pdo-pgsql \
--with-pdo-mysql=mysqlnd \
--with-mysqli=mysqlnd \
--with-pcre-regex \
--enable-wddx \
--enable-exif \
--with-zlib \
--with-openssl \
--with-gdbm \
--with-jpeg-dir \
--with-png-dir \
--with-curl \
--enable-dba \
--with-xpm-dir \
--enable-ftp \
--with-gmp \
--with-readline \
--enable-sockets \
--with-imap \
--with-imap-ssl \
--with-kerberos \
--with-gettext \
--with-pspell \
--enable-soap \
--enable-mbstring \
--enable-zip \
--enable-calendar \
--enable-bcmath \
--enable-opcache \
--with-bz2 \
--enable-intl \
--enable-shmop \
--enable-sysvmsg \
--enable-sysvsem \
--enable-sysvshm \
--enable-pcntl \
--with-ldap=shared \
--with-xsl \
--with-mhash \
--prefix=$PREFIX_PHP
--with-pgsql
--with-pdo-pgsql
--with-pdo-mysql=mysqlnd
--with-mysqli=mysqlnd
--enable-exif
--with-zlib
--with-openssl
--with-gdbm
--with-curl
--enable-dba
--enable-ftp
--with-gmp
--with-readline
--enable-sockets
--with-imap
--with-imap-ssl
--with-kerberos
--with-gettext
--with-pspell
--enable-soap
--enable-mbstring
--enable-calendar
--enable-bcmath
--enable-opcache
--with-bz2
--enable-intl
--enable-shmop
--enable-sysvmsg
--enable-sysvsem
--enable-sysvshm
--enable-pcntl
--with-ldap=shared
--with-xsl
--with-mhash
--enable-cgi"
# --with-t1lib \
@ -2094,29 +2097,55 @@ config_params="
#
if ([[ "$PHP_MAJOR_VERSION" -eq 7 ]] && [[ "$PHP_MINOR_VERSION" -gt 3 ]]) \
|| [[ "$PHP_MAJOR_VERSION" -gt 7 ]] ; then
config_params="$config_params \
--enable-freetype"
# --with-png-dir has been removed. libpng is required.
# --with-zlib-dir has been removed. zlib is required.
# --with-jpeg-dir becomes --with-jpeg
# --with-freetype-dir becomes --with-freetype
#
# The WDDX extension has been deprecated and moved to PECL.
config_params="$config_params
--with-freetype
--enable-gd
--with-jpeg
--with-xpm
--with-webp
--with-zip
--with-zlib
--with-pear
"
else
config_params="$config_params
--with-gd
--with-png-dir
--with-pcre-regex
--with-jpeg-dir
--with-xpm-dir
--enable-zip
--enable-wddx
"
if [[ "$os_dist" = "debian" ]] && [[ $os_version -lt 10 ]] ; then
config_params="$config_params \
config_params="$config_params
--with-freetype-dir"
else
config_params="$config_params \
config_params="$config_params
--with-freetype-dir=/usr/local/freetype"
fi
fi
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-icu-dir=/usr/local/icu4c \
config_params="$config_params
--with-icu-dir=/usr/local/icu4c
--with-libxml-dir=/usr/local/libxml2"
fi
# --with-fpm-systemd \
if $SYSTEMD_EXISTS ; then
config_params="$config_params \
config_params="$config_params
--with-fpm-systemd"
fi
@ -2126,23 +2155,27 @@ fi
## - '--with-vpx-dir') has been removed in favor of libwebp.
## -
if [[ $PHP_MAJOR_VERSION -lt 7 ]] ; then
config_params="$config_params \
config_params="$config_params
--with-vpx-dir"
else
config_params="$config_params \
if [[ "$PHP_MAJOR_VERSION" -eq 7 ]] ; then
if [[ "$PHP_MINOR_VERSION" -le 3 ]] ; then
config_params="$config_params \
--with-webp-dir"
fi
fi
fi
## - since version 7.2: MCrypt is moved to PECL
## -
if ([[ "$PHP_MAJOR_VERSION" -eq 7 ]] && [[ "$PHP_MINOR_VERSION" -lt 2 ]]) \
|| [[ "$PHP_MAJOR_VERSION" -lt 7 ]] ; then
config_params="$config_params \
config_params="$config_params
--with-mcrypt"
fi
if [[ $PHP_MAJOR_VERSION -lt 7 ]] ; then
config_params="$config_params \
config_params="$config_params
--with-mysql=mysqlnd"
fi
@ -2159,10 +2192,10 @@ if [[ -x "$_mysql_config" ]]; then
fi
fi
if [[ -n "$_mysql_socket" ]]; then
config_params="$config_params \
config_params="$config_params
--with-mysql-sock=$_mysql_socket"
else
config_params="$config_params \
config_params="$config_params
--with-mysql-sock"
fi
@ -2176,12 +2209,10 @@ if $WITH_PHP_FPM_SUPPORT ; then
config_params="$config_params --enable-fpm"
fi
echo "LDFLAGS=\"-s\" \
./configure $config_params" > ${_logdir}/php-configure.log
echo "LDFLAGS=\"-s\" ./configure $config_params" > ${_logdir}/php-configure.log
echo "" >> ${_logdir}/php-configure.log
LDFLAGS="-s" \
./configure $config_params >> ${_logdir}/php-configure.log 2>&1
LDFLAGS="-s" ./configure $config_params >> ${_logdir}/php-configure.log 2>&1
if [ "$?" = "0" ]; then
echo_ok
else
@ -3531,7 +3562,166 @@ fi
## -----
## - END: Install mcrypt
## - Install wddx
## -----
## - since php version 7.4: wddx was moved to PECL
## -
if ([[ "$PHP_MAJOR_VERSION" -eq 7 ]] && [[ "$PHP_MINOR_VERSION" -ge 4 ]]) \
|| [[ "$PHP_MAJOR_VERSION" -gt 7 ]] ; then
echononl "\tInstall wddx via pecl.."
_success=true
printf "\n" | ${PREFIX_PHP}/bin/pecl install wddx > /dev/null 2>&1
if [[ "$?" = "0" ]]; then
echo_ok
echononl "\tphp.ini: extension=wddx.so .."
_extension="wddx.so"
perl -i -n -p -e "s#^(\s*\[PHP\]\s*)#\1\nextension=${_extension}\n#" $PHP_INI_FILE
if [ "$?" = "0" ]; then
echo_ok
else
echo_failed
fi
else
echo_failed
echo -e "\tTry to install wddx from source.."
cd /tmp
rm -rf /tmp/pecl-text-wddx
_failed=false
echononl "\tInstalling git .."
if ! dpkg -l git 2> /dev/null | grep -e "^ii" | grep git > /dev/null 2>&1 ; then
apt-get -q -y install git > /dev/null 2>&1
if [ "$?" = 0 ]; then
echo_ok
else
echo_failed
_failed=true
fi
else
echo_skipped
fi
if ! $_failed ; then
echononl "\tClone from github repository.."
git clone https://github.com/php/pecl-text-wddx.git > /dev/null 2>&1
if [ "$?" = 0 ]; then
echo_ok
cd pecl-text-wddx
else
echo_failed
echononl "continue anyway [yes/no]: "
read OK
OK="$(echo "$OK" | tr '[:upper:]' '[:lower:]')"
while [[ "$OK" != "yes" ]] && [[ "$OK" != "no" ]] ; do
echononl "Wrong entry! - repeat [yes/nno]: "
read OK
done
[[ $OK = "yes" ]] || fatal "Abbruch durch User"
failed=true
fi
fi
if ! $_failed ; then
echononl "\ttrigger 'phpize' inside dir '/tmp/pecl-text-wddx' .."
/usr/local/php-${VERSION}/bin/phpize > /dev/null 2>&1
if [ "$?" = 0 ]; then
echo_ok
else
echo_failed
echononl "continue anyway [yes/no]: "
read OK
OK="$(echo "$OK" | tr '[:upper:]' '[:lower:]')"
while [[ "$OK" != "yes" ]] && [[ "$OK" != "no" ]] ; do
echononl "Wrong entry! - repeat [yes/nno]: "
read OK
done
[[ $OK = "yes" ]] || fatal "Abbruch durch User"
failed=true
fi
fi
if ! $_failed ; then
echononl "\tConfigure wddx extension.."
./configure > /dev/null 2>&1
if [ "$?" = 0 ]; then
echo_ok
else
echo_failed
echononl "continue anyway [yes/no]: "
read OK
OK="$(echo "$OK" | tr '[:upper:]' '[:lower:]')"
while [[ "$OK" != "yes" ]] && [[ "$OK" != "no" ]] ; do
echononl "Wrong entry! - repeat [yes/nno]: "
read OK
done
[[ $OK = "yes" ]] || fatal "Abbruch durch User"
failed=true
fi
fi
if ! $_failed ; then
echononl "\tCompile wddx extension.."
make > /dev/null 2>&1
if [ "$?" = 0 ]; then
echo_ok
else
echo_failed
echononl "continue anyway [yes/no]: "
read OK
OK="$(echo "$OK" | tr '[:upper:]' '[:lower:]')"
while [[ "$OK" != "yes" ]] && [[ "$OK" != "no" ]] ; do
echononl "Wrong entry! - repeat [yes/nno]: "
read OK
done
[[ $OK = "yes" ]] || fatal "Abbruch durch User"
failed=true
fi
fi
if ! $_failed ; then
echononl "\tInstall wddx extension.."
make install > /dev/null 2>&1
if [ "$?" = 0 ]; then
echo_ok
else
echo_failed
echononl "continue anyway [yes/no]: "
read OK
OK="$(echo "$OK" | tr '[:upper:]' '[:lower:]')"
while [[ "$OK" != "yes" ]] && [[ "$OK" != "no" ]] ; do
echononl "Wrong entry! - repeat [yes/nno]: "
read OK
done
[[ $OK = "yes" ]] || fatal "Abbruch durch User"
failed=true
fi
fi
rm -rf /tmp/php-wddx
if ! $_failed ; then
echononl "\tphp.ini: extension=memcsched .."
_extension="wddx.so"
perl -i -n -p -e "s#^(\s*\[PHP\]\s*)#\1\nextension=${_extension}\n#" $PHP_INI_FILE
if [ "$?" = "0" ]; then
echo_ok
else
echo_failed
fi
fi
fi
fi
## -----
## - END: Install wddx
## -----