From 664852c26f3d5ddad79972789ff86a54665a82cd Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Fri, 10 Nov 2023 18:47:32 +0800 Subject: [PATCH] update --- plugins/php/install.sh | 4 +- plugins/php/lib/icu.sh | 12 +- plugins/php/lib/libiconv.sh | 29 +- plugins/php/lib/libzip.sh | 15 +- plugins/php/lib/openssl_10.sh | 18 +- plugins/php/lib/zlib.sh | 16 +- plugins/php/versions/52/install.sh | 2 +- plugins/php/versions/53/install.sh | 3 +- plugins/php/versions/54/install.sh | 2 +- plugins/php/versions/55/install.sh | 3 +- plugins/php/versions/56/install.sh | 10 +- plugins/php/versions/70/install.sh | 11 +- plugins/php/versions/71/install.sh | 6 +- plugins/php/versions/72/install.sh | 18 +- plugins/php/versions/72/src/reentrancy.c | 450 +++++++++++++++++++++ plugins/php/versions/73/install.sh | 16 +- plugins/php/versions/74/install.sh | 27 +- plugins/php/versions/80/install.sh | 22 +- plugins/php/versions/81/install.sh | 12 +- plugins/php/versions/82/install.sh | 8 +- plugins/php/versions/83/install.sh | 8 +- plugins/php/versions/all_mac.sh | 70 ++++ plugins/php/versions/all_test.sh | 4 +- plugins/php/versions/common.sh | 2 +- plugins/php/versions/common/bcmath.sh | 2 +- plugins/php/versions/common/exif.sh | 2 +- plugins/php/versions/common/fileinfo.sh | 2 +- plugins/php/versions/common/gd.sh | 2 +- plugins/php/versions/common/gd_old.sh | 2 +- plugins/php/versions/common/gettext.sh | 2 +- plugins/php/versions/common/gmp.sh | 2 +- plugins/php/versions/common/iconv.sh | 2 +- plugins/php/versions/common/igbinary.sh | 2 +- plugins/php/versions/common/imagemagick.sh | 2 +- plugins/php/versions/common/intl.sh | 2 +- plugins/php/versions/common/ioncube.sh | 2 +- plugins/php/versions/common/mcrypt.sh | 8 +- plugins/php/versions/common/memcache.sh | 2 +- plugins/php/versions/common/memcached.sh | 16 +- plugins/php/versions/common/mongo.sh | 2 +- plugins/php/versions/common/mongodb.sh | 2 +- plugins/php/versions/common/opcache.sh | 2 +- plugins/php/versions/common/openssl.sh | 9 +- plugins/php/versions/common/pcntl.sh | 2 +- plugins/php/versions/common/phalcon.sh | 2 +- plugins/php/versions/common/redis.sh | 2 +- plugins/php/versions/common/seaslog.sh | 2 +- plugins/php/versions/common/sg11.sh | 4 +- plugins/php/versions/common/sodium.sh | 2 +- plugins/php/versions/common/solr.sh | 2 +- plugins/php/versions/common/swoole.sh | 2 +- plugins/php/versions/common/xdebug.sh | 2 +- plugins/php/versions/common/xhprof.sh | 2 +- plugins/php/versions/common/yac.sh | 2 +- plugins/php/versions/common/yaf.sh | 2 +- plugins/php/versions/common/yaml.sh | 2 +- plugins/php/versions/common/yar.sh | 2 +- plugins/php/versions/common/zip.sh | 2 +- plugins/php/versions/common/zlib.sh | 2 +- plugins/php/versions/lib.sh | 2 +- plugins/sphinx/install.sh | 4 + scripts/install/macos.sh | 1 + 62 files changed, 739 insertions(+), 135 deletions(-) create mode 100644 plugins/php/versions/72/src/reentrancy.c create mode 100644 plugins/php/versions/all_mac.sh diff --git a/plugins/php/install.sh b/plugins/php/install.sh index ad30e3488..692b6acb5 100755 --- a/plugins/php/install.sh +++ b/plugins/php/install.sh @@ -6,7 +6,7 @@ curPath=`pwd` rootPath=$(dirname "$curPath") rootPath=$(dirname "$rootPath") serverPath=$(dirname "$rootPath") - +sysName=`uname` install_tmp=${rootPath}/tmp/mw_install.pl if id www &> /dev/null ;then @@ -81,7 +81,7 @@ if [ "${action}" == "install" ] && [ -d ${serverPath}/php/${type} ];then echo "install PHP${type} extend end" - if [ ! -f /usr/local/bin/composer ];then + if [ ! -f /usr/local/bin/composer ] && [ "$sysName" != "Darwin" ] ;then cd /tmp curl -sS https://getcomposer.org/installer | /www/server/php/${type}/bin/php mv composer.phar /usr/local/bin/composer diff --git a/plugins/php/lib/icu.sh b/plugins/php/lib/icu.sh index 53291fb41..8d155500d 100644 --- a/plugins/php/lib/icu.sh +++ b/plugins/php/lib/icu.sh @@ -14,15 +14,25 @@ SERVER_ROOT=$rootPath/lib SOURCE_ROOT=$rootPath/source/lib HTTP_PREFIX="https://" +LOCAL_ADDR=common cn=$(curl -fsSL -m 10 http://ipinfo.io/json | grep "\"country\": \"CN\"") if [ ! -z "$cn" ] || [ "$?" == "0" ] ;then + LOCAL_ADDR=cn HTTP_PREFIX="https://ghproxy.com/" fi if [ ! -d ${SERVER_ROOT}/icu ];then + + cd ${SOURCE_ROOT} + + if [ "$LOCAL_ADDR" == 'cn' ];then + if [ ! -f ${SOURCE_ROOT}/icu4c-52_2-src.tgz ];then + wget --no-check-certificate -O ${SOURCE_ROOT}/icu4c-52_2-src.tgz https://dl.midoks.me/lib/icu4c-52_2-src.tgz -T 20 + fi + fi if [ ! -f ${SOURCE_ROOT}/icu4c-52_2-src.tgz ];then - wget --no-check-certificate -O ${SOURCE_ROOT}/icu4c-52_2-src.tgz ${HTTP_PREFIX}github.com/unicode-org/icu/releases/download/release-52-2/icu4c-52_2-src.tgz + wget --no-check-certificate -O ${SOURCE_ROOT}/icu4c-52_2-src.tgz https://github.com/unicode-org/icu/releases/download/release-52-2/icu4c-52_2-src.tgz fi if [ ! -d ${SERVER_ROOT}/lib/icu/lib ];then diff --git a/plugins/php/lib/libiconv.sh b/plugins/php/lib/libiconv.sh index 7f2c870f9..61b94b927 100644 --- a/plugins/php/lib/libiconv.sh +++ b/plugins/php/lib/libiconv.sh @@ -14,18 +14,35 @@ SERVER_ROOT=$rootPath/lib SOURCE_ROOT=$rootPath/source/lib HTTP_PREFIX="https://" +LOCAL_ADDR=common cn=$(curl -fsSL -m 10 http://ipinfo.io/json | grep "\"country\": \"CN\"") if [ ! -z "$cn" ] || [ "$?" == "0" ] ;then + LOCAL_ADDR=cn HTTP_PREFIX="https://ghproxy.com/" fi if [ ! -d ${SERVER_ROOT}/libiconv ];then cd $SOURCE_ROOT - wget --no-check-certificate -O libiconv-1.15.tar.gz ${HTTP_PREFIX}github.com/midoks/mdserver-web/releases/download/init/libiconv-1.15.tar.gz -T 5 - tar zxvf libiconv-1.15.tar.gz - cd libiconv-1.15 + + if [ "$LOCAL_ADDR" == 'cn' ];then + if [ ! -f ${SOURCE_ROOT}/libiconv-1.15.tar.gz ];then + wget --no-check-certificate -O libiconv-1.15.tar.gz https://dl.midoks.me/lib/libiconv-1.15.tar.gz -T 20 + fi + fi + + if [ ! -f ${SOURCE_ROOT}/libiconv-1.15.tar.gz ];then + wget --no-check-certificate -O libiconv-1.15.tar.gz https:/github.com/midoks/mdserver-web/releases/download/init/libiconv-1.15.tar.gz -T 5 + fi + + if [ ! -d ${SOURCE_ROOT}/libiconv-1.15 ];then + cd $SOURCE_ROOT && tar -zxvf libiconv-1.15.tar.gz + fi + + cd ${SOURCE_ROOT}/libiconv-1.15 + ./configure --prefix=${SERVER_ROOT}/libiconv --enable-static && make && make install - cd $SOURCE_ROOT && rm -rf $SOURCE_ROOT/libiconv-1.15 - #rm -rf libiconv-1.15 - #rm -rf libiconv-1.15.tar.gz + + if [ -d $SOURCE_ROOT/libiconv-1.15 ];then + cd $SOURCE_ROOT && rm -rf $SOURCE_ROOT/libiconv-1.15 + fi fi \ No newline at end of file diff --git a/plugins/php/lib/libzip.sh b/plugins/php/lib/libzip.sh index b34715825..38df74ddf 100644 --- a/plugins/php/lib/libzip.sh +++ b/plugins/php/lib/libzip.sh @@ -16,8 +16,10 @@ SOURCE_ROOT=$rootPath/source/lib mkdir -p $SOURCE_ROOT HTTP_PREFIX="https://" +LOCAL_ADDR=common cn=$(curl -fsSL -m 10 http://ipinfo.io/json | grep "\"country\": \"CN\"") if [ ! -z "$cn" ] || [ "$?" == "0" ] ;then + LOCAL_ADDR=cn HTTP_PREFIX="https://ghproxy.com/" fi # HTTP_PREFIX="https://" @@ -25,8 +27,19 @@ fi if [ ! -d ${SERVER_ROOT}/libzip ];then cd $SOURCE_ROOT + + if [ "$LOCAL_ADDR" == 'cn' ];then + if [ ! -f ${SOURCE_ROOT}/libzip-1.3.2.tar.gz ];then + wget --no-check-certificate -O libzip-1.3.2.tar.gz https://dl.midoks.me/lib/libzip-1.3.2.tar.gz -T 20 + fi + fi + + # if [ ! -f ${SOURCE_ROOT}/libzip-1.3.2.tar.gz ];then + # wget --no-check-certificate -O libzip-1.3.2.tar.gz ${HTTP_PREFIX}github.com/midoks/mdserver-web/releases/download/init/libzip-1.3.2.tar.gz -T 20 + # fi + if [ ! -f ${SOURCE_ROOT}/libzip-1.3.2.tar.gz ];then - wget --no-check-certificate -O libzip-1.3.2.tar.gz ${HTTP_PREFIX}github.com/midoks/mdserver-web/releases/download/init/libzip-1.3.2.tar.gz -T 20 + wget --no-check-certificate -O libzip-1.3.2.tar.gz https://github.com/midoks/mdserver-web/releases/download/init/libzip-1.3.2.tar.gz -T 20 fi if [ ! -d ${SOURCE_ROOT}/libzip-1.3.2 ];then diff --git a/plugins/php/lib/openssl_10.sh b/plugins/php/lib/openssl_10.sh index 93ab59710..a0e368291 100644 --- a/plugins/php/lib/openssl_10.sh +++ b/plugins/php/lib/openssl_10.sh @@ -15,16 +15,30 @@ SERVER_ROOT=$rootPath/lib SOURCE_ROOT=$rootPath/source/lib HTTP_PREFIX="https://" +LOCAL_ADDR=common cn=$(curl -fsSL -m 10 http://ipinfo.io/json | grep "\"country\": \"CN\"") if [ ! -z "$cn" ] || [ "$?" == "0" ] ;then + LOCAL_ADDR=cn HTTP_PREFIX="https://ghproxy.com/" fi if [ ! -d ${SERVER_ROOT}/openssl10 ];then cd ${SOURCE_ROOT} + + if [ "$LOCAL_ADDR" == 'cn' ];then + if [ ! -f ${SOURCE_ROOT}/openssl-${opensslVersion}.tar.gz ];then + wget --no-check-certificate -O openssl-${opensslVersion}.tar.gz https://dl.midoks.me/lib/openssl-${opensslVersion}.tar.gz -T 20 + fi + fi + + # if [ ! -f ${SOURCE_ROOT}/openssl-${opensslVersion}.tar.gz ];then + # wget --no-check-certificate ${HTTP_PREFIX}/midoks/mdserver-web/releases/download/init/openssl-${opensslVersion}.tar.gz -T 20 + # fi + if [ ! -f ${SOURCE_ROOT}/openssl-${opensslVersion}.tar.gz ];then - wget --no-check-certificate ${HTTP_PREFIX}github.com/midoks/mdserver-web/releases/download/init/openssl-${opensslVersion}.tar.gz -T 20 - fi + wget --no-check-certificate -O openssl-${opensslVersion}.tar.gz https://github.com/midoks/mdserver-web/releases/download/init/openssl-${opensslVersion}.tar.gz -T 20 + fi + tar -zxf openssl-${opensslVersion}.tar.gz cd openssl-${opensslVersion} ./config --openssldir=${SERVER_ROOT}/openssl10 zlib-dynamic shared diff --git a/plugins/php/lib/zlib.sh b/plugins/php/lib/zlib.sh index a87e43f0a..be5176eeb 100644 --- a/plugins/php/lib/zlib.sh +++ b/plugins/php/lib/zlib.sh @@ -16,8 +16,10 @@ SOURCE_ROOT=$rootPath/source/lib mkdir -p $SOURCE_ROOT HTTP_PREFIX="https://" +LOCAL_ADDR=common cn=$(curl -fsSL -m 10 http://ipinfo.io/json | grep "\"country\": \"CN\"") if [ ! -z "$cn" ] || [ "$?" == "0" ] ;then + LOCAL_ADDR=cn HTTP_PREFIX="https://ghproxy.com/" fi # HTTP_PREFIX="https://" @@ -25,9 +27,19 @@ fi if [ ! -d ${SERVER_ROOT}/zlib ];then cd $SOURCE_ROOT + + if [ "$LOCAL_ADDR" == 'cn' ];then + if [ ! -f ${SOURCE_ROOT}/${SOURCE_ROOT}/zlib-1.2.11.tar.gz ];then + wget --no-check-certificate -O ${SOURCE_ROOT}/zlib-1.2.11.tar.gz https://dl.midoks.me/lib/zlib-1.2.11.tar.gz -T 20 + fi + fi + + # if [ ! -f ${SOURCE_ROOT}/zlib-1.2.11.tar.gz ];then + # wget --no-check-certificate -O ${SOURCE_ROOT}/zlib-1.2.11.tar.gz ${HTTP_PREFIX}github.com/madler/zlib/archive/v1.2.11.tar.gz -T 20 + # fi + if [ ! -f ${SOURCE_ROOT}/zlib-1.2.11.tar.gz ];then - echo "wget --no-check-certificate -O ${SOURCE_ROOT}/zlib-1.2.11.tar.gz ${HTTP_PREFIX}github.com/madler/zlib/archive/v1.2.11.tar.gz -T 20" - wget --no-check-certificate -O ${SOURCE_ROOT}/zlib-1.2.11.tar.gz ${HTTP_PREFIX}github.com/madler/zlib/archive/v1.2.11.tar.gz -T 20 + wget --no-check-certificate -O ${SOURCE_ROOT}/zlib-1.2.11.tar.gz https://github.com/madler/zlib/archive/v1.2.11.tar.gz -T 20 fi if [ ! -d ${SOURCE_ROOT}/zlib-1.2.11 ];then diff --git a/plugins/php/versions/52/install.sh b/plugins/php/versions/52/install.sh index 0027b7406..a4d80eea5 100755 --- a/plugins/php/versions/52/install.sh +++ b/plugins/php/versions/52/install.sh @@ -1,6 +1,6 @@ #!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin -export PATH +export PATH=$PATH:/opt/homebrew/bin curPath=`pwd` rootPath=$(dirname "$curPath") diff --git a/plugins/php/versions/53/install.sh b/plugins/php/versions/53/install.sh index c0da43361..5ea1e6025 100755 --- a/plugins/php/versions/53/install.sh +++ b/plugins/php/versions/53/install.sh @@ -1,6 +1,6 @@ #!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin -export PATH +export PATH=$PATH:/opt/homebrew/bin curPath=`pwd` rootPath=$(dirname "$curPath") @@ -142,6 +142,7 @@ if [ ! -d $serverPath/php/53/bin ];then make clean && make -j${cpuCore} && make install && make clean # rm -rf $sourcePath/php/php${PHP_VER} + echo "安装php-${version}成功" fi diff --git a/plugins/php/versions/54/install.sh b/plugins/php/versions/54/install.sh index a9c2c30f3..fc80d5c12 100755 --- a/plugins/php/versions/54/install.sh +++ b/plugins/php/versions/54/install.sh @@ -1,6 +1,6 @@ #!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin -export PATH +export PATH=$PATH:/opt/homebrew/bin curPath=`pwd` rootPath=$(dirname "$curPath") diff --git a/plugins/php/versions/55/install.sh b/plugins/php/versions/55/install.sh index 1d75db289..b6c4350a6 100755 --- a/plugins/php/versions/55/install.sh +++ b/plugins/php/versions/55/install.sh @@ -1,6 +1,6 @@ #!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin -export PATH +export PATH=$PATH:/opt/homebrew/bin curPath=`pwd` rootPath=$(dirname "$curPath") @@ -131,6 +131,7 @@ if [ ! -d $serverPath/php/55 ];then make clean && make -j${cpuCore} && make install && make clean # rm -rf $sourcePath/php/php${PHP_VER} + echo "安装php-${version}成功" fi #------------------------ install end ------------------------------------# diff --git a/plugins/php/versions/56/install.sh b/plugins/php/versions/56/install.sh index 5641b2ec9..41da1d762 100755 --- a/plugins/php/versions/56/install.sh +++ b/plugins/php/versions/56/install.sh @@ -1,6 +1,6 @@ #!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin -export PATH +export PATH=$PATH:/opt/homebrew/bin # cd /www/server/mdserver-web/plugins/php && /bin/bash install.sh install 56 @@ -59,13 +59,13 @@ if [ ! -d $sourcePath/php/php${PHP_VER} ];then mv $sourcePath/php/php-${version} $sourcePath/php/php${PHP_VER} fi -OPTIONS='' +OPTIONS='--without-iconv' if [ $sysName == 'Darwin' ]; then - OPTIONS='--without-iconv' OPTIONS="${OPTIONS} --with-freetype-dir=${serverPath}/lib/freetype" - OPTIONS="${OPTIONS} --with-curl=${serverPath}/lib/curl" + OPTIONS="${OPTIONS} --with-curl=$(brew --prefix curl)" + OPTIONS="${OPTIONS} --with-zlib-dir=$(brew --prefix zlib)" + OPTIONS="${OPTIONS} --with-external-pcre=$(brew --prefix pcre2)" else - OPTIONS='--without-iconv' # OPTIONS="--with-iconv=${serverPath}/lib/libiconv" OPTIONS="${OPTIONS} --with-curl" fi diff --git a/plugins/php/versions/70/install.sh b/plugins/php/versions/70/install.sh index d614dd20b..d8d019309 100755 --- a/plugins/php/versions/70/install.sh +++ b/plugins/php/versions/70/install.sh @@ -1,6 +1,6 @@ #!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin -export PATH +export PATH=$PATH:/opt/homebrew/bin curPath=`pwd` rootPath=$(dirname "$curPath") @@ -57,13 +57,12 @@ if [ ! -d $sourcePath/php/php${PHP_VER} ];then mv $sourcePath/php/php-${version} $sourcePath/php/php${PHP_VER} fi -OPTIONS='' +OPTIONS='--without-iconv' if [ $sysName == 'Darwin' ]; then - OPTIONS='--without-iconv' OPTIONS="${OPTIONS} --with-freetype-dir=${serverPath}/lib/freetype" - OPTIONS="${OPTIONS} --with-curl=${serverPath}/lib/curl" + OPTIONS="${OPTIONS} --with-curl" + OPTIONS="${OPTIONS} --with-external-pcre=$(brew --prefix pcre2)" else - OPTIONS='--without-iconv' # OPTIONS="--with-iconv=${serverPath}/lib/libiconv" OPTIONS="${OPTIONS} --with-curl" fi @@ -135,7 +134,7 @@ Uninstall_php() { $serverPath/php/init.d/php70 stop rm -rf $serverPath/php/70 - echo "卸载php-7.0.30 ..." > $install_tmp + echo "卸载php-7.0.30 ..." } action=${1} diff --git a/plugins/php/versions/71/install.sh b/plugins/php/versions/71/install.sh index d1384f36c..a8bd18914 100755 --- a/plugins/php/versions/71/install.sh +++ b/plugins/php/versions/71/install.sh @@ -1,6 +1,6 @@ #!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin -export PATH +export PATH=$PATH:/opt/homebrew/bin curPath=`pwd` rootPath=$(dirname "$curPath") @@ -60,7 +60,9 @@ fi OPTIONS='' OPTIONS='--without-iconv' if [ $sysName == 'Darwin' ]; then - OPTIONS="${OPTIONS} --with-curl=${serverPath}/lib/curl" + OPTIONS="${OPTIONS} --with-freetype-dir=${serverPath}/lib/freetype" + OPTIONS="${OPTIONS} --with-curl" + OPTIONS="${OPTIONS} --with-external-pcre=$(brew --prefix pcre2)" else OPTIONS="${OPTIONS} --with-curl" fi diff --git a/plugins/php/versions/72/install.sh b/plugins/php/versions/72/install.sh index 852f28cc5..a4aeff987 100755 --- a/plugins/php/versions/72/install.sh +++ b/plugins/php/versions/72/install.sh @@ -1,6 +1,6 @@ #!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin -export PATH +export PATH=$PATH:/opt/homebrew/bin curPath=`pwd` rootPath=$(dirname "$curPath") @@ -16,7 +16,7 @@ PHP_VER=72 Install_php() { #------------------------ install start ------------------------------------# -echo "安装php-${version} ..." > $install_tmp +echo "安装php-${version} ..." mkdir -p $sourcePath/php mkdir -p $serverPath/php @@ -58,12 +58,10 @@ if [ ! -d $sourcePath/php/php${PHP_VER} ];then mv $sourcePath/php/php-${version} $sourcePath/php/php${PHP_VER} fi -OPTIONS='' +OPTIONS='--without-iconv' if [ $sysName == 'Darwin' ]; then - OPTIONS='--without-iconv' - OPTIONS="${OPTIONS} --with-curl=${serverPath}/lib/curl" + OPTIONS="${OPTIONS} --with-curl" else - OPTIONS='--without-iconv' OPTIONS="${OPTIONS} --with-curl" fi @@ -97,6 +95,12 @@ else fi # ----- cpu end ------ +if [ "${SYS_ARCH}" == "arm64" ];then + # 修复arm64架构下安装 + # /www/server/mdserver-web/plugins/php/versions/72/src/reentrancy.c > /www/server/source/php/php72/main/reentrancy.c + cat ${curPath}/versions/${PHP_VER}/src/reentrancy.c > $sourcePath/php/php${PHP_VER}/main/reentrancy.c +fi + if [ ! -d $serverPath/php/72 ];then cd $sourcePath/php/php${PHP_VER} && ./configure \ --prefix=$serverPath/php/72 \ @@ -132,7 +136,7 @@ Uninstall_php() { $serverPath/php/init.d/php72 stop rm -rf $serverPath/php/72 - echo "卸载php-${version}..." > $install_tmp + echo "卸载php-${version}..." } action=${1} diff --git a/plugins/php/versions/72/src/reentrancy.c b/plugins/php/versions/72/src/reentrancy.c new file mode 100644 index 000000000..69096cbb1 --- /dev/null +++ b/plugins/php/versions/72/src/reentrancy.c @@ -0,0 +1,450 @@ +/* + +----------------------------------------------------------------------+ + | PHP Version 7 | + +----------------------------------------------------------------------+ + | Copyright (c) 1997-2018 The PHP Group | + +----------------------------------------------------------------------+ + | This source file is subject to version 3.01 of the PHP license, | + | that is bundled with this package in the file LICENSE, and is | + | available through the world-wide-web at the following url: | + | http://www.php.net/license/3_01.txt | + | If you did not receive a copy of the PHP license and are unable to | + | obtain it through the world-wide-web, please send a note to | + | license@php.net so we can mail you a copy immediately. | + +----------------------------------------------------------------------+ + | Author: Sascha Schumann | + +----------------------------------------------------------------------+ + */ + +/* $Id$ */ + +#include +#include +#include +#ifdef HAVE_DIRENT_H +#include +#endif + +#include "php_reentrancy.h" +#include "ext/standard/php_rand.h" /* for PHP_RAND_MAX */ + +enum { + LOCALTIME_R, + CTIME_R, + ASCTIME_R, + GMTIME_R, + READDIR_R, + NUMBER_OF_LOCKS +}; + +#if defined(PHP_NEED_REENTRANCY) + +#include + +static MUTEX_T reentrant_locks[NUMBER_OF_LOCKS]; + +#define local_lock(x) tsrm_mutex_lock(reentrant_locks[x]) +#define local_unlock(x) tsrm_mutex_unlock(reentrant_locks[x]) + +#else + +#define local_lock(x) +#define local_unlock(x) + +#endif + +#if defined(PHP_IRIX_TIME_R) + +#define HAVE_CTIME_R 1 +#define HAVE_ASCTIME_R 1 + +PHPAPI char *php_ctime_r(const time_t *clock, char *buf) +{ + if (ctime_r(clock, buf) == buf) + return (buf); + return (NULL); +} + +PHPAPI char *php_asctime_r(const struct tm *tm, char *buf) +{ + if (asctime_r(tm, buf) == buf) + return (buf); + return (NULL); +} + +#endif + +#if defined(PHP_HPUX_TIME_R) + +#define HAVE_LOCALTIME_R 1 +#define HAVE_CTIME_R 1 +#define HAVE_ASCTIME_R 1 +#define HAVE_GMTIME_R 1 + +PHPAPI struct tm *php_localtime_r(const time_t *const timep, struct tm *p_tm) +{ + if (localtime_r(timep, p_tm) == 0) + return (p_tm); + return (NULL); +} + +PHPAPI char *php_ctime_r(const time_t *clock, char *buf) +{ + if (ctime_r(clock, buf, 26) != -1) + return (buf); + return (NULL); +} + +PHPAPI char *php_asctime_r(const struct tm *tm, char *buf) +{ + if (asctime_r(tm, buf, 26) != -1) + return (buf); + return (NULL); +} + +PHPAPI struct tm *php_gmtime_r(const time_t *const timep, struct tm *p_tm) +{ + if (gmtime_r(timep, p_tm) == 0) + return (p_tm); + return (NULL); +} + +#endif + +#if defined(__BEOS__) + +PHPAPI struct tm *php_gmtime_r(const time_t *const timep, struct tm *p_tm) +{ + /* Modified according to LibC definition */ + if (((struct tm*)gmtime_r(timep, p_tm)) == p_tm) + return (p_tm); + return (NULL); +} + +#endif /* BEOS */ + +#if !defined(HAVE_POSIX_READDIR_R) + +PHPAPI int php_readdir_r(DIR *dirp, struct dirent *entry, + struct dirent **result) +{ +#if defined(HAVE_OLD_READDIR_R) + int ret = 0; + + /* We cannot rely on the return value of readdir_r + as it differs between various platforms + (HPUX returns 0 on success whereas Solaris returns non-zero) + */ + entry->d_name[0] = '\0'; + readdir_r(dirp, entry, result); + + if (entry->d_name[0] == '\0') { + *result = NULL; + ret = errno; + } else { + *result = entry; + } + return ret; +#else + struct dirent *ptr; + int ret = 0; + + local_lock(READDIR_R); + + errno = 0; + + ptr = readdir(dirp); + + if (!ptr && errno != 0) + ret = errno; + + if (ptr) + memcpy(entry, ptr, sizeof(*ptr)); + + *result = ptr; + + local_unlock(READDIR_R); + + return ret; +#endif +} + +#endif + +#if !defined(HAVE_LOCALTIME_R) && defined(HAVE_LOCALTIME) + +PHPAPI struct tm *php_localtime_r(const time_t *const timep, struct tm *p_tm) +{ + struct tm *tmp; + + local_lock(LOCALTIME_R); + + tmp = localtime(timep); + if (tmp) { + memcpy(p_tm, tmp, sizeof(struct tm)); + tmp = p_tm; + } + + local_unlock(LOCALTIME_R); + + return tmp; +} + +#endif + +#if !defined(HAVE_CTIME_R) && defined(HAVE_CTIME) + +PHPAPI char *php_ctime_r(const time_t *clock, char *buf) +{ + char *tmp; + + local_lock(CTIME_R); + + tmp = ctime(clock); + strcpy(buf, tmp); + + local_unlock(CTIME_R); + + return buf; +} + +#endif + +#if !defined(HAVE_ASCTIME_R) && defined(HAVE_ASCTIME) + +PHPAPI char *php_asctime_r(const struct tm *tm, char *buf) +{ + char *tmp; + + local_lock(ASCTIME_R); + + tmp = asctime(tm); + strcpy(buf, tmp); + + local_unlock(ASCTIME_R); + + return buf; +} + +#endif + +#if !defined(HAVE_GMTIME_R) && defined(HAVE_GMTIME) + +PHPAPI struct tm *php_gmtime_r(const time_t *const timep, struct tm *p_tm) +{ + struct tm *tmp; + + local_lock(GMTIME_R); + + tmp = gmtime(timep); + if (tmp) { + memcpy(p_tm, tmp, sizeof(struct tm)); + tmp = p_tm; + } + + local_unlock(GMTIME_R); + + return tmp; +} + +#endif + +#if defined(PHP_NEED_REENTRANCY) + +void reentrancy_startup(void) +{ + int i; + + for (i = 0; i < NUMBER_OF_LOCKS; i++) { + reentrant_locks[i] = tsrm_mutex_alloc(); + } +} + +void reentrancy_shutdown(void) +{ + int i; + + for (i = 0; i < NUMBER_OF_LOCKS; i++) { + tsrm_mutex_free(reentrant_locks[i]); + } +} + +#endif + +#ifndef HAVE_RAND_R + +/*- + * Copyright (c) 1990, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * Posix rand_r function added May 1999 by Wes Peters . + */ + +#include +#include + +static int +do_rand(unsigned long *ctx) +{ + return ((*ctx = *ctx * 1103515245 + 12345) % ((u_long)PHP_RAND_MAX + 1)); +} + + +PHPAPI int +php_rand_r(unsigned int *ctx) +{ + u_long val = (u_long) *ctx; + *ctx = do_rand(&val); + return (int) *ctx; +} + +#endif + + +#ifndef HAVE_STRTOK_R + +/* + * Copyright (c) 1998 Softweyr LLC. All rights reserved. + * + * strtok_r, from Berkeley strtok + * Oct 13, 1998 by Wes Peters + * + * Copyright (c) 1988, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notices, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notices, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * + * This product includes software developed by Softweyr LLC, the + * University of California, Berkeley, and its contributors. + * + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY SOFTWEYR LLC, THE REGENTS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SOFTWEYR LLC, THE + * REGENTS, OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include + +PHPAPI char * +php_strtok_r(char *s, const char *delim, char **last) +{ + char *spanp; + int c, sc; + char *tok; + + if (s == NULL && (s = *last) == NULL) + { + return NULL; + } + + /* + * Skip (span) leading delimiters (s += strspn(s, delim), sort of). + */ +cont: + c = *s++; + for (spanp = (char *)delim; (sc = *spanp++) != 0; ) + { + if (c == sc) + { + goto cont; + } + } + + if (c == 0) /* no non-delimiter characters */ + { + *last = NULL; + return NULL; + } + tok = s - 1; + + /* + * Scan token (scan for delimiters: s += strcspn(s, delim), sort of). + * Note that delim must have one NUL; we stop if we see that, too. + */ + for (;;) + { + c = *s++; + spanp = (char *)delim; + do + { + if ((sc = *spanp++) == c) + { + if (c == 0) + { + s = NULL; + } + else + { + char *w = s - 1; + *w = '\0'; + } + *last = s; + return tok; + } + } + while (sc != 0); + } + /* NOTREACHED */ +} + +#endif + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * End: + * vim600: sw=4 ts=4 fdm=marker + * vim<600: sw=4 ts=4 + */ diff --git a/plugins/php/versions/73/install.sh b/plugins/php/versions/73/install.sh index c58105f3a..7bc93b9f2 100755 --- a/plugins/php/versions/73/install.sh +++ b/plugins/php/versions/73/install.sh @@ -1,6 +1,6 @@ #!/bin/bash -PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin -export PATH +PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin +export PATH=$PATH:/opt/homebrew/bin curPath=`pwd` rootPath=$(dirname "$curPath") @@ -20,7 +20,7 @@ PHP_VER=73 Install_php() { #------------------------ install start ------------------------------------# -echo "安装php-${version} ..." > $install_tmp +echo "安装php-${version} ..." mkdir -p $sourcePath/php mkdir -p $serverPath/php @@ -65,9 +65,9 @@ fi OPTIONS='' if [ $sysName == 'Darwin' ]; then OPTIONS='--without-iconv' - OPTIONS="${OPTIONS} --with-curl=${serverPath}/lib/curl" - # OPTIONS="${OPTIONS} --with-libzip=${serverPath}/lib/libzip" - # OPTIONS="${OPTIONS} --enable-zip" + OPTIONS="${OPTIONS} --with-curl" + OPTIONS="${OPTIONS} --with-external-pcre=$(brew --prefix pcre2)" + else OPTIONS='--without-iconv' OPTIONS="${OPTIONS} --with-curl" @@ -137,6 +137,8 @@ if [ ! -d $serverPath/php/73 ];then make clean && make -j${cpuCore} && make install && make clean # rm -rf $sourcePath/php/php${PHP_VER} + + echo "安装php-${version}成功" fi #------------------------ install end ------------------------------------# @@ -146,7 +148,7 @@ Uninstall_php() { $serverPath/php/init.d/php73 stop rm -rf $serverPath/php/73 - echo "卸载php-${version}..." > $install_tmp + echo "卸载php-${version}..." } action=${1} diff --git a/plugins/php/versions/74/install.sh b/plugins/php/versions/74/install.sh index ab4114092..96e81437d 100755 --- a/plugins/php/versions/74/install.sh +++ b/plugins/php/versions/74/install.sh @@ -1,6 +1,6 @@ #!/bin/bash -PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin -export PATH +PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin +export PATH=$PATH:/opt/homebrew/bin curPath=`pwd` rootPath=$(dirname "$curPath") @@ -20,10 +20,12 @@ PHP_VER=74 Install_php() { #------------------------ install start ------------------------------------# -echo "安装php-${version} ..." > $install_tmp +echo "安装php-${version} ..." mkdir -p $sourcePath/php mkdir -p $serverPath/php +# cd /Users/midoks/Desktop/mwdev/server/mdserver-web/plugins/php/lib && /bin/bash libzip.sh +# cd /www/server/mdserver-web/plugins/php/lib && /bin/bash libzip.sh cd ${rootPath}/plugins/php/lib && /bin/bash freetype_new.sh cd ${rootPath}/plugins/php/lib && /bin/bash zlib.sh cd ${rootPath}/plugins/php/lib && /bin/bash libzip.sh @@ -80,13 +82,15 @@ cd $sourcePath/php/php${PHP_VER} OPTIONS='' if [ $sysName == 'Darwin' ]; then OPTIONS='--without-iconv' - OPTIONS="${OPTIONS} --with-curl=${serverPath}/lib/curl" - # OPTIONS="${OPTIONS} --enable-zip" + OPTIONS="${OPTIONS} --with-curl" + OPTIONS="${OPTIONS} --with-external-pcre=$(brew --prefix pcre2)" + + # BREW_DIR=`which brew` + # BREW_DIR=${BREW_DIR/\/bin\/brew/} + # XML_LIB_DEPEND_DIR=`brew info libxml2 | grep /opt/homebrew/Cellar/libxml2 | cut -d \ -f 1 | awk 'END {print}'` + # XML_LIB_DEPEND_DIR=`brew info libxml2 | grep ${BREW_DIR}/Cellar/libxml2 | cut -d \ -f 1 | awk 'END {print}'` + # OPTIONS="${OPTIONS} --with-libxml=${XML_LIB_DEPEND_DIR}" - export PATH="/usr/local/opt/bison/bin:$PATH" - export LDFLAGS="-L/usr/local/opt/bison/lib" - export PKG_CONFIG_PATH="/usr/local/opt/libxml2/lib/pkgconfig" - export LDFLAGS="-L/usr/local/opt/libxml2/lib" else OPTIONS='--without-iconv' OPTIONS="${OPTIONS} --with-curl" @@ -131,7 +135,6 @@ else cpuCore="1" fi # ----- cpu end ------ - if [ ! -d $serverPath/php/${PHP_VER} ];then cd $sourcePath/php/php${PHP_VER} && make clean # ./buildconf --force @@ -160,6 +163,8 @@ if [ ! -d $serverPath/php/${PHP_VER} ];then make clean && make -j${cpuCore} && make install && make clean # rm -rf $sourcePath/php/php${PHP_VER} + + echo "安装php-${version}成功" fi #------------------------ install end ------------------------------------# } @@ -168,7 +173,7 @@ Uninstall_php() { $serverPath/php/init.d/php${PHP_VER} stop rm -rf $serverPath/php/${PHP_VER} - echo "卸载php-${version}..." > $install_tmp + echo "卸载php-${version}..." } action=${1} diff --git a/plugins/php/versions/80/install.sh b/plugins/php/versions/80/install.sh index 5414929b1..110249976 100755 --- a/plugins/php/versions/80/install.sh +++ b/plugins/php/versions/80/install.sh @@ -1,6 +1,6 @@ #!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin -export PATH +export PATH=$PATH:/opt/homebrew/bin curPath=`pwd` rootPath=$(dirname "$curPath") @@ -71,17 +71,11 @@ fi cd $sourcePath/php/php${PHP_VER} -OPTIONS='' +OPTIONS='--without-iconv' if [ $sysName == 'Darwin' ]; then - OPTIONS='--without-iconv' - OPTIONS="${OPTIONS} --with-curl=${serverPath}/lib/curl" - - export PATH="/usr/local/opt/bison/bin:$PATH" - export LDFLAGS="-L/usr/local/opt/bison/lib" - export PKG_CONFIG_PATH="/usr/local/opt/libxml2/lib/pkgconfig" - export LDFLAGS="-L/usr/local/opt/libxml2/lib" + OPTIONS="${OPTIONS} --with-curl" + OPTIONS="${OPTIONS} --with-external-pcre=$(brew --prefix pcre2)" else - OPTIONS='--without-iconv' # OPTIONS="--with-iconv=${serverPath}/lib/libiconv" OPTIONS="${OPTIONS} --with-curl" fi @@ -92,10 +86,10 @@ if [ "$IS_64BIT" == "64" ];then fi -argon_version=`pkg-config libargon2 --modversion` -if [ "$?" == "0" ];then - OPTIONS="${OPTIONS} --with-password-argon2" -fi +# argon_version=`pkg-config libargon2 --modversion` +# if [ "$?" == "0" ];then +# OPTIONS="${OPTIONS} --with-password-argon2" +# fi ZIP_OPTION='--with-zip' diff --git a/plugins/php/versions/81/install.sh b/plugins/php/versions/81/install.sh index cdf7df718..153b37b0b 100755 --- a/plugins/php/versions/81/install.sh +++ b/plugins/php/versions/81/install.sh @@ -1,6 +1,6 @@ #!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin -export PATH +export PATH=$PATH:/opt/homebrew/bin curPath=`pwd` rootPath=$(dirname "$curPath") @@ -71,16 +71,10 @@ fi cd $sourcePath/php/php${PHP_VER} -OPTIONS='' +OPTIONS='--without-iconv' if [ $sysName == 'Darwin' ]; then - OPTIONS='--without-iconv' - OPTIONS="${OPTIONS} --with-curl=${serverPath}/lib/curl" - export PATH="/usr/local/opt/bison/bin:$PATH" - export LDFLAGS="-L/usr/local/opt/bison/lib" - export PKG_CONFIG_PATH="/usr/local/opt/libxml2/lib/pkgconfig" - export LDFLAGS="-L/usr/local/opt/libxml2/lib" + OPTIONS="${OPTIONS} --with-curl" else - OPTIONS='--without-iconv' OPTIONS="${OPTIONS} --with-curl" fi diff --git a/plugins/php/versions/82/install.sh b/plugins/php/versions/82/install.sh index 6b9f12759..1dcff4130 100755 --- a/plugins/php/versions/82/install.sh +++ b/plugins/php/versions/82/install.sh @@ -1,6 +1,6 @@ #!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin -export PATH +export PATH=$PATH:/opt/homebrew/bin curPath=`pwd` rootPath=$(dirname "$curPath") @@ -72,12 +72,10 @@ fi cd $sourcePath/php/php${PHP_VER} -OPTIONS='' +OPTIONS='--without-iconv' if [ $sysName == 'Darwin' ]; then - OPTIONS='--without-iconv' - OPTIONS="${OPTIONS} --with-curl=${serverPath}/lib/curl" + OPTIONS="${OPTIONS} --with-curl" else - OPTIONS='--without-iconv' OPTIONS="${OPTIONS} --with-curl" fi diff --git a/plugins/php/versions/83/install.sh b/plugins/php/versions/83/install.sh index 19f4ae6f6..a7a85f1f5 100755 --- a/plugins/php/versions/83/install.sh +++ b/plugins/php/versions/83/install.sh @@ -1,6 +1,6 @@ #!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin -export PATH +export PATH=$PATH:/opt/homebrew/bin curPath=`pwd` rootPath=$(dirname "$curPath") @@ -71,12 +71,10 @@ fi cd $sourcePath/php/php${PHP_VER} -OPTIONS='' +OPTIONS='--without-iconv' if [ $sysName == 'Darwin' ]; then - OPTIONS='--without-iconv' - OPTIONS="${OPTIONS} --with-curl=${serverPath}/lib/curl" + OPTIONS="${OPTIONS} --with-curl" else - OPTIONS='--without-iconv' OPTIONS="${OPTIONS} --with-curl" fi diff --git a/plugins/php/versions/all_mac.sh b/plugins/php/versions/all_mac.sh new file mode 100644 index 000000000..5b42c677c --- /dev/null +++ b/plugins/php/versions/all_mac.sh @@ -0,0 +1,70 @@ +#! /bin/sh +export PATH=$PATH:/opt/local/bin:/opt/local/sbin:/opt/local/share/man:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/opt/homebrew/bin +DIR=$(cd "$(dirname "$0")"; pwd) +ROOT_DIR=$(cd "$(dirname "$0")"; pwd) + +# cd /Users/midoks/Desktop/mwdev/server/mdserver-web/plugins/php && bash install.sh install 72 +# cd /Users/midoks/Desktop/mwdev/server/mdserver-web/plugins/php/versions/common && bash mcrypt.sh install 82 +# cd /Users/midoks/Desktop/mwdev/server/mdserver-web/plugins/php/lib && bash libmcrypt.sh + +# cd /Users/midoks/Desktop/mwdev/server/mdserver-web/scripts/quick && bash debug.sh +# cd /Users/midoks/Desktop/mwdev/server/mdserver-web/plugins/php/versions && /bin/bash all_mac.sh + +# cd /Users/midoks/Desktop/mwdev/server/mdserver-web/plugins/php && bash install.sh install 55 +# cd /Users/midoks/Desktop/mwdev/server/mdserver-web/plugins/php/versions/common && bash gd.sh install 73 +# cd /Users/midoks/Desktop/mwdev/server/mdserver-web/plugins/php/versions/common && bash swoole.sh install 54 + + +# PHP_VER=52 +# echo "php${PHP_VER} -- start" +# cmd_ext=$(ls -l $DIR/versions/$PHP_VER/ |awk '{print $9}') +# cd $DIR && /bin/bash install.sh install $PHP_VER +# for ii in $cmd_ext +# do +# if [ "install.sh" == "$ii" ];then +# echo '' > /tmp/t.log +# else +# cd $DIR/versions/$PHP_VER && /bin/bash $ii install $PHP_VER +# fi +# done +# echo "php${PHP_VER} -- end" + + +PHP_VER_LIST=(53 54 55 56 70 71 72 73 74 80 81 82) +# PHP_VER_LIST=(81) +for PHP_VER in ${PHP_VER_LIST[@]}; do + echo "php${PHP_VER} -- start" + if [ ! -d /Users/midoks/Desktop/mwdev/server/php/${PHP_VER} ];then + cd /Users/midoks/Desktop/mwdev//server/mdserver-web/plugins/php && bash install.sh install ${PHP_VER} + fi + echo "php${PHP_VER} -- end" +done + +cd $DIR +PHP_VER_LIST=(53 54 55 56 70 71 72 73 74 80 81 82) +# yar +PHP_EXT_LIST=(ZendGuardLoader pdo mysqlnd sqlite3 openssl opcache mcrypt fileinfo \ + exif gd intl pcntl memcache memcached redis imagemagick xdebug \ + swoole yac apc mongo mongodb solr seaslog mbstring iconv) + +for PHP_VER in ${PHP_VER_LIST[@]}; do + echo "php${PHP_VER} -- start" + + if [ ! -d /www/server/php/${PHP_VER} ];then + echo "php${PHP_VER} is not install!" + continue + fi + + NON_ZTS_FILENAME=`ls /Users/midoks/Desktop/mwdev/server/php/${PHP_VER}/lib/php/extensions | grep no-debug-non-zts` + for EXT in ${PHP_EXT_LIST[@]}; do + extFile=/www/server/php/${PHP_VER}/lib/php/extensions/${NON_ZTS_FILENAME}/${EXT}.so + echo "${PHP_VER} ${EXT} start" + if [ ! -f $extFile ];then + bash common.sh $PHP_VER install ${EXT} + fi + echo "${PHP_VER} ${EXT} end" + done + + echo "php${PHP_VER} -- end" +done + diff --git a/plugins/php/versions/all_test.sh b/plugins/php/versions/all_test.sh index 6e1aa6a72..aebe49bfe 100644 --- a/plugins/php/versions/all_test.sh +++ b/plugins/php/versions/all_test.sh @@ -1,5 +1,7 @@ #! /bin/sh -export PATH=$PATH:/opt/local/bin:/opt/local/sbin:/opt/local/share/man:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/opt/homebrew/bin +export PATH=$PATH:/opt/local/bin:/opt/local/sbin:/opt/local/share/man:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin +export PATH=$PATH:/opt/homebrew/bin + DIR=$(cd "$(dirname "$0")"; pwd) ROOT_DIR=$(cd "$(dirname "$0")"; pwd) diff --git a/plugins/php/versions/common.sh b/plugins/php/versions/common.sh index 3d8b73a3a..e6d15c554 100644 --- a/plugins/php/versions/common.sh +++ b/plugins/php/versions/common.sh @@ -1,6 +1,6 @@ #!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin -export PATH +export PATH=$PATH:/opt/homebrew/bin curPath=`pwd` rootPath=$(dirname "$curPath") diff --git a/plugins/php/versions/common/bcmath.sh b/plugins/php/versions/common/bcmath.sh index 61ca4f384..9d8cce201 100755 --- a/plugins/php/versions/common/bcmath.sh +++ b/plugins/php/versions/common/bcmath.sh @@ -1,6 +1,6 @@ #!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin -export PATH +export PATH=$PATH:/opt/homebrew/bin curPath=`pwd` diff --git a/plugins/php/versions/common/exif.sh b/plugins/php/versions/common/exif.sh index f2a7112f2..68883277f 100755 --- a/plugins/php/versions/common/exif.sh +++ b/plugins/php/versions/common/exif.sh @@ -1,6 +1,6 @@ #!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin -export PATH +export PATH=$PATH:/opt/homebrew/bin curPath=`pwd` diff --git a/plugins/php/versions/common/fileinfo.sh b/plugins/php/versions/common/fileinfo.sh index 38bb379a6..15d698409 100755 --- a/plugins/php/versions/common/fileinfo.sh +++ b/plugins/php/versions/common/fileinfo.sh @@ -1,6 +1,6 @@ #!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin -export PATH +export PATH=$PATH:/opt/homebrew/bin curPath=`pwd` diff --git a/plugins/php/versions/common/gd.sh b/plugins/php/versions/common/gd.sh index 2d20d1db9..3265e2de8 100755 --- a/plugins/php/versions/common/gd.sh +++ b/plugins/php/versions/common/gd.sh @@ -1,6 +1,6 @@ #!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin -export PATH +export PATH=$PATH:/opt/homebrew/bin curPath=`pwd` diff --git a/plugins/php/versions/common/gd_old.sh b/plugins/php/versions/common/gd_old.sh index f57e36bae..dc1c62292 100755 --- a/plugins/php/versions/common/gd_old.sh +++ b/plugins/php/versions/common/gd_old.sh @@ -1,6 +1,6 @@ #!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin -export PATH +export PATH=$PATH:/opt/homebrew/bin curPath=`pwd` diff --git a/plugins/php/versions/common/gettext.sh b/plugins/php/versions/common/gettext.sh index 169bd67f5..0ccffb443 100755 --- a/plugins/php/versions/common/gettext.sh +++ b/plugins/php/versions/common/gettext.sh @@ -1,6 +1,6 @@ #!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin -export PATH +export PATH=$PATH:/opt/homebrew/bin curPath=`pwd` diff --git a/plugins/php/versions/common/gmp.sh b/plugins/php/versions/common/gmp.sh index 4fab8b503..67e0dfe7f 100755 --- a/plugins/php/versions/common/gmp.sh +++ b/plugins/php/versions/common/gmp.sh @@ -1,6 +1,6 @@ #!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin -export PATH +export PATH=$PATH:/opt/homebrew/bin curPath=`pwd` diff --git a/plugins/php/versions/common/iconv.sh b/plugins/php/versions/common/iconv.sh index e0b65b6fa..c213617c7 100755 --- a/plugins/php/versions/common/iconv.sh +++ b/plugins/php/versions/common/iconv.sh @@ -1,6 +1,6 @@ #!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin -export PATH +export PATH=$PATH:/opt/homebrew/bin curPath=`pwd` diff --git a/plugins/php/versions/common/igbinary.sh b/plugins/php/versions/common/igbinary.sh index 42e34ab16..5c4ec1149 100755 --- a/plugins/php/versions/common/igbinary.sh +++ b/plugins/php/versions/common/igbinary.sh @@ -1,6 +1,6 @@ #!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin -export PATH +export PATH=$PATH:/opt/homebrew/bin curPath=`pwd` rootPath=$(dirname "$curPath") diff --git a/plugins/php/versions/common/imagemagick.sh b/plugins/php/versions/common/imagemagick.sh index 09eff0127..6fe8b7070 100755 --- a/plugins/php/versions/common/imagemagick.sh +++ b/plugins/php/versions/common/imagemagick.sh @@ -1,6 +1,6 @@ #!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin -export PATH +export PATH=$PATH:/opt/homebrew/bin curPath=`pwd` diff --git a/plugins/php/versions/common/intl.sh b/plugins/php/versions/common/intl.sh index 7f1ca6d21..816312638 100755 --- a/plugins/php/versions/common/intl.sh +++ b/plugins/php/versions/common/intl.sh @@ -1,6 +1,6 @@ #!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin -export PATH +export PATH=$PATH:/opt/homebrew/bin curPath=`pwd` diff --git a/plugins/php/versions/common/ioncube.sh b/plugins/php/versions/common/ioncube.sh index beb9288f4..4ae471f72 100755 --- a/plugins/php/versions/common/ioncube.sh +++ b/plugins/php/versions/common/ioncube.sh @@ -1,6 +1,6 @@ #!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin -export PATH +export PATH=$PATH:/opt/homebrew/bin curPath=`pwd` diff --git a/plugins/php/versions/common/mcrypt.sh b/plugins/php/versions/common/mcrypt.sh index 32d8a9042..d214dc136 100755 --- a/plugins/php/versions/common/mcrypt.sh +++ b/plugins/php/versions/common/mcrypt.sh @@ -1,6 +1,6 @@ #!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin -export PATH +export PATH=$PATH:/opt/homebrew/bin curPath=`pwd` rootPath=$(dirname "$curPath") @@ -14,7 +14,7 @@ actionType=$1 version=$2 LIBNAME=mcrypt -LIBV=1.0.5 +LIBV=1.0.6 if [ "$version" -lt "72" ];then echo "not need" @@ -64,6 +64,10 @@ Install_lib() OPTIONS="$OPTIONS --build=aarch64-unknown-linux-gnu --host=aarch64-unknown-linux-gnu" fi + if [ "$sysName" == "Darwin" ];then + OPTIONS="$OPTIONS --with-mcrypt=$(brew --prefix mcrypt)" + fi + $serverPath/php/$version/bin/phpize ./configure --with-php-config=$serverPath/php/$version/bin/php-config $OPTIONS make clean && make && make install && make clean diff --git a/plugins/php/versions/common/memcache.sh b/plugins/php/versions/common/memcache.sh index 269c0bb96..968bc21d3 100755 --- a/plugins/php/versions/common/memcache.sh +++ b/plugins/php/versions/common/memcache.sh @@ -1,6 +1,6 @@ #!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin -export PATH +export PATH=$PATH:/opt/homebrew/bin curPath=`pwd` diff --git a/plugins/php/versions/common/memcached.sh b/plugins/php/versions/common/memcached.sh index 1eeda2e51..0b641d9a8 100755 --- a/plugins/php/versions/common/memcached.sh +++ b/plugins/php/versions/common/memcached.sh @@ -1,6 +1,6 @@ #!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin -export PATH +export PATH=$PATH:/opt/homebrew/bin curPath=`pwd` @@ -62,10 +62,16 @@ Install_lib() OPTIONS="$OPTIONS --build=aarch64-unknown-linux-gnu --host=aarch64-unknown-linux-gnu" fi - pkg-config --exists libmemcached - if [ "$?" != "0" ]; then - cd ${rootPath}/plugins/php/lib && /bin/bash libmemcached.sh - OPTIONS="$OPTIONS --with-libmemcached-dir=${serverPath}/lib/libmemcached" + + if [ "$sysName" == "Darwin" ];then + OPTIONS="$OPTIONS --with-zlib-dir=$(brew --prefix zlib)" + OPTIONS="$OPTIONS --with-libmemcached-dir=$(brew --prefix libmemcached)" + else + pkg-config --exists libmemcached + if [ "$?" != "0" ]; then + cd ${rootPath}/plugins/php/lib && /bin/bash libmemcached.sh + OPTIONS="$OPTIONS --with-libmemcached-dir=${serverPath}/lib/libmemcached" + fi fi # sed -i '_bak' "3237,3238s#ulong#zend_ulong#g" $php_lib/${LIBNAME}-${LIBV}/php_memcached.c diff --git a/plugins/php/versions/common/mongo.sh b/plugins/php/versions/common/mongo.sh index ad5356190..31a57a6d3 100755 --- a/plugins/php/versions/common/mongo.sh +++ b/plugins/php/versions/common/mongo.sh @@ -1,6 +1,6 @@ #!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin -export PATH +export PATH=$PATH:/opt/homebrew/bin curPath=`pwd` diff --git a/plugins/php/versions/common/mongodb.sh b/plugins/php/versions/common/mongodb.sh index 5249b7820..2a23171b8 100755 --- a/plugins/php/versions/common/mongodb.sh +++ b/plugins/php/versions/common/mongodb.sh @@ -1,6 +1,6 @@ #!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin -export PATH +export PATH=$PATH:/opt/homebrew/bin curPath=`pwd` diff --git a/plugins/php/versions/common/opcache.sh b/plugins/php/versions/common/opcache.sh index 0bb29855b..4aecfd62a 100755 --- a/plugins/php/versions/common/opcache.sh +++ b/plugins/php/versions/common/opcache.sh @@ -1,6 +1,6 @@ #!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin -export PATH +export PATH=$PATH:/opt/homebrew/bin curPath=`pwd` diff --git a/plugins/php/versions/common/openssl.sh b/plugins/php/versions/common/openssl.sh index f0e6424a4..1ca7adcaf 100755 --- a/plugins/php/versions/common/openssl.sh +++ b/plugins/php/versions/common/openssl.sh @@ -1,6 +1,6 @@ #!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin -export PATH +export PATH=$PATH:/opt/homebrew/bin curPath=`pwd` @@ -47,7 +47,10 @@ Install_lib() fi if [ "$sysName" == "Darwin" ] ;then - LIB_DEPEND_DIR=`brew info openssl@1.1 | grep /usr/local/Cellar/openssl | cut -d \ -f 1 | awk 'END {print}'` + BREW_DIR=`which brew` + BREW_DIR=${BREW_DIR/\/bin\/brew/} + + LIB_DEPEND_DIR=`brew info openssl@1.1 | grep ${BREW_DIR}/Cellar/openssl | cut -d \ -f 1 | awk 'END {print}'` export PKG_CONFIG_PATH=$LIB_DEPEND_DIR/lib/pkgconfig fi @@ -65,7 +68,7 @@ Install_lib() # openssl_version=`pkg-config openssl --modversion` # export PKG_CONFIG_PATH=$serverPath/lib/openssl10/lib/pkgconfig - if [ "$version" -lt "81" ];then + if [ "$version" -lt "81" ] && [ "$sysName" != "Darwin" ];then export PKG_CONFIG_PATH=$serverPath/lib/openssl10/lib/pkgconfig fi diff --git a/plugins/php/versions/common/pcntl.sh b/plugins/php/versions/common/pcntl.sh index 158ca9d7f..c5fda2e8a 100755 --- a/plugins/php/versions/common/pcntl.sh +++ b/plugins/php/versions/common/pcntl.sh @@ -1,6 +1,6 @@ #!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin -export PATH +export PATH=$PATH:/opt/homebrew/bin curPath=`pwd` diff --git a/plugins/php/versions/common/phalcon.sh b/plugins/php/versions/common/phalcon.sh index 81084d72b..8bf473464 100755 --- a/plugins/php/versions/common/phalcon.sh +++ b/plugins/php/versions/common/phalcon.sh @@ -1,6 +1,6 @@ #!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin -export PATH +export PATH=$PATH:/opt/homebrew/bin curPath=`pwd` diff --git a/plugins/php/versions/common/redis.sh b/plugins/php/versions/common/redis.sh index 14df2f3fd..5c59965a9 100755 --- a/plugins/php/versions/common/redis.sh +++ b/plugins/php/versions/common/redis.sh @@ -1,6 +1,6 @@ #!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin -export PATH +export PATH=$PATH:/opt/homebrew/bin curPath=`pwd` diff --git a/plugins/php/versions/common/seaslog.sh b/plugins/php/versions/common/seaslog.sh index d7a0c910e..29ebabcfa 100755 --- a/plugins/php/versions/common/seaslog.sh +++ b/plugins/php/versions/common/seaslog.sh @@ -1,6 +1,6 @@ #!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin -export PATH +export PATH=$PATH:/opt/homebrew/bin curPath=`pwd` diff --git a/plugins/php/versions/common/sg11.sh b/plugins/php/versions/common/sg11.sh index 363aefa29..895c4c439 100644 --- a/plugins/php/versions/common/sg11.sh +++ b/plugins/php/versions/common/sg11.sh @@ -1,8 +1,8 @@ #!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin -export PATH -curPath=`pwd` +export PATH=$PATH:/opt/homebrew/bin +curPath=`pwd` rootPath=$(dirname "$curPath") rootPath=$(dirname "$rootPath") rootPath=$(dirname "$rootPath") diff --git a/plugins/php/versions/common/sodium.sh b/plugins/php/versions/common/sodium.sh index 1ed75bb7e..2bc1b89d2 100755 --- a/plugins/php/versions/common/sodium.sh +++ b/plugins/php/versions/common/sodium.sh @@ -1,6 +1,6 @@ #!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin -export PATH +export PATH=$PATH:/opt/homebrew/bin curPath=`pwd` diff --git a/plugins/php/versions/common/solr.sh b/plugins/php/versions/common/solr.sh index bdbe6275e..a45cd8824 100755 --- a/plugins/php/versions/common/solr.sh +++ b/plugins/php/versions/common/solr.sh @@ -1,6 +1,6 @@ #!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin -export PATH +export PATH=$PATH:/opt/homebrew/bin curPath=`pwd` diff --git a/plugins/php/versions/common/swoole.sh b/plugins/php/versions/common/swoole.sh index 83422f5df..bf7ffa155 100755 --- a/plugins/php/versions/common/swoole.sh +++ b/plugins/php/versions/common/swoole.sh @@ -1,6 +1,6 @@ #!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin -export PATH +export PATH=$PATH:/opt/homebrew/bin curPath=`pwd` diff --git a/plugins/php/versions/common/xdebug.sh b/plugins/php/versions/common/xdebug.sh index ba5a9d9c5..adc4ffeed 100755 --- a/plugins/php/versions/common/xdebug.sh +++ b/plugins/php/versions/common/xdebug.sh @@ -1,6 +1,6 @@ #!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin -export PATH +export PATH=$PATH:/opt/homebrew/bin curPath=`pwd` diff --git a/plugins/php/versions/common/xhprof.sh b/plugins/php/versions/common/xhprof.sh index f73ff87a2..a19b28c82 100755 --- a/plugins/php/versions/common/xhprof.sh +++ b/plugins/php/versions/common/xhprof.sh @@ -1,6 +1,6 @@ #!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin -export PATH +export PATH=$PATH:/opt/homebrew/bin curPath=`pwd` diff --git a/plugins/php/versions/common/yac.sh b/plugins/php/versions/common/yac.sh index c90bc2c8e..47dce59f4 100755 --- a/plugins/php/versions/common/yac.sh +++ b/plugins/php/versions/common/yac.sh @@ -1,6 +1,6 @@ #!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin -export PATH +export PATH=$PATH:/opt/homebrew/bin curPath=`pwd` diff --git a/plugins/php/versions/common/yaf.sh b/plugins/php/versions/common/yaf.sh index be05e77d6..d1ec64b54 100755 --- a/plugins/php/versions/common/yaf.sh +++ b/plugins/php/versions/common/yaf.sh @@ -1,6 +1,6 @@ #!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin -export PATH +export PATH=$PATH:/opt/homebrew/bin curPath=`pwd` diff --git a/plugins/php/versions/common/yaml.sh b/plugins/php/versions/common/yaml.sh index 62ecb6157..b9cd58ab5 100755 --- a/plugins/php/versions/common/yaml.sh +++ b/plugins/php/versions/common/yaml.sh @@ -1,6 +1,6 @@ #!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin -export PATH +export PATH=$PATH:/opt/homebrew/bin curPath=`pwd` diff --git a/plugins/php/versions/common/yar.sh b/plugins/php/versions/common/yar.sh index 674cce405..8b8db63b7 100755 --- a/plugins/php/versions/common/yar.sh +++ b/plugins/php/versions/common/yar.sh @@ -1,6 +1,6 @@ #!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin -export PATH +export PATH=$PATH:/opt/homebrew/bin curPath=`pwd` diff --git a/plugins/php/versions/common/zip.sh b/plugins/php/versions/common/zip.sh index 226d2f1dc..b75aafc0c 100755 --- a/plugins/php/versions/common/zip.sh +++ b/plugins/php/versions/common/zip.sh @@ -1,6 +1,6 @@ #!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin -export PATH +export PATH=$PATH:/opt/homebrew/bin curPath=`pwd` diff --git a/plugins/php/versions/common/zlib.sh b/plugins/php/versions/common/zlib.sh index 67b648d66..366811d12 100755 --- a/plugins/php/versions/common/zlib.sh +++ b/plugins/php/versions/common/zlib.sh @@ -1,6 +1,6 @@ #!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin -export PATH +export PATH=$PATH:/opt/homebrew/bin curPath=`pwd` diff --git a/plugins/php/versions/lib.sh b/plugins/php/versions/lib.sh index 54dbdd87f..2e4584a82 100644 --- a/plugins/php/versions/lib.sh +++ b/plugins/php/versions/lib.sh @@ -1,6 +1,6 @@ #!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin -export PATH +export PATH=$PATH:/opt/homebrew/bin curPath=`pwd` rootPath=$(dirname "$curPath") diff --git a/plugins/sphinx/install.sh b/plugins/sphinx/install.sh index 187da6266..b961032c2 100755 --- a/plugins/sphinx/install.sh +++ b/plugins/sphinx/install.sh @@ -58,6 +58,10 @@ Install_sphinx() cd ${rootPath} && python3 ${rootPath}/plugins/sphinx/index.py start cd ${rootPath} && python3 ${rootPath}/plugins/sphinx/index.py initd_install fi + + if [ -d ${SPHINX_DIR}/sphinx-${VERSION} ];then + rm -rf ${SPHINX_DIR}/sphinx-${VERSION} + fi } Uninstall_sphinx() diff --git a/scripts/install/macos.sh b/scripts/install/macos.sh index 6d0043ce2..ecba37d96 100755 --- a/scripts/install/macos.sh +++ b/scripts/install/macos.sh @@ -27,6 +27,7 @@ brew install libzip bzip2 gcc openssl re2c cmake brew install librdkafka brew install coreutils libxml2 xml2 brew install md5sum libevent pidof bison +brew install pcre2 libxpm libelf if [ ! -d $DEV/server/mdserver-web ]; then wget -O /tmp/master.zip https://codeload.github.com/midoks/mdserver-web/zip/master