summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorZach Callear2020-03-27 09:39:51 -0600
committerZach Callear2020-03-27 09:42:42 -0600
commitf44054eecb9267f3e28acbc8a8e7f3a7f43a49e1 (patch)
tree285f80c675fb241ecda1eefd265b0c936fe94add
parent3406051df7d9224c2314d4fbfe02d993b8920228 (diff)
downloadaur-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).
-rw-r--r--.SRCINFO5
-rw-r--r--PKGBUILD20
2 files changed, 12 insertions, 13 deletions
diff --git a/.SRCINFO b/.SRCINFO
index e48730d8da4c..625e461a882a 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,7 @@
-# Generated by mksrcinfo v8
-# Mon Dec 18 23:56:23 UTC 2017
pkgbase = imgmin-git
pkgdesc = Automated lossy JPEG optimization
pkgver = 1.1.r17.g3451031
- pkgrel = 5
+ pkgrel = 6
url = https://github.com/rflynn/imgmin
arch = i686
arch = x86_64
@@ -11,7 +9,6 @@ pkgbase = imgmin-git
arch = armv6h
license = MIT
makedepends = git
- depends = imagemagick
depends = libmagick6
provides = imgmin
conflicts = imgmin
diff --git a/PKGBUILD b/PKGBUILD
index df2ce52e3d35..192844b45c39 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -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