From 8650ce4f8ff7c61ce47eb80a648b1ea386f0d1c2 Mon Sep 17 00:00:00 2001 From: Jerry Ma Date: Fri, 26 Dec 2025 17:15:45 +0800 Subject: [PATCH 1/5] Add MACOSX_DEPLOYMENT_TARGET to env.ini (#1009) --- config/env.ini | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config/env.ini b/config/env.ini index 7448cc37..4b0795f8 100644 --- a/config/env.ini +++ b/config/env.ini @@ -142,6 +142,8 @@ SPC_CMD_PREFIX_PHP_CONFIGURE="./configure --prefix= --with-valgrind=no --enable- SPC_CMD_VAR_PHP_EMBED_TYPE="static" ; EXTRA_CFLAGS for `configure` and `make` php SPC_CMD_VAR_PHP_MAKE_EXTRA_CFLAGS="-g -fstack-protector-strong -fpic -fpie -Werror=unknown-warning-option ${SPC_DEFAULT_C_FLAGS}" +; minimum compatible macOS version (LLVM vars, availability not guaranteed) +MACOSX_DEPLOYMENT_TARGET=12.0 [freebsd] ; compiler environments From cd2dc5bce40462c11b8a20bb49cf453ee480c6cc Mon Sep 17 00:00:00 2001 From: Jerry Ma Date: Tue, 13 Jan 2026 16:51:57 +0800 Subject: [PATCH 2/5] Fix nghttp2 and curl build configurations for static linking (#1014) --- src/SPC/builder/windows/library/curl.php | 5 +++-- src/SPC/builder/windows/library/nghttp2.php | 7 ++++++- src/globals/test-extensions.php | 12 ++++++------ 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/src/SPC/builder/windows/library/curl.php b/src/SPC/builder/windows/library/curl.php index 1229dbd6..bba130e1 100644 --- a/src/SPC/builder/windows/library/curl.php +++ b/src/SPC/builder/windows/library/curl.php @@ -30,7 +30,6 @@ class curl extends WindowsLibraryBase '-DCMAKE_BUILD_TYPE=Release ' . '-DBUILD_SHARED_LIBS=OFF ' . '-DBUILD_STATIC_LIBS=ON ' . - '-DCURL_STATICLIB=ON ' . '-DCMAKE_INSTALL_PREFIX=' . BUILD_ROOT_PATH . ' ' . '-DBUILD_CURL_EXE=OFF ' . // disable curl.exe '-DBUILD_TESTING=OFF ' . // disable tests @@ -42,9 +41,9 @@ class curl extends WindowsLibraryBase '-DCURL_USE_OPENSSL=OFF ' . // disable openssl due to certificate issue '-DCURL_ENABLE_SSL=ON ' . '-DUSE_NGHTTP2=ON ' . // enable nghttp2 + '-DSHARE_LIB_OBJECT=OFF ' . // disable shared lib object '-DCURL_USE_LIBSSH2=ON ' . // enable libssh2 '-DENABLE_IPV6=ON ' . // enable ipv6 - '-DNGHTTP2_CFLAGS="/DNGHTTP2_STATICLIB" ' . $alt ) ->execWithWrapper( @@ -53,5 +52,7 @@ class curl extends WindowsLibraryBase ); // move libcurl.lib to libcurl_a.lib rename(BUILD_LIB_PATH . '\libcurl.lib', BUILD_LIB_PATH . '\libcurl_a.lib'); + + FileSystem::replaceFileStr(BUILD_INCLUDE_PATH . '\curl\curl.h', '#ifdef CURL_STATICLIB', '#if 1'); } } diff --git a/src/SPC/builder/windows/library/nghttp2.php b/src/SPC/builder/windows/library/nghttp2.php index 7e6e999d..5a1c6bf1 100644 --- a/src/SPC/builder/windows/library/nghttp2.php +++ b/src/SPC/builder/windows/library/nghttp2.php @@ -29,11 +29,16 @@ class nghttp2 extends WindowsLibraryBase '-DBUILD_SHARED_LIBS=OFF ' . '-DENABLE_STATIC_CRT=ON ' . '-DENABLE_LIB_ONLY=ON ' . - '-DCMAKE_INSTALL_PREFIX=' . BUILD_ROOT_PATH . ' ' + '-DCMAKE_INSTALL_PREFIX=' . BUILD_ROOT_PATH . ' ' . + '-DENABLE_STATIC_CRT=ON ' . + '-DENABLE_DOC=OFF ' . + '-DBUILD_TESTING=OFF ' ) ->execWithWrapper( $this->builder->makeSimpleWrapper('cmake'), "--build build --config Release --target install -j{$this->builder->concurrency}" ); + + FileSystem::replaceFileStr(BUILD_INCLUDE_PATH . '\nghttp2\nghttp2.h', '#ifdef NGHTTP2_STATICLIB', '#if 1'); } } diff --git a/src/globals/test-extensions.php b/src/globals/test-extensions.php index cdd27e23..93f86348 100644 --- a/src/globals/test-extensions.php +++ b/src/globals/test-extensions.php @@ -13,17 +13,17 @@ declare(strict_types=1); // test php version (8.1 ~ 8.4 available, multiple for matrix) $test_php_version = [ - // '8.1', + '8.1', // '8.2', // '8.3', - // '8.4', + '8.4', '8.5', // 'git', ]; // test os (macos-15-intel, macos-15, ubuntu-latest, windows-latest are available) $test_os = [ - 'macos-15-intel', // bin/spc for x86_64 + // 'macos-15-intel', // bin/spc for x86_64 // 'macos-15', // bin/spc for arm64 // 'ubuntu-latest', // bin/spc-alpine-docker for x86_64 // 'ubuntu-22.04', // bin/spc-gnu-docker for x86_64 @@ -31,7 +31,7 @@ $test_os = [ // 'ubuntu-22.04-arm', // bin/spc-gnu-docker for arm64 // 'ubuntu-24.04-arm', // bin/spc for arm64 // 'windows-2022', // .\bin\spc.ps1 - // 'windows-2025', + 'windows-2025', ]; // whether enable thread safe @@ -50,7 +50,7 @@ $prefer_pre_built = false; // If you want to test your added extensions and libs, add below (comma separated, example `bcmath,openssl`). $extensions = match (PHP_OS_FAMILY) { - 'Linux', 'Darwin' => 'imagick', + 'Linux', 'Darwin' => 'curl', 'Windows' => 'bcmath', }; @@ -67,7 +67,7 @@ $with_suggested_libs = false; // If you want to test extra libs for extensions, add them below (comma separated, example `libwebp,libavif`). Unnecessary, when $with_suggested_libs is true. $with_libs = match (PHP_OS_FAMILY) { 'Linux', 'Darwin' => 'libwebp', - 'Windows' => '', + 'Windows' => 'nghttp2', }; // Please change your test base combination. We recommend testing with `common`. From b09337de09ad23dea235a127d4eb23c9563a0773 Mon Sep 17 00:00:00 2001 From: henderkes Date: Sat, 17 Jan 2026 10:51:21 +0100 Subject: [PATCH 3/5] add excimer extension --- config/ext.json | 8 ++++++++ config/source.json | 12 +++++++++++- src/SPC/builder/extension/excimer.php | 19 +++++++++++++++++++ src/SPC/builder/unix/UnixBuilderBase.php | 4 +--- 4 files changed, 39 insertions(+), 4 deletions(-) create mode 100644 src/SPC/builder/extension/excimer.php diff --git a/config/ext.json b/config/ext.json index d3fd2aa2..e88ad20c 100644 --- a/config/ext.json +++ b/config/ext.json @@ -127,6 +127,14 @@ "sockets" ] }, + "excimer": { + "support": { + "Windows": "wip", + "BSD": "wip" + }, + "type": "external", + "source": "ext-excimer" + }, "exif": { "type": "builtin" }, diff --git a/config/source.json b/config/source.json index c96822d6..0f32bcc9 100644 --- a/config/source.json +++ b/config/source.json @@ -126,13 +126,23 @@ }, "ext-event": { "type": "url", - "url": "https://bitbucket.org/osmanov/pecl-event/get/3.0.8.tar.gz", + "url": "https://bitbucket.org/osmanov/pecl-event/get/3.1.4.tar.gz", "path": "php-src/ext/event", "license": { "type": "file", "path": "LICENSE" } }, + "ext-excimer": { + "type": "url", + "url": "https://pecl.php.net/get/excimer", + "path": "php-src/ext/excimer", + "filename": "excimer.tgz", + "license": { + "type": "file", + "path": "LICENSE" + } + }, "ext-glfw": { "type": "git", "url": "https://github.com/mario-deluna/php-glfw", diff --git a/src/SPC/builder/extension/excimer.php b/src/SPC/builder/extension/excimer.php new file mode 100644 index 00000000..03dd8f22 --- /dev/null +++ b/src/SPC/builder/extension/excimer.php @@ -0,0 +1,19 @@ +extractDebugInfo($dst); - // strip if (!$this->getOption('no-strip')) { + $this->extractDebugInfo($dst); $this->stripBinary($dst); } From 19f941797ed0a8aac3d924469f5378fdbe46052d Mon Sep 17 00:00:00 2001 From: henderkes Date: Sat, 17 Jan 2026 11:26:28 +0100 Subject: [PATCH 4/5] zig now supports -Wl,-exported_symbols_list --- src/SPC/builder/traits/UnixSystemUtilTrait.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/SPC/builder/traits/UnixSystemUtilTrait.php b/src/SPC/builder/traits/UnixSystemUtilTrait.php index b1ef9db4..ff75bf7c 100644 --- a/src/SPC/builder/traits/UnixSystemUtilTrait.php +++ b/src/SPC/builder/traits/UnixSystemUtilTrait.php @@ -72,12 +72,8 @@ trait UnixSystemUtilTrait if (!is_file($symbol_file)) { throw new SPCInternalException("The symbol file {$symbol_file} does not exist, please check if nm command is available."); } - // https://github.com/ziglang/zig/issues/24662 - if (ToolchainManager::getToolchainClass() === ZigToolchain::class) { - return '-Wl,--export-dynamic'; - } - // macOS - if (SPCTarget::getTargetOS() !== 'Linux') { + // macOS/zig + if (SPCTarget::getTargetOS() !== 'Linux' || ToolchainManager::getToolchainClass() === ZigToolchain::class) { return "-Wl,-exported_symbols_list,{$symbol_file}"; } return "-Wl,--dynamic-list={$symbol_file}"; From 1e2b4017ac773cae62ba79c4b31adc90c0823435 Mon Sep 17 00:00:00 2001 From: henderkes Date: Sat, 17 Jan 2026 11:27:29 +0100 Subject: [PATCH 5/5] test excimer --- src/globals/test-extensions.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/globals/test-extensions.php b/src/globals/test-extensions.php index 93f86348..ec3c7128 100644 --- a/src/globals/test-extensions.php +++ b/src/globals/test-extensions.php @@ -13,7 +13,7 @@ declare(strict_types=1); // test php version (8.1 ~ 8.4 available, multiple for matrix) $test_php_version = [ - '8.1', + // '8.1', // '8.2', // '8.3', '8.4', @@ -23,15 +23,15 @@ $test_php_version = [ // test os (macos-15-intel, macos-15, ubuntu-latest, windows-latest are available) $test_os = [ - // 'macos-15-intel', // bin/spc for x86_64 - // 'macos-15', // bin/spc for arm64 + 'macos-15-intel', // bin/spc for x86_64 + 'macos-15', // bin/spc for arm64 // 'ubuntu-latest', // bin/spc-alpine-docker for x86_64 - // 'ubuntu-22.04', // bin/spc-gnu-docker for x86_64 + 'ubuntu-22.04', // bin/spc-gnu-docker for x86_64 // 'ubuntu-24.04', // bin/spc for x86_64 - // 'ubuntu-22.04-arm', // bin/spc-gnu-docker for arm64 + 'ubuntu-22.04-arm', // bin/spc-gnu-docker for arm64 // 'ubuntu-24.04-arm', // bin/spc for arm64 // 'windows-2022', // .\bin\spc.ps1 - 'windows-2025', + // 'windows-2025', ]; // whether enable thread safe @@ -50,13 +50,13 @@ $prefer_pre_built = false; // If you want to test your added extensions and libs, add below (comma separated, example `bcmath,openssl`). $extensions = match (PHP_OS_FAMILY) { - 'Linux', 'Darwin' => 'curl', + 'Linux', 'Darwin' => 'opcache', 'Windows' => 'bcmath', }; // If you want to test shared extensions, add them below (comma separated, example `bcmath,openssl`). $shared_extensions = match (PHP_OS_FAMILY) { - 'Linux' => '', + 'Linux' => 'excimer', 'Darwin' => '', 'Windows' => '', }; @@ -67,7 +67,7 @@ $with_suggested_libs = false; // If you want to test extra libs for extensions, add them below (comma separated, example `libwebp,libavif`). Unnecessary, when $with_suggested_libs is true. $with_libs = match (PHP_OS_FAMILY) { 'Linux', 'Darwin' => 'libwebp', - 'Windows' => 'nghttp2', + 'Windows' => '', }; // Please change your test base combination. We recommend testing with `common`.