mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-17 20:34:51 +08:00
check for libacl in fewer places
This commit is contained in:
parent
76ac57edf4
commit
5caf5b7694
@ -11,6 +11,11 @@
|
||||
"lib-depends": [
|
||||
"lib-base",
|
||||
"micro"
|
||||
],
|
||||
"lib-depends-linux": [
|
||||
"lib-base",
|
||||
"libacl",
|
||||
"micro"
|
||||
]
|
||||
},
|
||||
"micro": {
|
||||
|
||||
@ -5,7 +5,6 @@ declare(strict_types=1);
|
||||
namespace SPC\command;
|
||||
|
||||
use SPC\builder\BuilderProvider;
|
||||
use SPC\builder\linux\LinuxBuilder;
|
||||
use SPC\exception\ExceptionHandler;
|
||||
use SPC\exception\WrongUsageException;
|
||||
use SPC\store\Config;
|
||||
@ -109,8 +108,8 @@ 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 ($builder instanceof LinuxBuilder && !in_array('libacl', $libraries) && ($rule & BUILD_TARGET_FPM)) {
|
||||
array_unshift($libraries, 'attr', 'libacl');
|
||||
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']));
|
||||
|
||||
|
||||
@ -81,9 +81,6 @@ class DownloadCommand extends BaseCommand
|
||||
$final_sources = array_merge($final_sources, array_diff($sources, $final_sources));
|
||||
}
|
||||
if (!empty($final_sources)) {
|
||||
if (PHP_OS_FAMILY === 'Linux') {
|
||||
array_unshift($final_sources, 'attr', 'libacl');
|
||||
}
|
||||
$input->setArgument('sources', implode(',', $final_sources));
|
||||
}
|
||||
parent::initialize($input, $output);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user