From 2681a88488e24ca11d3a49e9d3689a1da31b2124 Mon Sep 17 00:00:00 2001 From: Marc Date: Thu, 13 Mar 2025 11:23:36 +0100 Subject: [PATCH] =?UTF-8?q?don't=20require=20libacl=20and=20attr=20-=20use?= =?UTF-8?q?=20--with-libs=3D'libacl'=20if=20you=20build=E2=80=A6=20(#635)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * don't require libacl and attr - use --with-libs='libacl' if you build fpm with acl support * don't filter out libacl and libattr * suggest attr instead of requiring it * disable nls if libiconv is not built * suggest libiconv when using attr/libacl * wrong directive... * gettext (libintl) for acl/attr * remove suggestions and build acl and attr without nls --------- Co-authored-by: Marc Henderkes --- config/lib.json | 6 ++---- src/SPC/builder/unix/library/attr.php | 2 +- src/SPC/command/BuildCliCommand.php | 3 --- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/config/lib.json b/config/lib.json index 53c26d2c..7f0b3010 100644 --- a/config/lib.json +++ b/config/lib.json @@ -12,10 +12,8 @@ "lib-base", "micro" ], - "lib-depends-linux": [ - "lib-base", - "libacl", - "micro" + "lib-suggests-linux": [ + "libacl" ] }, "micro": { diff --git a/src/SPC/builder/unix/library/attr.php b/src/SPC/builder/unix/library/attr.php index a7d6d26f..d49cab41 100644 --- a/src/SPC/builder/unix/library/attr.php +++ b/src/SPC/builder/unix/library/attr.php @@ -19,7 +19,7 @@ trait attr 'LDFLAGS' => trim('-L' . BUILD_LIB_PATH . ' ' . $this->getLibExtraLdFlags()), 'LIBS' => $this->getLibExtraLibs(), ])->execWithEnv('./autogen.sh') - ->execWithEnv('./configure --prefix= --enable-static --disable-shared') + ->execWithEnv('./configure --prefix= --enable-static --disable-shared --disable-nls') ->execWithEnv("make -j {$this->builder->concurrency}") ->exec('make install DESTDIR=' . BUILD_ROOT_PATH); diff --git a/src/SPC/command/BuildCliCommand.php b/src/SPC/command/BuildCliCommand.php index cee98b73..d991719f 100644 --- a/src/SPC/command/BuildCliCommand.php +++ b/src/SPC/command/BuildCliCommand.php @@ -108,9 +108,6 @@ class BuildCliCommand extends BuildCommand $include_suggest_ext = $this->getOption('with-suggested-exts'); $include_suggest_lib = $this->getOption('with-suggested-libs'); [$extensions, $libraries, $not_included] = DependencyUtil::getExtsAndLibs($extensions, $libraries, $include_suggest_ext, $include_suggest_lib); - if (PHP_OS_FAMILY !== 'Linux' || !($rule & BUILD_TARGET_FPM)) { - $libraries = array_filter($libraries, fn ($lib) => !in_array($lib, ['attr', 'libacl'])); - } $display_libs = array_filter($libraries, fn ($lib) => in_array(Config::getLib($lib, 'type', 'lib'), ['lib', 'package'])); // print info