summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Sterrett <mr_bones_@gentoo.org>2011-09-29 20:11:35 +0000
committerMichael Sterrett <mr_bones_@gentoo.org>2011-09-29 20:11:35 +0000
commit37530d2f56c863e828a7561f1f0585da54888f0e (patch)
tree7641dd05781c5609025c1f302c18a52271653475 /games-emulation
parentUSE="static-libs" and remove libtool files (diff)
downloadhistorical-37530d2f56c863e828a7561f1f0585da54888f0e.tar.gz
historical-37530d2f56c863e828a7561f1f0585da54888f0e.tar.bz2
historical-37530d2f56c863e828a7561f1f0585da54888f0e.zip
fix building with newer zlib (bug #384473); add patch from rpmfusion (bug #257963)
Package-Manager: portage-2.1.10.11/cvs/Linux i686
Diffstat (limited to 'games-emulation')
-rw-r--r--games-emulation/zsnes/ChangeLog7
-rw-r--r--games-emulation/zsnes/Manifest15
-rw-r--r--games-emulation/zsnes/files/zsnes-1.51-buffer.patch85
-rw-r--r--games-emulation/zsnes/zsnes-1.51-r2.ebuild42
4 files changed, 118 insertions, 31 deletions
diff --git a/games-emulation/zsnes/ChangeLog b/games-emulation/zsnes/ChangeLog
index 62a11c82543b..9f823f8504df 100644
--- a/games-emulation/zsnes/ChangeLog
+++ b/games-emulation/zsnes/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for games-emulation/zsnes
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/games-emulation/zsnes/ChangeLog,v 1.47 2011/09/14 08:45:05 ssuominen Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-emulation/zsnes/ChangeLog,v 1.48 2011/09/29 20:11:35 mr_bones_ Exp $
+
+ 29 Sep 2011; Michael Sterrett <mr_bones_@gentoo.org> zsnes-1.51-r2.ebuild,
+ +files/zsnes-1.51-buffer.patch:
+ fix building with newer zlib (bug #384473); add patch from rpmfusion (bug
+ #257963)
14 Sep 2011; Samuli Suominen <ssuominen@gentoo.org> zsnes-1.51-r2.ebuild,
+files/zsnes-1.51-libpng15.patch:
diff --git a/games-emulation/zsnes/Manifest b/games-emulation/zsnes/Manifest
index 8256e79ce6c1..20f7e26a75f6 100644
--- a/games-emulation/zsnes/Manifest
+++ b/games-emulation/zsnes/Manifest
@@ -1,21 +1,12 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA256
-
AUX zsnes-1.51-CC-quotes.patch 812 RMD160 e0ed454da3a4ceb034089d8ca8b4ad5ea634a91e SHA1 73b2b1a5536e9bd7e3d0a24f86c2ce36103cfe66 SHA256 88082857f72d10e629a0b725d7ca3b558e9e0e733e1da49494c52cafadbb48a9
AUX zsnes-1.51-archopt-july-23-update.patch 12740 RMD160 e8004f97f795c13d51fa16c5bf386dfc8b12058f SHA1 4e59c16f0e5c57cfa6e5df2b50026598e77eab5a SHA256 4fc49ccafe46dafb1db57226e6989f6a5c97e826595df881d90bad1694a9906e
+AUX zsnes-1.51-buffer.patch 3373 RMD160 6c1913d5dbdfa7c52f755d8f320cf85c10699637 SHA1 1412a0af84de45b806bab10bda5cd2e3de885948 SHA256 8d96a9bbf2b1075b16d3827a42efdbaf0c6c6cfa6e97609bfabe1b069b370d51
AUX zsnes-1.51-depbuild.patch 631 RMD160 bd17f4dc521fb186a62e91350c9dcdc97c1c3256 SHA1 20568092a34c60f94038d3cc5b107e36269b4df2 SHA256 ab22b2fd1dfda5f377cafa0df19269259305aeab15d3c3ae6bf511b222dc6359
AUX zsnes-1.51-gcc43.patch 913 RMD160 95ab52f570dd1e5c7d0852dac17d56ada4939079 SHA1 9bbececf44cc48a4d6b48ebff66ba657ef409168 SHA256 9eb0aff2be2b303295b0d0a76240facd13dca170b97fe3ee827a6c26d89d53de
AUX zsnes-1.51-libao-thread.patch 663 RMD160 10b0ce28577e39187f98d8f392462585148d34eb SHA1 67a34c9a5f8c6abb2881007d47ba10647ca4503a SHA256 71be0bbb8b683edc7c7780b68a43e54be7a8c341bf9b2a01e5cceb53834b1a73
AUX zsnes-1.51-libpng.patch 974 RMD160 36bdb059c6641376bee6ea5040a7045420c02870 SHA1 a4f7960de8eece5ac1c51cc8b58f6fb8964bca40 SHA256 9e5ba014ba847f7e10075dfd51b0ca42b86aa2dcc47952d569c304f3e8e15470
AUX zsnes-1.51-libpng15.patch 510 RMD160 72682ef320f6b23e3626e7acfa2479b2ccb00b7f SHA1 e6c8d2985d602c659a472e23278f9e0f2c2e6aea SHA256 c9636e76441ae1624c8ddc92e47facc20b43871fb0f55fd50d526b10944c6560
DIST zsnes151src.tar.bz2 1071712 RMD160 337407bf7e5516bcd7bf310c7b17d6d12a948750 SHA1 03df35490870c9950d7010747d0546c8525c0362 SHA256 eb013f824f5a9814a714cf0daaea3ea68a1c74fd741e5b0979fcb7964236a866
-EBUILD zsnes-1.51-r2.ebuild 2370 RMD160 6ea1fae4980aabd6d82b45d9a80d5417a39f68b2 SHA1 9073650390e4d5c779aba3db23a3596f4cfc57ca SHA256 1d2ba920a3bdaa5c1c1569fb8cc9f2a922f89c0b273d70e57e09e11ad622fb7e
-MISC ChangeLog 9467 RMD160 93f92bee09973691c3715096be1c3a5c137002fc SHA1 821e0926cb6cc29c0048430852580b3469b11899 SHA256 1734c12ad620e3ddc44fbc83e41ab1b468113668de5eea7c8a8eee7ba65de16a
+EBUILD zsnes-1.51-r2.ebuild 2540 RMD160 0010a2b3493d0d565df82fbfd0e60a4cd4304550 SHA1 12cc986871dba8e01133728722774e1d9ec8512b SHA256 2340e8798b17a16f848220ef1731dece3371c76bd354c3f3240d036a812d9735
+MISC ChangeLog 9666 RMD160 d9b16d4f418ea7dc3a1d35c080a49c8c76d9c8f4 SHA1 406fac3e4bfd974f7baac640575644cb141bc9da SHA256 6e8581fd25f2a65a1374b0a394b427b18317ae731639655de5155a3cf6a33943
MISC metadata.xml 160 RMD160 f839c00d9f25c1f873f95ab899fb64060c1d0bf5 SHA1 08c3d180cf8dbef87e40c42a18b457516a5d7ffe SHA256 5ac0a3647e8149d52ce55d391cf1680ac52d6f0330be21c3bca4790b971b5e5d
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.18 (GNU/Linux)
-
-iF4EAREIAAYFAk5wacgACgkQXkR9YqOcLPH3YQD+NqISUVMwD0CLm8VVOKOe49VS
-WoAtwX5vH4H9WDo01LIA/RlleKQYgVhyfiro7MK814TuA9oABil593hTGZ/ntX2h
-=VRwM
------END PGP SIGNATURE-----
diff --git a/games-emulation/zsnes/files/zsnes-1.51-buffer.patch b/games-emulation/zsnes/files/zsnes-1.51-buffer.patch
new file mode 100644
index 000000000000..1f7754d7c16c
--- /dev/null
+++ b/games-emulation/zsnes/files/zsnes-1.51-buffer.patch
@@ -0,0 +1,85 @@
+--- 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;
diff --git a/games-emulation/zsnes/zsnes-1.51-r2.ebuild b/games-emulation/zsnes/zsnes-1.51-r2.ebuild
index 8853821544bf..ce337fd48112 100644
--- a/games-emulation/zsnes/zsnes-1.51-r2.ebuild
+++ b/games-emulation/zsnes/zsnes-1.51-r2.ebuild
@@ -1,7 +1,8 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/games-emulation/zsnes/zsnes-1.51-r2.ebuild,v 1.8 2011/09/14 08:45:05 ssuominen Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-emulation/zsnes/zsnes-1.51-r2.ebuild,v 1.9 2011/09/29 20:11:35 mr_bones_ Exp $
+EAPI=2
inherit eutils autotools flag-o-matic toolchain-funcs multilib games
DESCRIPTION="SNES (Super Nintendo) emulator that uses x86 assembly"
@@ -13,7 +14,7 @@ SLOT="0"
KEYWORDS="-* amd64 x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux"
IUSE="ao custom-cflags opengl png"
-RDEPEND="media-libs/libsdl
+RDEPEND="media-libs/libsdl[audio,video]
>=sys-libs/zlib-1.2.3-r1
amd64? ( >=app-emulation/emul-linux-x86-sdl-10.1 )
ao? ( media-libs/libao )
@@ -25,23 +26,25 @@ DEPEND="${RDEPEND}
S=${WORKDIR}/${PN}_${PV//./_}/src
-src_unpack() {
- unpack ${A}
- cd "${S}"
-
+src_prepare() {
# Fixing compilation without libpng installed
- epatch "${FILESDIR}"/${P}-libpng.patch
# Fix bug #186111
- epatch "${FILESDIR}"/${P}-archopt-july-23-update.patch
- epatch "${FILESDIR}"/${P}-gcc43.patch
# Fix bug #214697
- epatch "${FILESDIR}"/${P}-libao-thread.patch
# Fix bug #170108
- epatch "${FILESDIR}"/${P}-depbuild.patch
# Fix bug #260247
- epatch "${FILESDIR}"/${P}-CC-quotes.patch
# Fix compability with libpng15 wrt #378735
- epatch "${FILESDIR}"/${P}-libpng15.patch
+ # Fix buffer overwrite #257963
+ epatch \
+ "${FILESDIR}"/${P}-libpng.patch \
+ "${FILESDIR}"/${P}-archopt-july-23-update.patch \
+ "${FILESDIR}"/${P}-gcc43.patch \
+ "${FILESDIR}"/${P}-libao-thread.patch \
+ "${FILESDIR}"/${P}-depbuild.patch \
+ "${FILESDIR}"/${P}-CC-quotes.patch \
+ "${FILESDIR}"/${P}-libpng15.patch \
+ "${FILESDIR}"/${P}-buffer.patch
+
+ sed -i -e '67i#define OF(x) x' zip/zunzip.h || die
# Remove hardcoded CFLAGS and LDFLAGS
sed -i \
@@ -53,7 +56,7 @@ src_unpack() {
eautoreconf
}
-src_compile() {
+src_configure() {
tc-export CC
use amd64 && multilib_toolchain_setup x86
use custom-cflags || strip-flags
@@ -67,8 +70,10 @@ src_compile() {
--disable-debug \
--disable-cpucheck \
--enable-release \
- force_arch=no \
- || die
+ force_arch=no
+}
+
+src_compile() {
emake makefile.dep || die "emake makefile.dep failed"
emake || die "emake failed"
}
@@ -76,8 +81,9 @@ src_compile() {
src_install() {
dogamesbin zsnes || die "dogamesbin failed"
newman linux/zsnes.1 zsnes.6
- dodoc ../docs/{readme.1st,*.txt,README.LINUX}
- dodoc ../docs/readme.txt/*
+ dodoc \
+ ../docs/{readme.1st,authors.txt,srcinfo.txt,stdards.txt,support.txt,thanks.txt,todo.txt,README.LINUX} \
+ ../docs/readme.txt/*
dohtml -r ../docs/readme.htm/*
make_desktop_entry zsnes ZSNES
newicon icons/48x48x32.png ${PN}.png