diff options
author | Antoine Brodin <antoine@FreeBSD.org> | 2014-12-24 16:17:19 +0000 |
---|---|---|
committer | Antoine Brodin <antoine@FreeBSD.org> | 2014-12-24 16:17:19 +0000 |
commit | 18ca1576195ec2d10ddc7e4083bdb5bb0961b568 (patch) | |
tree | 79330b5c2569bfa8914991f6bec7e66588141077 /science | |
parent | 3fc19cdcb0a0a594b90bd1246c101fcd0ddaf492 (diff) |
Notes
Diffstat (limited to 'science')
-rw-r--r-- | science/h5utils/Makefile | 4 | ||||
-rw-r--r-- | science/h5utils/files/patch-writepng.c | 43 |
2 files changed, 35 insertions, 12 deletions
diff --git a/science/h5utils/Makefile b/science/h5utils/Makefile index 67861fe47231..c964281215a6 100644 --- a/science/h5utils/Makefile +++ b/science/h5utils/Makefile @@ -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> diff --git a/science/h5utils/files/patch-writepng.c b/science/h5utils/files/patch-writepng.c index fa98cfe9ea8b..42543c2938fe 100644 --- a/science/h5utils/files/patch-writepng.c +++ b/science/h5utils/files/patch-writepng.c @@ -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 */ + |