remove more unused options

This commit is contained in:
DubbleClick 2025-06-06 16:20:34 +07:00
parent a0c0555089
commit 560f684f7f
3 changed files with 6 additions and 20 deletions

View File

@ -635,9 +635,6 @@
], ],
"lib-depends": [ "lib-depends": [
"openssl" "openssl"
],
"lib-suggests": [
"ngtcp2"
] ]
}, },
"ngtcp2": { "ngtcp2": {
@ -655,6 +652,9 @@
], ],
"lib-depends": [ "lib-depends": [
"openssl" "openssl"
],
"lib-suggests": [
"nghttp3"
] ]
}, },
"onig": { "onig": {

View File

@ -6,22 +6,15 @@ namespace SPC\builder\unix\library;
use SPC\exception\FileSystemException; use SPC\exception\FileSystemException;
use SPC\exception\RuntimeException; use SPC\exception\RuntimeException;
use SPC\exception\WrongUsageException;
trait nghttp3 trait nghttp3
{ {
/** /**
* @throws FileSystemException * @throws FileSystemException
* @throws RuntimeException * @throws RuntimeException
* @throws WrongUsageException
*/ */
protected function build(): void protected function build(): void
{ {
$args = $this->builder->makeAutoconfArgs(static::NAME, [
'zlib' => null,
'openssl' => null,
]);
shell()->cd($this->source_dir) shell()->cd($this->source_dir)
->setEnv([ ->setEnv([
'CFLAGS' => $this->getLibExtraCFlags(), 'CFLAGS' => $this->getLibExtraCFlags(),
@ -34,7 +27,6 @@ trait nghttp3
'--disable-shared ' . '--disable-shared ' .
'--with-pic ' . '--with-pic ' .
'--enable-lib-only ' . '--enable-lib-only ' .
$args . ' ' .
'--prefix=' '--prefix='
) )
->execWithEnv('make clean') ->execWithEnv('make clean')

View File

@ -17,18 +17,12 @@ trait ngtcp2
*/ */
protected function build(): void protected function build(): void
{ {
$available = [ $args = $this->builder->makeAutoconfArgs(static::NAME, [
'openssl' => null, 'openssl' => null,
'libev' => null, 'libev' => null,
'jemalloc' => null, 'jemalloc' => null,
]; 'libnghttp3' => null,
if (PHP_OS_FAMILY === 'Linux') { ]);
$available = [...$available, ...[
'zlib' => null,
'libxml2' => null,
]];
}
$args = $this->builder->makeAutoconfArgs(static::NAME, $available);
if (PHP_OS_FAMILY === 'Linux') { if (PHP_OS_FAMILY === 'Linux') {
$args = preg_replace('/OPENSSL_LIBS="(.*?)"/', 'OPENSSL_LIBS="\1 -lpthread -ldl"', $args); $args = preg_replace('/OPENSSL_LIBS="(.*?)"/', 'OPENSSL_LIBS="\1 -lpthread -ldl"', $args);
} }