diff options
author | tron <tron@pkgsrc.org> | 2011-01-19 00:12:50 +0000 |
---|---|---|
committer | tron <tron@pkgsrc.org> | 2011-01-19 00:12:50 +0000 |
commit | ceaceedca7b2495f4446845b1abb4f7528f08937 (patch) | |
tree | feaa42c99a6651cddc8a392c589e816690524926 /print/transfig | |
parent | 668128f7c11003671d40b5d6a77ca7b0c01f73a0 (diff) | |
download | pkgsrc-ceaceedca7b2495f4446845b1abb4f7528f08937.tar.gz |
Fix build with png-1.5.
Diffstat (limited to 'print/transfig')
-rw-r--r-- | print/transfig/distinfo | 3 | ||||
-rw-r--r-- | print/transfig/patches/patch-ad | 52 |
2 files changed, 54 insertions, 1 deletions
diff --git a/print/transfig/distinfo b/print/transfig/distinfo index b1bb3942160..8683d6cfd48 100644 --- a/print/transfig/distinfo +++ b/print/transfig/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.16 2009/12/23 14:19:58 drochner Exp $ +$NetBSD: distinfo,v 1.17 2011/01/19 00:12:50 tron Exp $ SHA1 (transfig.3.2.5.tar.gz) = 2657c104d0099dcb4565a8762a9543310e55e767 RMD160 (transfig.3.2.5.tar.gz) = 435615bded662225127ea564fc746e9cb0058f18 @@ -6,5 +6,6 @@ Size (transfig.3.2.5.tar.gz) = 394296 bytes SHA1 (patch-aa) = bd898082a8c34825efe04d0102ddb33b2f4cffbd SHA1 (patch-ab) = b056ff88914bccfc172f15adb663eda0f254e125 SHA1 (patch-ac) = 0258794cf6f6d22d3355ed01c2cc89c7ee0088d4 +SHA1 (patch-ad) = 58343868c70e52bd0aee485d590f262a3fdc7b98 SHA1 (patch-ae) = d3d0eeb08083092f717525914c64e72c7ceaa1fd SHA1 (patch-af) = 544bae557e193f9bbee4dbe1aefa454c38100c69 diff --git a/print/transfig/patches/patch-ad b/print/transfig/patches/patch-ad new file mode 100644 index 00000000000..3d44fb050d7 --- /dev/null +++ b/print/transfig/patches/patch-ad @@ -0,0 +1,52 @@ +$NetBSD: patch-ad,v 1.4 2011/01/19 00:12:50 tron Exp $ + +Fix build with png-1.5. + +--- fig2dev/dev/readpng.c.orig 2003-01-13 19:16:41.000000000 +0000 ++++ fig2dev/dev/readpng.c 2011-01-19 00:09:24.000000000 +0000 +@@ -39,6 +39,8 @@ + char *ptr; + int num_palette; + png_colorp palette; ++ double gamma; ++ png_color_16p file_background; + png_color_16 png_background; + + *llx = *lly = 0; +@@ -62,7 +64,7 @@ + } + + /* set long jump here */ +- if (setjmp(png_ptr->jmpbuf)) { ++ if (setjmp(png_jmpbuf(png_ptr))) { + /* if we get here there was a problem reading the file */ + png_destroy_read_struct(&png_ptr, &info_ptr, &end_info); + return 0; +@@ -78,14 +80,14 @@ + png_get_IHDR(png_ptr, info_ptr, &w, &h, &bit_depth, &color_type, + &interlace_type, &compression_type, &filter_type); + +- if (info_ptr->valid & PNG_INFO_gAMA) +- png_set_gamma(png_ptr, 2.2, info_ptr->gamma); ++ if (png_get_gAMA(png_ptr, info_ptr, &gamma) & PNG_INFO_gAMA) ++ png_set_gamma(png_ptr, 2.2, gamma); + else + png_set_gamma(png_ptr, 2.2, 0.45); + +- if (info_ptr->valid & PNG_INFO_bKGD) ++ if (png_get_bKGD(png_ptr, info_ptr, &file_background) & PNG_INFO_bKGD) + /* set the background to the one supplied */ +- png_set_background(png_ptr, &info_ptr->background, ++ png_set_background(png_ptr, file_background, + PNG_BACKGROUND_GAMMA_FILE, 1, 1.0); + else { + /* blend the canvas background using the alpha channel */ +@@ -127,7 +129,7 @@ + + if (png_get_PLTE(png_ptr, info_ptr, &palette, &num_palette)) { + png_get_hIST(png_ptr, info_ptr, &histogram); +- png_set_dither(png_ptr, palette, num_palette, 256, histogram, 0); ++ png_set_quantize(png_ptr, palette, num_palette, 256, histogram, 0); + } + } + if (color_type == PNG_COLOR_TYPE_GRAY || color_type == PNG_COLOR_TYPE_GRAY_ALPHA) { |