libzip判断

pull/143/head
midoks 3 years ago
parent 8698c1d49e
commit 9fa5b312a8
  1. 10
      plugins/php/versions/73/install.sh
  2. 13
      plugins/php/versions/74/install.sh
  3. 14
      plugins/php/versions/80/install.sh
  4. 14
      plugins/php/versions/81/install.sh
  5. 15
      plugins/php/versions/82/install.sh

@ -10,6 +10,10 @@ sourcePath=${serverPath}/source
sysName=`uname` sysName=`uname`
install_tmp=${rootPath}/tmp/mw_install.pl install_tmp=${rootPath}/tmp/mw_install.pl
function version_gt() { test "$(echo "$@" | tr " " "\n" | sort -V | head -n 1)" != "$1"; }
function version_le() { test "$(echo "$@" | tr " " "\n" | sort -V | head -n 1)" == "$1"; }
function version_lt() { test "$(echo "$@" | tr " " "\n" | sort -rV | head -n 1)" != "$1"; }
function version_ge() { test "$(echo "$@" | tr " " "\n" | sort -rV | head -n 1)" == "$1"; }
version=7.3.33 version=7.3.33
PHP_VER=73 PHP_VER=73
@ -49,6 +53,12 @@ if [ "$IS_64BIT" == "64" ];then
OPTIONS="${OPTIONS} --with-libdir=lib64" OPTIONS="${OPTIONS} --with-libdir=lib64"
fi fi
ZIP_OPTION='--enable-zip'
libzip_version=`pkg-config libzip --modversion`
if version_lt "$libzip_version" "0.11.0" ;then
export PKG_CONFIG_PATH=$serverPath/lib/libzip/lib/pkgconfig
ZIP_OPTION="--with-libzip=$serverPath/lib/libzip"
fi
if [ ! -d $serverPath/php/73 ];then if [ ! -d $serverPath/php/73 ];then
cd $sourcePath/php/php${PHP_VER} && ./configure \ cd $sourcePath/php/php${PHP_VER} && ./configure \

@ -11,6 +11,11 @@ sysName=`uname`
install_tmp=${rootPath}/tmp/mw_install.pl install_tmp=${rootPath}/tmp/mw_install.pl
function version_gt() { test "$(echo "$@" | tr " " "\n" | sort -V | head -n 1)" != "$1"; }
function version_le() { test "$(echo "$@" | tr " " "\n" | sort -V | head -n 1)" == "$1"; }
function version_lt() { test "$(echo "$@" | tr " " "\n" | sort -rV | head -n 1)" != "$1"; }
function version_ge() { test "$(echo "$@" | tr " " "\n" | sort -rV | head -n 1)" == "$1"; }
version=7.4.26 version=7.4.26
PHP_VER=74 PHP_VER=74
Install_php() Install_php()
@ -50,9 +55,7 @@ if [ $sysName == 'Darwin' ]; then
export LDFLAGS="-L/usr/local/opt/libxml2/lib" export LDFLAGS="-L/usr/local/opt/libxml2/lib"
else else
OPTIONS='--without-iconv' OPTIONS='--without-iconv'
# OPTIONS="--with-iconv=${serverPath}/lib/libiconv"
OPTIONS="${OPTIONS} --with-curl" OPTIONS="${OPTIONS} --with-curl"
# OPTIONS="${OPTIONS} --with-zip=${serverPath}/lib/libzip"
fi fi
IS_64BIT=`getconf LONG_BIT` IS_64BIT=`getconf LONG_BIT`
@ -64,9 +67,9 @@ echo "$sourcePath/php/php${PHP_VER}"
ZIP_OPTION='--with-zip' ZIP_OPTION='--with-zip'
libzip_version=`pkg-config libzip --modversion` libzip_version=`pkg-config libzip --modversion`
compare_ver=`echo "${libzip_version} >= 0.11"|bc` if version_lt "$libzip_version" "0.11.0" ;then
if [ "$compare_ver" -eq "1" ];then export PKG_CONFIG_PATH=$serverPath/lib/libzip/lib/pkgconfig
ZIP_OPTION="--with-zip=${serverPath}/lib/libzip" ZIP_OPTION="--with-zip=$serverPath/lib/libzip"
fi fi

@ -10,6 +10,11 @@ sourcePath=${serverPath}/source
sysName=`uname` sysName=`uname`
install_tmp=${rootPath}/tmp/mw_install.pl install_tmp=${rootPath}/tmp/mw_install.pl
function version_gt() { test "$(echo "$@" | tr " " "\n" | sort -V | head -n 1)" != "$1"; }
function version_le() { test "$(echo "$@" | tr " " "\n" | sort -V | head -n 1)" == "$1"; }
function version_lt() { test "$(echo "$@" | tr " " "\n" | sort -rV | head -n 1)" != "$1"; }
function version_ge() { test "$(echo "$@" | tr " " "\n" | sort -rV | head -n 1)" == "$1"; }
version=8.0.21 version=8.0.21
PHP_VER=80 PHP_VER=80
@ -55,6 +60,13 @@ if [ "$IS_64BIT" == "64" ];then
OPTIONS="${OPTIONS} --with-libdir=lib64" OPTIONS="${OPTIONS} --with-libdir=lib64"
fi fi
ZIP_OPTION='--with-zip'
libzip_version=`pkg-config libzip --modversion`
if version_lt "$libzip_version" "0.11.0" ;then
export PKG_CONFIG_PATH=$serverPath/lib/libzip/lib/pkgconfig
ZIP_OPTION="--with-zip=$serverPath/lib/libzip"
fi
echo "$sourcePath/php/php${PHP_VER}" echo "$sourcePath/php/php${PHP_VER}"
if [ ! -d $serverPath/php/${PHP_VER} ];then if [ ! -d $serverPath/php/${PHP_VER} ];then
@ -68,7 +80,7 @@ if [ ! -d $serverPath/php/${PHP_VER} ];then
--with-mysqli=mysqlnd \ --with-mysqli=mysqlnd \
--with-pdo-mysql=mysqlnd \ --with-pdo-mysql=mysqlnd \
--with-zlib-dir=$serverPath/lib/zlib \ --with-zlib-dir=$serverPath/lib/zlib \
--with-zip \ $ZIP_OPTION \
--enable-ftp \ --enable-ftp \
--enable-mbstring \ --enable-mbstring \
--enable-sockets \ --enable-sockets \

