summaryrefslogtreecommitdiff
path: root/emulators/vice
diff options
context:
space:
mode:
authorobache <obache@pkgsrc.org>2014-05-25 09:44:43 +0000
committerobache <obache@pkgsrc.org>2014-05-25 09:44:43 +0000
commit05cb945e6de66c56cc80cd8695183df7489aec02 (patch)
tree826ff06f332cb741fb77b700a68e261517d4f4ce /emulators/vice
parent5bdc920e92df5346d92f54e0b79c614d44c76575 (diff)
downloadpkgsrc-05cb945e6de66c56cc80cd8695183df7489aec02.tar.gz
Fixes build with giflib-5.1.
Diffstat (limited to 'emulators/vice')
-rw-r--r--emulators/vice/distinfo3
-rw-r--r--emulators/vice/patches/patch-src_gfxoutputdrv_gifdrv.c54
2 files changed, 56 insertions, 1 deletions
diff --git a/emulators/vice/distinfo b/emulators/vice/distinfo
index f742dd14334..7f54e17a13e 100644
--- a/emulators/vice/distinfo
+++ b/emulators/vice/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.41 2012/12/12 09:58:03 wiz Exp $
+$NetBSD: distinfo,v 1.42 2014/05/25 09:44:43 obache Exp $
SHA1 (vice-2.4.tar.gz) = 719aa96cc72e7578983fadea1a31c21898362bc7
RMD160 (vice-2.4.tar.gz) = 6ff3b4a410ef70aa135e2245e6855cfa63373e2c
@@ -6,3 +6,4 @@ Size (vice-2.4.tar.gz) = 13656511 bytes
SHA1 (patch-aa) = 7ecda5911a2dd0e7ef8676959d9dc021323d393f
SHA1 (patch-ab) = ab982bb762bebf56eb54859a38fe47b58d31ac67
SHA1 (patch-data_fonts_Makefile.in) = 89b2a57822f58242d8d325d467b54353cf230906
+SHA1 (patch-src_gfxoutputdrv_gifdrv.c) = 5c48a3c897ead6e28302ada42163cc35e63b6488
diff --git a/emulators/vice/patches/patch-src_gfxoutputdrv_gifdrv.c b/emulators/vice/patches/patch-src_gfxoutputdrv_gifdrv.c
new file mode 100644
index 00000000000..680d5e74109
--- /dev/null
+++ b/emulators/vice/patches/patch-src_gfxoutputdrv_gifdrv.c
@@ -0,0 +1,54 @@
+$NetBSD: patch-src_gfxoutputdrv_gifdrv.c,v 1.1 2014/05/25 09:44:43 obache Exp $
+
+* Fixes for giflib-5.1 API change
+
+--- src/gfxoutputdrv/gifdrv.c.orig 2012-07-25 23:46:05.000000000 +0000
++++ src/gfxoutputdrv/gifdrv.c
+@@ -49,6 +49,11 @@
+ #define VICE_MakeMapObject MakeMapObject
+ #define VICE_FreeMapObject FreeMapObject
+ #endif
++#if GIFLIB_MAJOR >= 5 && GIFLIB_MINOR >= 1 || GIFLIB_MAJOR > 5
++#define VICE_EGifCloseFile(x) EGifCloseFile(x, NULL)
++#else
++#define VICE_EGifCloseFile(x) EGifCloseFile(x)
++#endif
+
+ typedef struct gfxoutputdrv_data_s
+ {
+@@ -114,7 +119,7 @@ static int gifdrv_open(screenshot_t *scr
+ if (EGifPutScreenDesc(sdata->fd, screenshot->width, screenshot->height, 8, 0, gif_colors) == GIF_ERROR ||
+ EGifPutImageDesc(sdata->fd, 0, 0, screenshot->width, screenshot->height, 0, NULL) == GIF_ERROR)
+ {
+- EGifCloseFile(sdata->fd);
++ VICE_EGifCloseFile(sdata->fd);
+ VICE_FreeMapObject(gif_colors);
+ lib_free(sdata->data);
+ lib_free(sdata->ext_filename);
+@@ -145,7 +150,7 @@ static int gifdrv_close(screenshot_t *sc
+
+ sdata = screenshot->gfxoutputdrv_data;
+
+- EGifCloseFile(sdata->fd);
++ VICE_EGifCloseFile(sdata->fd);
+ VICE_FreeMapObject(gif_colors);
+
+ /* for some reason giflib will create a file with unexpected
+@@ -184,7 +189,7 @@ static char *gifdrv_memmap_ext_filename;
+
+ static int gifdrv_close_memmap(void)
+ {
+- EGifCloseFile(gifdrv_memmap_fd);
++ VICE_EGifCloseFile(gifdrv_memmap_fd);
+ VICE_FreeMapObject(gif_colors);
+ lib_free(gifdrv_memmap_ext_filename);
+
+@@ -231,7 +236,7 @@ static int gifdrv_open_memmap(const char
+ if (EGifPutScreenDesc(gifdrv_memmap_fd, x_size, y_size, 8, 0, gif_colors) == GIF_ERROR ||
+ EGifPutImageDesc(gifdrv_memmap_fd, 0, 0, x_size, y_size, 0, NULL) == GIF_ERROR)
+ {
+- EGifCloseFile(gifdrv_memmap_fd);
++ VICE_EGifCloseFile(gifdrv_memmap_fd);
+ VICE_FreeMapObject(gif_colors);
+ lib_free(gifdrv_memmap_ext_filename);
+ return -1;