From 91fb3cfdc023fe4ece4d1551366e8be4095a8dc5 Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Tue, 12 Mar 2019 20:01:25 +0800 Subject: [PATCH] Update mongo.sh --- plugins/php/versions/53/mongo.sh | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/plugins/php/versions/53/mongo.sh b/plugins/php/versions/53/mongo.sh index 075f848f4..4866b2edc 100755 --- a/plugins/php/versions/53/mongo.sh +++ b/plugins/php/versions/53/mongo.sh @@ -12,7 +12,7 @@ serverPath=$(dirname "$rootPath") sourcePath=${serverPath}/source/php LIBNAME=mongo -LIBV=1.4.5 +LIBV=1.6.16 sysName=`uname` actionType=$1 version=$2 @@ -32,14 +32,20 @@ Install_lib() php_lib=$sourcePath/php_${version}_lib mkdir -p $php_lib - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz + if [ ! -f $php_lib/${LIBNAME}-${LIBV}.tgz ];then + wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz + fi + + OPTIONS='' + if [ $sysName == 'Darwin' ]; then + OPTIONS="--with-openssl-dir=/usr/local/Cellar/openssl/1.0.2q" + fi cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz cd ${LIBNAME}-${LIBV} $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config - echo "./configure --with-php-config=$serverPath/php/$version/bin/php-config \ - --with-openssl-dir=$serverPath/lib/openssl" + ./configure --with-php-config=$serverPath/php/$version/bin/php-config $OPTIONS + make && make install cd $php_lib