summaryrefslogtreecommitdiff
path: root/emulators
diff options
context:
space:
mode:
authorwiz <wiz@pkgsrc.org>2011-06-20 09:28:06 +0000
committerwiz <wiz@pkgsrc.org>2011-06-20 09:28:06 +0000
commit0ac99c6f3e4c136a1becd65c31e9a75ffb804ab2 (patch)
tree302edba8deb4b11e20fc59325011bfcda0040aa9 /emulators
parent99cea99ec864d8b18e6fb571976e86e07bfa687e (diff)
downloadpkgsrc-0ac99c6f3e4c136a1becd65c31e9a75ffb804ab2.tar.gz
Fix build with png-1.5.
Diffstat (limited to 'emulators')
-rw-r--r--emulators/openmsx/distinfo5
-rw-r--r--emulators/openmsx/patches/patch-src_video_ScreenShotSaver.cc43
2 files changed, 46 insertions, 2 deletions
diff --git a/emulators/openmsx/distinfo b/emulators/openmsx/distinfo
index ca2374f7a20..c56996d6203 100644
--- a/emulators/openmsx/distinfo
+++ b/emulators/openmsx/distinfo
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.6 2007/05/19 01:24:26 xtraeme Exp $
+$NetBSD: distinfo,v 1.7 2011/06/20 09:28:06 wiz Exp $
SHA1 (openmsx-0.6.2.tar.gz) = b9e2f1bf13f193618f35c0fd6820c2bd44088870
RMD160 (openmsx-0.6.2.tar.gz) = b800499248ee43de8007042d4dd0a4523f464833
Size (openmsx-0.6.2.tar.gz) = 1934469 bytes
-SHA1 (patch-aa) = 19ae367cb8337ac647f4a0ae69bfc8a4cf8da79b
+SHA1 (patch-aa) = aadad14af76af2dc97dbb3f0ab4b1b5bda4be8c1
+SHA1 (patch-src_video_ScreenShotSaver.cc) = 84175620949c2f781565bdc5e2e864b24afd4549
diff --git a/emulators/openmsx/patches/patch-src_video_ScreenShotSaver.cc b/emulators/openmsx/patches/patch-src_video_ScreenShotSaver.cc
new file mode 100644
index 00000000000..a1468c8ff3a
--- /dev/null
+++ b/emulators/openmsx/patches/patch-src_video_ScreenShotSaver.cc
@@ -0,0 +1,43 @@
+$NetBSD: patch-src_video_ScreenShotSaver.cc,v 1.1 2011/06/20 09:28:06 wiz Exp $
+
+Fix build with png-1.5.
+
+--- src/video/ScreenShotSaver.cc.orig 2007-04-14 21:25:30.000000000 +0000
++++ src/video/ScreenShotSaver.cc
+@@ -31,7 +31,7 @@ static bool IMG_SavePNG_RW(int width, in
+ // Couldn't allocate memory for PNG file
+ goto error;
+ }
+- png_ptr->io_ptr = fp;
++ png_init_io(png_ptr, fp);
+
+ // Allocate/initialize the image information data. REQUIRED
+ info_ptr = png_create_info_struct(png_ptr);
+@@ -41,7 +41,7 @@ static bool IMG_SavePNG_RW(int width, in
+ }
+
+ // Set error handling.
+- if (setjmp(png_ptr->jmpbuf)) {
++ if (setjmp(png_jmpbuf(png_ptr))) {
+ // Error writing the PNG file
+ goto error;
+ }
+@@ -78,18 +78,12 @@ static bool IMG_SavePNG_RW(int width, in
+ png_write_image(png_ptr, row_pointers);
+ png_write_end(png_ptr, info_ptr);
+
+- if (info_ptr->palette) {
+- free(info_ptr->palette);
+- }
+ png_destroy_write_struct(&png_ptr, &info_ptr);
+
+ fclose(fp);
+ return true;
+
+ error:
+- if (info_ptr->palette) {
+- free(info_ptr->palette);
+- }
+ png_destroy_write_struct(&png_ptr, &info_ptr);
+
+ fclose(fp);