Author: musuruan
Update of /cvs/free/rpms/gambatte/F-9
In directory se02.es.rpmfusion.net:/tmp/cvs-serv25869/F-9
Modified Files:
.cvsignore sources
Added Files:
gambatte-0.4.0-alsa.patch gambatte-0.4.0-cflags.patch
gambatte-0.4.0-usesystemlibraries.patch gambatte-qt.desktop
gambatte.spec gameboy_icon.png
Log Message:
First import
gambatte-0.4.0-alsa.patch:
--- NEW FILE gambatte-0.4.0-alsa.patch ---
--- gambatte_src-0.4.0/gambatte_qt/src/framework/framework.pro.orig 2008-10-28
00:03:48.000000000 +0100
+++ gambatte_src-0.4.0/gambatte_qt/src/framework/framework.pro 2008-12-02
15:25:16.000000000 +0100
@@ -109,7 +109,7 @@
-lXrandr #\
# -lXxf86vm \
# -lXinerama
- linux-g++ {
+ linux-g++|linux-g++-64 {
SOURCES += framework/addaudioengines_linux.cpp \
framework/audioengines/alsaengine.cpp \
framework/SDL_Joystick/src/linux/SDL_sysjoystick.c
gambatte-0.4.0-cflags.patch:
--- NEW FILE gambatte-0.4.0-cflags.patch ---
diff -dur gambatte_src-0.4.0.orig/gambatte_qt/src/framework/framework.pro
gambatte_src-0.4.0/gambatte_qt/src/framework/framework.pro
--- gambatte_src-0.4.0.orig/gambatte_qt/src/framework/framework.pro 2008-10-28
00:03:48.000000000 +0100
+++ gambatte_src-0.4.0/gambatte_qt/src/framework/framework.pro 2008-11-15
17:35:50.000000000 +0100
@@ -68,7 +68,6 @@
INCLUDEPATH += framework/SDL_Joystick/include
INCLUDEPATH += $$COMMONPATH
DEFINES += HAVE_STDINT_H
-QMAKE_CXXFLAGS += -fno-exceptions -fno-rtti
macx {
HEADERS += $$COMMONPATH/ringbuffer.h
diff -dur gambatte_src-0.4.0.orig/gambatte_sdl/SConstruct
gambatte_src-0.4.0/gambatte_sdl/SConstruct
--- gambatte_src-0.4.0.orig/gambatte_sdl/SConstruct 2008-10-28 00:03:47.000000000 +0100
+++ gambatte_src-0.4.0/gambatte_sdl/SConstruct 2008-11-15 17:20:15.000000000 +0100
@@ -1,5 +1,5 @@
-global_cflags = ARGUMENTS.get('CFLAGS', '-Wall -Wextra -O2
-fomit-frame-pointer')
-global_cxxflags = ARGUMENTS.get('CXXFLAGS', global_cflags + ' -fno-exceptions
-fno-rtti')
+global_cflags = ARGUMENTS.get('CFLAGS')
+global_cxxflags = ARGUMENTS.get('CXXFLAGS')
global_defines = ' -DHAVE_STDINT_H'
env = Environment(CPPPATH = ['src', '../libgambatte/include',
'../common'],
diff -dur gambatte_src-0.4.0.orig/libgambatte/SConstruct
gambatte_src-0.4.0/libgambatte/SConstruct
--- gambatte_src-0.4.0.orig/libgambatte/SConstruct 2008-10-28 00:03:48.000000000 +0100
+++ gambatte_src-0.4.0/libgambatte/SConstruct 2008-11-15 16:35:08.000000000 +0100
@@ -1,5 +1,5 @@
-global_cflags = ARGUMENTS.get('CFLAGS', '-Wall -Wextra -O2
-fomit-frame-pointer')
-global_cxxflags = ARGUMENTS.get('CXXFLAGS', global_cflags + ' -fno-exceptions
-fno-rtti')
+global_cflags = ARGUMENTS.get('CFLAGS')
+global_cxxflags = ARGUMENTS.get('CXXFLAGS')
global_defines = ' -DHAVE_STDINT_H -DCHAR_WIDTH_8'
env = Environment(CPPPATH = ['src', 'include', '../common'],
gambatte-0.4.0-usesystemlibraries.patch:
--- NEW FILE gambatte-0.4.0-usesystemlibraries.patch ---
diff -dur gambatte_src-0.4.0.orig/gambatte_sdl/SConstruct
gambatte_src-0.4.0/gambatte_sdl/SConstruct
--- gambatte_src-0.4.0.orig/gambatte_sdl/SConstruct 2008-10-28 00:03:47.000000000 +0100
+++ gambatte_src-0.4.0/gambatte_sdl/SConstruct 2008-11-03 16:43:32.000000000 +0100
@@ -26,9 +26,6 @@
conf = env.Configure()
-if conf.CheckLib('z'):
- env.Append(LIBS = ['z'])
-
conf.Finish()
env.Program('gambatte_sdl', sourceFiles)
diff -dur gambatte_src-0.4.0.orig/libgambatte/SConstruct
gambatte_src-0.4.0/libgambatte/SConstruct
--- gambatte_src-0.4.0.orig/libgambatte/SConstruct 2008-10-28 00:03:48.000000000 +0100
+++ gambatte_src-0.4.0/libgambatte/SConstruct 2008-11-03 16:41:38.000000000 +0100
@@ -52,10 +52,8 @@
conf = env.Configure()
-if conf.CheckHeader('zlib.h') and conf.CheckLib('z'):
- sourceFiles.append('src/file/unzip/unzip.c')
- sourceFiles.append('src/file/unzip/ioapi.c')
- sourceFiles.append('src/file/file_zip.cpp')
+if conf.CheckLib('z', autoadd=1) and conf.CheckLib('minizip',
autoadd=1):
+ sourceFiles.append('src/file/file_zip.cpp')
else:
sourceFiles.append('src/file/file.cpp')
diff -dur gambatte_src-0.4.0.orig/libgambatte/src/file/file_zip.cpp
gambatte_src-0.4.0/libgambatte/src/file/file_zip.cpp
--- gambatte_src-0.4.0.orig/libgambatte/src/file/file_zip.cpp 2008-10-28
00:03:48.000000000 +0100
+++ gambatte_src-0.4.0/libgambatte/src/file/file_zip.cpp 2008-11-03 16:42:34.000000000
+0100
@@ -22,7 +22,7 @@
#include <cstring>
namespace zlib {
-#include "unzip/unzip.h"
+#include <minizip/unzip.h>
}
using namespace std;
--- NEW FILE gambatte-qt.desktop ---
[Desktop Entry]
Encoding=UTF-8
Name=Gambatte Qt
GenericName=Game Boy / Game Boy Color emulator
Comment=An accuracy-focused Game Boy / Game Boy Color emulator
Exec=gambatte_qt
Icon=gambatte-qt
Terminal=false
Type=Application
Categories=Game;Emulator;
--- NEW FILE gambatte.spec ---
%define libname lib%{name}.so
%define soname %{libname}.0
Name: gambatte
Version: 0.4.0
Release: 4%{?dist}
Summary: An accuracy-focused Game Boy / Game Boy Color emulator
Group: Applications/Emulators
License: GPLv2
URL:
http://sourceforge.net/projects/gambatte/
Source0:
http://dl.sf.net/sourceforge/%{name}/%{name}_src-%{version}.tar.gz
Source1: gambatte-qt.desktop
Source2: gameboy_icon.png
# Andrea Musuruane
Patch0: %{name}-0.4.0-cflags.patch
Patch1: %{name}-0.4.0-usesystemlibraries.patch
# Patch submitted upstream SF #2377772
Patch2: %{name}-0.4.0-alsa.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: scons
BuildRequires: minizip-devel
BuildRequires: SDL-devel
BuildRequires: qt-devel >= 4
BuildRequires: libXv-devel
BuildRequires: desktop-file-utils
BuildRequires: ImageMagick
Requires: hicolor-icon-theme
%description
Gambatte is an accuracy-focused, open-source, cross-platform
Game Boy / Game Boy Color emulator written in C++. It is based on hundreds of
corner case hardware tests, as well as previous documentation and reverse
engineering efforts.
%package -n libgambatte
Summary: Core emulation code for Gambatte emulator
Group: System Environment/Libraries
%description -n libgambatte
Gambatte is an accuracy-focused, open-source, cross-platform
Game Boy / Game Boy Color emulator written in C++. It is based on hundreds of
corner case hardware tests, as well as previous documentation and reverse
engineering efforts.
The core emulation code is contained in a separate library back-end
(libgambatte) written in platform-independent C++.
%package -n libgambatte-devel
Summary: Development files for libgambatte
Group: Development/Libraries
Requires: libgambatte = %{version}-%{release}
%description -n libgambatte-devel
This package contains development files for libgambatte.
%package qt
Summary: Qt4 Gambatte front-end
Group: Applications/Emulators
%description qt
Gambatte is an accuracy-focused, open-source, cross-platform
Game Boy / Game Boy Color emulator written in C++. It is based on hundreds of
corner case hardware tests, as well as previous documentation and reverse
engineering efforts.
This is the GUI front-end using Trolltech's Qt4 toolkit.
%package sdl
Summary: SDL Gambatte front-end
Group: Applications/Emulators
%description sdl
Gambatte is an accuracy-focused, open-source, cross-platform
Game Boy / Game Boy Color emulator written in C++. It is based on hundreds of
corner case hardware tests, as well as previous documentation and reverse
engineering efforts.
This is a simple command-line SDL front-end.
%prep
%setup -q -n %{name}_src-%{version}
%patch0 -p1
%patch1 -p1
%patch2 -p1
# Fix file encoding
for txtfile in README \
gambatte_qt/man/gambatte_qt.6 \
gambatte_sdl/man/gambatte_sdl.6;
do
iconv --from=ISO-8859-1 --to=UTF-8 $txtfile > tmp
touch -r $txtfile tmp
mv tmp $txtfile
done
# Build a dynamic library
sed -i '/^env.Library/i\
env.AppendUnique(SHLINKFLAGS="-Wl,-soname=%{soname}")'
libgambatte/SConstruct
sed -i 's/env.Library/env.SharedLibrary/' libgambatte/SConstruct
%build
export QMAKE_CFLAGS="%{optflags}"
export QMAKE_CXXFLAGS="%{optflags}"
pushd libgambatte
scons %{?_smp_mflags} CFLAGS="%{optflags}" CXXFLAGS="%{optflags}"
# Make symlinks now as they are needed
mv %{libname} %{soname}
ln -s %{soname} %{libname}.%{version}
ln -s %{soname} %{libname}
popd
pushd gambatte_sdl
scons %{?_smp_mflags} CFLAGS="%{optflags}" CXXFLAGS="%{optflags}"
popd
pushd gambatte_qt
qmake-qt4
make %{?_smp_mflags}
popd
%install
rm -rf %{buildroot}
# Install include
install -d -m 755 %{buildroot}%{_includedir}/%{name}
install -m 644 libgambatte/include/* %{buildroot}%{_includedir}/%{name}
# Install lib and symlinks
install -d -m 755 %{buildroot}%{_libdir}
install -m 755 libgambatte/%{soname} %{buildroot}%{_libdir}
mv libgambatte/%{libname}.%{version} %{buildroot}%{_libdir}
mv libgambatte/%{libname} %{buildroot}%{_libdir}
# Install bin files
install -d -m 755 %{buildroot}%{_bindir}
install -m 755 gambatte_sdl/gambatte_sdl %{buildroot}%{_bindir}
install -m 755 gambatte_qt/bin/gambatte_qt %{buildroot}%{_bindir}
# Install man files
install -d -m 755 %{buildroot}%{_mandir}/man6
install -m 644 gambatte_sdl/man/gambatte_sdl.6 %{buildroot}%{_mandir}/man6
install -m 644 gambatte_qt/man/gambatte_qt.6 %{buildroot}%{_mandir}/man6
# install desktop file
mkdir -p %{buildroot}%{_datadir}/applications
desktop-file-install --vendor '' \
--dir %{buildroot}%{_datadir}/applications \
%{SOURCE1}
# install icons
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/32x32/apps
convert %{SOURCE2} -resize x32
%{buildroot}%{_datadir}/icons/hicolor/32x32/apps/gambatte-qt.png
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/64x64/apps
convert %{SOURCE2} -resize x64
%{buildroot}%{_datadir}/icons/hicolor/64x64/apps/gambatte-qt.png
%post -n libgambatte -p /sbin/ldconfig
%postun -n libgambatte -p /sbin/ldconfig
%post qt
touch --no-create %{_datadir}/icons/hicolor
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi
%postun qt
touch --no-create %{_datadir}/icons/hicolor
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi
%clean
rm -rf %{buildroot}
%files -n libgambatte
%defattr(-,root,root,-)
%{_libdir}/%{libname}.%{version}
%{_libdir}/%{soname}
%doc changelog COPYING README
%files -n libgambatte-devel
%defattr(-,root,root,-)
%{_libdir}/%{libname}
%{_includedir}/%{name}
%doc changelog COPYING README
%files sdl
%defattr(-,root,root,-)
%{_bindir}/gambatte_sdl
%{_mandir}/man6/gambatte_sdl.6*
%doc changelog COPYING README
%files qt
%defattr(-,root,root,-)
%{_bindir}/gambatte_qt
%{_mandir}/man6/gambatte_qt.6*
%{_datadir}/icons/hicolor/32x32/apps/gambatte-qt.png
%{_datadir}/icons/hicolor/64x64/apps/gambatte-qt.png
%{_datadir}/applications/gambatte-qt.desktop
%doc changelog COPYING README
%changelog
* Tue Dec 02 2008 Andrea Musuruane <musuruan(a)gmail.com> - 0.4.0-4
- Changed qt4-devel to qt-devel in BR
- Added a patch to compile alsa under linux 64bit systems
* Wed Nov 26 2008 Andrea Musuruane <musuruan(a)gmail.com> - 0.4.0-3
- Used an icon made by Peter Verschoor
- Cosmetic changes
* Tue Nov 25 2008 Andrea Musuruane <musuruan(a)gmail.com> - 0.4.0-2
- Improved macro usage
- Preserved timestamp of doc files converted to UTF-8
- Cosmetic changes
* Sat Nov 15 2008 Andrea Musuruane <musuruan(a)gmail.com> - 0.4.0-1
- First release for RPM Fusion
- Made a patch to use rpm optflags
- Made a patch to use system libraries
Index: .cvsignore
===================================================================
RCS file: /cvs/free/rpms/gambatte/F-9/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore 3 Dec 2008 20:33:19 -0000 1.1
+++ .cvsignore 4 Dec 2008 09:30:22 -0000 1.2
@@ -0,0 +1 @@
+gambatte_src-0.4.0.tar.gz
Index: sources
===================================================================
RCS file: /cvs/free/rpms/gambatte/F-9/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources 3 Dec 2008 20:33:19 -0000 1.1
+++ sources 4 Dec 2008 09:30:22 -0000 1.2
@@ -0,0 +1 @@
+c0e0976eadb21a46716a5bb07d9e6cef gambatte_src-0.4.0.tar.gz