mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 04:44:53 +08:00
append ld_library_path for musl toolchain
This commit is contained in:
parent
376b8e7569
commit
6861e9c2c7
@ -16,16 +16,25 @@ trait krb5
|
|||||||
$libs = array_map(fn ($x) => $x->getName(), $this->getDependencies(true));
|
$libs = array_map(fn ($x) => $x->getName(), $this->getDependencies(true));
|
||||||
$spc = new SPCConfigUtil($this->builder, ['no_php' => true, 'libs_only_deps' => true]);
|
$spc = new SPCConfigUtil($this->builder, ['no_php' => true, 'libs_only_deps' => true]);
|
||||||
$config = $spc->config(libraries: $libs, include_suggest_lib: $this->builder->getOption('with-suggested-libs', false));
|
$config = $spc->config(libraries: $libs, include_suggest_lib: $this->builder->getOption('with-suggested-libs', false));
|
||||||
UnixAutoconfExecutor::create($this)
|
$make = UnixAutoconfExecutor::create($this)
|
||||||
->appendEnv([
|
->appendEnv([
|
||||||
'CFLAGS' => '-fcommon',
|
'CFLAGS' => '-fcommon',
|
||||||
'LIBS' => $config['libs'],
|
'LIBS' => $config['libs'],
|
||||||
])
|
]);
|
||||||
|
if (getenv('SPC_LD_LIBRARY_PATH') && getenv('SPC_LIBRARY_PATH')) {
|
||||||
|
$make->appendEnv([
|
||||||
|
'LD_LIBRARY_PATH' => getenv('SPC_LD_LIBRARY_PATH'),
|
||||||
|
'LIBRARY_PATH' => getenv('SPC_LIBRARY_PATH'),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
$make
|
||||||
->optionalLib('ldap', '--with-ldap', '--without-ldap')
|
->optionalLib('ldap', '--with-ldap', '--without-ldap')
|
||||||
->optionalLib('libedit', '--with-libedit', '--without-libedit')
|
->optionalLib('libedit', '--with-libedit', '--without-libedit')
|
||||||
->configure(
|
->configure(
|
||||||
'--disable-nls',
|
'--disable-nls',
|
||||||
'--disable-rpath',
|
'--disable-rpath',
|
||||||
|
'--disable-silent-rules',
|
||||||
|
'--without-system-verto',
|
||||||
)
|
)
|
||||||
->make();
|
->make();
|
||||||
$this->patchPkgconfPrefix([
|
$this->patchPkgconfPrefix([
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user