Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Dec 2014 16:17:20 +0000 (UTC)
From:      Antoine Brodin <antoine@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r375470 - in head/science/h5utils: . files
Message-ID:  <201412241617.sBOGHKvC011255@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: antoine
Date: Wed Dec 24 16:17:19 2014
New Revision: 375470
URL: https://svnweb.freebsd.org/changeset/ports/375470
QAT: https://qat.redports.org/buildarchive/r375470/

Log:
  Properly support png 1.5
  
  Obtained from:	pkgsrc

Modified:
  head/science/h5utils/Makefile
  head/science/h5utils/files/patch-writepng.c

Modified: head/science/h5utils/Makefile
==============================================================================
--- head/science/h5utils/Makefile	Wed Dec 24 16:04:22 2014	(r375469)
+++ head/science/h5utils/Makefile	Wed Dec 24 16:17:19 2014	(r375470)
@@ -16,11 +16,11 @@ LICENSE_FILE=	${WRKSRC}/LICENSE
 
 GNU_CONFIGURE=	YES
 CFLAGS +=	-L${LOCALBASE}/lib -I${LOCALBASE}/include \
-		-I${LOCALBASE}/include/libpng15 ${PTHREAD_LIBS}
+		${PTHREAD_LIBS}
 
 BUILD_DEPENDS+=	gawk:${PORTSDIR}/lang/gawk
 LIB_DEPENDS+=	libhdf5.so:${PORTSDIR}/science/hdf5 \
-		libpng15.so:${PORTSDIR}/graphics/png \
+		libpng.so:${PORTSDIR}/graphics/png \
 		libmatheval.so:${PORTSDIR}/devel/libmatheval
 
 .include <bsd.port.mk>

Modified: head/science/h5utils/files/patch-writepng.c
==============================================================================
--- head/science/h5utils/files/patch-writepng.c	Wed Dec 24 16:04:22 2014	(r375469)
+++ head/science/h5utils/files/patch-writepng.c	Wed Dec 24 16:17:19 2014	(r375470)
@@ -1,14 +1,19 @@
---- writepng.c.orig	2009-06-12 22:58:50.000000000 +0200
-+++ writepng.c	2012-05-06 06:49:53.000000000 +0200
-@@ -26,6 +26,7 @@
- #include <string.h>
+$NetBSD: patch-writepng.c,v 1.1 2011/02/01 09:05:31 wiz Exp $
+
+Fix build with png-1.5.
+
+--- writepng.c.orig	2009-06-12 20:58:50.000000000 +0000
++++ writepng.c
+@@ -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 = NULL;
++
  
- #include <png.h>
-+#include <pngpriv.h>
- 
- #include "writepng.h"
- 
-@@ -309,7 +310,7 @@
+      /* 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. */
@@ -17,3 +22,21 @@
  	  /* 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,7 @@ void writepng(char *filename,
+      png_write_end(png_ptr, info_ptr);
+ 
+      /* if you malloced the palette, free it here */
+-     free(info_ptr->palette);
++     free(palette);
+ 
+      /* if you allocated any text comments, free them here */
+ 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201412241617.sBOGHKvC011255>