mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-03 23:05:41 +08:00
Compare commits
5 Commits
main
...
feat/avif-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8cc6452620 | ||
|
|
6123c83df7 | ||
|
|
3e9a8291f8 | ||
|
|
1a3c271963 | ||
|
|
594345893d |
@@ -58,9 +58,6 @@
|
|||||||
"brotlicommon.lib",
|
"brotlicommon.lib",
|
||||||
"brotlienc.lib",
|
"brotlienc.lib",
|
||||||
"brotlidec.lib"
|
"brotlidec.lib"
|
||||||
],
|
|
||||||
"headers": [
|
|
||||||
"brotli"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"bzip2": {
|
"bzip2": {
|
||||||
@@ -862,17 +859,13 @@
|
|||||||
},
|
},
|
||||||
"openssl": {
|
"openssl": {
|
||||||
"source": "openssl",
|
"source": "openssl",
|
||||||
"static-libs-unix": [
|
"pkg-configs": [
|
||||||
"libssl.a",
|
"openssl"
|
||||||
"libcrypto.a"
|
|
||||||
],
|
],
|
||||||
"static-libs-windows": [
|
"static-libs-windows": [
|
||||||
"libssl.lib",
|
"libssl.lib",
|
||||||
"libcrypto.lib"
|
"libcrypto.lib"
|
||||||
],
|
],
|
||||||
"headers": [
|
|
||||||
"openssl"
|
|
||||||
],
|
|
||||||
"lib-depends": [
|
"lib-depends": [
|
||||||
"zlib"
|
"zlib"
|
||||||
]
|
]
|
||||||
@@ -974,10 +967,10 @@
|
|||||||
},
|
},
|
||||||
"unixodbc": {
|
"unixodbc": {
|
||||||
"source": "unixodbc",
|
"source": "unixodbc",
|
||||||
"static-libs-unix": [
|
"pkg-configs": [
|
||||||
"libodbc.a",
|
"odbc",
|
||||||
"libodbccr.a",
|
"odbccr",
|
||||||
"libodbcinst.a"
|
"odbcinst"
|
||||||
],
|
],
|
||||||
"lib-depends": [
|
"lib-depends": [
|
||||||
"libiconv"
|
"libiconv"
|
||||||
|
|||||||
@@ -177,18 +177,19 @@ abstract class LibraryBase
|
|||||||
if (file_exists($this->source_dir . '/.spc.patched')) {
|
if (file_exists($this->source_dir . '/.spc.patched')) {
|
||||||
$this->patched = true;
|
$this->patched = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// extract first if not exists, needed for licenses of shared libraries
|
||||||
|
if (!is_dir($this->source_dir)) {
|
||||||
|
$this->getBuilder()->emitPatchPoint('before-library[' . static::NAME . ']-extract');
|
||||||
|
SourceManager::initSource(libs: [static::NAME], source_only: true);
|
||||||
|
$this->getBuilder()->emitPatchPoint('after-library[' . static::NAME . ']-extract');
|
||||||
|
}
|
||||||
|
|
||||||
// force means just build
|
// force means just build
|
||||||
if ($force_build) {
|
if ($force_build) {
|
||||||
$type = Config::getLib(static::NAME, 'type', 'lib');
|
$type = Config::getLib(static::NAME, 'type', 'lib');
|
||||||
logger()->info('Building required ' . $type . ' [' . static::NAME . ']');
|
logger()->info('Building required ' . $type . ' [' . static::NAME . ']');
|
||||||
|
|
||||||
// extract first if not exists
|
|
||||||
if (!is_dir($this->source_dir)) {
|
|
||||||
$this->getBuilder()->emitPatchPoint('before-library[' . static::NAME . ']-extract');
|
|
||||||
SourceManager::initSource(libs: [static::NAME], source_only: true);
|
|
||||||
$this->getBuilder()->emitPatchPoint('after-library[' . static::NAME . ']-extract');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!$this->patched && $this->patchBeforeBuild()) {
|
if (!$this->patched && $this->patchBeforeBuild()) {
|
||||||
file_put_contents($this->source_dir . '/.spc.patched', 'PATCHED!!!');
|
file_put_contents($this->source_dir . '/.spc.patched', 'PATCHED!!!');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ class LinuxBuilder extends UnixBuilderBase
|
|||||||
$php_configure_env = SystemUtil::makeEnvVarString([
|
$php_configure_env = SystemUtil::makeEnvVarString([
|
||||||
'CFLAGS' => getenv('SPC_CMD_VAR_PHP_MAKE_EXTRA_CFLAGS'),
|
'CFLAGS' => getenv('SPC_CMD_VAR_PHP_MAKE_EXTRA_CFLAGS'),
|
||||||
'CPPFLAGS' => '-I' . BUILD_INCLUDE_PATH, // . ' -Dsomethinghere', // . $musl_flag,
|
'CPPFLAGS' => '-I' . BUILD_INCLUDE_PATH, // . ' -Dsomethinghere', // . $musl_flag,
|
||||||
'LDFLAGS' => '-L' . BUILD_LIB_PATH,
|
'LDFLAGS' => clean_spaces("{$this->arch_ld_flags} -L" . BUILD_LIB_PATH),
|
||||||
// 'LIBS' => SPCTarget::getRuntimeLibs(), // do not pass static libraries here yet, they may contain polyfills for libc functions!
|
// 'LIBS' => SPCTarget::getRuntimeLibs(), // do not pass static libraries here yet, they may contain polyfills for libc functions!
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|||||||
@@ -26,10 +26,10 @@ $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',
|
||||||
];
|
];
|
||||||
@@ -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' => '',
|
||||||
'Windows' => 'com_dotnet',
|
'Windows' => 'com_dotnet',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user