From f35b2185d3c08774a5fe00a6f42b4ec39b687cb4 Mon Sep 17 00:00:00 2001 From: Christoph Date: Mon, 3 Jul 2017 00:54:50 +0200 Subject: [PATCH] Support compiling php v5.6 against OpenSSL v1.1 by applying a patch. --- mod_php_install.sh | 41 +++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/mod_php_install.sh b/mod_php_install.sh index 6a321ca..1e76fb4 100755 --- a/mod_php_install.sh +++ b/mod_php_install.sh @@ -991,6 +991,24 @@ else fatal "$(cat $tmp_err_msg)" fi +echononl "\tApply patch to compile against OpenSSL 1.1.." +if [[ "$os_dist" = "debian" ]] && [[ $os_version -gt 8 ]] && [[ $MAIN_VERSION -lt 7 ]]; then + if [[ -f ${_srcdir}/php-5.6-libssl-1.1-compatibility-20170309.patch ]] ; then + patch -d $_builddir -p1 < ${_srcdir}/php-5.6-libssl-1.1-compatibility-20170309.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-5.6-libssl-1.1-compatibility-20170309.patch'" + fi +else + echo_skipped +fi + echononl "\tChange ownership of unpacked dirextory \"php-$VERSION\"" chown -R root.root php-$VERSION > $tmp_err_msg 2>&1 if [[ $? -eq 0 ]]; then @@ -1028,17 +1046,8 @@ config_params=" --with-pcre-regex \ --enable-wddx \ --enable-exif \ - --with-zlib" - -if [[ "$os_dist" = "debian" ]] && [[ $os_version -gt 8 ]] && [[ $MAIN_VERSION -lt 7 ]]; then - config_params="$config_params \ - --with-openssl=/usr/local/openssl" -else - config_params="$config_params \ - --with-openssl" -fi - -config_params="$config_params \ + --with-zlib \ + --with-openssl \ --with-gdbm \ --with-jpeg-dir \ --with-png-dir \ @@ -1153,15 +1162,6 @@ else fatal "Configuring PHP failed!\n\t see ${_logdir}/php-configure.log for more details" fi -echononl "\tGoing to compile.." -make > ${_logdir}/php-make.log 2>&1 -if [ "$?" = "0" ]; then - echo_ok -else - echo_failed - fatal "Compiling PHP failed!\n\t see ${_logdir}/php-make.log for more details" -fi - ## --with-mm \ # does not work with apache v2.4 @@ -1183,6 +1183,7 @@ fi ## --with-ttf \ ## --with-memcache \ ## --with-xml \ + echononl "\tGoing to compile.." make > ${_logdir}/php-make.log 2>&1