summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2005-07-22 00:05:03 +0000
committerMike Frysinger <vapier@gentoo.org>2005-07-22 00:05:03 +0000
commit53c8294a1dddece10d7075f8cc69989e5113d4ef (patch)
treeace8d2e45dc63591021d8879aa31cc6ae0bfb804 /games-emulation/snes9x
parentAdd support for Emerald club members #99618 by Paul Varner. (diff)
downloadgentoo-2-53c8294a1dddece10d7075f8cc69989e5113d4ef.tar.gz
gentoo-2-53c8294a1dddece10d7075f8cc69989e5113d4ef.tar.bz2
gentoo-2-53c8294a1dddece10d7075f8cc69989e5113d4ef.zip
Fix amd64 support so it works.
(Portage version: 2.0.51.22-r2)
Diffstat (limited to 'games-emulation/snes9x')
-rw-r--r--games-emulation/snes9x/ChangeLog6
-rw-r--r--games-emulation/snes9x/files/snes9x-1.43-build.patch34
-rw-r--r--games-emulation/snes9x/snes9x-1.43.ebuild22
3 files changed, 54 insertions, 8 deletions
diff --git a/games-emulation/snes9x/ChangeLog b/games-emulation/snes9x/ChangeLog
index 562ab0cdc3ce..328cb8757025 100644
--- a/games-emulation/snes9x/ChangeLog
+++ b/games-emulation/snes9x/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for games-emulation/snes9x
# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/games-emulation/snes9x/ChangeLog,v 1.16 2005/07/21 04:36:01 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-emulation/snes9x/ChangeLog,v 1.17 2005/07/22 00:05:03 vapier Exp $
+
+ 22 Jul 2005; Mike Frysinger <vapier@gentoo.org>
+ +files/snes9x-1.43-build.patch, snes9x-1.43.ebuild:
+ Fix amd64 support so it works.
21 Jul 2005; Mike Frysinger <vapier@gentoo.org> snes9x-1.43.ebuild:
Punt 3dfx support since it requires glide-2 but we only have glide-3 #93097.
diff --git a/games-emulation/snes9x/files/snes9x-1.43-build.patch b/games-emulation/snes9x/files/snes9x-1.43-build.patch
new file mode 100644
index 000000000000..efc9d31fc226
--- /dev/null
+++ b/games-emulation/snes9x/files/snes9x-1.43-build.patch
@@ -0,0 +1,34 @@
+Make sure the build process respects our LDFLAGS (so we can slip in -m32)
+and that the stupid custom OPTIMIZE flags arent used in favor of our own
+CFLAGS (so we can slip in -m32).
+
+--- snes9x/Makefile.in
++++ snes9x/Makefile.in
+@@ -16,6 +16,7 @@
+ @DREAMCAST@
+ CHEATS=1
+ 2XSAI=1
++EXTRALIBS=@LDFLAGS@
+
+ #Fairly good and special-char-safe descriptor of the os being built on.
+ OS=`uname -s -r -m|sed \"s/ /-/g\"|tr \"[A-Z]\" \"[a-z]\"|tr \"/()\" \"___\"`
+@@ -186,7 +188,7 @@
+ OPTIMISE=-O4 -ffreestanding -ffast-math -fschedule-insns2 -fomit-frame-pointer -fno-inline-functions -fno-defer-pop -fforce-addr -fstrict-aliasing -funroll-loops -fdelete-null-pointer-checks -fno-exceptions
+ CPUFLAGS=-ml -m4-single-only
+ else
+-OPTIMISE = @OPTIMIZE@
++OPTIMISE = @CFLAGS@
+ endif
+
+ DEFS += \
+@@ -257,8 +259,8 @@
+ @test -d unzip || mkdir unzip
+ @test -d jma || mkdir jma
+
+-offsets: offsets.o
+- $(CCC) $(INCLUDES) -o $@ offsets.o
++offsets: offsets.cpp
++ $(CCC) $(EXTRALIBS) $(INCLUDES) -o $@ offsets.cpp
+ ./offsets >$(srcdir)/$(CPU)/offsets.h #FIXME: Move to builddir
+
+ snes9x: $(OBJECTS) unix/x11.o $(AIDOOBJS)
diff --git a/games-emulation/snes9x/snes9x-1.43.ebuild b/games-emulation/snes9x/snes9x-1.43.ebuild
index cb1cd137ddab..19354b15a266 100644
--- a/games-emulation/snes9x/snes9x-1.43.ebuild
+++ b/games-emulation/snes9x/snes9x-1.43.ebuild
@@ -1,12 +1,12 @@
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/games-emulation/snes9x/snes9x-1.43.ebuild,v 1.4 2005/07/21 04:36:01 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-emulation/snes9x/snes9x-1.43.ebuild,v 1.5 2005/07/22 00:05:03 vapier Exp $
# 3dfx support (glide) is disabled because it requires
# glide-v2 while we only provide glide-v3 in portage
# http://bugs.gentoo.org/show_bug.cgi?id=93097
-inherit eutils games
+inherit eutils games flag-o-matic
DESCRIPTION="Super Nintendo Entertainment System (SNES) emulator"
HOMEPAGE="http://www.snes9x.com/"
@@ -15,7 +15,7 @@ SRC_URI="http://www.lysator.liu.se/snes9x/${PV}/snes9x-${PV}-src.tar.gz"
LICENSE="as-is"
SLOT="0"
KEYWORDS="amd64 ppc x86"
-IUSE="opengl X joystick zlib dga"
+IUSE="opengl X joystick zlib dga debug"
RDEPEND="zlib? ( sys-libs/zlib )
virtual/x11
@@ -31,13 +31,21 @@ src_unpack() {
cd "${S}"/snes9x
epatch "${FILESDIR}"/nojoy.patch
sed -i 's:png_jmpbuf:png_write_info:g' configure
- sed -i \
- -e 's:@OPTIMIZE@:@CFLAGS@:' \
- -e 's:-lXext -lX11::' \
- Makefile.in
+
+ rm offsets # stupid prebuilt file
+ sed -i -e 's:-lXext -lX11::' Makefile.in
+ sed -i -e '/X_LDFLAGS=/d' configure
+ cp Makefile.in{,.orig}
+ epatch "${FILESDIR}"/${P}-build.patch
}
src_compile() {
+ if use amd64 ; then
+ export ABI=x86
+ append-flags -m32
+ append-ldflags -m32
+ fi
+
local vidconf=
local target=
local vid=