From 44f9cb1ffd457ec9a7c12464807ce2bcf876a1d1 Mon Sep 17 00:00:00 2001 From: henderkes Date: Thu, 7 May 2026 16:27:26 +0700 Subject: [PATCH 1/3] fix centos 7 gd build --- src/SPC/builder/unix/library/curl.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/SPC/builder/unix/library/curl.php b/src/SPC/builder/unix/library/curl.php index caa97b8c..d1fab35d 100644 --- a/src/SPC/builder/unix/library/curl.php +++ b/src/SPC/builder/unix/library/curl.php @@ -4,6 +4,7 @@ declare(strict_types=1); namespace SPC\builder\unix\library; +use SPC\store\FileSystem; use SPC\util\executor\UnixCMakeExecutor; trait curl @@ -32,8 +33,16 @@ trait curl ) ->build(); - // patch pkgconf $this->patchPkgconfPrefix(['libcurl.pc']); + // On glibc <2.28 without built-in pthreads, FindThreads + // INTERFACE_LINK_LIBRARIES to '-lpthread' + // curls .pc generator walks and prepends '-l' to each + // entry, resulting in -l-lpthread + FileSystem::replaceFileRegex( + BUILD_LIB_PATH . '/pkgconfig/libcurl.pc', + '/-l(-l\S+)/', + '$1' + ); shell()->cd(BUILD_LIB_PATH . '/cmake/CURL/') ->exec("sed -ie 's|\"/lib/libcurl.a\"|\"" . BUILD_LIB_PATH . "/libcurl.a\"|g' CURLTargets-release.cmake"); } From c7738749e24fde6acef8f1731df7102c073f1862 Mon Sep 17 00:00:00 2001 From: henderkes Date: Thu, 7 May 2026 16:33:39 +0700 Subject: [PATCH 2/3] run tests --- src/globals/test-extensions.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/globals/test-extensions.php b/src/globals/test-extensions.php index 6db808f6..e7f716b4 100644 --- a/src/globals/test-extensions.php +++ b/src/globals/test-extensions.php @@ -14,7 +14,7 @@ declare(strict_types=1); // test php version (8.1 ~ 8.4 available, multiple for matrix) $test_php_version = [ // '8.1', - '8.2', + // '8.2', // '8.3', // '8.4', '8.5', @@ -24,11 +24,11 @@ $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', // 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', @@ -50,7 +50,7 @@ $prefer_pre_built = true; // 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,mongodb', + 'Linux', 'Darwin' => 'curl,gd', 'Windows' => 'bcmath,brotli,bz2,ctype,curl,dom,exif,fileinfo,filter,ftp,gd,iconv,intl,mbregex,mbstring,mysqli,mysqlnd,opcache,openssl,pdo,pdo_mysql,pdo_pgsql,pgsql,session,simdjson,simplexml,sodium,sqlite3,tokenizer,xml,xmlreader,xmlwriter,zip,zlib', }; From fd4f70d526ef50b6ee321817811d8c097a95d569 Mon Sep 17 00:00:00 2001 From: Marc Date: Thu, 7 May 2026 16:51:56 +0700 Subject: [PATCH 3/3] oops --- src/SPC/builder/unix/library/curl.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SPC/builder/unix/library/curl.php b/src/SPC/builder/unix/library/curl.php index d1fab35d..8ed6736d 100644 --- a/src/SPC/builder/unix/library/curl.php +++ b/src/SPC/builder/unix/library/curl.php @@ -34,7 +34,7 @@ trait curl ->build(); $this->patchPkgconfPrefix(['libcurl.pc']); - // On glibc <2.28 without built-in pthreads, FindThreads + // On glibc <2.28 without built-in pthreads, FindThreads sets // INTERFACE_LINK_LIBRARIES to '-lpthread' // curls .pc generator walks and prepends '-l' to each // entry, resulting in -l-lpthread