public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in games-fps/eduke32/files: eduke32-20130317.3572-libpng-1.6.patch
@ 2013-04-11 14:16 Julian Ospald (hasufell)
  0 siblings, 0 replies; only message in thread
From: Julian Ospald (hasufell) @ 2013-04-11 14:16 UTC (permalink / raw
  To: gentoo-commits

hasufell    13/04/11 14:16:54

  Added:                eduke32-20130317.3572-libpng-1.6.patch
  Log:
  fix build with libpng-1.6
  
  (Portage version: 2.2.0_alpha171/cvs/Linux x86_64, signed Manifest commit with key E73C35B3)

Revision  Changes    Path
1.1                  games-fps/eduke32/files/eduke32-20130317.3572-libpng-1.6.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-fps/eduke32/files/eduke32-20130317.3572-libpng-1.6.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-fps/eduke32/files/eduke32-20130317.3572-libpng-1.6.patch?rev=1.1&content-type=text/plain

Index: eduke32-20130317.3572-libpng-1.6.patch
===================================================================
From: Julian Ospald <hasufell@gentoo.org>
Date: Thu Apr 11 13:31:20 UTC 2013
Subject: fix compatibility with libpng-1.6

--- eduke32_20130317-3572/build/src/engine.c
+++ eduke32_20130317-3572/build/src/engine.c
@@ -8,6 +8,9 @@
 
 #define ENGINE
 
+#if (PNG_LIBPNG_VER > 10599)
+# include <string.h>
+#endif
 #include "compat.h"
 #include "build.h"
 #include "pragmas.h"
@@ -16112,7 +16115,11 @@ static int32_t screencapture_png(const c
         png_set_filter(png_ptr, PNG_FILTER_TYPE_BASE, PNG_FILTER_VALUE_NONE);
 
     if (!HICOLOR)
+	#if (PNG_LIBPNG_VER > 10599)
+        palette = (png_colorp)png_malloc(png_ptr, 256*sizeof(png_color));
+	#else
         palette = (png_colorp)png_malloc(png_ptr, 256*png_sizeof(png_color));
+	#endif
 
     if (palette)
     {
@@ -16129,7 +16136,11 @@ static int32_t screencapture_png(const c
 //    png_set_gAMA(png_ptr, info_ptr, vid_gamma);  // 1.0/vid_gamma ?
 //    png_set_sRGB(png_ptr, info_ptr, PNG_sRGB_INTENT_SATURATION);  // hm...
 
+    #if (PNG_LIBPNG_VER > 10599)
+    text = (png_textp)png_malloc(png_ptr, 2*sizeof(png_text));
+    #else
     text = (png_textp)png_malloc(png_ptr, 2*png_sizeof(png_text));
+    #endif
     text[0].compression = PNG_TEXT_COMPRESSION_NONE;
     text[0].key = "Title";
     text[0].text = (png_charp)(editstatus ? "Mapster32 screenshot" : "EDuke32 screenshot");





^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-04-11 14:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-11 14:16 [gentoo-commits] gentoo-x86 commit in games-fps/eduke32/files: eduke32-20130317.3572-libpng-1.6.patch Julian Ospald (hasufell)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox