Portage is a package management system used by Gentoo Linux
# ChangeLog for games-emulation/xmess
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
# $Header: /var/cvsroot/gentoo-x86/games-emulation/xmess/ChangeLog,v 1.61 2008/03/13 20:25:04 wolf31o2 Exp $
13 Mar 2008; Chris Gianelloni
QA cleanup: Fix quoting (again).
06 Mar 2008; Chris Gianelloni
QA cleanup: Fix quoting.
12 Mar 2007; Marius Mauch
xmess-0.105.ebuild, xmess-0.106.ebuild:
Replacing einfo with elog
07 Mar 2007; Chris Gianelloni
xmess-0.105.ebuild, xmess-0.106.ebuild:
Change all instances of [ to [[.
21 Feb 2007; Piotr JaroszyĆski
Transition to Manifest2.
01 Dec 2006; Chris Gianelloni
xmess-0.105.ebuild, xmess-0.106.ebuild:
Removing old virtual/x11 dependency.
12 Jul 2006; Danny van Dyk
QA: Added expat, lirc, xinerama to IUSE.
08 Jun 2006; Chris Gianelloni
Stable on amd64.
05 Jun 2006; Michael Sterrett
bug #135467 was bad hardware. allow sparc keyword again.
04 Jun 2006; Michael Sterrett
drop sparc keyword for now since it doesn't seem to compile? - bug #135467
*xmess-0.106 (02 Jun 2006)
02 Jun 2006; Michael Sterrett
version bump
*xmess-0.105 (17 Apr 2006)
17 Apr 2006; Michael Sterrett
version bump
26 Mar 2006; Michael Sterrett
sync with xmame ebuild
24 Mar 2006; Chris Gianelloni
-xmess-0.103.ebuild:
Clean up older ebuilds and port 0.83.1 to modular X.
*xmess-0.104 (23 Mar 2006)
23 Mar 2006; Michael Sterrett
version bump
29 Jan 2006; Michael Sterrett
-files/xmess-0.99-mcr3.patch, -files/xmess-0.101-keyboard.patch,
-xmess-0.99-r1.ebuild, -xmess-0.100.ebuild, -xmess-0.101.ebuild,
-xmess-0.102.ebuild:
clean old ebuilds/files
25 Jan 2006; Donnie Berkholz
(#118513) Add modular X deps.
*xmess-0.103 (19 Jan 2006)
19 Jan 2006; Michael Sterrett
version bump
*xmess-0.102 (06 Jan 2006)
06 Jan 2006; Michael Sterrett
version bump to match xmame version (bug #117962)
20 Nov 2005; Mike Frysinger
Add support for USE=xinerama #113029 by Avuton Olrich.
28 Oct 2005; Michael Sterrett
+files/xmess-0.101-keyboard.patch, xmess-0.101.ebuild:
Add upstream patch to fix possible keyboard handling issues (bug #110671)
*xmess-0.101 (23 Oct 2005)
23 Oct 2005; Michael Sterrett
version bump
*xmess-0.100 (25 Sep 2005)
25 Sep 2005; Michael Sterrett
version bump
10 Sep 2005; Aron Griffis
Mark 0.99-r1 stable on alpha
02 Sep 2005; Gustavo Zacarias
Stable on sparc
25 Aug 2005; Aron Griffis
stable on ia64
*xmess-0.99-r1 (18 Aug 2005)
18 Aug 2005; Mike Frysinger
+files/xmess-0.99-mcr3.patch, +xmess-0.99-r1.ebuild:
Add patch from upstream to fix a coredump in some games #102987 by Avuton
Olrich.
*xmess-0.99 (16 Aug 2005)
16 Aug 2005; Michael Sterrett
version bump
*xmess-0.97 (17 Jun 2005)
17 Jun 2005; Michael Sterrett
version bump
30 May 2005; Sven Wegener
Moved from gcc.eclass to toolchain-funcs.eclass, bug #92745.
27 May 2005; Joseph Jezak
Marked ppc stable.
17 May 2005; Michael Sterrett
stable for x86
12 May 2005; Michael Sterrett
LICENSE change (bug #92336)
*xmess-0.96 (12 May 2005)
12 May 2005; Michael Sterrett
version bump
01 Apr 2005; Michael Sterrett
-files/0.77.1-icc.patch, -files/0.80.1-glx-fix.patch,
-files/0.78.1-glx-fix.patch, -files/0.80.1-icc.patch,
-files/0.77.1-alsa-1.0.0.patch, -files/0.77.1-glx-fix.patch,
-files/0.78.1-icc.patch, -files/0.78.1-osd_die.patch,
-files/0.80.1-make.patch, -files/0.81.1-glx-fix.patch,
-files/0.82.1-glx-fix.patch, -files/0.88-glx-fix.patch,
-xmess-0.90.ebuild, -xmess-0.92.ebuild:
clean old files
01 Apr 2005; Michael Sterrett
sync with xmame ebuild
*xmess-0.95 (31 Mar 2005)
31 Mar 2005; Michael Sterrett
version bump
*xmess-0.94 (16 Mar 2005)
16 Mar 2005; Michael Sterrett
version bump
*xmess-0.92 (26 Feb 2005)
26 Feb 2005; Michael Sterrett
version bump
12 Feb 2005; Michael Sterrett
sync with xmame ebuilds
*xmess-0.90 (24 Jan 2005)
24 Jan 2005; Michael Sterrett
version bump
*xmess-0.88 (04 Dec 2004)
04 Dec 2004; Michael Sterrett
version bump
18 Jun 2004; Michael Sterrett
sync with xmame ebuild
*xmess-0.83.1 (15 Jun 2004)
15 Jun 2004; Michael Sterrett
files/0.83.1-glx-fix.patch:
version bump
09 Jun 2004; Aron Griffis
xmess-0.78.1.ebuild, xmess-0.80.1.ebuild, xmess-0.81.1.ebuild,
xmess-0.82.1.ebuild:
Fix use invocation
06 Jun 2004; Michael Sterrett
use flag fixing
*xmess-0.82.1 (06 Jun 2004)
06 Jun 2004; Michael Sterrett
files/0.82.1-glx-fix.patch:
version bump (bug #51883)
21 Apr 2004; Michael Sterrett
files/0.81.1-glx-fix.patch:
sync ebuild with xmame
*xmess-0.81.1 (19 Apr 2004)
19 Apr 2004; Michael Sterrett
version bump
*xmess-0.80.1 (19 Mar 2004)
19 Mar 2004; David Holm
files/0.80.1-glx-fix.patch, files/0.80.1-icc.patch, files/0.80.1-make.patch:
Version bumped, added make-patch to support multiple build jobs.
16 Feb 2004; Michael Sterrett
xmess-0.78.1.ebuild:
header fix; mips and ia64 need deps first
*xmess-0.78.1 (14 Jan 2004)
14 Jan 2004; Mike Frysinger
Version bump #38177 by Starz McCllelan.
*xmess-0.77.1 (30 Nov 2003)
31 Dec 2003; Mike Frysinger
Add patch to fix icc compilation #35607.
Increase number of available joybuttons from 16 to 32 #36818.
Add a local USE flag, net, to control network support #34802.
12 Dec 2003; Mike Frysinger
Add patch to work with alsa-1.0.0 #35108.
30 Nov 2003; Mike Frysinger
Version bump #33889.
*xmess-0.76.1 (25 Oct 2003)
25 Oct 2003; Mike Frysinger
Version bump #Bug 31992.
*xmess-0.74.1-r1 (22 Sep 2003)
22 Sep 2003; Mike Frysinger
Make sure the controllers are installed #29297.
*xmess-0.74.1 (18 Sep 2003)
18 Sep 2003; Mike Frysinger
Version bump #28878.
*xmess-0.72.1 (17 Aug 2003)
17 Aug 2003; Mike Frysinger
Version bump #26763 + remove mips patch.
*xmess-0.71.1 (16 Aug 2003)
16 Aug 2003; Mike Frysinger
Version bump #24986 + mips patch.
*xmess-0.70.1 (11 Jul 2003)
16 Jul 2003; Mike Frysinger
Added glx fix patch.
11 Jul 2003; Mike Frysinger
Version bump + major rehaul of code. Thanks to Caleb Shay
his ideas/submissions.
*xmess-0.62.2-r1 (13 Jan 2003)
13 Jan 2003; Ryan Phillips
initial release. Submitted by Caleb Shay.
AUX 0.83.1-glx-fix.patch 386 RMD160 2d96a0ee2180fedd2ff7ea5451409df00632c099 SHA1 431c2ff0f522141be82690939d36b38d2114b3c4 SHA256 144f079f1845610a9bae8992bfec677eba63c46dfb9c86187db978df848dae06
DIST xmame-0.106.tar.bz2 17117298 RMD160 eab4fa232d59fce5b2216f942f8bc58a992f8d26 SHA1 7ae50f869067e101e053ca18e6f788297fcad9e2 SHA256 a385d86adebc2eb53b560bb522cf569569a74c4104605a8e7d61f1caa0f5e4df
DIST xmame-0.83.1.tar.bz2 12914490 RMD160 3d410dcfc124cfa3dc643cabf4c207aab126569d SHA1 075e60e49e298cc399c1d50a2967395b7a1d7b9d SHA256 e8317d6ece827316be52d2cd783e266db5796a11737315eb27f855d5239b3bf8
EBUILD xmess-0.106.ebuild 6369 RMD160 b514349207aa3c2ac55fe994cc41e76cc6004eff SHA1 46d2f2802cca2a83c32dfc040dd15ca22927eca7 SHA256 ef57ff58e436ae37688fb739f59e66e46b15b706da54836dcf329374d7819a96
EBUILD xmess-0.83.1.ebuild 6905 RMD160 078e34e8e92153ff987b8bf8ff1ba03bf0dbd224 SHA1 a341b9d9ba52b3abe1604cdd558504c0685a42a8 SHA256 0126bd5ba1b798cd2ab2e0dd3c0f5b0b9e2ddb1c5a74a08277e8d615313c5c79
MISC ChangeLog 8705 RMD160 ff339aed17a369ffc9944111baf84ba2370c2423 SHA1 550e42ef7074cab989dc727f6bc70ccecbd4ecdc SHA256 1154dc0a5b28fd21c4fd2822e2ff7b4fc26fff561d643eb045d2d02fdc1f17b6
MISC metadata.xml 1545 RMD160 02d368dab680d4d857b78cd9f7d49956dd69c19b SHA1 0c81127c7bc6f036a71b5fadff0179bf09d4f9c3 SHA256 026ea67365d6cceb2f152020347543b64054067498723fb6e545afbd392dc02d
Mame is an arcade machine emulator. Started in 1997 by Nicola Salmoria, mame started out as a
series of emulators for individual games. This series of emulators was combined into a simgle
multi-game emulator. This is the current form of mame; no longer a one-man show, there are over 100
contributors to the project.
Mame was created by Nicola Salmoria.
Mess is just like mame---a virtual machine emulator, only it doesn't emulate arcade machines but
rather computers and consoles.
Xmame/xmess are the Unix/X11 ports of the mame and mess projects. It makes mame/mess available on
*ix machines using the X11R6 X-Window System (and SVGAlib/ggi/XF86-DGA/OpenGL/SDL too).
Mame was orginally ported by Allard Van Der Bas, Dick the Ridder, Juan Antonio Martinez, and Hans
de Goede.
Xmame/xmess is currently maintained by Lawrence Gold.
Xmame/xmess is based on the mame/mess source code. Due to technical reasons beyond the scope of
this document, the mame/mess source may not compile under Unix. That's why the xmame/xmess project
exists. Each time mame/mess is updated, the code is tested (and patched if needed) under Unix. This
way xmame/xmess releases are always the same as their mame counterparts.
There are no plans for the independent development of xmame/xmess.
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/games-emulation/xmess/xmess-0.106.ebuild,v 1.8 2007/04/09 17:39:11 nyhm Exp $
inherit flag-o-matic toolchain-funcs eutils games
TARGET="${PN}"
DESCRIPTION="Multiple Arcade Machine Emulator for X11"
HOMEPAGE="http://x.mame.net/"
SRC_URI="http://x.mame.net/download/xmame-${PV}.tar.bz2"
LICENSE="XMAME"
SLOT="0"
KEYWORDS="alpha amd64 ~hppa ia64 ppc sparc x86"
IUSE="alsa arts dga esd expat ggi joystick lirc mmx net opengl sdl svga X xinerama xv"
RDEPEND="sys-libs/zlib
alsa? ( media-libs/alsa-lib )
arts? ( kde-base/arts )
dga? (
x11-libs/libXxf86dga
x11-libs/libXxf86vm )
esd? ( >=media-sound/esound-0.2.29 )
expat? ( dev-libs/expat )
ggi? ( media-libs/libggi )
lirc? ( app-misc/lirc )
opengl? (
virtual/opengl
virtual/glu )
sdl? ( >=media-libs/libsdl-1.2.0 )
svga? ( media-libs/svgalib )
xinerama? ( x11-libs/libXinerama )
xv? ( x11-libs/libXv )
X? ( x11-libs/libXext )"
DEPEND="${RDEPEND}
dga? (
x11-proto/xf86dgaproto
x11-proto/xf86vidmodeproto )
xinerama? ( x11-proto/xineramaproto )
xv? ( x11-proto/videoproto )
x86? ( dev-lang/nasm )"
# Icc sucks. bug #41342
# icc? ( dev-lang/icc )
S=${WORKDIR}/xmame-${PV}
toggle_feature() {
if use $1 ; then
sed -i \
-e "/$2.*=/s:#::" Makefile \
|| die "sed Makefile ($1 / $2) failed"
fi
}
toggle_feature2() {
use $1 && toggle_feature $2 $3
}
src_unpack() {
local mycpu
unpack ${A}
cd "${S}"
case ${ARCH} in
x86) mycpu="i386";;
ia64) mycpu="ia64";;
amd64) mycpu="amd64";;
ppc) mycpu="risc";;
sparc) mycpu="risc";;
hppa) mycpu="risc";;
alpha) mycpu="alpha";;
mips) mycpu="mips";;
esac
sed -i \
-e "/^PREFIX/s:=.*:=/usr:" \
-e "/^MY_CPU/s:i386:${mycpu}:" \
-e "/^BINDIR/s:=.*:=${GAMES_BINDIR}:" \
-e "/^MANDIR/s:=.*:=/usr/share/man/man6:" \
-e "/^XMAMEROOT/s:=.*:=${GAMES_DATADIR}/${TARGET}:" \
-e "/^TARGET/s:mame:${TARGET:1}:" \
-e "/^CFLAGS =/d" \
-e 's/,-s//' \
-e "/\bCFLAGS +=/d" \
Makefile \
|| die "sed Makefile failed"
if use ppc ; then
sed -i \
-e '/LD.*--relax/s:^# ::' Makefile \
|| die "sed Makefile (ppc/LD) failed"
fi
if use mmx ; then
cat >> src/unix/effect_asm.asm <
section .note.GNU-stack noalloc noexec nowrite progbits
%endif
EOF
fi
toggle_feature x86 X86_MIPS3_DRC
toggle_feature2 x86 mmx EFFECT_MMX_ASM
toggle_feature joystick JOY_STANDARD
toggle_feature2 joystick X XINPUT_DEVICES
use net && ewarn "Network support is currently (${PV}) broken :("
#toggle_feature net XMAME_NET # Broken
toggle_feature esd SOUND_ESOUND
toggle_feature alsa SOUND_ALSA
toggle_feature arts SOUND_ARTS
toggle_feature dga X11_DGA
toggle_feature xv X11_XV
# if we don't have expat on the system, use the internal one
toggle_feature !expat BUILD_EXPAT
toggle_feature opengl X11_OPENGL
toggle_feature lirc LIRC
toggle_feature xinerama X11_XINERAMA
case ${ARCH} in
x86|ia64|amd64)
append-flags -Wno-unused -fomit-frame-pointer -fstrict-aliasing -fstrength-reduce
use amd64 || append-flags -ffast-math #54270
[[ $(gcc-major-version) -ge 3 ]] \
&& append-flags -falign-functions=2 -falign-jumps=2 -falign-loops=2 \
|| append-flags -malign-functions=2 -malign-jumps=2 -malign-loops=2
;;
ppc)
append-flags -Wno-unused -funroll-loops -fstrength-reduce -fomit-frame-pointer -ffast-math -fsigned-char
;;
hppa)
append-flags -ffunction-sections
;;
esac
sed -i \
-e "s:[Xx]mame:${TARGET}:g" \
doc/*.6 \
|| die "sed man pages failed"
# no, we don't want to install setuid (bug #81693)
sed -i \
-e 's/^doinstallsuid/notforus/' \
-e 's/doinstallsuid/doinstall/' \
-e '/^QUIET/s:^:#:' src/unix/unix.mak \
|| die "sed src/unix/unix.mak failed"
}
src_compile() {
local disp=0
if use sdl ; then
emake DISPLAY_METHOD=SDL || die "emake failed (SDL)"
disp=1
fi
if use svga ; then
emake DISPLAY_METHOD=svgalib || die "emake failed (svgalib)"
disp=1
fi
if use ggi ; then
#emake DISPLAY_METHOD=ggi || die "emake failed (ggi)"
#disp=1
ewarn "GGI support is currently (${PV}) broken :("
fi
if [[ ${disp} -eq 0 ]] || use opengl || use X || use dga || use xv ; then
emake DISPLAY_METHOD=x11 || die "emake failed (x11)"
fi
}
src_install() {
local disp=0, f
local utils="chdman imgtool dat2html romcmp xml2info"
sed -i \
-e "s:^PREFIX.*:PREFIX=${D}/usr:" \
-e "s:^BINDIR.*:BINDIR=${D}/${GAMES_BINDIR}:" \
-e "s:^MANDIR.*:MANDIR=${D}/usr/share/man/man6:" \
-e "s:^XMAMEROOT.*:XMAMEROOT=${D}/${GAMES_DATADIR}/${TARGET}:" \
Makefile \
|| die "sed Makefile failed"
if use sdl ; then
make DISPLAY_METHOD=SDL install || die "install failed (sdl)"
disp=1
fi
if use svga ; then
make DISPLAY_METHOD=svgalib install || die "install failed (svga)"
disp=1
fi
if use ggi ; then
#make DISPLAY_METHOD=ggi install || die "install failed (ggi)"
#disp=1
ewarn "GGI support is currently (${PV}) broken :("
fi
if [[ ${disp} -eq 0 ]] || use opengl || use X || use dga || use xv ; then
make DISPLAY_METHOD=x11 install || die "install failed (x11)"
fi
exeinto "$(games_get_libdir)/${PN}"
for f in $utils
do
if [[ -f "${D}${GAMES_BINDIR}"/$f ]] ; then
doexe $f || die "doexe failed"
rm -f "${D}${GAMES_BINDIR}"/$f 2> /dev/null
fi
done
insinto "${GAMES_DATADIR}/${PN}"
doins -r ctrlr || die "doins failed"
dodoc doc/{changes.*,*.txt,mame/*,${TARGET}rc.dist} README todo \
|| die "dodoc failed"
dohtml -r doc/* || die "dohtml failed"
# default to sdl since the client is a bit more featureful
if use sdl ; then
dosym "${TARGET}.SDL" "${GAMES_BINDIR}/${TARGET}"
elif [[ ${disp} -eq 0 ]] || use opengl || use X || use dga || use xv ; then
dosym "${TARGET}.x11" "${GAMES_BINDIR}/${TARGET}"
elif use svga ; then
dosym ${TARGET}.svgalib "${GAMES_BINDIR}/${TARGET}"
#elif use ggi ; then
#dosym ${TARGET}.ggi "${GAMES_BINDIR}/${TARGET}"
fi
prepgamesdirs
}
pkg_postinst() {
games_pkg_postinst
elog "Your available MAME binaries are: ${TARGET}"
if useq opengl || useq X || useq dga || useq xv ; then
elog " ${TARGET}.x11"
fi
useq sdl && elog " ${TARGET}.SDL"
#useq ggi && elog " ${TARGET}.ggi"
useq svga && elog " ${TARGET}.svgalib"
elog "Helper utilities are located in $(games_get_libdir)/${PN}."
}
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/games-emulation/xmess/xmess-0.83.1.ebuild,v 1.12 2008/03/13 20:25:04 wolf31o2 Exp $
inherit flag-o-matic toolchain-funcs eutils games
TARGET="${PN}"
DESCRIPTION="Multiple Arcade Machine Emulator for X11"
HOMEPAGE="http://x.mame.net/"
SRC_URI="http://x.mame.net/download/xmame-${PV}.tar.bz2"
LICENSE="xmame"
SLOT="0"
KEYWORDS="alpha amd64 hppa ia64 ppc sparc x86"
IUSE="sdl dga xv alsa esd opengl X 3dfx svga ggi arts joystick net expat lirc xinerama"
RDEPEND="sys-libs/zlib
alsa? ( media-libs/alsa-lib )
arts? ( kde-base/arts )
dga? (
x11-libs/libXxf86dga
x11-libs/libXxf86vm )
esd? ( >=media-sound/esound-0.2.29 )
expat? ( dev-libs/expat )
ggi? ( media-libs/libggi )
lirc? ( app-misc/lirc )
opengl? (
virtual/opengl
virtual/glu )
sdl? ( >=media-libs/libsdl-1.2.0 )
svga? ( media-libs/svgalib )
xinerama? ( x11-libs/libXinerama )
xv? ( x11-libs/libXv )
X? ( x11-libs/libXext )"
DEPEND="${RDEPEND}
dga? (
x11-proto/xf86dgaproto
x11-proto/xf86vidmodeproto )
xinerama? ( x11-proto/xineramaproto )
xv? ( x11-proto/videoproto )
x86? ( dev-lang/nasm )"
# Icc sucks. bug #41342
# icc? ( dev-lang/icc )
S="${WORKDIR}/xmame-${PV}"
src_unpack() {
unpack ${A}
cd "${S}"
epatch "${FILESDIR}/${PV}-glx-fix.patch"
sed -i \
-e 's:JOY_BUTTONS 16:JOY_BUTTONS 32:' src/unix/devices.h \
|| die "setting joybuttons failed" #36818
case "${ARCH}" in
x86)
sed -i \
-e '/X86_ASM_68000 =/s:#::' \
-e '/X86_MIPS3_DRC =/s:#::' Makefile \
|| die "sed Makefile (x86) failed"
if use joystick ; then
sed -i \
-e '/JOY_I386.*=/s:#::' Makefile \
|| die "sed Makefile (joystick) failed"
fi
;;
ia64)
sed -i \
-e '/^MY_CPU/s:i386:ia64:' Makefile \
|| die "sed Makefile (ia64) failed"
if use joystick ; then
sed -i \
-e '/JOY_I386.*=/s:#::' Makefile \
|| die "sed Makefile (joystick) failed"
fi
;;
amd64)
sed -i \
-e '/^MY_CPU/s:i386:amd64:' Makefile \
|| die "sed Makefile (amd64) failed"
if use joystick ; then
sed -i \
-e '/JOY_I386.*=/s:#::' Makefile \
|| die "sed Makefile (joystick) failed"
fi
;;
ppc|sparc|hppa)
sed -i \
-e '/^MY_CPU/s:i386:risc:' Makefile \
|| die "sed Makefile (ppc|sparc|hppa) failed"
;;
alpha)
sed -i \
-e '/^MY_CPU/s:i386:alpha:' Makefile \
|| die "sed Makefile (alpha) failed"
;;
mips)
sed -i \
-e '/^MY_CPU/s:i386:mips:' Makefile \
|| die "sed Makefile (mips) failed"
;;
esac
if use net ; then
sed -i \
-e '/XMAME_NET/s:#::' Makefile \
|| die "sed Makefile (net) failed"
fi
if use esd ; then
sed -i \
-e '/SOUND_ESOUND/s:#::' Makefile \
|| die "sed Makefile (esd) failed"
fi
if use alsa ; then
sed -i \
-e '/SOUND_ALSA/s:#::' Makefile \
|| die "sed Makefile (alsa) failed"
fi
if use arts ; then
sed -i \
-e '/SOUND_ARTS/s:#::' Makefile \
|| die "sed Makefile (arts) failed"
fi
if use sdl ; then
sed -i \
-e '/SOUND_SDL/s:#::' Makefile \
|| die "sed Makefile (sdl) failed"
fi
if use dga ; then
sed -i \
-e '/X11_DGA/s:#::' Makefile \
|| die "sed Makefile (dga) failed"
if use 3dfx ; then
sed -i \
-e '/TDFX_DGA_WORKAROUND/s:#::' Makefile \
|| die "sed Makefile (dga) failed"
fi
fi
if use xv ; then
sed -i \
-e '/X11_XV/s:#::' Makefile \
|| die "sed Makefile (xv) failed"
fi
case ${ARCH} in
x86|ia64) append-flags -Wno-unused -fomit-frame-pointer -fstrict-aliasing -fstrength-reduce -ffast-math
[[ $(gcc-major-version) -eq 3 ]] \
&& append-flags -falign-functions=2 -falign-jumps=2 -falign-loops=2 \
|| append-flags -malign-functions=2 -malign-jumps=2 -malign-loops=2
;;
# amd64 no likey the -ffast-math - bug #54270
amd64) append-flags -Wno-unused -fomit-frame-pointer -fstrict-aliasing -fstrength-reduce
;;
ppc) append-flags -Wno-unused -funroll-loops -fstrength-reduce -fomit-frame-pointer -ffast-math -fsigned-char
;;
hppa) append-flags -ffunction-sections
;;
esac
sed -i \
-e "/^PREFIX/s:=.*:=/usr:" \
-e "/^BINDIR/s:=.*:=${GAMES_BINDIR}:" \
-e "/^MANDIR/s:=.*:=/usr/share/man/man6:" \
-e "/^XMAMEROOT/s:=.*:=${GAMES_DATADIR}/${TARGET}:" \
-e "/^TARGET/s:mame:${TARGET:1}:" \
-e "s:^CFLAGS =:CFLAGS=${CFLAGS}:" Makefile \
|| die "sed Makefile failed"
}
src_compile() {
local disp=0
if use sdl ; then
emake DISPLAY_METHOD=SDL || die "emake failed (SDL)"
disp=1
fi
if use svga ; then
emake DISPLAY_METHOD=svgalib || die "emake failed (svgalib)"
disp=1
fi
if use ggi ; then
emake DISPLAY_METHOD=ggi || die "emake failed (ggi)"
disp=1
fi
if use opengl ; then
emake DISPLAY_METHOD=xgl || die "emake failed (xgl)"
disp=1
fi
if [[ ${disp} -eq 0 ]] || use X || use dga || use xv ; then
emake DISPLAY_METHOD=x11 || die "emake failed (x11)"
fi
}
src_install() {
local disp=0
sed -i \
-e "s:Xmame:${TARGET}:g" \
-e "s:xmame:${TARGET}:g" doc/*.6 \
|| die "sed man pages failed"
sed -i \
-e "s:^PREFIX.*:PREFIX=${D}/usr:" \
-e "s:^BINDIR.*:BINDIR=${D}/${GAMES_BINDIR}:" \
-e "s:^MANDIR.*:MANDIR=${D}/usr/share/man/man6:" \
-e "s:^XMAMEROOT.*:XMAMEROOT=${D}/${GAMES_DATADIR}/${TARGET}:" \
Makefile \
|| die "sed Makefile failed"
if use sdl ; then
make DISPLAY_METHOD=SDL install || die "install failed (sdl)"
disp=1
fi
if use svga ; then
make DISPLAY_METHOD=svgalib install || die "install failed (svga)"
disp=1
fi
if use ggi ; then
make DISPLAY_METHOD=ggi install || die "install failed (ggi)"
disp=1
fi
if use opengl ; then
make DISPLAY_METHOD=xgl install || die "install failed (xgl)"
disp=1
fi
if [[ ${disp} -eq 0 ]] || use X || use dga || use xv ; then
make DISPLAY_METHOD=x11 install || die "install failed (x11)"
fi
dodir "${GAMES_DATADIR}/${PN}"
cp -r ctrlr "${D}/${GAMES_DATADIR}/${PN}/" || die "cp failed"
dodoc doc/{changes.*,*.txt,mame/*,${TARGET}rc.dist} README todo \
|| die "dodoc failed"
dohtml -r doc/* || die "dohtml failed"
if use opengl ; then
dosym "${TARGET}.xgl" "${GAMES_BINDIR}/${TARGET}"
elif [[ ${disp} -eq 0 ]] || use X || use dga || use xv ; then
dosym "${TARGET}.x11" "${GAMES_BINDIR}/${TARGET}"
elif use sdl ; then
dosym "${TARGET}.SDL" "${GAMES_BINDIR}/${TARGET}"
elif use svga ; then
dosym ${TARGET}.svgalib "${GAMES_BINDIR}/${TARGET}"
elif use ggi ; then
dosym ${TARGET}.ggi "${GAMES_BINDIR}/${TARGET}"
fi
prepgamesdirs
}
pkg_postinst() {
games_pkg_postinst
elog "Your available MAME binaries are: ${TARGET}"
if use X || use dga || use xv ; then
elog " ${TARGET}.x11"
fi
use sdl > /dev/null && elog " ${TARGET}.SDL"
use ggi > /dev/null && elog " ${TARGET}.ggi"
use svga > /dev/null && elog " ${TARGET}.svgalib"
use opengl > /dev/null && elog " ${TARGET}.xgl"
}