fix building with gcc-5.2 with patch from Sven Eden via bug 552370
authorMichael Sterrett <mr_bones_@gentoo.org>
Thu, 3 Sep 2015 15:01:03 +0000 (11:01 -0400)
committerMichael Sterrett <mr_bones_@gentoo.org>
Thu, 3 Sep 2015 15:06:05 +0000 (11:06 -0400)
Package-Manager: portage-2.2.20.1

media-libs/devil/devil-1.7.8-r2.ebuild
media-libs/devil/files/devil-1.7.8-restrict.patch [new file with mode: 0644]

index 1f03c571c27a3e92cd2a0c926ad3cefaf5d5ef31..8be02814856a5a7062dec0134513aa819b279d60 100644 (file)
@@ -38,7 +38,7 @@ DEPEND="${RDEPEND}
        X? ( x11-proto/xextproto )"
 
 src_prepare() {
-       epatch "${FILESDIR}"/${P}-{CVE-2009-3994,libpng14,nvtt-glut,ILUT}.patch
+       epatch "${FILESDIR}"/${P}-{CVE-2009-3994,libpng14,nvtt-glut,ILUT,restrict}.patch
        eautoreconf
 }
 
diff --git a/media-libs/devil/files/devil-1.7.8-restrict.patch b/media-libs/devil/files/devil-1.7.8-restrict.patch
new file mode 100644 (file)
index 0000000..d99ccb3
--- /dev/null
@@ -0,0 +1,23 @@
+Patch from Sven Eden via bug 552370
+https://bugs.gentoo.org/show_bug.cgi?id=552370
+
+--- a/include/IL/il.h  2009-03-08 08:10:08.000000000 +0100
++++ b/include/IL/il.h  2015-09-03 16:22:04.056637044 +0200
+@@ -63,13 +63,13 @@
+       #endif
+ #endif
+-#ifdef RESTRICT_KEYWORD
+-#define RESTRICT restrict
+-#define CONST_RESTRICT const restrict
++#if defined(RESTRICT_KEYWORD) && !defined(__cplusplus)
++#define RESTRICT __restrict__
++#define CONST_RESTRICT const __restrict__
+ #else
+ #define RESTRICT
+ #define CONST_RESTRICT const
+-#endif
++#endif // RESTRICT keyword and not C++
+ #include <stdio.h>