1 |
commit: 5dd331ba2cfac554811b640743fc8f3e4c64cc46 |
2 |
Author: Azamat H. Hackimov <azamat.hackimov <AT> gmail <DOT> com> |
3 |
AuthorDate: Thu Aug 8 20:55:43 2019 +0000 |
4 |
Commit: Azamat H. Hackimov <winterheart <AT> gentoo <DOT> ru> |
5 |
CommitDate: Thu Aug 8 20:55:43 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/gamerlay.git/commit/?id=5dd331ba |
7 |
|
8 |
games-fps/xonotic*: remove live |
9 |
|
10 |
In portage stable version, deprecated eclasses |
11 |
|
12 |
games-fps/xonotic-data/metadata.xml | 14 -- |
13 |
games-fps/xonotic-data/xonotic-data-9999.ebuild | 196 ------------------------ |
14 |
games-fps/xonotic-maps/metadata.xml | 11 -- |
15 |
games-fps/xonotic-maps/xonotic-maps-9999.ebuild | 151 ------------------ |
16 |
games-fps/xonotic/metadata.xml | 17 -- |
17 |
games-fps/xonotic/xonotic-9999.ebuild | 137 ----------------- |
18 |
6 files changed, 526 deletions(-) |
19 |
|
20 |
diff --git a/games-fps/xonotic-data/metadata.xml b/games-fps/xonotic-data/metadata.xml |
21 |
deleted file mode 100644 |
22 |
index 82a6eba..0000000 |
23 |
--- a/games-fps/xonotic-data/metadata.xml |
24 |
+++ /dev/null |
25 |
@@ -1,14 +0,0 @@ |
26 |
-<?xml version="1.0" encoding="UTF-8"?> |
27 |
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
28 |
-<pkgmetadata> |
29 |
- <maintainer> |
30 |
- <email>nikoli@×××××××.com</email> |
31 |
- <name>Nikoli</name> |
32 |
- </maintainer> |
33 |
- <use> |
34 |
- <flag name="client">Install files for client. Disabling is experimental.</flag> |
35 |
- <flag name="convert">Use cached-converter.sh for converting tga to jpeg</flag> |
36 |
- <flag name="low">Use low preset of cached-converter.sh: compress wav to ogg, lower jpeg quality.</flag> |
37 |
- <flag name="zip">Compress resources dirs in zip archives.</flag> |
38 |
- </use> |
39 |
-</pkgmetadata> |
40 |
|
41 |
diff --git a/games-fps/xonotic-data/xonotic-data-9999.ebuild b/games-fps/xonotic-data/xonotic-data-9999.ebuild |
42 |
deleted file mode 100644 |
43 |
index fa76b55..0000000 |
44 |
--- a/games-fps/xonotic-data/xonotic-data-9999.ebuild |
45 |
+++ /dev/null |
46 |
@@ -1,196 +0,0 @@ |
47 |
-# Copyright 1999-2013 Gentoo Foundation |
48 |
-# Distributed under the terms of the GNU General Public License v2 |
49 |
-# $Header: $ |
50 |
- |
51 |
-EAPI=5 |
52 |
- |
53 |
-inherit games check-reqs git-2 |
54 |
- |
55 |
-MY_PN="${PN%-data}" |
56 |
-DESCRIPTION="Xonotic data files" |
57 |
-HOMEPAGE="http://www.xonotic.org/" |
58 |
-BASE_URI="git://git.xonotic.org/${MY_PN}/${MY_PN}" |
59 |
-EGIT_REPO_URI="${BASE_URI}.git" |
60 |
- |
61 |
-LICENSE="GPL-2" |
62 |
-SLOT="0" |
63 |
-KEYWORDS="" |
64 |
-IUSE="+client +convert low +zip" |
65 |
- |
66 |
-RDEPEND="" |
67 |
-DEPEND=" |
68 |
- dev-lang/perl |
69 |
- ~games-util/gmqcc-9999 |
70 |
- convert? ( |
71 |
- media-gfx/imagemagick[jpeg,png] |
72 |
- low? ( media-sound/vorbis-tools ) |
73 |
- ) |
74 |
- zip? ( app-arch/p7zip ) |
75 |
-" |
76 |
-RESTRICT="test" |
77 |
- |
78 |
-pkg_pretend() { |
79 |
-if use !client; then |
80 |
- CHECKREQS_DISK_BUILD="3000M" |
81 |
- CHECKREQS_DISK_USR="320M" |
82 |
-else |
83 |
- if use zip; then |
84 |
- CHECKREQS_DISK_BUILD="3850M" |
85 |
- CHECKREQS_DISK_USR="1830M" |
86 |
- else |
87 |
- CHECKREQS_DISK_BUILD="7020M" |
88 |
- CHECKREQS_DISK_USR="3520M" |
89 |
- fi |
90 |
-fi |
91 |
- |
92 |
- export CHECKREQS_DISK_USR CHECKREQS_DISK_USR |
93 |
- |
94 |
- check-reqs_pkg_pretend |
95 |
-} |
96 |
- |
97 |
-pkg_setup() { |
98 |
- ewarn "You need at least 4 Gb diskspace for distfiles." |
99 |
- check-reqs_pkg_setup |
100 |
- games_pkg_setup |
101 |
- |
102 |
- if use convert; then |
103 |
- ewarn "cached-converter.sh will use \"xonotic-cached-converter\" subdirectory of your DISTDIR" |
104 |
- echo |
105 |
- fi |
106 |
- |
107 |
- if use !client; then |
108 |
- ewarn "You have disabled client USE flag, only files for server will be installed." |
109 |
- ewarn "This feature is experimental, if anything goes wrong, contact the maintainer." |
110 |
- echo |
111 |
- fi |
112 |
-} |
113 |
- |
114 |
-src_unpack() { |
115 |
- # root |
116 |
- git-2_src_unpack |
117 |
- |
118 |
- # Data |
119 |
- git_pk3_unpack() { |
120 |
- EGIT_REPO_URI="${BASE_URI}-${1}.pk3dir.git" \ |
121 |
- EGIT_SOURCEDIR="${S}/data/${MY_PN}-${1}.pk3dir" \ |
122 |
- git-2_src_unpack |
123 |
- } |
124 |
- git_pk3_unpack data |
125 |
- git_pk3_unpack maps |
126 |
- # needed only for client |
127 |
- if use client; then |
128 |
- git_pk3_unpack music |
129 |
- git_pk3_unpack nexcompat |
130 |
- else |
131 |
- rm -rf "${S}"/data/font-*.pk3dir || die |
132 |
- fi |
133 |
-} |
134 |
- |
135 |
-src_prepare() { |
136 |
- # Data |
137 |
- if use !client; then |
138 |
- pushd data || die |
139 |
- rm -rf \ |
140 |
- xonotic-data.pk3dir/gfx \ |
141 |
- xonotic-data.pk3dir/particles \ |
142 |
- xonotic-data.pk3dir/sound/cyberparcour01/rocket.txt \ |
143 |
- xonotic-data.pk3dir/textures \ |
144 |
- xonotic-maps.pk3dir/textures \ |
145 |
- || die |
146 |
- rm -f \ |
147 |
- $(find -type f -name '*.jpg') \ |
148 |
- $(find -type f -name '*.png' ! -name 'sky??.png') \ |
149 |
- $(find -type f -name '*.svg') \ |
150 |
- $(find -type f -name '*.tga') \ |
151 |
- $(find -type f -name '*.wav') \ |
152 |
- $(find -type f -name '*.ogg') \ |
153 |
- $(find -type f -name '*.mp3') \ |
154 |
- $(find -type f -name '*.ase') \ |
155 |
- $(find -type f -name '*.map') \ |
156 |
- $(find -type f -name '*.zym') \ |
157 |
- $(find -type f -name '*.obj') \ |
158 |
- $(find -type f -name '*.blend') \ |
159 |
- || die |
160 |
- find -type d \ |
161 |
- -exec rmdir '{}' &>/dev/null \; || die |
162 |
- sed -i \ |
163 |
- -e '/^qc-recursive:/s/menu.dat//' \ |
164 |
- xonotic-data.pk3dir/qcsrc/Makefile || die |
165 |
- popd || die |
166 |
- fi |
167 |
-} |
168 |
- |
169 |
-src_compile() { |
170 |
- # Data |
171 |
- cd data || die |
172 |
- pushd xonotic-data.pk3dir || die |
173 |
- emake \ |
174 |
- QCC="${EPREFIX}/usr/bin/gmqcc" \ |
175 |
- QCCFLAGS_WATERMARK='' |
176 |
- popd || die |
177 |
- |
178 |
- if use convert; then |
179 |
- # Used git.eclass,v 1.50 as example |
180 |
- : ${CACHE_STORE_DIR:="${PORTAGE_ACTUAL_DISTDIR-${DISTDIR}}/xonotic-cached-converter"} |
181 |
- # initial download, we have to create master maps storage directory and play |
182 |
- # nicely with sandbox |
183 |
- if [[ ! -d ${CACHE_STORE_DIR} ]] ; then |
184 |
- addwrite "${PORTAGE_ACTUAL_DISTDIR-${DISTDIR}}" # git.eclass was used, DISTDIR sure exists |
185 |
- mkdir -p "${CACHE_STORE_DIR}" \ |
186 |
- || die "can't mkdir ${CACHE_STORE_DIR}." |
187 |
- export SANDBOX_WRITE="${SANDBOX_WRITE%%:/}" |
188 |
- fi |
189 |
- # allow writing into CACHE_STORE_DIR |
190 |
- addwrite "${CACHE_STORE_DIR}" |
191 |
- |
192 |
- if use low; then |
193 |
- export jpeg_qual_rgb=80 |
194 |
- export jpeg_qual_a=97 |
195 |
- export do_ogg=true |
196 |
- export ogg_qual=1 |
197 |
- else |
198 |
- export jpeg_qual_rgb=97 |
199 |
- export jpeg_qual_a=99 |
200 |
- export do_ogg=false |
201 |
- fi |
202 |
- |
203 |
- for i in data music maps nexcompat; do |
204 |
- einfo "Converting ${i}" |
205 |
- find xonotic-${i}.pk3dir -type f -print0 | |
206 |
- git_src_repo="${S}"/data/xonotic-${i}.pk3dir \ |
207 |
- CACHEDIR="${CACHE_STORE_DIR}" \ |
208 |
- do_jpeg=true \ |
209 |
- do_dds=false \ |
210 |
- del_src=true \ |
211 |
- xargs -0 "${S}"/misc/tools/cached-converter.sh || die |
212 |
- done |
213 |
- fi |
214 |
- |
215 |
- einfo "Removing useless files" |
216 |
- rm -rvf \ |
217 |
- $(find -name '.git*') \ |
218 |
- $(find -type d -name '.svn') \ |
219 |
- $(find -type d -name 'qcsrc') \ |
220 |
- $(find -type f -name '*.sh') \ |
221 |
- $(find -type f -name '*.pl') \ |
222 |
- $(find -type f -name 'Makefile') \ |
223 |
- || die |
224 |
- |
225 |
- if use zip; then |
226 |
- for d in *.pk3dir; do |
227 |
- pushd "${d}" || die |
228 |
- einfo "Compressing ${d}" |
229 |
- 7za a -tzip "../${d%dir}" . || die |
230 |
- popd || die |
231 |
- rm -rf "${d}" || die |
232 |
- done |
233 |
- fi |
234 |
-} |
235 |
- |
236 |
-src_install() { |
237 |
- # Data |
238 |
- insinto "${GAMES_DATADIR}/${MY_PN}" |
239 |
- doins -r data |
240 |
- |
241 |
- prepgamesdirs |
242 |
-} |
243 |
|
244 |
diff --git a/games-fps/xonotic-maps/metadata.xml b/games-fps/xonotic-maps/metadata.xml |
245 |
deleted file mode 100644 |
246 |
index f3eb681..0000000 |
247 |
--- a/games-fps/xonotic-maps/metadata.xml |
248 |
+++ /dev/null |
249 |
@@ -1,11 +0,0 @@ |
250 |
-<?xml version="1.0" encoding="UTF-8"?> |
251 |
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
252 |
-<pkgmetadata> |
253 |
- <maintainer type="person"> |
254 |
- <email>nikoli@×××××××.com</email> |
255 |
- <name>Nikoli</name> |
256 |
- </maintainer> |
257 |
- <use> |
258 |
- <flag name="unofficial">Install unofficial maps. May be incomplete, unstable or broken.</flag> |
259 |
- </use> |
260 |
-</pkgmetadata> |
261 |
|
262 |
diff --git a/games-fps/xonotic-maps/xonotic-maps-9999.ebuild b/games-fps/xonotic-maps/xonotic-maps-9999.ebuild |
263 |
deleted file mode 100644 |
264 |
index 460d48d..0000000 |
265 |
--- a/games-fps/xonotic-maps/xonotic-maps-9999.ebuild |
266 |
+++ /dev/null |
267 |
@@ -1,151 +0,0 @@ |
268 |
-# Copyright 1999-2016 Gentoo Foundation |
269 |
-# Distributed under the terms of the GNU General Public License v2 |
270 |
- |
271 |
-# QA: FUCKING CRAP!!! |
272 |
-# TODO: ask Nikoli to rewrite if I ever find him |
273 |
- |
274 |
-EAPI=6 |
275 |
- |
276 |
-inherit check-reqs |
277 |
- |
278 |
-MY_PN="${PN%-maps}" |
279 |
-DESCRIPTION="Xonotic maps" |
280 |
-HOMEPAGE="http://www.xonotic.org/" |
281 |
- |
282 |
-LICENSE="GPL-2" |
283 |
-SLOT="0" |
284 |
-IUSE="unofficial" |
285 |
-KEYWORDS="" |
286 |
- |
287 |
-RDEPEND="" |
288 |
-DEPEND=" |
289 |
- app-arch/unzip |
290 |
- net-misc/wget |
291 |
-" |
292 |
-S="${WORKDIR}" |
293 |
-RESTRICT="test" |
294 |
- |
295 |
-pkg_pretend() { |
296 |
- if use unofficial; then |
297 |
- CHECKREQS_DISK_USR="1G" |
298 |
- else |
299 |
- CHECKREQS_DISK_USR="155M" |
300 |
- fi |
301 |
- |
302 |
- check-reqs_pkg_pretend |
303 |
-} |
304 |
- |
305 |
-pkg_setup() { |
306 |
- check-reqs_pkg_setup |
307 |
- |
308 |
- ewarn "Downloaded pk3 files will be stored in \"xonotic-maps\" subdirectory of your DISTDIR" |
309 |
- echo |
310 |
- |
311 |
- if use unofficial; then |
312 |
- ewarn "You have enabled \"unofficial\" USE flag. Incomplete, unstable or broken maps may be installed." |
313 |
- echo |
314 |
- fi |
315 |
-} |
316 |
- |
317 |
-src_unpack() { |
318 |
- # Used git.eclass,v 1.50 as example |
319 |
- : ${MAPS_STORE_DIR:="${PORTAGE_ACTUAL_DISTDIR-${DISTDIR}}/xonotic-maps"} |
320 |
- # initial download, we have to create master maps storage directory and play |
321 |
- # nicely with sandbox |
322 |
- if [[ ! -d ${MAPS_STORE_DIR} ]] ; then |
323 |
- addwrite / |
324 |
- mkdir -p "${MAPS_STORE_DIR}" \ |
325 |
- || die "can't mkdir ${MAPS_STORE_DIR}." |
326 |
- export SANDBOX_WRITE="${SANDBOX_WRITE%%:/}" |
327 |
- fi |
328 |
- # allow writing into MAPS_STORE_DIR |
329 |
- addwrite "${MAPS_STORE_DIR}" |
330 |
- |
331 |
- # FETCHCOMMAND from make.globals is example |
332 |
- local WGET="/usr/bin/wget -t 3 -T 60" |
333 |
- local SED="sed" |
334 |
- local base_url="http://beta.xonotic.org/autobuild-bsp/" |
335 |
- |
336 |
- einfo "Downloading lists" |
337 |
- $WGET -O all_maps.html \ |
338 |
- "${base_url}" || die |
339 |
- |
340 |
- $WGET -O official_maps.html \ |
341 |
- 'http://git.xonotic.org/?p=xonotic/xonotic-maps.pk3dir.git;a=tree;f=maps' || die |
342 |
- |
343 |
- grep -e '\.map</a>' official_maps.html | ${SED} -e 's,.*">\([^<]*\).map<\/a>.*,\1,' > official_maps.txt || die |
344 |
- [ -s official_maps.txt ] || die "List of official maps is empty" |
345 |
- cp official_maps.txt install_maps.txt || die |
346 |
- |
347 |
- if use unofficial; then |
348 |
- # For maps not in master branch we need to download fullpk3 |
349 |
- # AllMaps - OfficialMaps = UnofficialMaps |
350 |
- grep all_maps.html -e '<td class="mapname">' | ${SED} -e 's,.*="mapname">\([^<]*\)<.*,\1,' |\ |
351 |
- sort -u | grep -v -x -e '' -f official_maps.txt | ${SED} -e 's,$,-full,' > unofficial_maps.txt |
352 |
- [ -s unofficial_maps.txt ] || die "List of unofficial maps is empty" |
353 |
- cat unofficial_maps.txt >> install_maps.txt |
354 |
- fi |
355 |
- |
356 |
- latest_pk3_version() { |
357 |
- # latest builds of maps are above |
358 |
- latest_version="$(grep all_maps.html -m1 -e "href=\"${name%-full}-.*.pk3\">bspk3<" |sed -e "s,.*href=\"${name%-full}-\([^\"]*\).pk3\">bspk3<.*,\1,")" |
359 |
- } |
360 |
- |
361 |
- validate_pk3() { |
362 |
- if unzip -t "${1}" > /dev/null; then |
363 |
- true |
364 |
- else |
365 |
- ewarn "\"${1}\" is not valid pk3 file, removing" |
366 |
- rm -f "${1}" || die |
367 |
- fi |
368 |
- } |
369 |
- |
370 |
- # Remove obsolete and broken files from MAPS_STORE_DIR |
371 |
- # If map becomes official, it changes branch and git hashes in name => no need to check both fullpk3 and bsppk3 |
372 |
- einfo "Cleaning \"${MAPS_STORE_DIR}\"" |
373 |
- for file in "${MAPS_STORE_DIR}"/*; do |
374 |
- local name="$(echo "${file}" |sed -e "s,${MAPS_STORE_DIR}/\([^/]*\)-[0-9a-f]\{40\}-[0-9a-f]\{40\}.pk3$,\1,")" |
375 |
- local version="$(echo "${file}"|sed -e "s,${MAPS_STORE_DIR}/${name}-\([0-9a-f]\{40\}-[0-9a-f]\{40\}\).pk3$,\1,")" |
376 |
- latest_pk3_version |
377 |
- |
378 |
- if [ "${version}" != "${latest_version}" ]; then |
379 |
- einfo "\"${file}\" is obsolete, removing" |
380 |
- rm -f "${file}" || die |
381 |
- elif [ "x${version}" = "x" ]; then |
382 |
- ewarn "\"${file}\" has incorrect name, removing" |
383 |
- rm -f "${file}" || die |
384 |
- elif [ "x${latest_version}" = "x" ]; then |
385 |
- ewarn "\"${file}\" is not available in ${base_url}, removing" |
386 |
- rm -f "${file}" || die |
387 |
- else |
388 |
- validate_pk3 "${file}" |
389 |
- fi |
390 |
- done |
391 |
- |
392 |
- einfo "Downloading maps" |
393 |
- while read name; do |
394 |
- latest_pk3_version |
395 |
- local file="${name}-${latest_version}.pk3" |
396 |
- local path="${MAPS_STORE_DIR}/${file}" |
397 |
- local url="${base_url}${file}" |
398 |
- |
399 |
- if [[ ! -f "${path}" ]]; then |
400 |
- rm -f "${path}" 2> /dev/null || die |
401 |
- einfo "Downloading ${file}" |
402 |
- $WGET "${url}" -O "${path}" || ewarn "downloading \"${url}\" failed" |
403 |
- validate_pk3 "${path}" |
404 |
- fi |
405 |
- echo "${file}" >> install_files.txt |
406 |
- done < install_maps.txt |
407 |
-} |
408 |
- |
409 |
-src_prepare() { :; } |
410 |
-src_configure() { :; } |
411 |
-src_compile() { :; } |
412 |
- |
413 |
-src_install() { |
414 |
- insinto "${GAMES_DATADIR}/${MY_PN}/data" |
415 |
- while read file; do |
416 |
- nonfatal doins "${MAPS_STORE_DIR}/${file}" || ewarn "installing \"${file}\" failed" |
417 |
- done < install_files.txt |
418 |
-} |
419 |
|
420 |
diff --git a/games-fps/xonotic/metadata.xml b/games-fps/xonotic/metadata.xml |
421 |
deleted file mode 100644 |
422 |
index d1c53cf..0000000 |
423 |
--- a/games-fps/xonotic/metadata.xml |
424 |
+++ /dev/null |
425 |
@@ -1,17 +0,0 @@ |
426 |
-<?xml version="1.0" encoding="UTF-8"?> |
427 |
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
428 |
-<pkgmetadata> |
429 |
- <maintainer> |
430 |
- <email>nikoli@×××××××.com</email> |
431 |
- <name>Nikoli</name> |
432 |
- </maintainer> |
433 |
- <use> |
434 |
- <flag name='experimental'>Use experimental master git branch instead of div0-stable</flag> |
435 |
- <flag name='maps'>Download and install maps</flag> |
436 |
- <flag name='ode'>Enable ODE physics engine support</flag> |
437 |
- <flag name='s3tc'>Install <pkg>media-libs/libtxc_dxtn</pkg> for S3TC texture (de)compression, works with mesa drivers only</flag> |
438 |
- <flag name='server'>Enable compilation of server</flag> |
439 |
- <flag name='sdl2'>Use SDL2 instead of SDL-1.2</flag> |
440 |
- <flag name='videocapture'>Enable video capture feature</flag> |
441 |
- </use> |
442 |
-</pkgmetadata> |
443 |
|
444 |
diff --git a/games-fps/xonotic/xonotic-9999.ebuild b/games-fps/xonotic/xonotic-9999.ebuild |
445 |
deleted file mode 100644 |
446 |
index 8012eb0..0000000 |
447 |
--- a/games-fps/xonotic/xonotic-9999.ebuild |
448 |
+++ /dev/null |
449 |
@@ -1,137 +0,0 @@ |
450 |
-# Copyright 1999-2014 Gentoo Foundation |
451 |
-# Distributed under the terms of the GNU General Public License v2 |
452 |
-# $Header: $ |
453 |
- |
454 |
-EAPI=5 |
455 |
- |
456 |
-inherit eutils toolchain-funcs flag-o-matic git-2 games |
457 |
- |
458 |
-DESCRIPTION="Fork of Nexuiz, Deathmatch FPS based on DarkPlaces, an advanced Quake 1 engine" |
459 |
-HOMEPAGE="http://www.xonotic.org/" |
460 |
-BASE_URI="git://git.xonotic.org/${PN}/" |
461 |
-EGIT_REPO_URI="${BASE_URI}${PN}.git" |
462 |
- |
463 |
-LICENSE="GPL-2" |
464 |
-SLOT="0" |
465 |
-KEYWORDS="" |
466 |
-IUSE="cdda custom-cflags dedicated experimental +maps +ode opengl +s3tc +sdl sdl2 +server videocapture" |
467 |
-REQUIRED_USE=" |
468 |
- || ( opengl sdl server ) |
469 |
- dedicated? ( server !opengl !sdl ) |
470 |
- sdl2? ( sdl ) |
471 |
-" |
472 |
- |
473 |
-UIRDEPEND=" |
474 |
- media-libs/libogg |
475 |
- videocapture? ( media-libs/libtheora[encode] ) |
476 |
- media-libs/libvorbis |
477 |
- x11-libs/libX11 |
478 |
- virtual/opengl |
479 |
- media-libs/freetype:2 |
480 |
- ~games-fps/xonotic-data-9999[client] |
481 |
- s3tc? ( media-libs/libtxc_dxtn ) |
482 |
-" |
483 |
-RDEPEND=" |
484 |
- sys-libs/zlib |
485 |
- virtual/jpeg |
486 |
- media-libs/libpng:0= |
487 |
- net-misc/curl |
488 |
- ~dev-libs/d0_blind_id-${PV} |
489 |
- ~games-fps/xonotic-data-9999 |
490 |
- maps? ( ~games-fps/xonotic-maps-9999 ) |
491 |
- ode? ( dev-games/ode[double-precision] ) |
492 |
- opengl? ( |
493 |
- ${UIRDEPEND} |
494 |
- x11-libs/libXext |
495 |
- x11-libs/libXpm |
496 |
- x11-libs/libXxf86vm |
497 |
- media-libs/alsa-lib |
498 |
- ) |
499 |
- sdl? ( |
500 |
- ${UIRDEPEND} |
501 |
- !sdl2? ( media-libs/libsdl[X,joystick,opengl,sound,video] ) |
502 |
- sdl2? ( media-libs/libsdl2[X,opengl,video] ) |
503 |
- ) |
504 |
-" |
505 |
-DEPEND="${RDEPEND} |
506 |
- opengl? ( |
507 |
- x11-proto/xextproto |
508 |
- x11-proto/xf86vidmodeproto |
509 |
- x11-proto/xproto |
510 |
- cdda? ( virtual/os-headers ) |
511 |
- ) |
512 |
-" |
513 |
- |
514 |
-src_unpack() { |
515 |
- git-2_src_unpack |
516 |
- |
517 |
- if use !experimental; then |
518 |
- EGIT_BRANCH="div0-stable" |
519 |
- EGIT_COMMIT=${EGIT_BRANCH} |
520 |
- fi |
521 |
- EGIT_REPO_URI="${BASE_URI}darkplaces.git" \ |
522 |
- EGIT_SOURCEDIR="${S}/darkplaces" \ |
523 |
- git-2_src_unpack |
524 |
-} |
525 |
- |
526 |
-src_prepare() { |
527 |
- sed -e 's,Version=2.5,Version=1.0,' -i misc/logos/xonotic-*.desktop || die |
528 |
- |
529 |
- cd darkplaces || die |
530 |
- epatch_user |
531 |
- |
532 |
- # let upstream pick the optimization level by default |
533 |
- use custom-cflags || filter-flags -O? |
534 |
- |
535 |
- sed -i \ |
536 |
- -e "/^EXE_/s:darkplaces:${PN}:" \ |
537 |
- -e "/^OPTIM_RELEASE=/s:$: ${CFLAGS}:" \ |
538 |
- -e "/^LDFLAGS_RELEASE=/s:$: -DNO_BUILD_TIMESTAMPS ${LDFLAGS}:" \ |
539 |
- makefile.inc || die |
540 |
-} |
541 |
- |
542 |
-src_compile() { |
543 |
- cd darkplaces || die |
544 |
- emake \ |
545 |
- STRIP=true \ |
546 |
- CC="$(tc-getCC)" \ |
547 |
- DP_FS_BASEDIR="${GAMES_DATADIR}/${PN}" \ |
548 |
- DP_SOUND_API="ALSA" \ |
549 |
- DP_LINK_ODE="shared" \ |
550 |
- DP_LINK_CRYPTO="shared" \ |
551 |
- $(usex cdda "" "DP_CDDA=") \ |
552 |
- $(usex ode "" "LIB_ODE=") \ |
553 |
- $(usex ode "" "CFLAGS_ODE=") \ |
554 |
- $(usex sdl2 "SDL_CONFIG=sdl2-config" "SDL_CONFIG=sdl-config") \ |
555 |
- $(usex videocapture "" "DP_VIDEO_CAPTURE=") \ |
556 |
- $(usex opengl cl-release "") \ |
557 |
- $(usex sdl sdl-release "") \ |
558 |
- $(usex server sv-release "") |
559 |
-} |
560 |
- |
561 |
-src_install() { |
562 |
- if use opengl; then |
563 |
- dogamesbin darkplaces/${PN}-glx |
564 |
- domenu misc/logos/xonotic-glx.desktop |
565 |
- fi |
566 |
- if use sdl; then |
567 |
- dogamesbin darkplaces/${PN}-sdl |
568 |
- domenu misc/logos/xonotic-sdl.desktop |
569 |
- fi |
570 |
- if use opengl || use sdl; then |
571 |
- newicon misc/logos/icons_png/${PN}_512.png ${PN}.png |
572 |
- fi |
573 |
- use server && dogamesbin darkplaces/${PN}-dedicated |
574 |
- |
575 |
- dodoc Docs/*.txt |
576 |
- dohtml -r Docs |
577 |
- |
578 |
- insinto "${GAMES_DATADIR}/${PN}" |
579 |
- |
580 |
- # public key for d0_blind_id |
581 |
- doins key_0.d0pk |
582 |
- |
583 |
- use server && doins -r server |
584 |
- |
585 |
- prepgamesdirs |
586 |
-} |