media-gfx/digikam: Fix build with ImageMagick-7.0.8.60
authorAndreas Sturmlechner <asturm@gentoo.org>
Thu, 22 Aug 2019 12:46:04 +0000 (14:46 +0200)
committerAndreas Sturmlechner <asturm@gentoo.org>
Thu, 22 Aug 2019 14:15:37 +0000 (16:15 +0200)
Thanks-to: David Haller <gentoo@dhaller.de>
Closes: https://bugs.gentoo.org/692326
Package-Manager: Portage-2.3.72, Repoman-2.3.17
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
media-gfx/digikam/digikam-6.2.0.ebuild
media-gfx/digikam/files/digikam-6.2.0-imagemagick-7.0.8.60.patch [new file with mode: 0644]

index 4478b85ae2399f6f9930c3b7cfad665daa17c33b..d28773546dc81864024f6b3c8a14e8c36b15cb72 100644 (file)
@@ -109,6 +109,7 @@ RESTRICT+=" test"
 PATCHES=(
        "${FILESDIR}/${P}-googlephoto-upload.patch"
        "${FILESDIR}/${P}-cmake.patch"
+       "${FILESDIR}/${P}-imagemagick-7.0.8.60.patch"
 )
 
 pkg_pretend() {
diff --git a/media-gfx/digikam/files/digikam-6.2.0-imagemagick-7.0.8.60.patch b/media-gfx/digikam/files/digikam-6.2.0-imagemagick-7.0.8.60.patch
new file mode 100644 (file)
index 0000000..264da2c
--- /dev/null
@@ -0,0 +1,14 @@
+--- a/core/tests/dimg/magickloader.cpp 
++++ a/core/tests/dimg/magickloader.cpp 
+@@ -139,7 +139,11 @@ int main(int argc, char** argv)
+         if (inf->encoder) mode.append(QLatin1Char('W'));
+         else              mode.append(QLatin1Char('-'));
++#if( (MagickLibVersion >= 0x708) && defined(magick_module) ) /* defined since 7.0.8.60 */
++        QString module = QLatin1String(inf->magick_module);
++#else
+         QString module = QLatin1String(inf->module);
++#endif
+         QString mime   = QMimeDatabase().mimeTypeForFile(QFileInfo(QString::fromLatin1("foo.%1").arg(module))).name();
+         if (module != QLatin1String("DNG")  &&
\ No newline at end of file