append ld_library_path for musl toolchain

This commit is contained in:
henderkes 2025-11-19 11:59:09 +01:00
parent 376b8e7569
commit 6861e9c2c7

View File

@ -16,16 +16,25 @@ trait krb5
$libs = array_map(fn ($x) => $x->getName(), $this->getDependencies(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));
UnixAutoconfExecutor::create($this)
$make = UnixAutoconfExecutor::create($this)
->appendEnv([
'CFLAGS' => '-fcommon',
'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('libedit', '--with-libedit', '--without-libedit')
->configure(
'--disable-nls',
'--disable-rpath',
'--disable-silent-rules',
'--without-system-verto',
)
->make();
$this->patchPkgconfPrefix([