# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /cvsroot/armagetronad/armagetronad_build/gentoo/client.ebuild,v 1.4.2.6 2006/03/15 02:47:58 luke-jr Exp $ inherit flag-o-matic eutils games DESCRIPTION="3d tron lightcycles, just like the movie" HOMEPAGE="http://armagetronad.sourceforge.net/" SRC_URI="mirror://sourceforge/armagetronad/${P}.src.tar.bz2 moviesounds? ( http://armagetron.sourceforge.net/addons/moviesounds_fq.zip ) moviesounds_spanish? ( http://armagetron.sourceforge.net/addons/moviesounds_fq.zip http://usuario.tiscalinet.es/hgctiscali/naflat/downloads/spanishvoices.zip ) moviepack? ( http://armagetron.sourceforge.net/addons/moviepack.zip ) " LICENSE="GPL-2" SLOT="0" KEYWORDS="amd64 ppc x86" IUSE="debug dedicated krawall opengl moviepack moviesounds moviesounds_spanish" #games-action/armagetronad: krawall - enable special code for the krawall gaming network #games-action/armagetronad: moviepack - install graphics based on the TRON movie #games-action/armagetronad: moviesounds - install sound effects extracted from the TRON movie #games-action/armagetronad: moviesounds_spanish - install sound effects extracted from the Spanish TRON movie GLDEPS="virtual/x11 virtual/opengl media-libs/libsdl media-libs/sdl-image media-libs/libpng " RDEPEND="sys-libs/zlib >=dev-libs/libxml2-2.6.12 opengl? ( ${GLDEPS} ) !dedicated? ( ${GLDEPS} ) " DEPEND="${RDEPEND} moviepack? ( app-arch/unzip ) moviesounds? ( app-arch/unzip ) moviesounds_spanish? ( app-arch/unzip ) " src_unpack() { unpack ${A} cd "${S}" epatch "${FILESDIR}/sysinstall-bindir.patch" epatch "${FILESDIR}/sysinstall-bindir2.patch" ./bootstrap.sh } export EXTRA_EMAKE="armabindir=${GAMES_BINDIR}" # we have a broken build system, I guess src_compile() { filter-flags -fno-exceptions # Note: Music isn't there yet COMMON_CONFIG="--disable-master --enable-main --disable-memmanager --disable-music $(use_enable krawall) --enable-sysinstall --disable-useradd --enable-etc --disable-restoreold --disable-games" if [ "$SLOT" == "0" ]; then COMMON_CONFIG="${COMMON_CONFIG} --disable-multiver" else COMMON_CONFIG="${COMMON_CONFIG} --enable-multiver=${SLOT}" fi # opengl and dedicated are exclusively configured still... :( # for now, just prefer the game client ewarn 'Armagetron Advanced game client and dedicated server are exclusive for 0.2.8' ewarn 'If you need both, ... wait for 0.3 or something, sorry. ;)' if use dedicated && ! use opengl; then einfo "Building dedicated server" COMMON_CONFIG="${COMMON_CONFIG} --disable-glout --enable-initscripts --disable-desktop" else einfo "Building game client" COMMON_CONFIG="${COMMON_CONFIG} --enable-glout --disable-initscripts --enable-desktop" fi if use debug; then export DEBUGLEVEL=3 else export DEBUGLEVEL=0 fi export CODELEVEL=0 egamesconf ${COMMON_CONFIG} --enable-uninstall="emerge --clean =${CATEGORY}/${PF}" || die "egamesconf failed" cat >>"${S}/config.h" <