diff --git a/src/SPC/builder/linux/library/libxml2.php b/src/SPC/builder/linux/library/libxml2.php index 0c3b5437..4095ee56 100644 --- a/src/SPC/builder/linux/library/libxml2.php +++ b/src/SPC/builder/linux/library/libxml2.php @@ -40,5 +40,11 @@ class libxml2 extends LinuxLibraryBase ) ->exec("cmake --build . -j {$this->builder->concurrency}") ->exec('make install DESTDIR=' . BUILD_ROOT_PATH); + + FileSystem::replaceFileStr( + BUILD_LIB_PATH . '/pkgconfig/libxml-2.0.pc', + '-licudata -licui18n -licuuc', + '-licui18n -licuuc -licudata' + ); } } diff --git a/src/SPC/builder/unix/library/postgresql.php b/src/SPC/builder/unix/library/postgresql.php index b02f46a7..758e8a87 100644 --- a/src/SPC/builder/unix/library/postgresql.php +++ b/src/SPC/builder/unix/library/postgresql.php @@ -20,7 +20,12 @@ trait postgresql $builddir = BUILD_ROOT_PATH; $env = $this->builder->configure_env; $envs = $env; - $packages = 'openssl zlib readline libxml-2.0'; // icu-uc icu-io icu-i18n libzstd + $packages = 'openssl zlib readline libxml-2.0 zlib'; + foreach (['zstd', 'ldap', 'pam', 'libxslt'] as $lib) { + if ($this->getBuilder()->getLib($lib)) { + $packages .= ' ' . $lib; + } + } $pkgconfig_executable = $builddir . '/bin/pkg-config'; $output = shell()->execWithResult($env . " {$pkgconfig_executable} --cflags-only-I --static " . $packages); @@ -36,7 +41,7 @@ trait postgresql $output = shell()->execWithResult($env . " {$pkgconfig_executable} --libs-only-l --static " . $packages); if (!empty($output[1][0])) { $libs = $output[1][0]; - $envs .= " LIBS=\"{$libs}\" "; + $envs .= " LIBS=\"{$libs} -lstdc++\" "; } FileSystem::resetDir($this->source_dir . '/build'); @@ -44,7 +49,7 @@ trait postgresql # 有静态链接配置 参考文件: src/interfaces/libpq/Makefile shell()->cd($this->source_dir . '/build') ->exec('sed -i.backup "s/invokes exit\'; exit 1;/invokes exit\';/" ../src/interfaces/libpq/Makefile') - ->exec(' sed -i.backup "293 s/^/#$/" ../src/Makefile.shlib') + ->exec('sed -i.backup "293 s/^/#$/" ../src/Makefile.shlib') ->exec('sed -i.backup "441 s/^/#$/" ../src/Makefile.shlib'); // configure @@ -59,12 +64,12 @@ trait postgresql '--with-libxml ' . ($this->builder->getLib('ldap') ? '--with-ldap ' : '--without-ldap ') . ($this->builder->getLib('icu') ? '--with-icu ' : '--without-icu ') . - '--without-libxslt ' . + ($this->builder->getLib('pam') ? '--with-pam ' : '--without-pam ') . + ($this->builder->getLib('zstd') ? '--with-zstd ' : '--without-zstd ') . + ($this->builder->getLib('libxslt') ? '--with-libxslt ' : '--without-libxslt ') . '--without-lz4 ' . - '--without-zstd ' . '--without-perl ' . '--without-python ' . - '--without-pam ' . '--without-bonjour ' . '--without-tcl ' );