Replace the antiquated search mechanism for a free DISPLAY with Xvfb's -displayfd option that makes Xvfb choose one itself and print it to
given fd.
Signed-off-by: Michał Górny <
mgorny@gentoo.org>
---
eclass/virtualx.eclass | 62 ++++++++++++++----------------------------
1 file changed, 20 insertions(+), 42 deletions(-)
diff --git a/eclass/virtualx.eclass b/eclass/virtualx.eclass
index d1c05e20b246..c0af095e89a5 100644
--- a/eclass/virtualx.eclass
+++ b/eclass/virtualx.eclass
@@ -108,65 +108,43 @@ virtx() {
local i=0
local retval=0
local OLD_SANDBOX_ON="${SANDBOX_ON}"
- local XDISPLAY
local xvfbargs=( -screen 0 1280x1024x24 +extension RANDR )
debug-print "${FUNCNAME}: running Xvfb hack"
export XAUTHORITY=
- # The following is derived from Mandrake's hack to allow
- # compiling without the X display
-
- einfo "Scanning for an open DISPLAY to start Xvfb ..."
- # If we are in a chrooted environment, and there is already a
- # X server started outside of the chroot, Xvfb will fail to start
- # on the same display (most cases this is :0 ), so make sure
- # Xvfb is started, else bump the display number
- #
- # Azarah - 5 May 2002
- # GNOME GDM may have started X on