diff options
author | Martin Schlemmer <azarah@gentoo.org> | 2002-05-05 16:47:04 +0000 |
---|---|---|
committer | Martin Schlemmer <azarah@gentoo.org> | 2002-05-05 16:47:04 +0000 |
commit | 1b4a622dcea89e6eddee44c838a8603ed7287e08 (patch) | |
tree | 2bf5d9d2891a2f2452bac35b6a9a71d03617582f /eclass/virtualx.eclass | |
parent | more eclass conversions (diff) | |
download | historical-1b4a622dcea89e6eddee44c838a8603ed7287e08.tar.gz historical-1b4a622dcea89e6eddee44c838a8603ed7287e08.tar.bz2 historical-1b4a622dcea89e6eddee44c838a8603ed7287e08.zip |
hopefull chroot fixup
Diffstat (limited to 'eclass/virtualx.eclass')
-rw-r--r-- | eclass/virtualx.eclass | 15 |
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} |