# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI=2 inherit eutils games autotools mercurial toolchain-funcs DESCRIPTION="TremFusion is an enhanced modification of the free software first person shooter Tremulous, based on ioquake3" HOMEPAGE="https://www.tremfusion.net/" EHG_REVISION="trem-compat" EHG_REPO_URI="http://tremfusion.net/hg/${PN}" EHG_PROJECT="${P}" SRC_URI="http://www.tremfusion.net/downloads/z-tremfusion-menu-0.99r3.pk3" LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="dedicated openal +opengl tty +vorbis" UIDEPEND="openal? ( media-libs/openal ) media-libs/libsdl vorbis? ( media-libs/libogg media-libs/libvorbis ) virtual/opengl sys-libs/ncurses" RDEPEND="opengl? ( ${UIDEPEND} ) !opengl? ( !dedicated? ( ${UIDEPEND} ) ) || ( games-fps/tremulous games-fps/tremulous-bin )" DEPEND="${RDEPEND} media-libs/freetype app-arch/unzip net-misc/curl" S=${WORKDIR}/${PN} pkg_setup() { games_pkg_setup } src_unpack() { mercurial_src_unpack cp "${DISTDIR}"/z-tremfusion-menu-0.99r3.pk3 "${WORKDIR}"/${PN}/misc/ || die "Died while copying menu" } src_compile() { buildit() { use $1 && echo 1 || echo 0 ; } local build_client=1 local build_tty=1 if use dedicated && ! use opengl ; then build_client=0 fi if ! use tty ; then build_tty=0 fi emake \ BUILD_CLIENT=${build_client} \ BUILD_SERVER=$(buildit dedicated) \ BUILD_CLIENT_TTY=${build_tty} \ BUILD_GAME_SO=0 \ BUILD_GAME_QVM=0 \ CC="$(tc-getCC)" \ DEFAULT_BASEDIR="${GAMES_DATADIR}/${PN}" \ USE_CODEC_VORBIS=$(buildit vorbis) \ USE_OPENAL=$(buildit openal) \ USE_LOCAL_HEADERS=0 \ USE_SCM_VERSION=1 \ || die "emake failed" } src_install() { emake INSTALL_PREFIX=/usr BUILDROOT="${D}" BINDIR="${GAMES_BINDIR}" DATADIR="${GAMES_DATADIR}" \ install || die "Died in action: make install ... " insinto "${GAMES_DATADIR}"/${PN}/${PN}/ doins -r misc/z-tremfusion-menu*.pk3 || die "doins -r failed" dodoc README COPYING GPL CC doicon "${WORKDIR}"/tremfusion/misc/tremfusion.png domenu misc/tremfusion.desktop prepgamesdirs } pkg_postinst() { games_pkg_postinst elog "This is Tremfusion live mercurial ebuild" elog "TremFusion is an enhanced modification of the" elog "free software first person shooter." elog "This package allows you to play on Tremulous servers" }