summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2003-09-09 16:28:07 +0000
committerMike Frysinger <vapier@gentoo.org>2003-09-09 16:28:07 +0000
commitae044aeba549da343d278a26bb72bac844e5a5e4 (patch)
treeb16ea879113ef2bd09bb78bb00e8338b088d3afb /games-emulation/fceultra
parentNew package - rename. (diff)
downloadgentoo-2-ae044aeba549da343d278a26bb72bac844e5a5e4.tar.gz
gentoo-2-ae044aeba549da343d278a26bb72bac844e5a5e4.tar.bz2
gentoo-2-ae044aeba549da343d278a26bb72bac844e5a5e4.zip
welcome to games-emulation
Diffstat (limited to 'games-emulation/fceultra')
-rw-r--r--games-emulation/fceultra/ChangeLog60
-rw-r--r--games-emulation/fceultra/Manifest7
-rw-r--r--games-emulation/fceultra/fceultra-093.ebuild55
-rw-r--r--games-emulation/fceultra/fceultra-096.ebuild57
-rw-r--r--games-emulation/fceultra/files/096-joystick.patch99
-rw-r--r--games-emulation/fceultra/files/096-stereo.patch87
-rw-r--r--games-emulation/fceultra/files/digest-fceultra-0931
-rw-r--r--games-emulation/fceultra/files/digest-fceultra-0961
8 files changed, 367 insertions, 0 deletions
diff --git a/games-emulation/fceultra/ChangeLog b/games-emulation/fceultra/ChangeLog
new file mode 100644
index 000000000000..ee919f51d947
--- /dev/null
+++ b/games-emulation/fceultra/ChangeLog
@@ -0,0 +1,60 @@
+# ChangeLog for app-emulation/fceultra
+# Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/games-emulation/fceultra/ChangeLog,v 1.1 2003/09/09 16:26:50 vapier Exp $
+
+ 21 Jul 2003; Phil Bordelon <sunflare@gentoo.org> :
+ Just a note that the patches vapier committed are from Jeff Balk
+ <balk0016@umn.edu>.
+
+*fceultra-096 (24 Jun 2003)
+
+ 27 Jun 2003; Mike Frysinger <vapier@gentoo.org> :
+ Tweaked syntax and unmasked for #20320.
+
+ 24 Jun 2003; Phil Bordelon <sunflare@gentoo.org> fceultra-096.ebuild:
+ Version bump. Note that this version seems to have a couple of issues with
+ joystick control; only upgrade if necessary, until an upstream version with
+ fixes appears.
+
+*fceultra-093 (18 Mar 2003)
+
+ 18 Mar 2003; Phil Bordelon <sunflare@gentoo.org> fceultra-093.ebuild:
+ Updated to the latest version of fceultra. This requires GCC 3.2.2, so
+ it's got that as a requirement now. Marked as testing for obvious
+ reasons.
+
+*fceultra-081-r1 (22 Nov 2002)
+
+ 01 Dec 2002; Mike Frysinger <vapier@gentoo.org> :
+ Added a check that if the compiler is gcc3.x, the ebuild fails #11426
+
+ 22 Nov 2002; Mike Frysinger <vapier@gentoo.org> :
+ Added support for sdl version #11089
+
+*fceultra-081 (21 Nov 2002)
+
+ 21 Nov 2002; Mike Frysinger <vapier@gentoo.org> :
+ Version bumpage
+
+*fceultra-080 (24 Jul 2002)
+
+ 06 Aug 2002; Mark Guertin <gerk@gentoo.org> :
+ Added -ppc to keywords
+
+ 24 July 2002; Sascha Schwabbauer <cybersystem@gentoo.org> fceultra-080.ebuild :
+ Updated to the newest version.
+
+*fceultra-070 (11 March 2002)
+
+ 11 March 2002; Donny Davies <woodchip@gentoo.org> fceultra-070.ebuild :
+ Renamed the ebuild to allow people to install it :) Closes #1057. Tidy
+ up the docs installed.
+
+*fceu-070 (1 Feb 2002)
+
+ 1 Feb 2002; G.Bevin <gbevin@gentoo.org> ChangeLog :
+ Added initial ChangeLog which should be updated whenever the package is
+ updated in any way. This changelog is targetted to users. This means that the
+ comments should well explained and written in clean English. The details about
+ writing correct changelogs are explained in the skel.ChangeLog file which you
+ can find in the root directory of the portage repository.
diff --git a/games-emulation/fceultra/Manifest b/games-emulation/fceultra/Manifest
new file mode 100644
index 000000000000..32e171df9729
--- /dev/null
+++ b/games-emulation/fceultra/Manifest
@@ -0,0 +1,7 @@
+MD5 637fe6dcdb2eddde6cc6d155954d6254 files/096-joystick.patch 2858
+MD5 2bea99b602547c36b835f373214b1286 files/096-stereo.patch 2203
+MD5 ec518d4868d947b4ce4ff1919933204a files/digest-fceultra-096 62
+MD5 c3258fd9a3fa0ee6c568f626c992d4eb files/digest-fceultra-093 62
+MD5 b4120bf8ea99134b9bd1fe9c3515c1be fceultra-093.ebuild 1329
+MD5 596a530a7cabfff7b437db14dc62f960 ChangeLog 2224
+MD5 92ca8db68fe5ae75282abbadb0ade7b3 fceultra-096.ebuild 1417
diff --git a/games-emulation/fceultra/fceultra-093.ebuild b/games-emulation/fceultra/fceultra-093.ebuild
new file mode 100644
index 000000000000..cb425c861486
--- /dev/null
+++ b/games-emulation/fceultra/fceultra-093.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/games-emulation/fceultra/fceultra-093.ebuild,v 1.1 2003/09/09 16:26:50 vapier Exp $
+
+inherit games gcc
+
+DESCRIPTION="A portable NES/Famicom emulator"
+HOMEPAGE="http://fceultra.sourceforge.net/"
+SRC_URI="http://fceultra.sourceforge.net/files/fceu${PV}src.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="-* x86"
+IUSE="sdl svga"
+
+# Because of code generation bugs, FCEUltra now depends on a version
+# of gcc greater than or equal to GCC 3.2.2.
+DEPEND="|| (
+ svga? ( media-libs/svgalib )
+ sdl? ( media-libs/libsdl )
+ media-libs/libsdl
+ )
+ >=sys-devel/gcc-3.2.2
+ sys-libs/zlib"
+
+S=${WORKDIR}/fceu
+
+src_unpack() {
+ unpack ${A}
+
+ cd ${S}
+ sed -i \
+ -e "s:\${TFLAGS}:\${TFLAGS} ${CFLAGS}:" \
+ Makefile.base
+}
+
+src_compile() {
+ if [ `use sdl` ] || [ -z "`use sdl``use svga`" ] ; then
+ make -f Makefile.unixsdl || die "sdl make failed"
+ mv fceu fceu-sdl
+ make -f Makefile.unixsdl clean
+ fi
+ if [ `use svga` ] ; then
+ make -f Makefile.linuxvga || die "svga make failed"
+ mv fceu fceu-svga
+ fi
+}
+
+src_install() {
+ use sdl && dogamesbin fceu-sdl
+ use svga && dogamesbin fceu-svga
+ use sdl || use svga || dogamesbin fceu-sdl
+ dodoc Documentation/{*,rel/readme-linux.txt}
+ prepgamesdirs
+}
diff --git a/games-emulation/fceultra/fceultra-096.ebuild b/games-emulation/fceultra/fceultra-096.ebuild
new file mode 100644
index 000000000000..65b2450a2464
--- /dev/null
+++ b/games-emulation/fceultra/fceultra-096.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/games-emulation/fceultra/fceultra-096.ebuild,v 1.1 2003/09/09 16:26:50 vapier Exp $
+
+inherit games gcc eutils
+
+DESCRIPTION="A portable NES/Famicom emulator"
+HOMEPAGE="http://fceultra.sourceforge.net/"
+SRC_URI="http://fceultra.sourceforge.net/files/fceu${PV}src.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="-* ~x86"
+IUSE="sdl svga"
+
+# Because of code generation bugs, FCEUltra now depends on a version
+# of gcc greater than or equal to GCC 3.2.2.
+DEPEND="|| (
+ svga? ( media-libs/svgalib )
+ sdl? ( media-libs/libsdl )
+ media-libs/libsdl
+ )
+ >=sys-devel/gcc-3.2.2
+ sys-libs/zlib"
+
+S=${WORKDIR}/fceu
+
+src_unpack() {
+ unpack ${A}
+
+ cd ${S}
+ epatch ${FILESDIR}/${PV}-stereo.patch
+ epatch ${FILESDIR}/${PV}-joystick.patch
+ sed -i \
+ -e "s:\${TFLAGS}:\${TFLAGS} ${CFLAGS}:" \
+ Makefile.base
+}
+
+src_compile() {
+ if [ `use sdl` ] || [ -z "`use sdl``use svga`" ] ; then
+ make -f Makefile.unixsdl || die "sdl make failed"
+ mv fceu fceu-sdl
+ make -f Makefile.unixsdl clean
+ fi
+ if [ `use svga` ] ; then
+ make -f Makefile.linuxvga || die "svga make failed"
+ mv fceu fceu-svga
+ fi
+}
+
+src_install() {
+ use sdl && dogamesbin fceu-sdl
+ use svga && dogamesbin fceu-svga
+ use sdl || use svga || dogamesbin fceu-sdl
+ dodoc Documentation/{*,rel/readme-linux.txt}
+ prepgamesdirs
+}
diff --git a/games-emulation/fceultra/files/096-joystick.patch b/games-emulation/fceultra/files/096-joystick.patch
new file mode 100644
index 000000000000..40bb7457a1b0
--- /dev/null
+++ b/games-emulation/fceultra/files/096-joystick.patch
@@ -0,0 +1,99 @@
+--- drivers/cli/sdl-joystick.c.orig 2003-06-21 22:49:24.000000000 -0500
++++ drivers/cli/sdl-joystick.c 2003-07-10 19:10:38.000000000 -0500
+@@ -143,20 +143,12 @@
+ /* Configure a joystick axis. */
+ void AConfig (int n, int a)
+ {
+- Sint16 lastaxe[64];
+- int numaxes;
+- int axis;
++ SDL_Event event;
+
+ WNoInput();
+
+ joyAMap[n][a] = a;
+
+- numaxes=SDL_JoystickNumAxes(jo[n]);
+- if(numaxes>64) numaxes=64;
+-
+- for(axis=0;axis<numaxes;axis++) /* Pre-load. */
+- lastaxe[axis]=SDL_JoystickGetAxis(jo[n], axis);
+-
+ while (1)
+ {
+ uint8 t;
+@@ -167,31 +159,26 @@
+ }
+ else
+ break;
+-
+- SDL_JoystickUpdate();
+-
+- for (axis=0;axis<numaxes;axis++) {
+- if (abs((Sint32)SDL_JoystickGetAxis(jo[n],axis)-lastaxe[axis]) > 8192) {
+- joyAMap[n][a] = axis;
+- /* 4096 should be good enough to account for any jitter. */
+- while (abs((Sint32)SDL_JoystickGetAxis(jo[n],axis)-lastaxe[axis]) > 4096) {
+- SDL_JoystickUpdate();
+- SDL_Delay(50);
+- }
+- goto endaconfig;
+- }
+- }
+- SDL_Delay(100);
+- }
+-
+- endaconfig:
+- WNoInput();
++
++ SDL_JoystickUpdate();
++ if (SDL_PollEvent(&event) && (event.type == SDL_JOYAXISMOTION))
++ {
++ // Make sure the joystick was moved by some significant amount
++ if ((event.jaxis.value < -3000) || (event.jaxis.value > 3000))
++ {
++ joyAMap[n][a] = event.jaxis.axis;
++ WNoInput();
++ return;
++ }
++ }
++ }
+ return;
+ }
+
+ /* Configure a joystick button. */
+ void BConfig (int n, int b)
+ {
++ SDL_Event event;
+ WNoInput();
+ joyBMap[n][b] = 0;
+ while (1)
+@@ -206,23 +193,15 @@
+ break;
+
+ SDL_JoystickUpdate();
++
++ if (SDL_PollEvent(&event) && event.type == SDL_JOYBUTTONDOWN)
+ {
+- int buttons;
+- for (buttons = SDL_JoystickNumButtons(jo[n])-1;buttons >= 0;buttons--) {
+- if (SDL_JoystickGetButton(jo[n],buttons)) {
+- joyBMap[n][b] = buttons+1;
+- while (SDL_JoystickGetButton(jo[n], buttons)) {
+- SDL_JoystickUpdate();
+- SDL_Delay(50);
+- }
+- goto endbconfig;
+- }
+- }
++ joyBMap[n][b] = event.jbutton.button+1;
++ WNoInput();
++ return;
+ }
+- SDL_Delay(100);
+ }
+
+- endbconfig:
+ WNoInput();
+ return;
+ }
diff --git a/games-emulation/fceultra/files/096-stereo.patch b/games-emulation/fceultra/files/096-stereo.patch
new file mode 100644
index 000000000000..f77f1acc66d7
--- /dev/null
+++ b/games-emulation/fceultra/files/096-stereo.patch
@@ -0,0 +1,87 @@
+--- drivers/common/unixdsp.c 2003-06-20 12:37:26.000000000 -0500
++++ drivers/common/unixdsp.c 2003-07-06 21:58:21.000000000 -0500
+@@ -36,6 +36,7 @@
+
+ static int format;
+ static int dspfd;
++static int fakestereo;
+
+ // fsize is in samples, not bytes(gets translated before ioctl())
+ int InitUNIXDSPSound(int *rate, int bits, int fsize, int nfrags, int dev)
+@@ -89,9 +90,19 @@
+
+ if(ioctl(dspfd,SNDCTL_DSP_SETFRAGMENT,&x)==-1)
+ printf("ERROR (continuing anyway)\n");
+- x=0;
++
++ // Set mono sound.
++ // Some sound cards can only do stereo, so simulate stereo for these cards.
++ x=1;
++ fakestereo=0;
+ printf("\n Setting mono sound...");
+- if(ioctl(dspfd,SNDCTL_DSP_STEREO,&x)==-1) goto __disperror;
++ if(ioctl(dspfd,SNDCTL_DSP_CHANNELS,&x)==-1) goto __disperror;
++ if(x == 2)
++ {
++ printf("\n Couldn't set mono, faking stereo...\n");
++ fakestereo = 1;
++ }
++
+ printf("\n Setting playback rate of %d hz...",*rate);
+ if(ioctl(dspfd,SNDCTL_DSP_SPEED,rate)==-1) goto __disperror;
+ printf("Set to %d hz\n",*rate);
+@@ -107,9 +119,10 @@
+ }
+
+ static int16 MBuffer[2048];
++static int16 fakebuffer[4098];
+ void WriteUNIXDSPSound(int32 *Buffer, int Count, int noblocking)
+ {
+- int P,c;
++ int P,c,i;
+ int32 *src=Buffer;
+
+ if(format)
+@@ -127,13 +140,35 @@
+ c=Count<<1;
+ }
+
+-// noblocking=!noblocking; // speed testing
+- if(noblocking)
++ // If a device can only support stereo, fake stereo by duplicating each item in the buffer.
++ if(fakestereo)
++ {
++ for (i=0; i <= c; i++ )
++ {
++ fakebuffer[2*i] = MBuffer[i];
++ fakebuffer[2*i+1] = MBuffer[i];
++ }
++ c = c * 2;
++ // noblocking=!noblocking; // speed testing
++ if(noblocking)
++ {
++ struct audio_buf_info ai;
++ if(!ioctl(dspfd,SNDCTL_DSP_GETOSPACE,&ai))
++ if(ai.bytes<c)
++ return;
++ }
++ write(dspfd,(uint8 *)fakebuffer,c);
++ }
++ else
+ {
+- struct audio_buf_info ai;
+- if(!ioctl(dspfd,SNDCTL_DSP_GETOSPACE,&ai))
+- if(ai.bytes<c)
+- return;
++ // noblocking=!noblocking; // speed testing
++ if(noblocking)
++ {
++ struct audio_buf_info ai;
++ if(!ioctl(dspfd,SNDCTL_DSP_GETOSPACE,&ai))
++ if(ai.bytes<c)
++ return;
++ }
++ write(dspfd,(uint8 *)MBuffer,c);
+ }
+- write(dspfd,(uint8 *)MBuffer,c);
+ }
diff --git a/games-emulation/fceultra/files/digest-fceultra-093 b/games-emulation/fceultra/files/digest-fceultra-093
new file mode 100644
index 000000000000..5f20e5cb2ae7
--- /dev/null
+++ b/games-emulation/fceultra/files/digest-fceultra-093
@@ -0,0 +1 @@
+MD5 c2fea068f1db62ec51f6fc77f1c5da82 fceu093src.tar.gz 450883
diff --git a/games-emulation/fceultra/files/digest-fceultra-096 b/games-emulation/fceultra/files/digest-fceultra-096
new file mode 100644
index 000000000000..6c2edb8d8d09
--- /dev/null
+++ b/games-emulation/fceultra/files/digest-fceultra-096
@@ -0,0 +1 @@
+MD5 26934713c1f64f20a3f4f8a2dba0f9fb fceu096src.tar.gz 476804