diff --git a/config/source.json b/config/source.json index 4b3f7b594..18bca217b 100644 --- a/config/source.json +++ b/config/source.json @@ -462,10 +462,8 @@ } }, "krb5": { - "type": "ghtagtar", - "repo": "krb5/krb5", - "match": "krb5.+-final", - "prefer-stable": true, + "type": "url", + "url": "https://web.mit.edu/kerberos/dist/krb5/1.22/krb5-1.22.2.tar.gz", "license": { "type": "file", "path": "NOTICE" diff --git a/src/SPC/ConsoleApplication.php b/src/SPC/ConsoleApplication.php index 79f7d724a..9685a1d88 100644 --- a/src/SPC/ConsoleApplication.php +++ b/src/SPC/ConsoleApplication.php @@ -34,7 +34,7 @@ */ final class ConsoleApplication extends Application { - public const string VERSION = '2.8.4'; + public const string VERSION = '2.8.5'; public function __construct() { diff --git a/src/SPC/builder/extension/grpc.php b/src/SPC/builder/extension/grpc.php index ba15518f2..732f7cbe5 100644 --- a/src/SPC/builder/extension/grpc.php +++ b/src/SPC/builder/extension/grpc.php @@ -28,6 +28,15 @@ public function patchBeforeBuildconf(): bool 'zend_ce_exception,', ); + // Fix include path conflict with pdo_sqlsrv: grpc's PHP ext dir is added to the global include path via + $grpc_php_dir = "{$this->source_dir}/src/php/ext/grpc"; + if (file_exists("{$grpc_php_dir}/version.h")) { + copy("{$grpc_php_dir}/version.h", "{$grpc_php_dir}/php_grpc_version.h"); + unlink("{$grpc_php_dir}/version.h"); + FileSystem::replaceFileStr("{$grpc_php_dir}/php_grpc.h", '#include "version.h"', '#include "php_grpc_version.h"'); + FileSystem::replaceFileStr("{$grpc_php_dir}/php_grpc.c", '#include "version.h"', '#include "php_grpc_version.h"'); + } + $config_m4 = <<<'M4' PHP_ARG_ENABLE(grpc, [whether to enable grpc support], [AS_HELP_STRING([--enable-grpc], [Enable grpc support])]) diff --git a/src/SPC/builder/extension/swoole.php b/src/SPC/builder/extension/swoole.php index 86098ec51..7da30ba69 100644 --- a/src/SPC/builder/extension/swoole.php +++ b/src/SPC/builder/extension/swoole.php @@ -59,7 +59,7 @@ public function getUnixConfigureArg(bool $shared = false): string $arg .= $this->builder->getLib('brotli') ? (' --enable-brotli --with-brotli-dir=' . BUILD_ROOT_PATH) : ''; $arg .= $this->builder->getLib('nghttp2') ? (' --with-nghttp2-dir=' . BUILD_ROOT_PATH) : ''; $arg .= $this->builder->getLib('zstd') ? ' --enable-zstd' : ''; - $arg .= $this->builder->getLib('liburing') ? ' --enable-iouring --enable-uring-socket' : ''; + $arg .= $this->builder->getLib('liburing') && getenv('SPC_LIBC') !== 'glibc' ? ' --enable-iouring --enable-uring-socket' : '--disable-iouring'; $arg .= $this->builder->getExt('sockets') ? ' --enable-sockets' : ''; // enable additional features that require the pdo extension, but conflict with pdo_* extensions diff --git a/src/SPC/builder/unix/library/krb5.php b/src/SPC/builder/unix/library/krb5.php index 798346459..4cf0ad44e 100644 --- a/src/SPC/builder/unix/library/krb5.php +++ b/src/SPC/builder/unix/library/krb5.php @@ -13,7 +13,10 @@ protected function build(): void { $origin_source_dir = $this->source_dir; $this->source_dir .= '/src'; - shell()->cd($this->source_dir)->exec('autoreconf -if'); + shell()->cd($this->source_dir)->exec('ls -lah'); + if (!file_exists($this->source_dir . '/configure')) { + shell()->cd($this->source_dir)->exec('autoreconf -if'); + } $libs = array_map(fn ($x) => $x->getName(), $this->getDependencies(true)); $spc = new SPCConfigUtil($this->builder, ['no_php' => true, 'libs_only_deps' => true]); $config = $spc->config(libraries: $libs, include_suggest_lib: $this->builder->getOption('with-suggested-libs', false)); diff --git a/src/SPC/builder/unix/library/libjpeg.php b/src/SPC/builder/unix/library/libjpeg.php index 98881b762..969fa0608 100644 --- a/src/SPC/builder/unix/library/libjpeg.php +++ b/src/SPC/builder/unix/library/libjpeg.php @@ -14,7 +14,10 @@ protected function build(): void ->addConfigureArgs( '-DENABLE_STATIC=ON', '-DENABLE_SHARED=OFF', - '-DWITH_SYSTEM_ZLIB=ON' + '-DWITH_SYSTEM_ZLIB=ON', + '-DWITH_TOOLS=OFF', + '-DWITH_TESTS=OFF', + '-DWITH_SIMD=OFF', ) ->build(); // patch pkgconfig diff --git a/src/SPC/builder/windows/library/icu_static_win.php b/src/SPC/builder/windows/library/icu_static_win.php index c152c6e7d..fdd9e6cd4 100644 --- a/src/SPC/builder/windows/library/icu_static_win.php +++ b/src/SPC/builder/windows/library/icu_static_win.php @@ -12,16 +12,16 @@ class icu_static_win extends WindowsLibraryBase protected function build(): void { - copy("{$this->source_dir}\\x64-windows-static\\lib\\icudt.lib", "{$this->getLibDir()}\\icudt.lib"); - copy("{$this->source_dir}\\x64-windows-static\\lib\\icuin.lib", "{$this->getLibDir()}\\icuin.lib"); - copy("{$this->source_dir}\\x64-windows-static\\lib\\icuio.lib", "{$this->getLibDir()}\\icuio.lib"); - copy("{$this->source_dir}\\x64-windows-static\\lib\\icuuc.lib", "{$this->getLibDir()}\\icuuc.lib"); + copy("{$this->source_dir}\\lib\\icudt.lib", "{$this->getLibDir()}\\icudt.lib"); + copy("{$this->source_dir}\\lib\\icuin.lib", "{$this->getLibDir()}\\icuin.lib"); + copy("{$this->source_dir}\\lib\\icuio.lib", "{$this->getLibDir()}\\icuio.lib"); + copy("{$this->source_dir}\\lib\\icuuc.lib", "{$this->getLibDir()}\\icuuc.lib"); // create libpq folder in buildroot/includes/libpq if (!file_exists("{$this->getIncludeDir()}\\unicode")) { mkdir("{$this->getIncludeDir()}\\unicode"); } - FileSystem::copyDir("{$this->source_dir}\\x64-windows-static\\include\\unicode", "{$this->getIncludeDir()}\\unicode"); + FileSystem::copyDir("{$this->source_dir}\\include\\unicode", "{$this->getIncludeDir()}\\unicode"); } } diff --git a/src/SPC/util/executor/UnixCMakeExecutor.php b/src/SPC/util/executor/UnixCMakeExecutor.php index eceab9014..d0241f567 100644 --- a/src/SPC/util/executor/UnixCMakeExecutor.php +++ b/src/SPC/util/executor/UnixCMakeExecutor.php @@ -183,6 +183,7 @@ private function makeCmakeToolchainFile(): string $cflags = getenv('SPC_DEFAULT_C_FLAGS'); $cc = getenv('CC'); $cxx = getenv('CCX'); + $include = BUILD_INCLUDE_PATH; logger()->debug("making cmake tool chain file for {$os} {$target_arch} with CFLAGS='{$cflags}'"); $root = BUILD_ROOT_PATH; $pkgConfigExecutable = PkgConfigUtil::findPkgConfig(); @@ -210,6 +211,8 @@ private function makeCmakeToolchainFile(): string set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) +set(CMAKE_C_STANDARD_INCLUDE_DIRECTORIES "{$include}") +set(CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES "{$include}") set(CMAKE_EXE_LINKER_FLAGS "-ldl -lpthread -lm -lutil") CMAKE; // Whoops, linux may need CMAKE_AR sometimes diff --git a/src/globals/test-extensions.php b/src/globals/test-extensions.php index 7ae79aca2..8281f88b7 100644 --- a/src/globals/test-extensions.php +++ b/src/globals/test-extensions.php @@ -15,7 +15,7 @@ $test_php_version = [ // '8.1', // '8.2', - // '8.3', + '8.3', // '8.4', '8.5', // 'git', @@ -26,9 +26,9 @@ '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', @@ -43,15 +43,15 @@ $upx = false; // whether to test frankenphp build, only available for macOS and linux -$frankenphp = true; +$frankenphp = false; // prefer downloading pre-built packages to speed up the build process $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' => 'sqlsrv,pdo_sqlsrv', - 'Windows' => 'amqp,apcu,bcmath,bz2,calendar,ctype,curl,dba,dom,ds,exif,ffi,fileinfo,filter,ftp,gd,iconv,igbinary,libxml,mbregex,mbstring,mysqli,mysqlnd,opcache,openssl,pdo,pdo_mysql,pdo_sqlite,pdo_sqlsrv,phar,rar,redis,session,shmop,simdjson,simplexml,soap,sockets,sqlite3,sqlsrv,ssh2,sysvshm,tokenizer,xml,xmlreader,xmlwriter,yac,yaml,zip,zlib', + 'Linux', 'Darwin' => 'curl,swoole', + 'Windows' => 'intl', }; // If you want to test shared extensions, add them below (comma separated, example `bcmath,openssl`). @@ -66,7 +66,7 @@ // 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' => '', + 'Linux', 'Darwin' => 'krb5', 'Windows' => '', };