blob: b4d23e3235c19fffb32bbea52f20235e680ccb6a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="2"
inherit eutils games mercurial toolchain-funcs
MENU_PK3_VER="0.99r3"
DESCRIPTION="An enhanced modification of the free software first person shooter Tremulous, based on ioquake3"
HOMEPAGE="https://www.tremfusion.net/"
EHG_REPO_URI="http://tremfusion.net/hg/${PN}"
EHG_PROJECT="${P}"
SRC_URI="http://www.tremfusion.net/downloads/z-tremfusion-menu-${MENU_PK3_VER}.pk3"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS=""
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} ) )
media-libs/freetype
net-misc/curl
|| ( games-fps/tremulous games-fps/tremulous-bin )"
DEPEND="${RDEPEND}
app-arch/unzip"
S=${WORKDIR}/${PN}
pkg_setup() {
buildit() { use $1 && echo 1 || echo 0 ; }
}
src_prepare() {
sed -i -e "s:release run-tremfusion.sh:run-tremfusion.sh:" Makefile \
|| die "sed failed"
}
src_compile() {
# adjusting arch to x86_64 if arch is amd64
use amd64 && ARCH=x86_64
emake \
BUILD_CLIENT=$(buildit opengl) \
BUILD_SERVER=$(buildit dedicated) \
BUILD_CLIENT_TTY=$(buildit 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 \
BUILD_CLIENT=$(buildit opengl) \
BUILD_SERVER=$(buildit dedicated) \
BUILD_CLIENT_TTY=$(buildit tty) \
INSTALL_PREFIX=/usr BUILDROOT="${D}" BINDIR="${GAMES_BINDIR}" DATADIR="${GAMES_DATADIR}" \
install || die "emake install failed"
insinto "${GAMES_DATADIR}"/${PN}/${PN}/
doins "${DISTDIR}"/z-tremfusion-menu-${MENU_PK3_VER}.pk3 || die "doins failed"
dodoc README CC || die
doicon "${WORKDIR}"/tremfusion/misc/tremfusion.png
domenu misc/tremfusion.desktop
prepgamesdirs
}
pkg_postinst() {
games_pkg_postinst
elog "This is Tremfusion live mercurial ebuild"
elog "This package allows you to play on Tremulous servers"
}
|