From 560f684f7fb1ec9e16c6405a24331862b0468779 Mon Sep 17 00:00:00 2001 From: DubbleClick Date: Fri, 6 Jun 2025 16:20:34 +0700 Subject: [PATCH] remove more unused options --- config/lib.json | 6 +++--- src/SPC/builder/unix/library/nghttp3.php | 8 -------- src/SPC/builder/unix/library/ngtcp2.php | 12 +++--------- 3 files changed, 6 insertions(+), 20 deletions(-) diff --git a/config/lib.json b/config/lib.json index 78443d0d..582abd2e 100644 --- a/config/lib.json +++ b/config/lib.json @@ -635,9 +635,6 @@ ], "lib-depends": [ "openssl" - ], - "lib-suggests": [ - "ngtcp2" ] }, "ngtcp2": { @@ -655,6 +652,9 @@ ], "lib-depends": [ "openssl" + ], + "lib-suggests": [ + "nghttp3" ] }, "onig": { diff --git a/src/SPC/builder/unix/library/nghttp3.php b/src/SPC/builder/unix/library/nghttp3.php index 6f677869..03d4d481 100644 --- a/src/SPC/builder/unix/library/nghttp3.php +++ b/src/SPC/builder/unix/library/nghttp3.php @@ -6,22 +6,15 @@ namespace SPC\builder\unix\library; use SPC\exception\FileSystemException; use SPC\exception\RuntimeException; -use SPC\exception\WrongUsageException; trait nghttp3 { /** * @throws FileSystemException * @throws RuntimeException - * @throws WrongUsageException */ protected function build(): void { - $args = $this->builder->makeAutoconfArgs(static::NAME, [ - 'zlib' => null, - 'openssl' => null, - ]); - shell()->cd($this->source_dir) ->setEnv([ 'CFLAGS' => $this->getLibExtraCFlags(), @@ -34,7 +27,6 @@ trait nghttp3 '--disable-shared ' . '--with-pic ' . '--enable-lib-only ' . - $args . ' ' . '--prefix=' ) ->execWithEnv('make clean') diff --git a/src/SPC/builder/unix/library/ngtcp2.php b/src/SPC/builder/unix/library/ngtcp2.php index 3e92c7d5..fef32b75 100644 --- a/src/SPC/builder/unix/library/ngtcp2.php +++ b/src/SPC/builder/unix/library/ngtcp2.php @@ -17,18 +17,12 @@ trait ngtcp2 */ protected function build(): void { - $available = [ + $args = $this->builder->makeAutoconfArgs(static::NAME, [ 'openssl' => null, 'libev' => null, 'jemalloc' => null, - ]; - if (PHP_OS_FAMILY === 'Linux') { - $available = [...$available, ...[ - 'zlib' => null, - 'libxml2' => null, - ]]; - } - $args = $this->builder->makeAutoconfArgs(static::NAME, $available); + 'libnghttp3' => null, + ]); if (PHP_OS_FAMILY === 'Linux') { $args = preg_replace('/OPENSSL_LIBS="(.*?)"/', 'OPENSSL_LIBS="\1 -lpthread -ldl"', $args); }