commit 2718f6f052ffc134668f2623f6abc8af0f94687d
Author: Mohamed El Morabity <melmorabity(a)fedoraproject.org>
Date: Thu Apr 16 23:50:26 2020 +0200
Fix build with GCC 10
swftools.spec | 6 +--
swftools.spec.bak | 140 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 142 insertions(+), 4 deletions(-)
---
diff --git a/swftools.spec b/swftools.spec
index 0be9336..82ba0de 100644
--- a/swftools.spec
+++ b/swftools.spec
@@ -55,10 +55,8 @@ done
%build
-export PYTHON_INCLUDES=$(python2-config --includes)/Imaging/
-export PYTHON_LIB=$(python2-config --libs)
-export PYTHON_LIB2=$PYTHON_LIB
-export HAVE_PYTHON_IMAGING_LIB=1
+export CFLAGS="$RPM_OPT_FLAGS -fcommon"
+export CXXFLAGS="$CFLAGS"
%configure
make %{?_smp_mflags}
diff --git a/swftools.spec.bak b/swftools.spec.bak
new file mode 100644
index 0000000..075aa4d
--- /dev/null
+++ b/swftools.spec.bak
@@ -0,0 +1,140 @@
+Name: swftools
+Version: 0.9.2
+Release: 11%{?dist}
+Summary: SWF manipulation and generation utilities
+
+# swftools is GPLv2+ licensed, lib/MD5.c is BSD licensed,
+# lib/action/actioncompiler.c is LGPLv2+ licensed
+License: GPLv3+ and LGPLv2+ and BSD
+URL:
http://www.swftools.org/
+Source0: %{url}/%{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: gcc-c++
+BuildRequires: fftw-devel
+BuildRequires: fontconfig-devel
+BuildRequires: giflib-devel
+BuildRequires: lame-devel
+BuildRequires: python3-devel
+BuildRequires: python3-pillow-devel
+BuildRequires: zziplib-devel
+
+%description
+SWFTools is a collection of utilities for working with Adobe Flash files (SWF
+files). The tool collection includes programs for reading SWF files, combining
+them, and creating them from other content (like images, sound files, videos or
+source code).
+
+
+%package -n python3-%{name}
+Summary: Python bindings for %{name}
+Requires: %{name} = %{version}-%{release}
+%{?python_provide:%python_provide python3-%{name}}
+
+%description -n python3-%{name}
+This package provides Python 3 bindings for %{name}.
+
+
+%prep
+%autosetup -p0
+
+# Fix permissions
+chmod -x lib/*.[ch] lib/action/*.[ch]
+
+# Fix encoding
+for file in AUTHORS src/{jpeg2swf.1,swfstrings.1}; do
+ iconv -f ISO-8859-1 -t UTF-8 -o $file.new $file && \
+ touch -r $file $file.new && \
+ mv $file.new $file
+done
+
+
+%build
+export PYTHON_INCLUDES=$(python3-config --includes)/Imaging/
+export PYTHON_LIB=$(python3-config --libs)
+export PYTHON_LIB2=$PYTHON_LIB
+export HAVE_PYTHON_IMAGING_LIB=1
+%configure
+make %{?_smp_mflags}
+
+
+%install
+make install DESTDIR=$RPM_BUILD_ROOT
+
+install -dm 0755 $RPM_BUILD_ROOT%{python2_sitearch}/
+install -Dp lib/python/*.so $RPM_BUILD_ROOT%{python2_sitearch}/
+
+
+%files
+%doc AUTHORS ChangeLog doc/fileformat.sc
+%license COPYING
+%{_bindir}/*
+%{_mandir}/man1/*.1.*
+%{_datadir}/%{name}/
+
+
+%files -n python3-%{name}
+%{python2_sitearch}/*.so
+
+
+%changelog
+* Fri Aug 09 2019 RPM Fusion Release Engineering <leigh123linux(a)gmail.com> -
0.9.2-11
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
+
+* Mon Mar 04 2019 RPM Fusion Release Engineering <leigh123linux(a)gmail.com> -
0.9.2-10
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
+
+* Sun Aug 19 2018 Leigh Scott <leigh123linux(a)googlemail.com> - 0.9.2-9
+- Rebuilt for Fedora 29 Mass Rebuild binutils issue
+
+* Fri Jul 27 2018 RPM Fusion Release Engineering <leigh123linux(a)gmail.com> -
0.9.2-8
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
+
+* 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
+
+* Mon Mar 20 2017 RPM Fusion Release Engineering <kwizart(a)rpmfusion.org> - 0.9.2-5
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
+
+* Mon Aug 01 2016 Sérgio Basto <sergio(a)serjux.com> - 0.9.2-4
+-
https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_...
+
+* Sun Aug 31 2014 Sérgio Basto <sergio(a)serjux.com> - 0.9.2-3
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
+
+* Sun Mar 03 2013 Nicolas Chauvet <kwizart(a)gmail.com> - 0.9.2-2
+- Mass rebuilt for Fedora 19 Features
+
+* Tue Apr 10 2012 Mohamed El Morabity <melmorabity(a)fedoraproject.org> - 0.9.2-1
+- Update to 0.9.2
+
+* Fri Mar 02 2012 Nicolas Chauvet <kwizart(a)gmail.com> - 0.9.1-6
+- Rebuilt for c++ ABI breakage
+
+* Tue Jan 24 2012 Mohamed El Morabity <melmorabity(a)fedoraproject.org> - 0.9.1-5
+- Fix License tag
+
+* Wed Nov 30 2011 Mohamed El Morabity <melmorabity(a)fedoraproject.org> - 0.9.1-4
+- Spec cleanup
+
+* Mon Jan 10 2011 Mohamed El Morabity <melmorabity(a)fedoraproject.org> - 0.9.1-3
+- Remove pdflib-devel from BuildRequires
+
+* Thu Nov 11 2010 Mohamed El Morabity <melmorabity(a)fedoraproject.org> - 0.9.1-2
+- Add missing BuildRequires fftw-devel and zziplib-devel
+- Re-enable Python modules build
+
+* Sun Jun 13 2010 Mohamed El Morabity <melmorabity(a)fedoraproject.org> 0.9.1-1
+- Update to 0.9.1
+- Disable Python modules build (broken in 0.9.1)
+
+* Thu Jun 3 2010 Mohamed El Morabity <melmorabity(a)fedoraproject.org> 0.9.0-1
+- Initial RPM release