mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-07 08:45:40 +08:00
fix imagemagick and postgresql builds with different libs
This commit is contained in:
@@ -12,11 +12,10 @@ class imagick extends Extension
|
||||
{
|
||||
public function patchBeforeBuildconf(): bool
|
||||
{
|
||||
// linux need to link library manually, we add it to extra-libs
|
||||
// imagick may call omp_pause_all which requires -lgomp
|
||||
$extra_libs = $this->builder->getOption('extra-libs', '');
|
||||
if (!str_contains($extra_libs, 'libMagickCore')) {
|
||||
$extra_libs .= ' /usr/lib/libMagick++-7.Q16HDRI.a /usr/lib/libMagickCore-7.Q16HDRI.a /usr/lib/libMagickWand-7.Q16HDRI.a';
|
||||
}
|
||||
$libf = BUILD_LIB_PATH;
|
||||
$extra_libs .= " {$libf}/libMagick++-7.Q16HDRI.a {$libf}/libMagickWand-7.Q16HDRI.a {$libf}/libMagickCore-7.Q16HDRI.a -lgomp ";
|
||||
$this->builder->setOption('extra-libs', $extra_libs);
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user