Author: musuruan
Update of /cvs/free/rpms/zsnes/devel
In directory se02.es.rpmfusion.net:/tmp/cvs-serv4771/devel
Modified Files:
.cvsignore sources
Added Files:
zsnes-1.51-FORTIFY_SOURCE.patch
zsnes-1.51-Makefile.in.FIX.BROKENESS.patch
zsnes-1.51-gcc43.patch zsnes.spec
Log Message:
First import
zsnes-1.51-FORTIFY_SOURCE.patch:
--- NEW FILE zsnes-1.51-FORTIFY_SOURCE.patch ---
--- zsnes_1_51/src/initc.c.fortify 2007-01-20 01:02:24.000000000 +0100
+++ zsnes_1_51/src/initc.c 2007-02-26 12:10:19.000000000 +0100
@@ -1464,8 +1464,8 @@
clearmem2();
}
-extern unsigned char BRRBuffer[32];
-extern unsigned char echoon0;
+extern unsigned char BRRBuffer[];
+extern unsigned char echoon0[];
extern unsigned int PHdspsave;
extern unsigned int PHdspsave2;
unsigned char echobuf[90000];
@@ -1479,7 +1479,7 @@
memset(vidmemch4, 0, 4096);
memset(vidmemch8, 0, 4096);
memset(BRRBuffer, 0, PHdspsave);
- memset(&echoon0, 0, PHdspsave2);
+ memset(echoon0, 0, PHdspsave2);
memset(echobuf, 0, 90000);
memset(spcBuffera, 0, 65536*4+4096);
memset(DSPMem, 0, 256);
@@ -1822,7 +1822,7 @@
extern unsigned int nmiprevaddrl, nmiprevaddrh, nmirept, nmiprevline, nmistatus;
extern unsigned char spcnumread, yesoutofmemory;
-extern unsigned char NextLineCache, sramsavedis, sndrot, regsbackup[3019];
+extern unsigned char NextLineCache, sramsavedis, sndrot[], regsbackup[3019];
extern unsigned int Voice0Freq, Voice1Freq, Voice2Freq, Voice3Freq;
extern unsigned int Voice4Freq, Voice5Freq, Voice6Freq, Voice7Freq;
extern unsigned int dspPAdj;
@@ -2621,7 +2621,7 @@
}
sramsavedis = 0;
- memcpy(&sndrot, regsbackup, 3019);
+ memcpy(sndrot, regsbackup, 3019);
if (yesoutofmemory) { asm_call(outofmemfix); }
asm_call(GUIDoReset);
--- zsnes_1_51/src/zstate.c.fortify 2007-02-26 12:14:30.000000000 +0100
+++ zsnes_1_51/src/zstate.c 2007-02-26 12:17:22.000000000 +0100
@@ -99,15 +99,15 @@
copy_func(buffer, &cycpbl, 4);
copy_func(buffer, &cycpblt, 4);
//SNES PPU Register status
- copy_func(buffer, &sndrot, 3019);
+ copy_func(buffer, sndrot, 3019);
}
static void copy_spc_data(unsigned char **buffer, void (*copy_func)(unsigned char **,
void *, size_t))
{
//SPC stuff, DSP stuff
copy_func(buffer, SPCRAM, PHspcsave);
- copy_func(buffer, &BRRBuffer, PHdspsave);
- copy_func(buffer, &DSPMem, sizeof(DSPMem));
+ copy_func(buffer, BRRBuffer, PHdspsave);
+ copy_func(buffer, DSPMem, sizeof(DSPMem));
}
static void copy_extra_data(unsigned char **buffer, void (*copy_func)(unsigned char **,
void *, size_t))
@@ -156,7 +156,7 @@
/*
if (buffer) //Rewind stuff
{
- copy_func(&buffer, &echoon0, PHdspsave2);
+ copy_func(&buffer, echoon0, PHdspsave2);
}
*/
}
--- zsnes_1_51/src/gblvars.h.fortify 2007-02-26 12:12:33.000000000 +0100
+++ zsnes_1_51/src/gblvars.h 2007-02-26 12:12:36.000000000 +0100
@@ -33,9 +33,9 @@
extern unsigned int SfxR0, *setaramdata, ramsize, *sram, nmiprevaddrh;
extern unsigned int tempesi, tempedi, tempedx, tempebp;
extern unsigned int SPCMultA, PHnum2writespc7110reg, PHdspsave2;
-extern unsigned char sndrot, SPCRAM[65472], DSPMem[256], SA1Status, *SA1RAMArea;
-extern unsigned char DSP1Enable, DSP1COp, prevoamptr, BRRBuffer[32], *romdata;
-extern unsigned char curcyc, echoon0, spcnumread, NextLineCache, HIRQNextExe;
+extern unsigned char sndrot[], SPCRAM[65472], DSPMem[256], SA1Status, *SA1RAMArea;
+extern unsigned char DSP1Enable, DSP1COp, prevoamptr, BRRBuffer[], *romdata;
+extern unsigned char curcyc, echoon0[], spcnumread, NextLineCache, HIRQNextExe;
extern unsigned char vidmemch4[4096], vidmemch8[4096], vidmemch2[4096];
extern bool C4Enable, SFXEnable, SA1Enable, SPC7110Enable, SETAEnable, DSP4Enable,
spcon;
zsnes-1.51-Makefile.in.FIX.BROKENESS.patch:
--- NEW FILE zsnes-1.51-Makefile.in.FIX.BROKENESS.patch ---
diff -dur zsnes_1_51.orig/src/Makefile.in zsnes_1_51/src/Makefile.in
--- zsnes_1_51.orig/src/Makefile.in 2007-02-03 17:10:13.000000000 +0100
+++ zsnes_1_51/src/Makefile.in 2007-02-03 17:18:00.000000000 +0100
@@ -142,10 +142,10 @@
./autogen.sh --recheck
install:
- @INSTALL@ -d -m 0755 $(DESTDIR)/@prefix@/bin
- @INSTALL@ -m 0755 @ZSNESEXE@ $(DESTDIR)/@prefix@/bin
- @INSTALL@ -d -m 0755 $(DESTDIR)/@prefix@/man/man1
- @INSTALL@ -m 0644 linux/zsnes.1 $(DESTDIR)/@prefix@/man/man1
+ @INSTALL@ -d -m 0755 ${DESTDIR}/@bindir@
+ @INSTALL@ -m 0755 @ZSNESEXE@ ${DESTDIR}/@bindir@
+ @INSTALL@ -d -m 0755 ${DESTDIR}/@mandir@/man1
+ @INSTALL@ -m 0644 linux/zsnes.1 ${DESTDIR}/@mandir@/man1
uninstall:
rm -f @prefix@/bin/$(notdir @ZSNESEXE@) @prefix(a)/man/man1/zsnes.1
zsnes-1.51-gcc43.patch:
--- NEW FILE zsnes-1.51-gcc43.patch ---
diff -durN zsnes_1_51/src/parsegen.cpp zsnes_1_51_gcc43/src/parsegen.cpp
--- zsnes_1_51/src/parsegen.cpp 2007-01-16 00:58:43.000000000 +0100
+++ zsnes_1_51_gcc43/src/parsegen.cpp 2008-03-21 20:17:44.000000000 +0100
@@ -25,6 +25,7 @@
#include <iostream>
#include <fstream>
+#include <cstring>
#include <string>
#include <vector>
#include <algorithm>
@@ -1828,7 +1829,7 @@
}
}
-int main(size_t argc, const char **argv)
+int main(int argc, const char *const *const argv)
{
const char *cheader_file = 0;
bool compile = false;
diff -durN zsnes_1_51/src/tools/depbuild.cpp zsnes_1_51_gcc43/src/tools/depbuild.cpp
--- zsnes_1_51/src/tools/depbuild.cpp 2006-12-27 12:04:05.000000000 +0100
+++ zsnes_1_51_gcc43/src/tools/depbuild.cpp 2008-03-21 20:16:07.000000000 +0100
@@ -23,6 +23,7 @@
#include <iostream>
#include <string>
+#include <cstdlib>
#include <cstdio>
using namespace std;
@@ -183,7 +184,7 @@
}
}
-int main(size_t argc, const char *const *const argv)
+int main(int argc, const char *const *const argv)
{
if (argc < 5)
{
diff -durN zsnes_1_51/src/tools/strutil.h zsnes_1_51_gcc43/src/tools/strutil.h
--- zsnes_1_51/src/tools/strutil.h 2006-12-27 12:04:05.000000000 +0100
+++ zsnes_1_51_gcc43/src/tools/strutil.h 2008-03-21 20:16:07.000000000 +0100
@@ -25,6 +25,7 @@
#include <string>
#include <vector>
#include <cctype>
+#include <cstring>
struct ci_char_traits : public std::char_traits<char>
{
--- NEW FILE zsnes.spec ---
%define pkgversion %(echo %version|sed s/\\\\\.//)
%define pkgsubdir %(echo %version|sed s/\\\\\./_/)
Summary: ZSNES is a Super Nintendo emulator
Name: zsnes
Version: 1.51
Release: 2%{?dist}
License: GPLv2
Group: Applications/Emulators
URL:
http://www.zsnes.com/
Source:
http://dl.sf.net/%{name}/%{name}%{pkgversion}src.tar.bz2
# Source Mage
Patch1: zsnes-1.51-Makefile.in.FIX.BROKENESS.patch
# Hans de Goede
Patch2: zsnes-1.51-FORTIFY_SOURCE.patch
# Paul Bender (minimyth)
Patch3: zsnes-1.51-gcc43.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
ExclusiveArch: %{ix86}
BuildRequires: automake
BuildRequires: nasm
BuildRequires: SDL-devel >= 1.2.0
BuildRequires: zlib-devel >= 1.2.3
BuildRequires: libpng-devel >= 1.2.0
BuildRequires: libGL-devel
BuildRequires: ncurses-devel
BuildRequires: libao-devel
BuildRequires: desktop-file-utils
Requires: hicolor-icon-theme
%description
This is an emulator for Nintendo's 16 bit console, called Super Nintendo
Entertainment System or Super Famicom. It features a pretty accurate emulation
of that system's graphic and sound capabilities.
The GUI enables the user to select games, change options, enable cheat codes
and to save the game state, even network play is possible.
%prep
%setup -q -n %{name}_%{pkgsubdir}/src
%patch1 -p2
%patch2 -p2
%patch3 -p2
# Remove hardcoded CFLAGS and LDFLAGS
sed -i \
-e 's:^\s*CFLAGS=.* -D__RELEASE__.*$:CFLAGS="$CFLAGS -D__RELEASE__":'
\
-e 's:^\s*CFLAGS=.* -I\/usr\/local\/include .*$:CFLAGS="${CFLAGS}
-I.":' \
-e '/^\s*LDFLAGS=.* -L\/usr\/local\/lib /d' \
configure.in
# Fix line encodings in docs/readme.txt/*
sed -i 's/\r//' ../docs/readme.txt/*.txt
# Fix char encondigs
iconv --from=ISO-8859-1 --to=UTF-8 ../docs/readme.txt/games.txt >
../docs/readme.txt/games.txt.utf8
mv ../docs/readme.txt/games.txt.utf8 ../docs/readme.txt/games.txt
iconv --from=ISO-8859-1 --to=UTF-8 ../docs/readme.txt/support.txt >
../docs/readme.txt/support.txt.utf8
mv ../docs/readme.txt/support.txt.utf8 ../docs/readme.txt/support.txt
# Remove icon extension from desktop file
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}"
make %{?_smp_mflags}
%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot}
# install desktop file
mkdir -p %{buildroot}%{_datadir}/applications
desktop-file-install \
--vendor dribble \
--remove-category Application \
--dir %{buildroot}%{_datadir}/applications \
linux/%{name}.desktop
# install icons
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/{16x16,32x32,48x48,64x64}/apps
install -m 644 icons/16x16x32.png
%{buildroot}%{_datadir}/icons/hicolor/16x16/apps/zsnes.png
install -m 644 icons/32x32x32.png
%{buildroot}%{_datadir}/icons/hicolor/32x32/apps/zsnes.png
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
%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}/zsnes
%{_mandir}/man1/zsnes.1*
%{_datadir}/applications/dribble-%{name}.desktop
%{_datadir}/icons/hicolor/16x16/apps/%{name}.png
%{_datadir}/icons/hicolor/32x32/apps/%{name}.png
%{_datadir}/icons/hicolor/48x48/apps/%{name}.png
%{_datadir}/icons/hicolor/64x64/apps/%{name}.png
%doc ../docs/authors.txt ../docs/license.txt ../docs/README.LINUX
%doc ../docs/support.txt ../docs/thanks.txt ../docs/todo.txt
%doc ../docs/readme.htm/ ../docs/readme.txt/
%changelog
* Fri Mar 21 2008 Andrea Musuruane <musuruan(a)gmail.com> 1.51-2
- enabled libao
- changed license due to new guidelines
- added a patch by Paul Bender to compile with gcc 4.3
- removed icon extension from desktop file to match Icon Theme Specification
- removed %%{?dist} tag from changelog
- updated icon cache scriptlets to be compliant to new guidelines
- fixed char encodings in docs
- cosmetic changes
* Thu Mar 01 2007 Andrea Musuruane <musuruan(a)gmail.com> 1.51-1
- updated to 1.51
- distfile is now a .tar.bz2 instead of a .tar.gz
- added zlib 1.2.3 or greater to BR, now required by ZSNES
- added missing libGL-devel to BR
- added missing hicolor-icon-theme to Requires
- now using new desktop file supplied by upstream (but patched)
- dropped --add-category X-Fedora from desktop-file-install
- fixed line encodings in docs/readme.txt/*
- updated doc files
- removed no longer needed patches
- removed hardcoded CFLAGS and LDFLAGS in %%prep (taken from Gentoo)
- added a new patch from Hans de Goede to compile with -DFORTIFY_SOURCE used
in %%configure
* Mon Nov 13 2006 Andrea Musuruane <musuruan(a)gmail.com> 1.42-2
- added missing desktop-file-utils to BuildRequires
* Sun Nov 12 2006 Andrea Musuruane <musuruan(a)gmail.com> 1.42-1
- initial package
- used a patch from Source Mage to handle @bindir@ and @mandir@ in Makefile
- used a patch from Hans de Goede to compile with -DFORTIFY_SOURCE used
in %%configure
- used a patch from Erik Musick via Gentoo #117771 to fix a QA notice on
executable stack (otherwise running with SELinux enabled breaks)
- used a patch from Leonardo Boshell via Gentoo #125861 to fix a memory
corruption bug
- used a patch from Gentoo to fix configure
- used a patch from Terran Melconian via Debian #199461 to fix loading and
saving of state files (integrated into Hans' patch otherwise they would
conflict)
- used a patch from upstream CVS to fix 100% CPU problem while in GUI
(see Debian #319299)
Index: .cvsignore
===================================================================
RCS file: /cvs/free/rpms/zsnes/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore 1 Jun 2008 15:07:27 -0000 1.1
+++ .cvsignore 19 Jul 2008 19:21:26 -0000 1.2
@@ -0,0 +1 @@
+zsnes151src.tar.bz2
Index: sources
===================================================================
RCS file: /cvs/free/rpms/zsnes/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources 1 Jun 2008 15:07:27 -0000 1.1
+++ sources 19 Jul 2008 19:21:26 -0000 1.2
@@ -0,0 +1 @@
+328071775f88f7c3b9fdb94176e5e417 zsnes151src.tar.bz2