[76092] trunk/dports/science/arb/files/patch-ARB-glpng.diff

ryandesign at macports.org ryandesign at macports.org
Fri Feb 18 02:52:14 PST 2011


Revision: 76092
          http://trac.macports.org/changeset/76092
Author:   ryandesign at macports.org
Date:     2011-02-18 02:52:13 -0800 (Fri, 18 Feb 2011)
Log Message:
-----------
arb: use upstream version of libpng 1.4 patch; see #28276

Modified Paths:
--------------
    trunk/dports/science/arb/files/patch-ARB-glpng.diff

Modified: trunk/dports/science/arb/files/patch-ARB-glpng.diff
===================================================================
--- trunk/dports/science/arb/files/patch-ARB-glpng.diff	2011-02-18 09:07:04 UTC (rev 76091)
+++ trunk/dports/science/arb/files/patch-ARB-glpng.diff	2011-02-18 10:52:13 UTC (rev 76092)
@@ -1,38 +1,33 @@
 --- GL/glpng/glpng.c	2008-07-22 05:11:32.000000000 -0400
-+++ GL/glpng/glpng.c	2011-02-12 22:24:54.000000000 -0500
-@@ -270,15 +270,15 @@
-     png_bytep  *row_p;
-     double       fileGamma;
++++ GL/glpng/glpng.c	2011-02-02 03:49:05.000000000 -0500
+@@ -37,6 +37,12 @@
+ #include <math.h>
+ #include <png.h>
  
--    png_uint_32 width, height;
-+    png_size_t width, height;
-     int depth, color;
- 
--    png_uint_32 i;
-+    png_size_t i;
- 
++#if 0
++#define PNG_CHECK_SIG(header,size) png_check_sig(header,size) // old libpng
++#else
++#define PNG_CHECK_SIG(header,size) (png_sig_cmp(header,0,size)==0)
++#endif
++
+ /* Used to decide if GL/gl.h supports the paletted extension */
+ #ifdef GL_COLOR_INDEX1_EXT
+ #define SUPPORTS_PALETTE_EXT
+@@ -278,7 +284,7 @@
      if (pinfo == NULL) return 0;
  
      fread(header, 1, 8, fp);
 -    if (!png_check_sig(header, 8)) return 0;
-+    if (!png_sig_cmp(header, 0, 8)) return 0;
++    if (!PNG_CHECK_SIG(header, 8)) return 0;
  
      png = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
      info = png_create_info_struct(png);
-@@ -377,13 +377,13 @@
-     png_bytep  *row_p;
-     double       fileGamma;
+@@ -383,7 +389,7 @@
+     png_uint_32 i;
  
--    png_uint_32 width, height, rw, rh;
-+    png_size_t width, height, rw, rh;
-     int depth, color;
- 
--    png_uint_32 i;
-+    png_size_t i;
- 
      fread(header, 1, 8, fp);
 -    if (!png_check_sig(header, 8)) return 0;
-+    if (!png_sig_cmp(header, 0, 8)) return 0;
++    if (!PNG_CHECK_SIG(header, 8)) return 0;
  
      png = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
      info = png_create_info_struct(png);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110218/b976fd3b/attachment-0001.html>


More information about the macports-changes mailing list