mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-09 01:45:36 +08:00
Looks like ngtcp2 does not happy with pkg-config
This commit is contained in:
@@ -4,6 +4,8 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace SPC\builder\unix\library;
|
namespace SPC\builder\unix\library;
|
||||||
|
|
||||||
|
use SPC\builder\linux\library\LinuxLibraryBase;
|
||||||
|
use SPC\builder\macos\library\MacOSLibraryBase;
|
||||||
use SPC\exception\FileSystemException;
|
use SPC\exception\FileSystemException;
|
||||||
use SPC\exception\RuntimeException;
|
use SPC\exception\RuntimeException;
|
||||||
use SPC\exception\WrongUsageException;
|
use SPC\exception\WrongUsageException;
|
||||||
@@ -19,17 +21,23 @@ trait ngtcp2
|
|||||||
protected function build(): void
|
protected function build(): void
|
||||||
{
|
{
|
||||||
UnixAutoconfExecutor::create($this)
|
UnixAutoconfExecutor::create($this)
|
||||||
->optionalLib('openssl', fn ($lib) => implode(' ', [
|
->optionalLib('openssl', fn (LinuxLibraryBase|MacOSLibraryBase $lib) => implode(' ', [
|
||||||
'--with-openssl=yes',
|
'--with-openssl=yes',
|
||||||
|
"OPENSSL_LIBS=\"{$lib->getStaticLibFiles()}\"",
|
||||||
|
"OPENSSL_CFLAGS=\"-I{$lib->getIncludeDir()}\"",
|
||||||
]), '--with-openssl=no')
|
]), '--with-openssl=no')
|
||||||
->optionalLib('libev', ...ac_with_args('libev', true))
|
->optionalLib('libev', ...ac_with_args('libev', true))
|
||||||
->optionalLib('nghttp3', ...ac_with_args('libnghttp3', true))
|
->optionalLib('nghttp3', ...ac_with_args('libnghttp3', true))
|
||||||
->optionalLib('jemalloc', ...ac_with_args('jemalloc', true))
|
->optionalLib('jemalloc', ...ac_with_args('jemalloc', true))
|
||||||
->optionalLib(
|
->optionalLib(
|
||||||
'brotli',
|
'brotli',
|
||||||
fn ($lib) => implode(' ', [
|
fn (LinuxLibraryBase|MacOSLibraryBase $lib) => implode(' ', [
|
||||||
'--with-libbrotlidec=yes',
|
'--with-brotlidec=yes',
|
||||||
|
"LIBBROTLIDEC_CFLAGS=\"-I{$lib->getIncludeDir()}\"",
|
||||||
|
"LIBBROTLIDEC_LIBS=\"{$lib->getStaticLibFiles()}\"",
|
||||||
'--with-libbrotlienc=yes',
|
'--with-libbrotlienc=yes',
|
||||||
|
"LIBBROTLIENC_CFLAGS=\"-I{$lib->getIncludeDir()}\"",
|
||||||
|
"LIBBROTLIENC_LIBS=\"{$lib->getStaticLibFiles()}\"",
|
||||||
])
|
])
|
||||||
)
|
)
|
||||||
->appendEnv(['PKG_CONFIG' => '$PKG_CONFIG --static'])
|
->appendEnv(['PKG_CONFIG' => '$PKG_CONFIG --static'])
|
||||||
|
|||||||
Reference in New Issue
Block a user