commit 2af30f1a4c032c2ec3f5b9dc323c62b5648439f1
Author: Mohamed El Morabity <melmorabity(a)fedoraproject.org>
Date: Thu Feb 4 21:34:10 2021 +0100
Fix build with GCC 11
sources | 2 +-
swftools-0.9.2-gcc11.patch | 15 +++++++++++++++
swftools.spec | 7 ++++++-
3 files changed, 22 insertions(+), 2 deletions(-)
---
diff --git a/sources b/sources
index 0f7817f..d281133 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-1055ebbe3b4cadcc71e83775a5a0906d swftools-0.9.2.tar.gz
+SHA512 (swftools-0.9.2.tar.gz) =
91bbd48914f9a8a1cdf85532b371721b01982c5f88648b908fbe99fbf4e17e9893ce575e4fd699927e9bc1c79d846f6bcd4f1d868578fb17403467cc1e28259b
diff --git a/swftools-0.9.2-gcc11.patch b/swftools-0.9.2-gcc11.patch
new file mode 100644
index 0000000..347e54c
--- /dev/null
+++ b/swftools-0.9.2-gcc11.patch
@@ -0,0 +1,15 @@
+diff -up ./lib/pdf/xpdf/GlobalParams.cc.orig ./lib/pdf/xpdf/GlobalParams.cc
+--- ./lib/pdf/xpdf/GlobalParams.cc.orig 2021-02-04 16:51:27.238069595 +0000
++++ ./lib/pdf/xpdf/GlobalParams.cc 2021-02-04 17:02:56.875485395 +0000
+@@ -922,9 +922,9 @@ void GlobalParams::parseFile(GString *fi
+ char* p = pos1>pos2?pos1:pos2;
+ int pos = p ? p-cfgFileName : -1;
+ GString*path = new GString(new GString(cfgFileName), 0, (pos < 0 ?
strlen(cfgFileName): pos));
+- if(pos1>=0)
++ if(pos1)
+ path->append('/');
+- else if(pos2>=0)
++ else if(pos2)
+ path->append('\\');
+ else
+ #ifdef WIN32
diff --git a/swftools.spec b/swftools.spec
index 6a20040..481e950 100644
--- a/swftools.spec
+++ b/swftools.spec
@@ -1,6 +1,6 @@
Name: swftools
Version: 0.9.2
-Release: 15%{?dist}
+Release: 16%{?dist}
Summary: SWF manipulation and generation utilities
# swftools is GPLv2+ licensed, lib/MD5.c is BSD licensed,
@@ -12,6 +12,8 @@ Source0: %{url}/%{name}-%{version}.tar.gz
Patch0: swftools-0.9.2-install.patch
# Fix build with giflib >= 5
Patch1: swftools-0.9.2-giflib5.patch
+# Fix build with GCC 11
+Patch2: swftools-0.9.2-gcc11.patch
BuildRequires: gcc-c++
BuildRequires: fftw-devel
@@ -62,6 +64,9 @@ make install DESTDIR=$RPM_BUILD_ROOT
%changelog
+* Thu Feb 04 2021 Mohamed El Morabity <melmorabity(a)fedoraproject.org> - 0.9.2-16
+- Fix build with GCC 11
+
* Thu Feb 04 2021 RPM Fusion Release Engineering <leigh123linux(a)gmail.com> -
0.9.2-15
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild