| 1 | # Copyright 1999-2011 Gentoo Foundation |
1 | # Copyright 1999-2012 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.40 2011/08/22 04:46:32 vapier Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/virtualx.eclass,v 1.42 2012/10/02 08:14:36 kensington Exp $ |
| 4 | |
4 | |
| 5 | # @ECLASS: virtualx.eclass |
5 | # @ECLASS: virtualx.eclass |
| 6 | # @MAINTAINER: |
6 | # @MAINTAINER: |
| 7 | # x11@gentoo.org |
7 | # x11@gentoo.org |
| 8 | # @AUTHOR: |
8 | # @AUTHOR: |
| … | |
… | |
| 79 | local i=0 |
79 | local i=0 |
| 80 | local retval=0 |
80 | local retval=0 |
| 81 | local OLD_SANDBOX_ON="${SANDBOX_ON}" |
81 | local OLD_SANDBOX_ON="${SANDBOX_ON}" |
| 82 | local XVFB=$(type -p Xvfb) |
82 | local XVFB=$(type -p Xvfb) |
| 83 | local XHOST=$(type -p xhost) |
83 | local XHOST=$(type -p xhost) |
| 84 | local xvfbargs="-screen 0 800x600x24" |
84 | local xvfbargs="-screen 0 1280x1024x24" |
| 85 | |
85 | |
| 86 | # backcompat for maketype |
86 | # backcompat for maketype |
| 87 | if [[ -n ${maketype} ]]; then |
87 | if [[ -n ${maketype} ]]; then |
| 88 | ewarn "QA: ebuild is exporting \$maketype=${maketype}" |
88 | ewarn "QA: ebuild is exporting \$maketype=${maketype}" |
| 89 | ewarn "QA: Ebuild should be migrated to use VIRTUALX_COMMAND=${maketype} instead." |
89 | ewarn "QA: Ebuild should be migrated to use VIRTUALX_COMMAND=${maketype} instead." |
| … | |
… | |
| 142 | |
142 | |
| 143 | export DISPLAY=:${XDISPLAY} |
143 | export DISPLAY=:${XDISPLAY} |
| 144 | # Do not break on error, but setup $retval, as we need |
144 | # Do not break on error, but setup $retval, as we need |
| 145 | # to kill Xvfb |
145 | # to kill Xvfb |
| 146 | debug-print "${FUNCNAME}: ${VIRTUALX_COMMAND} \"$@\"" |
146 | debug-print "${FUNCNAME}: ${VIRTUALX_COMMAND} \"$@\"" |
| 147 | ${VIRTUALX_COMMAND} "$@" |
147 | nonfatal ${VIRTUALX_COMMAND} "$@" |
| 148 | retval=$? |
148 | retval=$? |
| 149 | |
149 | |
| 150 | # Now kill Xvfb |
150 | # Now kill Xvfb |
| 151 | kill $(cat /tmp/.X${XDISPLAY}-lock) |
151 | kill $(cat /tmp/.X${XDISPLAY}-lock) |
| 152 | else |
152 | else |