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