commit 1b03ea9412dbf45921a01d38b5159619f4e30e7d
Author: Andrea Musuruane <musuruan(a)gmail.com>
Date: Sat Feb 4 19:15:47 2017 +0100
Updated to 1.54.1
Made separate gtk package
Dropped obsolete Group, Buildroot, %clean and %defattr
Dropped cleaning at the beginning of %install
.gitignore | 1 +
snes9x-1.54.1-unix_flags.patch | 66 +++++++++++++++++++++++++
snes9x.spec | 106 ++++++++++++++++++++++++++++-------------
sources | 2 +-
4 files changed, 142 insertions(+), 33 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index cbc1f53..faba16d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
snes9x-1.53-src.tar.bz2
+/snes9x-1.54.1.tar.gz
diff --git a/snes9x-1.54.1-unix_flags.patch b/snes9x-1.54.1-unix_flags.patch
new file mode 100644
index 0000000..4547791
--- /dev/null
+++ b/snes9x-1.54.1-unix_flags.patch
@@ -0,0 +1,66 @@
+diff -durN snes9x-1.54.1.orig/unix/configure.ac snes9x-1.54.1/unix/configure.ac
+--- snes9x-1.54.1.orig/unix/configure.ac 2016-10-15 02:20:34.000000000 +0200
++++ snes9x-1.54.1/unix/configure.ac 2017-02-04 18:52:33.297396407 +0100
+@@ -55,50 +55,6 @@
+ # *****************************
+ # *** Execution begins here ***
+ # *****************************
+-
+-# Remove -g and -O2 flags manually.
+-
+-if test "x$CFLAGS" != "x"; then
+- CFLAGS="`echo \"$CFLAGS\" | sed -e 's/-g//'`"
+- CFLAGS="`echo \"$CFLAGS\" | sed -e 's/-O2//'`"
+-fi
+-
+-if test "x$CXXFLAGS" != "x"; then
+- CXXFLAGS="`echo \"$CXXFLAGS\" | sed -e 's/-g//'`"
+- CXXFLAGS="`echo \"$CXXFLAGS\" | sed -e 's/-O2//'`"
+-fi
+-
+-# Test what compiler flags we should use.
+-
+-AC_ARG_ENABLE([debug],
+- [AS_HELP_STRING([--enable-debug],
+- [leave debug information in the final binary (default: no)])],
+- [], [enable_debug="no"])
+-
+-if test "x$enable_debug" = "xyes"; then
+- AC_S9X_COMPILER_FLAG([-g], [g])
+- AC_S9X_COMPILER_FLAG([-O0], [o0])
+-else
+- AC_S9X_COMPILER_FLAG([-O3], [o3], [
+- AC_S9X_COMPILER_FLAG([-O2], [o2], [
+- AC_S9X_COMPILER_FLAG([-O1], [o1])])])
+- AC_S9X_COMPILER_FLAG([-fomit-frame-pointer], [omit_frame_pointer])
+-fi
+-
+-AC_ARG_ENABLE([mtune],
+- [AS_HELP_STRING([--enable-mtune],
+- [use the specified value for the -mtune/-mcpu flag (default: no)])],
+- [], [enable_mtune="no"])
+-
+-if test "x$enable_mtune" != "xno"; then
+- AC_S9X_COMPILER_FLAG([-mtune="$enable_mtune"], [mtune],
+- [
+- AC_MSG_WARN([-mtune failed, trying -mcpu...])
+- AC_S9X_COMPILER_FLAG([-mcpu="$enable_mtune"], [mcpu],
+- [AC_MSG_ERROR([Please specify a working value for --enable-mtune.])])
+- ])
+-fi
+-
+ AC_S9X_COMPILER_FLAG([-fno-exceptions], [no_exceptions])
+ AC_S9X_COMPILER_FLAG([-fno-rtti], [no_rtti])
+ AC_S9X_COMPILER_FLAG([-pedantic], [pedantic])
+diff -durN snes9x-1.54.1.orig/unix/Makefile.in snes9x-1.54.1/unix/Makefile.in
+--- snes9x-1.54.1.orig/unix/Makefile.in 2016-10-15 02:20:34.000000000 +0200
++++ snes9x-1.54.1/unix/Makefile.in 2017-02-04 18:52:02.039108126 +0100
+@@ -47,7 +47,7 @@
+ exit 1
+
+ snes9x: $(OBJECTS)
+- $(CCC) $(INCLUDES) -o $@ $(OBJECTS) -lm @S9XLIBS@
++ $(CCC) $(LDFLAGS) $(INCLUDES) -o $@ $(OBJECTS) -lm @S9XLIBS@
+
+ ../jma/s9x-jma.o: ../jma/s9x-jma.cpp
+ $(CCC) $(INCLUDES) -c $(CCFLAGS) -fexceptions $*.cpp -o $@
diff --git a/snes9x.spec b/snes9x.spec
index 87a1c37..267bfb3 100644
--- a/snes9x.spec
+++ b/snes9x.spec
@@ -1,87 +1,129 @@
Summary: Super Nintendo Entertainment System emulator
Name: snes9x
-Version: 1.53
-Release: 5%{?dist}
+Version: 1.54.1
+Release: 1%{?dist}
License: Other
-Group: Applications/Emulators
-URL:
http://code.google.com/p/snes9x-gtk/
-Source:
http://snes9x-gtk.googlecode.com/files/snes9x-%{version}-src.tar.bz2
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
+URL:
http://www.snes9x.com/
+Source:
https://github.com/snes9xgit/snes9x/archive/%{version}.tar.gz#/%{name}-%{...
+# Fix CFLAGS and LDFLAGS usage in CLI version
+Patch0: %{name}-1.54.1-unix_flags.patch
BuildRequires: gcc-c++
-BuildRequires: zlib-devel, libpng-devel
-BuildRequires: libXv-devel, libXrandr-devel
+BuildRequires: autoconf
+BuildRequires: zlib-devel
+BuildRequires: libpng-devel
+BuildRequires: libXv-devel
+BuildRequires: libXrandr-devel
+BuildRequires: libGL-devel
BuildRequires: nasm
BuildRequires: intltool
-BuildRequires: gtk2-devel, libglade2-devel
+BuildRequires: gtk2-devel
+BuildRequires: libglade2-devel
BuildRequires: SDL-devel
+BuildRequires: libxml2-devel
BuildRequires: portaudio-devel
BuildRequires: alsa-lib-devel
BuildRequires: pulseaudio-libs-devel
+BuildRequires: desktop-file-utils
%description
Snes9x is a portable, freeware Super Nintendo Entertainment System (SNES)
emulator. It basically allows you to play most games designed for the SNES
and Super Famicom Nintendo game systems on your computer.
+%package gtk
+Summary: Super Nintendo Entertainment System emulator - GTK version
+Requires: hicolor-icon-theme
+
+%description gtk
+Snes9x is a portable, freeware Super Nintendo Entertainment System (SNES)
+emulator. It basically allows you to play most games designed for the SNES
+and Super Famicom Nintendo game systems on your computer.
+
+This package contains a graphical user interface using GTK+.
+
%prep
-%setup -q -n %{name}-%{version}-src
+%setup -q
+%patch0 -p1
%build
-# First, build the GTK version
-cd gtk
+# Build GTK version
+pushd gtk
+./autogen.sh
%configure \
+ --disable-silent-rules \
--without-oss \
--with-netplay
-%{__make} %{?_smp_mflags}
-cd ..
-# Second, build the CLI version
-cd unix
+%make_build
+popd
+
+# Build CLI version
+pushd unix
+autoreconf
%configure \
--enable-netplay
-%{__make} %{?_smp_mflags}
-cd ..
+%make_build
+popd
%install
-%{__rm} -rf %{buildroot}
-cd gtk
-%{__make} install DESTDIR=%{buildroot}
-cd ..
-%find_lang snes9x-gtk
-%{__install} -p -m 0755 unix/snes9x %{buildroot}%{_bindir}/snes9x
+# Install GTK version
+%make_install -C gtk
+# Install CLI version
+mkdir -p %{buildroot}%{_bindir}
+install -p -m 0755 unix/snes9x %{buildroot}%{_bindir}
-%clean
-%{__rm} -rf %{buildroot}
+# Validate desktop file
+desktop-file-validate \
+ %{buildroot}%{_datadir}/applications/%{name}.desktop
+
+%find_lang snes9x-gtk
-%post
+%post gtk
touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
update-desktop-database &> /dev/null || :
-%postun
+
+%postun gtk
if [ $1 -eq 0 ] ; then
touch --no-create %{_datadir}/icons/hicolor &>/dev/null
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
fi
update-desktop-database &> /dev/null || :
-%posttrans
+
+%posttrans gtk
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
-%files -f snes9x-gtk.lang
-%defattr(-,root,root,-)
-%doc gtk/doc/* unix/docs/readme_unix.html
+%files
+%license docs/snes9x-license.txt
+%doc docs/changes.txt
+%doc unix/docs/readme_unix.html
%{_bindir}/snes9x
+
+
+%files gtk -f snes9x-gtk.lang
+%license docs/snes9x-license.txt
+%license gtk/doc/LICENSE
+%license gtk/doc/lgpl.txt
+%doc docs/changes.txt
+%doc gtk/doc/README
%{_bindir}/snes9x-gtk
%{_datadir}/applications/snes9x.desktop
%{_datadir}/icons/hicolor/*/apps/snes9x.*
%changelog
+* Sat Jan 28 2017 Andrea Musuruane <musuruan(a)gmail.com> - 1.54.1-1
+- Updated to 1.54.1
+- Made separate gtk package
+- Dropped obsolete Group, Buildroot, %%clean and %%defattr
+- Dropped cleaning at the beginning of %%install
+
* Sun Aug 31 2014 Sérgio Basto <sergio(a)serjux.com> - 1.53-5
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
diff --git a/sources b/sources
index 8faa4fb..9441f8f 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-69ec1743a1da7de7b5d55a43b0e2ed10 snes9x-1.53-src.tar.bz2
+ea8e97bbde690345b4d3b1af9facc1f0 snes9x-1.54.1.tar.gz