summaryrefslogtreecommitdiff
path: root/print
diff options
context:
space:
mode:
authorobache <obache@pkgsrc.org>2014-05-25 07:49:13 +0000
committerobache <obache@pkgsrc.org>2014-05-25 07:49:13 +0000
commitf639d0f5c17ca22b4c85cce7e4271897ecb5cf78 (patch)
tree96d55cf80c9635fea8b4f809ee6ffb8aaf1bab87 /print
parentf51951de721ee61bf11498d55588390c9e0767da (diff)
downloadpkgsrc-f639d0f5c17ca22b4c85cce7e4271897ecb5cf78.tar.gz
Adapt to giflib-5.1 API change, and fixes error handling introduced in
giflib-5.0 patch.
Diffstat (limited to 'print')
-rw-r--r--print/img2eps/distinfo4
-rw-r--r--print/img2eps/patches/patch-src_im__gif.c41
2 files changed, 28 insertions, 17 deletions
diff --git a/print/img2eps/distinfo b/print/img2eps/distinfo
index 7ac707d8100..a9146aa2ea2 100644
--- a/print/img2eps/distinfo
+++ b/print/img2eps/distinfo
@@ -1,8 +1,8 @@
-$NetBSD: distinfo,v 1.6 2013/08/17 11:17:48 joerg Exp $
+$NetBSD: distinfo,v 1.7 2014/05/25 07:49:13 obache Exp $
SHA1 (img2eps-0.2.tar.gz) = 0b62efba9ffdf1b9420e29ea9de928e5e8d9abaf
RMD160 (img2eps-0.2.tar.gz) = 5113a3cd22bcc2ae1562a45bfdd21c2ef0151e70
Size (img2eps-0.2.tar.gz) = 404286 bytes
SHA1 (patch-aa) = 027c6981b1b3188897af0a09bf0ce0119763316d
SHA1 (patch-ab) = 460228a99267234c7a2ad297a27cc04c78e6953e
-SHA1 (patch-src_im__gif.c) = 20c10128b82af8aaa4c7fa46abc1316c0e0a61d7
+SHA1 (patch-src_im__gif.c) = 8894bf1595e8749fb1fab2fb73ff95ecaf3a62d7
diff --git a/print/img2eps/patches/patch-src_im__gif.c b/print/img2eps/patches/patch-src_im__gif.c
index 37e9381923f..2afdc2d02f9 100644
--- a/print/img2eps/patches/patch-src_im__gif.c
+++ b/print/img2eps/patches/patch-src_im__gif.c
@@ -1,39 +1,50 @@
-$NetBSD: patch-src_im__gif.c,v 1.1 2013/08/17 11:17:48 joerg Exp $
+$NetBSD: patch-src_im__gif.c,v 1.2 2014/05/25 07:49:13 obache Exp $
---- src/im_gif.c.orig 2013-08-15 18:22:38.000000000 +0000
+* giflib>=5.0 API change
+
+--- src/im_gif.c.orig 2005-01-04 19:18:57.000000000 +0000
+++ src/im_gif.c
-@@ -71,6 +71,7 @@ struct image_gif {
- IMAGE_DECLARE(gif);
-
- static const char *_errstr(int err);
-+static int giferror;
-
-
-
-@@ -80,7 +81,7 @@ gif_close(image_gif *im)
+@@ -77,10 +77,12 @@ static const char *_errstr(int err);
+ void
+ gif_close(image_gif *im)
+ {
++ int giferror;
++
free(im->pal);
- if (DGifCloseFile(im->gif) != GIF_OK)
+- if (DGifCloseFile(im->gif) != GIF_OK)
- throwf(EIO, "error closing: %s", _errstr(GifLastError()));
++ if (DGifCloseFile(im->gif, &giferror) != GIF_OK)
+ throwf(EIO, "error closing: %s", _errstr(giferror));
image_free((image *)im);
}
-@@ -116,7 +117,7 @@ gif_open(char *fname)
+@@ -115,8 +117,9 @@ gif_open(char *fname)
+ image_gif *im;
GifFileType *gif;
exception ex;
++ int giferror;
- if ((gif=DGifOpenFileName(fname)) == NULL)
+ if ((gif=DGifOpenFileName(fname, &giferror)) == NULL)
return NULL;
if (catch(&ex) == 0) {
-@@ -196,7 +197,7 @@ gif_read_start(image_gif *im)
+@@ -124,7 +127,7 @@ gif_open(char *fname)
+ drop();
+ }
+ else {
+- DGifCloseFile(im->gif);
++ DGifCloseFile(im->gif, NULL);
+ throw(&ex);
+ }
+
+@@ -196,7 +199,7 @@ gif_read_start(image_gif *im)
if (DGifSlurp(im->gif) != GIF_OK)
throwf(EIO, "error reading image: %s",
- _errstr(GifLastError()));
-+ _errstr(giferror));
++ _errstr(im->gif->Error));
if (im->gif->ImageCount != 1)
throws(EOPNOTSUPP, "multi-image GIFs not supported");