summaryrefslogtreecommitdiff
path: root/x11/kdebase-workspace4
diff options
context:
space:
mode:
authorwiz <wiz@pkgsrc.org>2011-01-19 16:41:04 +0000
committerwiz <wiz@pkgsrc.org>2011-01-19 16:41:04 +0000
commit4a6cf9ef002fa3bbaf735f41d69b672b6595bb34 (patch)
tree4be8ddf58fb819114083e4ce1e74bbd4a1c12f2a /x11/kdebase-workspace4
parentc66e3d6aaff90b08ccbdea3c8dfee0baccb054ae (diff)
downloadpkgsrc-4a6cf9ef002fa3bbaf735f41d69b672b6595bb34.tar.gz
Fix build with png-1.5.
Diffstat (limited to 'x11/kdebase-workspace4')
-rw-r--r--x11/kdebase-workspace4/distinfo3
-rw-r--r--x11/kdebase-workspace4/patches/patch-aa97
2 files changed, 99 insertions, 1 deletions
diff --git a/x11/kdebase-workspace4/distinfo b/x11/kdebase-workspace4/distinfo
index 67f68b7c63c..6a840127d2c 100644
--- a/x11/kdebase-workspace4/distinfo
+++ b/x11/kdebase-workspace4/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.15 2011/01/18 10:59:12 markd Exp $
+$NetBSD: distinfo,v 1.16 2011/01/19 16:41:04 wiz Exp $
SHA1 (Daemon.README) = eb1e6af52adc02ded77af17e8953134b7e60d23b
RMD160 (Daemon.README) = 39edd92ed4314397080f32a8caff0ac3f716ecf4
@@ -12,6 +12,7 @@ Size (NetBSD-flag-1.0.png) = 4532 bytes
SHA1 (kdebase-workspace-4.5.4.tar.bz2) = e362bceff622f39bf6949657d1e629ef541c6ae2
RMD160 (kdebase-workspace-4.5.4.tar.bz2) = 61844ad2d92ec0ee8796d35746077ad4ecd6400c
Size (kdebase-workspace-4.5.4.tar.bz2) = 65683870 bytes
+SHA1 (patch-aa) = 6447886c745193338fb7dbea117b0ce1976a964b
SHA1 (patch-ab) = 0b0c541c7305d31e01a45f0a6a7f5ddb2d2e57fe
SHA1 (patch-ac) = 8b77575ca1998e2cd297d98721b59ff104193959
SHA1 (patch-ad) = ac0907cc59c5f0976cdbe152bb7fb0a4592bbe84
diff --git a/x11/kdebase-workspace4/patches/patch-aa b/x11/kdebase-workspace4/patches/patch-aa
new file mode 100644
index 00000000000..230d3a0bbf8
--- /dev/null
+++ b/x11/kdebase-workspace4/patches/patch-aa
@@ -0,0 +1,97 @@
+$NetBSD: patch-aa,v 1.1 2011/01/19 16:41:04 wiz Exp $
+
+Fix build with png-1.5.
+
+--- ksplash/ksplashx/qpngio.cpp.orig 2009-08-28 16:01:29.000000000 +0000
++++ ksplash/ksplashx/qpngio.cpp
+@@ -112,12 +112,19 @@ void setup_qt( QImage& image, png_struct
+ png_uint_32 height;
+ int bit_depth;
+ int color_type;
++ png_bytep trans_alpha;
++ int num_trans;
++ png_color_16p trans_color;
++ png_colorp palette;
++ int num_palette;
+ png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type,
+ 0, 0, 0);
++ png_get_PLTE(png_ptr, info_ptr, &palette, &num_palette);
++ png_get_tRNS(png_ptr, info_ptr, &trans_alpha, &num_trans, &trans_color);
+
+ if ( color_type == PNG_COLOR_TYPE_GRAY ) {
+ // Black & White or 8-bit grayscale
+- if ( bit_depth == 1 && info_ptr->channels == 1 ) {
++ if ( bit_depth == 1 && png_get_channels(png_ptr, info_ptr) == 1 ) {
+ png_set_invert_mono( png_ptr );
+ png_read_update_info( png_ptr, info_ptr );
+ if (!image.create( width, height, 1, 2, QImage::BigEndian ))
+@@ -154,7 +161,7 @@ void setup_qt( QImage& image, png_struct
+ #if PNG_LIBPNG_VER < 10400
+ const int g = info_ptr->trans_values.gray;
+ #else
+- const int g = info_ptr->trans_color.gray;
++ const int g = trans_color->gray;
+ #endif
+ if (g < ncols) {
+ image.setAlphaBuffer(true);
+@@ -164,7 +171,7 @@ void setup_qt( QImage& image, png_struct
+ }
+ } else 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 )
+ {
+ // 1-bit and 8-bit color
+ if ( bit_depth != 1 )
+@@ -172,32 +179,32 @@ void setup_qt( QImage& image, png_struct
+ png_read_update_info( png_ptr, info_ptr );
+ png_get_IHDR(png_ptr, info_ptr,
+ &width, &height, &bit_depth, &color_type, 0, 0, 0);
+- if (!image.create(width, height, bit_depth, info_ptr->num_palette,
++ if (!image.create(width, height, bit_depth, num_palette,
+ QImage::BigEndian))
+ return;
+ int i = 0;
+ if ( png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS) ) {
+ image.setAlphaBuffer( true );
+- while ( i < info_ptr->num_trans ) {
++ while ( i < num_trans ) {
+ image.setColor(i, qRgba(
+- info_ptr->palette[i].red,
+- info_ptr->palette[i].green,
+- info_ptr->palette[i].blue,
++ palette[i].red,
++ palette[i].green,
++ palette[i].blue,
+ #if PNG_LIBPNG_VER < 10400
+ info_ptr->trans[i]
+ #else
+- info_ptr->trans_alpha[i]
++ trans_alpha[i]
+ #endif
+ )
+ );
+ i++;
+ }
+ }
+- while ( i < info_ptr->num_palette ) {
++ while ( i < num_palette ) {
+ image.setColor(i, qRgba(
+- info_ptr->palette[i].red,
+- info_ptr->palette[i].green,
+- info_ptr->palette[i].blue,
++ palette[i].red,
++ palette[i].green,
++ palette[i].blue,
+ 0xff
+ )
+ );
+@@ -280,7 +287,7 @@ QImage splash_read_png_image(FILE* f)
+ return QImage();
+ }
+
+- if (setjmp(png_ptr->jmpbuf)) {
++ if (setjmp(png_jmpbuf(png_ptr))) {
+ png_destroy_read_struct(&png_ptr, &info_ptr, &end_info);
+ return QImage();
+ }