diff options
author | Zach Callear | 2020-03-27 09:39:51 -0600 |
---|---|---|
committer | Zach Callear | 2020-03-27 09:42:42 -0600 |
commit | f44054eecb9267f3e28acbc8a8e7f3a7f43a49e1 (patch) | |
tree | 285f80c675fb241ecda1eefd265b0c936fe94add /PKGBUILD | |
parent | 3406051df7d9224c2314d4fbfe02d993b8920228 (diff) | |
download | aur-f44054eecb9267f3e28acbc8a8e7f3a7f43a49e1.tar.gz |
Fix libmagick6 usage, remove apache2 fopenmp fix
Adjust the patching for using libmagick6, which imgmin requires, to get
its compilation details directly from pkg-config rather than ImageMagick
7's MagickWand-config, as that script now hardcodes MagickWand-7.Q16HDRI
as the pkg-config package name.
Additionally, remove the apache2 module fix related to "-fopenmp", as it
seems to have been fixed upstream long ago (in commit d7969f32ee06).
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 20 |
1 files changed, 11 insertions, 9 deletions
@@ -4,12 +4,12 @@ _pkgname=imgmin pkgname=$_pkgname-git pkgver=1.1.r17.g3451031 -pkgrel=5 +pkgrel=6 pkgdesc="Automated lossy JPEG optimization" arch=('i686' 'x86_64' 'armv7h' 'armv6h') url="https://github.com/rflynn/imgmin" license=('MIT') -depends=('imagemagick' 'libmagick6') +depends=('libmagick6') makedepends=("git") provides=("$_pkgname") conflicts=("$_pkgname") @@ -24,13 +24,15 @@ pkgver() { prepare() { cd "$_pkgname" - # Use libmagick6 with MagickWand-config. - sed -i 's~\($(MAGICK_CONFIG\)~PKG_CONFIG_PATH=/usr/lib/imagemagick6/pkgconfig \1~g' src/Makefile.am src/apache2/Makefile.am - - #fix build issue with Apache module on some systems - sed -i 's/\(MAGICK_CONFIG.*\?xargs\)/\1|sed "s\/-fopenmp\\s\/\/g"/' src/apache2/Makefile.am - - #temporarily fix https://github.com/rflynn/imgmin/issues/56 (Quality Worse than with ImageMagick convert) + # Use libmagick6 instead of 7 by using pkg-config directly instead of MagickWand-config. + # + # Previously it was possible to use the MagickWand-config script from ImageMagick 7, but it + # now hardcodes MagickWand-7 in its pkg-config call. + sed -i 's~AC_CHECK_PROGS(MAGICK_CONFIG.*~AC_CHECK_PROG(MAGICK_CONFIG, MagickWand-config, PKG_CONFIG_PATH=/usr/lib/imagemagick6/pkgconfig pkg-config MagickWand)~g' configure.ac + sed -i 's~ --cppflags~ --cflags~g' src/Makefile.am src/apache2/Makefile.am + sed -i 's~ --ldflags~ --libs~g' src/Makefile.am src/apache2/Makefile.am + + # Temporarily fix https://github.com/rflynn/imgmin/issues/56 (Chroma Downsampling Lowers Visual Quality). sed -i 's~ (void) MagickSetImageProperty(mw, "jpeg:sampling-factor", "2x2");~//\0~' src/imgmin.c autoreconf -fi |