summaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorwiz <wiz@pkgsrc.org>2011-01-14 10:02:53 +0000
committerwiz <wiz@pkgsrc.org>2011-01-14 10:02:53 +0000
commit5698b547dae1d04bea25bd7f86804d15724f99e1 (patch)
tree4d233b7ba0ed8b088f9e703eadff79faaa416f1d /graphics
parent50f1efde263f8a568323caa519633a215762f678 (diff)
downloadpkgsrc-5698b547dae1d04bea25bd7f86804d15724f99e1.tar.gz
Fix build with png-1.5. From John Bowler.
Diffstat (limited to 'graphics')
-rw-r--r--graphics/imlib2/distinfo3
-rw-r--r--graphics/imlib2/patches/patch-af76
2 files changed, 78 insertions, 1 deletions
diff --git a/graphics/imlib2/distinfo b/graphics/imlib2/distinfo
index c3156f2b8f8..028d80c5a0d 100644
--- a/graphics/imlib2/distinfo
+++ b/graphics/imlib2/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.23 2008/11/23 18:41:16 tron Exp $
+$NetBSD: distinfo,v 1.24 2011/01/14 10:02:53 wiz Exp $
SHA1 (imlib2-1.4.2.tar.gz) = 769ea1da26774cd7531d1d66432cf8d7d7b30c2b
RMD160 (imlib2-1.4.2.tar.gz) = 9b1f40ee392c1e27c6a75bbf7e8c7fb379e74695
@@ -8,4 +8,5 @@ SHA1 (patch-ab) = 47f0165c3a4abfc6de1078768104b8e2acd2e9b5
SHA1 (patch-ac) = bd81a8f1dfaacb43a4f62a187c4d00c43be5a7e3
SHA1 (patch-ad) = adf301fe0179aa1ab05fc54bb7ab706ee97ab7a7
SHA1 (patch-ae) = 6503e4cbc9bbb93f971ab2ae9fd7d50ddee9e0e8
+SHA1 (patch-af) = 9ee80e6dac9cc182ac847ac0b8c215352ee99290
SHA1 (patch-cb) = da837b92a1a4cfd139fe2d9ed319d1cd6e0fb703
diff --git a/graphics/imlib2/patches/patch-af b/graphics/imlib2/patches/patch-af
new file mode 100644
index 00000000000..d5ba9672d0b
--- /dev/null
+++ b/graphics/imlib2/patches/patch-af
@@ -0,0 +1,76 @@
+$NetBSD: patch-af,v 1.4 2011/01/14 10:02:54 wiz Exp $
+
+Fix build with png-1.5.
+
+--- src/modules/loaders/loader_png.c.orig 2010-02-08 00:29:06.000000000 -0800
++++ src/modules/loaders/loader_png.c 2010-02-08 00:34:14.000000000 -0800
+@@ -58,7 +58,7 @@
+ fclose(f);
+ return 0;
+ }
+- if (setjmp(png_ptr->jmpbuf))
++ if (setjmp(png_jmpbuf(png_ptr)))
+ {
+ png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
+ fclose(f);
+@@ -238,7 +238,7 @@
+ png_structp png_ptr;
+ png_infop info_ptr;
+ DATA32 *ptr;
+- int x, y, j;
++ int x, y, j, interlace;
+ png_bytep row_ptr, data = NULL;
+ png_color_8 sig_bit;
+ int pl = 0;
+@@ -265,7 +265,7 @@
+ png_destroy_write_struct(&png_ptr, (png_infopp) NULL);
+ return 0;
+ }
+- if (setjmp(png_ptr->jmpbuf))
++ if (setjmp(png_jmpbuf(png_ptr)))
+ {
+ fclose(f);
+ png_destroy_write_struct(&png_ptr, (png_infopp) & info_ptr);
+@@ -274,11 +274,11 @@
+ }
+
+ /* check whether we should use interlacing */
++ interlace = PNG_INTERLACE_NONE;
+ if ((tag = __imlib_GetTag(im, "interlacing")) && tag->val)
+ {
+ #ifdef PNG_WRITE_INTERLACING_SUPPORTED
+- png_ptr->interlaced = PNG_INTERLACE_ADAM7;
+- num_passes = png_set_interlace_handling(png_ptr);
++ interlace = PNG_INTERLACE_ADAM7;
+ #endif
+ }
+
+@@ -286,7 +286,7 @@
+ if (im->flags & F_HAS_ALPHA)
+ {
+ png_set_IHDR(png_ptr, info_ptr, im->w, im->h, 8,
+- PNG_COLOR_TYPE_RGB_ALPHA, png_ptr->interlaced,
++ PNG_COLOR_TYPE_RGB_ALPHA, interlace,
+ PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE);
+ #ifdef WORDS_BIGENDIAN
+ png_set_swap_alpha(png_ptr);
+@@ -297,7 +297,7 @@
+ else
+ {
+ png_set_IHDR(png_ptr, info_ptr, im->w, im->h, 8, PNG_COLOR_TYPE_RGB,
+- png_ptr->interlaced, PNG_COMPRESSION_TYPE_BASE,
++ interlace, PNG_COMPRESSION_TYPE_BASE,
+ PNG_FILTER_TYPE_BASE);
+ data = malloc(im->w * 3 * sizeof(char));
+ }
+@@ -344,6 +344,10 @@
+ png_set_shift(png_ptr, &sig_bit);
+ png_set_packing(png_ptr);
+
++#ifdef PNG_WRITE_INTERLACING_SUPPORTED
++ num_passes = png_set_interlace_handling(png_ptr);
++#endif
++
+ for (pass = 0; pass < num_passes; pass++)
+ {
+ ptr = im->data;