mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-07 16:55:38 +08:00
add (lib)attr and libacl as optional libraries
when libacl is built and --enable-fpm is used, also enable --with-fpm-acl
This commit is contained in:
@@ -174,7 +174,7 @@ class LinuxBuilder extends UnixBuilderBase
|
||||
->exec(
|
||||
getenv('SPC_CMD_PREFIX_PHP_CONFIGURE') . ' ' .
|
||||
($enable_cli ? '--enable-cli ' : '--disable-cli ') .
|
||||
($enable_fpm ? '--enable-fpm ' : '--disable-fpm ') .
|
||||
($enable_fpm ? '--enable-fpm ' . ($this->getLib('libacl') !== null ? '--with-fpm-acl ' : '') : '--disable-fpm ') .
|
||||
($enable_embed ? "--enable-embed={$embed_type} " : '--disable-embed ') .
|
||||
($enable_micro ? '--enable-micro=all-static ' : '--disable-micro ') .
|
||||
$config_file_path .
|
||||
@@ -287,7 +287,14 @@ class LinuxBuilder extends UnixBuilderBase
|
||||
*/
|
||||
protected function buildFpm(): void
|
||||
{
|
||||
$vars = SystemUtil::makeEnvVarString($this->getMakeExtraVars());
|
||||
$vars = $this->getMakeExtraVars();
|
||||
if ($this->getLib('libacl') !== null) {
|
||||
$ldflags_program = $vars['EXTRA_LDFLAGS_PROGRAM'] ?? '';
|
||||
if (!str_contains($ldflags_program, '-L' . BUILD_LIB_PATH)) {
|
||||
$vars['EXTRA_LDFLAGS_PROGRAM'] = trim('-L' . BUILD_LIB_PATH . ' ' . $ldflags_program);
|
||||
}
|
||||
}
|
||||
$vars = $this->getEnvString($vars);
|
||||
shell()->cd(SOURCE_PATH . '/php-src')
|
||||
->exec('sed -i "s|//lib|/lib|g" Makefile')
|
||||
->exec("\$SPC_CMD_PREFIX_PHP_MAKE {$vars} fpm");
|
||||
|
||||
12
src/SPC/builder/linux/library/attr.php
Normal file
12
src/SPC/builder/linux/library/attr.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace SPC\builder\linux\library;
|
||||
|
||||
class attr extends LinuxLibraryBase
|
||||
{
|
||||
use \SPC\builder\unix\library\attr;
|
||||
|
||||
public const NAME = 'attr';
|
||||
}
|
||||
12
src/SPC/builder/linux/library/libacl.php
Normal file
12
src/SPC/builder/linux/library/libacl.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace SPC\builder\linux\library;
|
||||
|
||||
class libacl extends LinuxLibraryBase
|
||||
{
|
||||
use \SPC\builder\unix\library\libacl;
|
||||
|
||||
public const NAME = 'libacl';
|
||||
}
|
||||
Reference in New Issue
Block a user