[98896] trunk/dports/science/h5utils
jmr at macports.org
jmr at macports.org
Sat Oct 20 04:19:20 PDT 2012
Revision: 98896
http://trac.macports.org//changeset/98896
Author: jmr at macports.org
Date: 2012-10-20 04:19:20 -0700 (Sat, 20 Oct 2012)
Log Message:
-----------
h5utils: fix build with libpng 1.5 (#36031, maintainer timeout)
Modified Paths:
--------------
trunk/dports/science/h5utils/Portfile
Added Paths:
-----------
trunk/dports/science/h5utils/files/
trunk/dports/science/h5utils/files/patch-writepng.c
Modified: trunk/dports/science/h5utils/Portfile
===================================================================
--- trunk/dports/science/h5utils/Portfile 2012-10-20 10:07:11 UTC (rev 98895)
+++ trunk/dports/science/h5utils/Portfile 2012-10-20 11:19:20 UTC (rev 98896)
@@ -31,4 +31,6 @@
port:libpng \
port:libmatheval
+patchfiles patch-writepng.c
+
configure.args --without-octave
Added: trunk/dports/science/h5utils/files/patch-writepng.c
===================================================================
--- trunk/dports/science/h5utils/files/patch-writepng.c (rev 0)
+++ trunk/dports/science/h5utils/files/patch-writepng.c 2012-10-20 11:19:20 UTC (rev 98896)
@@ -0,0 +1,39 @@
+--- writepng.c.orig 2009-06-13 06:58:50.000000000 +1000
++++ writepng.c 2012-10-20 22:16:09.000000000 +1100
+@@ -240,6 +240,8 @@ void writepng(char *filename,
+ double skewsin = sin(skew), skewcos = cos(skew);
+ REAL minoverlay = 0, maxoverlay = 0;
+ png_byte mask_byte;
++ png_colorp palette;
++
+
+ /* we must use direct color for translucent overlays */
+ if (overlay)
+@@ -309,7 +311,7 @@ void writepng(char *filename,
+ }
+ /* Set error handling. REQUIRED if you aren't supplying your own *
+ * error hadnling functions in the png_create_write_struct() call. */
+- if (setjmp(png_ptr->jmpbuf)) {
++ if (setjmp(png_jmpbuf(png_ptr))) {
+ /* If we get here, we had a problem reading the file */
+ fclose(fp);
+ png_destroy_write_struct(&png_ptr, (png_infopp) NULL);
+@@ -334,8 +336,6 @@ void writepng(char *filename,
+ PNG_INTERLACE_NONE,
+ PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE);
+ else {
+- png_colorp palette;
+-
+ png_set_IHDR(png_ptr, info_ptr, width, height, 8 /* bit_depth */ ,
+ PNG_COLOR_TYPE_PALETTE,
+ PNG_INTERLACE_NONE,
+@@ -434,7 +434,8 @@ void writepng(char *filename,
+ png_write_end(png_ptr, info_ptr);
+
+ /* if you malloced the palette, free it here */
+- free(info_ptr->palette);
++ if (eight_bit)
++ png_free(palette);
+
+ /* if you allocated any text comments, free them here */
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20121020/7a63c611/attachment.html>
More information about the macports-changes
mailing list