Gentoo Archives: gentoo-commits

From: "Julian Ospald (hasufell)" <hasufell@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in games-fps/warsow: warsow-1.03.ebuild ChangeLog
Date: Sat, 09 Nov 2013 12:44:35
Message-Id: 20131109124430.672252004B@flycatcher.gentoo.org
1 hasufell 13/11/09 12:44:30
2
3 Modified: ChangeLog
4 Added: warsow-1.03.ebuild
5 Log:
6 version bump and fix build with clang wrt #448714
7
8 (Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key E73C35B3)
9
10 Revision Changes Path
11 1.55 games-fps/warsow/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-fps/warsow/ChangeLog?rev=1.55&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-fps/warsow/ChangeLog?rev=1.55&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-fps/warsow/ChangeLog?r1=1.54&r2=1.55
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/games-fps/warsow/ChangeLog,v
20 retrieving revision 1.54
21 retrieving revision 1.55
22 diff -u -r1.54 -r1.55
23 --- ChangeLog 3 Jul 2013 10:06:14 -0000 1.54
24 +++ ChangeLog 9 Nov 2013 12:44:30 -0000 1.55
25 @@ -1,6 +1,14 @@
26 # ChangeLog for games-fps/warsow
27 # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/games-fps/warsow/ChangeLog,v 1.54 2013/07/03 10:06:14 ago Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/games-fps/warsow/ChangeLog,v 1.55 2013/11/09 12:44:30 hasufell Exp $
30 +
31 +*warsow-1.03 (09 Nov 2013)
32 +
33 + 09 Nov 2013; Julian Ospald <hasufell@g.o> +warsow-1.03.ebuild,
34 + +files/warsow-1.03-build.patch, +files/01-warsow-1.03-clang.patch,
35 + +files/02-warsow-1.03-clang.patch, +files/03-warsow-1.03-clang.patch,
36 + +files/warsow-1.03-pic.patch:
37 + version bump and fix build with clang wrt #448714
38
39 03 Jul 2013; Agostino Sarubbo <ago@g.o> warsow-1.02-r1.ebuild:
40 Stable for x86, wrt bug #474440
41
42
43
44 1.1 games-fps/warsow/warsow-1.03.ebuild
45
46 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-fps/warsow/warsow-1.03.ebuild?rev=1.1&view=markup
47 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-fps/warsow/warsow-1.03.ebuild?rev=1.1&content-type=text/plain
48
49 Index: warsow-1.03.ebuild
50 ===================================================================
51 # Copyright 1999-2013 Gentoo Foundation
52 # Distributed under the terms of the GNU General Public License v2
53 # $Header: /var/cvsroot/gentoo-x86/games-fps/warsow/warsow-1.03.ebuild,v 1.1 2013/11/09 12:44:30 hasufell Exp $
54
55 EAPI=5
56 inherit eutils check-reqs gnome2-utils flag-o-matic games
57
58 BASE_DATA_PV=1.0
59 BASE_DATA_P=${PN}_${BASE_DATA_PV}_unified
60 DATA_PV=1.02
61 UPDATE_P=${PN}_${DATA_PV}_update
62 ENGINE_PV=${PV}
63 ENGINE_P=${PN}_${ENGINE_PV}_sdk
64
65 DESCRIPTION="Multiplayer FPS based on the QFusion engine (evolved from Quake 2)"
66 HOMEPAGE="http://www.warsow.net/"
67 SRC_URI="http://funpark.warsow-esport.net/~warsow/${BASE_DATA_PV}/${BASE_DATA_P}.tar.gz
68 http://www.warsow.net:1337/~warsow/${PV}/${ENGINE_P}.tar.gz
69 http://funpark.warsow-esport.net/~warsow/${PV}/${UPDATE_P}.zip
70 mirror://gentoo/warsow.png"
71
72 # ZLIB: bundled angelscript
73 LICENSE="GPL-2 ZLIB warsow"
74 SLOT="0"
75 KEYWORDS="~amd64 ~x86"
76 IUSE="+angelscript debug dedicated irc openal server"
77
78 RDEPEND=">=dev-libs/libRocket-1.2.1_p20130110
79 media-libs/freetype
80 net-misc/curl
81 sys-libs/zlib
82 !dedicated? (
83 media-libs/libpng:0
84 media-libs/libsdl
85 media-libs/libtheora
86 media-libs/libvorbis
87 x11-libs/libX11
88 x11-libs/libXinerama
89 x11-libs/libXrandr
90 x11-libs/libXxf86dga
91 x11-libs/libXxf86vm
92 virtual/jpeg
93 virtual/opengl
94 openal? ( media-libs/openal )
95 )"
96 DEPEND="${RDEPEND}
97 app-arch/unzip
98 x11-misc/makedepend
99 !dedicated? (
100 x11-proto/xineramaproto
101 x11-proto/xf86dgaproto
102 x11-proto/xf86vidmodeproto
103 )
104 openal? ( virtual/pkgconfig )"
105
106 S=${WORKDIR}/${ENGINE_P}/source
107 S_U=${WORKDIR}/${PN}_${BASE_DATA_PV}
108 S_UPDATE=${WORKDIR}/${UPDATE_P}
109
110 CHECKREQS_DISK_BUILD="1G"
111 CHECKREQS_DISK_USR="500M"
112
113 src_unpack() {
114 unpack ${BASE_DATA_P}.tar.gz ${ENGINE_P}.tar.gz
115 mkdir "${S_UPDATE}" || die
116 cd "${S_UPDATE}" || die
117 unpack ${UPDATE_P}.zip
118 }
119
120 src_prepare() {
121 if [[ $(tc-getCC) =~ clang ]]; then
122 einfo "disabling -ffast-math due to clang bug"
123 einfo "http://llvm.org/bugs/show_bug.cgi?id=13745"
124 append-cflags -fno-fast-math
125 append-cxxflags -fno-fast-math
126 fi
127
128 sed -i \
129 -e "/fs_basepath =/ s:\.:${GAMES_DATADIR}/${PN}:" \
130 qcommon/files.c \
131 || die "sed files.c failed"
132
133 sed -i \
134 -e "s:q_jpeg_mem_src:_&:" \
135 ref_gl/r_image.c || die "sed r_image.c failed"
136
137 rm -r "${S_U}"/docs/old* || die
138
139 # edos2unix breaks whitespace files
140 einfo "removing dos line breaks"
141 find . -type f -exec sed -i 's/\r$//' '{}' + || die
142
143 cd "${S}"/.. || die
144 epatch "${FILESDIR}"/${PF}-build.patch \
145 "${FILESDIR}"/${P}-pic.patch \
146 "${FILESDIR}"/{01..03}-${P}-clang.patch
147 epatch_user
148 }
149
150 src_compile() {
151 yesno() { use ${1} && echo YES || echo NO ; }
152
153 use angelscript &&
154 emake -C ../libsrcs/angelscript/angelSVN/sdk/angelscript/projects/gnuc
155
156 local arch
157 if use amd64 ; then
158 arch=x86_64
159 elif use x86 ; then
160 arch=i386
161 fi
162
163 local myconf
164 if use dedicated ; then
165 myconf=(
166 BUILD_CLIENT=NO
167 BUILD_IRC=NO
168 BUILD_SND_OPENAL=NO
169 BUILD_SND_QF=NO
170 BUILD_CIN=NO
171 BUILD_SERVER=YES
172 BUILD_TV_SERVER=YES
173 )
174 else
175 myconf=(
176 BUILD_CLIENT=YES
177 BUILD_IRC=$(yesno irc)
178 BUILD_SND_OPENAL=$(yesno openal)
179 BUILD_SND_QF=YES
180 BUILD_CIN=YES
181 BUILD_SERVER=$(yesno server)
182 BUILD_TV_SERVER=$(yesno server)
183 )
184 fi
185
186 emake \
187 V=YES \
188 SYSTEM_LIBS=YES \
189 BASE_ARCH=${arch} \
190 BINDIR=lib \
191 BUILD_ANGELWRAP=$(yesno angelscript) \
192 DEBUG_BUILD=$(yesno debug) \
193 ${myconf[@]}
194 }
195
196 src_install() {
197 cd lib
198
199 if ! use dedicated ; then
200 newgamesbin ${PN}.* ${PN}
201 doicon -s 48 "${DISTDIR}"/${PN}.png
202 make_desktop_entry ${PN} Warsow
203 fi
204
205 if use dedicated || use server ; then
206 newgamesbin wsw_server.* ${PN}-ded
207 newgamesbin wswtv_server.* ${PN}-tv
208 fi
209
210 exeinto "$(games_get_libdir)"/${PN}
211 doexe */*.so
212
213 insinto "${GAMES_DATADIR}"/${PN}
214 doins -r "${S_U}"/basewsw
215 doins -r "${S_UPDATE}"/basewsw
216
217 local so
218 for so in basewsw/*.so ; do
219 dosym "$(games_get_libdir)"/${PN}/${so##*/} \
220 "${GAMES_DATADIR}"/${PN}/${so}
221 done
222
223 if [[ -e libs ]] ; then
224 dodir "${GAMES_DATADIR}"/${PN}/libs
225 for so in libs/*.so ; do
226 dosym "$(games_get_libdir)"/${PN}/${so##*/} \
227 "${GAMES_DATADIR}"/${PN}/${so}
228 done
229 fi
230
231 dodoc "${S_U}"/docs/*
232 dodoc "${S_UPDATE}"/docs/*
233 prepgamesdirs
234 }
235
236 pkg_preinst() {
237 games_pkg_preinst
238 gnome2_icon_savelist
239 }
240
241 pkg_postinst() {
242 games_pkg_postinst
243 gnome2_icon_cache_update
244 }
245
246 pkg_postrm() {
247 gnome2_icon_cache_update
248 }