[Frodo] Fix building with gcc6 / fix FTBFS

Hans de Goede jwrdegoede at rpmfusion.org
Thu Jul 7 21:51:00 CEST 2016


commit 09ba3b65d9f39db4c136c1611f944ec14af60284
Author: Hans de Goede <hdegoede at redhat.com>
Date:   Thu Jul 7 21:50:59 2016 +0200

    Fix building with gcc6 / fix FTBFS

 Frodo-4.1b-gcc6.patch | 12 ++++++++++++
 Frodo.spec            | 28 +++++++++++++---------------
 2 files changed, 25 insertions(+), 15 deletions(-)
---
diff --git a/Frodo-4.1b-gcc6.patch b/Frodo-4.1b-gcc6.patch
new file mode 100644
index 0000000..63e8d4a
--- /dev/null
+++ b/Frodo-4.1b-gcc6.patch
@@ -0,0 +1,12 @@
+diff -up Frodo-4.1b/Src/SID.cpp~ Frodo-4.1b/Src/SID.cpp
+--- Frodo-4.1b/Src/SID.cpp~	2002-01-02 22:18:59.000000000 +0100
++++ Frodo-4.1b/Src/SID.cpp	2016-07-07 21:47:41.030508033 +0200
+@@ -801,7 +801,7 @@ const uint8 DigitalRenderer::EGDRShift[2
+ };
+ 
+ const int16 DigitalRenderer::SampleTab[16] = {
+-	0x8000, 0x9111, 0xa222, 0xb333, 0xc444, 0xd555, 0xe666, 0xf777,
++	(int16)0x8000, (int16)0x9111, (int16)0xa222, (int16)0xb333, (int16)0xc444, (int16)0xd555, (int16)0xe666, (int16)0xf777,
+ 	0x0888, 0x1999, 0x2aaa, 0x3bbb, 0x4ccc, 0x5ddd, 0x6eee, 0x7fff,
+ };
+ 
diff --git a/Frodo.spec b/Frodo.spec
index acfba44..455e96d 100644
--- a/Frodo.spec
+++ b/Frodo.spec
@@ -3,7 +3,7 @@
 Summary: Commodore 64 emulator
 Name: Frodo
 Version: 4.1b
-Release: 10%{?dist}
+Release: 11%{?dist}
 License: Distributable
 Group: Applications/Emulators
 URL: http://frodo.cebix.net/
@@ -16,7 +16,7 @@ Patch0: Frodo-4.1b-paths.patch
 Patch1: Frodo-4.1b-opt.patch
 Patch2: Frodo-4.1b-alpha.patch
 Patch3: Frodo-4.1b-SAM.patch
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Patch4: Frodo-4.1b-gcc6.patch
 BuildRequires: autoconf
 BuildRequires: SDL-devel >= 1.2.0
 BuildRequires: libXt-devel 
@@ -61,6 +61,7 @@ An enhanced Tcl/Tk preferences GUI for Frodo written by Gerard Decatrel
 %patch1 -p1
 %patch2 -p1
 %patch3 -p0
+%patch4 -p1
 
 %build
 cd Src
@@ -69,7 +70,6 @@ autoconf
 make %{?_smp_mflags} all FRODOHOME="\\\"%{_datadir}/Frodo/\\\""
 
 %install
-rm -rf %{buildroot}
 install -d 755 %{buildroot}%{_bindir}
 install -d 755 %{buildroot}%{_datadir}/Frodo/{64prgs,64imgs}
 install -m 755 Src/Frodo Src/FrodoPC Src/FrodoSC %{buildroot}%{_bindir}
@@ -94,23 +94,19 @@ desktop-file-install --vendor dribble        \
   --dir %{buildroot}%{_datadir}/applications \
   %{SOURCE4}
 
-%clean
-rm -rf %{buildroot}
-
 %post
-touch --no-create %{_datadir}/icons/hicolor
-if [ -x %{_bindir}/gtk-update-icon-cache ]; then
-  %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
-fi
+/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
 
 %postun
-touch --no-create %{_datadir}/icons/hicolor
-if [ -x %{_bindir}/gtk-update-icon-cache ]; then
-  %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
+if [ $1 -eq 0 ] ; then
+    /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
+    /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 fi
 
+%posttrans
+/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
+
 %files
-%defattr(-,root,root)
 %{_bindir}/Frodo
 %{_bindir}/FrodoPC
 %{_bindir}/FrodoSC
@@ -123,10 +119,12 @@ fi
 %exclude %{_datadir}/Frodo/TkGui.tcl
 
 %files gui
-%defattr(-,root,root)
 %{_datadir}/Frodo/TkGui.tcl
 
 %changelog
+* Thu Jul  7 2016 Hans de Goede <j.w.r.degoede at gmail.com> - 4.1b-11
+- Fix building with gcc6 / fix FTBFS
+
 * Sun Aug 31 2014 Sérgio Basto <sergio at serjux.com> - 4.1b-10
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
 


More information about the rpmfusion-commits mailing list