diff options
author | wiz <wiz@pkgsrc.org> | 2011-04-03 11:20:46 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2011-04-03 11:20:46 +0000 |
commit | 78be1cb06514994e3e99178565802dbfad204f10 (patch) | |
tree | 08d07b4427ba9ab4cf34828b352e6cec0f6b0f6c /games | |
parent | bbb1fbca2373c87bd3fa4be71e1d3e90d87be4e1 (diff) | |
download | pkgsrc-78be1cb06514994e3e99178565802dbfad204f10.tar.gz |
Fix build with png-1.5.
Diffstat (limited to 'games')
-rw-r--r-- | games/scummvm-tools/distinfo | 3 | ||||
-rw-r--r-- | games/scummvm-tools/patches/patch-encode__dxa.cpp | 37 |
2 files changed, 39 insertions, 1 deletions
diff --git a/games/scummvm-tools/distinfo b/games/scummvm-tools/distinfo index 88cd1f0e219..10bcef79f61 100644 --- a/games/scummvm-tools/distinfo +++ b/games/scummvm-tools/distinfo @@ -1,6 +1,7 @@ -$NetBSD: distinfo,v 1.1.1.1 2006/07/02 09:47:44 dillo Exp $ +$NetBSD: distinfo,v 1.2 2011/04/03 11:20:46 wiz Exp $ SHA1 (scummvm-tools-0.9.0.tar.bz2) = c732c0706ae59fc26778ca3fc341dc3873370649 RMD160 (scummvm-tools-0.9.0.tar.bz2) = eb9f8cc348150ed9b7d952e99121f152fee5f06d Size (scummvm-tools-0.9.0.tar.bz2) = 116414 bytes SHA1 (patch-aa) = de4e3fb5e98acfcb58f1b07d083f78918138fff5 +SHA1 (patch-encode__dxa.cpp) = d96c5a16c8ab4ee000663e52434fb584beffaea9 diff --git a/games/scummvm-tools/patches/patch-encode__dxa.cpp b/games/scummvm-tools/patches/patch-encode__dxa.cpp new file mode 100644 index 00000000000..cacde7c5fe8 --- /dev/null +++ b/games/scummvm-tools/patches/patch-encode__dxa.cpp @@ -0,0 +1,37 @@ +$NetBSD: patch-encode__dxa.cpp,v 1.1 2011/04/03 11:20:47 wiz Exp $ + +Fix build with png-1.5. + +--- encode_dxa.cpp.orig 2006-06-21 21:11:51.000000000 +0000 ++++ encode_dxa.cpp +@@ -217,10 +217,10 @@ int read_png_file(char* filename, unsign + + png_read_info(png_ptr, info_ptr); + +- width = info_ptr->width; +- height = info_ptr->height; +- color_type = info_ptr->color_type; +- bit_depth = info_ptr->bit_depth; ++ width = png_get_image_width(png_ptr, info_ptr); ++ height = png_get_image_height(png_ptr, info_ptr); ++ color_type = png_get_color_type(png_ptr, info_ptr); ++ bit_depth = png_get_bit_depth(png_ptr, info_ptr); + + if (color_type != PNG_COLOR_TYPE_PALETTE) { + palette = NULL; +@@ -236,13 +236,13 @@ int read_png_file(char* filename, unsign + + row_pointers = (png_bytep*) malloc(sizeof(png_bytep) * height); + for (int y=0; y<height; y++) +- row_pointers[y] = (png_byte*) malloc(info_ptr->rowbytes); ++ row_pointers[y] = (png_byte*) malloc(png_get_rowbytes(png_ptr, info_ptr)); + + png_read_image(png_ptr, row_pointers); + + image = new unsigned char[width * height]; + for (int y=0; y<height; y++) +- memcpy(&image[y*width], row_pointers[y], info_ptr->rowbytes); ++ memcpy(&image[y*width], row_pointers[y], png_get_rowbytes(png_ptr, info_ptr)); + + for (int y=0; y<height; y++) + free(row_pointers[y]); |