From a34bea53de2620ec3283c59729c37712b783897c Mon Sep 17 00:00:00 2001 From: midoks Date: Wed, 27 Jul 2022 15:37:14 +0800 Subject: [PATCH] Update install.sh --- plugins/php/versions/74/install.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/plugins/php/versions/74/install.sh b/plugins/php/versions/74/install.sh index 00bb529ed..53f103872 100755 --- a/plugins/php/versions/74/install.sh +++ b/plugins/php/versions/74/install.sh @@ -22,6 +22,7 @@ mkdir -p $serverPath/php cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash freetype_new.sh cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash zlib.sh +cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash libzip.sh if [ ! -d $sourcePath/php/php${PHP_VER} ];then @@ -61,6 +62,13 @@ fi echo "$sourcePath/php/php${PHP_VER}" +ZIP_OPTION='--with-zip' +libzip_version=`pkg-config libzip --modversion` +if [ "$libzip_version" -lt "0.10.1" ];then + ZIP_OPTION="--with-zip=${serverPath}/lib/libzip" +fi + + if [ ! -d $serverPath/php/${PHP_VER} ];then cd $sourcePath/php/php${PHP_VER} && make clean ./buildconf --force @@ -72,7 +80,7 @@ if [ ! -d $serverPath/php/${PHP_VER} ];then --with-mysqli=mysqlnd \ --with-pdo-mysql=mysqlnd \ --with-zlib-dir=$serverPath/lib/zlib \ - --with-zip \ + $ZIP_OPTION \ --enable-ftp \ --enable-mbstring \ --enable-sockets \