From 8a1689b79d4eded2e6b0c30f7ef1aa07a966ecf7 Mon Sep 17 00:00:00 2001 From: henderkes Date: Sat, 11 Oct 2025 13:20:08 +0200 Subject: [PATCH] don't fail build without ldap --- src/SPC/builder/unix/library/postgresql.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/SPC/builder/unix/library/postgresql.php b/src/SPC/builder/unix/library/postgresql.php index 3b775466..54396300 100644 --- a/src/SPC/builder/unix/library/postgresql.php +++ b/src/SPC/builder/unix/library/postgresql.php @@ -44,7 +44,7 @@ trait postgresql $error_exec_cnt = 0; foreach ($optional_packages as $lib => $pkg) { - if ($this->getBuilder()->getLib($lib)) { + if ($this->builder->getLib($lib)) { $packages .= ' ' . $pkg; $output = shell()->execWithResult("pkg-config --static {$pkg}"); $error_exec_cnt += $output[0] === 0 ? 0 : 1; @@ -125,10 +125,12 @@ trait postgresql '--without-tcl ' ); - $libs = PkgConfigUtil::getLibsArray('ldap'); - $libs = clean_spaces(implode(' ', $libs)); - FileSystem::replaceFileStr($this->source_dir . '/build/config.status', '-lldap', $libs); - FileSystem::replaceFileStr($this->source_dir . '/build/src/Makefile.global', '-lldap', $libs); + if ($this->builder->getLib('ldap')) { + $libs = PkgConfigUtil::getLibsArray('ldap'); + $libs = clean_spaces(implode(' ', $libs)); + FileSystem::replaceFileStr($this->source_dir . '/build/config.status', '-lldap', $libs); + FileSystem::replaceFileStr($this->source_dir . '/build/src/Makefile.global', '-lldap', $libs); + } $shell ->exec($envs . ' make -C src/bin/pg_config install')