diff options
-rw-r--r-- | games/eboard/distinfo | 3 | ||||
-rw-r--r-- | games/eboard/patches/patch-cimg.cc | 26 |
2 files changed, 28 insertions, 1 deletions
diff --git a/games/eboard/distinfo b/games/eboard/distinfo index 73bcba3420f..1a1858e8c15 100644 --- a/games/eboard/distinfo +++ b/games/eboard/distinfo @@ -1,5 +1,6 @@ -$NetBSD: distinfo,v 1.5 2008/02/06 08:53:29 rillig Exp $ +$NetBSD: distinfo,v 1.6 2011/04/03 10:35:58 wiz Exp $ SHA1 (eboard-1.0.4.tar.bz2) = 44938754140043fc64143e91067c95b6c5c99709 RMD160 (eboard-1.0.4.tar.bz2) = f12b0927ca848418eb45a75bcff8a641766ae33c Size (eboard-1.0.4.tar.bz2) = 453603 bytes +SHA1 (patch-cimg.cc) = 7a5b4652f9a2f0fdeacd442e5da7b71402046107 diff --git a/games/eboard/patches/patch-cimg.cc b/games/eboard/patches/patch-cimg.cc new file mode 100644 index 00000000000..71be2e052e8 --- /dev/null +++ b/games/eboard/patches/patch-cimg.cc @@ -0,0 +1,26 @@ +$NetBSD: patch-cimg.cc,v 1.1 2011/04/03 10:35:58 wiz Exp $ + +Fix build with png-1.5. + +--- cimg.cc.orig 2007-05-23 18:57:45.000000000 +0000 ++++ cimg.cc +@@ -95,16 +95,16 @@ CImg::CImg(const char *filename) { + ct == PNG_COLOR_TYPE_GRAY_ALPHA) + png_set_gray_to_rgb(pngp); + +- alloc(pngp->width,pngp->height); ++ alloc(png_get_image_width(pngp, infp),png_get_image_height(pngp, infp)); + if (!ok) { fclose(f); return; } + ok = 0; + +- rp = (png_bytep *) malloc(sizeof(png_bytep) * (pngp->height)); ++ rp = (png_bytep *) malloc(sizeof(png_bytep) * (png_get_image_height(pngp, infp))); + if (rp==NULL) { + fclose(f); return; + } + +- for(i=0;i<pngp->height;i++) { ++ for(i=0;i<png_get_image_height(pngp, infp);i++) { + png_read_row(pngp, (png_bytep) (&data[i*rowlen]), NULL); + } + |