Author: musuruan
Update of /cvs/free/rpms/Nestopia/devel
In directory se02.es.rpmfusion.net:/tmp/cvs-serv29048/devel
Modified Files:
.cvsignore sources
Added Files:
Nestopia-1.36-nesntsc.patch Nestopia-1.40-fixmakefile.patch
Nestopia.desktop Nestopia.spec nestopia.sh
Log Message:
First import
Nestopia-1.36-nesntsc.patch:
--- NEW FILE Nestopia-1.36-nesntsc.patch ---
--- source/core/NstVideoFilterNtsc.hpp.orig 2007-05-06 17:30:00.000000000 +0200
+++ source/core/NstVideoFilterNtsc.hpp 2007-05-06 17:31:21.000000000 +0200
@@ -25,7 +25,10 @@
#ifndef NST_VIDEO_FILTER_NTSC_H
#define NST_VIDEO_FILTER_NTSC_H
-#include "../nes_ntsc/nes_ntsc.h"
+extern "C"
+{
+#include <nes_ntsc.h>
+}
#ifdef NST_PRAGMA_ONCE
#pragma once
Nestopia-1.40-fixmakefile.patch:
--- NEW FILE Nestopia-1.40-fixmakefile.patch ---
--- Nestopia/Makefile.orig 2008-06-26 06:09:02.000000000 +0200
+++ Nestopia/Makefile 2008-07-15 14:04:05.000000000 +0200
@@ -5,7 +5,8 @@
CC = gcc
CPP = g++
-CFLAGS = -c -O3 -g3
+RPMFLAGS =
+CFLAGS = ${RPMFLAGS}
CFLAGS += -DNST_PRAGMA_ONCE_SUPPORT -D_SZ_ONE_DIRECTORY
CFLAGS += -Isource -Isource/core -Isource/zlib -Isource/core/api -Isource/core/board
-Isource/core/input -Isource/linux/unzip
CFLAGS += -Isource/core/vssystem -Isource/linux -Isource/nes_ntsc -I.. -I../nes_ntsc
-Isource/linux/7zip
@@ -18,7 +19,7 @@
CPPFLAGS = -Wno-deprecated -fno-rtti
EXE = nst
-LIBS = -lm -lz -lasound `sdl-config --libs` `pkg-config --libs gtk+-2.0`
+LIBS = -lm -lz -lasound -lnes_ntsc `sdl-config --libs` `pkg-config --libs gtk+-2.0`
# OpenGL Support
CFLAGS += -DINCLUDE_OPENGL
@@ -147,15 +148,15 @@
# build rules
objs/%.o: source/%.c
@echo Compiling $<...
- @$(CC) $(CFLAGS) $< -o $@
+ $(CC) $(CFLAGS) $< -o $@
objs/%.o: source/%.cpp
@echo Compiling $<...
- @$(CC) $(CFLAGS) $(CPPFLAGS) $< -o $@
+ $(CC) $(CFLAGS) $(CPPFLAGS) $< -o $@
objs/%.o: source/%.o
@echo Compiling $<...
- @$.o) $(CFLAGS) $.oFLAGS) $< -o $@
+ $.o) $(CFLAGS) $.oFLAGS) $< -o $@
all: maketree $(EXE) $(GENNSTCONTROLS)
@@ -168,7 +169,7 @@
# link the commandline exe
$(EXE): $(OBJS)
@echo Linking $@...
- @$(CPP) -g -o $(EXE) $^ $(LIBS)
+ $(CPP) -g -o $(EXE) $^ $(LIBS)
clean:
-@rm -f $(OBJS) $(EXE) $(GENNSTCONTROLS)
--- NEW FILE Nestopia.desktop ---
[Desktop Entry]
Encoding=UTF-8
Name=Nestopia
Comment=A portable open source NES/Famicom emulator
Exec=nestopia.sh
Icon=Nestopia.png
Terminal=false
Type=Application
Categories=Game;Emulator;
--- NEW FILE Nestopia.spec ---
%define pkgversion %(echo %version|sed s/[a-z]//g|sed s/\\\\.//)
%define pkgrelease %(echo %version|sed s/[^a-z]//g)
Name: Nestopia
Version: 1.40g
Release: 1%{?dist}
Summary: A portable open source NES/Famicom emulator
Group: Applications/Emulators
License: GPLv2+
URL:
http://nestopia.sourceforge.net/
Source0:
http://dl.sf.net/sourceforge/nestopia/%{name}%{pkgversion}src.zip
# Source1 is not downloadable without a valid browser user agent
Source1:
http://rbelmont.mameworld.info/nst%{pkgversion}_lnx_release_%{pkgrelease}...
Source2: Nestopia.desktop
Source3: nestopia.sh
Patch0: Nestopia-1.40-fixmakefile.patch
Patch1: Nestopia-1.36-nesntsc.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: gtk2-devel >= 2.4.0
BuildRequires: SDL-devel >= 1.2.12
BuildRequires: alsa-lib-devel
BuildRequires: zlib-devel
BuildRequires: nes_ntsc-devel
BuildRequires: pkgconfig
BuildRequires: ImageMagick
BuildRequires: desktop-file-utils
Requires: hicolor-icon-theme
%description
Nestopia is a portable open source NES/Famicom emulator written in C++. It's
designed to be as accurate as possible and supports a large number of
peripherals. The hardware is emulated at cycle-by-cycle granularity, ensuring
full support for software that do mid-scanline and other timing trickery.
Linux porting by R. Belmont.
%prep
%setup -q -c
%setup -q -T -D -a 1
%patch0 -p1
%patch1 -p0
# Fix end-of-line encoding
sed -i 's/\r//' changelog.txt
sed -i 's/\r//' source/linux/7zip/*
# Fix file permissions
chmod 644 source/linux/7zip/*
# Compile with system zlib
sed -i 's/\"..\/zlib\/zlib.h\"/\<zlib.h\>/'
source/core/NstZlib.cpp
%build
# It does not compile with smp_mflags
make RPMFLAGS="-c $RPM_OPT_FLAGS"
%install
rm -rf %{buildroot}
# Install main executable
install -d %{buildroot}%{_bindir}
install -m 755 nst %{buildroot}%{_bindir}
# Install data files
install -d %{buildroot}%{_datadir}/%{name}
install -m 644 {nstcontrols,NstDatabase.xml} %{buildroot}%{_datadir}/%{name}
# Install wrapper script
install -m 755 %{SOURCE3} %{buildroot}%{_bindir}
# Install desktop file
mkdir -p %{buildroot}%{_datadir}/applications
desktop-file-install --vendor dribble \
--dir %{buildroot}%{_datadir}/applications \
%{SOURCE2}
# Install icon
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/32x32/apps
convert source/win32/resource/window.ico \
%{buildroot}%{_datadir}/icons/hicolor/32x32/apps/Nestopia.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
%postun
touch --no-create %{_datadir}/icons/hicolor
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi
%files
%defattr(-,root,root)
%{_bindir}/nst
%{_bindir}/nestopia.sh
%{_datadir}/%{name}/nstcontrols
%{_datadir}/%{name}/NstDatabase.xml
%{_datadir}/icons/hicolor/32x32/apps/%{name}.png
%{_datadir}/applications/dribble-%{name}.desktop
%doc changelog.txt COPYING README.Linux readme.html
%changelog
* Tue Jul 15 2008 Andrea Musuruane <musuruan(a)gmail.com> 1.40g-1
- updated to 1.40 release g
* Tue Feb 26 2008 Andrea Musuruane <musuruan(a)gmail.com> 1.37-0.3.pre5
- fixed gcc 4.3 patch with the help of Ian Chapman
* Mon Feb 25 2008 Andrea Musuruane <musuruan(a)gmail.com> 1.37-0.2.pre5
- added a patch to compile with gcc 4.3
* Sat Feb 23 2008 Andrea Musuruane <musuruan(a)gmail.com> 1.37-0.1.pre5
- updated to 1.37 preview 5
- removed %%{?_smp_mflags} from make invocation
- changed license due to new guidelines
- removed %%{?dist} tag from changelog
- updated icon cache scriptlets to be compliant to new guidelines
* Sun May 06 2007 Andrea Musuruane <musuruan(a)gmail.com> 1.36-0.1.pre4
- updated to 1.36 preview 4
- added gtk2-devel, pkgconfig, ImageMagick and desktop-file-utils to BR
- updated SDL-devel version in BR
- added hicolor-icon-theme to Requires
- added desktop file and icon
- added a wrapper script to copy data files under ~/.nestopia and run the
main executable
- cosmetic changes
* Sat Nov 11 2006 Andrea Musuruane <musuruan(a)gmail.com> 1.32-0.2.pre1
- added Source1 full URL
- replaced %%{__sed} with sed
- versioning now follows Fedora guidelines
- added a patch from Ian Chapman to increase verbosity and use $RPM_OPT_FLAGS
in Makefile
- added a patch from Ian Chapman to use the system nes_ntsc instead of bundled
nes_ntsc
- now using system zlib instead of bundled zlib
* Wed Oct 25 2006 Andrea Musuruane <musuruan(a)gmail.com> 1.32-0.1.pre1
- initial package
--- NEW FILE nestopia.sh ---
#!/bin/bash
# Nestopia launch script
# Jul 16 2008 Andrea Musuruane <musuruan(a)gmail.com>
EXECNAME=nst
DATADIR=/usr/share/Nestopia
USERDIR=$HOME/.nestopia
# Push current working directory
pushd . > /dev/null
# See if user already has his personal directoy
if ! [ -d $USERDIR ]
then
# No, let's set it up!
mkdir -p $USERDIR
cd $USERDIR
# Create links to files which are not (usually) modified by users
for i in $DATADIR/NstDatabase.xml
do
ln -s $i
done
# Copy files which can be modified by users
for i in $DATADIR/nstcontrols
do
cp $i .
done
fi
# Remove and update user files
if [ -L $USERDIR/NstDatabase.dat ]
then
cd $USERDIR
rm NstDatabase.dat
ln -s $DATADIR/NstDatabase.xml
fi
# Pop working directory
popd > /dev/null
# Run main program
exec $EXECNAME "$@"
Index: .cvsignore
===================================================================
RCS file: /cvs/free/rpms/Nestopia/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore 1 Jun 2008 12:17:20 -0000 1.1
+++ .cvsignore 18 Jul 2008 12:13:14 -0000 1.2
@@ -0,0 +1,2 @@
+Nestopia140src.zip
+nst140_lnx_release_g.zip
Index: sources
===================================================================
RCS file: /cvs/free/rpms/Nestopia/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources 1 Jun 2008 12:17:20 -0000 1.1
+++ sources 18 Jul 2008 12:13:14 -0000 1.2
@@ -0,0 +1,2 @@
+526c99a06d2b257135e7047b0ed95ae0 Nestopia140src.zip
+4311ca8a050e1c39dae4f1bb98c6cbe9 nst140_lnx_release_g.zip