diff --git a/.github/workflows/linux-aarch64.yml b/.github/workflows/linux-aarch64.yml index 99a9920024..90c3f795cb 100644 --- a/.github/workflows/linux-aarch64.yml +++ b/.github/workflows/linux-aarch64.yml @@ -128,7 +128,7 @@ jobs: composer install --no-interaction --no-autoloader --no-scripts --profile --no-dev composer dump-autoload --optimize --profile --no-dev - php prepare.php --with-static-pie +inotify +apcu +ds +xlswriter +ssh2 +pgsql +uuid --with-php-version=${{ env.BUILD_PHP_VERSION }} + php prepare.php --with-static-pie --with-libavif +inotify +apcu +ds +xlswriter +ssh2 +pgsql +uuid --with-php-version=${{ env.BUILD_PHP_VERSION }} bash make-install-deps.sh @@ -142,10 +142,13 @@ jobs: run: | ./thirdparty/php-src/sapi/cli/php -v ./thirdparty/php-src/sapi/cli/php -m + ./thirdparty/php-src/sapi/cli/php --ri mongodb + ./thirdparty/php-src/sapi/cli/php --ri curl ./thirdparty/php-src/sapi/cli/php --ri gd + ./thirdparty/php-src/sapi/cli/php --ri imagick ./thirdparty/php-src/sapi/cli/php --ri swoole ./thirdparty/php-src/sapi/cli/php --ri pgsql - { ldd ./bin/php-${{ env.BUILD_PHP_VERSION }}/bin/php } || { echo $? } + { ldd ./bin/php-${{ env.BUILD_PHP_VERSION }}/bin/php ; } || { echo $? ; } ; file ./bin/php-${{ env.BUILD_PHP_VERSION }}/bin/php readelf -h ./bin/php-${{ env.BUILD_PHP_VERSION }}/bin/php APP_VERSION=$(./bin/php-${{ env.BUILD_PHP_VERSION }}/bin/php -v | head -n 1 | awk '{print $2}') diff --git a/.github/workflows/linux-x86_64.yml b/.github/workflows/linux-x86_64.yml index b33d0b566d..b96e9b5c8b 100644 --- a/.github/workflows/linux-x86_64.yml +++ b/.github/workflows/linux-x86_64.yml @@ -181,7 +181,7 @@ jobs: composer install --no-interaction --no-autoloader --no-scripts --profile --no-dev composer dump-autoload --optimize --profile --no-dev - php prepare.php --with-static-pie +inotify +apcu +ds +xlswriter +ssh2 +pgsql +uuid ${{ inputs.build_type }} ${{ inputs.build_options }} --with-php-version=${{ env.BUILD_PHP_VERSION }} + php prepare.php --with-static-pie --with-libavif +inotify +apcu +ds +xlswriter +ssh2 +pgsql +uuid ${{ inputs.build_type }} ${{ inputs.build_options }} --with-php-version=${{ env.BUILD_PHP_VERSION }} bash make-install-deps.sh @@ -202,11 +202,14 @@ jobs: run: | ./thirdparty/php-src/sapi/cli/php -v ./thirdparty/php-src/sapi/cli/php -m + ./thirdparty/php-src/sapi/cli/php --ri mongodb + ./thirdparty/php-src/sapi/cli/php --ri curl ./thirdparty/php-src/sapi/cli/php --ri gd + ./thirdparty/php-src/sapi/cli/php --ri imagick ./thirdparty/php-src/sapi/cli/php --ri swoole ./thirdparty/php-src/sapi/cli/php --ri pgsql ./bin/php-${{ env.BUILD_PHP_VERSION }}/bin/php -v - { ldd ./bin/php-${{ env.BUILD_PHP_VERSION }}/bin/php } || { echo $? } + { ldd ./bin/php-${{ env.BUILD_PHP_VERSION }}/bin/php ; } || { echo $? ; } ; file ./bin/php-${{ env.BUILD_PHP_VERSION }}/bin/php readelf -h ./bin/php-${{ env.BUILD_PHP_VERSION }}/bin/php APP_VERSION=$(./bin/php-${{ env.BUILD_PHP_VERSION }}/bin/php -v | head -n 1 | awk '{print $2}') diff --git a/.github/workflows/macos-aarch64.yml b/.github/workflows/macos-aarch64.yml index 4e2a29ac2d..ae154f0466 100644 --- a/.github/workflows/macos-aarch64.yml +++ b/.github/workflows/macos-aarch64.yml @@ -118,7 +118,7 @@ jobs: composer install --no-interaction --no-autoloader --no-scripts --profile composer dump-autoload --optimize --profile - php prepare.php --without-docker=1 --with-php-version=${{ env.BUILD_PHP_VERSION }} + php prepare.php --without-docker=1 --with-libavif +apcu +ds +xlswriter +ssh2 +pgsql +uuid --with-php-version=${{ env.BUILD_PHP_VERSION }} - name: Build run: | @@ -137,7 +137,9 @@ jobs: ./thirdparty/php-src/sapi/cli/php -v ./thirdparty/php-src/sapi/cli/php -m ./thirdparty/php-src/sapi/cli/php --ri mongodb + ./thirdparty/php-src/sapi/cli/php --ri curl ./thirdparty/php-src/sapi/cli/php --ri gd + ./thirdparty/php-src/sapi/cli/php --ri imagick ./thirdparty/php-src/sapi/cli/php --ri swoole ./thirdparty/php-src/sapi/cli/php --ri pgsql file ./bin/php-${{ env.BUILD_PHP_VERSION }}/bin/php diff --git a/.github/workflows/macos-x86_64.yml b/.github/workflows/macos-x86_64.yml index c59f9ad0af..fd9deaf4f0 100644 --- a/.github/workflows/macos-x86_64.yml +++ b/.github/workflows/macos-x86_64.yml @@ -130,7 +130,7 @@ jobs: composer install --no-interaction --no-autoloader --no-scripts --profile --no-dev composer dump-autoload --optimize --profile --no-dev - php prepare.php --without-docker=1 --with-php-version=${{ env.BUILD_PHP_VERSION }} + php prepare.php --without-docker=1 --with-libavif +apcu +ds +xlswriter +ssh2 +pgsql +uuid --with-php-version=${{ env.BUILD_PHP_VERSION }} - name: Build run: | @@ -149,7 +149,9 @@ jobs: ./thirdparty/php-src/sapi/cli/php -v ./thirdparty/php-src/sapi/cli/php -m ./thirdparty/php-src/sapi/cli/php --ri mongodb + ./thirdparty/php-src/sapi/cli/php --ri curl ./thirdparty/php-src/sapi/cli/php --ri gd + ./thirdparty/php-src/sapi/cli/php --ri imagick ./thirdparty/php-src/sapi/cli/php --ri swoole ./thirdparty/php-src/sapi/cli/php --ri pgsql file ./bin/php-${{ env.BUILD_PHP_VERSION }}/bin/php diff --git a/.github/workflows/windows-cygwin.yml b/.github/workflows/windows-cygwin.yml index db2a92ed48..8c332ae00a 100644 --- a/.github/workflows/windows-cygwin.yml +++ b/.github/workflows/windows-cygwin.yml @@ -55,7 +55,7 @@ jobs: key: "${{ runner.os }}-build-pool-cache" - name: Install Cygwin - uses: cygwin/cygwin-install-action@v2 + uses: cygwin/cygwin-install-action@v6 with: site: https://mirrors.kernel.org/sourceware/cygwin/ # with: @@ -75,7 +75,7 @@ jobs: # 备注:github action 在 windows 上执行命令默认的 shell 是 powershell,如果要使用其它shell , 需要手动指定,例如此也可以使用 bash 来安装 cygwin packages if: 1 run: | - Copy-Item -Path "C:\setup.exe" -Destination "${{ github.workspace }}\setup-x86_64.exe" + Copy-Item -Path "d:\setup.exe" -Destination "${{ github.workspace }}\setup-x86_64.exe" cmd /c .\sapi\quickstart\windows\cygwin-build\install-cygwin.bat - name: Install re2c @@ -86,7 +86,9 @@ jobs: - name: install deps lib with source code shell: C:\cygwin\bin\bash.EXE --noprofile --norc -e -o pipefail -o igncr {0} run: | - bash sapi/scripts/msys2/install-libzip.sh + bash ./sapi/scripts/msys2/install-libzip.sh + bash ./sapi/scripts/msys2/install-libyuv.sh + bash ./sapi/scripts/msys2/install-libavif.sh - name: Prepare shell: C:\cygwin\bin\bash.EXE --noprofile --norc -e -o pipefail -o igncr {0} @@ -116,7 +118,8 @@ jobs: ./bin/php.exe --ri swoole ./bin/php.exe --ri zip ./bin/php.exe --ri gd - ./bin/php.exe -r "echo PHP_VERSION;" + ./bin/php.exe --ri imagick + ./bin/php.exe -r "echo PHP_VERSION;echo PHP_EOL;" ./bin/php.exe -r "echo getcwd();echo PHP_EOL;" ldd ./bin/php.exe diff --git a/.github/workflows/windows-msys2.yml b/.github/workflows/windows-msys2.yml index 269d727f74..ede3b4e9a5 100644 --- a/.github/workflows/windows-msys2.yml +++ b/.github/workflows/windows-msys2.yml @@ -98,6 +98,8 @@ jobs: ./bin/php.exe --ri openssl ./bin/php.exe --ri swoole ./bin/php.exe --ri zip + # ./bin/php.exe --ri gd + # ./bin/php.exe --ri imagick ./bin/php.exe -r "echo PHP_VERSION;" ./bin/php.exe -r "echo getcwd();echo PHP_EOL;" ldd ./bin/php.exe diff --git a/sapi/quickstart/windows/cygwin-build/install-cygwin.bat b/sapi/quickstart/windows/cygwin-build/install-cygwin.bat index f4b984968f..5c6117564c 100644 --- a/sapi/quickstart/windows/cygwin-build/install-cygwin.bat +++ b/sapi/quickstart/windows/cygwin-build/install-cygwin.bat @@ -37,12 +37,13 @@ if defined GITHUB_ACTIONS ( :: package separate with commas set "PACKAGES=make,git,curl,wget,tar,libtool,bison,gcc-g++,autoconf,automake" -set "PACKAGES=%PACKAGES%,cmake,openssl,binutils" +set "PACKAGES=%PACKAGES%,cmake,openssl,binutils,xz" set "PACKAGES=%PACKAGES%,libssl-devel,libcurl-devel,libxml2-devel,libxslt-devel" set "PACKAGES=%PACKAGES%,libssh2-devel,libidn2-devel" set "PACKAGES=%PACKAGES%,libgmp-devel,libsqlite3-devel,libpcre-devel,libpcre2-devel" set "PACKAGES=%PACKAGES%,libiconv-devel" set "PACKAGES=%PACKAGES%,libMagick-devel,ImageMagick,libpng-devel,libjpeg-devel,libfreetype-devel,libwebp-devel" +set "PACKAGES=%PACKAGES%,libaom-devel,libsvtav1-devel,libdav1d-devel,libheif-devel" set "PACKAGES=%PACKAGES%,zlib-devel,libbz2-devel,liblz4-devel,liblzma-devel,libzip-devel" set "PACKAGES=%PACKAGES%,libzstd-devel,libbrotli-devel" set "PACKAGES=%PACKAGES%,zip,unzip,xz" @@ -53,6 +54,8 @@ set "PACKAGES=%PACKAGES%,flex" set "PACKAGES=%PACKAGES%,cygwin-devel,libnet6-devel" set "PACKAGES=%PACKAGES%,libwrap-devel" set "PACKAGES=%PACKAGES%,libedit-devel" +set "PACKAGES=%PACKAGES%,liblzma-devel" +set "PACKAGES=%PACKAGES%,gettext-devel" set "OPTIONS=%OPTIONS% --packages %PACKAGES%" diff --git a/sapi/scripts/cygwin/cygwin-config.sh b/sapi/scripts/cygwin/cygwin-config.sh index 6724bccf41..639ec3af67 100755 --- a/sapi/scripts/cygwin/cygwin-config.sh +++ b/sapi/scripts/cygwin/cygwin-config.sh @@ -45,6 +45,7 @@ export PATH=/usr/bin:$PATH export ICU_CXXFLAGS=" -std=gnu++17 " ./buildconf --force test -f Makefile && make clean + ./configure --prefix=/usr --disable-all \ \ --disable-fiber-asm \ @@ -77,7 +78,7 @@ test -f Makefile && make clean --enable-exif \ --with-sodium \ --enable-xml --enable-simplexml --enable-xmlreader --enable-xmlwriter --enable-dom --with-libxml \ - --enable-gd --with-jpeg --with-freetype \ + --enable-gd --with-jpeg --with-freetype --with-avif --with-webp \ --enable-swoole --enable-sockets --enable-mysqlnd --enable-swoole-curl --enable-cares \ --enable-swoole-pgsql \ --enable-swoole-sqlite \ diff --git a/sapi/scripts/msys2/install-libavif.sh b/sapi/scripts/msys2/install-libavif.sh new file mode 100644 index 0000000000..eac0fa1fb9 --- /dev/null +++ b/sapi/scripts/msys2/install-libavif.sh @@ -0,0 +1,60 @@ +#!/usr/bin/env bash + +set -exu +__DIR__=$( + cd "$(dirname "$0")" + pwd +) +__PROJECT__=$( + cd ${__DIR__}/../../../ + pwd +) +cd ${__PROJECT__} +mkdir -p pool/lib/ +WORK_TEMP_DIR=${__PROJECT__}/var/msys2-build/ +mkdir -p ${WORK_TEMP_DIR} + +VERSION=1.3.0 + +download() { + # document https://github.com/AOMediaCodec/libavif/ + curl -fSLo ${__PROJECT__}/pool/lib/libavif-v${VERSION}.tar.gz https://github.com/AOMediaCodec/libavif/archive/refs/tags/v${VERSION}.tar.gz +} + +build() { + + cd ${WORK_TEMP_DIR} + tar xvf ${__PROJECT__}/pool/lib/libavif-v${VERSION}.tar.gz + cd libavif-${VERSION} + + mkdir -p build + cd build + cmake .. \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_TOOLS=OFF \ + -DBUILD_EXAMPLES=OFF \ + -DBUILD_DOC=OFF \ + -DLIBZIP_DO_INSTALL=ON \ + -DENABLE_GNUTLS=OFF \ + -DENABLE_MBEDTLS=OFF \ + -DENABLE_OPENSSL=ON \ + -DENABLE_BZIP2=ON \ + -DENABLE_COMMONCRYPTO=OFF \ + -DENABLE_LZMA=ON \ + -DENABLE_ZSTD=ON \ + -DBUILD_REGRESS=OFF \ + -DBUILD_OSSFUZZ=OFF \ + -DCMAKE_VERBOSE_MAKEFILE=ON \ + -DCMAKE_PREFIX_PATH="/usr/local/;/usr/" + + + make -j $(nproc) + make install + +} + +cd ${__PROJECT__} +test -f ${__PROJECT__}/pool/lib/libavif-v${VERSION}.tar.gz || download + +build diff --git a/sapi/scripts/msys2/install-libyuv.sh b/sapi/scripts/msys2/install-libyuv.sh new file mode 100644 index 0000000000..dedca02791 --- /dev/null +++ b/sapi/scripts/msys2/install-libyuv.sh @@ -0,0 +1,48 @@ +#!/usr/bin/env bash + +set -exu +__DIR__=$( + cd "$(dirname "$0")" + pwd +) +__PROJECT__=$( + cd ${__DIR__}/../../../ + pwd +) +cd ${__PROJECT__} +mkdir -p pool/lib/ +WORK_TEMP_DIR=${__PROJECT__}/var/msys2-build/ +mkdir -p ${WORK_TEMP_DIR} + +VERSION=068c9f2f643ce59eeb3001d61374bf44a2abd825 + +download() { + # document https://github.com/AOMediaCodec/libavif/ + curl -fSLo ${__PROJECT__}/pool/lib/libyuv-${VERSION}.tar.gz https://chromium.googlesource.com/libyuv/libyuv/+archive/${VERSION}.tar.gz +} + +build() { + + cd ${WORK_TEMP_DIR} + mkdir -p libyuv-${VERSION} + tar xvf ${__PROJECT__}/pool/lib/libyuv-${VERSION}.tar.gz -C libyuv-${VERSION} + cd libyuv-${VERSION} + + mkdir -p build + cd build + + cmake -S .. -B . \ + -DCMAKE_INSTALL_PREFIX=/usr/ \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_SIZEOF_VOID_P=8 \ + -DCMAKE_VERBOSE_MAKEFILE=ON + + make -j $(nproc) + make install + +} + +cd ${__PROJECT__} +test -f ${__PROJECT__}/pool/lib/libyuv-${VERSION}.tar.gz || download + +build diff --git a/sapi/scripts/tencent-cloud-object-storage.sh b/sapi/scripts/tencent-cloud-object-storage.sh index 52a2fb5597..723d930860 100644 --- a/sapi/scripts/tencent-cloud-object-storage.sh +++ b/sapi/scripts/tencent-cloud-object-storage.sh @@ -135,15 +135,19 @@ set -u if [ "${UPLOAD_TYPE}" == 'all' ]; then SWOOLE_VERSION=$(echo ${SWOOLE_CLI_VERSION} | awk -F '.' '{ printf "%s.%s.%s" ,$1,$2,$3 }') cd ${__PROJECT__}/var/artifact-hash/${SWOOLE_CLI_VERSION} - ${COSCLI} cp swoole-cli-${SWOOLE_VERSION}-cygwin-x64.zip ${COS_BUCKET_FOLDER} - ${COSCLI} cp swoole-cli-${SWOOLE_VERSION}-linux-arm64.tar.xz ${COS_BUCKET_FOLDER} - ${COSCLI} cp swoole-cli-${SWOOLE_VERSION}-linux-x64.tar.xz ${COS_BUCKET_FOLDER} - ${COSCLI} cp swoole-cli-${SWOOLE_VERSION}-macos-arm64.tar.xz ${COS_BUCKET_FOLDER} - ${COSCLI} cp swoole-cli-${SWOOLE_VERSION}-macos-x64.tar.xz ${COS_BUCKET_FOLDER} - status=$? + { + ${COSCLI} cp --forbid-overwrite --fail-output-path ${__PROJECT__}/var/tencent-cloud-object-storage/upload.log swoole-cli-${SWOOLE_VERSION}-cygwin-x64.zip ${COS_BUCKET_FOLDER} + ${COSCLI} cp --forbid-overwrite --fail-output-path ${__PROJECT__}/var/tencent-cloud-object-storage/upload.log swoole-cli-${SWOOLE_VERSION}-linux-arm64.tar.xz ${COS_BUCKET_FOLDER} + ${COSCLI} cp --forbid-overwrite --fail-output-path ${__PROJECT__}/var/tencent-cloud-object-storage/upload.log swoole-cli-${SWOOLE_VERSION}-linux-x64.tar.xz ${COS_BUCKET_FOLDER} + ${COSCLI} cp --forbid-overwrite --fail-output-path ${__PROJECT__}/var/tencent-cloud-object-storage/upload.log swoole-cli-${SWOOLE_VERSION}-macos-arm64.tar.xz ${COS_BUCKET_FOLDER} + ${COSCLI} cp --forbid-overwrite --fail-output-path ${__PROJECT__}/var/tencent-cloud-object-storage/upload.log swoole-cli-${SWOOLE_VERSION}-macos-x64.tar.xz ${COS_BUCKET_FOLDER} + status=$? + } || { + status=$? + } if [[ $status -ne 0 ]]; then echo $status - cat ${__PROJECT__}/var/tencent-cloud-object-storage/coscli.log + cat ${__PROJECT__}/var/tencent-cloud-object-storage/upload.log exit 1 fi cd ${__PROJECT__} @@ -151,11 +155,11 @@ if [ "${UPLOAD_TYPE}" == 'all' ]; then fi if [ "${UPLOAD_TYPE}" == 'single' ]; then - ${COSCLI} cp ${UPLOAD_FILE} ${COS_BUCKET_FOLDER} + ${COSCLI} cp --fail-output-path ${__PROJECT__}/var/tencent-cloud-object-storage/upload.log ${UPLOAD_FILE} ${COS_BUCKET_FOLDER} status=$? if [[ $status -ne 0 ]]; then echo $status - cat ${__PROJECT__}/var/tencent-cloud-object-storage/coscli.log + cat ${__PROJECT__}/var/tencent-cloud-object-storage/upload.log exit 1 fi exit 0 diff --git a/sapi/scripts/tencent-cloud-object-storage.yaml b/sapi/scripts/tencent-cloud-object-storage.yaml index dc7e963fb0..90a68fdcbf 100644 --- a/sapi/scripts/tencent-cloud-object-storage.yaml +++ b/sapi/scripts/tencent-cloud-object-storage.yaml @@ -11,7 +11,5 @@ cos: - name: "${{ vars.QCLOUD_OSS_BUCKET }}" alias: "${{ vars.QCLOUD_OSS_BUCKET }}" region: "${{ vars.QCLOUD_OSS_REGION }}" - # endpoint: cos.ap-shanghai.myqcloud.com - # endpoint: wenda-1252906962.cos.accelerate.myqcloud.com - endpoint: "cos.accelerate.myqcloud.com" + endpoint: cos.accelerate.myqcloud.com ofs: false diff --git a/sapi/src/builder/extension/phpy.php b/sapi/src/builder/extension/phpy.php index a5efb60701..141cb1fee8 100644 --- a/sapi/src/builder/extension/phpy.php +++ b/sapi/src/builder/extension/phpy.php @@ -13,7 +13,10 @@ $tag = 'v1.0.11'; + $python3_prefix = PYTHON3_PREFIX; + # $python3_prefix = '/opt/anaconda3'; + $options = []; $options[] = '--enable-phpy'; $options[] = ' --with-python-version=3.12.2'; @@ -25,6 +28,7 @@ $ext = (new Extension('phpy')) ->withOptions(implode(' ', $options)) + //->withOptions('') //不启用编译选项 ->withLicense('https://github.com/swoole/phpy/blob/main/LICENSE', Extension::LICENSE_APACHE2) ->withHomePage('https://github.com/swoole/phpy/') ->withManual('https://github.com/swoole/phpy/') diff --git a/sapi/src/builder/extension/swoole.php b/sapi/src/builder/extension/swoole.php index c35de7aa3c..70f859dd23 100644 --- a/sapi/src/builder/extension/swoole.php +++ b/sapi/src/builder/extension/swoole.php @@ -100,33 +100,37 @@ $p->withExportVariable('SWOOLE_ODBC_LIBS', '$(pkg-config --libs-only-L --libs-only-l --static odbc odbccr odbcinst readline ncursesw ) ' . " -L{$libiconv_prefix}/lib -liconv "); /* - $p->withBeforeConfigureScript('swoole', function () use ($p) { - $workDir = $p->getWorkDir(); - $shell = "set -x ;cd {$workDir} ; WORKDIR={$workDir} ;" . PHP_EOL; - $shell .= <<<'EOF' - SWOOLE_VERSION=$(awk 'NR==1{ print $1 }' "sapi/SWOOLE-VERSION.conf") - CURRENT_SWOOLE_VERSION='' - - if [ -f "ext/swoole/CMakeLists.txt" ] ;then - CURRENT_SWOOLE_VERSION=$(grep 'set(SWOOLE_VERSION' ext/swoole/CMakeLists.txt | awk '{ print $2 }' | sed 's/)//') - if [[ "${CURRENT_SWOOLE_VERSION}" =~ "-dev" ]]; then - echo 'swoole version master' - if [ -n "${GITHUB_ACTION}" ]; then - test -f ${WORKDIR}/pool/ext/swoole-${SWOOLE_VERSION}.tgz && rm -f ${WORKDIR}/pool/ext/swoole-${SWOOLE_VERSION}.tgz - CURRENT_SWOOLE_VERSION='' - fi - fi + $p->withBeforeConfigureScript('swoole', function () use ($p) { + $workDir = $p->getWorkDir(); + $shell = "set -x ;cd {$workDir} ; WORKDIR={$workDir} ;" . PHP_EOL; + $shell .= <<<'EOF' - if [ "${SWOOLE_VERSION}" != "${CURRENT_SWOOLE_VERSION}" ] ;then - test -d ext/swoole && rm -rf ext/swoole - if [ ! -f ${WORKDIR}/pool/ext/swoole-${SWOOLE_VERSION}.tgz ] ;then - test -d /tmp/swoole && rm -rf /tmp/swoole - git clone -b "${SWOOLE_VERSION}" https://github.com/swoole/swoole-src.git /tmp/swoole - cd /tmp/swoole - rm -rf /tmp/swoole/.git/ - tar -czvf ${WORKDIR}/pool/ext/swoole-${SWOOLE_VERSION}.tgz . + SWOOLE_VERSION=$(awk 'NR==1{ print $1 }' "sapi/SWOOLE-VERSION.conf") + ORIGIN_SWOOLE_VERSION=${SWOOLE_VERSION} + SWOOLE_VERSION=$(echo "${SWOOLE_VERSION}" | sed 's/[^a-zA-Z0-9]/_/g') + CURRENT_SWOOLE_VERSION='' + + if [ -f "ext/swoole/CMakeLists.txt" ] ;then + CURRENT_SWOOLE_VERSION=$(grep 'set(SWOOLE_VERSION' ext/swoole/CMakeLists.txt | awk '{ print $2 }' | sed 's/)//') + if [[ "${CURRENT_SWOOLE_VERSION}" =~ "-dev" ]]; then + echo 'swoole version master' + if [ -n "${GITHUB_ACTION}" ]; then + test -f ${WORKDIR}/pool/ext/swoole-${SWOOLE_VERSION}.tgz && rm -f ${WORKDIR}/pool/ext/swoole-${SWOOLE_VERSION}.tgz + CURRENT_SWOOLE_VERSION='' fi fi + fi + if [ "${SWOOLE_VERSION}" != "${CURRENT_SWOOLE_VERSION}" ] ;then + test -d ext/swoole && rm -rf ext/swoole + if [ ! -f ${WORKDIR}/pool/ext/swoole-${SWOOLE_VERSION}.tgz ] ;then + test -d /tmp/swoole && rm -rf /tmp/swoole + git clone -b "${ORIGIN_SWOOLE_VERSION}" https://github.com/swoole/swoole-src.git /tmp/swoole + status=$? + if [[ $status -ne 0 ]]; then { echo $status ; exit 1 ; } fi + cd /tmp/swoole + rm -rf /tmp/swoole/.git/ + tar -czvf ${WORKDIR}/pool/ext/swoole-${SWOOLE_VERSION}.tgz . + fi # swoole extension hook cd {$workDir} sed -i '' 's/pthread_barrier_init/pthread_barrier_init_x_fake/' ext/swoole/config.m4 diff --git a/sapi/src/builder/extension/swow.php b/sapi/src/builder/extension/swow.php index d930f03833..1ef0baeea2 100644 --- a/sapi/src/builder/extension/swow.php +++ b/sapi/src/builder/extension/swow.php @@ -5,7 +5,7 @@ use SwooleCli\Library; return function (Preprocessor $p) { - $swow_tag = 'v1.6.1'; + $swow_tag = 'v1.6.2'; $options = ' --enable-swow '; $options .= ' --enable-swow-ssl '; $options .= ' --enable-swow-curl '; diff --git a/sapi/src/builder/library/imagemagick.php b/sapi/src/builder/library/imagemagick.php index a613f6de95..4c299eb0e3 100644 --- a/sapi/src/builder/library/imagemagick.php +++ b/sapi/src/builder/library/imagemagick.php @@ -16,7 +16,6 @@ //->withFileHash('md5', '90eb1a9263b47b7e844eb817fe08932c') ->withPrefix($imagemagick_prefix) ->withBuildCached(false) - ->withInstallCached(false) ->withConfigure( <<withHomePage('https://littlecms.com/color-engine/') ->withLicense('https://www.opensource.org/licenses/mit-license.php', Library::LICENSE_MIT) - ->withUrl('https://sourceforge.net/projects/lcms/files/lcms/2.17/lcms2-2.17.tar.gz') + ->withUrl('https://github.com/mm2/Little-CMS/archive/refs/tags/lcms2.17.tar.gz') ->withManual('https://lfs.lug.org.cn/blfs/view/10.0/general/lcms2.html') ->withPrefix($lcms2_prefix) ->withConfigure( diff --git a/sapi/src/builder/library/libavif.php b/sapi/src/builder/library/libavif.php index a6ff26517d..fc59daa094 100644 --- a/sapi/src/builder/library/libavif.php +++ b/sapi/src/builder/library/libavif.php @@ -15,8 +15,8 @@ ->withHomePage('https://aomediacodec.github.io/av1-avif/') ->withLicense('https://github.com/AOMediaCodec/libavif/', Library::LICENSE_BSD) ->withManual('https://github.com/AOMediaCodec/libavif/ext/') - ->withUrl('https://github.com/AOMediaCodec/libavif/archive/refs/tags/v1.1.1.tar.gz') - ->withFile('libavif-v1.1.1.tar.gz') + ->withUrl('https://github.com/AOMediaCodec/libavif/archive/refs/tags/v1.3.0.tar.gz') + ->withFile('libavif-v1.3.0.tar.gz') ->withPrefix($libavif_prefix) ->withConfigure( <<withHomePage('https://github.com/ebiggers/libdeflate') + ->withLicense('https://github.com/ebiggers/libdeflate#MIT-1-ov-file', Library::LICENSE_MIT) + ->withManual('https://github.com/ebiggers/libdeflate') + ->withUrl('https://github.com/ebiggers/libdeflate/releases/download/v1.25/libdeflate-1.25.tar.gz') + ->withPrefix($libdeflate_prefix) + ->withBuildCached(false) + ->withBuildScript( + <<withBinPath($libdeflate_prefix . '/bin/') + ->withPkgName('libdeflate'); + + $p->addLibrary($lib); +}; + + diff --git a/sapi/src/builder/library/libheif.php b/sapi/src/builder/library/libheif.php index cc882fb44e..a3d507151c 100644 --- a/sapi/src/builder/library/libheif.php +++ b/sapi/src/builder/library/libheif.php @@ -41,7 +41,6 @@ ->withUrl('https://github.com/strukturag/libheif/releases/download/v1.20.2/libheif-1.20.2.tar.gz') ->withPrefix($libheif_prefix) ->withBuildCached(false) - ->withInstallCached(false) ->withBuildScript( <<withHomePage('https://github.com/ebiggers/libdeflate') + ->withLicense('https://github.com/libjxl/libjxl/#BSD-3-Clause-1-ov-file', Library::LICENSE_BSD) + ->withManual('https://github.com/libjxl/libjxl.git') + ->withUrl('https://github.com/libjxl/libjxl/archive/refs/tags/v0.11.1.tar.gz') + ->withFile('libjxl-v0.11.1.tar.gz') + ->withPrefix($libjxl_prefix) + ->withBuildCached(false) + ->withBuildScript( + <<withScriptAfterInstall( + <<withBinPath($libjxl_prefix . '/bin/') + ->withPkgName('aom') + ->withDependentLibraries( + 'brotli', + 'libgif', + 'libjpeg' + ) ; + + $p->addLibrary($lib); +}; + + +https://github.com/libjxl/libjxl diff --git a/sapi/src/constants.php b/sapi/src/constants.php index e19767bb00..3203005db3 100644 --- a/sapi/src/constants.php +++ b/sapi/src/constants.php @@ -86,6 +86,7 @@ define("LCMS2_PREFIX", $p->getGlobalPrefix() . '/lcms2'); define("OPENJPEG_PREFIX", $p->getGlobalPrefix() . '/openjpeg'); + define("ABSL_PREFIX", $p->getGlobalPrefix() . '/absl'); define("MUSL_CROSS_MAKE_PREFIX", $p->getGlobalPrefix() . '/musl_cross_make'); @@ -97,7 +98,7 @@ define("LIBMEMCACHED_PREFIX", $p->getGlobalPrefix() . '/libmemcached'); define("LIBMEMCACHED_AWESOME_PREFIX", $p->getGlobalPrefix() . '/libmemcached_awesome'); -define("EXAMPLE_PREFIX", $p->getGlobalPrefix() . '/example'); - - +define("LIBDEFLATE_PREFIX", $p->getGlobalPrefix() . '/libdeflate'); +define("LIBJXL_PREFIX", $p->getGlobalPrefix() . '/libjxl'); +define("EXAMPLE_PREFIX", $p->getGlobalPrefix() . '/example');