fix imagemagick and postgresql builds with different libs

This commit is contained in:
DubbleClick
2023-10-17 19:37:13 +02:00
parent da1cbeb79c
commit 0007043f4a
3 changed files with 37 additions and 23 deletions

View File

@@ -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;
}