Author: jwrdegoede
Update of /cvs/free/rpms/zsnes/devel
In directory old02.ovh.rpmfusion.lan:/tmp/cvs-serv7417
Modified Files:
zsnes.spec
Added Files:
zsnes-1.51-gcc47.patch zsnes-1.51-libao-crash.patch
Log Message:
* Mon Mar 25 2013 Hans de Goede <j.w.r.degoede(a)gmail.com> - 1.51-15
- Pass -march=i686 rather then -march=i386 to gcc (fix FTBFS)
- Modernize specfile a bit
- Fix crash due to passing a non initialized ao_sample_format struct to libao
zsnes-1.51-gcc47.patch:
depbuild.cpp | 1 +
1 file changed, 1 insertion(+)
--- NEW FILE zsnes-1.51-gcc47.patch ---
Fix compile with gcc47
Bug #419635
https://bugs.gentoo.org/show_bug.cgi?id=419635
Submitted by Nikos Chantziaras
--- a/src/tools/depbuild.cpp
+++ b/src/tools/depbuild.cpp
@@ -25,6 +25,7 @@
#include <string>
#include <cstdlib>
#include <cstdio>
+#include <unistd.h>
using namespace std;
#include "fileutil.h"
zsnes-1.51-libao-crash.patch:
audio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- NEW FILE zsnes-1.51-libao-crash.patch ---
diff -up zsnes_1_51/src/linux/audio.c~ zsnes_1_51/src/linux/audio.c
--- zsnes_1_51/src/linux/audio.c~ 2013-03-25 22:13:18.000000000 +0100
+++ zsnes_1_51/src/linux/audio.c 2013-03-25 23:46:56.831583012 +0100
@@ -162,10 +162,10 @@ static void *SoundThread_ao(void *useles
static int SoundInit_ao()
{
+ ao_sample_format driver_format = { 0, };
int driver_id = ao_driver_id(libAoDriver);
if (driver_id < 0) { driver_id = ao_default_driver_id(); }
- ao_sample_format driver_format;
driver_format.bits = 16;
driver_format.channels = StereoSound+1;
driver_format.rate = freqtab[SoundQuality = ((SoundQuality > 6) ? 1 :
SoundQuality)];
Index: zsnes.spec
===================================================================
RCS file: /cvs/free/rpms/zsnes/devel/zsnes.spec,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- zsnes.spec 3 Mar 2013 21:51:01 -0000 1.12
+++ zsnes.spec 25 Mar 2013 22:51:52 -0000 1.13
@@ -4,7 +4,7 @@
Summary: A Super Nintendo emulator
Name: zsnes
Version: 1.51
-Release: 13%{?dist}
+Release: 15%{?dist}
License: GPLv2
Group: Applications/Emulators
URL:
http://www.zsnes.com/
@@ -25,8 +25,12 @@
# Fix FTBFS with libpng 1.5
#
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=649801
Patch7: zsnes-1.51-libpng15.patch
+# Fix FTBFS with gcc 4.7
+#
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=667429
+Patch8: zsnes-1.51-gcc47.patch
+# Fix crash due to passing a non initialized ao_sample_format struct to libao
+Patch9: zsnes-1.51-libao-crash.patch
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
# This is to build only for ix86 on plague
#ExclusiveArch: %{ix86}
ExclusiveArch: i686
@@ -38,10 +42,11 @@
BuildRequires: libGL-devel
BuildRequires: ncurses-devel
BuildRequires: libao-devel
+BuildRequires: perl-Carp
BuildRequires: desktop-file-utils
Requires: hicolor-icon-theme
# Require pulseaudio-libs.i686 under x86_64
-Requires: pulseaudio-libs
+Requires: pulseaudio-libs%{?_isa}
%description
This is an emulator for Nintendo's 16 bit console, called Super Nintendo
@@ -59,6 +64,8 @@
%patch5 -p2
%patch6 -p2
%patch7 -p2
+%patch8 -p2
+%patch9 -p2
# Remove hardcoded CFLAGS and LDFLAGS
sed -i \
@@ -80,23 +87,26 @@
sed -i -e 's/^Icon=%{name}.png$/Icon=%{name}/g' \
linux/%{name}.desktop
+
%build
aclocal
autoconf
%configure \
--enable-libao \
--enable-release \
- --disable-cpucheck force_arch="%{_arch}"
+ --disable-cpucheck force_arch=i686
make %{?_smp_mflags}
+
%install
-rm -rf %{buildroot}
make install DESTDIR=%{buildroot}
# install desktop file
mkdir -p %{buildroot}%{_datadir}/applications
desktop-file-install \
+%if 0%{?fedora} && 0%{?fedora} < 19
--vendor dribble \
+%endif
--remove-category Application \
--dir %{buildroot}%{_datadir}/applications \
linux/%{name}.desktop
@@ -108,26 +118,24 @@
install -m 644 icons/48x48x32.png
%{buildroot}%{_datadir}/icons/hicolor/48x48/apps/zsnes.png
install -m 644 icons/64x64x32.png
%{buildroot}%{_datadir}/icons/hicolor/64x64/apps/zsnes.png
-%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
+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
+ touch --no-create %{_datadir}/icons/hicolor &>/dev/null
+ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
fi
+%posttrans
+gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
+
+
%files
-%defattr(-,root,root)
%{_bindir}/zsnes
%{_mandir}/man1/zsnes.1*
-%{_datadir}/applications/dribble-%{name}.desktop
+%{_datadir}/applications/*%{name}.desktop
%{_datadir}/icons/hicolor/16x16/apps/%{name}.png
%{_datadir}/icons/hicolor/32x32/apps/%{name}.png
%{_datadir}/icons/hicolor/48x48/apps/%{name}.png
@@ -136,7 +144,16 @@
%doc ../docs/support.txt ../docs/thanks.txt ../docs/todo.txt
%doc ../docs/readme.htm/ ../docs/readme.txt/
+
%changelog
+* Mon Mar 25 2013 Hans de Goede <j.w.r.degoede(a)gmail.com> - 1.51-15
+- Pass -march=i686 rather then -march=i386 to gcc (fix FTBFS)
+- Modernize specfile a bit
+- Fix crash due to passing a non initialized ao_sample_format struct to libao
+
+* Sun Mar 24 2013 Andrea Musuruane <musuruan(a)gmail.com> - 1.51-14
+- Fixed FTBFS with gcc 4.7+
+
* Sun Mar 03 2013 Nicolas Chauvet <kwizart(a)gmail.com> - 1.51-13
- Mass rebuilt for Fedora 19 Features