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 <gentoo-commits+bounces-319489-garchives=archives.gentoo.org@lists.gentoo.org>)
	id 1PscDu-0008DX-GH
	for garchives@archives.gentoo.org; Thu, 24 Feb 2011 14:31:18 +0000
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 5D6AF1C012;
	Thu, 24 Feb 2011 14:31:10 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	by pigeon.gentoo.org (Postfix) with ESMTP id 299961C00A
	for <gentoo-commits@lists.gentoo.org>; Thu, 24 Feb 2011 14:31:10 +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 8782C1B40C0
	for <gentoo-commits@lists.gentoo.org>; Thu, 24 Feb 2011 14:31:09 +0000 (UTC)
Received: from localhost.localdomain (localhost [127.0.0.1])
	by pelican.gentoo.org (Postfix) with ESMTP id E22358006A
	for <gentoo-commits@lists.gentoo.org>; Thu, 24 Feb 2011 14:31:08 +0000 (UTC)
From: "Tomas Chvatal" <scarabeus@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Tomas Chvatal" <scarabeus@gentoo.org>
Message-ID: <ad26a0ba070d1e3f7cf391ec0889a0586c12a43e.scarabeus@gentoo>
Subject: [gentoo-commits] proj/x11:master commit in: eclass/
X-VCS-Repository: proj/x11
X-VCS-Files: eclass/xorg-2.eclass
X-VCS-Directories: eclass/
X-VCS-Committer: scarabeus
X-VCS-Committer-Name: Tomas Chvatal
X-VCS-Revision: ad26a0ba070d1e3f7cf391ec0889a0586c12a43e
Date: Thu, 24 Feb 2011 14:31:08 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: quoted-printable
X-Archives-Salt: 
X-Archives-Hash: 80375299d24f88770716544d434f4d3d

commit:     ad26a0ba070d1e3f7cf391ec0889a0586c12a43e
Author:     Tomas Chvatal <scarabeus <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 24 14:10:34 2011 +0000
Commit:     Tomas Chvatal <scarabeus <AT> gentoo <DOT> org>
CommitDate: Thu Feb 24 14:10:34 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=3Dproj/x11.git;a=3Dc=
ommit;h=3Dad26a0ba

Add common dependency handling for video drivers into eclass.

---
 eclass/xorg-2.eclass |   38 +++++++++++++++++++++++++++++++++++---
 1 files changed, 35 insertions(+), 3 deletions(-)

diff --git a/eclass/xorg-2.eclass b/eclass/xorg-2.eclass
index 04eeb56..103979b 100644
--- a/eclass/xorg-2.eclass
+++ b/eclass/xorg-2.eclass
@@ -174,9 +174,34 @@ fi
=20
 DEPEND+=3D" >=3Ddev-util/pkgconfig-0.23"
=20
-# Check deps on xorg-server
-has dri ${IUSE//+} && DEPEND+=3D" dri? ( >=3Dx11-base/xorg-server-1.6.3.=
901-r2[-minimal] )"
-[[ -n "${DRIVER}" ]] && DEPEND+=3D" x11-base/xorg-server[xorg]"
+# Check deps on drivers
+if has dri ${IUSE//+}; then
+	COMMON_DEPEND+=3D" dri? (
+		x11-base/xorg-server[-minimal]
+		x11-libs/libdrm
+	)"
+	DEPEND+=3D" dri? (
+		x11-proto/xf86driproto
+		x11-proto/glproto
+		x11-proto/dri2proto
+	)"
+fi
+if [[ -n "${DRIVER}" ]]; then
+	COMMON_DEPEND+=3D"
+		x11-base/xorg-server[xorg]
+		x11-libs/libpciaccess
+	"
+	# we also needs some protos and libs in all cases
+	DEPEND+=3D"
+		x11-proto/fontsproto
+		x11-proto/randrproto
+		x11-proto/renderproto
+		x11-proto/videoproto
+		x11-proto/xextproto
+		x11-proto/xineramaproto
+		x11-proto/xproto
+	"
+fi
=20
 # Add deps on documentation
 # Most docbooks use dtd version 4.2 and 4.3 add more when found
@@ -191,6 +216,13 @@ if has doc ${IUSE//+}; then
 	"
 fi
=20
+DEPEND+=3D" ${COMMON_DEPEND}"
+RDEPEND+=3D" ${COMMON_DEPEND}"
+unset COMMON_DEPEND
+
+debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: DEPEND=3D${DEPEND}"
+debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: RDEPEND=3D${RDEPEND}"
+
 # @FUNCTION: xorg-2_pkg_setup
 # @DESCRIPTION:
 # Setup prefix compat