@ -10,6 +10,11 @@ sourcePath=${serverPath}/source
sysName=`uname` sysName=`uname`
install_tmp=${rootPath}/tmp/mw_install.pl install_tmp=${rootPath}/tmp/mw_install.pl
function version_gt() { test "$(echo "$@" | tr " " "\n" | sort -V | head -n 1)" != "$1"; }
function version_le() { test "$(echo "$@" | tr " " "\n" | sort -V | head -n 1)" == "$1"; }
function version_lt() { test "$(echo "$@" | tr " " "\n" | sort -rV | head -n 1)" != "$1"; }
function version_ge() { test "$(echo "$@" | tr " " "\n" | sort -rV | head -n 1)" == "$1"; }
version=8.1.8 version=8.1.8
PHP_VER=81 PHP_VER=81
@ -49,6 +54,13 @@ else
OPTIONS="${OPTIONS} --with-curl" OPTIONS="${OPTIONS} --with-curl"
fi fi
ZIP_OPTION='--with-zip'
libzip_version=`pkg-config libzip --modversion`
if version_lt "$libzip_version" "0.11.0" ;then
export PKG_CONFIG_PATH=$serverPath/lib/libzip/lib/pkgconfig
ZIP_OPTION="--with-zip=$serverPath/lib/libzip"
fi
echo "$sourcePath/php/php${PHP_VER}" echo "$sourcePath/php/php${PHP_VER}"
@ -63,7 +75,7 @@ if [ ! -d $serverPath/php/${PHP_VER} ];then
--with-mysqli=mysqlnd \ --with-mysqli=mysqlnd \
--with-pdo-mysql=mysqlnd \ --with-pdo-mysql=mysqlnd \
--with-zlib-dir=$serverPath/lib/zlib \ --with-zlib-dir=$serverPath/lib/zlib \
--with-zip \ $ZIP_OPTION \
--enable-ftp \ --enable-ftp \
--enable-mbstring \ --enable-mbstring \
--enable-sockets \ --enable-sockets \

@ -10,6 +10,11 @@ sourcePath=${serverPath}/source
sysName=`uname` sysName=`uname`
install_tmp=${rootPath}/tmp/mw_install.pl install_tmp=${rootPath}/tmp/mw_install.pl
function version_gt() { test "$(echo "$@" | tr " " "\n" | sort -V | head -n 1)" != "$1"; }
function version_le() { test "$(echo "$@" | tr " " "\n" | sort -V | head -n 1)" == "$1"; }
function version_lt() { test "$(echo "$@" | tr " " "\n" | sort -rV | head -n 1)" != "$1"; }
function version_ge() { test "$(echo "$@" | tr " " "\n" | sort -rV | head -n 1)" == "$1"; }
version=8.2.0alpha2 version=8.2.0alpha2
PHP_VER=82 PHP_VER=82
@ -50,6 +55,14 @@ if [ "$IS_64BIT" == "64" ];then
OPTIONS="${OPTIONS} --with-libdir=lib64" OPTIONS="${OPTIONS} --with-libdir=lib64"
fi fi
ZIP_OPTION='--with-zip'
libzip_version=`pkg-config libzip --modversion`
if version_lt "$libzip_version" "0.11.0" ;then
export PKG_CONFIG_PATH=$serverPath/lib/libzip/lib/pkgconfig
ZIP_OPTION="--with-zip=$serverPath/lib/libzip"
fi
echo "$sourcePath/php/php${PHP_VER}" echo "$sourcePath/php/php${PHP_VER}"
if [ ! -d $serverPath/php/${PHP_VER} ];then if [ ! -d $serverPath/php/${PHP_VER} ];then
@ -63,7 +76,7 @@ if [ ! -d $serverPath/php/${PHP_VER} ];then
--with-mysqli=mysqlnd \ --with-mysqli=mysqlnd \
--with-pdo-mysql=mysqlnd \ --with-pdo-mysql=mysqlnd \
--with-zlib-dir=$serverPath/lib/zlib \ --with-zlib-dir=$serverPath/lib/zlib \
--with-zip \ $ZIP_OPTION \
--enable-mbstring \ --enable-mbstring \
--enable-ftp \ --enable-ftp \
--enable-sockets \ --enable-sockets \

Loading…
Cancel
Save