1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 inherit eutils games mercurial toolchain-funcs
10 DESCRIPTION="An enhanced modification of the free software first person shooter Tremulous, based on ioquake3"
11 HOMEPAGE="https://www.tremfusion.net/"
12 EHG_REPO_URI="http://tremfusion.net/hg/${PN}"
14 SRC_URI="http://www.tremfusion.net/downloads/z-tremfusion-menu-${MENU_PK3_VER}.pk3"
18 IUSE="dedicated openal +opengl tty +vorbis"
20 UIDEPEND="openal? ( media-libs/openal )
22 vorbis? ( media-libs/libogg media-libs/libvorbis )
25 RDEPEND="opengl? ( ${UIDEPEND} )
26 !opengl? ( !dedicated? ( ${UIDEPEND} ) )
36 buildit() { use $1 && echo 1 || echo 0 ; }
40 sed -i -e "s:release run-tremfusion.sh:run-tremfusion.sh:" Makefile \
45 # adjusting arch to x86_64 if arch is amd64
46 use amd64 && ARCH=x86_64
49 BUILD_CLIENT=$(buildit opengl) \
50 BUILD_SERVER=$(buildit dedicated) \
51 BUILD_CLIENT_TTY=$(buildit tty) \
55 DEFAULT_BASEDIR="${GAMES_DATADIR}/${PN}" \
56 USE_CODEC_VORBIS=$(buildit vorbis) \
57 USE_OPENAL=$(buildit openal) \
65 BUILD_CLIENT=$(buildit opengl) \
66 BUILD_SERVER=$(buildit dedicated) \
67 BUILD_CLIENT_TTY=$(buildit tty) \
68 INSTALL_PREFIX=/usr BUILDROOT="${D}" BINDIR="${GAMES_BINDIR}" DATADIR="${GAMES_DATADIR}" \
69 install || die "emake install failed"
70 insinto "${GAMES_DATADIR}"/${PN}/${PN}/
71 doins "${DISTDIR}"/z-tremfusion-menu-${MENU_PK3_VER}.pk3 || die "doins failed"
72 dodoc README CC || die
73 doicon "${WORKDIR}"/tremfusion/misc/tremfusion.png
74 domenu misc/tremfusion.desktop
80 elog "This is Tremfusion live mercurial ebuild"
81 elog "This package allows you to play on Tremulous servers"