This commit is contained in:
parent
47297a0137
commit
9ab31feb99
|
|
@ -115,7 +115,8 @@ if [ $sysName == 'Darwin' ]; then
|
|||
OPTIONS="${OPTIONS} --with-freetype-dir=${serverPath}/lib/freetype"
|
||||
OPTIONS="${OPTIONS} --with-curl=${serverPath}/lib/curl"
|
||||
else
|
||||
OPTIONS="--with-iconv=${serverPath}/lib/libiconv"
|
||||
OPTIONS='--without-iconv'
|
||||
# OPTIONS="--with-iconv=${serverPath}/lib/libiconv"
|
||||
OPTIONS="${OPTIONS} --with-curl"
|
||||
fi
|
||||
|
||||
|
|
|
|||
|
|
@ -47,7 +47,8 @@ if [ $sysName == 'Darwin' ]; then
|
|||
OPTIONS="${OPTIONS} --with-freetype-dir=${serverPath}/lib/freetype"
|
||||
OPTIONS="${OPTIONS} --with-curl=${serverPath}/lib/curl"
|
||||
else
|
||||
OPTIONS="--with-iconv=${serverPath}/lib/libiconv"
|
||||
OPTIONS='--without-iconv'
|
||||
# OPTIONS="--with-iconv=${serverPath}/lib/libiconv"
|
||||
OPTIONS="${OPTIONS} --with-curl"
|
||||
fi
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,8 @@ if [ $sysName == 'Darwin' ]; then
|
|||
OPTIONS="${OPTIONS} --with-freetype-dir=${serverPath}/lib/freetype"
|
||||
OPTIONS="${OPTIONS} --with-curl=${serverPath}/lib/curl"
|
||||
else
|
||||
OPTIONS="--with-iconv=${serverPath}/lib/libiconv"
|
||||
OPTIONS='--without-iconv'
|
||||
# OPTIONS="--with-iconv=${serverPath}/lib/libiconv"
|
||||
OPTIONS="${OPTIONS} --with-curl"
|
||||
fi
|
||||
|
||||
|
|
|
|||
|
|
@ -38,7 +38,8 @@ if [ $sysName == 'Darwin' ]; then
|
|||
OPTIONS="${OPTIONS} --with-freetype-dir=${serverPath}/lib/freetype"
|
||||
OPTIONS="${OPTIONS} --with-curl=${serverPath}/lib/curl"
|
||||
else
|
||||
OPTIONS="--with-iconv=${serverPath}/lib/libiconv"
|
||||
OPTIONS='--without-iconv'
|
||||
# OPTIONS="--with-iconv=${serverPath}/lib/libiconv"
|
||||
OPTIONS="${OPTIONS} --with-curl"
|
||||
fi
|
||||
|
||||
|
|
|
|||
|
|
@ -38,7 +38,8 @@ if [ $sysName == 'Darwin' ]; then
|
|||
OPTIONS="${OPTIONS} --with-freetype-dir=${serverPath}/lib/freetype"
|
||||
OPTIONS="${OPTIONS} --with-curl=${serverPath}/lib/curl"
|
||||
else
|
||||
OPTIONS="--with-iconv=${serverPath}/lib/libiconv"
|
||||
OPTIONS='--without-iconv'
|
||||
# OPTIONS="--with-iconv=${serverPath}/lib/libiconv"
|
||||
OPTIONS="${OPTIONS} --with-curl"
|
||||
fi
|
||||
|
||||
|
|
|
|||
|
|
@ -38,7 +38,8 @@ if [ $sysName == 'Darwin' ]; then
|
|||
OPTIONS="${OPTIONS} --with-freetype-dir=${serverPath}/lib/freetype"
|
||||
OPTIONS="${OPTIONS} --with-curl=${serverPath}/lib/curl"
|
||||
else
|
||||
OPTIONS="--with-iconv=${serverPath}/lib/libiconv"
|
||||
OPTIONS='--without-iconv'
|
||||
# OPTIONS="--with-iconv=${serverPath}/lib/libiconv"
|
||||
OPTIONS="${OPTIONS} --with-curl"
|
||||
fi
|
||||
|
||||
|
|
|
|||
|
|
@ -37,7 +37,8 @@ if [ $sysName == 'Darwin' ]; then
|
|||
OPTIONS='--without-iconv'
|
||||
OPTIONS="${OPTIONS} --with-curl=${serverPath}/lib/curl"
|
||||
else
|
||||
OPTIONS="--with-iconv=${serverPath}/lib/libiconv"
|
||||
OPTIONS='--without-iconv'
|
||||
# OPTIONS="--with-iconv=${serverPath}/lib/libiconv"
|
||||
OPTIONS="${OPTIONS} --with-curl"
|
||||
fi
|
||||
|
||||
|
|
|
|||
|
|
@ -38,7 +38,8 @@ if [ $sysName == 'Darwin' ]; then
|
|||
OPTIONS='--without-iconv'
|
||||
OPTIONS="${OPTIONS} --with-curl=${serverPath}/lib/curl"
|
||||
else
|
||||
OPTIONS="--with-iconv=${serverPath}/lib/libiconv"
|
||||
OPTIONS='--without-iconv'
|
||||
# OPTIONS="--with-iconv=${serverPath}/lib/libiconv"
|
||||
OPTIONS="${OPTIONS} --with-curl"
|
||||
fi
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ mkdir -p $serverPath/php
|
|||
cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash freetype_old.sh
|
||||
cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash libiconv.sh
|
||||
cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash zlib.sh
|
||||
cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash libzip.sh
|
||||
# cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash libzip.sh
|
||||
|
||||
if [ ! -d $sourcePath/php/php${PHP_VER} ];then
|
||||
|
||||
|
|
@ -42,7 +42,8 @@ if [ $sysName == 'Darwin' ]; then
|
|||
# OPTIONS="${OPTIONS} --with-libzip=${serverPath}/lib/libzip"
|
||||
# OPTIONS="${OPTIONS} --enable-zip"
|
||||
else
|
||||
OPTIONS="--with-iconv=${serverPath}/lib/libiconv"
|
||||
OPTIONS='--without-iconv'
|
||||
# OPTIONS="--with-iconv=${serverPath}/lib/libiconv"
|
||||
OPTIONS="${OPTIONS} --with-curl"
|
||||
OPTIONS="${OPTIONS} --with-libzip=${serverPath}/lib/libzip"
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -23,7 +23,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 libiconv.sh
|
||||
cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash zlib.sh
|
||||
cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash libzip.sh
|
||||
# cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash libzip.sh
|
||||
|
||||
if [ ! -d $sourcePath/php/php${PHP_VER} ];then
|
||||
|
||||
|
|
@ -50,7 +50,8 @@ if [ $sysName == 'Darwin' ]; then
|
|||
export PKG_CONFIG_PATH="/usr/local/opt/libxml2/lib/pkgconfig"
|
||||
export LDFLAGS="-L/usr/local/opt/libxml2/lib"
|
||||
else
|
||||
OPTIONS="--with-iconv=${serverPath}/lib/libiconv"
|
||||
OPTIONS='--without-iconv'
|
||||
# OPTIONS="--with-iconv=${serverPath}/lib/libiconv"
|
||||
OPTIONS="${OPTIONS} --with-curl"
|
||||
fi
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,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 libiconv.sh
|
||||
cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash zlib.sh
|
||||
cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash libzip.sh
|
||||
# cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash libzip.sh
|
||||
|
||||
if [ ! -d $sourcePath/php/php${PHP_VER} ];then
|
||||
|
||||
|
|
@ -48,7 +48,8 @@ if [ $sysName == 'Darwin' ]; then
|
|||
export PKG_CONFIG_PATH="/usr/local/opt/libxml2/lib/pkgconfig"
|
||||
export LDFLAGS="-L/usr/local/opt/libxml2/lib"
|
||||
else
|
||||
OPTIONS="--with-iconv=${serverPath}/lib/libiconv"
|
||||
OPTIONS='--without-iconv'
|
||||
# OPTIONS="--with-iconv=${serverPath}/lib/libiconv"
|
||||
OPTIONS="${OPTIONS} --with-curl"
|
||||
fi
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,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 libiconv.sh
|
||||
cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash zlib.sh
|
||||
cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash libzip.sh
|
||||
# cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash libzip.sh
|
||||
|
||||
|
||||
if [ ! -d $sourcePath/php/php${PHP_VER} ];then
|
||||
|
|
@ -49,10 +49,9 @@ if [ $sysName == 'Darwin' ]; then
|
|||
export PKG_CONFIG_PATH="/usr/local/opt/libxml2/lib/pkgconfig"
|
||||
export LDFLAGS="-L/usr/local/opt/libxml2/lib"
|
||||
else
|
||||
OPTIONS="--with-iconv=${serverPath}/lib/libiconv"
|
||||
OPTIONS="${OPTIONS} --with-freetype-dir=${serverPath}/lib/freetype"
|
||||
OPTIONS='--without-iconv'
|
||||
# OPTIONS="--with-iconv=${serverPath}/lib/libiconv"
|
||||
OPTIONS="${OPTIONS} --with-curl"
|
||||
OPTIONS="${OPTIONS} --with-libzip=${serverPath}/lib/libzip"
|
||||
fi
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -44,8 +44,8 @@ if [ $sysName == 'Darwin' ]; then
|
|||
OPTIONS="${OPTIONS} --with-curl=${serverPath}/lib/curl"
|
||||
# OPTIONS="${OPTIONS} --enable-zip"
|
||||
else
|
||||
OPTIONS="--with-iconv=${serverPath}/lib/libiconv"
|
||||
OPTIONS="${OPTIONS} --with-freetype-dir=${serverPath}/lib/freetype"
|
||||
OPTIONS='--without-iconv'
|
||||
# OPTIONS="--with-iconv=${serverPath}/lib/libiconv"
|
||||
OPTIONS="${OPTIONS} --with-curl"
|
||||
OPTIONS="${OPTIONS} --with-libzip=${serverPath}/lib/libzip"
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ Install_lib()
|
|||
echo "php-$version 已安装${LIBNAME},请选择其它版本!"
|
||||
return
|
||||
fi
|
||||
|
||||
|
||||
if [ ! -f "$extFile" ];then
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,107 @@
|
|||
#!/bin/bash
|
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
|
||||
export PATH
|
||||
|
||||
curPath=`pwd`
|
||||
|
||||
appPath=$(dirname "$curPath")
|
||||
|
||||
rootPath=$(dirname "$curPath")
|
||||
rootPath=$(dirname "$rootPath")
|
||||
rootPath=$(dirname "$rootPath")
|
||||
rootPath=$(dirname "$rootPath")
|
||||
serverPath=$(dirname "$rootPath")
|
||||
sourcePath=${serverPath}/source/php
|
||||
|
||||
actionType=$1
|
||||
version=$2
|
||||
|
||||
LIBNAME=iconv
|
||||
LIBV=0
|
||||
|
||||
|
||||
|
||||
LIB_PATH_NAME=lib/php
|
||||
if [ -d $serverPath/php/${version}/lib64 ];then
|
||||
LIB_PATH_NAME=lib64
|
||||
fi
|
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/${LIB_PATH_NAME}/extensions | grep no-debug-non-zts`
|
||||
extFile=$serverPath/php/${version}/${LIB_PATH_NAME}/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so
|
||||
|
||||
sysName=`uname`
|
||||
if [ "$sysName" == "Darwin" ];then
|
||||
BAK='_bak'
|
||||
else
|
||||
BAK=''
|
||||
fi
|
||||
|
||||
Install_lib()
|
||||
{
|
||||
|
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"`
|
||||
if [ "${isInstall}" != "" ];then
|
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!"
|
||||
return
|
||||
fi
|
||||
|
||||
cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash libiconv.sh
|
||||
|
||||
if [ ! -f "$extFile" ];then
|
||||
|
||||
if [ ! -d $sourcePath/php${version}/ext ];then
|
||||
cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version}
|
||||
fi
|
||||
|
||||
cd $sourcePath/php${version}/ext/${LIBNAME}
|
||||
|
||||
$serverPath/php/$version/bin/phpize
|
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config
|
||||
make clean && make && make install && make clean
|
||||
|
||||
fi
|
||||
|
||||
if [ ! -f "$extFile" ];then
|
||||
echo "ERROR!"
|
||||
return
|
||||
fi
|
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini
|
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
|
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
|
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart
|
||||
echo '==========================================================='
|
||||
echo 'successful!'
|
||||
}
|
||||
|
||||
|
||||
Uninstall_lib()
|
||||
{
|
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then
|
||||
echo "php-$version 未安装,请选择其它版本!"
|
||||
return
|
||||
fi
|
||||
|
||||
if [ ! -f "$extFile" ];then
|
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!"
|
||||
return
|
||||
fi
|
||||
|
||||
echo $serverPath/php/$version/etc/php.ini
|
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini
|
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
|
||||
|
||||
rm -f $extFile
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart
|
||||
echo '==============================================='
|
||||
echo 'successful!'
|
||||
}
|
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then
|
||||
Install_lib
|
||||
elif [ "$actionType" == 'uninstall' ];then
|
||||
Uninstall_lib
|
||||
fi
|
||||
|
|
@ -502,11 +502,6 @@
|
|||
{
|
||||
"name": "zip",
|
||||
"versions": [
|
||||
"73",
|
||||
"74",
|
||||
"80",
|
||||
"81",
|
||||
"82"
|
||||
],
|
||||
"type": "压缩",
|
||||
"msg": "压缩组件",
|
||||
|
|
|
|||
Loading…
Reference in New Issue