Skip to content

Commit 1fed8f2

Browse files
committed
add required libs to krb5
1 parent ecea6c1 commit 1fed8f2

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

config/source.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -722,6 +722,7 @@
722722
"type": "filelist",
723723
"url": "https://ftp.gnu.org/gnu/libunistring/",
724724
"regex": "/href=\"(?<file>libunistring-(?<version>[^\"]+)\\.tar\\.gz)\"/",
725+
"provide-pre-built": true,
725726
"license": {
726727
"type": "file",
727728
"path": "COPYING.LIB"
@@ -740,6 +741,7 @@
740741
"type": "git",
741742
"url": "https://github.com/static-php/libuuid.git",
742743
"rev": "master",
744+
"provide-pre-built": true,
743745
"license": {
744746
"type": "file",
745747
"path": "COPYING"

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,20 @@
55
namespace SPC\builder\unix\library;
66

77
use SPC\util\executor\UnixAutoconfExecutor;
8+
use SPC\util\SPCConfigUtil;
89

910
trait krb5
1011
{
1112
protected function build(): void
1213
{
1314
$this->source_dir .= '/src';
1415
shell()->cd($this->source_dir)->exec('autoreconf -if');
16+
$libs = array_map(fn ($x) => $x->getName(), $this->getDependencies(true));
17+
$spc = new SPCConfigUtil($this->builder, ['no_php' => true, 'libs_only_deps' => true]);
18+
$config = $spc->config(libraries: $libs, include_suggest_lib: $this->builder->getOption('with-suggested-libs', false));
1519
UnixAutoconfExecutor::create($this)
1620
->appendEnv([
21+
'LIBS' => $config['libs'],
1722
'LDFLAGS' => '-Wl,--allow-multiple-definition',
1823
])
1924
->optionalLib('ldap', '--with-ldap', '--without-ldap')

0 commit comments

Comments
 (0)