mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-08 01:15:37 +08:00
Add Windows builders for libaom and brotli (#1072)
This commit is contained in:
@@ -143,9 +143,7 @@
|
|||||||
"zlib"
|
"zlib"
|
||||||
],
|
],
|
||||||
"lib-suggests": [
|
"lib-suggests": [
|
||||||
"libpng",
|
"libpng"
|
||||||
"bzip2",
|
|
||||||
"brotli"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"gettext": {
|
"gettext": {
|
||||||
@@ -355,6 +353,9 @@
|
|||||||
"static-libs-unix": [
|
"static-libs-unix": [
|
||||||
"libaom.a"
|
"libaom.a"
|
||||||
],
|
],
|
||||||
|
"static-libs-windows": [
|
||||||
|
"aom.lib"
|
||||||
|
],
|
||||||
"cpp-library": true
|
"cpp-library": true
|
||||||
},
|
},
|
||||||
"libargon2": {
|
"libargon2": {
|
||||||
|
|||||||
@@ -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()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
36
src/SPC/builder/windows/library/brotli.php
Normal file
36
src/SPC/builder/windows/library/brotli.php
Normal 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}"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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(
|
||||||
|
|||||||
41
src/SPC/builder/windows/library/libaom.php
Normal file
41
src/SPC/builder/windows/library/libaom.php
Normal 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}"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user