mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-19 05:14:52 +08:00
fix pgsql shared build
This commit is contained in:
parent
53385d5e2b
commit
fa670cce4a
@ -12,6 +12,9 @@ trait postgresql
|
|||||||
{
|
{
|
||||||
public function patchBeforeBuild(): bool
|
public function patchBeforeBuild(): bool
|
||||||
{
|
{
|
||||||
|
if (!getenv('SPC_LINK_STATIC')) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
// skip the test on platforms where libpq infrastructure may be provided by statically-linked libraries
|
// skip the test on platforms where libpq infrastructure may be provided by statically-linked libraries
|
||||||
FileSystem::replaceFileStr("{$this->source_dir}/src/interfaces/libpq/Makefile", 'invokes exit\'; exit 1;', 'invokes exit\';');
|
FileSystem::replaceFileStr("{$this->source_dir}/src/interfaces/libpq/Makefile", 'invokes exit\'; exit 1;', 'invokes exit\';');
|
||||||
// disable shared libs build
|
// disable shared libs build
|
||||||
@ -92,9 +95,11 @@ trait postgresql
|
|||||||
->exec('make -C src/interfaces/libpq install');
|
->exec('make -C src/interfaces/libpq install');
|
||||||
|
|
||||||
// remove dynamic libs
|
// remove dynamic libs
|
||||||
shell()->cd($this->source_dir . '/build')
|
if (getenv('SPC_LINK_STATIC')) {
|
||||||
->exec("rm -rf {$this->getBuildRootPath()}/lib/*.dylib");
|
shell()->cd($this->source_dir . '/build')
|
||||||
|
->exec("rm -rf {$this->getBuildRootPath()}/lib/*.so*")
|
||||||
|
->exec("rm -rf {$this->getBuildRootPath()}/lib/*.dylib");
|
||||||
|
}
|
||||||
FileSystem::replaceFileStr("{$this->getLibDir()}/pkgconfig/libpq.pc", '-lldap', '-lldap -llber');
|
FileSystem::replaceFileStr("{$this->getLibDir()}/pkgconfig/libpq.pc", '-lldap', '-lldap -llber');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user