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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.8 - (show annotations) (download)
Mon Apr 20 20:04:50 2015 UTC (3 years, 7 months ago) by mr_bones_
Branch: MAIN
CVS Tags: HEAD
Changes since 1.7: +1 -1 lines
FILE REMOVED
old

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

1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/games-fps/warsow/warsow-1.0.ebuild,v 1.7 2013/01/19 13:44:28 hasufell Exp $
4
5 EAPI=4
6 inherit eutils check-reqs gnome2-utils games
7
8 MY_P=${PN}_${PV}
9 DESCRIPTION="Multiplayer FPS based on the QFusion engine (evolved from Quake 2)"
10 HOMEPAGE="http://www.warsow.net/"
11 SRC_URI="http://funpark.warsow-esport.net/~${PN}/${PV}/${MY_P}_unified.tar.gz
12 http://funpark.warsow-esport.net/~${PN}/${PV}/${MY_P}_sdk.tar.gz
13 mirror://gentoo/${PN}.png"
14
15 # ZLIB: bundled angelscript
16 # MIT: bundled libRocket
17 LICENSE="GPL-2 MIT ZLIB warsow"
18 SLOT="0"
19 KEYWORDS="amd64 x86"
20 IUSE="+angelscript debug dedicated irc openal server"
21
22 RDEPEND="media-libs/freetype
23 net-misc/curl
24 sys-libs/zlib
25 !dedicated? (
26 media-libs/libpng:0
27 media-libs/libsdl
28 media-libs/libtheora
29 media-libs/libvorbis
30 x11-libs/libX11
31 x11-libs/libXinerama
32 x11-libs/libXrandr
33 x11-libs/libXxf86dga
34 x11-libs/libXxf86vm
35 virtual/jpeg
36 virtual/opengl
37 openal? ( media-libs/openal )
38 )"
39 DEPEND="${RDEPEND}
40 x11-misc/makedepend
41 !dedicated? (
42 x11-proto/xineramaproto
43 x11-proto/xf86dgaproto
44 x11-proto/xf86vidmodeproto
45 )
46 openal? ( virtual/pkgconfig )"
47
48 S=${WORKDIR}/${MY_P}_sdk/source
49 S_U=${WORKDIR}/${MY_P}
50
51 CHECKREQS_DISK_BUILD="1G"
52 CHECKREQS_DISK_USR="500M"
53
54 src_prepare() {
55 sed -i \
56 -e "/fs_basepath =/ s:\.:${GAMES_DATADIR}/${PN}:" \
57 qcommon/files.c \
58 || die "sed files.c failed"
59
60 sed -i \
61 -e "s:q_jpeg_mem_src:_&:" \
62 ref_gl/r_image.c || die "sed r_image.c failed"
63
64 rm -r "${S_U}"/docs/old* || die
65
66 cd "${WORKDIR}"/${MY_P}_sdk || die
67 epatch "${FILESDIR}"/${P}-build.patch \
68 "${FILESDIR}"/${P}-pic.patch
69 epatch_user
70 }
71
72 src_compile() {
73 yesno() { use ${1} && echo YES || echo NO ; }
74
75 use angelscript &&
76 emake -C ../libsrcs/angelscript/angelSVN/sdk/angelscript/projects/gnuc
77
78 local arch
79 if use amd64 ; then
80 arch=x86_64
81 elif use x86 ; then
82 arch=i386
83 fi
84
85 local myconf
86 if use dedicated ; then
87 myconf=(
88 BUILD_CLIENT=NO
89 BUILD_IRC=NO
90 BUILD_SND_OPENAL=NO
91 BUILD_SND_QF=NO
92 BUILD_CIN=NO
93 BUILD_SERVER=YES
94 BUILD_TV_SERVER=YES
95 )
96 else
97 myconf=(
98 BUILD_CLIENT=YES
99 BUILD_IRC=$(yesno irc)
100 BUILD_SND_OPENAL=$(yesno openal)
101 BUILD_SND_QF=YES
102 BUILD_CIN=YES
103 BUILD_SERVER=$(yesno server)
104 BUILD_TV_SERVER=$(yesno server)
105 )
106 fi
107
108 emake \
109 BASE_ARCH=${arch} \
110 BINDIR=bin \
111 BUILD_ANGELWRAP=$(yesno angelscript) \
112 DEBUG_BUILD=$(yesno debug) \
113 ${myconf[@]}
114 }
115
116 src_install() {
117 cd bin
118
119 if ! use dedicated ; then
120 newgamesbin ${PN}.* ${PN}
121 doicon -s 48 "${DISTDIR}"/${PN}.png
122 make_desktop_entry ${PN} Warsow
123 fi
124
125 if use dedicated || use server ; then
126 newgamesbin wsw_server.* ${PN}-ded
127 newgamesbin wswtv_server.* ${PN}-tv
128 fi
129
130 exeinto "$(games_get_libdir)"/${PN}
131 doexe */*.so
132
133 insinto "${GAMES_DATADIR}"/${PN}
134 doins -r "${S_U}"/basewsw
135
136 local so
137 for so in basewsw/*.so ; do
138 dosym "$(games_get_libdir)"/${PN}/${so##*/} \
139 "${GAMES_DATADIR}"/${PN}/${so}
140 done
141
142 if [[ -e libs ]] ; then
143 dodir "${GAMES_DATADIR}"/${PN}/libs
144 for so in libs/*.so ; do
145 dosym "$(games_get_libdir)"/${PN}/${so##*/} \
146 "${GAMES_DATADIR}"/${PN}/${so}
147 done
148 fi
149
150 dodoc "${S_U}"/docs/*
151 prepgamesdirs
152 }
153
154 pkg_preinst() {
155 games_pkg_preinst
156 gnome2_icon_savelist
157 }
158
159 pkg_postinst() {
160 games_pkg_postinst
161 gnome2_icon_cache_update
162 }
163
164 pkg_postrm() {
165 gnome2_icon_cache_update
166 }

  ViewVC Help
Powered by ViewVC 1.1.20