From b52fe05363ba9aa0bf83d45de8a959fb670b0581 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Fri, 19 Jul 2024 22:49:13 +0800 Subject: [PATCH] Fix icu missing tool bug --- .github/workflows/tests.yml | 2 +- src/SPC/builder/linux/library/icu.php | 4 ++-- src/SPC/builder/macos/library/icu.php | 2 +- src/globals/test-extensions.php | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 60fd50b20..1088c1046 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -176,7 +176,7 @@ jobs: - name: "Run Build Tests (download)" run: | - bin/spc download --for-extensions="$(php src/globals/test-extensions.php extensions)" --for-libs="$(php src/globals/test-extensions.php libs)" --with-php=${{ matrix.php }} --ignore-cache-sources=php-src --debug --retry=5 --shallow-clone --prefer-pre-built + bin/spc download --for-extensions="$(php src/globals/test-extensions.php extensions)" --for-libs="$(php src/globals/test-extensions.php libs)" --with-php=${{ matrix.php }} --ignore-cache-sources=php-src --debug --retry=5 --shallow-clone - name: "Download pre-built libraries for pkg-config" if: matrix.os != 'windows-latest' diff --git a/src/SPC/builder/linux/library/icu.php b/src/SPC/builder/linux/library/icu.php index 79866525b..cbe6007f0 100644 --- a/src/SPC/builder/linux/library/icu.php +++ b/src/SPC/builder/linux/library/icu.php @@ -12,7 +12,7 @@ class icu extends LinuxLibraryBase protected function build(): void { - $cppflags = 'CPPFLAGS="-DU_CHARSET_IS_UTF8=1 -DU_USING_ICU_NAMESPACE=1 -DU_STATIC_IMPLEMENTATION=1"'; + $cppflags = 'CPPFLAGS="-DU_CHARSET_IS_UTF8=1 -DU_USING_ICU_NAMESPACE=1 -DU_STATIC_IMPLEMENTATION=1"'; $cxxflags = 'CXXFLAGS="-std=c++17"'; $ldflags = 'LDFLAGS="-static"'; shell()->cd($this->source_dir . '/source') @@ -26,7 +26,7 @@ protected function build(): void '--enable-extras=no ' . '--enable-icuio=yes ' . '--enable-dyload=no ' . - '--enable-tools=no ' . + '--enable-tools=yes ' . '--enable-tests=no ' . '--enable-samples=no ' . '--prefix=' . BUILD_ROOT_PATH diff --git a/src/SPC/builder/macos/library/icu.php b/src/SPC/builder/macos/library/icu.php index 20e9c3686..cc207d384 100644 --- a/src/SPC/builder/macos/library/icu.php +++ b/src/SPC/builder/macos/library/icu.php @@ -14,7 +14,7 @@ protected function build(): void { $root = BUILD_ROOT_PATH; shell()->cd($this->source_dir . '/source') - ->exec("./runConfigureICU MacOSX --enable-static --disable-shared --disable-extras --disable-samples --disable-tests --disable-tools --prefix={$root}") + ->exec("./runConfigureICU MacOSX --enable-static --disable-shared --disable-extras --disable-samples --disable-tests --prefix={$root}") ->exec('make clean') ->exec("make -j{$this->builder->concurrency}") ->exec('make install'); diff --git a/src/globals/test-extensions.php b/src/globals/test-extensions.php index 008eaeba8..95f43889e 100644 --- a/src/globals/test-extensions.php +++ b/src/globals/test-extensions.php @@ -19,13 +19,13 @@ // If you want to test your added extensions and libs, add below (comma separated, example `bcmath,openssl`). $extensions = match (PHP_OS_FAMILY) { - 'Linux', 'Darwin' => 'swoole,bz2,gmp,intl,password-argon2,gd,mbregex,iconv,redis,sodium,yaml,readline,openssl,sqlite3,sqlsrv,zip,zlib', - 'Windows' => 'amqp,apcu,bcmath,bz2,calendar,ctype,curl,dba,dom,ds,exif,ffi,fileinfo,filter,ftp,gd,iconv,libxml,mbregex,mbstring,mysqli,mysqlnd,opcache,openssl,pdo,pdo_mysql,pdo_sqlite,pdo_sqlsrv,phar,rar,session,shmop,simdjson,simplexml,soap,sockets,sqlite3,sqlsrv,ssh2,swow,sysvshm,tokenizer,xml,xmlreader,xmlwriter,yac,yaml,zip,zlib', + 'Linux', 'Darwin' => 'intl', + 'Windows' => 'amqp,apcu', }; // If you want to test lib-suggests feature with extension, add them below (comma separated, example `libwebp,libavif`). $with_libs = match (PHP_OS_FAMILY) { - 'Linux', 'Darwin' => 'brotli,bzip2,gmp,icu,libargon2,libavif,libcares,libevent,libiconv,liblz4,libpng,libsodium,libtiff,libwebp,libyaml,ncurses,onig,openssl,pkg-config,readline,sqlite,unixodbc,xz,zlib', + 'Linux', 'Darwin' => '', 'Windows' => '', };