# Copyright 1999-2006 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.23 2006/03/19 21:03:04 luke-jr Exp $ inherit flag-o-matic eutils games DESCRIPTION="\"A Tron clone in 3D\"" HOMEPAGE="http://armagetronad.net/" SRC_URI="mirror://sourceforge/armagetronad/${P}.src.tar.bz2 moviesounds? ( http://armagetron.sourceforge.net/addons/moviesounds_fq.zip linguas_es? ( !linguas_en? ( 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" GLDEPS=" || ( virtual/x11 x11-libs/libX11 ) virtual/glu virtual/opengl media-libs/libsdl media-libs/sdl-image media-libs/jpeg media-libs/libpng " RDEPEND=" >=dev-libs/libxml2-2.6.12 sys-libs/zlib opengl? ( ${GLDEPS} ) !dedicated? ( ${GLDEPS} ) " DEPEND="${RDEPEND} moviepack? ( app-arch/unzip ) moviesounds? ( app-arch/unzip ) linguas_es? ( !linguas_en? ( app-arch/unzip ) ) " pkg_setup() { if use debug; then ewarn ewarn 'The "debug" USE flag will enable debugging code. This will cause AI' ewarn ' players to chat debugging information, debugging lines to be drawn' ewarn ' on the grid and at wall angles, and probably most relevant to your' ewarn ' decision to keep the USE flag:' ewarn ' FULL SCREEN MODE AND SOUND WILL BE DISABLED' ewarn ewarn "If you don't like this, add this line to /etc/portage/package.use:" ewarn ' games-action/armagetronad -debug' ewarn ewarn 'If you ignore this warning and complain about any of the above' ewarn ' effects, the Armagetron Advanced team will either ignore you or' ewarn ' delete your complaint.' ewarn ebeep 5 fi # Assume client if they don't want a server use opengl || ! use dedicated && build_client=true || build_client=false use dedicated && build_server=true || build_server=false MyEMAKE="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}/batch" epatch "${FILESDIR}/0280_fix-sysinstall.patch" } 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" <