mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 04:44:53 +08:00
add macOS support for pgsql
This commit is contained in:
parent
085437e925
commit
bc978ecbde
@ -4,6 +4,8 @@ declare(strict_types=1);
|
||||
|
||||
namespace SPC\builder\unix\library;
|
||||
|
||||
use SPC\builder\linux\library\LinuxLibraryBase;
|
||||
use SPC\builder\macos\library\MacOSLibraryBase;
|
||||
use SPC\exception\FileSystemException;
|
||||
use SPC\exception\RuntimeException;
|
||||
use SPC\store\FileSystem;
|
||||
@ -30,7 +32,7 @@ trait postgresql
|
||||
$output = shell()->execWithResult($env . ' pkg-config --libs-only-L --static ' . $packages);
|
||||
if (!empty($output[1][0])) {
|
||||
$ldflags = $output[1][0];
|
||||
$envs .= " LDFLAGS=\"{$ldflags} -static\" ";
|
||||
$envs .= $this instanceof MacOSLibraryBase ? " LDFLAGS=\"{$ldflags}\" " : " LDFLAGS=\"{$ldflags} -static\" ";
|
||||
}
|
||||
$output = shell()->execWithResult($env . ' pkg-config --libs-only-l --static ' . $packages);
|
||||
if (!empty($output[1][0])) {
|
||||
|
||||
@ -88,6 +88,9 @@ class SourcePatcher
|
||||
if ($ssh2 = $builder->getExt('ssh2')) {
|
||||
$patch[] = ['ssh2 patch', '/-lssh2/', $ssh2->getLibFilesString()];
|
||||
}
|
||||
if ($pgsql = $builder->getExt('pgsql')) {
|
||||
$patch[] = ['pgsql patch', '/-lpq/', $pgsql->getLibFilesString()];
|
||||
}
|
||||
$patch[] = ['disable capstone', '/have_capstone="yes"/', 'have_capstone="no"'];
|
||||
foreach ($patch as $item) {
|
||||
logger()->info('Patching configure: ' . $item[0]);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user