diff options
-rw-r--r-- | graphics/gwenview/distinfo | 4 | ||||
-rw-r--r-- | graphics/gwenview/patches/patch-ab | 41 |
2 files changed, 27 insertions, 18 deletions
diff --git a/graphics/gwenview/distinfo b/graphics/gwenview/distinfo index ba615bd6b6d..bcc97dbe536 100644 --- a/graphics/gwenview/distinfo +++ b/graphics/gwenview/distinfo @@ -1,7 +1,7 @@ -$NetBSD: distinfo,v 1.17 2011/02/06 16:14:04 wiz Exp $ +$NetBSD: distinfo,v 1.18 2011/02/07 00:30:07 wiz Exp $ SHA1 (gwenview-1.4.2.tar.bz2) = d2168b48eb7f27b4338681acc49b5b2a51268209 RMD160 (gwenview-1.4.2.tar.bz2) = 9c8bc84c90c2eda36f31fb6728990bc7e8063dd4 Size (gwenview-1.4.2.tar.bz2) = 984977 bytes SHA1 (patch-aa) = 03d6fd5756e9ea500a8885cbfd0a69ebfe1ff7b8 -SHA1 (patch-ab) = 75f2cee39021195edb8c6f9688f2ae6fc9e15739 +SHA1 (patch-ab) = a5c3c50192f6e1d93c2d5cfe859f330a5d4362cb diff --git a/graphics/gwenview/patches/patch-ab b/graphics/gwenview/patches/patch-ab index 29fdb4fe695..347b93abf90 100644 --- a/graphics/gwenview/patches/patch-ab +++ b/graphics/gwenview/patches/patch-ab @@ -1,8 +1,8 @@ -$NetBSD: patch-ab,v 1.4 2011/02/06 16:14:04 wiz Exp $ +$NetBSD: patch-ab,v 1.5 2011/02/07 00:30:07 wiz Exp $ -Fix build with png-1.5 (incomplete). +Fix build with png-1.5. ---- src/gvcore/pngformattype.cpp.orig 2011-02-06 15:51:56.000000000 +0000 +--- src/gvcore/pngformattype.cpp.orig 2007-09-15 13:46:13.000000000 +0000 +++ src/gvcore/pngformattype.cpp @@ -211,7 +211,7 @@ void setup_qt( QImage& image, png_struct @@ -17,11 +17,11 @@ Fix build with png-1.5 (incomplete). image.setColor( i, qRgba(c,c,c,0xff) ); } if ( png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS) ) { -- const int g = info_ptr->trans_color.gray; -+ png_bytep trans_alpha; -+ int num_trans; -+ png_color_16p trans_color; -+ png_get_tRNS(png_ptr, info_ptr, &trans_alpha, &num_trans, &trans_color); +- const int g = info_ptr->trans_values.gray; ++ png_bytep trans_alpha; ++ int num_trans; ++ png_color_16p trans_color; ++ png_get_tRNS(png_ptr, info_ptr, &trans_alpha, &num_trans, &trans_color); + const int g = trans_color->gray; if (g < ncols) { image.setAlphaBuffer(TRUE); @@ -32,9 +32,9 @@ Fix build with png-1.5 (incomplete). - } else if ( color_type == PNG_COLOR_TYPE_PALETTE + } else { + png_colorp palette; -+ int num_palette; -+ png_get_PLTE(png_ptr, info_ptr, &palette, &num_palette); -+ if ( color_type == PNG_COLOR_TYPE_PALETTE ++ int num_palette; ++ png_get_PLTE(png_ptr, info_ptr, &palette, &num_palette); ++ if ( color_type == PNG_COLOR_TYPE_PALETTE && png_get_valid(png_ptr, info_ptr, PNG_INFO_PLTE) - && info_ptr->num_palette <= 256 ) + && num_palette <= 256 ) @@ -51,10 +51,10 @@ Fix build with png-1.5 (incomplete). return; int i = 0; if ( png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS) ) { -+ png_bytep trans_alpha; -+ int num_trans; -+ png_color_16p trans_color; -+ png_get_tRNS(png_ptr, info_ptr, &trans_alpha, &num_trans, &trans_color); ++ png_bytep trans_alpha; ++ int num_trans; ++ png_color_16p trans_color; ++ png_get_tRNS(png_ptr, info_ptr, &trans_alpha, &num_trans, &trans_color); image.setAlphaBuffer( TRUE ); - while ( i < info_ptr->num_trans ) { + while ( i < num_trans ) { @@ -62,7 +62,7 @@ Fix build with png-1.5 (incomplete). - info_ptr->palette[i].red, - info_ptr->palette[i].green, - info_ptr->palette[i].blue, -- info_ptr->trans_alpha[i] +- info_ptr->trans[i] + palette[i].red, + palette[i].green, + palette[i].blue, @@ -117,3 +117,12 @@ Fix build with png-1.5 (incomplete). png_destroy_read_struct(&png_ptr, &info_ptr, 0); image = 0; state = MovieStart; +@@ -476,7 +489,7 @@ void PNGFormat::end(png_structp png, png + consumer->frameDone(QPoint(offx,offy),r); + consumer->end(); + state = FrameStart; +- unused_data = (int)png->buffer_size; // Since libpng doesn't tell us ++ unused_data = png_process_data_pause(png, 1); + } + + #ifdef PNG_USER_CHUNKS_SUPPORTED |