summaryrefslogtreecommitdiff
path: root/x11
diff options
context:
space:
mode:
authorwiz <wiz@pkgsrc.org>2011-01-14 11:08:20 +0000
committerwiz <wiz@pkgsrc.org>2011-01-14 11:08:20 +0000
commit482843b74de68bb4c6cf98b5fc84fc94bcd60a35 (patch)
tree0fa32c04bfe6571d811ea631adcc36609ba6e306 /x11
parent1aca6d563fc5300194f0f95fb8e23eac3d995d34 (diff)
downloadpkgsrc-482843b74de68bb4c6cf98b5fc84fc94bcd60a35.tar.gz
Fix build with png-1.5.
Diffstat (limited to 'x11')
-rw-r--r--x11/fltk/distinfo3
-rw-r--r--x11/fltk/patches/patch-ah49
2 files changed, 51 insertions, 1 deletions
diff --git a/x11/fltk/distinfo b/x11/fltk/distinfo
index cad60897c1c..f60df587fe9 100644
--- a/x11/fltk/distinfo
+++ b/x11/fltk/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.19 2010/04/09 13:35:41 obache Exp $
+$NetBSD: distinfo,v 1.20 2011/01/14 11:08:20 wiz Exp $
SHA1 (fltk-1.1.10-source.tar.bz2) = 0d2b34fede91fa78eeaefb893dd70282f73908a8
RMD160 (fltk-1.1.10-source.tar.bz2) = f8fc4371811efcc0d6fc73edd0525d8ff87a4faa
@@ -10,3 +10,4 @@ SHA1 (patch-ad) = b04051b14eb0bc74e8ccfe762e367ab8ccb11b80
SHA1 (patch-ae) = de29d1be1219c3b17707216a7c54c25a9adb746c
SHA1 (patch-af) = 791ba33cfc85e41e0f2b75ce0d1b0d6a378d9d0b
SHA1 (patch-ag) = aaeb376acf79b695e8376e7610534d125dff6a86
+SHA1 (patch-ah) = c364ae737ce83421ec8352485341009e98299ce2
diff --git a/x11/fltk/patches/patch-ah b/x11/fltk/patches/patch-ah
new file mode 100644
index 00000000000..59784427673
--- /dev/null
+++ b/x11/fltk/patches/patch-ah
@@ -0,0 +1,49 @@
+$NetBSD: patch-ah,v 1.4 2011/01/14 11:08:20 wiz Exp $
+
+Fix build with png-1.5.
+
+--- src/Fl_PNG_Image.cxx.orig 2006-06-09 16:16:34.000000000 +0000
++++ src/Fl_PNG_Image.cxx
+@@ -75,7 +75,7 @@ Fl_PNG_Image::Fl_PNG_Image(const char *p
+ pp = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
+ info = png_create_info_struct(pp);
+
+- if (setjmp(pp->jmpbuf))
++ if (setjmp(png_jmpbuf(pp)))
+ {
+ Fl::warning("PNG file \"%s\" contains errors!\n", png);
+ return;
+@@ -87,27 +87,21 @@ Fl_PNG_Image::Fl_PNG_Image(const char *p
+ // Get the image dimensions and convert to grayscale or RGB...
+ png_read_info(pp, info);
+
+- if (info->color_type == PNG_COLOR_TYPE_PALETTE)
++ if (png_get_color_type(pp, info) == PNG_COLOR_TYPE_PALETTE)
+ png_set_expand(pp);
+
+- if (info->color_type & PNG_COLOR_MASK_COLOR)
+- channels = 3;
+- else
+- channels = 1;
++ channels = png_get_channels(pp, info);
+
+- if ((info->color_type & PNG_COLOR_MASK_ALPHA) || info->num_trans)
+- channels ++;
+-
+- w((int)(info->width));
+- h((int)(info->height));
++ w((int)(png_get_image_width(pp, info)));
++ h((int)(png_get_image_height(pp, info)));
+ d(channels);
+
+- if (info->bit_depth < 8)
++ if (png_get_bit_depth(pp, info) < 8)
+ {
+ png_set_packing(pp);
+ png_set_expand(pp);
+ }
+- else if (info->bit_depth == 16)
++ else if (png_get_bit_depth(pp, info) == 16)
+ png_set_strip_16(pp);
+
+ # if defined(HAVE_PNG_GET_VALID) && defined(HAVE_PNG_SET_TRNS_TO_ALPHA)