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

Contents of /games-fps/warsow/warsow-0.62.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Tue Nov 13 07:14:25 2012 UTC (5 years, 8 months ago) by mr_bones_
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +1 -1 lines
FILE REMOVED
old

(Portage version: 2.1.11.31/cvs/Linux x86_64, unsigned Manifest commit)

1 # Copyright 1999-2012 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.62.ebuild,v 1.4 2012/08/29 22:47:28 hasufell Exp $
4
5 EAPI=2
6 inherit eutils toolchain-funcs versionator games
7
8 MY_P=${PN}_${PV}
9 BASE_P=${PN}_0.61
10 DESCRIPTION="Multiplayer FPS based on the QFusion engine (evolved from Quake 2)"
11 HOMEPAGE="http://www.warsow.net/"
12 SRC_URI="http://www.zcdn.org/dl/${BASE_P}_unified.zip
13 http://www.zcdn.org/dl/${MY_P}_update.zip
14 http://www.zcdn.org/dl/${MY_P}_sdk.zip
15 mirror://gentoo/${PN}.png"
16
17 LICENSE="GPL-2 warsow"
18 SLOT="0"
19 KEYWORDS="amd64 x86"
20 IUSE="+angelscript debug dedicated irc openal opengl"
21
22 UIRDEPEND="virtual/jpeg
23 media-libs/libvorbis
24 media-libs/libsdl
25 virtual/opengl
26 x11-libs/libXinerama
27 x11-libs/libXxf86dga
28 x11-libs/libXxf86vm
29 openal? ( media-libs/openal )"
30 RDEPEND="net-misc/curl
31 opengl? ( ${UIRDEPEND} )
32 !opengl? ( !dedicated? ( ${UIRDEPEND} ) )"
33 UIDEPEND="x11-proto/xineramaproto
34 x11-proto/xf86dgaproto
35 x11-proto/xf86vidmodeproto
36 openal? ( virtual/pkgconfig )"
37 DEPEND="${RDEPEND}
38 app-arch/unzip
39 x11-misc/makedepend
40 opengl? ( ${UIDEPEND} )
41 !opengl? ( !dedicated? ( ${UIDEPEND} ) )"
42
43 S=${WORKDIR}/source
44
45 src_unpack() {
46 unpack ${BASE_P}_unified.zip ${MY_P}_sdk.zip
47 cd ${BASE_P}_unified || die
48 unpack ${MY_P}_update.zip
49 }
50
51 src_prepare() {
52 sed -i \
53 -e "/fs_basepath =/ s:\.:${GAMES_DATADIR}/${PN}:" \
54 qcommon/files.c \
55 || die "sed files.c failed"
56
57 sed -i \
58 -e "s:jpeg_mem_src:_&:" \
59 ref_gl/r_image.c || die
60
61 cd "${WORKDIR}"
62 rm -rf docs/old
63 epatch \
64 "${FILESDIR}"/${P}-build.patch \
65 "${FILESDIR}"/${PN}-0.5-pic.patch
66 epatch_user
67 }
68
69 src_compile() {
70 yesno() { use ${1} && echo YES || echo NO ; }
71
72 local client="NO" irc="NO" openal="NO"
73 if use opengl || ! use dedicated ; then
74 client="YES"
75 use irc && irc="YES"
76 use openal && openal="YES"
77 fi
78
79 if use angelscript ; then
80 tc-export AR RANLIB
81 emake \
82 -C ../libsrcs/angelscript/angelSVN/sdk/angelscript/projects/gnuc \
83 || die "emake angelscript failed"
84 fi
85
86 local arch
87 if use amd64 ; then
88 arch=x86_64
89 elif use x86 ; then
90 arch=i386
91 fi
92
93 emake \
94 BASE_ARCH=${arch} \
95 BINDIR=bin \
96 BUILD_CLIENT=${client} \
97 BUILD_SERVER=$(yesno dedicated) \
98 BUILD_TV_SERVER=$(yesno dedicated) \
99 BUILD_ANGELWRAP=$(yesno angelscript) \
100 BUILD_IRC=${irc} \
101 BUILD_SND_OPENAL=${openal} \
102 BUILD_SND_QF=${client} \
103 DEBUG_BUILD=$(yesno debug) \
104 || die "emake failed"
105 }
106
107 src_install() {
108 cd bin
109
110 if use opengl || ! use dedicated ; then
111 newgamesbin ${PN}.* ${PN} || die "newgamesbin ${PN} failed"
112 doicon "${DISTDIR}"/${PN}.png
113 make_desktop_entry ${PN} Warsow
114 fi
115
116 if use dedicated ; then
117 newgamesbin wsw_server.* ${PN}-ded || die "newgamesbin ${PN}-ded failed"
118 newgamesbin wswtv_server.* ${PN}-tv || die "newgamesbin ${PN}-tv failed"
119 fi
120
121 exeinto "$(games_get_libdir)"/${PN}
122 doexe */*.so || die "doexe failed"
123
124 insinto "${GAMES_DATADIR}"/${PN}
125 doins -r "${WORKDIR}/${BASE_P}_unified"/basewsw || die "doins failed"
126
127 local so
128 for so in basewsw/*.so ; do
129 dosym "$(games_get_libdir)"/${PN}/${so##*/} \
130 "${GAMES_DATADIR}"/${PN}/${so} || die "dosym ${so} failed"
131 done
132
133 if [[ -e libs ]] ; then
134 dodir "${GAMES_DATADIR}"/${PN}/libs
135 for so in libs/*.so ; do
136 dosym "$(games_get_libdir)"/${PN}/${so##*/} \
137 "${GAMES_DATADIR}"/${PN}/${so} || die "dosym ${so} failed"
138 done
139 fi
140
141 dodoc "${WORKDIR}"/docs/*
142 prepgamesdirs
143 }

  ViewVC Help
Powered by ViewVC 1.1.20