summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schlemmer <azarah@gentoo.org>2002-05-05 16:47:04 +0000
committerMartin Schlemmer <azarah@gentoo.org>2002-05-05 16:47:04 +0000
commitb07d9f2b8f7184b07a5f37848d895142da0ca5e3 (patch)
tree123436ac77345a4d5f3e7548ed0980fc3b79edaa /eclass/virtualx.eclass
parentmore eclass conversions (diff)
downloadgentoo-2-b07d9f2b8f7184b07a5f37848d895142da0ca5e3.tar.gz
gentoo-2-b07d9f2b8f7184b07a5f37848d895142da0ca5e3.tar.bz2
gentoo-2-b07d9f2b8f7184b07a5f37848d895142da0ca5e3.zip
hopefull chroot fixup
Diffstat (limited to 'eclass/virtualx.eclass')
-rw-r--r--eclass/virtualx.eclass15
1 files changed, 11 insertions, 4 deletions
diff --git a/eclass/virtualx.eclass b/eclass/virtualx.eclass
index 6c5f5a55a43d..a55d9b8a64c2 100644
--- a/eclass/virtualx.eclass
+++ b/eclass/virtualx.eclass
@@ -1,7 +1,7 @@
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# Author: Martin Schlemmer <azarah@gentoo.org>
-# $Header: /var/cvsroot/gentoo-x86/eclass/virtualx.eclass,v 1.3 2002/04/15 03:33:50 azarah Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/virtualx.eclass,v 1.4 2002/05/05 16:47:04 azarah Exp $
# This eclass can be used for packages that needs a working X environment to build
ECLASS=virtualx
newdepend virtual/x11
@@ -16,9 +16,16 @@ virtualmake() {
if [ -z "$DISPLAY" ] || ! /usr/X11R6/bin/xhost
then
export XAUTHORITY=
- # Mandrake's hack to allow compiling without the X display
- local i=0
- XDISPLAY=$(i=0; while [ -f /tmp/.X${i}-lock ] ; do i=$((${i}+1));done; echo ${i})
+ # The following is derived from Mandrake's hack to allow
+ # compiling without the X display
+
+ # Only start at :1, as the default display is usually :0,
+ # and Xvfb cannot start if X is already running. This
+ # is mainly to fix chroot issues where this wont detect
+ # a running X, as we dont have /tmp mounted (--bind) in
+ # the chroot. (Azarah - 5 May 2002)
+ local i=1
+ XDISPLAY=$(i=1; while [ -f /tmp/.X${i}-lock ] ; do i=$((${i}+1));done; echo ${i})
/usr/X11R6/bin/Xvfb :${XDISPLAY} -screen 0 800x600x32 &>/dev/null &
export DISPLAY=:${XDISPLAY}