blob: 1edbb6131631860546ea34e8c28bf5563a8a808d (
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
|
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/games-fps/worldofpadman/worldofpadman-1.2.ebuild,v 1.2 2008/03/17 22:45:00 nyhm Exp $
inherit eutils toolchain-funcs games
MY_P=wop-engine-${PV}
DESCRIPTION="A cartoon style multiplayer first-person shooter"
HOMEPAGE="http://worldofpadman.com/"
SRC_URI="ftp://kickchat.com/wop/${MY_P}.tar.bz2
ftp://kickchat.com/wop/wop_patch_${PV/./_}.run
http://thilo.kickchat.com/download/${PN}.run
maps? ( http://thilo.kickchat.com/download/wop_padpack.zip )"
LICENSE="GPL-2 worldofpadman"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="dedicated maps opengl"
UIDEPEND="virtual/opengl
media-libs/openal
media-libs/libsdl
media-libs/libogg
media-libs/libvorbis
net-misc/curl"
RDEPEND="opengl? ( ${UIDEPEND} )
!opengl? ( !dedicated? ( ${UIDEPEND} ) )"
DEPEND="${RDEPEND}
maps? ( app-arch/unzip )"
S=${WORKDIR}/${MY_P}
src_unpack() {
unpack ${MY_P}.tar.bz2
unpack_makeself ${PN}.run
unpack_makeself wop_patch_1_2.run
unpack ./readme.tar
mkdir wop
cd wop
unpack ./../wop-data.tar
unpack ./../wop-data-${PV}.tar
use dedicated && unpack ./../extras.tar || rm -f *.cfg
use maps && unpack wop_padpack.zip
}
src_compile() {
emake \
BUILD_CLIENT=$(use opengl || ! use dedicated && echo 1 || echo 0) \
BUILD_SERVER=$(use dedicated && echo 1 || echo 0) \
CC="$(tc-getCC)" \
ARCH=$(tc-arch-kernel) \
OPTIMIZE= \
DEFAULT_BASEDIR="${GAMES_DATADIR}"/${PN} \
|| die "emake failed"
}
src_install() {
cd build/release-*
if use opengl || ! use dedicated ; then
newgamesbin wop-engine.* ${PN} || die "newgamesbin ${PN} failed"
newicon "${WORKDIR}"/wop.png ${PN}.png
make_desktop_entry ${PN} "World of Padman"
fi
if use dedicated ; then
newgamesbin wopded.* ${PN}-ded || die "newgamesbin ${PN}-ded failed"
fi
cd "${WORKDIR}"
insinto "${GAMES_DATADIR}"/${PN}
doins -r wop || die "doins failed"
dohtml -r readme readme.html
dodoc wop_patch_*.txt
prepgamesdirs
}
|