--- virtualx.eclass.orig 2011-08-05 13:14:44.000000000 +1200 +++ virtualx.eclass 2011-08-05 13:28:04.000000000 +1200 @@ -93,9 +93,19 @@ # If $DISPLAY is not set, or xhost cannot connect to an X # display, then do the Xvfb hack. - if [[ -n ${XVFB} && -n ${XHOST} ]] && \ + if [[ -n ${XHOST} ]] && \ ( [[ -z ${DISPLAY} ]] || ! (${XHOST} &>/dev/null) ) ; then debug-print "${FUNCNAME}: running Xvfb hack" + + # On prefix, we require Xvfb to be provided by the host + if use prefix ; then + if test -z "${XVFB}" ; then + eerror "On prefix, we require Xvfb to be provided by the host." + eerror "Please install the appropriate pacakge for your system." + die "Unable to find 'Xvfb' for X11-based build/tests." + fi + fi + export XAUTHORITY= # The following is derived from Mandrake's hack to allow # compiling without the X display