diff --git a/ext-support.md b/ext-support.md index 9e375968..aa04efc0 100644 --- a/ext-support.md +++ b/ext-support.md @@ -27,7 +27,7 @@ | gettext | | | | | gmp | yes | yes | | | iconv | yes | yes | | -| imagick | | yes | | +| imagick | yes | yes | | | inotify | yes | yes | | | mbstring | yes | yes | | | mbregex | yes | yes | | diff --git a/src/SPC/builder/linux/library/imagemagick.php b/src/SPC/builder/linux/library/imagemagick.php new file mode 100644 index 00000000..6006a222 --- /dev/null +++ b/src/SPC/builder/linux/library/imagemagick.php @@ -0,0 +1,15 @@ +builder->getLib('libjpeg') ? '--with-jpeg ' : ''; - // png support - $extra .= $this->builder->getLib('libpng') ? '--with-png ' : ''; - // webp support - $extra .= $this->builder->getLib('libwebp') ? '--with-webp ' : ''; - // zstd support - // $extra .= $this->builder->getLib('zstd') ? '--with-zstd ' : '--without-zstd '; - // freetype support - $extra .= $this->builder->getLib('freetype') ? '--with-freetype ' : '--without-freetype '; - - shell()->cd($this->source_dir) - ->exec( - "{$this->builder->configure_env} ./configure " . - '--enable-static --disable-shared ' . - $extra . - '--prefix=' - ) - ->exec('make clean') - ->exec("make -j{$this->builder->concurrency}") - ->exec('make install DESTDIR=' . BUILD_ROOT_PATH); - $filelist = [ - 'ImageMagick.pc', - 'ImageMagick-7.Q16HDRI.pc', - 'Magick++.pc', - 'Magick++-7.Q16HDRI.pc', - 'MagickCore.pc', - 'MagickCore-7.Q16HDRI.pc', - 'MagickWand.pc', - 'MagickWand-7.Q16HDRI.pc', - ]; - $this->patchPkgconfPrefix($filelist); - foreach ($filelist as $file) { - FileSystem::replaceFile( - BUILD_LIB_PATH . '/pkgconfig/' . $file, - REPLACE_FILE_PREG, - '#includearchdir=/include/ImageMagick-7#m', - 'includearchdir=${prefix}/include/ImageMagick-7' - ); - } - } } diff --git a/src/SPC/builder/unix/library/imagemagick.php b/src/SPC/builder/unix/library/imagemagick.php new file mode 100644 index 00000000..6f1fd461 --- /dev/null +++ b/src/SPC/builder/unix/library/imagemagick.php @@ -0,0 +1,57 @@ +builder->getLib('libzip') ? '--with-zip ' : '--without-zip '; + // jpeg support + $extra .= $this->builder->getLib('libjpeg') ? '--with-jpeg ' : ''; + // png support + $extra .= $this->builder->getLib('libpng') ? '--with-png ' : ''; + // webp support + $extra .= $this->builder->getLib('libwebp') ? '--with-webp ' : ''; + // zstd support + // $extra .= $this->builder->getLib('zstd') ? '--with-zstd ' : '--without-zstd '; + // freetype support + $extra .= $this->builder->getLib('freetype') ? '--with-freetype ' : '--without-freetype '; + + shell()->cd($this->source_dir) + ->exec( + "{$this->builder->configure_env} ./configure " . + '--enable-static --disable-shared ' . + $extra . + '--prefix=' + ) + ->exec('make clean') + ->exec("make -j{$this->builder->concurrency}") + ->exec('make install DESTDIR=' . BUILD_ROOT_PATH); + $filelist = [ + 'ImageMagick.pc', + 'ImageMagick-7.Q16HDRI.pc', + 'Magick++.pc', + 'Magick++-7.Q16HDRI.pc', + 'MagickCore.pc', + 'MagickCore-7.Q16HDRI.pc', + 'MagickWand.pc', + 'MagickWand-7.Q16HDRI.pc', + ]; + $this->patchPkgconfPrefix($filelist); + foreach ($filelist as $file) { + FileSystem::replaceFile( + BUILD_LIB_PATH . '/pkgconfig/' . $file, + REPLACE_FILE_PREG, + '#includearchdir=/include/ImageMagick-7#m', + 'includearchdir=${prefix}/include/ImageMagick-7' + ); + } + } +}