pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc Fix build with png-1.5.
details: https://anonhg.NetBSD.org/pkgsrc/rev/4ec3be65ab8a
branches: trunk
changeset: 584860:4ec3be65ab8a
user: wiz <wiz%pkgsrc.org@localhost>
date: Mon Jan 31 23:52:18 2011 +0000
description:
Fix build with png-1.5.
diffstat:
audio/timidity/distinfo | 3 +-
audio/timidity/patches/patch-interface_x__sherry.c | 59 +++++++++++
games/enigma/distinfo | 3 +-
games/enigma/patches/patch-lib-src_enigma-core_IMG__SavePNG.c | 15 ++
4 files changed, 78 insertions(+), 2 deletions(-)
diffs (109 lines):
diff -r b0c1b541c1fe -r 4ec3be65ab8a audio/timidity/distinfo
--- a/audio/timidity/distinfo Mon Jan 31 23:46:57 2011 +0000
+++ b/audio/timidity/distinfo Mon Jan 31 23:52:18 2011 +0000
@@ -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-ab) = 7bd5c12448970131ee31e16de5952b11a093da23
SHA1 (patch-ac) = 56e738ef60dc8040d27bb50722ed5e0294d343e4
SHA1 (patch-ae) = 3f55ea58e91bd97ff42fbe67e8c89514c29aa2e9
+SHA1 (patch-interface_x__sherry.c) = 4a52bfebf3047438ab10b19eafeb1464769f8f8a
diff -r b0c1b541c1fe -r 4ec3be65ab8a audio/timidity/patches/patch-interface_x__sherry.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/timidity/patches/patch-interface_x__sherry.c Mon Jan 31 23:52:18 2011 +0000
@@ -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))
diff -r b0c1b541c1fe -r 4ec3be65ab8a games/enigma/distinfo
--- a/games/enigma/distinfo Mon Jan 31 23:46:57 2011 +0000
+++ b/games/enigma/distinfo Mon Jan 31 23:52:18 2011 +0000
@@ -1,7 +1,8 @@
-$NetBSD: distinfo,v 1.8 2009/06/05 07:04:11 hasso Exp $
+$NetBSD: distinfo,v 1.9 2011/02/01 00:08:48 wiz Exp $
SHA1 (enigma-1.01.tar.gz) = 93f96ddd152e7474488cbb27ce0923312a851a9c
RMD160 (enigma-1.01.tar.gz) = 9dd91152cfced5352a669e8921fdbb270c0abc4e
Size (enigma-1.01.tar.gz) = 10847953 bytes
SHA1 (patch-aa) = c0a337a1d1098815812e117f5ca49d9ed248a446
SHA1 (patch-aq) = 113580c3063cdfa11ee212f922edd5b40f229eea
+SHA1 (patch-lib-src_enigma-core_IMG__SavePNG.c) = 7377498a9be1425cb7c683147b37ceb894a305c8
diff -r b0c1b541c1fe -r 4ec3be65ab8a games/enigma/patches/patch-lib-src_enigma-core_IMG__SavePNG.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/games/enigma/patches/patch-lib-src_enigma-core_IMG__SavePNG.c Mon Jan 31 23:52:18 2011 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-lib-src_enigma-core_IMG__SavePNG.c,v 1.1 2011/02/01 00:08:48 wiz Exp $
+
+Fix build with png-1.5.
+
+--- lib-src/enigma-core/IMG_SavePNG.c.orig 2005-11-24 23:17:06.000000000 +0000
++++ lib-src/enigma-core/IMG_SavePNG.c
+@@ -84,7 +84,7 @@ int IMG_SavePNG_RW(SDL_Surface *face, SD
+ png_bytep *row_pointers = 0;
+
+ /* Set error handling. */
+- if (setjmp(png_ptr->jmpbuf)) {
++ if (setjmp(png_jmpbuf(png_ptr))) {
+ IMG_SetError("Error writing the PNG file");
+ }
+ else {
Home |
Main Index |
Thread Index |
Old Index