games-sports/gracer: fix building against latest giflib (bug #571936)
authorMichael Sterrett <mr_bones_@gentoo.org>
Thu, 14 Jan 2016 22:43:09 +0000 (17:43 -0500)
committerMichael Sterrett <mr_bones_@gentoo.org>
Fri, 15 Jan 2016 19:33:30 +0000 (14:33 -0500)
Package-Manager: portage-2.2.26

games-sports/gracer/files/gracer-0.1.5-giflib.patch [new file with mode: 0644]
games-sports/gracer/files/gracer-0.1.5-warnings.patch [new file with mode: 0644]
games-sports/gracer/gracer-0.1.5.ebuild

diff --git a/games-sports/gracer/files/gracer-0.1.5-giflib.patch b/games-sports/gracer/files/gracer-0.1.5-giflib.patch
new file mode 100644 (file)
index 0000000..2d62b8c
--- /dev/null
@@ -0,0 +1,14 @@
+--- gracer-0.1.5.orig/common/gr_texture.c
++++ gracer-0.1.5/common/gr_texture.c
+@@ -274,7 +274,11 @@
+   int index;
+   int width, height;
+ 
++#if (GIFLIB_MAJOR >= 5&& !(GIFLIB_MAJOR == 5 && GIFLIB_MINOR == 0))
++  file = DGifOpenFileName (filename, &i);
++#else
+   file = DGifOpenFileName (filename);
++#endif
+   if (!file)
+     return -1;
+ 
diff --git a/games-sports/gracer/files/gracer-0.1.5-warnings.patch b/games-sports/gracer/files/gracer-0.1.5-warnings.patch
new file mode 100644 (file)
index 0000000..5886ef7
--- /dev/null
@@ -0,0 +1,21 @@
+--- gracer-0.1.5.orig/src/glbind.c
++++ gracer-0.1.5/src/glbind.c
+@@ -142,7 +142,7 @@
+     return NULL;
+ 
+   entry = Tcl_FindHashEntry (&cache_hash, key);
+-  if (&entry)
++  if (!entry)
+     return NULL;
+ 
+   return Tcl_GetHashValue (entry);
+--- gracer-0.1.5.orig/src/joystick.c
++++ gracer-0.1.5/src/joystick.c
+@@ -20,6 +20,7 @@
+  */
+ 
+ #include <unistd.h>
++#include <string.h>
+ #include <errno.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
index 46a3f6718829a0e5e699c3e589188e10ff241b8e..4fa9e7a422050ccb8f2eff974567a540c61f1e6d 100644 (file)
@@ -34,7 +34,9 @@ src_prepare() {
                "${FILESDIR}/${P}"-gcc41.patch \
                "${FILESDIR}"/${P}-as-needed.patch \
                "${FILESDIR}"/${P}-libpng14.patch \
-               "${FILESDIR}"/${P}-png15.patch
+               "${FILESDIR}"/${P}-png15.patch \
+               "${FILESDIR}"/${P}-giflib.patch \
+               "${FILESDIR}"/${P}-warnings.patch
 }
 
 src_configure() {