mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-02 22:35:43 +08:00
Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5a5f54bdcd | ||
|
|
8f7897e13b | ||
|
|
daae5f2a7c | ||
|
|
766f7fa34f | ||
|
|
ecf712b2b7 | ||
|
|
d35cbd7bf8 | ||
|
|
d076df6b04 | ||
|
|
a99b6bebae | ||
|
|
864678ab46 | ||
|
|
c03508a84b | ||
|
|
963e2a084a |
@@ -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": {
|
||||||
@@ -493,7 +494,7 @@
|
|||||||
"static-libs-windows": [
|
"static-libs-windows": [
|
||||||
"libjpeg_a.lib"
|
"libjpeg_a.lib"
|
||||||
],
|
],
|
||||||
"lib-suggests-windows": [
|
"lib-depends": [
|
||||||
"zlib"
|
"zlib"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -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": {
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
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}"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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)) {
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ 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',
|
||||||
@@ -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, 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',
|
||||||
@@ -42,7 +42,7 @@ $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 = false;
|
||||||
|
|
||||||
// prefer downloading pre-built packages to speed up the build process
|
// prefer downloading pre-built packages to speed up the build process
|
||||||
@@ -50,7 +50,7 @@ $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' => 'zlib',
|
||||||
'Windows' => 'gd,zlib,mbstring,filter',
|
'Windows' => 'gd,zlib,mbstring,filter',
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -66,7 +66,7 @@ $with_suggested_libs = true;
|
|||||||
|
|
||||||
// If you want to test extra libs for extensions, add them below (comma separated, example `libwebp,libavif`). Unnecessary, when $with_suggested_libs is true.
|
// 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) {
|
$with_libs = match (PHP_OS_FAMILY) {
|
||||||
'Linux', 'Darwin' => '',
|
'Linux', 'Darwin' => 'libjpeg',
|
||||||
'Windows' => '',
|
'Windows' => '',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user