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 1Prb6s-0007Y5-6i for garchives@archives.gentoo.org; Mon, 21 Feb 2011 19:07:50 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id BB1FC1C05B; Mon, 21 Feb 2011 19:07:27 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 373271C05B for ; Mon, 21 Feb 2011 19:07:27 +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 68DB01B414D for ; Mon, 21 Feb 2011 19:07:26 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id CB4E38006A for ; Mon, 21 Feb 2011 19:07:25 +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: <51b087f45fae09dcc3bdadadbfdca18a9377699e.scarabeus@gentoo> 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: 51b087f45fae09dcc3bdadadbfdca18a9377699e Date: Mon, 21 Feb 2011 19:07:25 +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: 4a66050c5cc9701496614f465989df17 commit: 51b087f45fae09dcc3bdadadbfdca18a9377699e Author: Tomas Chvatal gentoo org> AuthorDate: Mon Feb 21 19:05:55 2011 +0000 Commit: Tomas Chvatal gentoo org> CommitDate: Mon Feb 21 19:05:55 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/x11.git;a=3Dc= ommit;h=3D51b087f4 virtualx.eclass overhaul the VIRTUALX_REQUIRED, Deprecate VIRTUALX_USE an= d adjust the VIRTUALX_DEPEND a bit. --- eclass/virtualx.eclass | 47 ++++++++++++++++++++++++++++--------------= ----- 1 files changed, 28 insertions(+), 19 deletions(-) diff --git a/eclass/virtualx.eclass b/eclass/virtualx.eclass index 9150c5a..4ac7bed 100644 --- a/eclass/virtualx.eclass +++ b/eclass/virtualx.eclass @@ -11,22 +11,20 @@ =20 # @ECLASS-VARIABLE: VIRTUALX_REQUIRED # @DESCRIPTION: -# Is a dependency on xorg-server and xhost needed? -# Valid values are "always", "optional", and "manual". -# "tests" is a synonym for "optional". -: ${VIRTUALX_REQUIRED:=3Doptional} - -# @ECLASS-VARIABLE: VIRTUALX_USE -# @DESCRIPTION: -# If VIRTUALX_REQUIRED=3Doptional, what USE flag should control -# the dependency? -: ${VIRTUALX_USE:=3Dtest} +# 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} =20 # @ECLASS-VARIABLE: VIRTUALX_DEPEND # @DESCRIPTION: # Dep string available for use outside of eclass, in case a more # complicated dep is needed. -VIRTUALX_DEPEND=3D" +# 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 " @@ -34,29 +32,40 @@ VIRTUALX_DEPEND=3D" # @ECLASS-VARIABLE: VIRTUALX_COMMAND # @DESCRIPTION: # Command (or eclass function call) to be run in the X11 environment +# (within virtualmake function). : ${VIRTUALX_COMMAND:=3D"emake"} =20 has "${EAPI:-0}" 0 1 && die "virtualx eclass require EAPI=3D2 or newer." =20 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}" ;; - manual) - ;; *) - eerror "Invalid value (${VIRTUALX_REQUIRED}) for VIRTUALX_REQUIRED" - eerror "Valid values are:" - eerror " always" - eerror " optional (default if unset)" - eerror " manual" - die "Invalid value (${VIRTUALX_REQUIRED}) for VIRTUALX_REQUIRED" + DEPEND=3D"${VIRTUALX_REQUIRED}? ( ${VIRTUALX_DEPEND} )" + RDEPEND=3D"" + IUSE=3D"${VIRTUALX_REQUIRED}" ;; esac =20