Merge branch 'master' of https://git.oopen.de/install/php
This commit is contained in:
commit
bd0808bbff
@ -317,6 +317,16 @@ PHP_MAJOR_VERSION=`echo $VERSION | cut -d '.' -f1`
|
|||||||
PHP_MINOR_VERSION=`echo $VERSION | cut -d '.' -f2`
|
PHP_MINOR_VERSION=`echo $VERSION | cut -d '.' -f2`
|
||||||
PHP_PATCH_LEVEL=`echo $VERSION | cut -d '.' -f3`
|
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
|
# - A hack, because configure don't work with systemd on version 5.4.x
|
||||||
## -
|
## -
|
||||||
if [[ "$PHP_MAIN_VERSION" = "5.4" ]]; then
|
if [[ "$PHP_MAIN_VERSION" = "5.4" ]]; then
|
||||||
@ -2040,48 +2050,41 @@ echononl "\tGoing to configure.."
|
|||||||
## CPP="/usr/bin/cpp-3.4" \
|
## CPP="/usr/bin/cpp-3.4" \
|
||||||
## CFLAGS="$_cflags" LDFLAGS="-s" \
|
## CFLAGS="$_cflags" LDFLAGS="-s" \
|
||||||
config_params="
|
config_params="
|
||||||
--prefix=$PREFIX_PHP \
|
--prefix=$PREFIX_PHP
|
||||||
--with-gd \
|
--with-pgsql
|
||||||
--with-pgsql \
|
--with-pdo-pgsql
|
||||||
--with-pdo-pgsql \
|
--with-pdo-mysql=mysqlnd
|
||||||
--with-pdo-mysql=mysqlnd \
|
--with-mysqli=mysqlnd
|
||||||
--with-mysqli=mysqlnd \
|
--enable-exif
|
||||||
--with-pcre-regex \
|
--with-zlib
|
||||||
--enable-wddx \
|
--with-openssl
|
||||||
--enable-exif \
|
--with-gdbm
|
||||||
--with-zlib \
|
--with-curl
|
||||||
--with-openssl \
|
--enable-dba
|
||||||
--with-gdbm \
|
--enable-ftp
|
||||||
--with-jpeg-dir \
|
--with-gmp
|
||||||
--with-png-dir \
|
--with-readline
|
||||||
--with-curl \
|
--enable-sockets
|
||||||
--enable-dba \
|
--with-imap
|
||||||
--with-xpm-dir \
|
--with-imap-ssl
|
||||||
--enable-ftp \
|
--with-kerberos
|
||||||
--with-gmp \
|
--with-gettext
|
||||||
--with-readline \
|
--with-pspell
|
||||||
--enable-sockets \
|
--enable-soap
|
||||||
--with-imap \
|
--enable-mbstring
|
||||||
--with-imap-ssl \
|
--enable-calendar
|
||||||
--with-kerberos \
|
--enable-bcmath
|
||||||
--with-gettext \
|
--enable-opcache
|
||||||
--with-pspell \
|
--with-bz2
|
||||||
--enable-soap \
|
--enable-intl
|
||||||
--enable-mbstring \
|
--enable-shmop
|
||||||
--enable-zip \
|
--enable-sysvmsg
|
||||||
--enable-calendar \
|
--enable-sysvsem
|
||||||
--enable-bcmath \
|
--enable-sysvshm
|
||||||
--enable-opcache \
|
--enable-pcntl
|
||||||
--with-bz2 \
|
--with-ldap=shared
|
||||||
--enable-intl \
|
--with-xsl
|
||||||
--enable-shmop \
|
--with-mhash
|
||||||
--enable-sysvmsg \
|
|
||||||
--enable-sysvsem \
|
|
||||||
--enable-sysvshm \
|
|
||||||
--enable-pcntl \
|
|
||||||
--with-ldap=shared \
|
|
||||||
--with-xsl \
|
|
||||||
--with-mhash \
|
|
||||||
--enable-cgi"
|
--enable-cgi"
|
||||||
|
|
||||||
# --with-t1lib \
|
# --with-t1lib \
|
||||||
@ -2094,29 +2097,55 @@ config_params="
|
|||||||
#
|
#
|
||||||
if ([[ "$PHP_MAJOR_VERSION" -eq 7 ]] && [[ "$PHP_MINOR_VERSION" -gt 3 ]]) \
|
if ([[ "$PHP_MAJOR_VERSION" -eq 7 ]] && [[ "$PHP_MINOR_VERSION" -gt 3 ]]) \
|
||||||
|| [[ "$PHP_MAJOR_VERSION" -gt 7 ]] ; then
|
|| [[ "$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
|
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
|
if [[ "$os_dist" = "debian" ]] && [[ $os_version -lt 10 ]] ; then
|
||||||
config_params="$config_params \
|
config_params="$config_params
|
||||||
--with-freetype-dir"
|
--with-freetype-dir"
|
||||||
else
|
else
|
||||||
config_params="$config_params \
|
config_params="$config_params
|
||||||
--with-freetype-dir=/usr/local/freetype"
|
--with-freetype-dir=/usr/local/freetype"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
fi
|
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
|
&& [[ "$os_dist" = "debian" ]] && [[ $os_version -ge 10 ]]; then
|
||||||
config_params="$config_params \
|
config_params="$config_params
|
||||||
--with-icu-dir=/usr/local/icu4c \
|
--with-icu-dir=/usr/local/icu4c
|
||||||
--with-libxml-dir=/usr/local/libxml2"
|
--with-libxml-dir=/usr/local/libxml2"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# --with-fpm-systemd \
|
# --with-fpm-systemd \
|
||||||
if $SYSTEMD_EXISTS ; then
|
if $SYSTEMD_EXISTS ; then
|
||||||
config_params="$config_params \
|
config_params="$config_params
|
||||||
--with-fpm-systemd"
|
--with-fpm-systemd"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -2126,23 +2155,27 @@ fi
|
|||||||
## - '--with-vpx-dir') has been removed in favor of libwebp.
|
## - '--with-vpx-dir') has been removed in favor of libwebp.
|
||||||
## -
|
## -
|
||||||
if [[ $PHP_MAJOR_VERSION -lt 7 ]] ; then
|
if [[ $PHP_MAJOR_VERSION -lt 7 ]] ; then
|
||||||
config_params="$config_params \
|
config_params="$config_params
|
||||||
--with-vpx-dir"
|
--with-vpx-dir"
|
||||||
else
|
else
|
||||||
|
if [[ "$PHP_MAJOR_VERSION" -eq 7 ]] ; then
|
||||||
|
if [[ "$PHP_MINOR_VERSION" -le 3 ]] ; then
|
||||||
config_params="$config_params \
|
config_params="$config_params \
|
||||||
--with-webp-dir"
|
--with-webp-dir"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
## - since version 7.2: MCrypt is moved to PECL
|
## - since version 7.2: MCrypt is moved to PECL
|
||||||
## -
|
## -
|
||||||
if ([[ "$PHP_MAJOR_VERSION" -eq 7 ]] && [[ "$PHP_MINOR_VERSION" -lt 2 ]]) \
|
if ([[ "$PHP_MAJOR_VERSION" -eq 7 ]] && [[ "$PHP_MINOR_VERSION" -lt 2 ]]) \
|
||||||
|| [[ "$PHP_MAJOR_VERSION" -lt 7 ]] ; then
|
|| [[ "$PHP_MAJOR_VERSION" -lt 7 ]] ; then
|
||||||
config_params="$config_params \
|
config_params="$config_params
|
||||||
--with-mcrypt"
|
--with-mcrypt"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $PHP_MAJOR_VERSION -lt 7 ]] ; then
|
if [[ $PHP_MAJOR_VERSION -lt 7 ]] ; then
|
||||||
config_params="$config_params \
|
config_params="$config_params
|
||||||
--with-mysql=mysqlnd"
|
--with-mysql=mysqlnd"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -2159,10 +2192,10 @@ if [[ -x "$_mysql_config" ]]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [[ -n "$_mysql_socket" ]]; then
|
if [[ -n "$_mysql_socket" ]]; then
|
||||||
config_params="$config_params \
|
config_params="$config_params
|
||||||
--with-mysql-sock=$_mysql_socket"
|
--with-mysql-sock=$_mysql_socket"
|
||||||
else
|
else
|
||||||
config_params="$config_params \
|
config_params="$config_params
|
||||||
--with-mysql-sock"
|
--with-mysql-sock"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -2176,12 +2209,10 @@ if $WITH_PHP_FPM_SUPPORT ; then
|
|||||||
config_params="$config_params --enable-fpm"
|
config_params="$config_params --enable-fpm"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "LDFLAGS=\"-s\" \
|
echo "LDFLAGS=\"-s\" ./configure $config_params" > ${_logdir}/php-configure.log
|
||||||
./configure $config_params" > ${_logdir}/php-configure.log
|
|
||||||
echo "" >> ${_logdir}/php-configure.log
|
echo "" >> ${_logdir}/php-configure.log
|
||||||
|
|
||||||
LDFLAGS="-s" \
|
LDFLAGS="-s" ./configure $config_params >> ${_logdir}/php-configure.log 2>&1
|
||||||
./configure $config_params >> ${_logdir}/php-configure.log 2>&1
|
|
||||||
if [ "$?" = "0" ]; then
|
if [ "$?" = "0" ]; then
|
||||||
echo_ok
|
echo_ok
|
||||||
else
|
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
|
||||||
## -----
|
## -----
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user