From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1PxJoC-0001xI-LP for garchives@archives.gentoo.org; Wed, 09 Mar 2011 13:52:12 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id EAB4B1C011; Wed, 9 Mar 2011 13:52:05 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id A71551C011 for ; Wed, 9 Mar 2011 13:52:05 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 21A3A1B401B for ; Wed, 9 Mar 2011 13:52:05 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 801508006A for ; Wed, 9 Mar 2011 13:52:04 +0000 (UTC) From: "Tomas Chvatal" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Tomas Chvatal" Message-ID: Subject: [gentoo-commits] proj/x11:master commit in: eclass/ X-VCS-Repository: proj/x11 X-VCS-Files: eclass/virtualx.eclass X-VCS-Directories: eclass/ X-VCS-Committer: scarabeus X-VCS-Committer-Name: Tomas Chvatal X-VCS-Revision: f3efd21914ab08218791c736301f0d932532b43c Date: Wed, 9 Mar 2011 13:52:04 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: c551a90b218c97757a5fdf2c1d7f8871 commit: f3efd21914ab08218791c736301f0d932532b43c Author: Tomas Chvatal gentoo org> AuthorDate: Wed Mar 9 13:26:30 2011 +0000 Commit: Tomas Chvatal gentoo org> CommitDate: Wed Mar 9 13:27:03 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/x11.git;a=3Dc= ommit;h=3Df3efd219 Drop vritualx.eclass. Moved to main tree. --- eclass/virtualx.eclass | 192 ------------------------------------------= ------ 1 files changed, 0 insertions(+), 192 deletions(-) diff --git a/eclass/virtualx.eclass b/eclass/virtualx.eclass deleted file mode 100644 index e6bb392..0000000 --- a/eclass/virtualx.eclass +++ /dev/null @@ -1,192 +0,0 @@ -# Copyright 1999-2010 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/virtualx.eclass,v 1.35 2010/05= /15 05:40:46 dirtyepic Exp $ - -# Original author: Martin Schlemmer - -# @ECLASS: virtualx.eclass -# @MAINTAINER: -# x11@gentoo.org -# @BLURB: This eclass can be used for packages that needs a working X en= vironment to build. - -# @ECLASS-VARIABLE: VIRTUALX_REQUIRED -# @DESCRIPTION: -# Variable specifying the dependency on xorg-server and xhost. -# Possible special values are "always" and "manual", which specify -# the dependency to be set unconditionaly or not at all. -# Any other value is taken as useflag desired to be in control of -# the dependency (eg. VIRTUALX_REQUIRED=3D"kde" will add the dependency -# into "kde? ( )" and add kde into IUSE. -: ${VIRTUALX_REQUIRED:=3Dtest} - -# @ECLASS-VARIABLE: VIRTUALX_DEPEND -# @DESCRIPTION: -# Dep string available for use outside of eclass, in case a more -# complicated dep is needed. -# You can specify the variable BEFORE inherit to add more dependencies. -VIRTUALX_DEPEND=3D"${VIRTUALX_DEPEND} - !prefix? ( x11-base/xorg-server[-minimal] ) - x11-apps/xhost -" - -# @ECLASS-VARIABLE: VIRTUALX_COMMAND -# @DESCRIPTION: -# Command (or eclass function call) to be run in the X11 environment -# (within virtualmake function). -: ${VIRTUALX_COMMAND:=3D"emake"} - -has "${EAPI:-0}" 0 1 && die "virtualx eclass require EAPI=3D2 or newer." - -case ${VIRTUALX_REQUIRED} in - manual) - ;; - always) - DEPEND=3D"${VIRTUALX_DEPEND}" - RDEPEND=3D"" - ;; - optional|tests) - # deprecated section YAY. - ewarn "QA: VIRTUALX_REQUIRED=3Doptional and VIRTUALX_REQUIRED=3Dtests = are deprecated." - ewarn "QA: You can drop the variable definition completely from ebuild= ," - ewarn "QA: because it is default behaviour." - - if [[ -n ${VIRTUALX_USE} ]]; then - # so they like to specify the useflag - ewarn "QA: VIRTUALX_USE variable is deprecated." - ewarn "QA: Please read eclass manpage to find out how to use VIRTUALX= _REQUIRED" - ewarn "QA: to achieve the same behaviour." - fi - - [[ -z ${VIRTUALX_USE} ]] && VIRTUALX_USE=3D"test" - DEPEND=3D"${VIRTUALX_USE}? ( ${VIRTUALX_DEPEND} )" - RDEPEND=3D"" - IUSE=3D"${VIRTUALX_USE}" - ;; - *) - DEPEND=3D"${VIRTUALX_REQUIRED}? ( ${VIRTUALX_DEPEND} )" - RDEPEND=3D"" - IUSE=3D"${VIRTUALX_REQUIRED}" - ;; -esac - -# @FUNCTION: virtualmake -# @DESCRIPTION:=20 -# Function which attach to running X session or start new Xvfb session -# where the VIRTUALX_COMMAND variable content gets executed. -virtualmake() { - debug-print-function ${FUNCNAME} "$@" - - local i=3D0 - local retval=3D0 - local OLD_SANDBOX_ON=3D"${SANDBOX_ON}" - local XVFB=3D$(type -p Xvfb) - local XHOST=3D$(type -p xhost) - local xvfbargs=3D"-screen 0 800x600x24" - - # backcompat for maketype - if [[ -n ${maketype} ]]; then - ewarn "QA: ebuild is exporting \$maketype=3D${maketype}" - ewarn "QA: Ebuild should be migrated to use VIRTUALX_COMMAND=3D${maket= ype} instead." - ewarn "QA: Setting VIRTUALX_COMMAND to \$maketype conveniently for now= ." - VIRTUALX_COMMAND=3D${maketype} - fi - - # If $DISPLAY is not set, or xhost cannot connect to an X - # display, then do the Xvfb hack. - if [[ -n ${XVFB} && -n ${XHOST} ]] && \ - ( [[ -z ${DISPLAY} ]] || ! (${XHOST} &>/dev/null) ) ; then - debug-print "${FUNCNAME}: running Xvfb hack" - export XAUTHORITY=3D - # 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 - XDISPLAY=3D$(i=3D0; while [[ -f /tmp/.X${i}-lock ]] ; do ((i++));done;= echo ${i}) - debug-print "${FUNCNAME}: XDISPLAY=3D${XDISPLAY}" - - # We really do not want SANDBOX enabled here - export SANDBOX_ON=3D"0" - - debug-print "${FUNCNAME}: ${XVFB} :${XDISPLAY} ${xvfbargs}" - ${XVFB} :${XDISPLAY} ${xvfbargs} &>/dev/null & - sleep 2 - - local start=3D${XDISPLAY} - while [[ ! -f /tmp/.X${XDISPLAY}-lock ]]; do - # Stop trying after 15 tries - if ((XDISPLAY - start > 15)) ; then - eerror "'${XVFB} :${XDISPLAY} ${xvfbargs}' returns:" - echo - ${XVFB} :${XDISPLAY} ${xvfbargs} - echo - eerror "If possible, correct the above error and try your emerge aga= in." - die "Unable to start Xvfb" - fi - - ((XDISPLAY++)) - debug-print "${FUNCNAME}: ${XVFB} :${XDISPLAY} ${xvfbargs}" - ${XVFB} :${XDISPLAY} ${xvfbargs} &>/dev/null & - sleep 2 - done - - # Now enable SANDBOX again if needed. - export SANDBOX_ON=3D"${OLD_SANDBOX_ON}" - - einfo "Starting Xvfb on \$DISPLAY=3D${XDISPLAY} ..." - - export DISPLAY=3D:${XDISPLAY} - # Do not break on error, but setup $retval, as we need - # to kill Xvfb - debug-print "${FUNCNAME}: ${VIRTUALX_COMMAND} \"$@\"" - ${VIRTUALX_COMMAND} "$@" - retval=3D$? - - # Now kill Xvfb - kill $(cat /tmp/.X${XDISPLAY}-lock) - else - debug-print "${FUNCNAME}: attaching to running X display" - # Normal make if we can connect to an X display - debug-print "${FUNCNAME}: ${VIRTUALX_COMMAND} \"$@\"" - ${VIRTUALX_COMMAND} "$@" - retval=3D$? - fi - - # die if our command failed - [[ $? -ne 0 ]] && die "${FUNCNAME}: the ${VIRTALX_COMMAND} failed." -} - -# @FUNCTION: Xmake -# @DESCRIPTION:=20 -# Same as "make", but set up the Xvfb hack if needed. -# Deprecated call. -Xmake() { - debug-print-function ${FUNCNAME} "$@" - - ewarn "QA: you should not execute make directly" - ewarn "QA: rather execute Xemake -j1 if you have issues with parallel m= ake" - VIRTUALX_COMMAND=3D"emake" virtualmake "$@" -} - -# @FUNCTION: Xemake -# @DESCRIPTION:=20 -# Same as "emake", but set up the Xvfb hack if needed. -Xemake() { - debug-print-function ${FUNCNAME} "$@" - - VIRTUALX_COMMAND=3D"make" virtualmake "$@" -} - -# @FUNCTION: Xeconf -# @DESCRIPTION:=20 -# Same as "econf", but set up the Xvfb hack if needed. -Xeconf() { - debug-print-function ${FUNCNAME} "$@" - - VIRTUALX_COMMAND=3D"econf" virtualmake "$@" -}