summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeffrey Gardner <je_fro@gentoo.org>2007-11-16 06:47:08 +0000
committerJeffrey Gardner <je_fro@gentoo.org>2007-11-16 06:47:08 +0000
commit1ca968c7fcdd09e6ea578af1ee6fec1516a9579b (patch)
tree55e8fd16456f08c2ab09ff3b156d9fe290723bc2
parentbumping to latest svn (diff)
downloadje_fro-1ca968c7fcdd09e6ea578af1ee6fec1516a9579b.tar.gz
je_fro-1ca968c7fcdd09e6ea578af1ee6fec1516a9579b.tar.bz2
je_fro-1ca968c7fcdd09e6ea578af1ee6fec1516a9579b.zip
Trying this old one as the new stuff is broken on macbook pro...
svn path=/; revision=112
-rw-r--r--x11-drivers/ati-drivers/ChangeLog6
-rw-r--r--x11-drivers/ati-drivers/Manifest72
-rw-r--r--x11-drivers/ati-drivers/ati-drivers-8.40.4.ebuild424
-rw-r--r--x11-drivers/ati-drivers/files/09ati3
-rw-r--r--x11-drivers/ati-drivers/files/8.37.6/fix-ioctl-for-2.6.22.patch17
-rw-r--r--x11-drivers/ati-drivers/files/8.40.4/ati-drivers-2.6.23.patch41
-rw-r--r--x11-drivers/ati-drivers/files/8.40.4/ati-drivers-8.40.4-warnings.patch90
-rw-r--r--x11-drivers/ati-drivers/files/8.42.3/ati-drivers-2.6.23-2.patch327
-rw-r--r--x11-drivers/ati-drivers/files/ati-drivers-2.6.19.patch67
-rw-r--r--x11-drivers/ati-drivers/files/ati-drivers-2.6.20.patch73
-rw-r--r--x11-drivers/ati-drivers/files/ati-drivers-8.35.5-2.6.19.patch33
-rw-r--r--x11-drivers/ati-drivers/files/ati-drivers-8.35.5-2.6.20.patch11
-rw-r--r--x11-drivers/ati-drivers/files/ati-powermode.sh.patch32
-rw-r--r--x11-drivers/ati-drivers/files/atieventsd.rc622
14 files changed, 1137 insertions, 81 deletions
diff --git a/x11-drivers/ati-drivers/ChangeLog b/x11-drivers/ati-drivers/ChangeLog
index 3964db1..675dd8d 100644
--- a/x11-drivers/ati-drivers/ChangeLog
+++ b/x11-drivers/ati-drivers/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for x11-drivers/ati-drivers
# Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/x11-drivers/ati-drivers/ChangeLog,v 1.93 2007/10/09 08:13:46 dberkholz Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-drivers/ati-drivers/ChangeLog,v 1.94 2007/11/01 14:56:16 opfer Exp $
+
+ 01 Nov 2007; Christian Faulhammer <opfer@gentoo.org>
+ ati-drivers-8.40.4.ebuild:
+ stable x86, bug 195524
09 Oct 2007; Donnie Berkholz <dberkholz@gentoo.org>;
ati-drivers-8.27.10-r1.ebuild, ati-drivers-8.28.8.ebuild,
diff --git a/x11-drivers/ati-drivers/Manifest b/x11-drivers/ati-drivers/Manifest
index c58e040..806ed95 100644
--- a/x11-drivers/ati-drivers/Manifest
+++ b/x11-drivers/ati-drivers/Manifest
@@ -1,7 +1,23 @@
-AUX 8.42.3/ati-drivers-2.6.23-2.patch 2703 RMD160 e89dd56336df101e5da83cd660c51e9e29ce0b2c SHA1 3260d782fae2f28de8550b7f9623e56c0ed0fc82 SHA256 136db0c8c1852a7b47a9953540414ec9fbe825756459882a8482fe52107764fb
-MD5 679b4e07c76e582c147d401528e3185d files/8.42.3/ati-drivers-2.6.23-2.patch 2703
-RMD160 e89dd56336df101e5da83cd660c51e9e29ce0b2c files/8.42.3/ati-drivers-2.6.23-2.patch 2703
-SHA256 136db0c8c1852a7b47a9953540414ec9fbe825756459882a8482fe52107764fb files/8.42.3/ati-drivers-2.6.23-2.patch 2703
+AUX 09ati 75 RMD160 f4b42cfdc7deaa6fe7618e3506860a06a75de435 SHA1 01cac55ba02710dbd7d71737dd64dbec2cc081fd SHA256 5daa70f3e4c19f2b006bc7b2b22abde5404c3b498485b9ffac428eb458c32134
+MD5 5ac06946904a0282c5da617bda2a8f6b files/09ati 75
+RMD160 f4b42cfdc7deaa6fe7618e3506860a06a75de435 files/09ati 75
+SHA256 5daa70f3e4c19f2b006bc7b2b22abde5404c3b498485b9ffac428eb458c32134 files/09ati 75
+AUX 8.37.6/fix-ioctl-for-2.6.22.patch 487 RMD160 93e739f8b832529a999ecca2e6a0d447a2ced42f SHA1 5a7e0416be0957d3ed46d0f16cdb25bd1a68359d SHA256 c3df802a987974109db9d439932e88a2cdfa37a37c1a284a56b7b100a3de8f23
+MD5 57174c833bbf9f22953a8d66db121c21 files/8.37.6/fix-ioctl-for-2.6.22.patch 487
+RMD160 93e739f8b832529a999ecca2e6a0d447a2ced42f files/8.37.6/fix-ioctl-for-2.6.22.patch 487
+SHA256 c3df802a987974109db9d439932e88a2cdfa37a37c1a284a56b7b100a3de8f23 files/8.37.6/fix-ioctl-for-2.6.22.patch 487
+AUX 8.40.4/ati-drivers-2.6.23.patch 1497 RMD160 3bcd335769ee98b2119fc62784d091000115a5bd SHA1 9328ece148ad52c048805b9c2c3a3bf0937b6d16 SHA256 6ea6385e602b9659ca01ef1d53cb53ca955f2396a2d8cc914355d3bb2a590d88
+MD5 02b4bb91ef59f1583b7c8c7530fe1bfe files/8.40.4/ati-drivers-2.6.23.patch 1497
+RMD160 3bcd335769ee98b2119fc62784d091000115a5bd files/8.40.4/ati-drivers-2.6.23.patch 1497
+SHA256 6ea6385e602b9659ca01ef1d53cb53ca955f2396a2d8cc914355d3bb2a590d88 files/8.40.4/ati-drivers-2.6.23.patch 1497
+AUX 8.40.4/ati-drivers-8.40.4-warnings.patch 3262 RMD160 158206cf638fd0f2ee34e8ff02e6a399933f844d SHA1 7b47d4d89ff80e930cd2fc66f513dbaf66de07d5 SHA256 45caca456493c23a6475bbec63df26a33ead8de59bf52e3c06c4433740dc5261
+MD5 40ebcdcc8f5994b0ca22d72b15301e05 files/8.40.4/ati-drivers-8.40.4-warnings.patch 3262
+RMD160 158206cf638fd0f2ee34e8ff02e6a399933f844d files/8.40.4/ati-drivers-8.40.4-warnings.patch 3262
+SHA256 45caca456493c23a6475bbec63df26a33ead8de59bf52e3c06c4433740dc5261 files/8.40.4/ati-drivers-8.40.4-warnings.patch 3262
+AUX 8.42.3/ati-drivers-2.6.23-2.patch 9521 RMD160 ace9c08284d17c17c6fd30ced3060291d6d039cc SHA1 66af9162936f1ac255490a60e8f30080c0e06cce SHA256 c686942909e83dd7209b30d1ce6cc9f75b388d0dae90f13f6af1aa08f6ec04d9
+MD5 9059657add81df0a281738a65858bbfe files/8.42.3/ati-drivers-2.6.23-2.patch 9521
+RMD160 ace9c08284d17c17c6fd30ced3060291d6d039cc files/8.42.3/ati-drivers-2.6.23-2.patch 9521
+SHA256 c686942909e83dd7209b30d1ce6cc9f75b388d0dae90f13f6af1aa08f6ec04d9 files/8.42.3/ati-drivers-2.6.23-2.patch 9521
AUX 8.42.3/ati-drivers-2.6.23.patch 1497 RMD160 3bcd335769ee98b2119fc62784d091000115a5bd SHA1 9328ece148ad52c048805b9c2c3a3bf0937b6d16 SHA256 6ea6385e602b9659ca01ef1d53cb53ca955f2396a2d8cc914355d3bb2a590d88
MD5 02b4bb91ef59f1583b7c8c7530fe1bfe files/8.42.3/ati-drivers-2.6.23.patch 1497
RMD160 3bcd335769ee98b2119fc62784d091000115a5bd files/8.42.3/ati-drivers-2.6.23.patch 1497
@@ -10,31 +26,55 @@ AUX 8.42.3/ati-drivers-8.42.3-warnings.patch 3262 RMD160 158206cf638fd0f2ee34e8f
MD5 40ebcdcc8f5994b0ca22d72b15301e05 files/8.42.3/ati-drivers-8.42.3-warnings.patch 3262
RMD160 158206cf638fd0f2ee34e8ff02e6a399933f844d files/8.42.3/ati-drivers-8.42.3-warnings.patch 3262
SHA256 45caca456493c23a6475bbec63df26a33ead8de59bf52e3c06c4433740dc5261 files/8.42.3/ati-drivers-8.42.3-warnings.patch 3262
+AUX ati-drivers-2.6.19.patch 3158 RMD160 b9b3af8169f4b0e7cf655f0da9b8dcb7946b204e SHA1 13d009989f24f5c568b156a128adcd8402f47c9a SHA256 278e5d2bbddf1b5956485698684f50609371c6ef1c432fd436c85ee3345e24f6
+MD5 16940a74b7d6cb07affb2e18848d144c files/ati-drivers-2.6.19.patch 3158
+RMD160 b9b3af8169f4b0e7cf655f0da9b8dcb7946b204e files/ati-drivers-2.6.19.patch 3158
+SHA256 278e5d2bbddf1b5956485698684f50609371c6ef1c432fd436c85ee3345e24f6 files/ati-drivers-2.6.19.patch 3158
+AUX ati-drivers-2.6.20.patch 2386 RMD160 8b563155a63ba8d9639fa3b89719b8da49b2c8a3 SHA1 3714fa58e8ead0287d593cf0ed011e22327a5e71 SHA256 12b56122216a2fdba9f52e9939bf33f7d0c262417923ea9596c70337d44dd9f8
+MD5 5c4e56501fc8a698cdfce8a475eb51ae files/ati-drivers-2.6.20.patch 2386
+RMD160 8b563155a63ba8d9639fa3b89719b8da49b2c8a3 files/ati-drivers-2.6.20.patch 2386
+SHA256 12b56122216a2fdba9f52e9939bf33f7d0c262417923ea9596c70337d44dd9f8 files/ati-drivers-2.6.20.patch 2386
+AUX ati-drivers-8.35.5-2.6.19.patch 913 RMD160 511ef4e6eb7fcfa8db5419c05d160c6b538f9bc8 SHA1 adcd3860d1b0877779e85695053cda36511b4c71 SHA256 5c2b1ba7e291e118f37a87e3a653d0a654ee4e95a46c9e3d723ecef72aba1f01
+MD5 b71070a5208649bd6c4947666b09d415 files/ati-drivers-8.35.5-2.6.19.patch 913
+RMD160 511ef4e6eb7fcfa8db5419c05d160c6b538f9bc8 files/ati-drivers-8.35.5-2.6.19.patch 913
+SHA256 5c2b1ba7e291e118f37a87e3a653d0a654ee4e95a46c9e3d723ecef72aba1f01 files/ati-drivers-8.35.5-2.6.19.patch 913
+AUX ati-drivers-8.35.5-2.6.20.patch 333 RMD160 b9ef336b8dd4874854910d8eb62bc15f9ab066bd SHA1 8261034f3e539251adb0ca5b1da880e3f1231559 SHA256 cd4abde649ede2d03b5faa115acc567fcff85b6db39f19ba70d25e194e8973a6
+MD5 dc209a9ba1054cb4f9a76dcfeb91aa10 files/ati-drivers-8.35.5-2.6.20.patch 333
+RMD160 b9ef336b8dd4874854910d8eb62bc15f9ab066bd files/ati-drivers-8.35.5-2.6.20.patch 333
+SHA256 cd4abde649ede2d03b5faa115acc567fcff85b6db39f19ba70d25e194e8973a6 files/ati-drivers-8.35.5-2.6.20.patch 333
AUX ati-powermode-opt-path.patch 826 RMD160 450b5c9ecd7f4c123ce12f855b287e6b97e6ad23 SHA1 80725f60def6bd968157f09474c00722865b1f27 SHA256 e1d6dbe2e73c8ed575b2f9188e707fcb90f808d0fbdb686067c16f853662c208
MD5 5d8df2d4fd1038207d93f85a419fe7d0 files/ati-powermode-opt-path.patch 826
RMD160 450b5c9ecd7f4c123ce12f855b287e6b97e6ad23 files/ati-powermode-opt-path.patch 826
SHA256 e1d6dbe2e73c8ed575b2f9188e707fcb90f808d0fbdb686067c16f853662c208 files/ati-powermode-opt-path.patch 826
+AUX ati-powermode.sh.patch 1142 RMD160 b81cdd4d2a49c2f7b04f7e00e4391b4e0ad67a40 SHA1 eef7f658474ca8e9e66ee1955a851782eba4dd0e SHA256 050602d5e0656961c0b16a75b470a7327a9e8b16f7d0ae3228341b3a8dcc9289
+MD5 c3d42d3e0ad9acb6b682d7d7c27e6489 files/ati-powermode.sh.patch 1142
+RMD160 b81cdd4d2a49c2f7b04f7e00e4391b4e0ad67a40 files/ati-powermode.sh.patch 1142
+SHA256 050602d5e0656961c0b16a75b470a7327a9e8b16f7d0ae3228341b3a8dcc9289 files/ati-powermode.sh.patch 1142
AUX atieventsd.init 533 RMD160 b9b95a8a3f32dcafba3e5fa08d6d1053e831291a SHA1 982ffdb8064785c8b96fb0213ad7892ac918b5d7 SHA256 20010ebc5cb286149f3c4c9c099b6470463ccdb8fd47cea054b783dc2ad1fff3
MD5 c2aba0f353f7fb54806ad7bb6e2d3c9f files/atieventsd.init 533
RMD160 b9b95a8a3f32dcafba3e5fa08d6d1053e831291a files/atieventsd.init 533
SHA256 20010ebc5cb286149f3c4c9c099b6470463ccdb8fd47cea054b783dc2ad1fff3 files/atieventsd.init 533
+AUX atieventsd.rc6 590 RMD160 fbf8aba7ada36aed666d506d6b0f7146e1b2f4ad SHA1 b2b457a4122f0a3a5db785df46880351d795fb25 SHA256 a00aa241e53b21872218bd247bfdb6292a075d9ef641f36198d8f4e399cc025e
+MD5 07a53c230d412cbfbd4a76954c5c85bb files/atieventsd.rc6 590
+RMD160 fbf8aba7ada36aed666d506d6b0f7146e1b2f4ad files/atieventsd.rc6 590
+SHA256 a00aa241e53b21872218bd247bfdb6292a075d9ef641f36198d8f4e399cc025e files/atieventsd.rc6 590
AUX libGL.la.in 749 RMD160 b2eb11cd123cb0e789adb1e22dffdbfc03542f69 SHA1 be41cc2eb1754a44134a95475be5f0cb894e24bc SHA256 a7b4b58b1311f8e1caf83222cb020dfbc48e2881a8deef21eddefa23b3992f13
MD5 164dbf7ccea38894db8dab919c06a677 files/libGL.la.in 749
RMD160 b2eb11cd123cb0e789adb1e22dffdbfc03542f69 files/libGL.la.in 749
SHA256 a7b4b58b1311f8e1caf83222cb020dfbc48e2881a8deef21eddefa23b3992f13 files/libGL.la.in 749
-DIST ati-driver-installer-8.42.3-x86.x86_64.run 50467637 RMD160 06ed7d41016067ff6705f6da8ba191818f38b89a SHA1 b8e878e846e0971d49339ee5957acc6482329510 SHA256 737be729f36b429366cce63df09757f36532246c9735bc8c5a715fcce8a4eff9
-EBUILD ati-drivers-8.42.3.ebuild 14392 RMD160 8c7be2dedd528ef0a4e223f9ec7e02b914bdcc50 SHA1 23b0fa7bb7c42334c3496a14d0bf239c3bd21083 SHA256 b16d3d43f628014fb2cc624f800a464651335256f0f9893aaf9e101d4cc91f27
-MD5 82081b0f37ead72851e534fdfbb9836b ati-drivers-8.42.3.ebuild 14392
-RMD160 8c7be2dedd528ef0a4e223f9ec7e02b914bdcc50 ati-drivers-8.42.3.ebuild 14392
-SHA256 b16d3d43f628014fb2cc624f800a464651335256f0f9893aaf9e101d4cc91f27 ati-drivers-8.42.3.ebuild 14392
-MISC ChangeLog 41638 RMD160 65fdc691284734863e3a73852a2d81067d958754 SHA1 ec74f70580ca8efa8e3e586347032a9fcc287403 SHA256 e1b0a421a52ac7cb0f066ef41e26b58aa464ac63226ded94c5d3ca318741c381
-MD5 45e460009a48497f5f9d8469fb2b3166 ChangeLog 41638
-RMD160 65fdc691284734863e3a73852a2d81067d958754 ChangeLog 41638
-SHA256 e1b0a421a52ac7cb0f066ef41e26b58aa464ac63226ded94c5d3ca318741c381 ChangeLog 41638
+DIST ati-driver-installer-8.40.4-x86.x86_64.run 40335704 RMD160 8a35e68aa9108186ffd91244209377387b3313e5 SHA1 6260c8596529eac34fabe3437678afe6e2761490 SHA256 765386dbe60ba66088b0d6050d1e462432e7cfaddca33d70875b2bd554ddc7a2
+EBUILD ati-drivers-8.40.4.ebuild 14174 RMD160 3203749c4e3e8a7ab37a00469c8a3dbb2ac208ac SHA1 0eac7179363564ac7725bb9b0a3ad492e061578e SHA256 0229630520138a8350886b3b8bf8d8701c1df9f202b1c35323be9724c9e3bba7
+MD5 8d602bfbf0dbae290232d55767170383 ati-drivers-8.40.4.ebuild 14174
+RMD160 3203749c4e3e8a7ab37a00469c8a3dbb2ac208ac ati-drivers-8.40.4.ebuild 14174
+SHA256 0229630520138a8350886b3b8bf8d8701c1df9f202b1c35323be9724c9e3bba7 ati-drivers-8.40.4.ebuild 14174
+MISC ChangeLog 41744 RMD160 42fa6fd4bf9a15b49cb17ccf2471fe0995280210 SHA1 c4d588b3dadc21907652698736adae1ae621e0eb SHA256 b6e7327ead45c06112e24bebdb4f8426fc79a44529ffdfc66a62623f2df39472
+MD5 abfdfa657a181189e3902391abab0ba5 ChangeLog 41744
+RMD160 42fa6fd4bf9a15b49cb17ccf2471fe0995280210 ChangeLog 41744
+SHA256 b6e7327ead45c06112e24bebdb4f8426fc79a44529ffdfc66a62623f2df39472 ChangeLog 41744
MISC metadata.xml 494 RMD160 6c0f807a9fcdcaee2e28906992a35dd87d24ff0a SHA1 3ba9ee03c89575c03788c087c2dea8c208b398e9 SHA256 457f40aec01e7f047adfab46ed13813853102027c1f4cd68efa45a2bd39aff08
MD5 f462ad2ddb101d99fc4860e39a197a9f metadata.xml 494
RMD160 6c0f807a9fcdcaee2e28906992a35dd87d24ff0a metadata.xml 494
SHA256 457f40aec01e7f047adfab46ed13813853102027c1f4cd68efa45a2bd39aff08 metadata.xml 494
-MD5 087953c567aaf3870976d445b99df31f files/digest-ati-drivers-8.42.3 313
-RMD160 d86a1beaa33b1c5ae178a507c885108e9797fae0 files/digest-ati-drivers-8.42.3 313
-SHA256 5696ee92c821dc95ec4dca2658e087da66fa3eab45ecffd04be4e5a5767d5604 files/digest-ati-drivers-8.42.3 313
+MD5 c28a2605a914f579e5f8d3e202ca4fb9 files/digest-ati-drivers-8.40.4 224
+RMD160 3822b00b5a9e31975d933ac85c71708357b852d1 files/digest-ati-drivers-8.40.4 224
+SHA256 8a4236e8c5f693b23b3a4d181e77378fa100ad1c19cc5fca0785bcd79ee681f3 files/digest-ati-drivers-8.40.4 224
diff --git a/x11-drivers/ati-drivers/ati-drivers-8.40.4.ebuild b/x11-drivers/ati-drivers/ati-drivers-8.40.4.ebuild
new file mode 100644
index 0000000..181176a
--- /dev/null
+++ b/x11-drivers/ati-drivers/ati-drivers-8.40.4.ebuild
@@ -0,0 +1,424 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/x11-drivers/ati-drivers/ati-drivers-8.40.4.ebuild,v 1.4 2007/11/01 14:56:16 opfer Exp $
+
+IUSE="acpi multilib"
+
+inherit eutils multilib linux-mod toolchain-funcs versionator
+
+DESCRIPTION="Ati precompiled drivers for recent chipsets"
+HOMEPAGE="http://www.ati.com"
+ATI_URL="https://a248.e.akamai.net/f/674/9206/0/www2.ati.com/drivers/linux/"
+SRC_URI="${ATI_URL}/ati-driver-installer-${PV}-x86.x86_64.run"
+
+LICENSE="AMD GPL-2 QPL-1.0 as-is"
+KEYWORDS="~amd64 x86"
+
+# The portage dep is for COLON_SEPARATED support in env-update.
+# The eselect dep (>=1.0.9) is for COLON_SEPARATED in eselect env update.
+RDEPEND="x11-base/xorg-server
+ !x11-apps/ati-drivers-extra
+ >=app-admin/eselect-1.0.9
+ app-admin/eselect-opengl
+ =virtual/libstdc++-3.3*
+ amd64? ( multilib? ( app-emulation/emul-linux-x86-compat ) )
+ acpi? (
+ x11-apps/xauth
+ sys-power/acpid
+ )
+ >=sys-apps/portage-2.1.1-r1"
+
+DEPEND="${RDEPEND}
+ x11-proto/xf86miscproto
+ x11-proto/xf86vidmodeproto"
+
+EMULTILIB_PKG="true"
+
+QA_EXECSTACK_x86="usr/lib/dri/fglrx_dri.so
+ usr/lib/opengl/ati/lib/libGL.so.1.2
+ opt/bin/amdcccle"
+QA_EXECSTACK_amd64="usr/lib64/dri/fglrx_dri.so
+ usr/lib32/dri/fglrx_dri.so
+ usr/lib64/opengl/ati/lib/libGL.so.1.2
+ usr/lib32/opengl/ati/lib/libGL.so.1.2
+ opt/bin/amdcccle"
+QA_TEXTRELS_x86="usr/lib/dri/fglrx_dri.so
+ usr/lib/xorg/modules/drivers/fglrx_drv.so
+ usr/lib/opengl/ati/lib/libGL.so.1.2"
+QA_TEXTRELS_amd64="
+ usr/lib64/opengl/ati/lib/libGL.so.1.2
+ usr/lib32/opengl/ati/lib/libGL.so.1.2
+ usr/lib64/dri/fglrx_dri.so
+ usr/lib32/dri/fglrx_dri.so"
+
+S="${WORKDIR}"
+
+pkg_setup() {
+ #check kernel and sets up KV_OBJ
+ MODULE_NAMES="fglrx(video:${S}/common/lib/modules/fglrx/build_mod/2.6.x)"
+ BUILD_TARGETS="kmod_build"
+ linux-mod_pkg_setup
+ BUILD_PARAMS="GCC_VER_MAJ=$(gcc-major-version) KVER=${KV_FULL} KDIR=${KV_DIR}"
+
+ if ! kernel_is 2 6; then
+ eerror "Need a 2.6 kernel to compile against!"
+ die "Need a 2.6 kernel to compile against!"
+ fi
+
+ if ! linux_chkconfig_present MTRR; then
+ ewarn "You don't have MTRR support enabled, the direct rendering will not work."
+ fi
+
+ if linux_chkconfig_builtin DRM; then
+ ewarn "You have DRM support enabled builtin, the direct rendering will not work."
+ fi
+
+ if ! linux_chkconfig_present AGP && \
+ ! linux_chkconfig_present PCIEPORTBUS; then
+ ewarn "You need AGP and/or PCI Express support for direct rendering to work."
+ fi
+
+ if linux_chkconfig_present PARAVIRT; then
+ eerror "The current ati-drivers don't compile when having"
+ eerror "paravirtualization active due to GPL symbol export"
+ eerror "restrictions."
+ eerror "Please disable it:"
+ eerror " CONFIG_PARAVIRT=n"
+ eerror "in /usr/src/linux/.config or"
+ eerror " Processor type and features -->"
+ eerror " [ ] Paravirtualization support (EXPERIMENTAL)"
+ eerror "in 'menuconfig'"
+ die "CONFIG_PARAVIRT enabled"
+ fi
+
+ # xorg-server 1.1 and its prereleases correspond to xorg 7.1.
+ if has_version ">=x11-base/xorg-server-1.0.99"; then
+ BASE_DIR="${S}/x710"
+ else
+ BASE_DIR="${S}/x690"
+ fi
+
+ if use amd64 ; then
+ BASE_DIR="${BASE_DIR}_64a"
+ # This is used like $(get_libdir) for paths in ati's package.
+ PKG_LIBDIR=lib64
+ ARCH_DIR="${S}/arch/x86_64"
+ else
+ PKG_LIBDIR=lib
+ ARCH_DIR="${S}/arch/x86"
+ fi
+}
+
+src_unpack() {
+ local src="${DISTDIR}/${A}"
+ # This is apparently a nonstandard makeself archive, so extract
+ # the offset by hand.
+ local offset=$(grep -am1 SKIP "${src}" | sed -e 's/SKIP="\([0-9]\+\)"/\1/')
+
+ #Switching to a standard way to extract the files since otherwise no signature file
+ #would be created
+ sh "${src}" --extract "${S}" 2&>1 /dev/null
+
+ gunzip common/usr/share/man/man8/atieventsd.8 || die "manpage unzip failed"
+
+ # These are the userspace utilities that we also have source for.
+ # We rebuild these later.
+ rm \
+ "${ARCH_DIR}"/usr/X11R6/bin/{fgl_glxgears,fglrx_xgamma} \
+ "${ARCH_DIR}"/usr/X11R6/${PKG_LIBDIR}/libfglrx_gamma* \
+ || die "bin rm failed"
+
+ if use acpi; then
+ sed -i \
+ -e "s:/var/lib/xdm/authdir/:/etc/X11/xdm/authdir/:" \
+ -e "s:/var/lib/gdm/:/var/gdm/:" \
+ -e "s/#ffff#/#ffff##:.*MIT-MAGIC-COOKIE/" \
+ "${S}/common/etc/ati/authatieventsd.sh" \
+ || die "sed failed."
+
+ # Adjust paths in the script from /usr/X11R6/bin/ to /opt/bin/
+ epatch "${FILESDIR}"/ati-powermode-opt-path.patch
+ fi
+
+ pushd common/lib/modules/fglrx/build_mod >/dev/null
+ ln -s "${ARCH_DIR}"/lib/modules/fglrx/build_mod/libfglrx_ip.a.GCC$(gcc-major-version) \
+ || die "symlinking precompiled core failed"
+
+ convert_to_m 2.6.x/Makefile || die "convert_to_m failed"
+
+ # When built with ati's make.sh it defines a bunch of macros if
+ # certain .config values are set, falling back to less reliable
+ # detection methods if linux/autoconf.h is not available. We
+ # simply use the linux/autoconf.h settings directly, bypassing the
+ # detection script.
+ sed -i -e 's/__SMP__/CONFIG_SMP/' *.c *h || die "SMP sed failed"
+ sed -i -e 's/ifdef MODVERSIONS/ifdef CONFIG_MODVERSIONS/' *.c *.h \
+ || die "MODVERSIONS sed failed"
+ popd >/dev/null
+
+ mkdir extra || die "mkdir failed"
+ cd extra
+ unpack ./../common/usr/src/ati/fglrx_sample_source.tgz
+ sed -i -e 's:include/extensions/extutil.h:X11/extensions/extutil.h:' \
+ lib/fglrx_gamma/fglrx_gamma.c || die "include fixup failed"
+ # Add a category.
+ mv programs/fglrx_gamma/fglrx_xgamma.{man,1} || die "man mv failed"
+ cd ..
+
+ # Misc. patches.
+ epatch "${FILESDIR}"/${PV}/${P}-warnings.patch
+
+ if kernel_is ge 2 6 23; then
+ epatch "${FILESDIR}"/${PV}/${PN}-2.6.23.patch
+ fi
+}
+
+src_compile() {
+ linux-mod_src_compile
+
+ einfo "Building fgl_glxgears"
+ cd "${S}"/extra/fgl_glxgears
+ # These extra libs/utils either have an Imakefile that does not
+ # work very well without tweaking or a Makefile ignoring CFLAGS
+ # and the like. We bypass those.
+
+ # The -DUSE_GLU is needed to compile using nvidia headers
+ # according to a comment in ati-drivers-extra-8.33.6.ebuild.
+ "$(tc-getCC)" -o fgl_fglxgears ${CFLAGS} ${LDFLAGS} -DUSE_GLU \
+ -I"${S}"/common/usr/include fgl_glxgears.c \
+ -lGL -lGLU -lX11 -lm || die "fgl_glxgears build failed"
+
+ einfo "Building fglrx_gamma lib"
+ cd "${S}"/extra/lib/fglrx_gamma
+ "$(tc-getCC)" -shared -fpic -o libfglrx_gamma.so.1.0 ${CFLAGS} ${LDFLAGS} \
+ -DXF86MISC -Wl,-soname,libfglrx_gamma.so.1.0 fglrx_gamma.c \
+ -lXext || die "fglrx_gamma lib build failed"
+ ln -s libfglrx_gamma.so.1.0 libfglrx_gamma.so || die "ln failed"
+ ln -s libfglrx_gamma.so.1.0 libfglrx_gamma.so.1 || die "ln failed"
+
+ einfo "Building fglrx_gamma util"
+ cd "${S}"/extra/programs/fglrx_gamma
+ "$(tc-getCC)" -o fglrx_xgamma ${CFLAGS} ${LDFLAGS} \
+ -I../../../common/usr/X11R6/include -L../../lib/fglrx_gamma \
+ fglrx_xgamma.c -lm -lfglrx_gamma -lX11 \
+ || die "fglrx_gamma util build failed"
+
+}
+
+src_install() {
+ linux-mod_src_install
+
+ # We can do two things here, and neither of them is very nice.
+
+ # For direct rendering libGL has to be able to load one or more
+ # dri modules (files ending in _dri.so, like fglrx_dri.so).
+ # Gentoo's mesa looks for these files in the location specified by
+ # LIBGL_DRIVERS_PATH or LIBGL_DRIVERS_DIR, then in the hardcoded
+ # location /usr/$(get_libdir)/dri. Ati's libGL does the same
+ # thing, but the hardcoded location is /usr/X11R6/lib/modules/dri
+ # on x86 and amd64 32bit, /usr/X11R6/lib64/modules/dri on amd64
+ # 64bit. So we can either put the .so files in that (unusual,
+ # compared to "normal" mesa libGL) location or set
+ # LIBGL_DRIVERS_PATH. We currently do the latter. See also bug
+ # 101539.
+
+ # The problem with this approach is that LIBGL_DRIVERS_PATH
+ # *overrides* the default hardcoded location, it does not extend
+ # it. So if ati-drivers is merged but a non-ati libGL is selected
+ # and its hardcoded path does not match our LIBGL_DRIVERS_PATH
+ # (because it changed in a newer mesa or because it was compiled
+ # for a different set of multilib abis than we are) stuff breaks.
+
+ # We create one file per ABI to work with "native" multilib, see
+ # below.
+
+ echo "COLON_SEPARATED=LIBGL_DRIVERS_PATH" > "${T}/03ati-colon-sep"
+ doenvd "${T}/03ati-colon-sep"
+
+ # All libraries that we have a 32 bit and 64 bit version of on
+ # amd64 are installed in src_install-libs. Everything else
+ # (including libraries only available in native 64bit on amd64)
+ # goes in here.
+
+ # There used to be some code here that tried to detect running
+ # under a "native multilib" portage ((precursor of)
+ # http://dev.gentoo.org/~kanaka/auto-multilib/). I removed that, it
+ # should just work (only doing some duplicate work). --marienz
+ if has_multilib_profile; then
+ local OABI=${ABI}
+ for ABI in $(get_install_abis); do
+ src_install-libs
+ done
+ ABI=${OABI}
+ unset OABI
+ else
+ src_install-libs
+ fi
+
+ # This is sorted by the order the files occur in the source tree.
+
+ # X modules.
+ exeinto /usr/$(get_libdir)/xorg/modules/drivers
+ doexe "${BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/drivers/fglrx_drv.so
+ exeinto /usr/$(get_libdir)/xorg/modules/linux
+ doexe "${BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/linux/libfglrxdrm.so
+ exeinto /usr/$(get_libdir)/xorg/modules
+ doexe "${BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/{esut.a,glesx.so}
+
+ # Arch-specific files.
+ # (s)bin.
+ into /opt
+ if use acpi; then
+ dosbin "${ARCH_DIR}"/usr/sbin/atieventsd
+ fi
+ # We cleaned out the compilable stuff in src_unpack
+ dobin "${ARCH_DIR}"/usr/X11R6/bin/*
+
+ # lib.
+ exeinto /usr/$(get_libdir)
+ # Everything except for the libGL.so installed in src_install-libs.
+ doexe $(find "${ARCH_DIR}"/usr/X11R6/${PKG_LIBDIR} \
+ -maxdepth 1 -type f -name '*.so*' -not -name 'libGL.so*')
+ insinto /usr/$(get_libdir)
+ doins $(find "${ARCH_DIR}"/usr/X11R6/${PKG_LIBDIR} \
+ -maxdepth 1 -type f -not -name '*.so*')
+
+ # Common files.
+ # etc.
+ insinto /etc/ati
+ # Everything except for the authatieventsd.sh script.
+ doins common/etc/ati/{fglrxprofiles.csv,fglrxrc,logo*,control,atiogl.xml,signature}
+ if use acpi; then
+ doins common/etc/ati/authatieventsd.sh
+ fi
+
+ # include.
+ insinto /usr
+ doins -r common/usr/include
+ insinto /usr/include/X11/extensions
+ doins common/usr/X11R6/include/X11/extensions/fglrx_gamma.h
+
+ # Just the atigetsysteminfo.sh script.
+ into /usr
+ dosbin common/usr/sbin/*
+
+ # data files for the control panel.
+ insinto /usr/share
+ doins -r common/usr/share/ati
+ insinto /usr/share/pixmaps
+ doins common/usr/share/icons/ccc_{large,small}.xpm
+ make_desktop_entry amdcccle 'ATI Catalyst Control Center' \
+ ccc_large.xpm System
+
+ # doc.
+ dohtml -r common/usr/share/doc/fglrx
+
+ if use acpi; then
+ doman common/usr/share/man/man8/atieventsd.8
+
+ pushd common/usr/share/doc/fglrx/examples/etc/acpi >/dev/null
+
+ exeinto /etc/acpi
+ doexe ati-powermode.sh
+ insinto /etc/acpi/events
+ doins events/*
+
+ popd >/dev/null
+ fi
+
+ # Done with the "source" tree. Install tools we rebuilt:
+ dobin extra/fgl_glxgears/fgl_fglxgears
+ newdoc extra/fgl_glxgears/README README.fgl_glxgears
+
+ dolib extra/lib/fglrx_gamma/*so*
+ newdoc extra/lib/fglrx_gamma/README README.libfglrx_gamma
+
+ dobin extra/programs/fglrx_gamma/fglrx_xgamma
+ doman extra/programs/fglrx_gamma/fglrx_xgamma.1
+ newdoc extra/programs/fglrx_gamma/README README.fglrx_gamma
+
+ # Gentoo-specific stuff:
+
+ if use acpi; then
+ newinitd "${FILESDIR}"/atieventsd.init atieventsd \
+ || die "Failed to install atieventsd.init.d"
+ echo 'ATIEVENTSDOPTS=""' > "${T}"/atieventsd.conf
+ newconfd "${T}"/atieventsd.conf atieventsd
+ fi
+}
+
+src_install-libs() {
+ if [[ "${ABI}" == "amd64" ]]; then
+ local pkglibdir=lib64
+ else
+ local pkglibdir=lib
+ fi
+ einfo "ati tree '${pkglibdir}' -> '$(get_libdir)' on system"
+
+ local ATI_ROOT=/usr/$(get_libdir)/opengl/ati
+ # To make sure we do not miss a spot when these change.
+ local libmajor=1 libminor=2
+ local libver=${libmajor}.${libminor}
+
+ # The GLX libraries
+ # (yes, this really is "lib" even on amd64/multilib --marienz)
+ exeinto ${ATI_ROOT}/lib
+ doexe "${ARCH_DIR}"/usr/X11R6/${pkglibdir}/libGL.so.${libver}
+ dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so.${libmajor}
+ dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so
+
+ # Same as the xorg implementation (eselect opengl does not fall
+ # back to xorg-x11 if we omit this symlink, meaning no glx).
+ dosym ../xorg-x11/extensions ${ATI_ROOT}/extensions
+
+ # DRI modules, installed into the path used by recent versions of mesa.
+ exeinto /usr/$(get_libdir)/dri
+ doexe "${ARCH_DIR}"/usr/X11R6/${pkglibdir}/modules/dri/fglrx_dri.so
+
+ # Make up a libGL.la. Ati does not provide one, but mesa does. If
+ # a (libtool-based) libfoo is built with libGL.la present a
+ # reference to it is put into libfoo.la, and compiling
+ # (libtool-based) things that link too libfoo.la will complain if
+ # libGL.la disappears. So if we do not make up a libGL.la
+ # switching between mesa and ati becomes painful.
+ #
+ # According to the libtool manual the "revision" should be updated
+ # whenever the code changes. We construct this from the version
+ # (8.37.6 becomes 83706).
+ local revision=$(printf '%d%02d%02d' $(get_version_components))
+ sed -e "s:\${libmajor}:${libmajor}:g" \
+ -e "s:\${libminor}:${libminor}:g" \
+ -e "s:\${libdir}:$(get_libdir):g" \
+ -e "s:\${revision}:${revision}:g" \
+ "${FILESDIR}"/libGL.la.in > "${D}"/${ATI_ROOT}/lib/libGL.la \
+ || die "sed failed to make libGL.la"
+
+ local envname="${T}"/04ati-dri-path
+ if [[ -n ${ABI} ]]; then
+ envname="${envname}-${ABI}"
+ fi
+ echo "LIBGL_DRIVERS_PATH=/usr/$(get_libdir)/dri" > "${envname}"
+ doenvd "${envname}"
+}
+
+pkg_postinst() {
+ /usr/bin/eselect opengl set --use-old ati
+
+ elog "To switch to ATI OpenGL, run \"eselect opengl set ati\""
+ elog "To change your xorg.conf you can use the bundled \"aticonfig\""
+ elog
+ elog "If you experience unexplained segmentation faults and kernel crashes"
+ elog "with this driver and multi-threaded applications such as wine,"
+ elog "set UseFastTLS in xorg.conf to either 0 or 1, but not 2."
+ elog
+ # (to get the LIBGL_DRIVERS_PATH)
+ elog "You will have to source /etc/profile (or logout and back in) for dri"
+ elog "to work, unless you previously had ati-drivers installed."
+ # DRM module
+ linux-mod_pkg_postinst
+}
+
+pkg_postrm() {
+ linux-mod_pkg_postrm
+ /usr/bin/eselect opengl set --use-old xorg-x11
+}
diff --git a/x11-drivers/ati-drivers/files/09ati b/x11-drivers/ati-drivers/files/09ati
new file mode 100644
index 0000000..27180e0
--- /dev/null
+++ b/x11-drivers/ati-drivers/files/09ati
@@ -0,0 +1,3 @@
+PATH=/opt/ati/bin
+ROOTPATH=/opt/ati/bin:/opt/ati/sbin
+MANPATH=/opt/ati/man
diff --git a/x11-drivers/ati-drivers/files/8.37.6/fix-ioctl-for-2.6.22.patch b/x11-drivers/ati-drivers/files/8.37.6/fix-ioctl-for-2.6.22.patch
new file mode 100644
index 0000000..25d5883
--- /dev/null
+++ b/x11-drivers/ati-drivers/files/8.37.6/fix-ioctl-for-2.6.22.patch
@@ -0,0 +1,17 @@
+--- common-orig/lib/modules/fglrx/build_mod/firegl_public.c 2007-08-01 16:58:40.000000000 -0500
++++ common/lib/modules/fglrx/build_mod/firegl_public.c 2007-08-01 16:57:11.000000000 -0500
+@@ -144,12 +144,14 @@
+ #define EXPORT_NO_SYMBOLS
+ #endif
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
+ #ifdef __x86_64__
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,12)
+ #include "linux/ioctl32.h"
+ #else
+ #include "asm/ioctl32.h"
+ #endif
++#endif
+
+ #ifdef __x86_64__
+ #include "asm/compat.h"
diff --git a/x11-drivers/ati-drivers/files/8.40.4/ati-drivers-2.6.23.patch b/x11-drivers/ati-drivers/files/8.40.4/ati-drivers-2.6.23.patch
new file mode 100644
index 0000000..9713208
--- /dev/null
+++ b/x11-drivers/ati-drivers/files/8.40.4/ati-drivers-2.6.23.patch
@@ -0,0 +1,41 @@
+diff -Naur common/lib/modules/fglrx/build_mod/firegl_public.c common/lib/modules/fglrx/build_mod/firegl_public.c
+--- common/lib/modules/fglrx/build_mod/firegl_public.c 2007-07-29 13:36:37.000000000 +0200
++++ common/lib/modules/fglrx/build_mod/firegl_public.c 2007-07-29 14:24:11.000000000 +0200
+@@ -2409,7 +2409,11 @@
+ #ifdef pte_offset_map
+ pte_p = pte_offset_map(pmd_p, virtual_addr);
+ if (pte_present(*pte_p))
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
+ ret = (ptep_clear_flush_dirty(vma, virtual_addr, pte_p) ? 1 : 0);
++#else
++ return 0;
++#endif
+ else
+ __KE_DEBUG("page not exists!\n");
+ pte_unmap(pte_p);
+@@ -3399,9 +3403,11 @@
+ sprintf(buf, "0x%Lx %c%c%c%c%c%c\n",
+ *phys_address,
+ pte_present (pte) ? 'p' : '-',
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23)
+ pte_read (pte) ? 'r' : '-',
+- pte_write (pte) ? 'w' : '-',
+ pte_exec (pte) ? 'x' : '-',
++#endif
++ pte_write (pte) ? 'w' : '-',
+ pte_dirty (pte) ? 'd' : '-',
+ pte_young (pte) ? 'a' : '-');
+ }
+@@ -5348,7 +5354,11 @@
+ DBG_TRACE("creating slab object '%s'", slabcache_obj->name);
+
+ if ((slabcache_obj->cache =
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23)
+ kmem_cache_create(slabcache_obj->name, iEntrySize, 0, 0, NULL, NULL)))
++#else
++ kmem_cache_create(slabcache_obj->name, iEntrySize, 0, 0, NULL)))
++#endif
+ {
+ ret = 1;
+ }
+
diff --git a/x11-drivers/ati-drivers/files/8.40.4/ati-drivers-8.40.4-warnings.patch b/x11-drivers/ati-drivers/files/8.40.4/ati-drivers-8.40.4-warnings.patch
new file mode 100644
index 0000000..378435d
--- /dev/null
+++ b/x11-drivers/ati-drivers/files/8.40.4/ati-drivers-8.40.4-warnings.patch
@@ -0,0 +1,90 @@
+diff -Naur common/lib/modules/fglrx/build_mod/firegl_public.c common/lib/modules/fglrx/build_mod/firegl_public.c
+--- common/lib/modules/fglrx/build_mod/firegl_public.c 2007-07-29 13:36:37.000000000 +0200
++++ common/lib/modules/fglrx/build_mod/firegl_public.c 2007-07-29 14:24:11.000000000 +0200
+@@ -452,7 +452,7 @@
+ }
+
+ static unsigned int
+-firegl_interrupt_poll_wrap(struct file *user_file, poll_table *pt)
++firegl_interrupt_poll_wrap(struct file *user_file, struct poll_table_struct *pt)
+ {
+ if(firegl_interrupt_poll(user_file, (__ke_poll_table*)pt))
+ {
+@@ -1491,7 +1491,8 @@
+ int ATI_API_CALL firegl_put_user_ptr(void *src, u32 *dst)
+ {
+ void *temp = src;
+- return put_user(temp, dst);
++ void *dst_temp = dst;
++ return put_user(temp, dst_temp);
+ }
+
+ int ATI_API_CALL firegl_put_user_u16(u16 src, u16 *dst)
+@@ -1883,7 +1884,7 @@
+
+ __ke_pci_dev_t* ATI_API_CALL __ke_pci_find_device (unsigned int vendor, unsigned int dev, __ke_pci_dev_t* from)
+ {
+- return (__ke_pci_dev_t*)pci_find_device( vendor, dev, (struct pci_dev *)(void *)from );
++ return (__ke_pci_dev_t*) pci_get_device(vendor, dev, (struct pci_dev *)(void *) from);
+ }
+
+ void* ATI_API_CALL __ke_malloc(__ke_size_t size)
+@@ -2813,9 +2814,9 @@
+ #else
+ static void ATI_API_CALL (*irq_handler_func)(int, void*, void*); /* function pointer variable */
+
+-static irqreturn_t ke_irq_handler_wrap(int irq, void *arg1, struct pt_regs *regs)
++static irqreturn_t ke_irq_handler_wrap(int irq, void *arg1)
+ {
+- irq_handler_func(irq, arg1, regs);
++ irq_handler_func(irq, arg1, NULL);
+ return IRQ_HANDLED;
+ }
+
+@@ -2826,7 +2827,7 @@
+ irq_handler_func = handler;
+ return request_irq(irq,
+ ke_irq_handler_wrap,
+- SA_SHIRQ, dev_name, dev_id);
++ IRQF_SHARED, dev_name, dev_id);
+ }
+
+ void ATI_API_CALL __ke_free_irq(unsigned int irq, void *dev_id)
+@@ -2848,9 +2849,7 @@
+
+ void ATI_API_CALL __ke_unregister_ioctl32_conversion(unsigned int cmd)
+ {
+-#ifdef FIREGL_IOCTL_COMPAT
+- return 0;
+-#else
++#ifndef FIREGL_IOCTL_COMPAT
+ unregister_ioctl32_conversion(cmd);
+ #endif
+ }
+@@ -4353,7 +4352,7 @@
+ void ATI_API_CALL KCL_CallFuncOnOtherCpus(firegl_void_routine_t func_to_call)
+ {
+ #ifdef CONFIG_SMP
+- smp_call_function( firegl_smp_func_parameter_wrap, (void*)func_to_call, 0, 1 );
++ smp_call_function( (void (*)(void *info)) func_to_call, NULL, 0, 1 );
+ #endif
+ }
+
+@@ -5303,7 +5302,7 @@
+ /** \brief Type definition of the structure describing Slab Cache object */
+ typedef struct tag_kasSlabCache_t
+ {
+- kmem_cache_t* cache; /* OS slab cache object */
++ struct kmem_cache* cache; /* OS slab cache object */
+ spinlock_t lock; /* OS spinlock object protecting the cache */
+ unsigned int routine_type; /* Type of routine the cache might be accessed from */
+ char name[14]; /* Cache object name (kernel 2.4 restricts its length to 19 chars) */
+@@ -5344,7 +5343,7 @@
+
+ slabcache_obj->routine_type = access_type;
+ spin_lock_init(&(slabcache_obj->lock));
+- sprintf(slabcache_obj->name, "kas(%08X)", (unsigned int)slabcache_obj);
++ sprintf(slabcache_obj->name, "kas(%08X)", (unsigned int)(long unsigned int)slabcache_obj);
+
+ DBG_TRACE("creating slab object '%s'", slabcache_obj->name);
+
diff --git a/x11-drivers/ati-drivers/files/8.42.3/ati-drivers-2.6.23-2.patch b/x11-drivers/ati-drivers/files/8.42.3/ati-drivers-2.6.23-2.patch
index 4ab3ac6..5f1a34f 100644
--- a/x11-drivers/ati-drivers/files/8.42.3/ati-drivers-2.6.23-2.patch
+++ b/x11-drivers/ati-drivers/files/8.42.3/ati-drivers-2.6.23-2.patch
@@ -1,78 +1,277 @@
-diff -Naur common/lib/modules/fglrx/build_mod/firegl_public.c.old common/lib/modules/fglrx/build_mod/firegl_public.c
---- common/lib/modules/fglrx/build_mod/firegl_public.c 2007-10-24 14:10:52.000000000 +0000
-+++ common/lib/modules/fglrx/build_mod/firegl_public.c 2007-10-24 14:14:39.000000000 +0000
-@@ -217,6 +217,56 @@
- #define preempt_enable()
- #endif
+diff -urN common/lib/modules/fglrx/build_mod/firegl_public.c~ common/lib/modules/fglrx/build_mod/firegl_public.c
+--- common/lib/modules/fglrx/build_mod/firegl_public.c~ 2007-10-22 11:30:01.000000000 -0500
++++ common/lib/modules/fglrx/build_mod/firegl_public.c 2007-10-24 13:31:08.000000000 -0500
+@@ -796,7 +796,7 @@
+
+ // since privdev->pcidev is acquired in X server, use pdev
+ // directly here to allow suspend/resume without X server start.
+- firegl_pci_save_state(pdev, privdev);
++ firegl_pci_save_state((__ke_pci_dev_t*)pdev, privdev);
+ pci_disable_device(pdev);
+ PMSG_EVENT(pdev->dev.power.power_state) = state;
+ }
+@@ -838,7 +838,7 @@
-+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,22)
-+#if defined(__i386__)
-+#define ptep_test_and_clear_dirty(vma, addr, ptep) ({ \
-+ int __ret = 0; \
-+ if (pte_dirty(*(ptep))) \
-+ __ret = test_and_clear_bit(_PAGE_BIT_DIRTY, \
-+ &(ptep)->pte_low); \
-+ if (__ret) \
-+ pte_update((vma)->vm_mm, addr, ptep); \
-+ __ret; \
-+})
-+
-+static inline int pte_read(pte_t pte) { return (pte).pte_low & _PAGE_USER; }
-+static inline int pte_user(pte_t pte) { return (pte).pte_low & _PAGE_USER; }
-+#ifdef CONFIG_X86_PAE
-+/*
-+ * Is the pte executable?
-+ */
-+static inline int pte_x(pte_t pte)
-+{
-+ return !(pte_val(pte) & _PAGE_NX);
-+}
-+
-+/*
-+ * All present user-pages with !NX bit are user-executable:
+ // PCI config space needs to be restored very early, in particular
+ // before pci_set_master!
+- firegl_pci_restore_state(pdev, privdev);
++ firegl_pci_restore_state((__ke_pci_dev_t*)pdev, privdev);
+
+ if (pci_enable_device(pdev))
+ {
+@@ -2016,7 +2016,11 @@
+
+ __ke_pci_dev_t* ATI_API_CALL __ke_pci_find_device (unsigned int vendor, unsigned int dev, __ke_pci_dev_t* from)
+ {
+- return (__ke_pci_dev_t*)pci_find_device( vendor, dev, (struct pci_dev *)(void *)from );
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,21)
++ return (__ke_pci_dev_t*)pci_get_device( vendor, dev, (struct pci_dev *)(void *)from );
++#else
++ return (__ke_pci_dev_t*)pci_find_device( vendor, dev, (struct pci_dev *)(void *)from );
++#endif
+ }
+
+ void* ATI_API_CALL __ke_malloc(__ke_size_t size)
+@@ -2487,16 +2491,80 @@
+ }
+
+ #ifndef ptep_clear_flush_dirty
+-#define ptep_clear_flush_dirty(__vma, __address, __ptep) \
+-({ \
+- int __dirty = ptep_test_and_clear_dirty(__ptep); \
+- if (__dirty) \
+- flush_tlb_page(__vma, __address); \
+- __dirty; \
+-})
++/** \brief Test and clear the "dirty" bit in the page table entry
++ *
++ * \param vma Pointer to the memory region structure
++ * \param addr Virtual address covered by vma
++ * \param ptep Pointer to the table entry structure
++ *
++ * \return Old value of the "dirty" flag
++ *
+ */
-+static inline int pte_exec(pte_t pte)
++static inline int ptep_clear_flush_dirty(struct vm_area_struct *vma, unsigned long addr, pte_t *ptep)
+{
-+ return pte_user(pte) && pte_x(pte);
-+}
++ int ret = 0;
++
++ DBG_ENTER("0x%08X, 0x%08X, 0x%08X->0x%08X", vma, addr, ptep, *ptep);
++
++ if (pte_dirty(*ptep))
++ {
++#ifdef __x86_64__
++ DBG_TRACE("Test and clear bit %d in 0x%08X", _PAGE_BIT_DIRTY, ptep->pte);
++ ret = test_and_clear_bit(_PAGE_BIT_DIRTY, &ptep->pte);
+#else
-+static inline int pte_exec(pte_t pte)
-+{
-+ return pte_user(pte);
-+}
-+#endif /* PAE */
++ DBG_TRACE("Test and clear bit %d in 0x%08X", _PAGE_BIT_DIRTY, ptep->pte_low);
++ ret = test_and_clear_bit(_PAGE_BIT_DIRTY, &ptep->pte_low);
+
-+#elif defined(__x86_64__)
-+static inline int ptep_test_and_clear_dirty(struct vm_area_struct *vma,
-+ unsigned long addr, pte_t *ptep)
-+{
-+ if (!pte_dirty(*ptep))
-+ return 0;
-+ return test_and_clear_bit(_PAGE_BIT_DIRTY, &ptep->pte);
++ // Since we modify PTE directly, it needs to inform the hypervisor
++ if (ret)
++ {
++ pte_update(vma->vm_mm, addr, ptep);
++ }
++#endif
++ }
++
++ DBG_TRACE("0x%08X->0x%08X", ptep, *ptep);
++
++ // Flush Translation Lookaside Buffers
++ if (ret)
++ {
++ flush_tlb_page(vma, addr);
++ }
++
++ DBG_LEAVE("%d", ret);
++
++ return ret;
+}
-+static inline int pte_read(pte_t pte) { return pte_val(pte) & _PAGE_USER; }
-+static inline int pte_exec(pte_t pte) { return !(pte_val(pte) & _PAGE_NX); }
-+#endif
+#endif
+
- // ============================================================
- /* globals */
++#ifdef pte_offset_atomic
++#define PTE_OFFSET_FUNC pte_offset_atomic
++#define PTE_UNMAP_FUNC(p) pte_kunmap(p)
++#else
++#ifdef pte_offset_map
++#define PTE_OFFSET_FUNC pte_offset_map
++#define PTE_UNMAP_FUNC(p) pte_unmap(p)
++#else
++#ifdef pte_offset_kernel
++#define PTE_OFFSET_FUNC pte_offset_kernel
++#define PTE_UNMAP_FUNC(p) do {} while (0)
++#else
++#define PTE_OFFSET_FUNC pte_offset
++#define PTE_UNMAP_FUNC(p) do {} while (0)
++#endif
++#endif
+ #endif
-@@ -2490,7 +2540,7 @@
- #ifndef ptep_clear_flush_dirty
- #define ptep_clear_flush_dirty(__vma, __address, __ptep) \
- ({ \
-- int __dirty = ptep_test_and_clear_dirty(__ptep); \
-+ int __dirty = ptep_test_and_clear_dirty(__vma, __address, __ptep); \
- if (__dirty) \
- flush_tlb_page(__vma, __address); \
- __dirty; \
-@@ -2937,7 +2987,7 @@
+-int ATI_API_CALL __ke_vm_test_and_clear_dirty(struct mm_struct* mm, unsigned long virtual_addr)
++/** \brief Test and clear the "dirty" bit in the page table entry referred by
++ * the virtual address
++ *
++ * \param mm Pointer to the memory descriptor structure
++ * \param virtual_addr Virtual address
++ *
++ * \return Old value of the "dirty" flag on success or negative on error
++ *
++ */
++int ATI_API_CALL KCL_TestAndClearPageDirtyFlag(struct mm_struct* mm, unsigned long virtual_addr)
+ {
+ int ret = -1; // init with page not present
+ pgd_t* pgd_p;
+@@ -2530,37 +2598,16 @@
+ }
+ __KE_DEBUG("pmd_p=0x%08lx\n", (unsigned long)pmd_p);
+
+-#ifdef pte_offset_atomic
+- pte_p = pte_offset_atomic(pmd_p, virtual_addr);
+- if (pte_present(*pte_p))
+- ret = (ptep_clear_flush_dirty(vma, virtual_addr, pte_p) ? 1 : 0);
+- else
+- __KE_DEBUG("page not exists!\n");
+- pte_kunmap(pte_p);
+-#else
+-#ifdef pte_offset_map
+- pte_p = pte_offset_map(pmd_p, virtual_addr);
+- if (pte_present(*pte_p))
+- ret = (ptep_clear_flush_dirty(vma, virtual_addr, pte_p) ? 1 : 0);
+- else
+- __KE_DEBUG("page not exists!\n");
+- pte_unmap(pte_p);
+-#else
+-#ifdef pte_offset_kernel
+- pte_p = pte_offset_kernel(pmd_p, virtual_addr);
+- if (pte_present(*pte_p))
+- ret = (ptep_clear_flush_dirty(vma, virtual_addr, pte_p) ? 1 : 0);
+- else
+- __KE_DEBUG("page not exists!\n");
+-#else
+- pte_p = pte_offset(pmd_p, virtual_addr);
++ pte_p = PTE_OFFSET_FUNC(pmd_p, virtual_addr);
+ if (pte_present(*pte_p))
++ {
+ ret = (ptep_clear_flush_dirty(vma, virtual_addr, pte_p) ? 1 : 0);
++ }
+ else
++ {
+ __KE_DEBUG("page not exists!\n");
+-#endif
+-#endif
+-#endif
++ }
++ PTE_UNMAP_FUNC(pte_p);
+
+ if (debuglevel > 2)
+ {
+@@ -2946,20 +2993,35 @@
+ #else
+ static void ATI_API_CALL (*irq_handler_func)(int, void*, void*); /* function pointer variable */
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
+ static irqreturn_t ke_irq_handler_wrap(int irq, void *arg1, struct pt_regs *regs)
+ {
+ irq_handler_func(irq, arg1, regs);
+ return IRQ_HANDLED;
+ }
+-
+-int ATI_API_CALL __ke_request_irq(unsigned int irq,
++#else
++static irqreturn_t ke_irq_handler_wrap(int irq, void *arg1)
++{
++ irq_handler_func(irq, arg1, (void *)0);
++ return IRQ_HANDLED;
++}
++#endif
++
++int ATI_API_CALL __ke_request_irq(unsigned int irq,
+ void (*ATI_API_CALL handler)(int, void *, void *),
+ const char *dev_name, void *dev_id)
{
- return request_irq(irq,
- (void(*)(int, void *, struct pt_regs *))handler,
+ irq_handler_func = handler;
+- return request_irq(irq,
++ return request_irq(
++ irq,
+ ke_irq_handler_wrap,
- SA_SHIRQ, dev_name, dev_id);
-+ IRQF_SHARED, dev_name, dev_id);
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23)
++ SA_SHIRQ,
++#else
++ IRQF_SHARED,
++#endif
++ dev_name,
++ dev_id);
}
void ATI_API_CALL __ke_free_irq(unsigned int irq, void *dev_id)
+@@ -3530,12 +3592,10 @@
+ #else
+ *phys_address = pte_val(pte) & (u64)((u64)PAGE_MASK | (u64)0xf<<32);
+ #endif
+- sprintf(buf, "0x%Lx %c%c%c%c%c%c\n",
++ sprintf(buf, "0x%Lx %c%c%c%c\n",
+ *phys_address,
+ pte_present (pte) ? 'p' : '-',
+- pte_read (pte) ? 'r' : '-',
+ pte_write (pte) ? 'w' : '-',
+- pte_exec (pte) ? 'x' : '-',
+ pte_dirty (pte) ? 'd' : '-',
+ pte_young (pte) ? 'a' : '-');
+ }
+@@ -5436,7 +5496,11 @@
+ /** \brief Type definition of the structure describing Slab Cache object */
+ typedef struct tag_kasSlabCache_t
+ {
+- kmem_cache_t* cache; /* OS slab cache object */
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)
++ struct kmem_cache *cache; /* OS slab cache object */
++#else
++ kmem_cache_t *cache; /* OS slab cache object */
++#endif
+ spinlock_t lock; /* OS spinlock object protecting the cache */
+ unsigned int routine_type; /* Type of routine the cache might be accessed from */
+ char name[14]; /* Cache object name (kernel 2.4 restricts its length to 19 chars) */
+@@ -5482,8 +5546,12 @@
+ DBG_TRACE("creating slab object '%s'", slabcache_obj->name);
+
+ if ((slabcache_obj->cache =
+- kmem_cache_create(slabcache_obj->name, iEntrySize, 0, 0, NULL, NULL)))
+- {
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23)
++ kmem_cache_create(slabcache_obj->name, iEntrySize, 0, 0, NULL, NULL)))
++#else
++ kmem_cache_create(slabcache_obj->name, iEntrySize, 0, 0, NULL)))
++#endif
++{
+ ret = 1;
+ }
+
+diff -urN common/lib/modules/fglrx/build_mod/firegl_public.h~ common/lib/modules/fglrx/build_mod/firegl_public.h
+--- common/lib/modules/fglrx/build_mod/firegl_public.h~ 2007-10-22 11:30:01.000000000 -0500
++++ common/lib/modules/fglrx/build_mod/firegl_public.h 2007-10-24 13:31:08.000000000 -0500
+@@ -241,9 +241,14 @@
+ /*****************************************************************************/
+
+ typedef unsigned long __ke_dev_t;
+-typedef unsigned long __ke_size_t;
+ typedef unsigned long __ke_off_t;
++#ifdef __x86_64__
+ typedef long __ke_ssize_t;
++typedef unsigned long __ke_size_t;
++#else
++typedef int __ke_ssize_t;
++typedef unsigned int __ke_size_t;
++#endif
+ typedef unsigned char __ke_u8;
+ typedef unsigned short __ke_u16;
+ typedef unsigned int __ke_u32;
+@@ -594,7 +599,7 @@
+ extern char* ATI_API_CALL __ke_strchr(const char *s, int c);
+ extern int ATI_API_CALL __ke_sprintf(char* buf, const char* fmt, ...);
+ extern int ATI_API_CALL __ke_snprintf(char* buf, size_t size, const char* fmt, ...);
+-extern int ATI_API_CALL __ke_vm_test_and_clear_dirty(struct mm_struct* mm, unsigned long virtual_addr);
++extern int ATI_API_CALL KCL_TestAndClearPageDirtyFlag(struct mm_struct* mm, unsigned long virtual_addr);
+ extern unsigned long ATI_API_CALL __ke_do_mmap(struct file * file, unsigned long addr, unsigned long len, unsigned long pgoff);
+ extern int ATI_API_CALL __ke_do_munmap(unsigned long addr, unsigned long len);
+ extern void* ATI_API_CALL __ke_vmap(unsigned long *pagelist, unsigned int count);
diff --git a/x11-drivers/ati-drivers/files/ati-drivers-2.6.19.patch b/x11-drivers/ati-drivers/files/ati-drivers-2.6.19.patch
new file mode 100644
index 0000000..160565a
--- /dev/null
+++ b/x11-drivers/ati-drivers/files/ati-drivers-2.6.19.patch
@@ -0,0 +1,67 @@
+diff -urN fglrx-install-old/common/lib/modules/fglrx/build_mod/agp3.c fglrx-install/common/lib/modules/fglrx/build_mod/agp3.c
+--- fglrx-install-old/common/lib/modules/fglrx/build_mod/agp3.c 2006-09-19 19:30:42.000000000 -0500
++++ fglrx-install/common/lib/modules/fglrx/build_mod/agp3.c 2006-10-27 09:44:23.902749464 -0500
+@@ -61,7 +61,6 @@
+ #include <linux/modversions.h>
+ #endif
+ #endif
+-#include <linux/config.h>
+ #include <linux/module.h>
+ #include <linux/pci.h>
+ #include <linux/init.h>
+diff -urN fglrx-install-old/common/lib/modules/fglrx/build_mod/agpgart_be.c fglrx-install/common/lib/modules/fglrx/build_mod/agpgart_be.c
+--- fglrx-install-old/common/lib/modules/fglrx/build_mod/agpgart_be.c 2006-09-19 19:30:42.000000000 -0500
++++ fglrx-install/common/lib/modules/fglrx/build_mod/agpgart_be.c 2006-10-27 09:44:34.265174136 -0500
+@@ -99,9 +99,6 @@
+ #endif
+ #endif
+
+-#include <linux/config.h>
+-
+-
+ #include <linux/module.h>
+ #include <linux/types.h>
+ #include <linux/kernel.h>
+diff -urN fglrx-install-old/common/lib/modules/fglrx/build_mod/drm.h fglrx-install/common/lib/modules/fglrx/build_mod/drm.h
+--- fglrx-install-old/common/lib/modules/fglrx/build_mod/drm.h 2006-09-19 19:30:42.000000000 -0500
++++ fglrx-install/common/lib/modules/fglrx/build_mod/drm.h 2006-10-27 09:44:52.502401656 -0500
+@@ -38,7 +38,6 @@
+ #define _DRM_H_
+
+ #if defined(__linux__)
+-#include <linux/config.h>
+ #include <asm/ioctl.h> /* For _IO* macros */
+ #define DRM_IOCTL_NR(n) _IOC_NR(n)
+ #define DRM_IOC_VOID _IOC_NONE
+diff -urN fglrx-install-old/common/lib/modules/fglrx/build_mod/drmP.h fglrx-install/common/lib/modules/fglrx/build_mod/drmP.h
+--- fglrx-install-old/common/lib/modules/fglrx/build_mod/drmP.h 2006-09-19 19:30:42.000000000 -0500
++++ fglrx-install/common/lib/modules/fglrx/build_mod/drmP.h 2006-10-27 09:45:03.912667032 -0500
+@@ -42,7 +42,6 @@
+ * can build the DRM (part of PI DRI). 4/21/2000 S + B */
+ #include <asm/current.h>
+ #endif /* __alpha__ */
+-#include <linux/config.h>
+ #include <linux/module.h>
+ #include <linux/kernel.h>
+ #include <linux/miscdevice.h>
+diff -urN fglrx-install-old/common/lib/modules/fglrx/build_mod/firegl_public.c fglrx-install/common/lib/modules/fglrx/build_mod/firegl_public.c
+--- fglrx-install-old/common/lib/modules/fglrx/build_mod/firegl_public.c 2006-09-19 19:30:42.000000000 -0500
++++ fglrx-install/common/lib/modules/fglrx/build_mod/firegl_public.c 2006-10-27 09:45:47.463046368 -0500
+@@ -67,9 +67,6 @@
+ * for example for CPU hot-plugging. I wonder why a desktop
+ * distribution would even include such a kernel patch. */
+ #ifdef CONFIG_MEM_MIRROR
+-/* Prevent linux/config.h from being included again in subsequent
+- * kernel headers as that would redefine CONFIG_MEM_MIRROR. */
+-#include <linux/config.h>
+ #warning "Disabling CONFIG_MEM_MIRROR because it does not work with non-GPL modules."
+ #warning "This will break page tracking when the fglrx kernel module is used."
+ #undef CONFIG_MEM_MIRROR
+@@ -86,7 +83,6 @@
+ #include <asm/unistd.h> /* for installing the patch wrapper */
+ #include <linux/module.h>
+
+-#include <linux/config.h>
+ #include <linux/kernel.h>
+ #include <linux/fs.h>
+ #include <linux/proc_fs.h>
diff --git a/x11-drivers/ati-drivers/files/ati-drivers-2.6.20.patch b/x11-drivers/ati-drivers/files/ati-drivers-2.6.20.patch
new file mode 100644
index 0000000..aeaba71
--- /dev/null
+++ b/x11-drivers/ati-drivers/files/ati-drivers-2.6.20.patch
@@ -0,0 +1,73 @@
+--- common/lib/modules/fglrx/build_mod/firegl_public.c 2006-12-18 10:58:15.000000000 -0500
++++ common/lib/modules/fglrx/build_mod/firegl_public.c 2006-12-18 11:14:04.000000000 -0500
+@@ -181,6 +181,70 @@
+ int errno;
+ #endif // __ia64__
+
++#if defined(__i386__)
++#define __syscall_return(type, res) \
++do { \
++ if ((unsigned long)(res) >= (unsigned long)(-(128 + 1))) { \
++ errno = -(res); \
++ res = -1; \
++ } \
++ return (type) (res); \
++} while (0)
++#define _syscall2(type,name,type1,arg1,type2,arg2) \
++type name(type1 arg1,type2 arg2) \
++{ \
++long __res; \
++__asm__ volatile ("push %%ebx ; movl %2,%%ebx ; int $0x80 ; pop %%ebx" \
++ : "=a" (__res) \
++ : "0" (__NR_##name),"ri" ((long)(arg1)),"c" ((long)(arg2)) \
++ : "memory"); \
++__syscall_return(type,__res); \
++}
++
++#define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3) \
++type name(type1 arg1,type2 arg2,type3 arg3) \
++{ \
++long __res; \
++__asm__ volatile ("push %%ebx ; movl %2,%%ebx ; int $0x80 ; pop %%ebx" \
++ : "=a" (__res) \
++ : "0" (__NR_##name),"ri" ((long)(arg1)),"c" ((long)(arg2)), \
++ "d" ((long)(arg3)) : "memory"); \
++__syscall_return(type,__res); \
++}
++#elif defined(__x86_64__)
++#define __syscall_clobber "r11","rcx","memory"
++#define __syscall "syscall"
++
++#define __syscall_return(type, res) \
++do { \
++ if ((unsigned long)(res) >= (unsigned long)(-127)) { \
++ errno = -(res); \
++ res = -1; \
++ } \
++ return (type) (res); \
++} while (0)
++#define _syscall2(type,name,type1,arg1,type2,arg2) \
++type name(type1 arg1,type2 arg2) \
++{ \
++long __res; \
++__asm__ volatile (__syscall \
++ : "=a" (__res) \
++ : "0" (__NR_##name),"D" ((long)(arg1)),"S" ((long)(arg2)) : __syscall_clobber ); \
++__syscall_return(type,__res); \
++}
++
++#define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3) \
++type name(type1 arg1,type2 arg2,type3 arg3) \
++{ \
++long __res; \
++__asm__ volatile (__syscall \
++ : "=a" (__res) \
++ : "0" (__NR_##name),"D" ((long)(arg1)),"S" ((long)(arg2)), \
++ "d" ((long)(arg3)) : __syscall_clobber); \
++__syscall_return(type,__res); \
++}
++#endif
++
+ // int mlock(const void *addr, size_t len);
+ _syscall2(int, mlock, const void *, addr, size_t, len )
+ // int munlock(const void *addr, size_t len);
diff --git a/x11-drivers/ati-drivers/files/ati-drivers-8.35.5-2.6.19.patch b/x11-drivers/ati-drivers/files/ati-drivers-8.35.5-2.6.19.patch
new file mode 100644
index 0000000..665d8d6
--- /dev/null
+++ b/x11-drivers/ati-drivers/files/ati-drivers-8.35.5-2.6.19.patch
@@ -0,0 +1,33 @@
+--- common/lib/modules/fglrx/build_mod/firegl_public.c 2007-03-29 23:48:46.000000000 +0200
++++ common/lib/modules/fglrx/build_mod/firegl_public.c 2007-03-30 00:15:21.000000000 +0200
+@@ -5055,7 +5057,6 @@
+ */
+ unsigned int ATI_API_CALL KAS_SlabCache_Destroy(void* hSlabCache)
+ {
+- unsigned int ret = 0;
+ kasSlabCache_t* slabcache_obj = (kasSlabCache_t*)hSlabCache;
+
+ DBG_ENTER("0x%08X", hSlabCache);
+@@ -5069,18 +5070,11 @@
+
+ DBG_TRACE("destroying slab object '%s'", slabcache_obj->name);
+
+- if (kmem_cache_destroy(slabcache_obj->cache) == 0)
+- {
+- ret = 1;
+- slabcache_obj->cache = NULL;
+- }
+- else
+- {
+- DBG_ERROR("destroying failed");
+- }
++ kmem_cache_destroy(slabcache_obj->cache);
++ slabcache_obj->cache = NULL;
+
+- DBG_LEAVE("%d", ret);
+- return ret;
++ DBG_LEAVE("1");
++ return 1;
+ }
+
+ /** \brief Allocate an entry in a Slab Cache
diff --git a/x11-drivers/ati-drivers/files/ati-drivers-8.35.5-2.6.20.patch b/x11-drivers/ati-drivers/files/ati-drivers-8.35.5-2.6.20.patch
new file mode 100644
index 0000000..c830d38
--- /dev/null
+++ b/x11-drivers/ati-drivers/files/ati-drivers-8.35.5-2.6.20.patch
@@ -0,0 +1,11 @@
+--- common/lib/modules/fglrx/build_mod/firegl_public.c 2007-03-29 23:48:46.000000000 +0200
++++ common/lib/modules/fglrx/build_mod/firegl_public.c 2007-03-30 00:15:21.000000000 +0200
+@@ -171,6 +171,8 @@
+ #endif
+ #endif
+
++#include <linux/freezer.h>
++
+ #include <linux/kmod.h>
+
+ // To enable DBG_* macros set this variable to nonzero
diff --git a/x11-drivers/ati-drivers/files/ati-powermode.sh.patch b/x11-drivers/ati-drivers/files/ati-powermode.sh.patch
new file mode 100644
index 0000000..cd776e0
--- /dev/null
+++ b/x11-drivers/ati-drivers/files/ati-powermode.sh.patch
@@ -0,0 +1,32 @@
+diff -ur common.orig/usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh common/usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh
+--- common.orig/usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh 2006-07-28 04:22:36.000000000 +0100
++++ common/usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh 2006-08-04 12:19:42.000000000 +0100
+@@ -17,6 +17,10 @@
+ fi
+ }
+
++aticonfig='/opt/ati/bin/aticonfig'
++
++# default high power state
++default_state=`$aticonfig --lsp | grep 'default state' | cut -c 3`
+
+ grep -q closed /proc/acpi/button/lid/*/state
+ if [ $? = 0 ]; then
+@@ -46,7 +50,7 @@
+ getXuser;
+ if [ x"$XAUTHORITY" != x"" ]; then
+ export DISPLAY=":$displaynum"
+- su $user -c "/usr/X11R6/bin/aticonfig --set-powerstate=1 --effective=now"
++ su $user -c "$aticonfig --set-powerstate=1 --effective=now"
+ fi
+ done
+ else
+@@ -56,7 +60,7 @@
+ getXuser;
+ if [ x"$XAUTHORITY" != x"" ]; then
+ export DISPLAY=":$displaynum"
+- su $user -c "/usr/X11R6/bin/aticonfig --set-powerstate=3 --effective=now"
++ su $user -c "$aticonfig --set-powerstate=$default_state --effective=now"
+ fi
+ done
+ fi
diff --git a/x11-drivers/ati-drivers/files/atieventsd.rc6 b/x11-drivers/ati-drivers/files/atieventsd.rc6
new file mode 100644
index 0000000..2180e0e
--- /dev/null
+++ b/x11-drivers/ati-drivers/files/atieventsd.rc6
@@ -0,0 +1,22 @@
+#!/sbin/runscript
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/x11-drivers/ati-drivers/files/atieventsd.rc6,v 1.2 2006/08/04 12:20:19 chrb Exp $
+
+depend() {
+ need acpid
+}
+
+start() {
+ start-stop-daemon --start --pidfile /var/run/atieventsd.pid \
+ --exec /opt/ati/sbin/atieventsd -- ${ATIEVENTSDOPTS}
+ local pid=`pidof atieventsd`
+ echo $pid > /var/run/atieventsd.pid
+ eend $?
+}
+
+stop() {
+ start-stop-daemon --stop --quiet --pidfile /var/run/atieventsd.pid
+ eend $?
+}
+