[gif2png] added patch for building with libpng15

ensc ensc at fedoraproject.org
Tue Dec 6 20:48:13 UTC 2011


commit da580ec2b0deef654c5e7943a99d1a2642b260a8
Author: Enrico Scholz <enrico.scholz at informatik.tu-chemnitz.de>
Date:   Tue Dec 6 21:31:31 2011 +0100

    added patch for building with libpng15

 gif2png.spec   |    7 ++++++-
 libpng15.patch |   38 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 44 insertions(+), 1 deletions(-)
---
diff --git a/gif2png.spec b/gif2png.spec
index 8ca49fa..fb3691c 100644
--- a/gif2png.spec
+++ b/gif2png.spec
@@ -5,12 +5,13 @@
 Summary:	A GIF to PNG converter
 Name:		gif2png
 Version:	2.5.4
-Release:	%release_func 1502
+Release:	%release_func 1700
 License:	BSD
 Group:		Applications/Multimedia
 URL:		http://www.catb.org/~esr/gif2png/
 Source0:	http://www.catb.org/~esr/gif2png/%name-%version.tar.gz
 Patch0:		gif2png-overflow.patch
+Patch1:		libpng15.patch
 BuildRoot:	%_tmppath/%name-%version-%release-root
 BuildRequires:	libpng-devel
 
@@ -45,6 +46,7 @@ convert entire web hierarchies (images and HTML or PHP pages).
 %prep
 %setup -q
 %apply -n0 -p1
+%apply -n1 -p1
 
 
 %build
@@ -75,6 +77,9 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Tue Dec  6 2011 Enrico Scholz <enrico.scholz at informatik.tu-chemnitz.de> - 2.5.4-1700
+- added patch for building with libpng15
+
 * Tue Dec 06 2011 Adam Jackson <ajax at redhat.com> - 2.5.4-1502
 - Rebuild for new libpng
 
diff --git a/libpng15.patch b/libpng15.patch
new file mode 100644
index 0000000..fecbd31
--- /dev/null
+++ b/libpng15.patch
@@ -0,0 +1,38 @@
+Index: gif2png-2.5.4/gif2png.c
+===================================================================
+--- gif2png-2.5.4.orig/gif2png.c
++++ gif2png-2.5.4/gif2png.c
+@@ -10,6 +10,7 @@
+ #include <string.h>
+ #include <stdlib.h>
+ #include <unistd.h>	/* for isatty() */
++#include <zlib.h>
+ 
+ #if !defined(TRUE)
+ #define FALSE	0
+@@ -119,8 +120,8 @@ int writefile(struct GIFelement *s,struc
+     int colors_used = 0;
+     byte remap[MAXCMSIZE];
+     int low_prec;
+-    png_struct *png_ptr = xalloc(sizeof (png_struct));
+-    png_info *info_ptr = xalloc(sizeof (png_info));
++    png_struct *png_ptr;
++    png_info *info_ptr;
+     int p;
+     int gray_bitdepth;
+     png_color pal_rgb[MAXCMSIZE], *pltep;
+@@ -280,14 +281,6 @@ int writefile(struct GIFelement *s,struc
+ 		    colors[i].red, colors[i].blue, colors[i].green);  
+ 	}
+ 
+-    if (setjmp(png_jmpbuf(png_ptr))) {
+-	fprintf(stderr, "gif2png:  libpng returns fatal error condition\n");
+-	free(png_ptr);
+-	free(info_ptr);
+-	return 1;
+-    }
+-
+-
+     /* Create and initialize the png_struct with the desired error handler
+      * functions.  If you want to use the default stderr and longjump method,
+      * you can supply NULL for the last three parameters.  We also check that


More information about the scm-commits mailing list