/[gentoo-x86]/games-fps/warsow/warsow-0.3.2-r1.ebuild
Gentoo

Contents of /games-fps/warsow/warsow-0.3.2-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Sat Jun 7 22:03:54 2008 UTC (10 years, 1 month ago) by mr_bones_
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +1 -1 lines
FILE REMOVED
old
(Portage version: 2.1.4.4)

1 # Copyright 1999-2008 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/games-fps/warsow/warsow-0.3.2-r1.ebuild,v 1.4 2008/01/18 03:09:29 mr_bones_ Exp $
4
5 inherit eutils toolchain-funcs versionator games
6
7 MY_P=${PN}_$(delete_version_separator 2)
8 DESCRIPTION="Multiplayer FPS based on the QFusion engine (evolved from Quake 2)"
9 HOMEPAGE="http://www.warsow.net/"
10 SRC_URI="http://www.megami.de/warsow/releases/${MY_P}_linux.tar.gz
11 http://www.megami.de/warsow/releases/${MY_P}_sdk.zip
12 mirror://gentoo/${PN}.png"
13
14 LICENSE="GPL-2"
15 SLOT="0"
16 KEYWORDS="amd64 x86"
17 IUSE="debug dedicated irc openal opengl"
18
19 UIRDEPEND="media-libs/jpeg
20 media-libs/libvorbis
21 media-libs/libsdl
22 net-misc/curl
23 virtual/opengl
24 x11-libs/libXinerama
25 x11-libs/libXxf86dga
26 x11-libs/libXxf86vm
27 openal? ( media-libs/openal )"
28 RDEPEND="opengl? ( ${UIRDEPEND} )
29 !opengl? ( !dedicated? ( ${UIRDEPEND} ) )"
30 DEPEND="${RDEPEND}
31 app-arch/unzip
32 x11-proto/xf86dgaproto
33 x11-misc/makedepend"
34
35 S=${WORKDIR}/${MY_P}/source
36
37 src_unpack() {
38 unpack ${A}
39 cd "${S}"
40 rm -f "${WORKDIR}"/${PN}/docs/gnu.txt
41
42 sed -i \
43 -e '/fs_usehomedir =/ s:0:1:' \
44 -e "/fs_basepath =/ s:\.:${GAMES_DATADIR}/${PN}:" \
45 qcommon/files.c \
46 || die "sed files.c failed"
47
48 epatch \
49 "${FILESDIR}"/${P}-build.patch \
50 "${FILESDIR}"/${P}-mapdl.patch
51 }
52
53 src_compile() {
54 yesno() { use ${1} && echo YES || echo NO ; }
55
56 if use opengl || ! use dedicated ; then
57 local client="YES"
58 else
59 local client="NO"
60 fi
61
62 emake \
63 BUILD_CLIENT=${client} \
64 BUILD_SERVER=$(yesno dedicated) \
65 BUILD_IRC=$(yesno irc) \
66 BUILD_SND_OPENAL=$(yesno openal) \
67 DEBUG_BUILD=$(yesno debug) \
68 CC="$(tc-getCC)" \
69 LD="$(tc-getCC)" \
70 || die "emake failed"
71 }
72
73 src_install() {
74 cd release
75
76 if use opengl || ! use dedicated ; then
77 newgamesbin ${PN}.* ${PN} || die "newgamesbin ${PN} failed"
78 doicon "${DISTDIR}"/${PN}.png
79 make_desktop_entry ${PN} Warsow
80 fi
81
82 if use dedicated ; then
83 newgamesbin wsw_server.* ${PN}-ded || die "newgamesbin ${PN}-ded failed"
84 fi
85
86 exeinto "$(games_get_libdir)"/${PN}
87 doexe */*.so || die "doexe failed"
88
89 insinto "${GAMES_DATADIR}"/${PN}
90 doins -r "${WORKDIR}"/${PN}/basewsw || die "doins failed"
91
92 local so
93 for so in basewsw/*.so ; do
94 dosym "$(games_get_libdir)"/${PN}/${so##*/} \
95 "${GAMES_DATADIR}"/${PN}/${so} || die "dosym ${so} failed"
96 done
97
98 dodir "${GAMES_DATADIR}"/${PN}/libs
99 for so in libs/*.so ; do
100 dosym "$(games_get_libdir)"/${PN}/${so##*/} \
101 "${GAMES_DATADIR}"/${PN}/${so} || die "dosym ${so} failed"
102 done
103
104 dodoc "${WORKDIR}"{/${PN},}/docs/*
105 prepgamesdirs
106 }

  ViewVC Help
Powered by ViewVC 1.1.20