Compare commits

...

27 Commits
2.8.3 ... 2.8.4

Author SHA1 Message Date
Jerry Ma
d411fac9a1 add framework coreservices to watcher library (#1082) 2026-04-04 20:05:47 +08:00
henderkes
ddb9e3e7e4 add framework coreservices to watcher library 2026-04-04 18:18:22 +07:00
Marc
fef361225a Fix file paths for SQLSRV (#1081) 2026-04-04 18:11:38 +07:00
crazywhalecc
0b2b1d51e1 Fix file paths for SQLSRV 2026-04-04 18:39:28 +08:00
Jerry Ma
820d77b8b2 [v2] Fix bunch of build bugs for Windows (#1078) 2026-04-03 19:58:57 +08:00
Jerry Ma
cd3eb3d41d Update src/globals/ext-tests/openssl.php 2026-04-03 19:53:23 +08:00
crazywhalecc
fb8f8d4ef8 Correct openssl test script condition 2026-04-03 15:49:02 +08:00
crazywhalecc
1a476d0e80 Fix xcopy command in FileSystem.php by removing the 'v' flag 2026-04-03 15:34:56 +08:00
crazywhalecc
e5ad72214c Add brotli to curl (just workaround for transitive deps) 2026-04-03 14:18:13 +08:00
crazywhalecc
c339b900f8 Disable simd for libjpeg 2026-04-03 11:33:55 +08:00
crazywhalecc
3ded9881e1 Disable openssl for ngtcp2 temporarily 2026-04-03 09:55:46 +08:00
crazywhalecc
08a6bf38a4 Remove zstd suggested libs for v2 (implemented on v3)
Anyway we don't support zstd windows build before
2026-04-02 18:04:03 +08:00
crazywhalecc
cae668a947 Remove zstd suggested libs for v2 (implemented on v3)
Anyway we don't support zstd windows build before
2026-04-02 17:59:15 +08:00
crazywhalecc
e592488d7a Add test 2026-04-02 16:34:51 +08:00
crazywhalecc
a7184d0411 Fix sqlsrv redundant cflags when building PHP 2026-04-02 16:32:43 +08:00
Marc
d535e4f102 libjpeg-turbo mustn't compile zlib symbols on its own (#1077) 2026-03-30 10:08:49 +07:00
henderkes
5a5f54bdcd brilliant to test php 8.1 2026-03-30 01:37:08 +07:00
henderkes
8f7897e13b test 2026-03-30 01:06:31 +07:00
henderkes
daae5f2a7c libjpeg-turbo mustn't compile zlib symbols on its own 2026-03-30 00:56:51 +07:00
Marc
766f7fa34f hard code protobuf version while we're on v2 (#1075) 2026-03-26 12:37:32 +07:00
henderkes
ecf712b2b7 hard code protobuf version while we're on v2 2026-03-26 12:32:27 +07:00
Jerry Ma
d35cbd7bf8 Add Windows builders for libaom and brotli (#1072) 2026-03-23 16:21:46 +08:00
crazywhalecc
d076df6b04 Bump version number 2026-03-23 16:21:24 +08:00
crazywhalecc
a99b6bebae Remove freetype useless lib suggestions 2026-03-23 16:08:09 +08:00
Hendrik Mennen
864678ab46 Merge branch 'main' into feat/windows-libaom-brotli 2026-03-22 13:12:47 +01:00
Hendrik Mennen
c03508a84b Improve zlib Windows library detection for future zlib versions (#1070)
Co-authored-by: Hendrik Mennen <hmennen@gambio.ec1.de>
2026-03-22 20:11:29 +08:00
Hendrik Mennen
963e2a084a Add Windows builders for libaom and brotli libraries
Both libraries are listed in lib.json and used as transitive dependencies
(libaom via libavif, brotli via freetype/curl) but had no Windows builder,
causing builds to fail with "library [X] is in the lib.json list but not
supported to compile".

libaom: Uses builddir instead of build to avoid collision with the
source tree's build/cmake/ directory. Matches the Unix builder's
AOM_TARGET_CPU=generic setting for portability.

brotli: Standard CMake build with shared libs and tools disabled.

Also adds static-libs-windows entry for libaom in lib.json.
2026-03-22 09:07:47 +01:00
16 changed files with 120 additions and 23 deletions

View File

@@ -63,7 +63,8 @@
], ],
"ext-depends-windows": [ "ext-depends-windows": [
"zlib", "zlib",
"openssl" "openssl",
"brotli"
] ]
}, },
"dba": { "dba": {

View File

@@ -109,8 +109,7 @@
"krb5" "krb5"
], ],
"lib-suggests-windows": [ "lib-suggests-windows": [
"brotli", "brotli"
"zstd"
], ],
"frameworks": [ "frameworks": [
"CoreFoundation", "CoreFoundation",
@@ -143,9 +142,7 @@
"zlib" "zlib"
], ],
"lib-suggests": [ "lib-suggests": [
"libpng", "libpng"
"bzip2",
"brotli"
] ]
}, },
"gettext": { "gettext": {
@@ -355,6 +352,9 @@
"static-libs-unix": [ "static-libs-unix": [
"libaom.a" "libaom.a"
], ],
"static-libs-windows": [
"aom.lib"
],
"cpp-library": true "cpp-library": true
}, },
"libargon2": { "libargon2": {
@@ -493,7 +493,7 @@
"static-libs-windows": [ "static-libs-windows": [
"libjpeg_a.lib" "libjpeg_a.lib"
], ],
"lib-suggests-windows": [ "lib-depends": [
"zlib" "zlib"
] ]
}, },
@@ -762,7 +762,6 @@
"xz" "xz"
], ],
"lib-suggests-windows": [ "lib-suggests-windows": [
"zstd",
"openssl" "openssl"
] ]
}, },
@@ -999,6 +998,9 @@
], ],
"headers": [ "headers": [
"wtr/watcher-c.h" "wtr/watcher-c.h"
],
"frameworks": [
"CoreServices"
] ]
}, },
"xz": { "xz": {

View File

@@ -641,6 +641,7 @@
"libjpeg": { "libjpeg": {
"type": "ghtar", "type": "ghtar",
"repo": "libjpeg-turbo/libjpeg-turbo", "repo": "libjpeg-turbo/libjpeg-turbo",
"prefer-stable": true,
"license": { "license": {
"type": "file", "type": "file",
"path": "LICENSE.md" "path": "LICENSE.md"
@@ -1054,7 +1055,7 @@
}, },
"protobuf": { "protobuf": {
"type": "url", "type": "url",
"url": "https://pecl.php.net/get/protobuf", "url": "https://pecl.php.net/get/protobuf-5.34.1.tgz",
"path": "php-src/ext/protobuf", "path": "php-src/ext/protobuf",
"filename": "protobuf.tgz", "filename": "protobuf.tgz",
"license": { "license": {

View File

@@ -34,7 +34,7 @@ use Symfony\Component\Console\Application;
*/ */
final class ConsoleApplication extends Application final class ConsoleApplication extends Application
{ {
public const string VERSION = '2.8.3'; public const string VERSION = '2.8.4';
public function __construct() public function __construct()
{ {

View File

@@ -33,4 +33,14 @@ class sqlsrv extends Extension
} }
return false; return false;
} }
public function patchBeforeMake(): bool
{
$makefile = SOURCE_PATH . '/php-src/Makefile';
$makeContent = file_get_contents($makefile);
$makeContent = preg_replace('/^(CFLAGS_(?:PDO_)?SQLSRV=.*?)\s+\/W4\b/m', '$1', $makeContent);
$makeContent = preg_replace('/^(CFLAGS_(?:PDO_)?SQLSRV=.*?)\s+\/WX\b/m', '$1', $makeContent);
file_put_contents($makefile, $makeContent);
return true;
}
} }

View File

@@ -13,8 +13,8 @@ trait freetype
{ {
$cmake = UnixCMakeExecutor::create($this) $cmake = UnixCMakeExecutor::create($this)
->optionalLib('libpng', ...cmake_boolean_args('FT_DISABLE_PNG', true)) ->optionalLib('libpng', ...cmake_boolean_args('FT_DISABLE_PNG', true))
->optionalLib('bzip2', ...cmake_boolean_args('FT_DISABLE_BZIP2', true)) ->addConfigureArgs('-DFT_DISABLE_BZIP2=ON')
->optionalLib('brotli', ...cmake_boolean_args('FT_DISABLE_BROTLI', true)) ->addConfigureArgs('-DFT_DISABLE_BROTLI=ON')
->addConfigureArgs('-DFT_DISABLE_HARFBUZZ=ON'); ->addConfigureArgs('-DFT_DISABLE_HARFBUZZ=ON');
// fix cmake 4.0 compatibility // fix cmake 4.0 compatibility

View File

@@ -14,6 +14,7 @@ trait libjpeg
->addConfigureArgs( ->addConfigureArgs(
'-DENABLE_STATIC=ON', '-DENABLE_STATIC=ON',
'-DENABLE_SHARED=OFF', '-DENABLE_SHARED=OFF',
'-DWITH_SYSTEM_ZLIB=ON'
) )
->build(); ->build();
// patch pkgconfig // patch pkgconfig

View File

@@ -0,0 +1,36 @@
<?php
declare(strict_types=1);
namespace SPC\builder\windows\library;
use SPC\store\FileSystem;
class brotli extends WindowsLibraryBase
{
public const NAME = 'brotli';
protected function build(): void
{
// reset cmake
FileSystem::resetDir($this->source_dir . '\build');
// start build
cmd()->cd($this->source_dir)
->execWithWrapper(
$this->builder->makeSimpleWrapper('cmake'),
'-B build ' .
'-A x64 ' .
"-DCMAKE_TOOLCHAIN_FILE={$this->builder->cmake_toolchain_file} " .
'-DCMAKE_BUILD_TYPE=Release ' .
'-DBUILD_SHARED_LIBS=OFF ' .
'-DBROTLI_BUILD_TOOLS=OFF ' .
'-DBROTLI_BUNDLED_MODE=OFF ' .
'-DCMAKE_INSTALL_PREFIX=' . BUILD_ROOT_PATH . ' '
)
->execWithWrapper(
$this->builder->makeSimpleWrapper('cmake'),
"--build build --config Release --target install -j{$this->builder->concurrency}"
);
}
}

View File

@@ -24,6 +24,8 @@ class freetype extends WindowsLibraryBase
"-DCMAKE_TOOLCHAIN_FILE={$this->builder->cmake_toolchain_file} " . "-DCMAKE_TOOLCHAIN_FILE={$this->builder->cmake_toolchain_file} " .
'-DCMAKE_BUILD_TYPE=Release ' . '-DCMAKE_BUILD_TYPE=Release ' .
'-DBUILD_SHARED_LIBS=OFF ' . '-DBUILD_SHARED_LIBS=OFF ' .
'-DFT_DISABLE_BROTLI=TRUE ' .
'-DFT_DISABLE_BZIP2=TRUE ' .
'-DCMAKE_INSTALL_PREFIX=' . BUILD_ROOT_PATH . ' ' '-DCMAKE_INSTALL_PREFIX=' . BUILD_ROOT_PATH . ' '
) )
->execWithWrapper( ->execWithWrapper(

View File

@@ -0,0 +1,41 @@
<?php
declare(strict_types=1);
namespace SPC\builder\windows\library;
use SPC\store\FileSystem;
class libaom extends WindowsLibraryBase
{
public const NAME = 'libaom';
protected function build(): void
{
// libaom source tree contains a build/cmake/ directory with its own
// cmake modules, so we must use a different name for the build dir.
FileSystem::resetDir($this->source_dir . '\builddir');
// start build
cmd()->cd($this->source_dir)
->execWithWrapper(
$this->builder->makeSimpleWrapper('cmake'),
'-S . -B builddir ' .
'-A x64 ' .
"-DCMAKE_TOOLCHAIN_FILE={$this->builder->cmake_toolchain_file} " .
'-DCMAKE_BUILD_TYPE=Release ' .
'-DBUILD_SHARED_LIBS=OFF ' .
'-DAOM_TARGET_CPU=generic ' .
'-DENABLE_DOCS=OFF ' .
'-DENABLE_EXAMPLES=OFF ' .
'-DENABLE_TESTDATA=OFF ' .
'-DENABLE_TESTS=OFF ' .
'-DENABLE_TOOLS=OFF ' .
'-DCMAKE_INSTALL_PREFIX=' . BUILD_ROOT_PATH . ' '
)
->execWithWrapper(
$this->builder->makeSimpleWrapper('cmake'),
"--build builddir --config Release --target install -j{$this->builder->concurrency}"
);
}
}

View File

@@ -28,6 +28,7 @@ class libjpeg extends WindowsLibraryBase
'-DENABLE_STATIC=ON ' . '-DENABLE_STATIC=ON ' .
'-DBUILD_TESTING=OFF ' . '-DBUILD_TESTING=OFF ' .
'-DWITH_JAVA=OFF ' . '-DWITH_JAVA=OFF ' .
'-DWITH_SIMD=OFF ' .
'-DWITH_CRT_DLL=OFF ' . '-DWITH_CRT_DLL=OFF ' .
"-DENABLE_ZLIB_COMPRESSION={$zlib} " . "-DENABLE_ZLIB_COMPRESSION={$zlib} " .
'-DCMAKE_INSTALL_PREFIX=' . BUILD_ROOT_PATH . ' ' '-DCMAKE_INSTALL_PREFIX=' . BUILD_ROOT_PATH . ' '

View File

@@ -29,6 +29,7 @@ class ngtcp2 extends WindowsLibraryBase
'-DBUILD_SHARED_LIBS=OFF ' . '-DBUILD_SHARED_LIBS=OFF ' .
'-DENABLE_STATIC_CRT=ON ' . '-DENABLE_STATIC_CRT=ON ' .
'-DENABLE_LIB_ONLY=ON ' . '-DENABLE_LIB_ONLY=ON ' .
'-DENABLE_OPENSSL=OFF ' .
'-DCMAKE_INSTALL_PREFIX=' . BUILD_ROOT_PATH . ' ' '-DCMAKE_INSTALL_PREFIX=' . BUILD_ROOT_PATH . ' '
) )
->execWithWrapper( ->execWithWrapper(

View File

@@ -35,6 +35,7 @@ class zlib extends WindowsLibraryBase
'zlibstatic.lib', 'zlibstatic.lib',
'zs.lib', 'zs.lib',
'libzs.lib', 'libzs.lib',
'libz.lib',
]; ];
foreach ($detect_list as $item) { foreach ($detect_list as $item) {
if (file_exists(BUILD_LIB_PATH . '\\' . $item)) { if (file_exists(BUILD_LIB_PATH . '\\' . $item)) {

View File

@@ -152,7 +152,7 @@ class FileSystem
$src_path = FileSystem::convertPath($from); $src_path = FileSystem::convertPath($from);
switch (PHP_OS_FAMILY) { switch (PHP_OS_FAMILY) {
case 'Windows': case 'Windows':
f_passthru('xcopy "' . $src_path . '" "' . $dst_path . '" /s/e/v/y/i'); f_passthru('xcopy "' . $src_path . '" "' . $dst_path . '" /s/e/y/i');
break; break;
case 'Linux': case 'Linux':
case 'Darwin': case 'Darwin':

View File

@@ -31,6 +31,6 @@ if (file_exists('/etc/ssl/openssl.cnf')) {
} }
assert($valid); assert($valid);
} }
if (PHP_VERSION_ID >= 80500 && defined('OPENSSL_VERSION_NUMBER') && OPENSSL_VERSION_NUMBER >= 0x30200000) { if (PHP_VERSION_ID >= 80500 && (!PHP_ZTS || PHP_OS_FAMILY !== 'Windows') && defined('OPENSSL_VERSION_NUMBER') && OPENSSL_VERSION_NUMBER >= 0x30200000) {
assert(function_exists('openssl_password_hash')); assert(function_exists('openssl_password_hash'));
} }

View File

@@ -13,25 +13,25 @@ declare(strict_types=1);
// test php version (8.1 ~ 8.4 available, multiple for matrix) // test php version (8.1 ~ 8.4 available, multiple for matrix)
$test_php_version = [ $test_php_version = [
'8.1', // '8.1',
// '8.2', // '8.2',
// '8.3', // '8.3',
'8.4', // '8.4',
'8.5', '8.5',
// 'git', // 'git',
]; ];
// test os (macos-15-intel, macos-15, ubuntu-latest, windows-latest are available) // test os (macos-15-intel, macos-15, ubuntu-latest, windows-latest are available)
$test_os = [ $test_os = [
// 'macos-15-intel', // bin/spc for x86_64 '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-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-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 // 'ubuntu-24.04-arm', // bin/spc for arm64
// 'windows-2022', // .\bin\spc.ps1 // 'windows-2022', // .\bin\spc.ps1
'windows-2025', // 'windows-2025',
]; ];
// whether enable thread safe // whether enable thread safe
@@ -42,16 +42,16 @@ $no_strip = false;
// compress with upx // compress with upx
$upx = false; $upx = false;
// whether to test frankenphp build, only available for macos and linux // whether to test frankenphp build, only available for macOS and linux
$frankenphp = false; $frankenphp = true;
// prefer downloading pre-built packages to speed up the build process // prefer downloading pre-built packages to speed up the build process
$prefer_pre_built = false; $prefer_pre_built = false;
// If you want to test your added extensions and libs, add below (comma separated, example `bcmath,openssl`). // If you want to test your added extensions and libs, add below (comma separated, example `bcmath,openssl`).
$extensions = match (PHP_OS_FAMILY) { $extensions = match (PHP_OS_FAMILY) {
'Linux', 'Darwin' => 'pgsql', 'Linux', 'Darwin' => 'sqlsrv,pdo_sqlsrv',
'Windows' => 'gd,zlib,mbstring,filter', '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',
}; };
// If you want to test shared extensions, add them below (comma separated, example `bcmath,openssl`). // If you want to test shared extensions, add them below (comma separated, example `bcmath,openssl`).