From 6b23c90bba480d8643f8a2a8bdb101be8bfd68af Mon Sep 17 00:00:00 2001 From: jingjingxyk Date: Wed, 29 Nov 2023 16:52:53 +0800 Subject: [PATCH] test build libpq --- 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 b1187a5b..580cbe4e 100644 --- a/src/SPC/builder/unix/library/postgresql.php +++ b/src/SPC/builder/unix/library/postgresql.php @@ -27,13 +27,13 @@ trait postgresql 'libxslt' => 'libxslt', 'icu' => 'icu-i18n', ]; - logger()->info(shell()->execWithResult("pkg-config --cflags-only-I --static {$packages}")[1][0]); + foreach ($optional_packages as $lib => $pkg) { if ($this->getBuilder()->getLib($lib)) { $packages .= ' ' . $pkg; - logger()->info(shell()->execWithResult("pkg-config --cflags-only-I --static {$pkg}")[1][0]); - logger()->info(shell()->execWithResult("pkg-config --libs-only-L --static {$pkg}")[1][0]); - logger()->info(shell()->execWithResult("pkg-config --libs-only-l --static {$pkg}")[1][0]); + logger()->debug(shell()->execWithResult("pkg-config --cflags-only-I --static {$pkg}")[1][0]); + logger()->debug(shell()->execWithResult("pkg-config --libs-only-L --static {$pkg}")[1][0]); + logger()->debug(shell()->execWithResult("pkg-config --libs-only-l --static {$pkg}")[1][0]); } } @@ -101,6 +101,8 @@ trait postgresql ->exec("rm -rf {$builddir}/lib/*.so") ->exec("rm -rf {$builddir}/lib/*.dylib"); - logger()->info(shell()->execWithResult('pkg-config --cflags-only-I --static libpq')[1][0]); + logger()->debug(shell()->execWithResult('pkg-config --cflags-only-I --static libpq')[1][0]); + logger()->debug(shell()->execWithResult('pkg-config --libs-only-L --static libpq')[1][0]); + logger()->debug(shell()->execWithResult('pkg-config --libs-only-l --static libpq')[1][0]); } }