From 963e2a084a006090d52f23794fd205f902576f15 Mon Sep 17 00:00:00 2001 From: Hendrik Mennen Date: Sun, 22 Mar 2026 09:07:47 +0100 Subject: [PATCH 1/3] 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. --- config/lib.json | 3 ++ src/SPC/builder/windows/library/brotli.php | 36 +++++++++++++++++++ src/SPC/builder/windows/library/libaom.php | 41 ++++++++++++++++++++++ 3 files changed, 80 insertions(+) create mode 100644 src/SPC/builder/windows/library/brotli.php create mode 100644 src/SPC/builder/windows/library/libaom.php diff --git a/config/lib.json b/config/lib.json index 58cbd4ba0..2612f6be3 100644 --- a/config/lib.json +++ b/config/lib.json @@ -355,6 +355,9 @@ "static-libs-unix": [ "libaom.a" ], + "static-libs-windows": [ + "aom.lib" + ], "cpp-library": true }, "libargon2": { diff --git a/src/SPC/builder/windows/library/brotli.php b/src/SPC/builder/windows/library/brotli.php new file mode 100644 index 000000000..f22f402ce --- /dev/null +++ b/src/SPC/builder/windows/library/brotli.php @@ -0,0 +1,36 @@ +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}" + ); + } +} diff --git a/src/SPC/builder/windows/library/libaom.php b/src/SPC/builder/windows/library/libaom.php new file mode 100644 index 000000000..06d53cbc7 --- /dev/null +++ b/src/SPC/builder/windows/library/libaom.php @@ -0,0 +1,41 @@ +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}" + ); + } +} From a99b6bebaed8bc6bd53a2913ec9dd0ebcb9dbc78 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Mon, 23 Mar 2026 16:08:09 +0800 Subject: [PATCH 2/3] Remove freetype useless lib suggestions --- config/lib.json | 4 +--- src/SPC/builder/unix/library/freetype.php | 4 ++-- src/SPC/builder/windows/library/freetype.php | 2 ++ 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/config/lib.json b/config/lib.json index 2612f6be3..824023687 100644 --- a/config/lib.json +++ b/config/lib.json @@ -143,9 +143,7 @@ "zlib" ], "lib-suggests": [ - "libpng", - "bzip2", - "brotli" + "libpng" ] }, "gettext": { diff --git a/src/SPC/builder/unix/library/freetype.php b/src/SPC/builder/unix/library/freetype.php index a10b7fb28..57c1ac05c 100644 --- a/src/SPC/builder/unix/library/freetype.php +++ b/src/SPC/builder/unix/library/freetype.php @@ -13,8 +13,8 @@ protected function build(): void { $cmake = UnixCMakeExecutor::create($this) ->optionalLib('libpng', ...cmake_boolean_args('FT_DISABLE_PNG', true)) - ->optionalLib('bzip2', ...cmake_boolean_args('FT_DISABLE_BZIP2', true)) - ->optionalLib('brotli', ...cmake_boolean_args('FT_DISABLE_BROTLI', true)) + ->addConfigureArgs('-DFT_DISABLE_BZIP2=ON') + ->addConfigureArgs('-DFT_DISABLE_BROTLI=ON') ->addConfigureArgs('-DFT_DISABLE_HARFBUZZ=ON'); // fix cmake 4.0 compatibility diff --git a/src/SPC/builder/windows/library/freetype.php b/src/SPC/builder/windows/library/freetype.php index ef13c8fe6..8401b4de4 100644 --- a/src/SPC/builder/windows/library/freetype.php +++ b/src/SPC/builder/windows/library/freetype.php @@ -24,6 +24,8 @@ protected function build(): void "-DCMAKE_TOOLCHAIN_FILE={$this->builder->cmake_toolchain_file} " . '-DCMAKE_BUILD_TYPE=Release ' . '-DBUILD_SHARED_LIBS=OFF ' . + '-DFT_DISABLE_BROTLI=TRUE ' . + '-DFT_DISABLE_BZIP2=TRUE ' . '-DCMAKE_INSTALL_PREFIX=' . BUILD_ROOT_PATH . ' ' ) ->execWithWrapper( From d076df6b04f33adc0d4185e9340ff287416bfdca Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Mon, 23 Mar 2026 16:21:24 +0800 Subject: [PATCH 3/3] Bump version number --- src/SPC/ConsoleApplication.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SPC/ConsoleApplication.php b/src/SPC/ConsoleApplication.php index 750c49e4b..79f7d724a 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.3'; + public const string VERSION = '2.8.4'; public function __construct() {