mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-07 08:45:40 +08:00
[mixed] refactor with putenv, fix imagemagick and c++ build
This commit is contained in:
@@ -5,6 +5,7 @@ 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;
|
||||
@@ -17,7 +18,8 @@ trait imagemagick
|
||||
*/
|
||||
protected function build(): void
|
||||
{
|
||||
$extra = '--without-jxl --without-x --disable-openmp ';
|
||||
// TODO: imagemagick build with bzip2 failed with bugs, we need to fix it in the future
|
||||
$extra = '--without-jxl --without-x --disable-openmp --without-bzlib ';
|
||||
$required_libs = '';
|
||||
$optional_libs = [
|
||||
'libzip' => 'zip',
|
||||
@@ -26,6 +28,7 @@ trait imagemagick
|
||||
'libwebp' => 'webp',
|
||||
'libxml2' => 'xml',
|
||||
'zlib' => 'zlib',
|
||||
'xz' => 'lzma',
|
||||
'zstd' => 'zstd',
|
||||
'freetype' => 'freetype',
|
||||
];
|
||||
@@ -38,8 +41,7 @@ trait imagemagick
|
||||
|
||||
shell()->cd($this->source_dir)
|
||||
->exec(
|
||||
"{$this->builder->configure_env} " .
|
||||
'LDFLAGS="-static" ' .
|
||||
($this->builder instanceof LinuxBuilder ? ('LDFLAGS="-static -L' . BUILD_LIB_PATH . '" ') : '') .
|
||||
"LIBS='{$required_libs}' " .
|
||||
'./configure ' .
|
||||
'--enable-static --disable-shared ' .
|
||||
|
||||
Reference in New Issue
Block a user