From 23be5484e3a6263354ffff72d38371704028132a Mon Sep 17 00:00:00 2001 From: DubbleClick Date: Sat, 7 Jun 2025 21:16:15 +0700 Subject: [PATCH] thread safety for pgsql (in version 17, remove this entirely) --- config/source.json | 5 +++-- src/SPC/builder/unix/library/ldap.php | 2 ++ src/SPC/builder/unix/library/postgresql.php | 6 +++--- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/config/source.json b/config/source.json index 10fd7472..98d37eb4 100644 --- a/config/source.json +++ b/config/source.json @@ -822,8 +822,9 @@ } }, "postgresql": { - "type": "url", - "url": "https://ftp.postgresql.org/pub/source/v16.2/postgresql-16.2.tar.bz2", + "type": "ghtagtar", + "repo": "postgres/postgres", + "match": "REL_16_\\d+", "license": { "type": "file", "path": "COPYRIGHT" diff --git a/src/SPC/builder/unix/library/ldap.php b/src/SPC/builder/unix/library/ldap.php index 6f8790f1..3a05e3df 100644 --- a/src/SPC/builder/unix/library/ldap.php +++ b/src/SPC/builder/unix/library/ldap.php @@ -50,6 +50,8 @@ trait ldap ->exec('sed -i -e "s/SUBDIRS= include libraries clients servers tests doc/SUBDIRS= include libraries clients servers/g" Makefile') ->exec("make -j{$this->builder->concurrency}") ->exec('make install DESTDIR=' . BUILD_ROOT_PATH); + + FileSystem::replaceFileLineContainsString(BUILD_LIB_PATH . '/pkgconfig/ldap.pc', 'Libs: -L${libdir} -lldap', 'Libs: -L${libdir} -lldap -llber'); $this->patchPkgconfPrefix(['ldap.pc', 'lber.pc']); $this->patchLaDependencyPrefix(['libldap.la', 'liblber.la']); } diff --git a/src/SPC/builder/unix/library/postgresql.php b/src/SPC/builder/unix/library/postgresql.php index acddc14f..cdeb22fc 100644 --- a/src/SPC/builder/unix/library/postgresql.php +++ b/src/SPC/builder/unix/library/postgresql.php @@ -22,7 +22,7 @@ trait postgresql $packages = 'zlib openssl readline libxml-2.0'; $optional_packages = [ 'zstd' => 'libzstd', - // 'ldap' => 'ldap', + 'ldap' => 'ldap', 'libxslt' => 'libxslt', 'icu' => 'icu-i18n', ]; @@ -97,8 +97,8 @@ trait postgresql '--with-readline ' . '--with-libxml ' . ($this->builder->getLib('icu') ? '--with-icu ' : '--without-icu ') . - // ($this->builder->getLib('ldap') ? '--with-ldap ' : '--without-ldap ') . - '--without-ldap ' . + ($this->builder->getLib('ldap') ? '--with-ldap ' : '--without-ldap ') . + // '--without-ldap ' . ($this->builder->getLib('libxslt') ? '--with-libxslt ' : '--without-libxslt ') . ($this->builder->getLib('zstd') ? '--with-zstd ' : '--without-zstd ') . '--without-lz4 ' .