diff options
author | Chí-Thanh Christopher Nguyễn <chithanh@gentoo.org> | 2012-03-18 15:42:58 +0000 |
---|---|---|
committer | Chí-Thanh Christopher Nguyễn <chithanh@gentoo.org> | 2012-03-18 15:42:58 +0000 |
commit | 362397f6dd1d96fe0046c1852ee36fb760f7a206 (patch) | |
tree | 6b9ea0bc586abca47b7dc891adec0c80afb982d3 /x11-drivers | |
parent | Drop sparc keywords (diff) | |
download | gentoo-2-362397f6dd1d96fe0046c1852ee36fb760f7a206.tar.gz gentoo-2-362397f6dd1d96fe0046c1852ee36fb760f7a206.tar.bz2 gentoo-2-362397f6dd1d96fe0046c1852ee36fb760f7a206.zip |
Fix building against xorg-server-1.12.
(Portage version: 2.2.0_alpha90/cvs/Linux x86_64)
Diffstat (limited to 'x11-drivers')
5 files changed, 168 insertions, 2 deletions
diff --git a/x11-drivers/xf86-video-cirrus/ChangeLog b/x11-drivers/xf86-video-cirrus/ChangeLog index d78991425fdd..e1a276eab2e0 100644 --- a/x11-drivers/xf86-video-cirrus/ChangeLog +++ b/x11-drivers/xf86-video-cirrus/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for x11-drivers/xf86-video-cirrus -# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/x11-drivers/xf86-video-cirrus/ChangeLog,v 1.38 2010/09/11 22:24:19 scarabeus Exp $ +# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/x11-drivers/xf86-video-cirrus/ChangeLog,v 1.39 2012/03/18 15:42:58 chithanh Exp $ + +*xf86-video-cirrus-1.3.2-r1 (18 Mar 2012) + + 18 Mar 2012; Chí-Thanh Christopher Nguyễn <chithanh@gentoo.org> + +files/xf86-video-cirrus-1.3.2-pcitag-declare.patch, + +files/xf86-video-cirrus-1.3.2-pcitag-redefine.patch, + +files/xf86-video-cirrus-1.3.2-xorg-server-1.12.patch, + +xf86-video-cirrus-1.3.2-r1.ebuild: + Fix building against xorg-server-1.12. 11 Sep 2010; Tomáš Chvátal <scarabeus@gentoo.org> -files/cirrus.xinf: drop useless file diff --git a/x11-drivers/xf86-video-cirrus/files/xf86-video-cirrus-1.3.2-pcitag-declare.patch b/x11-drivers/xf86-video-cirrus/files/xf86-video-cirrus-1.3.2-pcitag-declare.patch new file mode 100644 index 000000000000..9ea84f52ed3e --- /dev/null +++ b/x11-drivers/xf86-video-cirrus/files/xf86-video-cirrus-1.3.2-pcitag-declare.patch @@ -0,0 +1,42 @@ +From 05fd00f46eb3be46d669921d11dff6fe8a5bb60b Mon Sep 17 00:00:00 2001 +From: Jeremy Huddleston <jeremyhu@apple.com> +Date: Sat, 29 Oct 2011 23:58:41 +0000 +Subject: pciTag was removed from xorg-server, so provide it in-driver until this is updated to use libpciaccess + +Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> +--- +diff --git a/src/cir_pcirename.h b/src/cir_pcirename.h +index f0f5cf8..fa60a19 100644 +--- a/src/cir_pcirename.h ++++ b/src/cir_pcirename.h +@@ -34,6 +34,28 @@ enum region_type { + REGION_IO + }; + ++#if (defined(__alpha__) || defined(__ia64__)) && defined (linux) ++#define PCI_DOM_MASK 0x01fful ++#else ++#define PCI_DOM_MASK 0x0ffu ++#endif ++ ++#ifndef PCI_DOM_MASK ++# define PCI_DOM_MASK 0x0ffu ++#endif ++#define PCI_DOMBUS_MASK (((PCI_DOM_MASK) << 8) | 0x0ffu) ++ ++static inline uint32_t ++pciTag(int busnum, int devnum, int funcnum) ++{ ++ uint32_t tag; ++ tag = (busnum & (PCI_DOMBUS_MASK)) << 16; ++ tag |= (devnum & 0x00001fu) << 11; ++ tag |= (funcnum & 0x000007u) << 8; ++ ++ return tag; ++} ++ + #ifndef XSERVER_LIBPCIACCESS + + /* pciVideoPtr */ +-- +cgit v0.9.0.2-2-gbebe diff --git a/x11-drivers/xf86-video-cirrus/files/xf86-video-cirrus-1.3.2-pcitag-redefine.patch b/x11-drivers/xf86-video-cirrus/files/xf86-video-cirrus-1.3.2-pcitag-redefine.patch new file mode 100644 index 000000000000..3823fdda4c3d --- /dev/null +++ b/x11-drivers/xf86-video-cirrus/files/xf86-video-cirrus-1.3.2-pcitag-redefine.patch @@ -0,0 +1,35 @@ +From d9c9cc333e8a67749c20b3b30129f4d2297a3e0a Mon Sep 17 00:00:00 2001 +From: Jeremy Huddleston <jeremyhu@apple.com> +Date: Mon, 31 Oct 2011 03:34:47 +0000 +Subject: Build fix for older servers (error: conflicting types for 'pciTag') + +/usr/include/xorg/xf86Pci.h:254:25: note: previous declaration of 'pciTag' was here + +Reported-by: Johannes Obermayr <johannesobermayr@gmx.de> +Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> +--- +diff --git a/src/cir_pcirename.h b/src/cir_pcirename.h +index fa60a19..669b8fe 100644 +--- a/src/cir_pcirename.h ++++ b/src/cir_pcirename.h +@@ -34,6 +34,10 @@ enum region_type { + REGION_IO + }; + ++#include "xf86Module.h" ++ ++#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) >= 12 ++ + #if (defined(__alpha__) || defined(__ia64__)) && defined (linux) + #define PCI_DOM_MASK 0x01fful + #else +@@ -55,6 +59,7 @@ pciTag(int busnum, int devnum, int funcnum) + + return tag; + } ++#endif /* GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) >= 12 */ + + #ifndef XSERVER_LIBPCIACCESS + +-- +cgit v0.9.0.2-2-gbebe diff --git a/x11-drivers/xf86-video-cirrus/files/xf86-video-cirrus-1.3.2-xorg-server-1.12.patch b/x11-drivers/xf86-video-cirrus/files/xf86-video-cirrus-1.3.2-xorg-server-1.12.patch new file mode 100644 index 000000000000..c2bf2d0cf8ba --- /dev/null +++ b/x11-drivers/xf86-video-cirrus/files/xf86-video-cirrus-1.3.2-xorg-server-1.12.patch @@ -0,0 +1,61 @@ +From 9fcfd1aa760023e449cbb8c1eebd0bb570a6aacb Mon Sep 17 00:00:00 2001 +From: Jeremy Huddleston <jeremyhu@apple.com> +Date: Wed, 19 Oct 2011 07:12:15 +0000 +Subject: Build fix for ABI Version 12 + +ABI Version 12 removes support for multiple PCI domains. If you need to +use this driver on a system with more than one PCI domain, you should +either port this driver to using libpciaccess directly or stick with an +older server. + +Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> +--- +diff --git a/src/alp_driver.c b/src/alp_driver.c +index edcaef3..e773471 100644 +--- a/src/alp_driver.c ++++ b/src/alp_driver.c +@@ -480,7 +480,12 @@ AlpPreInit(ScrnInfoPtr pScrn, int flags) + + pCir = CIRPTR(pScrn); + pCir->pScrn = pScrn; ++ ++#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12 + pCir->PIOReg = hwp->PIOOffset + 0x3CE; ++#else ++ pCir->PIOReg = 0x3CE; ++#endif + + /* Get the entity, and make sure it is PCI. */ + pCir->pEnt = xf86GetEntityInfo(pScrn->entityList[0]); +diff --git a/src/cir.h b/src/cir.h +index 64531f5..861966d 100644 +--- a/src/cir.h ++++ b/src/cir.h +@@ -21,7 +21,7 @@ typedef struct { + CARD32 properties; + pciVideoPtr PciInfo; + PCITAG PciTag; +- IOADDRESS PIOReg; ++ unsigned long PIOReg; + union { + struct lgRec *lg; + struct alpRec *alp; +diff --git a/src/lg_driver.c b/src/lg_driver.c +index 0f9f1f6..fc864f8 100644 +--- a/src/lg_driver.c ++++ b/src/lg_driver.c +@@ -372,7 +372,12 @@ LgPreInit(ScrnInfoPtr pScrn, int flags) + + pCir = CIRPTR(pScrn); + pCir->pScrn = pScrn; ++ ++#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12 + pCir->PIOReg = hwp->PIOOffset + 0x3CE; ++#else ++ pCir->PIOReg = 0x3CE; ++#endif + + /* Get the entity, and make sure it is PCI. */ + pCir->pEnt = xf86GetEntityInfo(pScrn->entityList[0]); +-- +cgit v0.9.0.2-2-gbebe diff --git a/x11-drivers/xf86-video-cirrus/xf86-video-cirrus-1.3.2-r1.ebuild b/x11-drivers/xf86-video-cirrus/xf86-video-cirrus-1.3.2-r1.ebuild new file mode 100644 index 000000000000..52eee8f78150 --- /dev/null +++ b/x11-drivers/xf86-video-cirrus/xf86-video-cirrus-1.3.2-r1.ebuild @@ -0,0 +1,19 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/x11-drivers/xf86-video-cirrus/xf86-video-cirrus-1.3.2-r1.ebuild,v 1.1 2012/03/18 15:42:58 chithanh Exp $ + +EAPI=4 +inherit xorg-2 + +DESCRIPTION="Cirrus Logic video driver" +KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~x86 ~x86-fbsd" +IUSE="" + +RDEPEND=">=x11-base/xorg-server-1.0.99" +DEPEND="${RDEPEND}" + +PATCHES=( + "${FILESDIR}"/${PN}-1.3.2-xorg-server-1.12.patch + "${FILESDIR}"/${PN}-1.3.2-pcitag-declare.patch + "${FILESDIR}"/${PN}-1.3.2-pcitag-redefine.patch +) |