# Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit games DESCRIPTION="Multi player, real time, 3D, labyrinth, run & shoot game" HOMEPAGE="http://home.tu-clausthal.de/student/iMaze/" SRC_URI="http://home.tu-clausthal.de/student/iMaze/files/${P}.tar.gz" KEYWORDS="~x86" LICENSE="BSD" SLOT="0" IUSE="X Xaw3d joystick" S="${WORKDIR}/${P}/source" RDEPEND="virtual/glibc" DEPEND="virtual/x11 >=sys-apps/sed-4 || ( Xaw3d? ( x11-libs/Xaw3d ) X? ( x11-libs/xview ) )" src_unpack() { unpack ${A} cd ${S} sed -i Makefile.in -e s:'DEFINES=-DDEFAULT_SOUND_DIR=\\"`pwd`/../sounds\\"':\ 'DEFINES=-DDEFAULT_SERVER=\\"localhost\\" -DDEFAULT_SOUND_DIR=\\"${GAMES_DATADIR}/${PN}/sounds\\"':\ || die "src_unpack failed" } src_compile() { local myconf use X \ && myconf="${myconf} xview" \ || myconf="${myconf}" use Xaw3d \ && myconf="${myconf} athena" \ || myconf="${myconf}" use joystick \ && myconf="${myconf} joystick" \ || myconf="${myconf} nojoystick" ./configure \ ${myconf} || die emake \ DEFAULTS='-DDEFAULT_SERVER=\"localhost\" -DDEFAULT_SOUND_DIR=\"${GAMES_DATADIR}/${PN}/sounds\"' \ || die "emake failed" } src_install() { dogamesbin genlab imaze imazesrv imazestat ninja xlabed || die "dogamesbin failed" dodoc ../README || die "dodoc failed" doman ../man6/*6 || die "doman failed" insinto ${GAMES_DATADIR}/${PN}/labs || die "insinto failed" doins ../labs/*lab || die "doins failed" insinto ${GAMES_DATADIR}/${PN}/sounds || die "insinto failed" doins ../sounds/*au || die "doins failed" prepgamesdirs }