mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 04:44:53 +08:00
Fix library base, fix brotli and curl libs, trigger extension test
This commit is contained in:
parent
6dd4406782
commit
f2ccabf062
@ -35,10 +35,10 @@
|
|||||||
},
|
},
|
||||||
"brotli": {
|
"brotli": {
|
||||||
"source": "brotli",
|
"source": "brotli",
|
||||||
"static-libs-unix": [
|
"pkg-configs": [
|
||||||
"libbrotlicommon.a",
|
"libbrotlicommon",
|
||||||
"libbrotlidec.a",
|
"libbrotlidec",
|
||||||
"libbrotlienc.a"
|
"libbrotlienc"
|
||||||
],
|
],
|
||||||
"static-libs-windows": [
|
"static-libs-windows": [
|
||||||
"brotlicommon.lib",
|
"brotlicommon.lib",
|
||||||
|
|||||||
@ -226,28 +226,8 @@ abstract class LibraryBase
|
|||||||
return LIB_STATUS_OK;
|
return LIB_STATUS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
// check if these libraries exist, if not, invoke compilation and return the result status
|
if (!$this->isLibraryInstalled()) {
|
||||||
foreach ($this->getStaticLibs() as $name) {
|
return $this->tryBuild(true);
|
||||||
if (!file_exists(BUILD_LIB_PATH . "/{$name}")) {
|
|
||||||
$this->tryBuild(true);
|
|
||||||
return LIB_STATUS_OK;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// header files the same
|
|
||||||
foreach ($this->getHeaders() as $name) {
|
|
||||||
if (!file_exists(BUILD_INCLUDE_PATH . "/{$name}")) {
|
|
||||||
$this->tryBuild(true);
|
|
||||||
return LIB_STATUS_OK;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// current library is package and binary file is not exists
|
|
||||||
if (Config::getLib(static::NAME, 'type', 'lib') === 'package') {
|
|
||||||
foreach ($this->getBinaryFiles() as $name) {
|
|
||||||
if (!file_exists(BUILD_BIN_PATH . "/{$name}")) {
|
|
||||||
$this->tryBuild(true);
|
|
||||||
return LIB_STATUS_OK;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// if all the files exist at this point, skip the compilation process
|
// if all the files exist at this point, skip the compilation process
|
||||||
return LIB_STATUS_ALREADY;
|
return LIB_STATUS_ALREADY;
|
||||||
|
|||||||
@ -21,10 +21,10 @@ trait curl
|
|||||||
UnixCMakeExecutor::create($this)
|
UnixCMakeExecutor::create($this)
|
||||||
->optionalLib('openssl', '-DCURL_USE_OPENSSL=ON -DCURL_CA_BUNDLE=OFF -DCURL_CA_PATH=OFF -DCURL_CA_FALLBACK=ON', '-DCURL_USE_OPENSSL=OFF -DCURL_ENABLE_SSL=OFF')
|
->optionalLib('openssl', '-DCURL_USE_OPENSSL=ON -DCURL_CA_BUNDLE=OFF -DCURL_CA_PATH=OFF -DCURL_CA_FALLBACK=ON', '-DCURL_USE_OPENSSL=OFF -DCURL_ENABLE_SSL=OFF')
|
||||||
->optionalLib('brotli', ...cmake_boolean_args('CURL_BROTLI'))
|
->optionalLib('brotli', ...cmake_boolean_args('CURL_BROTLI'))
|
||||||
->optionalLib('libssh2', fn ($lib) => "-DLIBSSH2_LIBRARY=\"{$lib->getStaticLibFiles(style: 'cmake')}\" -DLIBSSH2_INCLUDE_DIR={$lib->getIncludeDir()}", '-DCURL_USE_LIBSSH2=OFF')
|
->optionalLib('libssh2', ...cmake_boolean_args('CURL_USE_LIBSSH2'))
|
||||||
->optionalLib('nghttp2', fn ($lib) => "-DUSE_NGHTTP2=ON -DNGHTTP2_LIBRARY=\"{$lib->getStaticLibFiles(style: 'cmake')}\" -DNGHTTP2_INCLUDE_DIR={$lib->getIncludeDir()}", '-DUSE_NGHTTP2=OFF')
|
->optionalLib('nghttp2', ...cmake_boolean_args('USE_NGHTTP2'))
|
||||||
->optionalLib('nghttp3', fn ($lib) => "-DUSE_NGHTTP3=ON -DNGHTTP3_LIBRARY=\"{$lib->getStaticLibFiles(style: 'cmake')}\" -DNGHTTP3_INCLUDE_DIR={$lib->getIncludeDir()}", '-DUSE_NGHTTP3=OFF')
|
->optionalLib('nghttp3', ...cmake_boolean_args('USE_NGHTTP3'))
|
||||||
->optionalLib('ngtcp2', fn ($lib) => "-DUSE_NGTCP2=ON -DNGNGTCP2_LIBRARY=\"{$lib->getStaticLibFiles(style: 'cmake')}\" -DNGNGTCP2_INCLUDE_DIR={$lib->getIncludeDir()}", '-DUSE_NGTCP2=OFF')
|
->optionalLib('ngtcp2', ...cmake_boolean_args('USE_NGTCP2'))
|
||||||
->optionalLib('ldap', ...cmake_boolean_args('CURL_DISABLE_LDAP', true))
|
->optionalLib('ldap', ...cmake_boolean_args('CURL_DISABLE_LDAP', true))
|
||||||
->optionalLib('zstd', ...cmake_boolean_args('CURL_ZSTD'))
|
->optionalLib('zstd', ...cmake_boolean_args('CURL_ZSTD'))
|
||||||
->optionalLib('idn2', ...cmake_boolean_args('USE_LIBIDN2'))
|
->optionalLib('idn2', ...cmake_boolean_args('USE_LIBIDN2'))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user