diff options
author | wiz <wiz@pkgsrc.org> | 2011-02-01 09:05:30 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2011-02-01 09:05:30 +0000 |
commit | 77978784166a35e404a323a29e9b5a8154b95a75 (patch) | |
tree | 8bc4830995387e1636b5767961e1033b0e797e49 /graphics | |
parent | f27f4017639df41d6808d1193c04ba3b496e3df7 (diff) | |
download | pkgsrc-77978784166a35e404a323a29e9b5a8154b95a75.tar.gz |
Fix build with png-1.5.
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/h5utils/distinfo | 3 | ||||
-rw-r--r-- | graphics/h5utils/patches/patch-writepng.c | 42 |
2 files changed, 44 insertions, 1 deletions
diff --git a/graphics/h5utils/distinfo b/graphics/h5utils/distinfo index 5cb2cf88388..120c1595253 100644 --- a/graphics/h5utils/distinfo +++ b/graphics/h5utils/distinfo @@ -1,6 +1,7 @@ -$NetBSD: distinfo,v 1.5 2009/12/10 17:35:45 drochner Exp $ +$NetBSD: distinfo,v 1.6 2011/02/01 09:05:30 wiz Exp $ SHA1 (h5utils-1.12.1.tar.gz) = 1bd8ef8c50221da35aafb5424de9b5f177250d2d RMD160 (h5utils-1.12.1.tar.gz) = f7d1d1b9254e5946c382fad2bd5ffc41e238860d Size (h5utils-1.12.1.tar.gz) = 156785 bytes SHA1 (patch-aa) = 2961c8a4ef4319f5e74d6252f82364b94c2d24be +SHA1 (patch-writepng.c) = cec1487f77f4534aa081e1e209a603876a288145 diff --git a/graphics/h5utils/patches/patch-writepng.c b/graphics/h5utils/patches/patch-writepng.c new file mode 100644 index 00000000000..42543c2938f --- /dev/null +++ b/graphics/h5utils/patches/patch-writepng.c @@ -0,0 +1,42 @@ +$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; ++ + + /* 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,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 */ + |