summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'games-emulation/snes9x/snes9x-139-r1.ebuild')
-rw-r--r--games-emulation/snes9x/snes9x-139-r1.ebuild71
1 files changed, 71 insertions, 0 deletions
diff --git a/games-emulation/snes9x/snes9x-139-r1.ebuild b/games-emulation/snes9x/snes9x-139-r1.ebuild
new file mode 100644
index 000000000000..45a1e3d9cf80
--- /dev/null
+++ b/games-emulation/snes9x/snes9x-139-r1.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/games-emulation/snes9x/snes9x-139-r1.ebuild,v 1.1 2003/09/09 16:26:50 vapier Exp $
+
+DESCRIPTION="Super Nintendo Entertainment System (SNES) emulator"
+HOMEPAGE="http://www.snes9x.com/"
+SRC_URI="http://www.snes9x.com/zips/s9xs${PV}.zip"
+
+LICENSE="as-is"
+KEYWORDS="x86 ~ppc"
+SLOT="0"
+IUSE="X svga 3dfx opengl"
+
+DEPEND="x86? ( dev-lang/nasm )
+ X? ( virtual/x11 )
+ svga? ( media-libs/svgalib )
+ opengl? ( virtual/opengl )
+ 3dfx? ( media-libs/glide-v3 )"
+RDEPEND="X? ( virtual/x11 )
+ svga? ( media-libs/svgalib )
+ opengl? ( virtual/opengl )
+ 3dfx? ( media-libs/glide-v3 )"
+
+S="${WORKDIR}/release"
+
+pkg_setup() {
+ local mydisp
+ mydisp="`use X``use svga``use opengl``use 3dfx`"
+ if [ -z "${mydisp}" ] ; then
+ eerror "Unable to find a display mode"
+ echo
+ eerror "You must have at least 1 of the following"
+ eerror "in your USE variable:"
+ eerror "X svga opengl 3dfx"
+ die "unable to compile targets"
+ fi
+}
+
+src_compile() {
+ patch -p1 < ${FILESDIR}/snes9x-gcc3.diff
+ if [ `use ppc` ]; then
+ patch -p1 < ${FILESDIR}/snes9x-139-r1-Makefile-ppc.diff
+ patch -p1 < ${FILESDIR}/snes9x-139-r1-BE-sound-fix.diff
+ fi
+
+ #install our custom CXXFLAGS
+ mv Makefile.linux Makefile
+ cp Makefile Makefile.old
+ sed -e "s:OPTIMISE=:OPTIMISE=${CXXFLAGS}:" \
+ Makefile.old > Makefile
+
+ use X && emake snes9x
+ [ -x ${S}/snes9x ] || die "unable to compile for X"
+
+ use svga && emake ssnes9x
+ [ -x ${S}/snes9x ] || die "unable to compile for svga"
+
+ use opengl && emake osnes9x
+ [ -x ${S}/snes9x ] || die "unable to compile for opengl"
+
+ use 3dfx && emake gsnes9x
+ [ -x ${S}/snes9x ] || die "unable to compile for glide"
+}
+
+src_install() {
+ use X && dobin snes9x
+ use svga && dobin ssnes9x
+ use opengl && dobin osnes9x
+ use 3dfx && dobin gsnes9x
+ dodoc {COPYRIGHT,CHANGES,README,PROBLEMS,TODO,HARDWARE,HOW2PORT}.TXT
+}