From 8a70da6291fb9c87e3f394f38a730c8effe18523 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Mon, 23 Oct 2023 00:41:43 +0800 Subject: [PATCH] change instanceof check --- src/SPC/builder/unix/library/imagemagick.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SPC/builder/unix/library/imagemagick.php b/src/SPC/builder/unix/library/imagemagick.php index 40a46992..bd4d0424 100644 --- a/src/SPC/builder/unix/library/imagemagick.php +++ b/src/SPC/builder/unix/library/imagemagick.php @@ -5,7 +5,6 @@ declare(strict_types=1); namespace SPC\builder\unix\library; use SPC\builder\linux\library\LinuxLibraryBase; -use SPC\builder\linux\LinuxBuilder; use SPC\exception\FileSystemException; use SPC\exception\RuntimeException; use SPC\store\FileSystem; @@ -39,9 +38,10 @@ trait imagemagick } } + $ldflags = $this instanceof LinuxLibraryBase ? ('LDFLAGS="-static" ') : ''; shell()->cd($this->source_dir) ->exec( - ($this->builder instanceof LinuxBuilder ? ('LDFLAGS="-static -L' . BUILD_LIB_PATH . '" ') : '') . + $ldflags . "LIBS='{$required_libs}' " . './configure ' . '--enable-static --disable-shared ' .