]> git.pld-linux.org Git - packages/corona.git/commitdiff
- fix build with giflib 5.x
authorJan Rękorajski <baggins@pld-linux.org>
Mon, 22 Jun 2015 18:59:40 +0000 (20:59 +0200)
committerJan Rękorajski <baggins@pld-linux.org>
Mon, 22 Jun 2015 18:59:40 +0000 (20:59 +0200)
corona.spec
giflib5.patch [new file with mode: 0644]

index a742d427ef6ba66c94906dd07a6a86e5ac721a48..e1eff57027896e022ad6f3a6896cb8610529af23 100644 (file)
@@ -11,6 +11,7 @@ Patch0:               %{name}-system-gif.patch
 Patch1:                %{name}-config.patch
 Patch2:                %{name}-gcc43.patch
 Patch3:                %{name}-libpng15.patch
+Patch4:                giflib5.patch
 URL:           http://corona.sourceforge.net/
 BuildRequires: autoconf
 BuildRequires: automake
@@ -74,6 +75,7 @@ Statyczna biblioteka corona.
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
+%patch4 -p1
 
 %build
 %{__libtoolize}
diff --git a/giflib5.patch b/giflib5.patch
new file mode 100644 (file)
index 0000000..d478556
--- /dev/null
@@ -0,0 +1,50 @@
+--- corona-1.0.2/src/OpenGIF.cpp.orig  2015-06-22 20:57:06.941970178 +0200
++++ corona-1.0.2/src/OpenGIF.cpp       2015-06-22 20:58:51.143707746 +0200
+@@ -20,7 +20,11 @@
+     COR_GUARD("OpenGIF");
+     // open GIF file
++#if GIFLIB_MAJOR >= 5
++    GifFileType* gif = DGifOpen(file, InputFunc, NULL);
++#else
+     GifFileType* gif = DGifOpen(file, InputFunc);
++#endif
+     if (!gif) {
+       COR_LOG("DGifOpen failed");
+       return 0;
+@@ -29,7 +33,11 @@
+     // read GIF image
+     if (DGifSlurp(gif) != GIF_OK) {
+       COR_LOG("DGifSlurp failed");
++#if GIFLIB_MAJOR >= 5
++      DGifCloseFile(gif, NULL);
++#else
+       DGifCloseFile(gif);
++#endif
+       return 0;
+     }
+     ColorMapObject* cmap = gif->SColorMap;
+@@ -50,7 +58,11 @@
+         COR_LOG(str);
+       }
+       
++#if GIFLIB_MAJOR >= 5
++      DGifCloseFile(gif, NULL);
++#else
+       DGifCloseFile(gif);
++#endif
+       return 0;
+     }
+@@ -117,7 +129,11 @@
+       memcpy(out, in, width * height);
+     }
++#if GIFLIB_MAJOR >= 5
++    DGifCloseFile(gif, NULL);
++#else
+     DGifCloseFile(gif);
++#endif
+     return new SimpleImage(width, height, PF_I8, image.release(),
+                            (byte*)palette.release(), 256, PF_R8G8B8A8);
+   }
This page took 0.105 seconds and 4 git commands to generate.