# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/games-emulation/xmess/xmess-0.103.ebuild,v 1.2 2006/01/25 04:01:16 spyderous 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 ) virtual/x11 ) ) 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 virtual/x11 ) ) xv? ( || ( x11-libs/libXv virtual/x11 ) ) X? ( || ( x11-libs/libXext virtual/x11 ) )" DEPEND="${RDEPEND} dga? ( || ( ( x11-proto/xf86dgaproto x11-proto/xf86vidmodeproto ) virtual/x11 ) ) xinerama? ( || ( x11-proto/xineramaproto virtual/x11 ) ) xv? ( || ( x11-proto/videoproto virtual/x11 ) ) 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 '/^BUILD_EXPAT/s/^/#/' \ -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" \ 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 <