summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2018-09-06 23:03:46 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2018-09-06 23:05:59 +0200
commita5109d66d2d08c47bbf301590e6587e3c5b1edd5 (patch)
tree43198c0fc71a5e2cd08989967c3247ea264f8cfc /media-libs
parentdev-python/aiohttp: add async_generator test dep (diff)
downloadgentoo-a5109d66d2d08c47bbf301590e6587e3c5b1edd5.tar.gz
gentoo-a5109d66d2d08c47bbf301590e6587e3c5b1edd5.tar.bz2
gentoo-a5109d66d2d08c47bbf301590e6587e3c5b1edd5.zip
media-libs/libmng: Adapt jpeg-9a.patch for 2.0.3
Bug: https://bugs.gentoo.org/578744 Package-Manager: Portage-2.3.49, Repoman-2.3.10
Diffstat (limited to 'media-libs')
-rw-r--r--media-libs/libmng/files/libmng-2.0.3-jpeg-9a.patch40
-rw-r--r--media-libs/libmng/libmng-2.0.3.ebuild2
2 files changed, 42 insertions, 0 deletions
diff --git a/media-libs/libmng/files/libmng-2.0.3-jpeg-9a.patch b/media-libs/libmng/files/libmng-2.0.3-jpeg-9a.patch
new file mode 100644
index 00000000000..9441f00137d
--- /dev/null
+++ b/media-libs/libmng/files/libmng-2.0.3-jpeg-9a.patch
@@ -0,0 +1,40 @@
+http://bugs.gentoo.org/520906
+
+This kludge is unnecessary with jpeg-9a and is in fact breaking the build...
+
+libmng_jpeg.c:108:10: error: 'FALSE' undeclared (first use in this function)
+libmng_jpeg.c:536:48: error: 'TRUE' undeclared (first use in this function)
+libmng_jpeg_c:890:49: error: 'TRUE' undeclared (first use in this function)
+
+...because jmorecfg.h of jpeg-9a has this:
+
+#ifndef HAVE_BOOLEAN
+#if defined FALSE || defined TRUE || defined QGLOBAL_H
+/* Qt3 defines FALSE and TRUE as "const" variables in qglobal.h */
+typedef int boolean;
+#ifndef FALSE /* in case these macros already exist */
+#define FALSE 0 /* values of boolean */
+#endif
+#ifndef TRUE
+#define TRUE 1
+#endif
+#else
+typedef enum { FALSE = 0, TRUE = 1 } boolean;
+#endif
+#endif
+
+2018-09-06: Adjusted for libmng-2.0.3
+https://bugs.gentoo.org/578744
+
+--- a/libmng_types.h 2015-04-20 21:17:32.000000000 +0200
++++ b/libmng_types.h 2018-09-06 22:56:57.153190623 +0200
+@@ -201,9 +201,6 @@
+ #endif
+ #define JPEG_INTERNAL_OPTIONS /* for RGB_PIXELSIZE */
+ /* There has been a change in jpeg-9 : */
+-#if !defined(HAVE_BOOLEAN) && !defined(_WIN32)
+-#define HAVE_BOOLEAN
+-#endif
+ #ifndef _WIN32
+ typedef int boolean;
+ #endif
diff --git a/media-libs/libmng/libmng-2.0.3.ebuild b/media-libs/libmng/libmng-2.0.3.ebuild
index 6e68deaa68d..02e62532f37 100644
--- a/media-libs/libmng/libmng-2.0.3.ebuild
+++ b/media-libs/libmng/libmng-2.0.3.ebuild
@@ -20,6 +20,8 @@ RDEPEND="
lcms? ( >=media-libs/lcms-2.5:2[static-libs?,${MULTILIB_USEDEP}] )"
DEPEND="${RDEPEND}"
+PATCHES=( "${FILESDIR}"/${P}-jpeg-9a.patch )
+
src_prepare() {
emake distclean
default