summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--multimedia/ming/distinfo8
-rw-r--r--multimedia/ming/patches/patch-src_blocks_gifdbl.c24
-rw-r--r--multimedia/ming/patches/patch-src_libming.h31
-rw-r--r--multimedia/ming/patches/patch-util_gif2dbl.c30
-rw-r--r--multimedia/ming/patches/patch-util_gif2mask.c30
5 files changed, 120 insertions, 3 deletions
diff --git a/multimedia/ming/distinfo b/multimedia/ming/distinfo
index 7f648f734a3..22f86fe00db 100644
--- a/multimedia/ming/distinfo
+++ b/multimedia/ming/distinfo
@@ -1,8 +1,10 @@
-$NetBSD: distinfo,v 1.11 2013/06/14 09:00:19 obache Exp $
+$NetBSD: distinfo,v 1.12 2013/07/06 07:43:13 ryoon Exp $
SHA1 (ming-0.4.5.tar.gz) = 97c201040729917bf7c62da9616a87f4a920f473
RMD160 (ming-0.4.5.tar.gz) = 9ef9cf769a03c6e356dca299c85e06a2cdd6a155
Size (ming-0.4.5.tar.gz) = 15029578 bytes
SHA1 (patch-ae) = 614e322330d2d2ab1e0ef1beadf1395014ecd880
-SHA1 (patch-php__ext_ming.c) = 36cf34f63b6ccafd48b4035073c0a3d1d984f7b4
-SHA1 (patch-test_actionscript_ActionScriptTest.c) = 730ef68fb3e7714da2783d396809b8f8ca5e1bf7
+SHA1 (patch-src_blocks_gifdbl.c) = a33f2dda09620961211ac367e872d994231d3f20
+SHA1 (patch-src_libming.h) = 49cab5c2d31115ea9ab909cea88dfc52f1bdbee0
+SHA1 (patch-util_gif2dbl.c) = 04383fd7a43af02d9e85e8bea0fa2328cfdfc617
+SHA1 (patch-util_gif2mask.c) = 5a87deca141b561725725a32971e68837ac6f4e1
diff --git a/multimedia/ming/patches/patch-src_blocks_gifdbl.c b/multimedia/ming/patches/patch-src_blocks_gifdbl.c
new file mode 100644
index 00000000000..c1761810be9
--- /dev/null
+++ b/multimedia/ming/patches/patch-src_blocks_gifdbl.c
@@ -0,0 +1,24 @@
+$NetBSD: patch-src_blocks_gifdbl.c,v 1.1 2013/07/06 07:43:13 ryoon Exp $
+
+* Fix build with giflib 5.0.
+
+--- src/blocks/gifdbl.c.orig 2010-10-10 07:19:23.000000000 +0000
++++ src/blocks/gifdbl.c
+@@ -227,7 +227,7 @@ SWFDBLBitmapData newSWFDBLBitmapData_fro
+ SWFDBLBitmapData ret;
+ struct dbl_data gifdata;
+
+- if((file = DGifOpenFileName(fileName)) == NULL)
++ if((file = DGifOpenFileName(fileName, NULL)) == NULL)
+ return NULL;
+ if(!readGif(file, &gifdata))
+ return NULL;
+@@ -246,7 +246,7 @@ SWFDBLBitmapData newSWFDBLBitmapData_fro
+ SWFDBLBitmapData ret;
+ struct dbl_data gifdata;
+
+- if((file = DGifOpen(input, (InputFunc) gifReadFunc)) == NULL)
++ if((file = DGifOpen(input, (InputFunc) gifReadFunc, NULL)) == NULL)
+ return NULL;
+ if(!readGif(file, &gifdata))
+ return NULL;
diff --git a/multimedia/ming/patches/patch-src_libming.h b/multimedia/ming/patches/patch-src_libming.h
new file mode 100644
index 00000000000..f8953868b33
--- /dev/null
+++ b/multimedia/ming/patches/patch-src_libming.h
@@ -0,0 +1,31 @@
+$NetBSD: patch-src_libming.h,v 1.1 2013/07/06 07:43:13 ryoon Exp $
+
+* Introduce custom PrintGifError() from util/qprintf.c of giflib 5.0.4.
+
+--- src/libming.h.orig 2013-06-08 14:08:51.000000000 +0000
++++ src/libming.h
+@@ -31,6 +31,7 @@
+
+ #include <stdio.h>
+ #include <math.h>
++#include <gif_lib.h>
+
+
+ #include "ming.h"
+@@ -78,9 +79,14 @@ typedef unsigned char BOOL;
+
+ #if GIFLIB_GIFERRORSTRING
+ static void
+-PrintGifError(void)
++PrintGifError(int ErrorCode)
+ {
+- fprintf(stderr, "\nGIF-LIB error: %s.\n", GifErrorString());
++ char *Err = GifErrorString(ErrorCode);
++
++ if (Err != NULL)
++ fprintf(stderr, "\nGIF-LIB error: %s.\n", Err);
++ else
++ fprintf(stderr, "\nGIF-LIB undefined error %d.\n", ErrorCode);
+ }
+ #endif
+
diff --git a/multimedia/ming/patches/patch-util_gif2dbl.c b/multimedia/ming/patches/patch-util_gif2dbl.c
new file mode 100644
index 00000000000..db8167f6315
--- /dev/null
+++ b/multimedia/ming/patches/patch-util_gif2dbl.c
@@ -0,0 +1,30 @@
+$NetBSD: patch-util_gif2dbl.c,v 1.1 2013/07/06 07:43:13 ryoon Exp $
+
+* Fix build with giflib 5.0.4.
+* Catch error with gifib 5.0 manner.
+
+--- util/gif2dbl.c.orig 2013-06-08 14:08:51.000000000 +0000
++++ util/gif2dbl.c
+@@ -19,10 +19,12 @@
+
+ #include "libming.h"
+
++int ErrorCode;
++
+ void error(char *msg)
+ {
+ printf("%s:\n\n", msg);
+- PrintGifError();
++ PrintGifError(ErrorCode);
+ exit(-1);
+ }
+
+@@ -59,7 +61,7 @@ unsigned char *readGif(char *fileName, i
+ unsigned char *p;
+ int i, nColors, size, alpha, bgColor, alignedWidth;
+
+- if((file = DGifOpenFileName(fileName)) == NULL)
++ if((file = DGifOpenFileName(fileName, &ErrorCode)) == NULL)
+ error("Error opening file");
+
+ if(DGifSlurp(file) != GIF_OK)
diff --git a/multimedia/ming/patches/patch-util_gif2mask.c b/multimedia/ming/patches/patch-util_gif2mask.c
new file mode 100644
index 00000000000..f7ca5de4c44
--- /dev/null
+++ b/multimedia/ming/patches/patch-util_gif2mask.c
@@ -0,0 +1,30 @@
+$NetBSD: patch-util_gif2mask.c,v 1.1 2013/07/06 07:43:13 ryoon Exp $
+
+* Fix build with giflib 5.0.4.
+* Catch error with gifib 5.0 manner.
+
+--- util/gif2mask.c.orig 2013-06-08 14:08:51.000000000 +0000
++++ util/gif2mask.c
+@@ -13,10 +13,12 @@
+
+ #define max(a,b,c) (((a)>(b))?(((c)>(a))?(c):(a)):(((c)>(b))?(c):(b)))
+
++int ErrorCode;
++
+ void error(char *msg)
+ {
+ printf("%s:\n\n", msg);
+- PrintGifError();
++ PrintGifError(ErrorCode);
+ exit(-1);
+ }
+
+@@ -28,7 +30,7 @@ unsigned char *readGif(char *fileName, i
+ unsigned char *data;
+ int i, nColors, size;
+
+- if((file = DGifOpenFileName(fileName)) == NULL)
++ if((file = DGifOpenFileName(fileName, &ErrorCode)) == NULL)
+ error("Error opening file");
+
+ if(DGifSlurp(file) != GIF_OK)