diff options
author | wiz <wiz> | 2011-04-03 11:27:24 +0000 |
---|---|---|
committer | wiz <wiz> | 2011-04-03 11:27:24 +0000 |
commit | 7a7d84da3bf54fd5f21a7a46759c9677ae97c2c6 (patch) | |
tree | 5cfcd52116f4ed491633a1e616063838e2c17983 /games | |
parent | b59048c7386edc2c607c867fe4142ce54b187f08 (diff) | |
download | pkgsrc-7a7d84da3bf54fd5f21a7a46759c9677ae97c2c6.tar.gz |
Fix build with png-1.5.
Diffstat (limited to 'games')
-rw-r--r-- | games/warzone2100/distinfo | 3 | ||||
-rw-r--r-- | games/warzone2100/patches/patch-lib_ivis__common_png__util.c | 29 |
2 files changed, 31 insertions, 1 deletions
diff --git a/games/warzone2100/distinfo b/games/warzone2100/distinfo index 42154aec874..ebbe8b50e86 100644 --- a/games/warzone2100/distinfo +++ b/games/warzone2100/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.4 2009/08/26 17:36:45 hasso Exp $ +$NetBSD: distinfo,v 1.5 2011/04/03 11:27:24 wiz Exp $ SHA1 (warzone2100-2.2.2.tar.gz) = d61bd1a87f0a6c1184c640987f759b1ac702b9e1 RMD160 (warzone2100-2.2.2.tar.gz) = d7af614267acdb548fcbe5f78ed46e8c4d6f33de @@ -10,3 +10,4 @@ SHA1 (patch-ad) = af29beef3b2014bf1b3d1068b2b3caa7d948de80 SHA1 (patch-ae) = 9a5f2fccd93100e87968d2dc9d783acc595ad5d3 SHA1 (patch-af) = 46ea523fb72ed0f081d85dfea0813fde79087c82 SHA1 (patch-ag) = 2604a894e8579377f4b3ac8eae7250ed2c73a21c +SHA1 (patch-lib_ivis__common_png__util.c) = 6a0ac9f5a29d431041af01c1d5acbb6fdbb919fe diff --git a/games/warzone2100/patches/patch-lib_ivis__common_png__util.c b/games/warzone2100/patches/patch-lib_ivis__common_png__util.c new file mode 100644 index 00000000000..ba46faf8f69 --- /dev/null +++ b/games/warzone2100/patches/patch-lib_ivis__common_png__util.c @@ -0,0 +1,29 @@ +$NetBSD: patch-lib_ivis__common_png__util.c,v 1.1 2011/04/03 11:27:25 wiz Exp $ + +Fix build with png-1.5. + +--- lib/ivis_common/png_util.c.orig 2009-08-23 04:05:11.000000000 +0000 ++++ lib/ivis_common/png_util.c +@@ -153,16 +153,16 @@ BOOL iV_loadImage_PNG(const char *fileNa + + png_read_png(png_ptr, info_ptr, PNG_TRANSFORM_IDENTITY, NULL); + +- image->width = info_ptr->width; +- image->height = info_ptr->height; +- image->depth = info_ptr->channels; +- image->bmp = malloc(info_ptr->height * info_ptr->rowbytes); ++ image->width = png_get_image_width(png_ptr, info_ptr); ++ image->height = png_get_image_height(png_ptr, info_ptr); ++ image->depth = png_get_channels(png_ptr, info_ptr); ++ image->bmp = malloc(image->height * png_get_rowbytes(png_ptr, info_ptr)); + + { + unsigned int i = 0; + png_bytepp row_pointers = png_get_rows(png_ptr, info_ptr); +- for ( i = 0; i < info_ptr->height; i++ ) +- memcpy( image->bmp + (info_ptr->rowbytes * i), row_pointers[i], info_ptr->rowbytes ); ++ for ( i = 0; i < image->height; i++ ) ++ memcpy( image->bmp + (png_get_rowbytes(png_ptr, info_ptr) * i), row_pointers[i], png_get_rowbytes(png_ptr, info_ptr) ); + } + + PNGReadCleanup(&info_ptr, &png_ptr, fileHandle); |