Gentoo Archives: gentoo-commits

From: Tomas Chvatal <scarabeus@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/x11:master commit in: eclass/
Date: Mon, 21 Feb 2011 19:07:50
Message-Id: 51b087f45fae09dcc3bdadadbfdca18a9377699e.scarabeus@gentoo
1 commit: 51b087f45fae09dcc3bdadadbfdca18a9377699e
2 Author: Tomas Chvatal <scarabeus <AT> gentoo <DOT> org>
3 AuthorDate: Mon Feb 21 19:05:55 2011 +0000
4 Commit: Tomas Chvatal <scarabeus <AT> gentoo <DOT> org>
5 CommitDate: Mon Feb 21 19:05:55 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/x11.git;a=commit;h=51b087f4
7
8 virtualx.eclass overhaul the VIRTUALX_REQUIRED, Deprecate VIRTUALX_USE and adjust the VIRTUALX_DEPEND a bit.
9
10 ---
11 eclass/virtualx.eclass | 47 ++++++++++++++++++++++++++++-------------------
12 1 files changed, 28 insertions(+), 19 deletions(-)
13
14 diff --git a/eclass/virtualx.eclass b/eclass/virtualx.eclass
15 index 9150c5a..4ac7bed 100644
16 --- a/eclass/virtualx.eclass
17 +++ b/eclass/virtualx.eclass
18 @@ -11,22 +11,20 @@
19
20 # @ECLASS-VARIABLE: VIRTUALX_REQUIRED
21 # @DESCRIPTION:
22 -# Is a dependency on xorg-server and xhost needed?
23 -# Valid values are "always", "optional", and "manual".
24 -# "tests" is a synonym for "optional".
25 -: ${VIRTUALX_REQUIRED:=optional}
26 -
27 -# @ECLASS-VARIABLE: VIRTUALX_USE
28 -# @DESCRIPTION:
29 -# If VIRTUALX_REQUIRED=optional, what USE flag should control
30 -# the dependency?
31 -: ${VIRTUALX_USE:=test}
32 +# Variable specifying the dependency on xorg-server and xhost.
33 +# Possible special values are "always" and "manual", which specify
34 +# the dependency to be set unconditionaly or not at all.
35 +# Any other value is taken as useflag desired to be in control of
36 +# the dependency (eg. VIRTUALX_REQUIRED="kde" will add the dependency
37 +# into "kde? ( )" and add kde into IUSE.
38 +: ${VIRTUALX_REQUIRED:=test}
39
40 # @ECLASS-VARIABLE: VIRTUALX_DEPEND
41 # @DESCRIPTION:
42 # Dep string available for use outside of eclass, in case a more
43 # complicated dep is needed.
44 -VIRTUALX_DEPEND="
45 +# You can specify the variable BEFORE inherit to add more dependencies.
46 +VIRTUALX_DEPEND="${VIRTUALX_DEPEND}
47 !prefix? ( x11-base/xorg-server[-minimal] )
48 x11-apps/xhost
49 "
50 @@ -34,29 +32,40 @@ VIRTUALX_DEPEND="
51 # @ECLASS-VARIABLE: VIRTUALX_COMMAND
52 # @DESCRIPTION:
53 # Command (or eclass function call) to be run in the X11 environment
54 +# (within virtualmake function).
55 : ${VIRTUALX_COMMAND:="emake"}
56
57 has "${EAPI:-0}" 0 1 && die "virtualx eclass require EAPI=2 or newer."
58
59 case ${VIRTUALX_REQUIRED} in
60 + manual)
61 + ;;
62 always)
63 DEPEND="${VIRTUALX_DEPEND}"
64 RDEPEND=""
65 ;;
66 optional|tests)
67 + # deprecated section YAY.
68 + ewarn "QA: VIRTUALX_REQUIRED=optional and VIRTUALX_REQUIRED=tests are deprecated."
69 + ewarn "QA: You can drop the variable definition completely from ebuild,"
70 + ewarn "QA: because it is default behaviour."
71 +
72 + if [[ -n ${VIRTUALX_USE} ]]; then
73 + # so they like to specify the useflag
74 + ewarn "QA: VIRTUALX_USE variable is deprecated."
75 + ewarn "QA: Please read eclass manpage to find out how to use VIRTUALX_REQUIRED"
76 + ewarn "QA: to achieve the same behaviour."
77 + fi
78 +
79 + [[ -z ${VIRTUALX_USE} ]] && VIRTUALX_USE="test"
80 DEPEND="${VIRTUALX_USE}? ( ${VIRTUALX_DEPEND} )"
81 RDEPEND=""
82 IUSE="${VIRTUALX_USE}"
83 ;;
84 - manual)
85 - ;;
86 *)
87 - eerror "Invalid value (${VIRTUALX_REQUIRED}) for VIRTUALX_REQUIRED"
88 - eerror "Valid values are:"
89 - eerror " always"
90 - eerror " optional (default if unset)"
91 - eerror " manual"
92 - die "Invalid value (${VIRTUALX_REQUIRED}) for VIRTUALX_REQUIRED"
93 + DEPEND="${VIRTUALX_REQUIRED}? ( ${VIRTUALX_DEPEND} )"
94 + RDEPEND=""
95 + IUSE="${VIRTUALX_REQUIRED}"
96 ;;
97 esac