# 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.9 2006/03/16 04:11:42 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 ) " pkg_setup() { build_client='( use opengl || ! use dedicated )' # Assume client if they don't want a server build_server='use dedicated' if eval ${build_client} && eval ${build_server}; then einfo 'USE flags say to build both!' elif eval ${build_client}; then einfo "USE flags say to build client!" elif eval ${build_server}; then einfo 'USE flags say to build server!' else einfo 'USE flags say to build none!' fi EXTRA_EMAKE="armabindir=${GAMES_BINDIR}" # we have a broken build system, I guess # 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" GameSLOT="" else COMMON_CONFIG="${COMMON_CONFIG} --enable-multiver=${SLOT}" GameSLOT="-${SLOT}" fi UNINSTALL_CONFIG=--enable-uninstall="emerge --clean =${CATEGORY}/${PF}" if use debug; then DEBUGLEVEL=3 else DEBUGLEVEL=0 fi CODELEVEL=0 } src_unpack() { unpack ${A} cd "${S}" epatch "${FILESDIR}/sysinstall-bindir.patch" ./bootstrap.sh } aabuild() { MyBUILDDIR="${WORKDIR}/build-$1" mkdir -p "${MyBUILDDIR}" || die "error creating build directory($1)" # -p to allow EEXIST scenario cd "${MyBUILDDIR}" cat >configure <>"config.h" <