summaryrefslogtreecommitdiff
path: root/graphics/ploticus
diff options
context:
space:
mode:
authorwiz <wiz>2011-04-03 11:58:22 +0000
committerwiz <wiz>2011-04-03 11:58:22 +0000
commit215666530977be7299578ccc24ba4ba19f5c02d5 (patch)
treefe92f2e6c632c2ae30747c205918bfc6b6db9c89 /graphics/ploticus
parenta95937a0f79f67f1989eeda207467d7ffd879ec0 (diff)
downloadpkgsrc-215666530977be7299578ccc24ba4ba19f5c02d5.tar.gz
Fix build with png-1.5.
Diffstat (limited to 'graphics/ploticus')
-rw-r--r--graphics/ploticus/distinfo3
-rw-r--r--graphics/ploticus/patches/patch-gd__png.c33
2 files changed, 35 insertions, 1 deletions
diff --git a/graphics/ploticus/distinfo b/graphics/ploticus/distinfo
index 0860b984194..bdc575556bd 100644
--- a/graphics/ploticus/distinfo
+++ b/graphics/ploticus/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.11 2006/08/22 20:52:49 jdc Exp $
+$NetBSD: distinfo,v 1.12 2011/04/03 11:58:22 wiz Exp $
SHA1 (pl231src.tar.gz) = 9b7219acb31231efcf1200ad586e526814ae8283
RMD160 (pl231src.tar.gz) = 379e6c3d2d6482cda2a76726c439b4e6f5395b1f
@@ -9,3 +9,4 @@ SHA1 (patch-ba) = 69043093a1a77e14b776e3166eb874a508ae11d7
SHA1 (patch-bb) = cd27de0c5c9d20d7909e0e3b7c0d8d0c662b232f
SHA1 (patch-bc) = eafd9ec5a0c7856a208df17a0a45e547239b66ac
SHA1 (patch-bd) = 7f269658b3eefdc26b36b395f657168dac8c25f4
+SHA1 (patch-gd__png.c) = cf5cd60d4ce7e8dbd95b40c2684e5f784075682c
diff --git a/graphics/ploticus/patches/patch-gd__png.c b/graphics/ploticus/patches/patch-gd__png.c
new file mode 100644
index 00000000000..f983044d06e
--- /dev/null
+++ b/graphics/ploticus/patches/patch-gd__png.c
@@ -0,0 +1,33 @@
+$NetBSD: patch-gd__png.c,v 1.1 2011/04/03 11:58:22 wiz Exp $
+
+Fix build with png-1.5.
+
+--- gd_png.c.orig 1999-07-29 23:25:50.000000000 +0000
++++ gd_png.c
+@@ -265,7 +265,7 @@ gdImagePtr gdImageCreateFromPngCtx(gdIOC
+ png_color_16p histogram;
+
+ png_get_hIST(png_ptr, info_ptr, &histogram);
+- png_set_dither(png_ptr, palette, num_palette,
++ png_set_quantize(png_ptr, palette, num_palette,
+ max_screen_colors, histogram, 1);
+ } else
+ #endif
+@@ -291,7 +291,7 @@ gdImagePtr gdImageCreateFromPngCtx(gdIOC
+ palette[2].red = palette[2].green = palette[2].blue = 128;
+ palette[3].red = palette[3].green = palette[3].blue = 64;
+ /* final argument (full_dither) *must* be 1: */
+- png_set_dither(png_ptr, palette, 256, 256, NULL, 1);
++ png_set_quantize(png_ptr, palette, 256, 256, NULL, 1);
+ #else
+ /* allocate a 6x6x6 color cube, starting at index 0 or 1 */
+ idx = (transparent < 0)? 0 : 1;
+@@ -305,7 +305,7 @@ gdImagePtr gdImageCreateFromPngCtx(gdIOC
+ }
+ }
+ }
+- png_set_dither(png_ptr, palette, idx, idx, NULL, 1);
++ png_set_quantize(png_ptr, palette, idx, idx, NULL, 1);
+ #endif
+ }
+ break;