%bcond_without sdl # SDL version
%bcond_without libao # libao instead of alsa
#
+%define libspectrum_ver 1.5.0
Summary: Free Unix Spectrum Emulator
Summary(pl.UTF-8): Darmowy uniksowy emulator ZX Spectrum
Name: fuse
-Version: 1.3.7
-Release: 1
+Version: 1.6.0
+Release: 5
License: GPL v2+
Group: Applications/Emulators
Source0: http://downloads.sourceforge.net/fuse-emulator/%{name}-%{version}.tar.gz
-# Source0-md5: b3f08c88c002c53fb7f4a20e7c177aa0
+# Source0-md5: 393ae137e76de66e6a1bf66959a39e99
Source1: ti_m397.rom
# Source1-md5: 8c61b20e1f7666ff80ad7f48bb2b10c0
-Patch0: %{name}-1.1.1-2.patch
+Patch0: http://downloads.sourceforge.net/fdd3000e/v_0.2.1/fuse-1.6.0-fdd3000-0.2.1.diff
+# Patch0-md5: 4a75f5c445921feb2c12a8406f71c44e
URL: http://fuse-emulator.sourceforge.net/
BuildRequires: SDL-devel >= 1.2.4
%{!?with_libao:BuildRequires: alsa-lib-devel}
BuildRequires: autoconf >= 2.59-9
-BuildRequires: automake
+BuildRequires: automake >= 1:1.11
BuildRequires: glib2-devel >= 1:2.20.0
%{?with_fb:BuildRequires: gpm-devel}
%{?with_gtk2:BuildRequires: gtk+2-devel >= 2:2.18.0}
%{?with_gtk3:BuildRequires: gtk+3-devel >= 3.0}
%{?with_libao:BuildRequires: libao-devel}
BuildRequires: libjsw-devel
-BuildRequires: libmount-devel
BuildRequires: libpng-devel
-BuildRequires: libsamplerate-devel
-BuildRequires: libspectrum-devel >= 1.3.5
+BuildRequires: libspectrum-devel >= %{libspectrum_ver}
BuildRequires: libtool >= 2:2
-BuildRequires: libxml2-devel >= 2.0.0
+BuildRequires: libxml2-devel >= 1:2.6.0
BuildRequires: perl-base
BuildRequires: pkgconfig
BuildRequires: rpmbuild(macros) >= 1.697
Summary: Free Unix Spectrum Emulator (common files)
Summary(pl.UTF-8): Darmowy uniksowy emulator ZX Spectrum (pliki wspólne)
Group: Applications/Emulators
+# actually -common doesn't require these libraries, but all the frontends do
Requires: glib2 >= 1:2.20.0
-Requires: libspectrum >= 1.3.5
+Requires: libspectrum >= %{libspectrum_ver}
+Requires: libxml2-devel >= 1:2.6.0
Suggests: fdd3000e
%description common
%prep
%setup -q
-# needs update for 1.2.x
-#%patch0 -p1
+%patch0 -p1
# PLD uses per-backend fuse program instead of just "fuse"
%{__sed} -i -e '/^complete /s/ fuse$/ fuse-fb fuse-gtk fuse-gtk3 fuse-sdl fuse-svga/' data/shell-completion/bash/fuse
+%{__rm} -f settings.c settings.h options.h
%build
+autoreconf
+
%define common_opts \\\
--disable-silent-rules \\\
--with-bash-completion-dir=%{bash_compdir} \\\
%{common_opts} \
--program-suffix=-fb \
%if %{with libao}
- --without-alsa \
- --with-libao \
+ --with-audio-driver=libao \
%endif
--with-fb
%{__make}
%{common_opts} \
--program-suffix=-gtk \
%if %{with libao}
- --without-alsa \
- --with-libao \
+ --with-audio-driver=libao \
%endif
--with-gtk
%{__make}
--enable-gtk3 \
--program-suffix=-gtk3 \
%if %{with libao}
- --without-alsa \
- --with-libao \
+ --with-audio-driver=libao \
%endif
--with-gtk
%{__make}
%files common
%defattr(644,root,root,755)
-%doc README THANKS AUTHORS keysyms.dat keysyms.pl hacking/*.txt
+%doc README THANKS AUTHORS ChangeLog keysyms.dat keysyms.pl hacking/*.txt
%{_datadir}/%{name}
%if %{with fb}