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

Diff of /eclass/virtualx.eclass

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

Revision 1.38 Revision 1.40
1# Copyright 1999-2010 Gentoo Foundation 1# Copyright 1999-2011 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.38 2011/03/13 19:37:28 scarabeus Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/virtualx.eclass,v 1.40 2011/08/22 04:46:32 vapier Exp $
4
5# Original author: Martin Schlemmer <azarah@gentoo.org>
6 4
7# @ECLASS: virtualx.eclass 5# @ECLASS: virtualx.eclass
8# @MAINTAINER: 6# @MAINTAINER:
9# x11@gentoo.org 7# x11@gentoo.org
8# @AUTHOR:
9# Original author: Martin Schlemmer <azarah@gentoo.org>
10# @BLURB: This eclass can be used for packages that needs a working X environment to build. 10# @BLURB: This eclass can be used for packages that needs a working X environment to build.
11 11
12# @ECLASS-VARIABLE: VIRTUALX_REQUIRED 12# @ECLASS-VARIABLE: VIRTUALX_REQUIRED
13# @DESCRIPTION: 13# @DESCRIPTION:
14# Variable specifying the dependency on xorg-server and xhost. 14# Variable specifying the dependency on xorg-server and xhost.
23# @DESCRIPTION: 23# @DESCRIPTION:
24# Dep string available for use outside of eclass, in case a more 24# Dep string available for use outside of eclass, in case a more
25# complicated dep is needed. 25# complicated dep is needed.
26# You can specify the variable BEFORE inherit to add more dependencies. 26# You can specify the variable BEFORE inherit to add more dependencies.
27VIRTUALX_DEPEND="${VIRTUALX_DEPEND} 27VIRTUALX_DEPEND="${VIRTUALX_DEPEND}
28 !prefix? ( x11-base/xorg-server[-minimal] ) 28 !prefix? ( x11-base/xorg-server[xvfb] )
29 x11-apps/xhost 29 x11-apps/xhost
30" 30"
31 31
32# @ECLASS-VARIABLE: VIRTUALX_COMMAND 32# @ECLASS-VARIABLE: VIRTUALX_COMMAND
33# @DESCRIPTION: 33# @DESCRIPTION:
68 IUSE="${VIRTUALX_REQUIRED}" 68 IUSE="${VIRTUALX_REQUIRED}"
69 ;; 69 ;;
70esac 70esac
71 71
72# @FUNCTION: virtualmake 72# @FUNCTION: virtualmake
73# @DESCRIPTION: 73# @DESCRIPTION:
74# Function which attach to running X session or start new Xvfb session 74# Function which attach to running X session or start new Xvfb session
75# where the VIRTUALX_COMMAND variable content gets executed. 75# where the VIRTUALX_COMMAND variable content gets executed.
76virtualmake() { 76virtualmake() {
77 debug-print-function ${FUNCNAME} "$@" 77 debug-print-function ${FUNCNAME} "$@"
78 78
162 162
163 return 0 # always return 0, it can be altered by failed kill for Xvfb 163 return 0 # always return 0, it can be altered by failed kill for Xvfb
164} 164}
165 165
166# @FUNCTION: Xmake 166# @FUNCTION: Xmake
167# @DESCRIPTION: 167# @DESCRIPTION:
168# Same as "make", but set up the Xvfb hack if needed. 168# Same as "make", but set up the Xvfb hack if needed.
169# Deprecated call. 169# Deprecated call.
170Xmake() { 170Xmake() {
171 debug-print-function ${FUNCNAME} "$@" 171 debug-print-function ${FUNCNAME} "$@"
172 172
174 ewarn "QA: rather execute Xemake -j1 if you have issues with parallel make" 174 ewarn "QA: rather execute Xemake -j1 if you have issues with parallel make"
175 VIRTUALX_COMMAND="emake -j1" virtualmake "$@" 175 VIRTUALX_COMMAND="emake -j1" virtualmake "$@"
176} 176}
177 177
178# @FUNCTION: Xemake 178# @FUNCTION: Xemake
179# @DESCRIPTION: 179# @DESCRIPTION:
180# Same as "emake", but set up the Xvfb hack if needed. 180# Same as "emake", but set up the Xvfb hack if needed.
181Xemake() { 181Xemake() {
182 debug-print-function ${FUNCNAME} "$@" 182 debug-print-function ${FUNCNAME} "$@"
183 183
184 VIRTUALX_COMMAND="emake" virtualmake "$@" 184 VIRTUALX_COMMAND="emake" virtualmake "$@"
185} 185}
186 186
187# @FUNCTION: Xeconf 187# @FUNCTION: Xeconf
188# @DESCRIPTION: 188# @DESCRIPTION:
189# Same as "econf", but set up the Xvfb hack if needed. 189# Same as "econf", but set up the Xvfb hack if needed.
190Xeconf() { 190Xeconf() {
191 debug-print-function ${FUNCNAME} "$@" 191 debug-print-function ${FUNCNAME} "$@"
192 192
193 VIRTUALX_COMMAND="econf" virtualmake "$@" 193 VIRTUALX_COMMAND="econf" virtualmake "$@"
194} 194}

Legend:
Removed from v.1.38  
changed lines
  Added in v.1.40

  ViewVC Help
Powered by ViewVC 1.1.20