Skip to content

Commit 6861e9c

Browse files
committed
append ld_library_path for musl toolchain
1 parent 376b8e7 commit 6861e9c

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/SPC/builder/unix/library/krb5.php

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,25 @@ protected function build(): void
1616
$libs = array_map(fn ($x) => $x->getName(), $this->getDependencies(true));
1717
$spc = new SPCConfigUtil($this->builder, ['no_php' => true, 'libs_only_deps' => true]);
1818
$config = $spc->config(libraries: $libs, include_suggest_lib: $this->builder->getOption('with-suggested-libs', false));
19-
UnixAutoconfExecutor::create($this)
19+
$make = UnixAutoconfExecutor::create($this)
2020
->appendEnv([
2121
'CFLAGS' => '-fcommon',
2222
'LIBS' => $config['libs'],
23-
])
23+
]);
24+
if (getenv('SPC_LD_LIBRARY_PATH') && getenv('SPC_LIBRARY_PATH')) {
25+
$make->appendEnv([
26+
'LD_LIBRARY_PATH' => getenv('SPC_LD_LIBRARY_PATH'),
27+
'LIBRARY_PATH' => getenv('SPC_LIBRARY_PATH'),
28+
]);
29+
}
30+
$make
2431
->optionalLib('ldap', '--with-ldap', '--without-ldap')
2532
->optionalLib('libedit', '--with-libedit', '--without-libedit')
2633
->configure(
2734
'--disable-nls',
2835
'--disable-rpath',
36+
'--disable-silent-rules',
37+
'--without-system-verto',
2938
)
3039
->make();
3140
$this->patchPkgconfPrefix([

0 commit comments

Comments
 (0)