media-libs/freeimage: Fix building against libjpeg-9
authorJames Le Cuirot <chewi@gentoo.org>
Sun, 14 Apr 2019 16:24:41 +0000 (17:24 +0100)
committerJames Le Cuirot <chewi@gentoo.org>
Sun, 14 Apr 2019 16:25:29 +0000 (17:25 +0100)
Upstream only applied half of the earlier patch.

Closes: https://bugs.gentoo.org/683320
Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
media-libs/freeimage/files/freeimage-3.18.0-libjpeg9.patch [new file with mode: 0644]
media-libs/freeimage/freeimage-3.18.0.ebuild

diff --git a/media-libs/freeimage/files/freeimage-3.18.0-libjpeg9.patch b/media-libs/freeimage/files/freeimage-3.18.0-libjpeg9.patch
new file mode 100644 (file)
index 0000000..fe34422
--- /dev/null
@@ -0,0 +1,24 @@
+Bug: https://bugs.gentoo.org/647422\r
+Upstream Patch: https://sourceforge.net/p/freeimage/patches/130/\r
+\r
+diff -Naur a/Source/FreeImage.h b/Source/FreeImage.h\r
+--- a/Source/FreeImage.h       2018-03-24 23:24:11.066695395 -0400\r
++++ b/Source/FreeImage.h       2018-03-24 23:26:35.945391182 -0400\r
+@@ -117,12 +117,17 @@\r
+ #ifndef _WINDOWS_\r
+ #define _WINDOWS_\r
\r
++#if JPEG_LIB_VERSION < 90\r
++\r
+ #ifndef FALSE\r
+ #define FALSE 0\r
+ #endif\r
+ #ifndef TRUE\r
+ #define TRUE 1\r
+ #endif\r
++\r
++#endif\r
++\r
+ #ifndef NULL\r
+ #define NULL 0\r
+ #endif\r
index 35dd66ffd42fa023ea18c4f10ad10f6dc0746aa3..fa58c6fc2f7590d7019d6096ab66e83208fc35b1 100644 (file)
@@ -48,6 +48,7 @@ PATCHES=(
        "${FILESDIR}"/${PN}-3.18.0-rename-jpeg_read_icc_profile.patch
        "${FILESDIR}"/${PN}-3.18.0-disable-plugin-G3.patch
        "${FILESDIR}"/${PN}-3.18.0-raw.patch
+       "${FILESDIR}"/${PN}-3.18.0-libjpeg9.patch
 )
 
 src_prepare() {