commit 7f950f997bd016ee0c8012606528ca3e4f2a1348
Author: Mohamed El Morabity <melmorabity(a)fedoraproject.org>
Date: Sat Feb 24 20:32:04 2018 +0100
Fix build with giflib >= 5
swftools-0.9.2-giflib5.patch | 70 ++++++++++++++++++++++++++++++++++++++++++++
swftools.spec | 5 +++-
2 files changed, 74 insertions(+), 1 deletion(-)
---
diff --git a/swftools-0.9.2-giflib5.patch b/swftools-0.9.2-giflib5.patch
new file mode 100644
index 0000000..abba483
--- /dev/null
+++ b/swftools-0.9.2-giflib5.patch
@@ -0,0 +1,70 @@
+diff -up ./src/gif2swf.c.orig ./src/gif2swf.c
+--- ./src/gif2swf.c.orig 2011-01-02 04:30:29.000000000 +0100
++++ ./src/gif2swf.c 2018-02-24 20:28:24.696622499 +0100
+@@ -66,6 +66,14 @@ enum disposal_method {
+ };
+
+
++void PrintGifError(int ErrorCode) {
++ const char *Err = GifErrorString(ErrorCode);
++ if (Err != NULL)
++ fprintf(stderr, "GIF-LIB error: %s.\n", Err);
++ else
++ fprintf(stderr, "GIF-LIB undefined error %d.\n", ErrorCode);
++}
++
+ void SetFrameAction(TAG ** t, const char *src, int ver)
+ {
+ ActionTAG *as;
+@@ -230,13 +238,13 @@ TAG *MovieAddFrame(SWF * swf, TAG * t, c
+ }
+ fclose(fi);
+
+- if ((gft = DGifOpenFileName(sname)) == NULL) {
++ if ((gft = DGifOpenFileName(sname, NULL)) == NULL) {
+ fprintf(stderr, "%s is not a GIF file!\n", sname);
+ return t;
+ }
+
+ if (DGifSlurp(gft) != GIF_OK) {
+- PrintGifError();
++ PrintGifError(gft->Error);
+ return t;
+ }
+
+@@ -455,7 +463,7 @@ TAG *MovieAddFrame(SWF * swf, TAG * t, c
+
+ free(pal);
+ free(imagedata);
+- DGifCloseFile(gft);
++ DGifCloseFile(gft, NULL);
+
+ return t;
+ }
+@@ -488,7 +496,7 @@ int CheckInputFile(char *fname, char **r
+ }
+ fclose(fi);
+
+- if ((gft = DGifOpenFileName(s)) == NULL) {
++ if ((gft = DGifOpenFileName(s, NULL)) == NULL) {
+ fprintf(stderr, "%s is not a GIF file!\n", fname);
+ return -1;
+ }
+@@ -499,7 +507,7 @@ int CheckInputFile(char *fname, char **r
+ global.max_image_height = gft->SHeight;
+
+ if (DGifSlurp(gft) != GIF_OK) {
+- PrintGifError();
++ PrintGifError(gft->Error);
+ return -1;
+ }
+ // After DGifSlurp() call, gft->ImageCount become available
+@@ -518,7 +526,7 @@ int CheckInputFile(char *fname, char **r
+ fprintf(stderr, "frame: %u, delay: %.3f sec\n", i + 1,
getGifDelayTime(gft, i) / 100.0);
+ }
+
+- DGifCloseFile(gft);
++ DGifCloseFile(gft, NULL);
+
+ return 0;
+ }
diff --git a/swftools.spec b/swftools.spec
index 5e3d686..7b1db46 100644
--- a/swftools.spec
+++ b/swftools.spec
@@ -11,6 +11,8 @@ URL:
http://www.swftools.org/
Source0:
http://www.swftools.org/%{name}-%{version}.tar.gz
# Fix installation
Patch0: swftools-0.9.2-install.patch
+# Fix build with giflib >= 5
+Patch1: swftools-0.9.2-giflib5.patch
BuildRequires: fftw-devel
BuildRequires: fontconfig-devel
@@ -80,9 +82,10 @@ install -Dp lib/python/*.so $RPM_BUILD_ROOT%{python2_sitearch}/
%changelog
-* Fri Feb 23 2018 Mohamed El Morabity <melmorabity(a)fedoraproject.org> - 0.9.2-7
+* Sat Feb 24 2018 Mohamed El Morabity <melmorabity(a)fedoraproject.org> - 0.9.2-7
- Spec cleanup
- Update for latest Python guidelines
+- Fix build with giflib >= 5
* Thu Aug 31 2017 RPM Fusion Release Engineering <kwizart(a)rpmfusion.org> - 0.9.2-6
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild