Add bzip2 support for imagick

This commit is contained in:
crazywhalecc 2025-03-30 14:02:44 +08:00
parent 936413a6d9
commit 6ea1d06460
No known key found for this signature in database
GPG Key ID: 1F4BDD59391F2680
2 changed files with 4 additions and 3 deletions

View File

@ -210,12 +210,12 @@
"libwebp",
"freetype",
"libtiff",
"libheif"
"libheif",
"bzip2"
],
"lib-suggests": [
"zstd",
"xz",
"bzip2",
"libzip",
"libxml2"
]

View File

@ -19,7 +19,7 @@ trait imagemagick
protected function build(): void
{
// 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 ';
$extra = '--without-jxl --without-x --disable-openmp ';
$required_libs = '';
$optional_libs = [
'libzip' => 'zip',
@ -31,6 +31,7 @@ trait imagemagick
'xz' => 'lzma',
'zstd' => 'zstd',
'freetype' => 'freetype',
'bzip2' => 'bzlib',
];
foreach ($optional_libs as $lib => $option) {
$extra .= $this->builder->getLib($lib) ? "--with-{$option} " : "--without-{$option} ";