mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 21:04:52 +08:00
let postgresql use -lc++ in bsd and macos
This commit is contained in:
parent
6b848da4dd
commit
ed8837fe9f
@ -4,6 +4,7 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace SPC\builder\unix\library;
|
namespace SPC\builder\unix\library;
|
||||||
|
|
||||||
|
use SPC\builder\linux\library\LinuxLibraryBase;
|
||||||
use SPC\builder\macos\library\MacOSLibraryBase;
|
use SPC\builder\macos\library\MacOSLibraryBase;
|
||||||
use SPC\exception\FileSystemException;
|
use SPC\exception\FileSystemException;
|
||||||
use SPC\exception\RuntimeException;
|
use SPC\exception\RuntimeException;
|
||||||
@ -46,7 +47,11 @@ trait postgresql
|
|||||||
$output = shell()->execWithResult("pkg-config --libs-only-l --static {$packages}");
|
$output = shell()->execWithResult("pkg-config --libs-only-l --static {$packages}");
|
||||||
if (!empty($output[1][0])) {
|
if (!empty($output[1][0])) {
|
||||||
$libs = $output[1][0];
|
$libs = $output[1][0];
|
||||||
$envs .= " LIBS=\"{$libs} -lstdc++\" ";
|
$libcpp = '';
|
||||||
|
if ($this->builder->getLib('icu')) {
|
||||||
|
$libcpp = $this instanceof LinuxLibraryBase ? ' -lstdc++' : ' -lc++';
|
||||||
|
}
|
||||||
|
$envs .= " LIBS=\"{$libs}{$libcpp}\" ";
|
||||||
}
|
}
|
||||||
|
|
||||||
FileSystem::resetDir($this->source_dir . '/build');
|
FileSystem::resetDir($this->source_dir . '/build');
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user