diff --git a/config/source.json b/config/source.json index a14ac41a..258b35e3 100644 --- a/config/source.json +++ b/config/source.json @@ -246,7 +246,7 @@ }, "ext-rdkafka": { "type": "ghtar", - "repo": "arnaud-lb/php-rdkafka", + "repo": "php-rdkafka/php-rdkafka", "path": "php-src/ext/rdkafka", "license": { "type": "file", diff --git a/src/SPC/builder/unix/UnixBuilderBase.php b/src/SPC/builder/unix/UnixBuilderBase.php index 1f16dab2..5584378a 100644 --- a/src/SPC/builder/unix/UnixBuilderBase.php +++ b/src/SPC/builder/unix/UnixBuilderBase.php @@ -464,9 +464,10 @@ abstract class UnixBuilderBase extends BuilderBase "-tags={$muslTags}nobadger,nomysql,nopgx{$nobrotli}{$nowatcher}", 'LD_LIBRARY_PATH' => BUILD_LIB_PATH, ], ...GoXcaddy::getEnvironment()]; + $pgo = file_exists("{$frankenphpSourceDir}/caddy/frankenphp/default.pgo") ? "--pgo {$frankenphpSourceDir}/caddy/frankenphp/default.pgo " : ''; shell()->cd(BUILD_BIN_PATH) ->setEnv($env) - ->exec("xcaddy build --output frankenphp {$xcaddyModules}"); + ->exec("xcaddy build --output frankenphp {$pgo}{$xcaddyModules}"); $this->deploySAPIBinary(BUILD_TARGET_FRANKENPHP); } diff --git a/src/SPC/builder/unix/library/curl.php b/src/SPC/builder/unix/library/curl.php index 904ae2fc..eb04c7c1 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 @@ -33,8 +34,16 @@ trait curl ) ->build(); - // patch pkgconf $this->patchPkgconfPrefix(['libcurl.pc']); + // 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 + 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"); } diff --git a/src/SPC/store/pkg/GoXcaddy.php b/src/SPC/store/pkg/GoXcaddy.php index b4981ad9..ce15bf05 100644 --- a/src/SPC/store/pkg/GoXcaddy.php +++ b/src/SPC/store/pkg/GoXcaddy.php @@ -85,7 +85,7 @@ class GoXcaddy extends CustomPackage 'GOBIN' => "{$pkgroot}/go-xcaddy/bin", 'GOPATH' => "{$pkgroot}/go", ]) - ->exec('CGO_ENABLED=0 go install github.com/caddyserver/xcaddy/cmd/xcaddy@latest'); + ->exec('CGO_ENABLED=0 go install github.com/caddyserver/xcaddy/cmd/xcaddy@master'); } public static function getEnvironment(): array 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', };