From f2bc938ade136ee1e711c1a2183b2c10c47ca615 Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 13 Aug 2023 13:32:18 +0800 Subject: [PATCH] Update memcache.sh --- plugins/php/versions/common/memcache.sh | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/plugins/php/versions/common/memcache.sh b/plugins/php/versions/common/memcache.sh index 6b845155c..9d5e01202 100755 --- a/plugins/php/versions/common/memcache.sh +++ b/plugins/php/versions/common/memcache.sh @@ -10,7 +10,7 @@ rootPath=$(dirname "$rootPath") rootPath=$(dirname "$rootPath") serverPath=$(dirname "$rootPath") sourcePath=${serverPath}/source/php - +SYS_ARCH=`arch` LIBNAME=memcache LIBV=2.2.7 sysName=`uname` @@ -52,10 +52,17 @@ Install_lib() php_lib=$sourcePath/php_lib mkdir -p $php_lib - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz + if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then + wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz + cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz + cd ${LIBNAME}-${LIBV} + fi + + OPTIONS="" + if [ "${SYS_ARCH}" == "aarch64" ] && [ "$version" -lt "56" ];then + OPTIONS="$OPTIONS --build=aarch64-unknown-linux-gnu --host=aarch64-unknown-linux-gnu" + 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 --enable-memcache --with-zlib-dir make clean && make && make install && make clean