Gentoo Archives: gentoo-commits

From: "Tristan Heaven (nyhm)" <nyhm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in eclass: games-mods.eclass
Date: Sun, 04 Oct 2009 14:14:02
Message-Id: E1MuRqZ-0005xK-RD@stork.gentoo.org
1 nyhm 09/10/04 14:13:59
2
3 Modified: games-mods.eclass
4 Log:
5 disable installation of client or server specific files if MOD_DIR and MOD_BINS are empty
6
7 Revision Changes Path
8 1.31 eclass/games-mods.eclass
9
10 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?rev=1.31&view=markup
11 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?rev=1.31&content-type=text/plain
12 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?r1=1.30&r2=1.31
13
14 Index: games-mods.eclass
15 ===================================================================
16 RCS file: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v
17 retrieving revision 1.30
18 retrieving revision 1.31
19 diff -u -r1.30 -r1.31
20 --- games-mods.eclass 2 Oct 2009 04:56:24 -0000 1.30
21 +++ games-mods.eclass 4 Oct 2009 14:13:59 -0000 1.31
22 @@ -1,6 +1,6 @@
23 # Copyright 1999-2009 Gentoo Foundation
24 # Distributed under the terms of the GNU General Public License v2
25 -# $Header: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v 1.30 2009/10/02 04:56:24 nyhm Exp $
26 +# $Header: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v 1.31 2009/10/04 14:13:59 nyhm Exp $
27
28 # Variables to specify in an ebuild which uses this eclass:
29 # GAME - (doom3, quake4 or ut2004, etc), unless ${PN} starts with e.g. "doom3-"
30 @@ -10,7 +10,6 @@
31 # MOD_ICON - Custom icon for the mod, instead of the default
32 # MOD_NAME - Creates a command-line wrapper and desktop icon for the mod
33 # MOD_TBZ2 - File to extract within the Makeself archive
34 -# MOD_NO_DED - Set this non-empty if the mod doesn't have a server
35
36 inherit eutils games
37
38 @@ -96,10 +95,10 @@
39 2)
40 local pkg
41 for pkg in $@ ; do
42 - if [[ -z ${MOD_NO_DED} ]] ; then
43 - echo -n " ${pkg}[dedicated=,opengl=]"
44 + if [[ -z ${MOD_BINS} && -z ${MOD_DIR} ]] ; then
45 + echo -n " ${pkg}"
46 else
47 - echo -n " ${pkg}[opengl]"
48 + echo -n " ${pkg}[dedicated=,opengl=]"
49 fi
50 done
51 ;;
52 @@ -121,7 +120,7 @@
53 dir=${GAMES_DATADIR}/${GAME}
54
55 games-mods_use_opengl() {
56 - [[ -n ${MOD_NO_DED} ]] && return 0
57 + [[ -z ${MOD_BINS} && -z ${MOD_DIR} ]] && return 1
58
59 if use opengl || ! use dedicated ; then
60 # Use opengl by default
61 @@ -132,7 +131,7 @@
62 }
63
64 games-mods_use_dedicated() {
65 - [[ -n ${MOD_NO_DED} ]] && return 1
66 + [[ -z ${MOD_BINS} && -z ${MOD_DIR} ]] && return 1
67
68 use dedicated && return 0 || return 1
69 }