add required libs to krb5

This commit is contained in:
Marc Henderkes 2025-11-18 17:22:27 +01:00
parent ecea6c12cd
commit 1fed8f2802
2 changed files with 7 additions and 0 deletions

View File

@ -722,6 +722,7 @@
"type": "filelist",
"url": "https://ftp.gnu.org/gnu/libunistring/",
"regex": "/href=\"(?<file>libunistring-(?<version>[^\"]+)\\.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"

View File

@ -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')