[packages/ming] - added giflib patch (fixes build with giflib 5)

qboosh qboosh at pld-linux.org
Sun Apr 6 22:03:56 CEST 2014


commit b91bbdeb18c9d1c7382de728bcc0a1c7b79422b0
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun Apr 6 22:05:35 2014 +0200

    - added giflib patch (fixes build with giflib 5)

 ming-giflib.patch | 101 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 ming.spec         |   3 ++
 2 files changed, 104 insertions(+)
---
diff --git a/ming.spec b/ming.spec
index 96032a5..9de557d 100644
--- a/ming.spec
+++ b/ming.spec
@@ -10,6 +10,7 @@ Source0:	http://downloads.sourceforge.net/ming/%{name}-%{version}.tar.gz
 # Source0-md5:	a35735a1c4f51681b96bcbfba58db2a0
 Patch0:		%{name}-perl-shared.patch
 Patch1:		am.patch
+Patch2:		%{name}-giflib.patch
 URL:		http://ming.sourceforge.net/
 BuildRequires:	autoconf
 BuildRequires:	automake
@@ -144,6 +145,7 @@ Interfejs Tcl do biblioteki Ming generującej pliki SWF.
 %setup -q
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 
 %build
 %{__libtoolize}
@@ -154,6 +156,7 @@ Interfejs Tcl do biblioteki Ming generującej pliki SWF.
 	--enable-perl \
 	--enable-php \
 	--enable-python \
+	--disable-silent-rules \
 	--enable-tcl
 
 %{__make} -j1 \
diff --git a/ming-giflib.patch b/ming-giflib.patch
new file mode 100644
index 0000000..24b6635
--- /dev/null
+++ b/ming-giflib.patch
@@ -0,0 +1,101 @@
+--- ming-0.4.5/src/blocks/gifdbl.c.orig	2010-10-10 09:19:23.000000000 +0200
++++ ming-0.4.5/src/blocks/gifdbl.c	2014-04-06 21:48:13.695395774 +0200
+@@ -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;
+--- ming-0.4.5/src/libming.h.orig	2013-06-08 16:08:51.000000000 +0200
++++ ming-0.4.5/src/libming.h	2014-04-06 21:45:18.005399434 +0200
+@@ -76,12 +76,4 @@ typedef unsigned char BOOL;
+   #include <unistd.h>
+ #endif
+ 
+-#if GIFLIB_GIFERRORSTRING
+-static void
+-PrintGifError(void)
+-{
+-	fprintf(stderr, "\nGIF-LIB error: %s.\n", GifErrorString());
+-}
+-#endif
+-
+ #endif /* SWF_LIBMING_H_INCLUDED */
+--- ming-0.4.5/util/gif2dbl.c.orig	2013-06-08 16:08:51.000000000 +0200
++++ ming-0.4.5/util/gif2dbl.c	2014-04-06 22:00:18.692047334 +0200
+@@ -19,10 +19,9 @@
+ 
+ #include "libming.h"
+ 
+-void error(char *msg)
++void gifError(char *msg, int err)
+ {
+-  printf("%s:\n\n", msg);
+-  PrintGifError();
++  printf("%s:\n\n%s\n", msg, GifErrorString(err));
+   exit(-1);
+ }
+ 
+@@ -57,13 +56,13 @@ unsigned char *readGif(char *fileName, i
+   unsigned char *bits;
+   unsigned char *data;
+   unsigned char *p;
+-  int i, nColors, size, alpha, bgColor, alignedWidth;
++  int i, nColors, size, alpha, bgColor, alignedWidth, err;
+ 
+-  if((file = DGifOpenFileName(fileName)) == NULL)
+-    error("Error opening file");
++  if((file = DGifOpenFileName(fileName, &err)) == NULL)
++    gifError("Error opening file", err);
+ 
+   if(DGifSlurp(file) != GIF_OK)
+-    error("Error slurping file");
++    gifError("Error slurping file", file->Error);
+ 
+   /* data should now be available */
+ 
+--- ming-0.4.5/util/gif2mask.c.orig	2013-06-08 16:08:51.000000000 +0200
++++ ming-0.4.5/util/gif2mask.c	2014-04-06 21:59:20.702048538 +0200
+@@ -13,10 +13,9 @@
+ 
+ #define max(a,b,c) (((a)>(b))?(((c)>(a))?(c):(a)):(((c)>(b))?(c):(b)))
+ 
+-void error(char *msg)
++void gifError(char *msg, int err)
+ {
+-  printf("%s:\n\n", msg);
+-  PrintGifError();
++  printf("%s:\n\n%s\n", msg, GifErrorString(err));
+   exit(-1);
+ }
+ 
+@@ -26,13 +25,13 @@ unsigned char *readGif(char *fileName, i
+   unsigned char *bits;
+   unsigned char colorMap[256];
+   unsigned char *data;
+-  int i, nColors, size;
++  int i, nColors, size, err;
+ 
+-  if((file = DGifOpenFileName(fileName)) == NULL)
+-    error("Error opening file");
++  if((file = DGifOpenFileName(fileName, &err)) == NULL)
++    gifError("Error opening file", err);
+ 
+   if(DGifSlurp(file) != GIF_OK)
+-    error("Error slurping file");
++    gifError("Error slurping file", file->Error);
+ 
+   /* data should now be available */
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/ming.git/commitdiff/b91bbdeb18c9d1c7382de728bcc0a1c7b79422b0



More information about the pld-cvs-commit mailing list