diff options
author | wiz <wiz> | 2011-01-31 23:52:18 +0000 |
---|---|---|
committer | wiz <wiz> | 2011-01-31 23:52:18 +0000 |
commit | e472710ff832c9091b7ad7e231113815e0ce3536 (patch) | |
tree | 5999a5df58b7c697f9c2dc0e3b68820ec8475d7c | |
parent | 928f881a6bc6b5239cd3761d80244ac7be67769b (diff) | |
download | pkgsrc-e472710ff832c9091b7ad7e231113815e0ce3536.tar.gz |
Fix build with png-1.5.
-rw-r--r-- | audio/timidity/distinfo | 3 | ||||
-rw-r--r-- | audio/timidity/patches/patch-interface_x__sherry.c | 59 | ||||
-rw-r--r-- | games/enigma/distinfo | 3 | ||||
-rw-r--r-- | games/enigma/patches/patch-lib-src_enigma-core_IMG__SavePNG.c | 15 |
4 files changed, 78 insertions, 2 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)) diff --git a/games/enigma/distinfo b/games/enigma/distinfo index 9989d7841ee..6c538aa3a60 100644 --- a/games/enigma/distinfo +++ b/games/enigma/distinfo @@ -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 --git a/games/enigma/patches/patch-lib-src_enigma-core_IMG__SavePNG.c b/games/enigma/patches/patch-lib-src_enigma-core_IMG__SavePNG.c new file mode 100644 index 00000000000..0ba04e90e66 --- /dev/null +++ b/games/enigma/patches/patch-lib-src_enigma-core_IMG__SavePNG.c @@ -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 { |