diff options
author | drochner <drochner> | 2011-01-19 19:03:11 +0000 |
---|---|---|
committer | drochner <drochner> | 2011-01-19 19:03:11 +0000 |
commit | e88297e7ae986dae0a1065d12e10745b36cfff10 (patch) | |
tree | c3c3eea31764d0a5b7fb5f492ba085c38b926850 /graphics | |
parent | 886fd7d54014184f382696ba61bff05661bf545d (diff) | |
download | pkgsrc-e88297e7ae986dae0a1065d12e10745b36cfff10.tar.gz |
fix build with png-1.5
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/xfig/distinfo | 4 | ||||
-rw-r--r-- | graphics/xfig/patches/patch-ao | 50 | ||||
-rw-r--r-- | graphics/xfig/patches/patch-ap | 21 |
3 files changed, 74 insertions, 1 deletions
diff --git a/graphics/xfig/distinfo b/graphics/xfig/distinfo index 46279dac64e..ea89657d54e 100644 --- a/graphics/xfig/distinfo +++ b/graphics/xfig/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.22 2009/12/23 14:21:48 drochner Exp $ +$NetBSD: distinfo,v 1.23 2011/01/19 19:03:11 drochner Exp $ SHA1 (xfig.3.2.5b.full.tar.gz) = 0730d7e6bc217c0de02682efb0078821512bb542 RMD160 (xfig.3.2.5b.full.tar.gz) = aad4cfd808c116d34218e9890a898652e4f52ab6 @@ -14,3 +14,5 @@ SHA1 (patch-ak) = fcc358a595590ea3136d71bd9f61449d54914c46 SHA1 (patch-al) = ca20d3ec7bcf2ac24fd0a415495f805add23142d SHA1 (patch-am) = 72adbda34425fda49f2072a3d40a3d942e07e1ba SHA1 (patch-an) = 4bfce8dbd420bc4b4d8efa5b01a39e3a9ce03ca6 +SHA1 (patch-ao) = 4b3878cd2a5ef57dd34d51604e204bd106261ad2 +SHA1 (patch-ap) = 84a453de2badd82eb31d950981f086e48310d66f diff --git a/graphics/xfig/patches/patch-ao b/graphics/xfig/patches/patch-ao new file mode 100644 index 00000000000..71612c66264 --- /dev/null +++ b/graphics/xfig/patches/patch-ao @@ -0,0 +1,50 @@ +$NetBSD: patch-ao,v 1.1 2011/01/19 19:03:12 drochner Exp $ + +--- f_readpng.c.orig 2007-03-29 00:23:14.000000000 +0000 ++++ f_readpng.c +@@ -44,6 +44,8 @@ read_png(FILE *file, int filetype, F_pic + int num_palette; + png_colorp palette; + png_color_16 background; ++ double gamma; ++ png_color_16p file_background; + + /* make scale factor smaller for metric */ + float scale = (appres.INCHES ? +@@ -73,7 +75,7 @@ read_png(FILE *file, int filetype, F_pic + } + + /* set long jump recovery 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); + close_picfile(file,filetype); +@@ -90,14 +92,14 @@ read_png(FILE *file, int filetype, F_pic + 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_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)) + /* 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 */ +@@ -136,7 +138,7 @@ read_png(FILE *file, int filetype, F_pic + + 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) { diff --git a/graphics/xfig/patches/patch-ap b/graphics/xfig/patches/patch-ap new file mode 100644 index 00000000000..e49b95bea95 --- /dev/null +++ b/graphics/xfig/patches/patch-ap @@ -0,0 +1,21 @@ +$NetBSD: patch-ap,v 1.1 2011/01/19 19:03:12 drochner Exp $ + +--- f_wrpng.c.orig 2007-03-29 00:23:14.000000000 +0000 ++++ f_wrpng.c +@@ -20,6 +20,7 @@ + #include "w_msgpanel.h" + #include "w_setup.h" + #include <png.h> ++#include <zlib.h> + + /* + * Write PNG file from rgb data +@@ -59,7 +60,7 @@ write_png(FILE *file, unsigned char *dat + } + + /* set long jump recovery 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_write_struct(&png_ptr, &info_ptr); + return False; |