/[gentoo-x86]/eclass/virtualx.eclass
Gentoo

Diff of /eclass/virtualx.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.31 Revision 1.32
1# Copyright 1999-2009 Gentoo Foundation 1# Copyright 1999-2009 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/virtualx.eclass,v 1.31 2009/10/19 23:52:39 abcd Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/virtualx.eclass,v 1.32 2009/10/21 23:59:51 abcd Exp $
4# 4#
5# Author: Martin Schlemmer <azarah@gentoo.org> 5# Author: Martin Schlemmer <azarah@gentoo.org>
6# 6#
7# This eclass can be used for packages that needs a working X environment to build 7# This eclass can be used for packages that needs a working X environment to build
8 8
9# Is a dependency on xorg-server and xhost needed? 9# Is a dependency on xorg-server and xhost needed?
10# Valid values are "always", "tests", and "manual" 10# Valid values are "always", "optional", and "manual"
11VIRTUALX_REQUIRED="${VIRTUALX_REQUIRED:-tests}" 11# "tests" is treated as a synonym for "optional"
12: ${VIRTUALX_REQUIRED:=optional}
13
14# If VIRTUALX_REQUIRED=optional, what use flag should control
15# the dependency? Default is "test"
16: ${VIRTUALX_USE:=test}
12 17
13# Dep string available for use outside of eclass, in case a more 18# Dep string available for use outside of eclass, in case a more
14# complicated dep is needed 19# complicated dep is needed
15VIRTUALX_DEPEND="x11-base/xorg-server 20VIRTUALX_DEPEND="x11-base/xorg-server
16 x11-apps/xhost" 21 x11-apps/xhost"
18case ${VIRTUALX_REQUIRED} in 23case ${VIRTUALX_REQUIRED} in
19 always) 24 always)
20 DEPEND="${VIRTUALX_DEPEND}" 25 DEPEND="${VIRTUALX_DEPEND}"
21 RDEPEND="" 26 RDEPEND=""
22 ;; 27 ;;
23 tests) 28 optional|tests)
24 DEPEND="test? ( ${VIRTUALX_DEPEND} )" 29 DEPEND="${VIRTUALX_USE}? ( ${VIRTUALX_DEPEND} )"
25 RDEPEND="" 30 RDEPEND=""
26 IUSE="test" 31 IUSE="${VIRTUALX_USE}"
27 ;; 32 ;;
28 manual) 33 manual)
29 ;; 34 ;;
30 *) 35 *)
31 eerror "Invalid value (${VIRTUALX_REQUIRED}) for VIRTUALX_REQUIRED" 36 eerror "Invalid value (${VIRTUALX_REQUIRED}) for VIRTUALX_REQUIRED"
32 eerror "Valid values are:" 37 eerror "Valid values are:"
33 eerror " always" 38 eerror " always"
34 eerror " tests" 39 eerror " optional (default if unset)"
35 eerror " manual" 40 eerror " manual"
36 die "Invalid value (${VIRTUALX_REQUIRED}) for VIRTUALX_REQUIRED" 41 die "Invalid value (${VIRTUALX_REQUIRED}) for VIRTUALX_REQUIRED"
37 ;; 42 ;;
38esac 43esac
39 44

Legend:
Removed from v.1.31  
changed lines
  Added in v.1.32

  ViewVC Help
Powered by ViewVC 1.1.20