From: "Tomas Chvatal" <scarabeus@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/x11:master commit in: eclass/
Date: Mon, 21 Feb 2011 19:07:25 +0000 (UTC) [thread overview]
Message-ID: <51b087f45fae09dcc3bdadadbfdca18a9377699e.scarabeus@gentoo> (raw)
commit: 51b087f45fae09dcc3bdadadbfdca18a9377699e
Author: Tomas Chvatal <scarabeus <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 21 19:05:55 2011 +0000
Commit: Tomas Chvatal <scarabeus <AT> gentoo <DOT> org>
CommitDate: Mon Feb 21 19:05:55 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/x11.git;a=commit;h=51b087f4
virtualx.eclass overhaul the VIRTUALX_REQUIRED, Deprecate VIRTUALX_USE and adjust the VIRTUALX_DEPEND a bit.
---
eclass/virtualx.eclass | 47 ++++++++++++++++++++++++++++-------------------
1 files changed, 28 insertions(+), 19 deletions(-)
diff --git a/eclass/virtualx.eclass b/eclass/virtualx.eclass
index 9150c5a..4ac7bed 100644
--- a/eclass/virtualx.eclass
+++ b/eclass/virtualx.eclass
@@ -11,22 +11,20 @@
# @ECLASS-VARIABLE: VIRTUALX_REQUIRED
# @DESCRIPTION:
-# Is a dependency on xorg-server and xhost needed?
-# Valid values are "always", "optional", and "manual".
-# "tests" is a synonym for "optional".
-: ${VIRTUALX_REQUIRED:=optional}
-
-# @ECLASS-VARIABLE: VIRTUALX_USE
-# @DESCRIPTION:
-# If VIRTUALX_REQUIRED=optional, what USE flag should control
-# the dependency?
-: ${VIRTUALX_USE:=test}
+# Variable specifying the dependency on xorg-server and xhost.
+# Possible special values are "always" and "manual", which specify
+# the dependency to be set unconditionaly or not at all.
+# Any other value is taken as useflag desired to be in control of
+# the dependency (eg. VIRTUALX_REQUIRED="kde" will add the dependency
+# into "kde? ( )" and add kde into IUSE.
+: ${VIRTUALX_REQUIRED:=test}
# @ECLASS-VARIABLE: VIRTUALX_DEPEND
# @DESCRIPTION:
# Dep string available for use outside of eclass, in case a more
# complicated dep is needed.
-VIRTUALX_DEPEND="
+# You can specify the variable BEFORE inherit to add more dependencies.
+VIRTUALX_DEPEND="${VIRTUALX_DEPEND}
!prefix? ( x11-base/xorg-server[-minimal] )
x11-apps/xhost
"
@@ -34,29 +32,40 @@ VIRTUALX_DEPEND="
# @ECLASS-VARIABLE: VIRTUALX_COMMAND
# @DESCRIPTION:
# Command (or eclass function call) to be run in the X11 environment
+# (within virtualmake function).
: ${VIRTUALX_COMMAND:="emake"}
has "${EAPI:-0}" 0 1 && die "virtualx eclass require EAPI=2 or newer."
case ${VIRTUALX_REQUIRED} in
+ manual)
+ ;;
always)
DEPEND="${VIRTUALX_DEPEND}"
RDEPEND=""
;;
optional|tests)
+ # deprecated section YAY.
+ ewarn "QA: VIRTUALX_REQUIRED=optional and VIRTUALX_REQUIRED=tests are deprecated."
+ ewarn "QA: You can drop the variable definition completely from ebuild,"
+ ewarn "QA: because it is default behaviour."
+
+ if [[ -n ${VIRTUALX_USE} ]]; then
+ # so they like to specify the useflag
+ ewarn "QA: VIRTUALX_USE variable is deprecated."
+ ewarn "QA: Please read eclass manpage to find out how to use VIRTUALX_REQUIRED"
+ ewarn "QA: to achieve the same behaviour."
+ fi
+
+ [[ -z ${VIRTUALX_USE} ]] && VIRTUALX_USE="test"
DEPEND="${VIRTUALX_USE}? ( ${VIRTUALX_DEPEND} )"
RDEPEND=""
IUSE="${VIRTUALX_USE}"
;;
- manual)
- ;;
*)
- eerror "Invalid value (${VIRTUALX_REQUIRED}) for VIRTUALX_REQUIRED"
- eerror "Valid values are:"
- eerror " always"
- eerror " optional (default if unset)"
- eerror " manual"
- die "Invalid value (${VIRTUALX_REQUIRED}) for VIRTUALX_REQUIRED"
+ DEPEND="${VIRTUALX_REQUIRED}? ( ${VIRTUALX_DEPEND} )"
+ RDEPEND=""
+ IUSE="${VIRTUALX_REQUIRED}"
;;
esac
next reply other threads:[~2011-02-21 19:07 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-21 19:07 Tomas Chvatal [this message]
-- strict thread matches above, loose matches on Subject: below --
2011-04-20 12:49 [gentoo-commits] proj/x11:master commit in: eclass/ Michał Górny
2011-04-20 11:06 Tomas Chvatal
2011-04-17 20:47 Tomas Chvatal
2011-04-15 19:05 Michał Górny
2011-04-15 17:21 Michał Górny
2011-04-15 17:21 Michał Górny
2011-04-15 17:21 Michał Górny
2011-03-09 13:52 Tomas Chvatal
2011-03-01 18:57 Tomas Chvatal
2011-02-24 14:31 Tomas Chvatal
2011-02-22 13:28 Tomas Chvatal
2011-02-21 19:48 Tomas Chvatal
2011-02-21 19:39 Tomas Chvatal
2011-02-21 18:30 Tomas Chvatal
2011-02-21 18:22 Tomas Chvatal
2011-02-21 18:20 Tomas Chvatal
2011-02-19 13:50 Tomas Chvatal
2011-02-18 14:48 Tomas Chvatal
2011-02-18 13:26 Tomas Chvatal
2011-02-18 13:19 Tomas Chvatal
2011-02-18 13:19 Tomas Chvatal
2011-02-06 15:49 Michał Górny
2011-02-06 15:49 Michał Górny
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51b087f45fae09dcc3bdadadbfdca18a9377699e.scarabeus@gentoo \
--to=scarabeus@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox