diff options
author | Jonathan Callen <jcallen@gentoo.org> | 2009-10-21 23:59:51 +0000 |
---|---|---|
committer | Jonathan Callen <jcallen@gentoo.org> | 2009-10-21 23:59:51 +0000 |
commit | 1aeb6b26407723e566f8bc731c7fc8908bd3ee9c (patch) | |
tree | f559370aef1ec93750649048512f3a808a5fdfed /eclass/virtualx.eclass | |
parent | match jpeg-7 KEYWORDS (diff) | |
download | historical-1aeb6b26407723e566f8bc731c7fc8908bd3ee9c.tar.gz historical-1aeb6b26407723e566f8bc731c7fc8908bd3ee9c.tar.bz2 historical-1aeb6b26407723e566f8bc731c7fc8908bd3ee9c.zip |
Allow changing the USE flag for the dependency
Diffstat (limited to 'eclass/virtualx.eclass')
-rw-r--r-- | eclass/virtualx.eclass | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/eclass/virtualx.eclass b/eclass/virtualx.eclass index 96c9d8cd90be..55559998802c 100644 --- a/eclass/virtualx.eclass +++ b/eclass/virtualx.eclass @@ -1,14 +1,19 @@ # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/virtualx.eclass,v 1.31 2009/10/19 23:52:39 abcd Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/virtualx.eclass,v 1.32 2009/10/21 23:59:51 abcd Exp $ # # Author: Martin Schlemmer <azarah@gentoo.org> # # This eclass can be used for packages that needs a working X environment to build # Is a dependency on xorg-server and xhost needed? -# Valid values are "always", "tests", and "manual" -VIRTUALX_REQUIRED="${VIRTUALX_REQUIRED:-tests}" +# Valid values are "always", "optional", and "manual" +# "tests" is treated as a synonym for "optional" +: ${VIRTUALX_REQUIRED:=optional} + +# If VIRTUALX_REQUIRED=optional, what use flag should control +# the dependency? Default is "test" +: ${VIRTUALX_USE:=test} # Dep string available for use outside of eclass, in case a more # complicated dep is needed @@ -20,10 +25,10 @@ case ${VIRTUALX_REQUIRED} in DEPEND="${VIRTUALX_DEPEND}" RDEPEND="" ;; - tests) - DEPEND="test? ( ${VIRTUALX_DEPEND} )" + optional|tests) + DEPEND="${VIRTUALX_USE}? ( ${VIRTUALX_DEPEND} )" RDEPEND="" - IUSE="test" + IUSE="${VIRTUALX_USE}" ;; manual) ;; @@ -31,7 +36,7 @@ case ${VIRTUALX_REQUIRED} in eerror "Invalid value (${VIRTUALX_REQUIRED}) for VIRTUALX_REQUIRED" eerror "Valid values are:" eerror " always" - eerror " tests" + eerror " optional (default if unset)" eerror " manual" die "Invalid value (${VIRTUALX_REQUIRED}) for VIRTUALX_REQUIRED" ;; |