From d37ba5cd747ae0ec6cd16c580af82a3600283abe Mon Sep 17 00:00:00 2001 From: zhengkunwang <31820853+zhengkunwang223@users.noreply.github.com> Date: Wed, 12 Jul 2023 17:55:04 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A7=A3=E5=86=B3=20php8=20=E5=AE=89?= =?UTF-8?q?=E8=A3=85=20memcached=20=E5=A4=B1=E8=B4=A5=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98=20(#228)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../8.0.28/build/php/extensions/install.sh | 20 ++++++++---------- .../8.1.18/build/php/extensions/install.sh | 21 ++++++++----------- .../8.2.5/build/php/extensions/install.sh | 12 +++++------ 3 files changed, 23 insertions(+), 30 deletions(-) diff --git a/apps/php8/8.0.28/build/php/extensions/install.sh b/apps/php8/8.0.28/build/php/extensions/install.sh index c8e284a6a..3bb97cb22 100644 --- a/apps/php8/8.0.28/build/php/extensions/install.sh +++ b/apps/php8/8.0.28/build/php/extensions/install.sh @@ -62,9 +62,9 @@ installExtensionFromTgz() tgzName=$1 para1= extensionName="${tgzName%%-*}" - if [ $2 ]; then + if [ $2 ]; then para1=$2 - fi + fi mkdir ${extensionName} tar -xf ${tgzName}.tgz -C ${extensionName} --strip-components=1 ( cd ${extensionName} && phpize && ./configure ${para1} && make ${MC} && make install ) @@ -87,6 +87,11 @@ if [[ -z "${EXTENSIONS##*,sourceguardian,*}" ]]; then echo "---------- Install sourceguardian ----------" install-php-extensions sourceguardian fi + +if [[ -z "${EXTENSIONS##*,memcached,*}" ]]; then + echo "---------- Install memcached ----------" + install-php-extensions memcached +fi # end @@ -362,13 +367,6 @@ if [[ -z "${EXTENSIONS##*,psr,*}" ]]; then docker-php-ext-enable psr fi -if [[ -z "${EXTENSIONS##*,imagick,*}" ]]; then - echo "---------- Install imagick ----------" - apk add --no-cache file-dev - apk add --no-cache imagemagick-dev - printf "\n" | pecl install imagick-3.4.4 - docker-php-ext-enable imagick -fi if [[ -z "${EXTENSIONS##*,rar,*}" ]]; then echo "---------- Install rar ----------" @@ -543,7 +541,7 @@ if [[ -z "${EXTENSIONS##*,amqp,*}" ]]; then && printf '\n' | pecl install amqp \ && docker-php-ext-enable amqp \ && apk del .phpize-deps-configure - + fi if [[ -z "${EXTENSIONS##*,redis,*}" ]]; then @@ -603,7 +601,7 @@ fi if [[ -z "${EXTENSIONS##*,swoole,*}" ]]; then - echo "---------- Install swoole ----------" + echo "---------- Install swoole ----------" isPhpVersionGreaterOrEqual 8 0 if [[ "$?" = "1" ]]; then installExtensionFromTgz swoole-5.0.2 --enable-openssl diff --git a/apps/php8/8.1.18/build/php/extensions/install.sh b/apps/php8/8.1.18/build/php/extensions/install.sh index 9bf470e3d..3bb97cb22 100644 --- a/apps/php8/8.1.18/build/php/extensions/install.sh +++ b/apps/php8/8.1.18/build/php/extensions/install.sh @@ -62,9 +62,9 @@ installExtensionFromTgz() tgzName=$1 para1= extensionName="${tgzName%%-*}" - if [ $2 ]; then + if [ $2 ]; then para1=$2 - fi + fi mkdir ${extensionName} tar -xf ${tgzName}.tgz -C ${extensionName} --strip-components=1 ( cd ${extensionName} && phpize && ./configure ${para1} && make ${MC} && make install ) @@ -72,7 +72,6 @@ installExtensionFromTgz() docker-php-ext-enable ${extensionName} } - # install use install-php-extensions if [[ -z "${EXTENSIONS##*,ioncube_loader,*}" ]]; then echo "---------- Install ioncube_loader ----------" @@ -88,6 +87,11 @@ if [[ -z "${EXTENSIONS##*,sourceguardian,*}" ]]; then echo "---------- Install sourceguardian ----------" install-php-extensions sourceguardian fi + +if [[ -z "${EXTENSIONS##*,memcached,*}" ]]; then + echo "---------- Install memcached ----------" + install-php-extensions memcached +fi # end @@ -363,13 +367,6 @@ if [[ -z "${EXTENSIONS##*,psr,*}" ]]; then docker-php-ext-enable psr fi -if [[ -z "${EXTENSIONS##*,imagick,*}" ]]; then - echo "---------- Install imagick ----------" - apk add --no-cache file-dev - apk add --no-cache imagemagick-dev - printf "\n" | pecl install imagick-3.4.4 - docker-php-ext-enable imagick -fi if [[ -z "${EXTENSIONS##*,rar,*}" ]]; then echo "---------- Install rar ----------" @@ -544,7 +541,7 @@ if [[ -z "${EXTENSIONS##*,amqp,*}" ]]; then && printf '\n' | pecl install amqp \ && docker-php-ext-enable amqp \ && apk del .phpize-deps-configure - + fi if [[ -z "${EXTENSIONS##*,redis,*}" ]]; then @@ -604,7 +601,7 @@ fi if [[ -z "${EXTENSIONS##*,swoole,*}" ]]; then - echo "---------- Install swoole ----------" + echo "---------- Install swoole ----------" isPhpVersionGreaterOrEqual 8 0 if [[ "$?" = "1" ]]; then installExtensionFromTgz swoole-5.0.2 --enable-openssl diff --git a/apps/php8/8.2.5/build/php/extensions/install.sh b/apps/php8/8.2.5/build/php/extensions/install.sh index c8e284a6a..2253ca840 100644 --- a/apps/php8/8.2.5/build/php/extensions/install.sh +++ b/apps/php8/8.2.5/build/php/extensions/install.sh @@ -87,6 +87,11 @@ if [[ -z "${EXTENSIONS##*,sourceguardian,*}" ]]; then echo "---------- Install sourceguardian ----------" install-php-extensions sourceguardian fi + +if [[ -z "${EXTENSIONS##*,memcached,*}" ]]; then + echo "---------- Install memcached ----------" + install-php-extensions memcached +fi # end @@ -362,13 +367,6 @@ if [[ -z "${EXTENSIONS##*,psr,*}" ]]; then docker-php-ext-enable psr fi -if [[ -z "${EXTENSIONS##*,imagick,*}" ]]; then - echo "---------- Install imagick ----------" - apk add --no-cache file-dev - apk add --no-cache imagemagick-dev - printf "\n" | pecl install imagick-3.4.4 - docker-php-ext-enable imagick -fi if [[ -z "${EXTENSIONS##*,rar,*}" ]]; then echo "---------- Install rar ----------"