mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-17 20:34:51 +08:00
fix order of imagick libs
This commit is contained in:
parent
0007043f4a
commit
6dfd35348f
@ -122,8 +122,8 @@
|
||||
"source": "imagemagick",
|
||||
"static-libs-unix": [
|
||||
"libMagick++-7.Q16HDRI.a",
|
||||
"libMagickCore-7.Q16HDRI.a",
|
||||
"libMagickWand-7.Q16HDRI.a"
|
||||
"libMagickWand-7.Q16HDRI.a",
|
||||
"libMagickCore-7.Q16HDRI.a"
|
||||
],
|
||||
"lib-depends": [
|
||||
"zlib",
|
||||
|
||||
@ -10,12 +10,11 @@ use SPC\util\CustomExt;
|
||||
#[CustomExt('imagick')]
|
||||
class imagick extends Extension
|
||||
{
|
||||
public function patchBeforeBuildconf(): bool
|
||||
public function patchBeforeMake(): bool
|
||||
{
|
||||
// imagick may call omp_pause_all which requires -lgomp
|
||||
$extra_libs = $this->builder->getOption('extra-libs', '');
|
||||
$libf = BUILD_LIB_PATH;
|
||||
$extra_libs .= " {$libf}/libMagick++-7.Q16HDRI.a {$libf}/libMagickWand-7.Q16HDRI.a {$libf}/libMagickCore-7.Q16HDRI.a -lgomp ";
|
||||
$extra_libs .= ' -lgomp ';
|
||||
$this->builder->setOption('extra-libs', $extra_libs);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -4,6 +4,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace SPC\builder\unix\library;
|
||||
|
||||
use SPC\builder\linux\library\LinuxLibraryBase;
|
||||
use SPC\exception\FileSystemException;
|
||||
use SPC\exception\RuntimeException;
|
||||
use SPC\store\FileSystem;
|
||||
@ -30,7 +31,7 @@ trait imagemagick
|
||||
];
|
||||
foreach ($optional_libs as $lib => $option) {
|
||||
$extra .= $this->builder->getLib($lib) ? "--with-{$option} " : "--without-{$option} ";
|
||||
if ($this->builder->getLib($lib)) {
|
||||
if ($this->builder->getLib($lib) instanceof LinuxLibraryBase) {
|
||||
$required_libs .= ' ' . $this->builder->getLib($lib)->getStaticLibFiles();
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user