summaryrefslogtreecommitdiff
path: root/x11-drivers/ati-userspace
diff options
context:
space:
mode:
authorBlackNoxis <steven.darklight@gmail.com>2014-10-27 18:38:05 +0200
committerBlackNoxis <steven.darklight@gmail.com>2014-10-27 18:38:05 +0200
commit24934e623441310f644e5f72855b0f2bf9f3cd1a (patch)
treea453939bf58199bc2c3ff27bcf0accf2b221c6c4 /x11-drivers/ati-userspace
parent687f45092b4f4ccf33765cee7427f054bae22344 (diff)
Incoming! Moving Rogento.git to kogaion-desktop. Finally
Diffstat (limited to 'x11-drivers/ati-userspace')
-rw-r--r--x11-drivers/ati-userspace/Manifest70
-rw-r--r--x11-drivers/ati-userspace/ati-userspace-13.12.ebuild501
-rw-r--r--x11-drivers/ati-userspace/ati-userspace-13.9.ebuild494
-rw-r--r--x11-drivers/ati-userspace/files/ati-drivers-13.12-acpi.patch16
-rw-r--r--x11-drivers/ati-userspace/files/ati-drivers-13.6-linux-3.10-proc.diff356
-rw-r--r--x11-drivers/ati-userspace/files/ati-drivers-13.8-beta-include-seq_file.patch13
-rw-r--r--x11-drivers/ati-userspace/files/ati-drivers-13.8-mesa-9.2-debug.patch18
-rw-r--r--x11-drivers/ati-userspace/files/ati-drivers-13.8-proc-permissions.diff13
-rw-r--r--x11-drivers/ati-userspace/files/check-for-iommu-only-if-iommu-is-supported.patch31
-rw-r--r--x11-drivers/ati-userspace/files/typesafe-kuid.diff34
10 files changed, 1492 insertions, 54 deletions
diff --git a/x11-drivers/ati-userspace/Manifest b/x11-drivers/ati-userspace/Manifest
index 86cbffe8..a1751e88 100644
--- a/x11-drivers/ati-userspace/Manifest
+++ b/x11-drivers/ati-userspace/Manifest
@@ -1,57 +1,19 @@
-AUX amd-drivers-3.2.7.1.patch 560 SHA256 7cc315754a47fbda6bf36bcee01780da7c19535c4f6ec1cccc556e9a7b32d263 SHA512 bcdc89e7a7148f5eb5450364298de6fb95dcad0d3c8d7091e9236d4f4b9cff0be24d59e8ed4ccdde0c8e94985ab8b4e7d5848e1e0e7102c699edb9230dbe57ce WHIRLPOOL 85ef893cd8bffa0d41b99eccd8b6e1ed713f69cc683dee52268ea0d6bc6fd4a77b3fdab31dd1e35ec3bbd21b399725286289c9fb3a276eff3922c1f8cf0746a2
-AUX ati-drivers-12.2-redefine-WARN.patch 1316 SHA256 f7d8ad3307823925cf8b4c6540db17a51553e48dd008793fc026803bb2aa1ced SHA512 1ee5f7fb5dc629f186754dc83a7d718a6a8acda836dadb2b87bd616c424db0aba067fb833d966cf79425ad78d94ab3f7c4014bbe2356f394630b0761625e74ab WHIRLPOOL 75987965689042342a923d4542a3f1b5eb4ba8ce3fc1ede82be8aeffaa2154a0dc75c507a4772bc00ef510eee7f4b47a51a2ea43aadce6e742e842e348c15b40
-AUX ati-drivers-12.9-KCL_AGP_FindCapsRegisters-stub.patch 799 SHA256 0001fa7f2c3e15ec315f6c963dd428b682778c129250941a849577b8b3293e36 SHA512 a7ae5e7017c9b5a68d112d9a77df40ada722b06aff0cc31147713bfbce2419f9ca8c22b40398ab8b80c86427ff086a5617fb6de93d540af54365c7039cdcfe0f WHIRLPOOL 809c5bf8f0b0381af6a8549c36fcd00e75ff2f571f21cef3f2dec9ea823c65c29db28373b7145f39b9ed2cad234ec3c063407fb7a12260cfe1fe62eb67b5780d
-AUX ati-drivers-2.6.33.patch 3888 SHA256 88c242d50e9e158b5cdfe8de49abb49deb9f7d4fd4a3e014b9092a5eaa58332c SHA512 20d94e258766dff4b18ef26bee66f415b8975bbbae8dd4bfd2d7354538302c571747d5d672d3cdd1fd97bb4ce8e24756ab9afc7ebd55e9f7f19e3acee8bfaff1 WHIRLPOOL d7d753fa4a1c3f9432cf151a3ea524173036462c7850dc9309a8097bba61237194970e99d735f9efebf43253fc626e7b9ab1e69f95919fa76b2b60bf98696d61
-AUX ati-drivers-2.6.34.patch 358 SHA256 b6da2f0ad829a14b7e50d4ff2bab493ce45a2f4493bc558e28122c4fe7d4032c SHA512 a9329d3696d99395667a0b022fa64c1d4c35caeb144c9e08404613febe525d8e286ec36332232b0072bcf46e9380aa04fb01d010028ff0de8cb7aa530c91768e WHIRLPOOL cff3dab1b4b27bf99bc3861377849ecb5824228eeffb8a02fc0c2b2246b6a585443aaac7ef10a561ea9ac8d2ff00af378e2412dfafc62816fb9ab3f2515b8d71
-AUX ati-drivers-2.6.35-and-newer.patch 434 SHA256 6a962e79bfd01cd35488dc946c4e0056b5734c15711b6cb9e28c6fadc92d6bb4 SHA512 2a2d0bc62d946ac765a321cf0ab6c6d595622fc57426678f12c8c116f9f8f472e180f8349632ed725c612830f27af4f48180634555c3c7462ce8e59989c295f3 WHIRLPOOL cc2c87578729ade8268394084bde899ae1690a4c8720f4e4b6bb5c3778d896af434440a2993d87bf5a6d445757fdd86384344e4616e167122cc1d526705ad093
-AUX ati-drivers-2.6.36.patch 876 SHA256 00ffca26787d4c2cab6848cf0bec043e6c099c60738aebacb2148e920738fcb6 SHA512 2ee3a5b342aa13a64e033c0de109afa4330d85db440177804f24a3ed27a112719f688d8ad9b353d5b7c49ebb5a8944c397c0da552a59d33e12a8f3cb8493616c WHIRLPOOL c6b1937ec94e06d99b8c15b5d9c66b028d9171e21cc6d059f4e2ca571a88f6adb2d8cbbb7901e662d7e26a8c4c4e4835f6f4d49d43a72c627c4e2584c9f5c1f9
-AUX ati-drivers-2.6.37.patch 431 SHA256 fffd3d39f16fa57df020b2fddf17466a3633b7eac58dffa70525137010cc7ed6 SHA512 aac1a3cbbb333c5801c46a5e3c8b838c3f56cfbb68b851f8d3b89b383233e9b75aee0960b92bb4907665d14b97d8b8e3158a6ad2a0a92f1b8fab8a41766865fb WHIRLPOOL 2ef2cfa85c561572698bff4ed6bee1e2ac0ff9ffe30b802fc901bd0787837d77318c10acf14bf653da0e087ccf9492dcb07fd60c0e0173abf48d5e337b450ebc
-AUX ati-drivers-2.6.38.patch 1988 SHA256 32dcafbe0d584a36839b358acc777b2f2953e8d472f48722debb430f523ec11e SHA512 667623cae54669a736422511880936e6148105bc88e74b235db8c888148d0888cbe4bcd84d0344aa256cdf948796f85a39be686e66b0d2bac3375c4dfe4b5554 WHIRLPOOL b4b2de630be27741c2b9d645913aa73ec992adaa71f82f21b5ea748be5f9d6316e1b3fd11f8709ba6a87ef9ebffe4c7c9c1d6890a7f4011bd01b0792c993c83c
-AUX ati-drivers-CVE-2010-3081-fix.patch 2730 SHA256 bbace941d6e1e399b7ab46affe1887edb9a38892ccc2a498017146b838818afc SHA512 56b0aec0344788cf50765284f879fe804226fc930f43efaa0c8d536e0e3164ce3d9218236977fcca3499a5b199bd57e1e5c9d92c77a2658a75d82f47586e9082 WHIRLPOOL da473efb8149f8de43987c842d0214978eb08bbd6b3060cfec1fed50152501e5f10dbe02743d9e61888790f2e9fcecd6c0aa96d3ff9b6e48348885df14398fbe
-AUX ati-drivers-do_mmap.patch 1405 SHA256 3fc9bae50d25d3bfe76a3a1e89c8d025674a4cb9afd16d3a5d8b3c25a66f536d SHA512 1a2f8fe7f2506037d6d158e5c2efffa39c503566284d8f516cb2d84db546eced24df5dcb8d74ac84911589efb4547d7f8610d78ad29703f9ed0a9890576c51b7 WHIRLPOOL 86daa957d7569b26fdf92929e5b04a32379af067a208628eab1a4541fdebfb51fa4bfedeec63f4685c6258adcba2ddc4223b69dca329ecbebd4ba13167f66f82
-AUX ati-drivers-fix_compilation-bug-297322.patch 1114 SHA256 edbfc56eec848389c3dfdd94362322de41027b9813128d2d4f8e476d1d8581e3 SHA512 c2c4674ff63b05c4f5f007c64f70ebfd4bf6ba1a82938f06647d9683315105e3cee77716eed1efdd599177457164e339145ed0d51f2bbd7ad1f383dbb64634cd WHIRLPOOL bd3aa26fb333850ac0a5b554ab7cd5ac583ef9f277d6ada64d27dcfef0f1fe5174f67e04f8e951275fcfe449a80d2701c3a1d85e65ac55ef5665144924b2b127
-AUX ati-drivers-kernel-3.8-acpihandle.patch 717 SHA256 f7012bbc1d27a4d9207f8ba78256684a74b917311f525d3b061c11caefad2846 SHA512 a064ad1ebbb1010349c22d6fd6a4a3715df3d7087353a70199957b5c1c325b533b21c3f004567362a834faa0d8f169296ef996765d47439fdad4109a0d01f85c WHIRLPOOL e0eb93cd367f9e6e1848c3c3301c914f783865eb5d6c11a27a334624ee84cf7ee99073a6a2ff69014c8b920a51933573bf1224f53ea64c2666968f93ca922003
-AUX ati-drivers-old_rsp.patch 989 SHA256 dd222de89b515046c6cbfef172a3ec8d4bc48664799b3bbfff648091c6d54b49 SHA512 b86a230f126950d309b899ab3445154cf38cb8127b7686d0a467df6d3561a1785747e9522c00b55a294961c1157fe41833a5a85d4737775ae68bdb4099b0ee37 WHIRLPOOL cd06422ee90587c5c7485074b03ccaaef921134c721c0d0f6f678a9c968aae6417523c77d6dfcccc856cb5d125579197cd3c6a5b1c8557ce621784eabd0c43fa
-AUX ati-drivers-vm-reserverd.patch 408 SHA256 61128444938f94f911325b6cac810d3cb3614d0002758e48ba976b678414df30 SHA512 34cd4705f632b1493eac756538eb21fe0e090f78cf92cde7c2a7094a8fc8134ee6d5dd24c6bb9ad18c8ef46dd1d5505ae12d43032265cd4ade03793f277fe4c2 WHIRLPOOL 5a1a98145576b20bdd2e80e5f7f9a2b9bab02942a9fb83814d73d17f1bfec690ee0cd2ccfdf418f297e75432d8fcee8164a1d179eeb5bc716e1becf96bb373f1
-AUX ati-drivers-x32_something_something.patch 486 SHA256 9eb114a797089fca3693420305a6b668c4d7a16a722d5faa53dd904bba1b4c07 SHA512 157884244a49748c897a2eca1a46bf40631042d15af85c2b2f49bc3c3c48f5638dec815a4e9c67ee2c8b88cc15b7f71e9fe4d9bfebf5444bb169542048f66499 WHIRLPOOL f7583d7df16c9eb608aff2330b4bd55ede34986e6f3cf63aa4cb2c77dcfade7c499f1b4cef95fdc8e6ab28d7bb5544a80703bcf5a41eae6b90ca8830b6fdd888
-AUX ati-drivers-xen.patch 1994 SHA256 514dad9629fc689ec0344875a29d713f9d8de7ccbb0a22a2b80ede11bbbc6c58 SHA512 28eeaeea4589a5d87759e318abcf4f8d8e9b2fb3e289f76001cc17f8e515135aa023a424a0149240ad64fcf7721d15864c7218c30c3a097240c800384991e77f WHIRLPOOL 0f0965808d4270e8421d87575ffb1e51a2e095c746e7f536bb091b03287543d176f582976bfec51a5b9eb14c2e3a04c126b23447a6eb39f6e90eb76eda42236d
-AUX ati-powermode-opt-path-2.patch 1634 SHA256 e7749e04a3aa24132b13d0c694563a45c0d38e238f7412a75bd89aa9f9e9ead1 SHA512 7fc91789157d6211726d26be066e3984871eb579c77c422bde27f489f72215e66dbfb5d477ea6882d46ed6d0c63b9f01fdd5ee196fd6a2809bfc3ca22badc859 WHIRLPOOL a3d6f9335c748192a65bb3493a1dd2f604ef6b1270760908bb541d10ac9c4eb8009d7d5fb145b37c6fbfc1512a70ecda3c79f6f56396f8424f072fb92059e0a2
-AUX ati-powermode-opt-path-3.patch 1471 SHA256 35e73fef3d8e39714e8d6e73afaa7b205505db3bdd65c364e7ea02fdc0cb3055 SHA512 0e17026847062117993ba6115942d16421f6b9943afd57913c96e7550b0e49f3ed10e06bc98f9db1a5ba4af7c42dae6b55a332a97e73d48dba7f61ed0ad35ad4 WHIRLPOOL 39861d10d307e537549ed0c7967e18ad3ef658af66396f5491d1f2e13ab13e8b8e252d4c14b5ab616ff5aad69a599cf3b32accedd51438021d50cc074fa296a8
-AUX atieventsd.init 533 SHA256 20010ebc5cb286149f3c4c9c099b6470463ccdb8fd47cea054b783dc2ad1fff3 SHA512 9f8990bb5619f99524e0759a1c4b41b0b2c081c6eecb3916ab60df8e6b59d99e3615af61e0ba5b71d003ccaaf41e2143237b26f36f64f00a47e0fe94f83473dd WHIRLPOOL 21979818a19bc27e3527958c66bf45654df4a307862897530bc02be6616f45ee210590a9d1bcab84336c6061482034010efbb251770bfaf023f20ffae8212ecd
-AUX const-notifier-block.patch 878 SHA256 cd73f5e15d9521a989d8cd9b7e3b252406e7b89fdfc129fd2d470f0bc86e8457 SHA512 1b84cb85ce903d80ad50a0e2d53509016625d1ede070e18b800408d486dc89d5283d801d6449eb81ee25a7adffbd0094b57a301842364e1fb58cc6bf9623e5b4 WHIRLPOOL ee9785d250632cd8843a5995f36442ff6abec2d5a7158f3604a6bc147c7db251608b9484c3ac95376c4cc6b6a15f6682675bd011eb6a193a073ba873e17a9872
-AUX kernel/2.6.31-fglrx_find_task_by_vpid.patch 581 SHA256 4e95b588e894cfb89270168cd771c67bf270c805f30481fceebe47aac3f36980 SHA512 e65f31db60cd99c99dfba95c2f2fe0ee5f434092e7218dbdf6a727e3ffaab3d511541aa1ab64a53589d6fc89023c45d972708c0bd925840fa568f0d7f6faa512 WHIRLPOOL ee1061bff86a5711474eaea8b1b8a2cad5ff02e9a093e197af9a55e9b2dc33ed6bf38dfe02afec4f910250a241900049dd3986c65e95f98991a46549cb37c343
-AUX kernel/2.6.32-9.11-fix_compilation.patch 1434 SHA256 bd2df542c237d0570c3c75c0251514bbf8b67f3ceb40e734916ea53c75c189b7 SHA512 6676ba917616324e58a8df498cd2611523a38e2dfb5ea5683580951d3a39b2cc0040e00bc2238d1ef94f009e1771a6dddb2c02988d8af9aae6373f717ab9234b WHIRLPOOL 605bf802feede69c43a515b3b289c181c50b2f176028c7d170c41dd641bd5efed7d0ccad668d21a3d7c5c5c0f6418e317ba6c723e773269d063afb8990bae95b
-AUX switchlibGL 1349 SHA256 a4aa2107fdb903da77fea432bc809a1155e213db460fdec72fd1c3c7cc0d13a0 SHA512 51d2912aa6ec2002b096c0483be69650d682feec54486ed5226b91988bc1516f718c71d9f58a2b28e0dbc512c0300ea271f9a97885776dd045fe324f1549b85d WHIRLPOOL d335ea9c57a28f8450423089bbf798da77cc72fff6bad1221989412808abcd6bcb7afa41aa2b04231feff3dac6eaaff58a7595173e53b6cf0f5d3d591997b43d
+DIST amd-catalyst-13.12-linux-x86.x86_64.zip 160571830 SHA256 024033f4847d1c2a182fc44e0b3df29b2d133e24aeaba390f4504a8f3361a0ca SHA512 bf02aea47dc0588e8fe6590ff5665b25b34b3e10499348e2eb786ba89b32703897753852e6ee8ed52c3d0f8eef46f2026d130329d7af75191e605975379d0109 WHIRLPOOL bcdac0f9641cfdc6d89cd5544fe22dda91f64ae8d34dcd25b55930702108b1bee1db0cdc85d8a68a78fddc34f7f30ab88c9813d3a6ba38b3abf37a24d6210707
DIST amd-catalyst-13.4-linux-x86.x86_64.zip 122588023 SHA256 ebec78c7f78db3601d1c97116a6823076a7765318e16d88b619ebc80d4c6d1d5 SHA512 ce012f46527ee0073f658e97dd793954930b934b96be9e1c6cd1d344e7734ef81949b484701d5e7e1ebb221f46b5a617f4efb4445e42c06ac0a8b4eca76463fc WHIRLPOOL cb0f7af6d0474c3d521c5785bab49d76da7e09e1ddd02dc0e72b70b5afdb2bd1e07d4a4115a755f213718e7c32c816697d993b73706d58be68fa043aef1ad551
-DIST amd-driver-installer-12-1-x86.x86_64.run 106085279 SHA256 8d76700e0db68f74f735808ee7fd446cb5072734ba6ec03f2dd82c05ebfdc81d
-DIST amd-driver-installer-12-2-x86.x86_64.run 107213014 SHA256 054796cbf2d99e4b545d062ce8eabfd973e74e2e21a159092816238b001618fd
-DIST amd-driver-installer-12-3-x86.x86_64.run 108029053 SHA256 5f90c7e472ca0095efc16097ac7bcda846be0e980cc4d3e588cc4089efe8fb57 SHA512 5c5380dfcebacb7c4d7f0e6ffc5d26955f155266577c903bd4b4fc9d9bf5f241e6e13dc7ee14e14c96e9e0ad19d7d6680609978cfa1c5c4ec2f5d50881a43ee0 WHIRLPOOL 5e179a0ef89520dea6a5d249f4c55bd58310769131edc82babfb66c9ce946511effe7a32e883ba30a9bc40a3e6dc8194b57cbbfe0cb2593bec463de7816612f1
-DIST amd-driver-installer-12-4-x86.x86_64.run 108360519 SHA256 7f3ba3d96eba30fc09aec03ba72f5482d3b192bb0ea63a5e7b79454b053cb63c SHA512 fe466df547a05efb37b0dd1c685f819ceb51af83acefd65f2e500ab9165feac841d4b07afc32dc26391762963e929624e55115c0f505acb78289540baaadcfb5 WHIRLPOOL 7aa8817e75943977b753a93015a7d1e0f7a95383e6aaae7317da29eb07caa520a5376b2ab80e7caded543939d3c9428b80d915d5ba3d8377068349189890729c
-DIST amd-driver-installer-12-6-x86.x86_64.run 106660241 SHA256 b5c6070dc75e9296d0f04e7e0b3c6697f6c21872d50b1dcf4d7b3b0ab7ce7155
-DIST amd-driver-installer-12-8-x86.x86_64.zip 105413213 SHA256 62525173b2b7602aa4e7e46a109204d0f349abfbb135c86d03db5cd57642bb41
-DIST amd-driver-installer-12.6-legacy-x86.x86_64.zip 106888385 SHA256 5353a3f874d31f0fde46c390ce17cc2f27875156dbf3e7c20b5cca494a058102
-DIST amd-driver-installer-catalyst-12.10-x86.x86_64.zip 111686672 SHA256 ca2a097324687245801b3350316880d706c82f43684839dcf7f86f55141d835d SHA512 cef8a1f822d2a9bd81cf85c1410b75d400808946443c2bf95281f7c2cbcf376ac423199f41125825ed6639eaacd14ea688acc5c5b164186a4715b62ed6f5fb63 WHIRLPOOL 2186151882d9ba69af2a39a0a4dbb26adbff87fe69a90c40798e2390c44ce100e8d71f03c0c86e3a8be5d3429f98f3c107578aa5508b6fb983ca4235e0de8f74
+DIST amd-catalyst-13.9-linux-x86.x86_64.zip 120482826 SHA256 ebade5062713c69d2b703b0a3f62defc409d58e98ceab3bfac7a71643c0c4cd3 SHA512 887c1146920ba7e5b31efd63b1a1b7d9cab586e8c6d705706e0b176b3527e542f452d919cd015c3a04d6f42c884f27d983b2a9229b70716129a94674dd7f62b4 WHIRLPOOL d8b6c7ed772898914c256674ae08a8b3d3054eb5bdfc2f00dc4c796a36b4654c3101410786adb54eaae44ff35386db2aa8d8db12d70805f8732d0709412bdbcc
+DIST amd-driver-installer-12-1-x86.x86_64.run 47828 SHA256 356679212eae39c91a9e6dc22f41e4eb033ef0249aaeb12de34ede6fa1b55d6d SHA512 48d567f2891b522bffec2b3baaf0cd872073ad5bb960a4d8b4847d901fd4560c6b79973f6c6c82d09c8dd5b67f64f3b65140091b0d997735364a63e611f3f37d WHIRLPOOL 4768847f08f16987c8a506fa5f720a994f0f9f550373295020c72c801692b7998edc70027602a2e1c41f257638a73bc09813115b98b6ee4b583449bb7be78e4a
+DIST amd-driver-installer-12-2-x86.x86_64.run 47828 SHA256 356679212eae39c91a9e6dc22f41e4eb033ef0249aaeb12de34ede6fa1b55d6d SHA512 48d567f2891b522bffec2b3baaf0cd872073ad5bb960a4d8b4847d901fd4560c6b79973f6c6c82d09c8dd5b67f64f3b65140091b0d997735364a63e611f3f37d WHIRLPOOL 4768847f08f16987c8a506fa5f720a994f0f9f550373295020c72c801692b7998edc70027602a2e1c41f257638a73bc09813115b98b6ee4b583449bb7be78e4a
+DIST amd-driver-installer-12-3-x86.x86_64.run 47828 SHA256 356679212eae39c91a9e6dc22f41e4eb033ef0249aaeb12de34ede6fa1b55d6d SHA512 48d567f2891b522bffec2b3baaf0cd872073ad5bb960a4d8b4847d901fd4560c6b79973f6c6c82d09c8dd5b67f64f3b65140091b0d997735364a63e611f3f37d WHIRLPOOL 4768847f08f16987c8a506fa5f720a994f0f9f550373295020c72c801692b7998edc70027602a2e1c41f257638a73bc09813115b98b6ee4b583449bb7be78e4a
+DIST amd-driver-installer-12-4-x86.x86_64.run 47828 SHA256 356679212eae39c91a9e6dc22f41e4eb033ef0249aaeb12de34ede6fa1b55d6d SHA512 48d567f2891b522bffec2b3baaf0cd872073ad5bb960a4d8b4847d901fd4560c6b79973f6c6c82d09c8dd5b67f64f3b65140091b0d997735364a63e611f3f37d WHIRLPOOL 4768847f08f16987c8a506fa5f720a994f0f9f550373295020c72c801692b7998edc70027602a2e1c41f257638a73bc09813115b98b6ee4b583449bb7be78e4a
+DIST amd-driver-installer-12-6-x86.x86_64.run 47828 SHA256 356679212eae39c91a9e6dc22f41e4eb033ef0249aaeb12de34ede6fa1b55d6d SHA512 48d567f2891b522bffec2b3baaf0cd872073ad5bb960a4d8b4847d901fd4560c6b79973f6c6c82d09c8dd5b67f64f3b65140091b0d997735364a63e611f3f37d WHIRLPOOL 4768847f08f16987c8a506fa5f720a994f0f9f550373295020c72c801692b7998edc70027602a2e1c41f257638a73bc09813115b98b6ee4b583449bb7be78e4a
+DIST amd-driver-installer-12-8-x86.x86_64.zip 47828 SHA256 356679212eae39c91a9e6dc22f41e4eb033ef0249aaeb12de34ede6fa1b55d6d SHA512 48d567f2891b522bffec2b3baaf0cd872073ad5bb960a4d8b4847d901fd4560c6b79973f6c6c82d09c8dd5b67f64f3b65140091b0d997735364a63e611f3f37d WHIRLPOOL 4768847f08f16987c8a506fa5f720a994f0f9f550373295020c72c801692b7998edc70027602a2e1c41f257638a73bc09813115b98b6ee4b583449bb7be78e4a
+DIST amd-driver-installer-12.6-legacy-x86.x86_64.zip 47828 SHA256 356679212eae39c91a9e6dc22f41e4eb033ef0249aaeb12de34ede6fa1b55d6d SHA512 48d567f2891b522bffec2b3baaf0cd872073ad5bb960a4d8b4847d901fd4560c6b79973f6c6c82d09c8dd5b67f64f3b65140091b0d997735364a63e611f3f37d WHIRLPOOL 4768847f08f16987c8a506fa5f720a994f0f9f550373295020c72c801692b7998edc70027602a2e1c41f257638a73bc09813115b98b6ee4b583449bb7be78e4a
+DIST amd-driver-installer-catalyst-12.10-x86.x86_64.zip 47828 SHA256 356679212eae39c91a9e6dc22f41e4eb033ef0249aaeb12de34ede6fa1b55d6d SHA512 48d567f2891b522bffec2b3baaf0cd872073ad5bb960a4d8b4847d901fd4560c6b79973f6c6c82d09c8dd5b67f64f3b65140091b0d997735364a63e611f3f37d WHIRLPOOL 4768847f08f16987c8a506fa5f720a994f0f9f550373295020c72c801692b7998edc70027602a2e1c41f257638a73bc09813115b98b6ee4b583449bb7be78e4a
DIST amd-driver-installer-catalyst-13.1-linux-x86.x86_64.zip 114850263 SHA256 67898a922b6b58f25a276a144f16b19014f79c39e4d44d8d2883a467d31e34ad SHA512 30763ab7f47ac22c5b5055495e2d8ae6cc2c8e5ce711fa389f1145a48da2799020c2b8cbf082759d93628017860c39d69337f42ce21b78e1d60c9eda32096df9 WHIRLPOOL ee5dc85a89bc56858ef1c2bcdc6cbfde7e2f9e5675d209c1f6db877e0104cc536f1e18139f0b991a064b14b231a982770eef47368ea281067d62647b4c5365a5
-DIST ati-driver-installer-11-10-x86.x86_64.run 77926379 SHA256 a245e0305051313767fef1be88693702fccfb3f11c18a98f61c233af17e85f9e
-DIST ati-driver-installer-11-11-x86.x86_64.run 97090080 SHA256 fcd51cdc0c7572d443f5ce54576888f09efaced10b12ccf9fa775c81eaade013
-DIST ati-driver-installer-11-12-x86.x86_64.run 99618112 SHA256 0179d1f0425036e50b637e5153b0c64b25836d09e9d22bc50edfbdf6aed32b42
-DIST ati-driver-installer-11-6-x86.x86_64.run 75503458 SHA256 3dbb7cf1a5493588d872eb29b7376eb5db3913c4f35d631c3183d168eed1f67f
-DIST ati-driver-installer-11-8-x86.x86_64.run 75754239 SHA256 71e0194daef7a50c6d0d3b5712b05375a003d452e39c754278336c3811a2acdf
-DIST ati-driver-installer-11-9-x86.x86_64.run 76564617 SHA256 d9ad9c8e0bd250ac41c39d9b8e9f77efc82631f4bebacb82ddde982a86530d56
+DIST ati-driver-installer-11-10-x86.x86_64.run 47828 SHA256 356679212eae39c91a9e6dc22f41e4eb033ef0249aaeb12de34ede6fa1b55d6d SHA512 48d567f2891b522bffec2b3baaf0cd872073ad5bb960a4d8b4847d901fd4560c6b79973f6c6c82d09c8dd5b67f64f3b65140091b0d997735364a63e611f3f37d WHIRLPOOL 4768847f08f16987c8a506fa5f720a994f0f9f550373295020c72c801692b7998edc70027602a2e1c41f257638a73bc09813115b98b6ee4b583449bb7be78e4a
+DIST ati-driver-installer-11-11-x86.x86_64.run 47828 SHA256 356679212eae39c91a9e6dc22f41e4eb033ef0249aaeb12de34ede6fa1b55d6d SHA512 48d567f2891b522bffec2b3baaf0cd872073ad5bb960a4d8b4847d901fd4560c6b79973f6c6c82d09c8dd5b67f64f3b65140091b0d997735364a63e611f3f37d WHIRLPOOL 4768847f08f16987c8a506fa5f720a994f0f9f550373295020c72c801692b7998edc70027602a2e1c41f257638a73bc09813115b98b6ee4b583449bb7be78e4a
+DIST ati-driver-installer-11-12-x86.x86_64.run 47828 SHA256 356679212eae39c91a9e6dc22f41e4eb033ef0249aaeb12de34ede6fa1b55d6d SHA512 48d567f2891b522bffec2b3baaf0cd872073ad5bb960a4d8b4847d901fd4560c6b79973f6c6c82d09c8dd5b67f64f3b65140091b0d997735364a63e611f3f37d WHIRLPOOL 4768847f08f16987c8a506fa5f720a994f0f9f550373295020c72c801692b7998edc70027602a2e1c41f257638a73bc09813115b98b6ee4b583449bb7be78e4a
+DIST ati-driver-installer-11-6-x86.x86_64.run 47828 SHA256 356679212eae39c91a9e6dc22f41e4eb033ef0249aaeb12de34ede6fa1b55d6d SHA512 48d567f2891b522bffec2b3baaf0cd872073ad5bb960a4d8b4847d901fd4560c6b79973f6c6c82d09c8dd5b67f64f3b65140091b0d997735364a63e611f3f37d WHIRLPOOL 4768847f08f16987c8a506fa5f720a994f0f9f550373295020c72c801692b7998edc70027602a2e1c41f257638a73bc09813115b98b6ee4b583449bb7be78e4a
+DIST ati-driver-installer-11-8-x86.x86_64.run 47828 SHA256 356679212eae39c91a9e6dc22f41e4eb033ef0249aaeb12de34ede6fa1b55d6d SHA512 48d567f2891b522bffec2b3baaf0cd872073ad5bb960a4d8b4847d901fd4560c6b79973f6c6c82d09c8dd5b67f64f3b65140091b0d997735364a63e611f3f37d WHIRLPOOL 4768847f08f16987c8a506fa5f720a994f0f9f550373295020c72c801692b7998edc70027602a2e1c41f257638a73bc09813115b98b6ee4b583449bb7be78e4a
+DIST ati-driver-installer-11-9-x86.x86_64.run 47828 SHA256 356679212eae39c91a9e6dc22f41e4eb033ef0249aaeb12de34ede6fa1b55d6d SHA512 48d567f2891b522bffec2b3baaf0cd872073ad5bb960a4d8b4847d901fd4560c6b79973f6c6c82d09c8dd5b67f64f3b65140091b0d997735364a63e611f3f37d WHIRLPOOL 4768847f08f16987c8a506fa5f720a994f0f9f550373295020c72c801692b7998edc70027602a2e1c41f257638a73bc09813115b98b6ee4b583449bb7be78e4a
DIST xvba-sdk-0.74-404001.tar.gz 583847 SHA256 731a2c489f2fb5d7318c1976061b26c1057a696f46d09dcf55fbada97fed17eb SHA512 aa1dd52b59eeeabd026d8b76e3b75eaf02587ef286438ba28884afeef5a5efaf50283b5ee4f5b81b12cf79cb4ec77c9a235a886b29fb7cdf850c9779f4b07b35 WHIRLPOOL 69917b746d353a884512e97b9d9a9b89e6f51add3119e69ddd119d51c0c3f2820b93a449fe42bd76d671dc505f92bf25b7f2c5868b33768fc68a19596e460951
-EBUILD ati-userspace-11.10.ebuild 11808 SHA256 059b1b3e10aaacb0ffe885ba70f5fa02d2545e89d19822b0780e75a1320aaaec SHA512 675a0f714e8e711783a58a985711c79583f818a82a7a6b376c4a95939e11565ec47ca70dcaf5358c6858ea759178a37d09a754afd1022a1295c51a47e750226b WHIRLPOOL 0caeafe4b7713184287f6646ac40b8e87157078e106bc9c86088d411238113511d9235c1a6dd45825391b3b14073fe5fd3f671f37975f3c8ed04545f79ac90a1
-EBUILD ati-userspace-11.11.ebuild 12763 SHA256 037611b73fe20c860bb83583e2ce3a074d01f62b7dc4e76035d8bdbf041cbe47 SHA512 ae16bea39a77a7084d5de78d3a6f39a9cc6717e839c07782e2b7306f0bb6711496413b11094bb31b6c471ae8280ff11bc076cf883d6c3f35ab5763f8bea459c0 WHIRLPOOL 1126de31e5fe44cb74cf753088405fff8c94506f97985702b5d74bad0e61d9367dd982676637b6934c85d76f42ae8c798830f8fb9985c67c1ef9f2728ecdc69f
-EBUILD ati-userspace-11.12.ebuild 12763 SHA256 037611b73fe20c860bb83583e2ce3a074d01f62b7dc4e76035d8bdbf041cbe47 SHA512 ae16bea39a77a7084d5de78d3a6f39a9cc6717e839c07782e2b7306f0bb6711496413b11094bb31b6c471ae8280ff11bc076cf883d6c3f35ab5763f8bea459c0 WHIRLPOOL 1126de31e5fe44cb74cf753088405fff8c94506f97985702b5d74bad0e61d9367dd982676637b6934c85d76f42ae8c798830f8fb9985c67c1ef9f2728ecdc69f
-EBUILD ati-userspace-11.6.ebuild 11866 SHA256 093f6ee56546dc837d73acb6c4e07dfac8f70af81bb914d608e4917f462ad58c SHA512 86bd9e91aa32e091b6633315ad954f3bb277aabd6ebee14b730d426f0121c2315ce51ef9d1ca19f72121f374affa100b237a3f08495a8d6b6d8974287676e43d WHIRLPOOL 2dd3a009805d6aec3c1d7d968457f447b9d8393581a6cd795c5ca7deab565497c92c318be9759ba881763e41865a18ff846b5ef596550c3755074f7a335a18a5
-EBUILD ati-userspace-11.8.ebuild 12248 SHA256 3e31c77d138ae1c1fcee0984f50dfd801816e57945af8a53b134c45da9ba3273 SHA512 3ad402cfb8fcdf243ecf7c2fe3e91a23aaa89dec17a42aef78768efcd7edf570a3cf226ffa8d4e89c670a2428669fb01bb712a090784d14df60c3edc5ea30a45 WHIRLPOOL 2f0f6a1f7c372ebe51c832c9ec04bba8fc08f48e103e949c2fd53b96b880c758289fccfba3fb7348f0419de0642e1c4046642662258b16189e00a3c8e9a0ae22
-EBUILD ati-userspace-11.9.ebuild 12248 SHA256 3e31c77d138ae1c1fcee0984f50dfd801816e57945af8a53b134c45da9ba3273 SHA512 3ad402cfb8fcdf243ecf7c2fe3e91a23aaa89dec17a42aef78768efcd7edf570a3cf226ffa8d4e89c670a2428669fb01bb712a090784d14df60c3edc5ea30a45 WHIRLPOOL 2f0f6a1f7c372ebe51c832c9ec04bba8fc08f48e103e949c2fd53b96b880c758289fccfba3fb7348f0419de0642e1c4046642662258b16189e00a3c8e9a0ae22
-EBUILD ati-userspace-12.1-r1.ebuild 12946 SHA256 cc51e10c26ec57f8399ebf20f39d0c0eaa1fbb34afb5c02d2e1f51835bfbdf43 SHA512 bb73937dd1287c4d359caebf9b1646bacd57e69d539220dc3971a0d7c7525795dc07b1b77eecd363d2e9cb6ba16a1db29f7c7b58f18d272053e5792a6a08f8a6 WHIRLPOOL 724ea9b5e3493aaa820fc4fe9c134e27a3198e05dcd178a92da249d5205c1164a45ba43f2a02c48cc6f4afd29a129ac1f81e6cd3e1c220d0d8770f761092ed3d
-EBUILD ati-userspace-12.10.ebuild 13651 SHA256 77f0538fa3ad51a69c3c1d832a2c97b7057b4cb9440860dd8def788277629cf3 SHA512 8fdc8fee7d86c14e5856a6532858a7ff8f5c6ebaebb77625ae5a4e8e8943b3089232b830eb7ae11b722d79c9ddd309d7e7fbef511293cacfc47e89fd09d508ce WHIRLPOOL d8f583a3c714d158da4c1671b0ece3926d0ead7d4e7073dfcf69a3199ed33d775a162380c7fb1fd8c5ea737598bb74442c328932da6ee683bff015302a82a6a7
-EBUILD ati-userspace-12.2.ebuild 12956 SHA256 2f139619c3b0b5c8fbc96a1d498cd4d397e6cb07f6e8a4947a4f0f53cfe729af SHA512 82f13dba5644cf1902b039a98ba03cd28b6886a115286728490c56f12c7d6612d4404c8e53cea68f4a3ed37f4c213dba97077468a3685cbb3edde00c2e658a4b WHIRLPOOL 22e1583d5471cc3cff01a22ec417df249b790e7b3268b676f6f5a7eb743c4e80b3d67348f79fd7b98a8813b348667ad1dd7aba226a0d401457ec738ca72104d4
-EBUILD ati-userspace-12.3.ebuild 13069 SHA256 2a4b17bd81ae4a92e07a8194230157c05f016fb9bbc4ef971b4c6a0724356f08 SHA512 8ca699d5a0fc202324758419ddd20cd6c7cdfe201b3ff440781ec6d7687057ab582779fd0626e194f6ba2d6ba412b197092bb98d4189a54739486a8c1fdda42f WHIRLPOOL 8ea5c455498fa15538f30840b51cc4fefa8df4fa27c4c5144088448a56c35f2834970244431638dd0a390bf291f70692cbc3a74ea435fecd5afbec7eaca00250
-EBUILD ati-userspace-12.4.ebuild 13069 SHA256 2a4b17bd81ae4a92e07a8194230157c05f016fb9bbc4ef971b4c6a0724356f08 SHA512 8ca699d5a0fc202324758419ddd20cd6c7cdfe201b3ff440781ec6d7687057ab582779fd0626e194f6ba2d6ba412b197092bb98d4189a54739486a8c1fdda42f WHIRLPOOL 8ea5c455498fa15538f30840b51cc4fefa8df4fa27c4c5144088448a56c35f2834970244431638dd0a390bf291f70692cbc3a74ea435fecd5afbec7eaca00250
-EBUILD ati-userspace-12.6.ebuild 13587 SHA256 1597a0dff6118a2c843612064c10a094fd3fd8fec54cac3965e48cc4b398ac94 SHA512 e8bd9e520eaccac0ed9033f7f43263efde627ebc56d567f9a7c83b615231b2b3bc949ce1bc0511c8fc41b4322ac17d864e47ae1ac176a2b0c2935f2d4cdababf WHIRLPOOL f79371d4d4d515ff32455858513cedbd7bd164e15bf82a1c27732808410ecae0599d8b70cf0d0115984958c74fea4c149fd804e69032eefc8a7346f5cc946e9f
-EBUILD ati-userspace-12.6_beta_pre897.ebuild 13630 SHA256 f9785fcebeeba1d4c9cc5efcd033267d86488cafe9c52d3f2dbf85d30fc8863f SHA512 6c69e081d93484c5e97590976e815f1f589c34095f2c2fc9268a75ae23dc7c8c6476c52af04ecaf64668bbc99055095f58d4741c59a6a8d41d3eeff16807b48a WHIRLPOOL cc7622637493300f61b6d648cc1fe502b9fcf78d9a50b5547a45aeeabeb07bffcd323139de237cce9079a4f4b34c5940cd0a0a4ada1b987db28c61932a2b2c2a
-EBUILD ati-userspace-12.8.ebuild 13535 SHA256 e9b7219aa54947e7def64a4a6ecb92d75ac6d3d8c0f2c96fb77ff7f2b35a2072 SHA512 95750fa9c5005c209f1489c99c6dfcdbf87decd4ba075822f6006dde29f27d8c473f7dd2ea3f92a7584142e2c9492fbd02471bf7d939322eff1f6b1e87a2f109 WHIRLPOOL 8e2b08f65c0d0e78c9b661b98eeb212ed9f0ab2cd501890bba2dc55362392a209f76f280761bd08e5d2d98572dd5753987737497cbe33a7d657c5bf45bcccfeb
-EBUILD ati-userspace-13.1.ebuild 15655 SHA256 8e3258c7d020ae22444159176076be1efb7f0719b53d1ffa188e38e0255862d7 SHA512 3057cb158f5268f0b1e60e4237519762de9d6d1ee682d73c0ba9d2e63196f6fc3633accff84c8384a078395a3571a0cfb7c31611308f838e366b9fc7dc8e80ee WHIRLPOOL 84be01a881793efe7a9376895a8dbc748233db99c89811bcbf6d33a4131a9c8b3dfaaa96a9d08340ac5f47cc114794491e1bda9e0af06101da6b9e33347c988d
-EBUILD ati-userspace-13.4.ebuild 15983 SHA256 59682a2bf9df19da0ea6d7a41706f501ec50afa7433bcfb61009f612692020dd SHA512 e3e2d18c8bdeec66cdfc307ce506d7bed51e676ab00a4eec5c098ac384e2c25bfb74ac9f9d15bcb8a3992643d0089b664c407d9f11e0ed7756078dd00d0d6219 WHIRLPOOL 1d7fa1cf20ff6e6264a83f438cdc5fed4ce1983f3785ca2d714ba97a22cc80df6158b500b6e9b8114c9a966a2e9e2b659ead4e8c43abb5cac3b46f92105dc8db
diff --git a/x11-drivers/ati-userspace/ati-userspace-13.12.ebuild b/x11-drivers/ati-userspace/ati-userspace-13.12.ebuild
new file mode 100644
index 00000000..e469d09d
--- /dev/null
+++ b/x11-drivers/ati-userspace/ati-userspace-13.12.ebuild
@@ -0,0 +1,501 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=5
+
+inherit eutils multilib toolchain-funcs versionator pax-utils
+
+DESCRIPTION="Ati precompiled drivers for Radeon Evergreen (HD5000 Series) and newer chipsets"
+HOMEPAGE="http://www.amd.com"
+#RUN="${WORKDIR}/amd-catalyst-13.11-beta1-linux-x86.x86_64.run"
+SLOT="1"
+# Uses javascript for download YESSSS
+#DRIVERS_URI="http://www2.ati.com/drivers/linux/amd-catalyst-13.12-linux-x86.x86_64.zip"
+DRIVERS_URI="http://dev.gentooexperimental.org/~scarabeus/amd-catalyst-13.12-linux-x86.x86_64.zip"
+XVBA_SDK_URI="http://developer.amd.com/wordpress/media/2012/10/xvba-sdk-0.74-404001.tar.gz"
+SRC_URI="${DRIVERS_URI} ${XVBA_SDK_URI}"
+FOLDER_PREFIX="common/"
+IUSE="debug multilib x-multilib static-libs +disable-watermark pax_kernel"
+
+LICENSE="AMD GPL-2 QPL-1.0"
+KEYWORDS="-* ~amd64 ~x86"
+RESTRICT="bindist test"
+
+# Note: do not add !>ati-userspace-ver or !<ati-userspace-ver
+# because it would cause pkg_postrm to set the wrong opengl implementation
+RDEPEND="<=x11-base/xorg-server-1.14.49[-minimal]
+ !x11-drivers/ati-drivers:0
+ !x11-apps/ati-drivers-extra
+ >=app-admin/eselect-opengl-1.0.7
+ app-admin/eselect-opencl
+ sys-power/acpid
+ x11-apps/xauth
+ x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXinerama
+ x11-libs/libXrandr
+ x11-libs/libXrender
+ x-multilib? (
+ app-emulation/emul-linux-x86-opengl
+ app-emulation/emul-linux-x86-xlibs
+ )"
+
+DEPEND="${RDEPEND}
+ x11-proto/inputproto
+ x11-proto/xf86miscproto
+ x11-proto/xf86vidmodeproto
+ x11-proto/xineramaproto
+ x11-libs/libXtst
+ sys-apps/findutils
+ app-misc/pax-utils
+ app-arch/unzip
+"
+
+EMULTILIB_PKG="true"
+
+S="${WORKDIR}"
+
+# QA Silencing
+QA_TEXTRELS="
+ usr/lib*/opengl/ati/lib/libGL.so.1.2
+ usr/lib*/libatiadlxx.so
+ usr/lib*/xorg/modules/glesx.so
+ usr/lib*/libaticaldd.so
+ usr/lib*/dri/fglrx_dri.so
+"
+
+QA_EXECSTACK="
+ opt/bin/atiode
+ opt/bin/amdcccle
+ usr/lib*/opengl/ati/lib/libGL.so.1.2
+ usr/lib*/dri/fglrx_dri.so
+"
+
+QA_WX_LOAD="
+ usr/lib*/opengl/ati/lib/libGL.so.1.2
+ usr/lib*/dri/fglrx_dri.so
+"
+
+QA_PRESTRIPPED="
+ usr/lib\(32\|64\)\?/libXvBAW.so.1.0
+ usr/lib\(32\|64\)\?/opengl/ati/lib/libGL.so.1.2
+ usr/lib\(32\|64\)\?/opengl/ati/extensions/libglx.so
+ usr/lib\(32\|64\)\?/xorg/modules/glesx.so
+ usr/lib\(32\|64\)\?/libAMDXvBA.so.1.0
+ usr/lib\(32\|64\)\?/libaticaldd.so
+ usr/lib\(32\|64\)\?/dri/fglrx_dri.so
+"
+
+QA_SONAME="
+ usr/lib\(32\|64\)\?/libatiadlxx.so
+ usr/lib\(32\|64\)\?/libaticalcl.so
+ usr/lib\(32\|64\)\?/libaticaldd.so
+ usr/lib\(32\|64\)\?/libaticalrt.so
+ usr/lib\(32\|64\)\?/libamdocl\(32\|64\)\?.so
+"
+
+QA_DT_HASH="
+ opt/bin/amdcccle
+ opt/bin/aticonfig
+ opt/bin/atiodcli
+ opt/bin/atiode
+ opt/bin/clinfo
+ opt/bin/fglrxinfo
+ opt/sbin/atieventsd
+ opt/sbin/amdnotifyui
+ usr/lib\(32\|64\)\?/libaticalcl.so
+ usr/lib\(32\|64\)\?/libaticalrt.so
+ usr/lib\(32\|64\)\?/libatiuki.so.1.0
+ usr/lib\(32\|64\)\?/libatiadlxx.so
+ usr/lib\(32\|64\)\?/libfglrx_dm.so.1.0
+ usr/lib\(32\|64\)\?/libXvBAW.so.1.0
+ usr/lib\(32\|64\)\?/libAMDXvBA.so.1.0
+ usr/lib\(32\|64\)\?/xorg/modules/amdxmm.so
+ usr/lib\(32\|64\)\?/xorg/modules/glesx.so
+ usr/lib\(32\|64\)\?/xorg/modules/linux/libfglrxdrm.so
+ usr/lib\(32\|64\)\?/xorg/modules/drivers/fglrx_drv.so
+ usr/lib\(32\|64\)\?/libaticaldd.so
+ usr/lib\(32\|64\)\?/dri/fglrx_dri.so
+ usr/lib\(32\|64\)\?/opengl/ati/extensions/libglx.so
+ usr/lib\(32\|64\)\?/opengl/ati/extensions/fglrx-libglx.so
+ usr/lib\(32\|64\)\?/opengl/ati/lib/fglrx-libGL.so.1.2
+ usr/lib\(32\|64\)\?/opengl/ati/lib/libGL.so.1.2
+ usr/lib\(32\|64\)\?/OpenCL/vendors/amd/libamdocl\(32\|64\)\?.so
+ usr/lib\(32\|64\)\?/OpenCL/vendors/amd/libOpenCL.so.1
+"
+
+pkg_setup() {
+ # get the xorg-server version and set BASE_DIR for that
+ BASE_DIR="${S}/xpic"
+
+ # amd64/x86
+ if use amd64 ; then
+ MY_BASE_DIR="${BASE_DIR}_64a"
+ PKG_LIBDIR=lib64
+ ARCH_DIR="${S}/arch/x86_64"
+ else
+ MY_BASE_DIR="${BASE_DIR}"
+ PKG_LIBDIR=lib
+ ARCH_DIR="${S}/arch/x86"
+ fi
+
+ elog
+ elog "Please note that this driver only supports graphic cards based on"
+ elog "Evergreen chipset and newer."
+ elog "This includes the AMD Radeon HD 5400+ series at this moment."
+ elog
+ elog "If your card is older then use ${CATEGORY}/xf86-video-ati"
+ elog "For migration information please refer to:"
+ elog "http://www.gentoo.org/proj/en/desktop/x/x11/ati-migration-guide.xml"
+ einfo
+}
+
+src_unpack() {
+ local DRIVERS_DISTFILE XVBA_SDK_DISTFILE
+ DRIVERS_DISTFILE=${DRIVERS_URI##*/}
+ XVBA_SDK_DISTFILE=${XVBA_SDK_URI##*/}
+
+ if [[ ${DRIVERS_DISTFILE} =~ .*\.tar\.gz ]]; then
+ unpack ${DRIVERS_DISTFILE}
+ else
+ #please note, RUN may be insanely assigned at top near SRC_URI
+ if [[ ${DRIVERS_DISTFILE} =~ .*\.zip ]]; then
+ unpack ${DRIVERS_DISTFILE}
+ [[ -z "$RUN" ]] && RUN="${S}/${DRIVERS_DISTFILE/%.zip/.run}"
+ else
+ RUN="${DISTDIR}/${DRIVERS_DISTFILE}"
+ fi
+ sh "${RUN}" --extract "${S}" 2>&1 > /dev/null || die
+ fi
+
+ mkdir xvba_sdk
+ cd xvba_sdk
+ unpack ${XVBA_SDK_DISTFILE}
+}
+
+src_prepare() {
+ # These are the userspace utilities that we also have source for.
+ # We rebuild these later.
+ rm \
+ "${ARCH_DIR}"/usr/X11R6/bin/fgl_glxgears \
+ || die "bin rm failed"
+
+ # amdcccle is shipped separately
+ rm "${ARCH_DIR}"/usr/X11R6/bin/amdcccle || die "cannot rm amdcccle"
+
+ # ACPI fixups
+ sed -i \
+ -e "s:/var/lib/xdm/authdir/authfiles/:/var/run/xauth/:" \
+ -e "s:/var/lib/gdm/:/var/gdm/:" \
+ "${S}/${FOLDER_PREFIX}etc/ati/authatieventsd.sh" \
+ || die "sed failed."
+
+ # Since "who" is in coreutils, we're using that one instead of "finger".
+ sed -i -e 's:finger:who:' \
+ "${S}/${FOLDER_PREFIX}usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh" \
+ || die "Replacing 'finger' with 'who' failed."
+ # Adjust paths in the script from /usr/X11R6/bin/ to /opt/bin/ and
+ # add function to detect default state.
+ epatch "${FILESDIR}"/ati-powermode-opt-path-3.patch
+
+ # see http://ati.cchtml.com/show_bug.cgi?id=495
+ #epatch "${FILESDIR}"/ati-drivers-old_rsp.patch
+ # first hunk applied upstream second (x32 related) was not
+ epatch "${FILESDIR}"/ati-drivers-x32_something_something.patch
+
+ # compile fix for AGP-less kernel, bug #435322
+ epatch "${FILESDIR}"/ati-drivers-12.9-KCL_AGP_FindCapsRegisters-stub.patch
+
+ # Compile fix for kernel typesafe uid types #469160
+ epatch "${FILESDIR}/typesafe-kuid.diff"
+
+ epatch "${FILESDIR}/ati-drivers-13.8-beta-include-seq_file.patch"
+
+ epatch "${FILESDIR}/check-for-iommu-only-if-iommu-is-supported.patch"
+
+ # Mesa 9.2 compatibility. This is a hack, has_version shouldn't be
+ # used this way. But it seems to work because only fgl_glxinfo is
+ # affected
+ if has_version ">=media-libs/mesa-9.2"; then
+ epatch "${FILESDIR}/ati-drivers-13.8-mesa-9.2-debug.patch"
+ fi
+
+ # Fix build on new kernels
+ epatch "${FILESDIR}/ati-drivers-13.12-acpi.patch"
+
+ # Compile fix, https://bugs.gentoo.org/show_bug.cgi?id=454870
+ use pax_kernel && epatch "${FILESDIR}/const-notifier-block.patch"
+
+ cd "${S}"
+ mkdir extra || die "mkdir extra failed"
+ cd extra
+ unpack ./../${FOLDER_PREFIX}usr/src/ati/fglrx_sample_source.tgz
+
+ # Get rid of watermark. Oldest known reference:
+ # http://phoronix.com/forums/showthread.php?19875-Unsupported-Hardware-watermark
+ if use disable-watermark; then
+ ebegin "Disabling watermark"
+ driver="${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/drivers/fglrx_drv.so
+ for x in $(objdump -d ${driver}|awk '/call/&&/EnableLogo/{print "\\x"$2"\\x"$3"\\x"$4"\\x"$5"\\x"$6}'); do
+ sed -i "s/${x/x5b/\x5b}/\x90\x90\x90\x90\x90/g" ${driver} || break 1
+ done
+ eend $? || die "Disabling watermark failed"
+ fi
+}
+
+src_compile() {
+ ebegin "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_glxgears ${CFLAGS} ${LDFLAGS} -DUSE_GLU \
+ -I"${S}"/${FOLDER_PREFIX}usr/include fgl_glxgears.c \
+ -lGL -lGLU -lX11 -lm || die "fgl_glxgears build failed"
+ eend $?
+}
+
+src_test() { :; } # no tests present
+
+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" || die
+
+ # 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 && use multilib; 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 "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/drivers/fglrx_drv.so
+ exeinto /usr/$(get_libdir)/xorg/modules/linux
+ doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/linux/libfglrxdrm.so
+ exeinto /usr/$(get_libdir)/xorg/modules
+ doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/{glesx.so,amdxmm.so}
+
+ # Arch-specific files.
+ # (s)bin.
+ into /opt
+ dosbin "${ARCH_DIR}"/usr/sbin/atieventsd
+ dobin "${ARCH_DIR}"/usr/bin/clinfo
+ # We cleaned out the compilable stuff in src_unpack
+ dobin "${ARCH_DIR}"/usr/X11R6/bin/*
+
+ # Common files.
+ # etc.
+ insinto /etc/ati
+ exeinto /etc/ati
+ # Everything except for the authatieventsd.sh script.
+ doins ${FOLDER_PREFIX}etc/ati/{logo*,control,atiogl.xml,signature,amdpcsdb.default}
+ doexe ${FOLDER_PREFIX}etc/ati/authatieventsd.sh
+
+ # include.
+ insinto /usr
+ doins -r ${FOLDER_PREFIX}usr/include
+ insinto /usr/include/X11/extensions
+
+ # Just the atigetsysteminfo.sh script.
+ into /usr
+ dosbin ${FOLDER_PREFIX}usr/sbin/*
+
+ # doc.
+ dohtml -r ${FOLDER_PREFIX}usr/share/doc/fglrx
+
+ doman ${FOLDER_PREFIX}usr/share/man/man8/atieventsd.8
+
+ pushd ${FOLDER_PREFIX}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
+
+ # Done with the "source" tree. Install tools we rebuilt:
+ dobin extra/fgl_glxgears/fgl_glxgears
+ newdoc extra/fgl_glxgears/README README.fgl_glxgears
+
+ # Gentoo-specific stuff:
+ newinitd "${FILESDIR}"/atieventsd.init atieventsd
+ echo 'ATIEVENTSDOPTS=""' > "${T}"/atieventsd.conf
+ newconfd "${T}"/atieventsd.conf atieventsd
+
+ # PowerXpress stuff
+ exeinto /usr/$(get_libdir)/fglrx
+ doexe "${FILESDIR}"/switchlibGL || die "doexe switchlibGL failed"
+ cp "${FILESDIR}"/switchlibGL "${T}"/switchlibglx
+ doexe "${T}"/switchlibglx || die "doexe switchlibglx failed"
+}
+
+src_install-libs() {
+ if [[ "${ABI}" == "amd64" ]]; then
+ local EX_BASE_DIR="${BASE_DIR}_64a"
+ local pkglibdir=lib64
+ local MY_ARCH_DIR="${S}/arch/x86_64"
+ local oclsuffix=64
+ else
+ local EX_BASE_DIR="${BASE_DIR}"
+ local pkglibdir=lib
+ local MY_ARCH_DIR="${S}/arch/x86"
+ local oclsuffix=32
+ 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
+ newexe "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir}/fglrx/fglrx-libGL.so.${libver} \
+ libGL.so.${libver}
+ dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so.${libmajor}
+ dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so
+
+ exeinto ${ATI_ROOT}/extensions
+ doexe "${EX_BASE_DIR}"/usr/X11R6/${pkglibdir}/modules/extensions/fglrx/fglrx-libglx.so
+ mv "${D}"/${ATI_ROOT}/extensions/{fglrx-,}libglx.so
+
+ # other libs
+ exeinto /usr/$(get_libdir)
+ # Everything except for the libGL.so installed some row above
+ doexe $(find "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir} \
+ -maxdepth 1 -type f -name '*.so*' -not -name '*libGL.so*')
+ insinto /usr/$(get_libdir)
+ doins $(find "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir} \
+ -maxdepth 1 -type f -not -name '*.so*')
+
+ # DRI modules, installed into the path used by recent versions of mesa.
+ exeinto /usr/$(get_libdir)/dri
+ doexe "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir}/modules/dri/fglrx_dri.so
+
+ # AMD Cal and OpenCL libraries
+ exeinto /usr/$(get_libdir)/OpenCL/vendors/amd
+ doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libamdocl*.so*
+ doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libOpenCL*.so*
+ dosym libOpenCL.so.${libmajor} /usr/$(get_libdir)/OpenCL/vendors/amd/libOpenCL.so
+ exeinto /usr/$(get_libdir)
+ doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libati*.so*
+
+ # OpenCL vendor files
+ insinto /etc/OpenCL/vendors/
+ cat > "${T}"/amdocl${oclsuffix}.icd <<-EOF
+ /usr/$(get_libdir)/OpenCL/vendors/amd/libamdocl${oclsuffix}.so
+ EOF
+ doins "${T}"/amdocl${oclsuffix}.icd
+
+ 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}"
+
+ # Silence the QA notice by creating missing soname symlinks
+ for so in $(find "${D}"/usr/$(get_libdir) -maxdepth 1 -name *.so.[0-9].[0-9])
+ do
+ local soname=${so##*/}
+ local soname_one=${soname%.[0-9]}
+ local soname_zero=${soname_one%.[0-9]}
+ dosym ${soname} /usr/$(get_libdir)/${soname_one}
+ dosym ${soname_one} /usr/$(get_libdir)/${soname_zero}
+ done
+
+ # See https://bugs.gentoo.org/show_bug.cgi?id=443466
+ dodir /etc/revdep-rebuild/
+ echo "SEARCH_DIRS_MASK=\"/opt/bin/clinfo\"" > "${ED}/etc/revdep-rebuild/62-ati-drivers"
+
+ #remove static libs if not wanted
+ use static-libs || rm -rf "${D}"/usr/$(get_libdir)/libfglrx_dm.a
+
+ #install xvba sdk headers
+ doheader xvba_sdk/include/amdxvba.h
+
+ if use pax_kernel; then
+ pax-mark m "${D}"/usr/lib*/opengl/ati/lib/libGL.so.1.2 || die "pax-mark failed"
+ fi
+}
+
+pkg_postinst() {
+ elog "To switch to AMD 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
+ elog "Fully rebooting the system after an ${PN} update is recommended"
+ elog "Stopping Xorg, reloading fglrx kernel module and restart Xorg"
+ elog "might not work"
+ elog
+ elog "Some cards need acpid running to handle events"
+ elog "Please add it to boot runlevel with rc-update add acpid boot"
+ elog
+
+ "${ROOT}"/usr/bin/eselect opengl set --use-old ati
+ "${ROOT}"/usr/bin/eselect opencl set --use-old amd
+
+ if has_version "x11-drivers/xf86-video-intel[sna]"; then
+ ewarn "It is reported that xf86-video-intel built with USE=\"sna\" causes the X server"
+ ewarn "to crash on systems that use hybrid AMD/Intel graphics. If you experience"
+ ewarn "this crash, downgrade to xf86-video-intel-2.20.2 or earlier or"
+ ewarn "try disabling sna for xf86-video-intel."
+ ewarn "For details, see https://bugs.gentoo.org/show_bug.cgi?id=430000"
+ fi
+}
+
+pkg_prerm() {
+ "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11
+}
+
+pkg_postrm() {
+ "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11
+}
diff --git a/x11-drivers/ati-userspace/ati-userspace-13.9.ebuild b/x11-drivers/ati-userspace/ati-userspace-13.9.ebuild
new file mode 100644
index 00000000..bc8229dc
--- /dev/null
+++ b/x11-drivers/ati-userspace/ati-userspace-13.9.ebuild
@@ -0,0 +1,494 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=5
+
+inherit eutils multilib toolchain-funcs versionator pax-utils
+
+DESCRIPTION="Ati precompiled drivers for Radeon Evergreen (HD5000 Series) and newer chipsets"
+HOMEPAGE="http://www.amd.com"
+#RUN="${WORKDIR}/amd-driver-installer-9.00-x86.x86_64.run"
+SLOT="1"
+DRIVERS_URI="https://www2.ati.com/drivers/linux/amd-catalyst-13.9-linux-x86.x86_64.zip"
+XVBA_SDK_URI="http://developer.amd.com/wordpress/media/2012/10/xvba-sdk-0.74-404001.tar.gz"
+SRC_URI="${DRIVERS_URI} ${XVBA_SDK_URI}"
+FOLDER_PREFIX="common/"
+IUSE="debug multilib x-multilib static-libs +disable-watermark pax_kernel"
+
+LICENSE="AMD GPL-2 QPL-1.0"
+KEYWORDS="-* ~amd64 ~x86"
+RESTRICT="bindist test"
+
+# Note: do not add !>ati-userspace-ver or !<ati-userspace-ver
+# because it would cause pkg_postrm to set the wrong opengl implementation
+RDEPEND="<=x11-base/xorg-server-1.14.49[-minimal]
+ !x11-drivers/ati-drivers:0
+ !x11-apps/ati-drivers-extra
+ >=app-admin/eselect-opengl-1.0.7
+ app-admin/eselect-opencl
+ sys-power/acpid
+ x11-apps/xauth
+ x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXinerama
+ x11-libs/libXrandr
+ x11-libs/libXrender
+ x-multilib? (
+ app-emulation/emul-linux-x86-opengl
+ app-emulation/emul-linux-x86-xlibs
+ )"
+
+DEPEND="${RDEPEND}
+ x11-proto/inputproto
+ x11-proto/xf86miscproto
+ x11-proto/xf86vidmodeproto
+ x11-proto/xineramaproto
+ x11-libs/libXtst
+ sys-apps/findutils
+ app-misc/pax-utils
+ app-arch/unzip
+"
+
+EMULTILIB_PKG="true"
+
+S="${WORKDIR}"
+
+# QA Silencing
+QA_TEXTRELS="
+ usr/lib*/opengl/ati/lib/libGL.so.1.2
+ usr/lib*/libatiadlxx.so
+ usr/lib*/xorg/modules/glesx.so
+ usr/lib*/libaticaldd.so
+ usr/lib*/dri/fglrx_dri.so
+"
+
+QA_EXECSTACK="
+ opt/bin/atiode
+ opt/bin/amdcccle
+ usr/lib*/opengl/ati/lib/libGL.so.1.2
+ usr/lib*/dri/fglrx_dri.so
+"
+
+QA_WX_LOAD="
+ usr/lib*/opengl/ati/lib/libGL.so.1.2
+ usr/lib*/dri/fglrx_dri.so
+"
+
+QA_PRESTRIPPED="
+ usr/lib\(32\|64\)\?/libXvBAW.so.1.0
+ usr/lib\(32\|64\)\?/opengl/ati/lib/libGL.so.1.2
+ usr/lib\(32\|64\)\?/opengl/ati/extensions/libglx.so
+ usr/lib\(32\|64\)\?/xorg/modules/glesx.so
+ usr/lib\(32\|64\)\?/libAMDXvBA.so.1.0
+ usr/lib\(32\|64\)\?/libaticaldd.so
+ usr/lib\(32\|64\)\?/dri/fglrx_dri.so
+"
+
+QA_SONAME="
+ usr/lib\(32\|64\)\?/libatiadlxx.so
+ usr/lib\(32\|64\)\?/libaticalcl.so
+ usr/lib\(32\|64\)\?/libaticaldd.so
+ usr/lib\(32\|64\)\?/libaticalrt.so
+ usr/lib\(32\|64\)\?/libamdocl\(32\|64\)\?.so
+"
+
+QA_DT_HASH="
+ opt/bin/amdcccle
+ opt/bin/aticonfig
+ opt/bin/atiodcli
+ opt/bin/atiode
+ opt/bin/clinfo
+ opt/bin/fglrxinfo
+ opt/sbin/atieventsd
+ opt/sbin/amdnotifyui
+ usr/lib\(32\|64\)\?/libaticalcl.so
+ usr/lib\(32\|64\)\?/libaticalrt.so
+ usr/lib\(32\|64\)\?/libatiuki.so.1.0
+ usr/lib\(32\|64\)\?/libatiadlxx.so
+ usr/lib\(32\|64\)\?/libfglrx_dm.so.1.0
+ usr/lib\(32\|64\)\?/libXvBAW.so.1.0
+ usr/lib\(32\|64\)\?/libAMDXvBA.so.1.0
+ usr/lib\(32\|64\)\?/xorg/modules/amdxmm.so
+ usr/lib\(32\|64\)\?/xorg/modules/glesx.so
+ usr/lib\(32\|64\)\?/xorg/modules/linux/libfglrxdrm.so
+ usr/lib\(32\|64\)\?/xorg/modules/drivers/fglrx_drv.so
+ usr/lib\(32\|64\)\?/libaticaldd.so
+ usr/lib\(32\|64\)\?/dri/fglrx_dri.so
+ usr/lib\(32\|64\)\?/opengl/ati/extensions/libglx.so
+ usr/lib\(32\|64\)\?/opengl/ati/extensions/fglrx-libglx.so
+ usr/lib\(32\|64\)\?/opengl/ati/lib/fglrx-libGL.so.1.2
+ usr/lib\(32\|64\)\?/opengl/ati/lib/libGL.so.1.2
+ usr/lib\(32\|64\)\?/OpenCL/vendors/amd/libamdocl\(32\|64\)\?.so
+ usr/lib\(32\|64\)\?/OpenCL/vendors/amd/libOpenCL.so.1
+"
+
+pkg_setup() {
+ # get the xorg-server version and set BASE_DIR for that
+ BASE_DIR="${S}/xpic"
+
+ # amd64/x86
+ if use amd64 ; then
+ MY_BASE_DIR="${BASE_DIR}_64a"
+ PKG_LIBDIR=lib64
+ ARCH_DIR="${S}/arch/x86_64"
+ else
+ MY_BASE_DIR="${BASE_DIR}"
+ PKG_LIBDIR=lib
+ ARCH_DIR="${S}/arch/x86"
+ fi
+
+ elog
+ elog "Please note that this driver only supports graphic cards based on"
+ elog "Evergreen chipset and newer."
+ elog "This includes the AMD Radeon HD 5400+ series at this moment."
+ elog
+ elog "If your card is older then use ${CATEGORY}/xf86-video-ati"
+ elog "For migration information please refer to:"
+ elog "http://www.gentoo.org/proj/en/desktop/x/x11/ati-migration-guide.xml"
+ einfo
+}
+
+src_unpack() {
+ local DRIVERS_DISTFILE XVBA_SDK_DISTFILE
+ DRIVERS_DISTFILE=${DRIVERS_URI##*/}
+ XVBA_SDK_DISTFILE=${XVBA_SDK_URI##*/}
+
+ if [[ ${DRIVERS_DISTFILE} =~ .*\.tar\.gz ]]; then
+ unpack ${DRIVERS_DISTFILE}
+ else
+ #please note, RUN may be insanely assigned at top near SRC_URI
+ if [[ ${DRIVERS_DISTFILE} =~ .*\.zip ]]; then
+ unpack ${DRIVERS_DISTFILE}
+ [[ -z "$RUN" ]] && RUN="${S}/${DRIVERS_DISTFILE/%.zip/.run}"
+ else
+ RUN="${DISTDIR}/${DRIVERS_DISTFILE}"
+ fi
+ sh ${RUN} --extract "${S}" 2>&1 > /dev/null || die
+ fi
+
+ mkdir xvba_sdk
+ cd xvba_sdk
+ unpack ${XVBA_SDK_DISTFILE}
+}
+
+src_prepare() {
+ # These are the userspace utilities that we also have source for.
+ # We rebuild these later.
+ rm \
+ "${ARCH_DIR}"/usr/X11R6/bin/fgl_glxgears \
+ || die "bin rm failed"
+
+ # amdcccle is shipped separately
+ rm "${ARCH_DIR}"/usr/X11R6/bin/amdcccle || die "cannot rm amdcccle"
+
+ # ACPI fixups
+ sed -i \
+ -e "s:/var/lib/xdm/authdir/authfiles/:/var/run/xauth/:" \
+ -e "s:/var/lib/gdm/:/var/gdm/:" \
+ "${S}/${FOLDER_PREFIX}etc/ati/authatieventsd.sh" \
+ || die "sed failed."
+
+ # Since "who" is in coreutils, we're using that one instead of "finger".
+ sed -i -e 's:finger:who:' \
+ "${S}/${FOLDER_PREFIX}usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh" \
+ || die "Replacing 'finger' with 'who' failed."
+ # Adjust paths in the script from /usr/X11R6/bin/ to /opt/bin/ and
+ # add function to detect default state.
+ epatch "${FILESDIR}"/ati-powermode-opt-path-3.patch
+
+ # see http://ati.cchtml.com/show_bug.cgi?id=495
+ #epatch "${FILESDIR}"/ati-drivers-old_rsp.patch
+ # first hunk applied upstream second (x32 related) was not
+ epatch "${FILESDIR}"/ati-drivers-x32_something_something.patch
+
+ # compile fix for AGP-less kernel, bug #435322
+ epatch "${FILESDIR}"/ati-drivers-12.9-KCL_AGP_FindCapsRegisters-stub.patch
+
+ # Compile fix for kernel typesafe uid types #469160
+ epatch "${FILESDIR}/typesafe-kuid.diff"
+
+ epatch "${FILESDIR}/ati-drivers-13.6-linux-3.10-proc.diff"
+
+ # Mesa 9.2 compatibility. This is a hack, has_version shouldn't be
+ # used this way. But it seems to work because only fgl_glxinfo is
+ # affected
+ if has_version ">=media-libs/mesa-9.2"; then
+ epatch "${FILESDIR}/ati-drivers-13.8-mesa-9.2-debug.patch"
+ fi
+
+ # Compile fix, https://bugs.gentoo.org/show_bug.cgi?id=454870
+ use pax_kernel && epatch "${FILESDIR}/const-notifier-block.patch"
+
+ cd "${S}"
+ mkdir extra || die "mkdir extra failed"
+ cd extra
+ unpack ./../${FOLDER_PREFIX}usr/src/ati/fglrx_sample_source.tgz
+
+ # Get rid of watermark. Oldest known reference:
+ # http://phoronix.com/forums/showthread.php?19875-Unsupported-Hardware-watermark
+ if use disable-watermark; then
+ ebegin "Disabling watermark"
+ driver="${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/drivers/fglrx_drv.so
+ for x in $(objdump -d ${driver}|awk '/call/&&/EnableLogo/{print "\\x"$2"\\x"$3"\\x"$4"\\x"$5"\\x"$6}'); do
+ sed -i "s/${x/x5b/\x5b}/\x90\x90\x90\x90\x90/g" ${driver} || break 1
+ done
+ eend $? || die "Disabling watermark failed"
+ fi
+}
+
+src_compile() {
+ ebegin "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_glxgears ${CFLAGS} ${LDFLAGS} -DUSE_GLU \
+ -I"${S}"/${FOLDER_PREFIX}usr/include fgl_glxgears.c \
+ -lGL -lGLU -lX11 -lm || die "fgl_glxgears build failed"
+ eend $?
+}
+
+src_test() { :; } # no tests present
+
+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" || die
+
+ # 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 && use multilib; 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 "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/drivers/fglrx_drv.so
+ exeinto /usr/$(get_libdir)/xorg/modules/linux
+ doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/linux/libfglrxdrm.so
+ exeinto /usr/$(get_libdir)/xorg/modules
+ doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/{glesx.so,amdxmm.so}
+
+ # Arch-specific files.
+ # (s)bin.
+ into /opt
+ dosbin "${ARCH_DIR}"/usr/sbin/atieventsd
+ dobin "${ARCH_DIR}"/usr/bin/clinfo
+ # We cleaned out the compilable stuff in src_unpack
+ dobin "${ARCH_DIR}"/usr/X11R6/bin/*
+
+ # Common files.
+ # etc.
+ insinto /etc/ati
+ exeinto /etc/ati
+ # Everything except for the authatieventsd.sh script.
+ doins ${FOLDER_PREFIX}etc/ati/{logo*,control,atiogl.xml,signature,amdpcsdb.default}
+ doexe ${FOLDER_PREFIX}etc/ati/authatieventsd.sh
+
+ # include.
+ insinto /usr
+ doins -r ${FOLDER_PREFIX}usr/include
+ insinto /usr/include/X11/extensions
+
+ # Just the atigetsysteminfo.sh script.
+ into /usr
+ dosbin ${FOLDER_PREFIX}usr/sbin/*
+
+ # doc.
+ dohtml -r ${FOLDER_PREFIX}usr/share/doc/fglrx
+
+ doman ${FOLDER_PREFIX}usr/share/man/man8/atieventsd.8
+
+ pushd ${FOLDER_PREFIX}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
+
+ # Done with the "source" tree. Install tools we rebuilt:
+ dobin extra/fgl_glxgears/fgl_glxgears
+ newdoc extra/fgl_glxgears/README README.fgl_glxgears
+
+ # Gentoo-specific stuff:
+ newinitd "${FILESDIR}"/atieventsd.init atieventsd
+ echo 'ATIEVENTSDOPTS=""' > "${T}"/atieventsd.conf
+ newconfd "${T}"/atieventsd.conf atieventsd
+
+ # PowerXpress stuff
+ exeinto /usr/$(get_libdir)/fglrx
+ doexe "${FILESDIR}"/switchlibGL || die "doexe switchlibGL failed"
+ cp "${FILESDIR}"/switchlibGL "${T}"/switchlibglx
+ doexe "${T}"/switchlibglx || die "doexe switchlibglx failed"
+}
+
+src_install-libs() {
+ if [[ "${ABI}" == "amd64" ]]; then
+ local EX_BASE_DIR="${BASE_DIR}_64a"
+ local pkglibdir=lib64
+ local MY_ARCH_DIR="${S}/arch/x86_64"
+ local oclsuffix=64
+ else
+ local EX_BASE_DIR="${BASE_DIR}"
+ local pkglibdir=lib
+ local MY_ARCH_DIR="${S}/arch/x86"
+ local oclsuffix=32
+ 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
+ newexe "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir}/fglrx/fglrx-libGL.so.${libver} \
+ libGL.so.${libver}
+ dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so.${libmajor}
+ dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so
+
+ exeinto ${ATI_ROOT}/extensions
+ doexe "${EX_BASE_DIR}"/usr/X11R6/${pkglibdir}/modules/extensions/fglrx/fglrx-libglx.so
+ mv "${D}"/${ATI_ROOT}/extensions/{fglrx-,}libglx.so
+
+ # other libs
+ exeinto /usr/$(get_libdir)
+ # Everything except for the libGL.so installed some row above
+ doexe $(find "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir} \
+ -maxdepth 1 -type f -name '*.so*' -not -name '*libGL.so*')
+ insinto /usr/$(get_libdir)
+ doins $(find "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir} \
+ -maxdepth 1 -type f -not -name '*.so*')
+
+ # DRI modules, installed into the path used by recent versions of mesa.
+ exeinto /usr/$(get_libdir)/dri
+ doexe "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir}/modules/dri/fglrx_dri.so
+
+ # AMD Cal and OpenCL libraries
+ exeinto /usr/$(get_libdir)/OpenCL/vendors/amd
+ doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libamdocl*.so*
+ doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libOpenCL*.so*
+ dosym libOpenCL.so.${libmajor} /usr/$(get_libdir)/OpenCL/vendors/amd/libOpenCL.so
+ exeinto /usr/$(get_libdir)
+ doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libati*.so*
+
+ # OpenCL vendor files
+ insinto /etc/OpenCL/vendors/
+ cat > "${T}"/amdocl${oclsuffix}.icd <<-EOF
+ /usr/$(get_libdir)/OpenCL/vendors/amd/libamdocl${oclsuffix}.so
+ EOF
+ doins "${T}"/amdocl${oclsuffix}.icd
+
+ 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}"
+
+ # Silence the QA notice by creating missing soname symlinks
+ for so in $(find "${D}"/usr/$(get_libdir) -maxdepth 1 -name *.so.[0-9].[0-9])
+ do
+ local soname=${so##*/}
+ local soname_one=${soname%.[0-9]}
+ local soname_zero=${soname_one%.[0-9]}
+ dosym ${soname} /usr/$(get_libdir)/${soname_one}
+ dosym ${soname_one} /usr/$(get_libdir)/${soname_zero}
+ done
+
+ # See https://bugs.gentoo.org/show_bug.cgi?id=443466
+ dodir /etc/revdep-rebuild/
+ echo "SEARCH_DIRS_MASK=\"/opt/bin/clinfo\"" > "${ED}/etc/revdep-rebuild/62-ati-drivers"
+
+ #remove static libs if not wanted
+ use static-libs || rm -rf "${D}"/usr/$(get_libdir)/libfglrx_dm.a
+
+ #install xvba sdk headers
+ doheader xvba_sdk/include/amdxvba.h
+
+ if use pax_kernel; then
+ pax-mark m "${D}"/usr/lib*/opengl/ati/lib/libGL.so.1.2 || die "pax-mark failed"
+ fi
+}
+
+pkg_postinst() {
+ elog "To switch to AMD 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
+ elog "Fully rebooting the system after an ${PN} update is recommended"
+ elog "Stopping Xorg, reloading fglrx kernel module and restart Xorg"
+ elog "might not work"
+ elog
+ elog "Some cards need acpid running to handle events"
+ elog "Please add it to boot runlevel with rc-update add acpid boot"
+ elog
+
+ "${ROOT}"/usr/bin/eselect opengl set --use-old ati
+ "${ROOT}"/usr/bin/eselect opencl set --use-old amd
+
+ if has_version "x11-drivers/xf86-video-intel[sna]"; then
+ ewarn "It is reported that xf86-video-intel built with USE=\"sna\" causes the X server"
+ ewarn "to crash on systems that use hybrid AMD/Intel graphics. If you experience"
+ ewarn "this crash, downgrade to xf86-video-intel-2.20.2 or earlier or"
+ ewarn "try disabling sna for xf86-video-intel."
+ ewarn "For details, see https://bugs.gentoo.org/show_bug.cgi?id=430000"
+ fi
+}
+
+pkg_prerm() {
+ "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11
+}
+
+pkg_postrm() {
+ "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11
+}
diff --git a/x11-drivers/ati-userspace/files/ati-drivers-13.12-acpi.patch b/x11-drivers/ati-userspace/files/ati-drivers-13.12-acpi.patch
new file mode 100644
index 00000000..3c568742
--- /dev/null
+++ b/x11-drivers/ati-userspace/files/ati-drivers-13.12-acpi.patch
@@ -0,0 +1,16 @@
+diff -urN common.old/lib/modules/fglrx/build_mod/kcl_acpi.c common/lib/modules/fglrx/build_mod/kcl_acpi.c
+--- common.old/lib/modules/fglrx/build_mod/kcl_acpi.c 2013-12-27 13:32:34.734832283 +0100
++++ common/lib/modules/fglrx/build_mod/kcl_acpi.c 2013-12-27 13:33:31.849831765 +0100
+@@ -1002,7 +1002,11 @@
+ #endif
+ {
+ return KCL_ACPI_ERROR;
+- }
++ }
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0)
++ ((acpi_tbl_table_handler)handler)(hdr);
++#else
+ ((acpi_table_handler)handler)(hdr);
++#endif
+ return KCL_ACPI_OK;
+ }
diff --git a/x11-drivers/ati-userspace/files/ati-drivers-13.6-linux-3.10-proc.diff b/x11-drivers/ati-userspace/files/ati-drivers-13.6-linux-3.10-proc.diff
new file mode 100644
index 00000000..bdb22eae
--- /dev/null
+++ b/x11-drivers/ati-userspace/files/ati-drivers-13.6-linux-3.10-proc.diff
@@ -0,0 +1,356 @@
+diff --git a/common/lib/modules/fglrx/build_mod/drmP.h b/common/lib/modules/fglrx/build_mod/drmP.h
+index 81546b2..4e74526 100755
+--- a/common/lib/modules/fglrx/build_mod/drmP.h
++++ b/common/lib/modules/fglrx/build_mod/drmP.h
+@@ -901,10 +901,6 @@ int DRM(stub_register)(const char *name,
+ int DRM(stub_unregister)(int minor);
+
+ /* Proc support (drm_proc.h) */
+-extern struct proc_dir_entry *DRM(proc_init)(drm_device_t *dev,
+- int minor,
+- struct proc_dir_entry *root,
+- struct proc_dir_entry **dev_root);
+ extern int DRM(proc_cleanup)(int minor,
+ struct proc_dir_entry *root,
+ struct proc_dir_entry *dev_root);
+diff --git a/common/lib/modules/fglrx/build_mod/drm_proc.h b/common/lib/modules/fglrx/build_mod/drm_proc.h
+index 1e3ab4a..c52ad7e 100755
+--- a/common/lib/modules/fglrx/build_mod/drm_proc.h
++++ b/common/lib/modules/fglrx/build_mod/drm_proc.h
+@@ -75,61 +75,6 @@ struct drm_proc_list {
+ #define DRM_PROC_ENTRIES (sizeof(DRM(proc_list))/sizeof(DRM(proc_list)[0]))
+
+ /**
+- * Initialize the DRI proc filesystem for a device.
+- *
+- * \param dev DRM device.
+- * \param minor device minor number.
+- * \param root DRI proc dir entry.
+- * \param dev_root resulting DRI device proc dir entry.
+- * \return root entry pointer on success, or NULL on failure.
+- *
+- * Create the DRI proc root entry "/proc/ati", the device proc root entry
+- * "/proc/ati/%minor%/", and each entry in proc_list as
+- * "/proc/ati/%minor%/%name%".
+- */
+-struct proc_dir_entry *DRM(proc_init)(drm_device_t *dev, int minor,
+- struct proc_dir_entry *root,
+- struct proc_dir_entry **dev_root)
+-{
+- struct proc_dir_entry *ent;
+- int i, j;
+- char name[64];
+-
+- if (!minor) root = create_proc_entry("dri", S_IFDIR, NULL);
+- if (!root) {
+- DRM_ERROR("Cannot create /proc/ati\n");
+- return NULL;
+- }
+-
+- sprintf(name, "%d", minor);
+- *dev_root = create_proc_entry(name, S_IFDIR, root);
+- if (!*dev_root) {
+- DRM_ERROR("Cannot create /proc/ati/%s\n", name);
+- return NULL;
+- }
+-
+- for (i = 0; i < DRM_PROC_ENTRIES; i++) {
+- ent = create_proc_entry(DRM(proc_list)[i].name,
+- S_IFREG|S_IRUGO, *dev_root);
+- if (!ent) {
+- DRM_ERROR("Cannot create /proc/ati/%s/%s\n",
+- name, DRM(proc_list)[i].name);
+- for (j = 0; j < i; j++)
+- remove_proc_entry(DRM(proc_list)[i].name,
+- *dev_root);
+- remove_proc_entry(name, root);
+- if (!minor) remove_proc_entry("dri", NULL);
+- return NULL;
+- }
+- ent->read_proc = DRM(proc_list)[i].f;
+- ent->data = dev;
+- }
+-
+- return root;
+-}
+-
+-
+-/**
+ * Cleanup the proc filesystem resources.
+ *
+ * \param minor device minor number.
+diff --git a/common/lib/modules/fglrx/build_mod/firegl_public.c b/common/lib/modules/fglrx/build_mod/firegl_public.c
+index d3ad3ce..890a0aa 100755
+--- a/common/lib/modules/fglrx/build_mod/firegl_public.c
++++ b/common/lib/modules/fglrx/build_mod/firegl_public.c
+@@ -583,6 +583,202 @@ kcl_proc_list_t KCL_PROC_FileList[] =
+ { "NULL", NULL, NULL} // Terminate List!!!
+ };
+
++
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
++typedef int (read_proc_t)(char *page, char **start, off_t off, int count, int *eof, void *data);
++typedef int (write_proc_t)(struct file *file, const char __user *buffer, unsigned long count, void *data);
++#else
++#define PDE_DATA(inode) (PDE((inode))->data)
++#endif
++
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
++typedef struct {
++ read_proc_t *read_func;
++ write_proc_t *write_func;
++ void *data;
++} gentoo_proc_wrapper_t;
++
++#define GENTOO_PROC_WRAPPER_OVERFLOW_MAGIC 939750305
++
++static ssize_t gentoo_proc_wrapper_read (struct file *myfile, char __user *buffer, size_t count, loff_t *offset) {
++ int is_eof=0, retval;
++ char *start, *usebuffer=NULL;
++ gentoo_proc_wrapper_t* wrapper_data=(gentoo_proc_wrapper_t*)(myfile->private_data);
++ if (PAGE_SIZE<*offset) {
++ printk(KERN_ERR "Trying to read beyond 4k on proc\n");
++ return -EIO;
++ }
++ //printk(KERN_NOTICE " call with: dev %p, func %p\n", wrapper_data->data, wrapper_data->read_func);
++
++ usebuffer=kmalloc(2*PAGE_SIZE, GFP_KERNEL);
++ if (!usebuffer)
++ return -ENOMEM;
++ ((u32*)usebuffer)[1024]=GENTOO_PROC_WRAPPER_OVERFLOW_MAGIC;
++
++ retval=wrapper_data->read_func(usebuffer, &start, *offset, count, &is_eof, wrapper_data->data);
++
++ BUG_ON(GENTOO_PROC_WRAPPER_OVERFLOW_MAGIC != ((u32*)usebuffer)[1024]);
++
++ if (0 > retval)
++ {
++ printk(KERN_ERR "Proc read failed with %d", retval);
++ goto out;
++ }
++
++ if (copy_to_user(buffer, start, retval)) {
++ printk(KERN_NOTICE "copy to user failed in amd drivers proc code\n");
++ retval=-EFAULT;
++ goto out;
++ }
++ *offset+=retval;
++
++out:
++ if (usebuffer)
++ kfree(usebuffer);
++ return retval;
++}
++static ssize_t gentoo_proc_wrapper_write (struct file *myfile, const char __user *buffer, size_t count, loff_t *offset) {
++ gentoo_proc_wrapper_t* wrapper_data=(gentoo_proc_wrapper_t*)(myfile->private_data);
++ int retval=0;
++ void *usebuffer=NULL;
++
++ BUG_ON(*offset);
++ if (!wrapper_data->write_func)
++ return -EPERM;
++
++ usebuffer=kmalloc(count, GFP_KERNEL);
++ if (!usebuffer)
++ return -ENOMEM;
++ if (copy_from_user(usebuffer, buffer, count)) {
++ printk(KERN_NOTICE "copy from user failed in amd drivers proc code\n");
++ retval=-EFAULT;
++ goto out;
++ }
++
++ retval=wrapper_data->write_func(myfile, buffer, count, wrapper_data->data);
++ *offset+=retval;
++out:
++ if (usebuffer)
++ kfree(usebuffer);
++ return retval;
++}
++static int gentoo_proc_wrapper_open(struct inode *myinode, struct file *myfile) {
++ myfile->private_data=PDE_DATA(myinode);
++ return generic_file_open(myinode, myfile);
++}
++struct file_operations gentoo_proc_fops = {
++ .read=gentoo_proc_wrapper_read,
++ .write=gentoo_proc_wrapper_write,
++ .open=gentoo_proc_wrapper_open,
++};
++
++static void *gentoo_proc_wrapper_data(read_proc_t *reader, write_proc_t *writer, void *mydata) {
++ gentoo_proc_wrapper_t *retval=kmalloc(sizeof(gentoo_proc_wrapper_t), GFP_KERNEL);
++ if (!retval)
++ return retval;
++ retval->read_func=reader;
++ retval->write_func=writer;
++ retval->data=mydata;
++ return retval;
++}
++
++static struct proc_dir_entry *firegl_proc_init( device_t *dev,
++ int minor,
++ struct proc_dir_entry *root,
++ struct proc_dir_entry **dev_root,
++ kcl_proc_list_t *proc_list ) // proc_list must be terminated!
++{
++ struct proc_dir_entry *ent;
++ char name[64];
++ kcl_proc_list_t *list = proc_list;
++ void *tempdata;
++ KCL_DEBUG1(FN_FIREGL_PROC, "minor %d, proc_list 0x%08lx\n", minor, (unsigned long)proc_list);
++ if (!minor)
++ {
++ root = proc_mkdir("ati", NULL);
++ }
++
++ if (!root)
++ {
++ KCL_DEBUG_ERROR("Cannot create /proc/ati\n");
++ return NULL;
++ }
++
++ if (minor == 0)
++ {
++ // Global major debice number entry
++ tempdata=gentoo_proc_wrapper_data((read_proc_t*)firegl_major_proc_read, NULL, NULL);
++ if (!tempdata)
++ return NULL;
++ ent = proc_create_data("major", S_IFREG|S_IRUGO, root, &gentoo_proc_fops, tempdata);
++ if (!ent)
++ {
++ remove_proc_entry("ati", NULL);
++ KCL_DEBUG_ERROR("Cannot create /proc/ati/major\n");
++ return NULL;
++ }
++ }
++
++ sprintf(name, "%d", minor);
++ *dev_root = proc_mkdir(name, root);
++ if (!*dev_root) {
++ remove_proc_entry("major", root);
++ remove_proc_entry("ati", NULL);
++ KCL_DEBUG_ERROR("Cannot create /proc/ati/%s\n", name);
++ return NULL;
++ }
++
++ while (list->f || list->fops)
++ {
++ struct file_operations *my_fops = &gentoo_proc_fops;
++ if (list->fops)
++ {
++ my_fops = (struct file_operations*)list->fops;
++ tempdata=(dev->pubdev.signature == FGL_DEVICE_SIGNATURE)? firegl_find_device(minor) : (dev);
++ }
++ else {
++ BUG_ON(!list->f);
++ tempdata=gentoo_proc_wrapper_data((read_proc_t*)list->f, NULL, (dev->pubdev.signature == FGL_DEVICE_SIGNATURE)? firegl_find_device(minor) : (dev) );
++ if (!tempdata)
++ return NULL;
++ }
++ //printk(KERN_NOTICE "name %s, dev %p, func %p, data %p\n", list->name, (dev->pubdev.signature == FGL_DEVICE_SIGNATURE)? firegl_find_device(minor) : (dev), list->f, tempdata);
++ ent = proc_create_data(list->name, S_IFREG|S_IRUGO, *dev_root, my_fops, tempdata);
++
++ if (!ent)
++ {
++ KCL_DEBUG_ERROR("Cannot create /proc/ati/%s/%s\n", name, list->name);
++ while (proc_list != list)
++ {
++ remove_proc_entry(proc_list->name, *dev_root);
++ proc_list++;
++ }
++ remove_proc_entry(name, root);
++ if (!minor)
++ {
++ remove_proc_entry("major", root);
++ remove_proc_entry("ati", NULL);
++ }
++ return NULL;
++ }
++
++ list++;
++ }
++
++ if (minor == 0)
++ {
++ // Global debug entry, only create it once
++ tempdata=gentoo_proc_wrapper_data((read_proc_t*)firegl_debug_proc_read_wrap, (write_proc_t*)firegl_debug_proc_write_wrap, dev);
++ if (!tempdata)
++ return NULL;
++ ent=proc_create_data("debug", S_IFREG|S_IRUGO, root, &gentoo_proc_fops, tempdata);
++ if (!ent)
++ return NULL;
++ }
++
++ return root;
++}
++#else
+ static struct proc_dir_entry *firegl_proc_init( device_t *dev,
+ int minor,
+ struct proc_dir_entry *root,
+@@ -677,6 +873,7 @@ static struct proc_dir_entry *firegl_proc_init( device_t *dev,
+
+ return root;
+ }
++#endif
+
+ static int firegl_proc_cleanup( int minor,
+ struct proc_dir_entry *root,
+@@ -6135,59 +6332,4 @@ void ATI_API_CALL KCL_fpu_end(void)
+ kernel_fpu_end();
+ }
+
+-/** Create new directory entry under "/proc/ati/...."
+- * Where
+- * root_dir - Root directory. If NULL then we should use "/proc/ati" root.
+- * name - Pointer to the name of directory
+- * access - Access attribute. We could use it to disable access to the directory for everybody accept owner.
+- * By default owner is root.
+- * Return NULL if failure. Pointer to proc_dir_entry otherwise
+- */
+-void * KCL_create_proc_dir(void *root_dir, const char *name, unsigned int access)
+-{
+- struct proc_dir_entry *dir = NULL;
+-
+- if (root_dir == NULL)
+- dir = create_proc_entry(name, S_IFDIR | access, firegl_stub_root);
+- else
+- dir = create_proc_entry(name, S_IFDIR | access, (struct proc_dir_entry *)root_dir);
+-
+- return dir;
+-}
+-
+-/* Remove proc directory entry
+- * root - Pointer to directory proc entry or NULL if for "/proc/ati"
+- * name - Name to delete
+- */
+-void KCL_remove_proc_dir_entry(void *root, const char *name)
+-{
+- if (root == NULL)
+- remove_proc_entry(name, firegl_stub_root);
+- else
+- remove_proc_entry(name, (struct proc_dir_entry *)root);
+-}
+-
+-
+-/* Create proc_entry under "root_dir"
+- * read_fn - Function which will be called on read request
+- * write_fn - Function which will be called on write request
+- * private_data - Pointer to private data which will be passed
+- */
+-void KCL_create_proc_entry(void *root_dir, const char *name, unsigned int access_mode, void *read_fn, void *write_fn, void *private_data)
+-{
+- struct proc_dir_entry *ent = NULL;
+-
+- if (root_dir == NULL || name == NULL)
+- return;
+-
+- ent = create_proc_entry(name, access_mode, (struct proc_dir_entry *)root_dir);
+-
+- if (ent)
+- {
+- ent->read_proc = (read_proc_t *)read_fn;
+- ent->write_proc = (write_proc_t *)write_fn;
+- ent->data = private_data;
+- }
+-}
+-
+ #endif /* __KERNEL__ */
diff --git a/x11-drivers/ati-userspace/files/ati-drivers-13.8-beta-include-seq_file.patch b/x11-drivers/ati-userspace/files/ati-drivers-13.8-beta-include-seq_file.patch
new file mode 100644
index 00000000..fb1ba17e
--- /dev/null
+++ b/x11-drivers/ati-userspace/files/ati-drivers-13.8-beta-include-seq_file.patch
@@ -0,0 +1,13 @@
+diff --git a/common/lib/modules/fglrx/build_mod/firegl_public.c b/common/lib/modules/fglrx/build_mod/firegl_public.c
+index 22561c5..fdfe65e 100755
+--- a/common/lib/modules/fglrx/build_mod/firegl_public.c
++++ b/common/lib/modules/fglrx/build_mod/firegl_public.c
+@@ -520,6 +520,8 @@ static int func##_wrap(char *buf, char **start, kcl_off_t offset, \
+ }
+
+ #else
++#include <linux/seq_file.h>
++
+ #define READ_PROC_WRAP(func) \
+ static int func##_wrap(struct seq_file *m, void* data) \
+ { \
diff --git a/x11-drivers/ati-userspace/files/ati-drivers-13.8-mesa-9.2-debug.patch b/x11-drivers/ati-userspace/files/ati-drivers-13.8-mesa-9.2-debug.patch
new file mode 100644
index 00000000..8a15e0af
--- /dev/null
+++ b/x11-drivers/ati-userspace/files/ati-drivers-13.8-mesa-9.2-debug.patch
@@ -0,0 +1,18 @@
+--- work.orig/common/usr/include/GL/glATI.h
++++ work/common/usr/include/GL/glATI.h
+@@ -6006,6 +6006,7 @@ typedef GLvoid (APIENTRY * PFNGLDEBUGMES
+ typedef GLvoid (APIENTRY * PFNGLDEBUGMESSAGECALLBACKARB)(GLvoid* callback, GLvoid* userParam);
+ typedef GLuint (APIENTRY * PFNGLGETDEBUGMESSAGELOGARB)(GLuint count, GLsizei bufsize, GLenum* sources, GLenum* types, GLuint* ids, GLenum* severities, GLsizei* lengths, GLchar* messageLog);
+
++#if 0
+ typedef void (APIENTRY *GLDEBUGPROCARB)(GLenum source,
+ GLenum type,
+ GLuint id,
+@@ -6014,6 +6015,7 @@ typedef void (APIENTRY *GLDEBUGPROCARB)(
+ const GLchar* message,
+ GLvoid* userParam);
+ // end ARB_debug_output
++#endif
+
+
+ /* ARB_debug_group (KHR_debug) */
diff --git a/x11-drivers/ati-userspace/files/ati-drivers-13.8-proc-permissions.diff b/x11-drivers/ati-userspace/files/ati-drivers-13.8-proc-permissions.diff
new file mode 100644
index 00000000..26015f41
--- /dev/null
+++ b/x11-drivers/ati-userspace/files/ati-drivers-13.8-proc-permissions.diff
@@ -0,0 +1,13 @@
+diff --git a/common/lib/modules/fglrx/build_mod/firegl_public.c b/common/lib/modules/fglrx/build_mod/firegl_public.c
+index 22561c5..6480d1a 100755
+--- a/common/lib/modules/fglrx/build_mod/firegl_public.c
++++ b/common/lib/modules/fglrx/build_mod/firegl_public.c
+@@ -821,7 +821,7 @@ static struct proc_dir_entry *firegl_proc_init( device_t *dev,
+ KCL_DEBUG1(FN_FIREGL_PROC, "minor %d, proc_list 0x%08lx\n", minor, (unsigned long)proc_list);
+ if (!minor)
+ {
+- root = KCL_create_proc_dir(NULL, "ati", S_IFDIR);
++ root = KCL_create_proc_dir(NULL, "ati", S_IFDIR|S_IRUGO|S_IXUGO);
+ }
+
+ if (!root)
diff --git a/x11-drivers/ati-userspace/files/check-for-iommu-only-if-iommu-is-supported.patch b/x11-drivers/ati-userspace/files/check-for-iommu-only-if-iommu-is-supported.patch
new file mode 100644
index 00000000..79324873
--- /dev/null
+++ b/x11-drivers/ati-userspace/files/check-for-iommu-only-if-iommu-is-supported.patch
@@ -0,0 +1,31 @@
+From 1633d55aa0fb9c2ceb0ae1eab15bdec5066d35ae Mon Sep 17 00:00:00 2001
+From: Emil Karlson <jekarlson@gmail.com>
+Date: Fri, 2 Aug 2013 01:18:41 +0300
+Subject: [PATCH 1/3] Check for iommu only, if iommu is supported.
+
+---
+ common/lib/modules/fglrx/build_mod/kcl_iommu.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/common/lib/modules/fglrx/build_mod/kcl_iommu.c b/common/lib/modules/fglrx/build_mod/kcl_iommu.c
+index c6602dd..803455c 100755
+--- a/common/lib/modules/fglrx/build_mod/kcl_iommu.c
++++ b/common/lib/modules/fglrx/build_mod/kcl_iommu.c
+@@ -183,11 +183,13 @@ void ATI_API_CALL KCL_IOMMU_UnbindPasid( KCL_PCI_DevHandle pcidev,int pasid)
+ */
+ int ATI_API_CALL KCL_IOMMU_CheckInfo( KCL_PCI_DevHandle pcidev)
+ {
++#if defined(CONFIG_INTEL_IOMMU) || defined(CONFIG_AMD_IOMMU)
+ struct pci_dev* pdev = (struct pci_dev*)pcidev;
+- if ( pdev->dev.archdata.iommu )
++ if ( pdev->dev.archdata.iommu )
+ {
+ return 1;
+ }
++#endif
+ return 0;
+ }
+
+--
+1.8.1.5
+
diff --git a/x11-drivers/ati-userspace/files/typesafe-kuid.diff b/x11-drivers/ati-userspace/files/typesafe-kuid.diff
new file mode 100644
index 00000000..c226ea3d
--- /dev/null
+++ b/x11-drivers/ati-userspace/files/typesafe-kuid.diff
@@ -0,0 +1,34 @@
+diff --git a/common/lib/modules/fglrx/build_mod/firegl_public.c b/common/lib/modules/fglrx/build_mod/firegl_public.c
+index d3ad3ce..9362b58 100755
+--- a/common/lib/modules/fglrx/build_mod/firegl_public.c
++++ b/common/lib/modules/fglrx/build_mod/firegl_public.c
+@@ -34,6 +34,11 @@
+ #include <linux/autoconf.h>
+ #endif
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)
++#include <linux/uidgid.h>
++#endif
++
++
+ #if !defined(CONFIG_X86)
+ #if !defined(CONFIG_X86_PC)
+ #if !defined(CONFIG_X86_XEN)
+@@ -1543,9 +1548,17 @@ KCL_TYPE_Pid ATI_API_CALL KCL_GetTgid(void)
+ KCL_TYPE_Uid ATI_API_CALL KCL_GetEffectiveUid(void)
+ {
+ #ifdef current_euid
++# if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)
++ return __kuid_val(current_euid());
++# else
+ return current_euid();
++# endif
+ #else
++# if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)
++ return __kuid_val(current->euid);
++# else
+ return current->euid;
++# endif
+ #endif
+ }
+