diff --git a/config/source.json b/config/source.json index b300e284..d4793c35 100644 --- a/config/source.json +++ b/config/source.json @@ -722,6 +722,7 @@ "type": "filelist", "url": "https://ftp.gnu.org/gnu/libunistring/", "regex": "/href=\"(?libunistring-(?[^\"]+)\\.tar\\.gz)\"/", + "provide-pre-built": true, "license": { "type": "file", "path": "COPYING.LIB" @@ -740,6 +741,7 @@ "type": "git", "url": "https://github.com/static-php/libuuid.git", "rev": "master", + "provide-pre-built": true, "license": { "type": "file", "path": "COPYING" diff --git a/src/SPC/builder/unix/library/krb5.php b/src/SPC/builder/unix/library/krb5.php index 97c3d233..03c071f5 100644 --- a/src/SPC/builder/unix/library/krb5.php +++ b/src/SPC/builder/unix/library/krb5.php @@ -5,6 +5,7 @@ declare(strict_types=1); namespace SPC\builder\unix\library; use SPC\util\executor\UnixAutoconfExecutor; +use SPC\util\SPCConfigUtil; trait krb5 { @@ -12,8 +13,12 @@ trait krb5 { $this->source_dir .= '/src'; shell()->cd($this->source_dir)->exec('autoreconf -if'); + $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) ->appendEnv([ + 'LIBS' => $config['libs'], 'LDFLAGS' => '-Wl,--allow-multiple-definition', ]) ->optionalLib('ldap', '--with-ldap', '--without-ldap')