summaryrefslogtreecommitdiff
path: root/audio/timidity
diff options
context:
space:
mode:
authorwiz <wiz>2011-01-31 23:52:18 +0000
committerwiz <wiz>2011-01-31 23:52:18 +0000
commitcf588e384a728ac77f53872f8a6606dc04165e7d (patch)
tree5999a5df58b7c697f9c2dc0e3b68820ec8475d7c /audio/timidity
parentbecea42713b522118a4104db136d2e29f6f4e2b7 (diff)
downloadpkgsrc-cf588e384a728ac77f53872f8a6606dc04165e7d.tar.gz
Fix build with png-1.5.
Diffstat (limited to 'audio/timidity')
-rw-r--r--audio/timidity/distinfo3
-rw-r--r--audio/timidity/patches/patch-interface_x__sherry.c59
2 files changed, 61 insertions, 1 deletions
diff --git a/audio/timidity/distinfo b/audio/timidity/distinfo
index 5aa39d9cab5..9a94c3282be 100644
--- a/audio/timidity/distinfo
+++ b/audio/timidity/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.14 2009/04/10 18:45:15 wiz Exp $
+$NetBSD: distinfo,v 1.15 2011/01/31 23:52:18 wiz Exp $
SHA1 (TiMidity++-2.13.2.tar.bz2) = 8e603146e1164335303a5ac5dff291f369241b4e
RMD160 (TiMidity++-2.13.2.tar.bz2) = 0156221846a88abef9312700a050972d85084fd8
@@ -7,3 +7,4 @@ SHA1 (patch-aa) = 14151d3b036eac740bca40c97a0eff7de059514d
SHA1 (patch-ab) = 7bd5c12448970131ee31e16de5952b11a093da23
SHA1 (patch-ac) = 56e738ef60dc8040d27bb50722ed5e0294d343e4
SHA1 (patch-ae) = 3f55ea58e91bd97ff42fbe67e8c89514c29aa2e9
+SHA1 (patch-interface_x__sherry.c) = 4a52bfebf3047438ab10b19eafeb1464769f8f8a
diff --git a/audio/timidity/patches/patch-interface_x__sherry.c b/audio/timidity/patches/patch-interface_x__sherry.c
new file mode 100644
index 00000000000..b355ae2942d
--- /dev/null
+++ b/audio/timidity/patches/patch-interface_x__sherry.c
@@ -0,0 +1,59 @@
+$NetBSD: patch-interface_x__sherry.c,v 1.1 2011/01/31 23:52:19 wiz Exp $
+
+Fix build with png-1.5. PLTE part in original code is a bit unclear
+in purpose.
+
+--- interface/x_sherry.c.orig 2002-07-14 21:19:32.000000000 +0000
++++ interface/x_sherry.c
+@@ -782,7 +782,7 @@ static void sry_pal_v2r(uint8 *data)
+ static void png_read_func(png_structp png_ptr, char *buff, size_t n)
+ {
+ struct timidity_file *tf;
+- tf = (struct timidity_file *)png_ptr->io_ptr;
++ tf = (struct timidity_file *)png_get_io_ptr(png_ptr);
+ tf_read(buff, 1, n, tf);
+ }
+
+@@ -815,6 +815,7 @@ static void sry_load_png(uint8 *data)
+ int transParent;
+ int numTrans;
+ png_color_16p transValues;
++ png_color stdColorCube[6*7*6];
+
+ numPalette = -1;
+ memset(&palette, 0, sizeof(palette));
+@@ -909,7 +910,7 @@ static void sry_load_png(uint8 *data)
+ {
+ if(png_get_valid(pngPtr, infoPtr, PNG_INFO_hIST))
+ png_get_hIST(pngPtr, infoPtr, &hist);
+- png_set_dither(pngPtr, palette,
++ png_set_quantize(pngPtr, palette,
+ numPalette, MAX_SCREEN_COLORS, hist, 1);
+ }
+ }
+@@ -918,7 +919,6 @@ static void sry_load_png(uint8 *data)
+ /* XXX */
+ /* NOTE 6*7*6 = 252 */
+ /* 6*7*6 = 5*7*6 + 6*6 + 6 */
+- png_color stdColorCube[6*7*6];
+ png_byte r, g, b;
+
+ for(r = 0; r < 6; r++)
+@@ -934,13 +934,13 @@ static void sry_load_png(uint8 *data)
+ }
+ }
+ }
+- png_set_dither(pngPtr, stdColorCube,
++ png_set_quantize(pngPtr, stdColorCube,
+ 6*7*6, MAX_SCREEN_COLORS,
+ NULL, 1);
+ /*???*/
+- png_set_PLTE(pngPtr, infoPtr, pngPtr->palette, pngPtr->num_palette);
+- palette = pngPtr->palette;
+- numPalette = pngPtr->num_palette;
++ png_set_PLTE(pngPtr, infoPtr, stdColorCube, 6*7*6);
++ palette = stdColorCube;
++ numPalette = 6*7*6;
+ }
+
+ if(png_get_valid(pngPtr, infoPtr, PNG_INFO_tRNS))