Compare commits

...

5 Commits

Author SHA1 Message Date
henderkes
8cc6452620 forward ld flags to php configure 2026-02-18 12:43:43 +07:00
henderkes
6123c83df7 no point testing this 2026-02-18 12:01:25 +07:00
Marc
3e9a8291f8 Merge branch 'main' into feat/avif-dec 2026-02-18 12:00:06 +07:00
henderkes
1a3c271963 always extract dir because of licenses 2026-02-18 11:59:58 +07:00
henderkes
594345893d allow pkg-configs for brotli and openssl 2026-02-18 11:54:09 +07:00
4 changed files with 20 additions and 26 deletions

View File

@@ -58,9 +58,6 @@
"brotlicommon.lib",
"brotlienc.lib",
"brotlidec.lib"
],
"headers": [
"brotli"
]
},
"bzip2": {
@@ -862,17 +859,13 @@
},
"openssl": {
"source": "openssl",
"static-libs-unix": [
"libssl.a",
"libcrypto.a"
"pkg-configs": [
"openssl"
],
"static-libs-windows": [
"libssl.lib",
"libcrypto.lib"
],
"headers": [
"openssl"
],
"lib-depends": [
"zlib"
]
@@ -974,10 +967,10 @@
},
"unixodbc": {
"source": "unixodbc",
"static-libs-unix": [
"libodbc.a",
"libodbccr.a",
"libodbcinst.a"
"pkg-configs": [
"odbc",
"odbccr",
"odbcinst"
],
"lib-depends": [
"libiconv"

View File

@@ -177,18 +177,19 @@ abstract class LibraryBase
if (file_exists($this->source_dir . '/.spc.patched')) {
$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
if ($force_build) {
$type = Config::getLib(static::NAME, 'type', 'lib');
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()) {
file_put_contents($this->source_dir . '/.spc.patched', 'PATCHED!!!');
}

View File

@@ -93,7 +93,7 @@ class LinuxBuilder extends UnixBuilderBase
$php_configure_env = SystemUtil::makeEnvVarString([
'CFLAGS' => getenv('SPC_CMD_VAR_PHP_MAKE_EXTRA_CFLAGS'),
'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!
]);

View File

@@ -26,10 +26,10 @@ $test_os = [
// 'macos-15-intel', // bin/spc for x86_64
// 'macos-15', // bin/spc for arm64
// 'ubuntu-latest', // bin/spc-alpine-docker for x86_64
'ubuntu-22.04', // bin/spc-gnu-docker for x86_64
'ubuntu-24.04', // bin/spc for x86_64
'ubuntu-22.04-arm', // bin/spc-gnu-docker for arm64
'ubuntu-24.04-arm', // bin/spc for arm64
// 'ubuntu-22.04', // bin/spc-gnu-docker for x86_64
// 'ubuntu-24.04', // bin/spc for x86_64
// 'ubuntu-22.04-arm', // bin/spc-gnu-docker for arm64
// 'ubuntu-24.04-arm', // bin/spc for arm64
// 'windows-2022', // .\bin\spc.ps1
// '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`).
$extensions = match (PHP_OS_FAMILY) {
'Linux', 'Darwin' => 'pgsql',
'Linux', 'Darwin' => '',
'Windows' => 'com_dotnet',
};