diff options
author | BlackNoxis <steven.darklight@gmail.com> | 2014-02-15 23:24:26 +0200 |
---|---|---|
committer | BlackNoxis <steven.darklight@gmail.com> | 2014-02-15 23:24:26 +0200 |
commit | 7224c1253228e5c29c78cb3f0f26ce34770f2356 (patch) | |
tree | 1684924656132935256e034f35f92abee6623265 /x11-drivers |
Added ebuilds for kogaion desktop
Diffstat (limited to 'x11-drivers')
186 files changed, 30712 insertions, 0 deletions
diff --git a/x11-drivers/ati-drivers/Manifest b/x11-drivers/ati-drivers/Manifest new file mode 100644 index 00000000..00e28fcf --- /dev/null +++ b/x11-drivers/ati-drivers/Manifest @@ -0,0 +1,61 @@ +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 495 SHA256 acce741df8842178c54db4a01ed68a9dd54c331b0d6c153ecaf4f088cf0f18a2 SHA512 7dbcf85400276ec15f2250d5f9d3a06d65653117a0a623bcab32395db511c2eae27e74eb4386b2f6167b214a8a94d2b863e5c60d1c954aa02e3ac4e8f27f873f WHIRLPOOL 52f9692292a8ede8db07e4c81b0d15104cc3b9b85fb3e065054e1bcbbd1903a5290754637d4a1b2d93199739d9ef18e9878df391601db3d9877c29c381ec0bbd +AUX ati-drivers-2.6.38.patch 1645 SHA256 46ae66c3985ce3af21e36d3bd71019a6b81e2884099253e2772384bd67a77c24 SHA512 335203e4b1811f6aff97e5beedc83beebe45f98080a925c4db9ed6c4a167455717333cd4888754d0b65768e8ebc0dd6aa6addd9a0d27209ca72294f8ac963804 WHIRLPOOL 3c25a1d0a23707c05aaf4f10602e77158d5469f98cd7d2fc351f2b9a72561b803fefa8cbc15e5b17cf7938e7074608d93fc418a6e48e987422377bd800f9a685 +AUX ati-drivers-2.6.39.patch 1706 SHA256 5c996373065e91da6b4441bdc819b7081896944f4b69253c37bf4611a157c2e5 SHA512 78791d267cf53b4493d5483ca1259cf17b58f88ff92a1f5e86bcfccacd09407fb12859cbf628a1ec11ac85bf0d348b9f8932beb5cdafded8dee53c64d5921f58 WHIRLPOOL 48f3bbf0d976a70db24cb1690521f512ea44b6b4db98b9d7616ddfad7f273064154ef34c353cf97b2f448b7b913279978e008b38084a32a4548b640afe07f4cf +AUX ati-drivers-3.2.8+-2.patch 351 SHA256 ba3158e05807112c715a65216dee30b23659456c2e50e0c6f533a5965afeb72a SHA512 cf9df9a984055ec805ca72139a92dd959bf4192ffe94ce2d63ca600a9ac8708a1aa99ceca519347259941dbd5f7972c022fe74716ac46357555f90056279c9c4 WHIRLPOOL ab16dc45544fc755968d9dc6fd18ad248e7743528e78e80e8cc7b6e78418b27812a1c1308c77ef3e67fff99a6c7781c2d93c4fd07a950918df1269a22c857efe +AUX ati-drivers-3.2.8+.patch 797 SHA256 b30da95eebea23d4f54755bf986d7bd73ee5d13aa8e3d179ec3d0de90929e33d SHA512 859072e979681ae971e75b167351ef0aa7be521f6fb2e37cde8a3462345f6ec83af1c5b417d04165158847951018493f80fc3dff50f38bfa9b680bf6febae725 WHIRLPOOL 658d1d1868f783c9d31decf7102f790905e24723395fb148095e9a8ab30261b184e26f66651bbec18ddb97ca02dc1ae0d58f44fedaf11d6fe865bc83f1b943ad +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-redefine-WARN.patch 1135 SHA256 16b7e5f1527d3a9e80acb036e5684049a0d280521cc247d535a354236f863b10 SHA512 97c064b9b89288657a027d1161cc2e26781f882e9c189ae1a55a6fc28ed54a5bd8e3993f9b0b1f75cf29100cc30a9760bd3feaf296da6cc66580bde82a6d1ded WHIRLPOOL 7416f2a5e29622e7337cf87f79d45f1da6824645e3537d04100fa15fafedd53b567a5f3fb9c7423586b436dc5441bfc74427d59582b8df51e00c604c1bc6efac +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.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-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 xvba-sdk-0.74-404001.tar.gz 583847 SHA256 731a2c489f2fb5d7318c1976061b26c1057a696f46d09dcf55fbada97fed17eb SHA512 aa1dd52b59eeeabd026d8b76e3b75eaf02587ef286438ba28884afeef5a5efaf50283b5ee4f5b81b12cf79cb4ec77c9a235a886b29fb7cdf850c9779f4b07b35 WHIRLPOOL 69917b746d353a884512e97b9d9a9b89e6f51add3119e69ddd119d51c0c3f2820b93a449fe42bd76d671dc505f92bf25b7f2c5868b33768fc68a19596e460951 +EBUILD ati-drivers-11.10.ebuild 7152 SHA256 cab997c19267e119ef24017c65178f9ebbb7744d224cf9858a197cf19459da0d SHA512 5a2ede4fe8eb731a0161ec39eaf15c9e315624669a2ca6084b3ebbb7f38eb94586a7faa6e61eba29e97f4802f9f748752781d4675af97e7e756e2bd21b2286ce WHIRLPOOL 6097ce0703176f7f9331b037d872ff8671c6d16effde5d5e613b082018323dcd4c7de9d5c6297bb1b5fb16a458d3dc8f5feb2e099f44839358d6713032fd8a02 +EBUILD ati-drivers-11.11.ebuild 7152 SHA256 cab997c19267e119ef24017c65178f9ebbb7744d224cf9858a197cf19459da0d SHA512 5a2ede4fe8eb731a0161ec39eaf15c9e315624669a2ca6084b3ebbb7f38eb94586a7faa6e61eba29e97f4802f9f748752781d4675af97e7e756e2bd21b2286ce WHIRLPOOL 6097ce0703176f7f9331b037d872ff8671c6d16effde5d5e613b082018323dcd4c7de9d5c6297bb1b5fb16a458d3dc8f5feb2e099f44839358d6713032fd8a02 +EBUILD ati-drivers-11.12.ebuild 7152 SHA256 cab997c19267e119ef24017c65178f9ebbb7744d224cf9858a197cf19459da0d SHA512 5a2ede4fe8eb731a0161ec39eaf15c9e315624669a2ca6084b3ebbb7f38eb94586a7faa6e61eba29e97f4802f9f748752781d4675af97e7e756e2bd21b2286ce WHIRLPOOL 6097ce0703176f7f9331b037d872ff8671c6d16effde5d5e613b082018323dcd4c7de9d5c6297bb1b5fb16a458d3dc8f5feb2e099f44839358d6713032fd8a02 +EBUILD ati-drivers-11.6.ebuild 7216 SHA256 5b7e43780f2ed164f0ed60f78b16fa7870bee39b0f5c02ba0b2efcde80f1dc93 SHA512 e2d933c2270f1ff4e0d02280c726b4db3f179d692933edcd15f38fe93b5c55204856ecc092934bbcff7f678a6aeece38df184c938d712e7b8b5764aea5e9b801 WHIRLPOOL 8a4c436586bd3ca81a5b222af032002ccc0a9c1d8111b7025f152c192e750958a59a356404de6feaeecb4b94b5ba5287d916d07285988f8e0dce3a746f0eb1e6 +EBUILD ati-drivers-11.8.ebuild 7152 SHA256 cab997c19267e119ef24017c65178f9ebbb7744d224cf9858a197cf19459da0d SHA512 5a2ede4fe8eb731a0161ec39eaf15c9e315624669a2ca6084b3ebbb7f38eb94586a7faa6e61eba29e97f4802f9f748752781d4675af97e7e756e2bd21b2286ce WHIRLPOOL 6097ce0703176f7f9331b037d872ff8671c6d16effde5d5e613b082018323dcd4c7de9d5c6297bb1b5fb16a458d3dc8f5feb2e099f44839358d6713032fd8a02 +EBUILD ati-drivers-11.9.ebuild 7152 SHA256 cab997c19267e119ef24017c65178f9ebbb7744d224cf9858a197cf19459da0d SHA512 5a2ede4fe8eb731a0161ec39eaf15c9e315624669a2ca6084b3ebbb7f38eb94586a7faa6e61eba29e97f4802f9f748752781d4675af97e7e756e2bd21b2286ce WHIRLPOOL 6097ce0703176f7f9331b037d872ff8671c6d16effde5d5e613b082018323dcd4c7de9d5c6297bb1b5fb16a458d3dc8f5feb2e099f44839358d6713032fd8a02 +EBUILD ati-drivers-12.1-r1.ebuild 7304 SHA256 6654771156f69919a895b5fb0f5444e3d41af69355e116d7d59b2549cbac501d SHA512 507b024789e65fbba470a4b4c07b8307a7518227888fce24a05fa27ac607a49696bb037973d9adda3e350971ba3210205ae18e3831bf08149556a51fa4815fd1 WHIRLPOOL c0b592bb9a72a73005b8cbf5b0ee3a99ffe59548553e8185457093b50dc2902740226302bb3d77b2212226508f90dfef378d7127de994af29e4528ea3badc118 +EBUILD ati-drivers-12.10.ebuild 7399 SHA256 c7619e83298e226f934771621bdb3d00db2d4c303ca541ca024aa9a8fe749d5d SHA512 b85b158fedabb772ae843bd0a40400bbdc3d027de660be2f38dba6051aa3087cbd88033ce1d278644e6ba468d4d2053c7e9b2788e354a37a9f8dddd1c76a83df WHIRLPOOL d9b54557002e5948f322a2373f78a1de98429818d966c012814d924a6eb73f429e6bf2765aa46bc393b19804f7c34404d6233f111bfdc3ed313b031ae5900b6d +EBUILD ati-drivers-12.2.ebuild 7403 SHA256 67d5116db4cf555f142adf9f22127403f52705477ca42af269efc79963b35f3e SHA512 0980eb900443d71500a3a2796eb3c7edfbd7e65c9b79b3b4988cc2a53f4e4a84df7e8db583a23fab024d63a2d417125433bc6af204719f1b8150619976cad759 WHIRLPOOL d4ab46b77020f0a2b65ca5f33d779da1ca40236b9ef27d91eaf44136b95776c8fb00d91b4344c870358d1237a91c5f70d5b9ad0033344371c43363f5626fe5d6 +EBUILD ati-drivers-12.3.ebuild 7403 SHA256 67d5116db4cf555f142adf9f22127403f52705477ca42af269efc79963b35f3e SHA512 0980eb900443d71500a3a2796eb3c7edfbd7e65c9b79b3b4988cc2a53f4e4a84df7e8db583a23fab024d63a2d417125433bc6af204719f1b8150619976cad759 WHIRLPOOL d4ab46b77020f0a2b65ca5f33d779da1ca40236b9ef27d91eaf44136b95776c8fb00d91b4344c870358d1237a91c5f70d5b9ad0033344371c43363f5626fe5d6 +EBUILD ati-drivers-12.4.ebuild 7523 SHA256 a49982cbdc74bd4b469965c39621076c879b34b85921411f634189740129fa7e SHA512 a5424d7b9f4aec53c3eedd82b6fe54f3999cca4c126c3459084abefbf8e715c67b56ea30cc1b177364cbede8b69517b7ef7b513727767fc65790ba036c5ec0e7 WHIRLPOOL 9c1e6f64cc31e17db68e49479cf4250c1dd6a652dab8b34052c1d7f43c9c88a602a806e6356a4d6054befcf1dfacb4676c59268ff648905723628a4a78805f1c +EBUILD ati-drivers-12.6.ebuild 7752 SHA256 ad803b497c5082dbf25fd7967a5e1ea18504ee5db266f0966600c1819e9ed636 SHA512 1e179237eca74034992223688364416ab4128b1ec2761951a83d68a776d81d93abb6759fc91c05a9f8a90e9f17cc50ee841df6b82168dd02799e53b70d50a818 WHIRLPOOL f338e9344c3738893f97ae1d4a5de6f9580f525cad79492215db435ec1b3ceb7bb9a41b73a76e9fdd7ce2f89e4f34d89f8d77cc715e296b1340baacb1d99f34c +EBUILD ati-drivers-12.6_beta_pre897.ebuild 7366 SHA256 7ff0e54f530b6ea370f78acfc80e804a551d60f9769f99b49d1590b303618a62 SHA512 6670b2d5aeb3b7be2bc30d735cc058322d7b9d36d269c61b4e38b19a621e97f6bfee72d7bb36530e4e09f7bf87c96145a3ce315a42264dfe92010d014ab2764a WHIRLPOOL 125b054977cca0266a0a94a341d07cb18df8d7b584d3d0caebc75517e74456a7032e716463d588dda229062262d224879a300d43317c5acb0b5849be8a21bad4 +EBUILD ati-drivers-12.8.ebuild 7276 SHA256 f40522909c982ca2b3a0c81efcfbea93575491c251130a2c952ed97013f6fcef SHA512 bd3938a12a85ecac418022f0be3e318f8142a985ef26ffd95ac931971ad09df1f9ca238ac1692a1fe6752085e75c7aa1d08cf7b952a92e44bab634ffa7aff3ff WHIRLPOOL da5c2bbd249700b1f1e51610e2fd6ed369be7b2a218c22dd883cbb14ac30ba204f15f850dcac73aefe9dca54772ef6e03052f7cd371a7fc3ced13f255a16bf36 +EBUILD ati-drivers-13.1.ebuild 8255 SHA256 fbb05e616ba13e81e95659927be00ae85c17c27c4cf4b51c69d7b7b7268b2ec1 SHA512 706069a30d980f049bb402f4979c9c20262ffeaf0844fd4c1d3cfd63eecf9622a6bbd54441b6ef8d0653b2ceffcfc270666e055c37153486e52462b4146553e5 WHIRLPOOL 12239ae2782fb8fc8f298785d790d9c640fee57e2fa95a3ab50cdbabaa77cc4ba4425ddb2dfa0cc47624ab3b49486ef883ba864c598b6f4fbdff1de5369a2630 +EBUILD ati-drivers-13.4.ebuild 6506 SHA256 b07cf387bc966984c4813d6e1f48ab9ccc857b79d289d624df1786d868fdf00c SHA512 0c88520c2dc4d6d4428c34acfceeb842bc72cb3e3b472d55c8516dd21f61d0caca081e2ef45cbe6b537b21c2ff5850e9386f473e5ac6e237be3724fb08f33c24 WHIRLPOOL f9dd28392d6b8a15b8c4929763fda61244706d4494fcdf1529bdca56826d1473625c0904a1084aa0ddb657049d43cc3951e708de6c10532e79b800cbfd591b5f diff --git a/x11-drivers/ati-drivers/ati-drivers-11.10.ebuild b/x11-drivers/ati-drivers/ati-drivers-11.10.ebuild new file mode 100644 index 00000000..d009c8c1 --- /dev/null +++ b/x11-drivers/ati-drivers/ati-drivers-11.10.ebuild @@ -0,0 +1,233 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=4 + +inherit eutils multilib linux-info linux-mod toolchain-funcs versionator + +DESCRIPTION="AMD kernel drivers for r600 (HD Series) and newer chipsets" +HOMEPAGE="http://ati.amd.com" +# 8.ble will be used for beta releases. +if [[ $(get_major_version) -gt 8 ]]; then + ATI_URL="http://www2.ati.com/drivers/linux/" + SRC_URI="${ATI_URL}/ati-driver-installer-${PV/./-}-x86.x86_64.run" + FOLDER_PREFIX="common/" +else + SRC_URI="https://launchpad.net/ubuntu/natty/+source/fglrx-installer/2:${PV}-0ubuntu1/+files/fglrx-installer_${PV}.orig.tar.gz" + FOLDER_PREFIX="" +fi +IUSE="debug multilib" + +LICENSE="AMD GPL-2 as-is" +KEYWORDS="~amd64 ~x86" +SLOT="1" + +RDEPEND="multilib? ( ~x11-drivers/ati-userspace-${PV}[multilib] ) + ~x11-drivers/ati-userspace-${PV} + sys-power/acpid" +DEPEND="${RDEPEND}" + +S="${WORKDIR}" + +_check_kernel_config() { + local failed=0 + local error="" + if ! kernel_is ge 2 6; then + eerror "You need a 2.6 linux kernel to compile against!" + die "No 2.6 Kernel found" + fi + + if ! linux_chkconfig_present MTRR; then + ewarn "You don't have MTRR support enabled in the kernel." + ewarn "Direct rendering will not work." + fi + + if linux_chkconfig_builtin DRM; then + ewarn "You have DRM support built in to the kernel" + ewarn "Direct rendering will not work." + fi + + if ! linux_chkconfig_present AGP && \ + ! linux_chkconfig_present PCIEPORTBUS; then + ewarn "You don't have AGP and/or PCIe support enabled in the kernel" + ewarn "Direct rendering will not work." + fi + + if ! linux_chkconfig_present ACPI; then + eerror "${P} requires the ACPI support in the kernel" + eerror "Please enable it:" + eerror " CONFIG_ACPI=y" + eerror "in /usr/src/linux/.config or" + eerror " Power management and ACPI options --->" + eerror " [*] Power Management support" + eerror "in the 'menuconfig'" + error+=" CONFIG_ACPI disabled;" + failed=1 + fi + + if ! linux_chkconfig_present PCI_MSI; then + eerror "${P} requires MSI in the kernel." + eerror "Please enable it:" + eerror " CONFIG_PCI_MSI=y" + eerror "in /usr/src/linux/.config or" + eerror " Bus options (PCI etc.) --->" + eerror " [*] Message Signaled Interrupts (MSI and MSI-X)" + eerror "in the kernel config." + error+=" CONFIG_PCI_MSI disabled;" + failed=1 + fi + + if linux_chkconfig_present LOCKDEP; then + eerror "You've enabled LOCKDEP -- lock tracking -- in the kernel." + eerror "Unfortunately, this option exports the symbol lock_acquire as GPL-only." + eerror "This prevents ${P} from compiling with an error like this:" + eerror "FATAL: modpost: GPL-incompatible module fglrx.ko uses GPL-only symbol 'lock_acquire'" + eerror "Please make sure the following options have been unset:" + eerror " Kernel hacking --->" + eerror " [ ] Lock debugging: detect incorrect freeing of live locks" + eerror " [ ] Lock debugging: prove locking correctness" + eerror " [ ] Lock usage statistics" + eerror "in 'menuconfig'" + error+=" LOCKDEP enabled;" + failed=1 + fi + + use amd64 && if ! linux_chkconfig_present COMPAT; then + eerror "${P} requires COMPAT." + eerror "Please enable the 32 bit emulation:" + eerror "Executable file formats / Emulations --->" + eerror " [*] IA32 Emulation" + eerror "in the kernel config." + eerror "if this doesn't enable CONFIG_COMPAT add" + eerror " CONFIG_COMPAT=y" + eerror "in /usr/src/linux/.config" + error+=" COMPAT disabled;" + failed=1 + fi + + kernel_is ge 2 6 37 && kernel_is le 2 6 38 && if ! linux_chkconfig_present BKL ; then + eerror "${P} requires BKL." + eerror "Please enable the Big Kernel Lock:" + eerror "Kernel hacking --->" + eerror " [*] Big Kernel Lock" + eerror "in the kernel config." + eerror "or add" + eerror " CONFIG_BKL=y" + eerror "in /usr/src/linux/.config" + error+=" BKL disabled;" + failed=1 + fi + + [[ ${failed} -ne 0 ]] && die "${error}" +} + +pkg_pretend() { + # workaround until bug 365543 is solved + linux-info_pkg_setup + require_configured_kernel + _check_kernel_config +} + +pkg_setup() { + MODULE_NAMES="fglrx(video:${S}/${FOLDER_PREFIX}/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}" + BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=\"-DMODULE -DATI -DFGL\"" + if grep -q arch_compat_alloc_user_space ${KV_DIR}/arch/x86/include/asm/compat.h ; then + BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=-DCOMPAT_ALLOC_USER_SPACE=arch_compat_alloc_user_space" + else + BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=-DCOMPAT_ALLOC_USER_SPACE=compat_alloc_user_space" + fi + + # 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 + + # Define module dir. + MODULE_DIR="${S}/${FOLDER_PREFIX}/lib/modules/fglrx/build_mod" + + elog + elog "Please note that this driver supports only graphic cards based on" + elog "r600 chipset and newer." + elog "This represent the ATI Radeon HD series at this moment." + elog + elog "If your card is older then usage of ${CATEGORY}/xf86-video-ati" + elog "as replacement is highly recommended. Rather than staying with" + elog "old versions of this driver." + elog "For migration informations please reffer to:" + elog "http://www.gentoo.org/proj/en/desktop/x/x11/ati-migration-guide.xml" + einfo +} + +src_unpack() { + if [[ $(get_major_version) -gt 8 ]]; then + # Switching to a standard way to extract the files since otherwise no signature file + # would be created + local src="${DISTDIR}/${A}" + sh "${src}" --extract "${S}" 2&>1 /dev/null + else + unpack ${A} + fi +} + +src_prepare() { + # version patches + # epatch "${FILESDIR}"/kernel/${PV}-*.patch + if use debug; then + sed -i '/^#define DRM_DEBUG_CODE/s/0/1/' \ + "${MODULE_DIR}/firegl_public.c" \ + || die "Failed to enable debug output." + fi + + cd "${MODULE_DIR}" + # bugged fglrx build system, this file should be copied by hand + cp "${ARCH_DIR}"/lib/modules/fglrx/build_mod/libfglrx_ip.a 2.6.x + + 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" + + cd "${S}" + mkdir extra || die "mkdir failed" + cd extra + unpack ./../${FOLDER_PREFIX}usr/src/ati/fglrx_sample_source.tgz +} + +src_compile() { + linux-mod_src_compile +} + +src_install() { + linux-mod_src_install +} + +pkg_postinst() { + 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." + linux-mod_pkg_postinst +} + +pkg_preinst() { + linux-mod_pkg_preinst +} + +pkg_postrm() { + linux-mod_pkg_postrm +} diff --git a/x11-drivers/ati-drivers/ati-drivers-11.11.ebuild b/x11-drivers/ati-drivers/ati-drivers-11.11.ebuild new file mode 100644 index 00000000..d009c8c1 --- /dev/null +++ b/x11-drivers/ati-drivers/ati-drivers-11.11.ebuild @@ -0,0 +1,233 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=4 + +inherit eutils multilib linux-info linux-mod toolchain-funcs versionator + +DESCRIPTION="AMD kernel drivers for r600 (HD Series) and newer chipsets" +HOMEPAGE="http://ati.amd.com" +# 8.ble will be used for beta releases. +if [[ $(get_major_version) -gt 8 ]]; then + ATI_URL="http://www2.ati.com/drivers/linux/" + SRC_URI="${ATI_URL}/ati-driver-installer-${PV/./-}-x86.x86_64.run" + FOLDER_PREFIX="common/" +else + SRC_URI="https://launchpad.net/ubuntu/natty/+source/fglrx-installer/2:${PV}-0ubuntu1/+files/fglrx-installer_${PV}.orig.tar.gz" + FOLDER_PREFIX="" +fi +IUSE="debug multilib" + +LICENSE="AMD GPL-2 as-is" +KEYWORDS="~amd64 ~x86" +SLOT="1" + +RDEPEND="multilib? ( ~x11-drivers/ati-userspace-${PV}[multilib] ) + ~x11-drivers/ati-userspace-${PV} + sys-power/acpid" +DEPEND="${RDEPEND}" + +S="${WORKDIR}" + +_check_kernel_config() { + local failed=0 + local error="" + if ! kernel_is ge 2 6; then + eerror "You need a 2.6 linux kernel to compile against!" + die "No 2.6 Kernel found" + fi + + if ! linux_chkconfig_present MTRR; then + ewarn "You don't have MTRR support enabled in the kernel." + ewarn "Direct rendering will not work." + fi + + if linux_chkconfig_builtin DRM; then + ewarn "You have DRM support built in to the kernel" + ewarn "Direct rendering will not work." + fi + + if ! linux_chkconfig_present AGP && \ + ! linux_chkconfig_present PCIEPORTBUS; then + ewarn "You don't have AGP and/or PCIe support enabled in the kernel" + ewarn "Direct rendering will not work." + fi + + if ! linux_chkconfig_present ACPI; then + eerror "${P} requires the ACPI support in the kernel" + eerror "Please enable it:" + eerror " CONFIG_ACPI=y" + eerror "in /usr/src/linux/.config or" + eerror " Power management and ACPI options --->" + eerror " [*] Power Management support" + eerror "in the 'menuconfig'" + error+=" CONFIG_ACPI disabled;" + failed=1 + fi + + if ! linux_chkconfig_present PCI_MSI; then + eerror "${P} requires MSI in the kernel." + eerror "Please enable it:" + eerror " CONFIG_PCI_MSI=y" + eerror "in /usr/src/linux/.config or" + eerror " Bus options (PCI etc.) --->" + eerror " [*] Message Signaled Interrupts (MSI and MSI-X)" + eerror "in the kernel config." + error+=" CONFIG_PCI_MSI disabled;" + failed=1 + fi + + if linux_chkconfig_present LOCKDEP; then + eerror "You've enabled LOCKDEP -- lock tracking -- in the kernel." + eerror "Unfortunately, this option exports the symbol lock_acquire as GPL-only." + eerror "This prevents ${P} from compiling with an error like this:" + eerror "FATAL: modpost: GPL-incompatible module fglrx.ko uses GPL-only symbol 'lock_acquire'" + eerror "Please make sure the following options have been unset:" + eerror " Kernel hacking --->" + eerror " [ ] Lock debugging: detect incorrect freeing of live locks" + eerror " [ ] Lock debugging: prove locking correctness" + eerror " [ ] Lock usage statistics" + eerror "in 'menuconfig'" + error+=" LOCKDEP enabled;" + failed=1 + fi + + use amd64 && if ! linux_chkconfig_present COMPAT; then + eerror "${P} requires COMPAT." + eerror "Please enable the 32 bit emulation:" + eerror "Executable file formats / Emulations --->" + eerror " [*] IA32 Emulation" + eerror "in the kernel config." + eerror "if this doesn't enable CONFIG_COMPAT add" + eerror " CONFIG_COMPAT=y" + eerror "in /usr/src/linux/.config" + error+=" COMPAT disabled;" + failed=1 + fi + + kernel_is ge 2 6 37 && kernel_is le 2 6 38 && if ! linux_chkconfig_present BKL ; then + eerror "${P} requires BKL." + eerror "Please enable the Big Kernel Lock:" + eerror "Kernel hacking --->" + eerror " [*] Big Kernel Lock" + eerror "in the kernel config." + eerror "or add" + eerror " CONFIG_BKL=y" + eerror "in /usr/src/linux/.config" + error+=" BKL disabled;" + failed=1 + fi + + [[ ${failed} -ne 0 ]] && die "${error}" +} + +pkg_pretend() { + # workaround until bug 365543 is solved + linux-info_pkg_setup + require_configured_kernel + _check_kernel_config +} + +pkg_setup() { + MODULE_NAMES="fglrx(video:${S}/${FOLDER_PREFIX}/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}" + BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=\"-DMODULE -DATI -DFGL\"" + if grep -q arch_compat_alloc_user_space ${KV_DIR}/arch/x86/include/asm/compat.h ; then + BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=-DCOMPAT_ALLOC_USER_SPACE=arch_compat_alloc_user_space" + else + BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=-DCOMPAT_ALLOC_USER_SPACE=compat_alloc_user_space" + fi + + # 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 + + # Define module dir. + MODULE_DIR="${S}/${FOLDER_PREFIX}/lib/modules/fglrx/build_mod" + + elog + elog "Please note that this driver supports only graphic cards based on" + elog "r600 chipset and newer." + elog "This represent the ATI Radeon HD series at this moment." + elog + elog "If your card is older then usage of ${CATEGORY}/xf86-video-ati" + elog "as replacement is highly recommended. Rather than staying with" + elog "old versions of this driver." + elog "For migration informations please reffer to:" + elog "http://www.gentoo.org/proj/en/desktop/x/x11/ati-migration-guide.xml" + einfo +} + +src_unpack() { + if [[ $(get_major_version) -gt 8 ]]; then + # Switching to a standard way to extract the files since otherwise no signature file + # would be created + local src="${DISTDIR}/${A}" + sh "${src}" --extract "${S}" 2&>1 /dev/null + else + unpack ${A} + fi +} + +src_prepare() { + # version patches + # epatch "${FILESDIR}"/kernel/${PV}-*.patch + if use debug; then + sed -i '/^#define DRM_DEBUG_CODE/s/0/1/' \ + "${MODULE_DIR}/firegl_public.c" \ + || die "Failed to enable debug output." + fi + + cd "${MODULE_DIR}" + # bugged fglrx build system, this file should be copied by hand + cp "${ARCH_DIR}"/lib/modules/fglrx/build_mod/libfglrx_ip.a 2.6.x + + 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" + + cd "${S}" + mkdir extra || die "mkdir failed" + cd extra + unpack ./../${FOLDER_PREFIX}usr/src/ati/fglrx_sample_source.tgz +} + +src_compile() { + linux-mod_src_compile +} + +src_install() { + linux-mod_src_install +} + +pkg_postinst() { + 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." + linux-mod_pkg_postinst +} + +pkg_preinst() { + linux-mod_pkg_preinst +} + +pkg_postrm() { + linux-mod_pkg_postrm +} diff --git a/x11-drivers/ati-drivers/ati-drivers-11.12.ebuild b/x11-drivers/ati-drivers/ati-drivers-11.12.ebuild new file mode 100644 index 00000000..d009c8c1 --- /dev/null +++ b/x11-drivers/ati-drivers/ati-drivers-11.12.ebuild @@ -0,0 +1,233 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=4 + +inherit eutils multilib linux-info linux-mod toolchain-funcs versionator + +DESCRIPTION="AMD kernel drivers for r600 (HD Series) and newer chipsets" +HOMEPAGE="http://ati.amd.com" +# 8.ble will be used for beta releases. +if [[ $(get_major_version) -gt 8 ]]; then + ATI_URL="http://www2.ati.com/drivers/linux/" + SRC_URI="${ATI_URL}/ati-driver-installer-${PV/./-}-x86.x86_64.run" + FOLDER_PREFIX="common/" +else + SRC_URI="https://launchpad.net/ubuntu/natty/+source/fglrx-installer/2:${PV}-0ubuntu1/+files/fglrx-installer_${PV}.orig.tar.gz" + FOLDER_PREFIX="" +fi +IUSE="debug multilib" + +LICENSE="AMD GPL-2 as-is" +KEYWORDS="~amd64 ~x86" +SLOT="1" + +RDEPEND="multilib? ( ~x11-drivers/ati-userspace-${PV}[multilib] ) + ~x11-drivers/ati-userspace-${PV} + sys-power/acpid" +DEPEND="${RDEPEND}" + +S="${WORKDIR}" + +_check_kernel_config() { + local failed=0 + local error="" + if ! kernel_is ge 2 6; then + eerror "You need a 2.6 linux kernel to compile against!" + die "No 2.6 Kernel found" + fi + + if ! linux_chkconfig_present MTRR; then + ewarn "You don't have MTRR support enabled in the kernel." + ewarn "Direct rendering will not work." + fi + + if linux_chkconfig_builtin DRM; then + ewarn "You have DRM support built in to the kernel" + ewarn "Direct rendering will not work." + fi + + if ! linux_chkconfig_present AGP && \ + ! linux_chkconfig_present PCIEPORTBUS; then + ewarn "You don't have AGP and/or PCIe support enabled in the kernel" + ewarn "Direct rendering will not work." + fi + + if ! linux_chkconfig_present ACPI; then + eerror "${P} requires the ACPI support in the kernel" + eerror "Please enable it:" + eerror " CONFIG_ACPI=y" + eerror "in /usr/src/linux/.config or" + eerror " Power management and ACPI options --->" + eerror " [*] Power Management support" + eerror "in the 'menuconfig'" + error+=" CONFIG_ACPI disabled;" + failed=1 + fi + + if ! linux_chkconfig_present PCI_MSI; then + eerror "${P} requires MSI in the kernel." + eerror "Please enable it:" + eerror " CONFIG_PCI_MSI=y" + eerror "in /usr/src/linux/.config or" + eerror " Bus options (PCI etc.) --->" + eerror " [*] Message Signaled Interrupts (MSI and MSI-X)" + eerror "in the kernel config." + error+=" CONFIG_PCI_MSI disabled;" + failed=1 + fi + + if linux_chkconfig_present LOCKDEP; then + eerror "You've enabled LOCKDEP -- lock tracking -- in the kernel." + eerror "Unfortunately, this option exports the symbol lock_acquire as GPL-only." + eerror "This prevents ${P} from compiling with an error like this:" + eerror "FATAL: modpost: GPL-incompatible module fglrx.ko uses GPL-only symbol 'lock_acquire'" + eerror "Please make sure the following options have been unset:" + eerror " Kernel hacking --->" + eerror " [ ] Lock debugging: detect incorrect freeing of live locks" + eerror " [ ] Lock debugging: prove locking correctness" + eerror " [ ] Lock usage statistics" + eerror "in 'menuconfig'" + error+=" LOCKDEP enabled;" + failed=1 + fi + + use amd64 && if ! linux_chkconfig_present COMPAT; then + eerror "${P} requires COMPAT." + eerror "Please enable the 32 bit emulation:" + eerror "Executable file formats / Emulations --->" + eerror " [*] IA32 Emulation" + eerror "in the kernel config." + eerror "if this doesn't enable CONFIG_COMPAT add" + eerror " CONFIG_COMPAT=y" + eerror "in /usr/src/linux/.config" + error+=" COMPAT disabled;" + failed=1 + fi + + kernel_is ge 2 6 37 && kernel_is le 2 6 38 && if ! linux_chkconfig_present BKL ; then + eerror "${P} requires BKL." + eerror "Please enable the Big Kernel Lock:" + eerror "Kernel hacking --->" + eerror " [*] Big Kernel Lock" + eerror "in the kernel config." + eerror "or add" + eerror " CONFIG_BKL=y" + eerror "in /usr/src/linux/.config" + error+=" BKL disabled;" + failed=1 + fi + + [[ ${failed} -ne 0 ]] && die "${error}" +} + +pkg_pretend() { + # workaround until bug 365543 is solved + linux-info_pkg_setup + require_configured_kernel + _check_kernel_config +} + +pkg_setup() { + MODULE_NAMES="fglrx(video:${S}/${FOLDER_PREFIX}/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}" + BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=\"-DMODULE -DATI -DFGL\"" + if grep -q arch_compat_alloc_user_space ${KV_DIR}/arch/x86/include/asm/compat.h ; then + BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=-DCOMPAT_ALLOC_USER_SPACE=arch_compat_alloc_user_space" + else + BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=-DCOMPAT_ALLOC_USER_SPACE=compat_alloc_user_space" + fi + + # 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 + + # Define module dir. + MODULE_DIR="${S}/${FOLDER_PREFIX}/lib/modules/fglrx/build_mod" + + elog + elog "Please note that this driver supports only graphic cards based on" + elog "r600 chipset and newer." + elog "This represent the ATI Radeon HD series at this moment." + elog + elog "If your card is older then usage of ${CATEGORY}/xf86-video-ati" + elog "as replacement is highly recommended. Rather than staying with" + elog "old versions of this driver." + elog "For migration informations please reffer to:" + elog "http://www.gentoo.org/proj/en/desktop/x/x11/ati-migration-guide.xml" + einfo +} + +src_unpack() { + if [[ $(get_major_version) -gt 8 ]]; then + # Switching to a standard way to extract the files since otherwise no signature file + # would be created + local src="${DISTDIR}/${A}" + sh "${src}" --extract "${S}" 2&>1 /dev/null + else + unpack ${A} + fi +} + +src_prepare() { + # version patches + # epatch "${FILESDIR}"/kernel/${PV}-*.patch + if use debug; then + sed -i '/^#define DRM_DEBUG_CODE/s/0/1/' \ + "${MODULE_DIR}/firegl_public.c" \ + || die "Failed to enable debug output." + fi + + cd "${MODULE_DIR}" + # bugged fglrx build system, this file should be copied by hand + cp "${ARCH_DIR}"/lib/modules/fglrx/build_mod/libfglrx_ip.a 2.6.x + + 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" + + cd "${S}" + mkdir extra || die "mkdir failed" + cd extra + unpack ./../${FOLDER_PREFIX}usr/src/ati/fglrx_sample_source.tgz +} + +src_compile() { + linux-mod_src_compile +} + +src_install() { + linux-mod_src_install +} + +pkg_postinst() { + 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." + linux-mod_pkg_postinst +} + +pkg_preinst() { + linux-mod_pkg_preinst +} + +pkg_postrm() { + linux-mod_pkg_postrm +} diff --git a/x11-drivers/ati-drivers/ati-drivers-11.6.ebuild b/x11-drivers/ati-drivers/ati-drivers-11.6.ebuild new file mode 100644 index 00000000..5ff0deb1 --- /dev/null +++ b/x11-drivers/ati-drivers/ati-drivers-11.6.ebuild @@ -0,0 +1,236 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=4 + +inherit eutils multilib linux-info linux-mod toolchain-funcs versionator + +DESCRIPTION="AMD kernel drivers for r600 (HD Series) and newer chipsets" +HOMEPAGE="http://ati.amd.com" +# 8.ble will be used for beta releases. +if [[ $(get_major_version) -gt 8 ]]; then + ATI_URL="http://www2.ati.com/drivers/linux/" + SRC_URI="${ATI_URL}/ati-driver-installer-${PV/./-}-x86.x86_64.run" + FOLDER_PREFIX="common/" +else + SRC_URI="https://launchpad.net/ubuntu/natty/+source/fglrx-installer/2:${PV}-0ubuntu1/+files/fglrx-installer_${PV}.orig.tar.gz" + FOLDER_PREFIX="" +fi +IUSE="debug multilib" + +LICENSE="AMD GPL-2 as-is" +KEYWORDS="~amd64 ~x86" +SLOT="1" + +RDEPEND="multilib? ( ~x11-drivers/ati-userspace-${PV}[multilib] ) + ~x11-drivers/ati-userspace-${PV}" +DEPEND="${RDEPEND} + sys-power/acpid" + +S="${WORKDIR}" + +_check_kernel_config() { + local failed=0 + local error="" + if ! kernel_is ge 2 6; then + eerror "You need a 2.6 linux kernel to compile against!" + die "No 2.6 Kernel found" + fi + + if ! linux_chkconfig_present MTRR; then + ewarn "You don't have MTRR support enabled in the kernel." + ewarn "Direct rendering will not work." + fi + + if linux_chkconfig_builtin DRM; then + ewarn "You have DRM support built in to the kernel" + ewarn "Direct rendering will not work." + fi + + if ! linux_chkconfig_present AGP && \ + ! linux_chkconfig_present PCIEPORTBUS; then + ewarn "You don't have AGP and/or PCIe support enabled in the kernel" + ewarn "Direct rendering will not work." + fi + + if ! linux_chkconfig_present ACPI; then + eerror "${P} requires the ACPI support in the kernel" + eerror "Please enable it:" + eerror " CONFIG_ACPI=y" + eerror "in /usr/src/linux/.config or" + eerror " Power management and ACPI options --->" + eerror " [*] Power Management support" + eerror "in the 'menuconfig'" + error+=" CONFIG_ACPI disabled;" + failed=1 + fi + + if ! linux_chkconfig_present PCI_MSI; then + eerror "${P} requires MSI in the kernel." + eerror "Please enable it:" + eerror " CONFIG_PCI_MSI=y" + eerror "in /usr/src/linux/.config or" + eerror " Bus options (PCI etc.) --->" + eerror " [*] Message Signaled Interrupts (MSI and MSI-X)" + eerror "in the kernel config." + error+=" CONFIG_PCI_MSI disabled" + failed=1 + fi + + if linux_chkconfig_present LOCKDEP; then + eerror "You've enabled LOCKDEP -- lock tracking -- in the kernel." + eerror "Unfortunately, this option exports the symbol lock_acquire as GPL-only." + eerror "This prevents ${P} from compiling with an error like this:" + eerror "FATAL: modpost: GPL-incompatible module fglrx.ko uses GPL-only symbol 'lock_acquire'" + eerror "Please make sure the following options have been unset:" + eerror " Kernel hacking --->" + eerror " [ ] Lock debugging: detect incorrect freeing of live locks" + eerror " [ ] Lock debugging: prove locking correctness" + eerror " [ ] Lock usage statistics" + eerror "in 'menuconfig'" + error+=" LOCKDEP enabled" + failed=1 + fi + + use amd64 && if ! linux_chkconfig_present COMPAT; then + eerror "${P} requires COMPAT." + eerror "Please enable the 32 bit emulation:" + eerror "Executable file formats / Emulations --->" + eerror " [*] IA32 Emulation" + eerror "in the kernel config." + eerror "if this doesn't enable CONFIG_COMPAT add" + eerror " CONFIG_COMPAT=y" + eerror "in /usr/src/linux/.config" + error+=" COMPAT disabled" + failed=1 + fi + + kernel_is le 2 6 38 && kernel_is ge 2 6 37 && if ! linux_chkconfig_present BKL ; then + eerror "${P} requires BKL." + eerror "Please enable the Big Kernel Lock:" + eerror "Kernel hacking --->" + eerror " [*] Big Kernel Lock" + eerror "in the kernel config." + eerror "or add" + eerror " CONFIG_BKL=y" + eerror "in /usr/src/linux/.config" + error+=" BKL disabled" + failed=1 + fi + + [ ${failed} -ne 0 ] && die "${error}" +} + +pkg_pretend() { + # workaround until bug 365543 is solved + linux-info_pkg_setup + require_configured_kernel + _check_kernel_config +} + +pkg_setup() { + MODULE_NAMES="fglrx(video:${S}/${FOLDER_PREFIX}/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}" + BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=\"-DMODULE -DATI -DFGL\"" + if grep -q arch_compat_alloc_user_space ${KV_DIR}/arch/x86/include/asm/compat.h ; then + BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=-DCOMPAT_ALLOC_USER_SPACE=arch_compat_alloc_user_space" + else + BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=-DCOMPAT_ALLOC_USER_SPACE=compat_alloc_user_space" + fi + + # 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 + + # Define module dir. + MODULE_DIR="${S}/${FOLDER_PREFIX}/lib/modules/fglrx/build_mod" + + elog + elog "Please note that this driver supports only graphic cards based on" + elog "r600 chipset and newer." + elog "This represent the ATI Radeon HD series at this moment." + elog + elog "If your card is older then usage of ${CATEGORY}/xf86-video-ati" + elog "as replacement is highly recommended. Rather than staying with" + elog "old versions of this driver." + elog "For migration informations please reffer to:" + elog "http://www.gentoo.org/proj/en/desktop/x/x11/ati-migration-guide.xml" + einfo +} + +src_unpack() { + if [[ $(get_major_version) -gt 8 ]]; then + # Switching to a standard way to extract the files since otherwise no signature file + # would be created + local src="${DISTDIR}/${A}" + sh "${src}" --extract "${S}" 2&>1 /dev/null + else + unpack ${A} + fi +} + +src_prepare() { + # version patches + # epatch "${FILESDIR}"/kernel/${PV}-*.patch + if use debug; then + sed -i '/^#define DRM_DEBUG_CODE/s/0/1/' \ + "${MODULE_DIR}/firegl_public.c" \ + || die "Failed to enable debug output." + fi + + cd "${MODULE_DIR}" + # bugged fglrx build system, this file should be copied by hand + cp "${ARCH_DIR}"/lib/modules/fglrx/build_mod/libfglrx_ip.a 2.6.x + + # Add 2.6.39 support + epatch "${FILESDIR}"/ati-drivers-2.6.39.patch + + 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" + + cd "${S}" + mkdir extra || die "mkdir failed" + cd extra + unpack ./../${FOLDER_PREFIX}usr/src/ati/fglrx_sample_source.tgz +} + +src_compile() { + linux-mod_src_compile +} + +src_install() { + linux-mod_src_install +} + +pkg_postinst() { + 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." + linux-mod_pkg_postinst +} + +pkg_preinst() { + linux-mod_pkg_preinst +} + +pkg_postrm() { + linux-mod_pkg_postrm +} diff --git a/x11-drivers/ati-drivers/ati-drivers-11.8.ebuild b/x11-drivers/ati-drivers/ati-drivers-11.8.ebuild new file mode 100644 index 00000000..d009c8c1 --- /dev/null +++ b/x11-drivers/ati-drivers/ati-drivers-11.8.ebuild @@ -0,0 +1,233 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=4 + +inherit eutils multilib linux-info linux-mod toolchain-funcs versionator + +DESCRIPTION="AMD kernel drivers for r600 (HD Series) and newer chipsets" +HOMEPAGE="http://ati.amd.com" +# 8.ble will be used for beta releases. +if [[ $(get_major_version) -gt 8 ]]; then + ATI_URL="http://www2.ati.com/drivers/linux/" + SRC_URI="${ATI_URL}/ati-driver-installer-${PV/./-}-x86.x86_64.run" + FOLDER_PREFIX="common/" +else + SRC_URI="https://launchpad.net/ubuntu/natty/+source/fglrx-installer/2:${PV}-0ubuntu1/+files/fglrx-installer_${PV}.orig.tar.gz" + FOLDER_PREFIX="" +fi +IUSE="debug multilib" + +LICENSE="AMD GPL-2 as-is" +KEYWORDS="~amd64 ~x86" +SLOT="1" + +RDEPEND="multilib? ( ~x11-drivers/ati-userspace-${PV}[multilib] ) + ~x11-drivers/ati-userspace-${PV} + sys-power/acpid" +DEPEND="${RDEPEND}" + +S="${WORKDIR}" + +_check_kernel_config() { + local failed=0 + local error="" + if ! kernel_is ge 2 6; then + eerror "You need a 2.6 linux kernel to compile against!" + die "No 2.6 Kernel found" + fi + + if ! linux_chkconfig_present MTRR; then + ewarn "You don't have MTRR support enabled in the kernel." + ewarn "Direct rendering will not work." + fi + + if linux_chkconfig_builtin DRM; then + ewarn "You have DRM support built in to the kernel" + ewarn "Direct rendering will not work." + fi + + if ! linux_chkconfig_present AGP && \ + ! linux_chkconfig_present PCIEPORTBUS; then + ewarn "You don't have AGP and/or PCIe support enabled in the kernel" + ewarn "Direct rendering will not work." + fi + + if ! linux_chkconfig_present ACPI; then + eerror "${P} requires the ACPI support in the kernel" + eerror "Please enable it:" + eerror " CONFIG_ACPI=y" + eerror "in /usr/src/linux/.config or" + eerror " Power management and ACPI options --->" + eerror " [*] Power Management support" + eerror "in the 'menuconfig'" + error+=" CONFIG_ACPI disabled;" + failed=1 + fi + + if ! linux_chkconfig_present PCI_MSI; then + eerror "${P} requires MSI in the kernel." + eerror "Please enable it:" + eerror " CONFIG_PCI_MSI=y" + eerror "in /usr/src/linux/.config or" + eerror " Bus options (PCI etc.) --->" + eerror " [*] Message Signaled Interrupts (MSI and MSI-X)" + eerror "in the kernel config." + error+=" CONFIG_PCI_MSI disabled;" + failed=1 + fi + + if linux_chkconfig_present LOCKDEP; then + eerror "You've enabled LOCKDEP -- lock tracking -- in the kernel." + eerror "Unfortunately, this option exports the symbol lock_acquire as GPL-only." + eerror "This prevents ${P} from compiling with an error like this:" + eerror "FATAL: modpost: GPL-incompatible module fglrx.ko uses GPL-only symbol 'lock_acquire'" + eerror "Please make sure the following options have been unset:" + eerror " Kernel hacking --->" + eerror " [ ] Lock debugging: detect incorrect freeing of live locks" + eerror " [ ] Lock debugging: prove locking correctness" + eerror " [ ] Lock usage statistics" + eerror "in 'menuconfig'" + error+=" LOCKDEP enabled;" + failed=1 + fi + + use amd64 && if ! linux_chkconfig_present COMPAT; then + eerror "${P} requires COMPAT." + eerror "Please enable the 32 bit emulation:" + eerror "Executable file formats / Emulations --->" + eerror " [*] IA32 Emulation" + eerror "in the kernel config." + eerror "if this doesn't enable CONFIG_COMPAT add" + eerror " CONFIG_COMPAT=y" + eerror "in /usr/src/linux/.config" + error+=" COMPAT disabled;" + failed=1 + fi + + kernel_is ge 2 6 37 && kernel_is le 2 6 38 && if ! linux_chkconfig_present BKL ; then + eerror "${P} requires BKL." + eerror "Please enable the Big Kernel Lock:" + eerror "Kernel hacking --->" + eerror " [*] Big Kernel Lock" + eerror "in the kernel config." + eerror "or add" + eerror " CONFIG_BKL=y" + eerror "in /usr/src/linux/.config" + error+=" BKL disabled;" + failed=1 + fi + + [[ ${failed} -ne 0 ]] && die "${error}" +} + +pkg_pretend() { + # workaround until bug 365543 is solved + linux-info_pkg_setup + require_configured_kernel + _check_kernel_config +} + +pkg_setup() { + MODULE_NAMES="fglrx(video:${S}/${FOLDER_PREFIX}/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}" + BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=\"-DMODULE -DATI -DFGL\"" + if grep -q arch_compat_alloc_user_space ${KV_DIR}/arch/x86/include/asm/compat.h ; then + BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=-DCOMPAT_ALLOC_USER_SPACE=arch_compat_alloc_user_space" + else + BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=-DCOMPAT_ALLOC_USER_SPACE=compat_alloc_user_space" + fi + + # 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 + + # Define module dir. + MODULE_DIR="${S}/${FOLDER_PREFIX}/lib/modules/fglrx/build_mod" + + elog + elog "Please note that this driver supports only graphic cards based on" + elog "r600 chipset and newer." + elog "This represent the ATI Radeon HD series at this moment." + elog + elog "If your card is older then usage of ${CATEGORY}/xf86-video-ati" + elog "as replacement is highly recommended. Rather than staying with" + elog "old versions of this driver." + elog "For migration informations please reffer to:" + elog "http://www.gentoo.org/proj/en/desktop/x/x11/ati-migration-guide.xml" + einfo +} + +src_unpack() { + if [[ $(get_major_version) -gt 8 ]]; then + # Switching to a standard way to extract the files since otherwise no signature file + # would be created + local src="${DISTDIR}/${A}" + sh "${src}" --extract "${S}" 2&>1 /dev/null + else + unpack ${A} + fi +} + +src_prepare() { + # version patches + # epatch "${FILESDIR}"/kernel/${PV}-*.patch + if use debug; then + sed -i '/^#define DRM_DEBUG_CODE/s/0/1/' \ + "${MODULE_DIR}/firegl_public.c" \ + || die "Failed to enable debug output." + fi + + cd "${MODULE_DIR}" + # bugged fglrx build system, this file should be copied by hand + cp "${ARCH_DIR}"/lib/modules/fglrx/build_mod/libfglrx_ip.a 2.6.x + + 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" + + cd "${S}" + mkdir extra || die "mkdir failed" + cd extra + unpack ./../${FOLDER_PREFIX}usr/src/ati/fglrx_sample_source.tgz +} + +src_compile() { + linux-mod_src_compile +} + +src_install() { + linux-mod_src_install +} + +pkg_postinst() { + 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." + linux-mod_pkg_postinst +} + +pkg_preinst() { + linux-mod_pkg_preinst +} + +pkg_postrm() { + linux-mod_pkg_postrm +} diff --git a/x11-drivers/ati-drivers/ati-drivers-11.9.ebuild b/x11-drivers/ati-drivers/ati-drivers-11.9.ebuild new file mode 100644 index 00000000..d009c8c1 --- /dev/null +++ b/x11-drivers/ati-drivers/ati-drivers-11.9.ebuild @@ -0,0 +1,233 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=4 + +inherit eutils multilib linux-info linux-mod toolchain-funcs versionator + +DESCRIPTION="AMD kernel drivers for r600 (HD Series) and newer chipsets" +HOMEPAGE="http://ati.amd.com" +# 8.ble will be used for beta releases. +if [[ $(get_major_version) -gt 8 ]]; then + ATI_URL="http://www2.ati.com/drivers/linux/" + SRC_URI="${ATI_URL}/ati-driver-installer-${PV/./-}-x86.x86_64.run" + FOLDER_PREFIX="common/" +else + SRC_URI="https://launchpad.net/ubuntu/natty/+source/fglrx-installer/2:${PV}-0ubuntu1/+files/fglrx-installer_${PV}.orig.tar.gz" + FOLDER_PREFIX="" +fi +IUSE="debug multilib" + +LICENSE="AMD GPL-2 as-is" +KEYWORDS="~amd64 ~x86" +SLOT="1" + +RDEPEND="multilib? ( ~x11-drivers/ati-userspace-${PV}[multilib] ) + ~x11-drivers/ati-userspace-${PV} + sys-power/acpid" +DEPEND="${RDEPEND}" + +S="${WORKDIR}" + +_check_kernel_config() { + local failed=0 + local error="" + if ! kernel_is ge 2 6; then + eerror "You need a 2.6 linux kernel to compile against!" + die "No 2.6 Kernel found" + fi + + if ! linux_chkconfig_present MTRR; then + ewarn "You don't have MTRR support enabled in the kernel." + ewarn "Direct rendering will not work." + fi + + if linux_chkconfig_builtin DRM; then + ewarn "You have DRM support built in to the kernel" + ewarn "Direct rendering will not work." + fi + + if ! linux_chkconfig_present AGP && \ + ! linux_chkconfig_present PCIEPORTBUS; then + ewarn "You don't have AGP and/or PCIe support enabled in the kernel" + ewarn "Direct rendering will not work." + fi + + if ! linux_chkconfig_present ACPI; then + eerror "${P} requires the ACPI support in the kernel" + eerror "Please enable it:" + eerror " CONFIG_ACPI=y" + eerror "in /usr/src/linux/.config or" + eerror " Power management and ACPI options --->" + eerror " [*] Power Management support" + eerror "in the 'menuconfig'" + error+=" CONFIG_ACPI disabled;" + failed=1 + fi + + if ! linux_chkconfig_present PCI_MSI; then + eerror "${P} requires MSI in the kernel." + eerror "Please enable it:" + eerror " CONFIG_PCI_MSI=y" + eerror "in /usr/src/linux/.config or" + eerror " Bus options (PCI etc.) --->" + eerror " [*] Message Signaled Interrupts (MSI and MSI-X)" + eerror "in the kernel config." + error+=" CONFIG_PCI_MSI disabled;" + failed=1 + fi + + if linux_chkconfig_present LOCKDEP; then + eerror "You've enabled LOCKDEP -- lock tracking -- in the kernel." + eerror "Unfortunately, this option exports the symbol lock_acquire as GPL-only." + eerror "This prevents ${P} from compiling with an error like this:" + eerror "FATAL: modpost: GPL-incompatible module fglrx.ko uses GPL-only symbol 'lock_acquire'" + eerror "Please make sure the following options have been unset:" + eerror " Kernel hacking --->" + eerror " [ ] Lock debugging: detect incorrect freeing of live locks" + eerror " [ ] Lock debugging: prove locking correctness" + eerror " [ ] Lock usage statistics" + eerror "in 'menuconfig'" + error+=" LOCKDEP enabled;" + failed=1 + fi + + use amd64 && if ! linux_chkconfig_present COMPAT; then + eerror "${P} requires COMPAT." + eerror "Please enable the 32 bit emulation:" + eerror "Executable file formats / Emulations --->" + eerror " [*] IA32 Emulation" + eerror "in the kernel config." + eerror "if this doesn't enable CONFIG_COMPAT add" + eerror " CONFIG_COMPAT=y" + eerror "in /usr/src/linux/.config" + error+=" COMPAT disabled;" + failed=1 + fi + + kernel_is ge 2 6 37 && kernel_is le 2 6 38 && if ! linux_chkconfig_present BKL ; then + eerror "${P} requires BKL." + eerror "Please enable the Big Kernel Lock:" + eerror "Kernel hacking --->" + eerror " [*] Big Kernel Lock" + eerror "in the kernel config." + eerror "or add" + eerror " CONFIG_BKL=y" + eerror "in /usr/src/linux/.config" + error+=" BKL disabled;" + failed=1 + fi + + [[ ${failed} -ne 0 ]] && die "${error}" +} + +pkg_pretend() { + # workaround until bug 365543 is solved + linux-info_pkg_setup + require_configured_kernel + _check_kernel_config +} + +pkg_setup() { + MODULE_NAMES="fglrx(video:${S}/${FOLDER_PREFIX}/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}" + BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=\"-DMODULE -DATI -DFGL\"" + if grep -q arch_compat_alloc_user_space ${KV_DIR}/arch/x86/include/asm/compat.h ; then + BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=-DCOMPAT_ALLOC_USER_SPACE=arch_compat_alloc_user_space" + else + BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=-DCOMPAT_ALLOC_USER_SPACE=compat_alloc_user_space" + fi + + # 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 + + # Define module dir. + MODULE_DIR="${S}/${FOLDER_PREFIX}/lib/modules/fglrx/build_mod" + + elog + elog "Please note that this driver supports only graphic cards based on" + elog "r600 chipset and newer." + elog "This represent the ATI Radeon HD series at this moment." + elog + elog "If your card is older then usage of ${CATEGORY}/xf86-video-ati" + elog "as replacement is highly recommended. Rather than staying with" + elog "old versions of this driver." + elog "For migration informations please reffer to:" + elog "http://www.gentoo.org/proj/en/desktop/x/x11/ati-migration-guide.xml" + einfo +} + +src_unpack() { + if [[ $(get_major_version) -gt 8 ]]; then + # Switching to a standard way to extract the files since otherwise no signature file + # would be created + local src="${DISTDIR}/${A}" + sh "${src}" --extract "${S}" 2&>1 /dev/null + else + unpack ${A} + fi +} + +src_prepare() { + # version patches + # epatch "${FILESDIR}"/kernel/${PV}-*.patch + if use debug; then + sed -i '/^#define DRM_DEBUG_CODE/s/0/1/' \ + "${MODULE_DIR}/firegl_public.c" \ + || die "Failed to enable debug output." + fi + + cd "${MODULE_DIR}" + # bugged fglrx build system, this file should be copied by hand + cp "${ARCH_DIR}"/lib/modules/fglrx/build_mod/libfglrx_ip.a 2.6.x + + 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" + + cd "${S}" + mkdir extra || die "mkdir failed" + cd extra + unpack ./../${FOLDER_PREFIX}usr/src/ati/fglrx_sample_source.tgz +} + +src_compile() { + linux-mod_src_compile +} + +src_install() { + linux-mod_src_install +} + +pkg_postinst() { + 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." + linux-mod_pkg_postinst +} + +pkg_preinst() { + linux-mod_pkg_preinst +} + +pkg_postrm() { + linux-mod_pkg_postrm +} diff --git a/x11-drivers/ati-drivers/ati-drivers-12.1-r1.ebuild b/x11-drivers/ati-drivers/ati-drivers-12.1-r1.ebuild new file mode 100644 index 00000000..747e5e1d --- /dev/null +++ b/x11-drivers/ati-drivers/ati-drivers-12.1-r1.ebuild @@ -0,0 +1,236 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=4 + +inherit eutils multilib linux-info linux-mod toolchain-funcs versionator + +DESCRIPTION="AMD kernel drivers for radeon r600 (HD Series) and newer chipsets" +HOMEPAGE="http://www.amd.com" +# 8.ble will be used for beta releases. +if [[ $(get_major_version) -gt 8 ]]; then + ATI_URL="http://www2.ati.com/drivers/linux/" + SRC_URI="${ATI_URL}/amd-driver-installer-${PV/./-}-x86.x86_64.run" + FOLDER_PREFIX="common/" +else + SRC_URI="https://launchpad.net/ubuntu/natty/+source/fglrx-installer/2:${PV}-0ubuntu1/+files/fglrx-installer_${PV}.orig.tar.gz" + FOLDER_PREFIX="" +fi +IUSE="debug multilib pax_kernel" + +LICENSE="AMD GPL-2 as-is" +KEYWORDS="~amd64 ~x86" +SLOT="1" + +RDEPEND="multilib? ( ~x11-drivers/ati-userspace-${PV}[multilib] ) + ~x11-drivers/ati-userspace-${PV} + sys-power/acpid" +DEPEND="${RDEPEND}" + +S="${WORKDIR}" + +_check_kernel_config() { + local failed=0 + local error="" + if ! kernel_is ge 2 6; then + eerror "You need a 2.6 linux kernel to compile against!" + die "No 2.6 Kernel found" + fi + + if ! linux_chkconfig_present MTRR; then + ewarn "You don't have MTRR support enabled in the kernel." + ewarn "Direct rendering will not work." + fi + + if linux_chkconfig_builtin DRM; then + ewarn "You have DRM support built in to the kernel" + ewarn "Direct rendering will not work." + fi + + if ! linux_chkconfig_present AGP && \ + ! linux_chkconfig_present PCIEPORTBUS; then + ewarn "You don't have AGP and/or PCIe support enabled in the kernel" + ewarn "Direct rendering will not work." + fi + + if ! linux_chkconfig_present ACPI; then + eerror "${P} requires the ACPI support in the kernel" + eerror "Please enable it:" + eerror " CONFIG_ACPI=y" + eerror "in /usr/src/linux/.config or" + eerror " Power management and ACPI options --->" + eerror " [*] Power Management support" + eerror "in the 'menuconfig'" + error+=" CONFIG_ACPI disabled;" + failed=1 + fi + + if ! linux_chkconfig_present PCI_MSI; then + eerror "${P} requires MSI in the kernel." + eerror "Please enable it:" + eerror " CONFIG_PCI_MSI=y" + eerror "in /usr/src/linux/.config or" + eerror " Bus options (PCI etc.) --->" + eerror " [*] Message Signaled Interrupts (MSI and MSI-X)" + eerror "in the kernel config." + error+=" CONFIG_PCI_MSI disabled;" + failed=1 + fi + + if linux_chkconfig_present LOCKDEP; then + eerror "You've enabled LOCKDEP -- lock tracking -- in the kernel." + eerror "Unfortunately, this option exports the symbol lock_acquire as GPL-only." + eerror "This prevents ${P} from compiling with an error like this:" + eerror "FATAL: modpost: GPL-incompatible module fglrx.ko uses GPL-only symbol 'lock_acquire'" + eerror "Please make sure the following options have been unset:" + eerror " Kernel hacking --->" + eerror " [ ] Lock debugging: detect incorrect freeing of live locks" + eerror " [ ] Lock debugging: prove locking correctness" + eerror " [ ] Lock usage statistics" + eerror "in 'menuconfig'" + error+=" LOCKDEP enabled;" + failed=1 + fi + + use amd64 && if ! linux_chkconfig_present COMPAT; then + eerror "${P} requires COMPAT." + eerror "Please enable the 32 bit emulation:" + eerror "Executable file formats / Emulations --->" + eerror " [*] IA32 Emulation" + eerror "in the kernel config." + eerror "if this doesn't enable CONFIG_COMPAT add" + eerror " CONFIG_COMPAT=y" + eerror "in /usr/src/linux/.config" + error+=" COMPAT disabled;" + failed=1 + fi + + kernel_is ge 2 6 37 && kernel_is le 2 6 38 && if ! linux_chkconfig_present BKL ; then + eerror "${P} requires BKL." + eerror "Please enable the Big Kernel Lock:" + eerror "Kernel hacking --->" + eerror " [*] Big Kernel Lock" + eerror "in the kernel config." + eerror "or add" + eerror " CONFIG_BKL=y" + eerror "in /usr/src/linux/.config" + error+=" BKL disabled;" + failed=1 + fi + + [[ ${failed} -ne 0 ]] && die "${error}" +} + +pkg_pretend() { + # workaround until bug 365543 is solved + linux-info_pkg_setup + require_configured_kernel + _check_kernel_config +} + +pkg_setup() { + MODULE_NAMES="fglrx(video:${S}/${FOLDER_PREFIX}/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}" + BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=\"-DMODULE -DATI -DFGL\"" + if grep -q arch_compat_alloc_user_space ${KV_DIR}/arch/x86/include/asm/compat.h ; then + BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=-DCOMPAT_ALLOC_USER_SPACE=arch_compat_alloc_user_space" + else + BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=-DCOMPAT_ALLOC_USER_SPACE=compat_alloc_user_space" + fi + + # 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 + + # Define module dir. + MODULE_DIR="${S}/${FOLDER_PREFIX}/lib/modules/fglrx/build_mod" + + elog + elog "Please note that this driver supports only graphic cards based on" + elog "r600 chipset and newer." + elog "This represent the AMD Radeon HD series at this moment." + elog + elog "If your card is older then usage of ${CATEGORY}/xf86-video-ati" + elog "as replacement is highly recommended. Rather than staying with" + elog "old versions of this driver." + elog "For migration informations please reffer to:" + elog "http://www.gentoo.org/proj/en/desktop/x/x11/ati-migration-guide.xml" + einfo +} + +src_unpack() { + if [[ $(get_major_version) -gt 8 ]]; then + # Switching to a standard way to extract the files since otherwise no signature file + # would be created + local src="${DISTDIR}/${A}" + sh "${src}" --extract "${S}" 2&>1 /dev/null + else + unpack ${A} + fi +} + +src_prepare() { + # version patches + # epatch "${FILESDIR}"/kernel/${PV}-*.patch + if use debug; then + sed -i '/^#define DRM_DEBUG_CODE/s/0/1/' \ + "${MODULE_DIR}/firegl_public.c" \ + || die "Failed to enable debug output." + fi + + # fix needed for at least hardened-sources, see bug #392753 + use pax_kernel && epatch "${FILESDIR}"/ati-drivers-redefine-WARN.patch + + cd "${MODULE_DIR}" + # bugged fglrx build system, this file should be copied by hand + cp "${ARCH_DIR}"/lib/modules/fglrx/build_mod/libfglrx_ip.a 2.6.x + + 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" + + cd "${S}" + mkdir extra || die "mkdir failed" + cd extra + unpack ./../${FOLDER_PREFIX}usr/src/ati/fglrx_sample_source.tgz +} + +src_compile() { + linux-mod_src_compile +} + +src_install() { + linux-mod_src_install +} + +pkg_postinst() { + 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." + linux-mod_pkg_postinst +} + +pkg_preinst() { + linux-mod_pkg_preinst +} + +pkg_postrm() { + linux-mod_pkg_postrm +} diff --git a/x11-drivers/ati-drivers/ati-drivers-12.10.ebuild b/x11-drivers/ati-drivers/ati-drivers-12.10.ebuild new file mode 100644 index 00000000..842b2f58 --- /dev/null +++ b/x11-drivers/ati-drivers/ati-drivers-12.10.ebuild @@ -0,0 +1,240 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=4 + +inherit eutils multilib linux-info linux-mod toolchain-funcs versionator + +DESCRIPTION="AMD kernel drivers for radeon r600 (HD5000 Series) and newer chipsets" +HOMEPAGE="http://www.amd.com" +MY_V=( $(get_version_components) ) +#RUN="${WORKDIR}/amd-driver-installer-9.00-x86.x86_64.run" +SRC_URI="http://www2.ati.com/drivers/linux/amd-driver-installer-catalyst-${PV}-x86.x86_64.zip" +FOLDER_PREFIX="common/" +IUSE="debug multilib x-multilib pax_kernel" + +LICENSE="AMD GPL-2 as-is" +KEYWORDS="~amd64 ~x86" +SLOT="1" + +RDEPEND="x-multilib? ( ~x11-drivers/ati-userspace-${PV}[x-multilib] ) + multilib? ( ~x11-drivers/ati-userspace-${PV}[multilib] ) + ~x11-drivers/ati-userspace-${PV} + sys-power/acpid" +DEPEND="${RDEPEND}" + +S="${WORKDIR}" + +_check_kernel_config() { + local failed=0 + local error="" + if ! kernel_is ge 2 6; then + eerror "You need a 2.6 linux kernel to compile against!" + die "No 2.6 Kernel found" + fi + + if ! linux_chkconfig_present MTRR; then + ewarn "You don't have MTRR support enabled in the kernel." + ewarn "Direct rendering will not work." + fi + + if linux_chkconfig_builtin DRM; then + ewarn "You have DRM support built in to the kernel" + ewarn "Direct rendering will not work." + fi + + if ! linux_chkconfig_present AGP && \ + ! linux_chkconfig_present PCIEPORTBUS; then + ewarn "You don't have AGP and/or PCIe support enabled in the kernel" + ewarn "Direct rendering will not work." + fi + + if ! linux_chkconfig_present ACPI; then + eerror "${P} requires the ACPI support in the kernel" + eerror "Please enable it:" + eerror " CONFIG_ACPI=y" + eerror "in /usr/src/linux/.config or" + eerror " Power management and ACPI options --->" + eerror " [*] Power Management support" + eerror "in the 'menuconfig'" + error+=" CONFIG_ACPI disabled;" + failed=1 + fi + + if ! linux_chkconfig_present PCI_MSI; then + eerror "${P} requires MSI in the kernel." + eerror "Please enable it:" + eerror " CONFIG_PCI_MSI=y" + eerror "in /usr/src/linux/.config or" + eerror " Bus options (PCI etc.) --->" + eerror " [*] Message Signaled Interrupts (MSI and MSI-X)" + eerror "in the kernel config." + error+=" CONFIG_PCI_MSI disabled;" + failed=1 + fi + + if linux_chkconfig_present LOCKDEP; then + eerror "You've enabled LOCKDEP -- lock tracking -- in the kernel." + eerror "Unfortunately, this option exports the symbol lock_acquire as GPL-only." + eerror "This prevents ${P} from compiling with an error like this:" + eerror "FATAL: modpost: GPL-incompatible module fglrx.ko uses GPL-only symbol 'lock_acquire'" + eerror "Please make sure the following options have been unset:" + eerror " Kernel hacking --->" + eerror " [ ] Lock debugging: detect incorrect freeing of live locks" + eerror " [ ] Lock debugging: prove locking correctness" + eerror " [ ] Lock usage statistics" + eerror "in 'menuconfig'" + error+=" LOCKDEP enabled;" + failed=1 + fi + + use amd64 && if ! linux_chkconfig_present COMPAT; then + eerror "${P} requires COMPAT." + eerror "Please enable the 32 bit emulation:" + eerror "Executable file formats / Emulations --->" + eerror " [*] IA32 Emulation" + eerror "in the kernel config." + eerror "if this doesn't enable CONFIG_COMPAT add" + eerror " CONFIG_COMPAT=y" + eerror "in /usr/src/linux/.config" + error+=" COMPAT disabled;" + failed=1 + fi + + kernel_is ge 2 6 37 && kernel_is le 2 6 38 && if ! linux_chkconfig_present BKL ; then + eerror "${P} requires BKL." + eerror "Please enable the Big Kernel Lock:" + eerror "Kernel hacking --->" + eerror " [*] Big Kernel Lock" + eerror "in the kernel config." + eerror "or add" + eerror " CONFIG_BKL=y" + eerror "in /usr/src/linux/.config" + error+=" BKL disabled;" + failed=1 + fi + + [[ ${failed} -ne 0 ]] && die "${error}" +} + +pkg_pretend() { + # workaround until bug 365543 is solved + linux-info_pkg_setup + require_configured_kernel + _check_kernel_config +} + +pkg_setup() { + MODULE_NAMES="fglrx(video:${S}/${FOLDER_PREFIX}/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}" + BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=\"-DMODULE -DATI -DFGL\"" + if grep -q arch_compat_alloc_user_space ${KV_DIR}/arch/x86/include/asm/compat.h ; then + BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=-DCOMPAT_ALLOC_USER_SPACE=arch_compat_alloc_user_space" + else + BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=-DCOMPAT_ALLOC_USER_SPACE=compat_alloc_user_space" + fi + + # 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 + + # Define module dir. + MODULE_DIR="${S}/${FOLDER_PREFIX}/lib/modules/fglrx/build_mod" + + elog + elog "Please note that this driver supports only graphic cards based on" + elog "Evergreen chipset and newer." + elog "This represent 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 informations please reffer to:" + elog "http://www.gentoo.org/proj/en/desktop/x/x11/ati-migration-guide.xml" + einfo +} + +src_unpack() { + if [[ ${A} =~ .*\.tar\.gz ]]; then + unpack ${A} + else + #please note, RUN may be insanely assigned at top near SRC_URI + if [[ ${A} =~ .*\.zip ]]; then + unpack ${A} + [[ -z "$RUN" ]] && RUN="${S}/${A/%.zip/.run}" + else + RUN="${DISTDIR}/${A}" + fi + sh ${RUN} --extract "${S}" 2>&1 > /dev/null || die + fi +} + +src_prepare() { + # version patches + # epatch "${FILESDIR}"/kernel/${PV}-*.patch + if use debug; then + sed -i '/^#define DRM_DEBUG_CODE/s/0/1/' \ + "${MODULE_DIR}/firegl_public.c" \ + || die "Failed to enable debug output." + fi + + # 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 linux-3.7 + # https://bugs.gentoo.org/show_bug.cgi?id=438516 + epatch "${FILESDIR}/ati-drivers-vm-reserverd.patch" + + cd "${MODULE_DIR}" + # bugged fglrx build system, this file should be copied by hand + cp "${ARCH_DIR}"/lib/modules/fglrx/build_mod/libfglrx_ip.a 2.6.x + + 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" + + cd "${S}" + mkdir extra || die "mkdir failed" + cd extra + unpack ./../${FOLDER_PREFIX}usr/src/ati/fglrx_sample_source.tgz +} + +src_compile() { + linux-mod_src_compile +} + +src_install() { + linux-mod_src_install +} + +pkg_postinst() { + 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." + linux-mod_pkg_postinst +} + +pkg_preinst() { + linux-mod_pkg_preinst +} + +pkg_postrm() { + linux-mod_pkg_postrm +} diff --git a/x11-drivers/ati-drivers/ati-drivers-12.2.ebuild b/x11-drivers/ati-drivers/ati-drivers-12.2.ebuild new file mode 100644 index 00000000..4a971613 --- /dev/null +++ b/x11-drivers/ati-drivers/ati-drivers-12.2.ebuild @@ -0,0 +1,239 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=4 + +inherit eutils multilib linux-info linux-mod toolchain-funcs versionator + +DESCRIPTION="AMD kernel drivers for radeon r600 (HD Series) and newer chipsets" +HOMEPAGE="http://www.amd.com" +# 8.ble will be used for beta releases. +if [[ $(get_major_version) -gt 8 ]]; then + ATI_URL="http://www2.ati.com/drivers/linux/" + SRC_URI="${ATI_URL}/amd-driver-installer-${PV/./-}-x86.x86_64.run" + FOLDER_PREFIX="common/" +else + SRC_URI="https://launchpad.net/ubuntu/natty/+source/fglrx-installer/2:${PV}-0ubuntu1/+files/fglrx-installer_${PV}.orig.tar.gz" + FOLDER_PREFIX="" +fi +IUSE="debug multilib pax_kernel" + +LICENSE="AMD GPL-2 as-is" +KEYWORDS="~amd64 ~x86" +SLOT="1" + +RDEPEND="multilib? ( ~x11-drivers/ati-userspace-${PV}[multilib] ) + ~x11-drivers/ati-userspace-${PV} + sys-power/acpid" +DEPEND="${RDEPEND}" + +S="${WORKDIR}" + +_check_kernel_config() { + local failed=0 + local error="" + if ! kernel_is ge 2 6; then + eerror "You need a 2.6 linux kernel to compile against!" + die "No 2.6 Kernel found" + fi + + if ! linux_chkconfig_present MTRR; then + ewarn "You don't have MTRR support enabled in the kernel." + ewarn "Direct rendering will not work." + fi + + if linux_chkconfig_builtin DRM; then + ewarn "You have DRM support built in to the kernel" + ewarn "Direct rendering will not work." + fi + + if ! linux_chkconfig_present AGP && \ + ! linux_chkconfig_present PCIEPORTBUS; then + ewarn "You don't have AGP and/or PCIe support enabled in the kernel" + ewarn "Direct rendering will not work." + fi + + if ! linux_chkconfig_present ACPI; then + eerror "${P} requires the ACPI support in the kernel" + eerror "Please enable it:" + eerror " CONFIG_ACPI=y" + eerror "in /usr/src/linux/.config or" + eerror " Power management and ACPI options --->" + eerror " [*] Power Management support" + eerror "in the 'menuconfig'" + error+=" CONFIG_ACPI disabled;" + failed=1 + fi + + if ! linux_chkconfig_present PCI_MSI; then + eerror "${P} requires MSI in the kernel." + eerror "Please enable it:" + eerror " CONFIG_PCI_MSI=y" + eerror "in /usr/src/linux/.config or" + eerror " Bus options (PCI etc.) --->" + eerror " [*] Message Signaled Interrupts (MSI and MSI-X)" + eerror "in the kernel config." + error+=" CONFIG_PCI_MSI disabled;" + failed=1 + fi + + if linux_chkconfig_present LOCKDEP; then + eerror "You've enabled LOCKDEP -- lock tracking -- in the kernel." + eerror "Unfortunately, this option exports the symbol lock_acquire as GPL-only." + eerror "This prevents ${P} from compiling with an error like this:" + eerror "FATAL: modpost: GPL-incompatible module fglrx.ko uses GPL-only symbol 'lock_acquire'" + eerror "Please make sure the following options have been unset:" + eerror " Kernel hacking --->" + eerror " [ ] Lock debugging: detect incorrect freeing of live locks" + eerror " [ ] Lock debugging: prove locking correctness" + eerror " [ ] Lock usage statistics" + eerror "in 'menuconfig'" + error+=" LOCKDEP enabled;" + failed=1 + fi + + use amd64 && if ! linux_chkconfig_present COMPAT; then + eerror "${P} requires COMPAT." + eerror "Please enable the 32 bit emulation:" + eerror "Executable file formats / Emulations --->" + eerror " [*] IA32 Emulation" + eerror "in the kernel config." + eerror "if this doesn't enable CONFIG_COMPAT add" + eerror " CONFIG_COMPAT=y" + eerror "in /usr/src/linux/.config" + error+=" COMPAT disabled;" + failed=1 + fi + + kernel_is ge 2 6 37 && kernel_is le 2 6 38 && if ! linux_chkconfig_present BKL ; then + eerror "${P} requires BKL." + eerror "Please enable the Big Kernel Lock:" + eerror "Kernel hacking --->" + eerror " [*] Big Kernel Lock" + eerror "in the kernel config." + eerror "or add" + eerror " CONFIG_BKL=y" + eerror "in /usr/src/linux/.config" + error+=" BKL disabled;" + failed=1 + fi + + [[ ${failed} -ne 0 ]] && die "${error}" +} + +pkg_pretend() { + # workaround until bug 365543 is solved + linux-info_pkg_setup + require_configured_kernel + _check_kernel_config +} + +pkg_setup() { + MODULE_NAMES="fglrx(video:${S}/${FOLDER_PREFIX}/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}" + BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=\"-DMODULE -DATI -DFGL\"" + if grep -q arch_compat_alloc_user_space ${KV_DIR}/arch/x86/include/asm/compat.h ; then + BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=-DCOMPAT_ALLOC_USER_SPACE=arch_compat_alloc_user_space" + else + BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=-DCOMPAT_ALLOC_USER_SPACE=compat_alloc_user_space" + fi + + # 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 + + # Define module dir. + MODULE_DIR="${S}/${FOLDER_PREFIX}/lib/modules/fglrx/build_mod" + + elog + elog "Please note that this driver supports only graphic cards based on" + elog "r600 chipset and newer." + elog "This represent the AMD Radeon HD series at this moment." + elog + elog "If your card is older then usage of ${CATEGORY}/xf86-video-ati" + elog "as replacement is highly recommended. Rather than staying with" + elog "old versions of this driver." + elog "For migration informations please reffer to:" + elog "http://www.gentoo.org/proj/en/desktop/x/x11/ati-migration-guide.xml" + einfo +} + +src_unpack() { + if [[ $(get_major_version) -gt 8 ]]; then + # Switching to a standard way to extract the files since otherwise no signature file + # would be created + local src="${DISTDIR}/${A}" + sh "${src}" --extract "${S}" 2&>1 /dev/null + else + unpack ${A} + fi +} + +src_prepare() { + # version patches + # epatch "${FILESDIR}"/kernel/${PV}-*.patch + if use debug; then + sed -i '/^#define DRM_DEBUG_CODE/s/0/1/' \ + "${MODULE_DIR}/firegl_public.c" \ + || die "Failed to enable debug output." + fi + + # fix needed for at least hardened-sources, see bug #392753 + use pax_kernel && epatch "${FILESDIR}"/ati-drivers-12.2-redefine-WARN.patch + + # Fix compilation with 3.2.8 and 3.3 kernels + epatch "${FILESDIR}/ati-drivers-3.2.8+.patch" + + cd "${MODULE_DIR}" + # bugged fglrx build system, this file should be copied by hand + cp "${ARCH_DIR}"/lib/modules/fglrx/build_mod/libfglrx_ip.a 2.6.x + + 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" + + cd "${S}" + mkdir extra || die "mkdir failed" + cd extra + unpack ./../${FOLDER_PREFIX}usr/src/ati/fglrx_sample_source.tgz +} + +src_compile() { + linux-mod_src_compile +} + +src_install() { + linux-mod_src_install +} + +pkg_postinst() { + 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." + linux-mod_pkg_postinst +} + +pkg_preinst() { + linux-mod_pkg_preinst +} + +pkg_postrm() { + linux-mod_pkg_postrm +} diff --git a/x11-drivers/ati-drivers/ati-drivers-12.3.ebuild b/x11-drivers/ati-drivers/ati-drivers-12.3.ebuild new file mode 100644 index 00000000..4a971613 --- /dev/null +++ b/x11-drivers/ati-drivers/ati-drivers-12.3.ebuild @@ -0,0 +1,239 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=4 + +inherit eutils multilib linux-info linux-mod toolchain-funcs versionator + +DESCRIPTION="AMD kernel drivers for radeon r600 (HD Series) and newer chipsets" +HOMEPAGE="http://www.amd.com" +# 8.ble will be used for beta releases. +if [[ $(get_major_version) -gt 8 ]]; then + ATI_URL="http://www2.ati.com/drivers/linux/" + SRC_URI="${ATI_URL}/amd-driver-installer-${PV/./-}-x86.x86_64.run" + FOLDER_PREFIX="common/" +else + SRC_URI="https://launchpad.net/ubuntu/natty/+source/fglrx-installer/2:${PV}-0ubuntu1/+files/fglrx-installer_${PV}.orig.tar.gz" + FOLDER_PREFIX="" +fi +IUSE="debug multilib pax_kernel" + +LICENSE="AMD GPL-2 as-is" +KEYWORDS="~amd64 ~x86" +SLOT="1" + +RDEPEND="multilib? ( ~x11-drivers/ati-userspace-${PV}[multilib] ) + ~x11-drivers/ati-userspace-${PV} + sys-power/acpid" +DEPEND="${RDEPEND}" + +S="${WORKDIR}" + +_check_kernel_config() { + local failed=0 + local error="" + if ! kernel_is ge 2 6; then + eerror "You need a 2.6 linux kernel to compile against!" + die "No 2.6 Kernel found" + fi + + if ! linux_chkconfig_present MTRR; then + ewarn "You don't have MTRR support enabled in the kernel." + ewarn "Direct rendering will not work." + fi + + if linux_chkconfig_builtin DRM; then + ewarn "You have DRM support built in to the kernel" + ewarn "Direct rendering will not work." + fi + + if ! linux_chkconfig_present AGP && \ + ! linux_chkconfig_present PCIEPORTBUS; then + ewarn "You don't have AGP and/or PCIe support enabled in the kernel" + ewarn "Direct rendering will not work." + fi + + if ! linux_chkconfig_present ACPI; then + eerror "${P} requires the ACPI support in the kernel" + eerror "Please enable it:" + eerror " CONFIG_ACPI=y" + eerror "in /usr/src/linux/.config or" + eerror " Power management and ACPI options --->" + eerror " [*] Power Management support" + eerror "in the 'menuconfig'" + error+=" CONFIG_ACPI disabled;" + failed=1 + fi + + if ! linux_chkconfig_present PCI_MSI; then + eerror "${P} requires MSI in the kernel." + eerror "Please enable it:" + eerror " CONFIG_PCI_MSI=y" + eerror "in /usr/src/linux/.config or" + eerror " Bus options (PCI etc.) --->" + eerror " [*] Message Signaled Interrupts (MSI and MSI-X)" + eerror "in the kernel config." + error+=" CONFIG_PCI_MSI disabled;" + failed=1 + fi + + if linux_chkconfig_present LOCKDEP; then + eerror "You've enabled LOCKDEP -- lock tracking -- in the kernel." + eerror "Unfortunately, this option exports the symbol lock_acquire as GPL-only." + eerror "This prevents ${P} from compiling with an error like this:" + eerror "FATAL: modpost: GPL-incompatible module fglrx.ko uses GPL-only symbol 'lock_acquire'" + eerror "Please make sure the following options have been unset:" + eerror " Kernel hacking --->" + eerror " [ ] Lock debugging: detect incorrect freeing of live locks" + eerror " [ ] Lock debugging: prove locking correctness" + eerror " [ ] Lock usage statistics" + eerror "in 'menuconfig'" + error+=" LOCKDEP enabled;" + failed=1 + fi + + use amd64 && if ! linux_chkconfig_present COMPAT; then + eerror "${P} requires COMPAT." + eerror "Please enable the 32 bit emulation:" + eerror "Executable file formats / Emulations --->" + eerror " [*] IA32 Emulation" + eerror "in the kernel config." + eerror "if this doesn't enable CONFIG_COMPAT add" + eerror " CONFIG_COMPAT=y" + eerror "in /usr/src/linux/.config" + error+=" COMPAT disabled;" + failed=1 + fi + + kernel_is ge 2 6 37 && kernel_is le 2 6 38 && if ! linux_chkconfig_present BKL ; then + eerror "${P} requires BKL." + eerror "Please enable the Big Kernel Lock:" + eerror "Kernel hacking --->" + eerror " [*] Big Kernel Lock" + eerror "in the kernel config." + eerror "or add" + eerror " CONFIG_BKL=y" + eerror "in /usr/src/linux/.config" + error+=" BKL disabled;" + failed=1 + fi + + [[ ${failed} -ne 0 ]] && die "${error}" +} + +pkg_pretend() { + # workaround until bug 365543 is solved + linux-info_pkg_setup + require_configured_kernel + _check_kernel_config +} + +pkg_setup() { + MODULE_NAMES="fglrx(video:${S}/${FOLDER_PREFIX}/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}" + BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=\"-DMODULE -DATI -DFGL\"" + if grep -q arch_compat_alloc_user_space ${KV_DIR}/arch/x86/include/asm/compat.h ; then + BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=-DCOMPAT_ALLOC_USER_SPACE=arch_compat_alloc_user_space" + else + BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=-DCOMPAT_ALLOC_USER_SPACE=compat_alloc_user_space" + fi + + # 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 + + # Define module dir. + MODULE_DIR="${S}/${FOLDER_PREFIX}/lib/modules/fglrx/build_mod" + + elog + elog "Please note that this driver supports only graphic cards based on" + elog "r600 chipset and newer." + elog "This represent the AMD Radeon HD series at this moment." + elog + elog "If your card is older then usage of ${CATEGORY}/xf86-video-ati" + elog "as replacement is highly recommended. Rather than staying with" + elog "old versions of this driver." + elog "For migration informations please reffer to:" + elog "http://www.gentoo.org/proj/en/desktop/x/x11/ati-migration-guide.xml" + einfo +} + +src_unpack() { + if [[ $(get_major_version) -gt 8 ]]; then + # Switching to a standard way to extract the files since otherwise no signature file + # would be created + local src="${DISTDIR}/${A}" + sh "${src}" --extract "${S}" 2&>1 /dev/null + else + unpack ${A} + fi +} + +src_prepare() { + # version patches + # epatch "${FILESDIR}"/kernel/${PV}-*.patch + if use debug; then + sed -i '/^#define DRM_DEBUG_CODE/s/0/1/' \ + "${MODULE_DIR}/firegl_public.c" \ + || die "Failed to enable debug output." + fi + + # fix needed for at least hardened-sources, see bug #392753 + use pax_kernel && epatch "${FILESDIR}"/ati-drivers-12.2-redefine-WARN.patch + + # Fix compilation with 3.2.8 and 3.3 kernels + epatch "${FILESDIR}/ati-drivers-3.2.8+.patch" + + cd "${MODULE_DIR}" + # bugged fglrx build system, this file should be copied by hand + cp "${ARCH_DIR}"/lib/modules/fglrx/build_mod/libfglrx_ip.a 2.6.x + + 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" + + cd "${S}" + mkdir extra || die "mkdir failed" + cd extra + unpack ./../${FOLDER_PREFIX}usr/src/ati/fglrx_sample_source.tgz +} + +src_compile() { + linux-mod_src_compile +} + +src_install() { + linux-mod_src_install +} + +pkg_postinst() { + 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." + linux-mod_pkg_postinst +} + +pkg_preinst() { + linux-mod_pkg_preinst +} + +pkg_postrm() { + linux-mod_pkg_postrm +} diff --git a/x11-drivers/ati-drivers/ati-drivers-12.4.ebuild b/x11-drivers/ati-drivers/ati-drivers-12.4.ebuild new file mode 100644 index 00000000..f72a2c59 --- /dev/null +++ b/x11-drivers/ati-drivers/ati-drivers-12.4.ebuild @@ -0,0 +1,242 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=4 + +inherit eutils multilib linux-info linux-mod toolchain-funcs versionator + +DESCRIPTION="AMD kernel drivers for radeon r600 (HD Series) and newer chipsets" +HOMEPAGE="http://www.amd.com" +# 8.ble will be used for beta releases. +if [[ $(get_major_version) -gt 8 ]]; then + ATI_URL="http://www2.ati.com/drivers/linux/" + SRC_URI="${ATI_URL}/amd-driver-installer-${PV/./-}-x86.x86_64.run" + FOLDER_PREFIX="common/" +else + SRC_URI="https://launchpad.net/ubuntu/natty/+source/fglrx-installer/2:${PV}-0ubuntu1/+files/fglrx-installer_${PV}.orig.tar.gz" + FOLDER_PREFIX="" +fi +IUSE="debug multilib pax_kernel" + +LICENSE="AMD GPL-2 as-is" +KEYWORDS="~amd64 ~x86" +SLOT="1" + +RDEPEND="multilib? ( ~x11-drivers/ati-userspace-${PV}[multilib] ) + ~x11-drivers/ati-userspace-${PV} + sys-power/acpid" +DEPEND="${RDEPEND}" + +S="${WORKDIR}" + +_check_kernel_config() { + local failed=0 + local error="" + if ! kernel_is ge 2 6; then + eerror "You need a 2.6 linux kernel to compile against!" + die "No 2.6 Kernel found" + fi + + if ! linux_chkconfig_present MTRR; then + ewarn "You don't have MTRR support enabled in the kernel." + ewarn "Direct rendering will not work." + fi + + if linux_chkconfig_builtin DRM; then + ewarn "You have DRM support built in to the kernel" + ewarn "Direct rendering will not work." + fi + + if ! linux_chkconfig_present AGP && \ + ! linux_chkconfig_present PCIEPORTBUS; then + ewarn "You don't have AGP and/or PCIe support enabled in the kernel" + ewarn "Direct rendering will not work." + fi + + if ! linux_chkconfig_present ACPI; then + eerror "${P} requires the ACPI support in the kernel" + eerror "Please enable it:" + eerror " CONFIG_ACPI=y" + eerror "in /usr/src/linux/.config or" + eerror " Power management and ACPI options --->" + eerror " [*] Power Management support" + eerror "in the 'menuconfig'" + error+=" CONFIG_ACPI disabled;" + failed=1 + fi + + if ! linux_chkconfig_present PCI_MSI; then + eerror "${P} requires MSI in the kernel." + eerror "Please enable it:" + eerror " CONFIG_PCI_MSI=y" + eerror "in /usr/src/linux/.config or" + eerror " Bus options (PCI etc.) --->" + eerror " [*] Message Signaled Interrupts (MSI and MSI-X)" + eerror "in the kernel config." + error+=" CONFIG_PCI_MSI disabled;" + failed=1 + fi + + if linux_chkconfig_present LOCKDEP; then + eerror "You've enabled LOCKDEP -- lock tracking -- in the kernel." + eerror "Unfortunately, this option exports the symbol lock_acquire as GPL-only." + eerror "This prevents ${P} from compiling with an error like this:" + eerror "FATAL: modpost: GPL-incompatible module fglrx.ko uses GPL-only symbol 'lock_acquire'" + eerror "Please make sure the following options have been unset:" + eerror " Kernel hacking --->" + eerror " [ ] Lock debugging: detect incorrect freeing of live locks" + eerror " [ ] Lock debugging: prove locking correctness" + eerror " [ ] Lock usage statistics" + eerror "in 'menuconfig'" + error+=" LOCKDEP enabled;" + failed=1 + fi + + use amd64 && if ! linux_chkconfig_present COMPAT; then + eerror "${P} requires COMPAT." + eerror "Please enable the 32 bit emulation:" + eerror "Executable file formats / Emulations --->" + eerror " [*] IA32 Emulation" + eerror "in the kernel config." + eerror "if this doesn't enable CONFIG_COMPAT add" + eerror " CONFIG_COMPAT=y" + eerror "in /usr/src/linux/.config" + error+=" COMPAT disabled;" + failed=1 + fi + + kernel_is ge 2 6 37 && kernel_is le 2 6 38 && if ! linux_chkconfig_present BKL ; then + eerror "${P} requires BKL." + eerror "Please enable the Big Kernel Lock:" + eerror "Kernel hacking --->" + eerror " [*] Big Kernel Lock" + eerror "in the kernel config." + eerror "or add" + eerror " CONFIG_BKL=y" + eerror "in /usr/src/linux/.config" + error+=" BKL disabled;" + failed=1 + fi + + [[ ${failed} -ne 0 ]] && die "${error}" +} + +pkg_pretend() { + # workaround until bug 365543 is solved + linux-info_pkg_setup + require_configured_kernel + _check_kernel_config +} + +pkg_setup() { + MODULE_NAMES="fglrx(video:${S}/${FOLDER_PREFIX}/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}" + BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=\"-DMODULE -DATI -DFGL\"" + if grep -q arch_compat_alloc_user_space ${KV_DIR}/arch/x86/include/asm/compat.h ; then + BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=-DCOMPAT_ALLOC_USER_SPACE=arch_compat_alloc_user_space" + else + BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=-DCOMPAT_ALLOC_USER_SPACE=compat_alloc_user_space" + fi + + # 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 + + # Define module dir. + MODULE_DIR="${S}/${FOLDER_PREFIX}/lib/modules/fglrx/build_mod" + + elog + elog "Please note that this driver supports only graphic cards based on" + elog "r600 chipset and newer." + elog "This represent the AMD Radeon HD series at this moment." + elog + elog "If your card is older then usage of ${CATEGORY}/xf86-video-ati" + elog "as replacement is highly recommended. Rather than staying with" + elog "old versions of this driver." + elog "For migration informations please reffer to:" + elog "http://www.gentoo.org/proj/en/desktop/x/x11/ati-migration-guide.xml" + einfo +} + +src_unpack() { + if [[ $(get_major_version) -gt 8 ]]; then + # Switching to a standard way to extract the files since otherwise no signature file + # would be created + local src="${DISTDIR}/${A}" + sh "${src}" --extract "${S}" 2&>1 /dev/null + else + unpack ${A} + fi +} + +src_prepare() { + # version patches + # epatch "${FILESDIR}"/kernel/${PV}-*.patch + if use debug; then + sed -i '/^#define DRM_DEBUG_CODE/s/0/1/' \ + "${MODULE_DIR}/firegl_public.c" \ + || die "Failed to enable debug output." + fi + + # fix needed for at least hardened-sources, see bug #392753 + use pax_kernel && epatch "${FILESDIR}"/ati-drivers-12.2-redefine-WARN.patch + + # Fix compilation with 3.2.8 and 3.3 kernels + epatch "${FILESDIR}/ati-drivers-3.2.8+.patch" + + # see http://ati.cchtml.com/show_bug.cgi?id=495 + kernel_is ge 3 4 0 && epatch "${FILESDIR}/ati-drivers-old_rsp.patch" + + cd "${MODULE_DIR}" + # bugged fglrx build system, this file should be copied by hand + cp "${ARCH_DIR}"/lib/modules/fglrx/build_mod/libfglrx_ip.a 2.6.x + + 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" + + cd "${S}" + mkdir extra || die "mkdir failed" + cd extra + unpack ./../${FOLDER_PREFIX}usr/src/ati/fglrx_sample_source.tgz +} + +src_compile() { + linux-mod_src_compile +} + +src_install() { + linux-mod_src_install +} + +pkg_postinst() { + 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." + linux-mod_pkg_postinst +} + +pkg_preinst() { + linux-mod_pkg_preinst +} + +pkg_postrm() { + linux-mod_pkg_postrm +} diff --git a/x11-drivers/ati-drivers/ati-drivers-12.6.ebuild b/x11-drivers/ati-drivers/ati-drivers-12.6.ebuild new file mode 100644 index 00000000..fdd262e8 --- /dev/null +++ b/x11-drivers/ati-drivers/ati-drivers-12.6.ebuild @@ -0,0 +1,252 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=4 + +inherit eutils multilib linux-info linux-mod toolchain-funcs versionator + +DESCRIPTION="AMD kernel drivers for radeon r600 (HD Series) and newer chipsets" +HOMEPAGE="http://www.amd.com" +MY_V=( $(get_version_components) ) +if [[ ${MY_V[2]} != beta ]]; then + ATI_URL="http://www2.ati.com/drivers/linux/" + SRC_URI="${ATI_URL}/amd-driver-installer-${PV/./-}-x86.x86_64.run" + FOLDER_PREFIX="common/" +else + SRC_URI="https://launchpad.net/ubuntu/natty/+source/fglrx-installer/2:${PV}-0ubuntu1/+files/fglrx-installer_${PV}.orig.tar.gz" + FOLDER_PREFIX="" +fi +IUSE="debug multilib pax_kernel" + +LICENSE="AMD GPL-2 as-is" +KEYWORDS="~amd64 ~x86" +SLOT="1" + +RDEPEND="multilib? ( ~x11-drivers/ati-userspace-${PV}[multilib] ) + ~x11-drivers/ati-userspace-${PV} + sys-power/acpid" +DEPEND="${RDEPEND}" + +S="${WORKDIR}" + +_check_kernel_config() { + local failed=0 + local error="" + if ! kernel_is ge 2 6; then + eerror "You need a 2.6 linux kernel to compile against!" + die "No 2.6 Kernel found" + fi + + if ! linux_chkconfig_present MTRR; then + ewarn "You don't have MTRR support enabled in the kernel." + ewarn "Direct rendering will not work." + fi + + if linux_chkconfig_builtin DRM; then + ewarn "You have DRM support built in to the kernel" + ewarn "Direct rendering will not work." + fi + + if ! linux_chkconfig_present AGP && \ + ! linux_chkconfig_present PCIEPORTBUS; then + ewarn "You don't have AGP and/or PCIe support enabled in the kernel" + ewarn "Direct rendering will not work." + fi + + if ! linux_chkconfig_present ACPI; then + eerror "${P} requires the ACPI support in the kernel" + eerror "Please enable it:" + eerror " CONFIG_ACPI=y" + eerror "in /usr/src/linux/.config or" + eerror " Power management and ACPI options --->" + eerror " [*] Power Management support" + eerror "in the 'menuconfig'" + error+=" CONFIG_ACPI disabled;" + failed=1 + fi + + if ! linux_chkconfig_present PCI_MSI; then + eerror "${P} requires MSI in the kernel." + eerror "Please enable it:" + eerror " CONFIG_PCI_MSI=y" + eerror "in /usr/src/linux/.config or" + eerror " Bus options (PCI etc.) --->" + eerror " [*] Message Signaled Interrupts (MSI and MSI-X)" + eerror "in the kernel config." + error+=" CONFIG_PCI_MSI disabled;" + failed=1 + fi + + if linux_chkconfig_present LOCKDEP; then + eerror "You've enabled LOCKDEP -- lock tracking -- in the kernel." + eerror "Unfortunately, this option exports the symbol lock_acquire as GPL-only." + eerror "This prevents ${P} from compiling with an error like this:" + eerror "FATAL: modpost: GPL-incompatible module fglrx.ko uses GPL-only symbol 'lock_acquire'" + eerror "Please make sure the following options have been unset:" + eerror " Kernel hacking --->" + eerror " [ ] Lock debugging: detect incorrect freeing of live locks" + eerror " [ ] Lock debugging: prove locking correctness" + eerror " [ ] Lock usage statistics" + eerror "in 'menuconfig'" + error+=" LOCKDEP enabled;" + failed=1 + fi + + use amd64 && if ! linux_chkconfig_present COMPAT; then + eerror "${P} requires COMPAT." + eerror "Please enable the 32 bit emulation:" + eerror "Executable file formats / Emulations --->" + eerror " [*] IA32 Emulation" + eerror "in the kernel config." + eerror "if this doesn't enable CONFIG_COMPAT add" + eerror " CONFIG_COMPAT=y" + eerror "in /usr/src/linux/.config" + error+=" COMPAT disabled;" + failed=1 + fi + + kernel_is ge 2 6 37 && kernel_is le 2 6 38 && if ! linux_chkconfig_present BKL ; then + eerror "${P} requires BKL." + eerror "Please enable the Big Kernel Lock:" + eerror "Kernel hacking --->" + eerror " [*] Big Kernel Lock" + eerror "in the kernel config." + eerror "or add" + eerror " CONFIG_BKL=y" + eerror "in /usr/src/linux/.config" + error+=" BKL disabled;" + failed=1 + fi + + if linux_chkconfig_present X86_X32; then + eerror "You've enabled x32 in the kernel." + eerror "Unfortunately, this option is not supported yet and prevents the fglrx" + eerror "kernel module from loading." + error+=" X86_32 enabled;" + failed=1 + fi + + [[ ${failed} -ne 0 ]] && die "${error}" +} + +pkg_pretend() { + # workaround until bug 365543 is solved + linux-info_pkg_setup + require_configured_kernel + _check_kernel_config +} + +pkg_setup() { + MODULE_NAMES="fglrx(video:${S}/${FOLDER_PREFIX}/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}" + BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=\"-DMODULE -DATI -DFGL\"" + if grep -q arch_compat_alloc_user_space ${KV_DIR}/arch/x86/include/asm/compat.h ; then + BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=-DCOMPAT_ALLOC_USER_SPACE=arch_compat_alloc_user_space" + else + BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=-DCOMPAT_ALLOC_USER_SPACE=compat_alloc_user_space" + fi + + # 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 + + # Define module dir. + MODULE_DIR="${S}/${FOLDER_PREFIX}/lib/modules/fglrx/build_mod" + + elog + elog "Please note that this driver supports only graphic cards based on" + elog "Evergreen chipset and newer." + elog "This represent the AMD Radeon HD series at this moment." + elog + elog "If your card is older then usage of ${CATEGORY}/xf86-video-ati" + elog "as replacement is highly recommended. Rather than staying with" + elog "old versions of this driver." + elog "For migration informations please reffer to:" + elog "http://www.gentoo.org/proj/en/desktop/x/x11/ati-migration-guide.xml" + einfo +} + +src_unpack() { + if [[ ${MY_V[2]} == beta ]]; then + unpack ${A} + RUN="${S}/${A/%.zip/.run}" + else + RUN="${DISTDIR}/${A}" + fi + sh ${RUN} --extract "${S}" # 2>&1 > /dev/null || die +} + +src_prepare() { + # version patches + # epatch "${FILESDIR}"/kernel/${PV}-*.patch + if use debug; then + sed -i '/^#define DRM_DEBUG_CODE/s/0/1/' \ + "${MODULE_DIR}/firegl_public.c" \ + || die "Failed to enable debug output." + fi + + # fix needed for at least hardened-sources, see bug #392753 + use pax_kernel && epatch "${FILESDIR}"/ati-drivers-12.2-redefine-WARN.patch + + # Fix compilation with 3.2.8 and 3.3 kernels + epatch "${FILESDIR}/ati-drivers-3.2.8+-2.patch" + + # see http://ati.cchtml.com/show_bug.cgi?id=495 + kernel_is ge 3 4 0 && epatch "${FILESDIR}/ati-drivers-old_rsp.patch" + + #fixes bug #420751 + epatch "${FILESDIR}"/ati-drivers-do_mmap.patch + + cd "${MODULE_DIR}" + # bugged fglrx build system, this file should be copied by hand + cp "${ARCH_DIR}"/lib/modules/fglrx/build_mod/libfglrx_ip.a 2.6.x + + 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" + + cd "${S}" + mkdir extra || die "mkdir failed" + cd extra + unpack ./../${FOLDER_PREFIX}usr/src/ati/fglrx_sample_source.tgz +} + +src_compile() { + linux-mod_src_compile +} + +src_install() { + linux-mod_src_install +} + +pkg_postinst() { + 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." + linux-mod_pkg_postinst +} + +pkg_preinst() { + linux-mod_pkg_preinst +} + +pkg_postrm() { + linux-mod_pkg_postrm +} diff --git a/x11-drivers/ati-drivers/ati-drivers-12.6_beta_pre897.ebuild b/x11-drivers/ati-drivers/ati-drivers-12.6_beta_pre897.ebuild new file mode 100644 index 00000000..0d39566f --- /dev/null +++ b/x11-drivers/ati-drivers/ati-drivers-12.6_beta_pre897.ebuild @@ -0,0 +1,239 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=4 + +inherit eutils multilib linux-info linux-mod toolchain-funcs versionator + +DESCRIPTION="AMD kernel drivers for radeon r600 (HD Series) and newer chipsets" +HOMEPAGE="http://www.amd.com" +MY_V=( $(get_version_components) ) +if [[ ${MY_V[2]} != beta ]]; then + ATI_URL="http://www2.ati.com/drivers/linux/" + SRC_URI="${ATI_URL}/amd-driver-installer-${PV/./-}-x86.x86_64.run" + FOLDER_PREFIX="common/" +else + #SRC_URI="https://launchpad.net/ubuntu/natty/+source/fglrx-installer/2:${PV}-0ubuntu1/+files/fglrx-installer_${PV}.orig.tar.gz" + SRC_URI="http://www2.ati.com/drivers/legacy/amd-driver-installer-12.6-legacy-x86.x86_64.zip" + FOLDER_PREFIX="common/" +fi +IUSE="debug multilib pax_kernel" + +LICENSE="AMD GPL-2 as-is" +KEYWORDS="~amd64 ~x86" +SLOT="1" + +RDEPEND="multilib? ( ~x11-drivers/ati-userspace-${PV}[multilib] ) + ~x11-drivers/ati-userspace-${PV} + sys-power/acpid" +DEPEND="${RDEPEND}" + +S="${WORKDIR}" + +_check_kernel_config() { + local failed=0 + local error="" + if ! kernel_is ge 2 6; then + eerror "You need a 2.6 linux kernel to compile against!" + die "No 2.6 Kernel found" + fi + + if ! linux_chkconfig_present MTRR; then + ewarn "You don't have MTRR support enabled in the kernel." + ewarn "Direct rendering will not work." + fi + + if linux_chkconfig_builtin DRM; then + ewarn "You have DRM support built in to the kernel" + ewarn "Direct rendering will not work." + fi + + if ! linux_chkconfig_present AGP && \ + ! linux_chkconfig_present PCIEPORTBUS; then + ewarn "You don't have AGP and/or PCIe support enabled in the kernel" + ewarn "Direct rendering will not work." + fi + + if ! linux_chkconfig_present ACPI; then + eerror "${P} requires the ACPI support in the kernel" + eerror "Please enable it:" + eerror " CONFIG_ACPI=y" + eerror "in /usr/src/linux/.config or" + eerror " Power management and ACPI options --->" + eerror " [*] Power Management support" + eerror "in the 'menuconfig'" + error+=" CONFIG_ACPI disabled;" + failed=1 + fi + + if ! linux_chkconfig_present PCI_MSI; then + eerror "${P} requires MSI in the kernel." + eerror "Please enable it:" + eerror " CONFIG_PCI_MSI=y" + eerror "in /usr/src/linux/.config or" + eerror " Bus options (PCI etc.) --->" + eerror " [*] Message Signaled Interrupts (MSI and MSI-X)" + eerror "in the kernel config." + error+=" CONFIG_PCI_MSI disabled;" + failed=1 + fi + + if linux_chkconfig_present LOCKDEP; then + eerror "You've enabled LOCKDEP -- lock tracking -- in the kernel." + eerror "Unfortunately, this option exports the symbol lock_acquire as GPL-only." + eerror "This prevents ${P} from compiling with an error like this:" + eerror "FATAL: modpost: GPL-incompatible module fglrx.ko uses GPL-only symbol 'lock_acquire'" + eerror "Please make sure the following options have been unset:" + eerror " Kernel hacking --->" + eerror " [ ] Lock debugging: detect incorrect freeing of live locks" + eerror " [ ] Lock debugging: prove locking correctness" + eerror " [ ] Lock usage statistics" + eerror "in 'menuconfig'" + error+=" LOCKDEP enabled;" + failed=1 + fi + + use amd64 && if ! linux_chkconfig_present COMPAT; then + eerror "${P} requires COMPAT." + eerror "Please enable the 32 bit emulation:" + eerror "Executable file formats / Emulations --->" + eerror " [*] IA32 Emulation" + eerror "in the kernel config." + eerror "if this doesn't enable CONFIG_COMPAT add" + eerror " CONFIG_COMPAT=y" + eerror "in /usr/src/linux/.config" + error+=" COMPAT disabled;" + failed=1 + fi + + kernel_is ge 2 6 37 && kernel_is le 2 6 38 && if ! linux_chkconfig_present BKL ; then + eerror "${P} requires BKL." + eerror "Please enable the Big Kernel Lock:" + eerror "Kernel hacking --->" + eerror " [*] Big Kernel Lock" + eerror "in the kernel config." + eerror "or add" + eerror " CONFIG_BKL=y" + eerror "in /usr/src/linux/.config" + error+=" BKL disabled;" + failed=1 + fi + + [[ ${failed} -ne 0 ]] && die "${error}" +} + +pkg_pretend() { + # workaround until bug 365543 is solved + linux-info_pkg_setup + require_configured_kernel + _check_kernel_config +} + +pkg_setup() { + MODULE_NAMES="fglrx(video:${S}/${FOLDER_PREFIX}/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}" + BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=\"-DMODULE -DATI -DFGL\"" + if grep -q arch_compat_alloc_user_space ${KV_DIR}/arch/x86/include/asm/compat.h ; then + BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=-DCOMPAT_ALLOC_USER_SPACE=arch_compat_alloc_user_space" + else + BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=-DCOMPAT_ALLOC_USER_SPACE=compat_alloc_user_space" + fi + + # 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 + + # Define module dir. + MODULE_DIR="${S}/${FOLDER_PREFIX}/lib/modules/fglrx/build_mod" + + elog + elog "Please note that this driver supports only graphic cards based on" + elog "Evergreen chipset and newer." + elog "This represent the AMD Radeon HD series at this moment." + elog + elog "If your card is older then usage of ${CATEGORY}/xf86-video-ati" + elog "as replacement is highly recommended. Rather than staying with" + elog "old versions of this driver." + elog "For migration informations please reffer to:" + elog "http://www.gentoo.org/proj/en/desktop/x/x11/ati-migration-guide.xml" + einfo +} + +src_unpack() { + if [[ ${MY_V[2]} == beta ]]; then + unpack ${A} + RUN=${A/%.zip/.run} + else + RUN=${A} + fi + sh ${RUN} --extract "${S}" # 2>&1 > /dev/null || die +} + +src_prepare() { + # version patches + # epatch "${FILESDIR}"/kernel/${PV}-*.patch + if use debug; then + sed -i '/^#define DRM_DEBUG_CODE/s/0/1/' \ + "${MODULE_DIR}/firegl_public.c" \ + || die "Failed to enable debug output." + fi + + # fix needed for at least hardened-sources, see bug #392753 + use pax_kernel && epatch "${FILESDIR}"/ati-drivers-12.2-redefine-WARN.patch + + #fixes bug #420751 + epatch "${FILESDIR}"/ati-drivers-do_mmap.patch + + cd "${MODULE_DIR}" + # bugged fglrx build system, this file should be copied by hand + cp "${ARCH_DIR}"/lib/modules/fglrx/build_mod/libfglrx_ip.a 2.6.x + + 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" + + cd "${S}" + mkdir extra || die "mkdir failed" + cd extra + unpack ./../${FOLDER_PREFIX}usr/src/ati/fglrx_sample_source.tgz +} + +src_compile() { + linux-mod_src_compile +} + +src_install() { + linux-mod_src_install +} + +pkg_postinst() { + 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." + linux-mod_pkg_postinst +} + +pkg_preinst() { + linux-mod_pkg_preinst +} + +pkg_postrm() { + linux-mod_pkg_postrm +} diff --git a/x11-drivers/ati-drivers/ati-drivers-12.8.ebuild b/x11-drivers/ati-drivers/ati-drivers-12.8.ebuild new file mode 100644 index 00000000..260fcc6c --- /dev/null +++ b/x11-drivers/ati-drivers/ati-drivers-12.8.ebuild @@ -0,0 +1,235 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=4 + +inherit eutils multilib linux-info linux-mod toolchain-funcs versionator + +DESCRIPTION="AMD kernel drivers for radeon r600 (HD Series) and newer chipsets" +HOMEPAGE="http://www.amd.com" +MY_V=( $(get_version_components) ) +if [[ ${MY_V[2]} != beta ]]; then + ATI_URL="http://www2.ati.com/drivers/linux/" + SRC_URI="${ATI_URL}/amd-driver-installer-${PV/./-}-x86.x86_64.zip" + FOLDER_PREFIX="common/" +else + SRC_URI="https://launchpad.net/ubuntu/natty/+source/fglrx-installer/2:${PV}-0ubuntu1/+files/fglrx-installer_${PV}.orig.tar.gz" + FOLDER_PREFIX="" +fi +IUSE="debug multilib x-multilib pax_kernel" + +LICENSE="AMD GPL-2 as-is" +KEYWORDS="~amd64 ~x86" +SLOT="1" + +RDEPEND="x-multilib? ( ~x11-drivers/ati-userspace-${PV}[x-multilib] ) + multilib? ( ~x11-drivers/ati-userspace-${PV}[multilib] ) + ~x11-drivers/ati-userspace-${PV} + sys-power/acpid" +DEPEND="${RDEPEND}" + +S="${WORKDIR}" + +_check_kernel_config() { + local failed=0 + local error="" + if ! kernel_is ge 2 6; then + eerror "You need a 2.6 linux kernel to compile against!" + die "No 2.6 Kernel found" + fi + + if ! linux_chkconfig_present MTRR; then + ewarn "You don't have MTRR support enabled in the kernel." + ewarn "Direct rendering will not work." + fi + + if linux_chkconfig_builtin DRM; then + ewarn "You have DRM support built in to the kernel" + ewarn "Direct rendering will not work." + fi + + if ! linux_chkconfig_present AGP && \ + ! linux_chkconfig_present PCIEPORTBUS; then + ewarn "You don't have AGP and/or PCIe support enabled in the kernel" + ewarn "Direct rendering will not work." + fi + + if ! linux_chkconfig_present ACPI; then + eerror "${P} requires the ACPI support in the kernel" + eerror "Please enable it:" + eerror " CONFIG_ACPI=y" + eerror "in /usr/src/linux/.config or" + eerror " Power management and ACPI options --->" + eerror " [*] Power Management support" + eerror "in the 'menuconfig'" + error+=" CONFIG_ACPI disabled;" + failed=1 + fi + + if ! linux_chkconfig_present PCI_MSI; then + eerror "${P} requires MSI in the kernel." + eerror "Please enable it:" + eerror " CONFIG_PCI_MSI=y" + eerror "in /usr/src/linux/.config or" + eerror " Bus options (PCI etc.) --->" + eerror " [*] Message Signaled Interrupts (MSI and MSI-X)" + eerror "in the kernel config." + error+=" CONFIG_PCI_MSI disabled;" + failed=1 + fi + + if linux_chkconfig_present LOCKDEP; then + eerror "You've enabled LOCKDEP -- lock tracking -- in the kernel." + eerror "Unfortunately, this option exports the symbol lock_acquire as GPL-only." + eerror "This prevents ${P} from compiling with an error like this:" + eerror "FATAL: modpost: GPL-incompatible module fglrx.ko uses GPL-only symbol 'lock_acquire'" + eerror "Please make sure the following options have been unset:" + eerror " Kernel hacking --->" + eerror " [ ] Lock debugging: detect incorrect freeing of live locks" + eerror " [ ] Lock debugging: prove locking correctness" + eerror " [ ] Lock usage statistics" + eerror "in 'menuconfig'" + error+=" LOCKDEP enabled;" + failed=1 + fi + + use amd64 && if ! linux_chkconfig_present COMPAT; then + eerror "${P} requires COMPAT." + eerror "Please enable the 32 bit emulation:" + eerror "Executable file formats / Emulations --->" + eerror " [*] IA32 Emulation" + eerror "in the kernel config." + eerror "if this doesn't enable CONFIG_COMPAT add" + eerror " CONFIG_COMPAT=y" + eerror "in /usr/src/linux/.config" + error+=" COMPAT disabled;" + failed=1 + fi + + kernel_is ge 2 6 37 && kernel_is le 2 6 38 && if ! linux_chkconfig_present BKL ; then + eerror "${P} requires BKL." + eerror "Please enable the Big Kernel Lock:" + eerror "Kernel hacking --->" + eerror " [*] Big Kernel Lock" + eerror "in the kernel config." + eerror "or add" + eerror " CONFIG_BKL=y" + eerror "in /usr/src/linux/.config" + error+=" BKL disabled;" + failed=1 + fi + + [[ ${failed} -ne 0 ]] && die "${error}" +} + +pkg_pretend() { + # workaround until bug 365543 is solved + linux-info_pkg_setup + require_configured_kernel + _check_kernel_config +} + +pkg_setup() { + MODULE_NAMES="fglrx(video:${S}/${FOLDER_PREFIX}/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}" + BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=\"-DMODULE -DATI -DFGL\"" + if grep -q arch_compat_alloc_user_space ${KV_DIR}/arch/x86/include/asm/compat.h ; then + BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=-DCOMPAT_ALLOC_USER_SPACE=arch_compat_alloc_user_space" + else + BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=-DCOMPAT_ALLOC_USER_SPACE=compat_alloc_user_space" + fi + + # 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 + + # Define module dir. + MODULE_DIR="${S}/${FOLDER_PREFIX}/lib/modules/fglrx/build_mod" + + elog + elog "Please note that this driver supports only graphic cards based on" + elog "Evergreen chipset and newer." + elog "This represent the AMD Radeon HD series at this moment." + elog + elog "If your card is older then usage of ${CATEGORY}/xf86-video-ati" + elog "as replacement is highly recommended. Rather than staying with" + elog "old versions of this driver." + elog "For migration informations please reffer to:" + elog "http://www.gentoo.org/proj/en/desktop/x/x11/ati-migration-guide.xml" + einfo +} + +src_unpack() { + unpack ${A} + RUN="${S}/"*.run + sh ${RUN} --extract "${S}" # 2>&1 > /dev/null || die +} + +src_prepare() { + # version patches + # epatch "${FILESDIR}"/kernel/${PV}-*.patch + if use debug; then + sed -i '/^#define DRM_DEBUG_CODE/s/0/1/' \ + "${MODULE_DIR}/firegl_public.c" \ + || die "Failed to enable debug output." + fi + + # fix needed for at least hardened-sources, see bug #392753 + use pax_kernel && epatch "${FILESDIR}"/ati-drivers-12.2-redefine-WARN.patch + + #fixes bug #420751 + epatch "${FILESDIR}"/ati-drivers-do_mmap.patch + + cd "${MODULE_DIR}" + # bugged fglrx build system, this file should be copied by hand + cp "${ARCH_DIR}"/lib/modules/fglrx/build_mod/libfglrx_ip.a 2.6.x + + 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" + + cd "${S}" + mkdir extra || die "mkdir failed" + cd extra + unpack ./../${FOLDER_PREFIX}usr/src/ati/fglrx_sample_source.tgz +} + +src_compile() { + linux-mod_src_compile +} + +src_install() { + linux-mod_src_install +} + +pkg_postinst() { + 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." + linux-mod_pkg_postinst +} + +pkg_preinst() { + linux-mod_pkg_preinst +} + +pkg_postrm() { + linux-mod_pkg_postrm +} diff --git a/x11-drivers/ati-drivers/ati-drivers-13.1.ebuild b/x11-drivers/ati-drivers/ati-drivers-13.1.ebuild new file mode 100644 index 00000000..89efdf51 --- /dev/null +++ b/x11-drivers/ati-drivers/ati-drivers-13.1.ebuild @@ -0,0 +1,258 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=5 + +inherit eutils multilib linux-info linux-mod toolchain-funcs versionator + +DESCRIPTION="AMD kernel drivers for radeon r600 (HD Series) and newer chipsets" +HOMEPAGE="http://www.amd.com" +MY_V=( $(get_version_components) ) +#RUN="${WORKDIR}/amd-driver-installer-9.00-x86.x86_64.run" +DRIVERS_URI="http://www2.ati.com/drivers/linux/amd-driver-installer-catalyst-${PV}-linux-x86.x86_64.zip" +XVBA_SDK_URI="http://developer.amd.com.php53-23.ord1-1.websitetestlink.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 pax_kernel disable-watermark" + +LICENSE="AMD GPL-2 QPL-1.0" +KEYWORDS="-* ~amd64 ~x86" +SLOT="1" + +RDEPEND="x-multilib? ( ~x11-drivers/ati-userspace-${PV}[x-multilib] ) + multilib? ( ~x11-drivers/ati-userspace-${PV}[multilib] ) + ~x11-drivers/ati-userspace-${PV} + sys-power/acpid" +DEPEND="${RDEPEND}" + +S="${WORKDIR}" + +_check_kernel_config() { + local failed=0 + local error="" + if ! kernel_is ge 2 6; then + eerror "You need a 2.6 linux kernel to compile against!" + die "No 2.6 Kernel found" + fi + + if ! linux_chkconfig_present MTRR; then + ewarn "You don't have MTRR support enabled in the kernel." + ewarn "Direct rendering will not work." + fi + + if linux_chkconfig_builtin DRM; then + ewarn "You have DRM support built in to the kernel" + ewarn "Direct rendering will not work." + fi + + if ! linux_chkconfig_present AGP && \ + ! linux_chkconfig_present PCIEPORTBUS; then + ewarn "You don't have AGP and/or PCIe support enabled in the kernel" + ewarn "Direct rendering will not work." + fi + + if ! linux_chkconfig_present ACPI; then + eerror "${P} requires the ACPI support in the kernel" + eerror "Please enable it:" + eerror " CONFIG_ACPI=y" + eerror "in /usr/src/linux/.config or" + eerror " Power management and ACPI options --->" + eerror " [*] Power Management support" + eerror "in the 'menuconfig'" + error+=" CONFIG_ACPI disabled;" + failed=1 + fi + + if ! linux_chkconfig_present PCI_MSI; then + eerror "${P} requires MSI in the kernel." + eerror "Please enable it:" + eerror " CONFIG_PCI_MSI=y" + eerror "in /usr/src/linux/.config or" + eerror " Bus options (PCI etc.) --->" + eerror " [*] Message Signaled Interrupts (MSI and MSI-X)" + eerror "in the kernel config." + error+=" CONFIG_PCI_MSI disabled;" + failed=1 + fi + + if linux_chkconfig_present LOCKDEP; then + eerror "You've enabled LOCKDEP -- lock tracking -- in the kernel." + eerror "Unfortunately, this option exports the symbol lock_acquire as GPL-only." + eerror "This prevents ${P} from compiling with an error like this:" + eerror "FATAL: modpost: GPL-incompatible module fglrx.ko uses GPL-only symbol 'lock_acquire'" + eerror "Please make sure the following options have been unset:" + eerror " Kernel hacking --->" + eerror " [ ] Lock debugging: detect incorrect freeing of live locks" + eerror " [ ] Lock debugging: prove locking correctness" + eerror " [ ] Lock usage statistics" + eerror "in 'menuconfig'" + error+=" LOCKDEP enabled;" + failed=1 + fi + + use amd64 && if ! linux_chkconfig_present COMPAT; then + eerror "${P} requires COMPAT." + eerror "Please enable the 32 bit emulation:" + eerror "Executable file formats / Emulations --->" + eerror " [*] IA32 Emulation" + eerror "in the kernel config." + eerror "if this doesn't enable CONFIG_COMPAT add" + eerror " CONFIG_COMPAT=y" + eerror "in /usr/src/linux/.config" + error+=" COMPAT disabled;" + failed=1 + fi + + kernel_is ge 2 6 37 && kernel_is le 2 6 38 && if ! linux_chkconfig_present BKL ; then + eerror "${P} requires BKL." + eerror "Please enable the Big Kernel Lock:" + eerror "Kernel hacking --->" + eerror " [*] Big Kernel Lock" + eerror "in the kernel config." + eerror "or add" + eerror " CONFIG_BKL=y" + eerror "in /usr/src/linux/.config" + error+=" BKL disabled;" + failed=1 + fi + + [[ ${failed} -ne 0 ]] && die "${error}" +} + +pkg_pretend() { + # workaround until bug 365543 is solved + linux-info_pkg_setup + require_configured_kernel + _check_kernel_config +} + +pkg_setup() { + MODULE_NAMES="fglrx(video:${S}/${FOLDER_PREFIX}/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}" + BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=\"-DMODULE -DATI -DFGL\"" + if grep -q arch_compat_alloc_user_space ${KV_DIR}/arch/x86/include/asm/compat.h ; then + BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=-DCOMPAT_ALLOC_USER_SPACE=arch_compat_alloc_user_space" + else + BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=-DCOMPAT_ALLOC_USER_SPACE=compat_alloc_user_space" + fi + # Define module dir. + MODULE_DIR="${S}/${FOLDER_PREFIX}/lib/modules/fglrx/build_mod" + # 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 supports only graphic cards based on" + elog "Evergreen chipset and newer." + elog "This represent 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 informations please reffer 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() { + # version patches + # epatch "${FILESDIR}"/kernel/${PV}-*.patch + if use debug; then + sed -i '/^#define DRM_DEBUG_CODE/s/0/1/' \ + "${MODULE_DIR}/firegl_public.c" \ + || die "Failed to enable debug output." + fi + + # 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 linux-3.7 + # https://bugs.gentoo.org/show_bug.cgi?id=438516 + epatch "${FILESDIR}/ati-drivers-vm-reserverd.patch" + + # compile fix for AGP-less kernel, bug #435322 + epatch "${FILESDIR}"/ati-drivers-12.9-KCL_AGP_FindCapsRegisters-stub.patch + + # Use ACPI_DEVICE_HANDLE wrapper to make driver build on linux-3.8 + # see https://bugs.gentoo.org/show_bug.cgi?id=448216 + epatch "${FILESDIR}/ati-drivers-kernel-3.8-acpihandle.patch" + + cd "${MODULE_DIR}" + # bugged fglrx build system, this file should be copied by hand + cp "${ARCH_DIR}"/lib/modules/fglrx/build_mod/libfglrx_ip.a 2.6.x + + 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" + cd "${S}" + + mkdir extra || die "mkdir failed" + cd extra + unpack ./../${FOLDER_PREFIX}usr/src/ati/fglrx_sample_source.tgz +} + +src_compile() { + linux-mod_src_compile +} + +src_install() { + linux-mod_src_install +} + +pkg_postinst() { + 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." + linux-mod_pkg_postinst +} + +pkg_preinst() { + linux-mod_pkg_preinst +} + +pkg_postrm() { + linux-mod_pkg_postrm +} diff --git a/x11-drivers/ati-drivers/ati-drivers-13.4.ebuild b/x11-drivers/ati-drivers/ati-drivers-13.4.ebuild new file mode 100644 index 00000000..b80fdf13 --- /dev/null +++ b/x11-drivers/ati-drivers/ati-drivers-13.4.ebuild @@ -0,0 +1,192 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=5 + +inherit eutils multilib linux-info linux-mod toolchain-funcs versionator + +DESCRIPTION="Ati precompiled drivers for Radeon Evergreen (HD5000 Series) and newer chipsets" +HOMEPAGE="http://www.amd.com" +MY_V=( $(get_version_components) ) +#RUN="${WORKDIR}/amd-driver-installer-9.00-x86.x86_64.run" +SLOT="1" +[[ "${MY_V[2]}" =~ beta.* ]] && BETADIR="beta/" || BETADIR="linux/" +if [[ legacy != ${SLOT} ]]; then + DRIVERS_URI="http://www2.ati.com/drivers/${BETADIR}amd-catalyst-${PV/_beta/-beta}-linux-x86.x86_64.zip" +else + DRIVERS_URI="http://www2.ati.com/drivers/legacy/amd-driver-installer-catalyst-$(get_version_component_range 1-2)-$(get_version_component_range 3)-legacy-linux-x86.x86_64.zip" +fi +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 pax_kernel disable-watermark" + +LICENSE="AMD GPL-2 QPL-1.0" +KEYWORDS="-* ~amd64 ~x86" +RESTRICT="bindist test" + +RDEPEND="x-multilib? ( ~x11-drivers/ati-userspace-${PV}[x-multilib] ) + multilib? ( ~x11-drivers/ati-userspace-${PV}[multilib] ) + ~x11-drivers/ati-userspace-${PV} + sys-power/acpid" +DEPEND="${RDEPEND}" + +S="${WORKDIR}" + +CONFIG_CHECK="~MTRR ~!DRM ACPI PCI_MSI !LOCKDEP !PAX_KERNEXEC_PLUGIN_METHOD_OR" +use amd64 && CONFIG_CHECK="${CONFIG_CHECK} COMPAT" +ERROR_MTRR="CONFIG_MTRR required for direct rendering." +ERROR_DRM="CONFIG_DRM must be disabled or compiled as a module and not loaded for direct + rendering to work." +ERROR_LOCKDEP="CONFIG_LOCKDEP (lock tracking) exports the symbol lock_acquire + as GPL-only. This prevents ${P} from compiling with an error like this: + FATAL: modpost: GPL-incompatible module fglrx.ko uses GPL-only symbol 'lock_acquire'" +ERROR_PAX_KERNEXEC_PLUGIN_METHOD_OR="This config option will cause + kernel to reject loading the fglrx module with + \"ERROR: could not insert 'fglrx': Exec format error.\" + You may want to try CONFIG_PAX_KERNEXEC_PLUGIN_METHOD_BTS instead." + +_check_kernel_config() { + if ! linux_chkconfig_present AGP && \ + ! linux_chkconfig_present PCIEPORTBUS; then + ewarn "You don't have AGP and/or PCIe support enabled in the kernel" + ewarn "Direct rendering will not work." + fi + + kernel_is ge 2 6 37 && kernel_is le 2 6 38 && if ! linux_chkconfig_present BKL ; then + die "CONFIG_BKL must be enabled for kernels 2.6.37-2.6.38." + fi +} + +pkg_pretend() { + # workaround until bug 365543 is solved + linux-info_pkg_setup + require_configured_kernel + _check_kernel_config +} + +pkg_setup() { + MODULE_NAMES="fglrx(video:${S}/${FOLDER_PREFIX}/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}" + BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=\"-DMODULE -DATI -DFGL\"" + if grep -q arch_compat_alloc_user_space ${KV_DIR}/arch/x86/include/asm/compat.h ; then + BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=-DCOMPAT_ALLOC_USER_SPACE=arch_compat_alloc_user_space" + else + BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=-DCOMPAT_ALLOC_USER_SPACE=compat_alloc_user_space" + fi + # Define module dir. + MODULE_DIR="${S}/${FOLDER_PREFIX}/lib/modules/fglrx/build_mod" + # 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() { + # version patches + # epatch "${FILESDIR}"/kernel/${PV}-*.patch + if use debug; then + sed -i '/^#define DRM_DEBUG_CODE/s/0/1/' \ + "${MODULE_DIR}/firegl_public.c" \ + || die "Failed to enable debug output." + fi + + # 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, https://bugs.gentoo.org/show_bug.cgi?id=454870 + use pax_kernel && epatch "${FILESDIR}/const-notifier-block.patch" + + cd "${MODULE_DIR}" + # bugged fglrx build system, this file should be copied by hand + cp ${ARCH_DIR}/lib/modules/fglrx/build_mod/libfglrx_ip.a 2.6.x + + 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" + cd "${S}" + + mkdir extra || die "mkdir extra failed" + cd extra + unpack ./../${FOLDER_PREFIX}usr/src/ati/fglrx_sample_source.tgz +} + +src_compile() { + linux-mod_src_compile +} + +src_install() { + linux-mod_src_install +} + +pkg_postinst() { + 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." + linux-mod_pkg_postinst +} + +pkg_preinst() { + linux-mod_pkg_preinst +} + +pkg_postrm() { + linux-mod_pkg_postrm +} diff --git a/x11-drivers/ati-drivers/files/amd-drivers-3.2.7.1.patch b/x11-drivers/ati-drivers/files/amd-drivers-3.2.7.1.patch new file mode 100644 index 00000000..104c8788 --- /dev/null +++ b/x11-drivers/ati-drivers/files/amd-drivers-3.2.7.1.patch @@ -0,0 +1,19 @@ +--- a/common/lib/modules/fglrx/build_mod/firegl_public.c ++++ b/common/lib/modules/fglrx/build_mod/firegl_public.c +@@ -5797,10 +5797,16 @@ void ATI_API_CALL KCL_fpu_begin(void) + #ifdef CONFIG_X86_64 + kernel_fpu_begin(); + #else ++#ifndef TS_USEDFPU ++ preempt_disable(); ++ if (__thread_has_fpu(current)) ++ __save_init_fpu(current); ++#else + struct thread_info *cur_task = current_thread_info(); + preempt_disable(); + if (cur_task->status & TS_USEDFPU) + __save_init_fpu(cur_task->task); ++#endif + else + clts(); + #endif diff --git a/x11-drivers/ati-drivers/files/ati-drivers-12.2-redefine-WARN.patch b/x11-drivers/ati-drivers/files/ati-drivers-12.2-redefine-WARN.patch new file mode 100644 index 00000000..f4fab432 --- /dev/null +++ b/x11-drivers/ati-drivers/files/ati-drivers-12.2-redefine-WARN.patch @@ -0,0 +1,42 @@ +--- common/lib/modules/fglrx/build_mod/kcl_debug.h.orig 2012-03-08 19:30:38.195025328 +0100 ++++ common/lib/modules/fglrx/build_mod/kcl_debug.h 2012-03-08 19:31:24.976024507 +0100 +@@ -85,8 +85,8 @@ + #ifdef ERROR + #undef ERROR + #endif +-#ifdef WARN +-#undef WARN ++#ifdef AMD_WARN ++#undef AMD_WARN + #endif + #ifdef INFO + #undef INFO +@@ -122,7 +122,7 @@ + { + SPECIAL = 0, + ERROR , +- WARN , ++ AMD_WARN , + INFO , + INFOEX, + TRACE, +@@ -160,7 +160,7 @@ + }log_map; + + +-#define DEFAULT_LOG_LEVEL ((U08)(___BIT(INFO) | ___BIT(INFOEX) |___BIT(ERROR) |___BIT(WARN) | ___BIT(TRACE)| ___BIT(SPECIAL) )) ++#define DEFAULT_LOG_LEVEL ((U08)(___BIT(INFO) | ___BIT(INFOEX) |___BIT(ERROR) |___BIT(AMD_WARN) | ___BIT(TRACE)| ___BIT(SPECIAL) )) + #define INFO_LOG_LEVEL ((U08)(___BIT(INFO) | ___BIT(INFOEX))) + extern const log_map module_log_map[]; + extern const module_map module_type_map[]; +--- common/lib/modules/fglrx/build_mod/kcl_debug.c.orig 2012-03-08 19:36:18.244019310 +0100 ++++ common/lib/modules/fglrx/build_mod/kcl_debug.c 2012-03-08 19:36:36.197018973 +0100 +@@ -69,7 +69,7 @@ + { + {SPECIAL , 'S'}, + {ERROR , 'E'}, +- {WARN , 'W'}, ++ {AMD_WARN , 'W'}, + {INFO , 'I'}, + {INFOEX , 'X'}, + {TRACE , 'T'}, diff --git a/x11-drivers/ati-drivers/files/ati-drivers-12.9-KCL_AGP_FindCapsRegisters-stub.patch b/x11-drivers/ati-drivers/files/ati-drivers-12.9-KCL_AGP_FindCapsRegisters-stub.patch new file mode 100644 index 00000000..0ea461b8 --- /dev/null +++ b/x11-drivers/ati-drivers/files/ati-drivers-12.9-KCL_AGP_FindCapsRegisters-stub.patch @@ -0,0 +1,27 @@ +From: Vasiliy Yeremeyev <vayerx@gmail.com> +Date: Sun, 4 Nov 2012 23:59:36 +0400 +Subject: [PATCH] KCL_AGP_FindCapsRegisters stub for AGP-less systems + +--- + common/lib/modules/fglrx/build_mod/kcl_agp.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/common/lib/modules/fglrx/build_mod/kcl_agp.c b/common/lib/modules/fglrx/build_mod/kcl_agp.c +index b9c0655..cb1902b 100644 +--- a/common/lib/modules/fglrx/build_mod/kcl_agp.c ++++ b/common/lib/modules/fglrx/build_mod/kcl_agp.c +@@ -479,6 +479,11 @@ int ATI_API_CALL KCL_AGP_Enable(unsigned long mode) + return -EINVAL; + } + ++int ATI_API_CALL KCL_AGP_FindCapsRegisters(KCL_PCI_DevHandle dev) ++{ ++ return -EINVAL; ++} ++ + int ATI_API_CALL KCL_AGP_ReadCapsRegisters(KCL_PCI_DevHandle dev, unsigned int *caps) + { + return -EINVAL; +-- +1.7.12 + diff --git a/x11-drivers/ati-drivers/files/ati-drivers-2.6.33.patch b/x11-drivers/ati-drivers/files/ati-drivers-2.6.33.patch new file mode 100644 index 00000000..85f9aff7 --- /dev/null +++ b/x11-drivers/ati-drivers/files/ati-drivers-2.6.33.patch @@ -0,0 +1,140 @@ +--- work.orig/common/lib/modules/fglrx/build_mod/drmP.h ++++ work/common/lib/modules/fglrx/build_mod/drmP.h +@@ -42,7 +42,11 @@ + * can build the DRM (part of PI DRI). 4/21/2000 S + B */ + #include <asm/current.h> + #endif /* __alpha__ */ ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) ++#include <generated/autoconf.h> ++#else + #include <linux/autoconf.h> ++#endif + #include <linux/module.h> + #include <linux/kernel.h> + #include <linux/miscdevice.h> +--- work.orig/common/lib/modules/fglrx/build_mod/firegl_public.c ++++ work/common/lib/modules/fglrx/build_mod/firegl_public.c +@@ -28,7 +28,11 @@ + #error Kernel versions older than 2.6.0 are no longer supported by this module. + #endif + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) ++#include <generated/autoconf.h> ++#else + #include <linux/autoconf.h> ++#endif + + #if !defined(CONFIG_X86) + #if !defined(CONFIG_X86_PC) +@@ -163,8 +167,12 @@ + + // For 2.6.18 or higher, the UTS_RELEASE is defined in the linux/utsrelease.h. + #ifndef UTS_RELEASE ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) ++#include <generated/utsrelease.h> ++#else + #include <linux/utsrelease.h> + #endif ++#endif + + #if defined(__i386__) + #ifndef do_div +--- work.orig/common/lib/modules/fglrx/build_mod/kcl_acpi.c ++++ work/common/lib/modules/fglrx/build_mod/kcl_acpi.c +@@ -15,7 +15,11 @@ + ****************************************************************************/ + + #include <linux/version.h> ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) ++#include <generated/autoconf.h> ++#else + #include <linux/autoconf.h> ++#endif + #include <linux/acpi.h> + + #include "kcl_config.h" +--- work.orig/common/lib/modules/fglrx/build_mod/kcl_agp.c ++++ work/common/lib/modules/fglrx/build_mod/kcl_agp.c +@@ -31,7 +31,11 @@ + */ + + #include <linux/version.h> ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) ++#include <generated/autoconf.h> ++#else + #include <linux/autoconf.h> ++#endif + #include <linux/pci.h> + #include <linux/agp_backend.h> + #include <linux/string.h> +--- work.orig/common/lib/modules/fglrx/build_mod/kcl_io.c ++++ work/common/lib/modules/fglrx/build_mod/kcl_io.c +@@ -37,7 +37,11 @@ + */ + + #include <linux/version.h> ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) ++#include <generated/autoconf.h> ++#else + #include <linux/autoconf.h> ++#endif + #include <linux/poll.h> + #include <linux/signal.h> + #include <asm/io.h> +--- work.orig/common/lib/modules/fglrx/build_mod/kcl_osconfig.h ++++ work/common/lib/modules/fglrx/build_mod/kcl_osconfig.h +@@ -20,7 +20,11 @@ + #define KCL_OSCONFIG_H + + #include <linux/version.h> ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) ++#include <generated/autoconf.h> ++#else + #include <linux/autoconf.h> ++#endif + + // Choose modern way to call 32-on-64 IOCTLs if configured in the kernel + #if defined(CONFIG_COMPAT) && LINUX_VERSION_CODE > KERNEL_VERSION(2,6,9) +--- work.orig/common/lib/modules/fglrx/build_mod/kcl_pci.c ++++ work/common/lib/modules/fglrx/build_mod/kcl_pci.c +@@ -31,7 +31,11 @@ + */ + + #include <linux/version.h> ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) ++#include <generated/autoconf.h> ++#else + #include <linux/autoconf.h> ++#endif + #include <linux/pci.h> + + #include "kcl_config.h" +--- work.orig/common/lib/modules/fglrx/build_mod/kcl_str.c ++++ work/common/lib/modules/fglrx/build_mod/kcl_str.c +@@ -30,7 +30,12 @@ + * + */ + ++#include <linux/version.h> ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) ++#include <generated/autoconf.h> ++#else + #include <linux/autoconf.h> ++#endif + #include <linux/string.h> + #include <linux/module.h> + +--- work.orig/common/lib/modules/fglrx/build_mod/kcl_wait.c ++++ work/common/lib/modules/fglrx/build_mod/kcl_wait.c +@@ -31,7 +31,11 @@ + */ + + #include <linux/version.h> ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) ++#include <generated/autoconf.h> ++#else + #include <linux/autoconf.h> ++#endif + #include <linux/wait.h> + #include <linux/highmem.h> + #include <linux/sched.h> diff --git a/x11-drivers/ati-drivers/files/ati-drivers-2.6.34.patch b/x11-drivers/ati-drivers/files/ati-drivers-2.6.34.patch new file mode 100644 index 00000000..1993d134 --- /dev/null +++ b/x11-drivers/ati-drivers/files/ati-drivers-2.6.34.patch @@ -0,0 +1,10 @@ +--- work.orig/common/lib/modules/fglrx/build_mod/kcl_wait.c 2010-04-13 20:02:46.494496561 +0200 ++++ work/common/lib/modules/fglrx/build_mod/kcl_wait.c 2010-04-13 19:52:00.054563389 +0200 +@@ -39,6 +39,7 @@ + #include <linux/wait.h> + #include <linux/highmem.h> + #include <linux/sched.h> ++#include <linux/slab.h> + + #include "kcl_config.h" + #include "kcl_wait.h" diff --git a/x11-drivers/ati-drivers/files/ati-drivers-2.6.35-and-newer.patch b/x11-drivers/ati-drivers/files/ati-drivers-2.6.35-and-newer.patch new file mode 100644 index 00000000..e1703f34 --- /dev/null +++ b/x11-drivers/ati-drivers/files/ati-drivers-2.6.35-and-newer.patch @@ -0,0 +1,11 @@ +--- work.orig/common/lib/modules/fglrx/build_mod/kcl_ioctl.c 2010-09-19 11:45:04.922760268 +0200 ++++ work/common/lib/modules/fglrx/build_mod/kcl_ioctl.c 2010-09-19 12:04:29.092812959 +0200 +@@ -193,7 +193,7 @@ void ATI_API_CALL KCL_IOCTL_UnregisterCo + */ + void* ATI_API_CALL KCL_IOCTL_AllocUserSpace32(long size) + { +- return compat_alloc_user_space(size); ++ return arch_compat_alloc_user_space(size); + } + + #endif // __x86_64__ diff --git a/x11-drivers/ati-drivers/files/ati-drivers-2.6.36.patch b/x11-drivers/ati-drivers/files/ati-drivers-2.6.36.patch new file mode 100644 index 00000000..5f8f5845 --- /dev/null +++ b/x11-drivers/ati-drivers/files/ati-drivers-2.6.36.patch @@ -0,0 +1,26 @@ +--- work.orig/common/lib/modules/fglrx/build_mod/firegl_public.c 2010-08-20 21:51:48.000000000 +0200 ++++ work/common/lib/modules/fglrx/build_mod/firegl_public.c 2010-08-20 23:46:37.000000000 +0200 +@@ -320,7 +320,11 @@ + return firegl_release((KCL_IO_FILE_Handle)filp); + } + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) ++int ip_firegl_ioctl(struct file* filp, unsigned int cmd, unsigned long arg) ++#else + int ip_firegl_ioctl(struct inode* inode, struct file* filp, unsigned int cmd, unsigned long arg) ++#endif + { + return firegl_ioctl((KCL_IO_FILE_Handle)filp, cmd, arg); + } +@@ -407,7 +411,11 @@ + #endif + open: ip_firegl_open, + release: ip_firegl_release, ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) ++ unlocked_ioctl: ip_firegl_ioctl, ++#else + ioctl: ip_firegl_ioctl, ++#endif + mmap: ip_firegl_mmap, + + write: ip_firegl_write, diff --git a/x11-drivers/ati-drivers/files/ati-drivers-2.6.37.patch b/x11-drivers/ati-drivers/files/ati-drivers-2.6.37.patch new file mode 100644 index 00000000..e3feb837 --- /dev/null +++ b/x11-drivers/ati-drivers/files/ati-drivers-2.6.37.patch @@ -0,0 +1,14 @@ +--- ati.orig/common/lib/modules/fglrx/build_mod/firegl_public.c 2010-11-18 18:08:34.831997690 +0100 ++++ ati/common/lib/modules/fglrx/build_mod/firegl_public.c 2010-11-18 18:10:28.711997706 +0100 +@@ -5094,7 +5094,11 @@ + unsigned int ATI_API_CALL KAS_Mutex_Initialize(void* hMutex) + { + kasMutex_t* mutex_obj = (kasMutex_t*)hMutex; ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37) ++ sema_init(&(mutex_obj->mutex),1); ++#else + init_MUTEX(&(mutex_obj->mutex)); ++#endif + return 1; + } + diff --git a/x11-drivers/ati-drivers/files/ati-drivers-2.6.38.patch b/x11-drivers/ati-drivers/files/ati-drivers-2.6.38.patch new file mode 100644 index 00000000..0c3970e0 --- /dev/null +++ b/x11-drivers/ati-drivers/files/ati-drivers-2.6.38.patch @@ -0,0 +1,60 @@ +--- cat11.1/common/lib/modules/fglrx/build_mod/firegl_public.c 2011-01-17 15:59:26.000000000 +0100 ++++ cat11.1/common/lib/modules/fglrx/build_mod/firegl_public.c 2011-02-01 18:39:08.902218444 +0100 +@@ -848,7 +848,12 @@ + * happen much less frequent then without this workaround. + */ + if (state == PM_EVENT_SUSPEND) +- acquire_console_sem(); ++ ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38) ++ console_lock(); ++#else ++ acquire_console_sem(); ++#endif + + if (firegl_cail_powerdown(privdev, state)) + ret = -EIO; +@@ -870,8 +875,13 @@ + } + + if (state == PM_EVENT_SUSPEND) +- release_console_sem(); +- ++ ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38) ++ console_unlock(); ++#else ++ release_console_sem(); ++#endif ++ + KCL_DEBUG_TRACEOUT(FN_FIREGL_ACPI, ret, NULL); + + return ret; +@@ -894,7 +904,12 @@ + if (PMSG_EVENT(pdev->dev.power.power_state) == 0) return 0; + + if (PMSG_EVENT(pdev->dev.power.power_state) == PM_EVENT_SUSPEND) +- acquire_console_sem(); ++ ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38) ++ console_lock(); ++#else ++ acquire_console_sem(); ++#endif + + #ifdef FIREGL_USWC_SUPPORT + // Restore the PAT after resuming from S3 or S4. +@@ -919,7 +934,12 @@ + firegl_cail_powerup(privdev); + + if (PMSG_EVENT(pdev->dev.power.power_state) == PM_EVENT_SUSPEND) +- release_console_sem(); ++ ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38) ++ console_unlock(); ++#else ++ release_console_sem(); ++#endif + + PMSG_EVENT(pdev->dev.power.power_state) = 0; + KCL_DEBUG_TRACEOUT(FN_FIREGL_ACPI, 0, NULL); diff --git a/x11-drivers/ati-drivers/files/ati-drivers-2.6.39.patch b/x11-drivers/ati-drivers/files/ati-drivers-2.6.39.patch new file mode 100644 index 00000000..ffd2e459 --- /dev/null +++ b/x11-drivers/ati-drivers/files/ati-drivers-2.6.39.patch @@ -0,0 +1,55 @@ +--- firegl_public.c.orig 2011-05-10 22:19:26.395914392 +0200 ++++ firegl_public.c 2011-05-11 01:40:36.967379590 +0200 +@@ -114,7 +114,9 @@ + #include <linux/pci.h> + #include <linux/wait.h> + #include <linux/miscdevice.h> ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39) + #include <linux/smp_lock.h> ++#endif + // newer SuSE kernels need this + #include <linux/highmem.h> + +@@ -1049,7 +1051,11 @@ static int __init firegl_init_module(voi + dev->pubdev.signature = FGL_DEVICE_SIGNATURE; + + for (i = 0; i < __KE_MAX_SPINLOCKS; i++) ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39) + dev->spinlock[i] = SPIN_LOCK_UNLOCKED; ++#else ++ dev->spinlock[i] = __SPIN_LOCK_UNLOCKED(old_style_spin_init); ++#endif + + for (i=0; i < __KE_MAX_SEMAPHORES; i++) + sema_init(&dev->struct_sem[i], 1); +@@ -1900,13 +1906,17 @@ void ATI_API_CALL KCL_spin_unlock(void * + /** \brief Grab global kernel lock */ + void ATI_API_CALL KCL_GlobalKernelLock(void) + { ++#ifdef CONFIG_KERNEL_LOCK + lock_kernel(); ++#endif + } + + /** \brief Release global kernel lock */ + void ATI_API_CALL KCL_GlobalKernelUnlock(void) + { ++#ifdef CONFIG_KERNEL_LOCK + unlock_kernel(); ++#endif + } + + /*****************************************************************************/ +--- drmP.h.orig 2011-05-10 22:17:00.000000000 +0200 ++++ drmP.h 2011-05-11 01:32:09.399610802 +0200 +@@ -57,7 +57,9 @@ + #include <linux/pci.h> + #include <linux/version.h> + #include <linux/sched.h> ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39) + #include <linux/smp_lock.h> /* For (un)lock_kernel */ ++#endif + #include <linux/mm.h> + #include <linux/pagemap.h> + #if defined(__alpha__) || defined(__powerpc__) + #if defined(__alpha__) || defined(__powerpc__) diff --git a/x11-drivers/ati-drivers/files/ati-drivers-3.2.8+-2.patch b/x11-drivers/ati-drivers/files/ati-drivers-3.2.8+-2.patch new file mode 100644 index 00000000..9bf9058f --- /dev/null +++ b/x11-drivers/ati-drivers/files/ati-drivers-3.2.8+-2.patch @@ -0,0 +1,12 @@ +--- a/common/lib/modules/fglrx/build_mod/firegl_public.c ++++ b/common/lib/modules/fglrx/build_mod/firegl_public.c +@@ -187,6 +187,9 @@ + #include <linux/gfp.h> + #include <linux/swap.h> + #include "asm/i387.h" ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0) ++#include <asm/fpu-internal.h> ++#endif + + #include "firegl_public.h" + #include "kcl_osconfig.h" diff --git a/x11-drivers/ati-drivers/files/ati-drivers-3.2.8+.patch b/x11-drivers/ati-drivers/files/ati-drivers-3.2.8+.patch new file mode 100644 index 00000000..01291160 --- /dev/null +++ b/x11-drivers/ati-drivers/files/ati-drivers-3.2.8+.patch @@ -0,0 +1,29 @@ +--- a/common/lib/modules/fglrx/build_mod/firegl_public.c ++++ b/common/lib/modules/fglrx/build_mod/firegl_public.c +@@ -187,6 +187,9 @@ + #include <linux/gfp.h> + #include <linux/swap.h> + #include "asm/i387.h" ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0) ++#include <asm/fpu-internal.h> ++#endif + + #include "firegl_public.h" + #include "kcl_osconfig.h" +@@ -5807,10 +5810,16 @@ void ATI_API_CALL KCL_fpu_begin(void) + #ifdef CONFIG_X86_64 + kernel_fpu_begin(); + #else ++#ifndef TS_USEDFPU ++ preempt_disable(); ++ if (__thread_has_fpu(current)) ++ __save_init_fpu(current); ++#else + struct thread_info *cur_task = current_thread_info(); + preempt_disable(); + if (cur_task->status & TS_USEDFPU) + __save_init_fpu(cur_task->task); ++#endif + else + clts(); + #endif diff --git a/x11-drivers/ati-drivers/files/ati-drivers-CVE-2010-3081-fix.patch b/x11-drivers/ati-drivers/files/ati-drivers-CVE-2010-3081-fix.patch new file mode 100644 index 00000000..5a71da10 --- /dev/null +++ b/x11-drivers/ati-drivers/files/ati-drivers-CVE-2010-3081-fix.patch @@ -0,0 +1,60 @@ +/**************************************************************************** + * * + * Copyright 1999-2005 ATI Technologies Inc., Markham, Ontario, CANADA. * + * All Rights Reserved. * + * * + * Your use and or redistribution of this software in source and \ or * + * binary form, with or without modification, is subject to: (i) your * + * ongoing acceptance of and compliance with the terms and conditions of * + * the ATI Technologies Inc. software End User License Agreement; and (ii) * + * your inclusion of this notice in any version of this software that you * + * use or redistribute. A copy of the ATI Technologies Inc. software End * + * User License Agreement is included with this software and is also * + * available by contacting ATI Technologies Inc. at http://www.ati.com * + * * + ****************************************************************************/ + +--- common/lib/modules/fglrx/build_mod/kcl_ioctl.c.orig 2010-09-01 16:05:31.000000000 +0200 ++++ common/lib/modules/fglrx/build_mod/kcl_ioctl.c 2010-09-23 01:41:46.711844303 +0200 +@@ -35,6 +35,9 @@ + + #ifdef __x86_64__ + # include "asm/compat.h" ++# if ARCH_COMPAT_ALLOC_USER_SPACE ++# include "linux/compat.h" ++# endif + # if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22) + # if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,12) + # include "linux/ioctl32.h" +@@ -193,7 +196,20 @@ + */ + void* ATI_API_CALL KCL_IOCTL_AllocUserSpace32(long size) + { +- return compat_alloc_user_space(size); ++ void __user *ptr; ++ ++ /* If size would occupy more than half of the entire compat space... */ ++ if (unlikely(size > (((compat_uptr_t)~0) >> 1))) ++ return NULL; ++#if ARCH_COMPAT_ALLOC_USER_SPACE ++ ptr = arch_compat_alloc_user_space(size); ++#else ++ ptr = compat_alloc_user_space(size); ++#endif ++ if (unlikely(!access_ok(VERIFY_WRITE, ptr, size))) ++ return NULL; ++ ++ return ptr; + } + + #endif // __x86_64__ +--- common/lib/modules/fglrx/build_mod/2.6.x/Makefile.orig 2010-09-01 16:05:31.000000000 +0200 ++++ common/lib/modules/fglrx/build_mod/2.6.x/Makefile 2010-09-23 01:47:46.533415019 +0200 +@@ -66,6 +66,7 @@ + -DFGL_GART_RESERVED_SLOT \ + -DFGL_LINUX253P1_VMA_API \ + -DPAGE_ATTR_FIX=$(PAGE_ATTR_FIX) \ ++ -DARCH_COMPAT_ALLOC_USER_SPACE=$(ARCH_COMPAT_ALLOC_USER_SPACE) \ + + ifeq ($(KERNELRELEASE),) + # on first call from remote location we get into this path diff --git a/x11-drivers/ati-drivers/files/ati-drivers-do_mmap.patch b/x11-drivers/ati-drivers/files/ati-drivers-do_mmap.patch new file mode 100644 index 00000000..04248eb7 --- /dev/null +++ b/x11-drivers/ati-drivers/files/ati-drivers-do_mmap.patch @@ -0,0 +1,50 @@ +--- a/common/lib/modules/fglrx/build_mod/firegl_public.c 2012-06-15 18:30:13.483762070 +0200 ++++ b/common/lib/modules/fglrx/build_mod/firegl_public.c 2012-06-17 17:47:36.543041869 +0200 +@@ -2106,6 +2106,12 @@ + } + } + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 5, 0) ++# define NO_DO_MMAP ++# define do_mmap(a,b,c,d,e,f) vm_mmap(a, b, c, d, e, f) ++# define do_munmap(a,b,c) vm_munmap(b, c) ++#endif ++ + unsigned long ATI_API_CALL KCL_MEM_AllocLinearAddrInterval( + KCL_IO_FILE_Handle file, + unsigned long addr, +@@ -2117,10 +2123,13 @@ + + flags = MAP_SHARED; + prot = PROT_READ|PROT_WRITE; +- ++#ifdef NO_DO_MMAP ++ vaddr = (void *) vm_mmap(file, 0, len, prot, flags, pgoff); ++#else + down_write(¤t->mm->mmap_sem); + vaddr = (void *) do_mmap(file, 0, len, prot, flags, pgoff); + up_write(¤t->mm->mmap_sem); ++#endif + if (IS_ERR(vaddr)) + return 0; + else +@@ -2131,7 +2140,9 @@ + { + int retcode = 0; + ++#ifndef NO_DO_MMAP + down_write(¤t->mm->mmap_sem); ++#endif + #ifdef FGL_LINUX_RHEL_MUNMAP_API + retcode = do_munmap(current->mm, + addr, +@@ -2142,7 +2153,9 @@ + addr, + len); + #endif ++#ifndef NO_DO_MMAP + up_write(¤t->mm->mmap_sem); ++#endif + return retcode; + } + diff --git a/x11-drivers/ati-drivers/files/ati-drivers-fix_compilation-bug-297322.patch b/x11-drivers/ati-drivers/files/ati-drivers-fix_compilation-bug-297322.patch new file mode 100644 index 00000000..e2af915a --- /dev/null +++ b/x11-drivers/ati-drivers/files/ati-drivers-fix_compilation-bug-297322.patch @@ -0,0 +1,25 @@ +--- common/lib/modules/fglrx/build_mod/firegl_public.c ++++ common/lib/modules/fglrx/build_mod/firegl_public.c +@@ -1441,7 +1441,9 @@ + todo !!! + #endif + +-unsigned long ATI_API_CALL __ke__cmpxchg(volatile void *ptr, unsigned long old, ++void __cmpxchg_wrong_size(void) {} ++ ++unsigned long ATI_API_CALL __ke__cmpxchg(volatile unsigned long *ptr, unsigned long old, + unsigned long new, int size) + { + #ifndef __HAVE_ARCH_CMPXCHG +--- common/lib/modules/fglrx/build_mod/firegl_public.h ++++ common/lib/modules/fglrx/build_mod/firegl_public.h +@@ -441,7 +441,8 @@ + extern void ATI_API_CALL KCL_SIGNAL_BlockAll(int (*notifier)(void *priv), void *pPriv, __ke_sigset_t *pSigMask); + extern void ATI_API_CALL KCL_SIGNAL_UnblockAll(void); + +-extern unsigned long ATI_API_CALL __ke__cmpxchg(volatile void *ptr, unsigned long old, ++extern void __cmpxchg_wrong_size(void); ++extern unsigned long ATI_API_CALL __ke__cmpxchg(volatile unsigned long *ptr, unsigned long old, + unsigned long new, int size); + + #define __ke_cmpxchg(ptr,o,n) \ diff --git a/x11-drivers/ati-drivers/files/ati-drivers-kernel-3.8-acpihandle.patch b/x11-drivers/ati-drivers/files/ati-drivers-kernel-3.8-acpihandle.patch new file mode 100644 index 00000000..bdff4fb7 --- /dev/null +++ b/x11-drivers/ati-drivers/files/ati-drivers-kernel-3.8-acpihandle.patch @@ -0,0 +1,15 @@ +--- common/lib/modules/fglrx/build_mod/kcl_acpi.c 2012-07-04 21:43:47.000000000 +0200 ++++ common/lib/modules/fglrx/build_mod/kcl_acpi.c.new 2012-12-23 11:25:38.000000000 +0100 +@@ -775,11 +775,7 @@ + unsigned int ATI_API_CALL KCL_ACPI_GetHandles(kcl_match_info_t *pInfo) + { + #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,12) +- #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,19) +- pInfo->video_handle = pInfo->pcidev->dev.archdata.acpi_handle; +- #else +- pInfo->video_handle = pInfo->pcidev->dev.firmware_data; +- #endif ++ pInfo->video_handle = DEVICE_ACPI_HANDLE(&pInfo->pcidev->dev); + if ( pInfo->video_handle && + (KCL_ACPI_videoDevice(pInfo->video_handle) != KCL_ACPI_OK) ) + { diff --git a/x11-drivers/ati-drivers/files/ati-drivers-old_rsp.patch b/x11-drivers/ati-drivers/files/ati-drivers-old_rsp.patch new file mode 100644 index 00000000..0456bd6b --- /dev/null +++ b/x11-drivers/ati-drivers/files/ati-drivers-old_rsp.patch @@ -0,0 +1,24 @@ +--- a/common/lib/modules/fglrx/build_mod/firegl_public.c 2012-05-26 18:33:25.044695179 +0200
++++ b/common/lib/modules/fglrx/build_mod/firegl_public.c 2012-05-26 18:28:39.692699095 +0200
+@@ -4154,7 +4154,7 @@
+ {
+ unsigned int p;
+ KCL_DEBUG5(FN_FIREGL_KAS, "%d\n", level_init);
+- for_each_cpu_mask(p, cpu_possible_map)
++ for_each_possible_cpu(p)
+ {
+ KCL_DEBUG1(FN_FIREGL_KAS,"Setting initial execution level for CPU # %d\n", p);
+ preempt_disable();
+--- a/common/lib/modules/fglrx/build_mod/kcl_ioctl.c 2012-05-26 19:11:03.402987821 +0200
++++ b/common/lib/modules/fglrx/build_mod/kcl_ioctl.c 2012-05-26 19:13:00.273986422 +0200
+@@ -217,6 +217,10 @@
+ * \param size [in] Number of bytes to allocate
+ * \return Pointer to allocated memory
+ */
++#ifndef CONFIG_X86_X32
++DEFINE_PER_CPU(unsigned long, old_rsp);
++#endif
++
+ void* ATI_API_CALL KCL_IOCTL_AllocUserSpace32(long size)
+ {
+ void __user *ret = COMPAT_ALLOC_USER_SPACE(size);
\ No newline at end of file diff --git a/x11-drivers/ati-drivers/files/ati-drivers-redefine-WARN.patch b/x11-drivers/ati-drivers/files/ati-drivers-redefine-WARN.patch new file mode 100644 index 00000000..fe5ed2f8 --- /dev/null +++ b/x11-drivers/ati-drivers/files/ati-drivers-redefine-WARN.patch @@ -0,0 +1,39 @@ +--- common/lib/modules/fglrx/build_mod/kcl_debug.h.orig 2011-12-30 14:32:00.271391437 +0100 ++++ common/lib/modules/fglrx/build_mod/kcl_debug.h 2011-12-30 15:48:21.647473696 +0100 +@@ -85,8 +85,8 @@ + #ifdef ERROR + #undef ERROR + #endif +-#ifdef WARN +-#undef WARN ++#ifdef AMD_WARN ++#undef AMD_WARN + #endif + #ifdef INFO + #undef INFO +@@ -122,7 +122,7 @@ + { + SPECIAL = 0, + ERROR , +- WARN , ++ AMD_WARN , + INFO , + INFOEX, + TRACE, +@@ -163,14 +163,14 @@ + { + {SPECIAL , 'S'}, + {ERROR , 'E'}, +- {WARN , 'W'}, ++ {AMD_WARN , 'W'}, + {INFO , 'I'}, + {INFOEX , 'X'}, + {TRACE , 'T'}, + {PERFORMANCE , 'P'}, + {DUMP , 'D'}, + }; +-#define DEFAULT_LOG_LEVEL ((U08)(___BIT(INFO) | ___BIT(INFOEX) |___BIT(ERROR) |___BIT(WARN) | ___BIT(TRACE)| ___BIT(SPECIAL) )) ++#define DEFAULT_LOG_LEVEL ((U08)(___BIT(INFO) | ___BIT(INFOEX) |___BIT(ERROR) |___BIT(AMD_WARN) | ___BIT(TRACE)| ___BIT(SPECIAL) )) + #define INFO_LOG_LEVEL ((U08)(___BIT(INFO) | ___BIT(INFOEX))) + static module_map module_type_map[LOG_M_MAX] = + { diff --git a/x11-drivers/ati-drivers/files/ati-drivers-vm-reserverd.patch b/x11-drivers/ati-drivers/files/ati-drivers-vm-reserverd.patch new file mode 100644 index 00000000..08045a65 --- /dev/null +++ b/x11-drivers/ati-drivers/files/ati-drivers-vm-reserverd.patch @@ -0,0 +1,12 @@ +--- common/lib/modules/fglrx/build_mod/firegl_public.c 2012-10-18 00:29:21.778369464 +0200 ++++ common/lib/modules/fglrx/build_mod/firegl_public.c.new 2012-10-18 00:30:39.647416026 +0200 +@@ -222,6 +222,10 @@ + #define preempt_enable() + #endif + ++#ifndef VM_RESERVED ++#define VM_RESERVED (VM_DONTEXPAND | VM_DONTDUMP) ++#endif ++ + // ============================================================ + /* globals */ diff --git a/x11-drivers/ati-drivers/files/ati-drivers-x32_something_something.patch b/x11-drivers/ati-drivers/files/ati-drivers-x32_something_something.patch new file mode 100644 index 00000000..d37c1191 --- /dev/null +++ b/x11-drivers/ati-drivers/files/ati-drivers-x32_something_something.patch @@ -0,0 +1,13 @@ +--- a/common/lib/modules/fglrx/build_mod/kcl_ioctl.c 2012-05-26 19:11:03.402987821 +0200 ++++ b/common/lib/modules/fglrx/build_mod/kcl_ioctl.c 2012-05-26 19:13:00.273986422 +0200 +@@ -217,6 +217,10 @@ + * \param size [in] Number of bytes to allocate + * \return Pointer to allocated memory + */ ++#ifndef CONFIG_X86_X32 ++DEFINE_PER_CPU(unsigned long, old_rsp); ++#endif ++ + void* ATI_API_CALL KCL_IOCTL_AllocUserSpace32(long size) + { + void __user *ret = COMPAT_ALLOC_USER_SPACE(size); diff --git a/x11-drivers/ati-drivers/files/ati-drivers-xen.patch b/x11-drivers/ati-drivers/files/ati-drivers-xen.patch new file mode 100644 index 00000000..a1b88df7 --- /dev/null +++ b/x11-drivers/ati-drivers/files/ati-drivers-xen.patch @@ -0,0 +1,62 @@ +--- common/lib/modules/fglrx/build_mod/firegl_public.c 2008-12-09 15:17:27.000000000 +0000 ++++ common/lib/modules/fglrx/build_mod/firegl_public.c 2008-12-09 15:12:34.000000000 +0000 +@@ -31,6 +31,9 @@ + #include <linux/autoconf.h> + + #if !defined(CONFIG_X86_PC) ++#if !defined(CONFIG_X86_PC_XEN) ++#if !defined(CONFIG_X86_XEN) ++#if !defined(CONFIG_X86_64_XEN) + #if !defined(CONFIG_X86_64) + #if !defined(CONFIG_X86_VOYAGER) + #if !defined(CONFIG_X86_NUMAQ) +@@ -47,6 +50,9 @@ + #endif + #endif + #endif ++#endif ++#endif ++#endif + + /* The dirty-page-tracking patch included in NLD 9 SMP kernels defines + * a static inline function that uses a GPL-only symbol in a header +--- common/lib/modules/fglrx/build_mod/firegl_public.h 2008-12-09 15:17:27.000000000 +0000 ++++ common/lib/modules/fglrx/build_mod/firegl_public.h 2008-12-09 15:15:45.000000000 +0000 +@@ -30,9 +30,13 @@ + #endif + + #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,9) +- ++#ifdef CONFIG_XEN ++#define REMAP_PAGE_RANGE_FN io_remap_pfn_range ++#define REMAP_PAGE_RANGE_STR "io_remap_pfn_range" ++#else + #define REMAP_PAGE_RANGE_FN remap_pfn_range + #define REMAP_PAGE_RANGE_STR "remap_pfn_range" ++#endif + #define REMAP_PAGE_RANGE_OFF(offset) ((offset) >> PAGE_SHIFT) + + #else /* LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,9) */ +@@ -43,13 +47,21 @@ + + #endif /* LINUX_VERSION_CODE > KERNEL_VERSION(2,6,9) */ + ++#ifdef CONFIG_XEN ++#define REMAP_PAGE_RANGE(vma,offset) \ ++ REMAP_PAGE_RANGE_FN((vma), \ ++ (vma)->vm_start, \ ++ REMAP_PAGE_RANGE_OFF(offset), \ ++ (vma)->vm_end - (vma)->vm_start, \ ++ (vma)->vm_page_prot) ++#else + #define REMAP_PAGE_RANGE(vma,offset) \ + REMAP_PAGE_RANGE_FN(FGL_VMA_API_PASS \ + (vma)->vm_start, \ + REMAP_PAGE_RANGE_OFF(offset), \ + (vma)->vm_end - (vma)->vm_start, \ + (vma)->vm_page_prot) +- ++#endif + + /* Page table macros */ + diff --git a/x11-drivers/ati-drivers/files/ati-powermode-opt-path-2.patch b/x11-drivers/ati-drivers/files/ati-powermode-opt-path-2.patch new file mode 100644 index 00000000..f5a35a30 --- /dev/null +++ b/x11-drivers/ati-drivers/files/ati-powermode-opt-path-2.patch @@ -0,0 +1,42 @@ +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 +@@ -4,6 +4,8 @@ + # Control script for ACPI lid state and AC adapter state + # + ++aticonfig='/opt/bin/aticonfig' ++ + getXuser() { + user=`finger| grep -m1 ":$displaynum " | awk '{print $1}'` + if [ x"$user" = x"" ]; then +@@ -47,7 +49,7 @@ + done + + #If PPLIB is enabled +-su $user -c '/usr/bin/aticonfig --pplib-cmd="get version"' | grep PPLIB ++su $user -c '$aticonfig --pplib-cmd="get version"' | grep PPLIB + if [ $? = 0 ]; then + echo "Has PPLIB" + has_pplib=1 +@@ -61,15 +63,15 @@ + if [ ${lid_closed} -eq 1 -o ${on_dc} -eq 1 ]; then + echo "Low power" + if [ ${has_pplib} -eq 1 ]; then +- su $user -c '/usr/bin/aticonfig --pplib-cmd="notify psrc dc"' ++ su $user -c '$aticonfig --pplib-cmd="notify psrc dc"' + else +- su $user -c "/usr/bin/aticonfig --set-powerstate=1 --effective=now" ++ su $user -c "$aticonfig --set-powerstate=1" + fi + else + echo "high power" + if [ ${has_pplib} -eq 1 ]; then +- su $user -c '/usr/bin/aticonfig --pplib-cmd="notify psrc ac"' ++ su $user -c '$aticonfig --pplib-cmd="notify psrc ac"' + else +- su $user -c "/usr/bin/aticonfig --set-powerstate=3 --effective=now" ++ su $user -c "$aticonfig --set-powerstate=$($aticonfig --lsp | grep 'default state' | cut -c 3)" + fi + fi + diff --git a/x11-drivers/ati-drivers/files/ati-powermode-opt-path-3.patch b/x11-drivers/ati-drivers/files/ati-powermode-opt-path-3.patch new file mode 100644 index 00000000..106e67ee --- /dev/null +++ b/x11-drivers/ati-drivers/files/ati-powermode-opt-path-3.patch @@ -0,0 +1,40 @@ +--- a/common/usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh 2012-08-17 22:39:05.077984979 +0800 ++++ b/common/usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh 2012-08-17 22:41:15.919976149 +0800 +@@ -4,6 +4,8 @@ + # Control script for ACPI lid state and AC adapter state + # + ++aticonfig='/opt/bin/aticonfig' ++ + getXuser() { + user=`who| grep -m1 ":$displaynum " | awk '{print $1}'` + if [ x"$user" = x"" ]; then +@@ -47,7 +49,7 @@ + done + + #If PPLIB is enabled +-su $user -c '/usr/bin/aticonfig --pplib-cmd="get version"' | grep PPLIB ++su $user -c '$aticonfig --pplib-cmd="get version"' | grep PPLIB + if [ $? = 0 ]; then + echo "Has PPLIB" + has_pplib=1 +@@ -61,15 +63,15 @@ + if [ ${lid_closed} -eq 1 -o ${on_dc} -eq 1 ]; then + echo "Low power" + if [ ${has_pplib} -eq 1 ]; then +- su $user -c '/usr/bin/aticonfig --pplib-cmd="notify psrc dc"' ++ su $user -c '$aticonfig --pplib-cmd="notify psrc dc"' + else +- su $user -c "/usr/bin/aticonfig --set-powerstate=1 --effective=now" ++ su $user -c "$aticonfig --set-powerstate=1 --effective=now" + fi + else + echo "high power" + if [ ${has_pplib} -eq 1 ]; then +- su $user -c '/usr/bin/aticonfig --pplib-cmd="notify psrc ac"' ++ su $user -c '$aticonfig --pplib-cmd="notify psrc ac"' + else +- su $user -c "/usr/bin/aticonfig --set-powerstate=3 --effective=now" ++ su $user -c "$aticonfig --set-powerstate=3 --effective=now" + fi + fi diff --git a/x11-drivers/ati-drivers/files/atieventsd.init b/x11-drivers/ati-drivers/files/atieventsd.init new file mode 100644 index 00000000..73139ce3 --- /dev/null +++ b/x11-drivers/ati-drivers/files/atieventsd.init @@ -0,0 +1,20 @@ +#!/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.init,v 1.3 2007/05/18 23:58:01 marienz Exp $ + +depend() { + need acpid +} + +start() { + ebegin "Starting ${SVCNAME}" + start-stop-daemon --start --exec /opt/sbin/atieventsd -- ${ATIEVENTSDOPTS} + eend $? +} + +stop() { + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --stop --quiet --exec /opt/sbin/atieventsd + eend $? +}
\ No newline at end of file diff --git a/x11-drivers/ati-drivers/files/const-notifier-block.patch b/x11-drivers/ati-drivers/files/const-notifier-block.patch new file mode 100644 index 00000000..ba1fdb2b --- /dev/null +++ b/x11-drivers/ati-drivers/files/const-notifier-block.patch @@ -0,0 +1,25 @@ +diff -Nur common/lib/modules/fglrx/build_mod/kcl_acpi.c common-r1/lib/modules/fglrx/build_mod/kcl_acpi.c +--- common/lib/modules/fglrx/build_mod/kcl_acpi.c 2013-01-29 17:03:51.000000000 +0200 ++++ common-r1/lib/modules/fglrx/build_mod/kcl_acpi.c 2013-02-15 20:33:10.611838616 +0200 +@@ -15,6 +15,9 @@ + ****************************************************************************/ + + #include <linux/version.h> ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0) ++#include <linux/notifier.h> ++#endif + #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) + #include <generated/autoconf.h> + #else +@@ -145,7 +148,11 @@ + return NOTIFY_OK; + } + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0) ++static notifier_block_no_const firegl_acpi_lid_notifier = { ++#else + static struct notifier_block firegl_acpi_lid_notifier = { ++#endif + .notifier_call = firegl_acpi_lid_event, + }; + #endif diff --git a/x11-drivers/ati-drivers/files/kernel/2.6.31-fglrx_find_task_by_vpid.patch b/x11-drivers/ati-drivers/files/kernel/2.6.31-fglrx_find_task_by_vpid.patch new file mode 100644 index 00000000..1d4e030b --- /dev/null +++ b/x11-drivers/ati-drivers/files/kernel/2.6.31-fglrx_find_task_by_vpid.patch @@ -0,0 +1,19 @@ +--- common/lib/modules/fglrx/build_mod/firegl_public.c.orig 2009-09-10 20:14:10.302938534 +0200 ++++ common/lib/modules/fglrx/build_mod/firegl_public.c 2009-09-10 20:16:21.828943780 +0200 +@@ -183,6 +183,7 @@ + #include <linux/string.h> + #include <linux/gfp.h> + #include <linux/swap.h> ++#include <linux/pid.h> + + #include "firegl_public.h" + #include "kcl_osconfig.h" +@@ -1315,7 +1316,7 @@ + #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26) + p = find_task_by_pid( pid ); + #else +- p = find_task_by_vpid( pid ); ++ p = pid_task( pid, PIDTYPE_PID ); + #endif + if (p) + { diff --git a/x11-drivers/ati-drivers/files/kernel/2.6.32-9.11-fix_compilation.patch b/x11-drivers/ati-drivers/files/kernel/2.6.32-9.11-fix_compilation.patch new file mode 100644 index 00000000..38519d76 --- /dev/null +++ b/x11-drivers/ati-drivers/files/kernel/2.6.32-9.11-fix_compilation.patch @@ -0,0 +1,37 @@ +--- work/common/lib/modules/fglrx/build_mod/firegl_public.c ++++ work.new/common/lib/modules/fglrx/build_mod/firegl_public.c +@@ -1441,7 +1441,9 @@ + todo !!! + #endif + +-unsigned long ATI_API_CALL __ke__cmpxchg(volatile void *ptr, unsigned long old, ++void __cmpxchg_wrong_size(void) {} ++ ++unsigned long ATI_API_CALL __ke__cmpxchg(volatile unsigned long *ptr, unsigned long old, + unsigned long new, int size) + { + #ifndef __HAVE_ARCH_CMPXCHG +--- work/common/lib/modules/fglrx/build_mod/firegl_public.h ++++ work.new/common/lib/modules/fglrx/build_mod/firegl_public.h +@@ -441,7 +441,8 @@ + extern void ATI_API_CALL KCL_SIGNAL_BlockAll(int (*notifier)(void *priv), void *pPriv, __ke_sigset_t *pSigMask); + extern void ATI_API_CALL KCL_SIGNAL_UnblockAll(void); + +-extern unsigned long ATI_API_CALL __ke__cmpxchg(volatile void *ptr, unsigned long old, ++extern void __cmpxchg_wrong_size(void); ++extern unsigned long ATI_API_CALL __ke__cmpxchg(volatile unsigned long *ptr, unsigned long old, + unsigned long new, int size); + + #define __ke_cmpxchg(ptr,o,n) \ +--- work/common/lib/modules/fglrx/build_mod/kcl_io.c ++++ work.new/common/lib/modules/fglrx/build_mod/kcl_io.c +@@ -37,8 +37,9 @@ + */ + + #include <linux/version.h> + #include <linux/autoconf.h> + #include <linux/poll.h> ++#include <linux/signal.h> + #include <asm/io.h> + + #include "kcl_config.h" diff --git a/x11-drivers/ati-drivers/files/switchlibGL b/x11-drivers/ati-drivers/files/switchlibGL new file mode 100644 index 00000000..a6aa4fce --- /dev/null +++ b/x11-drivers/ati-drivers/files/switchlibGL @@ -0,0 +1,61 @@ +#!/bin/bash +# switchlibGL +# +# Copyright (c) 2011 Advanced Micro Devices, Inc. +# +# Purpose: +# For switch between AMD and Intel graphic driver library. +# +# Usage: +# switchlibGL amd|intel|query +# amd: switches to the AMD version of libGL. +# intel: switches to the open-source version of libGL . +# query: checks, which version is currently active and prints either "amd" +# or "intel" or "unknown" on the standard output. +# must be root to execute this script + +ARCH=`uname -m` +E_ERR=1 + +# Check if root +if [ "`whoami`" != "root" ]; then + echo "Must be root to run this script." 1>&2 + exit $E_ERR +fi + +# One parameter +if [ $# -ne 1 ]; then + echo "Usage: `basename $0` amd|intel|query " 1>&2 + echo "Please choose one parameter " 1>&2 + exit $E_ERR +fi + +current=$(eselect opengl show) +# Switch to right mode +case "$1" in + "amd" ) + if [ $current != ati ] ; then + eselect opengl set ati || return 1 + fi + ;; + "intel" ) + if [ $current != xorg-x11 ] ; then + eselect opengl set xorg-x11 || return 1 + fi + ;; + "query" ) + case "$current" in + "ati" ) + echo "amd" + ;; + "xorg-x11" ) + echo "intel" + ;; + esac + ;; + * ) echo "Usage: `basename $0` amd|intel|query" 1>&2; exit $E_ERR;; + # other than amd|intel|query parameter report an error +esac + +# A zero return value from the script upon exit indicates success. +exit 0 diff --git a/x11-drivers/ati-userspace/Manifest b/x11-drivers/ati-userspace/Manifest new file mode 100644 index 00000000..86cbffe8 --- /dev/null +++ b/x11-drivers/ati-userspace/Manifest @@ -0,0 +1,57 @@ +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.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-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 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-11.10.ebuild b/x11-drivers/ati-userspace/ati-userspace-11.10.ebuild new file mode 100644 index 00000000..97f73d32 --- /dev/null +++ b/x11-drivers/ati-userspace/ati-userspace-11.10.ebuild @@ -0,0 +1,384 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="2" + +inherit eutils multilib toolchain-funcs versionator + +DESCRIPTION="AMD X11 drivers for r600 (HD Series) and newer chipsets" +HOMEPAGE="http://ati.amd.com" +# 8.ble will be used for beta releases. +if [[ $(get_major_version) -gt 8 ]]; then + ATI_URL="http://www2.ati.com/drivers/linux/" + SRC_URI="${ATI_URL}/ati-driver-installer-${PV/./-}-x86.x86_64.run" + FOLDER_PREFIX="common/" +else + SRC_URI="https://launchpad.net/ubuntu/natty/+source/fglrx-installer/2:${PV}-0ubuntu1/+files/fglrx-installer_${PV}.orig.tar.gz" + FOLDER_PREFIX="" +fi +IUSE="debug multilib" + +LICENSE="AMD GPL-2 as-is" +KEYWORDS="~amd64 ~x86" +SLOT="1" + +RDEPEND="<=x11-base/xorg-server-1.10.99 + !x11-drivers/ati-drivers:0 + !x11-apps/ati-drivers-extra + >=app-admin/eselect-opengl-1.0.7 + x11-apps/xauth + x11-libs/libX11 + x11-libs/libXext + x11-libs/libXinerama + x11-libs/libXrandr + x11-libs/libXrender + multilib? ( app-emulation/emul-linux-x86-opengl ) + !<x11-drivers/ati-userspace-${PV} + !>x11-drivers/ati-userspace-${PV}" + +DEPEND="${RDEPEND} + app-misc/pax-utils + app-portage/portage-utils + sys-apps/findutils + x11-proto/inputproto + x11-proto/xf86miscproto + x11-proto/xf86vidmodeproto + x11-proto/xineramaproto + x11-libs/libXtst" + +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 +" + +QA_DT_HASH=" + opt/bin/amdcccle + opt/bin/aticonfig + opt/bin/atiodcli + opt/bin/atiode + opt/bin/fglrxinfo + opt/sbin/atieventsd + 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 +" + +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 +} + +src_unpack() { + if [[ $(get_major_version) -gt 8 ]]; then + # Switching to a standard way to extract the files since otherwise no signature file + # would be created + local src="${DISTDIR}/${A}" + sh "${src}" --extract "${S}" 2&>1 /dev/null + else + unpack ${A} + fi +} + +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-2.patch || die "Failed to epatch powermode-opt-path-2.patch" + + cd "${S}" + mkdir extra || die "mkdir failed" + cd extra + unpack ./../${FOLDER_PREFIX}usr/src/ati/fglrx_sample_source.tgz +} + +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_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; 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 + # 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" + else + local EX_BASE_DIR="${BASE_DIR}" + local pkglibdir=lib + local MY_ARCH_DIR="${S}/arch/x86" + 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 + # PowerXpress stuff + mv "${D}"/${ATI_ROOT}/extensions/{fglrx-,}libglx.so + + # lib. + exeinto /usr/$(get_libdir) + # Everything except for the libGL.so installed in src_install-libs. + 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 libraries + exeinto /usr/$(get_libdir) + doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libati*.so* + + 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##*/} + ## let's keep also this alternative way ;) + #dosym ${soname} /usr/$(get_libdir)/${soname%.[0-9]} + dosym ${soname} /usr/$(get_libdir)/$(scanelf -qF "#f%S" ${so}) + done + +} + +pkg_postinst() { + 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 "You will have to source /etc/profile (or logout and back in) for dri" + elog "to work, unless you previously had ati-drivers installed." + + "${ROOT}"/usr/bin/eselect opengl set --use-old ati +} + +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-11.11.ebuild b/x11-drivers/ati-userspace/ati-userspace-11.11.ebuild new file mode 100644 index 00000000..14f897db --- /dev/null +++ b/x11-drivers/ati-userspace/ati-userspace-11.11.ebuild @@ -0,0 +1,412 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="2" + +inherit eutils multilib toolchain-funcs versionator + +DESCRIPTION="AMD X11 drivers for r600 (HD Series) and newer chipsets" +HOMEPAGE="http://ati.amd.com" +# 8.ble will be used for beta releases. +if [[ $(get_major_version) -gt 8 ]]; then + ATI_URL="http://www2.ati.com/drivers/linux/" + SRC_URI="${ATI_URL}/ati-driver-installer-${PV/./-}-x86.x86_64.run" + FOLDER_PREFIX="common/" +else + SRC_URI="https://launchpad.net/ubuntu/natty/+source/fglrx-installer/2:${PV}-0ubuntu1/+files/fglrx-installer_${PV}.orig.tar.gz" + FOLDER_PREFIX="" +fi +IUSE="debug multilib opencl" + +LICENSE="AMD GPL-2 as-is" +KEYWORDS="~amd64 ~x86" +SLOT="1" + +RDEPEND="<=x11-base/xorg-server-1.11.49 + !x11-drivers/ati-drivers:0 + !x11-apps/ati-drivers-extra + >=app-admin/eselect-opengl-1.0.7 + x11-apps/xauth + x11-libs/libX11 + x11-libs/libXext + x11-libs/libXinerama + x11-libs/libXrandr + x11-libs/libXrender + multilib? ( + app-emulation/emul-linux-x86-opengl + app-emulation/emul-linux-x86-xlibs + ) + !<x11-drivers/ati-userspace-${PV} + !>x11-drivers/ati-userspace-${PV}" + +DEPEND="${RDEPEND} + sys-apps/findutils + x11-proto/inputproto + x11-proto/xf86miscproto + x11-proto/xf86vidmodeproto + x11-proto/xineramaproto + x11-libs/libXtst" + +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\)\?/libamdocl\(32\|64\)\?.so + usr/lib\(32\|64\)\?/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 +} + +src_unpack() { + if [[ $(get_major_version) -gt 8 ]]; then + # Switching to a standard way to extract the files since otherwise no signature file + # would be created + local src="${DISTDIR}/${A}" + sh "${src}" --extract "${S}" 2&>1 /dev/null + else + unpack ${A} + fi +} + +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-2.patch || die "Failed to epatch powermode-opt-path-2.patch" + + cd "${S}" + mkdir extra || die "mkdir failed" + cd extra + unpack ./../${FOLDER_PREFIX}usr/src/ati/fglrx_sample_source.tgz +} + +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_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; 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 + use opencl && 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 + # OpenCL + if use opencl ; then + insinto /etc/OpenCL/vendors/ + if [[ "${ABI}" == "amd64" ]] ; then + doins "${ARCH_DIR}"/etc/OpenCL/vendors/amdocl64.icd || die "doins failed" + else + doins "${ARCH_DIR}"/etc/OpenCL/vendors/amdocl32.icd || die "doins failed" + fi + fi + + # 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" + else + local EX_BASE_DIR="${BASE_DIR}" + local pkglibdir=lib + local MY_ARCH_DIR="${S}/arch/x86" + 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 + # PowerXpress stuff + mv "${D}"/${ATI_ROOT}/extensions/{fglrx-,}libglx.so + + # lib. + exeinto /usr/$(get_libdir) + # Everything except for the libGL.so installed in src_install-libs. + 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) + if use opencl ; then + doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/lib*.so* + else + doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libati*.so* + fi + + 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##*/} + ## let's keep also this alternative way ;) + #dosym ${soname} /usr/$(get_libdir)/${soname%.[0-9]} + dosym ${soname} /usr/$(get_libdir)/$(scanelf -qF "#f%S" ${so}) + done + +} + +pkg_postinst() { + 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 + 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" + + "${ROOT}"/usr/bin/eselect opengl set --use-old ati +} + +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-11.12.ebuild b/x11-drivers/ati-userspace/ati-userspace-11.12.ebuild new file mode 100644 index 00000000..14f897db --- /dev/null +++ b/x11-drivers/ati-userspace/ati-userspace-11.12.ebuild @@ -0,0 +1,412 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="2" + +inherit eutils multilib toolchain-funcs versionator + +DESCRIPTION="AMD X11 drivers for r600 (HD Series) and newer chipsets" +HOMEPAGE="http://ati.amd.com" +# 8.ble will be used for beta releases. +if [[ $(get_major_version) -gt 8 ]]; then + ATI_URL="http://www2.ati.com/drivers/linux/" + SRC_URI="${ATI_URL}/ati-driver-installer-${PV/./-}-x86.x86_64.run" + FOLDER_PREFIX="common/" +else + SRC_URI="https://launchpad.net/ubuntu/natty/+source/fglrx-installer/2:${PV}-0ubuntu1/+files/fglrx-installer_${PV}.orig.tar.gz" + FOLDER_PREFIX="" +fi +IUSE="debug multilib opencl" + +LICENSE="AMD GPL-2 as-is" +KEYWORDS="~amd64 ~x86" +SLOT="1" + +RDEPEND="<=x11-base/xorg-server-1.11.49 + !x11-drivers/ati-drivers:0 + !x11-apps/ati-drivers-extra + >=app-admin/eselect-opengl-1.0.7 + x11-apps/xauth + x11-libs/libX11 + x11-libs/libXext + x11-libs/libXinerama + x11-libs/libXrandr + x11-libs/libXrender + multilib? ( + app-emulation/emul-linux-x86-opengl + app-emulation/emul-linux-x86-xlibs + ) + !<x11-drivers/ati-userspace-${PV} + !>x11-drivers/ati-userspace-${PV}" + +DEPEND="${RDEPEND} + sys-apps/findutils + x11-proto/inputproto + x11-proto/xf86miscproto + x11-proto/xf86vidmodeproto + x11-proto/xineramaproto + x11-libs/libXtst" + +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\)\?/libamdocl\(32\|64\)\?.so + usr/lib\(32\|64\)\?/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 +} + +src_unpack() { + if [[ $(get_major_version) -gt 8 ]]; then + # Switching to a standard way to extract the files since otherwise no signature file + # would be created + local src="${DISTDIR}/${A}" + sh "${src}" --extract "${S}" 2&>1 /dev/null + else + unpack ${A} + fi +} + +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-2.patch || die "Failed to epatch powermode-opt-path-2.patch" + + cd "${S}" + mkdir extra || die "mkdir failed" + cd extra + unpack ./../${FOLDER_PREFIX}usr/src/ati/fglrx_sample_source.tgz +} + +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_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; 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 + use opencl && 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 + # OpenCL + if use opencl ; then + insinto /etc/OpenCL/vendors/ + if [[ "${ABI}" == "amd64" ]] ; then + doins "${ARCH_DIR}"/etc/OpenCL/vendors/amdocl64.icd || die "doins failed" + else + doins "${ARCH_DIR}"/etc/OpenCL/vendors/amdocl32.icd || die "doins failed" + fi + fi + + # 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" + else + local EX_BASE_DIR="${BASE_DIR}" + local pkglibdir=lib + local MY_ARCH_DIR="${S}/arch/x86" + 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 + # PowerXpress stuff + mv "${D}"/${ATI_ROOT}/extensions/{fglrx-,}libglx.so + + # lib. + exeinto /usr/$(get_libdir) + # Everything except for the libGL.so installed in src_install-libs. + 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) + if use opencl ; then + doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/lib*.so* + else + doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libati*.so* + fi + + 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##*/} + ## let's keep also this alternative way ;) + #dosym ${soname} /usr/$(get_libdir)/${soname%.[0-9]} + dosym ${soname} /usr/$(get_libdir)/$(scanelf -qF "#f%S" ${so}) + done + +} + +pkg_postinst() { + 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 + 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" + + "${ROOT}"/usr/bin/eselect opengl set --use-old ati +} + +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-11.6.ebuild b/x11-drivers/ati-userspace/ati-userspace-11.6.ebuild new file mode 100644 index 00000000..94046c53 --- /dev/null +++ b/x11-drivers/ati-userspace/ati-userspace-11.6.ebuild @@ -0,0 +1,386 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="2" + +inherit eutils multilib toolchain-funcs versionator + +DESCRIPTION="AMD X11 drivers for r600 (HD Series) and newer chipsets" +HOMEPAGE="http://ati.amd.com" +# 8.ble will be used for beta releases. +if [[ $(get_major_version) -gt 8 ]]; then + ATI_URL="http://www2.ati.com/drivers/linux/" + SRC_URI="${ATI_URL}/ati-driver-installer-${PV/./-}-x86.x86_64.run" + FOLDER_PREFIX="common/" +else + SRC_URI="https://launchpad.net/ubuntu/natty/+source/fglrx-installer/2:${PV}-0ubuntu1/+files/fglrx-installer_${PV}.orig.tar.gz" + FOLDER_PREFIX="" +fi +IUSE="debug multilib" + +LICENSE="AMD GPL-2 as-is" +KEYWORDS="~amd64 ~x86" +SLOT="1" + +RDEPEND="<=x11-base/xorg-server-1.10.99 + !x11-drivers/ati-drivers:0 + !x11-apps/ati-drivers-extra + >=app-admin/eselect-opengl-1.0.7 + x11-apps/xauth + x11-libs/libX11 + x11-libs/libXext + x11-libs/libXinerama + x11-libs/libXrandr + x11-libs/libXrender + multilib? ( app-emulation/emul-linux-x86-opengl ) + !<x11-drivers/ati-userspace-${PV} + !>x11-drivers/ati-userspace-${PV}" + +DEPEND="${RDEPEND} + app-portage/portage-utils + x11-proto/inputproto + x11-proto/xf86miscproto + x11-proto/xf86vidmodeproto + x11-proto/xineramaproto + x11-libs/libXtst" + +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 +" + +QA_DT_HASH=" + opt/bin/amdcccle + opt/bin/aticonfig + opt/bin/atiodcli + opt/bin/atiode + opt/bin/fglrxinfo + opt/sbin/atieventsd + 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 +" + +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 +} + +src_unpack() { + if [[ $(get_major_version) -gt 8 ]]; then + # Switching to a standard way to extract the files since otherwise no signature file + # would be created + local src="${DISTDIR}/${A}" + sh "${src}" --extract "${S}" 2&>1 /dev/null + else + unpack ${A} + fi +} + +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-2.patch || die "Failed to epatch powermode-opt-path-2.patch" + + cd "${S}" + mkdir extra || die "mkdir failed" + cd extra + unpack ./../${FOLDER_PREFIX}usr/src/ati/fglrx_sample_source.tgz +} + +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_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; 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 + # 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 + local alllibdir="$(get_libdir)" + use multilib && alllibdir="lib64 lib32" + for libdir in ${alllibdir} + do + dosym /usr/${libdir}/opengl/xorg-x11/lib/libGL.so.1.2 \ + /usr/${libdir}/fglrx/libGL.so.1.2 + dosym ./libGL.so.1.2 /usr/${libdir}/fglrx/fglrx-libGL.so.1.2 + + # Fixup xvba-video compilation + dosym libXvBAW.so.1.0 /usr/${libdir}/libXvBAW.so + done + +} + +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" + else + local EX_BASE_DIR="${BASE_DIR}" + local pkglibdir=lib + local MY_ARCH_DIR="${S}/arch/x86" + 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 + # PowerXpress stuff + dosym /usr/$(get_libdir)/opengl/xorg-x11/lib/libGL.so.1.2 \ + ${ATI_ROOT}/lib/FGL.renamed.libGL.so.1.2 + dosym ./libGL.so.1.2 ${ATI_ROOT}/lib/fglrx-libGL.so.1.2 + + exeinto ${ATI_ROOT}/extensions + doexe "${EX_BASE_DIR}"/usr/X11R6/${pkglibdir}/modules/extensions/fglrx/fglrx-libglx.so + # PowerXpress stuff + dosym /usr/$(get_libdir)/opengl/xorg-x11/extensions/libglx.so \ + ${ATI_ROOT}/extensions/FGL.renamed.libglx.so + dosym fglrx-libglx.so ${ATI_ROOT}/extensions/libglx.so + + # lib. + exeinto /usr/$(get_libdir) + # Everything except for the libGL.so installed in src_install-libs. + 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 libraries + exeinto /usr/$(get_libdir) + doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libati*.so* + + 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() { + 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 "You will have to source /etc/profile (or logout and back in) for dri" + elog "to work, unless you previously had ati-drivers installed." + + "${ROOT}"/usr/bin/eselect opengl set --use-old ati +} + +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-11.8.ebuild b/x11-drivers/ati-userspace/ati-userspace-11.8.ebuild new file mode 100644 index 00000000..f38ceffa --- /dev/null +++ b/x11-drivers/ati-userspace/ati-userspace-11.8.ebuild @@ -0,0 +1,398 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="2" + +inherit eutils multilib toolchain-funcs versionator + +DESCRIPTION="AMD X11 drivers for r600 (HD Series) and newer chipsets" +HOMEPAGE="http://ati.amd.com" +# 8.ble will be used for beta releases. +if [[ $(get_major_version) -gt 8 ]]; then + ATI_URL="http://www2.ati.com/drivers/linux/" + SRC_URI="${ATI_URL}/ati-driver-installer-${PV/./-}-x86.x86_64.run" + FOLDER_PREFIX="common/" +else + SRC_URI="https://launchpad.net/ubuntu/natty/+source/fglrx-installer/2:${PV}-0ubuntu1/+files/fglrx-installer_${PV}.orig.tar.gz" + FOLDER_PREFIX="" +fi +IUSE="debug multilib" + +LICENSE="AMD GPL-2 as-is" +KEYWORDS="~amd64 ~x86" +SLOT="1" + +RDEPEND="<=x11-base/xorg-server-1.10.99 + !x11-drivers/ati-drivers:0 + !x11-apps/ati-drivers-extra + >=app-admin/eselect-opengl-1.0.7 + x11-apps/xauth + x11-libs/libX11 + x11-libs/libXext + x11-libs/libXinerama + x11-libs/libXrandr + x11-libs/libXrender + multilib? ( app-emulation/emul-linux-x86-opengl ) + !<x11-drivers/ati-userspace-${PV} + !>x11-drivers/ati-userspace-${PV}" + +DEPEND="${RDEPEND} + app-misc/pax-utils + app-portage/portage-utils + sys-apps/findutils + x11-proto/inputproto + x11-proto/xf86miscproto + x11-proto/xf86vidmodeproto + x11-proto/xineramaproto + x11-libs/libXtst" + +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 +" + +QA_DT_HASH=" + opt/bin/amdcccle + opt/bin/aticonfig + opt/bin/atiodcli + opt/bin/atiode + opt/bin/fglrxinfo + opt/sbin/atieventsd + 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 +" + +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 +} + +src_unpack() { + if [[ $(get_major_version) -gt 8 ]]; then + # Switching to a standard way to extract the files since otherwise no signature file + # would be created + local src="${DISTDIR}/${A}" + sh "${src}" --extract "${S}" 2&>1 /dev/null + else + unpack ${A} + fi +} + +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-2.patch || die "Failed to epatch powermode-opt-path-2.patch" + + cd "${S}" + mkdir extra || die "mkdir failed" + cd extra + unpack ./../${FOLDER_PREFIX}usr/src/ati/fglrx_sample_source.tgz +} + +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_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; 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 + # 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 + local alllibdir="$(get_libdir)" + use multilib && alllibdir="lib64 lib32" + for libdir in ${alllibdir} + do + dosym /usr/${libdir}/opengl/xorg-x11/lib/libGL.so.1.2 \ + /usr/${libdir}/fglrx/libGL.so.1.2 + dosym ./libGL.so.1.2 /usr/${libdir}/fglrx/fglrx-libGL.so.1.2 + + # Fixup xvba-video compilation + dosym libXvBAW.so.1.0 /usr/${libdir}/libXvBAW.so + done + +} + +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" + else + local EX_BASE_DIR="${BASE_DIR}" + local pkglibdir=lib + local MY_ARCH_DIR="${S}/arch/x86" + 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 + # PowerXpress stuff + dosym /usr/$(get_libdir)/opengl/xorg-x11/lib/libGL.so.1.2 \ + ${ATI_ROOT}/lib/FGL.renamed.libGL.so.1.2 + dosym ./libGL.so.1.2 ${ATI_ROOT}/lib/fglrx-libGL.so.1.2 + + exeinto ${ATI_ROOT}/extensions + doexe "${EX_BASE_DIR}"/usr/X11R6/${pkglibdir}/modules/extensions/fglrx/fglrx-libglx.so + # PowerXpress stuff + dosym /usr/$(get_libdir)/opengl/xorg-x11/extensions/libglx.so \ + ${ATI_ROOT}/extensions/FGL.renamed.libglx.so + dosym fglrx-libglx.so ${ATI_ROOT}/extensions/libglx.so + + # lib. + exeinto /usr/$(get_libdir) + # Everything except for the libGL.so installed in src_install-libs. + 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 libraries + exeinto /usr/$(get_libdir) + doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libati*.so* + + 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##*/} + ## let's keep also this alternative way ;) + #dosym ${soname} /usr/$(get_libdir)/${soname%.[0-9]} + dosym ${soname} /usr/$(get_libdir)/$(scanelf -qF "#f%S" ${so}) + done + +} + +pkg_postinst() { + 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 "You will have to source /etc/profile (or logout and back in) for dri" + elog "to work, unless you previously had ati-drivers installed." + + "${ROOT}"/usr/bin/eselect opengl set --use-old ati +} + +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-11.9.ebuild b/x11-drivers/ati-userspace/ati-userspace-11.9.ebuild new file mode 100644 index 00000000..f38ceffa --- /dev/null +++ b/x11-drivers/ati-userspace/ati-userspace-11.9.ebuild @@ -0,0 +1,398 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="2" + +inherit eutils multilib toolchain-funcs versionator + +DESCRIPTION="AMD X11 drivers for r600 (HD Series) and newer chipsets" +HOMEPAGE="http://ati.amd.com" +# 8.ble will be used for beta releases. +if [[ $(get_major_version) -gt 8 ]]; then + ATI_URL="http://www2.ati.com/drivers/linux/" + SRC_URI="${ATI_URL}/ati-driver-installer-${PV/./-}-x86.x86_64.run" + FOLDER_PREFIX="common/" +else + SRC_URI="https://launchpad.net/ubuntu/natty/+source/fglrx-installer/2:${PV}-0ubuntu1/+files/fglrx-installer_${PV}.orig.tar.gz" + FOLDER_PREFIX="" +fi +IUSE="debug multilib" + +LICENSE="AMD GPL-2 as-is" +KEYWORDS="~amd64 ~x86" +SLOT="1" + +RDEPEND="<=x11-base/xorg-server-1.10.99 + !x11-drivers/ati-drivers:0 + !x11-apps/ati-drivers-extra + >=app-admin/eselect-opengl-1.0.7 + x11-apps/xauth + x11-libs/libX11 + x11-libs/libXext + x11-libs/libXinerama + x11-libs/libXrandr + x11-libs/libXrender + multilib? ( app-emulation/emul-linux-x86-opengl ) + !<x11-drivers/ati-userspace-${PV} + !>x11-drivers/ati-userspace-${PV}" + +DEPEND="${RDEPEND} + app-misc/pax-utils + app-portage/portage-utils + sys-apps/findutils + x11-proto/inputproto + x11-proto/xf86miscproto + x11-proto/xf86vidmodeproto + x11-proto/xineramaproto + x11-libs/libXtst" + +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 +" + +QA_DT_HASH=" + opt/bin/amdcccle + opt/bin/aticonfig + opt/bin/atiodcli + opt/bin/atiode + opt/bin/fglrxinfo + opt/sbin/atieventsd + 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 +" + +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 +} + +src_unpack() { + if [[ $(get_major_version) -gt 8 ]]; then + # Switching to a standard way to extract the files since otherwise no signature file + # would be created + local src="${DISTDIR}/${A}" + sh "${src}" --extract "${S}" 2&>1 /dev/null + else + unpack ${A} + fi +} + +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-2.patch || die "Failed to epatch powermode-opt-path-2.patch" + + cd "${S}" + mkdir extra || die "mkdir failed" + cd extra + unpack ./../${FOLDER_PREFIX}usr/src/ati/fglrx_sample_source.tgz +} + +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_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; 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 + # 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 + local alllibdir="$(get_libdir)" + use multilib && alllibdir="lib64 lib32" + for libdir in ${alllibdir} + do + dosym /usr/${libdir}/opengl/xorg-x11/lib/libGL.so.1.2 \ + /usr/${libdir}/fglrx/libGL.so.1.2 + dosym ./libGL.so.1.2 /usr/${libdir}/fglrx/fglrx-libGL.so.1.2 + + # Fixup xvba-video compilation + dosym libXvBAW.so.1.0 /usr/${libdir}/libXvBAW.so + done + +} + +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" + else + local EX_BASE_DIR="${BASE_DIR}" + local pkglibdir=lib + local MY_ARCH_DIR="${S}/arch/x86" + 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 + # PowerXpress stuff + dosym /usr/$(get_libdir)/opengl/xorg-x11/lib/libGL.so.1.2 \ + ${ATI_ROOT}/lib/FGL.renamed.libGL.so.1.2 + dosym ./libGL.so.1.2 ${ATI_ROOT}/lib/fglrx-libGL.so.1.2 + + exeinto ${ATI_ROOT}/extensions + doexe "${EX_BASE_DIR}"/usr/X11R6/${pkglibdir}/modules/extensions/fglrx/fglrx-libglx.so + # PowerXpress stuff + dosym /usr/$(get_libdir)/opengl/xorg-x11/extensions/libglx.so \ + ${ATI_ROOT}/extensions/FGL.renamed.libglx.so + dosym fglrx-libglx.so ${ATI_ROOT}/extensions/libglx.so + + # lib. + exeinto /usr/$(get_libdir) + # Everything except for the libGL.so installed in src_install-libs. + 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 libraries + exeinto /usr/$(get_libdir) + doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libati*.so* + + 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##*/} + ## let's keep also this alternative way ;) + #dosym ${soname} /usr/$(get_libdir)/${soname%.[0-9]} + dosym ${soname} /usr/$(get_libdir)/$(scanelf -qF "#f%S" ${so}) + done + +} + +pkg_postinst() { + 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 "You will have to source /etc/profile (or logout and back in) for dri" + elog "to work, unless you previously had ati-drivers installed." + + "${ROOT}"/usr/bin/eselect opengl set --use-old ati +} + +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-12.1-r1.ebuild b/x11-drivers/ati-userspace/ati-userspace-12.1-r1.ebuild new file mode 100644 index 00000000..3993df43 --- /dev/null +++ b/x11-drivers/ati-userspace/ati-userspace-12.1-r1.ebuild @@ -0,0 +1,414 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="2" + +inherit eutils multilib toolchain-funcs versionator + +DESCRIPTION="AMD X11 drivers for radeon r600 (HD Series) and newer chipsets" +HOMEPAGE="http://www.amd.com" +# 8.ble will be used for beta releases. +if [[ $(get_major_version) -gt 8 ]]; then + ATI_URL="http://www2.ati.com/drivers/linux/" + SRC_URI="${ATI_URL}/amd-driver-installer-${PV/./-}-x86.x86_64.run" + FOLDER_PREFIX="common/" +else + SRC_URI="https://launchpad.net/ubuntu/natty/+source/fglrx-installer/2:${PV}-0ubuntu1/+files/fglrx-installer_${PV}.orig.tar.gz" + FOLDER_PREFIX="" +fi +IUSE="debug multilib" + +LICENSE="AMD GPL-2 as-is" +KEYWORDS="~amd64 ~x86" +SLOT="1" + +RDEPEND="<=x11-base/xorg-server-1.11.49 + !x11-drivers/ati-drivers:0 + !x11-apps/ati-drivers-extra + >=app-admin/eselect-opengl-1.0.7 + app-admin/eselect-opencl + x11-apps/xauth + x11-libs/libX11 + x11-libs/libXext + x11-libs/libXinerama + x11-libs/libXrandr + x11-libs/libXrender + multilib? ( + app-emulation/emul-linux-x86-opengl + app-emulation/emul-linux-x86-xlibs + ) + !<x11-drivers/ati-userspace-${PV} + !>x11-drivers/ati-userspace-${PV}" + +DEPEND="${RDEPEND} + sys-apps/findutils + x11-proto/inputproto + x11-proto/xf86miscproto + x11-proto/xf86vidmodeproto + x11-proto/xineramaproto + x11-libs/libXtst" + +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 +} + +src_unpack() { + if [[ $(get_major_version) -gt 8 ]]; then + # Switching to a standard way to extract the files since otherwise no signature file + # would be created + local src="${DISTDIR}/${A}" + sh "${src}" --extract "${S}" 2&>1 /dev/null + else + unpack ${A} + fi +} + +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-2.patch + + cd "${S}" + mkdir extra || die "mkdir failed" + cd extra + unpack ./../${FOLDER_PREFIX}usr/src/ati/fglrx_sample_source.tgz +} + +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_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; 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 + # PowerXpress stuff + mv "${D}"/${ATI_ROOT}/extensions/{fglrx-,}libglx.so + + # lib. + exeinto /usr/$(get_libdir) + # Everything except for the libGL.so installed in src_install-libs. + 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##*/} + ## let's keep also this alternative way ;) + #dosym ${soname} /usr/$(get_libdir)/${soname%.[0-9]} + dosym ${soname} /usr/$(get_libdir)/$(scanelf -qF "#f%S" ${so}) + done + +} + +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" + + "${ROOT}"/usr/bin/eselect opengl set --use-old ati + "${ROOT}"/usr/bin/eselect opencl set --use-old amd +} + +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-12.10.ebuild b/x11-drivers/ati-userspace/ati-userspace-12.10.ebuild new file mode 100644 index 00000000..e27131b3 --- /dev/null +++ b/x11-drivers/ati-userspace/ati-userspace-12.10.ebuild @@ -0,0 +1,433 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="2" + +inherit eutils multilib toolchain-funcs versionator + +DESCRIPTION="AMD X11 drivers for radeon r600 (HD Series) and newer chipsets" +HOMEPAGE="http://www.amd.com" +MY_V=( $(get_version_components) ) +#RUN="${WORKDIR}/amd-driver-installer-9.00-x86.x86_64.run" +SRC_URI="http://www2.ati.com/drivers/linux/amd-driver-installer-catalyst-${PV}-x86.x86_64.zip" +FOLDER_PREFIX="common/" +IUSE="debug multilib x-multilib static-libs" + +LICENSE="AMD GPL-2 as-is" +KEYWORDS="~amd64 ~x86" +SLOT="1" +RESTRICT="bindist" + +RDEPEND="<=x11-base/xorg-server-1.12.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 + ) + !<x11-drivers/ati-userspace-${PV} + !>x11-drivers/ati-userspace-${PV}" + +DEPEND="${RDEPEND} + x11-proto/inputproto + x11-proto/xf86miscproto + x11-proto/xf86vidmodeproto + x11-proto/xineramaproto + x11-libs/libXtst + sys-apps/findutils + app-misc/pax-utils" + + +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 +} + +src_unpack() { + if [[ ${A} =~ .*\.tar\.gz ]]; then + unpack ${A} + else + #please note, RUN may be insanely assigned at top near SRC_URI + if [[ ${A} =~ .*\.zip ]]; then + unpack ${A} + [[ -z "$RUN" ]] && RUN="${S}/${A/%.zip/.run}" + else + RUN="${DISTDIR}/${A}" + fi + sh ${RUN} --extract "${S}" 2>&1 > /dev/null || die + fi +} + +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 + + cd "${S}" + mkdir extra || die "mkdir 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 + 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}/\x90\x90\x90\x90\x90/g" ${driver} || break 1 + done + eend $? || die "Disabling watermark failed" +} + +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_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" + + # Required by upstream AMD + touch "${D}/etc/ati/atiapfuser.blb" || die + insinto /etc/ati + doins "${FOLDER_PREFIX}etc/ati/atiapfxx.blb" +} + +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 + # PowerXpress stuff + mv "${D}"/${ATI_ROOT}/extensions/{fglrx-,}libglx.so + + # lib. + exeinto /usr/$(get_libdir) + # Everything except for the libGL.so installed in src_install-libs. + 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##*/} + ## let's keep also this alternative way ;) + #dosym ${soname} /usr/$(get_libdir)/${soname%.[0-9]} + dosym ${soname} /usr/$(get_libdir)/$(scanelf -qF "#f%S" ${so}) + done + + #remove static libs if not wanted + use static-libs || rm -rf "${D}"/usr/$(get_libdir)/libfglrx_dm.a +} + +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" + + "${ROOT}"/usr/bin/eselect opengl set --use-old ati + "${ROOT}"/usr/bin/eselect opencl set --use-old amd +} + +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-12.2.ebuild b/x11-drivers/ati-userspace/ati-userspace-12.2.ebuild new file mode 100644 index 00000000..e0460995 --- /dev/null +++ b/x11-drivers/ati-userspace/ati-userspace-12.2.ebuild @@ -0,0 +1,414 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="2" + +inherit eutils multilib toolchain-funcs versionator + +DESCRIPTION="AMD X11 drivers for radeon r600 (HD Series) and newer chipsets" +HOMEPAGE="http://www.amd.com" +# 8.ble will be used for beta releases. +if [[ $(get_major_version) -gt 8 ]]; then + ATI_URL="http://www2.ati.com/drivers/linux/" + SRC_URI="${ATI_URL}/amd-driver-installer-${PV/./-}-x86.x86_64.run" + FOLDER_PREFIX="common/" +else + SRC_URI="https://launchpad.net/ubuntu/natty/+source/fglrx-installer/2:${PV}-0ubuntu1/+files/fglrx-installer_${PV}.orig.tar.gz" + FOLDER_PREFIX="" +fi +IUSE="debug multilib" + +LICENSE="AMD GPL-2 as-is" +KEYWORDS="~amd64 ~x86" +SLOT="1" + +RDEPEND="<=x11-base/xorg-server-1.11.49[-minimal] + !x11-drivers/ati-drivers:0 + !x11-apps/ati-drivers-extra + >=app-admin/eselect-opengl-1.0.7 + app-admin/eselect-opencl + x11-apps/xauth + x11-libs/libX11 + x11-libs/libXext + x11-libs/libXinerama + x11-libs/libXrandr + x11-libs/libXrender + multilib? ( + app-emulation/emul-linux-x86-opengl + app-emulation/emul-linux-x86-xlibs + ) + !<x11-drivers/ati-userspace-${PV} + !>x11-drivers/ati-userspace-${PV}" + +DEPEND="${RDEPEND} + sys-apps/findutils + x11-proto/inputproto + x11-proto/xf86miscproto + x11-proto/xf86vidmodeproto + x11-proto/xineramaproto + x11-libs/libXtst" + +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 +} + +src_unpack() { + if [[ $(get_major_version) -gt 8 ]]; then + # Switching to a standard way to extract the files since otherwise no signature file + # would be created + local src="${DISTDIR}/${A}" + sh "${src}" --extract "${S}" 2&>1 /dev/null + else + unpack ${A} + fi +} + +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-2.patch + + cd "${S}" + mkdir extra || die "mkdir failed" + cd extra + unpack ./../${FOLDER_PREFIX}usr/src/ati/fglrx_sample_source.tgz +} + +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_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; 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 + # PowerXpress stuff + mv "${D}"/${ATI_ROOT}/extensions/{fglrx-,}libglx.so + + # lib. + exeinto /usr/$(get_libdir) + # Everything except for the libGL.so installed in src_install-libs. + 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##*/} + ## let's keep also this alternative way ;) + #dosym ${soname} /usr/$(get_libdir)/${soname%.[0-9]} + dosym ${soname} /usr/$(get_libdir)/$(scanelf -qF "#f%S" ${so}) + done + +} + +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" + + "${ROOT}"/usr/bin/eselect opengl set --use-old ati + "${ROOT}"/usr/bin/eselect opencl set --use-old amd +} + +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-12.3.ebuild b/x11-drivers/ati-userspace/ati-userspace-12.3.ebuild new file mode 100644 index 00000000..7d0cf802 --- /dev/null +++ b/x11-drivers/ati-userspace/ati-userspace-12.3.ebuild @@ -0,0 +1,416 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="2" + +inherit eutils multilib toolchain-funcs versionator + +DESCRIPTION="AMD X11 drivers for radeon r600 (HD Series) and newer chipsets" +HOMEPAGE="http://www.amd.com" +# 8.ble will be used for beta releases. +if [[ $(get_major_version) -gt 8 ]]; then + ATI_URL="http://www2.ati.com/drivers/linux/" + SRC_URI="${ATI_URL}/amd-driver-installer-${PV/./-}-x86.x86_64.run" + FOLDER_PREFIX="common/" +else + SRC_URI="https://launchpad.net/ubuntu/natty/+source/fglrx-installer/2:${PV}-0ubuntu1/+files/fglrx-installer_${PV}.orig.tar.gz" + FOLDER_PREFIX="" +fi +IUSE="debug multilib static-libs" + +LICENSE="AMD GPL-2 as-is" +KEYWORDS="~amd64 ~x86" +SLOT="1" + +RDEPEND="<=x11-base/xorg-server-1.11.49[-minimal] + !x11-drivers/ati-drivers:0 + !x11-apps/ati-drivers-extra + >=app-admin/eselect-opengl-1.0.7 + app-admin/eselect-opencl + x11-apps/xauth + x11-libs/libX11 + x11-libs/libXext + x11-libs/libXinerama + x11-libs/libXrandr + x11-libs/libXrender + multilib? ( + app-emulation/emul-linux-x86-opengl + app-emulation/emul-linux-x86-xlibs + ) + !<x11-drivers/ati-userspace-${PV} + !>x11-drivers/ati-userspace-${PV}" + +DEPEND="${RDEPEND} + sys-apps/findutils + x11-proto/inputproto + x11-proto/xf86miscproto + x11-proto/xf86vidmodeproto + x11-proto/xineramaproto + x11-libs/libXtst" + +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 +} + +src_unpack() { + if [[ $(get_major_version) -gt 8 ]]; then + # Switching to a standard way to extract the files since otherwise no signature file + # would be created + local src="${DISTDIR}/${A}" + sh "${src}" --extract "${S}" 2&>1 /dev/null + else + unpack ${A} + fi +} + +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-2.patch + + cd "${S}" + mkdir extra || die "mkdir failed" + cd extra + unpack ./../${FOLDER_PREFIX}usr/src/ati/fglrx_sample_source.tgz +} + +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_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; 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 + # PowerXpress stuff + mv "${D}"/${ATI_ROOT}/extensions/{fglrx-,}libglx.so + + # lib. + exeinto /usr/$(get_libdir) + # Everything except for the libGL.so installed in src_install-libs. + 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##*/} + ## let's keep also this alternative way ;) + #dosym ${soname} /usr/$(get_libdir)/${soname%.[0-9]} + dosym ${soname} /usr/$(get_libdir)/$(scanelf -qF "#f%S" ${so}) + done + + #remove static libs if not wanted + use static-libs || rm -rf "${D}"/usr/$(get_libdir)/libfglrx_dm.a +} + +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" + + "${ROOT}"/usr/bin/eselect opengl set --use-old ati + "${ROOT}"/usr/bin/eselect opencl set --use-old amd +} + +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-12.4.ebuild b/x11-drivers/ati-userspace/ati-userspace-12.4.ebuild new file mode 100644 index 00000000..7d0cf802 --- /dev/null +++ b/x11-drivers/ati-userspace/ati-userspace-12.4.ebuild @@ -0,0 +1,416 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="2" + +inherit eutils multilib toolchain-funcs versionator + +DESCRIPTION="AMD X11 drivers for radeon r600 (HD Series) and newer chipsets" +HOMEPAGE="http://www.amd.com" +# 8.ble will be used for beta releases. +if [[ $(get_major_version) -gt 8 ]]; then + ATI_URL="http://www2.ati.com/drivers/linux/" + SRC_URI="${ATI_URL}/amd-driver-installer-${PV/./-}-x86.x86_64.run" + FOLDER_PREFIX="common/" +else + SRC_URI="https://launchpad.net/ubuntu/natty/+source/fglrx-installer/2:${PV}-0ubuntu1/+files/fglrx-installer_${PV}.orig.tar.gz" + FOLDER_PREFIX="" +fi +IUSE="debug multilib static-libs" + +LICENSE="AMD GPL-2 as-is" +KEYWORDS="~amd64 ~x86" +SLOT="1" + +RDEPEND="<=x11-base/xorg-server-1.11.49[-minimal] + !x11-drivers/ati-drivers:0 + !x11-apps/ati-drivers-extra + >=app-admin/eselect-opengl-1.0.7 + app-admin/eselect-opencl + x11-apps/xauth + x11-libs/libX11 + x11-libs/libXext + x11-libs/libXinerama + x11-libs/libXrandr + x11-libs/libXrender + multilib? ( + app-emulation/emul-linux-x86-opengl + app-emulation/emul-linux-x86-xlibs + ) + !<x11-drivers/ati-userspace-${PV} + !>x11-drivers/ati-userspace-${PV}" + +DEPEND="${RDEPEND} + sys-apps/findutils + x11-proto/inputproto + x11-proto/xf86miscproto + x11-proto/xf86vidmodeproto + x11-proto/xineramaproto + x11-libs/libXtst" + +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 +} + +src_unpack() { + if [[ $(get_major_version) -gt 8 ]]; then + # Switching to a standard way to extract the files since otherwise no signature file + # would be created + local src="${DISTDIR}/${A}" + sh "${src}" --extract "${S}" 2&>1 /dev/null + else + unpack ${A} + fi +} + +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-2.patch + + cd "${S}" + mkdir extra || die "mkdir failed" + cd extra + unpack ./../${FOLDER_PREFIX}usr/src/ati/fglrx_sample_source.tgz +} + +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_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; 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 + # PowerXpress stuff + mv "${D}"/${ATI_ROOT}/extensions/{fglrx-,}libglx.so + + # lib. + exeinto /usr/$(get_libdir) + # Everything except for the libGL.so installed in src_install-libs. + 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##*/} + ## let's keep also this alternative way ;) + #dosym ${soname} /usr/$(get_libdir)/${soname%.[0-9]} + dosym ${soname} /usr/$(get_libdir)/$(scanelf -qF "#f%S" ${so}) + done + + #remove static libs if not wanted + use static-libs || rm -rf "${D}"/usr/$(get_libdir)/libfglrx_dm.a +} + +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" + + "${ROOT}"/usr/bin/eselect opengl set --use-old ati + "${ROOT}"/usr/bin/eselect opencl set --use-old amd +} + +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-12.6.ebuild b/x11-drivers/ati-userspace/ati-userspace-12.6.ebuild new file mode 100644 index 00000000..2637daac --- /dev/null +++ b/x11-drivers/ati-userspace/ati-userspace-12.6.ebuild @@ -0,0 +1,430 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="2" + +inherit eutils multilib toolchain-funcs versionator + +DESCRIPTION="AMD X11 drivers for radeon r600 (HD Series) and newer chipsets" +HOMEPAGE="http://www.amd.com" +MY_V=( $(get_version_components) ) +if [[ ${MY_V[2]} != beta ]]; then + ATI_URL="http://www2.ati.com/drivers/linux/" + SRC_URI="${ATI_URL}/amd-driver-installer-${PV/./-}-x86.x86_64.run" + FOLDER_PREFIX="common/" +else + SRC_URI="https://launchpad.net/ubuntu/natty/+source/fglrx-installer/2:${PV}-0ubuntu1/+files/fglrx-installer_${PV}.orig.tar.gz" + FOLDER_PREFIX="" +fi +IUSE="debug multilib static-libs" + +LICENSE="AMD GPL-2 as-is" +KEYWORDS="~amd64 ~x86" +SLOT="1" +RESTRICT="bindist" + +RDEPEND="<=x11-base/xorg-server-1.12.49[-minimal] + !x11-drivers/ati-drivers:0 + !x11-apps/ati-drivers-extra + >=app-admin/eselect-opengl-1.0.7 + app-admin/eselect-opencl + x11-apps/xauth + x11-libs/libX11 + x11-libs/libXext + x11-libs/libXinerama + x11-libs/libXrandr + x11-libs/libXrender + multilib? ( + app-emulation/emul-linux-x86-opengl + app-emulation/emul-linux-x86-xlibs + ) + !<x11-drivers/ati-userspace-${PV} + !>x11-drivers/ati-userspace-${PV}" + +DEPEND="${RDEPEND} + sys-apps/findutils + x11-proto/inputproto + x11-proto/xf86miscproto + x11-proto/xf86vidmodeproto + x11-proto/xineramaproto + x11-libs/libXtst" + +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 +} + +src_unpack() { + if [[ ${MY_V[2]} == beta ]]; then + unpack ${A} + RUN="${S}/${A/%.zip/.run}" + else + RUN="${DISTDIR}/${A}" + fi + sh ${RUN} --extract "${S}" # 2>&1 > /dev/null || die +} + +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-2.patch + + cd "${S}" + mkdir extra || die "mkdir 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 + 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}/\x90\x90\x90\x90\x90/g" ${driver} || break 1 + done + eend $? || die "Disabling watermark failed" +} + +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_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; 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" + + # Required by upstream AMD + touch "${D}/etc/ati/atiapfuser.blb" || die + insinto /etc/ati + doins "${FOLDER_PREFIX}etc/ati/atiapfxx.blb" +} + +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 + # PowerXpress stuff + mv "${D}"/${ATI_ROOT}/extensions/{fglrx-,}libglx.so + + # lib. + exeinto /usr/$(get_libdir) + # Everything except for the libGL.so installed in src_install-libs. + 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##*/} + ## let's keep also this alternative way ;) + #dosym ${soname} /usr/$(get_libdir)/${soname%.[0-9]} + dosym ${soname} /usr/$(get_libdir)/$(scanelf -qF "#f%S" ${so}) + done + + #remove static libs if not wanted + use static-libs || rm -rf "${D}"/usr/$(get_libdir)/libfglrx_dm.a +} + +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" + + "${ROOT}"/usr/bin/eselect opengl set --use-old ati + "${ROOT}"/usr/bin/eselect opencl set --use-old amd +} + +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-12.6_beta_pre897.ebuild b/x11-drivers/ati-userspace/ati-userspace-12.6_beta_pre897.ebuild new file mode 100644 index 00000000..97cf89c6 --- /dev/null +++ b/x11-drivers/ati-userspace/ati-userspace-12.6_beta_pre897.ebuild @@ -0,0 +1,430 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="2" + +inherit eutils multilib toolchain-funcs versionator + +DESCRIPTION="AMD X11 drivers for radeon r600 (HD Series) and newer chipsets" +HOMEPAGE="http://www.amd.com" +MY_V=( $(get_version_components) ) +if [[ ${MY_V[2]} != beta ]]; then + ATI_URL="http://www2.ati.com/drivers/linux/" + SRC_URI="${ATI_URL}/amd-driver-installer-${PV/./-}-x86.x86_64.run" + FOLDER_PREFIX="common/" +else + #SRC_URI="https://launchpad.net/ubuntu/natty/+source/fglrx-installer/2:${PV}-0ubuntu1/+files/fglrx-installer_${PV}.orig.tar.gz" + SRC_URI="http://www2.ati.com/drivers/legacy/amd-driver-installer-12.6-legacy-x86.x86_64.zip" + FOLDER_PREFIX="common/" +fi +IUSE="debug multilib static-libs" + +LICENSE="AMD GPL-2 as-is" +KEYWORDS="~amd64 ~x86" +SLOT="1" +RESTRICT="bindist" + +RDEPEND="<=x11-base/xorg-server-1.12.49[-minimal] + !x11-drivers/ati-drivers:0 + !x11-apps/ati-drivers-extra + >=app-admin/eselect-opengl-1.0.7 + app-admin/eselect-opencl + x11-apps/xauth + x11-libs/libX11 + x11-libs/libXext + x11-libs/libXinerama + x11-libs/libXrandr + x11-libs/libXrender + multilib? ( + app-emulation/emul-linux-x86-opengl + app-emulation/emul-linux-x86-xlibs + ) + !<x11-drivers/ati-userspace-${PV} + !>x11-drivers/ati-userspace-${PV}" + +DEPEND="${RDEPEND} + sys-apps/findutils + x11-proto/inputproto + x11-proto/xf86miscproto + x11-proto/xf86vidmodeproto + x11-proto/xineramaproto + x11-libs/libXtst" + +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 +} + +src_unpack() { + if [[ ${MY_V[2]} == beta ]]; then + unpack ${A} + RUN=${A/%.zip/.run} + else + RUN=${A} + fi + sh "${S}"/${RUN} --extract "${S}" 2>&1 > /dev/null || die \ + 'unpack failed' +} + +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-2.patch + + cd "${S}" + mkdir extra || die "mkdir 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 + 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}/\x90\x90\x90\x90\x90/g" ${driver} || break 1 + done + eend $? || die "Disabling watermark failed" +} + +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_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; 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" + + # Required by upstream AMD + touch "${D}/etc/ati/atiapfuser.blb" || die +} + +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 + # PowerXpress stuff + mv "${D}"/${ATI_ROOT}/extensions/{fglrx-,}libglx.so + + # lib. + exeinto /usr/$(get_libdir) + # Everything except for the libGL.so installed in src_install-libs. + 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##*/} + ## let's keep also this alternative way ;) + #dosym ${soname} /usr/$(get_libdir)/${soname%.[0-9]} + dosym ${soname} /usr/$(get_libdir)/$(scanelf -qF "#f%S" ${so}) + done + + #remove static libs if not wanted + use static-libs || rm -rf "${D}"/usr/$(get_libdir)/libfglrx_dm.a +} + +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" + + "${ROOT}"/usr/bin/eselect opengl set --use-old ati + "${ROOT}"/usr/bin/eselect opencl set --use-old amd +} + +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-12.8.ebuild b/x11-drivers/ati-userspace/ati-userspace-12.8.ebuild new file mode 100644 index 00000000..ab6501fc --- /dev/null +++ b/x11-drivers/ati-userspace/ati-userspace-12.8.ebuild @@ -0,0 +1,426 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="2" + +inherit eutils multilib toolchain-funcs versionator + +DESCRIPTION="AMD X11 drivers for radeon r600 (HD Series) and newer chipsets" +HOMEPAGE="http://www.amd.com" +MY_V=( $(get_version_components) ) +if [[ ${MY_V[2]} != beta ]]; then + ATI_URL="http://www2.ati.com/drivers/linux/" + SRC_URI="${ATI_URL}/amd-driver-installer-${PV/./-}-x86.x86_64.zip" + FOLDER_PREFIX="common/" +else + SRC_URI="https://launchpad.net/ubuntu/natty/+source/fglrx-installer/2:${PV}-0ubuntu1/+files/fglrx-installer_${PV}.orig.tar.gz" + FOLDER_PREFIX="" +fi +IUSE="debug multilib x-multilib static-libs" + +LICENSE="AMD GPL-2 as-is" +KEYWORDS="~amd64 ~x86" +SLOT="1" +RESTRICT="bindist" + +RDEPEND="<=x11-base/xorg-server-1.12.49[-minimal] + !x11-drivers/ati-drivers:0 + !x11-apps/ati-drivers-extra + >=app-admin/eselect-opengl-1.0.7 + app-admin/eselect-opencl + 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 + ) + !<x11-drivers/ati-userspace-${PV} + !>x11-drivers/ati-userspace-${PV}" + +DEPEND="${RDEPEND} + sys-apps/findutils + x11-proto/inputproto + x11-proto/xf86miscproto + x11-proto/xf86vidmodeproto + x11-proto/xineramaproto + x11-libs/libXtst" + +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 +} + +src_unpack() { + unpack ${A} + RUN="${S}/"*.run + sh ${RUN} --extract "${S}" # 2>&1 > /dev/null || die +} + +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-2.patch + + cd "${S}" + mkdir extra || die "mkdir 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 + 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}/\x90\x90\x90\x90\x90/g" ${driver} || break 1 + done + eend $? || die "Disabling watermark failed" +} + +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_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" + + # Required by upstream AMD + touch "${D}/etc/ati/atiapfuser.blb" || die + insinto /etc/ati + doins "${FOLDER_PREFIX}etc/ati/atiapfxx.blb" +} + +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 + # PowerXpress stuff + mv "${D}"/${ATI_ROOT}/extensions/{fglrx-,}libglx.so + + # lib. + exeinto /usr/$(get_libdir) + # Everything except for the libGL.so installed in src_install-libs. + 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##*/} + ## let's keep also this alternative way ;) + #dosym ${soname} /usr/$(get_libdir)/${soname%.[0-9]} + dosym ${soname} /usr/$(get_libdir)/$(scanelf -qF "#f%S" ${so}) + done + + #remove static libs if not wanted + use static-libs || rm -rf "${D}"/usr/$(get_libdir)/libfglrx_dm.a +} + +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" + + "${ROOT}"/usr/bin/eselect opengl set --use-old ati + "${ROOT}"/usr/bin/eselect opencl set --use-old amd +} + +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.1.ebuild b/x11-drivers/ati-userspace/ati-userspace-13.1.ebuild new file mode 100644 index 00000000..ee860be4 --- /dev/null +++ b/x11-drivers/ati-userspace/ati-userspace-13.1.ebuild @@ -0,0 +1,481 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=5 + +inherit eutils multilib toolchain-funcs versionator + +DESCRIPTION="Ati precompiled drivers for Radeon Evergreen (HD5000 Series) and newer chipsets" +HOMEPAGE="http://www.amd.com" +MY_V=( $(get_version_components) ) +#RUN="${WORKDIR}/amd-driver-installer-9.00-x86.x86_64.run" +DRIVERS_URI="http://www2.ati.com/drivers/linux/amd-driver-installer-catalyst-${PV}-linux-x86.x86_64.zip" +XVBA_SDK_URI="http://developer.amd.com.php53-23.ord1-1.websitetestlink.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" + +LICENSE="AMD GPL-2 QPL-1.0" +KEYWORDS="-* ~amd64 ~x86" +SLOT="1" +RESTRICT="bindist" + +RDEPEND="<=x11-base/xorg-server-1.13.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 + ) + !<x11-drivers/ati-userspace-${PV} + !>x11-drivers/ati-userspace-${PV}" + +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 supports only graphic cards based on" + elog "Evergreen chipset and newer." + elog "This represent 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 informations please reffer 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 linux-3.7 + # https://bugs.gentoo.org/show_bug.cgi?id=438516 + epatch "${FILESDIR}/ati-drivers-vm-reserverd.patch" + + # compile fix for AGP-less kernel, bug #435322 + epatch "${FILESDIR}"/ati-drivers-12.9-KCL_AGP_FindCapsRegisters-stub.patch + + # Use ACPI_DEVICE_HANDLE wrapper to make driver build on linux-3.8 + # see https://bugs.gentoo.org/show_bug.cgi?id=448216 + epatch "${FILESDIR}/ati-drivers-kernel-3.8-acpihandle.patch" + + cd "${S}" + mkdir extra || die "mkdir failed" + cd extra + unpack ./../${FOLDER_PREFIX}usr/src/ati/fglrx_sample_source.tgz + + 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 +} + +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-2.20.3"; then + ewarn "It is reported that xf86-video-intel-2.20.3 and later cause 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." + 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.4.ebuild b/x11-drivers/ati-userspace/ati-userspace-13.4.ebuild new file mode 100644 index 00000000..82d348e4 --- /dev/null +++ b/x11-drivers/ati-userspace/ati-userspace-13.4.ebuild @@ -0,0 +1,487 @@ +# 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" +MY_V=( $(get_version_components) ) +#RUN="${WORKDIR}/amd-driver-installer-9.00-x86.x86_64.run" +SLOT="1" +[[ "${MY_V[2]}" =~ beta.* ]] && BETADIR="beta/" || BETADIR="linux/" +if [[ legacy != ${SLOT} ]]; then + DRIVERS_URI="http://www2.ati.com/drivers/${BETADIR}amd-catalyst-${PV/_beta/-beta}-linux-x86.x86_64.zip" +else + DRIVERS_URI="http://www2.ati.com/drivers/legacy/amd-driver-installer-catalyst-$(get_version_component_range 1-2)-$(get_version_component_range 3)-legacy-linux-x86.x86_64.zip" +fi +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" + +RDEPEND="<=x11-base/xorg-server-1.13.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 + ) + !<x11-drivers/ati-userspace-${PV} + !>x11-drivers/ati-userspace-${PV}" + +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, https://bugs.gentoo.org/show_bug.cgi?id=454870 + use pax_kernel && epatch "${FILESDIR}/const-notifier-block.patch" + + cd "${S}" + mkdir extra || die "mkdir 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-2.20.3"; then + ewarn "It is reported that xf86-video-intel-2.20.3 and later cause 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." + 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/amd-drivers-3.2.7.1.patch b/x11-drivers/ati-userspace/files/amd-drivers-3.2.7.1.patch new file mode 100644 index 00000000..104c8788 --- /dev/null +++ b/x11-drivers/ati-userspace/files/amd-drivers-3.2.7.1.patch @@ -0,0 +1,19 @@ +--- a/common/lib/modules/fglrx/build_mod/firegl_public.c ++++ b/common/lib/modules/fglrx/build_mod/firegl_public.c +@@ -5797,10 +5797,16 @@ void ATI_API_CALL KCL_fpu_begin(void) + #ifdef CONFIG_X86_64 + kernel_fpu_begin(); + #else ++#ifndef TS_USEDFPU ++ preempt_disable(); ++ if (__thread_has_fpu(current)) ++ __save_init_fpu(current); ++#else + struct thread_info *cur_task = current_thread_info(); + preempt_disable(); + if (cur_task->status & TS_USEDFPU) + __save_init_fpu(cur_task->task); ++#endif + else + clts(); + #endif diff --git a/x11-drivers/ati-userspace/files/ati-drivers-12.2-redefine-WARN.patch b/x11-drivers/ati-userspace/files/ati-drivers-12.2-redefine-WARN.patch new file mode 100644 index 00000000..f4fab432 --- /dev/null +++ b/x11-drivers/ati-userspace/files/ati-drivers-12.2-redefine-WARN.patch @@ -0,0 +1,42 @@ +--- common/lib/modules/fglrx/build_mod/kcl_debug.h.orig 2012-03-08 19:30:38.195025328 +0100 ++++ common/lib/modules/fglrx/build_mod/kcl_debug.h 2012-03-08 19:31:24.976024507 +0100 +@@ -85,8 +85,8 @@ + #ifdef ERROR + #undef ERROR + #endif +-#ifdef WARN +-#undef WARN ++#ifdef AMD_WARN ++#undef AMD_WARN + #endif + #ifdef INFO + #undef INFO +@@ -122,7 +122,7 @@ + { + SPECIAL = 0, + ERROR , +- WARN , ++ AMD_WARN , + INFO , + INFOEX, + TRACE, +@@ -160,7 +160,7 @@ + }log_map; + + +-#define DEFAULT_LOG_LEVEL ((U08)(___BIT(INFO) | ___BIT(INFOEX) |___BIT(ERROR) |___BIT(WARN) | ___BIT(TRACE)| ___BIT(SPECIAL) )) ++#define DEFAULT_LOG_LEVEL ((U08)(___BIT(INFO) | ___BIT(INFOEX) |___BIT(ERROR) |___BIT(AMD_WARN) | ___BIT(TRACE)| ___BIT(SPECIAL) )) + #define INFO_LOG_LEVEL ((U08)(___BIT(INFO) | ___BIT(INFOEX))) + extern const log_map module_log_map[]; + extern const module_map module_type_map[]; +--- common/lib/modules/fglrx/build_mod/kcl_debug.c.orig 2012-03-08 19:36:18.244019310 +0100 ++++ common/lib/modules/fglrx/build_mod/kcl_debug.c 2012-03-08 19:36:36.197018973 +0100 +@@ -69,7 +69,7 @@ + { + {SPECIAL , 'S'}, + {ERROR , 'E'}, +- {WARN , 'W'}, ++ {AMD_WARN , 'W'}, + {INFO , 'I'}, + {INFOEX , 'X'}, + {TRACE , 'T'}, diff --git a/x11-drivers/ati-userspace/files/ati-drivers-12.9-KCL_AGP_FindCapsRegisters-stub.patch b/x11-drivers/ati-userspace/files/ati-drivers-12.9-KCL_AGP_FindCapsRegisters-stub.patch new file mode 100644 index 00000000..0ea461b8 --- /dev/null +++ b/x11-drivers/ati-userspace/files/ati-drivers-12.9-KCL_AGP_FindCapsRegisters-stub.patch @@ -0,0 +1,27 @@ +From: Vasiliy Yeremeyev <vayerx@gmail.com> +Date: Sun, 4 Nov 2012 23:59:36 +0400 +Subject: [PATCH] KCL_AGP_FindCapsRegisters stub for AGP-less systems + +--- + common/lib/modules/fglrx/build_mod/kcl_agp.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/common/lib/modules/fglrx/build_mod/kcl_agp.c b/common/lib/modules/fglrx/build_mod/kcl_agp.c +index b9c0655..cb1902b 100644 +--- a/common/lib/modules/fglrx/build_mod/kcl_agp.c ++++ b/common/lib/modules/fglrx/build_mod/kcl_agp.c +@@ -479,6 +479,11 @@ int ATI_API_CALL KCL_AGP_Enable(unsigned long mode) + return -EINVAL; + } + ++int ATI_API_CALL KCL_AGP_FindCapsRegisters(KCL_PCI_DevHandle dev) ++{ ++ return -EINVAL; ++} ++ + int ATI_API_CALL KCL_AGP_ReadCapsRegisters(KCL_PCI_DevHandle dev, unsigned int *caps) + { + return -EINVAL; +-- +1.7.12 + diff --git a/x11-drivers/ati-userspace/files/ati-drivers-2.6.33.patch b/x11-drivers/ati-userspace/files/ati-drivers-2.6.33.patch new file mode 100644 index 00000000..85f9aff7 --- /dev/null +++ b/x11-drivers/ati-userspace/files/ati-drivers-2.6.33.patch @@ -0,0 +1,140 @@ +--- work.orig/common/lib/modules/fglrx/build_mod/drmP.h ++++ work/common/lib/modules/fglrx/build_mod/drmP.h +@@ -42,7 +42,11 @@ + * can build the DRM (part of PI DRI). 4/21/2000 S + B */ + #include <asm/current.h> + #endif /* __alpha__ */ ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) ++#include <generated/autoconf.h> ++#else + #include <linux/autoconf.h> ++#endif + #include <linux/module.h> + #include <linux/kernel.h> + #include <linux/miscdevice.h> +--- work.orig/common/lib/modules/fglrx/build_mod/firegl_public.c ++++ work/common/lib/modules/fglrx/build_mod/firegl_public.c +@@ -28,7 +28,11 @@ + #error Kernel versions older than 2.6.0 are no longer supported by this module. + #endif + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) ++#include <generated/autoconf.h> ++#else + #include <linux/autoconf.h> ++#endif + + #if !defined(CONFIG_X86) + #if !defined(CONFIG_X86_PC) +@@ -163,8 +167,12 @@ + + // For 2.6.18 or higher, the UTS_RELEASE is defined in the linux/utsrelease.h. + #ifndef UTS_RELEASE ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) ++#include <generated/utsrelease.h> ++#else + #include <linux/utsrelease.h> + #endif ++#endif + + #if defined(__i386__) + #ifndef do_div +--- work.orig/common/lib/modules/fglrx/build_mod/kcl_acpi.c ++++ work/common/lib/modules/fglrx/build_mod/kcl_acpi.c +@@ -15,7 +15,11 @@ + ****************************************************************************/ + + #include <linux/version.h> ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) ++#include <generated/autoconf.h> ++#else + #include <linux/autoconf.h> ++#endif + #include <linux/acpi.h> + + #include "kcl_config.h" +--- work.orig/common/lib/modules/fglrx/build_mod/kcl_agp.c ++++ work/common/lib/modules/fglrx/build_mod/kcl_agp.c +@@ -31,7 +31,11 @@ + */ + + #include <linux/version.h> ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) ++#include <generated/autoconf.h> ++#else + #include <linux/autoconf.h> ++#endif + #include <linux/pci.h> + #include <linux/agp_backend.h> + #include <linux/string.h> +--- work.orig/common/lib/modules/fglrx/build_mod/kcl_io.c ++++ work/common/lib/modules/fglrx/build_mod/kcl_io.c +@@ -37,7 +37,11 @@ + */ + + #include <linux/version.h> ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) ++#include <generated/autoconf.h> ++#else + #include <linux/autoconf.h> ++#endif + #include <linux/poll.h> + #include <linux/signal.h> + #include <asm/io.h> +--- work.orig/common/lib/modules/fglrx/build_mod/kcl_osconfig.h ++++ work/common/lib/modules/fglrx/build_mod/kcl_osconfig.h +@@ -20,7 +20,11 @@ + #define KCL_OSCONFIG_H + + #include <linux/version.h> ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) ++#include <generated/autoconf.h> ++#else + #include <linux/autoconf.h> ++#endif + + // Choose modern way to call 32-on-64 IOCTLs if configured in the kernel + #if defined(CONFIG_COMPAT) && LINUX_VERSION_CODE > KERNEL_VERSION(2,6,9) +--- work.orig/common/lib/modules/fglrx/build_mod/kcl_pci.c ++++ work/common/lib/modules/fglrx/build_mod/kcl_pci.c +@@ -31,7 +31,11 @@ + */ + + #include <linux/version.h> ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) ++#include <generated/autoconf.h> ++#else + #include <linux/autoconf.h> ++#endif + #include <linux/pci.h> + + #include "kcl_config.h" +--- work.orig/common/lib/modules/fglrx/build_mod/kcl_str.c ++++ work/common/lib/modules/fglrx/build_mod/kcl_str.c +@@ -30,7 +30,12 @@ + * + */ + ++#include <linux/version.h> ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) ++#include <generated/autoconf.h> ++#else + #include <linux/autoconf.h> ++#endif + #include <linux/string.h> + #include <linux/module.h> + +--- work.orig/common/lib/modules/fglrx/build_mod/kcl_wait.c ++++ work/common/lib/modules/fglrx/build_mod/kcl_wait.c +@@ -31,7 +31,11 @@ + */ + + #include <linux/version.h> ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) ++#include <generated/autoconf.h> ++#else + #include <linux/autoconf.h> ++#endif + #include <linux/wait.h> + #include <linux/highmem.h> + #include <linux/sched.h> diff --git a/x11-drivers/ati-userspace/files/ati-drivers-2.6.34.patch b/x11-drivers/ati-userspace/files/ati-drivers-2.6.34.patch new file mode 100644 index 00000000..1993d134 --- /dev/null +++ b/x11-drivers/ati-userspace/files/ati-drivers-2.6.34.patch @@ -0,0 +1,10 @@ +--- work.orig/common/lib/modules/fglrx/build_mod/kcl_wait.c 2010-04-13 20:02:46.494496561 +0200 ++++ work/common/lib/modules/fglrx/build_mod/kcl_wait.c 2010-04-13 19:52:00.054563389 +0200 +@@ -39,6 +39,7 @@ + #include <linux/wait.h> + #include <linux/highmem.h> + #include <linux/sched.h> ++#include <linux/slab.h> + + #include "kcl_config.h" + #include "kcl_wait.h" diff --git a/x11-drivers/ati-userspace/files/ati-drivers-2.6.35-and-newer.patch b/x11-drivers/ati-userspace/files/ati-drivers-2.6.35-and-newer.patch new file mode 100644 index 00000000..e1703f34 --- /dev/null +++ b/x11-drivers/ati-userspace/files/ati-drivers-2.6.35-and-newer.patch @@ -0,0 +1,11 @@ +--- work.orig/common/lib/modules/fglrx/build_mod/kcl_ioctl.c 2010-09-19 11:45:04.922760268 +0200 ++++ work/common/lib/modules/fglrx/build_mod/kcl_ioctl.c 2010-09-19 12:04:29.092812959 +0200 +@@ -193,7 +193,7 @@ void ATI_API_CALL KCL_IOCTL_UnregisterCo + */ + void* ATI_API_CALL KCL_IOCTL_AllocUserSpace32(long size) + { +- return compat_alloc_user_space(size); ++ return arch_compat_alloc_user_space(size); + } + + #endif // __x86_64__ diff --git a/x11-drivers/ati-userspace/files/ati-drivers-2.6.36.patch b/x11-drivers/ati-userspace/files/ati-drivers-2.6.36.patch new file mode 100644 index 00000000..5f8f5845 --- /dev/null +++ b/x11-drivers/ati-userspace/files/ati-drivers-2.6.36.patch @@ -0,0 +1,26 @@ +--- work.orig/common/lib/modules/fglrx/build_mod/firegl_public.c 2010-08-20 21:51:48.000000000 +0200 ++++ work/common/lib/modules/fglrx/build_mod/firegl_public.c 2010-08-20 23:46:37.000000000 +0200 +@@ -320,7 +320,11 @@ + return firegl_release((KCL_IO_FILE_Handle)filp); + } + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) ++int ip_firegl_ioctl(struct file* filp, unsigned int cmd, unsigned long arg) ++#else + int ip_firegl_ioctl(struct inode* inode, struct file* filp, unsigned int cmd, unsigned long arg) ++#endif + { + return firegl_ioctl((KCL_IO_FILE_Handle)filp, cmd, arg); + } +@@ -407,7 +411,11 @@ + #endif + open: ip_firegl_open, + release: ip_firegl_release, ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) ++ unlocked_ioctl: ip_firegl_ioctl, ++#else + ioctl: ip_firegl_ioctl, ++#endif + mmap: ip_firegl_mmap, + + write: ip_firegl_write, diff --git a/x11-drivers/ati-userspace/files/ati-drivers-2.6.37.patch b/x11-drivers/ati-userspace/files/ati-drivers-2.6.37.patch new file mode 100644 index 00000000..75522b41 --- /dev/null +++ b/x11-drivers/ati-userspace/files/ati-drivers-2.6.37.patch @@ -0,0 +1,11 @@ +--- work.orig/common/lib/modules/fglrx/build_mod/firegl_public.c 2010-08-20 21:51:48.000000000 +0200 ++++ work/common/lib/modules/fglrx/build_mod/firegl_public.c 2010-08-20 23:46:37.000000000 +0200 +@@ -5094,7 +5094,7 @@ + unsigned int ATI_API_CALL KAS_Mutex_Initialize(void* hMutex) + { + kasMutex_t* mutex_obj = (kasMutex_t*)hMutex; +- init_MUTEX(&(mutex_obj->mutex)); ++ sema_init(&(mutex_obj->mutex),1); + return 1; + } + diff --git a/x11-drivers/ati-userspace/files/ati-drivers-2.6.38.patch b/x11-drivers/ati-userspace/files/ati-drivers-2.6.38.patch new file mode 100644 index 00000000..1ecafece --- /dev/null +++ b/x11-drivers/ati-userspace/files/ati-drivers-2.6.38.patch @@ -0,0 +1,59 @@ +Description: Add Linux 2.6.38 support + The following commit renamed acquire_console_sem to console_lock and + release_console_sem to console_unlock on the Linux kernel: + http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=ac751efa6a0d70f2c9daef5c7e3a92270f5c2dff +Author: Miguel Colon <debian.micove@gmail.com> +Forwarded: no +Last-Update: 2011-02-01 + +--- fglrx-driver-11-1.orig/common/lib/modules/fglrx/build_mod/firegl_public.c ++++ fglrx-driver-11-1/common/lib/modules/fglrx/build_mod/firegl_public.c +@@ -850,7 +850,12 @@ static int fglrx_pci_suspend(struct pci_ + * happen much less frequent then without this workaround. + */ + if (state == PM_EVENT_SUSPEND) ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38) ++ console_lock(); ++#else + acquire_console_sem(); ++#endif ++ + + if (firegl_cail_powerdown(privdev, state)) + ret = -EIO; +@@ -872,7 +877,11 @@ static int fglrx_pci_suspend(struct pci_ + } + + if (state == PM_EVENT_SUSPEND) ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38) ++ console_unlock(); ++#else + release_console_sem(); ++#endif + + KCL_DEBUG_TRACEOUT(FN_FIREGL_ACPI, ret, NULL); + +@@ -896,7 +905,11 @@ static int fglrx_pci_resume(struct pci_d + if (PMSG_EVENT(pdev->dev.power.power_state) == 0) return 0; + + if (PMSG_EVENT(pdev->dev.power.power_state) == PM_EVENT_SUSPEND) ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38) ++ console_lock(); ++#else + acquire_console_sem(); ++#endif + + #ifdef FIREGL_USWC_SUPPORT + // Restore the PAT after resuming from S3 or S4. +@@ -921,7 +934,11 @@ static int fglrx_pci_resume(struct pci_d + firegl_cail_powerup(privdev); + + if (PMSG_EVENT(pdev->dev.power.power_state) == PM_EVENT_SUSPEND) ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38) ++ console_unlock(); ++#else + release_console_sem(); ++#endif + + PMSG_EVENT(pdev->dev.power.power_state) = 0; + KCL_DEBUG_TRACEOUT(FN_FIREGL_ACPI, 0, NULL); diff --git a/x11-drivers/ati-userspace/files/ati-drivers-CVE-2010-3081-fix.patch b/x11-drivers/ati-userspace/files/ati-drivers-CVE-2010-3081-fix.patch new file mode 100644 index 00000000..5a71da10 --- /dev/null +++ b/x11-drivers/ati-userspace/files/ati-drivers-CVE-2010-3081-fix.patch @@ -0,0 +1,60 @@ +/**************************************************************************** + * * + * Copyright 1999-2005 ATI Technologies Inc., Markham, Ontario, CANADA. * + * All Rights Reserved. * + * * + * Your use and or redistribution of this software in source and \ or * + * binary form, with or without modification, is subject to: (i) your * + * ongoing acceptance of and compliance with the terms and conditions of * + * the ATI Technologies Inc. software End User License Agreement; and (ii) * + * your inclusion of this notice in any version of this software that you * + * use or redistribute. A copy of the ATI Technologies Inc. software End * + * User License Agreement is included with this software and is also * + * available by contacting ATI Technologies Inc. at http://www.ati.com * + * * + ****************************************************************************/ + +--- common/lib/modules/fglrx/build_mod/kcl_ioctl.c.orig 2010-09-01 16:05:31.000000000 +0200 ++++ common/lib/modules/fglrx/build_mod/kcl_ioctl.c 2010-09-23 01:41:46.711844303 +0200 +@@ -35,6 +35,9 @@ + + #ifdef __x86_64__ + # include "asm/compat.h" ++# if ARCH_COMPAT_ALLOC_USER_SPACE ++# include "linux/compat.h" ++# endif + # if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22) + # if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,12) + # include "linux/ioctl32.h" +@@ -193,7 +196,20 @@ + */ + void* ATI_API_CALL KCL_IOCTL_AllocUserSpace32(long size) + { +- return compat_alloc_user_space(size); ++ void __user *ptr; ++ ++ /* If size would occupy more than half of the entire compat space... */ ++ if (unlikely(size > (((compat_uptr_t)~0) >> 1))) ++ return NULL; ++#if ARCH_COMPAT_ALLOC_USER_SPACE ++ ptr = arch_compat_alloc_user_space(size); ++#else ++ ptr = compat_alloc_user_space(size); ++#endif ++ if (unlikely(!access_ok(VERIFY_WRITE, ptr, size))) ++ return NULL; ++ ++ return ptr; + } + + #endif // __x86_64__ +--- common/lib/modules/fglrx/build_mod/2.6.x/Makefile.orig 2010-09-01 16:05:31.000000000 +0200 ++++ common/lib/modules/fglrx/build_mod/2.6.x/Makefile 2010-09-23 01:47:46.533415019 +0200 +@@ -66,6 +66,7 @@ + -DFGL_GART_RESERVED_SLOT \ + -DFGL_LINUX253P1_VMA_API \ + -DPAGE_ATTR_FIX=$(PAGE_ATTR_FIX) \ ++ -DARCH_COMPAT_ALLOC_USER_SPACE=$(ARCH_COMPAT_ALLOC_USER_SPACE) \ + + ifeq ($(KERNELRELEASE),) + # on first call from remote location we get into this path diff --git a/x11-drivers/ati-userspace/files/ati-drivers-do_mmap.patch b/x11-drivers/ati-userspace/files/ati-drivers-do_mmap.patch new file mode 100644 index 00000000..04248eb7 --- /dev/null +++ b/x11-drivers/ati-userspace/files/ati-drivers-do_mmap.patch @@ -0,0 +1,50 @@ +--- a/common/lib/modules/fglrx/build_mod/firegl_public.c 2012-06-15 18:30:13.483762070 +0200 ++++ b/common/lib/modules/fglrx/build_mod/firegl_public.c 2012-06-17 17:47:36.543041869 +0200 +@@ -2106,6 +2106,12 @@ + } + } + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 5, 0) ++# define NO_DO_MMAP ++# define do_mmap(a,b,c,d,e,f) vm_mmap(a, b, c, d, e, f) ++# define do_munmap(a,b,c) vm_munmap(b, c) ++#endif ++ + unsigned long ATI_API_CALL KCL_MEM_AllocLinearAddrInterval( + KCL_IO_FILE_Handle file, + unsigned long addr, +@@ -2117,10 +2123,13 @@ + + flags = MAP_SHARED; + prot = PROT_READ|PROT_WRITE; +- ++#ifdef NO_DO_MMAP ++ vaddr = (void *) vm_mmap(file, 0, len, prot, flags, pgoff); ++#else + down_write(¤t->mm->mmap_sem); + vaddr = (void *) do_mmap(file, 0, len, prot, flags, pgoff); + up_write(¤t->mm->mmap_sem); ++#endif + if (IS_ERR(vaddr)) + return 0; + else +@@ -2131,7 +2140,9 @@ + { + int retcode = 0; + ++#ifndef NO_DO_MMAP + down_write(¤t->mm->mmap_sem); ++#endif + #ifdef FGL_LINUX_RHEL_MUNMAP_API + retcode = do_munmap(current->mm, + addr, +@@ -2142,7 +2153,9 @@ + addr, + len); + #endif ++#ifndef NO_DO_MMAP + up_write(¤t->mm->mmap_sem); ++#endif + return retcode; + } + diff --git a/x11-drivers/ati-userspace/files/ati-drivers-fix_compilation-bug-297322.patch b/x11-drivers/ati-userspace/files/ati-drivers-fix_compilation-bug-297322.patch new file mode 100644 index 00000000..e2af915a --- /dev/null +++ b/x11-drivers/ati-userspace/files/ati-drivers-fix_compilation-bug-297322.patch @@ -0,0 +1,25 @@ +--- common/lib/modules/fglrx/build_mod/firegl_public.c ++++ common/lib/modules/fglrx/build_mod/firegl_public.c +@@ -1441,7 +1441,9 @@ + todo !!! + #endif + +-unsigned long ATI_API_CALL __ke__cmpxchg(volatile void *ptr, unsigned long old, ++void __cmpxchg_wrong_size(void) {} ++ ++unsigned long ATI_API_CALL __ke__cmpxchg(volatile unsigned long *ptr, unsigned long old, + unsigned long new, int size) + { + #ifndef __HAVE_ARCH_CMPXCHG +--- common/lib/modules/fglrx/build_mod/firegl_public.h ++++ common/lib/modules/fglrx/build_mod/firegl_public.h +@@ -441,7 +441,8 @@ + extern void ATI_API_CALL KCL_SIGNAL_BlockAll(int (*notifier)(void *priv), void *pPriv, __ke_sigset_t *pSigMask); + extern void ATI_API_CALL KCL_SIGNAL_UnblockAll(void); + +-extern unsigned long ATI_API_CALL __ke__cmpxchg(volatile void *ptr, unsigned long old, ++extern void __cmpxchg_wrong_size(void); ++extern unsigned long ATI_API_CALL __ke__cmpxchg(volatile unsigned long *ptr, unsigned long old, + unsigned long new, int size); + + #define __ke_cmpxchg(ptr,o,n) \ diff --git a/x11-drivers/ati-userspace/files/ati-drivers-kernel-3.8-acpihandle.patch b/x11-drivers/ati-userspace/files/ati-drivers-kernel-3.8-acpihandle.patch new file mode 100644 index 00000000..bdff4fb7 --- /dev/null +++ b/x11-drivers/ati-userspace/files/ati-drivers-kernel-3.8-acpihandle.patch @@ -0,0 +1,15 @@ +--- common/lib/modules/fglrx/build_mod/kcl_acpi.c 2012-07-04 21:43:47.000000000 +0200 ++++ common/lib/modules/fglrx/build_mod/kcl_acpi.c.new 2012-12-23 11:25:38.000000000 +0100 +@@ -775,11 +775,7 @@ + unsigned int ATI_API_CALL KCL_ACPI_GetHandles(kcl_match_info_t *pInfo) + { + #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,12) +- #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,19) +- pInfo->video_handle = pInfo->pcidev->dev.archdata.acpi_handle; +- #else +- pInfo->video_handle = pInfo->pcidev->dev.firmware_data; +- #endif ++ pInfo->video_handle = DEVICE_ACPI_HANDLE(&pInfo->pcidev->dev); + if ( pInfo->video_handle && + (KCL_ACPI_videoDevice(pInfo->video_handle) != KCL_ACPI_OK) ) + { diff --git a/x11-drivers/ati-userspace/files/ati-drivers-old_rsp.patch b/x11-drivers/ati-userspace/files/ati-drivers-old_rsp.patch new file mode 100644 index 00000000..0456bd6b --- /dev/null +++ b/x11-drivers/ati-userspace/files/ati-drivers-old_rsp.patch @@ -0,0 +1,24 @@ +--- a/common/lib/modules/fglrx/build_mod/firegl_public.c 2012-05-26 18:33:25.044695179 +0200
++++ b/common/lib/modules/fglrx/build_mod/firegl_public.c 2012-05-26 18:28:39.692699095 +0200
+@@ -4154,7 +4154,7 @@
+ {
+ unsigned int p;
+ KCL_DEBUG5(FN_FIREGL_KAS, "%d\n", level_init);
+- for_each_cpu_mask(p, cpu_possible_map)
++ for_each_possible_cpu(p)
+ {
+ KCL_DEBUG1(FN_FIREGL_KAS,"Setting initial execution level for CPU # %d\n", p);
+ preempt_disable();
+--- a/common/lib/modules/fglrx/build_mod/kcl_ioctl.c 2012-05-26 19:11:03.402987821 +0200
++++ b/common/lib/modules/fglrx/build_mod/kcl_ioctl.c 2012-05-26 19:13:00.273986422 +0200
+@@ -217,6 +217,10 @@
+ * \param size [in] Number of bytes to allocate
+ * \return Pointer to allocated memory
+ */
++#ifndef CONFIG_X86_X32
++DEFINE_PER_CPU(unsigned long, old_rsp);
++#endif
++
+ void* ATI_API_CALL KCL_IOCTL_AllocUserSpace32(long size)
+ {
+ void __user *ret = COMPAT_ALLOC_USER_SPACE(size);
\ No newline at end of file diff --git a/x11-drivers/ati-userspace/files/ati-drivers-vm-reserverd.patch b/x11-drivers/ati-userspace/files/ati-drivers-vm-reserverd.patch new file mode 100644 index 00000000..08045a65 --- /dev/null +++ b/x11-drivers/ati-userspace/files/ati-drivers-vm-reserverd.patch @@ -0,0 +1,12 @@ +--- common/lib/modules/fglrx/build_mod/firegl_public.c 2012-10-18 00:29:21.778369464 +0200 ++++ common/lib/modules/fglrx/build_mod/firegl_public.c.new 2012-10-18 00:30:39.647416026 +0200 +@@ -222,6 +222,10 @@ + #define preempt_enable() + #endif + ++#ifndef VM_RESERVED ++#define VM_RESERVED (VM_DONTEXPAND | VM_DONTDUMP) ++#endif ++ + // ============================================================ + /* globals */ diff --git a/x11-drivers/ati-userspace/files/ati-drivers-x32_something_something.patch b/x11-drivers/ati-userspace/files/ati-drivers-x32_something_something.patch new file mode 100644 index 00000000..d37c1191 --- /dev/null +++ b/x11-drivers/ati-userspace/files/ati-drivers-x32_something_something.patch @@ -0,0 +1,13 @@ +--- a/common/lib/modules/fglrx/build_mod/kcl_ioctl.c 2012-05-26 19:11:03.402987821 +0200 ++++ b/common/lib/modules/fglrx/build_mod/kcl_ioctl.c 2012-05-26 19:13:00.273986422 +0200 +@@ -217,6 +217,10 @@ + * \param size [in] Number of bytes to allocate + * \return Pointer to allocated memory + */ ++#ifndef CONFIG_X86_X32 ++DEFINE_PER_CPU(unsigned long, old_rsp); ++#endif ++ + void* ATI_API_CALL KCL_IOCTL_AllocUserSpace32(long size) + { + void __user *ret = COMPAT_ALLOC_USER_SPACE(size); diff --git a/x11-drivers/ati-userspace/files/ati-drivers-xen.patch b/x11-drivers/ati-userspace/files/ati-drivers-xen.patch new file mode 100644 index 00000000..a1b88df7 --- /dev/null +++ b/x11-drivers/ati-userspace/files/ati-drivers-xen.patch @@ -0,0 +1,62 @@ +--- common/lib/modules/fglrx/build_mod/firegl_public.c 2008-12-09 15:17:27.000000000 +0000 ++++ common/lib/modules/fglrx/build_mod/firegl_public.c 2008-12-09 15:12:34.000000000 +0000 +@@ -31,6 +31,9 @@ + #include <linux/autoconf.h> + + #if !defined(CONFIG_X86_PC) ++#if !defined(CONFIG_X86_PC_XEN) ++#if !defined(CONFIG_X86_XEN) ++#if !defined(CONFIG_X86_64_XEN) + #if !defined(CONFIG_X86_64) + #if !defined(CONFIG_X86_VOYAGER) + #if !defined(CONFIG_X86_NUMAQ) +@@ -47,6 +50,9 @@ + #endif + #endif + #endif ++#endif ++#endif ++#endif + + /* The dirty-page-tracking patch included in NLD 9 SMP kernels defines + * a static inline function that uses a GPL-only symbol in a header +--- common/lib/modules/fglrx/build_mod/firegl_public.h 2008-12-09 15:17:27.000000000 +0000 ++++ common/lib/modules/fglrx/build_mod/firegl_public.h 2008-12-09 15:15:45.000000000 +0000 +@@ -30,9 +30,13 @@ + #endif + + #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,9) +- ++#ifdef CONFIG_XEN ++#define REMAP_PAGE_RANGE_FN io_remap_pfn_range ++#define REMAP_PAGE_RANGE_STR "io_remap_pfn_range" ++#else + #define REMAP_PAGE_RANGE_FN remap_pfn_range + #define REMAP_PAGE_RANGE_STR "remap_pfn_range" ++#endif + #define REMAP_PAGE_RANGE_OFF(offset) ((offset) >> PAGE_SHIFT) + + #else /* LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,9) */ +@@ -43,13 +47,21 @@ + + #endif /* LINUX_VERSION_CODE > KERNEL_VERSION(2,6,9) */ + ++#ifdef CONFIG_XEN ++#define REMAP_PAGE_RANGE(vma,offset) \ ++ REMAP_PAGE_RANGE_FN((vma), \ ++ (vma)->vm_start, \ ++ REMAP_PAGE_RANGE_OFF(offset), \ ++ (vma)->vm_end - (vma)->vm_start, \ ++ (vma)->vm_page_prot) ++#else + #define REMAP_PAGE_RANGE(vma,offset) \ + REMAP_PAGE_RANGE_FN(FGL_VMA_API_PASS \ + (vma)->vm_start, \ + REMAP_PAGE_RANGE_OFF(offset), \ + (vma)->vm_end - (vma)->vm_start, \ + (vma)->vm_page_prot) +- ++#endif + + /* Page table macros */ + diff --git a/x11-drivers/ati-userspace/files/ati-powermode-opt-path-2.patch b/x11-drivers/ati-userspace/files/ati-powermode-opt-path-2.patch new file mode 100644 index 00000000..f5a35a30 --- /dev/null +++ b/x11-drivers/ati-userspace/files/ati-powermode-opt-path-2.patch @@ -0,0 +1,42 @@ +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 +@@ -4,6 +4,8 @@ + # Control script for ACPI lid state and AC adapter state + # + ++aticonfig='/opt/bin/aticonfig' ++ + getXuser() { + user=`finger| grep -m1 ":$displaynum " | awk '{print $1}'` + if [ x"$user" = x"" ]; then +@@ -47,7 +49,7 @@ + done + + #If PPLIB is enabled +-su $user -c '/usr/bin/aticonfig --pplib-cmd="get version"' | grep PPLIB ++su $user -c '$aticonfig --pplib-cmd="get version"' | grep PPLIB + if [ $? = 0 ]; then + echo "Has PPLIB" + has_pplib=1 +@@ -61,15 +63,15 @@ + if [ ${lid_closed} -eq 1 -o ${on_dc} -eq 1 ]; then + echo "Low power" + if [ ${has_pplib} -eq 1 ]; then +- su $user -c '/usr/bin/aticonfig --pplib-cmd="notify psrc dc"' ++ su $user -c '$aticonfig --pplib-cmd="notify psrc dc"' + else +- su $user -c "/usr/bin/aticonfig --set-powerstate=1 --effective=now" ++ su $user -c "$aticonfig --set-powerstate=1" + fi + else + echo "high power" + if [ ${has_pplib} -eq 1 ]; then +- su $user -c '/usr/bin/aticonfig --pplib-cmd="notify psrc ac"' ++ su $user -c '$aticonfig --pplib-cmd="notify psrc ac"' + else +- su $user -c "/usr/bin/aticonfig --set-powerstate=3 --effective=now" ++ su $user -c "$aticonfig --set-powerstate=$($aticonfig --lsp | grep 'default state' | cut -c 3)" + fi + fi + diff --git a/x11-drivers/ati-userspace/files/ati-powermode-opt-path-3.patch b/x11-drivers/ati-userspace/files/ati-powermode-opt-path-3.patch new file mode 100644 index 00000000..106e67ee --- /dev/null +++ b/x11-drivers/ati-userspace/files/ati-powermode-opt-path-3.patch @@ -0,0 +1,40 @@ +--- a/common/usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh 2012-08-17 22:39:05.077984979 +0800 ++++ b/common/usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh 2012-08-17 22:41:15.919976149 +0800 +@@ -4,6 +4,8 @@ + # Control script for ACPI lid state and AC adapter state + # + ++aticonfig='/opt/bin/aticonfig' ++ + getXuser() { + user=`who| grep -m1 ":$displaynum " | awk '{print $1}'` + if [ x"$user" = x"" ]; then +@@ -47,7 +49,7 @@ + done + + #If PPLIB is enabled +-su $user -c '/usr/bin/aticonfig --pplib-cmd="get version"' | grep PPLIB ++su $user -c '$aticonfig --pplib-cmd="get version"' | grep PPLIB + if [ $? = 0 ]; then + echo "Has PPLIB" + has_pplib=1 +@@ -61,15 +63,15 @@ + if [ ${lid_closed} -eq 1 -o ${on_dc} -eq 1 ]; then + echo "Low power" + if [ ${has_pplib} -eq 1 ]; then +- su $user -c '/usr/bin/aticonfig --pplib-cmd="notify psrc dc"' ++ su $user -c '$aticonfig --pplib-cmd="notify psrc dc"' + else +- su $user -c "/usr/bin/aticonfig --set-powerstate=1 --effective=now" ++ su $user -c "$aticonfig --set-powerstate=1 --effective=now" + fi + else + echo "high power" + if [ ${has_pplib} -eq 1 ]; then +- su $user -c '/usr/bin/aticonfig --pplib-cmd="notify psrc ac"' ++ su $user -c '$aticonfig --pplib-cmd="notify psrc ac"' + else +- su $user -c "/usr/bin/aticonfig --set-powerstate=3 --effective=now" ++ su $user -c "$aticonfig --set-powerstate=3 --effective=now" + fi + fi diff --git a/x11-drivers/ati-userspace/files/atieventsd.init b/x11-drivers/ati-userspace/files/atieventsd.init new file mode 100644 index 00000000..73139ce3 --- /dev/null +++ b/x11-drivers/ati-userspace/files/atieventsd.init @@ -0,0 +1,20 @@ +#!/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.init,v 1.3 2007/05/18 23:58:01 marienz Exp $ + +depend() { + need acpid +} + +start() { + ebegin "Starting ${SVCNAME}" + start-stop-daemon --start --exec /opt/sbin/atieventsd -- ${ATIEVENTSDOPTS} + eend $? +} + +stop() { + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --stop --quiet --exec /opt/sbin/atieventsd + eend $? +}
\ No newline at end of file diff --git a/x11-drivers/ati-userspace/files/const-notifier-block.patch b/x11-drivers/ati-userspace/files/const-notifier-block.patch new file mode 100644 index 00000000..ba1fdb2b --- /dev/null +++ b/x11-drivers/ati-userspace/files/const-notifier-block.patch @@ -0,0 +1,25 @@ +diff -Nur common/lib/modules/fglrx/build_mod/kcl_acpi.c common-r1/lib/modules/fglrx/build_mod/kcl_acpi.c +--- common/lib/modules/fglrx/build_mod/kcl_acpi.c 2013-01-29 17:03:51.000000000 +0200 ++++ common-r1/lib/modules/fglrx/build_mod/kcl_acpi.c 2013-02-15 20:33:10.611838616 +0200 +@@ -15,6 +15,9 @@ + ****************************************************************************/ + + #include <linux/version.h> ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0) ++#include <linux/notifier.h> ++#endif + #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) + #include <generated/autoconf.h> + #else +@@ -145,7 +148,11 @@ + return NOTIFY_OK; + } + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0) ++static notifier_block_no_const firegl_acpi_lid_notifier = { ++#else + static struct notifier_block firegl_acpi_lid_notifier = { ++#endif + .notifier_call = firegl_acpi_lid_event, + }; + #endif diff --git a/x11-drivers/ati-userspace/files/kernel/2.6.31-fglrx_find_task_by_vpid.patch b/x11-drivers/ati-userspace/files/kernel/2.6.31-fglrx_find_task_by_vpid.patch new file mode 100644 index 00000000..1d4e030b --- /dev/null +++ b/x11-drivers/ati-userspace/files/kernel/2.6.31-fglrx_find_task_by_vpid.patch @@ -0,0 +1,19 @@ +--- common/lib/modules/fglrx/build_mod/firegl_public.c.orig 2009-09-10 20:14:10.302938534 +0200 ++++ common/lib/modules/fglrx/build_mod/firegl_public.c 2009-09-10 20:16:21.828943780 +0200 +@@ -183,6 +183,7 @@ + #include <linux/string.h> + #include <linux/gfp.h> + #include <linux/swap.h> ++#include <linux/pid.h> + + #include "firegl_public.h" + #include "kcl_osconfig.h" +@@ -1315,7 +1316,7 @@ + #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26) + p = find_task_by_pid( pid ); + #else +- p = find_task_by_vpid( pid ); ++ p = pid_task( pid, PIDTYPE_PID ); + #endif + if (p) + { diff --git a/x11-drivers/ati-userspace/files/kernel/2.6.32-9.11-fix_compilation.patch b/x11-drivers/ati-userspace/files/kernel/2.6.32-9.11-fix_compilation.patch new file mode 100644 index 00000000..38519d76 --- /dev/null +++ b/x11-drivers/ati-userspace/files/kernel/2.6.32-9.11-fix_compilation.patch @@ -0,0 +1,37 @@ +--- work/common/lib/modules/fglrx/build_mod/firegl_public.c ++++ work.new/common/lib/modules/fglrx/build_mod/firegl_public.c +@@ -1441,7 +1441,9 @@ + todo !!! + #endif + +-unsigned long ATI_API_CALL __ke__cmpxchg(volatile void *ptr, unsigned long old, ++void __cmpxchg_wrong_size(void) {} ++ ++unsigned long ATI_API_CALL __ke__cmpxchg(volatile unsigned long *ptr, unsigned long old, + unsigned long new, int size) + { + #ifndef __HAVE_ARCH_CMPXCHG +--- work/common/lib/modules/fglrx/build_mod/firegl_public.h ++++ work.new/common/lib/modules/fglrx/build_mod/firegl_public.h +@@ -441,7 +441,8 @@ + extern void ATI_API_CALL KCL_SIGNAL_BlockAll(int (*notifier)(void *priv), void *pPriv, __ke_sigset_t *pSigMask); + extern void ATI_API_CALL KCL_SIGNAL_UnblockAll(void); + +-extern unsigned long ATI_API_CALL __ke__cmpxchg(volatile void *ptr, unsigned long old, ++extern void __cmpxchg_wrong_size(void); ++extern unsigned long ATI_API_CALL __ke__cmpxchg(volatile unsigned long *ptr, unsigned long old, + unsigned long new, int size); + + #define __ke_cmpxchg(ptr,o,n) \ +--- work/common/lib/modules/fglrx/build_mod/kcl_io.c ++++ work.new/common/lib/modules/fglrx/build_mod/kcl_io.c +@@ -37,8 +37,9 @@ + */ + + #include <linux/version.h> + #include <linux/autoconf.h> + #include <linux/poll.h> ++#include <linux/signal.h> + #include <asm/io.h> + + #include "kcl_config.h" diff --git a/x11-drivers/ati-userspace/files/switchlibGL b/x11-drivers/ati-userspace/files/switchlibGL new file mode 100644 index 00000000..a6aa4fce --- /dev/null +++ b/x11-drivers/ati-userspace/files/switchlibGL @@ -0,0 +1,61 @@ +#!/bin/bash +# switchlibGL +# +# Copyright (c) 2011 Advanced Micro Devices, Inc. +# +# Purpose: +# For switch between AMD and Intel graphic driver library. +# +# Usage: +# switchlibGL amd|intel|query +# amd: switches to the AMD version of libGL. +# intel: switches to the open-source version of libGL . +# query: checks, which version is currently active and prints either "amd" +# or "intel" or "unknown" on the standard output. +# must be root to execute this script + +ARCH=`uname -m` +E_ERR=1 + +# Check if root +if [ "`whoami`" != "root" ]; then + echo "Must be root to run this script." 1>&2 + exit $E_ERR +fi + +# One parameter +if [ $# -ne 1 ]; then + echo "Usage: `basename $0` amd|intel|query " 1>&2 + echo "Please choose one parameter " 1>&2 + exit $E_ERR +fi + +current=$(eselect opengl show) +# Switch to right mode +case "$1" in + "amd" ) + if [ $current != ati ] ; then + eselect opengl set ati || return 1 + fi + ;; + "intel" ) + if [ $current != xorg-x11 ] ; then + eselect opengl set xorg-x11 || return 1 + fi + ;; + "query" ) + case "$current" in + "ati" ) + echo "amd" + ;; + "xorg-x11" ) + echo "intel" + ;; + esac + ;; + * ) echo "Usage: `basename $0` amd|intel|query" 1>&2; exit $E_ERR;; + # other than amd|intel|query parameter report an error +esac + +# A zero return value from the script upon exit indicates success. +exit 0 diff --git a/x11-drivers/nvidia-drivers/Manifest b/x11-drivers/nvidia-drivers/Manifest new file mode 100644 index 00000000..f905799c --- /dev/null +++ b/x11-drivers/nvidia-drivers/Manifest @@ -0,0 +1,120 @@ +AUX 10nvidia 26 SHA256 1f3469ad49cf83d5d0dafd53729d6b20a8e2c9a070bcd4062ec7a1046a3dc2ca SHA512 471ffa2ee4d238a3f3a2e90a04f635fee57ed133f1a02ae6033e8ca5342c2ab1f5a8fb5672a189b19d91e70010f17507246ea8864788120df1285265cc8c5f4e WHIRLPOOL bd9f31661ef22fbbe1efaa51d8cea2d05fa9ba487ae1195f5137289682a9b7bd551093c1e08de3ee85a202feef83f9e1845cbac8fe763b0ca2b2bdecfd1dd705 +AUX 256.35-unified-arch.patch 1498 SHA256 7861431595e425c5df8acffb8bf536befa7a13618d6f66456aef6dac4db5c314 SHA512 0be0097e0ac540d672ded293168a56969bf26d62efd78d8ac320cbbd426744536c451835cb46f002f112a172fee0d44c8633add0932ab2c3b41ca6841f780f63 WHIRLPOOL e4a652d358519010f76cba94b0e9e97f3632f301ace8d5ea56fc8ae896e57445e08623189cf9240a99efad801774adee39a1ceea9ab982c5f36ae57e949c95b7 +AUX eblits/donvidia.eblit 695 SHA256 d404dd7e5657d83ccf3687720fb978030a3716e47957fb8bb80dea3ed57b3672 SHA512 606d2a496ddae2ac89d3ac0ce5b80bac90cabfe74d6b29c577ab047c3b83ce8965bb4b91b29f37bf55d4f34eaab623ac886760920efb9d306d3904cb3b51291c WHIRLPOOL e0a945c4cbaa0514e19eecf8faa4daaa76c8fc6392fb9a2a607e011e7994c535a3ba4b024de9ee9f4f34c7d4e0d48a0c3315f4cf9687be05fb577ec8dd3c0fe2 +AUX eblits/mtrr_check.eblit 629 SHA256 ae1b8fb37985fc3e42a4a776779b3fe3d70be2c826df5c3f99d03ba7209ca0b1 SHA512 db1bcee808c616536e21f98d65cd0c2b64b26b8b0db827decfc8fe12b031431bf961f1f2016a22170b9400672aeb508f548a66c15018570b44fe1cd535692f86 WHIRLPOOL 4f4961dc5aa71f273871f9171f485aaf5dd27906a564e1967b9298362b2302d9b137a757c6e6918b4b3d1efef75b0ed266f08d83c898e0a1f2b47653e1ca7335 +AUX eblits/src_install-libs.eblit 3472 SHA256 6f301de374736cec316794bf1935a15de025b3c505981f24e06e3df75818ad6a SHA512 f3dd0cb69276cec6f2b7cbb452c77c8e0a82fc37514c31a21fb9a251e38027e4adfdda6ca8b1897635897608a0e70c81f03ff88466a7db1387ed7a4241924ce8 WHIRLPOOL a2e84fba09347bec9b27129f02311696938ad5ca61fa7ff8d9efa10ad9c63a01a622cba1d08b1e166c737e88b50add234c7c0d59b88e5b64442269a7dd47cbf8 +AUX eblits/want_tls.eblit 952 SHA256 e5ce767a2e9a5c0682e764b9ba42a20e721a093f4c0626605570c8b5e3afecd0 SHA512 eafa21a324f095e3d80ac0385c1a5159011a57e3aa2465927c71524c6329147f2ee804f6b0772d4ad97083637451df397be0da748d8674d5be42b308fb25ae2d WHIRLPOOL 8291d0fa548518926252fafabaa0ebbfd7ac165b380650beeed17c86918f95d658a3daadab6c4bde0adbdf1ce7b63a88ed6135cfcf9dceb4798f0b1ccefc8fcc +AUX libGL.la-r2 733 SHA256 4856e7a2c31763ade41c93a395f3e80a2705ac2ab4dbd73e5161cdba132f407b SHA512 52fbc3d704274fc5403b95a5d696824684302f4a77e0b08d5a59850435b12d9bdc4cf931f346f91e950f246cc342e0a673e7657cc2cea95e991ed3aab8c1c928 WHIRLPOOL 6a0006277a8444b4b5191a7e07c972efde43c3a9ff8a7286d1d1f78c69c3ba394572f31716b684f1e28355572a6e9f9cbd5437bb9dba127d727f8789fbd2a980 +AUX make-use-of-the-new-uapi-framework.patch 1503 SHA256 47122d37911638163252557cfa754f35bda3d1db91812ac19aae86e9f6b4612a SHA512 a8e0de8b861b52cb66fe508456110df6effa3ddea42d023cc9ebeeb373d3bcc4fba5d9f6910343e4c211ebf64abf9073aedca25d0baf7f4e8ea4fd3b44a947da WHIRLPOOL 14d3dfecba46ddf6da0f1290730916c8d22bfcad8ebbf4af8720b1b3a76072c076444141a14927af9c7339f48b6fd3b9f3924bb050a13e2ab30158b9a1e102a5 +AUX nvidia 1510 SHA256 b193cc3f6d6f39138720a2282d9f161fc8f2e8a15bc43d183a30eb879add06c5 SHA512 4ffdf49c2634b261be122a0016b0f69d30db6fe4b4a29767cfeee2e1d60671e7e6fc5e5c3a237b351a4def64404db121cf296a0cdb6e1bbd4f8e78ab40587000 WHIRLPOOL faab4c87940e4703b2a30f284cae34bdf4ac486cb1d402b5bd91ef65c23f443c2c961ad914fbcbd5258dd5bbaeee583f189fcf5fc14f2b9925c8ccfa0fc422c7 +AUX nvidia-169.07 639 SHA256 a8c4860f008d53776fda7a17b59524f271236559af688e9a2c9845cbbcba1577 SHA512 3af295c026280dc3a2b73c2cc7772254686b09cad15f1333ab0b4de8cb0ccf78e725ced2a399b10edcf8af6ba42ab1485dc0661af67461b0c3789f786357772f WHIRLPOOL 626ae3c01c879e0cfe05bd373e0b9dfd6f462dd9ef6ae94a7d60276fe2d17c57fbb20aaa4d2a186a0ffc2a860076692aac854d00a3545bc9736e7bb8d0581055 +AUX nvidia-drivers-173-3.10.patch 22318 SHA256 e1e84b3f882df06295295050003855d435669be049fd8cdf73f95917e4ed2c3a SHA512 8c96fa9c945e4a2620372d171049a1bf3318a2d0bfba6857717eb7c1132a2538edb536b9958e0d7647f93fe60bdb2b2c153b3dac3b2ff4fd057a78288b1e6e5f WHIRLPOOL 741ffb283a249f39c74f83b38e897489dcc4d644daa27c40af00a51f1768336c4d4371f379f5fa6c1c3ec80e011ea83a8703fe90307f00e12d0befa96b94fbc0 +AUX nvidia-drivers-260.19.44-2.6.39.patch 481 SHA256 f4aebb017e5a054171df7594220674583dbb25c0e8f78778141bdc5694fad521 SHA512 37a46b1e0fb688144a1a40bb403b1ffa718aa215e413887c757423d4e3b3e6a12187dd0c96607063c0358522d2a383e6ffd71ec855a108340fe7710e0106bf96 WHIRLPOOL 5fdff3d8cc58218d8151d68d45c99fde31eb913985302f76f74414fa2e4a3bb8d11470ec9be124a1c96648d002c13f350a9ee8bf9811b594f7c618ce0555138f +AUX nvidia-drivers-290.10-3.2.8+.patch 481 SHA256 e34491c1b8cbb0b310f14aabea34c4dbc6bb3ee20c78ac87d62f960134f5dda0 SHA512 d40b728f3955ea651ee6fefa9b8a7b7cc2c5aee9cbbf0662f5abb6709a6b62cfb13e80d9595e08de35f2d8c4631200e17c91cd4b8c32059f866d35c00f750ef1 WHIRLPOOL d8938f7ce01713ad6a5e194ce3b1299d705cffcbabb6791dcc0feb0fd4d386401dc5d810496db0b30c7bcc8b184d37d07f27979514ec09c2b83e78cbce0b5b3b +AUX nvidia-drivers-304-3.10.patch 18864 SHA256 a5793ff1620b062880fd23f4c5bc469bde70e2ee6f74f7261636298b33154bd2 SHA512 d985d4982728167fcb491081a151fa7a7f6536d8fd0152dd627b6be02b357a780732d78bffc41a4e8f25903cd6213eb79a8763ddd9787e01e067dc200e0213a2 WHIRLPOOL 3c07a3ac4891f2685ed0057a2c340d8b949480ca1e3e13d13cc9b801652b101d54934e98b5951522f186559f55638a240327862540e1cbcd1e494bf937e91113 +AUX nvidia-drivers-313.18-3.8.patch 775 SHA256 329a38af4a6ea8c76e61129140b8dec16694b50328934346a40ff5e571671083 SHA512 0dbb88a54d8daffb1c6654623187f505e62042ad92f8dab8e7c15a1d43d461965b159c08a8c8971e342b88050274a8a72d578ceebb025891cdf083dd65213ce5 WHIRLPOOL 269a97eb0ceb66ad9418bf4e453b5e891bcf96c29dec8b4bc8aee0674448d05edb155587b03b98dfb20d1e071c6419badc64d6982601c46edb7e4b916a17c8e1 +AUX nvidia-drivers-319.23-3.10.patch 17669 SHA256 68d9c37dd177829bd240447d070489fab3d58f4552d09d46ff0a2ee7cb07d127 SHA512 a0a3c22d0c65b8759929b982155f233e49d279a5de74c7cae438681666324656319d1a1bf8e867453c945eb4bd12406287bf497440c1801142c1ba327e473c58 WHIRLPOOL 98e7a37285c5a2e94ab33c29221803f404ef6aa6fcaf0398563e2131c132c708095f09d97e4e82e73146f95da39e07589d620a8bf1c8ad7e23bec9196c4b316a +AUX nvidia-drivers-96.43.19-2.6.39.patch 561 SHA256 63e9f372023454943583e9b9c0603a12df3481fb3e36b89c411e8d70b5d9aa26 SHA512 f479b491ca863556d6f7b1ad23962b339c7815ab29ce8a5b1be8275cebce04f009ca59a6204f5e0b56dea57f276e9ad1953072b65a448111c1c85731fe05d608 WHIRLPOOL b0895792f6faedfd8cb0a0b5af9e6a2584f882690aef129b3be88913c364fd476ff05757664c0a2cc48db5b7d6cec19f56d09897e682b2c18f62e2cf82968e73 +AUX nvidia-drivers-pax-const.patch 833 SHA256 74ba8aa3b03e1b4a0515fd84c159eaeb7635fa1364e77544b01ff6f571f0e6d8 SHA512 6ef94db71cab2dd47273eaed1857209d03ef648d268c7645f3ca4caf6b894590e42a8e716e4354f2eed656e7d55a4c1774b1e6a4be215fbf59fc9d0b1a5762a0 WHIRLPOOL 1b2d737ee7ccee831c85bd8af9605c0633fd025bb209e6d76c13f49a5664aa490bd5b6ce48855e541fe87380cd7b723162e1965b803e1ed630f239bf4dbd0d19 +AUX nvidia-drivers-pax-usercopy.patch 2350 SHA256 56980f43db38d582bc6a9bfd881973fce6e3e056b77ce4f4005bdcf79526a863 SHA512 54a1354ba008d014a608044610027b4d808120f8e77cc7d5ac855c3dcf4f487b0a4c0870ae4e727db0643cb56ee21513b803976e9a30c6838adf2f5414232804 WHIRLPOOL 78ac54bfe52cc3b6dfa28e17020991dfb7056984d667b0fefa41d23372b03e1a8e6d66c74e1dee234733d5b2b36e2c0813f507a89716ae2d8f1f6db917fdf01d +AUX replace-VM_RESERVED-with-VM_DONTEXPAND-and-VM_DONTDU.patch 829 SHA256 28c9254efcff3f8ff51c8f8fdb1a277a49c1b3e424064454b8aa43f114e38bfd SHA512 bbb0844f0688e3a7e75e26ada19633c451bd9259e8084e6b49f5889414b417f047878e7819276c878136679c5a69575a02d2c1562e9c53ddd3dba8b61f2708f5 WHIRLPOOL ddd315ffaf6ae48f0f369813001b55920e76682a1c0d1bc694ef64bc8828c9bd1e87f8849b35f006e387aa6ff2fb93bb628c59c1f91b348b8573396a6c5ff686 +DIST NVIDIA-FreeBSD-x86-173.14.31.tar.gz 17991684 SHA256 98699bc8dc1dad86cebc2ed067b4fc5cd37b8540e897bb218f38ac80c4b4d875 SHA512 4e6fbbeaff54563a135346e60372046cb2cd2562cc606836dc3169d4f50c0b112095b1f0f3f14f2f0facf2be1235064c13766432a04b927f2ab81ef50c8f4f34 WHIRLPOOL 0cc4f196d7ccbdd45f8584fef9f98dd1af2fa260a8e694a6000e5436ae2ab35df6ba5f8967261e36f0107962744423fc73eef9d0e59807f78536ecf8de0f5963 +DIST NVIDIA-FreeBSD-x86-173.14.34.tar.gz 18792829 SHA256 44368464ad72addb999aa7bf3a1d684d4cddd1bba08d7bca9e45a825cb8865ae +DIST NVIDIA-FreeBSD-x86-173.14.35.tar.gz 18748428 SHA256 51e82a12db81b5af4ae5ee59612875c0dbef52cb641d61a44c72f2e1cd7f4c78 +DIST NVIDIA-FreeBSD-x86-275.09.07.tar.gz 30304023 SHA256 d5d119c2f066539da0f2d1926193f6bc2bfbf2a1dcdff77322a23b42c5df91d9 +DIST NVIDIA-FreeBSD-x86-280.13.tar.gz 29589886 SHA256 2ad1882467a2d8a0b65dfa15e710e4938786e51f688e1d02d4d3343868b9239e +DIST NVIDIA-FreeBSD-x86-285.05.09.tar.gz 30697710 SHA256 d3ad51145cd57c70678ee659112a0973187b1b02e3062addadd0fe094b3c46fb +DIST NVIDIA-FreeBSD-x86-290.10.tar.gz 32042469 SHA256 f5accbdac0b231a8073f76c1d1d8ace7cb98ebe167888c31183a2752a669ee92 +DIST NVIDIA-FreeBSD-x86-295.20.tar.gz 31993959 SHA256 fea6d5552a50e2aedc4726944fea85ac8baf0d0b26661fc3b1f97f54ebec6736 +DIST NVIDIA-FreeBSD-x86-295.33.tar.gz 32039170 SHA256 e3f8052fdac78defafcef495febea2a77f820f2c4c9ecbe47fb92bf630321afc +DIST NVIDIA-FreeBSD-x86-295.40.tar.gz 32029253 SHA256 f47b603f39dfd2e405949aab6fbc7abd4b24f43c6fb47b4f23d7618f32021364 +DIST NVIDIA-FreeBSD-x86-295.49.tar.gz 32078716 SHA256 aa7c9a13931a55e358c542e1d18feb0aeaa7b18550e9675698b152265134d938 +DIST NVIDIA-FreeBSD-x86-295.53.tar.gz 32085530 SHA256 ecb637754ec31a0c058017e04b363abb831b96584ca9684b676a93ecb5af93ca +DIST NVIDIA-FreeBSD-x86-295.59.tar.gz 32092806 SHA256 9a3e1794418add03ad97aad93608d1bc1f2f9c5a82e0321a2a8ba1c9db7d41dd +DIST NVIDIA-FreeBSD-x86-302.17.tar.gz 32072917 SHA256 b0d50c3333ee7c485bfd5287b37e253ed358dd5d205997f0c50e16f04b7714c5 +DIST NVIDIA-FreeBSD-x86-304.22.tar.gz 32975645 SHA256 20a84c23339695fe73d9be977662b19572360d8d87b54aeca428f73e2510c1e5 SHA512 15788983073427a9729b61a37b684c37bafd57618bbacec40fe8f9bd0a3f6f30d417297dee5e3ca287f0b71c74bbe03163edef048f8ad38cf2493124820244dd WHIRLPOOL f823ce885ebcd8ab9af427487c8dfffe5cc7adc61e1c4af31371b808df449584df1f571310610e901bc83c4e52cb553d2a71d0ae5e3fadfadf56ce1a97447484 +DIST NVIDIA-FreeBSD-x86-304.37.tar.gz 33291575 SHA256 e6c3a1d4a757b5d4f2ab54a43d5d7008fcb1b481f14515f58adcd31f3edc6576 +DIST NVIDIA-FreeBSD-x86-304.64.tar.gz 33320263 SHA256 e129d0d0e8d256d6328cddc4c18edb96c1e444c354f7c806ece4192621a1c1b5 SHA512 032de0524f2e68a06e6218f3737f55e16e6ae6ea9991b539bacabf4814a101d2f0786d8e2fe750d59ddaf5b5cee5b1527adedc44539d2015370e879ee8b37948 WHIRLPOOL f042065e63a5a74b2d3b586135072df77156481383a5cb7993598efef841859c3a7d9a7c6ad7eb83016376bfe5d2b044088918711a6304380a8ade6c808ab60c +DIST NVIDIA-FreeBSD-x86-304.88.tar.gz 33651825 SHA256 739325b26a93d934d015159c420ef1875a24ccd62a5bb482e688cf918d4fa33d SHA512 6dab929d2d2bacfc3a96ab24ff02996938613851e2b3c050ed3a1d0cca3751c574f12508e21119f2b43ff0421c3f88bf4edd51a37f3374c72c6337bcb8d6bcdb WHIRLPOOL b9be513a8dd8ce4cd6eeb23a24e725c751bb2cce0745477df2b4b84d7d03ad557d0b16bcdfb8d642168de09d59b057cb2955fca11f50b281ebad92f30a7dc4e1 +DIST NVIDIA-FreeBSD-x86-310.19.tar.gz 32264033 SHA256 29635a45e87fd240d472868dcd1ff9030f7eb85d78ffe85dea0f420be390d3e0 SHA512 77fd63c0c2cca5462c7e969e300f027dff9cb60f4234868f42317604d537a7bccb2631958f2a0cf74f46ee685d8f2a25f3dab2792be00a5c638d9756deb5a582 WHIRLPOOL bc896389ed9ad32e8e2e087476a3bafac9f828b8a1167c7b99cd58688d56d5454717dbe99b83fa1eca3111a80ffa9f721332364c8fdf95c02f4c5e05f989248f +DIST NVIDIA-FreeBSD-x86-313.18.tar.gz 32592785 SHA256 515b8470dcea3e122403f5902ba6ce3d710d9ddc4d9edd581ffe85e184af989f SHA512 00f15def371cbd2c433b2cecc1f5ff455ea1b112951b3453512b88371f7fa25047e5409cdbd7e34b7c8e6d5b1691b6d662076737dcfd6239f60926a013a1de52 WHIRLPOOL d6a49d027a4cc66c05a246f84ca8360265ce98d50e1e35d4d8828f2003c472d2154eb277cecddd1eb39ecc44896795e529daa743f37174c0e1e2a84b9fa7bada +DIST NVIDIA-FreeBSD-x86-313.30.tar.gz 32591892 SHA256 1e02831fbaddf2f27808ea26352d835417f59bcf54ddb3e9c0f1d7b76dcb4666 SHA512 68cf61fabf707dfa1225011cab3749959ab29f09f611347eb9f9bd55065012d04382998e67091c4d3c1af9be21be6381aef9b6414448ee15f9a36d44448f5bf8 WHIRLPOOL 71ded70f45e880db2c2850c596cebafd004adf89f7131adaf324d1d38abbb5457a700bfa9e671bfa144515556f011df8a37fdf22b78b879f39007be6487f060a +DIST NVIDIA-FreeBSD-x86-325.15.tar.gz 34164781 SHA256 745d8454833d1ad59f6480ac2d1ca744862e4e711e16deeebc0d04ff86925c4d SHA512 b1ce1041d7f3a926c3e62e398a618063e24675cdd919206c11e556f38d3b0078233ba31207d04e9d94e26bbf5eae4d43f8db457e7ac4fecfb8d407d2dbbf3040 WHIRLPOOL 9a37ecaa745ab9ff80755f01100610f85467fdfb55f5568dd358cb39302c0951edd91d518f1027bb0d43628e575ff9c1799ad956b9e673a31d38f7f3db125c63 +DIST NVIDIA-FreeBSD-x86-96.43.20.tar.gz 14060884 SHA256 e75fce272e72644d53e6ad3c0957fe173735a4b621726ce227ba8ecf9bd9c5cf +DIST NVIDIA-FreeBSD-x86_64-304.37.tar.gz 34210803 SHA256 0d00046c8463954b6c8e13e245b2619758e947389161a113aa005ef7566e5dd3 +DIST NVIDIA-FreeBSD-x86_64-304.64.tar.gz 34247065 SHA256 9887e4147fcb16141dcb6b153ff71a28c73cf2a4c16b60e4c6fcb8586a1c5400 SHA512 31750ebf8f8583e82dd3211888e729dac866b73c9cce4cf666900f7d1269097ed1df9e30173c8091e0ed5196dd3d4d9b09e2aaeaef2936aa3f95fb673a37622b WHIRLPOOL 1412c1e9deaecd2f7fd086ef57afb6ea8b2252b57a4e69a71561768a6fed7e6387d10db4e4efa5c9772e2954bc0fd2c1902bff29a8b48ce6dc05e87ec913c908 +DIST NVIDIA-FreeBSD-x86_64-304.88.tar.gz 34597351 SHA256 be0e20a543fa14a8f91481dd64b080093b19edf951bf631c62365a64dadb1934 SHA512 143af863aef72962d83c6f77160512d0860a62964e92043400674b0be95735ae6f2dbdd25c42fa96b4511cece9c73b7072f829a88d46ab6b79aa750b65e64748 WHIRLPOOL 74b5014736065e178b261716e81f367395252efb3aa3b84faab6b6d26f561caa129e1d9bc0e02ce98f83dcaa3603fddd155de4b50e760bf2ea8df4c176b21e76 +DIST NVIDIA-FreeBSD-x86_64-310.19.tar.gz 33184883 SHA256 82607fdd14c666867b842205be3ec8b8095fb0c9da1cb2286b0bf85a769eb9ae SHA512 5f112a4dbb379977c9b1417536964d02498cb9d4a4ff3c35291dfaa5c90fcc8b2073ec75a1db9358c98686661d525db5e7e42036500281d09a1be608f9c2b851 WHIRLPOOL 3b629c57cc63319b18805fb67ebf75d07907a52b2c1d7cad12cca8837c29e6557c772c416d52d15f1e8f7b01b65b8a7728bd4cf5c0da890644e3151421fb901d +DIST NVIDIA-FreeBSD-x86_64-313.18.tar.gz 33554240 SHA256 57fbf9c85fb19a7f2fb3c6c2f50421e70309cd3360c059a2fc6efc125681ff10 SHA512 fe2c0ec88b7cb5d49905dd082d46f3a4268dea78bf4dbdc6d82b60f1ec9998d478b4332de48094af7bb7b9b51eb6885aae446998830c28555521715db7a59dbe WHIRLPOOL 95e3c577b3831bda11f0ddd8ee1fddc2f1a3138db35c78277fe99ac6c75d9dca0e9b8acf59ca31413f11775772d82bef85077355796bb6882bf9804868361b66 +DIST NVIDIA-FreeBSD-x86_64-313.30.tar.gz 33557658 SHA256 192ad1bb8a0cd649e12bcccf97c5f4d2002d6695126fea81586991d9e95248d3 SHA512 79b3b47bdcbc99f724f8c424733c11f1b2653103bbe0ba9849587628611d9da08ea434c786cc7d3d891bde3dfe4068298a7377ce5b1a3484fb64ef4d28c896da WHIRLPOOL 7307d6adb04b47b8403134e7394bf9af4f90839d1fb62aa3b7b7c6d8e367392829fb249dc8d444e66158fa5b5b15cf5b6c16e1f5659a22a15c17f55eda026660 +DIST NVIDIA-FreeBSD-x86_64-325.15.tar.gz 34590166 SHA256 92429119ca8e50baa06c6681ed2b9eb6c37cdf256a19ba4e1827be4b202a0569 SHA512 c9e4d41a5dcb02a280fb323fd4578bc7851d4242890f1d8e69a59e083a2a76cccdaba3ed55f8eb8f983e9c89326f0a9d7152bd7770230fbe45fc7b5865c486b6 WHIRLPOOL c54638af7fb6aaf63222ea75cc377e5e449dfaa80dd47a23aed2eec8da1c460c9e3c24627a2853287585a65b0f562e3efc7916fe985a4816d82aebc12bf7021b +DIST NVIDIA-Linux-x86-173.14.31-pkg0.run 13407481 SHA256 e855a62f16a9d0eff1bf470a8fcedd48cd1b718e969ad5ebe89a557d039d1924 SHA512 bb58aa1ee84c71311a7b5cd3d87fa2827b6b41bb4645849611381ce7e255516da66fff9cc9a295a39ea185668d7f91fde0eaf56a18b04ae67ae468e1e509bc46 WHIRLPOOL d9a28dd96bf77051e6cf91a1b29c59fac716e14f3d3726867ecd9e43ac90d62d4ace0f0add7aff619f4933a8dc9e87734df3fcb5483db62bf99a77320d4e2f33 +DIST NVIDIA-Linux-x86-173.14.34-pkg0.run 14071464 SHA256 a873b7a28b1d83fcb7a97e4d5fcb471bb96bb5094bcd5e86c728ec22b49b258e +DIST NVIDIA-Linux-x86-173.14.35-pkg0.run 14028887 SHA256 2d26100f7691047e424e1614deca0f1d862da5fa69e04e967f0c1dbb84ec729a +DIST NVIDIA-Linux-x86-275.09.07.run 30930605 SHA256 27d1b2073c11bd56e423ed80bd22773f1f282c39ab3b76773144cfa680a1ff0c +DIST NVIDIA-Linux-x86-280.13.run 32704856 SHA256 b222afe19c6310f1aa2a2574f27fa9e2b877738177daa60162bb5705758bac9b +DIST NVIDIA-Linux-x86-285.05.09.run 33592492 SHA256 ce03fa99b62081b52bd5dae3594ac5942413ed530cda3d76a82f4ab0afd36f96 +DIST NVIDIA-Linux-x86-290.10.run 34691272 SHA256 99be8f53aa1f777445e5a4cac27acd7d85990db712b5c29caac865145fc5adaa +DIST NVIDIA-Linux-x86-295.20.run 34641353 SHA256 0f9dc3d493053cffe37f72b6783edc6c14afd31532b43a7cf0bfce763cf2d500 +DIST NVIDIA-Linux-x86-295.33.run 34675369 SHA256 90a866c9c2f3904bc25b7a5829f8b40a419e60a79ad13c980b48d3bf89625a47 +DIST NVIDIA-Linux-x86-295.40.run 34668138 SHA256 ccd46574dd843a50327f50daa6f0b635ad7eca4a5b9a5fa963d0871bfa74ce2a +DIST NVIDIA-Linux-x86-295.49.run 34716936 SHA256 f13b44725f4904ed3f5250d733b45b5815f54e8b588dfe6c6180918e80f35c6a +DIST NVIDIA-Linux-x86-295.53.run 34718461 SHA256 0040096216ac6f8695743c9124a067787d30947f7c64f2734bac474f5af0b0a0 +DIST NVIDIA-Linux-x86-295.59.run 34730118 SHA256 084bbb76c57d5c2a5b780322a95dcc230ec6e25b4f6c176574a93621399ce5a0 +DIST NVIDIA-Linux-x86-302.17.run 34598956 SHA256 3525d3814361bd202998cea2962bb3d1bb3419206d02fd8ac30d61358c1a284f +DIST NVIDIA-Linux-x86-304.22.run 35433519 SHA256 174be68a403f234cadd6dbac785459f7a7463989050fa4e6c92ed65b638ededb SHA512 885a0a8a7ecc387a9bbb806b2f36942d7bee2bdfdb784169490b72667db4218b76e19b4ebdecf107e1498f8e1d5544e3d44ae6b02cc6d6855431602e4afc3064 WHIRLPOOL ab691f2aded714b38afad1f6ff966dcb016cb409e4b78c37137aac439c06d2df112b74d72abf205526b65cae7d90a7e5f5081426d29e1cd310139511b77794c4 +DIST NVIDIA-Linux-x86-304.37.run 39349097 SHA256 ab3174a0c9ab37a8fc3f4a8fc1121d72fbdd5e00ddecf44f7dbd84bb8d51b337 +DIST NVIDIA-Linux-x86-304.64.run 39386363 SHA256 23464129f7ea5a00f724f67627206b322b6d08efb7134192a56ba50ea93d2252 SHA512 106e40ec6453c0f08c0ec926e5121357535395c5d97acfdaa3c1b95f9baa256d1797cde56e1fa696e267cd1d12fcb1624d6e60e28256d9658bfed12580669c5c WHIRLPOOL a6ab62b283963a417781d4d90c03f7a1b2afedb69d1e2e862bdc67c6e8148a29de396e362dea46a4024f65470ecc2f984b468df9ab784aca7327e80529af2bc7 +DIST NVIDIA-Linux-x86-304.88.run 39682604 SHA256 71e10294f073e31a387da4282b95cdde5fbfc996cb1c564f290eb0df1289b7cb SHA512 ba6f0236aead2f5161c94c7eaffb2497815ba1a7cbf872ae37d620d66533d4847acb6dfcc230e2b751aa9717ae552940ed6d3da1a9209aa54f6a810e3f551e49 WHIRLPOOL 9c2e0438630e86ca8c7aa2f26928113e5f15dcf808be8a4c2e937fd04b8d1aa7304bda714580834cc5ef4dc57304f41be62b55ee75545b9cfca3533b6db737e6 +DIST NVIDIA-Linux-x86-310.19.run 38581112 SHA256 85d082c06a1ea07f514d22c0de4d5d2af065bcac37c377c3d755904bbf780c2f SHA512 ef24e695b76b57cee1d13601c5856fe723da9da678e0f78739f0e291c5d00cea9e0da5b110f4125a79edd420127fed0a48883eaad591ed16e6660b139b7cb289 WHIRLPOOL 064bf26184b644210f565ad9b1b400abb26b9c8b61b519d2831ce04128fcc58c57e9474bb2ec5f3d935799857a1ca4c3273b68a36aca1d2285318f2679251f5e +DIST NVIDIA-Linux-x86-313.18.run 38865783 SHA256 58e5e2191890ace94849444f5d2de4c2921dfe02cd97825d81a128754ff4488f SHA512 70ec92071de3aabe77ee5304a4c2c1b7eda0e2b44860f63b05c8c004aaf748c18b40e5f7558dd6bcb99e1e394557a2c189ca462400fdde28aee408a64b8b7e27 WHIRLPOOL 3f6506e17414a78d4dc7a69e52e34d5172529d061dd8aa7b7e31066281525a0cbfefd846b2bfdb21820ed3c6a0c1348fae4e0d7d21c82d6633e284f5a0dfbd52 +DIST NVIDIA-Linux-x86-313.30.run 38845860 SHA256 0a0f10979b1bca8e4a244e204b58aeb9a580924a9dd7b11b21d15abfe1ad49ad SHA512 c3b07e7186fcf5a1f3e73f4e9510dddff2a42c0202bc471a946e38e636af27b2d17206b7105a7a80179fc17ebceab6c2802ff6ddaabae9e16a930dfa1252a2db WHIRLPOOL 2d4402883a480ae3050af18f3fe1aec4110132aa4eda0ce9675f79471a526e8b90b9ebe6a0a5c76321474be6ace963520b903cf809835472649b095be757ec52 +DIST NVIDIA-Linux-x86-325.15.run 27409286 SHA256 3d790e4bfed24641f7cc76879144ab5d52b12271012ba381b0d33aa1a2e08775 SHA512 48052c3daa8748a7c43de1c24e00fdd3f94cebbe7f5efbb185a0472a1d0bbab8adfe377359ccdc6cd8e437a80506fdd551408237b0842c194a3497c43cf3487e WHIRLPOOL 387fb8af1a31cc295abe7b15fee7d5bc01c515603b178abe7f50864dbbf0685ca50f88e67359adc4af8e90caaeb1fba95aa6af9f54e6fced46c82c5cfc094390 +DIST NVIDIA-Linux-x86-96.43.20-pkg0.run 10323541 SHA256 bc778062cf745ee4916de77a702f702312d33eeb3b6f379b63e4366fa5197517 +DIST NVIDIA-Linux-x86_64-173.14.31-pkg2.run 18967067 SHA256 c56cfe43c4fa95102d099e4f1c4e75e58b57d73b4b36a858d54a2a339aad56d9 SHA512 fcb3f004495c8e3ef93b4229b2b64e8ee83a12f2cc5ba1c33bf486b6bf8687e1e1d5b45c2da8721422f6c2190150f7f86bd4b9ec0987d4440343fafb9e18c208 WHIRLPOOL 585728e3d03b1a9cf90fd80c413f2dd432870f49df60bd1335ec0c7143b59005819b4fd655587b0f76d19c28eaa946d6893c4358b8ec7e33000486429684cd1f +DIST NVIDIA-Linux-x86_64-173.14.34-pkg2.run 19769116 SHA256 30dcdd3cfba4f7d2b5f4977faea573463700b44252e46fb43402e269183dec3e +DIST NVIDIA-Linux-x86_64-173.14.35-pkg2.run 19767039 SHA256 5af64646b098021b550242fe8eb03817f862af0442023545d1295027f589595f +DIST NVIDIA-Linux-x86_64-275.09.07.run 51646025 SHA256 747c09b0a0a8d60e1b5fee49fb1ea07ee5812f8e85a87b2403011af6de58164d +DIST NVIDIA-Linux-x86_64-280.13.run 55011572 SHA256 98a08c7d943912a178a9bbe419db60634088e5262ae9053bf2fe730984e5a012 +DIST NVIDIA-Linux-x86_64-285.05.09.run 56674677 SHA256 7159a1f7e898b50dd49ea2273ac6facb870546ad5496bf70c6fbe1642d2c4970 +DIST NVIDIA-Linux-x86_64-290.10.run 58334192 SHA256 34a2ab07f4ae7afdeb2c8415f3f37c1099e6690eb25f3dbef92eca771f7ce4cd +DIST NVIDIA-Linux-x86_64-295.20.run 58403208 SHA256 3b84fdeae335c047193f68a1da26f2a736461c35cfe94566fc7ace1e5762d34c +DIST NVIDIA-Linux-x86_64-295.33.run 58435170 SHA256 4e939bac1ebc03c6439969d638540b99900b0fe4e4799b4186e5ff9521d37b73 +DIST NVIDIA-Linux-x86_64-295.40.run 58446405 SHA256 f6d5ae338b3b8ac6c512d06b335010934a62728f181a1fa5253aa84b7bf45e7a +DIST NVIDIA-Linux-x86_64-295.49.run 58521195 SHA256 61dc9623ea1981f801d97de7c67c32b7e4f7ef4aaa6744910967cb634d9ace62 +DIST NVIDIA-Linux-x86_64-295.53.run 58522001 SHA256 4525e994a0d0a8cd776415401423e7de3985923637642955c3fe50a3d047d4ca +DIST NVIDIA-Linux-x86_64-295.59.run 58529480 SHA256 4b1d96389abd2b804ad470c5189142a02ee4c82c1ac56cea37ecb45e8051313e +DIST NVIDIA-Linux-x86_64-302.17.run 58653717 SHA256 5cf9059ebb70ade99e5621c0a605ed5bbb6c274f7c52a7ef40342ceb41b381fc +DIST NVIDIA-Linux-x86_64-304.22.run 60141600 SHA256 4c1b6f7dcda007622bb5e243b858abdb3881d5d5befdc617b23393545d9c96fd SHA512 06dac9e042baa836b1f2d9cd360b2ca3545dcff4b382ed9d29e8e442ab5e9dc241b5f75250c3dce73e0e7958bccaa16ac48415ae5f2fc7cbc65689bd7a6e7640 WHIRLPOOL a7d1a1abe5cdedc743b43fa1627dc9094ab32cea3645cdd5cfd53a33929d0a48f4d3efaa7311ff6f0ba99d31a112e6872cb4cad3d1cafbd996646020d8dd7f40 +DIST NVIDIA-Linux-x86_64-304.37.run 64075318 SHA256 cae75158047d0b97ea48f269fd2903a6731f53b978a1065720343436c97ca9c2 +DIST NVIDIA-Linux-x86_64-304.64.run 67695715 SHA256 b3c3bb7f136ccd978c9c5a511a02199ec2498c4243baae19ac68e5d905ca5340 SHA512 77241676900bf5f9fa93f5628ae9c5ffc35c41de31fbb9e777e55204cd1183d344d7ad5d00e52efe5caa91330f6157d9d2cba66764256673dbfbe61fe6797de3 WHIRLPOOL a8744fb747569e5106d486200231f0caf99ac3896b8cc358ea581486cf98506ed21b54407665acb461c40fcd89cfa04ac540b6c959856aaf14979abce75999d1 +DIST NVIDIA-Linux-x86_64-304.88.run 68041437 SHA256 c1a73211566b085214b0ad1824733aa56d09c6139f729feebd0eff44f6113da3 SHA512 8a907f9ed307b1e4b5563a9aba9d6c1c036885cd64a4a229d6831eb7a855921971e652b7940333e366d5088f97cf3596fb739853b3c3cf94446ee0cea6164ab2 WHIRLPOOL 2e43479bb52d1dcbe1007cda779ab21ed064883769358a09bdd765e55f6b35a855a51006e070d33ddd2a3808802cdb4fa2ae63cc7cc189561934d00574492ca8 +DIST NVIDIA-Linux-x86_64-310.19.run 68022245 SHA256 3326cf9eb432a10fee5cb663132cd6c175813d0225750ef237dcc7feefd20fca SHA512 035a0cb62f4d307683ada7fff380fbe8a9433cee0ee6a8b1986e9d59b55a23484305903f84e77fb6a7440e06efce012feae1da658a304e790e2022c028541a69 WHIRLPOOL 523a9ca07d18cfa1afb1f4e527cecf1c4778650eaa81d1e627fd1c65b4ab459d02e5ce726d0190c57e677c6ef3c22afef8c6aaa99892731faf3415138e9e7635 +DIST NVIDIA-Linux-x86_64-313.18.run 68386461 SHA256 9aaf6ce2fb08f72b2ab4f7a2d9fc5af8216ac263fa4883deec3844f34ea7ba3a SHA512 d1017763f6cef96a443f9d7890ca940d742cd17fb8b1d926440483987e22d350a57bcce98962d6130c5e2ac697926dbb560f148f45ba7659ff3412443b53473c WHIRLPOOL 0180fff2e5e7bd9fb731fdee3c81e1b26a7962d989e998dc9fa67e4a836526e10e6de01cfc1e6650d9ff4a5cc334b5c27740df309b3dd403dfd13795c48d6f29 +DIST NVIDIA-Linux-x86_64-313.30.run 68379307 SHA256 72317f2e4c459c33c764e3283deb3e1615b1852ead1f9bfad82148e120506022 SHA512 ae4439697e47eff98e06e5f77de979bdce096f95efa8bdee9c6fc939b42b5ce3b11c23d7691e974cf0f6f783eeb0fb694670636538352a0e8979f88d687f1f86 WHIRLPOOL c12a68fcc4d78f3856d87a86cef43c3632c0db1b6c5799b6482584d4d83a7cc863b9b394a501b96534175e11663c602d72f6ffa49f85461eaf4324dc61e654ff +DIST NVIDIA-Linux-x86_64-325.15.run 48034648 SHA256 01446fbd94f6eb3b2e1b3d3f2b06970bf470c3ee2cb1838b3d0c2416e6c74500 SHA512 323cbd8e6f3ce29a1556b83b2fb3456f919964ede1cbee4ddaa3539ab75eda7abe26b96ba500462eed2ade4163b8de20d1db6ea987af923710f0e1a60e432e83 WHIRLPOOL 7c05717a2cfcb003a8c1f9fc5f5e24cfd5216aca7167ee8f29b60c43262fc61afab9619147ee07cb2541aa1d55b13a730b52c90979b7970df709fb659fe782ff +DIST NVIDIA-Linux-x86_64-96.43.20-pkg2.run 14572507 SHA256 562107a262e250b836966e29851628f6162ee2857d53252221c780d9b201de18 +EBUILD nvidia-drivers-173.14.31.ebuild 5562 SHA256 b159128f017cdb21513d46a76dfa6500ef0db483caa3d614a28bdaa51f083398 SHA512 c34ef34d443f31bb02b41e809c6414359882684cb5ed3ae9e484feb421a254d2edfbf8763dd7008534babd5440f33f0ded61400d1975314e9beadfa50ac34df5 WHIRLPOOL efb4fbf62503500710c3ad768be155cb136172687af5c5f9a04d089c670e7435e90397dd80e74de1393358b2a7e957658735e50b3824829ed71dee9f3e116bc6 +EBUILD nvidia-drivers-173.14.34.ebuild 5822 SHA256 5ebfe7996d5ff32b05f1cfcfc7ec97d6b5e8c9853861f3b4c6e32677b93da15d SHA512 5f72430412008986d5597e0f25c415be81c80d7507a194c748a8341076e878bb6f40b24ece667e92cfcd2dab00b22d91ff85508d5a31678926a07fc1dc0598b8 WHIRLPOOL 3840deaeb534b10bb9a1155fe8395c96366e995390ade2d20cc712705740b9f2d5eaaa81e0aff197d10c98851ab2e2408d3fdfd21e602ca504ab13dffd5e6ca8 +EBUILD nvidia-drivers-173.14.35.ebuild 5822 SHA256 5ebfe7996d5ff32b05f1cfcfc7ec97d6b5e8c9853861f3b4c6e32677b93da15d SHA512 5f72430412008986d5597e0f25c415be81c80d7507a194c748a8341076e878bb6f40b24ece667e92cfcd2dab00b22d91ff85508d5a31678926a07fc1dc0598b8 WHIRLPOOL 3840deaeb534b10bb9a1155fe8395c96366e995390ade2d20cc712705740b9f2d5eaaa81e0aff197d10c98851ab2e2408d3fdfd21e602ca504ab13dffd5e6ca8 +EBUILD nvidia-drivers-275.09.07.ebuild 5459 SHA256 d6f5fbf5c6da10e99f622d69d9f8bb1b612160dc238839ba77bfb078b4e89ae9 SHA512 8b228d2175740bc6ecec275985059816111f16c1cd3528c90d62fcf1364e56fad8787924d35b51d7a080b40a6b6ce714cb8b85dfa46ff857028c208f2e7c9ad7 WHIRLPOOL d029d3d0549c7bcb16f6f0712366ccc406f8a1bed8987b6dbf56f010c87776d8c6693c2f891487dc1b023f45bfd11777a1d4d969a83aff079e92c610c64d0a9f +EBUILD nvidia-drivers-280.13.ebuild 5533 SHA256 608ad531cc444b4fde265af01834d9c72d836c92c34a0441fc42608f1b42ac6d SHA512 d6371d637c4057f514d6afb6519b9b4d988ac005101d7b57029634c7c87c32656b73d11f54a95966d4d8255ab6da5c1b7969d745d13884361a43fbe759c74b64 WHIRLPOOL 0f0d236a07929d7e8daa531c720b015f00f283b75c3d9846dd31e801c2beef5deb5b3fc0acdc183953adbcb68f6a265c272d253b197938e4372c320e6fd0b46d +EBUILD nvidia-drivers-285.05.09.ebuild 5459 SHA256 d6f5fbf5c6da10e99f622d69d9f8bb1b612160dc238839ba77bfb078b4e89ae9 SHA512 8b228d2175740bc6ecec275985059816111f16c1cd3528c90d62fcf1364e56fad8787924d35b51d7a080b40a6b6ce714cb8b85dfa46ff857028c208f2e7c9ad7 WHIRLPOOL d029d3d0549c7bcb16f6f0712366ccc406f8a1bed8987b6dbf56f010c87776d8c6693c2f891487dc1b023f45bfd11777a1d4d969a83aff079e92c610c64d0a9f +EBUILD nvidia-drivers-290.10.ebuild 5542 SHA256 c541fd027041539c16214b10e5e3ebd103b7a1487bf57aefa7a0842ed862acfc SHA512 18e5169d8f46028547af0b17391cef60295e2a0782fc7f94f549b9801d8445214d2aa7af570c608b98081faa75a446c3f2a6c6846b03c9101c45507e1461e983 WHIRLPOOL 41da7159daa32e57658e0675f9d0c5fdf26ae578dfaac799bdff55611f54d8800cd17b2ade5b2cebc514ad9775de6d51a7578c36191fdf5cccd4d315602fdf0c +EBUILD nvidia-drivers-295.20.ebuild 5459 SHA256 d6f5fbf5c6da10e99f622d69d9f8bb1b612160dc238839ba77bfb078b4e89ae9 SHA512 8b228d2175740bc6ecec275985059816111f16c1cd3528c90d62fcf1364e56fad8787924d35b51d7a080b40a6b6ce714cb8b85dfa46ff857028c208f2e7c9ad7 WHIRLPOOL d029d3d0549c7bcb16f6f0712366ccc406f8a1bed8987b6dbf56f010c87776d8c6693c2f891487dc1b023f45bfd11777a1d4d969a83aff079e92c610c64d0a9f +EBUILD nvidia-drivers-295.33.ebuild 5699 SHA256 3c9ddccc632ce94f53f26b0211b4c0c0b4c24182262ab015ded84d562009c33b SHA512 76aba3c4b55a6ccfe815a3cd9ec2873da9328aaac282428839cdab5d133f878d3172c457338d6b0906e294e20ddf1bb3e8663fbdcc3370cdb3a43fab8cf13ad1 WHIRLPOOL cff6e71156996dab3876f39f3d089786cb35fdb61718adb9d923f9f04b00f4244107ed4f4a1aff776c9d9a2a2eb2bf73181dd58e0eb21002918140aa6feb0ac8 +EBUILD nvidia-drivers-295.40.ebuild 5699 SHA256 3c9ddccc632ce94f53f26b0211b4c0c0b4c24182262ab015ded84d562009c33b SHA512 76aba3c4b55a6ccfe815a3cd9ec2873da9328aaac282428839cdab5d133f878d3172c457338d6b0906e294e20ddf1bb3e8663fbdcc3370cdb3a43fab8cf13ad1 WHIRLPOOL cff6e71156996dab3876f39f3d089786cb35fdb61718adb9d923f9f04b00f4244107ed4f4a1aff776c9d9a2a2eb2bf73181dd58e0eb21002918140aa6feb0ac8 +EBUILD nvidia-drivers-295.49.ebuild 5699 SHA256 3c9ddccc632ce94f53f26b0211b4c0c0b4c24182262ab015ded84d562009c33b SHA512 76aba3c4b55a6ccfe815a3cd9ec2873da9328aaac282428839cdab5d133f878d3172c457338d6b0906e294e20ddf1bb3e8663fbdcc3370cdb3a43fab8cf13ad1 WHIRLPOOL cff6e71156996dab3876f39f3d089786cb35fdb61718adb9d923f9f04b00f4244107ed4f4a1aff776c9d9a2a2eb2bf73181dd58e0eb21002918140aa6feb0ac8 +EBUILD nvidia-drivers-295.53.ebuild 5699 SHA256 3c9ddccc632ce94f53f26b0211b4c0c0b4c24182262ab015ded84d562009c33b SHA512 76aba3c4b55a6ccfe815a3cd9ec2873da9328aaac282428839cdab5d133f878d3172c457338d6b0906e294e20ddf1bb3e8663fbdcc3370cdb3a43fab8cf13ad1 WHIRLPOOL cff6e71156996dab3876f39f3d089786cb35fdb61718adb9d923f9f04b00f4244107ed4f4a1aff776c9d9a2a2eb2bf73181dd58e0eb21002918140aa6feb0ac8 +EBUILD nvidia-drivers-295.59.ebuild 5699 SHA256 3c9ddccc632ce94f53f26b0211b4c0c0b4c24182262ab015ded84d562009c33b SHA512 76aba3c4b55a6ccfe815a3cd9ec2873da9328aaac282428839cdab5d133f878d3172c457338d6b0906e294e20ddf1bb3e8663fbdcc3370cdb3a43fab8cf13ad1 WHIRLPOOL cff6e71156996dab3876f39f3d089786cb35fdb61718adb9d923f9f04b00f4244107ed4f4a1aff776c9d9a2a2eb2bf73181dd58e0eb21002918140aa6feb0ac8 +EBUILD nvidia-drivers-302.17.ebuild 5699 SHA256 3c9ddccc632ce94f53f26b0211b4c0c0b4c24182262ab015ded84d562009c33b SHA512 76aba3c4b55a6ccfe815a3cd9ec2873da9328aaac282428839cdab5d133f878d3172c457338d6b0906e294e20ddf1bb3e8663fbdcc3370cdb3a43fab8cf13ad1 WHIRLPOOL cff6e71156996dab3876f39f3d089786cb35fdb61718adb9d923f9f04b00f4244107ed4f4a1aff776c9d9a2a2eb2bf73181dd58e0eb21002918140aa6feb0ac8 +EBUILD nvidia-drivers-304.22.ebuild 5699 SHA256 3c9ddccc632ce94f53f26b0211b4c0c0b4c24182262ab015ded84d562009c33b SHA512 76aba3c4b55a6ccfe815a3cd9ec2873da9328aaac282428839cdab5d133f878d3172c457338d6b0906e294e20ddf1bb3e8663fbdcc3370cdb3a43fab8cf13ad1 WHIRLPOOL cff6e71156996dab3876f39f3d089786cb35fdb61718adb9d923f9f04b00f4244107ed4f4a1aff776c9d9a2a2eb2bf73181dd58e0eb21002918140aa6feb0ac8 +EBUILD nvidia-drivers-304.37.ebuild 5194 SHA256 9a59cc5bedb79f5eeac96fe9aee931eee160fb1eb2e1c8f581d363b135212ca1 SHA512 ade6904be753f54e6f7d11c7101040826b8d1358d5232c88ec7f7bccc7266f0d98abb97097b35e57743a9b5bb6ade15c9736484a226540cd2c0d370a612eaaf9 WHIRLPOOL 1577089a20d3e65bd160170e12bbe562e71e923e18aa9d59c59183866f8810fafd0d326f4bd427031383c90c989c10ab3af85ce0427cd4b6a851bc4d9ed9ed59 +EBUILD nvidia-drivers-304.64.ebuild 12742 SHA256 bae8fe02ef6129f3015c37d976a6812529ca402d34dc17eec4f51f32d8e8d991 SHA512 b2d769d594f39ae0a8afa70f3113b7f4a755925e536fdc2b44c4313059e1eed74146844acf93bbb05da481272d1be897c977726d500cb395b92f796ef39effc8 WHIRLPOOL 9cec9dfa9056512bf4b9e7297cf28e49e3688bc97616dfe62bcb35e0aff84829bdd5213c6e779510e83a5e4a00d493737648f944519b7b7dc18dd58eb9bd325d +EBUILD nvidia-drivers-304.88.ebuild 5534 SHA256 a5f3fc0447e44ef665327e6c6f81fd5c6e42b411307ba16f5c162c49b59ed770 SHA512 7b4abd4e2b14bb775ff9439b771d910a0fbc5fa542cee5cf06dea09d3567c3a2caea2d05738937842a322d050d4e3e43850b586f0dad3cea1670c2abccd13070 WHIRLPOOL 31cf94b729e6fa89a5c906b54c99f13fd2f4c7460c625f72935978654b324f03a4b1c4d67358d9898c855c43d8450964a059ec0da3dcb6d7345c431383805146 +EBUILD nvidia-drivers-310.19.ebuild 5194 SHA256 9a59cc5bedb79f5eeac96fe9aee931eee160fb1eb2e1c8f581d363b135212ca1 SHA512 ade6904be753f54e6f7d11c7101040826b8d1358d5232c88ec7f7bccc7266f0d98abb97097b35e57743a9b5bb6ade15c9736484a226540cd2c0d370a612eaaf9 WHIRLPOOL 1577089a20d3e65bd160170e12bbe562e71e923e18aa9d59c59183866f8810fafd0d326f4bd427031383c90c989c10ab3af85ce0427cd4b6a851bc4d9ed9ed59 +EBUILD nvidia-drivers-313.18.ebuild 12331 SHA256 bac39af82126d68e14a6ee565283fa44c9e01e8266a712ca96a959c552af4cf1 SHA512 800513f01ba2724f9d463b30731b4dd43bb032a1a344857feceebf7f5b9a49455e7fd08efe729902307771b235c018875a49216dc54216415423186ad9bd9b45 WHIRLPOOL e292caf68db2aa4c958a040e706dda09d1e0d70291989a712400905c1301f5b5801bac7519e950f0266e56f2e8dfe0360a0a1b8831ab11cdf1838ed7953c0a9d +EBUILD nvidia-drivers-313.30.ebuild 5446 SHA256 8006292fb618edc9830e2374af58e409ab0a1fa4e8a7efd46196f72651e28b2a SHA512 da272cc2007ddebcd9a6f1e28625023766052a9656c313a694f7a8d2c903bc13a93e32ee56fc515117d1a4c6d5b96bb900f311dd1d9a02c433852d153d9b5cae WHIRLPOOL 9d3e7eaf35aefac774ef5d5b0d32aaa05359e9cf428c96e5e0df00774faf5bdf6eecee50319c0294d66b8120328dca426f79e3c2e4f921d2ce9976134a271c48 +EBUILD nvidia-drivers-325.15.ebuild 5519 SHA256 b22c16ffc827d78f70817ba80486ad395489b10d35b8e05be2e741416ff5c393 SHA512 a815a04e9e1776a7e5282de03143c9cc474e747f2c23c048d72883d6b1cbac34500bebe13d2a7bf82c22c0f98fb926a674f34ca476e4b0317c690394380cc430 WHIRLPOOL c2fff2f946bfe5dc7da16c0bdb6f23cfda350e075688d9cbad4ab344b67b676c3b7488a73cff9cd0fac570d4a7ac726718dc689ca4bae4bce6224909a484cae1 +EBUILD nvidia-drivers-96.43.20.ebuild 5562 SHA256 b159128f017cdb21513d46a76dfa6500ef0db483caa3d614a28bdaa51f083398 SHA512 c34ef34d443f31bb02b41e809c6414359882684cb5ed3ae9e484feb421a254d2edfbf8763dd7008534babd5440f33f0ded61400d1975314e9beadfa50ac34df5 WHIRLPOOL efb4fbf62503500710c3ad768be155cb136172687af5c5f9a04d089c670e7435e90397dd80e74de1393358b2a7e957658735e50b3824829ed71dee9f3e116bc6 +MISC metadata.xml 340 SHA256 a8c83e426e095e92dc8d7553bde38172a3bb73717ec0469c78dba0a46f86194d SHA512 757fe60892996ee752008276a385ed2ba785837723beac28744e414d19e2312f956e300559519005ff3d465db2593e61804e6b7907e1faaf551d2633cf09c6aa WHIRLPOOL 483042f678dacfba03244f676d5b47035de23751c6cf306c87d0ff12856ca3dd8ce10bc826bdc90bcb1b9be8a673cc68fbe506998bac564f0a55d7bf64481fe8 diff --git a/x11-drivers/nvidia-drivers/files/10nvidia b/x11-drivers/nvidia-drivers/files/10nvidia new file mode 100644 index 00000000..f1bc2fef --- /dev/null +++ b/x11-drivers/nvidia-drivers/files/10nvidia @@ -0,0 +1 @@ +__GL_NO_DSO_FINALIZER="1" diff --git a/x11-drivers/nvidia-drivers/files/256.35-unified-arch.patch b/x11-drivers/nvidia-drivers/files/256.35-unified-arch.patch new file mode 100644 index 00000000..da92b8f0 --- /dev/null +++ b/x11-drivers/nvidia-drivers/files/256.35-unified-arch.patch @@ -0,0 +1,30 @@ +diff -NuarpbB NVIDIA-Linux-x86-256.25-ori/kernel/conftest.sh NVIDIA-Linux-x86-256.25/kernel/conftest.sh +--- NVIDIA-Linux-x86-256.25-ori/kernel/conftest.sh 2010-05-19 05:38:57.000000000 +0200 ++++ NVIDIA-Linux-x86-256.25/kernel/conftest.sh 2010-05-22 02:13:56.000000000 +0200 +@@ -101,7 +101,7 @@ build_cflags() { + + if [ "$OUTPUT" != "$SOURCES" ]; then + MACH_CFLAGS="-I$HEADERS/asm-$ARCH/mach-default" +- if [ "$ARCH" = "i386" -o "$ARCH" = "x86_64" ]; then ++ if [ "$ARCH" = "i386" -o "$ARCH" = "x86_64" -o "$ARCH" = "x86" ]; then + MACH_CFLAGS="$MACH_CFLAGS -I$HEADERS/asm-x86/mach-default" + MACH_CFLAGS="$MACH_CFLAGS -I$SOURCES/arch/x86/include/asm/mach-default" + fi +@@ -110,7 +110,7 @@ build_cflags() { + fi + else + MACH_CFLAGS="-I$HEADERS/asm/mach-default" +- if [ "$ARCH" = "i386" -o "$ARCH" = "x86_64" ]; then ++ if [ "$ARCH" = "i386" -o "$ARCH" = "x86_64" -o "$ARCH" = "x86" ]; then + MACH_CFLAGS="$MACH_CFLAGS -I$HEADERS/asm-x86/mach-default" + MACH_CFLAGS="$MACH_CFLAGS -I$SOURCES/arch/x86/include/asm/mach-default" + fi +@@ -121,7 +121,7 @@ build_cflags() { + + CFLAGS="$BASE_CFLAGS $MACH_CFLAGS $OUTPUT_CFLAGS -I$HEADERS $AUTOCONF_CFLAGS" + +- if [ "$ARCH" = "i386" -o "$ARCH" = "x86_64" ]; then ++ if [ "$ARCH" = "i386" -o "$ARCH" = "x86_64" -o "$ARCH" = "x86" ]; then + CFLAGS="$CFLAGS -I$SOURCES/arch/x86/include" + fi + if [ -n "$BUILD_PARAMS" ]; then diff --git a/x11-drivers/nvidia-drivers/files/eblits/donvidia.eblit b/x11-drivers/nvidia-drivers/files/eblits/donvidia.eblit new file mode 100644 index 00000000..75b39cfb --- /dev/null +++ b/x11-drivers/nvidia-drivers/files/eblits/donvidia.eblit @@ -0,0 +1,21 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/files/eblits/donvidia.eblit,v 1.1 2008/12/18 18:27:35 cardoe Exp $ + +# Install nvidia library: +# the first parameter is the place where to install it +# the second parameter is the base name of the library +# the third parameter is the provided soversion +donvidia() { + dodir $1 + exeinto $1 + + libname=$(basename $2) + + # libnvidia-cfg.so is no longer supplied in lib32; step over it gracefully + if [ -e $2.$3 ] ; then + doexe $2.$3 + dosym ${libname}.$3 $1/${libname} + [[ $3 != "1" ]] && dosym ${libname}.$3 $1/${libname}.1 + fi +} diff --git a/x11-drivers/nvidia-drivers/files/eblits/mtrr_check.eblit b/x11-drivers/nvidia-drivers/files/eblits/mtrr_check.eblit new file mode 100644 index 00000000..b14df34b --- /dev/null +++ b/x11-drivers/nvidia-drivers/files/eblits/mtrr_check.eblit @@ -0,0 +1,19 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/files/eblits/mtrr_check.eblit,v 1.1 2008/12/18 18:27:35 cardoe Exp $ + +mtrr_check() { + ebegin "Checking for MTRR support" + linux_chkconfig_present MTRR + eend $? + + if [[ $? -ne 0 ]] ; then + eerror "Please enable MTRR support in your kernel config, found at:" + eerror + eerror " Processor type and features" + eerror " [*] MTRR (Memory Type Range Register) support" + eerror + eerror "and recompile your kernel ..." + die "MTRR support not detected!" + fi +} diff --git a/x11-drivers/nvidia-drivers/files/eblits/src_install-libs.eblit b/x11-drivers/nvidia-drivers/files/eblits/src_install-libs.eblit new file mode 100644 index 00000000..e48d11ce --- /dev/null +++ b/x11-drivers/nvidia-drivers/files/eblits/src_install-libs.eblit @@ -0,0 +1,116 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distribnuted under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/files/eblits/src_install-libs.eblit,v 1.1 2008/12/18 18:27:35 cardoe Exp $ +# +src_install-libs() { + local pkglibdir=lib + local inslibdir=$(get_libdir) + + if [[ ${#} -eq 2 ]] ; then + pkglibdir=${1} + inslibdir=${2} + elif has_multilib_profile && [[ ${ABI} == "x86" ]] ; then + pkglibdir=lib32 + fi + + local usrpkglibdir=usr/${pkglibdir} + local libdir=usr/X11R6/${pkglibdir} + local drvdir=${libdir}/modules/drivers + local extdir=${libdir}/modules/extensions + local incdir=usr/include/GL + local sover=${PV} + local NV_ROOT="/usr/${inslibdir}/opengl/nvidia" + local NO_TLS_ROOT="${NV_ROOT}/no-tls" + local TLS_ROOT="${NV_ROOT}/tls" + local X11_LIB_DIR="/usr/${inslibdir}/xorg" + + if use x86-fbsd; then + # on FreeBSD everything is on obj/ + pkglibdir=obj + usrpkglibdir=obj + x11pkglibdir=obj + drvdir=obj + extdir=obj + + # don't ask me why the headers are there.. glxext.h is missing + incdir=doc + + # on FreeBSD it has just .1 suffix + sover=1 + fi + + # The GLX libraries + donvidia ${NV_ROOT}/lib ${usrpkglibdir}/libGL.so ${sover} + donvidia ${NV_ROOT}/lib ${usrpkglibdir}/libGLcore.so ${sover} + + donvidia ${NV_ROOT}/lib ${usrpkglibdir}/libnvidia-cfg.so ${sover} + + dodir ${NO_TLS_ROOT} + donvidia ${NO_TLS_ROOT} ${usrpkglibdir}/libnvidia-tls.so ${sover} + + if ! use x86-fbsd; then + donvidia ${TLS_ROOT} ${usrpkglibdir}/tls/libnvidia-tls.so ${sover} + fi + + if want_tls ; then + dosym ../tls/libnvidia-tls.so ${NV_ROOT}/lib + dosym ../tls/libnvidia-tls.so.1 ${NV_ROOT}/lib + dosym ../tls/libnvidia-tls.so.${sover} ${NV_ROOT}/lib + else + dosym ../no-tls/libnvidia-tls.so ${NV_ROOT}/lib + dosym ../no-tls/libnvidia-tls.so.1 ${NV_ROOT}/lib + dosym ../no-tls/libnvidia-tls.so.${sover} ${NV_ROOT}/lib + fi + + if ! use x86-fbsd; then + # Install the .la file for libtool, to prevent e.g. bug #176423 + [ -f "${FILESDIR}/libGL.la-r2" ] || die "libGL.la-r2 missing in FILESDIR" + local ver1=$(get_version_component_range 1) + local ver2=$(get_version_component_range 2) + local ver3=$(get_version_component_range 3) + sed -e "s:\${PV}:${PV}:" \ + -e "s:\${ver1}:${ver1}:" \ + -e "s:\${ver2}:${ver2}:" \ + -e "s:\${ver3}:${ver3}:" \ + -e "s:\${libdir}:${inslibdir}:" \ + "${FILESDIR}"/libGL.la-r2 > "${D}"/${NV_ROOT}/lib/libGL.la + fi + + exeinto ${X11_LIB_DIR}/modules/drivers + + [[ -f ${drvdir}/nvidia_drv.so ]] && \ + doexe ${drvdir}/nvidia_drv.so + + insinto /usr/${inslibdir} + [[ -f ${libdir}/libXvMCNVIDIA.a ]] && \ + doins ${libdir}/libXvMCNVIDIA.a + exeinto /usr/${inslibdir} + # fix Bug 131315 + [[ -f ${libdir}/libXvMCNVIDIA.so.${PV} ]] && \ + doexe ${libdir}/libXvMCNVIDIA.so.${PV} && \ + dosym libXvMCNVIDIA.so.${PV} \ + /usr/${inslibdir}/libXvMCNVIDIA.so + + exeinto ${NV_ROOT}/extensions + [[ -f ${libdir}/modules/libnvidia-wfb.so.${sover} ]] && \ + newexe ${libdir}/modules/libnvidia-wfb.so.${sover} libwfb.so + [[ -f ${extdir}/libglx.so.${sover} ]] && \ + newexe ${extdir}/libglx.so.${sover} libglx.so + + # Includes + insinto ${NV_ROOT}/include + doins ${incdir}/*.h + + #cuda + if [[ -f usr/include/cuda/cuda.h ]]; then + dodir /usr/include/cuda + insinto /usr/include/cuda + doins usr/include/cuda/*.h + + if [[ -f usr/${pkglibdir}/libcuda.so.${PV} ]]; then + dolib.so usr/${pkglibdir}/libcuda.so.${PV} + dosym libcuda.so.${PV} /usr/${inslibdir}/libcuda.so.1 + dosym libcuda.so.1 /usr/${inslibdir}/libcuda.so + fi + fi +} diff --git a/x11-drivers/nvidia-drivers/files/eblits/want_tls.eblit b/x11-drivers/nvidia-drivers/files/eblits/want_tls.eblit new file mode 100644 index 00000000..4debb85d --- /dev/null +++ b/x11-drivers/nvidia-drivers/files/eblits/want_tls.eblit @@ -0,0 +1,33 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/files/eblits/want_tls.eblit,v 1.1 2008/12/18 18:27:35 cardoe Exp $ + +want_tls() { + # For uclibc or anything non glibc, return false + has_version sys-libs/glibc || return 1 + + # Old versions of glibc were lt/no-tls only + has_version '<sys-libs/glibc-2.3.2' && return 1 + + if use x86 ; then + case ${CHOST/-*} in + i486|i586|i686) ;; + *) return 1 ;; + esac + fi + + # If we've got nptl, we've got tls + built_with_use --missing true sys-libs/glibc nptl && return 0 + + # 2.3.5 turned off tls for linuxthreads glibc on i486 and i586 + if use x86 && has_version '>=sys-libs/glibc-2.3.5' ; then + case ${CHOST/-*} in + i486|i586) return 1 ;; + esac + fi + + # These versions built linuxthreads version to support tls, too + has_version '>=sys-libs/glibc-2.3.4.20040619-r2' && return 0 + + return 1 +} diff --git a/x11-drivers/nvidia-drivers/files/libGL.la-r2 b/x11-drivers/nvidia-drivers/files/libGL.la-r2 new file mode 100644 index 00000000..863d1844 --- /dev/null +++ b/x11-drivers/nvidia-drivers/files/libGL.la-r2 @@ -0,0 +1,32 @@ +# libGL.la - a libtool library file +# Generated by ltmain.sh - GNU libtool 1.4 (1.920 2001/04/24 23:26:18) +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# The name that we can dlopen(3). +dlname='libGL.so.1' + +# Names of this library. +library_names='libGL.so.${PV} libGL.so.1 libGL.so' + +# The name of the static archive. +old_library='' + +# Libraries that this one depends upon. +dependency_libs='-L/usr/${libdir} -lm -lX11 -lXext -ldl' + +# Version information for libGL. +current=${ver1} +age=${ver2} +revision=${ver3} + +# Is this an already installed library? +installed=yes + +# Files to dlopen/dlpreopen +dlopen='' +dlpreopen='' + +# Directory that this library needs to be installed in: +libdir='/usr/${libdir}' diff --git a/x11-drivers/nvidia-drivers/files/make-use-of-the-new-uapi-framework.patch b/x11-drivers/nvidia-drivers/files/make-use-of-the-new-uapi-framework.patch new file mode 100644 index 00000000..b408b6ae --- /dev/null +++ b/x11-drivers/nvidia-drivers/files/make-use-of-the-new-uapi-framework.patch @@ -0,0 +1,46 @@ +From 1e3d34ce7d8c4912c08386589843fcc4ba4d38bf Mon Sep 17 00:00:00 2001 +From: Alberto Milone <alberto.milone@canonical.com> +Date: Wed, 7 Nov 2012 12:03:46 +0100 +Subject: [PATCH 1/2] Make use of the new uapi framework + +--- + conftest.sh | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/conftest.sh b/conftest.sh +index 388e268..8eff4d7 100755 +--- a/conftest.sh ++++ b/conftest.sh +@@ -20,6 +20,7 @@ ARCH=$3 + ISYSTEM=`$CC -print-file-name=include 2> /dev/null` + SOURCES=$4 + HEADERS=$SOURCES/include ++HEADERSA=$SOURCES/include/uapi + OUTPUT=$5 + XEN_PRESENT=1 + +@@ -118,7 +119,7 @@ build_cflags() { + fi + fi + +- CFLAGS="$CFLAGS $OUTPUT_CFLAGS -I$HEADERS $AUTOCONF_CFLAGS" ++ CFLAGS="$CFLAGS $OUTPUT_CFLAGS -I$HEADERS -I$HEADERSA $AUTOCONF_CFLAGS" + + test_xen + +@@ -146,10 +147,10 @@ build_cflags() { + fi + fi + +- CFLAGS="$BASE_CFLAGS $MACH_CFLAGS $OUTPUT_CFLAGS -I$HEADERS $AUTOCONF_CFLAGS" ++ CFLAGS="$BASE_CFLAGS $MACH_CFLAGS $OUTPUT_CFLAGS -I$HEADERS -I$HEADERSA $AUTOCONF_CFLAGS" + + if [ "$ARCH" = "i386" -o "$ARCH" = "x86_64" ]; then +- CFLAGS="$CFLAGS -I$SOURCES/arch/x86/include -I$OUTPUT/arch/x86/include/generated" ++ CFLAGS="$CFLAGS -I$SOURCES/arch/x86/include -I$SOURCES/arch/x86/include/uapi -I$OUTPUT/arch/x86/include/generated -I$OUTPUT/arch/x86/include/generated/uapi" + elif [ "$ARCH" = "arm" ]; then + CFLAGS="$CFLAGS -I$SOURCES/arch/arm/include -I$OUTPUT/arch/arm/include/generated" + fi +-- +1.7.9.5 + diff --git a/x11-drivers/nvidia-drivers/files/nvidia b/x11-drivers/nvidia-drivers/files/nvidia new file mode 100644 index 00000000..7cf0f7c0 --- /dev/null +++ b/x11-drivers/nvidia-drivers/files/nvidia @@ -0,0 +1,40 @@ +# Nvidia drivers support +alias char-major-195 nvidia +alias /dev/nvidiactl char-major-195 + +# To tweak the driver the following options can be used, note that +# you should be careful, as it could cause instability!! For more +# options see /usr/share/doc/PACKAGE/README +# +# To enable Side Band Adressing: NVreg_EnableAGPSBA=1 +# +# To enable Fast Writes: NVreg_EnableAGPFW=1 +# +# To enable both for instance, uncomment following line: +# +#options nvidia NVreg_EnableAGPSBA=1 NVreg_EnableAGPFW=1 +# If you have a mobile chip, you may need to enable this option +# if you have hard lockups when starting X. +# +# See: Appendix I. Configuring your laptop +# In /usr/share/doc/PACKAGE/README for full details +# +# Choose the appropriate value for NVreg_Mobile from the table: +# Value Meaning +# ---------- -------------------------------------------------- +# 0xFFFFFFFF let the kernel module autodetect the correct value +# 1 Dell laptops +# 2 non-Compal Toshiba laptops +# 3 all other laptops +# 4 Compal Toshiba laptops +# 5 Gateway laptops +# +#options nvidia NVreg_SoftEDIDs=0 NVreg_Mobile=3 + + +# !!! SECURITY WARNING !!! +# DO NOT MODIFY OR REMOVE THE DEVICE FILE RELATED OPTIONS UNLESS YOU KNOW +# WHAT YOU ARE DOING. +# ONLY ADD TRUSTED USERS TO THE VIDEO GROUP, THESE USERS MAY BE ABLE TO CRASH, +# COMPROMISE, OR IRREPARABLY DAMAGE THE MACHINE. +options nvidia NVreg_DeviceFileMode=432 NVreg_DeviceFileUID=0 NVreg_DeviceFileGID=VIDEOGID NVreg_ModifyDeviceFiles=1 diff --git a/x11-drivers/nvidia-drivers/files/nvidia-169.07 b/x11-drivers/nvidia-drivers/files/nvidia-169.07 new file mode 100644 index 00000000..a96b0cd1 --- /dev/null +++ b/x11-drivers/nvidia-drivers/files/nvidia-169.07 @@ -0,0 +1,14 @@ +# Nvidia drivers support +alias char-major-195 nvidia +alias /dev/nvidiactl char-major-195 + +# To tweak the driver the following options can be used, note that +# you should be careful, as it could cause instability!! For more +# options see /usr/share/doc/PACKAGE/README +# +# !!! SECURITY WARNING !!! +# DO NOT MODIFY OR REMOVE THE DEVICE FILE RELATED OPTIONS UNLESS YOU KNOW +# WHAT YOU ARE DOING. +# ONLY ADD TRUSTED USERS TO THE VIDEO GROUP, THESE USERS MAY BE ABLE TO CRASH, +# COMPROMISE, OR IRREPARABLY DAMAGE THE MACHINE. +options nvidia NVreg_DeviceFileMode=432 NVreg_DeviceFileUID=0 NVreg_DeviceFileGID=VIDEOGID NVreg_ModifyDeviceFiles=1 diff --git a/x11-drivers/nvidia-drivers/files/nvidia-drivers-173-3.10.patch b/x11-drivers/nvidia-drivers/files/nvidia-drivers-173-3.10.patch new file mode 100644 index 00000000..9d3016ba --- /dev/null +++ b/x11-drivers/nvidia-drivers/files/nvidia-drivers-173-3.10.patch @@ -0,0 +1,714 @@ +From c3248bb6c976c112e9efa9e8f202590b2f9b40a5 Mon Sep 17 00:00:00 2001 +From: Alberto Milone <alberto.milone@canonical.com> +Date: Tue, 18 Jun 2013 15:16:18 +0200 +Subject: [PATCH 1/1] Add support for Linux 3.10 + +--- + nv-i2c.c | 13 +-- + nv-linux.h | 1 + + nv.c | 375 ++++++++++++++++++++++++++++++++++++++---------------------- + 3 files changed, 241 insertions(+), 148 deletions(-) + +diff --git a/nv-i2c.c b/nv-i2c.c +index 143f9e4..aaee787 100644 +--- a/usr/src/nv/nv-i2c.c ++++ b/usr/src/nv/nv-i2c.c +@@ -307,8 +307,6 @@ void* NV_API_CALL nv_i2c_add_adapter(nv_state_t *nv, U032 port) + BOOL NV_API_CALL nv_i2c_del_adapter(nv_state_t *nv, void *data) + { + struct i2c_adapter *pI2cAdapter = (struct i2c_adapter *)data; +- int osstatus = 0; +- BOOL wasReleased = FALSE; + + #if defined(KERNEL_2_4) + if (!NV_WEAK_SYMBOL_PRESENT(i2c_add_adapter)) +@@ -320,15 +318,10 @@ BOOL NV_API_CALL nv_i2c_del_adapter(nv_state_t *nv, void *data) + if (!pI2cAdapter) return FALSE; + + // attempt release with the OS +- osstatus = i2c_del_adapter(pI2cAdapter); +- +- if (!osstatus) +- { +- os_free_mem(pI2cAdapter); +- wasReleased = TRUE; +- } ++ i2c_del_adapter(pI2cAdapter); ++ os_free_mem(pI2cAdapter); + +- return wasReleased; ++ return TRUE; + } + + #else // (defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)) +diff --git a/nv-linux.h b/nv-linux.h +index 963e059..9aac81a 100644 +--- a/usr/src/nv/nv-linux.h ++++ b/usr/src/nv/nv-linux.h +@@ -163,6 +163,7 @@ + + #ifdef CONFIG_PROC_FS + #include <linux/proc_fs.h> ++#include <linux/seq_file.h> + #endif + + #ifdef CONFIG_MTRR +diff --git a/nv.c b/nv.c +index f82e46f..570c266 100644 +--- a/usr/src/nv/nv.c ++++ b/usr/src/nv/nv.c +@@ -291,7 +291,6 @@ void NV_API_CALL nv_verify_pci_config(nv_state_t *nv, BOOL check_the_bars) + + /* nvos_ functions.. do not take a state device parameter */ + static void nvos_proc_create(void); +-static void nvos_proc_remove_all(struct proc_dir_entry *); + static void nvos_proc_remove(void); + static int nvos_count_devices(nv_stack_t *); + +@@ -333,12 +332,34 @@ void nv_kern_rc_timer(unsigned long); + static int nv_kern_apm_event(struct pm_dev *, pm_request_t, void *); + #endif + +-static int nv_kern_read_cardinfo(char *, char **, off_t off, int, int *, void *); +-static int nv_kern_read_status(char *, char **, off_t off, int, int *, void *); +-static int nv_kern_read_registry(char *, char **, off_t off, int, int *, void *); +-static int nv_kern_read_agpinfo(char *, char **, off_t off, int, int *, void *); +-static int nv_kern_read_version(char *, char **, off_t off, int, int *, void *); +-static int nv_kern_read_text_file(char *, char **, off_t off, int, int *, void *); ++static const struct file_operations nv_procfs_text_fops; ++static const struct file_operations nv_procfs_read_card_info_fops; ++static const struct file_operations nv_procfs_version_fops; ++static const struct file_operations nv_procfs_read_agp_info_fops; ++static const struct file_operations nv_procfs_read_agp_info_gpu_fops; ++static const struct file_operations nv_procfs_read_agp_status_fops; ++static const struct file_operations nv_procfs_registry_fops; ++ ++static int nv_procfs_show_text_file(struct seq_file *, void *); ++static int nv_procfs_open_text_file(struct inode *, struct file *); ++static void nvos_proc_add_text_file(struct proc_dir_entry *, const char *, const char *); ++ ++static int nv_procfs_show_card_info(struct seq_file *, void *); ++static int nv_procfs_read_card_info(struct inode *, struct file *); ++ ++static int nv_procfs_show_version(struct seq_file *, void *); ++static int nv_procfs_open_version(struct inode *, struct file *); ++ ++static int nv_procfs_show_agp_info(struct seq_file *, void *); ++static int nv_procfs_read_agp_info(struct inode *, struct file *); ++ ++static int nv_procfs_read_agp_info_gpu(struct inode *, struct file *file); ++static int nv_procfs_show_agp_status(struct seq_file *, void *); ++static int nv_procfs_read_agp_status(struct inode *, struct file *); ++ ++static int nv_procfs_show_registry(struct seq_file *, void *); ++static int nv_procfs_open_registry(struct inode *, struct file *); ++ + + int nv_kern_ctl_open(struct inode *, struct file *); + int nv_kern_ctl_close(struct inode *, struct file *); +@@ -604,6 +625,12 @@ static struct pci_dev* nv_get_pci_device(nv_state_t *nv) + return NULL; + } + ++#if LINUX_VERSION_CODE <= KERNEL_VERSION(3,9,255) ++static inline void *PDE_DATA(const struct inode *inode) { ++ return PDE(inode)->data; ++} ++#endif ++ + static void nvos_proc_create(void) + { + #ifdef CONFIG_PROC_FS +@@ -623,19 +650,19 @@ static void nvos_proc_create(void) + nv_state_t *nv; + nv_linux_state_t *nvl; + +- proc_nvidia = create_proc_entry("driver/nvidia", d_flags, NULL); ++ proc_nvidia = proc_mkdir_mode("driver/nvidia", d_flags, NULL); + if (!proc_nvidia) + goto failed; + +- proc_nvidia_cards = create_proc_entry("cards", d_flags, proc_nvidia); ++ proc_nvidia_cards = proc_mkdir_mode("cards", d_flags, proc_nvidia); + if (!proc_nvidia_cards) + goto failed; + +- proc_nvidia_warnings = create_proc_entry("warnings", d_flags, proc_nvidia); ++ proc_nvidia_warnings = proc_mkdir_mode("warnings", d_flags, proc_nvidia); + if (!proc_nvidia_warnings) + goto failed; + +- proc_nvidia_patches = create_proc_entry("patches", d_flags, proc_nvidia); ++ proc_nvidia_patches = proc_mkdir_mode("patches", d_flags, proc_nvidia); + if (!proc_nvidia_patches) + goto failed; + +@@ -660,24 +687,19 @@ static void nvos_proc_create(void) + break; + + sprintf(name, "%d", i++); +- entry = create_proc_entry(name, flags, proc_nvidia_cards); ++ entry = proc_create_data(name, flags, proc_nvidia_cards, ++ &nv_procfs_read_card_info_fops, nv); + if (!entry) { + NV_PCI_DEV_PUT(dev); + goto failed; + } + +- entry->data = nv; +- entry->read_proc = nv_kern_read_cardinfo; +-#if defined(NV_PROC_DIR_ENTRY_HAS_OWNER) +- entry->owner = THIS_MODULE; +-#endif +- + if (nvos_find_agp_capability(dev)) { + /* + * Create the /proc/driver/nvidia/agp/{status,host-bridge,card} + * entries now that we know there's AGP hardware. + */ +- entry = create_proc_entry("agp", d_flags, proc_nvidia); ++ entry = proc_mkdir_mode("agp", d_flags, proc_nvidia); + if (!entry) { + NV_PCI_DEV_PUT(dev); + goto failed; +@@ -688,72 +710,78 @@ static void nvos_proc_create(void) + #endif + proc_nvidia_agp = entry; + +- entry = create_proc_entry("status", flags, proc_nvidia_agp); ++ entry = proc_create_data("status", flags, proc_nvidia_agp, ++ &nv_procfs_read_agp_status_fops, nv); + if (!entry) { + NV_PCI_DEV_PUT(dev); + goto failed; + } + +- entry->data = nv; +- entry->read_proc = nv_kern_read_status; +-#if defined(NV_PROC_DIR_ENTRY_HAS_OWNER) +- entry->owner = THIS_MODULE; +-#endif ++ entry = proc_create("host-bridge", flags, proc_nvidia_agp, ++ &nv_procfs_read_agp_info_fops); + +- entry = create_proc_entry("host-bridge", flags, proc_nvidia_agp); + if (!entry) { + NV_PCI_DEV_PUT(dev); + goto failed; + } + +- entry->data = NULL; +- entry->read_proc = nv_kern_read_agpinfo; +-#if defined(NV_PROC_DIR_ENTRY_HAS_OWNER) +- entry->owner = THIS_MODULE; +-#endif +- +- entry = create_proc_entry("card", flags, proc_nvidia_agp); ++ entry = proc_create_data("card", flags, proc_nvidia_agp, ++ &nv_procfs_read_agp_info_gpu_fops, nv); + if (!entry) { + NV_PCI_DEV_PUT(dev); + goto failed; + } + +- entry->data = nv; +- entry->read_proc = nv_kern_read_agpinfo; +-#if defined(NV_PROC_DIR_ENTRY_HAS_OWNER) +- entry->owner = THIS_MODULE; +-#endif + } + + NV_PCI_DEV_PUT(dev); + } + +- entry = create_proc_entry("version", flags, proc_nvidia); ++ entry = proc_create("version", flags, proc_nvidia, &nv_procfs_version_fops); + if (!entry) + goto failed; + +- entry->read_proc = nv_kern_read_version; +-#if defined(NV_PROC_DIR_ENTRY_HAS_OWNER) +- entry->owner = THIS_MODULE; +-#endif +- +- entry = create_proc_entry("registry", flags, proc_nvidia); ++ entry = proc_create("registry", flags, proc_nvidia, ++ &nv_procfs_registry_fops); + if (!entry) + goto failed; + +- entry->read_proc = nv_kern_read_registry; +-#if defined(NV_PROC_DIR_ENTRY_HAS_OWNER) +- entry->owner = THIS_MODULE; +-#endif +- + return; + + failed: + nv_printf(NV_DBG_ERRORS, "NVRM: failed to create /proc entries!\n"); +- nvos_proc_remove_all(proc_nvidia); ++ remove_proc_subtree("nvidia", proc_nvidia); + #endif + } + ++static int ++nv_procfs_show_text_file( ++ struct seq_file *m, ++ void *v ++) ++{ ++ seq_printf(m, "%s", (char *)m->private); ++ ++ return 0; ++} ++ ++static int ++nv_procfs_open_text_file( ++ struct inode *inode, ++ struct file *file ++) ++{ ++ return single_open(file, nv_procfs_show_text_file, PDE_DATA(inode)); ++} ++ ++static const struct file_operations nv_procfs_text_fops = { ++ .owner = THIS_MODULE, ++ .open = nv_procfs_open_text_file, ++ .read = seq_read, ++ .llseek = seq_lseek, ++ .release = single_release, ++}; ++ + static void + nvos_proc_add_text_file( + struct proc_dir_entry *parent, +@@ -762,41 +790,18 @@ nvos_proc_add_text_file( + ) + { + #ifdef CONFIG_PROC_FS +- struct proc_dir_entry *entry; +- + /* world readable file */ + int flags = S_IFREG | S_IRUGO; + +- entry = create_proc_entry(filename, flags, parent); +- if (!entry) return; +- +- entry->data = (void *)text; +- entry->read_proc = nv_kern_read_text_file; +-#if defined(NV_PROC_DIR_ENTRY_HAS_OWNER) +- entry->owner = THIS_MODULE; +-#endif ++ proc_create_data(filename, flags, parent, &nv_procfs_text_fops, ++ (void *)text); + #endif + } + +-#ifdef CONFIG_PROC_FS +-static void nvos_proc_remove_all(struct proc_dir_entry *entry) +-{ +- while (entry) { +- struct proc_dir_entry *next = entry->next; +- if (entry->subdir) +- nvos_proc_remove_all(entry->subdir); +- remove_proc_entry(entry->name, entry->parent); +- if (entry == proc_nvidia) +- break; +- entry = next; +- } +-} +-#endif +- + static void nvos_proc_remove(void) + { + #ifdef CONFIG_PROC_FS +- nvos_proc_remove_all(proc_nvidia); ++ remove_proc_subtree("nvidia", proc_nvidia); + #endif + } + +@@ -3065,18 +3070,19 @@ void NV_API_CALL nv_set_dma_address_size( + } + + static int +-nv_kern_read_cardinfo(char *page, char **start, off_t off, +- int count, int *eof, void *data) ++nv_procfs_show_card_info( ++ struct seq_file *m, ++ void *v ++) + { + struct pci_dev *dev; + char *type, *fmt, tmpstr[NV_DEVICE_NAME_LENGTH]; +- int len = 0, status; ++ int status; + U032 vbios_rev1, vbios_rev2, vbios_rev3, vbios_rev4, vbios_rev5; + nv_stack_t *sp = NULL; + + nv_state_t *nv; +- nv = (nv_state_t *) data; +- *eof = 1; ++ nv = (nv_state_t *) m->private; + + dev = nv_get_pci_device(nv); + if (!dev) +@@ -3094,38 +3100,38 @@ nv_kern_read_cardinfo(char *page, char **start, off_t off, + strcpy (tmpstr, "Unknown"); + } + +- len += sprintf(page+len, "Model: \t\t %s\n", tmpstr); +- len += sprintf(page+len, "IRQ: \t\t %d\n", nv->interrupt_line); ++ seq_printf(m, "Model: \t\t %s\n", tmpstr); ++ seq_printf(m, "IRQ: \t\t %d\n", nv->interrupt_line); + + status = rm_get_vbios_version(sp, nv, &vbios_rev1, &vbios_rev2, + &vbios_rev3, &vbios_rev4, &vbios_rev5); + + if (status < 0) { + /* before rm_init_adapter */ +- len += sprintf(page+len, "Video BIOS: \t ??.??.??.??.??\n"); ++ seq_printf(m, "Video BIOS: \t ??.??.??.??.??\n"); + } else { + fmt = "Video BIOS: \t %02x.%02x.%02x.%02x.%02x\n"; +- len += sprintf(page+len, fmt, vbios_rev1, vbios_rev2, vbios_rev3, ++ seq_printf(m, fmt, vbios_rev1, vbios_rev2, vbios_rev3, + vbios_rev4, vbios_rev5); + } + + if (nvos_find_agp_capability(dev)) type = "AGP"; + else if (nvos_find_pci_express_capability(dev)) type = "PCI-E"; + else type = "PCI"; +- len += sprintf(page+len, "Card Type: \t %s\n", type); ++ seq_printf(m, "Card Type: \t %s\n", type); + + // Report the number of bits set in dev->dma_mask +- len += sprintf(page+len, "DMA Size: \t %d bits\n", ++ seq_printf(m, "DMA Size: \t %d bits\n", + nv_count_bits(dev->dma_mask)); +- len += sprintf(page+len, "DMA Mask: \t 0x%llx\n", dev->dma_mask); +- len += sprintf(page+len, "Bus Location: \t %02x.%02x.%x\n", ++ seq_printf(m, "DMA Mask: \t 0x%llx\n", dev->dma_mask); ++ seq_printf(m, "Bus Location: \t %02x.%02x.%x\n", + nv->bus, nv->slot, PCI_FUNC(dev->devfn)); + #ifdef DEBUG + do + { + int j; + for (j = 0; j < NV_GPU_NUM_BARS; j++) +- len += sprintf(page+len, "BAR%i: \t\t 0x%08x (%iMB)\n", ++ seq_printf(m, "BAR%i: \t\t 0x%08x (%iMB)\n", + j, nv->bars[j].address, nv->bars[j].size >> 20); + } while(0); + #endif +@@ -3133,35 +3139,68 @@ nv_kern_read_cardinfo(char *page, char **start, off_t off, + NV_KMEM_CACHE_FREE_STACK(sp); + + NV_PCI_DEV_PUT(dev); +- return len; ++ return 0; ++} ++ ++static int ++nv_procfs_read_card_info( ++ struct inode *inode, ++ struct file *file ++) ++{ ++ return single_open(file, nv_procfs_show_card_info, PDE_DATA(inode)); + } + ++static const struct file_operations nv_procfs_read_card_info_fops = { ++ .owner = THIS_MODULE, ++ .open = nv_procfs_read_card_info, ++ .read = seq_read, ++ .llseek = seq_lseek, ++ .release = single_release, ++}; ++ + static int +-nv_kern_read_version(char *page, char **start, off_t off, +- int count, int *eof, void *data) ++nv_procfs_show_version( ++ struct seq_file *m, ++ void *v ++) + { +- int len = 0; +- *eof = 1; +- +- len += sprintf(page+len, "NVRM version: %s\n", pNVRM_ID); +- len += sprintf(page+len, "GCC version: %s\n", NV_COMPILER); +- +- return len; ++ seq_printf(m, "NVRM version: %s\n", pNVRM_ID); ++ seq_printf(m, "GCC version: %s\n", NV_COMPILER); ++ ++ return 0; ++} ++ ++static int ++nv_procfs_open_version( ++ struct inode *inode, ++ struct file *file ++) ++{ ++ return single_open(file, nv_procfs_show_version, NULL); + } + ++static const struct file_operations nv_procfs_version_fops = { ++ .owner = THIS_MODULE, ++ .open = nv_procfs_open_version, ++ .read = seq_read, ++ .llseek = seq_lseek, ++ .release = single_release, ++}; ++ + static int +-nv_kern_read_agpinfo(char *page, char **start, off_t off, +- int count, int *eof, void *data) ++nv_procfs_show_agp_info( ++ struct seq_file *m, ++ void *v ++) + { + struct pci_dev *dev; + char *fw, *sba; + u8 cap_ptr; + u32 status, command, agp_rate; +- int len = 0; + + nv_state_t *nv; +- nv = (nv_state_t *) data; +- *eof = 1; ++ nv = (nv_state_t *) m->private; + + if (nv) { + dev = nv_get_pci_device(nv); +@@ -3172,12 +3211,12 @@ nv_kern_read_agpinfo(char *page, char **start, off_t off, + if (!dev) + return 0; + +- len += sprintf(page+len, "Host Bridge: \t "); ++ seq_printf(m, "Host Bridge: \t "); + + #if defined(CONFIG_PCI_NAMES) +- len += sprintf(page+len, "%s\n", NV_PCI_DEVICE_NAME(dev)); ++ seq_printf(m, "%s\n", NV_PCI_DEVICE_NAME(dev)); + #else +- len += sprintf(page+len, "PCI device %04x:%04x\n", ++ seq_printf(m, "PCI device %04x:%04x\n", + dev->vendor, dev->device); + #endif + } +@@ -3191,40 +3230,74 @@ nv_kern_read_agpinfo(char *page, char **start, off_t off, + fw = (status & 0x00000010) ? "Supported" : "Not Supported"; + sba = (status & 0x00000200) ? "Supported" : "Not Supported"; + +- len += sprintf(page+len, "Fast Writes: \t %s\n", fw); +- len += sprintf(page+len, "SBA: \t\t %s\n", sba); ++ seq_printf(m, "Fast Writes: \t %s\n", fw); ++ seq_printf(m, "SBA: \t\t %s\n", sba); + + agp_rate = status & 0x7; + if (status & 0x8) // agp 3.0 + agp_rate <<= 2; + +- len += sprintf(page+len, "AGP Rates: \t %s%s%s%s\n", ++ seq_printf(m, "AGP Rates: \t %s%s%s%s\n", + (agp_rate & 0x00000008) ? "8x " : "", + (agp_rate & 0x00000004) ? "4x " : "", + (agp_rate & 0x00000002) ? "2x " : "", + (agp_rate & 0x00000001) ? "1x " : ""); + +- len += sprintf(page+len, "Registers: \t 0x%08x:0x%08x\n", status, command); ++ seq_printf(m, "Registers: \t 0x%08x:0x%08x\n", status, command); + + NV_PCI_DEV_PUT(dev); +- return len; ++ return 0; ++} ++ ++static int ++nv_procfs_read_agp_info( ++ struct inode *inode, ++ struct file *file ++) ++{ ++ return single_open(file, nv_procfs_show_agp_info, NULL); + } + ++static const struct file_operations nv_procfs_read_agp_info_fops = { ++ .owner = THIS_MODULE, ++ .open = nv_procfs_read_agp_info, ++ .read = seq_read, ++ .llseek = seq_lseek, ++ .release = single_release, ++}; ++ + static int +-nv_kern_read_status(char *page, char **start, off_t off, +- int count, int *eof, void *data) ++nv_procfs_read_agp_info_gpu( ++ struct inode *inode, ++ struct file *file ++) ++{ ++ return single_open(file, nv_procfs_show_agp_info, PDE_DATA(inode)); ++} ++ ++static const struct file_operations nv_procfs_read_agp_info_gpu_fops = { ++ .owner = THIS_MODULE, ++ .open = nv_procfs_read_agp_info_gpu, ++ .read = seq_read, ++ .llseek = seq_lseek, ++ .release = single_release, ++}; ++ ++static int ++nv_procfs_show_agp_status( ++ struct seq_file *m, ++ void *v ++) + { + struct pci_dev *dev; + char *fw, *sba, *drv; +- int len = 0; + u8 cap_ptr; + u32 scratch; + u32 status, command, agp_rate; + nv_stack_t *sp = NULL; + + nv_state_t *nv; +- nv = (nv_state_t *) data; +- *eof = 1; ++ nv = (nv_state_t *) m->private; + + dev = nvos_get_agp_device_by_class(PCI_CLASS_BRIDGE_HOST); + if (!dev) +@@ -3246,10 +3319,10 @@ nv_kern_read_status(char *page, char **start, off_t off, + command &= scratch; + + if (NV_AGP_ENABLED(nv) && (command & 0x100)) { +- len += sprintf(page+len, "Status: \t Enabled\n"); ++ seq_printf(m, "Status: \t Enabled\n"); + + drv = NV_OSAGP_ENABLED(nv) ? "AGPGART" : "NVIDIA"; +- len += sprintf(page+len, "Driver: \t %s\n", drv); ++ seq_printf(m, "Driver: \t %s\n", drv); + + // mask off agp rate. + // If this is agp 3.0, we need to shift the value +@@ -3257,13 +3330,13 @@ nv_kern_read_status(char *page, char **start, off_t off, + if (status & 0x8) // agp 3.0 + agp_rate <<= 2; + +- len += sprintf(page+len, "AGP Rate: \t %dx\n", agp_rate); ++ seq_printf(m, "AGP Rate: \t %dx\n", agp_rate); + + fw = (command & 0x00000010) ? "Enabled" : "Disabled"; +- len += sprintf(page+len, "Fast Writes: \t %s\n", fw); ++ seq_printf(m, "Fast Writes: \t %s\n", fw); + + sba = (command & 0x00000200) ? "Enabled" : "Disabled"; +- len += sprintf(page+len, "SBA: \t\t %s\n", sba); ++ seq_printf(m, "SBA: \t\t %s\n", sba); + } else { + int agp_config = 0; + +@@ -3274,7 +3347,7 @@ nv_kern_read_status(char *page, char **start, off_t off, + return 0; + } + +- len += sprintf(page+len, "Status: \t Disabled\n\n"); ++ seq_printf(m, "Status: \t Disabled\n\n"); + + /* + * If we find AGP is disabled, but the RM registry indicates it +@@ -3288,7 +3361,7 @@ nv_kern_read_status(char *page, char **start, off_t off, + rm_read_registry_dword(sp, nv, "NVreg", "XNvAGP", &agp_config); + + if (agp_config != NVOS_AGP_CONFIG_DISABLE_AGP && NV_AGP_FAILED(nv)) { +- len += sprintf(page+len, ++ seq_printf(m, + "AGP initialization failed, please check the ouput \n" + "of the 'dmesg' command and/or your system log file \n" + "for additional information on this problem. \n"); +@@ -3298,37 +3371,63 @@ nv_kern_read_status(char *page, char **start, off_t off, + } + + NV_PCI_DEV_PUT(dev); +- return len; ++ return 0; ++} ++ ++static int ++nv_procfs_read_agp_status( ++ struct inode *inode, ++ struct file *file ++) ++{ ++ return single_open(file, nv_procfs_show_agp_status, PDE_DATA(inode)); + } + ++static const struct file_operations nv_procfs_read_agp_status_fops = { ++ .owner = THIS_MODULE, ++ .open = nv_procfs_read_agp_status, ++ .read = seq_read, ++ .llseek = seq_lseek, ++ .release = single_release, ++}; ++ + extern nv_parm_t nv_parms[]; + extern char *NVreg_RegistryDwords; + + static int +-nv_kern_read_registry(char *page, char **start, off_t off, +- int count, int *eof, void *data) ++nv_procfs_show_registry( ++ struct seq_file *m, ++ void *v ++) + { +- unsigned int i, len = 0; ++ unsigned int i; + nv_parm_t *entry; +- *eof = 1; + + for (i = 0; (entry = &nv_parms[i])->name != NULL; i++) +- len += sprintf(page+len, "%s: %u\n", entry->name, *entry->data); ++ seq_printf(m, "%s: %u\n", entry->name, *entry->data); + +- len += sprintf(page+len, "RegistryDwords: \"%s\"\n", ++ seq_printf(m, "RegistryDwords: \"%s\"\n", + (NVreg_RegistryDwords != NULL) ? NVreg_RegistryDwords : ""); + +- return len; ++ return 0; + } + + static int +-nv_kern_read_text_file(char *page, char **start, off_t off, +- int count, int *eof, void *data) ++nv_procfs_open_registry( ++ struct inode *inode, ++ struct file *file ++) + { +- *eof = 1; +- return sprintf(page, "%s", (char *)data); ++ return single_open(file, nv_procfs_show_registry, NULL); + } + ++static const struct file_operations nv_procfs_registry_fops = { ++ .open = nv_procfs_open_registry, ++ .read = seq_read, ++ .llseek = seq_lseek, ++ .release = single_release, ++}; ++ + /*** + *** EXPORTS to rest of resman + ***/ +-- +1.7.9.5 + diff --git a/x11-drivers/nvidia-drivers/files/nvidia-drivers-260.19.44-2.6.39.patch b/x11-drivers/nvidia-drivers/files/nvidia-drivers-260.19.44-2.6.39.patch new file mode 100644 index 00000000..32efbf12 --- /dev/null +++ b/x11-drivers/nvidia-drivers/files/nvidia-drivers-260.19.44-2.6.39.patch @@ -0,0 +1,10 @@ +--- kernel.orig/nv-linux.h ++++ kernel/nv-linux.h +@@ -87,7 +87,6 @@ + #if !defined(KERNEL_2_4) + #include <linux/sched.h> /* suser(), capable() replacement */ + #include <linux/moduleparam.h> /* module_param() */ +-#include <linux/smp_lock.h> /* kernel_locked */ + #include <asm/tlbflush.h> /* flush_tlb(), flush_tlb_all() */ + #include <asm/kmap_types.h> /* page table entry lookup */ + #endif diff --git a/x11-drivers/nvidia-drivers/files/nvidia-drivers-290.10-3.2.8+.patch b/x11-drivers/nvidia-drivers/files/nvidia-drivers-290.10-3.2.8+.patch new file mode 100644 index 00000000..4834f7b8 --- /dev/null +++ b/x11-drivers/nvidia-drivers/files/nvidia-drivers-290.10-3.2.8+.patch @@ -0,0 +1,11 @@ +--- a/kernel/conftest.sh ++++ b/kernel/conftest.sh +@@ -122,7 +122,7 @@ build_cflags() { + CFLAGS="$BASE_CFLAGS $MACH_CFLAGS $OUTPUT_CFLAGS -I$HEADERS $AUTOCONF_CFLAGS" + + if [ "$ARCH" = "i386" -o "$ARCH" = "x86_64" -o "$ARCH" = "x86" ]; then +- CFLAGS="$CFLAGS -I$SOURCES/arch/x86/include" ++ CFLAGS="$CFLAGS -I$SOURCES/arch/x86/include -I$SOURCES/arch/x86/include/generated" + fi + if [ -n "$BUILD_PARAMS" ]; then + CFLAGS="$CFLAGS -D$BUILD_PARAMS" diff --git a/x11-drivers/nvidia-drivers/files/nvidia-drivers-304-3.10.patch b/x11-drivers/nvidia-drivers/files/nvidia-drivers-304-3.10.patch new file mode 100644 index 00000000..514e671e --- /dev/null +++ b/x11-drivers/nvidia-drivers/files/nvidia-drivers-304-3.10.patch @@ -0,0 +1,626 @@ +diff -Nurp work.orig/kernel/nv-i2c.c work/kernel/nv-i2c.c +--- work.orig/kernel/nv-i2c.c 2013-07-04 13:19:12.255911539 +0000 ++++ work/kernel/nv-i2c.c 2013-07-04 13:08:08.479793566 +0000 +@@ -311,8 +311,6 @@ void* NV_API_CALL nv_i2c_add_adapter(nv_ + BOOL NV_API_CALL nv_i2c_del_adapter(nv_state_t *nv, void *data) + { + struct i2c_adapter *pI2cAdapter = (struct i2c_adapter *)data; +- int osstatus = 0; +- BOOL wasReleased = FALSE; + + #if defined(KERNEL_2_4) + if (!NV_WEAK_SYMBOL_PRESENT(i2c_add_adapter)) +@@ -324,15 +322,10 @@ BOOL NV_API_CALL nv_i2c_del_adapter(nv_s + if (!pI2cAdapter) return FALSE; + + // attempt release with the OS +- osstatus = i2c_del_adapter(pI2cAdapter); ++ i2c_del_adapter(pI2cAdapter); ++ os_free_mem(pI2cAdapter); + +- if (!osstatus) +- { +- os_free_mem(pI2cAdapter); +- wasReleased = TRUE; +- } +- +- return wasReleased; ++ return TRUE; + } + + #else // (defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)) +diff -Nurp work.orig/kernel/nv-procfs.c work/kernel/nv-procfs.c +--- work.orig/kernel/nv-procfs.c 2013-07-04 13:19:12.259244771 +0000 ++++ work/kernel/nv-procfs.c 2013-07-04 13:17:31.246205962 +0000 +@@ -60,60 +60,41 @@ static char nv_registry_keys[NV_MAX_REGI + __entry; \ + }) + +-#define NV_CREATE_PROC_FILE(name,parent,__read_proc, \ +- __write_proc,__fops,__data) \ +- ({ \ +- struct proc_dir_entry *__entry; \ +- int __mode = (S_IFREG | S_IRUGO); \ +- if ((NvUPtr)(__write_proc) != 0) \ +- __mode |= S_IWUSR; \ +- __entry = NV_CREATE_PROC_ENTRY(name, __mode, parent); \ +- if (__entry != NULL) \ +- { \ +- if ((NvUPtr)(__read_proc) != 0) \ +- __entry->read_proc = (__read_proc); \ +- if ((NvUPtr)(__write_proc) != 0) \ +- { \ +- __entry->write_proc = (__write_proc); \ +- __entry->proc_fops = (__fops); \ +- } \ +- __entry->data = (__data); \ +- } \ +- __entry; \ +- }) ++#define NV_PROC_RW (S_IFREG|S_IRUGO|S_IWUSR) ++#define NV_PROC_RO (S_IFREG|S_IRUGO) + + #define NV_CREATE_PROC_DIR(name,parent) \ + ({ \ + struct proc_dir_entry *__entry; \ + int __mode = (S_IFDIR | S_IRUGO | S_IXUGO); \ +- __entry = NV_CREATE_PROC_ENTRY(name, __mode, parent); \ ++ __entry = proc_mkdir_mode(name, __mode, parent); \ + __entry; \ + }) + ++//#if LINUX_VERSION_CODE <= KERNEL_VERSION(3,9,255) ++//static inline void *PDE_DATA(const struct inode *inode) { ++// return PDE(inode)->data; ++//} ++//#endif ++ + #define NV_PROC_WRITE_BUFFER_SIZE (64 * RM_PAGE_SIZE) + + static int +-nv_procfs_read_gpu_info( +- char *page, +- char **start, +- off_t off, +- int count, +- int *eof, +- void *data ++nv_procfs_show_gpu_info( ++ struct seq_file *m, ++ void *v + ) + { +- nv_state_t *nv = data; ++ nv_state_t *nv = m->private; + nv_linux_state_t *nvl = NV_GET_NVL_FROM_NV_STATE(nv); + struct pci_dev *dev = nvl->dev; + char *type, *fmt, tmpstr[NV_DEVICE_NAME_LENGTH]; +- int len = 0, status; ++ int status; + NvU8 *uuid; + NvU32 vbios_rev1, vbios_rev2, vbios_rev3, vbios_rev4, vbios_rev5; + NvU32 fpga_rev1, fpga_rev2, fpga_rev3; + nv_stack_t *sp = NULL; + +- *eof = 1; +- + NV_KMEM_CACHE_ALLOC_STACK(sp); + if (sp == NULL) + { +@@ -134,31 +115,31 @@ nv_procfs_read_gpu_info( + if (rm_get_device_name(sp, nv, dev->device, dev->subsystem_vendor, + dev->subsystem_device, NV_DEVICE_NAME_LENGTH, + tmpstr) != RM_OK) +- { ++ { + strcpy (tmpstr, "Unknown"); + } + } + +- len += sprintf(page+len, "Model: \t\t %s\n", tmpstr); +- len += sprintf(page+len, "IRQ: \t\t %d\n", nv->interrupt_line); ++ seq_printf(m, "Model: \t\t %s\n", tmpstr); ++ seq_printf(m, "IRQ: \t\t %d\n", nv->interrupt_line); + + if (NV_IS_GVI_DEVICE(nv)) + { + status = rm_gvi_get_firmware_version(sp, nv, &fpga_rev1, &fpga_rev2, + &fpga_rev3); + if (status != RM_OK) +- len += sprintf(page+len, "Firmware: \t ????.??.??\n"); ++ seq_printf(m, "Firmware: \t ????.??.??\n"); + else + { + fmt = "Firmware: \t %x.%x.%x\n"; +- len += sprintf(page+len, fmt, fpga_rev1, fpga_rev2, fpga_rev3); ++ seq_printf(m, fmt, fpga_rev1, fpga_rev2, fpga_rev3); + } + } + else + { + if (rm_get_gpu_uuid(sp, nv, &uuid, NULL) == RM_OK) + { +- len += sprintf(page+len, "GPU UUID: \t %s\n", (char *)uuid); ++ seq_printf(m, "GPU UUID: \t %s\n", (char *)uuid); + os_free_mem(uuid); + } + +@@ -166,12 +147,12 @@ nv_procfs_read_gpu_info( + &vbios_rev3, &vbios_rev4, + &vbios_rev5) != RM_OK) + { +- len += sprintf(page+len, "Video BIOS: \t ??.??.??.??.??\n"); ++ seq_printf(m, "Video BIOS: \t ??.??.??.??.??\n"); + } + else + { + fmt = "Video BIOS: \t %02x.%02x.%02x.%02x.%02x\n"; +- len += sprintf(page+len, fmt, vbios_rev1, vbios_rev2, vbios_rev3, ++ seq_printf(m, fmt, vbios_rev1, vbios_rev2, vbios_rev3, + vbios_rev4, vbios_rev5); + } + } +@@ -182,12 +163,12 @@ nv_procfs_read_gpu_info( + type = "PCI-E"; + else + type = "PCI"; +- len += sprintf(page+len, "Bus Type: \t %s\n", type); ++ seq_printf(m, "Bus Type: \t %s\n", type); + +- len += sprintf(page+len, "DMA Size: \t %d bits\n", ++ seq_printf(m, "DMA Size: \t %d bits\n", + nv_count_bits(dev->dma_mask)); +- len += sprintf(page+len, "DMA Mask: \t 0x%llx\n", dev->dma_mask); +- len += sprintf(page+len, "Bus Location: \t %04x:%02x.%02x.%x\n", ++ seq_printf(m, "DMA Mask: \t 0x%llx\n", dev->dma_mask); ++ seq_printf(m, "Bus Location: \t %04x:%02x.%02x.%x\n", + nv->domain, nv->bus, nv->slot, PCI_FUNC(dev->devfn)); + #if defined(DEBUG) + do +@@ -195,7 +176,7 @@ nv_procfs_read_gpu_info( + int j; + for (j = 0; j < NV_GPU_NUM_BARS; j++) + { +- len += sprintf(page+len, "BAR%u: \t\t 0x%llx (%lluMB)\n", ++ seq_printf(m, "BAR%u: \t\t 0x%llx (%lluMB)\n", + j, nv->bars[j].address, (nv->bars[j].size >> 20)); + } + } while (0); +@@ -203,26 +184,120 @@ nv_procfs_read_gpu_info( + + NV_KMEM_CACHE_FREE_STACK(sp); + +- return len; ++ return 0; + } + + static int +-nv_procfs_read_version( +- char *page, +- char **start, +- off_t off, +- int count, +- int *eof, +- void *data ++nv_procfs_open_gpu_info( ++ struct inode *inode, ++ struct file *file + ) + { +- int len = 0; +- *eof = 1; ++ return single_open(file, nv_procfs_show_gpu_info, PDE_DATA(inode)); ++} + +- len += sprintf(page+len, "NVRM version: %s\n", pNVRM_ID); +- len += sprintf(page+len, "GCC version: %s\n", NV_COMPILER); ++static const struct file_operations nv_procfs_gpu_info_fops = { ++ .owner = THIS_MODULE, ++ .open = nv_procfs_open_gpu_info, ++ .read = seq_read, ++ .llseek = seq_lseek, ++ .release = single_release, ++}; + +- return len; ++static int ++nv_procfs_show_version( ++ struct seq_file *m, ++ void *v ++) ++{ ++ seq_printf(m, "NVRM version: %s\n", pNVRM_ID); ++ seq_printf(m, "GCC version: %s\n", NV_COMPILER); ++ ++ return 0; ++} ++ ++static int ++nv_procfs_open_version( ++ struct inode *inode, ++ struct file *file ++) ++{ ++ return single_open(file, nv_procfs_show_version, NULL); ++} ++ ++static const struct file_operations nv_procfs_version_fops = { ++ .owner = THIS_MODULE, ++ .open = nv_procfs_open_version, ++ .read = seq_read, ++ .llseek = seq_lseek, ++ .release = single_release, ++}; ++ ++static int ++nv_procfs_show_registry( ++ struct seq_file *m, ++ void *v ++) ++{ ++ nv_state_t *nv = m->private; ++ nv_linux_state_t *nvl = NULL; ++ char *registry_keys; ++ ++ if (nv != NULL) ++ nvl = NV_GET_NVL_FROM_NV_STATE(nv); ++ registry_keys = ((nvl != NULL) ? ++ nvl->registry_keys : nv_registry_keys); ++ ++ seq_printf(m, "Binary: \"%s\"\n", registry_keys); ++ ++ return 0; ++} ++ ++static ssize_t ++nv_procfs_write_registry( ++ struct file *file, ++ const char __user *buffer, ++ size_t count, ++ loff_t *pos ++) ++{ ++ int status = 0; ++ nv_file_private_t *nvfp = NV_GET_FILE_PRIVATE(file); ++ char *proc_buffer; ++ unsigned long bytes_left; ++ ++ down(&nvfp->fops_sp_lock[NV_FOPS_STACK_INDEX_PROCFS]); ++ ++ bytes_left = (NV_PROC_WRITE_BUFFER_SIZE - nvfp->off - 1); ++ ++ if (count == 0) ++ { ++ status = -EINVAL; ++ goto done; ++ } ++ else if ((bytes_left == 0) || (count > bytes_left)) ++ { ++ status = -ENOSPC; ++ goto done; ++ } ++ ++ proc_buffer = &((char *)nvfp->data)[nvfp->off]; ++ ++ if (copy_from_user(proc_buffer, buffer, count)) ++ { ++ nv_printf(NV_DBG_ERRORS, "NVRM: failed to copy in proc data!\n"); ++ status = -EFAULT; ++ } ++ else ++ { ++ nvfp->proc_data = PDE_DATA(file->f_inode); ++ nvfp->off += count; ++ } ++ ++done: ++ up(&nvfp->fops_sp_lock[NV_FOPS_STACK_INDEX_PROCFS]); ++ ++ return ((status < 0) ? status : count); + } + + static struct pci_dev *nv_get_agp_device_by_class(unsigned int class) +@@ -432,7 +507,7 @@ nv_procfs_open_registry( + nv_stack_t *sp = NULL; + + if (0 == (file->f_mode & FMODE_WRITE)) +- return 0; ++ return single_open(file, nv_procfs_show_registry, PDE_DATA(inode)); + + nvfp = nv_alloc_file_private(); + if (nvfp == NULL) +@@ -481,6 +556,9 @@ nv_procfs_close_registry( + RM_STATUS rm_status; + int rc = 0; + ++ if (0 == (file->f_mode & FMODE_WRITE)) ++ return single_release(inode, file); ++ + nvfp = NV_GET_FILE_PRIVATE(file); + if (nvfp == NULL) + return 0; +@@ -545,122 +623,81 @@ done: + return rc; + } + +-static struct file_operations nv_procfs_registry_fops = { ++static const struct file_operations nv_procfs_registry_fops = { + .open = nv_procfs_open_registry, ++ .read = seq_read, ++ .llseek = seq_lseek, ++ .write = nv_procfs_write_registry, + .release = nv_procfs_close_registry, + }; + + static int +-nv_procfs_read_params( +- char *page, +- char **start, +- off_t off, +- int count, +- int *eof, +- void *data ++nv_procfs_show_params( ++ struct seq_file *m, ++ void *v + ) + { + unsigned int i; +- int len = 0; + nv_parm_t *entry; + +- *eof = 1; + + for (i = 0; (entry = &nv_parms[i])->name != NULL; i++) +- len += sprintf(page+len, "%s: %u\n", entry->name, *entry->data); ++ seq_printf(m, "%s: %u\n", entry->name, *entry->data); + +- len += sprintf(page+len, "RegistryDwords: \"%s\"\n", ++ seq_printf(m, "RegistryDwords: \"%s\"\n", + (NVreg_RegistryDwords != NULL) ? NVreg_RegistryDwords : ""); +- len += sprintf(page+len, "RmMsg: \"%s\"\n", ++ seq_printf(m, "RmMsg: \"%s\"\n", + (NVreg_RmMsg != NULL) ? NVreg_RmMsg : ""); + +- return len; ++ return 0; + } + + static int +-nv_procfs_read_registry( +- char *page, +- char **start, +- off_t off, +- int count, +- int *eof, +- void *data +-) ++nv_procfs_open_params( ++ struct inode *inode, ++ struct file *file ++) + { +- nv_state_t *nv = data; +- nv_linux_state_t *nvl = NULL; +- char *registry_keys; ++ return single_open(file, nv_procfs_show_params, NULL); ++} + +- if (nv != NULL) +- nvl = NV_GET_NVL_FROM_NV_STATE(nv); +- registry_keys = ((nvl != NULL) ? +- nvl->registry_keys : nv_registry_keys); ++static const struct file_operations nv_procfs_params_fops = { ++ .owner = THIS_MODULE, ++ .open = nv_procfs_open_params, ++ .read = seq_read, ++ .llseek = seq_lseek, ++ .release = single_release, ++}; + +- *eof = 1; +- return sprintf(page, "Binary: \"%s\"\n", registry_keys); +-} + + static int +-nv_procfs_write_registry( +- struct file *file, +- const char *buffer, +- unsigned long count, +- void *data ++nv_procfs_show_text_file( ++ struct seq_file *m, ++ void *v + ) + { +- int status = 0; +- nv_file_private_t *nvfp = NV_GET_FILE_PRIVATE(file); +- char *proc_buffer; +- unsigned long bytes_left; +- +- down(&nvfp->fops_sp_lock[NV_FOPS_STACK_INDEX_PROCFS]); ++ seq_printf(m, "%s", (char *)m->private); + +- bytes_left = (NV_PROC_WRITE_BUFFER_SIZE - nvfp->off - 1); +- +- if (count == 0) +- { +- status = -EINVAL; +- goto done; +- } +- else if ((bytes_left == 0) || (count > bytes_left)) +- { +- status = -ENOSPC; +- goto done; +- } +- +- proc_buffer = &((char *)nvfp->data)[nvfp->off]; +- +- if (copy_from_user(proc_buffer, buffer, count)) +- { +- nv_printf(NV_DBG_ERRORS, "NVRM: failed to copy in proc data!\n"); +- status = -EFAULT; +- } +- else +- { +- nvfp->proc_data = data; +- nvfp->off += count; +- } +- +-done: +- up(&nvfp->fops_sp_lock[NV_FOPS_STACK_INDEX_PROCFS]); +- +- return ((status < 0) ? status : (int)count); ++ return 0; + } + + static int +-nv_procfs_read_text_file( +- char *page, +- char **start, +- off_t off, +- int count, +- int *eof, +- void *data ++nv_procfs_open_text_file( ++ struct inode *inode, ++ struct file *file + ) + { +- *eof = 1; +- return sprintf(page, "%s", (char *)data); ++ return single_open(file, nv_procfs_show_text_file, PDE_DATA(inode)); + } + ++static const struct file_operations nv_procfs_text_fops = { ++ .owner = THIS_MODULE, ++ .open = nv_procfs_open_text_file, ++ .read = seq_read, ++ .llseek = seq_lseek, ++ .release = single_release, ++}; ++ + static void + nv_procfs_add_text_file( + struct proc_dir_entry *parent, +@@ -668,22 +705,7 @@ nv_procfs_add_text_file( + const char *text + ) + { +- NV_CREATE_PROC_FILE(filename, parent, +- nv_procfs_read_text_file, NULL, NULL, (void *)text); +-} +- +-static void nv_procfs_unregister_all(struct proc_dir_entry *entry) +-{ +- while (entry) +- { +- struct proc_dir_entry *next = entry->next; +- if (entry->subdir) +- nv_procfs_unregister_all(entry->subdir); +- remove_proc_entry(entry->name, entry->parent); +- if (entry == proc_nvidia) +- break; +- entry = next; +- } ++ proc_create_data(filename, NV_PROC_RO, parent, &nv_procfs_text_fops, (void *)text); + } + #endif + +@@ -713,26 +735,11 @@ int nv_register_procfs(void) + if (!proc_nvidia) + goto failed; + +- entry = NV_CREATE_PROC_FILE("params", proc_nvidia, +- nv_procfs_read_params, NULL, NULL, NULL); ++ entry = proc_create("params", NV_PROC_RO, proc_nvidia, &nv_procfs_params_fops); + if (!entry) + goto failed; + +- /* +- * entry->proc_fops originally points to a constant +- * structure, so to add more methods for the +- * binary registry write path, we need to replace the +- * said entry->proc_fops with a new fops structure. +- * However, in preparation for this, we need to preserve +- * the procfs read() and write() operations. +- */ +- nv_procfs_registry_fops.read = entry->proc_fops->read; +- nv_procfs_registry_fops.write = entry->proc_fops->write; +- +- entry = NV_CREATE_PROC_FILE("registry", proc_nvidia, +- nv_procfs_read_registry, +- nv_procfs_write_registry, +- &nv_procfs_registry_fops, NULL); ++ entry = proc_create("registry", NV_PROC_RW, proc_nvidia, &nv_procfs_registry_fops); + if (!entry) + goto failed; + +@@ -753,8 +760,7 @@ int nv_register_procfs(void) + + nv_procfs_add_text_file(proc_nvidia_patches, "README", __README_patches); + +- entry = NV_CREATE_PROC_FILE("version", proc_nvidia, +- nv_procfs_read_version, NULL, NULL, NULL); ++ entry = proc_create("version", NV_PROC_RO, proc_nvidia, &nv_procfs_version_fops); + if (!entry) + goto failed; + +@@ -771,15 +777,11 @@ int nv_register_procfs(void) + if (!proc_nvidia_gpu) + goto failed; + +- entry = NV_CREATE_PROC_FILE("information", proc_nvidia_gpu, +- nv_procfs_read_gpu_info, NULL, NULL, nv); ++ entry = proc_create_data("information", NV_PROC_RO, proc_nvidia_gpu, &nv_procfs_gpu_info_fops, nv); + if (!entry) + goto failed; + +- entry = NV_CREATE_PROC_FILE("registry", proc_nvidia_gpu, +- nv_procfs_read_registry, +- nv_procfs_write_registry, +- &nv_procfs_registry_fops, nv); ++ entry = proc_create_data("registry", NV_PROC_RW, proc_nvidia_gpu, &nv_procfs_registry_fops, nv); + if (!entry) + goto failed; + +@@ -789,18 +791,15 @@ int nv_register_procfs(void) + if (!proc_nvidia_agp) + goto failed; + +- entry = NV_CREATE_PROC_FILE("status", proc_nvidia_agp, +- nv_procfs_read_agp_status, NULL, NULL, nv); ++ entry = proc_create("status", NV_PROC_RO, proc_nvidia_agp, &nv_procfs_read_agp_status); + if (!entry) + goto failed; + +- entry = NV_CREATE_PROC_FILE("host-bridge", proc_nvidia_agp, +- nv_procfs_read_agp_info, NULL, NULL, NULL); ++ entry = proc_create("host-bridge", NV_PROC_RO, proc_nvidia_agp, &nv_procfs_read_agp_info); + if (!entry) + goto failed; + +- entry = NV_CREATE_PROC_FILE("gpu", proc_nvidia_agp, +- nv_procfs_read_agp_info, NULL, NULL, nv); ++ entry = proc_create("gpu", NV_PROC_RO, proc_nvidia_agp, &nv_procfs_read_agp_info); + if (!entry) + goto failed; + } +@@ -809,7 +808,7 @@ int nv_register_procfs(void) + return 0; + #if defined(CONFIG_PROC_FS) + failed: +- nv_procfs_unregister_all(proc_nvidia); ++ remove_proc_subtree("nvidia", proc_nvidia); + return -1; + #endif + } +@@ -817,6 +816,6 @@ failed: + void nv_unregister_procfs(void) + { + #if defined(CONFIG_PROC_FS) +- nv_procfs_unregister_all(proc_nvidia); ++ remove_proc_subtree("nvidia", proc_nvidia); + #endif + } + diff --git a/x11-drivers/nvidia-drivers/files/nvidia-drivers-313.18-3.8.patch b/x11-drivers/nvidia-drivers/files/nvidia-drivers-313.18-3.8.patch new file mode 100644 index 00000000..bf2f95e6 --- /dev/null +++ b/x11-drivers/nvidia-drivers/files/nvidia-drivers-313.18-3.8.patch @@ -0,0 +1,24 @@ +From 9100c380c0a8c15b658b3153c107cd99e7110a7b Mon Sep 17 00:00:00 2001 +From: Alberto Milone <alberto.milone@canonical.com> +Date: Wed, 9 Jan 2013 11:42:03 +0100 +Subject: [PATCH 1/1] Add support for Linux 3.8 + +--- + conftest.sh | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/conftest.sh b/conftest.sh +index 9720cab..1bfbe6f 100755 +--- a/kernel/conftest.sh ++++ b/kernel/conftest.sh +@@ -160,6 +160,7 @@ build_cflags() { + + if [ "$ARCH" = "i386" -o "$ARCH" = "x86_64" ]; then + CFLAGS="$CFLAGS -I$SOURCES/arch/x86/include" ++ CFLAGS="$CFLAGS -I$SOURCES/arch/x86/include/uapi" + CFLAGS="$CFLAGS -I$OUTPUT/arch/x86/include/generated" + CFLAGS="$CFLAGS -I$OUTPUT/arch/x86/include/generated/uapi" + elif [ "$ARCH" = "arm" ]; then +-- +1.7.9.5 + diff --git a/x11-drivers/nvidia-drivers/files/nvidia-drivers-319.23-3.10.patch b/x11-drivers/nvidia-drivers/files/nvidia-drivers-319.23-3.10.patch new file mode 100644 index 00000000..b81967bb --- /dev/null +++ b/x11-drivers/nvidia-drivers/files/nvidia-drivers-319.23-3.10.patch @@ -0,0 +1,604 @@ +diff -ur -X - NVIDIA-Linux-x86_64-319.17-no-compat32.orig/kernel/nv-i2c.c NVIDIA-Linux-x86_64-319.17-no-compat32/kernel/nv-i2c.c +--- NVIDIA-Linux-x86_64-319.17-no-compat32.orig/kernel/nv-i2c.c 2013-04-26 00:22:30.000000000 -0400 ++++ NVIDIA-Linux-x86_64-319.17-no-compat32/kernel/nv-i2c.c 2013-05-13 05:20:55.571981365 -0400 +@@ -311,8 +311,6 @@ + BOOL NV_API_CALL nv_i2c_del_adapter(nv_state_t *nv, void *data) + { + struct i2c_adapter *pI2cAdapter = (struct i2c_adapter *)data; +- int osstatus = 0; +- BOOL wasReleased = FALSE; + + #if defined(KERNEL_2_4) + if (!NV_WEAK_SYMBOL_PRESENT(i2c_add_adapter)) +@@ -324,15 +322,10 @@ + if (!pI2cAdapter) return FALSE; + + // attempt release with the OS +- osstatus = i2c_del_adapter(pI2cAdapter); ++ i2c_del_adapter(pI2cAdapter); ++ os_free_mem(pI2cAdapter); + +- if (!osstatus) +- { +- os_free_mem(pI2cAdapter); +- wasReleased = TRUE; +- } +- +- return wasReleased; ++ return TRUE; + } + + #else // (defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)) +diff -ur -X - NVIDIA-Linux-x86_64-319.17-no-compat32.orig/kernel/nv-procfs.c NVIDIA-Linux-x86_64-319.17-no-compat32/kernel/nv-procfs.c +--- NVIDIA-Linux-x86_64-319.17-no-compat32.orig/kernel/nv-procfs.c 2013-04-26 00:22:30.000000000 -0400 ++++ NVIDIA-Linux-x86_64-319.17-no-compat32/kernel/nv-procfs.c 2013-05-22 04:52:45.229495748 -0400 +@@ -60,60 +60,41 @@ + __entry; \ + }) + +-#define NV_CREATE_PROC_FILE(name,parent,__read_proc, \ +- __write_proc,__fops,__data) \ +- ({ \ +- struct proc_dir_entry *__entry; \ +- int __mode = (S_IFREG | S_IRUGO); \ +- if ((NvUPtr)(__write_proc) != 0) \ +- __mode |= S_IWUSR; \ +- __entry = NV_CREATE_PROC_ENTRY(name, __mode, parent); \ +- if (__entry != NULL) \ +- { \ +- if ((NvUPtr)(__read_proc) != 0) \ +- __entry->read_proc = (__read_proc); \ +- if ((NvUPtr)(__write_proc) != 0) \ +- { \ +- __entry->write_proc = (__write_proc); \ +- __entry->proc_fops = (__fops); \ +- } \ +- __entry->data = (__data); \ +- } \ +- __entry; \ +- }) ++#define NV_PROC_RW (S_IFREG|S_IRUGO|S_IWUSR) ++#define NV_PROC_RO (S_IFREG|S_IRUGO) + + #define NV_CREATE_PROC_DIR(name,parent) \ + ({ \ + struct proc_dir_entry *__entry; \ + int __mode = (S_IFDIR | S_IRUGO | S_IXUGO); \ +- __entry = NV_CREATE_PROC_ENTRY(name, __mode, parent); \ ++ __entry = proc_mkdir_mode(name, __mode, parent); \ + __entry; \ + }) + ++//#if LINUX_VERSION_CODE <= KERNEL_VERSION(3,9,255) ++//static inline void *PDE_DATA(const struct inode *inode) { ++// return PDE(inode)->data; ++//} ++//#endif ++ + #define NV_PROC_WRITE_BUFFER_SIZE (64 * RM_PAGE_SIZE) + + static int +-nv_procfs_read_gpu_info( +- char *page, +- char **start, +- off_t off, +- int count, +- int *eof, +- void *data ++nv_procfs_show_gpu_info( ++ struct seq_file *m, ++ void *v + ) + { +- nv_state_t *nv = data; ++ nv_state_t *nv = m->private; + nv_linux_state_t *nvl = NV_GET_NVL_FROM_NV_STATE(nv); + struct pci_dev *dev = nvl->dev; + char *type, *fmt, tmpstr[NV_DEVICE_NAME_LENGTH]; +- int len = 0, status; ++ int status; + NvU8 *uuid; + NvU32 vbios_rev1, vbios_rev2, vbios_rev3, vbios_rev4, vbios_rev5; + NvU32 fpga_rev1, fpga_rev2, fpga_rev3; + nv_stack_t *sp = NULL; + +- *eof = 1; +- + NV_KMEM_CACHE_ALLOC_STACK(sp); + if (sp == NULL) + { +@@ -134,31 +115,31 @@ + if (rm_get_device_name(sp, nv, dev->device, dev->subsystem_vendor, + dev->subsystem_device, NV_DEVICE_NAME_LENGTH, + tmpstr) != RM_OK) +- { ++ { + strcpy (tmpstr, "Unknown"); + } + } + +- len += sprintf(page+len, "Model: \t\t %s\n", tmpstr); +- len += sprintf(page+len, "IRQ: \t\t %d\n", nv->interrupt_line); ++ seq_printf(m, "Model: \t\t %s\n", tmpstr); ++ seq_printf(m, "IRQ: \t\t %d\n", nv->interrupt_line); + + if (NV_IS_GVI_DEVICE(nv)) + { + status = rm_gvi_get_firmware_version(sp, nv, &fpga_rev1, &fpga_rev2, + &fpga_rev3); + if (status != RM_OK) +- len += sprintf(page+len, "Firmware: \t ????.??.??\n"); ++ seq_printf(m, "Firmware: \t ????.??.??\n"); + else + { + fmt = "Firmware: \t %x.%x.%x\n"; +- len += sprintf(page+len, fmt, fpga_rev1, fpga_rev2, fpga_rev3); ++ seq_printf(m, fmt, fpga_rev1, fpga_rev2, fpga_rev3); + } + } + else + { + if (rm_get_gpu_uuid(sp, nv, &uuid, NULL) == RM_OK) + { +- len += sprintf(page+len, "GPU UUID: \t %s\n", (char *)uuid); ++ seq_printf(m, "GPU UUID: \t %s\n", (char *)uuid); + os_free_mem(uuid); + } + +@@ -166,12 +147,12 @@ + &vbios_rev3, &vbios_rev4, + &vbios_rev5) != RM_OK) + { +- len += sprintf(page+len, "Video BIOS: \t ??.??.??.??.??\n"); ++ seq_printf(m, "Video BIOS: \t ??.??.??.??.??\n"); + } + else + { + fmt = "Video BIOS: \t %02x.%02x.%02x.%02x.%02x\n"; +- len += sprintf(page+len, fmt, vbios_rev1, vbios_rev2, vbios_rev3, ++ seq_printf(m, fmt, vbios_rev1, vbios_rev2, vbios_rev3, + vbios_rev4, vbios_rev5); + } + } +@@ -180,12 +161,12 @@ + type = "PCI-E"; + else + type = "PCI"; +- len += sprintf(page+len, "Bus Type: \t %s\n", type); ++ seq_printf(m, "Bus Type: \t %s\n", type); + +- len += sprintf(page+len, "DMA Size: \t %d bits\n", ++ seq_printf(m, "DMA Size: \t %d bits\n", + nv_count_bits(dev->dma_mask)); +- len += sprintf(page+len, "DMA Mask: \t 0x%llx\n", dev->dma_mask); +- len += sprintf(page+len, "Bus Location: \t %04x:%02x.%02x.%x\n", ++ seq_printf(m, "DMA Mask: \t 0x%llx\n", dev->dma_mask); ++ seq_printf(m, "Bus Location: \t %04x:%02x.%02x.%x\n", + nv->domain, nv->bus, nv->slot, PCI_FUNC(dev->devfn)); + #if defined(DEBUG) + do +@@ -193,7 +174,7 @@ + int j; + for (j = 0; j < NV_GPU_NUM_BARS; j++) + { +- len += sprintf(page+len, "BAR%u: \t\t 0x%llx (%lluMB)\n", ++ seq_printf(m, "BAR%u: \t\t 0x%llx (%lluMB)\n", + j, nv->bars[j].address, (nv->bars[j].size >> 20)); + } + } while (0); +@@ -201,26 +182,120 @@ + + NV_KMEM_CACHE_FREE_STACK(sp); + +- return len; ++ return 0; + } + + static int +-nv_procfs_read_version( +- char *page, +- char **start, +- off_t off, +- int count, +- int *eof, +- void *data ++nv_procfs_open_gpu_info( ++ struct inode *inode, ++ struct file *file ++) ++{ ++ return single_open(file, nv_procfs_show_gpu_info, PDE_DATA(inode)); ++} ++ ++static const struct file_operations nv_procfs_gpu_info_fops = { ++ .owner = THIS_MODULE, ++ .open = nv_procfs_open_gpu_info, ++ .read = seq_read, ++ .llseek = seq_lseek, ++ .release = single_release, ++}; ++ ++static int ++nv_procfs_show_version( ++ struct seq_file *m, ++ void *v ++) ++{ ++ seq_printf(m, "NVRM version: %s\n", pNVRM_ID); ++ seq_printf(m, "GCC version: %s\n", NV_COMPILER); ++ ++ return 0; ++} ++ ++static int ++nv_procfs_open_version( ++ struct inode *inode, ++ struct file *file ++) ++{ ++ return single_open(file, nv_procfs_show_version, NULL); ++} ++ ++static const struct file_operations nv_procfs_version_fops = { ++ .owner = THIS_MODULE, ++ .open = nv_procfs_open_version, ++ .read = seq_read, ++ .llseek = seq_lseek, ++ .release = single_release, ++}; ++ ++static int ++nv_procfs_show_registry( ++ struct seq_file *m, ++ void *v ++) ++{ ++ nv_state_t *nv = m->private; ++ nv_linux_state_t *nvl = NULL; ++ char *registry_keys; ++ ++ if (nv != NULL) ++ nvl = NV_GET_NVL_FROM_NV_STATE(nv); ++ registry_keys = ((nvl != NULL) ? ++ nvl->registry_keys : nv_registry_keys); ++ ++ seq_printf(m, "Binary: \"%s\"\n", registry_keys); ++ ++ return 0; ++} ++ ++static ssize_t ++nv_procfs_write_registry( ++ struct file *file, ++ const char __user *buffer, ++ size_t count, ++ loff_t *pos + ) + { +- int len = 0; +- *eof = 1; ++ int status = 0; ++ nv_file_private_t *nvfp = NV_GET_FILE_PRIVATE(file); ++ char *proc_buffer; ++ unsigned long bytes_left; ++ ++ down(&nvfp->fops_sp_lock[NV_FOPS_STACK_INDEX_PROCFS]); ++ ++ bytes_left = (NV_PROC_WRITE_BUFFER_SIZE - nvfp->off - 1); ++ ++ if (count == 0) ++ { ++ status = -EINVAL; ++ goto done; ++ } ++ else if ((bytes_left == 0) || (count > bytes_left)) ++ { ++ status = -ENOSPC; ++ goto done; ++ } ++ ++ proc_buffer = &((char *)nvfp->data)[nvfp->off]; ++ ++ if (copy_from_user(proc_buffer, buffer, count)) ++ { ++ nv_printf(NV_DBG_ERRORS, "NVRM: failed to copy in proc data!\n"); ++ status = -EFAULT; ++ } ++ else ++ { ++ nvfp->proc_data = PDE_DATA(file->f_inode); ++ nvfp->off += count; ++ } + +- len += sprintf(page+len, "NVRM version: %s\n", pNVRM_ID); +- len += sprintf(page+len, "GCC version: %s\n", NV_COMPILER); ++done: ++ up(&nvfp->fops_sp_lock[NV_FOPS_STACK_INDEX_PROCFS]); + +- return len; ++ return ((status < 0) ? status : count); + } + + static int +@@ -233,7 +308,7 @@ + nv_stack_t *sp = NULL; + + if (0 == (file->f_mode & FMODE_WRITE)) +- return 0; ++ return single_open(file, nv_procfs_show_registry, PDE_DATA(inode)); + + nvfp = nv_alloc_file_private(); + if (nvfp == NULL) +@@ -282,6 +357,9 @@ + RM_STATUS rm_status; + int rc = 0; + ++ if (0 == (file->f_mode & FMODE_WRITE)) ++ return single_release(inode, file); ++ + nvfp = NV_GET_FILE_PRIVATE(file); + if (nvfp == NULL) + return 0; +@@ -346,122 +424,81 @@ + return rc; + } + +-static struct file_operations nv_procfs_registry_fops = { ++static const struct file_operations nv_procfs_registry_fops = { + .open = nv_procfs_open_registry, ++ .read = seq_read, ++ .llseek = seq_lseek, ++ .write = nv_procfs_write_registry, + .release = nv_procfs_close_registry, + }; + + static int +-nv_procfs_read_params( +- char *page, +- char **start, +- off_t off, +- int count, +- int *eof, +- void *data ++nv_procfs_show_params( ++ struct seq_file *m, ++ void *v + ) + { + unsigned int i; +- int len = 0; + nv_parm_t *entry; + +- *eof = 1; + + for (i = 0; (entry = &nv_parms[i])->name != NULL; i++) +- len += sprintf(page+len, "%s: %u\n", entry->name, *entry->data); ++ seq_printf(m, "%s: %u\n", entry->name, *entry->data); + +- len += sprintf(page+len, "RegistryDwords: \"%s\"\n", ++ seq_printf(m, "RegistryDwords: \"%s\"\n", + (NVreg_RegistryDwords != NULL) ? NVreg_RegistryDwords : ""); +- len += sprintf(page+len, "RmMsg: \"%s\"\n", ++ seq_printf(m, "RmMsg: \"%s\"\n", + (NVreg_RmMsg != NULL) ? NVreg_RmMsg : ""); + +- return len; ++ return 0; + } + + static int +-nv_procfs_read_registry( +- char *page, +- char **start, +- off_t off, +- int count, +- int *eof, +- void *data +-) ++nv_procfs_open_params( ++ struct inode *inode, ++ struct file *file ++) + { +- nv_state_t *nv = data; +- nv_linux_state_t *nvl = NULL; +- char *registry_keys; ++ return single_open(file, nv_procfs_show_params, NULL); ++} + +- if (nv != NULL) +- nvl = NV_GET_NVL_FROM_NV_STATE(nv); +- registry_keys = ((nvl != NULL) ? +- nvl->registry_keys : nv_registry_keys); ++static const struct file_operations nv_procfs_params_fops = { ++ .owner = THIS_MODULE, ++ .open = nv_procfs_open_params, ++ .read = seq_read, ++ .llseek = seq_lseek, ++ .release = single_release, ++}; + +- *eof = 1; +- return sprintf(page, "Binary: \"%s\"\n", registry_keys); +-} + + static int +-nv_procfs_write_registry( +- struct file *file, +- const char *buffer, +- unsigned long count, +- void *data ++nv_procfs_show_text_file( ++ struct seq_file *m, ++ void *v + ) + { +- int status = 0; +- nv_file_private_t *nvfp = NV_GET_FILE_PRIVATE(file); +- char *proc_buffer; +- unsigned long bytes_left; +- +- down(&nvfp->fops_sp_lock[NV_FOPS_STACK_INDEX_PROCFS]); +- +- bytes_left = (NV_PROC_WRITE_BUFFER_SIZE - nvfp->off - 1); ++ seq_printf(m, "%s", (char *)m->private); + +- if (count == 0) +- { +- status = -EINVAL; +- goto done; +- } +- else if ((bytes_left == 0) || (count > bytes_left)) +- { +- status = -ENOSPC; +- goto done; +- } +- +- proc_buffer = &((char *)nvfp->data)[nvfp->off]; +- +- if (copy_from_user(proc_buffer, buffer, count)) +- { +- nv_printf(NV_DBG_ERRORS, "NVRM: failed to copy in proc data!\n"); +- status = -EFAULT; +- } +- else +- { +- nvfp->proc_data = data; +- nvfp->off += count; +- } +- +-done: +- up(&nvfp->fops_sp_lock[NV_FOPS_STACK_INDEX_PROCFS]); +- +- return ((status < 0) ? status : (int)count); ++ return 0; + } + + static int +-nv_procfs_read_text_file( +- char *page, +- char **start, +- off_t off, +- int count, +- int *eof, +- void *data ++nv_procfs_open_text_file( ++ struct inode *inode, ++ struct file *file + ) + { +- *eof = 1; +- return sprintf(page, "%s", (char *)data); ++ return single_open(file, nv_procfs_show_text_file, PDE_DATA(inode)); + } + ++static const struct file_operations nv_procfs_text_fops = { ++ .owner = THIS_MODULE, ++ .open = nv_procfs_open_text_file, ++ .read = seq_read, ++ .llseek = seq_lseek, ++ .release = single_release, ++}; ++ + static void + nv_procfs_add_text_file( + struct proc_dir_entry *parent, +@@ -469,22 +506,7 @@ + const char *text + ) + { +- NV_CREATE_PROC_FILE(filename, parent, +- nv_procfs_read_text_file, NULL, NULL, (void *)text); +-} +- +-static void nv_procfs_unregister_all(struct proc_dir_entry *entry) +-{ +- while (entry) +- { +- struct proc_dir_entry *next = entry->next; +- if (entry->subdir) +- nv_procfs_unregister_all(entry->subdir); +- remove_proc_entry(entry->name, entry->parent); +- if (entry == proc_nvidia) +- break; +- entry = next; +- } ++ proc_create_data(filename, NV_PROC_RO, parent, &nv_procfs_text_fops, (void *)text); + } + #endif + +@@ -513,26 +535,11 @@ + if (!proc_nvidia) + goto failed; + +- entry = NV_CREATE_PROC_FILE("params", proc_nvidia, +- nv_procfs_read_params, NULL, NULL, NULL); ++ entry = proc_create("params", NV_PROC_RO, proc_nvidia, &nv_procfs_params_fops); + if (!entry) + goto failed; + +- /* +- * entry->proc_fops originally points to a constant +- * structure, so to add more methods for the +- * binary registry write path, we need to replace the +- * said entry->proc_fops with a new fops structure. +- * However, in preparation for this, we need to preserve +- * the procfs read() and write() operations. +- */ +- nv_procfs_registry_fops.read = entry->proc_fops->read; +- nv_procfs_registry_fops.write = entry->proc_fops->write; +- +- entry = NV_CREATE_PROC_FILE("registry", proc_nvidia, +- nv_procfs_read_registry, +- nv_procfs_write_registry, +- &nv_procfs_registry_fops, NULL); ++ entry = proc_create("registry", NV_PROC_RW, proc_nvidia, &nv_procfs_registry_fops); + if (!entry) + goto failed; + +@@ -553,8 +560,7 @@ + + nv_procfs_add_text_file(proc_nvidia_patches, "README", __README_patches); + +- entry = NV_CREATE_PROC_FILE("version", proc_nvidia, +- nv_procfs_read_version, NULL, NULL, NULL); ++ entry = proc_create("version", NV_PROC_RO, proc_nvidia, &nv_procfs_version_fops); + if (!entry) + goto failed; + +@@ -571,15 +577,11 @@ + if (!proc_nvidia_gpu) + goto failed; + +- entry = NV_CREATE_PROC_FILE("information", proc_nvidia_gpu, +- nv_procfs_read_gpu_info, NULL, NULL, nv); ++ entry = proc_create_data("information", NV_PROC_RO, proc_nvidia_gpu, &nv_procfs_gpu_info_fops, nv); + if (!entry) + goto failed; + +- entry = NV_CREATE_PROC_FILE("registry", proc_nvidia_gpu, +- nv_procfs_read_registry, +- nv_procfs_write_registry, +- &nv_procfs_registry_fops, nv); ++ entry = proc_create_data("registry", NV_PROC_RW, proc_nvidia_gpu, &nv_procfs_registry_fops, nv); + if (!entry) + goto failed; + } +@@ -587,7 +589,7 @@ + return 0; + #if defined(CONFIG_PROC_FS) + failed: +- nv_procfs_unregister_all(proc_nvidia); ++ remove_proc_subtree("nvidia", proc_nvidia); + return -1; + #endif + } +@@ -595,6 +597,6 @@ + void nv_unregister_procfs(void) + { + #if defined(CONFIG_PROC_FS) +- nv_procfs_unregister_all(proc_nvidia); ++ remove_proc_subtree("nvidia", proc_nvidia); + #endif + } + diff --git a/x11-drivers/nvidia-drivers/files/nvidia-drivers-96.43.19-2.6.39.patch b/x11-drivers/nvidia-drivers/files/nvidia-drivers-96.43.19-2.6.39.patch new file mode 100644 index 00000000..4ee8ba60 --- /dev/null +++ b/x11-drivers/nvidia-drivers/files/nvidia-drivers-96.43.19-2.6.39.patch @@ -0,0 +1,10 @@ +--- usr/src/nv/nv-linux.h.orig 2010-10-28 04:23:04.000000000 +0200 ++++ usr/src/nv/nv-linux.h 2011-05-21 08:58:35.714633248 +0200 +@@ -80,7 +80,6 @@ + #if !defined(KERNEL_2_4) + #include <linux/sched.h> /* suser(), capable() replacement */ + #include <linux/moduleparam.h> /* module_param() */ +-#include <linux/smp_lock.h> /* kernel_locked */ + #include <asm/tlbflush.h> /* flush_tlb(), flush_tlb_all() */ + #include <asm/kmap_types.h> /* page table entry lookup */ + #endif diff --git a/x11-drivers/nvidia-drivers/files/nvidia-drivers-pax-const.patch b/x11-drivers/nvidia-drivers/files/nvidia-drivers-pax-const.patch new file mode 100644 index 00000000..f3b82593 --- /dev/null +++ b/x11-drivers/nvidia-drivers/files/nvidia-drivers-pax-const.patch @@ -0,0 +1,17 @@ +Binary files kernel.orig/.nv-procfs.c.swp and kernel/.nv-procfs.c.swp differ +diff -urp kernel.orig/nv-procfs.c kernel/nv-procfs.c +--- kernel.orig/nv-procfs.c 2011-07-13 03:29:30.000000000 +0200 ++++ kernel/nv-procfs.c 2011-07-19 15:45:27.982993911 +0200 +@@ -707,8 +707,10 @@ int nv_register_procfs(void) + * However, in preparation for this, we need to preserve + * the procfs read() and write() operations. + */ +- nv_procfs_registry_fops.read = entry->proc_fops->read; +- nv_procfs_registry_fops.write = entry->proc_fops->write; ++ pax_open_kernel(); ++ *(void **)&nv_procfs_registry_fops.read = entry->proc_fops->read; ++ *(void **)&nv_procfs_registry_fops.write = entry->proc_fops->write; ++ pax_close_kernel(); + + entry = NV_CREATE_PROC_FILE("registry", proc_nvidia, + nv_procfs_read_registry, diff --git a/x11-drivers/nvidia-drivers/files/nvidia-drivers-pax-usercopy.patch b/x11-drivers/nvidia-drivers/files/nvidia-drivers-pax-usercopy.patch new file mode 100644 index 00000000..ce8c201b --- /dev/null +++ b/x11-drivers/nvidia-drivers/files/nvidia-drivers-pax-usercopy.patch @@ -0,0 +1,54 @@ +diff -urp kernel.orig/nv.c kernel/nv.c +--- kernel.orig/nv.c 2011-09-24 02:32:09.000000000 +0200 ++++ kernel/nv.c 2011-10-05 19:13:41.474242252 +0200 +@@ -1105,7 +1105,7 @@ static int __init nvidia_init_module(voi + NV_SPIN_LOCK_INIT(&km_lock); + #endif + +- NV_KMEM_CACHE_CREATE(nv_stack_t_cache, "nv_stack_t", nv_stack_t); ++ NV_KMEM_CACHE_CREATE(nv_stack_t_cache, "nv_stack_t", nv_stack_t, SLAB_USERCOPY); + if (nv_stack_t_cache == NULL) + { + nv_printf(NV_DBG_ERRORS, "NVRM: stack cache allocation failed!\n"); +@@ -1220,7 +1220,7 @@ static int __init nvidia_init_module(voi + } + #endif + +- NV_KMEM_CACHE_CREATE(nv_pte_t_cache, "nv_pte_t", nv_pte_t); ++ NV_KMEM_CACHE_CREATE(nv_pte_t_cache, "nv_pte_t", nv_pte_t, 0); + if (nv_pte_t_cache == NULL) + { + rc = -ENOMEM; +@@ -1229,7 +1229,7 @@ static int __init nvidia_init_module(voi + } + + NV_KMEM_CACHE_CREATE(nvidia_p2p_page_t_cache, "nvidia_p2p_page_t", +- nvidia_p2p_page_t); ++ nvidia_p2p_page_t, 0); + if (nvidia_p2p_page_t_cache == NULL) + { + rc = -ENOMEM; +diff -urp kernel.orig/nv-linux.h kernel/nv-linux.h +--- kernel.orig/nv-linux.h 2011-09-24 02:32:09.000000000 +0200 ++++ kernel/nv-linux.h 2011-10-05 19:14:42.522238996 +0200 +@@ -695,16 +695,16 @@ extern nv_spinlock_t km_lock; + + #if defined(NV_KMEM_CACHE_CREATE_PRESENT) + #if (NV_KMEM_CACHE_CREATE_ARGUMENT_COUNT == 6) +-#define NV_KMEM_CACHE_CREATE(kmem_cache, name, type) \ ++#define NV_KMEM_CACHE_CREATE(kmem_cache, name, type, flags) \ + { \ + kmem_cache = kmem_cache_create(name, sizeof(type), \ +- 0, 0, NULL, NULL); \ ++ 0, flags, NULL, NULL); \ + } + #elif (NV_KMEM_CACHE_CREATE_ARGUMENT_COUNT == 5) +-#define NV_KMEM_CACHE_CREATE(kmem_cache, name, type) \ ++#define NV_KMEM_CACHE_CREATE(kmem_cache, name, type, flags) \ + { \ + kmem_cache = kmem_cache_create(name, sizeof(type), \ +- 0, 0, NULL); \ ++ 0, flags, NULL); \ + } + #else + #error "NV_KMEM_CACHE_CREATE_ARGUMENT_COUNT value unrecognized!" diff --git a/x11-drivers/nvidia-drivers/files/replace-VM_RESERVED-with-VM_DONTEXPAND-and-VM_DONTDU.patch b/x11-drivers/nvidia-drivers/files/replace-VM_RESERVED-with-VM_DONTEXPAND-and-VM_DONTDU.patch new file mode 100644 index 00000000..51aa2851 --- /dev/null +++ b/x11-drivers/nvidia-drivers/files/replace-VM_RESERVED-with-VM_DONTEXPAND-and-VM_DONTDU.patch @@ -0,0 +1,28 @@ +From fed1fa17202cf13bf80bbbad3bf0ffdfd192df42 Mon Sep 17 00:00:00 2001 +From: Alberto Milone <alberto.milone@canonical.com> +Date: Wed, 7 Nov 2012 12:11:02 +0100 +Subject: [PATCH 1/1] Replace VM_RESERVED with VM_DONTEXPAND and VM_DONTDUMP + +--- + nv-mmap.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/nv-mmap.c b/nv-mmap.c +index acc02ec..b2d5cdb 100644 +--- a/nv-mmap.c ++++ b/nv-mmap.c +@@ -463,7 +463,11 @@ int nv_kern_mmap( + NV_PRINT_AT(NV_DBG_MEMINFO, at); + nv_vm_list_page_count(&at->page_table[i], pages); + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0) ++ vma->vm_flags |= (VM_IO | VM_LOCKED | (VM_DONTEXPAND | VM_DONTDUMP)); ++#else + vma->vm_flags |= (VM_IO | VM_LOCKED | VM_RESERVED); ++#endif + + #if defined(VM_DRIVER_PAGES) + vma->vm_flags |= VM_DRIVER_PAGES; +-- +1.7.9.5 + diff --git a/x11-drivers/nvidia-drivers/metadata.xml b/x11-drivers/nvidia-drivers/metadata.xml new file mode 100644 index 00000000..b4cf3e70 --- /dev/null +++ b/x11-drivers/nvidia-drivers/metadata.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>no-herd</herd> +<maintainer> + <email>lxnay@gentoo.org</email> + <description>General maintainer</description> +</maintainer> +<longdescription>NVIDIA X11 driver and GLX libraries</longdescription> +</pkgmetadata> diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-173.14.31.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-173.14.31.ebuild new file mode 100644 index 00000000..d1694146 --- /dev/null +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-173.14.31.ebuild @@ -0,0 +1,199 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="2" + +inherit eutils unpacker portability versionator linux-mod flag-o-matic nvidia-driver + +X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}" +AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}" +X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}" + +DESCRIPTION="NVIDIA GPUs kernel drivers" +HOMEPAGE="http://www.nvidia.com/" +SRC_URI="x86? ( ftp://download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}-pkg0.run ) + amd64? ( ftp://download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}-pkg2.run ) + x86-fbsd? ( ftp://download.nvidia.com/freebsd/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )" + +LICENSE="NVIDIA" +SLOT="0" +KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd" +IUSE="acpi custom-cflags multilib kernel_linux" +RESTRICT="strip" + +DEPEND="kernel_linux? ( virtual/linux-sources )" +RDEPEND="~x11-drivers/nvidia-userspace-${PV} + multilib? ( ~x11-drivers/nvidia-userspace-${PV}[multilib] ) + acpi? ( sys-power/acpid )" +PDEPEND="" + +if use x86; then + PKG_V="-pkg0" + NV_PACKAGE="${X86_NV_PACKAGE}" +elif use amd64; then + PKG_V="-pkg2" + NV_PACKAGE="${AMD64_NV_PACKAGE}" +elif use x86-fbsd; then + PKG_V="" + NV_PACKAGE="${X86_FBSD_NV_PACKAGE}" +fi + +S="${WORKDIR}/${NV_PACKAGE}${PKG_V}" + +mtrr_check() { + ebegin "Checking for MTRR support" + linux_chkconfig_present MTRR + eend $? + + if [[ $? -ne 0 ]] ; then + eerror "Please enable MTRR support in your kernel config, found at:" + eerror + eerror " Processor type and features" + eerror " [*] MTRR (Memory Type Range Register) support" + eerror + eerror "and recompile your kernel ..." + die "MTRR support not detected!" + fi +} + +lockdep_check() { + if linux_chkconfig_present LOCKDEP; then + eerror "You've enabled LOCKDEP -- lock tracking -- in the kernel." + eerror "Unfortunately, this option exports the symbol 'lockdep_init_map' as GPL-only" + eerror "which will prevent ${P} from compiling." + eerror "Please make sure the following options have been unset:" + eerror " Kernel hacking --->" + eerror " [ ] Lock debugging: detect incorrect freeing of live locks" + eerror " [ ] Lock debugging: prove locking correctness" + eerror " [ ] Lock usage statistics" + eerror "in 'menuconfig'" + die "LOCKDEP enabled" + fi +} + +pkg_setup() { + if use kernel_linux; then + linux-mod_pkg_setup + MODULE_NAMES="nvidia(video:${S}/usr/src/nv)" + BUILD_PARAMS="IGNORE_CC_MISMATCH=yes V=1 SYSSRC=${KV_DIR} \ + SYSOUT=${KV_OUT_DIR} HOST_CC=$(tc-getBUILD_CC)" + mtrr_check + lockdep_check + fi + + # On BSD userland it wants real make command + use userland_BSD && MAKE="$(get_bmake)" + + export _POSIX2_VERSION="199209" + + # Since Nvidia ships 3 different series of drivers, we need to give the user + # some kind of guidance as to what version they should install. This tries + # to point the user in the right direction but can't be perfect. check + # nvidia-driver.eclass + nvidia-driver-check-warning + + # set variables to where files are in the package structure + if use kernel_FreeBSD; then + NV_SRC="${S}/src" + elif use kernel_linux; then + NV_SRC="${S}/usr/src/nv" + else + die "Could not determine proper NVIDIA package" + fi +} + +src_unpack() { + if use kernel_linux && kernel_is lt 2 6 7; then + echo + ewarn "Your kernel version is ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}" + ewarn "This is not officially supported for ${P}. It is likely you" + ewarn "will not be able to compile or use the kernel module." + ewarn "It is recommended that you upgrade your kernel to a version >= 2.6.7" + echo + ewarn "DO NOT file bug reports for kernel versions less than 2.6.7 as they will be ignored." + fi + + if ! use x86-fbsd; then + mkdir "${S}" + cd "${S}" + unpack_makeself + else + unpack ${A} + fi +} + +src_prepare() { + # Please add a brief description for every added patch + use x86-fbsd && cd doc + + if use kernel_linux; then + # Quiet down warnings the user does not need to see + sed -i \ + -e 's:-Wpointer-arith::g' \ + -e 's:-Wsign-compare::g' \ + "${NV_SRC}"/Makefile.kbuild + + # If you set this then it's your own fault when stuff breaks :) + use custom-cflags && sed -i "s:-O:${CFLAGS}:" "${NV_SRC}"/Makefile.* + + # If greater than 2.6.5 use M= instead of SUBDIR= + convert_to_m "${NV_SRC}"/Makefile.kbuild + fi +} + +src_compile() { + # This is already the default on Linux, as there's no toplevel Makefile, but + # on FreeBSD there's one and triggers the kernel module build, as we install + # it by itself, pass this. + + cd "${NV_SRC}" + if use x86-fbsd; then + MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \ + LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die + elif use kernel_linux; then + linux-mod_src_compile + fi +} + +src_install() { + if use kernel_linux; then + linux-mod_src_install + elif use x86-fbsd; then + insinto /boot/modules + doins "${WORKDIR}/${NV_PACKAGE}/src/nvidia.kld" || die + + exeinto /boot/modules + doexe "${WORKDIR}/${NV_PACKAGE}/src/nvidia.ko" || die + fi +} + +pkg_preinst() { + if use kernel_linux; then + linux-mod_pkg_postinst + fi +} + +pkg_postinst() { + if use kernel_linux; then + linux-mod_pkg_postinst + fi + + echo + elog "You must be in the video group to use the NVIDIA device" + elog "For more info, read the docs at" + elog "http://www.gentoo.org/doc/en/nvidia-guide.xml#doc_chap3_sect6" + elog + + elog "This package installs a kernel module and X driver. Both must" + elog "match explicitly in their version. This means, if you restart" + elog "X, you must modprobe -r nvidia before starting it back up" + elog + echo +} + +pkg_postrm() { + if use kernel_linux; then + linux-mod_pkg_postrm + fi +} diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-173.14.34.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-173.14.34.ebuild new file mode 100644 index 00000000..23bf384c --- /dev/null +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-173.14.34.ebuild @@ -0,0 +1,204 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="2" + +inherit eutils unpacker portability versionator linux-mod flag-o-matic nvidia-driver + +X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}" +AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}" +X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}" + +DESCRIPTION="NVIDIA GPUs kernel drivers" +HOMEPAGE="http://www.nvidia.com/" +SRC_URI="x86? ( ftp://download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}-pkg0.run ) + amd64? ( ftp://download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}-pkg2.run ) + x86-fbsd? ( ftp://download.nvidia.com/freebsd/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )" + +LICENSE="NVIDIA" +SLOT="0" +KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd" +IUSE="acpi custom-cflags multilib kernel_linux" +RESTRICT="strip" + +DEPEND="kernel_linux? ( virtual/linux-sources )" +RDEPEND="~x11-drivers/nvidia-userspace-${PV} + multilib? ( ~x11-drivers/nvidia-userspace-${PV}[multilib] ) + acpi? ( sys-power/acpid )" +PDEPEND="" + +if use x86; then + PKG_V="-pkg0" + NV_PACKAGE="${X86_NV_PACKAGE}" +elif use amd64; then + PKG_V="-pkg2" + NV_PACKAGE="${AMD64_NV_PACKAGE}" +elif use x86-fbsd; then + PKG_V="" + NV_PACKAGE="${X86_FBSD_NV_PACKAGE}" +fi + +S="${WORKDIR}/${NV_PACKAGE}${PKG_V}" + +mtrr_check() { + ebegin "Checking for MTRR support" + linux_chkconfig_present MTRR + eend $? + + if [[ $? -ne 0 ]] ; then + eerror "Please enable MTRR support in your kernel config, found at:" + eerror + eerror " Processor type and features" + eerror " [*] MTRR (Memory Type Range Register) support" + eerror + eerror "and recompile your kernel ..." + die "MTRR support not detected!" + fi +} + +lockdep_check() { + if linux_chkconfig_present LOCKDEP; then + eerror "You've enabled LOCKDEP -- lock tracking -- in the kernel." + eerror "Unfortunately, this option exports the symbol 'lockdep_init_map' as GPL-only" + eerror "which will prevent ${P} from compiling." + eerror "Please make sure the following options have been unset:" + eerror " Kernel hacking --->" + eerror " [ ] Lock debugging: detect incorrect freeing of live locks" + eerror " [ ] Lock debugging: prove locking correctness" + eerror " [ ] Lock usage statistics" + eerror "in 'menuconfig'" + die "LOCKDEP enabled" + fi +} + +pkg_setup() { + if use kernel_linux; then + linux-mod_pkg_setup + MODULE_NAMES="nvidia(video:${S}/usr/src/nv)" + BUILD_PARAMS="IGNORE_CC_MISMATCH=yes V=1 SYSSRC=${KV_DIR} \ + SYSOUT=${KV_OUT_DIR} HOST_CC=$(tc-getBUILD_CC)" + # linux-mod_src_compile calls set_arch_to_kernel, which + # sets the ARCH to x86 but NVIDIA's wrapping Makefile + # expects x86_64 or i386 and then converts it to x86 + # later on in the build process + BUILD_FIXES="ARCH=$(uname -m | sed -e 's/i.86/i386/')" + mtrr_check + lockdep_check + fi + + # On BSD userland it wants real make command + use userland_BSD && MAKE="$(get_bmake)" + + export _POSIX2_VERSION="199209" + + # Since Nvidia ships 3 different series of drivers, we need to give the user + # some kind of guidance as to what version they should install. This tries + # to point the user in the right direction but can't be perfect. check + # nvidia-driver.eclass + nvidia-driver-check-warning + + # set variables to where files are in the package structure + if use kernel_FreeBSD; then + NV_SRC="${S}/src" + elif use kernel_linux; then + NV_SRC="${S}/usr/src/nv" + else + die "Could not determine proper NVIDIA package" + fi +} + +src_unpack() { + if use kernel_linux && kernel_is lt 2 6 7; then + echo + ewarn "Your kernel version is ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}" + ewarn "This is not officially supported for ${P}. It is likely you" + ewarn "will not be able to compile or use the kernel module." + ewarn "It is recommended that you upgrade your kernel to a version >= 2.6.7" + echo + ewarn "DO NOT file bug reports for kernel versions less than 2.6.7 as they will be ignored." + fi + + if ! use x86-fbsd; then + mkdir "${S}" + cd "${S}" + unpack_makeself + else + unpack ${A} + fi +} + +src_prepare() { + # Please add a brief description for every added patch + use x86-fbsd && cd doc + + if use kernel_linux; then + # Quiet down warnings the user does not need to see + sed -i \ + -e 's:-Wpointer-arith::g' \ + -e 's:-Wsign-compare::g' \ + "${NV_SRC}"/Makefile.kbuild + + # If you set this then it's your own fault when stuff breaks :) + use custom-cflags && sed -i "s:-O:${CFLAGS}:" "${NV_SRC}"/Makefile.* + + # If greater than 2.6.5 use M= instead of SUBDIR= + convert_to_m "${NV_SRC}"/Makefile.kbuild + fi +} + +src_compile() { + # This is already the default on Linux, as there's no toplevel Makefile, but + # on FreeBSD there's one and triggers the kernel module build, as we install + # it by itself, pass this. + + cd "${NV_SRC}" + if use x86-fbsd; then + MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \ + LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die + elif use kernel_linux; then + linux-mod_src_compile + fi +} + +src_install() { + if use kernel_linux; then + linux-mod_src_install + elif use x86-fbsd; then + insinto /boot/modules + doins "${WORKDIR}/${NV_PACKAGE}/src/nvidia.kld" || die + + exeinto /boot/modules + doexe "${WORKDIR}/${NV_PACKAGE}/src/nvidia.ko" || die + fi +} + +pkg_preinst() { + if use kernel_linux; then + linux-mod_pkg_postinst + fi +} + +pkg_postinst() { + if use kernel_linux; then + linux-mod_pkg_postinst + fi + + echo + elog "You must be in the video group to use the NVIDIA device" + elog "For more info, read the docs at" + elog "http://www.gentoo.org/doc/en/nvidia-guide.xml#doc_chap3_sect6" + elog + + elog "This package installs a kernel module and X driver. Both must" + elog "match explicitly in their version. This means, if you restart" + elog "X, you must modprobe -r nvidia before starting it back up" + elog + echo +} + +pkg_postrm() { + if use kernel_linux; then + linux-mod_pkg_postrm + fi +} diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-173.14.35.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-173.14.35.ebuild new file mode 100644 index 00000000..23bf384c --- /dev/null +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-173.14.35.ebuild @@ -0,0 +1,204 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="2" + +inherit eutils unpacker portability versionator linux-mod flag-o-matic nvidia-driver + +X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}" +AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}" +X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}" + +DESCRIPTION="NVIDIA GPUs kernel drivers" +HOMEPAGE="http://www.nvidia.com/" +SRC_URI="x86? ( ftp://download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}-pkg0.run ) + amd64? ( ftp://download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}-pkg2.run ) + x86-fbsd? ( ftp://download.nvidia.com/freebsd/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )" + +LICENSE="NVIDIA" +SLOT="0" +KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd" +IUSE="acpi custom-cflags multilib kernel_linux" +RESTRICT="strip" + +DEPEND="kernel_linux? ( virtual/linux-sources )" +RDEPEND="~x11-drivers/nvidia-userspace-${PV} + multilib? ( ~x11-drivers/nvidia-userspace-${PV}[multilib] ) + acpi? ( sys-power/acpid )" +PDEPEND="" + +if use x86; then + PKG_V="-pkg0" + NV_PACKAGE="${X86_NV_PACKAGE}" +elif use amd64; then + PKG_V="-pkg2" + NV_PACKAGE="${AMD64_NV_PACKAGE}" +elif use x86-fbsd; then + PKG_V="" + NV_PACKAGE="${X86_FBSD_NV_PACKAGE}" +fi + +S="${WORKDIR}/${NV_PACKAGE}${PKG_V}" + +mtrr_check() { + ebegin "Checking for MTRR support" + linux_chkconfig_present MTRR + eend $? + + if [[ $? -ne 0 ]] ; then + eerror "Please enable MTRR support in your kernel config, found at:" + eerror + eerror " Processor type and features" + eerror " [*] MTRR (Memory Type Range Register) support" + eerror + eerror "and recompile your kernel ..." + die "MTRR support not detected!" + fi +} + +lockdep_check() { + if linux_chkconfig_present LOCKDEP; then + eerror "You've enabled LOCKDEP -- lock tracking -- in the kernel." + eerror "Unfortunately, this option exports the symbol 'lockdep_init_map' as GPL-only" + eerror "which will prevent ${P} from compiling." + eerror "Please make sure the following options have been unset:" + eerror " Kernel hacking --->" + eerror " [ ] Lock debugging: detect incorrect freeing of live locks" + eerror " [ ] Lock debugging: prove locking correctness" + eerror " [ ] Lock usage statistics" + eerror "in 'menuconfig'" + die "LOCKDEP enabled" + fi +} + +pkg_setup() { + if use kernel_linux; then + linux-mod_pkg_setup + MODULE_NAMES="nvidia(video:${S}/usr/src/nv)" + BUILD_PARAMS="IGNORE_CC_MISMATCH=yes V=1 SYSSRC=${KV_DIR} \ + SYSOUT=${KV_OUT_DIR} HOST_CC=$(tc-getBUILD_CC)" + # linux-mod_src_compile calls set_arch_to_kernel, which + # sets the ARCH to x86 but NVIDIA's wrapping Makefile + # expects x86_64 or i386 and then converts it to x86 + # later on in the build process + BUILD_FIXES="ARCH=$(uname -m | sed -e 's/i.86/i386/')" + mtrr_check + lockdep_check + fi + + # On BSD userland it wants real make command + use userland_BSD && MAKE="$(get_bmake)" + + export _POSIX2_VERSION="199209" + + # Since Nvidia ships 3 different series of drivers, we need to give the user + # some kind of guidance as to what version they should install. This tries + # to point the user in the right direction but can't be perfect. check + # nvidia-driver.eclass + nvidia-driver-check-warning + + # set variables to where files are in the package structure + if use kernel_FreeBSD; then + NV_SRC="${S}/src" + elif use kernel_linux; then + NV_SRC="${S}/usr/src/nv" + else + die "Could not determine proper NVIDIA package" + fi +} + +src_unpack() { + if use kernel_linux && kernel_is lt 2 6 7; then + echo + ewarn "Your kernel version is ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}" + ewarn "This is not officially supported for ${P}. It is likely you" + ewarn "will not be able to compile or use the kernel module." + ewarn "It is recommended that you upgrade your kernel to a version >= 2.6.7" + echo + ewarn "DO NOT file bug reports for kernel versions less than 2.6.7 as they will be ignored." + fi + + if ! use x86-fbsd; then + mkdir "${S}" + cd "${S}" + unpack_makeself + else + unpack ${A} + fi +} + +src_prepare() { + # Please add a brief description for every added patch + use x86-fbsd && cd doc + + if use kernel_linux; then + # Quiet down warnings the user does not need to see + sed -i \ + -e 's:-Wpointer-arith::g' \ + -e 's:-Wsign-compare::g' \ + "${NV_SRC}"/Makefile.kbuild + + # If you set this then it's your own fault when stuff breaks :) + use custom-cflags && sed -i "s:-O:${CFLAGS}:" "${NV_SRC}"/Makefile.* + + # If greater than 2.6.5 use M= instead of SUBDIR= + convert_to_m "${NV_SRC}"/Makefile.kbuild + fi +} + +src_compile() { + # This is already the default on Linux, as there's no toplevel Makefile, but + # on FreeBSD there's one and triggers the kernel module build, as we install + # it by itself, pass this. + + cd "${NV_SRC}" + if use x86-fbsd; then + MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \ + LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die + elif use kernel_linux; then + linux-mod_src_compile + fi +} + +src_install() { + if use kernel_linux; then + linux-mod_src_install + elif use x86-fbsd; then + insinto /boot/modules + doins "${WORKDIR}/${NV_PACKAGE}/src/nvidia.kld" || die + + exeinto /boot/modules + doexe "${WORKDIR}/${NV_PACKAGE}/src/nvidia.ko" || die + fi +} + +pkg_preinst() { + if use kernel_linux; then + linux-mod_pkg_postinst + fi +} + +pkg_postinst() { + if use kernel_linux; then + linux-mod_pkg_postinst + fi + + echo + elog "You must be in the video group to use the NVIDIA device" + elog "For more info, read the docs at" + elog "http://www.gentoo.org/doc/en/nvidia-guide.xml#doc_chap3_sect6" + elog + + elog "This package installs a kernel module and X driver. Both must" + elog "match explicitly in their version. This means, if you restart" + elog "X, you must modprobe -r nvidia before starting it back up" + elog + echo +} + +pkg_postrm() { + if use kernel_linux; then + linux-mod_pkg_postrm + fi +} diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-275.09.07.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-275.09.07.ebuild new file mode 100644 index 00000000..d82b365a --- /dev/null +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-275.09.07.ebuild @@ -0,0 +1,192 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="2" + +inherit eutils unpacker portability versionator linux-mod flag-o-matic nvidia-driver + +X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}" +AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}" +X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}" + +DESCRIPTION="NVIDIA GPUs kernel drivers" +HOMEPAGE="http://www.nvidia.com/" +SRC_URI="x86? ( http://download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}.run ) + amd64? ( http://download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run ) + x86-fbsd? ( http://download.nvidia.com/XFree86/FreeBSD-x86/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )" + +LICENSE="NVIDIA" +SLOT="0" +KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd" +IUSE="acpi custom-cflags multilib kernel_linux" +RESTRICT="strip" + +DEPEND="kernel_linux? ( virtual/linux-sources )" +RDEPEND="~x11-drivers/nvidia-userspace-${PV} + multilib? ( ~x11-drivers/nvidia-userspace-${PV}[multilib] ) + x11-libs/libXvMC + acpi? ( sys-power/acpid )" +PDEPEND=">=x11-libs/libvdpau-0.3-r1" + +S="${WORKDIR}/" + +mtrr_check() { + ebegin "Checking for MTRR support" + linux_chkconfig_present MTRR + eend $? + + if [[ $? -ne 0 ]] ; then + eerror "Please enable MTRR support in your kernel config, found at:" + eerror + eerror " Processor type and features" + eerror " [*] MTRR (Memory Type Range Register) support" + eerror + eerror "and recompile your kernel ..." + die "MTRR support not detected!" + fi +} + +lockdep_check() { + if linux_chkconfig_present LOCKDEP; then + eerror "You've enabled LOCKDEP -- lock tracking -- in the kernel." + eerror "Unfortunately, this option exports the symbol " + eerror "'lockdep_init_map' as GPL-only which will prevent " + eerror "${P} from compiling." + eerror "Please make sure the following options have been unset:" + eerror + eerror " Kernel hacking --->" + eerror " [ ] Lock debugging: detect incorrect freeing of live locks" + eerror " [ ] Lock debugging: prove locking correctness" + eerror " [ ] Lock usage statistics" + eerror "in 'menuconfig'" + die "LOCKDEP enabled" + fi +} + +pkg_setup() { + if use kernel_linux; then + linux-mod_pkg_setup + MODULE_NAMES="nvidia(video:${S}/kernel)" + BUILD_PARAMS="IGNORE_CC_MISMATCH=yes V=1 SYSSRC=${KV_DIR} \ + SYSOUT=${KV_OUT_DIR} HOST_CC=$(tc-getBUILD_CC)" + mtrr_check + lockdep_check + fi + + # On BSD userland it wants real make command + use userland_BSD && MAKE="$(get_bmake)" + + export _POSIX2_VERSION="199209" + + # Since Nvidia ships 3 different series of drivers, we need to give the user + # some kind of guidance as to what version they should install. This tries + # to point the user in the right direction but can't be perfect. check + # nvidia-driver.eclass + nvidia-driver-check-warning + + # set variables to where files are in the package structure + if use kernel_FreeBSD; then + NV_SRC="${S}/src" + elif use kernel_linux; then + NV_SRC="${S}/kernel" + else + die "Could not determine proper NVIDIA package" + fi +} + +src_unpack() { + if use kernel_linux && kernel_is lt 2 6 7; then + echo + ewarn "Your kernel version is ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}" + ewarn "This is not officially supported for ${P}. It is likely you" + ewarn "will not be able to compile or use the kernel module." + ewarn "It is recommended that you upgrade your kernel to a version >= 2.6.7" + echo + ewarn "DO NOT file bug reports for kernel versions less than 2.6.7 as they will be ignored." + fi + + if ! use x86-fbsd; then + cd "${S}" + unpack_makeself + else + unpack ${A} + fi +} + +src_prepare() { + # Please add a brief description for every added patch + use x86-fbsd && cd doc + + if use kernel_linux; then + # Quiet down warnings the user does not need to see + sed -i \ + -e 's:-Wsign-compare::g' \ + "${NV_SRC}"/Makefile.kbuild + + # Add support for the 'x86' unified kernel arch in conftest.sh + epatch "${FILESDIR}"/256.35-unified-arch.patch + + # If you set this then it's your own fault when stuff breaks :) + use custom-cflags && sed -i "s:-O:${CFLAGS}:" "${NV_SRC}"/Makefile.* + + # If greater than 2.6.5 use M= instead of SUBDIR= + convert_to_m "${NV_SRC}"/Makefile.kbuild + fi +} + +src_compile() { + # This is already the default on Linux, as there's no toplevel Makefile, but + # on FreeBSD there's one and triggers the kernel module build, as we install + # it by itself, pass this. + + cd "${NV_SRC}" + if use x86-fbsd; then + MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \ + LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die + elif use kernel_linux; then + linux-mod_src_compile + fi +} + +src_install() { + if use kernel_linux; then + linux-mod_src_install + elif use x86-fbsd; then + insinto /boot/modules + doins "${WORKDIR}/${NV_PACKAGE}/src/nvidia.kld" || die + + exeinto /boot/modules + doexe "${WORKDIR}/${NV_PACKAGE}/src/nvidia.ko" || die + fi +} + +pkg_preinst() { + if use kernel_linux; then + linux-mod_pkg_postinst + fi +} + +pkg_postinst() { + if use kernel_linux; then + linux-mod_pkg_postinst + fi + + echo + elog "You must be in the video group to use the NVIDIA device" + elog "For more info, read the docs at" + elog "http://www.gentoo.org/doc/en/nvidia-guide.xml#doc_chap3_sect6" + elog + + elog "This package installs a kernel module and X driver. Both must" + elog "match explicitly in their version. This means, if you restart" + elog "X, you must modprobe -r nvidia before starting it back up" + elog + +} + +pkg_postrm() { + if use kernel_linux; then + linux-mod_pkg_postrm + fi +} diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-280.13.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-280.13.ebuild new file mode 100644 index 00000000..3cbcd0ee --- /dev/null +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-280.13.ebuild @@ -0,0 +1,195 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="2" + +inherit eutils unpacker portability versionator linux-mod flag-o-matic nvidia-driver + +X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}" +AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}" +X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}" + +DESCRIPTION="NVIDIA GPUs kernel drivers" +HOMEPAGE="http://www.nvidia.com/" +SRC_URI="x86? ( http://download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}.run ) + amd64? ( http://download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run ) + x86-fbsd? ( http://download.nvidia.com/XFree86/FreeBSD-x86/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )" + +LICENSE="NVIDIA" +SLOT="0" +KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd" +IUSE="acpi custom-cflags multilib kernel_linux" +RESTRICT="strip" + +DEPEND="kernel_linux? ( virtual/linux-sources )" +RDEPEND="~x11-drivers/nvidia-userspace-${PV} + multilib? ( ~x11-drivers/nvidia-userspace-${PV}[multilib] ) + x11-libs/libXvMC + acpi? ( sys-power/acpid )" +PDEPEND=">=x11-libs/libvdpau-0.3-r1" + +S="${WORKDIR}/" + +mtrr_check() { + ebegin "Checking for MTRR support" + linux_chkconfig_present MTRR + eend $? + + if [[ $? -ne 0 ]] ; then + eerror "Please enable MTRR support in your kernel config, found at:" + eerror + eerror " Processor type and features" + eerror " [*] MTRR (Memory Type Range Register) support" + eerror + eerror "and recompile your kernel ..." + die "MTRR support not detected!" + fi +} + +lockdep_check() { + if linux_chkconfig_present LOCKDEP; then + eerror "You've enabled LOCKDEP -- lock tracking -- in the kernel." + eerror "Unfortunately, this option exports the symbol " + eerror "'lockdep_init_map' as GPL-only which will prevent " + eerror "${P} from compiling." + eerror "Please make sure the following options have been unset:" + eerror + eerror " Kernel hacking --->" + eerror " [ ] Lock debugging: detect incorrect freeing of live locks" + eerror " [ ] Lock debugging: prove locking correctness" + eerror " [ ] Lock usage statistics" + eerror "in 'menuconfig'" + die "LOCKDEP enabled" + fi +} + +pkg_setup() { + if use kernel_linux; then + linux-mod_pkg_setup + MODULE_NAMES="nvidia(video:${S}/kernel)" + BUILD_PARAMS="IGNORE_CC_MISMATCH=yes V=1 SYSSRC=${KV_DIR} \ + SYSOUT=${KV_OUT_DIR} HOST_CC=$(tc-getBUILD_CC)" + mtrr_check + lockdep_check + fi + + # On BSD userland it wants real make command + use userland_BSD && MAKE="$(get_bmake)" + + export _POSIX2_VERSION="199209" + + # Since Nvidia ships 3 different series of drivers, we need to give the user + # some kind of guidance as to what version they should install. This tries + # to point the user in the right direction but can't be perfect. check + # nvidia-driver.eclass + nvidia-driver-check-warning + + # set variables to where files are in the package structure + if use kernel_FreeBSD; then + NV_SRC="${S}/src" + elif use kernel_linux; then + NV_SRC="${S}/kernel" + else + die "Could not determine proper NVIDIA package" + fi +} + +src_unpack() { + if use kernel_linux && kernel_is lt 2 6 7; then + echo + ewarn "Your kernel version is ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}" + ewarn "This is not officially supported for ${P}. It is likely you" + ewarn "will not be able to compile or use the kernel module." + ewarn "It is recommended that you upgrade your kernel to a version >= 2.6.7" + echo + ewarn "DO NOT file bug reports for kernel versions less than 2.6.7 as they will be ignored." + fi + + if ! use x86-fbsd; then + cd "${S}" + unpack_makeself + else + unpack ${A} + fi +} + +src_prepare() { + # Please add a brief description for every added patch + use x86-fbsd && cd doc + + if use kernel_linux; then + # Quiet down warnings the user does not need to see + sed -i \ + -e 's:-Wsign-compare::g' \ + "${NV_SRC}"/Makefile.kbuild + + # Add support for the 'x86' unified kernel arch in conftest.sh + epatch "${FILESDIR}"/256.35-unified-arch.patch + + # If you set this then it's your own fault when stuff breaks :) + use custom-cflags && sed -i "s:-O:${CFLAGS}:" "${NV_SRC}"/Makefile.* + + # If greater than 2.6.5 use M= instead of SUBDIR= + convert_to_m "${NV_SRC}"/Makefile.kbuild + fi +} + +src_compile() { + # This is already the default on Linux, as there's no toplevel Makefile, but + # on FreeBSD there's one and triggers the kernel module build, as we install + # it by itself, pass this. + + cd "${NV_SRC}" + if use x86-fbsd; then + MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \ + LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die + elif use kernel_linux; then + linux-mod_src_compile + fi +} + +src_install() { + if use kernel_linux; then + linux-mod_src_install + elif use x86-fbsd; then + insinto /boot/modules + doins "${WORKDIR}/${NV_PACKAGE}/src/nvidia.kld" || die + + exeinto /boot/modules + doexe "${WORKDIR}/${NV_PACKAGE}/src/nvidia.ko" || die + fi + + # Gentoo bug #375615 -- GTK apps hanging + doenvd "${FILESDIR}"/10nvidia +} + +pkg_preinst() { + if use kernel_linux; then + linux-mod_pkg_postinst + fi +} + +pkg_postinst() { + if use kernel_linux; then + linux-mod_pkg_postinst + fi + + echo + elog "You must be in the video group to use the NVIDIA device" + elog "For more info, read the docs at" + elog "http://www.gentoo.org/doc/en/nvidia-guide.xml#doc_chap3_sect6" + elog + + elog "This package installs a kernel module and X driver. Both must" + elog "match explicitly in their version. This means, if you restart" + elog "X, you must modprobe -r nvidia before starting it back up" + elog + +} + +pkg_postrm() { + if use kernel_linux; then + linux-mod_pkg_postrm + fi +} diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-285.05.09.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-285.05.09.ebuild new file mode 100644 index 00000000..d82b365a --- /dev/null +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-285.05.09.ebuild @@ -0,0 +1,192 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="2" + +inherit eutils unpacker portability versionator linux-mod flag-o-matic nvidia-driver + +X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}" +AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}" +X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}" + +DESCRIPTION="NVIDIA GPUs kernel drivers" +HOMEPAGE="http://www.nvidia.com/" +SRC_URI="x86? ( http://download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}.run ) + amd64? ( http://download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run ) + x86-fbsd? ( http://download.nvidia.com/XFree86/FreeBSD-x86/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )" + +LICENSE="NVIDIA" +SLOT="0" +KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd" +IUSE="acpi custom-cflags multilib kernel_linux" +RESTRICT="strip" + +DEPEND="kernel_linux? ( virtual/linux-sources )" +RDEPEND="~x11-drivers/nvidia-userspace-${PV} + multilib? ( ~x11-drivers/nvidia-userspace-${PV}[multilib] ) + x11-libs/libXvMC + acpi? ( sys-power/acpid )" +PDEPEND=">=x11-libs/libvdpau-0.3-r1" + +S="${WORKDIR}/" + +mtrr_check() { + ebegin "Checking for MTRR support" + linux_chkconfig_present MTRR + eend $? + + if [[ $? -ne 0 ]] ; then + eerror "Please enable MTRR support in your kernel config, found at:" + eerror + eerror " Processor type and features" + eerror " [*] MTRR (Memory Type Range Register) support" + eerror + eerror "and recompile your kernel ..." + die "MTRR support not detected!" + fi +} + +lockdep_check() { + if linux_chkconfig_present LOCKDEP; then + eerror "You've enabled LOCKDEP -- lock tracking -- in the kernel." + eerror "Unfortunately, this option exports the symbol " + eerror "'lockdep_init_map' as GPL-only which will prevent " + eerror "${P} from compiling." + eerror "Please make sure the following options have been unset:" + eerror + eerror " Kernel hacking --->" + eerror " [ ] Lock debugging: detect incorrect freeing of live locks" + eerror " [ ] Lock debugging: prove locking correctness" + eerror " [ ] Lock usage statistics" + eerror "in 'menuconfig'" + die "LOCKDEP enabled" + fi +} + +pkg_setup() { + if use kernel_linux; then + linux-mod_pkg_setup + MODULE_NAMES="nvidia(video:${S}/kernel)" + BUILD_PARAMS="IGNORE_CC_MISMATCH=yes V=1 SYSSRC=${KV_DIR} \ + SYSOUT=${KV_OUT_DIR} HOST_CC=$(tc-getBUILD_CC)" + mtrr_check + lockdep_check + fi + + # On BSD userland it wants real make command + use userland_BSD && MAKE="$(get_bmake)" + + export _POSIX2_VERSION="199209" + + # Since Nvidia ships 3 different series of drivers, we need to give the user + # some kind of guidance as to what version they should install. This tries + # to point the user in the right direction but can't be perfect. check + # nvidia-driver.eclass + nvidia-driver-check-warning + + # set variables to where files are in the package structure + if use kernel_FreeBSD; then + NV_SRC="${S}/src" + elif use kernel_linux; then + NV_SRC="${S}/kernel" + else + die "Could not determine proper NVIDIA package" + fi +} + +src_unpack() { + if use kernel_linux && kernel_is lt 2 6 7; then + echo + ewarn "Your kernel version is ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}" + ewarn "This is not officially supported for ${P}. It is likely you" + ewarn "will not be able to compile or use the kernel module." + ewarn "It is recommended that you upgrade your kernel to a version >= 2.6.7" + echo + ewarn "DO NOT file bug reports for kernel versions less than 2.6.7 as they will be ignored." + fi + + if ! use x86-fbsd; then + cd "${S}" + unpack_makeself + else + unpack ${A} + fi +} + +src_prepare() { + # Please add a brief description for every added patch + use x86-fbsd && cd doc + + if use kernel_linux; then + # Quiet down warnings the user does not need to see + sed -i \ + -e 's:-Wsign-compare::g' \ + "${NV_SRC}"/Makefile.kbuild + + # Add support for the 'x86' unified kernel arch in conftest.sh + epatch "${FILESDIR}"/256.35-unified-arch.patch + + # If you set this then it's your own fault when stuff breaks :) + use custom-cflags && sed -i "s:-O:${CFLAGS}:" "${NV_SRC}"/Makefile.* + + # If greater than 2.6.5 use M= instead of SUBDIR= + convert_to_m "${NV_SRC}"/Makefile.kbuild + fi +} + +src_compile() { + # This is already the default on Linux, as there's no toplevel Makefile, but + # on FreeBSD there's one and triggers the kernel module build, as we install + # it by itself, pass this. + + cd "${NV_SRC}" + if use x86-fbsd; then + MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \ + LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die + elif use kernel_linux; then + linux-mod_src_compile + fi +} + +src_install() { + if use kernel_linux; then + linux-mod_src_install + elif use x86-fbsd; then + insinto /boot/modules + doins "${WORKDIR}/${NV_PACKAGE}/src/nvidia.kld" || die + + exeinto /boot/modules + doexe "${WORKDIR}/${NV_PACKAGE}/src/nvidia.ko" || die + fi +} + +pkg_preinst() { + if use kernel_linux; then + linux-mod_pkg_postinst + fi +} + +pkg_postinst() { + if use kernel_linux; then + linux-mod_pkg_postinst + fi + + echo + elog "You must be in the video group to use the NVIDIA device" + elog "For more info, read the docs at" + elog "http://www.gentoo.org/doc/en/nvidia-guide.xml#doc_chap3_sect6" + elog + + elog "This package installs a kernel module and X driver. Both must" + elog "match explicitly in their version. This means, if you restart" + elog "X, you must modprobe -r nvidia before starting it back up" + elog + +} + +pkg_postrm() { + if use kernel_linux; then + linux-mod_pkg_postrm + fi +} diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-290.10.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-290.10.ebuild new file mode 100644 index 00000000..bd17664d --- /dev/null +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-290.10.ebuild @@ -0,0 +1,195 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="2" + +inherit eutils unpacker portability versionator linux-mod flag-o-matic nvidia-driver + +X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}" +AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}" +X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}" + +DESCRIPTION="NVIDIA GPUs kernel drivers" +HOMEPAGE="http://www.nvidia.com/" +SRC_URI="x86? ( http://download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}.run ) + amd64? ( http://download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run ) + x86-fbsd? ( http://download.nvidia.com/XFree86/FreeBSD-x86/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )" + +LICENSE="NVIDIA" +SLOT="0" +KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd" +IUSE="acpi custom-cflags multilib kernel_linux" +RESTRICT="strip" + +DEPEND="kernel_linux? ( virtual/linux-sources )" +RDEPEND="~x11-drivers/nvidia-userspace-${PV} + multilib? ( ~x11-drivers/nvidia-userspace-${PV}[multilib] ) + x11-libs/libXvMC + acpi? ( sys-power/acpid )" +PDEPEND=">=x11-libs/libvdpau-0.3-r1" + +S="${WORKDIR}/" + +mtrr_check() { + ebegin "Checking for MTRR support" + linux_chkconfig_present MTRR + eend $? + + if [[ $? -ne 0 ]] ; then + eerror "Please enable MTRR support in your kernel config, found at:" + eerror + eerror " Processor type and features" + eerror " [*] MTRR (Memory Type Range Register) support" + eerror + eerror "and recompile your kernel ..." + die "MTRR support not detected!" + fi +} + +lockdep_check() { + if linux_chkconfig_present LOCKDEP; then + eerror "You've enabled LOCKDEP -- lock tracking -- in the kernel." + eerror "Unfortunately, this option exports the symbol " + eerror "'lockdep_init_map' as GPL-only which will prevent " + eerror "${P} from compiling." + eerror "Please make sure the following options have been unset:" + eerror + eerror " Kernel hacking --->" + eerror " [ ] Lock debugging: detect incorrect freeing of live locks" + eerror " [ ] Lock debugging: prove locking correctness" + eerror " [ ] Lock usage statistics" + eerror "in 'menuconfig'" + die "LOCKDEP enabled" + fi +} + +pkg_setup() { + if use kernel_linux; then + linux-mod_pkg_setup + MODULE_NAMES="nvidia(video:${S}/kernel)" + BUILD_PARAMS="IGNORE_CC_MISMATCH=yes V=1 SYSSRC=${KV_DIR} \ + SYSOUT=${KV_OUT_DIR} HOST_CC=$(tc-getBUILD_CC)" + mtrr_check + lockdep_check + fi + + # On BSD userland it wants real make command + use userland_BSD && MAKE="$(get_bmake)" + + export _POSIX2_VERSION="199209" + + # Since Nvidia ships 3 different series of drivers, we need to give the user + # some kind of guidance as to what version they should install. This tries + # to point the user in the right direction but can't be perfect. check + # nvidia-driver.eclass + nvidia-driver-check-warning + + # set variables to where files are in the package structure + if use kernel_FreeBSD; then + NV_SRC="${S}/src" + elif use kernel_linux; then + NV_SRC="${S}/kernel" + else + die "Could not determine proper NVIDIA package" + fi +} + +src_unpack() { + if use kernel_linux && kernel_is lt 2 6 7; then + echo + ewarn "Your kernel version is ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}" + ewarn "This is not officially supported for ${P}. It is likely you" + ewarn "will not be able to compile or use the kernel module." + ewarn "It is recommended that you upgrade your kernel to a version >= 2.6.7" + echo + ewarn "DO NOT file bug reports for kernel versions less than 2.6.7 as they will be ignored." + fi + + if ! use x86-fbsd; then + cd "${S}" + unpack_makeself + else + unpack ${A} + fi +} + +src_prepare() { + # Please add a brief description for every added patch + use x86-fbsd && cd doc + + if use kernel_linux; then + # Quiet down warnings the user does not need to see + sed -i \ + -e 's:-Wsign-compare::g' \ + "${NV_SRC}"/Makefile.kbuild + + # Add support for the 'x86' unified kernel arch in conftest.sh + epatch "${FILESDIR}"/256.35-unified-arch.patch + + # Linux 3.2.8+ and 3.3 patches + epatch "${FILESDIR}/${PN}-290.10-3.2.8+.patch" + + # If you set this then it's your own fault when stuff breaks :) + use custom-cflags && sed -i "s:-O:${CFLAGS}:" "${NV_SRC}"/Makefile.* + + # If greater than 2.6.5 use M= instead of SUBDIR= + convert_to_m "${NV_SRC}"/Makefile.kbuild + fi +} + +src_compile() { + # This is already the default on Linux, as there's no toplevel Makefile, but + # on FreeBSD there's one and triggers the kernel module build, as we install + # it by itself, pass this. + + cd "${NV_SRC}" + if use x86-fbsd; then + MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \ + LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die + elif use kernel_linux; then + linux-mod_src_compile + fi +} + +src_install() { + if use kernel_linux; then + linux-mod_src_install + elif use x86-fbsd; then + insinto /boot/modules + doins "${WORKDIR}/${NV_PACKAGE}/src/nvidia.kld" || die + + exeinto /boot/modules + doexe "${WORKDIR}/${NV_PACKAGE}/src/nvidia.ko" || die + fi +} + +pkg_preinst() { + if use kernel_linux; then + linux-mod_pkg_postinst + fi +} + +pkg_postinst() { + if use kernel_linux; then + linux-mod_pkg_postinst + fi + + echo + elog "You must be in the video group to use the NVIDIA device" + elog "For more info, read the docs at" + elog "http://www.gentoo.org/doc/en/nvidia-guide.xml#doc_chap3_sect6" + elog + + elog "This package installs a kernel module and X driver. Both must" + elog "match explicitly in their version. This means, if you restart" + elog "X, you must modprobe -r nvidia before starting it back up" + elog + +} + +pkg_postrm() { + if use kernel_linux; then + linux-mod_pkg_postrm + fi +} diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-295.20.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-295.20.ebuild new file mode 100644 index 00000000..d82b365a --- /dev/null +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-295.20.ebuild @@ -0,0 +1,192 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="2" + +inherit eutils unpacker portability versionator linux-mod flag-o-matic nvidia-driver + +X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}" +AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}" +X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}" + +DESCRIPTION="NVIDIA GPUs kernel drivers" +HOMEPAGE="http://www.nvidia.com/" +SRC_URI="x86? ( http://download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}.run ) + amd64? ( http://download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run ) + x86-fbsd? ( http://download.nvidia.com/XFree86/FreeBSD-x86/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )" + +LICENSE="NVIDIA" +SLOT="0" +KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd" +IUSE="acpi custom-cflags multilib kernel_linux" +RESTRICT="strip" + +DEPEND="kernel_linux? ( virtual/linux-sources )" +RDEPEND="~x11-drivers/nvidia-userspace-${PV} + multilib? ( ~x11-drivers/nvidia-userspace-${PV}[multilib] ) + x11-libs/libXvMC + acpi? ( sys-power/acpid )" +PDEPEND=">=x11-libs/libvdpau-0.3-r1" + +S="${WORKDIR}/" + +mtrr_check() { + ebegin "Checking for MTRR support" + linux_chkconfig_present MTRR + eend $? + + if [[ $? -ne 0 ]] ; then + eerror "Please enable MTRR support in your kernel config, found at:" + eerror + eerror " Processor type and features" + eerror " [*] MTRR (Memory Type Range Register) support" + eerror + eerror "and recompile your kernel ..." + die "MTRR support not detected!" + fi +} + +lockdep_check() { + if linux_chkconfig_present LOCKDEP; then + eerror "You've enabled LOCKDEP -- lock tracking -- in the kernel." + eerror "Unfortunately, this option exports the symbol " + eerror "'lockdep_init_map' as GPL-only which will prevent " + eerror "${P} from compiling." + eerror "Please make sure the following options have been unset:" + eerror + eerror " Kernel hacking --->" + eerror " [ ] Lock debugging: detect incorrect freeing of live locks" + eerror " [ ] Lock debugging: prove locking correctness" + eerror " [ ] Lock usage statistics" + eerror "in 'menuconfig'" + die "LOCKDEP enabled" + fi +} + +pkg_setup() { + if use kernel_linux; then + linux-mod_pkg_setup + MODULE_NAMES="nvidia(video:${S}/kernel)" + BUILD_PARAMS="IGNORE_CC_MISMATCH=yes V=1 SYSSRC=${KV_DIR} \ + SYSOUT=${KV_OUT_DIR} HOST_CC=$(tc-getBUILD_CC)" + mtrr_check + lockdep_check + fi + + # On BSD userland it wants real make command + use userland_BSD && MAKE="$(get_bmake)" + + export _POSIX2_VERSION="199209" + + # Since Nvidia ships 3 different series of drivers, we need to give the user + # some kind of guidance as to what version they should install. This tries + # to point the user in the right direction but can't be perfect. check + # nvidia-driver.eclass + nvidia-driver-check-warning + + # set variables to where files are in the package structure + if use kernel_FreeBSD; then + NV_SRC="${S}/src" + elif use kernel_linux; then + NV_SRC="${S}/kernel" + else + die "Could not determine proper NVIDIA package" + fi +} + +src_unpack() { + if use kernel_linux && kernel_is lt 2 6 7; then + echo + ewarn "Your kernel version is ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}" + ewarn "This is not officially supported for ${P}. It is likely you" + ewarn "will not be able to compile or use the kernel module." + ewarn "It is recommended that you upgrade your kernel to a version >= 2.6.7" + echo + ewarn "DO NOT file bug reports for kernel versions less than 2.6.7 as they will be ignored." + fi + + if ! use x86-fbsd; then + cd "${S}" + unpack_makeself + else + unpack ${A} + fi +} + +src_prepare() { + # Please add a brief description for every added patch + use x86-fbsd && cd doc + + if use kernel_linux; then + # Quiet down warnings the user does not need to see + sed -i \ + -e 's:-Wsign-compare::g' \ + "${NV_SRC}"/Makefile.kbuild + + # Add support for the 'x86' unified kernel arch in conftest.sh + epatch "${FILESDIR}"/256.35-unified-arch.patch + + # If you set this then it's your own fault when stuff breaks :) + use custom-cflags && sed -i "s:-O:${CFLAGS}:" "${NV_SRC}"/Makefile.* + + # If greater than 2.6.5 use M= instead of SUBDIR= + convert_to_m "${NV_SRC}"/Makefile.kbuild + fi +} + +src_compile() { + # This is already the default on Linux, as there's no toplevel Makefile, but + # on FreeBSD there's one and triggers the kernel module build, as we install + # it by itself, pass this. + + cd "${NV_SRC}" + if use x86-fbsd; then + MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \ + LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die + elif use kernel_linux; then + linux-mod_src_compile + fi +} + +src_install() { + if use kernel_linux; then + linux-mod_src_install + elif use x86-fbsd; then + insinto /boot/modules + doins "${WORKDIR}/${NV_PACKAGE}/src/nvidia.kld" || die + + exeinto /boot/modules + doexe "${WORKDIR}/${NV_PACKAGE}/src/nvidia.ko" || die + fi +} + +pkg_preinst() { + if use kernel_linux; then + linux-mod_pkg_postinst + fi +} + +pkg_postinst() { + if use kernel_linux; then + linux-mod_pkg_postinst + fi + + echo + elog "You must be in the video group to use the NVIDIA device" + elog "For more info, read the docs at" + elog "http://www.gentoo.org/doc/en/nvidia-guide.xml#doc_chap3_sect6" + elog + + elog "This package installs a kernel module and X driver. Both must" + elog "match explicitly in their version. This means, if you restart" + elog "X, you must modprobe -r nvidia before starting it back up" + elog + +} + +pkg_postrm() { + if use kernel_linux; then + linux-mod_pkg_postrm + fi +} diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-295.33.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-295.33.ebuild new file mode 100644 index 00000000..fd51b319 --- /dev/null +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-295.33.ebuild @@ -0,0 +1,192 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="2" + +inherit eutils unpacker portability versionator linux-mod flag-o-matic nvidia-driver + +X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}" +AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}" +X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}" + +DESCRIPTION="NVIDIA GPUs kernel drivers" +HOMEPAGE="http://www.nvidia.com/" +SRC_URI="x86? ( http://us.download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}.run ) + amd64? ( http://us.download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run ) + x86-fbsd? ( http://us.download.nvidia.com/XFree86/FreeBSD-x86/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )" + +LICENSE="NVIDIA" +SLOT="0" +KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd" +IUSE="acpi custom-cflags multilib kernel_linux" +RESTRICT="strip" + +DEPEND="kernel_linux? ( virtual/linux-sources )" +RDEPEND="~x11-drivers/nvidia-userspace-${PV} + multilib? ( ~x11-drivers/nvidia-userspace-${PV}[multilib] ) + x11-libs/libXvMC + acpi? ( sys-power/acpid )" +PDEPEND=">=x11-libs/libvdpau-0.3-r1" + +S="${WORKDIR}/" + +mtrr_check() { + ebegin "Checking for MTRR support" + linux_chkconfig_present MTRR + eend $? + + if [[ $? -ne 0 ]] ; then + eerror "Please enable MTRR support in your kernel config, found at:" + eerror + eerror " Processor type and features" + eerror " [*] MTRR (Memory Type Range Register) support" + eerror + eerror "and recompile your kernel ..." + die "MTRR support not detected!" + fi +} + +lockdep_check() { + if linux_chkconfig_present LOCKDEP; then + eerror "You've enabled LOCKDEP -- lock tracking -- in the kernel." + eerror "Unfortunately, this option exports the symbol " + eerror "'lockdep_init_map' as GPL-only which will prevent " + eerror "${P} from compiling." + eerror "Please make sure the following options have been unset:" + eerror + eerror " Kernel hacking --->" + eerror " [ ] Lock debugging: detect incorrect freeing of live locks" + eerror " [ ] Lock debugging: prove locking correctness" + eerror " [ ] Lock usage statistics" + eerror "in 'menuconfig'" + die "LOCKDEP enabled" + fi +} + +pkg_setup() { + # try to turn off distcc and ccache for people that have a problem with it + export DISTCC_DISABLE=1 + export CCACHE_DISABLE=1 + + if use kernel_linux; then + linux-mod_pkg_setup + MODULE_NAMES="nvidia(video:${S}/kernel)" + BUILD_PARAMS="IGNORE_CC_MISMATCH=yes V=1 SYSSRC=${KV_DIR} \ + SYSOUT=${KV_OUT_DIR} CC=$(tc-getBUILD_CC)" + # linux-mod_src_compile calls set_arch_to_kernel, which + # sets the ARCH to x86 but NVIDIA's wrapping Makefile + # expects x86_64 or i386 and then converts it to x86 + # later on in the build process + BUILD_FIXES="ARCH=$(uname -m | sed -e 's/i.86/i386/')" + mtrr_check + lockdep_check + fi + + # On BSD userland it wants real make command + use userland_BSD && MAKE="$(get_bmake)" + + export _POSIX2_VERSION="199209" + + # Since Nvidia ships 3 different series of drivers, we need to give the user + # some kind of guidance as to what version they should install. This tries + # to point the user in the right direction but can't be perfect. check + # nvidia-driver.eclass + nvidia-driver-check-warning + + # set variables to where files are in the package structure + if use kernel_FreeBSD; then + NV_SRC="${S}/src" + elif use kernel_linux; then + NV_SRC="${S}/kernel" + else + die "Could not determine proper NVIDIA package" + fi +} + +src_unpack() { + if use kernel_linux && kernel_is lt 2 6 7; then + echo + ewarn "Your kernel version is ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}" + ewarn "This is not officially supported for ${P}. It is likely you" + ewarn "will not be able to compile or use the kernel module." + ewarn "It is recommended that you upgrade your kernel to a version >= 2.6.7" + echo + ewarn "DO NOT file bug reports for kernel versions less than 2.6.7 as they will be ignored." + fi + + if ! use x86-fbsd; then + cd "${S}" + unpack_makeself + else + unpack ${A} + fi +} + +src_prepare() { + # Please add a brief description for every added patch + use x86-fbsd && cd doc + + if use kernel_linux; then + # Quiet down warnings the user does not need to see + sed -i \ + -e 's:-Wsign-compare::g' \ + "${NV_SRC}"/Makefile.kbuild + + # If you set this then it's your own fault when stuff breaks :) + use custom-cflags && sed -i "s:-O:${CFLAGS}:" "${NV_SRC}"/Makefile.* + + # If greater than 2.6.5 use M= instead of SUBDIR= + convert_to_m "${NV_SRC}"/Makefile.kbuild + fi +} + +src_compile() { + # This is already the default on Linux, as there's no toplevel Makefile, but + # on FreeBSD there's one and triggers the kernel module build, as we install + # it by itself, pass this. + + cd "${NV_SRC}" + if use x86-fbsd; then + MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \ + LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die + elif use kernel_linux; then + linux-mod_src_compile + fi +} + +src_install() { + if use kernel_linux; then + linux-mod_src_install + elif use x86-fbsd; then + insinto /boot/modules + doins "${WORKDIR}/${NV_PACKAGE}/src/nvidia.kld" || die + + exeinto /boot/modules + doexe "${WORKDIR}/${NV_PACKAGE}/src/nvidia.ko" || die + fi +} + +pkg_preinst() { + use kernel_linux && linux-mod_pkg_postinst +} + +pkg_postinst() { + use kernel_linux && linux-mod_pkg_postinst + + echo + elog "You must be in the video group to use the NVIDIA device" + elog "For more info, read the docs at" + elog "http://www.gentoo.org/doc/en/nvidia-guide.xml#doc_chap3_sect6" + elog + + elog "This package installs a kernel module and X driver. Both must" + elog "match explicitly in their version. This means, if you restart" + elog "X, you must modprobe -r nvidia before starting it back up" + elog + +} + +pkg_postrm() { + use kernel_linux && linux-mod_pkg_postrm +} diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-295.40.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-295.40.ebuild new file mode 100644 index 00000000..fd51b319 --- /dev/null +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-295.40.ebuild @@ -0,0 +1,192 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="2" + +inherit eutils unpacker portability versionator linux-mod flag-o-matic nvidia-driver + +X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}" +AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}" +X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}" + +DESCRIPTION="NVIDIA GPUs kernel drivers" +HOMEPAGE="http://www.nvidia.com/" +SRC_URI="x86? ( http://us.download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}.run ) + amd64? ( http://us.download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run ) + x86-fbsd? ( http://us.download.nvidia.com/XFree86/FreeBSD-x86/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )" + +LICENSE="NVIDIA" +SLOT="0" +KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd" +IUSE="acpi custom-cflags multilib kernel_linux" +RESTRICT="strip" + +DEPEND="kernel_linux? ( virtual/linux-sources )" +RDEPEND="~x11-drivers/nvidia-userspace-${PV} + multilib? ( ~x11-drivers/nvidia-userspace-${PV}[multilib] ) + x11-libs/libXvMC + acpi? ( sys-power/acpid )" +PDEPEND=">=x11-libs/libvdpau-0.3-r1" + +S="${WORKDIR}/" + +mtrr_check() { + ebegin "Checking for MTRR support" + linux_chkconfig_present MTRR + eend $? + + if [[ $? -ne 0 ]] ; then + eerror "Please enable MTRR support in your kernel config, found at:" + eerror + eerror " Processor type and features" + eerror " [*] MTRR (Memory Type Range Register) support" + eerror + eerror "and recompile your kernel ..." + die "MTRR support not detected!" + fi +} + +lockdep_check() { + if linux_chkconfig_present LOCKDEP; then + eerror "You've enabled LOCKDEP -- lock tracking -- in the kernel." + eerror "Unfortunately, this option exports the symbol " + eerror "'lockdep_init_map' as GPL-only which will prevent " + eerror "${P} from compiling." + eerror "Please make sure the following options have been unset:" + eerror + eerror " Kernel hacking --->" + eerror " [ ] Lock debugging: detect incorrect freeing of live locks" + eerror " [ ] Lock debugging: prove locking correctness" + eerror " [ ] Lock usage statistics" + eerror "in 'menuconfig'" + die "LOCKDEP enabled" + fi +} + +pkg_setup() { + # try to turn off distcc and ccache for people that have a problem with it + export DISTCC_DISABLE=1 + export CCACHE_DISABLE=1 + + if use kernel_linux; then + linux-mod_pkg_setup + MODULE_NAMES="nvidia(video:${S}/kernel)" + BUILD_PARAMS="IGNORE_CC_MISMATCH=yes V=1 SYSSRC=${KV_DIR} \ + SYSOUT=${KV_OUT_DIR} CC=$(tc-getBUILD_CC)" + # linux-mod_src_compile calls set_arch_to_kernel, which + # sets the ARCH to x86 but NVIDIA's wrapping Makefile + # expects x86_64 or i386 and then converts it to x86 + # later on in the build process + BUILD_FIXES="ARCH=$(uname -m | sed -e 's/i.86/i386/')" + mtrr_check + lockdep_check + fi + + # On BSD userland it wants real make command + use userland_BSD && MAKE="$(get_bmake)" + + export _POSIX2_VERSION="199209" + + # Since Nvidia ships 3 different series of drivers, we need to give the user + # some kind of guidance as to what version they should install. This tries + # to point the user in the right direction but can't be perfect. check + # nvidia-driver.eclass + nvidia-driver-check-warning + + # set variables to where files are in the package structure + if use kernel_FreeBSD; then + NV_SRC="${S}/src" + elif use kernel_linux; then + NV_SRC="${S}/kernel" + else + die "Could not determine proper NVIDIA package" + fi +} + +src_unpack() { + if use kernel_linux && kernel_is lt 2 6 7; then + echo + ewarn "Your kernel version is ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}" + ewarn "This is not officially supported for ${P}. It is likely you" + ewarn "will not be able to compile or use the kernel module." + ewarn "It is recommended that you upgrade your kernel to a version >= 2.6.7" + echo + ewarn "DO NOT file bug reports for kernel versions less than 2.6.7 as they will be ignored." + fi + + if ! use x86-fbsd; then + cd "${S}" + unpack_makeself + else + unpack ${A} + fi +} + +src_prepare() { + # Please add a brief description for every added patch + use x86-fbsd && cd doc + + if use kernel_linux; then + # Quiet down warnings the user does not need to see + sed -i \ + -e 's:-Wsign-compare::g' \ + "${NV_SRC}"/Makefile.kbuild + + # If you set this then it's your own fault when stuff breaks :) + use custom-cflags && sed -i "s:-O:${CFLAGS}:" "${NV_SRC}"/Makefile.* + + # If greater than 2.6.5 use M= instead of SUBDIR= + convert_to_m "${NV_SRC}"/Makefile.kbuild + fi +} + +src_compile() { + # This is already the default on Linux, as there's no toplevel Makefile, but + # on FreeBSD there's one and triggers the kernel module build, as we install + # it by itself, pass this. + + cd "${NV_SRC}" + if use x86-fbsd; then + MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \ + LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die + elif use kernel_linux; then + linux-mod_src_compile + fi +} + +src_install() { + if use kernel_linux; then + linux-mod_src_install + elif use x86-fbsd; then + insinto /boot/modules + doins "${WORKDIR}/${NV_PACKAGE}/src/nvidia.kld" || die + + exeinto /boot/modules + doexe "${WORKDIR}/${NV_PACKAGE}/src/nvidia.ko" || die + fi +} + +pkg_preinst() { + use kernel_linux && linux-mod_pkg_postinst +} + +pkg_postinst() { + use kernel_linux && linux-mod_pkg_postinst + + echo + elog "You must be in the video group to use the NVIDIA device" + elog "For more info, read the docs at" + elog "http://www.gentoo.org/doc/en/nvidia-guide.xml#doc_chap3_sect6" + elog + + elog "This package installs a kernel module and X driver. Both must" + elog "match explicitly in their version. This means, if you restart" + elog "X, you must modprobe -r nvidia before starting it back up" + elog + +} + +pkg_postrm() { + use kernel_linux && linux-mod_pkg_postrm +} diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-295.49.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-295.49.ebuild new file mode 100644 index 00000000..fd51b319 --- /dev/null +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-295.49.ebuild @@ -0,0 +1,192 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="2" + +inherit eutils unpacker portability versionator linux-mod flag-o-matic nvidia-driver + +X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}" +AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}" +X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}" + +DESCRIPTION="NVIDIA GPUs kernel drivers" +HOMEPAGE="http://www.nvidia.com/" +SRC_URI="x86? ( http://us.download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}.run ) + amd64? ( http://us.download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run ) + x86-fbsd? ( http://us.download.nvidia.com/XFree86/FreeBSD-x86/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )" + +LICENSE="NVIDIA" +SLOT="0" +KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd" +IUSE="acpi custom-cflags multilib kernel_linux" +RESTRICT="strip" + +DEPEND="kernel_linux? ( virtual/linux-sources )" +RDEPEND="~x11-drivers/nvidia-userspace-${PV} + multilib? ( ~x11-drivers/nvidia-userspace-${PV}[multilib] ) + x11-libs/libXvMC + acpi? ( sys-power/acpid )" +PDEPEND=">=x11-libs/libvdpau-0.3-r1" + +S="${WORKDIR}/" + +mtrr_check() { + ebegin "Checking for MTRR support" + linux_chkconfig_present MTRR + eend $? + + if [[ $? -ne 0 ]] ; then + eerror "Please enable MTRR support in your kernel config, found at:" + eerror + eerror " Processor type and features" + eerror " [*] MTRR (Memory Type Range Register) support" + eerror + eerror "and recompile your kernel ..." + die "MTRR support not detected!" + fi +} + +lockdep_check() { + if linux_chkconfig_present LOCKDEP; then + eerror "You've enabled LOCKDEP -- lock tracking -- in the kernel." + eerror "Unfortunately, this option exports the symbol " + eerror "'lockdep_init_map' as GPL-only which will prevent " + eerror "${P} from compiling." + eerror "Please make sure the following options have been unset:" + eerror + eerror " Kernel hacking --->" + eerror " [ ] Lock debugging: detect incorrect freeing of live locks" + eerror " [ ] Lock debugging: prove locking correctness" + eerror " [ ] Lock usage statistics" + eerror "in 'menuconfig'" + die "LOCKDEP enabled" + fi +} + +pkg_setup() { + # try to turn off distcc and ccache for people that have a problem with it + export DISTCC_DISABLE=1 + export CCACHE_DISABLE=1 + + if use kernel_linux; then + linux-mod_pkg_setup + MODULE_NAMES="nvidia(video:${S}/kernel)" + BUILD_PARAMS="IGNORE_CC_MISMATCH=yes V=1 SYSSRC=${KV_DIR} \ + SYSOUT=${KV_OUT_DIR} CC=$(tc-getBUILD_CC)" + # linux-mod_src_compile calls set_arch_to_kernel, which + # sets the ARCH to x86 but NVIDIA's wrapping Makefile + # expects x86_64 or i386 and then converts it to x86 + # later on in the build process + BUILD_FIXES="ARCH=$(uname -m | sed -e 's/i.86/i386/')" + mtrr_check + lockdep_check + fi + + # On BSD userland it wants real make command + use userland_BSD && MAKE="$(get_bmake)" + + export _POSIX2_VERSION="199209" + + # Since Nvidia ships 3 different series of drivers, we need to give the user + # some kind of guidance as to what version they should install. This tries + # to point the user in the right direction but can't be perfect. check + # nvidia-driver.eclass + nvidia-driver-check-warning + + # set variables to where files are in the package structure + if use kernel_FreeBSD; then + NV_SRC="${S}/src" + elif use kernel_linux; then + NV_SRC="${S}/kernel" + else + die "Could not determine proper NVIDIA package" + fi +} + +src_unpack() { + if use kernel_linux && kernel_is lt 2 6 7; then + echo + ewarn "Your kernel version is ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}" + ewarn "This is not officially supported for ${P}. It is likely you" + ewarn "will not be able to compile or use the kernel module." + ewarn "It is recommended that you upgrade your kernel to a version >= 2.6.7" + echo + ewarn "DO NOT file bug reports for kernel versions less than 2.6.7 as they will be ignored." + fi + + if ! use x86-fbsd; then + cd "${S}" + unpack_makeself + else + unpack ${A} + fi +} + +src_prepare() { + # Please add a brief description for every added patch + use x86-fbsd && cd doc + + if use kernel_linux; then + # Quiet down warnings the user does not need to see + sed -i \ + -e 's:-Wsign-compare::g' \ + "${NV_SRC}"/Makefile.kbuild + + # If you set this then it's your own fault when stuff breaks :) + use custom-cflags && sed -i "s:-O:${CFLAGS}:" "${NV_SRC}"/Makefile.* + + # If greater than 2.6.5 use M= instead of SUBDIR= + convert_to_m "${NV_SRC}"/Makefile.kbuild + fi +} + +src_compile() { + # This is already the default on Linux, as there's no toplevel Makefile, but + # on FreeBSD there's one and triggers the kernel module build, as we install + # it by itself, pass this. + + cd "${NV_SRC}" + if use x86-fbsd; then + MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \ + LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die + elif use kernel_linux; then + linux-mod_src_compile + fi +} + +src_install() { + if use kernel_linux; then + linux-mod_src_install + elif use x86-fbsd; then + insinto /boot/modules + doins "${WORKDIR}/${NV_PACKAGE}/src/nvidia.kld" || die + + exeinto /boot/modules + doexe "${WORKDIR}/${NV_PACKAGE}/src/nvidia.ko" || die + fi +} + +pkg_preinst() { + use kernel_linux && linux-mod_pkg_postinst +} + +pkg_postinst() { + use kernel_linux && linux-mod_pkg_postinst + + echo + elog "You must be in the video group to use the NVIDIA device" + elog "For more info, read the docs at" + elog "http://www.gentoo.org/doc/en/nvidia-guide.xml#doc_chap3_sect6" + elog + + elog "This package installs a kernel module and X driver. Both must" + elog "match explicitly in their version. This means, if you restart" + elog "X, you must modprobe -r nvidia before starting it back up" + elog + +} + +pkg_postrm() { + use kernel_linux && linux-mod_pkg_postrm +} diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-295.53.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-295.53.ebuild new file mode 100644 index 00000000..fd51b319 --- /dev/null +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-295.53.ebuild @@ -0,0 +1,192 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="2" + +inherit eutils unpacker portability versionator linux-mod flag-o-matic nvidia-driver + +X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}" +AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}" +X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}" + +DESCRIPTION="NVIDIA GPUs kernel drivers" +HOMEPAGE="http://www.nvidia.com/" +SRC_URI="x86? ( http://us.download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}.run ) + amd64? ( http://us.download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run ) + x86-fbsd? ( http://us.download.nvidia.com/XFree86/FreeBSD-x86/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )" + +LICENSE="NVIDIA" +SLOT="0" +KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd" +IUSE="acpi custom-cflags multilib kernel_linux" +RESTRICT="strip" + +DEPEND="kernel_linux? ( virtual/linux-sources )" +RDEPEND="~x11-drivers/nvidia-userspace-${PV} + multilib? ( ~x11-drivers/nvidia-userspace-${PV}[multilib] ) + x11-libs/libXvMC + acpi? ( sys-power/acpid )" +PDEPEND=">=x11-libs/libvdpau-0.3-r1" + +S="${WORKDIR}/" + +mtrr_check() { + ebegin "Checking for MTRR support" + linux_chkconfig_present MTRR + eend $? + + if [[ $? -ne 0 ]] ; then + eerror "Please enable MTRR support in your kernel config, found at:" + eerror + eerror " Processor type and features" + eerror " [*] MTRR (Memory Type Range Register) support" + eerror + eerror "and recompile your kernel ..." + die "MTRR support not detected!" + fi +} + +lockdep_check() { + if linux_chkconfig_present LOCKDEP; then + eerror "You've enabled LOCKDEP -- lock tracking -- in the kernel." + eerror "Unfortunately, this option exports the symbol " + eerror "'lockdep_init_map' as GPL-only which will prevent " + eerror "${P} from compiling." + eerror "Please make sure the following options have been unset:" + eerror + eerror " Kernel hacking --->" + eerror " [ ] Lock debugging: detect incorrect freeing of live locks" + eerror " [ ] Lock debugging: prove locking correctness" + eerror " [ ] Lock usage statistics" + eerror "in 'menuconfig'" + die "LOCKDEP enabled" + fi +} + +pkg_setup() { + # try to turn off distcc and ccache for people that have a problem with it + export DISTCC_DISABLE=1 + export CCACHE_DISABLE=1 + + if use kernel_linux; then + linux-mod_pkg_setup + MODULE_NAMES="nvidia(video:${S}/kernel)" + BUILD_PARAMS="IGNORE_CC_MISMATCH=yes V=1 SYSSRC=${KV_DIR} \ + SYSOUT=${KV_OUT_DIR} CC=$(tc-getBUILD_CC)" + # linux-mod_src_compile calls set_arch_to_kernel, which + # sets the ARCH to x86 but NVIDIA's wrapping Makefile + # expects x86_64 or i386 and then converts it to x86 + # later on in the build process + BUILD_FIXES="ARCH=$(uname -m | sed -e 's/i.86/i386/')" + mtrr_check + lockdep_check + fi + + # On BSD userland it wants real make command + use userland_BSD && MAKE="$(get_bmake)" + + export _POSIX2_VERSION="199209" + + # Since Nvidia ships 3 different series of drivers, we need to give the user + # some kind of guidance as to what version they should install. This tries + # to point the user in the right direction but can't be perfect. check + # nvidia-driver.eclass + nvidia-driver-check-warning + + # set variables to where files are in the package structure + if use kernel_FreeBSD; then + NV_SRC="${S}/src" + elif use kernel_linux; then + NV_SRC="${S}/kernel" + else + die "Could not determine proper NVIDIA package" + fi +} + +src_unpack() { + if use kernel_linux && kernel_is lt 2 6 7; then + echo + ewarn "Your kernel version is ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}" + ewarn "This is not officially supported for ${P}. It is likely you" + ewarn "will not be able to compile or use the kernel module." + ewarn "It is recommended that you upgrade your kernel to a version >= 2.6.7" + echo + ewarn "DO NOT file bug reports for kernel versions less than 2.6.7 as they will be ignored." + fi + + if ! use x86-fbsd; then + cd "${S}" + unpack_makeself + else + unpack ${A} + fi +} + +src_prepare() { + # Please add a brief description for every added patch + use x86-fbsd && cd doc + + if use kernel_linux; then + # Quiet down warnings the user does not need to see + sed -i \ + -e 's:-Wsign-compare::g' \ + "${NV_SRC}"/Makefile.kbuild + + # If you set this then it's your own fault when stuff breaks :) + use custom-cflags && sed -i "s:-O:${CFLAGS}:" "${NV_SRC}"/Makefile.* + + # If greater than 2.6.5 use M= instead of SUBDIR= + convert_to_m "${NV_SRC}"/Makefile.kbuild + fi +} + +src_compile() { + # This is already the default on Linux, as there's no toplevel Makefile, but + # on FreeBSD there's one and triggers the kernel module build, as we install + # it by itself, pass this. + + cd "${NV_SRC}" + if use x86-fbsd; then + MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \ + LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die + elif use kernel_linux; then + linux-mod_src_compile + fi +} + +src_install() { + if use kernel_linux; then + linux-mod_src_install + elif use x86-fbsd; then + insinto /boot/modules + doins "${WORKDIR}/${NV_PACKAGE}/src/nvidia.kld" || die + + exeinto /boot/modules + doexe "${WORKDIR}/${NV_PACKAGE}/src/nvidia.ko" || die + fi +} + +pkg_preinst() { + use kernel_linux && linux-mod_pkg_postinst +} + +pkg_postinst() { + use kernel_linux && linux-mod_pkg_postinst + + echo + elog "You must be in the video group to use the NVIDIA device" + elog "For more info, read the docs at" + elog "http://www.gentoo.org/doc/en/nvidia-guide.xml#doc_chap3_sect6" + elog + + elog "This package installs a kernel module and X driver. Both must" + elog "match explicitly in their version. This means, if you restart" + elog "X, you must modprobe -r nvidia before starting it back up" + elog + +} + +pkg_postrm() { + use kernel_linux && linux-mod_pkg_postrm +} diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-295.59.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-295.59.ebuild new file mode 100644 index 00000000..fd51b319 --- /dev/null +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-295.59.ebuild @@ -0,0 +1,192 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="2" + +inherit eutils unpacker portability versionator linux-mod flag-o-matic nvidia-driver + +X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}" +AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}" +X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}" + +DESCRIPTION="NVIDIA GPUs kernel drivers" +HOMEPAGE="http://www.nvidia.com/" +SRC_URI="x86? ( http://us.download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}.run ) + amd64? ( http://us.download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run ) + x86-fbsd? ( http://us.download.nvidia.com/XFree86/FreeBSD-x86/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )" + +LICENSE="NVIDIA" +SLOT="0" +KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd" +IUSE="acpi custom-cflags multilib kernel_linux" +RESTRICT="strip" + +DEPEND="kernel_linux? ( virtual/linux-sources )" +RDEPEND="~x11-drivers/nvidia-userspace-${PV} + multilib? ( ~x11-drivers/nvidia-userspace-${PV}[multilib] ) + x11-libs/libXvMC + acpi? ( sys-power/acpid )" +PDEPEND=">=x11-libs/libvdpau-0.3-r1" + +S="${WORKDIR}/" + +mtrr_check() { + ebegin "Checking for MTRR support" + linux_chkconfig_present MTRR + eend $? + + if [[ $? -ne 0 ]] ; then + eerror "Please enable MTRR support in your kernel config, found at:" + eerror + eerror " Processor type and features" + eerror " [*] MTRR (Memory Type Range Register) support" + eerror + eerror "and recompile your kernel ..." + die "MTRR support not detected!" + fi +} + +lockdep_check() { + if linux_chkconfig_present LOCKDEP; then + eerror "You've enabled LOCKDEP -- lock tracking -- in the kernel." + eerror "Unfortunately, this option exports the symbol " + eerror "'lockdep_init_map' as GPL-only which will prevent " + eerror "${P} from compiling." + eerror "Please make sure the following options have been unset:" + eerror + eerror " Kernel hacking --->" + eerror " [ ] Lock debugging: detect incorrect freeing of live locks" + eerror " [ ] Lock debugging: prove locking correctness" + eerror " [ ] Lock usage statistics" + eerror "in 'menuconfig'" + die "LOCKDEP enabled" + fi +} + +pkg_setup() { + # try to turn off distcc and ccache for people that have a problem with it + export DISTCC_DISABLE=1 + export CCACHE_DISABLE=1 + + if use kernel_linux; then + linux-mod_pkg_setup + MODULE_NAMES="nvidia(video:${S}/kernel)" + BUILD_PARAMS="IGNORE_CC_MISMATCH=yes V=1 SYSSRC=${KV_DIR} \ + SYSOUT=${KV_OUT_DIR} CC=$(tc-getBUILD_CC)" + # linux-mod_src_compile calls set_arch_to_kernel, which + # sets the ARCH to x86 but NVIDIA's wrapping Makefile + # expects x86_64 or i386 and then converts it to x86 + # later on in the build process + BUILD_FIXES="ARCH=$(uname -m | sed -e 's/i.86/i386/')" + mtrr_check + lockdep_check + fi + + # On BSD userland it wants real make command + use userland_BSD && MAKE="$(get_bmake)" + + export _POSIX2_VERSION="199209" + + # Since Nvidia ships 3 different series of drivers, we need to give the user + # some kind of guidance as to what version they should install. This tries + # to point the user in the right direction but can't be perfect. check + # nvidia-driver.eclass + nvidia-driver-check-warning + + # set variables to where files are in the package structure + if use kernel_FreeBSD; then + NV_SRC="${S}/src" + elif use kernel_linux; then + NV_SRC="${S}/kernel" + else + die "Could not determine proper NVIDIA package" + fi +} + +src_unpack() { + if use kernel_linux && kernel_is lt 2 6 7; then + echo + ewarn "Your kernel version is ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}" + ewarn "This is not officially supported for ${P}. It is likely you" + ewarn "will not be able to compile or use the kernel module." + ewarn "It is recommended that you upgrade your kernel to a version >= 2.6.7" + echo + ewarn "DO NOT file bug reports for kernel versions less than 2.6.7 as they will be ignored." + fi + + if ! use x86-fbsd; then + cd "${S}" + unpack_makeself + else + unpack ${A} + fi +} + +src_prepare() { + # Please add a brief description for every added patch + use x86-fbsd && cd doc + + if use kernel_linux; then + # Quiet down warnings the user does not need to see + sed -i \ + -e 's:-Wsign-compare::g' \ + "${NV_SRC}"/Makefile.kbuild + + # If you set this then it's your own fault when stuff breaks :) + use custom-cflags && sed -i "s:-O:${CFLAGS}:" "${NV_SRC}"/Makefile.* + + # If greater than 2.6.5 use M= instead of SUBDIR= + convert_to_m "${NV_SRC}"/Makefile.kbuild + fi +} + +src_compile() { + # This is already the default on Linux, as there's no toplevel Makefile, but + # on FreeBSD there's one and triggers the kernel module build, as we install + # it by itself, pass this. + + cd "${NV_SRC}" + if use x86-fbsd; then + MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \ + LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die + elif use kernel_linux; then + linux-mod_src_compile + fi +} + +src_install() { + if use kernel_linux; then + linux-mod_src_install + elif use x86-fbsd; then + insinto /boot/modules + doins "${WORKDIR}/${NV_PACKAGE}/src/nvidia.kld" || die + + exeinto /boot/modules + doexe "${WORKDIR}/${NV_PACKAGE}/src/nvidia.ko" || die + fi +} + +pkg_preinst() { + use kernel_linux && linux-mod_pkg_postinst +} + +pkg_postinst() { + use kernel_linux && linux-mod_pkg_postinst + + echo + elog "You must be in the video group to use the NVIDIA device" + elog "For more info, read the docs at" + elog "http://www.gentoo.org/doc/en/nvidia-guide.xml#doc_chap3_sect6" + elog + + elog "This package installs a kernel module and X driver. Both must" + elog "match explicitly in their version. This means, if you restart" + elog "X, you must modprobe -r nvidia before starting it back up" + elog + +} + +pkg_postrm() { + use kernel_linux && linux-mod_pkg_postrm +} diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-302.17.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-302.17.ebuild new file mode 100644 index 00000000..fd51b319 --- /dev/null +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-302.17.ebuild @@ -0,0 +1,192 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="2" + +inherit eutils unpacker portability versionator linux-mod flag-o-matic nvidia-driver + +X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}" +AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}" +X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}" + +DESCRIPTION="NVIDIA GPUs kernel drivers" +HOMEPAGE="http://www.nvidia.com/" +SRC_URI="x86? ( http://us.download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}.run ) + amd64? ( http://us.download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run ) + x86-fbsd? ( http://us.download.nvidia.com/XFree86/FreeBSD-x86/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )" + +LICENSE="NVIDIA" +SLOT="0" +KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd" +IUSE="acpi custom-cflags multilib kernel_linux" +RESTRICT="strip" + +DEPEND="kernel_linux? ( virtual/linux-sources )" +RDEPEND="~x11-drivers/nvidia-userspace-${PV} + multilib? ( ~x11-drivers/nvidia-userspace-${PV}[multilib] ) + x11-libs/libXvMC + acpi? ( sys-power/acpid )" +PDEPEND=">=x11-libs/libvdpau-0.3-r1" + +S="${WORKDIR}/" + +mtrr_check() { + ebegin "Checking for MTRR support" + linux_chkconfig_present MTRR + eend $? + + if [[ $? -ne 0 ]] ; then + eerror "Please enable MTRR support in your kernel config, found at:" + eerror + eerror " Processor type and features" + eerror " [*] MTRR (Memory Type Range Register) support" + eerror + eerror "and recompile your kernel ..." + die "MTRR support not detected!" + fi +} + +lockdep_check() { + if linux_chkconfig_present LOCKDEP; then + eerror "You've enabled LOCKDEP -- lock tracking -- in the kernel." + eerror "Unfortunately, this option exports the symbol " + eerror "'lockdep_init_map' as GPL-only which will prevent " + eerror "${P} from compiling." + eerror "Please make sure the following options have been unset:" + eerror + eerror " Kernel hacking --->" + eerror " [ ] Lock debugging: detect incorrect freeing of live locks" + eerror " [ ] Lock debugging: prove locking correctness" + eerror " [ ] Lock usage statistics" + eerror "in 'menuconfig'" + die "LOCKDEP enabled" + fi +} + +pkg_setup() { + # try to turn off distcc and ccache for people that have a problem with it + export DISTCC_DISABLE=1 + export CCACHE_DISABLE=1 + + if use kernel_linux; then + linux-mod_pkg_setup + MODULE_NAMES="nvidia(video:${S}/kernel)" + BUILD_PARAMS="IGNORE_CC_MISMATCH=yes V=1 SYSSRC=${KV_DIR} \ + SYSOUT=${KV_OUT_DIR} CC=$(tc-getBUILD_CC)" + # linux-mod_src_compile calls set_arch_to_kernel, which + # sets the ARCH to x86 but NVIDIA's wrapping Makefile + # expects x86_64 or i386 and then converts it to x86 + # later on in the build process + BUILD_FIXES="ARCH=$(uname -m | sed -e 's/i.86/i386/')" + mtrr_check + lockdep_check + fi + + # On BSD userland it wants real make command + use userland_BSD && MAKE="$(get_bmake)" + + export _POSIX2_VERSION="199209" + + # Since Nvidia ships 3 different series of drivers, we need to give the user + # some kind of guidance as to what version they should install. This tries + # to point the user in the right direction but can't be perfect. check + # nvidia-driver.eclass + nvidia-driver-check-warning + + # set variables to where files are in the package structure + if use kernel_FreeBSD; then + NV_SRC="${S}/src" + elif use kernel_linux; then + NV_SRC="${S}/kernel" + else + die "Could not determine proper NVIDIA package" + fi +} + +src_unpack() { + if use kernel_linux && kernel_is lt 2 6 7; then + echo + ewarn "Your kernel version is ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}" + ewarn "This is not officially supported for ${P}. It is likely you" + ewarn "will not be able to compile or use the kernel module." + ewarn "It is recommended that you upgrade your kernel to a version >= 2.6.7" + echo + ewarn "DO NOT file bug reports for kernel versions less than 2.6.7 as they will be ignored." + fi + + if ! use x86-fbsd; then + cd "${S}" + unpack_makeself + else + unpack ${A} + fi +} + +src_prepare() { + # Please add a brief description for every added patch + use x86-fbsd && cd doc + + if use kernel_linux; then + # Quiet down warnings the user does not need to see + sed -i \ + -e 's:-Wsign-compare::g' \ + "${NV_SRC}"/Makefile.kbuild + + # If you set this then it's your own fault when stuff breaks :) + use custom-cflags && sed -i "s:-O:${CFLAGS}:" "${NV_SRC}"/Makefile.* + + # If greater than 2.6.5 use M= instead of SUBDIR= + convert_to_m "${NV_SRC}"/Makefile.kbuild + fi +} + +src_compile() { + # This is already the default on Linux, as there's no toplevel Makefile, but + # on FreeBSD there's one and triggers the kernel module build, as we install + # it by itself, pass this. + + cd "${NV_SRC}" + if use x86-fbsd; then + MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \ + LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die + elif use kernel_linux; then + linux-mod_src_compile + fi +} + +src_install() { + if use kernel_linux; then + linux-mod_src_install + elif use x86-fbsd; then + insinto /boot/modules + doins "${WORKDIR}/${NV_PACKAGE}/src/nvidia.kld" || die + + exeinto /boot/modules + doexe "${WORKDIR}/${NV_PACKAGE}/src/nvidia.ko" || die + fi +} + +pkg_preinst() { + use kernel_linux && linux-mod_pkg_postinst +} + +pkg_postinst() { + use kernel_linux && linux-mod_pkg_postinst + + echo + elog "You must be in the video group to use the NVIDIA device" + elog "For more info, read the docs at" + elog "http://www.gentoo.org/doc/en/nvidia-guide.xml#doc_chap3_sect6" + elog + + elog "This package installs a kernel module and X driver. Both must" + elog "match explicitly in their version. This means, if you restart" + elog "X, you must modprobe -r nvidia before starting it back up" + elog + +} + +pkg_postrm() { + use kernel_linux && linux-mod_pkg_postrm +} diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-304.22.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-304.22.ebuild new file mode 100644 index 00000000..fd51b319 --- /dev/null +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-304.22.ebuild @@ -0,0 +1,192 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="2" + +inherit eutils unpacker portability versionator linux-mod flag-o-matic nvidia-driver + +X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}" +AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}" +X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}" + +DESCRIPTION="NVIDIA GPUs kernel drivers" +HOMEPAGE="http://www.nvidia.com/" +SRC_URI="x86? ( http://us.download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}.run ) + amd64? ( http://us.download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run ) + x86-fbsd? ( http://us.download.nvidia.com/XFree86/FreeBSD-x86/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )" + +LICENSE="NVIDIA" +SLOT="0" +KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd" +IUSE="acpi custom-cflags multilib kernel_linux" +RESTRICT="strip" + +DEPEND="kernel_linux? ( virtual/linux-sources )" +RDEPEND="~x11-drivers/nvidia-userspace-${PV} + multilib? ( ~x11-drivers/nvidia-userspace-${PV}[multilib] ) + x11-libs/libXvMC + acpi? ( sys-power/acpid )" +PDEPEND=">=x11-libs/libvdpau-0.3-r1" + +S="${WORKDIR}/" + +mtrr_check() { + ebegin "Checking for MTRR support" + linux_chkconfig_present MTRR + eend $? + + if [[ $? -ne 0 ]] ; then + eerror "Please enable MTRR support in your kernel config, found at:" + eerror + eerror " Processor type and features" + eerror " [*] MTRR (Memory Type Range Register) support" + eerror + eerror "and recompile your kernel ..." + die "MTRR support not detected!" + fi +} + +lockdep_check() { + if linux_chkconfig_present LOCKDEP; then + eerror "You've enabled LOCKDEP -- lock tracking -- in the kernel." + eerror "Unfortunately, this option exports the symbol " + eerror "'lockdep_init_map' as GPL-only which will prevent " + eerror "${P} from compiling." + eerror "Please make sure the following options have been unset:" + eerror + eerror " Kernel hacking --->" + eerror " [ ] Lock debugging: detect incorrect freeing of live locks" + eerror " [ ] Lock debugging: prove locking correctness" + eerror " [ ] Lock usage statistics" + eerror "in 'menuconfig'" + die "LOCKDEP enabled" + fi +} + +pkg_setup() { + # try to turn off distcc and ccache for people that have a problem with it + export DISTCC_DISABLE=1 + export CCACHE_DISABLE=1 + + if use kernel_linux; then + linux-mod_pkg_setup + MODULE_NAMES="nvidia(video:${S}/kernel)" + BUILD_PARAMS="IGNORE_CC_MISMATCH=yes V=1 SYSSRC=${KV_DIR} \ + SYSOUT=${KV_OUT_DIR} CC=$(tc-getBUILD_CC)" + # linux-mod_src_compile calls set_arch_to_kernel, which + # sets the ARCH to x86 but NVIDIA's wrapping Makefile + # expects x86_64 or i386 and then converts it to x86 + # later on in the build process + BUILD_FIXES="ARCH=$(uname -m | sed -e 's/i.86/i386/')" + mtrr_check + lockdep_check + fi + + # On BSD userland it wants real make command + use userland_BSD && MAKE="$(get_bmake)" + + export _POSIX2_VERSION="199209" + + # Since Nvidia ships 3 different series of drivers, we need to give the user + # some kind of guidance as to what version they should install. This tries + # to point the user in the right direction but can't be perfect. check + # nvidia-driver.eclass + nvidia-driver-check-warning + + # set variables to where files are in the package structure + if use kernel_FreeBSD; then + NV_SRC="${S}/src" + elif use kernel_linux; then + NV_SRC="${S}/kernel" + else + die "Could not determine proper NVIDIA package" + fi +} + +src_unpack() { + if use kernel_linux && kernel_is lt 2 6 7; then + echo + ewarn "Your kernel version is ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}" + ewarn "This is not officially supported for ${P}. It is likely you" + ewarn "will not be able to compile or use the kernel module." + ewarn "It is recommended that you upgrade your kernel to a version >= 2.6.7" + echo + ewarn "DO NOT file bug reports for kernel versions less than 2.6.7 as they will be ignored." + fi + + if ! use x86-fbsd; then + cd "${S}" + unpack_makeself + else + unpack ${A} + fi +} + +src_prepare() { + # Please add a brief description for every added patch + use x86-fbsd && cd doc + + if use kernel_linux; then + # Quiet down warnings the user does not need to see + sed -i \ + -e 's:-Wsign-compare::g' \ + "${NV_SRC}"/Makefile.kbuild + + # If you set this then it's your own fault when stuff breaks :) + use custom-cflags && sed -i "s:-O:${CFLAGS}:" "${NV_SRC}"/Makefile.* + + # If greater than 2.6.5 use M= instead of SUBDIR= + convert_to_m "${NV_SRC}"/Makefile.kbuild + fi +} + +src_compile() { + # This is already the default on Linux, as there's no toplevel Makefile, but + # on FreeBSD there's one and triggers the kernel module build, as we install + # it by itself, pass this. + + cd "${NV_SRC}" + if use x86-fbsd; then + MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \ + LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die + elif use kernel_linux; then + linux-mod_src_compile + fi +} + +src_install() { + if use kernel_linux; then + linux-mod_src_install + elif use x86-fbsd; then + insinto /boot/modules + doins "${WORKDIR}/${NV_PACKAGE}/src/nvidia.kld" || die + + exeinto /boot/modules + doexe "${WORKDIR}/${NV_PACKAGE}/src/nvidia.ko" || die + fi +} + +pkg_preinst() { + use kernel_linux && linux-mod_pkg_postinst +} + +pkg_postinst() { + use kernel_linux && linux-mod_pkg_postinst + + echo + elog "You must be in the video group to use the NVIDIA device" + elog "For more info, read the docs at" + elog "http://www.gentoo.org/doc/en/nvidia-guide.xml#doc_chap3_sect6" + elog + + elog "This package installs a kernel module and X driver. Both must" + elog "match explicitly in their version. This means, if you restart" + elog "X, you must modprobe -r nvidia before starting it back up" + elog + +} + +pkg_postrm() { + use kernel_linux && linux-mod_pkg_postrm +} diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-304.37.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-304.37.ebuild new file mode 100644 index 00000000..c26611c4 --- /dev/null +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-304.37.ebuild @@ -0,0 +1,180 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=4 + +inherit eutils flag-o-matic linux-info linux-mod multilib nvidia-driver \ + portability toolchain-funcs unpacker user versionator + +X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}" +AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}" +X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}" +AMD64_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86_64-${PV}" + +DESCRIPTION="NVIDIA GPUs kernel drivers" +HOMEPAGE="http://www.nvidia.com/" +SRC_URI="x86? ( http://us.download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}.run ) + amd64? ( http://us.download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run ) + amd64-fbsd? ( http://us.download.nvidia.com/XFree86/FreeBSD-x86_64/${PV}/${AMD64_FBSD_NV_PACKAGE}.tar.gz ) + x86-fbsd? ( http://us.download.nvidia.com/XFree86/FreeBSD-x86/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )" + +LICENSE="NVIDIA" +SLOT="0" +KEYWORDS="-* ~amd64 ~x86 ~amd64-fbsd ~x86-fbsd" +IUSE="acpi custom-cflags multilib x-multilib kernel_FreeBSD kernel_linux tools X" +RESTRICT="strip" + +DEPEND="kernel_linux? ( virtual/linux-sources )" +RDEPEND="~x11-drivers/nvidia-userspace-${PV} + x-multilib? ( ~x11-drivers/nvidia-userspace-${PV}[x-multilib] ) + multilib? ( ~x11-drivers/nvidia-userspace-${PV}[multilib] ) + ~x11-drivers/nvidia-userspace-${PV}[tools=] + ~x11-drivers/nvidia-userspace-${PV}[X=]" +PDEPEND="" + +S="${WORKDIR}/" + +mtrr_check() { + ebegin "Checking for MTRR support" + linux_chkconfig_present MTRR + eend $? + + if [[ $? -ne 0 ]] ; then + eerror "Please enable MTRR support in your kernel config, found at:" + eerror + eerror " Processor type and features" + eerror " [*] MTRR (Memory Type Range Register) support" + eerror + eerror "and recompile your kernel ..." + die "MTRR support not detected!" + fi +} + +lockdep_check() { + # Kernel features/options to check for + CONFIG_CHECK="~ZONE_DMA ~MTRR ~SYSVIPC ~!LOCKDEP" + use x86 && CONFIG_CHECK+=" ~HIGHMEM" + + # Now do the above checks + use kernel_linux && check_extra_config +} + +pkg_setup() { + # try to turn off distcc and ccache for people that have a problem with it + export DISTCC_DISABLE=1 + export CCACHE_DISABLE=1 + + if use kernel_linux; then + linux-mod_pkg_setup + MODULE_NAMES="nvidia(video:${S}/kernel)" + BUILD_PARAMS="IGNORE_CC_MISMATCH=yes V=1 SYSSRC=${KV_DIR} \ + SYSOUT=${KV_OUT_DIR} CC=$(tc-getBUILD_CC)" + # linux-mod_src_compile calls set_arch_to_kernel, which + # sets the ARCH to x86 but NVIDIA's wrapping Makefile + # expects x86_64 or i386 and then converts it to x86 + # later on in the build process + BUILD_FIXES="ARCH=$(uname -m | sed -e 's/i.86/i386/')" + fi + + # Since Nvidia ships 3 different series of drivers, we need to give the user + # some kind of guidance as to what version they should install. This tries + # to point the user in the right direction but can't be perfect. check + # nvidia-driver.eclass + nvidia-driver-check-warning + + # set variables to where files are in the package structure + if use kernel_FreeBSD; then + use x86-fbsd && S="${WORKDIR}/${X86_FBSD_NV_PACKAGE}" + use amd64-fbsd && S="${WORKDIR}/${AMD64_FBSD_NV_PACKAGE}" + NV_SRC="${S}/src" + NV_SOVER=1 + elif use kernel_linux; then + NV_SRC="${S}/kernel" + NV_SOVER=${PV} + else + die "Could not determine proper NVIDIA package" + fi +} + +src_unpack() { + if ! use kernel_FreeBSD; then + cd "${S}" + unpack_makeself + else + unpack ${A} + fi +} + +src_prepare() { + # Please add a brief description for every added patch + + if use kernel_linux; then + if kernel_is lt 2 6 9 ; then + eerror "You must build this against 2.6.9 or higher kernels." + fi + + # If greater than 2.6.5 use M= instead of SUBDIR= + convert_to_m "${NV_SRC}"/Makefile.kbuild + fi + cat <<- EOF > "${S}"/nvidia.icd + /usr/$(get_libdir)/libcuda.so + EOF + + # Allow user patches so they can support RC kernels and whatever else + epatch_user +} + +src_compile() { + # This is already the default on Linux, as there's no toplevel Makefile, but + # on FreeBSD there's one and triggers the kernel module build, as we install + # it by itself, pass this. + + cd "${NV_SRC}" + if use kernel_FreeBSD; then + MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \ + LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die + elif use kernel_linux; then + linux-mod_src_compile + fi +} + +src_install() { + if use kernel_linux; then + linux-mod_src_install + elif use kernel_FreeBSD; then + if use x86-fbsd; then + insinto /boot/modules + doins "${S}/src/nvidia.kld" || die + fi + + exeinto /boot/modules + doexe "${S}/src/nvidia.ko" || die + fi + + is_final_abi || die "failed to iterate through all ABIs" +} + +pkg_preinst() { + use kernel_linux && linux-mod_pkg_preinst +} + +pkg_postinst() { + use kernel_linux && linux-mod_pkg_postinst + + echo + elog "You must be in the video group to use the NVIDIA device" + elog "For more info, read the docs at" + elog "http://www.gentoo.org/doc/en/nvidia-guide.xml#doc_chap3_sect6" + elog + + elog "This package installs a kernel module and X driver. Both must" + elog "match explicitly in their version. This means, if you restart" + elog "X, you must modprobe -r nvidia before starting it back up" + elog + +} + +pkg_postrm() { + use kernel_linux && linux-mod_pkg_postrm +} diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-304.64.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-304.64.ebuild new file mode 100644 index 00000000..757a7ff2 --- /dev/null +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-304.64.ebuild @@ -0,0 +1,444 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/nvidia-drivers-304.64.ebuild,v 1.4 2012/12/19 16:52:01 tetromino Exp $ + +EAPI=4 + +inherit eutils flag-o-matic linux-info linux-mod multilib nvidia-driver \ + portability toolchain-funcs unpacker user versionator udev + +X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}" +AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}" +X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}" +AMD64_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86_64-${PV}" + +DESCRIPTION="NVIDIA X11 driver and GLX libraries" +HOMEPAGE="http://www.nvidia.com/" +SRC_URI="x86? ( ftp://download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}.run ) + amd64? ( ftp://download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run ) + amd64-fbsd? ( ftp://download.nvidia.com/XFree86/FreeBSD-x86_64/${PV}/${AMD64_FBSD_NV_PACKAGE}.tar.gz ) + x86-fbsd? ( ftp://download.nvidia.com/XFree86/FreeBSD-x86/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )" + +LICENSE="NVIDIA" +SLOT="0" +KEYWORDS="-* amd64 x86 ~amd64-fbsd ~x86-fbsd" +IUSE="acpi multilib kernel_FreeBSD kernel_linux pax_kernel +tools +X" +RESTRICT="strip" +EMULTILIB_PKG="true" + +COMMON="app-admin/eselect-opencl + kernel_linux? ( >=sys-libs/glibc-2.6.1 ) + multilib? ( app-emulation/emul-linux-x86-xlibs ) + X? ( + <x11-base/xorg-server-1.13.99 + >=app-admin/eselect-opengl-1.0.9 + )" +DEPEND="${COMMON} + kernel_linux? ( + virtual/linux-sources + virtual/pkgconfig + )" +RDEPEND="${COMMON} + acpi? ( sys-power/acpid ) + tools? ( + dev-libs/atk + dev-libs/glib + x11-libs/gdk-pixbuf + x11-libs/gtk+:2 + x11-libs/libX11 + x11-libs/libXext + x11-libs/pango[X] + || ( x11-libs/pangox-compat <x11-libs/pango-1.31[X] ) + ) + X? ( x11-libs/libXvMC )" +PDEPEND="X? ( >=x11-libs/libvdpau-0.3-r1 )" + +REQUIRED_USE="tools? ( X )" + +QA_PREBUILT="opt/* usr/lib*" + +S=${WORKDIR}/ + +pkg_pretend() { + + if use amd64 && has_multilib_profile && \ + [ "${DEFAULT_ABI}" != "amd64" ]; then + eerror "This ebuild doesn't currently support changing your default ABI" + die "Unexpected \${DEFAULT_ABI} = ${DEFAULT_ABI}" + fi + + # Kernel features/options to check for + CONFIG_CHECK="~ZONE_DMA ~MTRR ~SYSVIPC ~!LOCKDEP" + use x86 && CONFIG_CHECK+=" ~HIGHMEM" + + # Now do the above checks + use kernel_linux && check_extra_config +} + +pkg_setup() { + # try to turn off distcc and ccache for people that have a problem with it + export DISTCC_DISABLE=1 + export CCACHE_DISABLE=1 + + if use kernel_linux; then + linux-mod_pkg_setup + MODULE_NAMES="nvidia(video:${S}/kernel)" + BUILD_PARAMS="IGNORE_CC_MISMATCH=yes V=1 SYSSRC=${KV_DIR} \ + SYSOUT=${KV_OUT_DIR} CC=$(tc-getBUILD_CC)" + # linux-mod_src_compile calls set_arch_to_kernel, which + # sets the ARCH to x86 but NVIDIA's wrapping Makefile + # expects x86_64 or i386 and then converts it to x86 + # later on in the build process + BUILD_FIXES="ARCH=$(uname -m | sed -e 's/i.86/i386/')" + fi + + # Since Nvidia ships 3 different series of drivers, we need to give the user + # some kind of guidance as to what version they should install. This tries + # to point the user in the right direction but can't be perfect. check + # nvidia-driver.eclass + nvidia-driver-check-warning + + # set variables to where files are in the package structure + if use kernel_FreeBSD; then + use x86-fbsd && S="${WORKDIR}/${X86_FBSD_NV_PACKAGE}" + use amd64-fbsd && S="${WORKDIR}/${AMD64_FBSD_NV_PACKAGE}" + NV_DOC="${S}/doc" + NV_OBJ="${S}/obj" + NV_SRC="${S}/src" + NV_MAN="${S}/x11/man" + NV_X11="${S}/obj" + NV_SOVER=1 + elif use kernel_linux; then + NV_DOC="${S}" + NV_OBJ="${S}" + NV_SRC="${S}/kernel" + NV_MAN="${S}" + NV_X11="${S}" + NV_SOVER=${PV} + else + die "Could not determine proper NVIDIA package" + fi +} + +src_unpack() { + if ! use kernel_FreeBSD; then + cd "${S}" + unpack_makeself + else + unpack ${A} + fi +} + +src_prepare() { + # Please add a brief description for every added patch + + if use kernel_linux; then + if kernel_is lt 2 6 9 ; then + eerror "You must build this against 2.6.9 or higher kernels." + fi + + # If greater than 2.6.5 use M= instead of SUBDIR= + convert_to_m "${NV_SRC}"/Makefile.kbuild + fi + + if use pax_kernel; then + ewarn "Using PAX patches is not supported. You will be asked to" + ewarn "use a standard kernel should you have issues. Should you" + ewarn "need support with these patches, contact the PaX team." + epatch "${FILESDIR}"/nvidia-drivers-pax-const.patch + epatch "${FILESDIR}"/nvidia-drivers-pax-usercopy.patch + fi + + cat <<- EOF > "${S}"/nvidia.icd + /usr/$(get_libdir)/libnvidia-opencl.so + EOF + + # Allow user patches so they can support RC kernels and whatever else + epatch_user +} + +src_compile() { + # This is already the default on Linux, as there's no toplevel Makefile, but + # on FreeBSD there's one and triggers the kernel module build, as we install + # it by itself, pass this. + + cd "${NV_SRC}" + if use kernel_FreeBSD; then + MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \ + LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die + elif use kernel_linux; then + linux-mod_src_compile + fi +} + +# Install nvidia library: +# the first parameter is the library to install +# the second parameter is the provided soversion +# the third parameter is the target directory if its not /usr/lib +donvidia() { + # Full path to library minus SOVER + MY_LIB="$1" + + # SOVER to use + MY_SOVER="$2" + + # Where to install + MY_DEST="$3" + + if [[ -z "${MY_DEST}" ]]; then + MY_DEST="/usr/$(get_libdir)" + action="dolib.so" + else + exeinto ${MY_DEST} + action="doexe" + fi + + # Get just the library name + libname=$(basename $1) + + # Install the library with the correct SOVER + ${action} ${MY_LIB}.${MY_SOVER} || \ + die "failed to install ${libname}" + + # If SOVER wasn't 1, then we need to create a .1 symlink + if [[ "${MY_SOVER}" != "1" ]]; then + dosym ${libname}.${MY_SOVER} \ + ${MY_DEST}/${libname}.1 || \ + die "failed to create ${libname} symlink" + fi + + # Always create the symlink from the raw lib to the .1 + dosym ${libname}.1 \ + ${MY_DEST}/${libname} || \ + die "failed to create ${libname} symlink" +} + +src_install() { + if use kernel_linux; then + linux-mod_src_install + + VIDEOGROUP="$(egetent group video | cut -d ':' -f 3)" + if [ -z "$VIDEOGROUP" ]; then + eerror "Failed to determine the video group gid." + die "Failed to determine the video group gid." + fi + + # Add the aliases + [ -f "${FILESDIR}/nvidia-169.07" ] || die "nvidia missing in FILESDIR" + sed -e 's:PACKAGE:'${PF}':g' \ + -e 's:VIDEOGID:'${VIDEOGROUP}':' "${FILESDIR}"/nvidia-169.07 > \ + "${WORKDIR}"/nvidia + insinto /etc/modprobe.d + newins "${WORKDIR}"/nvidia nvidia.conf || die + + # Ensures that our device nodes are created when not using X + exeinto "$(udev_get_udevdir)" + doexe "${FILESDIR}"/nvidia-udev.sh + udev_newrules "${FILESDIR}"/nvidia.udev-rule 99-nvidia.rules + + elif use kernel_FreeBSD; then + if use x86-fbsd; then + insinto /boot/modules + doins "${S}/src/nvidia.kld" || die + fi + + exeinto /boot/modules + doexe "${S}/src/nvidia.ko" || die + fi + + # NVIDIA kernel <-> userspace driver config lib + donvidia ${NV_OBJ}/libnvidia-cfg.so ${NV_SOVER} + + if use kernel_linux; then + # NVIDIA video decode <-> CUDA + donvidia ${NV_OBJ}/libnvcuvid.so ${NV_SOVER} + fi + + if use X; then + # Xorg DDX driver + insinto /usr/$(get_libdir)/xorg/modules/drivers + doins ${NV_X11}/nvidia_drv.so || die "failed to install nvidia_drv.so" + + # Xorg GLX driver + donvidia ${NV_X11}/libglx.so ${NV_SOVER} \ + /usr/$(get_libdir)/opengl/nvidia/extensions + + # XvMC driver + dolib.a ${NV_X11}/libXvMCNVIDIA.a || \ + die "failed to install libXvMCNVIDIA.so" + donvidia ${NV_X11}/libXvMCNVIDIA.so ${NV_SOVER} + dosym libXvMCNVIDIA.so.${NV_SOVER} \ + /usr/$(get_libdir)/libXvMCNVIDIA_dynamic.so.1 || \ + die "failed to create libXvMCNVIDIA_dynamic.so symlink" + fi + + # OpenCL ICD for NVIDIA + if use kernel_linux; then + insinto /etc/OpenCL/vendors + doins nvidia.icd + donvidia ${NV_OBJ}/libnvidia-opencl.so ${NV_SOVER} + fi + + # Documentation + dohtml ${NV_DOC}/html/* + if use kernel_FreeBSD; then + dodoc "${NV_DOC}/README" + use X && doman "${NV_MAN}/nvidia-xconfig.1" + use tools && doman "${NV_MAN}/nvidia-settings.1" + else + # Docs + newdoc "${NV_DOC}/README.txt" README + dodoc "${NV_DOC}/NVIDIA_Changelog" + doman "${NV_MAN}/nvidia-smi.1.gz" + use X && doman "${NV_MAN}/nvidia-xconfig.1.gz" + use tools && doman "${NV_MAN}/nvidia-settings.1.gz" + doman "${NV_MAN}/nvidia-cuda-proxy-control.1.gz" + fi + + # Helper Apps + exeinto /opt/bin/ + + if use X; then + doexe ${NV_OBJ}/nvidia-xconfig || die + fi + + if use kernel_linux ; then + doexe ${NV_OBJ}/nvidia-debugdump || die + doexe ${NV_OBJ}/nvidia-cuda-proxy-control || die + doexe ${NV_OBJ}/nvidia-cuda-proxy-server || die + doexe ${NV_OBJ}/nvidia-smi || die + newinitd "${FILESDIR}/nvidia-smi.init" nvidia-smi + fi + + if use tools; then + doexe ${NV_OBJ}/nvidia-settings || die + fi + + exeinto /usr/bin/ + doexe ${NV_OBJ}/nvidia-bug-report.sh || die + + # Desktop entries for nvidia-settings + if use tools ; then + # There is no icon in the FreeBSD tarball. + use kernel_FreeBSD || newicon ${NV_OBJ}/nvidia-settings.png nvidia-drivers-settings.png + domenu "${FILESDIR}"/nvidia-drivers-settings.desktop + exeinto /etc/X11/xinit/xinitrc.d + doexe "${FILESDIR}"/95-nvidia-settings + fi + + #doenvd "${FILESDIR}"/50nvidia-prelink-blacklist + + 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 + + is_final_abi || die "failed to iterate through all ABIs" +} + +src_install-libs() { + local inslibdir=$(get_libdir) + local GL_ROOT="/usr/$(get_libdir)/opengl/nvidia/lib" + local CL_ROOT="/usr/$(get_libdir)/OpenCL/vendors/nvidia" + local libdir=${NV_OBJ} + + if use kernel_linux && has_multilib_profile && \ + [[ ${ABI} == "x86" ]] ; then + libdir=${NV_OBJ}/32 + fi + + if use X; then + # The GLX libraries + donvidia ${libdir}/libGL.so ${NV_SOVER} ${GL_ROOT} + donvidia ${libdir}/libnvidia-glcore.so ${NV_SOVER} + if use kernel_FreeBSD; then + donvidia ${libdir}/libnvidia-tls.so ${NV_SOVER} ${GL_ROOT} + else + donvidia ${libdir}/tls/libnvidia-tls.so ${NV_SOVER} ${GL_ROOT} + fi + + # VDPAU + donvidia ${libdir}/libvdpau_nvidia.so ${NV_SOVER} + fi + + # NVIDIA monitoring library + if use kernel_linux ; then + donvidia ${libdir}/libnvidia-ml.so ${NV_SOVER} + fi + + # CUDA & OpenCL + if use kernel_linux; then + donvidia ${libdir}/libcuda.so ${NV_SOVER} + donvidia ${libdir}/libnvidia-compiler.so ${NV_SOVER} + donvidia ${libdir}/libOpenCL.so 1.0.0 ${CL_ROOT} + fi +} + +pkg_preinst() { + use kernel_linux && linux-mod_pkg_preinst + + # Clean the dynamic libGL stuff's home to ensure + # we dont have stale libs floating around + if [ -d "${ROOT}"/usr/lib/opengl/nvidia ] ; then + rm -rf "${ROOT}"/usr/lib/opengl/nvidia/* + fi + # Make sure we nuke the old nvidia-glx's env.d file + if [ -e "${ROOT}"/etc/env.d/09nvidia ] ; then + rm -f "${ROOT}"/etc/env.d/09nvidia + fi +} + +pkg_postinst() { + use kernel_linux && linux-mod_pkg_postinst + + # Switch to the nvidia implementation + use X && "${ROOT}"/usr/bin/eselect opengl set --use-old nvidia + "${ROOT}"/usr/bin/eselect opencl set --use-old nvidia + + elog "You must be in the video group to use the NVIDIA device" + elog "For more info, read the docs at" + elog "http://www.gentoo.org/doc/en/nvidia-guide.xml#doc_chap3_sect6" + elog + elog "This ebuild installs a kernel module and X driver. Both must" + elog "match explicitly in their version. This means, if you restart" + elog "X, you must modprobe -r nvidia before starting it back up" + elog + elog "To use the NVIDIA GLX, run \"eselect opengl set nvidia\"" + elog + elog "To use the NVIDIA CUDA/OpenCL, run \"eselect opencl set nvidia\"" + elog + elog "NVIDIA has requested that any bug reports submitted have the" + elog "output of /opt/bin/nvidia-bug-report.sh included." + elog + if ! use X; then + elog "You have elected to not install the X.org driver. Along with" + elog "this the OpenGL libraries, XvMC, and VDPAU libraries were not" + elog "installed. Additionally, once the driver is loaded your card" + elog "and fan will run at max speed which may not be desirable." + elog "Use the 'nvidia-smi' init script to have your card and fan" + elog "speed scale appropriately." + elog + fi + if ! use tools; then + elog "USE=tools controls whether the nvidia-settings application" + elog "is installed. If you would like to use it, enable that" + elog "flag and re-emerge this ebuild. Optionally you can install" + elog "media-video/nvidia-settings" + elog + fi +} + +pkg_prerm() { + use X && "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 +} + +pkg_postrm() { + use kernel_linux && linux-mod_pkg_postrm + use X && "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 +} diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-304.88.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-304.88.ebuild new file mode 100644 index 00000000..a0f9b979 --- /dev/null +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-304.88.ebuild @@ -0,0 +1,187 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=4 + +inherit eutils flag-o-matic linux-info linux-mod multilib nvidia-driver \ + portability toolchain-funcs unpacker user versionator + +X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}" +AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}" +X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}" +AMD64_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86_64-${PV}" + +DESCRIPTION="NVIDIA GPUs kernel drivers" +HOMEPAGE="http://www.nvidia.com/" +SRC_URI="x86? ( ftp://download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}.run ) + amd64? ( ftp://download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run ) + amd64-fbsd? ( ftp://download.nvidia.com/XFree86/FreeBSD-x86_64/${PV}/${AMD64_FBSD_NV_PACKAGE}.tar.gz ) + x86-fbsd? ( ftp://download.nvidia.com/XFree86/FreeBSD-x86/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )" + +LICENSE="NVIDIA" +SLOT="0" +KEYWORDS="-* ~amd64 ~x86 ~amd64-fbsd ~x86-fbsd" +IUSE="acpi custom-cflags multilib x-multilib kernel_FreeBSD kernel_linux pax_kernel tools X" +RESTRICT="strip" + +DEPEND="kernel_linux? ( virtual/linux-sources )" +RDEPEND="~x11-drivers/nvidia-userspace-${PV} + x-multilib? ( ~x11-drivers/nvidia-userspace-${PV}[x-multilib] ) + multilib? ( ~x11-drivers/nvidia-userspace-${PV}[multilib] ) + ~x11-drivers/nvidia-userspace-${PV}[tools=] + ~x11-drivers/nvidia-userspace-${PV}[X=]" +PDEPEND="" + +S="${WORKDIR}/" + +mtrr_check() { + ebegin "Checking for MTRR support" + linux_chkconfig_present MTRR + eend $? + + if [[ $? -ne 0 ]] ; then + eerror "Please enable MTRR support in your kernel config, found at:" + eerror + eerror " Processor type and features" + eerror " [*] MTRR (Memory Type Range Register) support" + eerror + eerror "and recompile your kernel ..." + die "MTRR support not detected!" + fi +} + +lockdep_check() { + # Kernel features/options to check for + CONFIG_CHECK="~ZONE_DMA ~MTRR ~SYSVIPC ~!LOCKDEP" + use x86 && CONFIG_CHECK+=" ~HIGHMEM" + + # Now do the above checks + use kernel_linux && check_extra_config +} + +pkg_setup() { + # try to turn off distcc and ccache for people that have a problem with it + export DISTCC_DISABLE=1 + export CCACHE_DISABLE=1 + + if use kernel_linux; then + linux-mod_pkg_setup + MODULE_NAMES="nvidia(video:${S}/kernel)" + BUILD_PARAMS="IGNORE_CC_MISMATCH=yes V=1 SYSSRC=${KV_DIR} \ + SYSOUT=${KV_OUT_DIR} CC=$(tc-getBUILD_CC)" + # linux-mod_src_compile calls set_arch_to_kernel, which + # sets the ARCH to x86 but NVIDIA's wrapping Makefile + # expects x86_64 or i386 and then converts it to x86 + # later on in the build process + BUILD_FIXES="ARCH=$(uname -m | sed -e 's/i.86/i386/')" + fi + + # Since Nvidia ships 3 different series of drivers, we need to give the user + # some kind of guidance as to what version they should install. This tries + # to point the user in the right direction but can't be perfect. check + # nvidia-driver.eclass + nvidia-driver-check-warning + + # set variables to where files are in the package structure + if use kernel_FreeBSD; then + use x86-fbsd && S="${WORKDIR}/${X86_FBSD_NV_PACKAGE}" + use amd64-fbsd && S="${WORKDIR}/${AMD64_FBSD_NV_PACKAGE}" + NV_SRC="${S}/src" + NV_SOVER=1 + elif use kernel_linux; then + NV_SRC="${S}/kernel" + NV_SOVER=${PV} + else + die "Could not determine proper NVIDIA package" + fi +} + +src_unpack() { + if ! use kernel_FreeBSD; then + cd "${S}" + unpack_makeself + else + unpack ${A} + fi +} + +src_prepare() { + # Please add a brief description for every added patch + + if use kernel_linux; then + if kernel_is lt 2 6 9 ; then + eerror "You must build this against 2.6.9 or higher kernels." + fi + + # If greater than 2.6.5 use M= instead of SUBDIR= + convert_to_m "${NV_SRC}"/Makefile.kbuild + fi + if use pax_kernel; then + ewarn "Using PAX patches is not supported. You will be asked to" + ewarn "use a standard kernel should you have issues. Should you" + ewarn "need support with these patches, contact the PaX team." + epatch "${FILESDIR}"/nvidia-drivers-pax-const.patch + epatch "${FILESDIR}"/nvidia-drivers-pax-usercopy.patch + fi + cat <<- EOF > "${S}"/nvidia.icd + /usr/$(get_libdir)/libnvidia-opencl.so + EOF + + # Allow user patches so they can support RC kernels and whatever else + epatch_user +} + +src_compile() { + # This is already the default on Linux, as there's no toplevel Makefile, but + # on FreeBSD there's one and triggers the kernel module build, as we install + # it by itself, pass this. + + cd "${NV_SRC}" + if use kernel_FreeBSD; then + MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \ + LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die + elif use kernel_linux; then + linux-mod_src_compile + fi +} + +src_install() { + if use kernel_linux; then + linux-mod_src_install + elif use kernel_FreeBSD; then + if use x86-fbsd; then + insinto /boot/modules + doins "${S}/src/nvidia.kld" || die + fi + + exeinto /boot/modules + doexe "${S}/src/nvidia.ko" || die + fi + + is_final_abi || die "failed to iterate through all ABIs" +} + +pkg_preinst() { + use kernel_linux && linux-mod_pkg_preinst +} + +pkg_postinst() { + use kernel_linux && linux-mod_pkg_postinst + + echo + elog "You must be in the video group to use the NVIDIA device" + elog "For more info, read the docs at" + elog "http://www.gentoo.org/doc/en/nvidia-guide.xml#doc_chap3_sect6" + elog + + elog "This package installs a kernel module and X driver. Both must" + elog "match explicitly in their version. This means, if you restart" + elog "X, you must modprobe -r nvidia before starting it back up" + elog + +} + +pkg_postrm() { + use kernel_linux && linux-mod_pkg_postrm +} diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-310.19.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-310.19.ebuild new file mode 100644 index 00000000..c26611c4 --- /dev/null +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-310.19.ebuild @@ -0,0 +1,180 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=4 + +inherit eutils flag-o-matic linux-info linux-mod multilib nvidia-driver \ + portability toolchain-funcs unpacker user versionator + +X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}" +AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}" +X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}" +AMD64_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86_64-${PV}" + +DESCRIPTION="NVIDIA GPUs kernel drivers" +HOMEPAGE="http://www.nvidia.com/" +SRC_URI="x86? ( http://us.download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}.run ) + amd64? ( http://us.download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run ) + amd64-fbsd? ( http://us.download.nvidia.com/XFree86/FreeBSD-x86_64/${PV}/${AMD64_FBSD_NV_PACKAGE}.tar.gz ) + x86-fbsd? ( http://us.download.nvidia.com/XFree86/FreeBSD-x86/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )" + +LICENSE="NVIDIA" +SLOT="0" +KEYWORDS="-* ~amd64 ~x86 ~amd64-fbsd ~x86-fbsd" +IUSE="acpi custom-cflags multilib x-multilib kernel_FreeBSD kernel_linux tools X" +RESTRICT="strip" + +DEPEND="kernel_linux? ( virtual/linux-sources )" +RDEPEND="~x11-drivers/nvidia-userspace-${PV} + x-multilib? ( ~x11-drivers/nvidia-userspace-${PV}[x-multilib] ) + multilib? ( ~x11-drivers/nvidia-userspace-${PV}[multilib] ) + ~x11-drivers/nvidia-userspace-${PV}[tools=] + ~x11-drivers/nvidia-userspace-${PV}[X=]" +PDEPEND="" + +S="${WORKDIR}/" + +mtrr_check() { + ebegin "Checking for MTRR support" + linux_chkconfig_present MTRR + eend $? + + if [[ $? -ne 0 ]] ; then + eerror "Please enable MTRR support in your kernel config, found at:" + eerror + eerror " Processor type and features" + eerror " [*] MTRR (Memory Type Range Register) support" + eerror + eerror "and recompile your kernel ..." + die "MTRR support not detected!" + fi +} + +lockdep_check() { + # Kernel features/options to check for + CONFIG_CHECK="~ZONE_DMA ~MTRR ~SYSVIPC ~!LOCKDEP" + use x86 && CONFIG_CHECK+=" ~HIGHMEM" + + # Now do the above checks + use kernel_linux && check_extra_config +} + +pkg_setup() { + # try to turn off distcc and ccache for people that have a problem with it + export DISTCC_DISABLE=1 + export CCACHE_DISABLE=1 + + if use kernel_linux; then + linux-mod_pkg_setup + MODULE_NAMES="nvidia(video:${S}/kernel)" + BUILD_PARAMS="IGNORE_CC_MISMATCH=yes V=1 SYSSRC=${KV_DIR} \ + SYSOUT=${KV_OUT_DIR} CC=$(tc-getBUILD_CC)" + # linux-mod_src_compile calls set_arch_to_kernel, which + # sets the ARCH to x86 but NVIDIA's wrapping Makefile + # expects x86_64 or i386 and then converts it to x86 + # later on in the build process + BUILD_FIXES="ARCH=$(uname -m | sed -e 's/i.86/i386/')" + fi + + # Since Nvidia ships 3 different series of drivers, we need to give the user + # some kind of guidance as to what version they should install. This tries + # to point the user in the right direction but can't be perfect. check + # nvidia-driver.eclass + nvidia-driver-check-warning + + # set variables to where files are in the package structure + if use kernel_FreeBSD; then + use x86-fbsd && S="${WORKDIR}/${X86_FBSD_NV_PACKAGE}" + use amd64-fbsd && S="${WORKDIR}/${AMD64_FBSD_NV_PACKAGE}" + NV_SRC="${S}/src" + NV_SOVER=1 + elif use kernel_linux; then + NV_SRC="${S}/kernel" + NV_SOVER=${PV} + else + die "Could not determine proper NVIDIA package" + fi +} + +src_unpack() { + if ! use kernel_FreeBSD; then + cd "${S}" + unpack_makeself + else + unpack ${A} + fi +} + +src_prepare() { + # Please add a brief description for every added patch + + if use kernel_linux; then + if kernel_is lt 2 6 9 ; then + eerror "You must build this against 2.6.9 or higher kernels." + fi + + # If greater than 2.6.5 use M= instead of SUBDIR= + convert_to_m "${NV_SRC}"/Makefile.kbuild + fi + cat <<- EOF > "${S}"/nvidia.icd + /usr/$(get_libdir)/libcuda.so + EOF + + # Allow user patches so they can support RC kernels and whatever else + epatch_user +} + +src_compile() { + # This is already the default on Linux, as there's no toplevel Makefile, but + # on FreeBSD there's one and triggers the kernel module build, as we install + # it by itself, pass this. + + cd "${NV_SRC}" + if use kernel_FreeBSD; then + MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \ + LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die + elif use kernel_linux; then + linux-mod_src_compile + fi +} + +src_install() { + if use kernel_linux; then + linux-mod_src_install + elif use kernel_FreeBSD; then + if use x86-fbsd; then + insinto /boot/modules + doins "${S}/src/nvidia.kld" || die + fi + + exeinto /boot/modules + doexe "${S}/src/nvidia.ko" || die + fi + + is_final_abi || die "failed to iterate through all ABIs" +} + +pkg_preinst() { + use kernel_linux && linux-mod_pkg_preinst +} + +pkg_postinst() { + use kernel_linux && linux-mod_pkg_postinst + + echo + elog "You must be in the video group to use the NVIDIA device" + elog "For more info, read the docs at" + elog "http://www.gentoo.org/doc/en/nvidia-guide.xml#doc_chap3_sect6" + elog + + elog "This package installs a kernel module and X driver. Both must" + elog "match explicitly in their version. This means, if you restart" + elog "X, you must modprobe -r nvidia before starting it back up" + elog + +} + +pkg_postrm() { + use kernel_linux && linux-mod_pkg_postrm +} diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-313.18.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-313.18.ebuild new file mode 100644 index 00000000..3dc5972c --- /dev/null +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-313.18.ebuild @@ -0,0 +1,431 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/nvidia-drivers-313.18.ebuild,v 1.2 2013/01/17 18:29:22 cardoe Exp $ + +EAPI=5 + +inherit eutils flag-o-matic linux-info linux-mod multilib nvidia-driver \ + portability toolchain-funcs unpacker user udev + +X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}" +AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}" +X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}" +AMD64_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86_64-${PV}" + +DESCRIPTION="NVIDIA X11 driver and GLX libraries" +HOMEPAGE="http://www.nvidia.com/" +SRC_URI="x86? ( ftp://download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}.run ) + amd64? ( ftp://download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run ) + amd64-fbsd? ( ftp://download.nvidia.com/XFree86/FreeBSD-x86_64/${PV}/${AMD64_FBSD_NV_PACKAGE}.tar.gz ) + x86-fbsd? ( ftp://download.nvidia.com/XFree86/FreeBSD-x86/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )" + +LICENSE="NVIDIA" +SLOT="0" +KEYWORDS="-* ~amd64 ~x86 ~amd64-fbsd ~x86-fbsd" +IUSE="acpi multilib kernel_FreeBSD kernel_linux pax_kernel +tools +X" +RESTRICT="strip" +EMULTILIB_PKG="true" + +COMMON="app-admin/eselect-opencl + kernel_linux? ( >=sys-libs/glibc-2.6.1 ) + multilib? ( app-emulation/emul-linux-x86-xlibs ) + X? ( + <x11-base/xorg-server-1.14.99 + >=app-admin/eselect-opengl-1.0.9 + )" +DEPEND="${COMMON} + kernel_linux? ( + virtual/linux-sources + )" +RDEPEND="${COMMON} + acpi? ( sys-power/acpid ) + tools? ( + dev-libs/atk + dev-libs/glib + x11-libs/gdk-pixbuf + x11-libs/gtk+:2 + x11-libs/libX11 + x11-libs/libXext + x11-libs/pango[X] + || ( x11-libs/pangox-compat <x11-libs/pango-1.31[X] ) + ) + X? ( >=x11-libs/libvdpau-0.3-r1 )" + +REQUIRED_USE="tools? ( X )" + +QA_PREBUILT="opt/* usr/lib*" + +S=${WORKDIR}/ + +pkg_pretend() { + + if use amd64 && has_multilib_profile && \ + [ "${DEFAULT_ABI}" != "amd64" ]; then + eerror "This ebuild doesn't currently support changing your default ABI" + die "Unexpected \${DEFAULT_ABI} = ${DEFAULT_ABI}" + fi + + # Kernel features/options to check for + CONFIG_CHECK="~ZONE_DMA ~MTRR ~SYSVIPC ~!LOCKDEP" + use x86 && CONFIG_CHECK+=" ~HIGHMEM" + + # Now do the above checks + use kernel_linux && check_extra_config +} + +pkg_setup() { + # try to turn off distcc and ccache for people that have a problem with it + export DISTCC_DISABLE=1 + export CCACHE_DISABLE=1 + + if use kernel_linux; then + linux-mod_pkg_setup + MODULE_NAMES="nvidia(video:${S}/kernel)" + BUILD_PARAMS="IGNORE_CC_MISMATCH=yes V=1 SYSSRC=${KV_DIR} \ + SYSOUT=${KV_OUT_DIR} CC=$(tc-getBUILD_CC)" + # linux-mod_src_compile calls set_arch_to_kernel, which + # sets the ARCH to x86 but NVIDIA's wrapping Makefile + # expects x86_64 or i386 and then converts it to x86 + # later on in the build process + BUILD_FIXES="ARCH=$(uname -m | sed -e 's/i.86/i386/')" + fi + + # Since Nvidia ships 3 different series of drivers, we need to give the user + # some kind of guidance as to what version they should install. This tries + # to point the user in the right direction but can't be perfect. check + # nvidia-driver.eclass + nvidia-driver-check-warning + + # set variables to where files are in the package structure + if use kernel_FreeBSD; then + use x86-fbsd && S="${WORKDIR}/${X86_FBSD_NV_PACKAGE}" + use amd64-fbsd && S="${WORKDIR}/${AMD64_FBSD_NV_PACKAGE}" + NV_DOC="${S}/doc" + NV_OBJ="${S}/obj" + NV_SRC="${S}/src" + NV_MAN="${S}/x11/man" + NV_X11="${S}/obj" + NV_SOVER=1 + elif use kernel_linux; then + NV_DOC="${S}" + NV_OBJ="${S}" + NV_SRC="${S}/kernel" + NV_MAN="${S}" + NV_X11="${S}" + NV_SOVER=${PV} + else + die "Could not determine proper NVIDIA package" + fi +} + +src_unpack() { + if ! use kernel_FreeBSD; then + cd "${S}" + unpack_makeself + else + unpack ${A} + fi +} + +src_prepare() { + # Please add a brief description for every added patch + + if use kernel_linux; then + if kernel_is lt 2 6 9 ; then + eerror "You must build this against 2.6.9 or higher kernels." + fi + + # If greater than 2.6.5 use M= instead of SUBDIR= + convert_to_m "${NV_SRC}"/Makefile.kbuild + fi + + if use pax_kernel; then + ewarn "Using PAX patches is not supported. You will be asked to" + ewarn "use a standard kernel should you have issues. Should you" + ewarn "need support with these patches, contact the PaX team." + epatch "${FILESDIR}"/nvidia-drivers-pax-const.patch + epatch "${FILESDIR}"/nvidia-drivers-pax-usercopy.patch + fi + + # Allow user patches so they can support RC kernels and whatever else + epatch_user +} + +src_compile() { + # This is already the default on Linux, as there's no toplevel Makefile, but + # on FreeBSD there's one and triggers the kernel module build, as we install + # it by itself, pass this. + + cd "${NV_SRC}" + if use kernel_FreeBSD; then + MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \ + LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die + elif use kernel_linux; then + linux-mod_src_compile + fi +} + +# Install nvidia library: +# the first parameter is the library to install +# the second parameter is the provided soversion +# the third parameter is the target directory if its not /usr/lib +donvidia() { + # Full path to library minus SOVER + MY_LIB="$1" + + # SOVER to use + MY_SOVER="$2" + + # Where to install + MY_DEST="$3" + + if [[ -z "${MY_DEST}" ]]; then + MY_DEST="/usr/$(get_libdir)" + action="dolib.so" + else + exeinto ${MY_DEST} + action="doexe" + fi + + # Get just the library name + libname=$(basename $1) + + # Install the library with the correct SOVER + ${action} ${MY_LIB}.${MY_SOVER} || \ + die "failed to install ${libname}" + + # If SOVER wasn't 1, then we need to create a .1 symlink + if [[ "${MY_SOVER}" != "1" ]]; then + dosym ${libname}.${MY_SOVER} \ + ${MY_DEST}/${libname}.1 || \ + die "failed to create ${libname} symlink" + fi + + # Always create the symlink from the raw lib to the .1 + dosym ${libname}.1 \ + ${MY_DEST}/${libname} || \ + die "failed to create ${libname} symlink" +} + +src_install() { + if use kernel_linux; then + linux-mod_src_install + + VIDEOGROUP="$(egetent group video | cut -d ':' -f 3)" + if [ -z "$VIDEOGROUP" ]; then + eerror "Failed to determine the video group gid." + die "Failed to determine the video group gid." + fi + + # Add the aliases + [ -f "${FILESDIR}/nvidia-169.07" ] || die "nvidia missing in FILESDIR" + sed -e 's:PACKAGE:'${PF}':g' \ + -e 's:VIDEOGID:'${VIDEOGROUP}':' "${FILESDIR}"/nvidia-169.07 > \ + "${WORKDIR}"/nvidia + insinto /etc/modprobe.d + newins "${WORKDIR}"/nvidia nvidia.conf || die + + # Ensures that our device nodes are created when not using X + exeinto "$(udev_get_udevdir)" + doexe "${FILESDIR}"/nvidia-udev.sh + udev_newrules "${FILESDIR}"/nvidia.udev-rule 99-nvidia.rules + + elif use kernel_FreeBSD; then + if use x86-fbsd; then + insinto /boot/modules + doins "${S}/src/nvidia.kld" || die + fi + + exeinto /boot/modules + doexe "${S}/src/nvidia.ko" || die + fi + + # NVIDIA kernel <-> userspace driver config lib + donvidia ${NV_OBJ}/libnvidia-cfg.so ${NV_SOVER} + + # NVIDIA video encode/decode <-> CUDA + if use kernel_linux; then + donvidia ${NV_OBJ}/libnvcuvid.so ${NV_SOVER} + donvidia ${NV_OBJ}/libnvidia-encode.so ${NV_SOVER} + fi + + if use X; then + # Xorg DDX driver + insinto /usr/$(get_libdir)/xorg/modules/drivers + doins ${NV_X11}/nvidia_drv.so || die "failed to install nvidia_drv.so" + + # Xorg GLX driver + donvidia ${NV_X11}/libglx.so ${NV_SOVER} \ + /usr/$(get_libdir)/opengl/nvidia/extensions + fi + + # OpenCL ICD for NVIDIA + if use kernel_linux; then + insinto /etc/OpenCL/vendors + doins ${NV_OBJ}/nvidia.icd + fi + + # Documentation + dohtml ${NV_DOC}/html/* + if use kernel_FreeBSD; then + dodoc "${NV_DOC}/README" + use X && doman "${NV_MAN}/nvidia-xconfig.1" + use tools && doman "${NV_MAN}/nvidia-settings.1" + else + # Docs + newdoc "${NV_DOC}/README.txt" README + dodoc "${NV_DOC}/NVIDIA_Changelog" + doman "${NV_MAN}/nvidia-smi.1.gz" + use X && doman "${NV_MAN}/nvidia-xconfig.1.gz" + use tools && doman "${NV_MAN}/nvidia-settings.1.gz" + doman "${NV_MAN}/nvidia-cuda-proxy-control.1.gz" + fi + + # Helper Apps + exeinto /opt/bin/ + + if use X; then + doexe ${NV_OBJ}/nvidia-xconfig || die + fi + + if use kernel_linux ; then + doexe ${NV_OBJ}/nvidia-debugdump || die + doexe ${NV_OBJ}/nvidia-cuda-proxy-control || die + doexe ${NV_OBJ}/nvidia-cuda-proxy-server || die + doexe ${NV_OBJ}/nvidia-smi || die + newinitd "${FILESDIR}/nvidia-smi.init" nvidia-smi + fi + + if use tools; then + doexe ${NV_OBJ}/nvidia-settings || die + fi + + exeinto /usr/bin/ + doexe ${NV_OBJ}/nvidia-bug-report.sh || die + + # Desktop entries for nvidia-settings + if use tools ; then + # There is no icon in the FreeBSD tarball. + use kernel_FreeBSD || newicon ${NV_OBJ}/nvidia-settings.png nvidia-drivers-settings.png + domenu "${FILESDIR}"/nvidia-drivers-settings.desktop + exeinto /etc/X11/xinit/xinitrc.d + doexe "${FILESDIR}"/95-nvidia-settings + fi + + #doenvd "${FILESDIR}"/50nvidia-prelink-blacklist + + 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 + + is_final_abi || die "failed to iterate through all ABIs" +} + +src_install-libs() { + local inslibdir=$(get_libdir) + local GL_ROOT="/usr/$(get_libdir)/opengl/nvidia/lib" + local CL_ROOT="/usr/$(get_libdir)/OpenCL/vendors/nvidia" + local libdir=${NV_OBJ} + + if use kernel_linux && has_multilib_profile && \ + [[ ${ABI} == "x86" ]] ; then + libdir=${NV_OBJ}/32 + fi + + if use X; then + # The GLX libraries + donvidia ${libdir}/libGL.so ${NV_SOVER} ${GL_ROOT} + donvidia ${libdir}/libnvidia-glcore.so ${NV_SOVER} + if use kernel_FreeBSD; then + donvidia ${libdir}/libnvidia-tls.so ${NV_SOVER} + else + donvidia ${libdir}/tls/libnvidia-tls.so ${NV_SOVER} + fi + + # VDPAU + donvidia ${libdir}/libvdpau_nvidia.so ${NV_SOVER} + fi + + # NVIDIA monitoring library + if use kernel_linux ; then + donvidia ${libdir}/libnvidia-ml.so ${NV_SOVER} + fi + + # CUDA & OpenCL + if use kernel_linux; then + donvidia ${libdir}/libcuda.so ${NV_SOVER} + donvidia ${libdir}/libnvidia-compiler.so ${NV_SOVER} + donvidia ${libdir}/libOpenCL.so 1.0.0 ${CL_ROOT} + donvidia ${libdir}/libnvidia-opencl.so ${NV_SOVER} + fi +} + +pkg_preinst() { + use kernel_linux && linux-mod_pkg_preinst + + # Clean the dynamic libGL stuff's home to ensure + # we dont have stale libs floating around + if [ -d "${ROOT}"/usr/lib/opengl/nvidia ] ; then + rm -rf "${ROOT}"/usr/lib/opengl/nvidia/* + fi + # Make sure we nuke the old nvidia-glx's env.d file + if [ -e "${ROOT}"/etc/env.d/09nvidia ] ; then + rm -f "${ROOT}"/etc/env.d/09nvidia + fi +} + +pkg_postinst() { + use kernel_linux && linux-mod_pkg_postinst + + # Switch to the nvidia implementation + use X && "${ROOT}"/usr/bin/eselect opengl set --use-old nvidia + "${ROOT}"/usr/bin/eselect opencl set --use-old nvidia + + elog "You must be in the video group to use the NVIDIA device" + elog "For more info, read the docs at" + elog "http://www.gentoo.org/doc/en/nvidia-guide.xml#doc_chap3_sect6" + elog + elog "This ebuild installs a kernel module and X driver. Both must" + elog "match explicitly in their version. This means, if you restart" + elog "X, you must modprobe -r nvidia before starting it back up" + elog + elog "To use the NVIDIA GLX, run \"eselect opengl set nvidia\"" + elog + elog "To use the NVIDIA CUDA/OpenCL, run \"eselect opencl set nvidia\"" + elog + elog "NVIDIA has requested that any bug reports submitted have the" + elog "output of /opt/bin/nvidia-bug-report.sh included." + elog + if ! use X; then + elog "You have elected to not install the X.org driver. Along with" + elog "this the OpenGL libraries and VDPAU libraries were not" + elog "installed. Additionally, once the driver is loaded your card" + elog "and fan will run at max speed which may not be desirable." + elog "Use the 'nvidia-smi' init script to have your card and fan" + elog "speed scale appropriately." + elog + fi + if ! use tools; then + elog "USE=tools controls whether the nvidia-settings application" + elog "is installed. If you would like to use it, enable that" + elog "flag and re-emerge this ebuild. Optionally you can install" + elog "media-video/nvidia-settings" + elog + fi +} + +pkg_prerm() { + use X && "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 +} + +pkg_postrm() { + use kernel_linux && linux-mod_pkg_postrm + use X && "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 +} diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-313.30.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-313.30.ebuild new file mode 100644 index 00000000..d8507b3a --- /dev/null +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-313.30.ebuild @@ -0,0 +1,184 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=5 + +inherit eutils flag-o-matic linux-info linux-mod multilib nvidia-driver \ + portability toolchain-funcs unpacker user + +X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}" +AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}" +X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}" +AMD64_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86_64-${PV}" + +DESCRIPTION="NVIDIA GPUs kernel drivers" +HOMEPAGE="http://www.nvidia.com/" +SRC_URI="x86? ( ftp://download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}.run ) + amd64? ( ftp://download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run ) + amd64-fbsd? ( ftp://download.nvidia.com/XFree86/FreeBSD-x86_64/${PV}/${AMD64_FBSD_NV_PACKAGE}.tar.gz ) + x86-fbsd? ( ftp://download.nvidia.com/XFree86/FreeBSD-x86/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )" + +LICENSE="NVIDIA" +SLOT="0" +KEYWORDS="-* ~amd64 ~x86 ~amd64-fbsd ~x86-fbsd" +IUSE="acpi custom-cflags multilib x-multilib kernel_FreeBSD kernel_linux pax_kernel tools X" +RESTRICT="strip" + +DEPEND="kernel_linux? ( virtual/linux-sources )" +RDEPEND="~x11-drivers/nvidia-userspace-${PV} + x-multilib? ( ~x11-drivers/nvidia-userspace-${PV}[x-multilib] ) + multilib? ( ~x11-drivers/nvidia-userspace-${PV}[multilib] ) + ~x11-drivers/nvidia-userspace-${PV}[tools=] + ~x11-drivers/nvidia-userspace-${PV}[X=]" +PDEPEND="" + +S="${WORKDIR}/" + +mtrr_check() { + ebegin "Checking for MTRR support" + linux_chkconfig_present MTRR + eend $? + + if [[ $? -ne 0 ]] ; then + eerror "Please enable MTRR support in your kernel config, found at:" + eerror + eerror " Processor type and features" + eerror " [*] MTRR (Memory Type Range Register) support" + eerror + eerror "and recompile your kernel ..." + die "MTRR support not detected!" + fi +} + +lockdep_check() { + # Kernel features/options to check for + CONFIG_CHECK="~ZONE_DMA ~MTRR ~SYSVIPC ~!LOCKDEP" + use x86 && CONFIG_CHECK+=" ~HIGHMEM" + + # Now do the above checks + use kernel_linux && check_extra_config +} + +pkg_setup() { + # try to turn off distcc and ccache for people that have a problem with it + export DISTCC_DISABLE=1 + export CCACHE_DISABLE=1 + + if use kernel_linux; then + linux-mod_pkg_setup + MODULE_NAMES="nvidia(video:${S}/kernel)" + BUILD_PARAMS="IGNORE_CC_MISMATCH=yes V=1 SYSSRC=${KV_DIR} \ + SYSOUT=${KV_OUT_DIR} CC=$(tc-getBUILD_CC)" + # linux-mod_src_compile calls set_arch_to_kernel, which + # sets the ARCH to x86 but NVIDIA's wrapping Makefile + # expects x86_64 or i386 and then converts it to x86 + # later on in the build process + BUILD_FIXES="ARCH=$(uname -m | sed -e 's/i.86/i386/')" + fi + + # Since Nvidia ships 3 different series of drivers, we need to give the user + # some kind of guidance as to what version they should install. This tries + # to point the user in the right direction but can't be perfect. check + # nvidia-driver.eclass + nvidia-driver-check-warning + + # set variables to where files are in the package structure + if use kernel_FreeBSD; then + use x86-fbsd && S="${WORKDIR}/${X86_FBSD_NV_PACKAGE}" + use amd64-fbsd && S="${WORKDIR}/${AMD64_FBSD_NV_PACKAGE}" + NV_SRC="${S}/src" + NV_SOVER=1 + elif use kernel_linux; then + NV_SRC="${S}/kernel" + NV_SOVER=${PV} + else + die "Could not determine proper NVIDIA package" + fi +} + +src_unpack() { + if ! use kernel_FreeBSD; then + cd "${S}" + unpack_makeself + else + unpack ${A} + fi +} + +src_prepare() { + # Please add a brief description for every added patch + + if use kernel_linux; then + if kernel_is lt 2 6 9 ; then + eerror "You must build this against 2.6.9 or higher kernels." + fi + + # If greater than 2.6.5 use M= instead of SUBDIR= + convert_to_m "${NV_SRC}"/Makefile.kbuild + fi + if use pax_kernel; then + ewarn "Using PAX patches is not supported. You will be asked to" + ewarn "use a standard kernel should you have issues. Should you" + ewarn "need support with these patches, contact the PaX team." + epatch "${FILESDIR}"/nvidia-drivers-pax-const.patch + epatch "${FILESDIR}"/nvidia-drivers-pax-usercopy.patch + fi + + # Allow user patches so they can support RC kernels and whatever else + epatch_user +} + +src_compile() { + # This is already the default on Linux, as there's no toplevel Makefile, but + # on FreeBSD there's one and triggers the kernel module build, as we install + # it by itself, pass this. + + cd "${NV_SRC}" + if use kernel_FreeBSD; then + MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \ + LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die + elif use kernel_linux; then + linux-mod_src_compile + fi +} + +src_install() { + if use kernel_linux; then + linux-mod_src_install + elif use kernel_FreeBSD; then + if use x86-fbsd; then + insinto /boot/modules + doins "${S}/src/nvidia.kld" || die + fi + + exeinto /boot/modules + doexe "${S}/src/nvidia.ko" || die + fi + + is_final_abi || die "failed to iterate through all ABIs" +} + +pkg_preinst() { + use kernel_linux && linux-mod_pkg_preinst +} + +pkg_postinst() { + use kernel_linux && linux-mod_pkg_postinst + + echo + elog "You must be in the video group to use the NVIDIA device" + elog "For more info, read the docs at" + elog "http://www.gentoo.org/doc/en/nvidia-guide.xml#doc_chap3_sect6" + elog + + elog "This package installs a kernel module and X driver. Both must" + elog "match explicitly in their version. This means, if you restart" + elog "X, you must modprobe -r nvidia before starting it back up" + elog + +} + +pkg_postrm() { + use kernel_linux && linux-mod_pkg_postrm +} diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-325.15.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-325.15.ebuild new file mode 100644 index 00000000..fd3e8354 --- /dev/null +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-325.15.ebuild @@ -0,0 +1,192 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=5 + +inherit eutils flag-o-matic linux-info linux-mod multilib nvidia-driver \ + portability toolchain-funcs unpacker user + +NV_URI="http://us.download.nvidia.com/XFree86/" +X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}" +AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}" +X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}" +AMD64_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86_64-${PV}" + +DESCRIPTION="NVIDIA GPUs kernel drivers" +HOMEPAGE="http://www.nvidia.com/" +SRC_URI=" + amd64-fbsd? ( ${NV_URI}FreeBSD-x86_64/${PV}/${AMD64_FBSD_NV_PACKAGE}.tar.gz ) + amd64? ( ${NV_URI}Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run ) + x86-fbsd? ( ${NV_URI}FreeBSD-x86/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz ) + x86? ( ${NV_URI}Linux-x86/${PV}/${X86_NV_PACKAGE}.run ) +" + +LICENSE="NVIDIA-r1" +SLOT="0" +KEYWORDS="-* ~amd64 ~x86 ~amd64-fbsd ~x86-fbsd" +IUSE="acpi custom-cflags multilib x-multilib kernel_FreeBSD kernel_linux pax_kernel tools X" +RESTRICT="bindist mirror strip" + +DEPEND="kernel_linux? ( virtual/linux-sources )" +RDEPEND="~x11-drivers/nvidia-userspace-${PV} + x-multilib? ( ~x11-drivers/nvidia-userspace-${PV}[x-multilib] ) + multilib? ( ~x11-drivers/nvidia-userspace-${PV}[multilib] ) + ~x11-drivers/nvidia-userspace-${PV}[tools=] + ~x11-drivers/nvidia-userspace-${PV}[X=]" +PDEPEND="" + +S="${WORKDIR}/" + +mtrr_check() { + ebegin "Checking for MTRR support" + linux_chkconfig_present MTRR + eend $? + + if [[ $? -ne 0 ]] ; then + eerror "Please enable MTRR support in your kernel config, found at:" + eerror + eerror " Processor type and features" + eerror " [*] MTRR (Memory Type Range Register) support" + eerror + eerror "and recompile your kernel ..." + die "MTRR support not detected!" + fi +} + +lockdep_check() { + # Kernel features/options to check for + CONFIG_CHECK="~ZONE_DMA ~MTRR ~SYSVIPC ~!LOCKDEP" + use x86 && CONFIG_CHECK+=" ~HIGHMEM" + + # Now do the above checks + use kernel_linux && check_extra_config +} + +pkg_setup() { + # try to turn off distcc and ccache for people that have a problem with it + export DISTCC_DISABLE=1 + export CCACHE_DISABLE=1 + + if use kernel_linux; then + linux-mod_pkg_setup + MODULE_NAMES="nvidia(video:${S}/kernel)" + BUILD_PARAMS="IGNORE_CC_MISMATCH=yes V=1 SYSSRC=${KV_DIR} \ + SYSOUT=${KV_OUT_DIR} CC=$(tc-getBUILD_CC)" + # linux-mod_src_compile calls set_arch_to_kernel, which + # sets the ARCH to x86 but NVIDIA's wrapping Makefile + # expects x86_64 or i386 and then converts it to x86 + # later on in the build process + BUILD_FIXES="ARCH=$(uname -m | sed -e 's/i.86/i386/')" + fi + + # Since Nvidia ships 3 different series of drivers, we need to give the user + # some kind of guidance as to what version they should install. This tries + # to point the user in the right direction but can't be perfect. check + # nvidia-driver.eclass + nvidia-driver-check-warning + + # set variables to where files are in the package structure + if use kernel_FreeBSD; then + use x86-fbsd && S="${WORKDIR}/${X86_FBSD_NV_PACKAGE}" + use amd64-fbsd && S="${WORKDIR}/${AMD64_FBSD_NV_PACKAGE}" + NV_SRC="${S}/src" + NV_SOVER=1 + elif use kernel_linux; then + NV_SRC="${S}/kernel" + NV_SOVER=${PV} + else + die "Could not determine proper NVIDIA package" + fi +} + +src_unpack() { + if ! use kernel_FreeBSD; then + cd "${S}" + unpack_makeself + else + unpack ${A} + fi +} + +src_prepare() { + # Please add a brief description for every added patch + + if use kernel_linux; then + if kernel_is lt 2 6 9 ; then + eerror "You must build this against 2.6.9 or higher kernels." + fi + + # If greater than 2.6.5 use M= instead of SUBDIR= + convert_to_m "${NV_SRC}"/Makefile + fi + if use pax_kernel; then + ewarn "Using PAX patches is not supported. You will be asked to" + ewarn "use a standard kernel should you have issues. Should you" + ewarn "need support with these patches, contact the PaX team." + epatch "${FILESDIR}"/nvidia-drivers-pax-const.patch + epatch "${FILESDIR}"/nvidia-drivers-pax-usercopy.patch + fi + + if kernel_is ge 3 10 0; then + #epatch "${FILESDIR}/${PN}-319.23-3.10.patch" + ewarn "Should we keep this?" + fi + + # Allow user patches so they can support RC kernels and whatever else + epatch_user +} + +src_compile() { + # This is already the default on Linux, as there's no toplevel Makefile, but + # on FreeBSD there's one and triggers the kernel module build, as we install + # it by itself, pass this. + + cd "${NV_SRC}" + if use kernel_FreeBSD; then + MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \ + LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die + elif use kernel_linux; then + linux-mod_src_compile + fi +} + +src_install() { + if use kernel_linux; then + linux-mod_src_install + elif use kernel_FreeBSD; then + if use x86-fbsd; then + insinto /boot/modules + doins "${S}/src/nvidia.kld" || die + fi + + exeinto /boot/modules + doexe "${S}/src/nvidia.ko" || die + fi + + is_final_abi || die "failed to iterate through all ABIs" +} + +pkg_preinst() { + use kernel_linux && linux-mod_pkg_preinst +} + +pkg_postinst() { + use kernel_linux && linux-mod_pkg_postinst + + echo + elog "You must be in the video group to use the NVIDIA device" + elog "For more info, read the docs at" + elog "http://www.gentoo.org/doc/en/nvidia-guide.xml#doc_chap3_sect6" + elog + + elog "This package installs a kernel module and X driver. Both must" + elog "match explicitly in their version. This means, if you restart" + elog "X, you must modprobe -r nvidia before starting it back up" + elog + +} + +pkg_postrm() { + use kernel_linux && linux-mod_pkg_postrm +} diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-96.43.20.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-96.43.20.ebuild new file mode 100644 index 00000000..d1694146 --- /dev/null +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-96.43.20.ebuild @@ -0,0 +1,199 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="2" + +inherit eutils unpacker portability versionator linux-mod flag-o-matic nvidia-driver + +X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}" +AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}" +X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}" + +DESCRIPTION="NVIDIA GPUs kernel drivers" +HOMEPAGE="http://www.nvidia.com/" +SRC_URI="x86? ( ftp://download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}-pkg0.run ) + amd64? ( ftp://download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}-pkg2.run ) + x86-fbsd? ( ftp://download.nvidia.com/freebsd/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )" + +LICENSE="NVIDIA" +SLOT="0" +KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd" +IUSE="acpi custom-cflags multilib kernel_linux" +RESTRICT="strip" + +DEPEND="kernel_linux? ( virtual/linux-sources )" +RDEPEND="~x11-drivers/nvidia-userspace-${PV} + multilib? ( ~x11-drivers/nvidia-userspace-${PV}[multilib] ) + acpi? ( sys-power/acpid )" +PDEPEND="" + +if use x86; then + PKG_V="-pkg0" + NV_PACKAGE="${X86_NV_PACKAGE}" +elif use amd64; then + PKG_V="-pkg2" + NV_PACKAGE="${AMD64_NV_PACKAGE}" +elif use x86-fbsd; then + PKG_V="" + NV_PACKAGE="${X86_FBSD_NV_PACKAGE}" +fi + +S="${WORKDIR}/${NV_PACKAGE}${PKG_V}" + +mtrr_check() { + ebegin "Checking for MTRR support" + linux_chkconfig_present MTRR + eend $? + + if [[ $? -ne 0 ]] ; then + eerror "Please enable MTRR support in your kernel config, found at:" + eerror + eerror " Processor type and features" + eerror " [*] MTRR (Memory Type Range Register) support" + eerror + eerror "and recompile your kernel ..." + die "MTRR support not detected!" + fi +} + +lockdep_check() { + if linux_chkconfig_present LOCKDEP; then + eerror "You've enabled LOCKDEP -- lock tracking -- in the kernel." + eerror "Unfortunately, this option exports the symbol 'lockdep_init_map' as GPL-only" + eerror "which will prevent ${P} from compiling." + eerror "Please make sure the following options have been unset:" + eerror " Kernel hacking --->" + eerror " [ ] Lock debugging: detect incorrect freeing of live locks" + eerror " [ ] Lock debugging: prove locking correctness" + eerror " [ ] Lock usage statistics" + eerror "in 'menuconfig'" + die "LOCKDEP enabled" + fi +} + +pkg_setup() { + if use kernel_linux; then + linux-mod_pkg_setup + MODULE_NAMES="nvidia(video:${S}/usr/src/nv)" + BUILD_PARAMS="IGNORE_CC_MISMATCH=yes V=1 SYSSRC=${KV_DIR} \ + SYSOUT=${KV_OUT_DIR} HOST_CC=$(tc-getBUILD_CC)" + mtrr_check + lockdep_check + fi + + # On BSD userland it wants real make command + use userland_BSD && MAKE="$(get_bmake)" + + export _POSIX2_VERSION="199209" + + # Since Nvidia ships 3 different series of drivers, we need to give the user + # some kind of guidance as to what version they should install. This tries + # to point the user in the right direction but can't be perfect. check + # nvidia-driver.eclass + nvidia-driver-check-warning + + # set variables to where files are in the package structure + if use kernel_FreeBSD; then + NV_SRC="${S}/src" + elif use kernel_linux; then + NV_SRC="${S}/usr/src/nv" + else + die "Could not determine proper NVIDIA package" + fi +} + +src_unpack() { + if use kernel_linux && kernel_is lt 2 6 7; then + echo + ewarn "Your kernel version is ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}" + ewarn "This is not officially supported for ${P}. It is likely you" + ewarn "will not be able to compile or use the kernel module." + ewarn "It is recommended that you upgrade your kernel to a version >= 2.6.7" + echo + ewarn "DO NOT file bug reports for kernel versions less than 2.6.7 as they will be ignored." + fi + + if ! use x86-fbsd; then + mkdir "${S}" + cd "${S}" + unpack_makeself + else + unpack ${A} + fi +} + +src_prepare() { + # Please add a brief description for every added patch + use x86-fbsd && cd doc + + if use kernel_linux; then + # Quiet down warnings the user does not need to see + sed -i \ + -e 's:-Wpointer-arith::g' \ + -e 's:-Wsign-compare::g' \ + "${NV_SRC}"/Makefile.kbuild + + # If you set this then it's your own fault when stuff breaks :) + use custom-cflags && sed -i "s:-O:${CFLAGS}:" "${NV_SRC}"/Makefile.* + + # If greater than 2.6.5 use M= instead of SUBDIR= + convert_to_m "${NV_SRC}"/Makefile.kbuild + fi +} + +src_compile() { + # This is already the default on Linux, as there's no toplevel Makefile, but + # on FreeBSD there's one and triggers the kernel module build, as we install + # it by itself, pass this. + + cd "${NV_SRC}" + if use x86-fbsd; then + MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \ + LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die + elif use kernel_linux; then + linux-mod_src_compile + fi +} + +src_install() { + if use kernel_linux; then + linux-mod_src_install + elif use x86-fbsd; then + insinto /boot/modules + doins "${WORKDIR}/${NV_PACKAGE}/src/nvidia.kld" || die + + exeinto /boot/modules + doexe "${WORKDIR}/${NV_PACKAGE}/src/nvidia.ko" || die + fi +} + +pkg_preinst() { + if use kernel_linux; then + linux-mod_pkg_postinst + fi +} + +pkg_postinst() { + if use kernel_linux; then + linux-mod_pkg_postinst + fi + + echo + elog "You must be in the video group to use the NVIDIA device" + elog "For more info, read the docs at" + elog "http://www.gentoo.org/doc/en/nvidia-guide.xml#doc_chap3_sect6" + elog + + elog "This package installs a kernel module and X driver. Both must" + elog "match explicitly in their version. This means, if you restart" + elog "X, you must modprobe -r nvidia before starting it back up" + elog + echo +} + +pkg_postrm() { + if use kernel_linux; then + linux-mod_pkg_postrm + fi +} diff --git a/x11-drivers/nvidia-userspace/Manifest b/x11-drivers/nvidia-userspace/Manifest new file mode 100644 index 00000000..ff0bcb08 --- /dev/null +++ b/x11-drivers/nvidia-userspace/Manifest @@ -0,0 +1,104 @@ +AUX 09nvidia 61 SHA256 14702d6726cc9f0ad832a3cc90059999eb956f9e3a35397cb63cfa6347b33e39 SHA512 14c47fa164bde3422b64224e3e46e0a6097599de6193b6d36eb162271d41130f0498f6aee09f5cb60fe43727bf74051f9127afa1b4af42efc28d40af2e4fa86f WHIRLPOOL 34bc9975d132da84506a61a119a5d8d8b5be35af5c1511b5e3228fa3d9f0f3b7f84821c0ab09252054d1471ac7901522309d440c82342d6dfdd2beb73f680460 +AUX 90mutter-disable-culling 110 SHA256 1002661324e8a958574a92c411c554d6f002d3faeac5d60d3b6602580c266b69 SHA512 c3d61f276cc7520c99d493764df24bfa0f4e0d41763057c8d53b221ca2767e062ad79fa7125195bf520054e33645350a227b5dd6120134e1fcba86fa4986a969 WHIRLPOOL c408a20e5f06b574413543466be7d2c584020ce1c2087fe961e427f9d65561c9164a2fa41debc10cdc31006661b0af3d6a87f76c50778b9659bebee5e00c41d9 +AUX NVIDIA_glx-defines.patch 437 SHA256 0007f3d962edb87da4788ce58869679c1b10f28223a6bf1c23696fede57305da SHA512 a9cbbe5d5d362db0eb92d5b9fe87f28cccb600df9b44ae2b323ed08da97c32d6a4a0553c7c82ea3777ab91a1a4bf6b74f04d89b6ec28e60565e677cc4af48351 WHIRLPOOL a826b11c86803530346a65612ebd1a12f77f6c6ba1d93af597435993086451648b825fbc245a2c5850e0680c58129924843744d7e29013d5087c3b4dd9fefb14 +AUX NVIDIA_glx-glheader.patch 380 SHA256 f630e24067bf6199a64f8fe8c5d6fc158cb4b153bda65ffc3f97b36a9cb08faf SHA512 366ebbe967001f4d694e9d6ae61fbd8b57e2946bba495894936809634bb87bd6ba6b10689969977e4d0eaba6983c16fe8d78830112b5b28f01c78381a0a095d6 WHIRLPOOL 8609fcedb439299189d9d05606a290a63de8b207bab855f874faa36e892396f41159d26e505dfead89fdac9d7e61aeeb50b16877aa14ad62dc3cd617353d7d60 +AUX eblits/donvidia.eblit 695 SHA256 d404dd7e5657d83ccf3687720fb978030a3716e47957fb8bb80dea3ed57b3672 SHA512 606d2a496ddae2ac89d3ac0ce5b80bac90cabfe74d6b29c577ab047c3b83ce8965bb4b91b29f37bf55d4f34eaab623ac886760920efb9d306d3904cb3b51291c WHIRLPOOL e0a945c4cbaa0514e19eecf8faa4daaa76c8fc6392fb9a2a607e011e7994c535a3ba4b024de9ee9f4f34c7d4e0d48a0c3315f4cf9687be05fb577ec8dd3c0fe2 +AUX eblits/mtrr_check.eblit 629 SHA256 ae1b8fb37985fc3e42a4a776779b3fe3d70be2c826df5c3f99d03ba7209ca0b1 SHA512 db1bcee808c616536e21f98d65cd0c2b64b26b8b0db827decfc8fe12b031431bf961f1f2016a22170b9400672aeb508f548a66c15018570b44fe1cd535692f86 WHIRLPOOL 4f4961dc5aa71f273871f9171f485aaf5dd27906a564e1967b9298362b2302d9b137a757c6e6918b4b3d1efef75b0ed266f08d83c898e0a1f2b47653e1ca7335 +AUX eblits/src_install-libs.eblit 3472 SHA256 6f301de374736cec316794bf1935a15de025b3c505981f24e06e3df75818ad6a SHA512 f3dd0cb69276cec6f2b7cbb452c77c8e0a82fc37514c31a21fb9a251e38027e4adfdda6ca8b1897635897608a0e70c81f03ff88466a7db1387ed7a4241924ce8 WHIRLPOOL a2e84fba09347bec9b27129f02311696938ad5ca61fa7ff8d9efa10ad9c63a01a622cba1d08b1e166c737e88b50add234c7c0d59b88e5b64442269a7dd47cbf8 +AUX eblits/want_tls.eblit 952 SHA256 e5ce767a2e9a5c0682e764b9ba42a20e721a093f4c0626605570c8b5e3afecd0 SHA512 eafa21a324f095e3d80ac0385c1a5159011a57e3aa2465927c71524c6329147f2ee804f6b0772d4ad97083637451df397be0da748d8674d5be42b308fb25ae2d WHIRLPOOL 8291d0fa548518926252fafabaa0ebbfd7ac165b380650beeed17c86918f95d658a3daadab6c4bde0adbdf1ce7b63a88ed6135cfcf9dceb4798f0b1ccefc8fcc +AUX libGL.la-r2 733 SHA256 4856e7a2c31763ade41c93a395f3e80a2705ac2ab4dbd73e5161cdba132f407b SHA512 52fbc3d704274fc5403b95a5d696824684302f4a77e0b08d5a59850435b12d9bdc4cf931f346f91e950f246cc342e0a673e7657cc2cea95e991ed3aab8c1c928 WHIRLPOOL 6a0006277a8444b4b5191a7e07c972efde43c3a9ff8a7286d1d1f78c69c3ba394572f31716b684f1e28355572a6e9f9cbd5437bb9dba127d727f8789fbd2a980 +AUX nvidia 1510 SHA256 b193cc3f6d6f39138720a2282d9f161fc8f2e8a15bc43d183a30eb879add06c5 SHA512 4ffdf49c2634b261be122a0016b0f69d30db6fe4b4a29767cfeee2e1d60671e7e6fc5e5c3a237b351a4def64404db121cf296a0cdb6e1bbd4f8e78ab40587000 WHIRLPOOL faab4c87940e4703b2a30f284cae34bdf4ac486cb1d402b5bd91ef65c23f443c2c961ad914fbcbd5258dd5bbaeee583f189fcf5fc14f2b9925c8ccfa0fc422c7 +AUX nvidia-169.07 639 SHA256 a8c4860f008d53776fda7a17b59524f271236559af688e9a2c9845cbbcba1577 SHA512 3af295c026280dc3a2b73c2cc7772254686b09cad15f1333ab0b4de8cb0ccf78e725ced2a399b10edcf8af6ba42ab1485dc0661af67461b0c3789f786357772f WHIRLPOOL 626ae3c01c879e0cfe05bd373e0b9dfd6f462dd9ef6ae94a7d60276fe2d17c57fbb20aaa4d2a186a0ffc2a860076692aac854d00a3545bc9736e7bb8d0581055 +AUX nvidia-smi.init 671 SHA256 5776a661b510e072d34e779c23dfc710a13d04c49acc22772d2aeb0e415820d6 SHA512 f71bcdf2fcaf4aac69056a04f3e57c9f5e4d6c210fe571704d3f9a0798cc9615cd0560840ae336744f43563528db5b9a7b67730895eff438be330b13ab863ed6 WHIRLPOOL db48549b0d2b02d2f9ca6a86f38229dae67853939ac1c2147d5066b9b8958c2e0fb8539f70ddf5c92ae6ad642bb48ea8b1119d1779c80dd66bb450240fd0b40a +AUX nvidia-udev.sh 185 SHA256 120c0af2b64fbcbd7032217a78eec8b104874c1ca68726367bce22c57944e07e SHA512 166df3a4e7c1862ca2e0f634bf5eed7aad1bdd7e55764ca42371b91a7077c59f0bc243de5616fd38dac9694159d1695d54fbd08ac89d4d3f3649c70c7db5977e WHIRLPOOL cb9995029cdb2fe1bc7fe5ae54041ee5de8da86bf5eb3616d062475e56c44d436e1e66683ecddd986fc5bca5723d88da4b1a42f65f3cd7e15636928bd21fce14 +AUX nvidia.udev-rule 462 SHA256 37b152a5055a16d1947171567178e2841679ddf03dba9d48e7d30f1e3b469ac6 SHA512 96f9edaa0b46bea5fce17596f868bea5265b303d7185af6ba81527bbd7b8fdf92de9311317cbde51a29d222083d451c25ab77c3d6837cbc4072a50d9af89aa86 WHIRLPOOL 89ed95f33db7485a3a1acd91df33ecdfb7d0a249db2d7674f134fb85b35a54653d0458e478503315ce506ae5d3c8dcd4ac20420711fdbdd087ea4bd779627d13 +DIST NVIDIA-FreeBSD-x86-173.14.31.tar.gz 17991684 SHA256 98699bc8dc1dad86cebc2ed067b4fc5cd37b8540e897bb218f38ac80c4b4d875 SHA512 4e6fbbeaff54563a135346e60372046cb2cd2562cc606836dc3169d4f50c0b112095b1f0f3f14f2f0facf2be1235064c13766432a04b927f2ab81ef50c8f4f34 WHIRLPOOL 0cc4f196d7ccbdd45f8584fef9f98dd1af2fa260a8e694a6000e5436ae2ab35df6ba5f8967261e36f0107962744423fc73eef9d0e59807f78536ecf8de0f5963 +DIST NVIDIA-FreeBSD-x86-173.14.34.tar.gz 18792829 SHA256 44368464ad72addb999aa7bf3a1d684d4cddd1bba08d7bca9e45a825cb8865ae +DIST NVIDIA-FreeBSD-x86-173.14.35.tar.gz 18748428 SHA256 51e82a12db81b5af4ae5ee59612875c0dbef52cb641d61a44c72f2e1cd7f4c78 +DIST NVIDIA-FreeBSD-x86-275.09.07.tar.gz 30304023 SHA256 d5d119c2f066539da0f2d1926193f6bc2bfbf2a1dcdff77322a23b42c5df91d9 +DIST NVIDIA-FreeBSD-x86-280.13.tar.gz 29589886 SHA256 2ad1882467a2d8a0b65dfa15e710e4938786e51f688e1d02d4d3343868b9239e +DIST NVIDIA-FreeBSD-x86-285.05.09.tar.gz 30697710 SHA256 d3ad51145cd57c70678ee659112a0973187b1b02e3062addadd0fe094b3c46fb +DIST NVIDIA-FreeBSD-x86-290.10.tar.gz 32042469 SHA256 f5accbdac0b231a8073f76c1d1d8ace7cb98ebe167888c31183a2752a669ee92 +DIST NVIDIA-FreeBSD-x86-295.20.tar.gz 31993959 SHA256 fea6d5552a50e2aedc4726944fea85ac8baf0d0b26661fc3b1f97f54ebec6736 +DIST NVIDIA-FreeBSD-x86-295.33.tar.gz 32039170 SHA256 e3f8052fdac78defafcef495febea2a77f820f2c4c9ecbe47fb92bf630321afc +DIST NVIDIA-FreeBSD-x86-295.40.tar.gz 32029253 SHA256 f47b603f39dfd2e405949aab6fbc7abd4b24f43c6fb47b4f23d7618f32021364 +DIST NVIDIA-FreeBSD-x86-295.49.tar.gz 32078716 SHA256 aa7c9a13931a55e358c542e1d18feb0aeaa7b18550e9675698b152265134d938 +DIST NVIDIA-FreeBSD-x86-295.53.tar.gz 32085530 SHA256 ecb637754ec31a0c058017e04b363abb831b96584ca9684b676a93ecb5af93ca +DIST NVIDIA-FreeBSD-x86-295.59.tar.gz 32092806 SHA256 9a3e1794418add03ad97aad93608d1bc1f2f9c5a82e0321a2a8ba1c9db7d41dd +DIST NVIDIA-FreeBSD-x86-302.17.tar.gz 32072917 SHA256 b0d50c3333ee7c485bfd5287b37e253ed358dd5d205997f0c50e16f04b7714c5 +DIST NVIDIA-FreeBSD-x86-304.22.tar.gz 32975645 SHA256 20a84c23339695fe73d9be977662b19572360d8d87b54aeca428f73e2510c1e5 SHA512 15788983073427a9729b61a37b684c37bafd57618bbacec40fe8f9bd0a3f6f30d417297dee5e3ca287f0b71c74bbe03163edef048f8ad38cf2493124820244dd WHIRLPOOL f823ce885ebcd8ab9af427487c8dfffe5cc7adc61e1c4af31371b808df449584df1f571310610e901bc83c4e52cb553d2a71d0ae5e3fadfadf56ce1a97447484 +DIST NVIDIA-FreeBSD-x86-304.37.tar.gz 33291575 SHA256 e6c3a1d4a757b5d4f2ab54a43d5d7008fcb1b481f14515f58adcd31f3edc6576 +DIST NVIDIA-FreeBSD-x86-304.88.tar.gz 33651825 SHA256 739325b26a93d934d015159c420ef1875a24ccd62a5bb482e688cf918d4fa33d SHA512 6dab929d2d2bacfc3a96ab24ff02996938613851e2b3c050ed3a1d0cca3751c574f12508e21119f2b43ff0421c3f88bf4edd51a37f3374c72c6337bcb8d6bcdb WHIRLPOOL b9be513a8dd8ce4cd6eeb23a24e725c751bb2cce0745477df2b4b84d7d03ad557d0b16bcdfb8d642168de09d59b057cb2955fca11f50b281ebad92f30a7dc4e1 +DIST NVIDIA-FreeBSD-x86-310.19.tar.gz 32264033 SHA256 29635a45e87fd240d472868dcd1ff9030f7eb85d78ffe85dea0f420be390d3e0 SHA512 77fd63c0c2cca5462c7e969e300f027dff9cb60f4234868f42317604d537a7bccb2631958f2a0cf74f46ee685d8f2a25f3dab2792be00a5c638d9756deb5a582 WHIRLPOOL bc896389ed9ad32e8e2e087476a3bafac9f828b8a1167c7b99cd58688d56d5454717dbe99b83fa1eca3111a80ffa9f721332364c8fdf95c02f4c5e05f989248f +DIST NVIDIA-FreeBSD-x86-313.30.tar.gz 32591892 SHA256 1e02831fbaddf2f27808ea26352d835417f59bcf54ddb3e9c0f1d7b76dcb4666 SHA512 68cf61fabf707dfa1225011cab3749959ab29f09f611347eb9f9bd55065012d04382998e67091c4d3c1af9be21be6381aef9b6414448ee15f9a36d44448f5bf8 WHIRLPOOL 71ded70f45e880db2c2850c596cebafd004adf89f7131adaf324d1d38abbb5457a700bfa9e671bfa144515556f011df8a37fdf22b78b879f39007be6487f060a +DIST NVIDIA-FreeBSD-x86-325.15.tar.gz 34164781 SHA256 745d8454833d1ad59f6480ac2d1ca744862e4e711e16deeebc0d04ff86925c4d SHA512 b1ce1041d7f3a926c3e62e398a618063e24675cdd919206c11e556f38d3b0078233ba31207d04e9d94e26bbf5eae4d43f8db457e7ac4fecfb8d407d2dbbf3040 WHIRLPOOL 9a37ecaa745ab9ff80755f01100610f85467fdfb55f5568dd358cb39302c0951edd91d518f1027bb0d43628e575ff9c1799ad956b9e673a31d38f7f3db125c63 +DIST NVIDIA-FreeBSD-x86-96.43.20.tar.gz 14060884 SHA256 e75fce272e72644d53e6ad3c0957fe173735a4b621726ce227ba8ecf9bd9c5cf +DIST NVIDIA-FreeBSD-x86_64-304.37.tar.gz 34210803 SHA256 0d00046c8463954b6c8e13e245b2619758e947389161a113aa005ef7566e5dd3 +DIST NVIDIA-FreeBSD-x86_64-304.88.tar.gz 34597351 SHA256 be0e20a543fa14a8f91481dd64b080093b19edf951bf631c62365a64dadb1934 SHA512 143af863aef72962d83c6f77160512d0860a62964e92043400674b0be95735ae6f2dbdd25c42fa96b4511cece9c73b7072f829a88d46ab6b79aa750b65e64748 WHIRLPOOL 74b5014736065e178b261716e81f367395252efb3aa3b84faab6b6d26f561caa129e1d9bc0e02ce98f83dcaa3603fddd155de4b50e760bf2ea8df4c176b21e76 +DIST NVIDIA-FreeBSD-x86_64-310.19.tar.gz 33184883 SHA256 82607fdd14c666867b842205be3ec8b8095fb0c9da1cb2286b0bf85a769eb9ae SHA512 5f112a4dbb379977c9b1417536964d02498cb9d4a4ff3c35291dfaa5c90fcc8b2073ec75a1db9358c98686661d525db5e7e42036500281d09a1be608f9c2b851 WHIRLPOOL 3b629c57cc63319b18805fb67ebf75d07907a52b2c1d7cad12cca8837c29e6557c772c416d52d15f1e8f7b01b65b8a7728bd4cf5c0da890644e3151421fb901d +DIST NVIDIA-FreeBSD-x86_64-313.30.tar.gz 33557658 SHA256 192ad1bb8a0cd649e12bcccf97c5f4d2002d6695126fea81586991d9e95248d3 SHA512 79b3b47bdcbc99f724f8c424733c11f1b2653103bbe0ba9849587628611d9da08ea434c786cc7d3d891bde3dfe4068298a7377ce5b1a3484fb64ef4d28c896da WHIRLPOOL 7307d6adb04b47b8403134e7394bf9af4f90839d1fb62aa3b7b7c6d8e367392829fb249dc8d444e66158fa5b5b15cf5b6c16e1f5659a22a15c17f55eda026660 +DIST NVIDIA-FreeBSD-x86_64-325.15.tar.gz 34590166 SHA256 92429119ca8e50baa06c6681ed2b9eb6c37cdf256a19ba4e1827be4b202a0569 SHA512 c9e4d41a5dcb02a280fb323fd4578bc7851d4242890f1d8e69a59e083a2a76cccdaba3ed55f8eb8f983e9c89326f0a9d7152bd7770230fbe45fc7b5865c486b6 WHIRLPOOL c54638af7fb6aaf63222ea75cc377e5e449dfaa80dd47a23aed2eec8da1c460c9e3c24627a2853287585a65b0f562e3efc7916fe985a4816d82aebc12bf7021b +DIST NVIDIA-Linux-x86-173.14.31-pkg0.run 13407481 SHA256 e855a62f16a9d0eff1bf470a8fcedd48cd1b718e969ad5ebe89a557d039d1924 SHA512 bb58aa1ee84c71311a7b5cd3d87fa2827b6b41bb4645849611381ce7e255516da66fff9cc9a295a39ea185668d7f91fde0eaf56a18b04ae67ae468e1e509bc46 WHIRLPOOL d9a28dd96bf77051e6cf91a1b29c59fac716e14f3d3726867ecd9e43ac90d62d4ace0f0add7aff619f4933a8dc9e87734df3fcb5483db62bf99a77320d4e2f33 +DIST NVIDIA-Linux-x86-173.14.34-pkg0.run 14071464 SHA256 a873b7a28b1d83fcb7a97e4d5fcb471bb96bb5094bcd5e86c728ec22b49b258e +DIST NVIDIA-Linux-x86-173.14.35-pkg0.run 14028887 SHA256 2d26100f7691047e424e1614deca0f1d862da5fa69e04e967f0c1dbb84ec729a +DIST NVIDIA-Linux-x86-275.09.07.run 30930605 SHA256 27d1b2073c11bd56e423ed80bd22773f1f282c39ab3b76773144cfa680a1ff0c +DIST NVIDIA-Linux-x86-280.13.run 32704856 SHA256 b222afe19c6310f1aa2a2574f27fa9e2b877738177daa60162bb5705758bac9b +DIST NVIDIA-Linux-x86-285.05.09.run 33592492 SHA256 ce03fa99b62081b52bd5dae3594ac5942413ed530cda3d76a82f4ab0afd36f96 +DIST NVIDIA-Linux-x86-290.10.run 34691272 SHA256 99be8f53aa1f777445e5a4cac27acd7d85990db712b5c29caac865145fc5adaa +DIST NVIDIA-Linux-x86-295.20.run 34641353 SHA256 0f9dc3d493053cffe37f72b6783edc6c14afd31532b43a7cf0bfce763cf2d500 +DIST NVIDIA-Linux-x86-295.33.run 34675369 SHA256 90a866c9c2f3904bc25b7a5829f8b40a419e60a79ad13c980b48d3bf89625a47 +DIST NVIDIA-Linux-x86-295.40.run 34668138 SHA256 ccd46574dd843a50327f50daa6f0b635ad7eca4a5b9a5fa963d0871bfa74ce2a +DIST NVIDIA-Linux-x86-295.49.run 34716936 SHA256 f13b44725f4904ed3f5250d733b45b5815f54e8b588dfe6c6180918e80f35c6a +DIST NVIDIA-Linux-x86-295.53.run 34718461 SHA256 0040096216ac6f8695743c9124a067787d30947f7c64f2734bac474f5af0b0a0 +DIST NVIDIA-Linux-x86-295.59.run 34730118 SHA256 084bbb76c57d5c2a5b780322a95dcc230ec6e25b4f6c176574a93621399ce5a0 +DIST NVIDIA-Linux-x86-302.17.run 34598956 SHA256 3525d3814361bd202998cea2962bb3d1bb3419206d02fd8ac30d61358c1a284f +DIST NVIDIA-Linux-x86-304.22.run 35433519 SHA256 174be68a403f234cadd6dbac785459f7a7463989050fa4e6c92ed65b638ededb SHA512 885a0a8a7ecc387a9bbb806b2f36942d7bee2bdfdb784169490b72667db4218b76e19b4ebdecf107e1498f8e1d5544e3d44ae6b02cc6d6855431602e4afc3064 WHIRLPOOL ab691f2aded714b38afad1f6ff966dcb016cb409e4b78c37137aac439c06d2df112b74d72abf205526b65cae7d90a7e5f5081426d29e1cd310139511b77794c4 +DIST NVIDIA-Linux-x86-304.37.run 39349097 SHA256 ab3174a0c9ab37a8fc3f4a8fc1121d72fbdd5e00ddecf44f7dbd84bb8d51b337 +DIST NVIDIA-Linux-x86-304.88.run 39682604 SHA256 71e10294f073e31a387da4282b95cdde5fbfc996cb1c564f290eb0df1289b7cb SHA512 ba6f0236aead2f5161c94c7eaffb2497815ba1a7cbf872ae37d620d66533d4847acb6dfcc230e2b751aa9717ae552940ed6d3da1a9209aa54f6a810e3f551e49 WHIRLPOOL 9c2e0438630e86ca8c7aa2f26928113e5f15dcf808be8a4c2e937fd04b8d1aa7304bda714580834cc5ef4dc57304f41be62b55ee75545b9cfca3533b6db737e6 +DIST NVIDIA-Linux-x86-310.19.run 38581112 SHA256 85d082c06a1ea07f514d22c0de4d5d2af065bcac37c377c3d755904bbf780c2f SHA512 ef24e695b76b57cee1d13601c5856fe723da9da678e0f78739f0e291c5d00cea9e0da5b110f4125a79edd420127fed0a48883eaad591ed16e6660b139b7cb289 WHIRLPOOL 064bf26184b644210f565ad9b1b400abb26b9c8b61b519d2831ce04128fcc58c57e9474bb2ec5f3d935799857a1ca4c3273b68a36aca1d2285318f2679251f5e +DIST NVIDIA-Linux-x86-313.30.run 38845860 SHA256 0a0f10979b1bca8e4a244e204b58aeb9a580924a9dd7b11b21d15abfe1ad49ad SHA512 c3b07e7186fcf5a1f3e73f4e9510dddff2a42c0202bc471a946e38e636af27b2d17206b7105a7a80179fc17ebceab6c2802ff6ddaabae9e16a930dfa1252a2db WHIRLPOOL 2d4402883a480ae3050af18f3fe1aec4110132aa4eda0ce9675f79471a526e8b90b9ebe6a0a5c76321474be6ace963520b903cf809835472649b095be757ec52 +DIST NVIDIA-Linux-x86-325.15.run 27409286 SHA256 3d790e4bfed24641f7cc76879144ab5d52b12271012ba381b0d33aa1a2e08775 SHA512 48052c3daa8748a7c43de1c24e00fdd3f94cebbe7f5efbb185a0472a1d0bbab8adfe377359ccdc6cd8e437a80506fdd551408237b0842c194a3497c43cf3487e WHIRLPOOL 387fb8af1a31cc295abe7b15fee7d5bc01c515603b178abe7f50864dbbf0685ca50f88e67359adc4af8e90caaeb1fba95aa6af9f54e6fced46c82c5cfc094390 +DIST NVIDIA-Linux-x86-96.43.20-pkg0.run 10323541 SHA256 bc778062cf745ee4916de77a702f702312d33eeb3b6f379b63e4366fa5197517 +DIST NVIDIA-Linux-x86_64-173.14.31-pkg2.run 18967067 SHA256 c56cfe43c4fa95102d099e4f1c4e75e58b57d73b4b36a858d54a2a339aad56d9 SHA512 fcb3f004495c8e3ef93b4229b2b64e8ee83a12f2cc5ba1c33bf486b6bf8687e1e1d5b45c2da8721422f6c2190150f7f86bd4b9ec0987d4440343fafb9e18c208 WHIRLPOOL 585728e3d03b1a9cf90fd80c413f2dd432870f49df60bd1335ec0c7143b59005819b4fd655587b0f76d19c28eaa946d6893c4358b8ec7e33000486429684cd1f +DIST NVIDIA-Linux-x86_64-173.14.34-pkg2.run 19769116 SHA256 30dcdd3cfba4f7d2b5f4977faea573463700b44252e46fb43402e269183dec3e +DIST NVIDIA-Linux-x86_64-173.14.35-pkg2.run 19767039 SHA256 5af64646b098021b550242fe8eb03817f862af0442023545d1295027f589595f +DIST NVIDIA-Linux-x86_64-275.09.07.run 51646025 SHA256 747c09b0a0a8d60e1b5fee49fb1ea07ee5812f8e85a87b2403011af6de58164d +DIST NVIDIA-Linux-x86_64-280.13.run 55011572 SHA256 98a08c7d943912a178a9bbe419db60634088e5262ae9053bf2fe730984e5a012 +DIST NVIDIA-Linux-x86_64-285.05.09.run 56674677 SHA256 7159a1f7e898b50dd49ea2273ac6facb870546ad5496bf70c6fbe1642d2c4970 +DIST NVIDIA-Linux-x86_64-290.10.run 58334192 SHA256 34a2ab07f4ae7afdeb2c8415f3f37c1099e6690eb25f3dbef92eca771f7ce4cd +DIST NVIDIA-Linux-x86_64-295.20.run 58403208 SHA256 3b84fdeae335c047193f68a1da26f2a736461c35cfe94566fc7ace1e5762d34c +DIST NVIDIA-Linux-x86_64-295.33.run 58435170 SHA256 4e939bac1ebc03c6439969d638540b99900b0fe4e4799b4186e5ff9521d37b73 +DIST NVIDIA-Linux-x86_64-295.40.run 58446405 SHA256 f6d5ae338b3b8ac6c512d06b335010934a62728f181a1fa5253aa84b7bf45e7a +DIST NVIDIA-Linux-x86_64-295.49.run 58521195 SHA256 61dc9623ea1981f801d97de7c67c32b7e4f7ef4aaa6744910967cb634d9ace62 +DIST NVIDIA-Linux-x86_64-295.53.run 58522001 SHA256 4525e994a0d0a8cd776415401423e7de3985923637642955c3fe50a3d047d4ca +DIST NVIDIA-Linux-x86_64-295.59.run 58529480 SHA256 4b1d96389abd2b804ad470c5189142a02ee4c82c1ac56cea37ecb45e8051313e +DIST NVIDIA-Linux-x86_64-302.17.run 58653717 SHA256 5cf9059ebb70ade99e5621c0a605ed5bbb6c274f7c52a7ef40342ceb41b381fc +DIST NVIDIA-Linux-x86_64-304.22.run 60141600 SHA256 4c1b6f7dcda007622bb5e243b858abdb3881d5d5befdc617b23393545d9c96fd SHA512 06dac9e042baa836b1f2d9cd360b2ca3545dcff4b382ed9d29e8e442ab5e9dc241b5f75250c3dce73e0e7958bccaa16ac48415ae5f2fc7cbc65689bd7a6e7640 WHIRLPOOL a7d1a1abe5cdedc743b43fa1627dc9094ab32cea3645cdd5cfd53a33929d0a48f4d3efaa7311ff6f0ba99d31a112e6872cb4cad3d1cafbd996646020d8dd7f40 +DIST NVIDIA-Linux-x86_64-304.37.run 64075318 SHA256 cae75158047d0b97ea48f269fd2903a6731f53b978a1065720343436c97ca9c2 +DIST NVIDIA-Linux-x86_64-304.88.run 68041437 SHA256 c1a73211566b085214b0ad1824733aa56d09c6139f729feebd0eff44f6113da3 SHA512 8a907f9ed307b1e4b5563a9aba9d6c1c036885cd64a4a229d6831eb7a855921971e652b7940333e366d5088f97cf3596fb739853b3c3cf94446ee0cea6164ab2 WHIRLPOOL 2e43479bb52d1dcbe1007cda779ab21ed064883769358a09bdd765e55f6b35a855a51006e070d33ddd2a3808802cdb4fa2ae63cc7cc189561934d00574492ca8 +DIST NVIDIA-Linux-x86_64-310.19.run 68022245 SHA256 3326cf9eb432a10fee5cb663132cd6c175813d0225750ef237dcc7feefd20fca SHA512 035a0cb62f4d307683ada7fff380fbe8a9433cee0ee6a8b1986e9d59b55a23484305903f84e77fb6a7440e06efce012feae1da658a304e790e2022c028541a69 WHIRLPOOL 523a9ca07d18cfa1afb1f4e527cecf1c4778650eaa81d1e627fd1c65b4ab459d02e5ce726d0190c57e677c6ef3c22afef8c6aaa99892731faf3415138e9e7635 +DIST NVIDIA-Linux-x86_64-313.30.run 68379307 SHA256 72317f2e4c459c33c764e3283deb3e1615b1852ead1f9bfad82148e120506022 SHA512 ae4439697e47eff98e06e5f77de979bdce096f95efa8bdee9c6fc939b42b5ce3b11c23d7691e974cf0f6f783eeb0fb694670636538352a0e8979f88d687f1f86 WHIRLPOOL c12a68fcc4d78f3856d87a86cef43c3632c0db1b6c5799b6482584d4d83a7cc863b9b394a501b96534175e11663c602d72f6ffa49f85461eaf4324dc61e654ff +DIST NVIDIA-Linux-x86_64-325.15.run 48034648 SHA256 01446fbd94f6eb3b2e1b3d3f2b06970bf470c3ee2cb1838b3d0c2416e6c74500 SHA512 323cbd8e6f3ce29a1556b83b2fb3456f919964ede1cbee4ddaa3539ab75eda7abe26b96ba500462eed2ade4163b8de20d1db6ea987af923710f0e1a60e432e83 WHIRLPOOL 7c05717a2cfcb003a8c1f9fc5f5e24cfd5216aca7167ee8f29b60c43262fc61afab9619147ee07cb2541aa1d55b13a730b52c90979b7970df709fb659fe782ff +DIST NVIDIA-Linux-x86_64-96.43.20-pkg2.run 14572507 SHA256 562107a262e250b836966e29851628f6162ee2857d53252221c780d9b201de18 +EBUILD nvidia-userspace-173.14.31.ebuild 12005 SHA256 833741ccdcd472cc91db8da97226dd9c51ee4afa825e788f6f2db811211fea02 SHA512 17bdea337e4c2ce3beac8ffbb9a80e064cb24a35a73816454ae1dffde3d09ae166f572c486c5bf861a4e690920562004d50eaf7d2e651d6b96589495072af5b8 WHIRLPOOL 6fa4e0f0c61f1ddb62768b994bb55d519b3e64d790cd29eb8b89e1d2d91785a030a0678074a3e0369abaa7dbb6463af5f992b3a47b6c11d3040ccab0b7619f1d +EBUILD nvidia-userspace-173.14.34.ebuild 12005 SHA256 833741ccdcd472cc91db8da97226dd9c51ee4afa825e788f6f2db811211fea02 SHA512 17bdea337e4c2ce3beac8ffbb9a80e064cb24a35a73816454ae1dffde3d09ae166f572c486c5bf861a4e690920562004d50eaf7d2e651d6b96589495072af5b8 WHIRLPOOL 6fa4e0f0c61f1ddb62768b994bb55d519b3e64d790cd29eb8b89e1d2d91785a030a0678074a3e0369abaa7dbb6463af5f992b3a47b6c11d3040ccab0b7619f1d +EBUILD nvidia-userspace-173.14.35.ebuild 12005 SHA256 833741ccdcd472cc91db8da97226dd9c51ee4afa825e788f6f2db811211fea02 SHA512 17bdea337e4c2ce3beac8ffbb9a80e064cb24a35a73816454ae1dffde3d09ae166f572c486c5bf861a4e690920562004d50eaf7d2e651d6b96589495072af5b8 WHIRLPOOL 6fa4e0f0c61f1ddb62768b994bb55d519b3e64d790cd29eb8b89e1d2d91785a030a0678074a3e0369abaa7dbb6463af5f992b3a47b6c11d3040ccab0b7619f1d +EBUILD nvidia-userspace-275.09.07.ebuild 12387 SHA256 4f5982dd02fd6e76cf39691facb4b3a184ed863c1b4dc3670af07daf7e460ece SHA512 c836db66711a5b6259e02d9e1cd7ef6ccb67fd9b2b96f5f8688ebb9e94867f2dd278a7cad06ec43c6412f7b8ef1e04a4d01ec096efe8483af0e9f3f00fda6b61 WHIRLPOOL 613e80cb3b0969753291b44ef4a19e93aa0d5d4f148cbb3c1e316e2abab8a272b72ccbbbc5d89cf187ff3882d14a4c8e1c2081c334227c532ac7c9e09a3011f2 +EBUILD nvidia-userspace-280.13.ebuild 12387 SHA256 4f5982dd02fd6e76cf39691facb4b3a184ed863c1b4dc3670af07daf7e460ece SHA512 c836db66711a5b6259e02d9e1cd7ef6ccb67fd9b2b96f5f8688ebb9e94867f2dd278a7cad06ec43c6412f7b8ef1e04a4d01ec096efe8483af0e9f3f00fda6b61 WHIRLPOOL 613e80cb3b0969753291b44ef4a19e93aa0d5d4f148cbb3c1e316e2abab8a272b72ccbbbc5d89cf187ff3882d14a4c8e1c2081c334227c532ac7c9e09a3011f2 +EBUILD nvidia-userspace-285.05.09.ebuild 12387 SHA256 4f5982dd02fd6e76cf39691facb4b3a184ed863c1b4dc3670af07daf7e460ece SHA512 c836db66711a5b6259e02d9e1cd7ef6ccb67fd9b2b96f5f8688ebb9e94867f2dd278a7cad06ec43c6412f7b8ef1e04a4d01ec096efe8483af0e9f3f00fda6b61 WHIRLPOOL 613e80cb3b0969753291b44ef4a19e93aa0d5d4f148cbb3c1e316e2abab8a272b72ccbbbc5d89cf187ff3882d14a4c8e1c2081c334227c532ac7c9e09a3011f2 +EBUILD nvidia-userspace-290.10.ebuild 13317 SHA256 5e296159aefb2e9d847b93a4b28db035a887156167cd87741258e8fc9e246ea9 SHA512 d75cf9feb623afd772733ce749841aa472fb18e5e090482df0b8444645c9da59d0d7410787ffbcb670dae013d87a9d5744cf887a07a647cba4feedc53f83414e WHIRLPOOL 58ab3ecc1acb51d0bcb74165d13738a825aaaa059c962ea52e5f40a1f0d7591a747d3e0afeae4e0d6b42795d389c3e804cd8de93addc7250fc4544470a55b6f6 +EBUILD nvidia-userspace-295.20.ebuild 13317 SHA256 5e296159aefb2e9d847b93a4b28db035a887156167cd87741258e8fc9e246ea9 SHA512 d75cf9feb623afd772733ce749841aa472fb18e5e090482df0b8444645c9da59d0d7410787ffbcb670dae013d87a9d5744cf887a07a647cba4feedc53f83414e WHIRLPOOL 58ab3ecc1acb51d0bcb74165d13738a825aaaa059c962ea52e5f40a1f0d7591a747d3e0afeae4e0d6b42795d389c3e804cd8de93addc7250fc4544470a55b6f6 +EBUILD nvidia-userspace-295.33.ebuild 13821 SHA256 e3048a55ccf9cf7c8310b225885dbaae713b5fd51fa67059f372a347a1d90c35 SHA512 758f5f1a618c5baf98087175ff4c00bc63aa96955317dcfca40f8b25e66fd6a294809b203e6834fc9080f43f005f2728f1c4689bea0cdefab52d8c50cbf87547 WHIRLPOOL 8872b9c1779343196e0129310820d2d91bef47f06b1156149fbf52dacca83e0f3b048d19cbb4ed5af2b2487acd057fbf5b3bc6b3ceb5f1bafd4034301652d805 +EBUILD nvidia-userspace-295.40.ebuild 13975 SHA256 aebd97275f8ce491ca6e962d6e956982ae04ca803e9abbc4623b3f623f3b50f4 SHA512 fe0f3ebaff68517938d00e270f3bae0f5ab964933e0065e6226a93181b2e4dc2c06a9242c8788b6795c0e6cbfcd25b1cc7f8f8567243c8c2fadb6f61c952d383 WHIRLPOOL b31d65669984e41fb35747253fdfd6f23efee54fec07b9fdd58106d48fbed074e8a2be5381305f3aff14d01e5190c9d85472be91026876f50563cbb76ef65c69 +EBUILD nvidia-userspace-295.49.ebuild 13911 SHA256 a0d5b8a573e41a10b8201a6a4ecb854c6fca20107c28cdc298b59dd506ac28c9 SHA512 4ba775bcec98b8f4b9150bf3127884c422a8263918fc2c06983895622e70d9a603672cfdc29afe01d8c449b9c6ee49408066205194795bd59cd6e9493fc40f77 WHIRLPOOL d745cd7dce11da262472d0ba749002cd799241b4529b57ecdabf6f29ef13751e33b751fda2563e30b8f26d8cf3d040d36880af60171f1aacd5fbe7ab2098122e +EBUILD nvidia-userspace-295.53.ebuild 13914 SHA256 cfbcdd6c3e928bf3d0f2ed4c501d491707d338c43d7080aed9dc781188a065c3 SHA512 d8bd0b9af6b44254448814ddc477c2cadffdc5e6a8b70b50ca65b203d97cf94910a50c6b39861550754b9ef1f4ea7edbf2fc0e466c04993459aecb5db631ea09 WHIRLPOOL d503f8302d652a715d2c52077629f9560fa3012694b1ae6410c815ea461f242d95dbafa2248224e15dc0d5353bc1afd5cb8f9540f19428332c184a10e1028a6b +EBUILD nvidia-userspace-295.59.ebuild 13914 SHA256 cfbcdd6c3e928bf3d0f2ed4c501d491707d338c43d7080aed9dc781188a065c3 SHA512 d8bd0b9af6b44254448814ddc477c2cadffdc5e6a8b70b50ca65b203d97cf94910a50c6b39861550754b9ef1f4ea7edbf2fc0e466c04993459aecb5db631ea09 WHIRLPOOL d503f8302d652a715d2c52077629f9560fa3012694b1ae6410c815ea461f242d95dbafa2248224e15dc0d5353bc1afd5cb8f9540f19428332c184a10e1028a6b +EBUILD nvidia-userspace-302.17.ebuild 13914 SHA256 cfbcdd6c3e928bf3d0f2ed4c501d491707d338c43d7080aed9dc781188a065c3 SHA512 d8bd0b9af6b44254448814ddc477c2cadffdc5e6a8b70b50ca65b203d97cf94910a50c6b39861550754b9ef1f4ea7edbf2fc0e466c04993459aecb5db631ea09 WHIRLPOOL d503f8302d652a715d2c52077629f9560fa3012694b1ae6410c815ea461f242d95dbafa2248224e15dc0d5353bc1afd5cb8f9540f19428332c184a10e1028a6b +EBUILD nvidia-userspace-304.22.ebuild 13914 SHA256 cfbcdd6c3e928bf3d0f2ed4c501d491707d338c43d7080aed9dc781188a065c3 SHA512 d8bd0b9af6b44254448814ddc477c2cadffdc5e6a8b70b50ca65b203d97cf94910a50c6b39861550754b9ef1f4ea7edbf2fc0e466c04993459aecb5db631ea09 WHIRLPOOL d503f8302d652a715d2c52077629f9560fa3012694b1ae6410c815ea461f242d95dbafa2248224e15dc0d5353bc1afd5cb8f9540f19428332c184a10e1028a6b +EBUILD nvidia-userspace-304.37.ebuild 11033 SHA256 c565684dab4d781f3359d8f318a96136121aeb9e41120018e750e7ee9e3686af SHA512 e9e624f8bbfbdb3d6d82dbcd5f5c159e928089336ac7fef8b9f65add102906898ffd1c75072d740afacad13a09bbb083b7c1d6b225589fffc35b96b2eb7d7557 WHIRLPOOL 52622805e659098dc498ca35410614233a49dda9b00bd573cc8ad04e3885121a3263023af89619ad53d09f6f97c07fde43bc1a0402ae1e91fa36e92c181da78c +EBUILD nvidia-userspace-304.88.ebuild 10889 SHA256 3d9cfe556bd0ebdf02852cf35722ca20cf2d190aee5fc50ae96983969a7d4fae SHA512 88f12c3172891dce3c28e52c75a07009a8c82afc3ed90ca6102bde0f07d67539460ac47e0c4dff8965461c3d7ccbbab0df8e2ff1bde71fb71c29c0e4209f07ce WHIRLPOOL 10b6737f18948e097a36fddd24d2d524db4e107088f1087fb5f2fe40951381b2eedccd818c21d46364cc0d28881c8ff0de84bb7156d237e69809c694ee098979 +EBUILD nvidia-userspace-310.19.ebuild 11033 SHA256 c565684dab4d781f3359d8f318a96136121aeb9e41120018e750e7ee9e3686af SHA512 e9e624f8bbfbdb3d6d82dbcd5f5c159e928089336ac7fef8b9f65add102906898ffd1c75072d740afacad13a09bbb083b7c1d6b225589fffc35b96b2eb7d7557 WHIRLPOOL 52622805e659098dc498ca35410614233a49dda9b00bd573cc8ad04e3885121a3263023af89619ad53d09f6f97c07fde43bc1a0402ae1e91fa36e92c181da78c +EBUILD nvidia-userspace-313.30.ebuild 10536 SHA256 9fd2bd062749c4664e40c535c3faeeccef873bdaaf2c00654c2e9be409f900e0 SHA512 20c97cfe5e65725227841e5114aeebd95c27724fe12534866ad3f5144a0ea95fab9ab366c3181004927754bf7b05053cfd01532593edb186210cf129ab3ee1bb WHIRLPOOL 50e8356b1d5ad963fc1ce1cb55ccc1ebca1c306745efddcf6c2be41f45e01446ae13bd174a217efa84aad9b2c40dbc207a420e13eec7a6dbf36bd0697ce23cee +EBUILD nvidia-userspace-325.15.ebuild 10292 SHA256 4a36898b9a90f6ae417d0ca30f07f0f5d040053d6b8573710c3c2774bf299ffb SHA512 9b4107c282fefbe65f7d8681e1a31c3a8b6761586222a3fa5f278f50e02f1406a118318522d997fef876b0d7404b17aec664733f49338b37a47fd2ba9414abbe WHIRLPOOL 6ac6f63d94be18f745bdcd53735a9e11cd3a4a3bba291043667a892b15d37481c2d576dd6508d6a033c8ccc0a685e9c8f0fae60e0f2e32bf14b968e0f938ad9c +EBUILD nvidia-userspace-96.43.20.ebuild 12041 SHA256 d4e32f4ad2a2500bc633c64ec5c31c2b02dfc6219b5a57e9dfb66e0e3ab4bf29 SHA512 05b98b39db9d27f31401d744ee2f986beb31a260317ac07503a1b1e5fc5abdd0762c75989d60d343c9d2f6afa76d224015f12fd0aaf40ffe4fcf5f36f8f67c8f WHIRLPOOL 55801e45401d10015a0fad112eafdd7aa7ebd99bdb3ccc31cf202e657788e2bddef09f7c635f62590deb060222cd0bcde24e622da65a3e986bfbe501582f3ea0 +MISC metadata.xml 340 SHA256 a8c83e426e095e92dc8d7553bde38172a3bb73717ec0469c78dba0a46f86194d SHA512 757fe60892996ee752008276a385ed2ba785837723beac28744e414d19e2312f956e300559519005ff3d465db2593e61804e6b7907e1faaf551d2633cf09c6aa WHIRLPOOL 483042f678dacfba03244f676d5b47035de23751c6cf306c87d0ff12856ca3dd8ce10bc826bdc90bcb1b9be8a673cc68fbe506998bac564f0a55d7bf64481fe8 diff --git a/x11-drivers/nvidia-userspace/files/09nvidia b/x11-drivers/nvidia-userspace/files/09nvidia new file mode 100644 index 00000000..1fcbef41 --- /dev/null +++ b/x11-drivers/nvidia-userspace/files/09nvidia @@ -0,0 +1,2 @@ +# Has to precede X11's own libraries! +LDPATH=/opt/nvidia/lib diff --git a/x11-drivers/nvidia-userspace/files/90mutter-disable-culling b/x11-drivers/nvidia-userspace/files/90mutter-disable-culling new file mode 100644 index 00000000..d9b64408 --- /dev/null +++ b/x11-drivers/nvidia-userspace/files/90mutter-disable-culling @@ -0,0 +1,2 @@ +# See https://bugzilla.gnome.org/show_bug.cgi?id=664858 +CLUTTER_PAINT=disable-clipped-redraws:disable-culling diff --git a/x11-drivers/nvidia-userspace/files/NVIDIA_glx-defines.patch b/x11-drivers/nvidia-userspace/files/NVIDIA_glx-defines.patch new file mode 100644 index 00000000..da9933f6 --- /dev/null +++ b/x11-drivers/nvidia-userspace/files/NVIDIA_glx-defines.patch @@ -0,0 +1,11 @@ +diff -ur NVIDIA_GLX-1.0-4191/usr/include/GL/glx.h NVIDIA_GLX-1.0-4191.new/usr/include/GL/glx.h +--- NVIDIA_GLX-1.0-4191/usr/include/GL/glx.h 2002-12-09 21:26:55.000000000 +0100 ++++ NVIDIA_GLX-1.0-4191.new/usr/include/GL/glx.h 2003-01-30 18:20:23.000000000 +0100 +@@ -39,6 +39,7 @@ + typedef XID GLXPixmap; + typedef XID GLXDrawable; + typedef XID GLXPbuffer; ++typedef XID GLXPbufferSGIX; + typedef XID GLXWindow; + typedef XID GLXFBConfigID; + diff --git a/x11-drivers/nvidia-userspace/files/NVIDIA_glx-glheader.patch b/x11-drivers/nvidia-userspace/files/NVIDIA_glx-glheader.patch new file mode 100644 index 00000000..e0393e1b --- /dev/null +++ b/x11-drivers/nvidia-userspace/files/NVIDIA_glx-glheader.patch @@ -0,0 +1,13 @@ +--- usr/include/GL/gl.g.orig 2004-07-17 19:56:59.789410584 +1000 ++++ usr/include/GL/gl.h 2004-07-17 19:59:08.844791184 +1000 +@@ -66,6 +66,10 @@ + typedef double GLclampd; + typedef void GLvoid; + ++/* Patching for some better defines in the global system */ ++#ifndef GL_GLEXT_LEGACY ++#include <GL/glext.h> ++#endif + + /*************************************************************/ + diff --git a/x11-drivers/nvidia-userspace/files/eblits/donvidia.eblit b/x11-drivers/nvidia-userspace/files/eblits/donvidia.eblit new file mode 100644 index 00000000..75b39cfb --- /dev/null +++ b/x11-drivers/nvidia-userspace/files/eblits/donvidia.eblit @@ -0,0 +1,21 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/files/eblits/donvidia.eblit,v 1.1 2008/12/18 18:27:35 cardoe Exp $ + +# Install nvidia library: +# the first parameter is the place where to install it +# the second parameter is the base name of the library +# the third parameter is the provided soversion +donvidia() { + dodir $1 + exeinto $1 + + libname=$(basename $2) + + # libnvidia-cfg.so is no longer supplied in lib32; step over it gracefully + if [ -e $2.$3 ] ; then + doexe $2.$3 + dosym ${libname}.$3 $1/${libname} + [[ $3 != "1" ]] && dosym ${libname}.$3 $1/${libname}.1 + fi +} diff --git a/x11-drivers/nvidia-userspace/files/eblits/mtrr_check.eblit b/x11-drivers/nvidia-userspace/files/eblits/mtrr_check.eblit new file mode 100644 index 00000000..b14df34b --- /dev/null +++ b/x11-drivers/nvidia-userspace/files/eblits/mtrr_check.eblit @@ -0,0 +1,19 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/files/eblits/mtrr_check.eblit,v 1.1 2008/12/18 18:27:35 cardoe Exp $ + +mtrr_check() { + ebegin "Checking for MTRR support" + linux_chkconfig_present MTRR + eend $? + + if [[ $? -ne 0 ]] ; then + eerror "Please enable MTRR support in your kernel config, found at:" + eerror + eerror " Processor type and features" + eerror " [*] MTRR (Memory Type Range Register) support" + eerror + eerror "and recompile your kernel ..." + die "MTRR support not detected!" + fi +} diff --git a/x11-drivers/nvidia-userspace/files/eblits/src_install-libs.eblit b/x11-drivers/nvidia-userspace/files/eblits/src_install-libs.eblit new file mode 100644 index 00000000..e48d11ce --- /dev/null +++ b/x11-drivers/nvidia-userspace/files/eblits/src_install-libs.eblit @@ -0,0 +1,116 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distribnuted under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/files/eblits/src_install-libs.eblit,v 1.1 2008/12/18 18:27:35 cardoe Exp $ +# +src_install-libs() { + local pkglibdir=lib + local inslibdir=$(get_libdir) + + if [[ ${#} -eq 2 ]] ; then + pkglibdir=${1} + inslibdir=${2} + elif has_multilib_profile && [[ ${ABI} == "x86" ]] ; then + pkglibdir=lib32 + fi + + local usrpkglibdir=usr/${pkglibdir} + local libdir=usr/X11R6/${pkglibdir} + local drvdir=${libdir}/modules/drivers + local extdir=${libdir}/modules/extensions + local incdir=usr/include/GL + local sover=${PV} + local NV_ROOT="/usr/${inslibdir}/opengl/nvidia" + local NO_TLS_ROOT="${NV_ROOT}/no-tls" + local TLS_ROOT="${NV_ROOT}/tls" + local X11_LIB_DIR="/usr/${inslibdir}/xorg" + + if use x86-fbsd; then + # on FreeBSD everything is on obj/ + pkglibdir=obj + usrpkglibdir=obj + x11pkglibdir=obj + drvdir=obj + extdir=obj + + # don't ask me why the headers are there.. glxext.h is missing + incdir=doc + + # on FreeBSD it has just .1 suffix + sover=1 + fi + + # The GLX libraries + donvidia ${NV_ROOT}/lib ${usrpkglibdir}/libGL.so ${sover} + donvidia ${NV_ROOT}/lib ${usrpkglibdir}/libGLcore.so ${sover} + + donvidia ${NV_ROOT}/lib ${usrpkglibdir}/libnvidia-cfg.so ${sover} + + dodir ${NO_TLS_ROOT} + donvidia ${NO_TLS_ROOT} ${usrpkglibdir}/libnvidia-tls.so ${sover} + + if ! use x86-fbsd; then + donvidia ${TLS_ROOT} ${usrpkglibdir}/tls/libnvidia-tls.so ${sover} + fi + + if want_tls ; then + dosym ../tls/libnvidia-tls.so ${NV_ROOT}/lib + dosym ../tls/libnvidia-tls.so.1 ${NV_ROOT}/lib + dosym ../tls/libnvidia-tls.so.${sover} ${NV_ROOT}/lib + else + dosym ../no-tls/libnvidia-tls.so ${NV_ROOT}/lib + dosym ../no-tls/libnvidia-tls.so.1 ${NV_ROOT}/lib + dosym ../no-tls/libnvidia-tls.so.${sover} ${NV_ROOT}/lib + fi + + if ! use x86-fbsd; then + # Install the .la file for libtool, to prevent e.g. bug #176423 + [ -f "${FILESDIR}/libGL.la-r2" ] || die "libGL.la-r2 missing in FILESDIR" + local ver1=$(get_version_component_range 1) + local ver2=$(get_version_component_range 2) + local ver3=$(get_version_component_range 3) + sed -e "s:\${PV}:${PV}:" \ + -e "s:\${ver1}:${ver1}:" \ + -e "s:\${ver2}:${ver2}:" \ + -e "s:\${ver3}:${ver3}:" \ + -e "s:\${libdir}:${inslibdir}:" \ + "${FILESDIR}"/libGL.la-r2 > "${D}"/${NV_ROOT}/lib/libGL.la + fi + + exeinto ${X11_LIB_DIR}/modules/drivers + + [[ -f ${drvdir}/nvidia_drv.so ]] && \ + doexe ${drvdir}/nvidia_drv.so + + insinto /usr/${inslibdir} + [[ -f ${libdir}/libXvMCNVIDIA.a ]] && \ + doins ${libdir}/libXvMCNVIDIA.a + exeinto /usr/${inslibdir} + # fix Bug 131315 + [[ -f ${libdir}/libXvMCNVIDIA.so.${PV} ]] && \ + doexe ${libdir}/libXvMCNVIDIA.so.${PV} && \ + dosym libXvMCNVIDIA.so.${PV} \ + /usr/${inslibdir}/libXvMCNVIDIA.so + + exeinto ${NV_ROOT}/extensions + [[ -f ${libdir}/modules/libnvidia-wfb.so.${sover} ]] && \ + newexe ${libdir}/modules/libnvidia-wfb.so.${sover} libwfb.so + [[ -f ${extdir}/libglx.so.${sover} ]] && \ + newexe ${extdir}/libglx.so.${sover} libglx.so + + # Includes + insinto ${NV_ROOT}/include + doins ${incdir}/*.h + + #cuda + if [[ -f usr/include/cuda/cuda.h ]]; then + dodir /usr/include/cuda + insinto /usr/include/cuda + doins usr/include/cuda/*.h + + if [[ -f usr/${pkglibdir}/libcuda.so.${PV} ]]; then + dolib.so usr/${pkglibdir}/libcuda.so.${PV} + dosym libcuda.so.${PV} /usr/${inslibdir}/libcuda.so.1 + dosym libcuda.so.1 /usr/${inslibdir}/libcuda.so + fi + fi +} diff --git a/x11-drivers/nvidia-userspace/files/eblits/want_tls.eblit b/x11-drivers/nvidia-userspace/files/eblits/want_tls.eblit new file mode 100644 index 00000000..4debb85d --- /dev/null +++ b/x11-drivers/nvidia-userspace/files/eblits/want_tls.eblit @@ -0,0 +1,33 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/files/eblits/want_tls.eblit,v 1.1 2008/12/18 18:27:35 cardoe Exp $ + +want_tls() { + # For uclibc or anything non glibc, return false + has_version sys-libs/glibc || return 1 + + # Old versions of glibc were lt/no-tls only + has_version '<sys-libs/glibc-2.3.2' && return 1 + + if use x86 ; then + case ${CHOST/-*} in + i486|i586|i686) ;; + *) return 1 ;; + esac + fi + + # If we've got nptl, we've got tls + built_with_use --missing true sys-libs/glibc nptl && return 0 + + # 2.3.5 turned off tls for linuxthreads glibc on i486 and i586 + if use x86 && has_version '>=sys-libs/glibc-2.3.5' ; then + case ${CHOST/-*} in + i486|i586) return 1 ;; + esac + fi + + # These versions built linuxthreads version to support tls, too + has_version '>=sys-libs/glibc-2.3.4.20040619-r2' && return 0 + + return 1 +} diff --git a/x11-drivers/nvidia-userspace/files/libGL.la-r2 b/x11-drivers/nvidia-userspace/files/libGL.la-r2 new file mode 100644 index 00000000..863d1844 --- /dev/null +++ b/x11-drivers/nvidia-userspace/files/libGL.la-r2 @@ -0,0 +1,32 @@ +# libGL.la - a libtool library file +# Generated by ltmain.sh - GNU libtool 1.4 (1.920 2001/04/24 23:26:18) +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# The name that we can dlopen(3). +dlname='libGL.so.1' + +# Names of this library. +library_names='libGL.so.${PV} libGL.so.1 libGL.so' + +# The name of the static archive. +old_library='' + +# Libraries that this one depends upon. +dependency_libs='-L/usr/${libdir} -lm -lX11 -lXext -ldl' + +# Version information for libGL. +current=${ver1} +age=${ver2} +revision=${ver3} + +# Is this an already installed library? +installed=yes + +# Files to dlopen/dlpreopen +dlopen='' +dlpreopen='' + +# Directory that this library needs to be installed in: +libdir='/usr/${libdir}' diff --git a/x11-drivers/nvidia-userspace/files/nvidia b/x11-drivers/nvidia-userspace/files/nvidia new file mode 100644 index 00000000..7cf0f7c0 --- /dev/null +++ b/x11-drivers/nvidia-userspace/files/nvidia @@ -0,0 +1,40 @@ +# Nvidia drivers support +alias char-major-195 nvidia +alias /dev/nvidiactl char-major-195 + +# To tweak the driver the following options can be used, note that +# you should be careful, as it could cause instability!! For more +# options see /usr/share/doc/PACKAGE/README +# +# To enable Side Band Adressing: NVreg_EnableAGPSBA=1 +# +# To enable Fast Writes: NVreg_EnableAGPFW=1 +# +# To enable both for instance, uncomment following line: +# +#options nvidia NVreg_EnableAGPSBA=1 NVreg_EnableAGPFW=1 +# If you have a mobile chip, you may need to enable this option +# if you have hard lockups when starting X. +# +# See: Appendix I. Configuring your laptop +# In /usr/share/doc/PACKAGE/README for full details +# +# Choose the appropriate value for NVreg_Mobile from the table: +# Value Meaning +# ---------- -------------------------------------------------- +# 0xFFFFFFFF let the kernel module autodetect the correct value +# 1 Dell laptops +# 2 non-Compal Toshiba laptops +# 3 all other laptops +# 4 Compal Toshiba laptops +# 5 Gateway laptops +# +#options nvidia NVreg_SoftEDIDs=0 NVreg_Mobile=3 + + +# !!! SECURITY WARNING !!! +# DO NOT MODIFY OR REMOVE THE DEVICE FILE RELATED OPTIONS UNLESS YOU KNOW +# WHAT YOU ARE DOING. +# ONLY ADD TRUSTED USERS TO THE VIDEO GROUP, THESE USERS MAY BE ABLE TO CRASH, +# COMPROMISE, OR IRREPARABLY DAMAGE THE MACHINE. +options nvidia NVreg_DeviceFileMode=432 NVreg_DeviceFileUID=0 NVreg_DeviceFileGID=VIDEOGID NVreg_ModifyDeviceFiles=1 diff --git a/x11-drivers/nvidia-userspace/files/nvidia-169.07 b/x11-drivers/nvidia-userspace/files/nvidia-169.07 new file mode 100644 index 00000000..a96b0cd1 --- /dev/null +++ b/x11-drivers/nvidia-userspace/files/nvidia-169.07 @@ -0,0 +1,14 @@ +# Nvidia drivers support +alias char-major-195 nvidia +alias /dev/nvidiactl char-major-195 + +# To tweak the driver the following options can be used, note that +# you should be careful, as it could cause instability!! For more +# options see /usr/share/doc/PACKAGE/README +# +# !!! SECURITY WARNING !!! +# DO NOT MODIFY OR REMOVE THE DEVICE FILE RELATED OPTIONS UNLESS YOU KNOW +# WHAT YOU ARE DOING. +# ONLY ADD TRUSTED USERS TO THE VIDEO GROUP, THESE USERS MAY BE ABLE TO CRASH, +# COMPROMISE, OR IRREPARABLY DAMAGE THE MACHINE. +options nvidia NVreg_DeviceFileMode=432 NVreg_DeviceFileUID=0 NVreg_DeviceFileGID=VIDEOGID NVreg_ModifyDeviceFiles=1 diff --git a/x11-drivers/nvidia-userspace/files/nvidia-smi.init b/x11-drivers/nvidia-userspace/files/nvidia-smi.init new file mode 100644 index 00000000..2cfd4c43 --- /dev/null +++ b/x11-drivers/nvidia-userspace/files/nvidia-smi.init @@ -0,0 +1,25 @@ +#!/sbin/runscript +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/files/nvidia-smi.init,v 1.1 2012/07/22 21:08:43 cardoe Exp $ + +pidfile="/var/run/nvidia-smi.pid" + +depend() { + after modules +} + +start() { + ebegin "Starting NVIDIA System Management Interface" + rm -f ${pidfile} + start-stop-daemon --start --quiet --pidfile ${pidfile} \ + --make-pidfile --background --exec /opt/bin/nvidia-smi -- \ + -q -l 300 + eend $? +} + +stop() { + ebegin "Stopping NVIDIA System Management Interface" + start-stop-daemon --stop --quiet --pidfile ${pidfile} + eend $? +} diff --git a/x11-drivers/nvidia-userspace/files/nvidia-udev.sh b/x11-drivers/nvidia-userspace/files/nvidia-udev.sh new file mode 100644 index 00000000..9487b08e --- /dev/null +++ b/x11-drivers/nvidia-userspace/files/nvidia-udev.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +if [ $# -ne 1 ]; then + echo "Invalid args" >&2 + exit 1 +fi + +case $1 in + add|ADD) + /opt/bin/nvidia-smi > /dev/null + ;; + remove|REMOVE) + rm -f /dev/nvidia* + ;; +esac + +exit 0 diff --git a/x11-drivers/nvidia-userspace/files/nvidia.udev-rule b/x11-drivers/nvidia-userspace/files/nvidia.udev-rule new file mode 100644 index 00000000..2eb30bb0 --- /dev/null +++ b/x11-drivers/nvidia-userspace/files/nvidia.udev-rule @@ -0,0 +1,6 @@ +ACTION=="add", DEVPATH=="/module/nvidia", SUBSYSTEM=="module", RUN+="nvidia-udev.sh $env{ACTION}" +# Previously the ACTION was "add|remove" but one user on bug #376527 had a +# problem until he recompiled udev-171-r5, which is one of the versions I +# tested with and it was fine. I'm breaking the rules out just to be safe +# so someone else doesn't have an issue +ACTION=="remove", DEVPATH=="/module/nvidia", SUBSYSTEM=="module", RUN+="nvidia-udev.sh $env{ACTION}" diff --git a/x11-drivers/nvidia-userspace/metadata.xml b/x11-drivers/nvidia-userspace/metadata.xml new file mode 100644 index 00000000..b4cf3e70 --- /dev/null +++ b/x11-drivers/nvidia-userspace/metadata.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>no-herd</herd> +<maintainer> + <email>lxnay@gentoo.org</email> + <description>General maintainer</description> +</maintainer> +<longdescription>NVIDIA X11 driver and GLX libraries</longdescription> +</pkgmetadata> diff --git a/x11-drivers/nvidia-userspace/nvidia-userspace-173.14.31.ebuild b/x11-drivers/nvidia-userspace/nvidia-userspace-173.14.31.ebuild new file mode 100644 index 00000000..dc517c8c --- /dev/null +++ b/x11-drivers/nvidia-userspace/nvidia-userspace-173.14.31.ebuild @@ -0,0 +1,395 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="2" + +inherit eutils unpacker multilib portability versionator flag-o-matic + +X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}" +AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}" +X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}" + +DESCRIPTION="NVIDIA X11 userspace libraries and applications" +HOMEPAGE="http://www.nvidia.com/" +SRC_URI="x86? ( ftp://download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}-pkg0.run ) + amd64? ( ftp://download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}-pkg2.run ) + x86-fbsd? ( ftp://download.nvidia.com/freebsd/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )" + +LICENSE="NVIDIA" +SLOT="0" +KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd" +IUSE="multilib kernel_linux" +RESTRICT="strip" +EMULTILIB_PKG="true" + +COMMON="x11-base/xorg-server + kernel_linux? ( >=sys-libs/glibc-2.6.1 ) + multilib? ( app-emulation/emul-linux-x86-opengl ) + >=app-admin/eselect-opengl-1.0.9" +DEPEND="${COMMON} + kernel_linux? ( virtual/linux-sources )" +RDEPEND="${COMMON} + !<x11-drivers/nvidia-userspace-${PV} + !>x11-drivers/nvidia-userspace-${PV}" +PDEPEND="" + +QA_TEXTRELS_x86="usr/lib/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib/opengl/nvidia/lib/libGL.so.${PV} + usr/lib/opengl/nvidia/lib/libGLcore.so.${PV} + usr/lib/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib/xorg/modules/drivers/nvidia_drv.so + usr/lib/libcuda.so.${PV} + usr/lib/libnvidia-cfg.so.${PV} + usr/lib/libvdpau_nvidia.so.${PV} + usr/lib/libXvMCNVIDIA.so.${PV}" + +QA_TEXTRELS_x86_fbsd="boot/modules/nvidia.ko + usr/lib/opengl/nvidia/lib/libGL.so.1 + usr/lib/opengl/nvidia/lib/libGLcore.so.1 + usr/lib/libnvidia-cfg.so.1 + usr/lib/opengl/nvidia/extensions/libglx.so.1 + usr/lib/xorg/modules/drivers/nvidia_drv.so" + +QA_TEXTRELS_amd64="usr/lib32/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib32/opengl/nvidia/lib/libGLcore.so.${PV} + usr/lib32/opengl/nvidia/lib/libGL.so.${PV} + usr/lib32/libcuda.so.${PV} + usr/lib32/libvdpau_nvidia.so.${PV}" + +QA_EXECSTACK_x86="usr/lib/opengl/nvidia/lib/libGL.so.${PV} + usr/lib/opengl/nvidia/lib/libGLcore.so.${PV} + usr/lib/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib/xorg/modules/drivers/nvidia_drv.so + usr/lib/libXvMCNVIDIA.a:NVXVMC.o" + +QA_EXECSTACK_amd64="usr/lib32/opengl/nvidia/lib/libGLcore.so.${PV} + usr/lib32/opengl/nvidia/lib/libGL.so.${PV} + usr/lib64/libnvcompiler.so.${PV} + usr/lib64/libXvMCNVIDIA.so.${PV} + usr/lib64/libXvMCNVIDIA.a:NVXVMC.o + usr/lib64/libnvidia-cfg.so.${PV} + usr/lib64/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib64/opengl/nvidia/lib/libGL.so.${PV} + usr/lib64/opengl/nvidia/lib/libGLcore.so.${PV} + usr/lib64/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib64/xorg/modules/drivers/nvidia_drv.so + usr/bin/nvidia-smi + usr/bin/nvidia-xconfig" + +QA_WX_LOAD_x86="usr/lib/opengl/nvidia/lib/libGLcore.so.${PV} + usr/lib/opengl/nvidia/lib/libGL.so.${PV} + usr/lib/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib/libXvMCNVIDIA.a" + +QA_WX_LOAD_amd64="usr/lib32/opengl/nvidia/lib/libGL.so.${PV} + usr/lib32/opengl/nvidia/lib/libGLcore.so.${PV} + usr/lib64/opengl/nvidia/lib/libGL.so.${PV} + usr/lib64/opengl/nvidia/lib/libGLcore.so.${PV} + usr/lib64/opengl/nvidia/extensions/libglx.so.${PV}" + +QA_SONAME_amd64="usr/lib64/libnvcompiler.so.${PV}" + +QA_DT_HASH_amd64="usr/lib32/libcuda.so.${PV} + usr/lib32/opengl/nvidia/lib/libGL.so.${PV} + usr/lib32/opengl/nvidia/lib/libGLcore.so.${PV} + usr/lib32/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib32/libvdpau_nvidia.so.${PV} + usr/lib64/libXvMCNVIDIA.so.${PV} + usr/lib64/libcuda.so.${PV} + usr/lib64/libnvidia-cfg.so.${PV} + usr/lib64/opengl/nvidia/lib/libGLcore.so.${PV} + usr/lib64/opengl/nvidia/lib/libGL.so.${PV} + usr/lib64/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib64/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib64/xorg/modules/drivers/nvidia_drv.so + usr/lib64/libvdpau_nvidia.so.${PV} + usr/bin/nvidia-smi + usr/bin/nvidia-xconfig" + +QA_DT_HASH_x86="usr/lib/libcuda.so.${PV} + usr/lib/libnvidia-cfg.so.${PV} + usr/lib/opengl/nvidia/lib/libGLcore.so.${PV} + usr/lib/opengl/nvidia/lib/libGL.so.${PV} + usr/lib/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib/xorg/modules/drivers/nvidia_drv.so + usr/lib/libXvMCNVIDIA.so.${PV} + usr/lib/libvdpau_nvidia.so.${PV} + usr/bin/nvidia-smi + usr/bin/nvidia-xconfig" + +if use x86; then + PKG_V="-pkg0" + NV_PACKAGE="${X86_NV_PACKAGE}" +elif use amd64; then + PKG_V="-pkg2" + NV_PACKAGE="${AMD64_NV_PACKAGE}" +elif use x86-fbsd; then + PKG_V="" + NV_PACKAGE="${X86_FBSD_NV_PACKAGE}" +fi + +S="${WORKDIR}/${NV_PACKAGE}${PKG_V}" + +pkg_setup() { + # try to turn off distcc and ccache for people that have a problem with it + export DISTCC_DISABLE=1 + export CCACHE_DISABLE=1 + + if use amd64 && has_multilib_profile && [ "${DEFAULT_ABI}" != "amd64" ]; then + eerror "This ebuild doesn't currently support changing your default abi." + die "Unexpected \${DEFAULT_ABI} = ${DEFAULT_ABI}" + fi + + # On BSD userland it wants real make command + use userland_BSD && MAKE="$(get_bmake)" + + export _POSIX2_VERSION="199209" + + # set variables to where files are in the package structure + if use kernel_FreeBSD; then + NV_DOC="${S}/doc" + NV_EXEC="${S}/obj" + NV_LIB="${S}/obj" + NV_SRC="${S}/src" + NV_MAN="${S}/x11/man" + NV_X11="${S}/obj" + NV_X11_DRV="${NV_X11}" + NV_X11_EXT="${NV_X11}" + NV_SOVER=1 + elif use kernel_linux; then + NV_DOC="${S}/usr/share/doc" + NV_EXEC="${S}/usr/bin" + NV_LIB="${S}/usr/lib" + NV_SRC="${S}/usr/src/nv" + NV_MAN="${S}/usr/share/man/man1" + NV_X11="${S}/usr/X11R6/lib" + NV_X11_DRV="${NV_X11}/modules/drivers" + NV_X11_EXT="${NV_X11}/modules/extensions" + NV_SOVER=${PV} + else + die "Could not determine proper NVIDIA package" + fi +} + +src_unpack() { + if ! use x86-fbsd; then + mkdir "${S}" + cd "${S}" + unpack_makeself + else + unpack ${A} + fi +} + +src_prepare() { + # Please add a brief description for every added patch + use x86-fbsd && cd doc + + # Use the correct defines to make gtkglext build work + epatch "${FILESDIR}"/NVIDIA_glx-defines.patch + # Use some more sensible gl headers and make way for new glext.h + epatch "${FILESDIR}"/NVIDIA_glx-glheader.patch +} + +src_compile() { + # This is already the default on Linux, as there's no toplevel Makefile, but + # on FreeBSD there's one and triggers the kernel module build, as we install + # it by itself, pass this. + + cd "${NV_SRC}" + if use x86-fbsd; then + MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \ + LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die + fi +} + +src_install() { + if use kernel_linux; then + VIDEOGROUP="$(egetent group video | cut -d ':' -f 3)" + if [ -z "$VIDEOGROUP" ]; then + eerror "Failed to determine the video group gid." + die "Failed to determine the video group gid." + fi + + # Add the aliases + [ -f "${FILESDIR}/nvidia-169.07" ] || die "nvidia missing in FILESDIR" + sed -e 's:PACKAGE:'${PF}':g' \ + -e 's:VIDEOGID:'${VIDEOGROUP}':' "${FILESDIR}"/nvidia-169.07 > \ + "${WORKDIR}"/nvidia + insinto /etc/modprobe.d + newins "${WORKDIR}"/nvidia nvidia.conf || die + fi + + # NVIDIA kernel <-> userspace driver config lib + dolib.so ${NV_LIB}/libnvidia-cfg.so.${NV_SOVER} || \ + die "failed to install libnvidia-cfg" + + # Xorg DDX driver + insinto /usr/$(get_libdir)/xorg/modules/drivers + doins ${NV_X11_DRV}/nvidia_drv.so || die "failed to install nvidia_drv.so" + + # Xorg GLX driver + insinto /usr/$(get_libdir)/opengl/nvidia/extensions + doins ${NV_X11_EXT}/libglx.so.${NV_SOVER} || \ + die "failed to install libglx.so" + dosym /usr/$(get_libdir)/opengl/nvidia/extensions/libglx.so.${NV_SOVER} \ + /usr/$(get_libdir)/opengl/nvidia/extensions/libglx.so || \ + die "failed to create libglx.so symlink" + + # XvMC driver + dolib.a ${NV_X11}/libXvMCNVIDIA.a || \ + die "failed to install libXvMCNVIDIA.so" + dolib.so ${NV_X11}/libXvMCNVIDIA.so.${NV_SOVER} || \ + die "failed to install libXvMCNVIDIA.so" + dosym libXvMCNVIDIA.so.${NV_SOVER} /usr/$(get_libdir)/libXvMCNVIDIA.so || \ + die "failed to create libXvMCNVIDIA.so symlink" + + # CUDA headers (driver to come) + if use kernel_linux && [[ -d ${S}/usr/include/cuda ]]; then + dodir /usr/include/cuda + insinto /usr/include/cuda + doins usr/include/cuda/*.h || die "failed to install cuda headers" + fi + + # OpenCL headers (driver to come) + if [[ -d ${S}/usr/include/CL ]]; then + dodir /usr/include/CL + insinto /usr/include/CL + doins usr/include/CL/*.h || die "failed to install OpenCL headers" + fi + + # Documentation + dodoc ${NV_DOC}/XF86Config.sample + dohtml ${NV_DOC}/html/* + if use x86-fbsd; then + dodoc "${NV_DOC}/README" + doman "${NV_MAN}/nvidia-xconfig.1" + else + # Docs + newdoc "${NV_DOC}/README.txt" README + dodoc "${NV_DOC}/NVIDIA_Changelog" +# doman "${NV_MAN}/nvidia-smi.1.gz" + doman "${NV_MAN}/nvidia-xconfig.1.gz" + fi + + # Helper Apps + dobin ${NV_EXEC}/nvidia-xconfig || die + dobin ${NV_EXEC}/nvidia-bug-report.sh || die + if use kernel_linux; then + dobin ${NV_EXEC}/nvidia-smi || die + fi + + 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 + + is_final_abi || die "failed to iterate through all ABIs" +} + +# Install nvidia library: +# the first parameter is the place where to install it +# the second parameter is the base name of the library +# the third parameter is the provided soversion +donvidia() { + dodir $1 + exeinto $1 + + libname=$(basename $2) + + doexe $2.$3 || die "failed to install $2" + dosym ${libname}.$3 $1/${libname} || die "failed to symlink $2" + [[ $3 != "1" ]] && dosym ${libname}.$3 $1/${libname}.1 +} + +src_install-libs() { + local inslibdir=$(get_libdir) + local NV_ROOT="/usr/${inslibdir}/opengl/nvidia" + local libdir= sover= + + if use kernel_linux; then + if has_multilib_profile && [[ ${ABI} == "x86" ]] ; then + libdir=usr/lib32 + else + libdir=usr/lib + fi + sover=${PV} + else + libdir=obj + # on FreeBSD it has just .1 suffix + sover=1 + fi + + # The GLX libraries + donvidia ${NV_ROOT}/lib ${libdir}/libGL.so ${sover} + donvidia ${NV_ROOT}/lib ${libdir}/libGLcore.so ${sover} + if use x86-fbsd; then + donvidia ${NV_ROOT}/lib ${libdir}/libnvidia-tls.so ${sover} + else + donvidia ${NV_ROOT}/lib ${libdir}/tls/libnvidia-tls.so ${sover} + fi + + #cuda + if [[ -f ${libdir}/libcuda.so.${sover} ]]; then + dolib.so ${libdir}/libcuda.so.${sover} + [[ "${sover}" != "1" ]] && dosym libcuda.so.${sover} /usr/${inslibdir}/libcuda.so.1 + dosym libcuda.so.1 /usr/${inslibdir}/libcuda.so + fi + + #vdpau + if [[ -f ${libdir}/libvdpau_nvidia.so.${sover} ]]; then + dolib.so ${libdir}/libvdpau_nvidia.so.${sover} + dosym libvdpau_nvidia.so.${sover} /usr/${inslibdir}/libvdpau_nvidia.so + fi + + # OpenCL + # NOTE: This isn't currently available in the publicly released drivers. + if [[ -f ${libdir}/libOpenCL.so.1.0.0 ]]; then + + dolib.so ${libdir}/libnvcompiler.so.${sover} + [[ "${sover}" != "1" ]] && dosym libnvcompiler.so.${sover} /usr/${inslibdir}/libnvcompiler.so.1 + dosym libnvcompiler.so.1 /usr/${inslibdir}/libnvcompiler.so + + dolib.so ${libdir}/libOpenCL.so.1.0.0 + dosym libOpenCL.so.1.0.0 /usr/${inslibdir}/libOpenCL.so.1 + dosym libOpenCL.so.1 /usr/${inslibdir}/libOpenCL.so + fi +} + +pkg_preinst() { + # Clean the dynamic libGL stuff's home to ensure + # we dont have stale libs floating around + if [ -d "${ROOT}"/usr/lib/opengl/nvidia ] ; then + rm -rf "${ROOT}"/usr/lib/opengl/nvidia/* + fi + # Make sure we nuke the old nvidia-glx's env.d file + if [ -e "${ROOT}"/etc/env.d/09nvidia ] ; then + rm -f "${ROOT}"/etc/env.d/09nvidia + fi +} + +pkg_postinst() { + # Switch to the nvidia implementation + eselect opengl set --use-old nvidia + + elog "To use the NVIDIA GLX, run \"eselect opengl set nvidia\"" + elog + elog "NVIDIA has requested that any bug reports submitted have the" + elog "output of /usr/bin/nvidia-bug-report.sh included." + elog + elog "To work with compiz, you must enable the AddARGBGLXVisuals option." + elog + elog "If you are having resolution problems, try disabling DynamicTwinView." +} + +pkg_postrm() { + eselect opengl set --use-old xorg-x11 +} diff --git a/x11-drivers/nvidia-userspace/nvidia-userspace-173.14.34.ebuild b/x11-drivers/nvidia-userspace/nvidia-userspace-173.14.34.ebuild new file mode 100644 index 00000000..dc517c8c --- /dev/null +++ b/x11-drivers/nvidia-userspace/nvidia-userspace-173.14.34.ebuild @@ -0,0 +1,395 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="2" + +inherit eutils unpacker multilib portability versionator flag-o-matic + +X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}" +AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}" +X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}" + +DESCRIPTION="NVIDIA X11 userspace libraries and applications" +HOMEPAGE="http://www.nvidia.com/" +SRC_URI="x86? ( ftp://download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}-pkg0.run ) + amd64? ( ftp://download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}-pkg2.run ) + x86-fbsd? ( ftp://download.nvidia.com/freebsd/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )" + +LICENSE="NVIDIA" +SLOT="0" +KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd" +IUSE="multilib kernel_linux" +RESTRICT="strip" +EMULTILIB_PKG="true" + +COMMON="x11-base/xorg-server + kernel_linux? ( >=sys-libs/glibc-2.6.1 ) + multilib? ( app-emulation/emul-linux-x86-opengl ) + >=app-admin/eselect-opengl-1.0.9" +DEPEND="${COMMON} + kernel_linux? ( virtual/linux-sources )" +RDEPEND="${COMMON} + !<x11-drivers/nvidia-userspace-${PV} + !>x11-drivers/nvidia-userspace-${PV}" +PDEPEND="" + +QA_TEXTRELS_x86="usr/lib/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib/opengl/nvidia/lib/libGL.so.${PV} + usr/lib/opengl/nvidia/lib/libGLcore.so.${PV} + usr/lib/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib/xorg/modules/drivers/nvidia_drv.so + usr/lib/libcuda.so.${PV} + usr/lib/libnvidia-cfg.so.${PV} + usr/lib/libvdpau_nvidia.so.${PV} + usr/lib/libXvMCNVIDIA.so.${PV}" + +QA_TEXTRELS_x86_fbsd="boot/modules/nvidia.ko + usr/lib/opengl/nvidia/lib/libGL.so.1 + usr/lib/opengl/nvidia/lib/libGLcore.so.1 + usr/lib/libnvidia-cfg.so.1 + usr/lib/opengl/nvidia/extensions/libglx.so.1 + usr/lib/xorg/modules/drivers/nvidia_drv.so" + +QA_TEXTRELS_amd64="usr/lib32/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib32/opengl/nvidia/lib/libGLcore.so.${PV} + usr/lib32/opengl/nvidia/lib/libGL.so.${PV} + usr/lib32/libcuda.so.${PV} + usr/lib32/libvdpau_nvidia.so.${PV}" + +QA_EXECSTACK_x86="usr/lib/opengl/nvidia/lib/libGL.so.${PV} + usr/lib/opengl/nvidia/lib/libGLcore.so.${PV} + usr/lib/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib/xorg/modules/drivers/nvidia_drv.so + usr/lib/libXvMCNVIDIA.a:NVXVMC.o" + +QA_EXECSTACK_amd64="usr/lib32/opengl/nvidia/lib/libGLcore.so.${PV} + usr/lib32/opengl/nvidia/lib/libGL.so.${PV} + usr/lib64/libnvcompiler.so.${PV} + usr/lib64/libXvMCNVIDIA.so.${PV} + usr/lib64/libXvMCNVIDIA.a:NVXVMC.o + usr/lib64/libnvidia-cfg.so.${PV} + usr/lib64/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib64/opengl/nvidia/lib/libGL.so.${PV} + usr/lib64/opengl/nvidia/lib/libGLcore.so.${PV} + usr/lib64/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib64/xorg/modules/drivers/nvidia_drv.so + usr/bin/nvidia-smi + usr/bin/nvidia-xconfig" + +QA_WX_LOAD_x86="usr/lib/opengl/nvidia/lib/libGLcore.so.${PV} + usr/lib/opengl/nvidia/lib/libGL.so.${PV} + usr/lib/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib/libXvMCNVIDIA.a" + +QA_WX_LOAD_amd64="usr/lib32/opengl/nvidia/lib/libGL.so.${PV} + usr/lib32/opengl/nvidia/lib/libGLcore.so.${PV} + usr/lib64/opengl/nvidia/lib/libGL.so.${PV} + usr/lib64/opengl/nvidia/lib/libGLcore.so.${PV} + usr/lib64/opengl/nvidia/extensions/libglx.so.${PV}" + +QA_SONAME_amd64="usr/lib64/libnvcompiler.so.${PV}" + +QA_DT_HASH_amd64="usr/lib32/libcuda.so.${PV} + usr/lib32/opengl/nvidia/lib/libGL.so.${PV} + usr/lib32/opengl/nvidia/lib/libGLcore.so.${PV} + usr/lib32/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib32/libvdpau_nvidia.so.${PV} + usr/lib64/libXvMCNVIDIA.so.${PV} + usr/lib64/libcuda.so.${PV} + usr/lib64/libnvidia-cfg.so.${PV} + usr/lib64/opengl/nvidia/lib/libGLcore.so.${PV} + usr/lib64/opengl/nvidia/lib/libGL.so.${PV} + usr/lib64/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib64/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib64/xorg/modules/drivers/nvidia_drv.so + usr/lib64/libvdpau_nvidia.so.${PV} + usr/bin/nvidia-smi + usr/bin/nvidia-xconfig" + +QA_DT_HASH_x86="usr/lib/libcuda.so.${PV} + usr/lib/libnvidia-cfg.so.${PV} + usr/lib/opengl/nvidia/lib/libGLcore.so.${PV} + usr/lib/opengl/nvidia/lib/libGL.so.${PV} + usr/lib/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib/xorg/modules/drivers/nvidia_drv.so + usr/lib/libXvMCNVIDIA.so.${PV} + usr/lib/libvdpau_nvidia.so.${PV} + usr/bin/nvidia-smi + usr/bin/nvidia-xconfig" + +if use x86; then + PKG_V="-pkg0" + NV_PACKAGE="${X86_NV_PACKAGE}" +elif use amd64; then + PKG_V="-pkg2" + NV_PACKAGE="${AMD64_NV_PACKAGE}" +elif use x86-fbsd; then + PKG_V="" + NV_PACKAGE="${X86_FBSD_NV_PACKAGE}" +fi + +S="${WORKDIR}/${NV_PACKAGE}${PKG_V}" + +pkg_setup() { + # try to turn off distcc and ccache for people that have a problem with it + export DISTCC_DISABLE=1 + export CCACHE_DISABLE=1 + + if use amd64 && has_multilib_profile && [ "${DEFAULT_ABI}" != "amd64" ]; then + eerror "This ebuild doesn't currently support changing your default abi." + die "Unexpected \${DEFAULT_ABI} = ${DEFAULT_ABI}" + fi + + # On BSD userland it wants real make command + use userland_BSD && MAKE="$(get_bmake)" + + export _POSIX2_VERSION="199209" + + # set variables to where files are in the package structure + if use kernel_FreeBSD; then + NV_DOC="${S}/doc" + NV_EXEC="${S}/obj" + NV_LIB="${S}/obj" + NV_SRC="${S}/src" + NV_MAN="${S}/x11/man" + NV_X11="${S}/obj" + NV_X11_DRV="${NV_X11}" + NV_X11_EXT="${NV_X11}" + NV_SOVER=1 + elif use kernel_linux; then + NV_DOC="${S}/usr/share/doc" + NV_EXEC="${S}/usr/bin" + NV_LIB="${S}/usr/lib" + NV_SRC="${S}/usr/src/nv" + NV_MAN="${S}/usr/share/man/man1" + NV_X11="${S}/usr/X11R6/lib" + NV_X11_DRV="${NV_X11}/modules/drivers" + NV_X11_EXT="${NV_X11}/modules/extensions" + NV_SOVER=${PV} + else + die "Could not determine proper NVIDIA package" + fi +} + +src_unpack() { + if ! use x86-fbsd; then + mkdir "${S}" + cd "${S}" + unpack_makeself + else + unpack ${A} + fi +} + +src_prepare() { + # Please add a brief description for every added patch + use x86-fbsd && cd doc + + # Use the correct defines to make gtkglext build work + epatch "${FILESDIR}"/NVIDIA_glx-defines.patch + # Use some more sensible gl headers and make way for new glext.h + epatch "${FILESDIR}"/NVIDIA_glx-glheader.patch +} + +src_compile() { + # This is already the default on Linux, as there's no toplevel Makefile, but + # on FreeBSD there's one and triggers the kernel module build, as we install + # it by itself, pass this. + + cd "${NV_SRC}" + if use x86-fbsd; then + MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \ + LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die + fi +} + +src_install() { + if use kernel_linux; then + VIDEOGROUP="$(egetent group video | cut -d ':' -f 3)" + if [ -z "$VIDEOGROUP" ]; then + eerror "Failed to determine the video group gid." + die "Failed to determine the video group gid." + fi + + # Add the aliases + [ -f "${FILESDIR}/nvidia-169.07" ] || die "nvidia missing in FILESDIR" + sed -e 's:PACKAGE:'${PF}':g' \ + -e 's:VIDEOGID:'${VIDEOGROUP}':' "${FILESDIR}"/nvidia-169.07 > \ + "${WORKDIR}"/nvidia + insinto /etc/modprobe.d + newins "${WORKDIR}"/nvidia nvidia.conf || die + fi + + # NVIDIA kernel <-> userspace driver config lib + dolib.so ${NV_LIB}/libnvidia-cfg.so.${NV_SOVER} || \ + die "failed to install libnvidia-cfg" + + # Xorg DDX driver + insinto /usr/$(get_libdir)/xorg/modules/drivers + doins ${NV_X11_DRV}/nvidia_drv.so || die "failed to install nvidia_drv.so" + + # Xorg GLX driver + insinto /usr/$(get_libdir)/opengl/nvidia/extensions + doins ${NV_X11_EXT}/libglx.so.${NV_SOVER} || \ + die "failed to install libglx.so" + dosym /usr/$(get_libdir)/opengl/nvidia/extensions/libglx.so.${NV_SOVER} \ + /usr/$(get_libdir)/opengl/nvidia/extensions/libglx.so || \ + die "failed to create libglx.so symlink" + + # XvMC driver + dolib.a ${NV_X11}/libXvMCNVIDIA.a || \ + die "failed to install libXvMCNVIDIA.so" + dolib.so ${NV_X11}/libXvMCNVIDIA.so.${NV_SOVER} || \ + die "failed to install libXvMCNVIDIA.so" + dosym libXvMCNVIDIA.so.${NV_SOVER} /usr/$(get_libdir)/libXvMCNVIDIA.so || \ + die "failed to create libXvMCNVIDIA.so symlink" + + # CUDA headers (driver to come) + if use kernel_linux && [[ -d ${S}/usr/include/cuda ]]; then + dodir /usr/include/cuda + insinto /usr/include/cuda + doins usr/include/cuda/*.h || die "failed to install cuda headers" + fi + + # OpenCL headers (driver to come) + if [[ -d ${S}/usr/include/CL ]]; then + dodir /usr/include/CL + insinto /usr/include/CL + doins usr/include/CL/*.h || die "failed to install OpenCL headers" + fi + + # Documentation + dodoc ${NV_DOC}/XF86Config.sample + dohtml ${NV_DOC}/html/* + if use x86-fbsd; then + dodoc "${NV_DOC}/README" + doman "${NV_MAN}/nvidia-xconfig.1" + else + # Docs + newdoc "${NV_DOC}/README.txt" README + dodoc "${NV_DOC}/NVIDIA_Changelog" +# doman "${NV_MAN}/nvidia-smi.1.gz" + doman "${NV_MAN}/nvidia-xconfig.1.gz" + fi + + # Helper Apps + dobin ${NV_EXEC}/nvidia-xconfig || die + dobin ${NV_EXEC}/nvidia-bug-report.sh || die + if use kernel_linux; then + dobin ${NV_EXEC}/nvidia-smi || die + fi + + 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 + + is_final_abi || die "failed to iterate through all ABIs" +} + +# Install nvidia library: +# the first parameter is the place where to install it +# the second parameter is the base name of the library +# the third parameter is the provided soversion +donvidia() { + dodir $1 + exeinto $1 + + libname=$(basename $2) + + doexe $2.$3 || die "failed to install $2" + dosym ${libname}.$3 $1/${libname} || die "failed to symlink $2" + [[ $3 != "1" ]] && dosym ${libname}.$3 $1/${libname}.1 +} + +src_install-libs() { + local inslibdir=$(get_libdir) + local NV_ROOT="/usr/${inslibdir}/opengl/nvidia" + local libdir= sover= + + if use kernel_linux; then + if has_multilib_profile && [[ ${ABI} == "x86" ]] ; then + libdir=usr/lib32 + else + libdir=usr/lib + fi + sover=${PV} + else + libdir=obj + # on FreeBSD it has just .1 suffix + sover=1 + fi + + # The GLX libraries + donvidia ${NV_ROOT}/lib ${libdir}/libGL.so ${sover} + donvidia ${NV_ROOT}/lib ${libdir}/libGLcore.so ${sover} + if use x86-fbsd; then + donvidia ${NV_ROOT}/lib ${libdir}/libnvidia-tls.so ${sover} + else + donvidia ${NV_ROOT}/lib ${libdir}/tls/libnvidia-tls.so ${sover} + fi + + #cuda + if [[ -f ${libdir}/libcuda.so.${sover} ]]; then + dolib.so ${libdir}/libcuda.so.${sover} + [[ "${sover}" != "1" ]] && dosym libcuda.so.${sover} /usr/${inslibdir}/libcuda.so.1 + dosym libcuda.so.1 /usr/${inslibdir}/libcuda.so + fi + + #vdpau + if [[ -f ${libdir}/libvdpau_nvidia.so.${sover} ]]; then + dolib.so ${libdir}/libvdpau_nvidia.so.${sover} + dosym libvdpau_nvidia.so.${sover} /usr/${inslibdir}/libvdpau_nvidia.so + fi + + # OpenCL + # NOTE: This isn't currently available in the publicly released drivers. + if [[ -f ${libdir}/libOpenCL.so.1.0.0 ]]; then + + dolib.so ${libdir}/libnvcompiler.so.${sover} + [[ "${sover}" != "1" ]] && dosym libnvcompiler.so.${sover} /usr/${inslibdir}/libnvcompiler.so.1 + dosym libnvcompiler.so.1 /usr/${inslibdir}/libnvcompiler.so + + dolib.so ${libdir}/libOpenCL.so.1.0.0 + dosym libOpenCL.so.1.0.0 /usr/${inslibdir}/libOpenCL.so.1 + dosym libOpenCL.so.1 /usr/${inslibdir}/libOpenCL.so + fi +} + +pkg_preinst() { + # Clean the dynamic libGL stuff's home to ensure + # we dont have stale libs floating around + if [ -d "${ROOT}"/usr/lib/opengl/nvidia ] ; then + rm -rf "${ROOT}"/usr/lib/opengl/nvidia/* + fi + # Make sure we nuke the old nvidia-glx's env.d file + if [ -e "${ROOT}"/etc/env.d/09nvidia ] ; then + rm -f "${ROOT}"/etc/env.d/09nvidia + fi +} + +pkg_postinst() { + # Switch to the nvidia implementation + eselect opengl set --use-old nvidia + + elog "To use the NVIDIA GLX, run \"eselect opengl set nvidia\"" + elog + elog "NVIDIA has requested that any bug reports submitted have the" + elog "output of /usr/bin/nvidia-bug-report.sh included." + elog + elog "To work with compiz, you must enable the AddARGBGLXVisuals option." + elog + elog "If you are having resolution problems, try disabling DynamicTwinView." +} + +pkg_postrm() { + eselect opengl set --use-old xorg-x11 +} diff --git a/x11-drivers/nvidia-userspace/nvidia-userspace-173.14.35.ebuild b/x11-drivers/nvidia-userspace/nvidia-userspace-173.14.35.ebuild new file mode 100644 index 00000000..dc517c8c --- /dev/null +++ b/x11-drivers/nvidia-userspace/nvidia-userspace-173.14.35.ebuild @@ -0,0 +1,395 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="2" + +inherit eutils unpacker multilib portability versionator flag-o-matic + +X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}" +AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}" +X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}" + +DESCRIPTION="NVIDIA X11 userspace libraries and applications" +HOMEPAGE="http://www.nvidia.com/" +SRC_URI="x86? ( ftp://download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}-pkg0.run ) + amd64? ( ftp://download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}-pkg2.run ) + x86-fbsd? ( ftp://download.nvidia.com/freebsd/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )" + +LICENSE="NVIDIA" +SLOT="0" +KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd" +IUSE="multilib kernel_linux" +RESTRICT="strip" +EMULTILIB_PKG="true" + +COMMON="x11-base/xorg-server + kernel_linux? ( >=sys-libs/glibc-2.6.1 ) + multilib? ( app-emulation/emul-linux-x86-opengl ) + >=app-admin/eselect-opengl-1.0.9" +DEPEND="${COMMON} + kernel_linux? ( virtual/linux-sources )" +RDEPEND="${COMMON} + !<x11-drivers/nvidia-userspace-${PV} + !>x11-drivers/nvidia-userspace-${PV}" +PDEPEND="" + +QA_TEXTRELS_x86="usr/lib/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib/opengl/nvidia/lib/libGL.so.${PV} + usr/lib/opengl/nvidia/lib/libGLcore.so.${PV} + usr/lib/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib/xorg/modules/drivers/nvidia_drv.so + usr/lib/libcuda.so.${PV} + usr/lib/libnvidia-cfg.so.${PV} + usr/lib/libvdpau_nvidia.so.${PV} + usr/lib/libXvMCNVIDIA.so.${PV}" + +QA_TEXTRELS_x86_fbsd="boot/modules/nvidia.ko + usr/lib/opengl/nvidia/lib/libGL.so.1 + usr/lib/opengl/nvidia/lib/libGLcore.so.1 + usr/lib/libnvidia-cfg.so.1 + usr/lib/opengl/nvidia/extensions/libglx.so.1 + usr/lib/xorg/modules/drivers/nvidia_drv.so" + +QA_TEXTRELS_amd64="usr/lib32/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib32/opengl/nvidia/lib/libGLcore.so.${PV} + usr/lib32/opengl/nvidia/lib/libGL.so.${PV} + usr/lib32/libcuda.so.${PV} + usr/lib32/libvdpau_nvidia.so.${PV}" + +QA_EXECSTACK_x86="usr/lib/opengl/nvidia/lib/libGL.so.${PV} + usr/lib/opengl/nvidia/lib/libGLcore.so.${PV} + usr/lib/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib/xorg/modules/drivers/nvidia_drv.so + usr/lib/libXvMCNVIDIA.a:NVXVMC.o" + +QA_EXECSTACK_amd64="usr/lib32/opengl/nvidia/lib/libGLcore.so.${PV} + usr/lib32/opengl/nvidia/lib/libGL.so.${PV} + usr/lib64/libnvcompiler.so.${PV} + usr/lib64/libXvMCNVIDIA.so.${PV} + usr/lib64/libXvMCNVIDIA.a:NVXVMC.o + usr/lib64/libnvidia-cfg.so.${PV} + usr/lib64/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib64/opengl/nvidia/lib/libGL.so.${PV} + usr/lib64/opengl/nvidia/lib/libGLcore.so.${PV} + usr/lib64/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib64/xorg/modules/drivers/nvidia_drv.so + usr/bin/nvidia-smi + usr/bin/nvidia-xconfig" + +QA_WX_LOAD_x86="usr/lib/opengl/nvidia/lib/libGLcore.so.${PV} + usr/lib/opengl/nvidia/lib/libGL.so.${PV} + usr/lib/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib/libXvMCNVIDIA.a" + +QA_WX_LOAD_amd64="usr/lib32/opengl/nvidia/lib/libGL.so.${PV} + usr/lib32/opengl/nvidia/lib/libGLcore.so.${PV} + usr/lib64/opengl/nvidia/lib/libGL.so.${PV} + usr/lib64/opengl/nvidia/lib/libGLcore.so.${PV} + usr/lib64/opengl/nvidia/extensions/libglx.so.${PV}" + +QA_SONAME_amd64="usr/lib64/libnvcompiler.so.${PV}" + +QA_DT_HASH_amd64="usr/lib32/libcuda.so.${PV} + usr/lib32/opengl/nvidia/lib/libGL.so.${PV} + usr/lib32/opengl/nvidia/lib/libGLcore.so.${PV} + usr/lib32/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib32/libvdpau_nvidia.so.${PV} + usr/lib64/libXvMCNVIDIA.so.${PV} + usr/lib64/libcuda.so.${PV} + usr/lib64/libnvidia-cfg.so.${PV} + usr/lib64/opengl/nvidia/lib/libGLcore.so.${PV} + usr/lib64/opengl/nvidia/lib/libGL.so.${PV} + usr/lib64/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib64/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib64/xorg/modules/drivers/nvidia_drv.so + usr/lib64/libvdpau_nvidia.so.${PV} + usr/bin/nvidia-smi + usr/bin/nvidia-xconfig" + +QA_DT_HASH_x86="usr/lib/libcuda.so.${PV} + usr/lib/libnvidia-cfg.so.${PV} + usr/lib/opengl/nvidia/lib/libGLcore.so.${PV} + usr/lib/opengl/nvidia/lib/libGL.so.${PV} + usr/lib/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib/xorg/modules/drivers/nvidia_drv.so + usr/lib/libXvMCNVIDIA.so.${PV} + usr/lib/libvdpau_nvidia.so.${PV} + usr/bin/nvidia-smi + usr/bin/nvidia-xconfig" + +if use x86; then + PKG_V="-pkg0" + NV_PACKAGE="${X86_NV_PACKAGE}" +elif use amd64; then + PKG_V="-pkg2" + NV_PACKAGE="${AMD64_NV_PACKAGE}" +elif use x86-fbsd; then + PKG_V="" + NV_PACKAGE="${X86_FBSD_NV_PACKAGE}" +fi + +S="${WORKDIR}/${NV_PACKAGE}${PKG_V}" + +pkg_setup() { + # try to turn off distcc and ccache for people that have a problem with it + export DISTCC_DISABLE=1 + export CCACHE_DISABLE=1 + + if use amd64 && has_multilib_profile && [ "${DEFAULT_ABI}" != "amd64" ]; then + eerror "This ebuild doesn't currently support changing your default abi." + die "Unexpected \${DEFAULT_ABI} = ${DEFAULT_ABI}" + fi + + # On BSD userland it wants real make command + use userland_BSD && MAKE="$(get_bmake)" + + export _POSIX2_VERSION="199209" + + # set variables to where files are in the package structure + if use kernel_FreeBSD; then + NV_DOC="${S}/doc" + NV_EXEC="${S}/obj" + NV_LIB="${S}/obj" + NV_SRC="${S}/src" + NV_MAN="${S}/x11/man" + NV_X11="${S}/obj" + NV_X11_DRV="${NV_X11}" + NV_X11_EXT="${NV_X11}" + NV_SOVER=1 + elif use kernel_linux; then + NV_DOC="${S}/usr/share/doc" + NV_EXEC="${S}/usr/bin" + NV_LIB="${S}/usr/lib" + NV_SRC="${S}/usr/src/nv" + NV_MAN="${S}/usr/share/man/man1" + NV_X11="${S}/usr/X11R6/lib" + NV_X11_DRV="${NV_X11}/modules/drivers" + NV_X11_EXT="${NV_X11}/modules/extensions" + NV_SOVER=${PV} + else + die "Could not determine proper NVIDIA package" + fi +} + +src_unpack() { + if ! use x86-fbsd; then + mkdir "${S}" + cd "${S}" + unpack_makeself + else + unpack ${A} + fi +} + +src_prepare() { + # Please add a brief description for every added patch + use x86-fbsd && cd doc + + # Use the correct defines to make gtkglext build work + epatch "${FILESDIR}"/NVIDIA_glx-defines.patch + # Use some more sensible gl headers and make way for new glext.h + epatch "${FILESDIR}"/NVIDIA_glx-glheader.patch +} + +src_compile() { + # This is already the default on Linux, as there's no toplevel Makefile, but + # on FreeBSD there's one and triggers the kernel module build, as we install + # it by itself, pass this. + + cd "${NV_SRC}" + if use x86-fbsd; then + MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \ + LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die + fi +} + +src_install() { + if use kernel_linux; then + VIDEOGROUP="$(egetent group video | cut -d ':' -f 3)" + if [ -z "$VIDEOGROUP" ]; then + eerror "Failed to determine the video group gid." + die "Failed to determine the video group gid." + fi + + # Add the aliases + [ -f "${FILESDIR}/nvidia-169.07" ] || die "nvidia missing in FILESDIR" + sed -e 's:PACKAGE:'${PF}':g' \ + -e 's:VIDEOGID:'${VIDEOGROUP}':' "${FILESDIR}"/nvidia-169.07 > \ + "${WORKDIR}"/nvidia + insinto /etc/modprobe.d + newins "${WORKDIR}"/nvidia nvidia.conf || die + fi + + # NVIDIA kernel <-> userspace driver config lib + dolib.so ${NV_LIB}/libnvidia-cfg.so.${NV_SOVER} || \ + die "failed to install libnvidia-cfg" + + # Xorg DDX driver + insinto /usr/$(get_libdir)/xorg/modules/drivers + doins ${NV_X11_DRV}/nvidia_drv.so || die "failed to install nvidia_drv.so" + + # Xorg GLX driver + insinto /usr/$(get_libdir)/opengl/nvidia/extensions + doins ${NV_X11_EXT}/libglx.so.${NV_SOVER} || \ + die "failed to install libglx.so" + dosym /usr/$(get_libdir)/opengl/nvidia/extensions/libglx.so.${NV_SOVER} \ + /usr/$(get_libdir)/opengl/nvidia/extensions/libglx.so || \ + die "failed to create libglx.so symlink" + + # XvMC driver + dolib.a ${NV_X11}/libXvMCNVIDIA.a || \ + die "failed to install libXvMCNVIDIA.so" + dolib.so ${NV_X11}/libXvMCNVIDIA.so.${NV_SOVER} || \ + die "failed to install libXvMCNVIDIA.so" + dosym libXvMCNVIDIA.so.${NV_SOVER} /usr/$(get_libdir)/libXvMCNVIDIA.so || \ + die "failed to create libXvMCNVIDIA.so symlink" + + # CUDA headers (driver to come) + if use kernel_linux && [[ -d ${S}/usr/include/cuda ]]; then + dodir /usr/include/cuda + insinto /usr/include/cuda + doins usr/include/cuda/*.h || die "failed to install cuda headers" + fi + + # OpenCL headers (driver to come) + if [[ -d ${S}/usr/include/CL ]]; then + dodir /usr/include/CL + insinto /usr/include/CL + doins usr/include/CL/*.h || die "failed to install OpenCL headers" + fi + + # Documentation + dodoc ${NV_DOC}/XF86Config.sample + dohtml ${NV_DOC}/html/* + if use x86-fbsd; then + dodoc "${NV_DOC}/README" + doman "${NV_MAN}/nvidia-xconfig.1" + else + # Docs + newdoc "${NV_DOC}/README.txt" README + dodoc "${NV_DOC}/NVIDIA_Changelog" +# doman "${NV_MAN}/nvidia-smi.1.gz" + doman "${NV_MAN}/nvidia-xconfig.1.gz" + fi + + # Helper Apps + dobin ${NV_EXEC}/nvidia-xconfig || die + dobin ${NV_EXEC}/nvidia-bug-report.sh || die + if use kernel_linux; then + dobin ${NV_EXEC}/nvidia-smi || die + fi + + 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 + + is_final_abi || die "failed to iterate through all ABIs" +} + +# Install nvidia library: +# the first parameter is the place where to install it +# the second parameter is the base name of the library +# the third parameter is the provided soversion +donvidia() { + dodir $1 + exeinto $1 + + libname=$(basename $2) + + doexe $2.$3 || die "failed to install $2" + dosym ${libname}.$3 $1/${libname} || die "failed to symlink $2" + [[ $3 != "1" ]] && dosym ${libname}.$3 $1/${libname}.1 +} + +src_install-libs() { + local inslibdir=$(get_libdir) + local NV_ROOT="/usr/${inslibdir}/opengl/nvidia" + local libdir= sover= + + if use kernel_linux; then + if has_multilib_profile && [[ ${ABI} == "x86" ]] ; then + libdir=usr/lib32 + else + libdir=usr/lib + fi + sover=${PV} + else + libdir=obj + # on FreeBSD it has just .1 suffix + sover=1 + fi + + # The GLX libraries + donvidia ${NV_ROOT}/lib ${libdir}/libGL.so ${sover} + donvidia ${NV_ROOT}/lib ${libdir}/libGLcore.so ${sover} + if use x86-fbsd; then + donvidia ${NV_ROOT}/lib ${libdir}/libnvidia-tls.so ${sover} + else + donvidia ${NV_ROOT}/lib ${libdir}/tls/libnvidia-tls.so ${sover} + fi + + #cuda + if [[ -f ${libdir}/libcuda.so.${sover} ]]; then + dolib.so ${libdir}/libcuda.so.${sover} + [[ "${sover}" != "1" ]] && dosym libcuda.so.${sover} /usr/${inslibdir}/libcuda.so.1 + dosym libcuda.so.1 /usr/${inslibdir}/libcuda.so + fi + + #vdpau + if [[ -f ${libdir}/libvdpau_nvidia.so.${sover} ]]; then + dolib.so ${libdir}/libvdpau_nvidia.so.${sover} + dosym libvdpau_nvidia.so.${sover} /usr/${inslibdir}/libvdpau_nvidia.so + fi + + # OpenCL + # NOTE: This isn't currently available in the publicly released drivers. + if [[ -f ${libdir}/libOpenCL.so.1.0.0 ]]; then + + dolib.so ${libdir}/libnvcompiler.so.${sover} + [[ "${sover}" != "1" ]] && dosym libnvcompiler.so.${sover} /usr/${inslibdir}/libnvcompiler.so.1 + dosym libnvcompiler.so.1 /usr/${inslibdir}/libnvcompiler.so + + dolib.so ${libdir}/libOpenCL.so.1.0.0 + dosym libOpenCL.so.1.0.0 /usr/${inslibdir}/libOpenCL.so.1 + dosym libOpenCL.so.1 /usr/${inslibdir}/libOpenCL.so + fi +} + +pkg_preinst() { + # Clean the dynamic libGL stuff's home to ensure + # we dont have stale libs floating around + if [ -d "${ROOT}"/usr/lib/opengl/nvidia ] ; then + rm -rf "${ROOT}"/usr/lib/opengl/nvidia/* + fi + # Make sure we nuke the old nvidia-glx's env.d file + if [ -e "${ROOT}"/etc/env.d/09nvidia ] ; then + rm -f "${ROOT}"/etc/env.d/09nvidia + fi +} + +pkg_postinst() { + # Switch to the nvidia implementation + eselect opengl set --use-old nvidia + + elog "To use the NVIDIA GLX, run \"eselect opengl set nvidia\"" + elog + elog "NVIDIA has requested that any bug reports submitted have the" + elog "output of /usr/bin/nvidia-bug-report.sh included." + elog + elog "To work with compiz, you must enable the AddARGBGLXVisuals option." + elog + elog "If you are having resolution problems, try disabling DynamicTwinView." +} + +pkg_postrm() { + eselect opengl set --use-old xorg-x11 +} diff --git a/x11-drivers/nvidia-userspace/nvidia-userspace-275.09.07.ebuild b/x11-drivers/nvidia-userspace/nvidia-userspace-275.09.07.ebuild new file mode 100644 index 00000000..6e988b89 --- /dev/null +++ b/x11-drivers/nvidia-userspace/nvidia-userspace-275.09.07.ebuild @@ -0,0 +1,414 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="2" + +inherit eutils unpacker multilib portability versionator flag-o-matic + +X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}" +AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}" +X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}" + +DESCRIPTION="NVIDIA X11 userspace libraries and applications" +HOMEPAGE="http://www.nvidia.com/" +SRC_URI="x86? ( http://download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}.run ) + amd64? ( http://download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run ) + x86-fbsd? ( http://download.nvidia.com/XFree86/FreeBSD-x86/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )" + +LICENSE="NVIDIA" +SLOT="0" +KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd" +IUSE="multilib kernel_linux" +RESTRICT="strip" +EMULTILIB_PKG="true" + +COMMON="<x11-base/xorg-server-1.10.99 + kernel_linux? ( >=sys-libs/glibc-2.6.1 ) + multilib? ( app-emulation/emul-linux-x86-xlibs ) + >=app-admin/eselect-opengl-1.0.9 + !<media-video/nvidia-settings-256.52" +DEPEND="${COMMON}" +RDEPEND="${COMMON} + x11-libs/libXvMC + !<x11-drivers/nvidia-userspace-${PV} + !>x11-drivers/nvidia-userspace-${PV}" +PDEPEND=">=x11-libs/libvdpau-0.3-r1" + +QA_TEXTRELS_x86=" + usr/lib/libOpenCL.so.1.0.0 + usr/lib/libXvMCNVIDIA.so.${PV} + usr/lib/libcuda.so.${PV} + usr/lib/libnvcuvid.so.${PV} + usr/lib/libnvidia-cfg.so.${PV} + usr/lib/libnvidia-compiler.so.${PV} + usr/lib/libnvidia-glcore.so.${PV} + usr/lib/libnvidia-ml.so.${PV} + usr/lib/libvdpau_nvidia.so.${PV} + usr/lib/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib/opengl/nvidia/lib/libGL.so.${PV} + usr/lib/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib/xorg/modules/drivers/nvidia_drv.so" + +QA_TEXTRELS_x86_fbsd="boot/modules/nvidia.ko + usr/lib/opengl/nvidia/lib/libGL.so.1 + usr/lib/libnvidia-glcore.so.1 + usr/lib/libnvidia-cfg.so.1 + usr/lib/libnvidia-ml.so.1 + usr/lib/opengl/nvidia/extensions/libglx.so.1 + usr/lib/xorg/modules/drivers/nvidia_drv.so" + +QA_TEXTRELS_amd64="usr/lib32/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib32/libnvidia-glcore.so.${PV} + usr/lib32/opengl/nvidia/lib/libGL.so.${PV} + usr/lib32/libcuda.so.${PV} + usr/lib32/libvdpau_nvidia.so.${PV} + usr/lib32/libOpenCL.so.1.0.0 + usr/lib32/libnvidia-compiler.so.${PV}" + +QA_EXECSTACK_x86="usr/lib/opengl/nvidia/lib/libGL.so.${PV} + usr/lib/libnvidia-glcore.so.${PV} + usr/lib/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib64/libXvMCNVIDIA.so.${PV} + usr/lib/libXvMCNVIDIA.a:NVXVMC.o + usr/lib/libnvidia-compiler.so.${PV} + usr/lib/libvdpau_nvidia.so.${PV} + usr/lib/libcuda.so.${PV} + usr/lib/libOpenCL.so.1.0.0" + +QA_EXECSTACK_amd64="usr/lib32/libnvidia-glcore.so.${PV} + usr/lib32/opengl/nvidia/lib/libGL.so.${PV} + usr/lib32/libnvidia-compiler.so.${PV} + usr/lib32/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib32/libvdpau_nvidia.so.${PV} + usr/lib32/libcuda.so.${PV} + usr/lib32/libOpenCL.so.1.0.0 + usr/lib64/libnvidia-compiler.so.${PV} + usr/lib64/libXvMCNVIDIA.a:NVXVMC.o + usr/lib64/libnvidia-cfg.so.${PV} + usr/lib64/libnvidia-ml.so.${PV} + usr/lib64/libvdpau_nvidia.so.${PV} + usr/lib64/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib64/opengl/nvidia/lib/libGL.so.${PV} + usr/lib64/libnvidia-glcore.so.${PV} + usr/lib64/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib64/libXvMCNVIDIA.so.${PV} + usr/lib64/libcuda.so.${PV} + usr/lib64/libOpenCL.so.1.0.0 + usr/lib64/xorg/modules/drivers/nvidia_drv.so + usr/bin/nvidia-smi + usr/bin/nvidia-xconfig + usr/bin/nvidia-settings" + +QA_WX_LOAD_x86="usr/lib/libnvidia-glcore.so.${PV} + usr/lib/opengl/nvidia/lib/libGL.so.${PV} + usr/lib/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib/libXvMCNVIDIA.a + usr/lib64/libXvMCNVIDIA.so.${PV}" + +QA_WX_LOAD_amd64="usr/lib32/opengl/nvidia/lib/libGL.so.${PV} + usr/lib32/libnvidia-glcore.so.${PV} + usr/lib64/opengl/nvidia/lib/libGL.so.${PV} + usr/lib64/libnvidia-glcore.so.${PV} + usr/lib64/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib64/libXvMCNVIDIA.so.${PV}" + +QA_SONAME_x86="usr/lib/libnvidia-compiler.so.${PV}" + +QA_SONAME_amd64="usr/lib64/libnvidia-compiler.so.${PV} + usr/lib32/libnvidia-compiler.so.${PV}" + +QA_DT_HASH_amd64="usr/lib32/libcuda.so.${PV} + usr/lib32/opengl/nvidia/lib/libGL.so.${PV} + usr/lib32/libnvidia-glcore.so.${PV} + usr/lib32/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib32/libvdpau_nvidia.so.${PV} + usr/lib32/libOpenCL.so.1.0.0 + usr/lib32/libnvidia-compiler.so.${PV} + usr/lib64/libXvMCNVIDIA.so.${PV} + usr/lib64/libcuda.so.${PV} + usr/lib64/libnvidia-cfg.so.${PV} + usr/lib64/libnvidia-glcore.so.${PV} + usr/lib64/libnvidia-ml.so.${PV} + usr/lib64/opengl/nvidia/lib/libGL.so.${PV} + usr/lib64/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib64/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib64/xorg/modules/drivers/nvidia_drv.so + usr/lib64/libvdpau_nvidia.so.${PV} + usr/lib64/libOpenCL.so.1.0.0 + usr/lib64/libnvidia-compiler.so.${PV} + usr/lib64/libnvcuvid.so.${PV} + usr/bin/nvidia-smi + usr/bin/nvidia-xconfig + usr/bin/nvidia-settings" + +QA_DT_HASH_x86="usr/lib/libcuda.so.${PV} + usr/lib/libnvidia-cfg.so.${PV} + usr/lib/libnvidia-glcore.so.${PV} + usr/lib/libnvidia-ml.so.${PV} + usr/lib/opengl/nvidia/lib/libGL.so.${PV} + usr/lib/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib/xorg/modules/drivers/nvidia_drv.so + usr/lib/libXvMCNVIDIA.so.${PV} + usr/lib/libvdpau_nvidia.so.${PV} + usr/lib/libOpenCL.so.1.0.0 + usr/lib/libnvidia-compiler.so.${PV} + usr/lib/libnvcuvid.so.${PV} + usr/bin/nvidia-smi + usr/bin/nvidia-xconfig + usr/bin/nvidia-settings" + + +S="${WORKDIR}/" + +pkg_setup() { + # try to turn off distcc and ccache for people that have a problem with it + export DISTCC_DISABLE=1 + export CCACHE_DISABLE=1 + + if use amd64 && has_multilib_profile && [ "${DEFAULT_ABI}" != "amd64" ]; then + eerror "This ebuild doesn't currently support changing your default abi." + die "Unexpected \${DEFAULT_ABI} = ${DEFAULT_ABI}" + fi + + # On BSD userland it wants real make command + use userland_BSD && MAKE="$(get_bmake)" + + export _POSIX2_VERSION="199209" + + # set variables to where files are in the package structure + if use kernel_FreeBSD; then + NV_DOC="${S}/doc" + NV_EXEC="${S}/obj" + NV_LIB="${S}/obj" + NV_SRC="${S}/src" + NV_MAN="${S}/x11/man" + NV_X11="${S}/obj" + NV_X11_DRV="${NV_X11}" + NV_X11_EXT="${NV_X11}" + NV_SOVER=1 + elif use kernel_linux; then + NV_DOC="${S}" + NV_EXEC="${S}" + NV_LIB="${S}" + NV_SRC="${S}/kernel" + NV_MAN="${S}" + NV_X11="${S}" + NV_X11_DRV="${NV_X11}" + NV_X11_EXT="${NV_X11}" + NV_SOVER=${PV} + else + die "Could not determine proper NVIDIA package" + fi +} + +src_unpack() { + if ! use x86-fbsd; then + cd "${S}" + unpack_makeself + else + unpack ${A} + fi +} + +src_prepare() { + # Please add a brief description for every added patch + use x86-fbsd && cd doc +} + +src_compile() { + # This is already the default on Linux, as there's no toplevel Makefile, but + # on FreeBSD there's one and triggers the kernel module build, as we install + # it by itself, pass this. + + cd "${NV_SRC}" + if use x86-fbsd; then + MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \ + LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die + fi +} + +src_install() { + if use kernel_linux; then + VIDEOGROUP="$(egetent group video | cut -d ':' -f 3)" + if [ -z "$VIDEOGROUP" ]; then + eerror "Failed to determine the video group gid." + die "Failed to determine the video group gid." + fi + + # Add the aliases + [ -f "${FILESDIR}/nvidia-169.07" ] || die "nvidia missing in FILESDIR" + sed -e 's:PACKAGE:'${PF}':g' \ + -e 's:VIDEOGID:'${VIDEOGROUP}':' "${FILESDIR}"/nvidia-169.07 > \ + "${WORKDIR}"/nvidia + insinto /etc/modprobe.d + newins "${WORKDIR}"/nvidia nvidia.conf || die + fi + + # NVIDIA kernel <-> userspace driver config lib + dolib.so ${NV_LIB}/libnvidia-cfg.so.${NV_SOVER} || \ + die "failed to install libnvidia-cfg" + dosym /usr/$(get_libdir)/libnvidia-cfg.so.${NV_SOVER} \ + /usr/$(get_libdir)/libnvidia-cfg.so || \ + die "failed to create libnvidia-cfg.so symlink" + + # NVIDIA monitoring library + dolib.so ${NV_LIB}/libnvidia-ml.so.${NV_SOVER} || \ + die "failed to install libnvidia-ml" + dosym /usr/$(get_libdir)/libnvidia-ml.so.${NV_SOVER} \ + /usr/$(get_libdir)/libnvidia-ml.so || \ + die "failed to create libnvidia-ml.so symlink" + + # NVIDIA video decode <-> CUDA + dolib.so ${NV_LIB}/libnvcuvid.so.${NV_SOVER} || \ + die "failed to install libnvcuvid.so" + dosym /usr/$(get_libdir)/libnvcuvid.so.${NV_SOVER} \ + /usr/$(get_libdir)/libnvcuvid.so || \ + die "failed to create libnvcuvid.so symlink" + + # Xorg DDX driver + insinto /usr/$(get_libdir)/xorg/modules/drivers + doins ${NV_X11_DRV}/nvidia_drv.so || die "failed to install nvidia_drv.so" + + # Xorg GLX driver + insinto /usr/$(get_libdir)/opengl/nvidia/extensions + doins ${NV_X11_EXT}/libglx.so.${NV_SOVER} || \ + die "failed to install libglx.so" + dosym /usr/$(get_libdir)/opengl/nvidia/extensions/libglx.so.${NV_SOVER} \ + /usr/$(get_libdir)/opengl/nvidia/extensions/libglx.so || \ + die "failed to create libglx.so symlink" + + # XvMC driver + dolib.a ${NV_X11}/libXvMCNVIDIA.a || \ + die "failed to install libXvMCNVIDIA.so" + dolib.so ${NV_X11}/libXvMCNVIDIA.so.${NV_SOVER} || \ + die "failed to install libXvMCNVIDIA.so" + dosym libXvMCNVIDIA.so.${NV_SOVER} /usr/$(get_libdir)/libXvMCNVIDIA.so || \ + die "failed to create libXvMCNVIDIA.so symlink" + + # OpenCL ICD for NVIDIA + if use kernel_linux; then + dodir /etc/OpenCL/vendors + insinto /etc/OpenCL/vendors + doins nvidia.icd + fi + + # Documentation + dohtml ${NV_DOC}/html/* + if use x86-fbsd; then + dodoc "${NV_DOC}/README" + doman "${NV_MAN}/nvidia-xconfig.1" + else + # Docs + newdoc "${NV_DOC}/README.txt" README + dodoc "${NV_DOC}/NVIDIA_Changelog" + doman "${NV_MAN}/nvidia-smi.1.gz" + doman "${NV_MAN}/nvidia-xconfig.1.gz" + fi + + # Helper Apps + dobin ${NV_EXEC}/nvidia-xconfig || die + dobin ${NV_EXEC}/nvidia-bug-report.sh || die + if use kernel_linux; then + dobin ${NV_EXEC}/nvidia-smi || die + fi + + 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 + + is_final_abi || die "failed to iterate through all ABIs" +} + +# Install nvidia library: +# the first parameter is the place where to install it +# the second parameter is the base name of the library +# the third parameter is the provided soversion +donvidia() { + dodir $1 + exeinto $1 + + libname=$(basename $2) + + doexe $2.$3 || die "failed to install $2" + dosym ${libname}.$3 $1/${libname} || die "failed to symlink $2" + [[ $3 != "1" ]] && dosym ${libname}.$3 $1/${libname}.1 +} + +src_install-libs() { + local inslibdir=$(get_libdir) + local NV_ROOT="/usr/${inslibdir}/opengl/nvidia" + local libdir= sover= + + if use kernel_linux; then + if has_multilib_profile && [[ ${ABI} == "x86" ]] ; then + libdir=32 + else + libdir=. + fi + sover=${PV} + else + libdir=obj + # on FreeBSD it has just .1 suffix + sover=1 + fi + + # The GLX libraries + donvidia ${NV_ROOT}/lib ${libdir}/libGL.so ${sover} + donvidia /usr/${inslibdir} ${libdir}/libnvidia-glcore.so ${sover} + if use x86-fbsd; then + donvidia ${NV_ROOT}/lib ${libdir}/libnvidia-tls.so ${sover} + else + donvidia ${NV_ROOT}/lib ${libdir}/tls/libnvidia-tls.so ${sover} + fi + + # VDPAU + donvidia /usr/${inslibdir} ${libdir}/libvdpau_nvidia.so ${sover} + + # CUDA & OpenCL + if use kernel_linux; then + donvidia /usr/${inslibdir} ${libdir}/libcuda.so ${sover} + donvidia /usr/${inslibdir} ${libdir}/libnvidia-compiler.so ${sover} + donvidia /usr/${inslibdir} ${libdir}/libOpenCL.so 1.0.0 + dosym libOpenCL.so.1 /usr/${inslibdir}/libOpenCL.so + fi +} + +pkg_preinst() { + # Clean the dynamic libGL stuff's home to ensure + # we dont have stale libs floating around + if [ -d "${ROOT}"/usr/lib/opengl/nvidia ] ; then + rm -rf "${ROOT}"/usr/lib/opengl/nvidia/* + fi + # Make sure we nuke the old nvidia-glx's env.d file + if [ -e "${ROOT}"/etc/env.d/09nvidia ] ; then + rm -f "${ROOT}"/etc/env.d/09nvidia + fi +} + +pkg_postinst() { + # Switch to the nvidia implementation + eselect opengl set --use-old nvidia + + elog "To use the NVIDIA GLX, run \"eselect opengl set nvidia\"" + elog + elog "NVIDIA has requested that any bug reports submitted have the" + elog "output of /usr/bin/nvidia-bug-report.sh included." + elog + elog "To work with compiz, you must enable the AddARGBGLXVisuals option." + elog + elog "If you are having resolution problems, try disabling DynamicTwinView." + elog +} + +pkg_postrm() { + eselect opengl set --use-old xorg-x11 +} diff --git a/x11-drivers/nvidia-userspace/nvidia-userspace-280.13.ebuild b/x11-drivers/nvidia-userspace/nvidia-userspace-280.13.ebuild new file mode 100644 index 00000000..6e988b89 --- /dev/null +++ b/x11-drivers/nvidia-userspace/nvidia-userspace-280.13.ebuild @@ -0,0 +1,414 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="2" + +inherit eutils unpacker multilib portability versionator flag-o-matic + +X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}" +AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}" +X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}" + +DESCRIPTION="NVIDIA X11 userspace libraries and applications" +HOMEPAGE="http://www.nvidia.com/" +SRC_URI="x86? ( http://download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}.run ) + amd64? ( http://download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run ) + x86-fbsd? ( http://download.nvidia.com/XFree86/FreeBSD-x86/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )" + +LICENSE="NVIDIA" +SLOT="0" +KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd" +IUSE="multilib kernel_linux" +RESTRICT="strip" +EMULTILIB_PKG="true" + +COMMON="<x11-base/xorg-server-1.10.99 + kernel_linux? ( >=sys-libs/glibc-2.6.1 ) + multilib? ( app-emulation/emul-linux-x86-xlibs ) + >=app-admin/eselect-opengl-1.0.9 + !<media-video/nvidia-settings-256.52" +DEPEND="${COMMON}" +RDEPEND="${COMMON} + x11-libs/libXvMC + !<x11-drivers/nvidia-userspace-${PV} + !>x11-drivers/nvidia-userspace-${PV}" +PDEPEND=">=x11-libs/libvdpau-0.3-r1" + +QA_TEXTRELS_x86=" + usr/lib/libOpenCL.so.1.0.0 + usr/lib/libXvMCNVIDIA.so.${PV} + usr/lib/libcuda.so.${PV} + usr/lib/libnvcuvid.so.${PV} + usr/lib/libnvidia-cfg.so.${PV} + usr/lib/libnvidia-compiler.so.${PV} + usr/lib/libnvidia-glcore.so.${PV} + usr/lib/libnvidia-ml.so.${PV} + usr/lib/libvdpau_nvidia.so.${PV} + usr/lib/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib/opengl/nvidia/lib/libGL.so.${PV} + usr/lib/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib/xorg/modules/drivers/nvidia_drv.so" + +QA_TEXTRELS_x86_fbsd="boot/modules/nvidia.ko + usr/lib/opengl/nvidia/lib/libGL.so.1 + usr/lib/libnvidia-glcore.so.1 + usr/lib/libnvidia-cfg.so.1 + usr/lib/libnvidia-ml.so.1 + usr/lib/opengl/nvidia/extensions/libglx.so.1 + usr/lib/xorg/modules/drivers/nvidia_drv.so" + +QA_TEXTRELS_amd64="usr/lib32/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib32/libnvidia-glcore.so.${PV} + usr/lib32/opengl/nvidia/lib/libGL.so.${PV} + usr/lib32/libcuda.so.${PV} + usr/lib32/libvdpau_nvidia.so.${PV} + usr/lib32/libOpenCL.so.1.0.0 + usr/lib32/libnvidia-compiler.so.${PV}" + +QA_EXECSTACK_x86="usr/lib/opengl/nvidia/lib/libGL.so.${PV} + usr/lib/libnvidia-glcore.so.${PV} + usr/lib/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib64/libXvMCNVIDIA.so.${PV} + usr/lib/libXvMCNVIDIA.a:NVXVMC.o + usr/lib/libnvidia-compiler.so.${PV} + usr/lib/libvdpau_nvidia.so.${PV} + usr/lib/libcuda.so.${PV} + usr/lib/libOpenCL.so.1.0.0" + +QA_EXECSTACK_amd64="usr/lib32/libnvidia-glcore.so.${PV} + usr/lib32/opengl/nvidia/lib/libGL.so.${PV} + usr/lib32/libnvidia-compiler.so.${PV} + usr/lib32/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib32/libvdpau_nvidia.so.${PV} + usr/lib32/libcuda.so.${PV} + usr/lib32/libOpenCL.so.1.0.0 + usr/lib64/libnvidia-compiler.so.${PV} + usr/lib64/libXvMCNVIDIA.a:NVXVMC.o + usr/lib64/libnvidia-cfg.so.${PV} + usr/lib64/libnvidia-ml.so.${PV} + usr/lib64/libvdpau_nvidia.so.${PV} + usr/lib64/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib64/opengl/nvidia/lib/libGL.so.${PV} + usr/lib64/libnvidia-glcore.so.${PV} + usr/lib64/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib64/libXvMCNVIDIA.so.${PV} + usr/lib64/libcuda.so.${PV} + usr/lib64/libOpenCL.so.1.0.0 + usr/lib64/xorg/modules/drivers/nvidia_drv.so + usr/bin/nvidia-smi + usr/bin/nvidia-xconfig + usr/bin/nvidia-settings" + +QA_WX_LOAD_x86="usr/lib/libnvidia-glcore.so.${PV} + usr/lib/opengl/nvidia/lib/libGL.so.${PV} + usr/lib/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib/libXvMCNVIDIA.a + usr/lib64/libXvMCNVIDIA.so.${PV}" + +QA_WX_LOAD_amd64="usr/lib32/opengl/nvidia/lib/libGL.so.${PV} + usr/lib32/libnvidia-glcore.so.${PV} + usr/lib64/opengl/nvidia/lib/libGL.so.${PV} + usr/lib64/libnvidia-glcore.so.${PV} + usr/lib64/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib64/libXvMCNVIDIA.so.${PV}" + +QA_SONAME_x86="usr/lib/libnvidia-compiler.so.${PV}" + +QA_SONAME_amd64="usr/lib64/libnvidia-compiler.so.${PV} + usr/lib32/libnvidia-compiler.so.${PV}" + +QA_DT_HASH_amd64="usr/lib32/libcuda.so.${PV} + usr/lib32/opengl/nvidia/lib/libGL.so.${PV} + usr/lib32/libnvidia-glcore.so.${PV} + usr/lib32/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib32/libvdpau_nvidia.so.${PV} + usr/lib32/libOpenCL.so.1.0.0 + usr/lib32/libnvidia-compiler.so.${PV} + usr/lib64/libXvMCNVIDIA.so.${PV} + usr/lib64/libcuda.so.${PV} + usr/lib64/libnvidia-cfg.so.${PV} + usr/lib64/libnvidia-glcore.so.${PV} + usr/lib64/libnvidia-ml.so.${PV} + usr/lib64/opengl/nvidia/lib/libGL.so.${PV} + usr/lib64/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib64/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib64/xorg/modules/drivers/nvidia_drv.so + usr/lib64/libvdpau_nvidia.so.${PV} + usr/lib64/libOpenCL.so.1.0.0 + usr/lib64/libnvidia-compiler.so.${PV} + usr/lib64/libnvcuvid.so.${PV} + usr/bin/nvidia-smi + usr/bin/nvidia-xconfig + usr/bin/nvidia-settings" + +QA_DT_HASH_x86="usr/lib/libcuda.so.${PV} + usr/lib/libnvidia-cfg.so.${PV} + usr/lib/libnvidia-glcore.so.${PV} + usr/lib/libnvidia-ml.so.${PV} + usr/lib/opengl/nvidia/lib/libGL.so.${PV} + usr/lib/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib/xorg/modules/drivers/nvidia_drv.so + usr/lib/libXvMCNVIDIA.so.${PV} + usr/lib/libvdpau_nvidia.so.${PV} + usr/lib/libOpenCL.so.1.0.0 + usr/lib/libnvidia-compiler.so.${PV} + usr/lib/libnvcuvid.so.${PV} + usr/bin/nvidia-smi + usr/bin/nvidia-xconfig + usr/bin/nvidia-settings" + + +S="${WORKDIR}/" + +pkg_setup() { + # try to turn off distcc and ccache for people that have a problem with it + export DISTCC_DISABLE=1 + export CCACHE_DISABLE=1 + + if use amd64 && has_multilib_profile && [ "${DEFAULT_ABI}" != "amd64" ]; then + eerror "This ebuild doesn't currently support changing your default abi." + die "Unexpected \${DEFAULT_ABI} = ${DEFAULT_ABI}" + fi + + # On BSD userland it wants real make command + use userland_BSD && MAKE="$(get_bmake)" + + export _POSIX2_VERSION="199209" + + # set variables to where files are in the package structure + if use kernel_FreeBSD; then + NV_DOC="${S}/doc" + NV_EXEC="${S}/obj" + NV_LIB="${S}/obj" + NV_SRC="${S}/src" + NV_MAN="${S}/x11/man" + NV_X11="${S}/obj" + NV_X11_DRV="${NV_X11}" + NV_X11_EXT="${NV_X11}" + NV_SOVER=1 + elif use kernel_linux; then + NV_DOC="${S}" + NV_EXEC="${S}" + NV_LIB="${S}" + NV_SRC="${S}/kernel" + NV_MAN="${S}" + NV_X11="${S}" + NV_X11_DRV="${NV_X11}" + NV_X11_EXT="${NV_X11}" + NV_SOVER=${PV} + else + die "Could not determine proper NVIDIA package" + fi +} + +src_unpack() { + if ! use x86-fbsd; then + cd "${S}" + unpack_makeself + else + unpack ${A} + fi +} + +src_prepare() { + # Please add a brief description for every added patch + use x86-fbsd && cd doc +} + +src_compile() { + # This is already the default on Linux, as there's no toplevel Makefile, but + # on FreeBSD there's one and triggers the kernel module build, as we install + # it by itself, pass this. + + cd "${NV_SRC}" + if use x86-fbsd; then + MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \ + LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die + fi +} + +src_install() { + if use kernel_linux; then + VIDEOGROUP="$(egetent group video | cut -d ':' -f 3)" + if [ -z "$VIDEOGROUP" ]; then + eerror "Failed to determine the video group gid." + die "Failed to determine the video group gid." + fi + + # Add the aliases + [ -f "${FILESDIR}/nvidia-169.07" ] || die "nvidia missing in FILESDIR" + sed -e 's:PACKAGE:'${PF}':g' \ + -e 's:VIDEOGID:'${VIDEOGROUP}':' "${FILESDIR}"/nvidia-169.07 > \ + "${WORKDIR}"/nvidia + insinto /etc/modprobe.d + newins "${WORKDIR}"/nvidia nvidia.conf || die + fi + + # NVIDIA kernel <-> userspace driver config lib + dolib.so ${NV_LIB}/libnvidia-cfg.so.${NV_SOVER} || \ + die "failed to install libnvidia-cfg" + dosym /usr/$(get_libdir)/libnvidia-cfg.so.${NV_SOVER} \ + /usr/$(get_libdir)/libnvidia-cfg.so || \ + die "failed to create libnvidia-cfg.so symlink" + + # NVIDIA monitoring library + dolib.so ${NV_LIB}/libnvidia-ml.so.${NV_SOVER} || \ + die "failed to install libnvidia-ml" + dosym /usr/$(get_libdir)/libnvidia-ml.so.${NV_SOVER} \ + /usr/$(get_libdir)/libnvidia-ml.so || \ + die "failed to create libnvidia-ml.so symlink" + + # NVIDIA video decode <-> CUDA + dolib.so ${NV_LIB}/libnvcuvid.so.${NV_SOVER} || \ + die "failed to install libnvcuvid.so" + dosym /usr/$(get_libdir)/libnvcuvid.so.${NV_SOVER} \ + /usr/$(get_libdir)/libnvcuvid.so || \ + die "failed to create libnvcuvid.so symlink" + + # Xorg DDX driver + insinto /usr/$(get_libdir)/xorg/modules/drivers + doins ${NV_X11_DRV}/nvidia_drv.so || die "failed to install nvidia_drv.so" + + # Xorg GLX driver + insinto /usr/$(get_libdir)/opengl/nvidia/extensions + doins ${NV_X11_EXT}/libglx.so.${NV_SOVER} || \ + die "failed to install libglx.so" + dosym /usr/$(get_libdir)/opengl/nvidia/extensions/libglx.so.${NV_SOVER} \ + /usr/$(get_libdir)/opengl/nvidia/extensions/libglx.so || \ + die "failed to create libglx.so symlink" + + # XvMC driver + dolib.a ${NV_X11}/libXvMCNVIDIA.a || \ + die "failed to install libXvMCNVIDIA.so" + dolib.so ${NV_X11}/libXvMCNVIDIA.so.${NV_SOVER} || \ + die "failed to install libXvMCNVIDIA.so" + dosym libXvMCNVIDIA.so.${NV_SOVER} /usr/$(get_libdir)/libXvMCNVIDIA.so || \ + die "failed to create libXvMCNVIDIA.so symlink" + + # OpenCL ICD for NVIDIA + if use kernel_linux; then + dodir /etc/OpenCL/vendors + insinto /etc/OpenCL/vendors + doins nvidia.icd + fi + + # Documentation + dohtml ${NV_DOC}/html/* + if use x86-fbsd; then + dodoc "${NV_DOC}/README" + doman "${NV_MAN}/nvidia-xconfig.1" + else + # Docs + newdoc "${NV_DOC}/README.txt" README + dodoc "${NV_DOC}/NVIDIA_Changelog" + doman "${NV_MAN}/nvidia-smi.1.gz" + doman "${NV_MAN}/nvidia-xconfig.1.gz" + fi + + # Helper Apps + dobin ${NV_EXEC}/nvidia-xconfig || die + dobin ${NV_EXEC}/nvidia-bug-report.sh || die + if use kernel_linux; then + dobin ${NV_EXEC}/nvidia-smi || die + fi + + 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 + + is_final_abi || die "failed to iterate through all ABIs" +} + +# Install nvidia library: +# the first parameter is the place where to install it +# the second parameter is the base name of the library +# the third parameter is the provided soversion +donvidia() { + dodir $1 + exeinto $1 + + libname=$(basename $2) + + doexe $2.$3 || die "failed to install $2" + dosym ${libname}.$3 $1/${libname} || die "failed to symlink $2" + [[ $3 != "1" ]] && dosym ${libname}.$3 $1/${libname}.1 +} + +src_install-libs() { + local inslibdir=$(get_libdir) + local NV_ROOT="/usr/${inslibdir}/opengl/nvidia" + local libdir= sover= + + if use kernel_linux; then + if has_multilib_profile && [[ ${ABI} == "x86" ]] ; then + libdir=32 + else + libdir=. + fi + sover=${PV} + else + libdir=obj + # on FreeBSD it has just .1 suffix + sover=1 + fi + + # The GLX libraries + donvidia ${NV_ROOT}/lib ${libdir}/libGL.so ${sover} + donvidia /usr/${inslibdir} ${libdir}/libnvidia-glcore.so ${sover} + if use x86-fbsd; then + donvidia ${NV_ROOT}/lib ${libdir}/libnvidia-tls.so ${sover} + else + donvidia ${NV_ROOT}/lib ${libdir}/tls/libnvidia-tls.so ${sover} + fi + + # VDPAU + donvidia /usr/${inslibdir} ${libdir}/libvdpau_nvidia.so ${sover} + + # CUDA & OpenCL + if use kernel_linux; then + donvidia /usr/${inslibdir} ${libdir}/libcuda.so ${sover} + donvidia /usr/${inslibdir} ${libdir}/libnvidia-compiler.so ${sover} + donvidia /usr/${inslibdir} ${libdir}/libOpenCL.so 1.0.0 + dosym libOpenCL.so.1 /usr/${inslibdir}/libOpenCL.so + fi +} + +pkg_preinst() { + # Clean the dynamic libGL stuff's home to ensure + # we dont have stale libs floating around + if [ -d "${ROOT}"/usr/lib/opengl/nvidia ] ; then + rm -rf "${ROOT}"/usr/lib/opengl/nvidia/* + fi + # Make sure we nuke the old nvidia-glx's env.d file + if [ -e "${ROOT}"/etc/env.d/09nvidia ] ; then + rm -f "${ROOT}"/etc/env.d/09nvidia + fi +} + +pkg_postinst() { + # Switch to the nvidia implementation + eselect opengl set --use-old nvidia + + elog "To use the NVIDIA GLX, run \"eselect opengl set nvidia\"" + elog + elog "NVIDIA has requested that any bug reports submitted have the" + elog "output of /usr/bin/nvidia-bug-report.sh included." + elog + elog "To work with compiz, you must enable the AddARGBGLXVisuals option." + elog + elog "If you are having resolution problems, try disabling DynamicTwinView." + elog +} + +pkg_postrm() { + eselect opengl set --use-old xorg-x11 +} diff --git a/x11-drivers/nvidia-userspace/nvidia-userspace-285.05.09.ebuild b/x11-drivers/nvidia-userspace/nvidia-userspace-285.05.09.ebuild new file mode 100644 index 00000000..6e988b89 --- /dev/null +++ b/x11-drivers/nvidia-userspace/nvidia-userspace-285.05.09.ebuild @@ -0,0 +1,414 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="2" + +inherit eutils unpacker multilib portability versionator flag-o-matic + +X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}" +AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}" +X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}" + +DESCRIPTION="NVIDIA X11 userspace libraries and applications" +HOMEPAGE="http://www.nvidia.com/" +SRC_URI="x86? ( http://download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}.run ) + amd64? ( http://download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run ) + x86-fbsd? ( http://download.nvidia.com/XFree86/FreeBSD-x86/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )" + +LICENSE="NVIDIA" +SLOT="0" +KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd" +IUSE="multilib kernel_linux" +RESTRICT="strip" +EMULTILIB_PKG="true" + +COMMON="<x11-base/xorg-server-1.10.99 + kernel_linux? ( >=sys-libs/glibc-2.6.1 ) + multilib? ( app-emulation/emul-linux-x86-xlibs ) + >=app-admin/eselect-opengl-1.0.9 + !<media-video/nvidia-settings-256.52" +DEPEND="${COMMON}" +RDEPEND="${COMMON} + x11-libs/libXvMC + !<x11-drivers/nvidia-userspace-${PV} + !>x11-drivers/nvidia-userspace-${PV}" +PDEPEND=">=x11-libs/libvdpau-0.3-r1" + +QA_TEXTRELS_x86=" + usr/lib/libOpenCL.so.1.0.0 + usr/lib/libXvMCNVIDIA.so.${PV} + usr/lib/libcuda.so.${PV} + usr/lib/libnvcuvid.so.${PV} + usr/lib/libnvidia-cfg.so.${PV} + usr/lib/libnvidia-compiler.so.${PV} + usr/lib/libnvidia-glcore.so.${PV} + usr/lib/libnvidia-ml.so.${PV} + usr/lib/libvdpau_nvidia.so.${PV} + usr/lib/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib/opengl/nvidia/lib/libGL.so.${PV} + usr/lib/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib/xorg/modules/drivers/nvidia_drv.so" + +QA_TEXTRELS_x86_fbsd="boot/modules/nvidia.ko + usr/lib/opengl/nvidia/lib/libGL.so.1 + usr/lib/libnvidia-glcore.so.1 + usr/lib/libnvidia-cfg.so.1 + usr/lib/libnvidia-ml.so.1 + usr/lib/opengl/nvidia/extensions/libglx.so.1 + usr/lib/xorg/modules/drivers/nvidia_drv.so" + +QA_TEXTRELS_amd64="usr/lib32/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib32/libnvidia-glcore.so.${PV} + usr/lib32/opengl/nvidia/lib/libGL.so.${PV} + usr/lib32/libcuda.so.${PV} + usr/lib32/libvdpau_nvidia.so.${PV} + usr/lib32/libOpenCL.so.1.0.0 + usr/lib32/libnvidia-compiler.so.${PV}" + +QA_EXECSTACK_x86="usr/lib/opengl/nvidia/lib/libGL.so.${PV} + usr/lib/libnvidia-glcore.so.${PV} + usr/lib/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib64/libXvMCNVIDIA.so.${PV} + usr/lib/libXvMCNVIDIA.a:NVXVMC.o + usr/lib/libnvidia-compiler.so.${PV} + usr/lib/libvdpau_nvidia.so.${PV} + usr/lib/libcuda.so.${PV} + usr/lib/libOpenCL.so.1.0.0" + +QA_EXECSTACK_amd64="usr/lib32/libnvidia-glcore.so.${PV} + usr/lib32/opengl/nvidia/lib/libGL.so.${PV} + usr/lib32/libnvidia-compiler.so.${PV} + usr/lib32/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib32/libvdpau_nvidia.so.${PV} + usr/lib32/libcuda.so.${PV} + usr/lib32/libOpenCL.so.1.0.0 + usr/lib64/libnvidia-compiler.so.${PV} + usr/lib64/libXvMCNVIDIA.a:NVXVMC.o + usr/lib64/libnvidia-cfg.so.${PV} + usr/lib64/libnvidia-ml.so.${PV} + usr/lib64/libvdpau_nvidia.so.${PV} + usr/lib64/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib64/opengl/nvidia/lib/libGL.so.${PV} + usr/lib64/libnvidia-glcore.so.${PV} + usr/lib64/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib64/libXvMCNVIDIA.so.${PV} + usr/lib64/libcuda.so.${PV} + usr/lib64/libOpenCL.so.1.0.0 + usr/lib64/xorg/modules/drivers/nvidia_drv.so + usr/bin/nvidia-smi + usr/bin/nvidia-xconfig + usr/bin/nvidia-settings" + +QA_WX_LOAD_x86="usr/lib/libnvidia-glcore.so.${PV} + usr/lib/opengl/nvidia/lib/libGL.so.${PV} + usr/lib/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib/libXvMCNVIDIA.a + usr/lib64/libXvMCNVIDIA.so.${PV}" + +QA_WX_LOAD_amd64="usr/lib32/opengl/nvidia/lib/libGL.so.${PV} + usr/lib32/libnvidia-glcore.so.${PV} + usr/lib64/opengl/nvidia/lib/libGL.so.${PV} + usr/lib64/libnvidia-glcore.so.${PV} + usr/lib64/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib64/libXvMCNVIDIA.so.${PV}" + +QA_SONAME_x86="usr/lib/libnvidia-compiler.so.${PV}" + +QA_SONAME_amd64="usr/lib64/libnvidia-compiler.so.${PV} + usr/lib32/libnvidia-compiler.so.${PV}" + +QA_DT_HASH_amd64="usr/lib32/libcuda.so.${PV} + usr/lib32/opengl/nvidia/lib/libGL.so.${PV} + usr/lib32/libnvidia-glcore.so.${PV} + usr/lib32/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib32/libvdpau_nvidia.so.${PV} + usr/lib32/libOpenCL.so.1.0.0 + usr/lib32/libnvidia-compiler.so.${PV} + usr/lib64/libXvMCNVIDIA.so.${PV} + usr/lib64/libcuda.so.${PV} + usr/lib64/libnvidia-cfg.so.${PV} + usr/lib64/libnvidia-glcore.so.${PV} + usr/lib64/libnvidia-ml.so.${PV} + usr/lib64/opengl/nvidia/lib/libGL.so.${PV} + usr/lib64/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib64/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib64/xorg/modules/drivers/nvidia_drv.so + usr/lib64/libvdpau_nvidia.so.${PV} + usr/lib64/libOpenCL.so.1.0.0 + usr/lib64/libnvidia-compiler.so.${PV} + usr/lib64/libnvcuvid.so.${PV} + usr/bin/nvidia-smi + usr/bin/nvidia-xconfig + usr/bin/nvidia-settings" + +QA_DT_HASH_x86="usr/lib/libcuda.so.${PV} + usr/lib/libnvidia-cfg.so.${PV} + usr/lib/libnvidia-glcore.so.${PV} + usr/lib/libnvidia-ml.so.${PV} + usr/lib/opengl/nvidia/lib/libGL.so.${PV} + usr/lib/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib/xorg/modules/drivers/nvidia_drv.so + usr/lib/libXvMCNVIDIA.so.${PV} + usr/lib/libvdpau_nvidia.so.${PV} + usr/lib/libOpenCL.so.1.0.0 + usr/lib/libnvidia-compiler.so.${PV} + usr/lib/libnvcuvid.so.${PV} + usr/bin/nvidia-smi + usr/bin/nvidia-xconfig + usr/bin/nvidia-settings" + + +S="${WORKDIR}/" + +pkg_setup() { + # try to turn off distcc and ccache for people that have a problem with it + export DISTCC_DISABLE=1 + export CCACHE_DISABLE=1 + + if use amd64 && has_multilib_profile && [ "${DEFAULT_ABI}" != "amd64" ]; then + eerror "This ebuild doesn't currently support changing your default abi." + die "Unexpected \${DEFAULT_ABI} = ${DEFAULT_ABI}" + fi + + # On BSD userland it wants real make command + use userland_BSD && MAKE="$(get_bmake)" + + export _POSIX2_VERSION="199209" + + # set variables to where files are in the package structure + if use kernel_FreeBSD; then + NV_DOC="${S}/doc" + NV_EXEC="${S}/obj" + NV_LIB="${S}/obj" + NV_SRC="${S}/src" + NV_MAN="${S}/x11/man" + NV_X11="${S}/obj" + NV_X11_DRV="${NV_X11}" + NV_X11_EXT="${NV_X11}" + NV_SOVER=1 + elif use kernel_linux; then + NV_DOC="${S}" + NV_EXEC="${S}" + NV_LIB="${S}" + NV_SRC="${S}/kernel" + NV_MAN="${S}" + NV_X11="${S}" + NV_X11_DRV="${NV_X11}" + NV_X11_EXT="${NV_X11}" + NV_SOVER=${PV} + else + die "Could not determine proper NVIDIA package" + fi +} + +src_unpack() { + if ! use x86-fbsd; then + cd "${S}" + unpack_makeself + else + unpack ${A} + fi +} + +src_prepare() { + # Please add a brief description for every added patch + use x86-fbsd && cd doc +} + +src_compile() { + # This is already the default on Linux, as there's no toplevel Makefile, but + # on FreeBSD there's one and triggers the kernel module build, as we install + # it by itself, pass this. + + cd "${NV_SRC}" + if use x86-fbsd; then + MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \ + LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die + fi +} + +src_install() { + if use kernel_linux; then + VIDEOGROUP="$(egetent group video | cut -d ':' -f 3)" + if [ -z "$VIDEOGROUP" ]; then + eerror "Failed to determine the video group gid." + die "Failed to determine the video group gid." + fi + + # Add the aliases + [ -f "${FILESDIR}/nvidia-169.07" ] || die "nvidia missing in FILESDIR" + sed -e 's:PACKAGE:'${PF}':g' \ + -e 's:VIDEOGID:'${VIDEOGROUP}':' "${FILESDIR}"/nvidia-169.07 > \ + "${WORKDIR}"/nvidia + insinto /etc/modprobe.d + newins "${WORKDIR}"/nvidia nvidia.conf || die + fi + + # NVIDIA kernel <-> userspace driver config lib + dolib.so ${NV_LIB}/libnvidia-cfg.so.${NV_SOVER} || \ + die "failed to install libnvidia-cfg" + dosym /usr/$(get_libdir)/libnvidia-cfg.so.${NV_SOVER} \ + /usr/$(get_libdir)/libnvidia-cfg.so || \ + die "failed to create libnvidia-cfg.so symlink" + + # NVIDIA monitoring library + dolib.so ${NV_LIB}/libnvidia-ml.so.${NV_SOVER} || \ + die "failed to install libnvidia-ml" + dosym /usr/$(get_libdir)/libnvidia-ml.so.${NV_SOVER} \ + /usr/$(get_libdir)/libnvidia-ml.so || \ + die "failed to create libnvidia-ml.so symlink" + + # NVIDIA video decode <-> CUDA + dolib.so ${NV_LIB}/libnvcuvid.so.${NV_SOVER} || \ + die "failed to install libnvcuvid.so" + dosym /usr/$(get_libdir)/libnvcuvid.so.${NV_SOVER} \ + /usr/$(get_libdir)/libnvcuvid.so || \ + die "failed to create libnvcuvid.so symlink" + + # Xorg DDX driver + insinto /usr/$(get_libdir)/xorg/modules/drivers + doins ${NV_X11_DRV}/nvidia_drv.so || die "failed to install nvidia_drv.so" + + # Xorg GLX driver + insinto /usr/$(get_libdir)/opengl/nvidia/extensions + doins ${NV_X11_EXT}/libglx.so.${NV_SOVER} || \ + die "failed to install libglx.so" + dosym /usr/$(get_libdir)/opengl/nvidia/extensions/libglx.so.${NV_SOVER} \ + /usr/$(get_libdir)/opengl/nvidia/extensions/libglx.so || \ + die "failed to create libglx.so symlink" + + # XvMC driver + dolib.a ${NV_X11}/libXvMCNVIDIA.a || \ + die "failed to install libXvMCNVIDIA.so" + dolib.so ${NV_X11}/libXvMCNVIDIA.so.${NV_SOVER} || \ + die "failed to install libXvMCNVIDIA.so" + dosym libXvMCNVIDIA.so.${NV_SOVER} /usr/$(get_libdir)/libXvMCNVIDIA.so || \ + die "failed to create libXvMCNVIDIA.so symlink" + + # OpenCL ICD for NVIDIA + if use kernel_linux; then + dodir /etc/OpenCL/vendors + insinto /etc/OpenCL/vendors + doins nvidia.icd + fi + + # Documentation + dohtml ${NV_DOC}/html/* + if use x86-fbsd; then + dodoc "${NV_DOC}/README" + doman "${NV_MAN}/nvidia-xconfig.1" + else + # Docs + newdoc "${NV_DOC}/README.txt" README + dodoc "${NV_DOC}/NVIDIA_Changelog" + doman "${NV_MAN}/nvidia-smi.1.gz" + doman "${NV_MAN}/nvidia-xconfig.1.gz" + fi + + # Helper Apps + dobin ${NV_EXEC}/nvidia-xconfig || die + dobin ${NV_EXEC}/nvidia-bug-report.sh || die + if use kernel_linux; then + dobin ${NV_EXEC}/nvidia-smi || die + fi + + 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 + + is_final_abi || die "failed to iterate through all ABIs" +} + +# Install nvidia library: +# the first parameter is the place where to install it +# the second parameter is the base name of the library +# the third parameter is the provided soversion +donvidia() { + dodir $1 + exeinto $1 + + libname=$(basename $2) + + doexe $2.$3 || die "failed to install $2" + dosym ${libname}.$3 $1/${libname} || die "failed to symlink $2" + [[ $3 != "1" ]] && dosym ${libname}.$3 $1/${libname}.1 +} + +src_install-libs() { + local inslibdir=$(get_libdir) + local NV_ROOT="/usr/${inslibdir}/opengl/nvidia" + local libdir= sover= + + if use kernel_linux; then + if has_multilib_profile && [[ ${ABI} == "x86" ]] ; then + libdir=32 + else + libdir=. + fi + sover=${PV} + else + libdir=obj + # on FreeBSD it has just .1 suffix + sover=1 + fi + + # The GLX libraries + donvidia ${NV_ROOT}/lib ${libdir}/libGL.so ${sover} + donvidia /usr/${inslibdir} ${libdir}/libnvidia-glcore.so ${sover} + if use x86-fbsd; then + donvidia ${NV_ROOT}/lib ${libdir}/libnvidia-tls.so ${sover} + else + donvidia ${NV_ROOT}/lib ${libdir}/tls/libnvidia-tls.so ${sover} + fi + + # VDPAU + donvidia /usr/${inslibdir} ${libdir}/libvdpau_nvidia.so ${sover} + + # CUDA & OpenCL + if use kernel_linux; then + donvidia /usr/${inslibdir} ${libdir}/libcuda.so ${sover} + donvidia /usr/${inslibdir} ${libdir}/libnvidia-compiler.so ${sover} + donvidia /usr/${inslibdir} ${libdir}/libOpenCL.so 1.0.0 + dosym libOpenCL.so.1 /usr/${inslibdir}/libOpenCL.so + fi +} + +pkg_preinst() { + # Clean the dynamic libGL stuff's home to ensure + # we dont have stale libs floating around + if [ -d "${ROOT}"/usr/lib/opengl/nvidia ] ; then + rm -rf "${ROOT}"/usr/lib/opengl/nvidia/* + fi + # Make sure we nuke the old nvidia-glx's env.d file + if [ -e "${ROOT}"/etc/env.d/09nvidia ] ; then + rm -f "${ROOT}"/etc/env.d/09nvidia + fi +} + +pkg_postinst() { + # Switch to the nvidia implementation + eselect opengl set --use-old nvidia + + elog "To use the NVIDIA GLX, run \"eselect opengl set nvidia\"" + elog + elog "NVIDIA has requested that any bug reports submitted have the" + elog "output of /usr/bin/nvidia-bug-report.sh included." + elog + elog "To work with compiz, you must enable the AddARGBGLXVisuals option." + elog + elog "If you are having resolution problems, try disabling DynamicTwinView." + elog +} + +pkg_postrm() { + eselect opengl set --use-old xorg-x11 +} diff --git a/x11-drivers/nvidia-userspace/nvidia-userspace-290.10.ebuild b/x11-drivers/nvidia-userspace/nvidia-userspace-290.10.ebuild new file mode 100644 index 00000000..b893f2d7 --- /dev/null +++ b/x11-drivers/nvidia-userspace/nvidia-userspace-290.10.ebuild @@ -0,0 +1,436 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="2" + +inherit eutils unpacker multilib portability versionator flag-o-matic + +X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}" +AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}" +X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}" + +DESCRIPTION="NVIDIA X11 userspace libraries and applications" +HOMEPAGE="http://www.nvidia.com/" +SRC_URI="x86? ( http://download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}.run ) + amd64? ( http://download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run ) + x86-fbsd? ( http://download.nvidia.com/XFree86/FreeBSD-x86/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )" + +LICENSE="NVIDIA" +SLOT="0" +KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd" +IUSE="multilib kernel_linux" +RESTRICT="strip" +EMULTILIB_PKG="true" + +COMMON="<x11-base/xorg-server-1.11.99 + kernel_linux? ( >=sys-libs/glibc-2.6.1 ) + multilib? ( app-emulation/emul-linux-x86-xlibs ) + >=app-admin/eselect-opengl-1.0.9 + app-admin/eselect-opencl + !<media-video/nvidia-settings-256.52" +DEPEND="${COMMON}" +RDEPEND="${COMMON} + x11-libs/libXvMC + !<x11-drivers/nvidia-userspace-${PV} + !>x11-drivers/nvidia-userspace-${PV}" +PDEPEND=">=x11-libs/libvdpau-0.3-r1" + +QA_TEXTRELS_x86=" + usr/lib/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0 + usr/lib/libXvMCNVIDIA.so.${PV} + usr/lib/libcuda.so.${PV} + usr/lib/libnvcuvid.so.${PV} + usr/lib/libnvidia-cfg.so.${PV} + usr/lib/libnvidia-compiler.so.${PV} + usr/lib/libnvidia-glcore.so.${PV} + usr/lib/libnvidia-ml.so.${PV} + usr/lib/libvdpau_nvidia.so.${PV} + usr/lib/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib/opengl/nvidia/lib/libGL.so.${PV} + usr/lib/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib/xorg/modules/drivers/nvidia_drv.so" + +QA_TEXTRELS_x86_fbsd="boot/modules/nvidia.ko + usr/lib/opengl/nvidia/lib/libGL.so.1 + usr/lib/libnvidia-glcore.so.1 + usr/lib/libnvidia-cfg.so.1 + usr/lib/libnvidia-ml.so.1 + usr/lib/opengl/nvidia/extensions/libglx.so.1 + usr/lib/xorg/modules/drivers/nvidia_drv.so" + +QA_TEXTRELS_amd64="usr/lib32/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib32/libnvidia-glcore.so.${PV} + usr/lib32/libvdpau_nvidia.so.${PV} + usr/lib32/opengl/nvidia/lib/libGL.so.${PV} + usr/lib32/libcuda.so.${PV} + usr/lib32/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0 + usr/lib32/libnvidia-compiler.so.${PV}" + +QA_EXECSTACK_x86="usr/lib/opengl/nvidia/lib/libGL.so.${PV} + usr/lib/libnvidia-glcore.so.${PV} + usr/lib/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib64/libXvMCNVIDIA.so.${PV} + usr/lib/libXvMCNVIDIA.a:NVXVMC.o + usr/lib/libvdpau_nvidia.so.${PV} + usr/lib/libnvidia-compiler.so.${PV} + usr/lib/libcuda.so.${PV} + usr/lib/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0" + +QA_EXECSTACK_amd64="usr/lib32/libnvidia-glcore.so.${PV} + usr/lib32/opengl/nvidia/lib/libGL.so.${PV} + usr/lib32/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib32/libvdpau_nvidia.so.${PV} + usr/lib32/libcuda.so.${PV} + usr/lib32/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0 + usr/lib32/libnvidia-compiler.so.${PV} + usr/lib64/libXvMCNVIDIA.a:NVXVMC.o + usr/lib64/libnvidia-cfg.so.${PV} + usr/lib64/libnvidia-ml.so.${PV} + usr/lib64/libvdpau_nvidia.so.${PV} + usr/lib64/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib64/opengl/nvidia/lib/libGL.so.${PV} + usr/lib64/libnvidia-glcore.so.${PV} + usr/lib64/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib64/libXvMCNVIDIA.so.${PV} + usr/lib64/libcuda.so.${PV} + usr/lib64/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0 + usr/lib64/libnvidia-compiler.so.${PV} + usr/lib64/xorg/modules/drivers/nvidia_drv.so + usr/bin/nvidia-smi + usr/bin/nvidia-xconfig + usr/bin/nvidia-settings" + +QA_WX_LOAD_x86="usr/lib/libnvidia-glcore.so.${PV} + usr/lib/opengl/nvidia/lib/libGL.so.${PV} + usr/lib/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib/libXvMCNVIDIA.a + usr/lib64/libXvMCNVIDIA.so.${PV}" + +QA_WX_LOAD_amd64="usr/lib32/opengl/nvidia/lib/libGL.so.${PV} + usr/lib32/libnvidia-glcore.so.${PV} + usr/lib64/opengl/nvidia/lib/libGL.so.${PV} + usr/lib64/libnvidia-glcore.so.${PV} + usr/lib64/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib64/libXvMCNVIDIA.so.${PV}" + +QA_SONAME_x86="usr/lib/libnvidia-compiler.so.${PV}" + +QA_SONAME_amd64="usr/lib64/libnvidia-compiler.so.${PV} + usr/lib32/libnvidia-compiler.so.${PV}" + +QA_DT_HASH_amd64="usr/lib32/libcuda.so.${PV} + usr/lib32/opengl/nvidia/lib/libGL.so.${PV} + usr/lib32/libnvidia-glcore.so.${PV} + usr/lib32/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib32/libvdpau_nvidia.so.${PV} + usr/lib32/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0 + usr/lib32/libnvidia-compiler.so.${PV} + usr/lib64/libXvMCNVIDIA.so.${PV} + usr/lib64/libcuda.so.${PV} + usr/lib64/libnvidia-cfg.so.${PV} + usr/lib64/libnvidia-glcore.so.${PV} + usr/lib64/libnvidia-ml.so.${PV} + usr/lib64/opengl/nvidia/lib/libGL.so.${PV} + usr/lib64/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib64/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib64/xorg/modules/drivers/nvidia_drv.so + usr/lib64/libvdpau_nvidia.so.${PV} + usr/lib64/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0 + usr/lib64/libnvidia-compiler.so.${PV} + usr/lib64/libnvcuvid.so.${PV} + usr/bin/nvidia-smi + usr/bin/nvidia-xconfig + usr/bin/nvidia-settings" + +QA_DT_HASH_x86="usr/lib/libcuda.so.${PV} + usr/lib/libnvidia-cfg.so.${PV} + usr/lib/libnvidia-glcore.so.${PV} + usr/lib/libnvidia-ml.so.${PV} + usr/lib/opengl/nvidia/lib/libGL.so.${PV} + usr/lib/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib/xorg/modules/drivers/nvidia_drv.so + usr/lib/libXvMCNVIDIA.so.${PV} + usr/lib/libvdpau_nvidia.so.${PV} + usr/lib/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0 + usr/lib/libnvidia-compiler.so.${PV} + usr/lib/libnvcuvid.so.${PV} + usr/bin/nvidia-smi + usr/bin/nvidia-xconfig + usr/bin/nvidia-settings" + + +S="${WORKDIR}/" + +pkg_setup() { + # try to turn off distcc and ccache for people that have a problem with it + export DISTCC_DISABLE=1 + export CCACHE_DISABLE=1 + + if use amd64 && has_multilib_profile && [ "${DEFAULT_ABI}" != "amd64" ]; then + eerror "This ebuild doesn't currently support changing your default abi." + die "Unexpected \${DEFAULT_ABI} = ${DEFAULT_ABI}" + fi + + # On BSD userland it wants real make command + use userland_BSD && MAKE="$(get_bmake)" + + export _POSIX2_VERSION="199209" + + # set variables to where files are in the package structure + if use kernel_FreeBSD; then + NV_DOC="${S}/doc" + NV_EXEC="${S}/obj" + NV_LIB="${S}/obj" + NV_SRC="${S}/src" + NV_MAN="${S}/x11/man" + NV_X11="${S}/obj" + NV_X11_DRV="${NV_X11}" + NV_X11_EXT="${NV_X11}" + NV_SOVER=1 + elif use kernel_linux; then + NV_DOC="${S}" + NV_EXEC="${S}" + NV_LIB="${S}" + NV_SRC="${S}/kernel" + NV_MAN="${S}" + NV_X11="${S}" + NV_X11_DRV="${NV_X11}" + NV_X11_EXT="${NV_X11}" + NV_SOVER=${PV} + else + die "Could not determine proper NVIDIA package" + fi +} + +src_unpack() { + if ! use x86-fbsd; then + cd "${S}" + unpack_makeself + else + unpack ${A} + fi +} + +src_prepare() { + # Please add a brief description for every added patch + use x86-fbsd && cd doc +} + +src_compile() { + # This is already the default on Linux, as there's no toplevel Makefile, but + # on FreeBSD there's one and triggers the kernel module build, as we install + # it by itself, pass this. + + cd "${NV_SRC}" + if use x86-fbsd; then + MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \ + LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die + fi + cat <<- EOF > "${S}"/nvidia.icd + /usr/$(get_libdir)/libcuda.so + EOF +} + +src_install() { + if use kernel_linux; then + VIDEOGROUP="$(egetent group video | cut -d ':' -f 3)" + if [ -z "$VIDEOGROUP" ]; then + eerror "Failed to determine the video group gid." + die "Failed to determine the video group gid." + fi + + # Add the aliases + [ -f "${FILESDIR}/nvidia-169.07" ] || die "nvidia missing in FILESDIR" + sed -e 's:PACKAGE:'${PF}':g' \ + -e 's:VIDEOGID:'${VIDEOGROUP}':' "${FILESDIR}"/nvidia-169.07 > \ + "${WORKDIR}"/nvidia + insinto /etc/modprobe.d + newins "${WORKDIR}"/nvidia nvidia.conf || die + fi + + # NVIDIA kernel <-> userspace driver config lib + dolib.so ${NV_LIB}/libnvidia-cfg.so.${NV_SOVER} || \ + die "failed to install libnvidia-cfg" + dosym libnvidia-cfg.so.${NV_SOVER} \ + /usr/$(get_libdir)/libnvidia-cfg.so.1 || \ + die "failed to create libnvidia-cfg.so symlink" + dosym libnvidia-cfg.so.1 \ + /usr/$(get_libdir)/libnvidia-cfg.so || \ + die "failed to create libnvidia-cfg.so symlink" + + # NVIDIA monitoring library + dolib.so ${NV_LIB}/libnvidia-ml.so.${NV_SOVER} || \ + die "failed to install libnvidia-ml" + dosym libnvidia-ml.so.${NV_SOVER} \ + /usr/$(get_libdir)/libnvidia-ml.so.1 || \ + die "failed to create libnvidia-ml.so symlink" + dosym libnvidia-ml.so.1 \ + /usr/$(get_libdir)/libnvidia-ml.so || \ + die "failed to create libnvidia-ml.so symlink" + + # NVIDIA video decode <-> CUDA + dolib.so ${NV_LIB}/libnvcuvid.so.${NV_SOVER} || \ + die "failed to install libnvcuvid.so" + dosym libnvcuvid.so.${NV_SOVER} \ + /usr/$(get_libdir)/libnvcuvid.so.1 || \ + die "failed to create libnvcuvid.so symlink" + dosym libnvcuvid.so.1 \ + /usr/$(get_libdir)/libnvcuvid.so || \ + die "failed to create libnvcuvid.so symlink" + + # Xorg DDX driver + insinto /usr/$(get_libdir)/xorg/modules/drivers + doins ${NV_X11_DRV}/nvidia_drv.so || die "failed to install nvidia_drv.so" + + # Xorg GLX driver + insinto /usr/$(get_libdir)/opengl/nvidia/extensions + doins ${NV_X11_EXT}/libglx.so.${NV_SOVER} || \ + die "failed to install libglx.so" + dosym libglx.so.${NV_SOVER} \ + /usr/$(get_libdir)/opengl/nvidia/extensions/libglx.so || \ + die "failed to create libglx.so symlink" + + # XvMC driver + dolib.a ${NV_X11}/libXvMCNVIDIA.a || \ + die "failed to install libXvMCNVIDIA.so" + dolib.so ${NV_X11}/libXvMCNVIDIA.so.${NV_SOVER} || \ + die "failed to install libXvMCNVIDIA.so" + dosym libXvMCNVIDIA.so.${NV_SOVER} \ + /usr/$(get_libdir)/libXvMCNVIDIA.so.1 || \ + die "failed to create libXvMCNVIDIA.so symlink" + dosym libXvMCNVIDIA.so.1 /usr/$(get_libdir)/libXvMCNVIDIA.so || \ + die "failed to create libXvMCNVIDIA.so symlink" + dosym libXvMCNVIDIA.so.${NV_SOVER} \ + /usr/$(get_libdir)/libXvMCNVIDIA_dynamic.so.1 || \ + die "failed to create libXvMCNVIDIA_dynamic.so symlink" + + # OpenCL ICD for NVIDIA + if use kernel_linux; then + insinto /etc/OpenCL/vendors + doins nvidia.icd + fi + + # Documentation + dohtml ${NV_DOC}/html/* + if use x86-fbsd; then + dodoc "${NV_DOC}/README" + doman "${NV_MAN}/nvidia-xconfig.1" + else + # Docs + newdoc "${NV_DOC}/README.txt" README + dodoc "${NV_DOC}/NVIDIA_Changelog" + doman "${NV_MAN}/nvidia-smi.1.gz" + doman "${NV_MAN}/nvidia-xconfig.1.gz" + fi + + # Helper Apps + dobin ${NV_EXEC}/nvidia-xconfig || die + dobin ${NV_EXEC}/nvidia-bug-report.sh || die + if use kernel_linux; then + dobin ${NV_EXEC}/nvidia-smi || die + fi + + 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 + + is_final_abi || die "failed to iterate through all ABIs" +} + +# Install nvidia library: +# the first parameter is the place where to install it +# the second parameter is the base name of the library +# the third parameter is the provided soversion +donvidia() { + dodir $1 + exeinto $1 + + libname=$(basename $2) + + doexe $2.$3 || die "failed to install $2" + dosym ${libname}.$3 $1/${libname} || die "failed to symlink $2" + [[ $3 != "1" ]] && dosym ${libname}.$3 $1/${libname}.1 +} + +src_install-libs() { + local inslibdir=$(get_libdir) + local NV_ROOT="/usr/${inslibdir}/opengl/nvidia" + local CL_ROOT=/usr/${inslibdir}/OpenCL/vendors/nvidia + local libdir= sover= + + if use kernel_linux; then + if has_multilib_profile && [[ ${ABI} == "x86" ]] ; then + libdir=32 + else + libdir=. + fi + sover=${PV} + else + libdir=obj + # on FreeBSD it has just .1 suffix + sover=1 + fi + + # The GLX libraries + donvidia ${NV_ROOT}/lib ${libdir}/libGL.so ${sover} + donvidia /usr/${inslibdir} ${libdir}/libnvidia-glcore.so ${sover} + if use x86-fbsd; then + donvidia ${NV_ROOT}/lib ${libdir}/libnvidia-tls.so ${sover} + else + donvidia ${NV_ROOT}/lib ${libdir}/tls/libnvidia-tls.so ${sover} + fi + + # VDPAU + donvidia /usr/${inslibdir} ${libdir}/libvdpau_nvidia.so ${sover} + + # CUDA & OpenCL + if use kernel_linux; then + donvidia /usr/${inslibdir} ${libdir}/libcuda.so ${sover} + donvidia /usr/${inslibdir} ${libdir}/libnvidia-compiler.so ${sover} + donvidia ${CL_ROOT} ${libdir}/libOpenCL.so 1.0.0 + #dosym libOpenCL.so.1 ${CL_ROOT}/libOpenCL.so + fi +} + +pkg_preinst() { + # Clean the dynamic libGL stuff's home to ensure + # we dont have stale libs floating around + if [ -d "${ROOT}"/usr/lib/opengl/nvidia ] ; then + rm -rf "${ROOT}"/usr/lib/opengl/nvidia/* + fi + # Make sure we nuke the old nvidia-glx's env.d file + if [ -e "${ROOT}"/etc/env.d/09nvidia ] ; then + rm -f "${ROOT}"/etc/env.d/09nvidia + fi +} + +pkg_postinst() { + # Switch to the nvidia implementation + eselect opengl set --use-old nvidia + eselect opencl set --use-old nvidia + + elog "To use the NVIDIA GLX, run \"eselect opengl set nvidia\"" + elog + elog "To use the NVIDIA CUDA/OpenCL, run \"eselect opencl set nvidia\"" + elog + elog "NVIDIA has requested that any bug reports submitted have the" + elog "output of /usr/bin/nvidia-bug-report.sh included." + elog + elog "To work with compiz, you must enable the AddARGBGLXVisuals option." + elog + elog "If you are having resolution problems, try disabling DynamicTwinView." + elog +} + +pkg_postrm() { + eselect opengl set --use-old xorg-x11 +} diff --git a/x11-drivers/nvidia-userspace/nvidia-userspace-295.20.ebuild b/x11-drivers/nvidia-userspace/nvidia-userspace-295.20.ebuild new file mode 100644 index 00000000..b893f2d7 --- /dev/null +++ b/x11-drivers/nvidia-userspace/nvidia-userspace-295.20.ebuild @@ -0,0 +1,436 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="2" + +inherit eutils unpacker multilib portability versionator flag-o-matic + +X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}" +AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}" +X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}" + +DESCRIPTION="NVIDIA X11 userspace libraries and applications" +HOMEPAGE="http://www.nvidia.com/" +SRC_URI="x86? ( http://download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}.run ) + amd64? ( http://download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run ) + x86-fbsd? ( http://download.nvidia.com/XFree86/FreeBSD-x86/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )" + +LICENSE="NVIDIA" +SLOT="0" +KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd" +IUSE="multilib kernel_linux" +RESTRICT="strip" +EMULTILIB_PKG="true" + +COMMON="<x11-base/xorg-server-1.11.99 + kernel_linux? ( >=sys-libs/glibc-2.6.1 ) + multilib? ( app-emulation/emul-linux-x86-xlibs ) + >=app-admin/eselect-opengl-1.0.9 + app-admin/eselect-opencl + !<media-video/nvidia-settings-256.52" +DEPEND="${COMMON}" +RDEPEND="${COMMON} + x11-libs/libXvMC + !<x11-drivers/nvidia-userspace-${PV} + !>x11-drivers/nvidia-userspace-${PV}" +PDEPEND=">=x11-libs/libvdpau-0.3-r1" + +QA_TEXTRELS_x86=" + usr/lib/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0 + usr/lib/libXvMCNVIDIA.so.${PV} + usr/lib/libcuda.so.${PV} + usr/lib/libnvcuvid.so.${PV} + usr/lib/libnvidia-cfg.so.${PV} + usr/lib/libnvidia-compiler.so.${PV} + usr/lib/libnvidia-glcore.so.${PV} + usr/lib/libnvidia-ml.so.${PV} + usr/lib/libvdpau_nvidia.so.${PV} + usr/lib/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib/opengl/nvidia/lib/libGL.so.${PV} + usr/lib/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib/xorg/modules/drivers/nvidia_drv.so" + +QA_TEXTRELS_x86_fbsd="boot/modules/nvidia.ko + usr/lib/opengl/nvidia/lib/libGL.so.1 + usr/lib/libnvidia-glcore.so.1 + usr/lib/libnvidia-cfg.so.1 + usr/lib/libnvidia-ml.so.1 + usr/lib/opengl/nvidia/extensions/libglx.so.1 + usr/lib/xorg/modules/drivers/nvidia_drv.so" + +QA_TEXTRELS_amd64="usr/lib32/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib32/libnvidia-glcore.so.${PV} + usr/lib32/libvdpau_nvidia.so.${PV} + usr/lib32/opengl/nvidia/lib/libGL.so.${PV} + usr/lib32/libcuda.so.${PV} + usr/lib32/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0 + usr/lib32/libnvidia-compiler.so.${PV}" + +QA_EXECSTACK_x86="usr/lib/opengl/nvidia/lib/libGL.so.${PV} + usr/lib/libnvidia-glcore.so.${PV} + usr/lib/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib64/libXvMCNVIDIA.so.${PV} + usr/lib/libXvMCNVIDIA.a:NVXVMC.o + usr/lib/libvdpau_nvidia.so.${PV} + usr/lib/libnvidia-compiler.so.${PV} + usr/lib/libcuda.so.${PV} + usr/lib/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0" + +QA_EXECSTACK_amd64="usr/lib32/libnvidia-glcore.so.${PV} + usr/lib32/opengl/nvidia/lib/libGL.so.${PV} + usr/lib32/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib32/libvdpau_nvidia.so.${PV} + usr/lib32/libcuda.so.${PV} + usr/lib32/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0 + usr/lib32/libnvidia-compiler.so.${PV} + usr/lib64/libXvMCNVIDIA.a:NVXVMC.o + usr/lib64/libnvidia-cfg.so.${PV} + usr/lib64/libnvidia-ml.so.${PV} + usr/lib64/libvdpau_nvidia.so.${PV} + usr/lib64/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib64/opengl/nvidia/lib/libGL.so.${PV} + usr/lib64/libnvidia-glcore.so.${PV} + usr/lib64/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib64/libXvMCNVIDIA.so.${PV} + usr/lib64/libcuda.so.${PV} + usr/lib64/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0 + usr/lib64/libnvidia-compiler.so.${PV} + usr/lib64/xorg/modules/drivers/nvidia_drv.so + usr/bin/nvidia-smi + usr/bin/nvidia-xconfig + usr/bin/nvidia-settings" + +QA_WX_LOAD_x86="usr/lib/libnvidia-glcore.so.${PV} + usr/lib/opengl/nvidia/lib/libGL.so.${PV} + usr/lib/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib/libXvMCNVIDIA.a + usr/lib64/libXvMCNVIDIA.so.${PV}" + +QA_WX_LOAD_amd64="usr/lib32/opengl/nvidia/lib/libGL.so.${PV} + usr/lib32/libnvidia-glcore.so.${PV} + usr/lib64/opengl/nvidia/lib/libGL.so.${PV} + usr/lib64/libnvidia-glcore.so.${PV} + usr/lib64/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib64/libXvMCNVIDIA.so.${PV}" + +QA_SONAME_x86="usr/lib/libnvidia-compiler.so.${PV}" + +QA_SONAME_amd64="usr/lib64/libnvidia-compiler.so.${PV} + usr/lib32/libnvidia-compiler.so.${PV}" + +QA_DT_HASH_amd64="usr/lib32/libcuda.so.${PV} + usr/lib32/opengl/nvidia/lib/libGL.so.${PV} + usr/lib32/libnvidia-glcore.so.${PV} + usr/lib32/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib32/libvdpau_nvidia.so.${PV} + usr/lib32/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0 + usr/lib32/libnvidia-compiler.so.${PV} + usr/lib64/libXvMCNVIDIA.so.${PV} + usr/lib64/libcuda.so.${PV} + usr/lib64/libnvidia-cfg.so.${PV} + usr/lib64/libnvidia-glcore.so.${PV} + usr/lib64/libnvidia-ml.so.${PV} + usr/lib64/opengl/nvidia/lib/libGL.so.${PV} + usr/lib64/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib64/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib64/xorg/modules/drivers/nvidia_drv.so + usr/lib64/libvdpau_nvidia.so.${PV} + usr/lib64/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0 + usr/lib64/libnvidia-compiler.so.${PV} + usr/lib64/libnvcuvid.so.${PV} + usr/bin/nvidia-smi + usr/bin/nvidia-xconfig + usr/bin/nvidia-settings" + +QA_DT_HASH_x86="usr/lib/libcuda.so.${PV} + usr/lib/libnvidia-cfg.so.${PV} + usr/lib/libnvidia-glcore.so.${PV} + usr/lib/libnvidia-ml.so.${PV} + usr/lib/opengl/nvidia/lib/libGL.so.${PV} + usr/lib/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib/xorg/modules/drivers/nvidia_drv.so + usr/lib/libXvMCNVIDIA.so.${PV} + usr/lib/libvdpau_nvidia.so.${PV} + usr/lib/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0 + usr/lib/libnvidia-compiler.so.${PV} + usr/lib/libnvcuvid.so.${PV} + usr/bin/nvidia-smi + usr/bin/nvidia-xconfig + usr/bin/nvidia-settings" + + +S="${WORKDIR}/" + +pkg_setup() { + # try to turn off distcc and ccache for people that have a problem with it + export DISTCC_DISABLE=1 + export CCACHE_DISABLE=1 + + if use amd64 && has_multilib_profile && [ "${DEFAULT_ABI}" != "amd64" ]; then + eerror "This ebuild doesn't currently support changing your default abi." + die "Unexpected \${DEFAULT_ABI} = ${DEFAULT_ABI}" + fi + + # On BSD userland it wants real make command + use userland_BSD && MAKE="$(get_bmake)" + + export _POSIX2_VERSION="199209" + + # set variables to where files are in the package structure + if use kernel_FreeBSD; then + NV_DOC="${S}/doc" + NV_EXEC="${S}/obj" + NV_LIB="${S}/obj" + NV_SRC="${S}/src" + NV_MAN="${S}/x11/man" + NV_X11="${S}/obj" + NV_X11_DRV="${NV_X11}" + NV_X11_EXT="${NV_X11}" + NV_SOVER=1 + elif use kernel_linux; then + NV_DOC="${S}" + NV_EXEC="${S}" + NV_LIB="${S}" + NV_SRC="${S}/kernel" + NV_MAN="${S}" + NV_X11="${S}" + NV_X11_DRV="${NV_X11}" + NV_X11_EXT="${NV_X11}" + NV_SOVER=${PV} + else + die "Could not determine proper NVIDIA package" + fi +} + +src_unpack() { + if ! use x86-fbsd; then + cd "${S}" + unpack_makeself + else + unpack ${A} + fi +} + +src_prepare() { + # Please add a brief description for every added patch + use x86-fbsd && cd doc +} + +src_compile() { + # This is already the default on Linux, as there's no toplevel Makefile, but + # on FreeBSD there's one and triggers the kernel module build, as we install + # it by itself, pass this. + + cd "${NV_SRC}" + if use x86-fbsd; then + MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \ + LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die + fi + cat <<- EOF > "${S}"/nvidia.icd + /usr/$(get_libdir)/libcuda.so + EOF +} + +src_install() { + if use kernel_linux; then + VIDEOGROUP="$(egetent group video | cut -d ':' -f 3)" + if [ -z "$VIDEOGROUP" ]; then + eerror "Failed to determine the video group gid." + die "Failed to determine the video group gid." + fi + + # Add the aliases + [ -f "${FILESDIR}/nvidia-169.07" ] || die "nvidia missing in FILESDIR" + sed -e 's:PACKAGE:'${PF}':g' \ + -e 's:VIDEOGID:'${VIDEOGROUP}':' "${FILESDIR}"/nvidia-169.07 > \ + "${WORKDIR}"/nvidia + insinto /etc/modprobe.d + newins "${WORKDIR}"/nvidia nvidia.conf || die + fi + + # NVIDIA kernel <-> userspace driver config lib + dolib.so ${NV_LIB}/libnvidia-cfg.so.${NV_SOVER} || \ + die "failed to install libnvidia-cfg" + dosym libnvidia-cfg.so.${NV_SOVER} \ + /usr/$(get_libdir)/libnvidia-cfg.so.1 || \ + die "failed to create libnvidia-cfg.so symlink" + dosym libnvidia-cfg.so.1 \ + /usr/$(get_libdir)/libnvidia-cfg.so || \ + die "failed to create libnvidia-cfg.so symlink" + + # NVIDIA monitoring library + dolib.so ${NV_LIB}/libnvidia-ml.so.${NV_SOVER} || \ + die "failed to install libnvidia-ml" + dosym libnvidia-ml.so.${NV_SOVER} \ + /usr/$(get_libdir)/libnvidia-ml.so.1 || \ + die "failed to create libnvidia-ml.so symlink" + dosym libnvidia-ml.so.1 \ + /usr/$(get_libdir)/libnvidia-ml.so || \ + die "failed to create libnvidia-ml.so symlink" + + # NVIDIA video decode <-> CUDA + dolib.so ${NV_LIB}/libnvcuvid.so.${NV_SOVER} || \ + die "failed to install libnvcuvid.so" + dosym libnvcuvid.so.${NV_SOVER} \ + /usr/$(get_libdir)/libnvcuvid.so.1 || \ + die "failed to create libnvcuvid.so symlink" + dosym libnvcuvid.so.1 \ + /usr/$(get_libdir)/libnvcuvid.so || \ + die "failed to create libnvcuvid.so symlink" + + # Xorg DDX driver + insinto /usr/$(get_libdir)/xorg/modules/drivers + doins ${NV_X11_DRV}/nvidia_drv.so || die "failed to install nvidia_drv.so" + + # Xorg GLX driver + insinto /usr/$(get_libdir)/opengl/nvidia/extensions + doins ${NV_X11_EXT}/libglx.so.${NV_SOVER} || \ + die "failed to install libglx.so" + dosym libglx.so.${NV_SOVER} \ + /usr/$(get_libdir)/opengl/nvidia/extensions/libglx.so || \ + die "failed to create libglx.so symlink" + + # XvMC driver + dolib.a ${NV_X11}/libXvMCNVIDIA.a || \ + die "failed to install libXvMCNVIDIA.so" + dolib.so ${NV_X11}/libXvMCNVIDIA.so.${NV_SOVER} || \ + die "failed to install libXvMCNVIDIA.so" + dosym libXvMCNVIDIA.so.${NV_SOVER} \ + /usr/$(get_libdir)/libXvMCNVIDIA.so.1 || \ + die "failed to create libXvMCNVIDIA.so symlink" + dosym libXvMCNVIDIA.so.1 /usr/$(get_libdir)/libXvMCNVIDIA.so || \ + die "failed to create libXvMCNVIDIA.so symlink" + dosym libXvMCNVIDIA.so.${NV_SOVER} \ + /usr/$(get_libdir)/libXvMCNVIDIA_dynamic.so.1 || \ + die "failed to create libXvMCNVIDIA_dynamic.so symlink" + + # OpenCL ICD for NVIDIA + if use kernel_linux; then + insinto /etc/OpenCL/vendors + doins nvidia.icd + fi + + # Documentation + dohtml ${NV_DOC}/html/* + if use x86-fbsd; then + dodoc "${NV_DOC}/README" + doman "${NV_MAN}/nvidia-xconfig.1" + else + # Docs + newdoc "${NV_DOC}/README.txt" README + dodoc "${NV_DOC}/NVIDIA_Changelog" + doman "${NV_MAN}/nvidia-smi.1.gz" + doman "${NV_MAN}/nvidia-xconfig.1.gz" + fi + + # Helper Apps + dobin ${NV_EXEC}/nvidia-xconfig || die + dobin ${NV_EXEC}/nvidia-bug-report.sh || die + if use kernel_linux; then + dobin ${NV_EXEC}/nvidia-smi || die + fi + + 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 + + is_final_abi || die "failed to iterate through all ABIs" +} + +# Install nvidia library: +# the first parameter is the place where to install it +# the second parameter is the base name of the library +# the third parameter is the provided soversion +donvidia() { + dodir $1 + exeinto $1 + + libname=$(basename $2) + + doexe $2.$3 || die "failed to install $2" + dosym ${libname}.$3 $1/${libname} || die "failed to symlink $2" + [[ $3 != "1" ]] && dosym ${libname}.$3 $1/${libname}.1 +} + +src_install-libs() { + local inslibdir=$(get_libdir) + local NV_ROOT="/usr/${inslibdir}/opengl/nvidia" + local CL_ROOT=/usr/${inslibdir}/OpenCL/vendors/nvidia + local libdir= sover= + + if use kernel_linux; then + if has_multilib_profile && [[ ${ABI} == "x86" ]] ; then + libdir=32 + else + libdir=. + fi + sover=${PV} + else + libdir=obj + # on FreeBSD it has just .1 suffix + sover=1 + fi + + # The GLX libraries + donvidia ${NV_ROOT}/lib ${libdir}/libGL.so ${sover} + donvidia /usr/${inslibdir} ${libdir}/libnvidia-glcore.so ${sover} + if use x86-fbsd; then + donvidia ${NV_ROOT}/lib ${libdir}/libnvidia-tls.so ${sover} + else + donvidia ${NV_ROOT}/lib ${libdir}/tls/libnvidia-tls.so ${sover} + fi + + # VDPAU + donvidia /usr/${inslibdir} ${libdir}/libvdpau_nvidia.so ${sover} + + # CUDA & OpenCL + if use kernel_linux; then + donvidia /usr/${inslibdir} ${libdir}/libcuda.so ${sover} + donvidia /usr/${inslibdir} ${libdir}/libnvidia-compiler.so ${sover} + donvidia ${CL_ROOT} ${libdir}/libOpenCL.so 1.0.0 + #dosym libOpenCL.so.1 ${CL_ROOT}/libOpenCL.so + fi +} + +pkg_preinst() { + # Clean the dynamic libGL stuff's home to ensure + # we dont have stale libs floating around + if [ -d "${ROOT}"/usr/lib/opengl/nvidia ] ; then + rm -rf "${ROOT}"/usr/lib/opengl/nvidia/* + fi + # Make sure we nuke the old nvidia-glx's env.d file + if [ -e "${ROOT}"/etc/env.d/09nvidia ] ; then + rm -f "${ROOT}"/etc/env.d/09nvidia + fi +} + +pkg_postinst() { + # Switch to the nvidia implementation + eselect opengl set --use-old nvidia + eselect opencl set --use-old nvidia + + elog "To use the NVIDIA GLX, run \"eselect opengl set nvidia\"" + elog + elog "To use the NVIDIA CUDA/OpenCL, run \"eselect opencl set nvidia\"" + elog + elog "NVIDIA has requested that any bug reports submitted have the" + elog "output of /usr/bin/nvidia-bug-report.sh included." + elog + elog "To work with compiz, you must enable the AddARGBGLXVisuals option." + elog + elog "If you are having resolution problems, try disabling DynamicTwinView." + elog +} + +pkg_postrm() { + eselect opengl set --use-old xorg-x11 +} diff --git a/x11-drivers/nvidia-userspace/nvidia-userspace-295.33.ebuild b/x11-drivers/nvidia-userspace/nvidia-userspace-295.33.ebuild new file mode 100644 index 00000000..b8e99462 --- /dev/null +++ b/x11-drivers/nvidia-userspace/nvidia-userspace-295.33.ebuild @@ -0,0 +1,452 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="2" + +inherit eutils unpacker multilib portability versionator flag-o-matic + +X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}" +AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}" +X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}" + +DESCRIPTION="NVIDIA X11 userspace libraries and applications" +HOMEPAGE="http://www.nvidia.com/" +SRC_URI="x86? ( http://us.download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}.run ) + amd64? ( http://us.download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run ) + x86-fbsd? ( http://us.download.nvidia.com/XFree86/FreeBSD-x86/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )" + +LICENSE="NVIDIA" +SLOT="0" +KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd" +IUSE="acpi multilib kernel_linux" +RESTRICT="strip" +EMULTILIB_PKG="true" + +COMMON="<x11-base/xorg-server-1.12.99 + kernel_linux? ( >=sys-libs/glibc-2.6.1 ) + multilib? ( app-emulation/emul-linux-x86-xlibs ) + >=app-admin/eselect-opengl-1.0.9 + app-admin/eselect-opencl + !<media-video/nvidia-settings-256.52" +DEPEND="${COMMON}" +RDEPEND="${COMMON} + x11-libs/libXvMC + !<x11-drivers/nvidia-userspace-${PV} + !>x11-drivers/nvidia-userspace-${PV} + acpi? ( sys-power/acpid )" +PDEPEND=">=x11-libs/libvdpau-0.3-r1" + +QA_TEXTRELS_x86=" + usr/lib/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0 + usr/lib/libXvMCNVIDIA.so.${PV} + usr/lib/libcuda.so.${PV} + usr/lib/libnvcuvid.so.${PV} + usr/lib/libnvidia-cfg.so.${PV} + usr/lib/libnvidia-compiler.so.${PV} + usr/lib/libnvidia-glcore.so.${PV} + usr/lib/libnvidia-ml.so.${PV} + usr/lib/libvdpau_nvidia.so.${PV} + usr/lib/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib/opengl/nvidia/lib/libGL.so.${PV} + usr/lib/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib/xorg/modules/drivers/nvidia_drv.so" + +QA_TEXTRELS_x86_fbsd="boot/modules/nvidia.ko + usr/lib/opengl/nvidia/lib/libGL.so.1 + usr/lib/libnvidia-glcore.so.1 + usr/lib/libnvidia-cfg.so.1 + usr/lib/libnvidia-ml.so.1 + usr/lib/opengl/nvidia/extensions/libglx.so.1 + usr/lib/xorg/modules/drivers/nvidia_drv.so" + +QA_TEXTRELS_amd64="usr/lib32/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib32/libnvidia-glcore.so.${PV} + usr/lib32/libvdpau_nvidia.so.${PV} + usr/lib32/opengl/nvidia/lib/libGL.so.${PV} + usr/lib32/libcuda.so.${PV} + usr/lib32/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0 + usr/lib32/libnvidia-compiler.so.${PV}" + +QA_EXECSTACK_x86="usr/lib/opengl/nvidia/lib/libGL.so.${PV} + usr/lib/libnvidia-glcore.so.${PV} + usr/lib/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib64/libXvMCNVIDIA.so.${PV} + usr/lib/libXvMCNVIDIA.a:NVXVMC.o + usr/lib/libvdpau_nvidia.so.${PV} + usr/lib/libnvidia-compiler.so.${PV} + usr/lib/libcuda.so.${PV} + usr/lib/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0" + +QA_EXECSTACK_amd64="usr/lib32/libnvidia-glcore.so.${PV} + usr/lib32/opengl/nvidia/lib/libGL.so.${PV} + usr/lib32/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib32/libvdpau_nvidia.so.${PV} + usr/lib32/libcuda.so.${PV} + usr/lib32/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0 + usr/lib32/libnvidia-compiler.so.${PV} + usr/lib64/libXvMCNVIDIA.a:NVXVMC.o + usr/lib64/libnvidia-cfg.so.${PV} + usr/lib64/libnvidia-ml.so.${PV} + usr/lib64/libvdpau_nvidia.so.${PV} + usr/lib64/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib64/opengl/nvidia/lib/libGL.so.${PV} + usr/lib64/libnvidia-glcore.so.${PV} + usr/lib64/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib64/libXvMCNVIDIA.so.${PV} + usr/lib64/libcuda.so.${PV} + usr/lib64/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0 + usr/lib64/libnvidia-compiler.so.${PV} + usr/lib64/xorg/modules/drivers/nvidia_drv.so + opt/bin/nvidia-smi + opt/bin/nvidia-xconfig + opt/bin/nvidia-debugdump + opt/bin/nvidia-settings" + +QA_WX_LOAD_x86="usr/lib/libnvidia-glcore.so.${PV} + usr/lib/opengl/nvidia/lib/libGL.so.${PV} + usr/lib/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib/libXvMCNVIDIA.a + usr/lib64/libXvMCNVIDIA.so.${PV}" + +QA_WX_LOAD_amd64="usr/lib32/opengl/nvidia/lib/libGL.so.${PV} + usr/lib32/libnvidia-glcore.so.${PV} + usr/lib64/opengl/nvidia/lib/libGL.so.${PV} + usr/lib64/libnvidia-glcore.so.${PV} + usr/lib64/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib64/libXvMCNVIDIA.so.${PV}" + +QA_SONAME_x86="usr/lib/libnvidia-compiler.so.${PV}" + +QA_SONAME_amd64="usr/lib64/libnvidia-compiler.so.${PV} + usr/lib32/libnvidia-compiler.so.${PV}" + +QA_DT_HASH_amd64="usr/lib32/libcuda.so.${PV} + usr/lib32/opengl/nvidia/lib/libGL.so.${PV} + usr/lib32/libnvidia-glcore.so.${PV} + usr/lib32/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib32/libvdpau_nvidia.so.${PV} + usr/lib32/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0 + usr/lib32/libnvidia-compiler.so.${PV} + usr/lib64/libXvMCNVIDIA.so.${PV} + usr/lib64/libcuda.so.${PV} + usr/lib64/libnvidia-cfg.so.${PV} + usr/lib64/libnvidia-glcore.so.${PV} + usr/lib64/libnvidia-ml.so.${PV} + usr/lib64/opengl/nvidia/lib/libGL.so.${PV} + usr/lib64/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib64/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib64/xorg/modules/drivers/nvidia_drv.so + usr/lib64/libvdpau_nvidia.so.${PV} + usr/lib64/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0 + usr/lib64/libnvidia-compiler.so.${PV} + usr/lib64/libnvcuvid.so.${PV} + opt/bin/nvidia-smi + opt/bin/nvidia-xconfig + opt/bin/nvidia-debugdump + opt/bin/nvidia-settings" + +QA_DT_HASH_x86="usr/lib/libcuda.so.${PV} + usr/lib/libnvidia-cfg.so.${PV} + usr/lib/libnvidia-glcore.so.${PV} + usr/lib/libnvidia-ml.so.${PV} + usr/lib/opengl/nvidia/lib/libGL.so.${PV} + usr/lib/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib/xorg/modules/drivers/nvidia_drv.so + usr/lib/libXvMCNVIDIA.so.${PV} + usr/lib/libvdpau_nvidia.so.${PV} + usr/lib/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0 + usr/lib/libnvidia-compiler.so.${PV} + usr/lib/libnvcuvid.so.${PV} + opt/bin/nvidia-smi + opt/bin/nvidia-xconfig + opt/bin/nvidia-debugdump + opt/bin/nvidia-settings" + + +S="${WORKDIR}/" + +pkg_setup() { + # try to turn off distcc and ccache for people that have a problem with it + export DISTCC_DISABLE=1 + export CCACHE_DISABLE=1 + + if use amd64 && has_multilib_profile && [ "${DEFAULT_ABI}" != "amd64" ]; then + eerror "This ebuild doesn't currently support changing your default abi." + die "Unexpected \${DEFAULT_ABI} = ${DEFAULT_ABI}" + fi + + # On BSD userland it wants real make command + use userland_BSD && MAKE="$(get_bmake)" + + export _POSIX2_VERSION="199209" + + # set variables to where files are in the package structure + if use kernel_FreeBSD; then + NV_DOC="${S}/doc" + NV_EXEC="${S}/obj" + NV_LIB="${S}/obj" + NV_SRC="${S}/src" + NV_MAN="${S}/x11/man" + NV_X11="${S}/obj" + NV_X11_DRV="${NV_X11}" + NV_X11_EXT="${NV_X11}" + NV_SOVER=1 + elif use kernel_linux; then + NV_DOC="${S}" + NV_EXEC="${S}" + NV_LIB="${S}" + NV_SRC="${S}/kernel" + NV_MAN="${S}" + NV_X11="${S}" + NV_X11_DRV="${NV_X11}" + NV_X11_EXT="${NV_X11}" + NV_SOVER=${PV} + else + die "Could not determine proper NVIDIA package" + fi +} + +src_unpack() { + if ! use x86-fbsd; then + cd "${S}" + unpack_makeself + else + unpack ${A} + fi +} + +src_prepare() { + # Please add a brief description for every added patch + use x86-fbsd && cd doc + cat <<- EOF > "${S}"/nvidia.icd + /usr/$(get_libdir)/libcuda.so + EOF +} + +src_compile() { + # This is already the default on Linux, as there's no toplevel Makefile, but + # on FreeBSD there's one and triggers the kernel module build, as we install + # it by itself, pass this. + + cd "${NV_SRC}" + if use x86-fbsd; then + MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \ + LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die + fi +} + +src_install() { + if use kernel_linux; then + VIDEOGROUP="$(egetent group video | cut -d ':' -f 3)" + if [ -z "$VIDEOGROUP" ]; then + eerror "Failed to determine the video group gid." + die "Failed to determine the video group gid." + fi + + # Add the aliases + [ -f "${FILESDIR}/nvidia-169.07" ] || die "nvidia missing in FILESDIR" + sed -e 's:PACKAGE:'${PF}':g' \ + -e 's:VIDEOGID:'${VIDEOGROUP}':' "${FILESDIR}"/nvidia-169.07 > \ + "${WORKDIR}"/nvidia + insinto /etc/modprobe.d + newins "${WORKDIR}"/nvidia nvidia.conf || die + + # Ensures that our device nodes are created when not using X + exeinto /lib/udev + doexe "${FILESDIR}"/nvidia-udev.sh + + insinto /lib/udev/rules.d + newins "${FILESDIR}"/nvidia.udev-rule 99-nvidia.rules + fi + + # NVIDIA kernel <-> userspace driver config lib + dolib.so ${NV_LIB}/libnvidia-cfg.so.${NV_SOVER} || \ + die "failed to install libnvidia-cfg" + dosym libnvidia-cfg.so.${NV_SOVER} \ + /usr/$(get_libdir)/libnvidia-cfg.so.1 || \ + die "failed to create libnvidia-cfg.so symlink" + dosym libnvidia-cfg.so.1 \ + /usr/$(get_libdir)/libnvidia-cfg.so || \ + die "failed to create libnvidia-cfg.so symlink" + + # NVIDIA monitoring library + dolib.so ${NV_LIB}/libnvidia-ml.so.${NV_SOVER} || \ + die "failed to install libnvidia-ml" + dosym libnvidia-ml.so.${NV_SOVER} \ + /usr/$(get_libdir)/libnvidia-ml.so.1 || \ + die "failed to create libnvidia-ml.so symlink" + dosym libnvidia-ml.so.1 \ + /usr/$(get_libdir)/libnvidia-ml.so || \ + die "failed to create libnvidia-ml.so symlink" + + # NVIDIA video decode <-> CUDA + dolib.so ${NV_LIB}/libnvcuvid.so.${NV_SOVER} || \ + die "failed to install libnvcuvid.so" + dosym libnvcuvid.so.${NV_SOVER} \ + /usr/$(get_libdir)/libnvcuvid.so.1 || \ + die "failed to create libnvcuvid.so symlink" + dosym libnvcuvid.so.1 \ + /usr/$(get_libdir)/libnvcuvid.so || \ + die "failed to create libnvcuvid.so symlink" + + # Xorg DDX driver + insinto /usr/$(get_libdir)/xorg/modules/drivers + doins ${NV_X11_DRV}/nvidia_drv.so || die "failed to install nvidia_drv.so" + + # Xorg GLX driver + insinto /usr/$(get_libdir)/opengl/nvidia/extensions + doins ${NV_X11_EXT}/libglx.so.${NV_SOVER} || \ + die "failed to install libglx.so" + dosym libglx.so.${NV_SOVER} \ + /usr/$(get_libdir)/opengl/nvidia/extensions/libglx.so || \ + die "failed to create libglx.so symlink" + + # XvMC driver + dolib.a ${NV_X11}/libXvMCNVIDIA.a || \ + die "failed to install libXvMCNVIDIA.so" + dolib.so ${NV_X11}/libXvMCNVIDIA.so.${NV_SOVER} || \ + die "failed to install libXvMCNVIDIA.so" + dosym libXvMCNVIDIA.so.${NV_SOVER} \ + /usr/$(get_libdir)/libXvMCNVIDIA.so.1 || \ + die "failed to create libXvMCNVIDIA.so symlink" + dosym libXvMCNVIDIA.so.1 /usr/$(get_libdir)/libXvMCNVIDIA.so || \ + die "failed to create libXvMCNVIDIA.so symlink" + dosym libXvMCNVIDIA.so.${NV_SOVER} \ + /usr/$(get_libdir)/libXvMCNVIDIA_dynamic.so.1 || \ + die "failed to create libXvMCNVIDIA_dynamic.so symlink" + + # OpenCL ICD for NVIDIA + if use kernel_linux; then + insinto /etc/OpenCL/vendors + doins nvidia.icd + fi + + # Documentation + dohtml ${NV_DOC}/html/* + if use x86-fbsd; then + dodoc "${NV_DOC}/README" + doman "${NV_MAN}/nvidia-xconfig.1" + else + # Docs + newdoc "${NV_DOC}/README.txt" README + dodoc "${NV_DOC}/NVIDIA_Changelog" + doman "${NV_MAN}/nvidia-smi.1.gz" + doman "${NV_MAN}/nvidia-xconfig.1.gz" + fi + + # Helper Apps + exeinto /opt/bin/ + doexe ${NV_EXEC}/nvidia-xconfig || die + doexe ${NV_EXEC}/nvidia-debugdump || die + if use gtk; then + doexe ${NV_EXEC}/nvidia-settings || die + fi + doexe ${NV_EXEC}/nvidia-bug-report.sh || die + if use kernel_linux; then + doexe ${NV_EXEC}/nvidia-smi || die + fi + + 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 + + is_final_abi || die "failed to iterate through all ABIs" +} + +# Install nvidia library: +# the first parameter is the place where to install it +# the second parameter is the base name of the library +# the third parameter is the provided soversion +donvidia() { + dodir $1 + exeinto $1 + + libname=$(basename $2) + + doexe $2.$3 || die "failed to install $2" + dosym ${libname}.$3 $1/${libname} || die "failed to symlink $2" + [[ $3 != "1" ]] && dosym ${libname}.$3 $1/${libname}.1 +} + +src_install-libs() { + local inslibdir=$(get_libdir) + local NV_ROOT="/usr/${inslibdir}/opengl/nvidia" + local CL_ROOT=/usr/${inslibdir}/OpenCL/vendors/nvidia + local libdir= sover= + + if use kernel_linux; then + if has_multilib_profile && [[ ${ABI} == "x86" ]] ; then + libdir=32 + else + libdir=. + fi + sover=${PV} + else + libdir=obj + # on FreeBSD it has just .1 suffix + sover=1 + fi + + # The GLX libraries + donvidia ${NV_ROOT}/lib ${libdir}/libGL.so ${sover} + donvidia /usr/${inslibdir} ${libdir}/libnvidia-glcore.so ${sover} + if use x86-fbsd; then + donvidia ${NV_ROOT}/lib ${libdir}/libnvidia-tls.so ${sover} + else + donvidia ${NV_ROOT}/lib ${libdir}/tls/libnvidia-tls.so ${sover} + fi + + # VDPAU + donvidia /usr/${inslibdir} ${libdir}/libvdpau_nvidia.so ${sover} + + # CUDA & OpenCL + if use kernel_linux; then + donvidia /usr/${inslibdir} ${libdir}/libcuda.so ${sover} + donvidia /usr/${inslibdir} ${libdir}/libnvidia-compiler.so ${sover} + donvidia ${CL_ROOT} ${libdir}/libOpenCL.so 1.0.0 + #dosym libOpenCL.so.1 ${CL_ROOT}/libOpenCL.so + fi +} + +pkg_preinst() { + # Clean the dynamic libGL stuff's home to ensure + # we dont have stale libs floating around + if [ -d "${ROOT}"/usr/lib/opengl/nvidia ] ; then + rm -rf "${ROOT}"/usr/lib/opengl/nvidia/* + fi + # Make sure we nuke the old nvidia-glx's env.d file + if [ -e "${ROOT}"/etc/env.d/09nvidia ] ; then + rm -f "${ROOT}"/etc/env.d/09nvidia + fi +} + +pkg_postinst() { + # Switch to the nvidia implementation + "${ROOT}"/usr/bin/eselect opengl set --use-old nvidia + "${ROOT}"/usr/bin/eselect opencl set --use-old nvidia + + elog "To use the NVIDIA GLX, run \"eselect opengl set nvidia\"" + elog + elog "To use the NVIDIA CUDA/OpenCL, run \"eselect opencl set nvidia\"" + elog + elog "NVIDIA has requested that any bug reports submitted have the" + elog "output of /opt/bin/nvidia-bug-report.sh included." + elog + elog "To work with compiz, you must enable the AddARGBGLXVisuals option." + elog + elog "If you are having resolution problems, try disabling DynamicTwinView." + elog +} + +pkg_postrm() { + "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 +} diff --git a/x11-drivers/nvidia-userspace/nvidia-userspace-295.40.ebuild b/x11-drivers/nvidia-userspace/nvidia-userspace-295.40.ebuild new file mode 100644 index 00000000..72cf90fd --- /dev/null +++ b/x11-drivers/nvidia-userspace/nvidia-userspace-295.40.ebuild @@ -0,0 +1,456 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="2" + +inherit eutils unpacker multilib portability versionator flag-o-matic + +X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}" +AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}" +X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}" + +DESCRIPTION="NVIDIA X11 userspace libraries and applications" +HOMEPAGE="http://www.nvidia.com/" +SRC_URI="x86? ( http://us.download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}.run ) + amd64? ( http://us.download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run ) + x86-fbsd? ( http://us.download.nvidia.com/XFree86/FreeBSD-x86/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )" + +LICENSE="NVIDIA" +SLOT="0" +KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd" +IUSE="acpi multilib kernel_linux" +RESTRICT="strip" +EMULTILIB_PKG="true" + +COMMON="<x11-base/xorg-server-1.12.99 + kernel_linux? ( >=sys-libs/glibc-2.6.1 ) + multilib? ( app-emulation/emul-linux-x86-xlibs ) + >=app-admin/eselect-opengl-1.0.9 + app-admin/eselect-opencl + !<media-video/nvidia-settings-256.52" +DEPEND="${COMMON}" +RDEPEND="${COMMON} + x11-libs/libXvMC + !<x11-drivers/nvidia-userspace-${PV} + !>x11-drivers/nvidia-userspace-${PV} + acpi? ( sys-power/acpid )" +PDEPEND=">=x11-libs/libvdpau-0.3-r1" + +QA_TEXTRELS_x86=" + usr/lib/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0 + usr/lib/libXvMCNVIDIA.so.${PV} + usr/lib/libcuda.so.${PV} + usr/lib/libnvcuvid.so.${PV} + usr/lib/libnvidia-cfg.so.${PV} + usr/lib/libnvidia-compiler.so.${PV} + usr/lib/libnvidia-glcore.so.${PV} + usr/lib/libnvidia-ml.so.${PV} + usr/lib/libvdpau_nvidia.so.${PV} + usr/lib/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib/opengl/nvidia/lib/libGL.so.${PV} + usr/lib/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib/xorg/modules/drivers/nvidia_drv.so" + +QA_TEXTRELS_x86_fbsd="boot/modules/nvidia.ko + usr/lib/opengl/nvidia/lib/libGL.so.1 + usr/lib/libnvidia-glcore.so.1 + usr/lib/libnvidia-cfg.so.1 + usr/lib/libnvidia-ml.so.1 + usr/lib/opengl/nvidia/extensions/libglx.so.1 + usr/lib/xorg/modules/drivers/nvidia_drv.so" + +QA_TEXTRELS_amd64="usr/lib32/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib32/libnvidia-glcore.so.${PV} + usr/lib32/libvdpau_nvidia.so.${PV} + usr/lib32/opengl/nvidia/lib/libGL.so.${PV} + usr/lib32/libcuda.so.${PV} + usr/lib32/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0 + usr/lib32/libnvidia-compiler.so.${PV}" + +QA_EXECSTACK_x86="usr/lib/opengl/nvidia/lib/libGL.so.${PV} + usr/lib/libnvidia-glcore.so.${PV} + usr/lib/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib64/libXvMCNVIDIA.so.${PV} + usr/lib/libXvMCNVIDIA.a:NVXVMC.o + usr/lib/libvdpau_nvidia.so.${PV} + usr/lib/libnvidia-compiler.so.${PV} + usr/lib/libcuda.so.${PV} + usr/lib/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0" + +QA_EXECSTACK_amd64="usr/lib32/libnvidia-glcore.so.${PV} + usr/lib32/opengl/nvidia/lib/libGL.so.${PV} + usr/lib32/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib32/libvdpau_nvidia.so.${PV} + usr/lib32/libcuda.so.${PV} + usr/lib32/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0 + usr/lib32/libnvidia-compiler.so.${PV} + usr/lib64/libXvMCNVIDIA.a:NVXVMC.o + usr/lib64/libnvidia-cfg.so.${PV} + usr/lib64/libnvidia-ml.so.${PV} + usr/lib64/libvdpau_nvidia.so.${PV} + usr/lib64/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib64/opengl/nvidia/lib/libGL.so.${PV} + usr/lib64/libnvidia-glcore.so.${PV} + usr/lib64/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib64/libXvMCNVIDIA.so.${PV} + usr/lib64/libcuda.so.${PV} + usr/lib64/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0 + usr/lib64/libnvidia-compiler.so.${PV} + usr/lib64/xorg/modules/drivers/nvidia_drv.so + opt/bin/nvidia-smi + opt/bin/nvidia-xconfig + opt/bin/nvidia-debugdump + opt/bin/nvidia-settings" + +QA_WX_LOAD_x86="usr/lib/libnvidia-glcore.so.${PV} + usr/lib/opengl/nvidia/lib/libGL.so.${PV} + usr/lib/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib/libXvMCNVIDIA.a + usr/lib64/libXvMCNVIDIA.so.${PV}" + +QA_WX_LOAD_amd64="usr/lib32/opengl/nvidia/lib/libGL.so.${PV} + usr/lib32/libnvidia-glcore.so.${PV} + usr/lib64/opengl/nvidia/lib/libGL.so.${PV} + usr/lib64/libnvidia-glcore.so.${PV} + usr/lib64/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib64/libXvMCNVIDIA.so.${PV}" + +QA_SONAME_x86="usr/lib/libnvidia-compiler.so.${PV}" + +QA_SONAME_amd64="usr/lib64/libnvidia-compiler.so.${PV} + usr/lib32/libnvidia-compiler.so.${PV}" + +QA_DT_HASH_amd64="usr/lib32/libcuda.so.${PV} + usr/lib32/opengl/nvidia/lib/libGL.so.${PV} + usr/lib32/libnvidia-glcore.so.${PV} + usr/lib32/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib32/libvdpau_nvidia.so.${PV} + usr/lib32/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0 + usr/lib32/libnvidia-compiler.so.${PV} + usr/lib64/libXvMCNVIDIA.so.${PV} + usr/lib64/libcuda.so.${PV} + usr/lib64/libnvidia-cfg.so.${PV} + usr/lib64/libnvidia-glcore.so.${PV} + usr/lib64/libnvidia-ml.so.${PV} + usr/lib64/opengl/nvidia/lib/libGL.so.${PV} + usr/lib64/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib64/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib64/xorg/modules/drivers/nvidia_drv.so + usr/lib64/libvdpau_nvidia.so.${PV} + usr/lib64/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0 + usr/lib64/libnvidia-compiler.so.${PV} + usr/lib64/libnvcuvid.so.${PV} + opt/bin/nvidia-smi + opt/bin/nvidia-xconfig + opt/bin/nvidia-debugdump + opt/bin/nvidia-settings" + +QA_DT_HASH_x86="usr/lib/libcuda.so.${PV} + usr/lib/libnvidia-cfg.so.${PV} + usr/lib/libnvidia-glcore.so.${PV} + usr/lib/libnvidia-ml.so.${PV} + usr/lib/opengl/nvidia/lib/libGL.so.${PV} + usr/lib/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib/xorg/modules/drivers/nvidia_drv.so + usr/lib/libXvMCNVIDIA.so.${PV} + usr/lib/libvdpau_nvidia.so.${PV} + usr/lib/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0 + usr/lib/libnvidia-compiler.so.${PV} + usr/lib/libnvcuvid.so.${PV} + opt/bin/nvidia-smi + opt/bin/nvidia-xconfig + opt/bin/nvidia-debugdump + opt/bin/nvidia-settings" + + +S="${WORKDIR}/" + +pkg_setup() { + # try to turn off distcc and ccache for people that have a problem with it + export DISTCC_DISABLE=1 + export CCACHE_DISABLE=1 + + if use amd64 && has_multilib_profile && [ "${DEFAULT_ABI}" != "amd64" ]; then + eerror "This ebuild doesn't currently support changing your default abi." + die "Unexpected \${DEFAULT_ABI} = ${DEFAULT_ABI}" + fi + + # On BSD userland it wants real make command + use userland_BSD && MAKE="$(get_bmake)" + + export _POSIX2_VERSION="199209" + + # set variables to where files are in the package structure + if use kernel_FreeBSD; then + NV_DOC="${S}/doc" + NV_EXEC="${S}/obj" + NV_LIB="${S}/obj" + NV_SRC="${S}/src" + NV_MAN="${S}/x11/man" + NV_X11="${S}/obj" + NV_X11_DRV="${NV_X11}" + NV_X11_EXT="${NV_X11}" + NV_SOVER=1 + elif use kernel_linux; then + NV_DOC="${S}" + NV_EXEC="${S}" + NV_LIB="${S}" + NV_SRC="${S}/kernel" + NV_MAN="${S}" + NV_X11="${S}" + NV_X11_DRV="${NV_X11}" + NV_X11_EXT="${NV_X11}" + NV_SOVER=${PV} + else + die "Could not determine proper NVIDIA package" + fi +} + +src_unpack() { + if ! use x86-fbsd; then + cd "${S}" + unpack_makeself + else + unpack ${A} + fi +} + +src_prepare() { + # Please add a brief description for every added patch + use x86-fbsd && cd doc + cat <<- EOF > "${S}"/nvidia.icd + /usr/$(get_libdir)/libcuda.so + EOF +} + +src_compile() { + # This is already the default on Linux, as there's no toplevel Makefile, but + # on FreeBSD there's one and triggers the kernel module build, as we install + # it by itself, pass this. + + cd "${NV_SRC}" + if use x86-fbsd; then + MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \ + LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die + fi +} + +src_install() { + if use kernel_linux; then + VIDEOGROUP="$(egetent group video | cut -d ':' -f 3)" + if [ -z "$VIDEOGROUP" ]; then + eerror "Failed to determine the video group gid." + die "Failed to determine the video group gid." + fi + + # Add the aliases + [ -f "${FILESDIR}/nvidia-169.07" ] || die "nvidia missing in FILESDIR" + sed -e 's:PACKAGE:'${PF}':g' \ + -e 's:VIDEOGID:'${VIDEOGROUP}':' "${FILESDIR}"/nvidia-169.07 > \ + "${WORKDIR}"/nvidia + insinto /etc/modprobe.d + newins "${WORKDIR}"/nvidia nvidia.conf || die + + # Ensures that our device nodes are created when not using X + exeinto /lib/udev + doexe "${FILESDIR}"/nvidia-udev.sh + + insinto /lib/udev/rules.d + newins "${FILESDIR}"/nvidia.udev-rule 99-nvidia.rules + fi + + # NVIDIA kernel <-> userspace driver config lib + dolib.so ${NV_LIB}/libnvidia-cfg.so.${NV_SOVER} || \ + die "failed to install libnvidia-cfg" + dosym libnvidia-cfg.so.${NV_SOVER} \ + /usr/$(get_libdir)/libnvidia-cfg.so.1 || \ + die "failed to create libnvidia-cfg.so symlink" + dosym libnvidia-cfg.so.1 \ + /usr/$(get_libdir)/libnvidia-cfg.so || \ + die "failed to create libnvidia-cfg.so symlink" + + # NVIDIA monitoring library + dolib.so ${NV_LIB}/libnvidia-ml.so.${NV_SOVER} || \ + die "failed to install libnvidia-ml" + dosym libnvidia-ml.so.${NV_SOVER} \ + /usr/$(get_libdir)/libnvidia-ml.so.1 || \ + die "failed to create libnvidia-ml.so symlink" + dosym libnvidia-ml.so.1 \ + /usr/$(get_libdir)/libnvidia-ml.so || \ + die "failed to create libnvidia-ml.so symlink" + + # NVIDIA video decode <-> CUDA + dolib.so ${NV_LIB}/libnvcuvid.so.${NV_SOVER} || \ + die "failed to install libnvcuvid.so" + dosym libnvcuvid.so.${NV_SOVER} \ + /usr/$(get_libdir)/libnvcuvid.so.1 || \ + die "failed to create libnvcuvid.so symlink" + dosym libnvcuvid.so.1 \ + /usr/$(get_libdir)/libnvcuvid.so || \ + die "failed to create libnvcuvid.so symlink" + + # Xorg DDX driver + insinto /usr/$(get_libdir)/xorg/modules/drivers + doins ${NV_X11_DRV}/nvidia_drv.so || die "failed to install nvidia_drv.so" + + # Xorg GLX driver + insinto /usr/$(get_libdir)/opengl/nvidia/extensions + doins ${NV_X11_EXT}/libglx.so.${NV_SOVER} || \ + die "failed to install libglx.so" + dosym libglx.so.${NV_SOVER} \ + /usr/$(get_libdir)/opengl/nvidia/extensions/libglx.so || \ + die "failed to create libglx.so symlink" + + # XvMC driver + dolib.a ${NV_X11}/libXvMCNVIDIA.a || \ + die "failed to install libXvMCNVIDIA.so" + dolib.so ${NV_X11}/libXvMCNVIDIA.so.${NV_SOVER} || \ + die "failed to install libXvMCNVIDIA.so" + dosym libXvMCNVIDIA.so.${NV_SOVER} \ + /usr/$(get_libdir)/libXvMCNVIDIA.so.1 || \ + die "failed to create libXvMCNVIDIA.so symlink" + dosym libXvMCNVIDIA.so.1 /usr/$(get_libdir)/libXvMCNVIDIA.so || \ + die "failed to create libXvMCNVIDIA.so symlink" + dosym libXvMCNVIDIA.so.${NV_SOVER} \ + /usr/$(get_libdir)/libXvMCNVIDIA_dynamic.so.1 || \ + die "failed to create libXvMCNVIDIA_dynamic.so symlink" + + # OpenCL ICD for NVIDIA + if use kernel_linux; then + insinto /etc/OpenCL/vendors + doins nvidia.icd + fi + + # Documentation + dohtml ${NV_DOC}/html/* + if use x86-fbsd; then + dodoc "${NV_DOC}/README" + doman "${NV_MAN}/nvidia-xconfig.1" + else + # Docs + newdoc "${NV_DOC}/README.txt" README + dodoc "${NV_DOC}/NVIDIA_Changelog" + doman "${NV_MAN}/nvidia-smi.1.gz" + doman "${NV_MAN}/nvidia-xconfig.1.gz" + fi + + # Helper Apps + exeinto /opt/bin/ + doexe ${NV_EXEC}/nvidia-xconfig || die + doexe ${NV_EXEC}/nvidia-debugdump || die + if use gtk; then + doexe ${NV_EXEC}/nvidia-settings || die + fi + doexe ${NV_EXEC}/nvidia-bug-report.sh || die + if use kernel_linux; then + doexe ${NV_EXEC}/nvidia-smi || die + fi + + 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 + + is_final_abi || die "failed to iterate through all ABIs" + + # GNOME3 gnome-terminal redraw bug workaround, + # see: https://bugzilla.gnome.org/show_bug.cgi?id=664858 + doenvd "${FILESDIR}/90mutter-disable-culling" +} + +# Install nvidia library: +# the first parameter is the place where to install it +# the second parameter is the base name of the library +# the third parameter is the provided soversion +donvidia() { + dodir $1 + exeinto $1 + + libname=$(basename $2) + + doexe $2.$3 || die "failed to install $2" + dosym ${libname}.$3 $1/${libname} || die "failed to symlink $2" + [[ $3 != "1" ]] && dosym ${libname}.$3 $1/${libname}.1 +} + +src_install-libs() { + local inslibdir=$(get_libdir) + local NV_ROOT="/usr/${inslibdir}/opengl/nvidia" + local CL_ROOT=/usr/${inslibdir}/OpenCL/vendors/nvidia + local libdir= sover= + + if use kernel_linux; then + if has_multilib_profile && [[ ${ABI} == "x86" ]] ; then + libdir=32 + else + libdir=. + fi + sover=${PV} + else + libdir=obj + # on FreeBSD it has just .1 suffix + sover=1 + fi + + # The GLX libraries + donvidia ${NV_ROOT}/lib ${libdir}/libGL.so ${sover} + donvidia /usr/${inslibdir} ${libdir}/libnvidia-glcore.so ${sover} + if use x86-fbsd; then + donvidia ${NV_ROOT}/lib ${libdir}/libnvidia-tls.so ${sover} + else + donvidia ${NV_ROOT}/lib ${libdir}/tls/libnvidia-tls.so ${sover} + fi + + # VDPAU + donvidia /usr/${inslibdir} ${libdir}/libvdpau_nvidia.so ${sover} + + # CUDA & OpenCL + if use kernel_linux; then + donvidia /usr/${inslibdir} ${libdir}/libcuda.so ${sover} + donvidia /usr/${inslibdir} ${libdir}/libnvidia-compiler.so ${sover} + donvidia ${CL_ROOT} ${libdir}/libOpenCL.so 1.0.0 + #dosym libOpenCL.so.1 ${CL_ROOT}/libOpenCL.so + fi +} + +pkg_preinst() { + # Clean the dynamic libGL stuff's home to ensure + # we dont have stale libs floating around + if [ -d "${ROOT}"/usr/lib/opengl/nvidia ] ; then + rm -rf "${ROOT}"/usr/lib/opengl/nvidia/* + fi + # Make sure we nuke the old nvidia-glx's env.d file + if [ -e "${ROOT}"/etc/env.d/09nvidia ] ; then + rm -f "${ROOT}"/etc/env.d/09nvidia + fi +} + +pkg_postinst() { + # Switch to the nvidia implementation + "${ROOT}"/usr/bin/eselect opengl set --use-old nvidia + "${ROOT}"/usr/bin/eselect opencl set --use-old nvidia + + elog "To use the NVIDIA GLX, run \"eselect opengl set nvidia\"" + elog + elog "To use the NVIDIA CUDA/OpenCL, run \"eselect opencl set nvidia\"" + elog + elog "NVIDIA has requested that any bug reports submitted have the" + elog "output of /opt/bin/nvidia-bug-report.sh included." + elog + elog "To work with compiz, you must enable the AddARGBGLXVisuals option." + elog + elog "If you are having resolution problems, try disabling DynamicTwinView." + elog +} + +pkg_postrm() { + "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 +} diff --git a/x11-drivers/nvidia-userspace/nvidia-userspace-295.49.ebuild b/x11-drivers/nvidia-userspace/nvidia-userspace-295.49.ebuild new file mode 100644 index 00000000..df7bcaea --- /dev/null +++ b/x11-drivers/nvidia-userspace/nvidia-userspace-295.49.ebuild @@ -0,0 +1,453 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="2" + +inherit eutils unpacker multilib portability versionator flag-o-matic + +X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}" +AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}" +X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}" + +DESCRIPTION="NVIDIA X11 userspace libraries and applications" +HOMEPAGE="http://www.nvidia.com/" +SRC_URI="x86? ( http://us.download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}.run ) + amd64? ( http://us.download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run ) + x86-fbsd? ( http://us.download.nvidia.com/XFree86/FreeBSD-x86/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )" + +LICENSE="NVIDIA" +SLOT="0" +KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd" +IUSE="acpi multilib kernel_linux" +RESTRICT="strip" +EMULTILIB_PKG="true" + +COMMON="<x11-base/xorg-server-1.12.99 + kernel_linux? ( >=sys-libs/glibc-2.6.1 ) + multilib? ( app-emulation/emul-linux-x86-xlibs ) + >=app-admin/eselect-opengl-1.0.9 + app-admin/eselect-opencl + !<media-video/nvidia-settings-256.52" +DEPEND="${COMMON}" +RDEPEND="${COMMON} + x11-libs/libXvMC + !<x11-drivers/nvidia-userspace-${PV} + !>x11-drivers/nvidia-userspace-${PV} + acpi? ( sys-power/acpid )" +PDEPEND=">=x11-libs/libvdpau-0.3-r1" + +QA_TEXTRELS_x86=" + usr/lib/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0 + usr/lib/libXvMCNVIDIA.so.${PV} + usr/lib/libcuda.so.${PV} + usr/lib/libnvcuvid.so.${PV} + usr/lib/libnvidia-cfg.so.${PV} + usr/lib/libnvidia-compiler.so.${PV} + usr/lib/libnvidia-glcore.so.${PV} + usr/lib/libnvidia-ml.so.${PV} + usr/lib/libvdpau_nvidia.so.${PV} + usr/lib/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib/opengl/nvidia/lib/libGL.so.${PV} + usr/lib/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib/xorg/modules/drivers/nvidia_drv.so" + +QA_TEXTRELS_x86_fbsd="boot/modules/nvidia.ko + usr/lib/opengl/nvidia/lib/libGL.so.1 + usr/lib/libnvidia-glcore.so.1 + usr/lib/libnvidia-cfg.so.1 + usr/lib/libnvidia-ml.so.1 + usr/lib/opengl/nvidia/extensions/libglx.so.1 + usr/lib/xorg/modules/drivers/nvidia_drv.so" + +QA_TEXTRELS_amd64="usr/lib32/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib32/libnvidia-glcore.so.${PV} + usr/lib32/libvdpau_nvidia.so.${PV} + usr/lib32/opengl/nvidia/lib/libGL.so.${PV} + usr/lib32/libcuda.so.${PV} + usr/lib32/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0 + usr/lib32/libnvidia-compiler.so.${PV}" + +QA_EXECSTACK_x86="usr/lib/opengl/nvidia/lib/libGL.so.${PV} + usr/lib/libnvidia-glcore.so.${PV} + usr/lib/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib64/libXvMCNVIDIA.so.${PV} + usr/lib/libXvMCNVIDIA.a:NVXVMC.o + usr/lib/libvdpau_nvidia.so.${PV} + usr/lib/libnvidia-compiler.so.${PV} + usr/lib/libcuda.so.${PV} + usr/lib/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0" + +QA_EXECSTACK_amd64="usr/lib32/libnvidia-glcore.so.${PV} + usr/lib32/opengl/nvidia/lib/libGL.so.${PV} + usr/lib32/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib32/libvdpau_nvidia.so.${PV} + usr/lib32/libcuda.so.${PV} + usr/lib32/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0 + usr/lib32/libnvidia-compiler.so.${PV} + usr/lib64/libXvMCNVIDIA.a:NVXVMC.o + usr/lib64/libnvidia-cfg.so.${PV} + usr/lib64/libnvidia-ml.so.${PV} + usr/lib64/libvdpau_nvidia.so.${PV} + usr/lib64/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib64/opengl/nvidia/lib/libGL.so.${PV} + usr/lib64/libnvidia-glcore.so.${PV} + usr/lib64/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib64/libXvMCNVIDIA.so.${PV} + usr/lib64/libcuda.so.${PV} + usr/lib64/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0 + usr/lib64/libnvidia-compiler.so.${PV} + usr/lib64/xorg/modules/drivers/nvidia_drv.so + opt/bin/nvidia-smi + opt/bin/nvidia-xconfig + opt/bin/nvidia-debugdump + opt/bin/nvidia-settings" + +QA_WX_LOAD_x86="usr/lib/libnvidia-glcore.so.${PV} + usr/lib/opengl/nvidia/lib/libGL.so.${PV} + usr/lib/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib/libXvMCNVIDIA.a + usr/lib64/libXvMCNVIDIA.so.${PV}" + +QA_WX_LOAD_amd64="usr/lib32/opengl/nvidia/lib/libGL.so.${PV} + usr/lib32/libnvidia-glcore.so.${PV} + usr/lib64/opengl/nvidia/lib/libGL.so.${PV} + usr/lib64/libnvidia-glcore.so.${PV} + usr/lib64/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib64/libXvMCNVIDIA.so.${PV}" + +QA_SONAME_x86="usr/lib/libnvidia-compiler.so.${PV}" + +QA_SONAME_amd64="usr/lib64/libnvidia-compiler.so.${PV} + usr/lib32/libnvidia-compiler.so.${PV}" + +QA_DT_HASH_amd64="usr/lib32/libcuda.so.${PV} + usr/lib32/opengl/nvidia/lib/libGL.so.${PV} + usr/lib32/libnvidia-glcore.so.${PV} + usr/lib32/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib32/libvdpau_nvidia.so.${PV} + usr/lib32/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0 + usr/lib32/libnvidia-compiler.so.${PV} + usr/lib64/libXvMCNVIDIA.so.${PV} + usr/lib64/libcuda.so.${PV} + usr/lib64/libnvidia-cfg.so.${PV} + usr/lib64/libnvidia-glcore.so.${PV} + usr/lib64/libnvidia-ml.so.${PV} + usr/lib64/opengl/nvidia/lib/libGL.so.${PV} + usr/lib64/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib64/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib64/xorg/modules/drivers/nvidia_drv.so + usr/lib64/libvdpau_nvidia.so.${PV} + usr/lib64/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0 + usr/lib64/libnvidia-compiler.so.${PV} + usr/lib64/libnvcuvid.so.${PV} + opt/bin/nvidia-smi + opt/bin/nvidia-xconfig + opt/bin/nvidia-debugdump + opt/bin/nvidia-settings" + +QA_DT_HASH_x86="usr/lib/libcuda.so.${PV} + usr/lib/libnvidia-cfg.so.${PV} + usr/lib/libnvidia-glcore.so.${PV} + usr/lib/libnvidia-ml.so.${PV} + usr/lib/opengl/nvidia/lib/libGL.so.${PV} + usr/lib/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib/xorg/modules/drivers/nvidia_drv.so + usr/lib/libXvMCNVIDIA.so.${PV} + usr/lib/libvdpau_nvidia.so.${PV} + usr/lib/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0 + usr/lib/libnvidia-compiler.so.${PV} + usr/lib/libnvcuvid.so.${PV} + opt/bin/nvidia-smi + opt/bin/nvidia-xconfig + opt/bin/nvidia-debugdump + opt/bin/nvidia-settings" + + +S="${WORKDIR}/" + +pkg_setup() { + # try to turn off distcc and ccache for people that have a problem with it + export DISTCC_DISABLE=1 + export CCACHE_DISABLE=1 + + if use amd64 && has_multilib_profile && [ "${DEFAULT_ABI}" != "amd64" ]; then + eerror "This ebuild doesn't currently support changing your default abi." + die "Unexpected \${DEFAULT_ABI} = ${DEFAULT_ABI}" + fi + + # On BSD userland it wants real make command + use userland_BSD && MAKE="$(get_bmake)" + + export _POSIX2_VERSION="199209" + + # set variables to where files are in the package structure + if use kernel_FreeBSD; then + NV_DOC="${S}/doc" + NV_EXEC="${S}/obj" + NV_LIB="${S}/obj" + NV_SRC="${S}/src" + NV_MAN="${S}/x11/man" + NV_X11="${S}/obj" + NV_X11_DRV="${NV_X11}" + NV_X11_EXT="${NV_X11}" + NV_SOVER=1 + elif use kernel_linux; then + NV_DOC="${S}" + NV_EXEC="${S}" + NV_LIB="${S}" + NV_SRC="${S}/kernel" + NV_MAN="${S}" + NV_X11="${S}" + NV_X11_DRV="${NV_X11}" + NV_X11_EXT="${NV_X11}" + NV_SOVER=${PV} + else + die "Could not determine proper NVIDIA package" + fi +} + +src_unpack() { + if ! use x86-fbsd; then + cd "${S}" + unpack_makeself + else + unpack ${A} + fi +} + +src_prepare() { + # Please add a brief description for every added patch + use x86-fbsd && cd doc + cat <<- EOF > "${S}"/nvidia.icd + /usr/$(get_libdir)/libcuda.so + EOF +} + +src_compile() { + # This is already the default on Linux, as there's no toplevel Makefile, but + # on FreeBSD there's one and triggers the kernel module build, as we install + # it by itself, pass this. + + cd "${NV_SRC}" + if use x86-fbsd; then + MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \ + LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die + fi +} + +src_install() { + if use kernel_linux; then + VIDEOGROUP="$(egetent group video | cut -d ':' -f 3)" + if [ -z "$VIDEOGROUP" ]; then + eerror "Failed to determine the video group gid." + die "Failed to determine the video group gid." + fi + + # Add the aliases + [ -f "${FILESDIR}/nvidia-169.07" ] || die "nvidia missing in FILESDIR" + sed -e 's:PACKAGE:'${PF}':g' \ + -e 's:VIDEOGID:'${VIDEOGROUP}':' "${FILESDIR}"/nvidia-169.07 > \ + "${WORKDIR}"/nvidia + insinto /etc/modprobe.d + newins "${WORKDIR}"/nvidia nvidia.conf || die + + # Ensures that our device nodes are created when not using X + exeinto /lib/udev + doexe "${FILESDIR}"/nvidia-udev.sh + + insinto /lib/udev/rules.d + newins "${FILESDIR}"/nvidia.udev-rule 99-nvidia.rules + fi + + # NVIDIA kernel <-> userspace driver config lib + dolib.so ${NV_LIB}/libnvidia-cfg.so.${NV_SOVER} || \ + die "failed to install libnvidia-cfg" + dosym libnvidia-cfg.so.${NV_SOVER} \ + /usr/$(get_libdir)/libnvidia-cfg.so.1 || \ + die "failed to create libnvidia-cfg.so symlink" + dosym libnvidia-cfg.so.1 \ + /usr/$(get_libdir)/libnvidia-cfg.so || \ + die "failed to create libnvidia-cfg.so symlink" + + # NVIDIA monitoring library + dolib.so ${NV_LIB}/libnvidia-ml.so.${NV_SOVER} || \ + die "failed to install libnvidia-ml" + dosym libnvidia-ml.so.${NV_SOVER} \ + /usr/$(get_libdir)/libnvidia-ml.so.1 || \ + die "failed to create libnvidia-ml.so symlink" + dosym libnvidia-ml.so.1 \ + /usr/$(get_libdir)/libnvidia-ml.so || \ + die "failed to create libnvidia-ml.so symlink" + + # NVIDIA video decode <-> CUDA + dolib.so ${NV_LIB}/libnvcuvid.so.${NV_SOVER} || \ + die "failed to install libnvcuvid.so" + dosym libnvcuvid.so.${NV_SOVER} \ + /usr/$(get_libdir)/libnvcuvid.so.1 || \ + die "failed to create libnvcuvid.so symlink" + dosym libnvcuvid.so.1 \ + /usr/$(get_libdir)/libnvcuvid.so || \ + die "failed to create libnvcuvid.so symlink" + + # Xorg DDX driver + insinto /usr/$(get_libdir)/xorg/modules/drivers + doins ${NV_X11_DRV}/nvidia_drv.so || die "failed to install nvidia_drv.so" + + # Xorg GLX driver + insinto /usr/$(get_libdir)/opengl/nvidia/extensions + doins ${NV_X11_EXT}/libglx.so.${NV_SOVER} || \ + die "failed to install libglx.so" + dosym libglx.so.${NV_SOVER} \ + /usr/$(get_libdir)/opengl/nvidia/extensions/libglx.so || \ + die "failed to create libglx.so symlink" + + # XvMC driver + dolib.a ${NV_X11}/libXvMCNVIDIA.a || \ + die "failed to install libXvMCNVIDIA.so" + dolib.so ${NV_X11}/libXvMCNVIDIA.so.${NV_SOVER} || \ + die "failed to install libXvMCNVIDIA.so" + dosym libXvMCNVIDIA.so.${NV_SOVER} \ + /usr/$(get_libdir)/libXvMCNVIDIA.so.1 || \ + die "failed to create libXvMCNVIDIA.so symlink" + dosym libXvMCNVIDIA.so.1 /usr/$(get_libdir)/libXvMCNVIDIA.so || \ + die "failed to create libXvMCNVIDIA.so symlink" + dosym libXvMCNVIDIA.so.${NV_SOVER} \ + /usr/$(get_libdir)/libXvMCNVIDIA_dynamic.so.1 || \ + die "failed to create libXvMCNVIDIA_dynamic.so symlink" + + # OpenCL ICD for NVIDIA + if use kernel_linux; then + insinto /etc/OpenCL/vendors + doins nvidia.icd + fi + + # Documentation + dohtml ${NV_DOC}/html/* + if use x86-fbsd; then + dodoc "${NV_DOC}/README" + doman "${NV_MAN}/nvidia-xconfig.1" + else + # Docs + newdoc "${NV_DOC}/README.txt" README + dodoc "${NV_DOC}/NVIDIA_Changelog" + doman "${NV_MAN}/nvidia-smi.1.gz" + doman "${NV_MAN}/nvidia-xconfig.1.gz" + fi + + # Helper Apps + exeinto /opt/bin/ + doexe ${NV_EXEC}/nvidia-xconfig || die + doexe ${NV_EXEC}/nvidia-debugdump || die + doexe ${NV_EXEC}/nvidia-bug-report.sh || die + if use kernel_linux; then + doexe ${NV_EXEC}/nvidia-smi || die + fi + + 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 + + is_final_abi || die "failed to iterate through all ABIs" + + # GNOME3 gnome-terminal redraw bug workaround, + # see: https://bugzilla.gnome.org/show_bug.cgi?id=664858 + doenvd "${FILESDIR}/90mutter-disable-culling" +} + +# Install nvidia library: +# the first parameter is the place where to install it +# the second parameter is the base name of the library +# the third parameter is the provided soversion +donvidia() { + dodir $1 + exeinto $1 + + libname=$(basename $2) + + doexe $2.$3 || die "failed to install $2" + dosym ${libname}.$3 $1/${libname} || die "failed to symlink $2" + [[ $3 != "1" ]] && dosym ${libname}.$3 $1/${libname}.1 +} + +src_install-libs() { + local inslibdir=$(get_libdir) + local NV_ROOT="/usr/${inslibdir}/opengl/nvidia" + local CL_ROOT=/usr/${inslibdir}/OpenCL/vendors/nvidia + local libdir= sover= + + if use kernel_linux; then + if has_multilib_profile && [[ ${ABI} == "x86" ]] ; then + libdir=32 + else + libdir=. + fi + sover=${PV} + else + libdir=obj + # on FreeBSD it has just .1 suffix + sover=1 + fi + + # The GLX libraries + donvidia ${NV_ROOT}/lib ${libdir}/libGL.so ${sover} + donvidia /usr/${inslibdir} ${libdir}/libnvidia-glcore.so ${sover} + if use x86-fbsd; then + donvidia ${NV_ROOT}/lib ${libdir}/libnvidia-tls.so ${sover} + else + donvidia ${NV_ROOT}/lib ${libdir}/tls/libnvidia-tls.so ${sover} + fi + + # VDPAU + donvidia /usr/${inslibdir} ${libdir}/libvdpau_nvidia.so ${sover} + + # CUDA & OpenCL + if use kernel_linux; then + donvidia /usr/${inslibdir} ${libdir}/libcuda.so ${sover} + donvidia /usr/${inslibdir} ${libdir}/libnvidia-compiler.so ${sover} + donvidia ${CL_ROOT} ${libdir}/libOpenCL.so 1.0.0 + #dosym libOpenCL.so.1 ${CL_ROOT}/libOpenCL.so + fi +} + +pkg_preinst() { + # Clean the dynamic libGL stuff's home to ensure + # we dont have stale libs floating around + if [ -d "${ROOT}"/usr/lib/opengl/nvidia ] ; then + rm -rf "${ROOT}"/usr/lib/opengl/nvidia/* + fi + # Make sure we nuke the old nvidia-glx's env.d file + if [ -e "${ROOT}"/etc/env.d/09nvidia ] ; then + rm -f "${ROOT}"/etc/env.d/09nvidia + fi +} + +pkg_postinst() { + # Switch to the nvidia implementation + "${ROOT}"/usr/bin/eselect opengl set --use-old nvidia + "${ROOT}"/usr/bin/eselect opencl set --use-old nvidia + + elog "To use the NVIDIA GLX, run \"eselect opengl set nvidia\"" + elog + elog "To use the NVIDIA CUDA/OpenCL, run \"eselect opencl set nvidia\"" + elog + elog "NVIDIA has requested that any bug reports submitted have the" + elog "output of /opt/bin/nvidia-bug-report.sh included." + elog + elog "To work with compiz, you must enable the AddARGBGLXVisuals option." + elog + elog "If you are having resolution problems, try disabling DynamicTwinView." + elog +} + +pkg_postrm() { + "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 +} diff --git a/x11-drivers/nvidia-userspace/nvidia-userspace-295.53.ebuild b/x11-drivers/nvidia-userspace/nvidia-userspace-295.53.ebuild new file mode 100644 index 00000000..301d8462 --- /dev/null +++ b/x11-drivers/nvidia-userspace/nvidia-userspace-295.53.ebuild @@ -0,0 +1,453 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="2" + +inherit eutils unpacker multilib portability versionator flag-o-matic + +X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}" +AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}" +X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}" + +DESCRIPTION="NVIDIA X11 userspace libraries and applications" +HOMEPAGE="http://www.nvidia.com/" +SRC_URI="x86? ( http://us.download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}.run ) + amd64? ( http://us.download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run ) + x86-fbsd? ( http://us.download.nvidia.com/XFree86/FreeBSD-x86/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )" + +LICENSE="NVIDIA" +SLOT="0" +KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd" +IUSE="acpi multilib kernel_linux" +RESTRICT="strip" +EMULTILIB_PKG="true" + +COMMON="<x11-base/xorg-server-1.12.99 + kernel_linux? ( >=sys-libs/glibc-2.6.1 ) + multilib? ( app-emulation/emul-linux-x86-xlibs ) + >=app-admin/eselect-opengl-1.0.9 + app-admin/eselect-opencl + !<media-video/nvidia-settings-256.52" +DEPEND="${COMMON}" +RDEPEND="${COMMON} + x11-libs/libXvMC + !<x11-drivers/nvidia-userspace-${PV} + !>x11-drivers/nvidia-userspace-${PV} + acpi? ( sys-power/acpid )" +PDEPEND=">=x11-libs/libvdpau-0.3-r1" + +QA_TEXTRELS_x86=" + usr/lib/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0 + usr/lib/libXvMCNVIDIA.so.${PV} + usr/lib/libcuda.so.${PV} + usr/lib/libnvcuvid.so.${PV} + usr/lib/libnvidia-cfg.so.${PV} + usr/lib/libnvidia-compiler.so.${PV} + usr/lib/libnvidia-glcore.so.${PV} + usr/lib/libnvidia-ml.so.${PV} + usr/lib/libvdpau_nvidia.so.${PV} + usr/lib/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib/opengl/nvidia/lib/libGL.so.${PV} + usr/lib/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib/xorg/modules/drivers/nvidia_drv.so" + +QA_TEXTRELS_x86_fbsd="boot/modules/nvidia.ko + usr/lib/opengl/nvidia/lib/libGL.so.1 + usr/lib/libnvidia-glcore.so.1 + usr/lib/libvdpau_nvidia.so.1 + usr/lib/libnvidia-cfg.so.1 + usr/lib/opengl/nvidia/extensions/libglx.so.1 + usr/lib/xorg/modules/drivers/nvidia_drv.so" + +QA_TEXTRELS_amd64="usr/lib32/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib32/libnvidia-glcore.so.${PV} + usr/lib32/libvdpau_nvidia.so.${PV} + usr/lib32/opengl/nvidia/lib/libGL.so.${PV} + usr/lib32/libcuda.so.${PV} + usr/lib32/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0 + usr/lib32/libnvidia-compiler.so.${PV}" + +QA_EXECSTACK_x86="usr/lib/opengl/nvidia/lib/libGL.so.${PV} + usr/lib/libnvidia-glcore.so.${PV} + usr/lib/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib64/libXvMCNVIDIA.so.${PV} + usr/lib/libXvMCNVIDIA.a:NVXVMC.o + usr/lib/libvdpau_nvidia.so.${PV} + usr/lib/libnvidia-compiler.so.${PV} + usr/lib/libcuda.so.${PV} + usr/lib/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0" + +QA_EXECSTACK_amd64="usr/lib32/libnvidia-glcore.so.${PV} + usr/lib32/opengl/nvidia/lib/libGL.so.${PV} + usr/lib32/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib32/libvdpau_nvidia.so.${PV} + usr/lib32/libcuda.so.${PV} + usr/lib32/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0 + usr/lib32/libnvidia-compiler.so.${PV} + usr/lib64/libXvMCNVIDIA.a:NVXVMC.o + usr/lib64/libnvidia-cfg.so.${PV} + usr/lib64/libnvidia-ml.so.${PV} + usr/lib64/libvdpau_nvidia.so.${PV} + usr/lib64/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib64/opengl/nvidia/lib/libGL.so.${PV} + usr/lib64/libnvidia-glcore.so.${PV} + usr/lib64/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib64/libXvMCNVIDIA.so.${PV} + usr/lib64/libcuda.so.${PV} + usr/lib64/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0 + usr/lib64/libnvidia-compiler.so.${PV} + usr/lib64/xorg/modules/drivers/nvidia_drv.so + opt/bin/nvidia-smi + opt/bin/nvidia-xconfig + opt/bin/nvidia-debugdump + opt/bin/nvidia-settings" + +QA_WX_LOAD_x86="usr/lib/libnvidia-glcore.so.${PV} + usr/lib/opengl/nvidia/lib/libGL.so.${PV} + usr/lib/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib/libXvMCNVIDIA.a + usr/lib64/libXvMCNVIDIA.so.${PV}" + +QA_WX_LOAD_amd64="usr/lib32/opengl/nvidia/lib/libGL.so.${PV} + usr/lib32/libnvidia-glcore.so.${PV} + usr/lib64/opengl/nvidia/lib/libGL.so.${PV} + usr/lib64/libnvidia-glcore.so.${PV} + usr/lib64/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib64/libXvMCNVIDIA.so.${PV}" + +QA_SONAME_x86="usr/lib/libnvidia-compiler.so.${PV}" + +QA_SONAME_amd64="usr/lib64/libnvidia-compiler.so.${PV} + usr/lib32/libnvidia-compiler.so.${PV}" + +QA_DT_HASH_amd64="usr/lib32/libcuda.so.${PV} + usr/lib32/opengl/nvidia/lib/libGL.so.${PV} + usr/lib32/libnvidia-glcore.so.${PV} + usr/lib32/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib32/libvdpau_nvidia.so.${PV} + usr/lib32/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0 + usr/lib32/libnvidia-compiler.so.${PV} + usr/lib64/libXvMCNVIDIA.so.${PV} + usr/lib64/libcuda.so.${PV} + usr/lib64/libnvidia-cfg.so.${PV} + usr/lib64/libnvidia-glcore.so.${PV} + usr/lib64/libnvidia-ml.so.${PV} + usr/lib64/opengl/nvidia/lib/libGL.so.${PV} + usr/lib64/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib64/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib64/xorg/modules/drivers/nvidia_drv.so + usr/lib64/libvdpau_nvidia.so.${PV} + usr/lib64/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0 + usr/lib64/libnvidia-compiler.so.${PV} + usr/lib64/libnvcuvid.so.${PV} + opt/bin/nvidia-smi + opt/bin/nvidia-xconfig + opt/bin/nvidia-debugdump + opt/bin/nvidia-settings" + +QA_DT_HASH_x86="usr/lib/libcuda.so.${PV} + usr/lib/libnvidia-cfg.so.${PV} + usr/lib/libnvidia-glcore.so.${PV} + usr/lib/libnvidia-ml.so.${PV} + usr/lib/opengl/nvidia/lib/libGL.so.${PV} + usr/lib/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib/xorg/modules/drivers/nvidia_drv.so + usr/lib/libXvMCNVIDIA.so.${PV} + usr/lib/libvdpau_nvidia.so.${PV} + usr/lib/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0 + usr/lib/libnvidia-compiler.so.${PV} + usr/lib/libnvcuvid.so.${PV} + opt/bin/nvidia-smi + opt/bin/nvidia-xconfig + opt/bin/nvidia-debugdump + opt/bin/nvidia-settings" + + +S="${WORKDIR}/" + +pkg_setup() { + # try to turn off distcc and ccache for people that have a problem with it + export DISTCC_DISABLE=1 + export CCACHE_DISABLE=1 + + if use amd64 && has_multilib_profile && [ "${DEFAULT_ABI}" != "amd64" ]; then + eerror "This ebuild doesn't currently support changing your default abi." + die "Unexpected \${DEFAULT_ABI} = ${DEFAULT_ABI}" + fi + + # On BSD userland it wants real make command + use userland_BSD && MAKE="$(get_bmake)" + + export _POSIX2_VERSION="199209" + + # set variables to where files are in the package structure + if use kernel_FreeBSD; then + NV_DOC="${S}/doc" + NV_EXEC="${S}/obj" + NV_LIB="${S}/obj" + NV_SRC="${S}/src" + NV_MAN="${S}/x11/man" + NV_X11="${S}/obj" + NV_X11_DRV="${NV_X11}" + NV_X11_EXT="${NV_X11}" + NV_SOVER=1 + elif use kernel_linux; then + NV_DOC="${S}" + NV_EXEC="${S}" + NV_LIB="${S}" + NV_SRC="${S}/kernel" + NV_MAN="${S}" + NV_X11="${S}" + NV_X11_DRV="${NV_X11}" + NV_X11_EXT="${NV_X11}" + NV_SOVER=${PV} + else + die "Could not determine proper NVIDIA package" + fi +} + +src_unpack() { + if ! use x86-fbsd; then + cd "${S}" + unpack_makeself + else + unpack ${A} + fi +} + +src_prepare() { + # Please add a brief description for every added patch + use x86-fbsd && cd doc + cat <<- EOF > "${S}"/nvidia.icd + /usr/$(get_libdir)/libcuda.so + EOF +} + +src_compile() { + # This is already the default on Linux, as there's no toplevel Makefile, but + # on FreeBSD there's one and triggers the kernel module build, as we install + # it by itself, pass this. + + cd "${NV_SRC}" + if use x86-fbsd; then + MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \ + LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die + fi +} + +src_install() { + if use kernel_linux; then + VIDEOGROUP="$(egetent group video | cut -d ':' -f 3)" + if [ -z "$VIDEOGROUP" ]; then + eerror "Failed to determine the video group gid." + die "Failed to determine the video group gid." + fi + + # Add the aliases + [ -f "${FILESDIR}/nvidia-169.07" ] || die "nvidia missing in FILESDIR" + sed -e 's:PACKAGE:'${PF}':g' \ + -e 's:VIDEOGID:'${VIDEOGROUP}':' "${FILESDIR}"/nvidia-169.07 > \ + "${WORKDIR}"/nvidia + insinto /etc/modprobe.d + newins "${WORKDIR}"/nvidia nvidia.conf || die + + # Ensures that our device nodes are created when not using X + exeinto /lib/udev + doexe "${FILESDIR}"/nvidia-udev.sh + + insinto /lib/udev/rules.d + newins "${FILESDIR}"/nvidia.udev-rule 99-nvidia.rules + fi + + # NVIDIA kernel <-> userspace driver config lib + dolib.so ${NV_LIB}/libnvidia-cfg.so.${NV_SOVER} || \ + die "failed to install libnvidia-cfg" + dosym libnvidia-cfg.so.${NV_SOVER} \ + /usr/$(get_libdir)/libnvidia-cfg.so.1 || \ + die "failed to create libnvidia-cfg.so symlink" + dosym libnvidia-cfg.so.1 \ + /usr/$(get_libdir)/libnvidia-cfg.so || \ + die "failed to create libnvidia-cfg.so symlink" + + # NVIDIA monitoring library + dolib.so ${NV_LIB}/libnvidia-ml.so.${NV_SOVER} || \ + die "failed to install libnvidia-ml" + dosym libnvidia-ml.so.${NV_SOVER} \ + /usr/$(get_libdir)/libnvidia-ml.so.1 || \ + die "failed to create libnvidia-ml.so symlink" + dosym libnvidia-ml.so.1 \ + /usr/$(get_libdir)/libnvidia-ml.so || \ + die "failed to create libnvidia-ml.so symlink" + + # NVIDIA video decode <-> CUDA + dolib.so ${NV_LIB}/libnvcuvid.so.${NV_SOVER} || \ + die "failed to install libnvcuvid.so" + dosym libnvcuvid.so.${NV_SOVER} \ + /usr/$(get_libdir)/libnvcuvid.so.1 || \ + die "failed to create libnvcuvid.so symlink" + dosym libnvcuvid.so.1 \ + /usr/$(get_libdir)/libnvcuvid.so || \ + die "failed to create libnvcuvid.so symlink" + + # Xorg DDX driver + insinto /usr/$(get_libdir)/xorg/modules/drivers + doins ${NV_X11_DRV}/nvidia_drv.so || die "failed to install nvidia_drv.so" + + # Xorg GLX driver + insinto /usr/$(get_libdir)/opengl/nvidia/extensions + doins ${NV_X11_EXT}/libglx.so.${NV_SOVER} || \ + die "failed to install libglx.so" + dosym libglx.so.${NV_SOVER} \ + /usr/$(get_libdir)/opengl/nvidia/extensions/libglx.so || \ + die "failed to create libglx.so symlink" + + # XvMC driver + dolib.a ${NV_X11}/libXvMCNVIDIA.a || \ + die "failed to install libXvMCNVIDIA.so" + dolib.so ${NV_X11}/libXvMCNVIDIA.so.${NV_SOVER} || \ + die "failed to install libXvMCNVIDIA.so" + dosym libXvMCNVIDIA.so.${NV_SOVER} \ + /usr/$(get_libdir)/libXvMCNVIDIA.so.1 || \ + die "failed to create libXvMCNVIDIA.so symlink" + dosym libXvMCNVIDIA.so.1 /usr/$(get_libdir)/libXvMCNVIDIA.so || \ + die "failed to create libXvMCNVIDIA.so symlink" + dosym libXvMCNVIDIA.so.${NV_SOVER} \ + /usr/$(get_libdir)/libXvMCNVIDIA_dynamic.so.1 || \ + die "failed to create libXvMCNVIDIA_dynamic.so symlink" + + # OpenCL ICD for NVIDIA + if use kernel_linux; then + insinto /etc/OpenCL/vendors + doins nvidia.icd + fi + + # Documentation + dohtml ${NV_DOC}/html/* + if use x86-fbsd; then + dodoc "${NV_DOC}/README" + doman "${NV_MAN}/nvidia-xconfig.1" + else + # Docs + newdoc "${NV_DOC}/README.txt" README + dodoc "${NV_DOC}/NVIDIA_Changelog" + doman "${NV_MAN}/nvidia-smi.1.gz" + doman "${NV_MAN}/nvidia-xconfig.1.gz" + fi + + # Helper Apps + exeinto /opt/bin/ + doexe ${NV_EXEC}/nvidia-xconfig || die + doexe ${NV_EXEC}/nvidia-debugdump || die + doexe ${NV_EXEC}/nvidia-bug-report.sh || die + if use kernel_linux; then + doexe ${NV_EXEC}/nvidia-smi || die + fi + + 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 + + is_final_abi || die "failed to iterate through all ABIs" + + # GNOME3 gnome-terminal redraw bug workaround, + # see: https://bugzilla.gnome.org/show_bug.cgi?id=664858 + doenvd "${FILESDIR}/90mutter-disable-culling" +} + +# Install nvidia library: +# the first parameter is the place where to install it +# the second parameter is the base name of the library +# the third parameter is the provided soversion +donvidia() { + dodir $1 + exeinto $1 + + libname=$(basename $2) + + doexe $2.$3 || die "failed to install $2" + dosym ${libname}.$3 $1/${libname} || die "failed to symlink $2" + [[ $3 != "1" ]] && dosym ${libname}.$3 $1/${libname}.1 +} + +src_install-libs() { + local inslibdir=$(get_libdir) + local NV_ROOT="/usr/${inslibdir}/opengl/nvidia" + local CL_ROOT=/usr/${inslibdir}/OpenCL/vendors/nvidia + local libdir= sover= + + if use kernel_linux; then + if has_multilib_profile && [[ ${ABI} == "x86" ]] ; then + libdir=32 + else + libdir=. + fi + sover=${PV} + else + libdir=obj + # on FreeBSD it has just .1 suffix + sover=1 + fi + + # The GLX libraries + donvidia ${NV_ROOT}/lib ${libdir}/libGL.so ${sover} + donvidia /usr/${inslibdir} ${libdir}/libnvidia-glcore.so ${sover} + if use x86-fbsd; then + donvidia ${NV_ROOT}/lib ${libdir}/libnvidia-tls.so ${sover} + else + donvidia ${NV_ROOT}/lib ${libdir}/tls/libnvidia-tls.so ${sover} + fi + + # VDPAU + donvidia /usr/${inslibdir} ${libdir}/libvdpau_nvidia.so ${sover} + + # CUDA & OpenCL + if use kernel_linux; then + donvidia /usr/${inslibdir} ${libdir}/libcuda.so ${sover} + donvidia /usr/${inslibdir} ${libdir}/libnvidia-compiler.so ${sover} + donvidia ${CL_ROOT} ${libdir}/libOpenCL.so 1.0.0 + #dosym libOpenCL.so.1 ${CL_ROOT}/libOpenCL.so + fi +} + +pkg_preinst() { + # Clean the dynamic libGL stuff's home to ensure + # we dont have stale libs floating around + if [ -d "${ROOT}"/usr/lib/opengl/nvidia ] ; then + rm -rf "${ROOT}"/usr/lib/opengl/nvidia/* + fi + # Make sure we nuke the old nvidia-glx's env.d file + if [ -e "${ROOT}"/etc/env.d/09nvidia ] ; then + rm -f "${ROOT}"/etc/env.d/09nvidia + fi +} + +pkg_postinst() { + # Switch to the nvidia implementation + "${ROOT}"/usr/bin/eselect opengl set --use-old nvidia + "${ROOT}"/usr/bin/eselect opencl set --use-old nvidia + + elog "To use the NVIDIA GLX, run \"eselect opengl set nvidia\"" + elog + elog "To use the NVIDIA CUDA/OpenCL, run \"eselect opencl set nvidia\"" + elog + elog "NVIDIA has requested that any bug reports submitted have the" + elog "output of /opt/bin/nvidia-bug-report.sh included." + elog + elog "To work with compiz, you must enable the AddARGBGLXVisuals option." + elog + elog "If you are having resolution problems, try disabling DynamicTwinView." + elog +} + +pkg_postrm() { + "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 +} diff --git a/x11-drivers/nvidia-userspace/nvidia-userspace-295.59.ebuild b/x11-drivers/nvidia-userspace/nvidia-userspace-295.59.ebuild new file mode 100644 index 00000000..301d8462 --- /dev/null +++ b/x11-drivers/nvidia-userspace/nvidia-userspace-295.59.ebuild @@ -0,0 +1,453 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="2" + +inherit eutils unpacker multilib portability versionator flag-o-matic + +X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}" +AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}" +X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}" + +DESCRIPTION="NVIDIA X11 userspace libraries and applications" +HOMEPAGE="http://www.nvidia.com/" +SRC_URI="x86? ( http://us.download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}.run ) + amd64? ( http://us.download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run ) + x86-fbsd? ( http://us.download.nvidia.com/XFree86/FreeBSD-x86/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )" + +LICENSE="NVIDIA" +SLOT="0" +KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd" +IUSE="acpi multilib kernel_linux" +RESTRICT="strip" +EMULTILIB_PKG="true" + +COMMON="<x11-base/xorg-server-1.12.99 + kernel_linux? ( >=sys-libs/glibc-2.6.1 ) + multilib? ( app-emulation/emul-linux-x86-xlibs ) + >=app-admin/eselect-opengl-1.0.9 + app-admin/eselect-opencl + !<media-video/nvidia-settings-256.52" +DEPEND="${COMMON}" +RDEPEND="${COMMON} + x11-libs/libXvMC + !<x11-drivers/nvidia-userspace-${PV} + !>x11-drivers/nvidia-userspace-${PV} + acpi? ( sys-power/acpid )" +PDEPEND=">=x11-libs/libvdpau-0.3-r1" + +QA_TEXTRELS_x86=" + usr/lib/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0 + usr/lib/libXvMCNVIDIA.so.${PV} + usr/lib/libcuda.so.${PV} + usr/lib/libnvcuvid.so.${PV} + usr/lib/libnvidia-cfg.so.${PV} + usr/lib/libnvidia-compiler.so.${PV} + usr/lib/libnvidia-glcore.so.${PV} + usr/lib/libnvidia-ml.so.${PV} + usr/lib/libvdpau_nvidia.so.${PV} + usr/lib/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib/opengl/nvidia/lib/libGL.so.${PV} + usr/lib/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib/xorg/modules/drivers/nvidia_drv.so" + +QA_TEXTRELS_x86_fbsd="boot/modules/nvidia.ko + usr/lib/opengl/nvidia/lib/libGL.so.1 + usr/lib/libnvidia-glcore.so.1 + usr/lib/libvdpau_nvidia.so.1 + usr/lib/libnvidia-cfg.so.1 + usr/lib/opengl/nvidia/extensions/libglx.so.1 + usr/lib/xorg/modules/drivers/nvidia_drv.so" + +QA_TEXTRELS_amd64="usr/lib32/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib32/libnvidia-glcore.so.${PV} + usr/lib32/libvdpau_nvidia.so.${PV} + usr/lib32/opengl/nvidia/lib/libGL.so.${PV} + usr/lib32/libcuda.so.${PV} + usr/lib32/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0 + usr/lib32/libnvidia-compiler.so.${PV}" + +QA_EXECSTACK_x86="usr/lib/opengl/nvidia/lib/libGL.so.${PV} + usr/lib/libnvidia-glcore.so.${PV} + usr/lib/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib64/libXvMCNVIDIA.so.${PV} + usr/lib/libXvMCNVIDIA.a:NVXVMC.o + usr/lib/libvdpau_nvidia.so.${PV} + usr/lib/libnvidia-compiler.so.${PV} + usr/lib/libcuda.so.${PV} + usr/lib/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0" + +QA_EXECSTACK_amd64="usr/lib32/libnvidia-glcore.so.${PV} + usr/lib32/opengl/nvidia/lib/libGL.so.${PV} + usr/lib32/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib32/libvdpau_nvidia.so.${PV} + usr/lib32/libcuda.so.${PV} + usr/lib32/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0 + usr/lib32/libnvidia-compiler.so.${PV} + usr/lib64/libXvMCNVIDIA.a:NVXVMC.o + usr/lib64/libnvidia-cfg.so.${PV} + usr/lib64/libnvidia-ml.so.${PV} + usr/lib64/libvdpau_nvidia.so.${PV} + usr/lib64/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib64/opengl/nvidia/lib/libGL.so.${PV} + usr/lib64/libnvidia-glcore.so.${PV} + usr/lib64/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib64/libXvMCNVIDIA.so.${PV} + usr/lib64/libcuda.so.${PV} + usr/lib64/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0 + usr/lib64/libnvidia-compiler.so.${PV} + usr/lib64/xorg/modules/drivers/nvidia_drv.so + opt/bin/nvidia-smi + opt/bin/nvidia-xconfig + opt/bin/nvidia-debugdump + opt/bin/nvidia-settings" + +QA_WX_LOAD_x86="usr/lib/libnvidia-glcore.so.${PV} + usr/lib/opengl/nvidia/lib/libGL.so.${PV} + usr/lib/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib/libXvMCNVIDIA.a + usr/lib64/libXvMCNVIDIA.so.${PV}" + +QA_WX_LOAD_amd64="usr/lib32/opengl/nvidia/lib/libGL.so.${PV} + usr/lib32/libnvidia-glcore.so.${PV} + usr/lib64/opengl/nvidia/lib/libGL.so.${PV} + usr/lib64/libnvidia-glcore.so.${PV} + usr/lib64/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib64/libXvMCNVIDIA.so.${PV}" + +QA_SONAME_x86="usr/lib/libnvidia-compiler.so.${PV}" + +QA_SONAME_amd64="usr/lib64/libnvidia-compiler.so.${PV} + usr/lib32/libnvidia-compiler.so.${PV}" + +QA_DT_HASH_amd64="usr/lib32/libcuda.so.${PV} + usr/lib32/opengl/nvidia/lib/libGL.so.${PV} + usr/lib32/libnvidia-glcore.so.${PV} + usr/lib32/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib32/libvdpau_nvidia.so.${PV} + usr/lib32/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0 + usr/lib32/libnvidia-compiler.so.${PV} + usr/lib64/libXvMCNVIDIA.so.${PV} + usr/lib64/libcuda.so.${PV} + usr/lib64/libnvidia-cfg.so.${PV} + usr/lib64/libnvidia-glcore.so.${PV} + usr/lib64/libnvidia-ml.so.${PV} + usr/lib64/opengl/nvidia/lib/libGL.so.${PV} + usr/lib64/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib64/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib64/xorg/modules/drivers/nvidia_drv.so + usr/lib64/libvdpau_nvidia.so.${PV} + usr/lib64/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0 + usr/lib64/libnvidia-compiler.so.${PV} + usr/lib64/libnvcuvid.so.${PV} + opt/bin/nvidia-smi + opt/bin/nvidia-xconfig + opt/bin/nvidia-debugdump + opt/bin/nvidia-settings" + +QA_DT_HASH_x86="usr/lib/libcuda.so.${PV} + usr/lib/libnvidia-cfg.so.${PV} + usr/lib/libnvidia-glcore.so.${PV} + usr/lib/libnvidia-ml.so.${PV} + usr/lib/opengl/nvidia/lib/libGL.so.${PV} + usr/lib/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib/xorg/modules/drivers/nvidia_drv.so + usr/lib/libXvMCNVIDIA.so.${PV} + usr/lib/libvdpau_nvidia.so.${PV} + usr/lib/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0 + usr/lib/libnvidia-compiler.so.${PV} + usr/lib/libnvcuvid.so.${PV} + opt/bin/nvidia-smi + opt/bin/nvidia-xconfig + opt/bin/nvidia-debugdump + opt/bin/nvidia-settings" + + +S="${WORKDIR}/" + +pkg_setup() { + # try to turn off distcc and ccache for people that have a problem with it + export DISTCC_DISABLE=1 + export CCACHE_DISABLE=1 + + if use amd64 && has_multilib_profile && [ "${DEFAULT_ABI}" != "amd64" ]; then + eerror "This ebuild doesn't currently support changing your default abi." + die "Unexpected \${DEFAULT_ABI} = ${DEFAULT_ABI}" + fi + + # On BSD userland it wants real make command + use userland_BSD && MAKE="$(get_bmake)" + + export _POSIX2_VERSION="199209" + + # set variables to where files are in the package structure + if use kernel_FreeBSD; then + NV_DOC="${S}/doc" + NV_EXEC="${S}/obj" + NV_LIB="${S}/obj" + NV_SRC="${S}/src" + NV_MAN="${S}/x11/man" + NV_X11="${S}/obj" + NV_X11_DRV="${NV_X11}" + NV_X11_EXT="${NV_X11}" + NV_SOVER=1 + elif use kernel_linux; then + NV_DOC="${S}" + NV_EXEC="${S}" + NV_LIB="${S}" + NV_SRC="${S}/kernel" + NV_MAN="${S}" + NV_X11="${S}" + NV_X11_DRV="${NV_X11}" + NV_X11_EXT="${NV_X11}" + NV_SOVER=${PV} + else + die "Could not determine proper NVIDIA package" + fi +} + +src_unpack() { + if ! use x86-fbsd; then + cd "${S}" + unpack_makeself + else + unpack ${A} + fi +} + +src_prepare() { + # Please add a brief description for every added patch + use x86-fbsd && cd doc + cat <<- EOF > "${S}"/nvidia.icd + /usr/$(get_libdir)/libcuda.so + EOF +} + +src_compile() { + # This is already the default on Linux, as there's no toplevel Makefile, but + # on FreeBSD there's one and triggers the kernel module build, as we install + # it by itself, pass this. + + cd "${NV_SRC}" + if use x86-fbsd; then + MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \ + LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die + fi +} + +src_install() { + if use kernel_linux; then + VIDEOGROUP="$(egetent group video | cut -d ':' -f 3)" + if [ -z "$VIDEOGROUP" ]; then + eerror "Failed to determine the video group gid." + die "Failed to determine the video group gid." + fi + + # Add the aliases + [ -f "${FILESDIR}/nvidia-169.07" ] || die "nvidia missing in FILESDIR" + sed -e 's:PACKAGE:'${PF}':g' \ + -e 's:VIDEOGID:'${VIDEOGROUP}':' "${FILESDIR}"/nvidia-169.07 > \ + "${WORKDIR}"/nvidia + insinto /etc/modprobe.d + newins "${WORKDIR}"/nvidia nvidia.conf || die + + # Ensures that our device nodes are created when not using X + exeinto /lib/udev + doexe "${FILESDIR}"/nvidia-udev.sh + + insinto /lib/udev/rules.d + newins "${FILESDIR}"/nvidia.udev-rule 99-nvidia.rules + fi + + # NVIDIA kernel <-> userspace driver config lib + dolib.so ${NV_LIB}/libnvidia-cfg.so.${NV_SOVER} || \ + die "failed to install libnvidia-cfg" + dosym libnvidia-cfg.so.${NV_SOVER} \ + /usr/$(get_libdir)/libnvidia-cfg.so.1 || \ + die "failed to create libnvidia-cfg.so symlink" + dosym libnvidia-cfg.so.1 \ + /usr/$(get_libdir)/libnvidia-cfg.so || \ + die "failed to create libnvidia-cfg.so symlink" + + # NVIDIA monitoring library + dolib.so ${NV_LIB}/libnvidia-ml.so.${NV_SOVER} || \ + die "failed to install libnvidia-ml" + dosym libnvidia-ml.so.${NV_SOVER} \ + /usr/$(get_libdir)/libnvidia-ml.so.1 || \ + die "failed to create libnvidia-ml.so symlink" + dosym libnvidia-ml.so.1 \ + /usr/$(get_libdir)/libnvidia-ml.so || \ + die "failed to create libnvidia-ml.so symlink" + + # NVIDIA video decode <-> CUDA + dolib.so ${NV_LIB}/libnvcuvid.so.${NV_SOVER} || \ + die "failed to install libnvcuvid.so" + dosym libnvcuvid.so.${NV_SOVER} \ + /usr/$(get_libdir)/libnvcuvid.so.1 || \ + die "failed to create libnvcuvid.so symlink" + dosym libnvcuvid.so.1 \ + /usr/$(get_libdir)/libnvcuvid.so || \ + die "failed to create libnvcuvid.so symlink" + + # Xorg DDX driver + insinto /usr/$(get_libdir)/xorg/modules/drivers + doins ${NV_X11_DRV}/nvidia_drv.so || die "failed to install nvidia_drv.so" + + # Xorg GLX driver + insinto /usr/$(get_libdir)/opengl/nvidia/extensions + doins ${NV_X11_EXT}/libglx.so.${NV_SOVER} || \ + die "failed to install libglx.so" + dosym libglx.so.${NV_SOVER} \ + /usr/$(get_libdir)/opengl/nvidia/extensions/libglx.so || \ + die "failed to create libglx.so symlink" + + # XvMC driver + dolib.a ${NV_X11}/libXvMCNVIDIA.a || \ + die "failed to install libXvMCNVIDIA.so" + dolib.so ${NV_X11}/libXvMCNVIDIA.so.${NV_SOVER} || \ + die "failed to install libXvMCNVIDIA.so" + dosym libXvMCNVIDIA.so.${NV_SOVER} \ + /usr/$(get_libdir)/libXvMCNVIDIA.so.1 || \ + die "failed to create libXvMCNVIDIA.so symlink" + dosym libXvMCNVIDIA.so.1 /usr/$(get_libdir)/libXvMCNVIDIA.so || \ + die "failed to create libXvMCNVIDIA.so symlink" + dosym libXvMCNVIDIA.so.${NV_SOVER} \ + /usr/$(get_libdir)/libXvMCNVIDIA_dynamic.so.1 || \ + die "failed to create libXvMCNVIDIA_dynamic.so symlink" + + # OpenCL ICD for NVIDIA + if use kernel_linux; then + insinto /etc/OpenCL/vendors + doins nvidia.icd + fi + + # Documentation + dohtml ${NV_DOC}/html/* + if use x86-fbsd; then + dodoc "${NV_DOC}/README" + doman "${NV_MAN}/nvidia-xconfig.1" + else + # Docs + newdoc "${NV_DOC}/README.txt" README + dodoc "${NV_DOC}/NVIDIA_Changelog" + doman "${NV_MAN}/nvidia-smi.1.gz" + doman "${NV_MAN}/nvidia-xconfig.1.gz" + fi + + # Helper Apps + exeinto /opt/bin/ + doexe ${NV_EXEC}/nvidia-xconfig || die + doexe ${NV_EXEC}/nvidia-debugdump || die + doexe ${NV_EXEC}/nvidia-bug-report.sh || die + if use kernel_linux; then + doexe ${NV_EXEC}/nvidia-smi || die + fi + + 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 + + is_final_abi || die "failed to iterate through all ABIs" + + # GNOME3 gnome-terminal redraw bug workaround, + # see: https://bugzilla.gnome.org/show_bug.cgi?id=664858 + doenvd "${FILESDIR}/90mutter-disable-culling" +} + +# Install nvidia library: +# the first parameter is the place where to install it +# the second parameter is the base name of the library +# the third parameter is the provided soversion +donvidia() { + dodir $1 + exeinto $1 + + libname=$(basename $2) + + doexe $2.$3 || die "failed to install $2" + dosym ${libname}.$3 $1/${libname} || die "failed to symlink $2" + [[ $3 != "1" ]] && dosym ${libname}.$3 $1/${libname}.1 +} + +src_install-libs() { + local inslibdir=$(get_libdir) + local NV_ROOT="/usr/${inslibdir}/opengl/nvidia" + local CL_ROOT=/usr/${inslibdir}/OpenCL/vendors/nvidia + local libdir= sover= + + if use kernel_linux; then + if has_multilib_profile && [[ ${ABI} == "x86" ]] ; then + libdir=32 + else + libdir=. + fi + sover=${PV} + else + libdir=obj + # on FreeBSD it has just .1 suffix + sover=1 + fi + + # The GLX libraries + donvidia ${NV_ROOT}/lib ${libdir}/libGL.so ${sover} + donvidia /usr/${inslibdir} ${libdir}/libnvidia-glcore.so ${sover} + if use x86-fbsd; then + donvidia ${NV_ROOT}/lib ${libdir}/libnvidia-tls.so ${sover} + else + donvidia ${NV_ROOT}/lib ${libdir}/tls/libnvidia-tls.so ${sover} + fi + + # VDPAU + donvidia /usr/${inslibdir} ${libdir}/libvdpau_nvidia.so ${sover} + + # CUDA & OpenCL + if use kernel_linux; then + donvidia /usr/${inslibdir} ${libdir}/libcuda.so ${sover} + donvidia /usr/${inslibdir} ${libdir}/libnvidia-compiler.so ${sover} + donvidia ${CL_ROOT} ${libdir}/libOpenCL.so 1.0.0 + #dosym libOpenCL.so.1 ${CL_ROOT}/libOpenCL.so + fi +} + +pkg_preinst() { + # Clean the dynamic libGL stuff's home to ensure + # we dont have stale libs floating around + if [ -d "${ROOT}"/usr/lib/opengl/nvidia ] ; then + rm -rf "${ROOT}"/usr/lib/opengl/nvidia/* + fi + # Make sure we nuke the old nvidia-glx's env.d file + if [ -e "${ROOT}"/etc/env.d/09nvidia ] ; then + rm -f "${ROOT}"/etc/env.d/09nvidia + fi +} + +pkg_postinst() { + # Switch to the nvidia implementation + "${ROOT}"/usr/bin/eselect opengl set --use-old nvidia + "${ROOT}"/usr/bin/eselect opencl set --use-old nvidia + + elog "To use the NVIDIA GLX, run \"eselect opengl set nvidia\"" + elog + elog "To use the NVIDIA CUDA/OpenCL, run \"eselect opencl set nvidia\"" + elog + elog "NVIDIA has requested that any bug reports submitted have the" + elog "output of /opt/bin/nvidia-bug-report.sh included." + elog + elog "To work with compiz, you must enable the AddARGBGLXVisuals option." + elog + elog "If you are having resolution problems, try disabling DynamicTwinView." + elog +} + +pkg_postrm() { + "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 +} diff --git a/x11-drivers/nvidia-userspace/nvidia-userspace-302.17.ebuild b/x11-drivers/nvidia-userspace/nvidia-userspace-302.17.ebuild new file mode 100644 index 00000000..301d8462 --- /dev/null +++ b/x11-drivers/nvidia-userspace/nvidia-userspace-302.17.ebuild @@ -0,0 +1,453 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="2" + +inherit eutils unpacker multilib portability versionator flag-o-matic + +X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}" +AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}" +X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}" + +DESCRIPTION="NVIDIA X11 userspace libraries and applications" +HOMEPAGE="http://www.nvidia.com/" +SRC_URI="x86? ( http://us.download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}.run ) + amd64? ( http://us.download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run ) + x86-fbsd? ( http://us.download.nvidia.com/XFree86/FreeBSD-x86/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )" + +LICENSE="NVIDIA" +SLOT="0" +KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd" +IUSE="acpi multilib kernel_linux" +RESTRICT="strip" +EMULTILIB_PKG="true" + +COMMON="<x11-base/xorg-server-1.12.99 + kernel_linux? ( >=sys-libs/glibc-2.6.1 ) + multilib? ( app-emulation/emul-linux-x86-xlibs ) + >=app-admin/eselect-opengl-1.0.9 + app-admin/eselect-opencl + !<media-video/nvidia-settings-256.52" +DEPEND="${COMMON}" +RDEPEND="${COMMON} + x11-libs/libXvMC + !<x11-drivers/nvidia-userspace-${PV} + !>x11-drivers/nvidia-userspace-${PV} + acpi? ( sys-power/acpid )" +PDEPEND=">=x11-libs/libvdpau-0.3-r1" + +QA_TEXTRELS_x86=" + usr/lib/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0 + usr/lib/libXvMCNVIDIA.so.${PV} + usr/lib/libcuda.so.${PV} + usr/lib/libnvcuvid.so.${PV} + usr/lib/libnvidia-cfg.so.${PV} + usr/lib/libnvidia-compiler.so.${PV} + usr/lib/libnvidia-glcore.so.${PV} + usr/lib/libnvidia-ml.so.${PV} + usr/lib/libvdpau_nvidia.so.${PV} + usr/lib/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib/opengl/nvidia/lib/libGL.so.${PV} + usr/lib/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib/xorg/modules/drivers/nvidia_drv.so" + +QA_TEXTRELS_x86_fbsd="boot/modules/nvidia.ko + usr/lib/opengl/nvidia/lib/libGL.so.1 + usr/lib/libnvidia-glcore.so.1 + usr/lib/libvdpau_nvidia.so.1 + usr/lib/libnvidia-cfg.so.1 + usr/lib/opengl/nvidia/extensions/libglx.so.1 + usr/lib/xorg/modules/drivers/nvidia_drv.so" + +QA_TEXTRELS_amd64="usr/lib32/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib32/libnvidia-glcore.so.${PV} + usr/lib32/libvdpau_nvidia.so.${PV} + usr/lib32/opengl/nvidia/lib/libGL.so.${PV} + usr/lib32/libcuda.so.${PV} + usr/lib32/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0 + usr/lib32/libnvidia-compiler.so.${PV}" + +QA_EXECSTACK_x86="usr/lib/opengl/nvidia/lib/libGL.so.${PV} + usr/lib/libnvidia-glcore.so.${PV} + usr/lib/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib64/libXvMCNVIDIA.so.${PV} + usr/lib/libXvMCNVIDIA.a:NVXVMC.o + usr/lib/libvdpau_nvidia.so.${PV} + usr/lib/libnvidia-compiler.so.${PV} + usr/lib/libcuda.so.${PV} + usr/lib/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0" + +QA_EXECSTACK_amd64="usr/lib32/libnvidia-glcore.so.${PV} + usr/lib32/opengl/nvidia/lib/libGL.so.${PV} + usr/lib32/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib32/libvdpau_nvidia.so.${PV} + usr/lib32/libcuda.so.${PV} + usr/lib32/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0 + usr/lib32/libnvidia-compiler.so.${PV} + usr/lib64/libXvMCNVIDIA.a:NVXVMC.o + usr/lib64/libnvidia-cfg.so.${PV} + usr/lib64/libnvidia-ml.so.${PV} + usr/lib64/libvdpau_nvidia.so.${PV} + usr/lib64/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib64/opengl/nvidia/lib/libGL.so.${PV} + usr/lib64/libnvidia-glcore.so.${PV} + usr/lib64/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib64/libXvMCNVIDIA.so.${PV} + usr/lib64/libcuda.so.${PV} + usr/lib64/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0 + usr/lib64/libnvidia-compiler.so.${PV} + usr/lib64/xorg/modules/drivers/nvidia_drv.so + opt/bin/nvidia-smi + opt/bin/nvidia-xconfig + opt/bin/nvidia-debugdump + opt/bin/nvidia-settings" + +QA_WX_LOAD_x86="usr/lib/libnvidia-glcore.so.${PV} + usr/lib/opengl/nvidia/lib/libGL.so.${PV} + usr/lib/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib/libXvMCNVIDIA.a + usr/lib64/libXvMCNVIDIA.so.${PV}" + +QA_WX_LOAD_amd64="usr/lib32/opengl/nvidia/lib/libGL.so.${PV} + usr/lib32/libnvidia-glcore.so.${PV} + usr/lib64/opengl/nvidia/lib/libGL.so.${PV} + usr/lib64/libnvidia-glcore.so.${PV} + usr/lib64/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib64/libXvMCNVIDIA.so.${PV}" + +QA_SONAME_x86="usr/lib/libnvidia-compiler.so.${PV}" + +QA_SONAME_amd64="usr/lib64/libnvidia-compiler.so.${PV} + usr/lib32/libnvidia-compiler.so.${PV}" + +QA_DT_HASH_amd64="usr/lib32/libcuda.so.${PV} + usr/lib32/opengl/nvidia/lib/libGL.so.${PV} + usr/lib32/libnvidia-glcore.so.${PV} + usr/lib32/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib32/libvdpau_nvidia.so.${PV} + usr/lib32/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0 + usr/lib32/libnvidia-compiler.so.${PV} + usr/lib64/libXvMCNVIDIA.so.${PV} + usr/lib64/libcuda.so.${PV} + usr/lib64/libnvidia-cfg.so.${PV} + usr/lib64/libnvidia-glcore.so.${PV} + usr/lib64/libnvidia-ml.so.${PV} + usr/lib64/opengl/nvidia/lib/libGL.so.${PV} + usr/lib64/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib64/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib64/xorg/modules/drivers/nvidia_drv.so + usr/lib64/libvdpau_nvidia.so.${PV} + usr/lib64/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0 + usr/lib64/libnvidia-compiler.so.${PV} + usr/lib64/libnvcuvid.so.${PV} + opt/bin/nvidia-smi + opt/bin/nvidia-xconfig + opt/bin/nvidia-debugdump + opt/bin/nvidia-settings" + +QA_DT_HASH_x86="usr/lib/libcuda.so.${PV} + usr/lib/libnvidia-cfg.so.${PV} + usr/lib/libnvidia-glcore.so.${PV} + usr/lib/libnvidia-ml.so.${PV} + usr/lib/opengl/nvidia/lib/libGL.so.${PV} + usr/lib/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib/xorg/modules/drivers/nvidia_drv.so + usr/lib/libXvMCNVIDIA.so.${PV} + usr/lib/libvdpau_nvidia.so.${PV} + usr/lib/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0 + usr/lib/libnvidia-compiler.so.${PV} + usr/lib/libnvcuvid.so.${PV} + opt/bin/nvidia-smi + opt/bin/nvidia-xconfig + opt/bin/nvidia-debugdump + opt/bin/nvidia-settings" + + +S="${WORKDIR}/" + +pkg_setup() { + # try to turn off distcc and ccache for people that have a problem with it + export DISTCC_DISABLE=1 + export CCACHE_DISABLE=1 + + if use amd64 && has_multilib_profile && [ "${DEFAULT_ABI}" != "amd64" ]; then + eerror "This ebuild doesn't currently support changing your default abi." + die "Unexpected \${DEFAULT_ABI} = ${DEFAULT_ABI}" + fi + + # On BSD userland it wants real make command + use userland_BSD && MAKE="$(get_bmake)" + + export _POSIX2_VERSION="199209" + + # set variables to where files are in the package structure + if use kernel_FreeBSD; then + NV_DOC="${S}/doc" + NV_EXEC="${S}/obj" + NV_LIB="${S}/obj" + NV_SRC="${S}/src" + NV_MAN="${S}/x11/man" + NV_X11="${S}/obj" + NV_X11_DRV="${NV_X11}" + NV_X11_EXT="${NV_X11}" + NV_SOVER=1 + elif use kernel_linux; then + NV_DOC="${S}" + NV_EXEC="${S}" + NV_LIB="${S}" + NV_SRC="${S}/kernel" + NV_MAN="${S}" + NV_X11="${S}" + NV_X11_DRV="${NV_X11}" + NV_X11_EXT="${NV_X11}" + NV_SOVER=${PV} + else + die "Could not determine proper NVIDIA package" + fi +} + +src_unpack() { + if ! use x86-fbsd; then + cd "${S}" + unpack_makeself + else + unpack ${A} + fi +} + +src_prepare() { + # Please add a brief description for every added patch + use x86-fbsd && cd doc + cat <<- EOF > "${S}"/nvidia.icd + /usr/$(get_libdir)/libcuda.so + EOF +} + +src_compile() { + # This is already the default on Linux, as there's no toplevel Makefile, but + # on FreeBSD there's one and triggers the kernel module build, as we install + # it by itself, pass this. + + cd "${NV_SRC}" + if use x86-fbsd; then + MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \ + LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die + fi +} + +src_install() { + if use kernel_linux; then + VIDEOGROUP="$(egetent group video | cut -d ':' -f 3)" + if [ -z "$VIDEOGROUP" ]; then + eerror "Failed to determine the video group gid." + die "Failed to determine the video group gid." + fi + + # Add the aliases + [ -f "${FILESDIR}/nvidia-169.07" ] || die "nvidia missing in FILESDIR" + sed -e 's:PACKAGE:'${PF}':g' \ + -e 's:VIDEOGID:'${VIDEOGROUP}':' "${FILESDIR}"/nvidia-169.07 > \ + "${WORKDIR}"/nvidia + insinto /etc/modprobe.d + newins "${WORKDIR}"/nvidia nvidia.conf || die + + # Ensures that our device nodes are created when not using X + exeinto /lib/udev + doexe "${FILESDIR}"/nvidia-udev.sh + + insinto /lib/udev/rules.d + newins "${FILESDIR}"/nvidia.udev-rule 99-nvidia.rules + fi + + # NVIDIA kernel <-> userspace driver config lib + dolib.so ${NV_LIB}/libnvidia-cfg.so.${NV_SOVER} || \ + die "failed to install libnvidia-cfg" + dosym libnvidia-cfg.so.${NV_SOVER} \ + /usr/$(get_libdir)/libnvidia-cfg.so.1 || \ + die "failed to create libnvidia-cfg.so symlink" + dosym libnvidia-cfg.so.1 \ + /usr/$(get_libdir)/libnvidia-cfg.so || \ + die "failed to create libnvidia-cfg.so symlink" + + # NVIDIA monitoring library + dolib.so ${NV_LIB}/libnvidia-ml.so.${NV_SOVER} || \ + die "failed to install libnvidia-ml" + dosym libnvidia-ml.so.${NV_SOVER} \ + /usr/$(get_libdir)/libnvidia-ml.so.1 || \ + die "failed to create libnvidia-ml.so symlink" + dosym libnvidia-ml.so.1 \ + /usr/$(get_libdir)/libnvidia-ml.so || \ + die "failed to create libnvidia-ml.so symlink" + + # NVIDIA video decode <-> CUDA + dolib.so ${NV_LIB}/libnvcuvid.so.${NV_SOVER} || \ + die "failed to install libnvcuvid.so" + dosym libnvcuvid.so.${NV_SOVER} \ + /usr/$(get_libdir)/libnvcuvid.so.1 || \ + die "failed to create libnvcuvid.so symlink" + dosym libnvcuvid.so.1 \ + /usr/$(get_libdir)/libnvcuvid.so || \ + die "failed to create libnvcuvid.so symlink" + + # Xorg DDX driver + insinto /usr/$(get_libdir)/xorg/modules/drivers + doins ${NV_X11_DRV}/nvidia_drv.so || die "failed to install nvidia_drv.so" + + # Xorg GLX driver + insinto /usr/$(get_libdir)/opengl/nvidia/extensions + doins ${NV_X11_EXT}/libglx.so.${NV_SOVER} || \ + die "failed to install libglx.so" + dosym libglx.so.${NV_SOVER} \ + /usr/$(get_libdir)/opengl/nvidia/extensions/libglx.so || \ + die "failed to create libglx.so symlink" + + # XvMC driver + dolib.a ${NV_X11}/libXvMCNVIDIA.a || \ + die "failed to install libXvMCNVIDIA.so" + dolib.so ${NV_X11}/libXvMCNVIDIA.so.${NV_SOVER} || \ + die "failed to install libXvMCNVIDIA.so" + dosym libXvMCNVIDIA.so.${NV_SOVER} \ + /usr/$(get_libdir)/libXvMCNVIDIA.so.1 || \ + die "failed to create libXvMCNVIDIA.so symlink" + dosym libXvMCNVIDIA.so.1 /usr/$(get_libdir)/libXvMCNVIDIA.so || \ + die "failed to create libXvMCNVIDIA.so symlink" + dosym libXvMCNVIDIA.so.${NV_SOVER} \ + /usr/$(get_libdir)/libXvMCNVIDIA_dynamic.so.1 || \ + die "failed to create libXvMCNVIDIA_dynamic.so symlink" + + # OpenCL ICD for NVIDIA + if use kernel_linux; then + insinto /etc/OpenCL/vendors + doins nvidia.icd + fi + + # Documentation + dohtml ${NV_DOC}/html/* + if use x86-fbsd; then + dodoc "${NV_DOC}/README" + doman "${NV_MAN}/nvidia-xconfig.1" + else + # Docs + newdoc "${NV_DOC}/README.txt" README + dodoc "${NV_DOC}/NVIDIA_Changelog" + doman "${NV_MAN}/nvidia-smi.1.gz" + doman "${NV_MAN}/nvidia-xconfig.1.gz" + fi + + # Helper Apps + exeinto /opt/bin/ + doexe ${NV_EXEC}/nvidia-xconfig || die + doexe ${NV_EXEC}/nvidia-debugdump || die + doexe ${NV_EXEC}/nvidia-bug-report.sh || die + if use kernel_linux; then + doexe ${NV_EXEC}/nvidia-smi || die + fi + + 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 + + is_final_abi || die "failed to iterate through all ABIs" + + # GNOME3 gnome-terminal redraw bug workaround, + # see: https://bugzilla.gnome.org/show_bug.cgi?id=664858 + doenvd "${FILESDIR}/90mutter-disable-culling" +} + +# Install nvidia library: +# the first parameter is the place where to install it +# the second parameter is the base name of the library +# the third parameter is the provided soversion +donvidia() { + dodir $1 + exeinto $1 + + libname=$(basename $2) + + doexe $2.$3 || die "failed to install $2" + dosym ${libname}.$3 $1/${libname} || die "failed to symlink $2" + [[ $3 != "1" ]] && dosym ${libname}.$3 $1/${libname}.1 +} + +src_install-libs() { + local inslibdir=$(get_libdir) + local NV_ROOT="/usr/${inslibdir}/opengl/nvidia" + local CL_ROOT=/usr/${inslibdir}/OpenCL/vendors/nvidia + local libdir= sover= + + if use kernel_linux; then + if has_multilib_profile && [[ ${ABI} == "x86" ]] ; then + libdir=32 + else + libdir=. + fi + sover=${PV} + else + libdir=obj + # on FreeBSD it has just .1 suffix + sover=1 + fi + + # The GLX libraries + donvidia ${NV_ROOT}/lib ${libdir}/libGL.so ${sover} + donvidia /usr/${inslibdir} ${libdir}/libnvidia-glcore.so ${sover} + if use x86-fbsd; then + donvidia ${NV_ROOT}/lib ${libdir}/libnvidia-tls.so ${sover} + else + donvidia ${NV_ROOT}/lib ${libdir}/tls/libnvidia-tls.so ${sover} + fi + + # VDPAU + donvidia /usr/${inslibdir} ${libdir}/libvdpau_nvidia.so ${sover} + + # CUDA & OpenCL + if use kernel_linux; then + donvidia /usr/${inslibdir} ${libdir}/libcuda.so ${sover} + donvidia /usr/${inslibdir} ${libdir}/libnvidia-compiler.so ${sover} + donvidia ${CL_ROOT} ${libdir}/libOpenCL.so 1.0.0 + #dosym libOpenCL.so.1 ${CL_ROOT}/libOpenCL.so + fi +} + +pkg_preinst() { + # Clean the dynamic libGL stuff's home to ensure + # we dont have stale libs floating around + if [ -d "${ROOT}"/usr/lib/opengl/nvidia ] ; then + rm -rf "${ROOT}"/usr/lib/opengl/nvidia/* + fi + # Make sure we nuke the old nvidia-glx's env.d file + if [ -e "${ROOT}"/etc/env.d/09nvidia ] ; then + rm -f "${ROOT}"/etc/env.d/09nvidia + fi +} + +pkg_postinst() { + # Switch to the nvidia implementation + "${ROOT}"/usr/bin/eselect opengl set --use-old nvidia + "${ROOT}"/usr/bin/eselect opencl set --use-old nvidia + + elog "To use the NVIDIA GLX, run \"eselect opengl set nvidia\"" + elog + elog "To use the NVIDIA CUDA/OpenCL, run \"eselect opencl set nvidia\"" + elog + elog "NVIDIA has requested that any bug reports submitted have the" + elog "output of /opt/bin/nvidia-bug-report.sh included." + elog + elog "To work with compiz, you must enable the AddARGBGLXVisuals option." + elog + elog "If you are having resolution problems, try disabling DynamicTwinView." + elog +} + +pkg_postrm() { + "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 +} diff --git a/x11-drivers/nvidia-userspace/nvidia-userspace-304.22.ebuild b/x11-drivers/nvidia-userspace/nvidia-userspace-304.22.ebuild new file mode 100644 index 00000000..301d8462 --- /dev/null +++ b/x11-drivers/nvidia-userspace/nvidia-userspace-304.22.ebuild @@ -0,0 +1,453 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="2" + +inherit eutils unpacker multilib portability versionator flag-o-matic + +X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}" +AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}" +X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}" + +DESCRIPTION="NVIDIA X11 userspace libraries and applications" +HOMEPAGE="http://www.nvidia.com/" +SRC_URI="x86? ( http://us.download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}.run ) + amd64? ( http://us.download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run ) + x86-fbsd? ( http://us.download.nvidia.com/XFree86/FreeBSD-x86/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )" + +LICENSE="NVIDIA" +SLOT="0" +KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd" +IUSE="acpi multilib kernel_linux" +RESTRICT="strip" +EMULTILIB_PKG="true" + +COMMON="<x11-base/xorg-server-1.12.99 + kernel_linux? ( >=sys-libs/glibc-2.6.1 ) + multilib? ( app-emulation/emul-linux-x86-xlibs ) + >=app-admin/eselect-opengl-1.0.9 + app-admin/eselect-opencl + !<media-video/nvidia-settings-256.52" +DEPEND="${COMMON}" +RDEPEND="${COMMON} + x11-libs/libXvMC + !<x11-drivers/nvidia-userspace-${PV} + !>x11-drivers/nvidia-userspace-${PV} + acpi? ( sys-power/acpid )" +PDEPEND=">=x11-libs/libvdpau-0.3-r1" + +QA_TEXTRELS_x86=" + usr/lib/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0 + usr/lib/libXvMCNVIDIA.so.${PV} + usr/lib/libcuda.so.${PV} + usr/lib/libnvcuvid.so.${PV} + usr/lib/libnvidia-cfg.so.${PV} + usr/lib/libnvidia-compiler.so.${PV} + usr/lib/libnvidia-glcore.so.${PV} + usr/lib/libnvidia-ml.so.${PV} + usr/lib/libvdpau_nvidia.so.${PV} + usr/lib/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib/opengl/nvidia/lib/libGL.so.${PV} + usr/lib/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib/xorg/modules/drivers/nvidia_drv.so" + +QA_TEXTRELS_x86_fbsd="boot/modules/nvidia.ko + usr/lib/opengl/nvidia/lib/libGL.so.1 + usr/lib/libnvidia-glcore.so.1 + usr/lib/libvdpau_nvidia.so.1 + usr/lib/libnvidia-cfg.so.1 + usr/lib/opengl/nvidia/extensions/libglx.so.1 + usr/lib/xorg/modules/drivers/nvidia_drv.so" + +QA_TEXTRELS_amd64="usr/lib32/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib32/libnvidia-glcore.so.${PV} + usr/lib32/libvdpau_nvidia.so.${PV} + usr/lib32/opengl/nvidia/lib/libGL.so.${PV} + usr/lib32/libcuda.so.${PV} + usr/lib32/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0 + usr/lib32/libnvidia-compiler.so.${PV}" + +QA_EXECSTACK_x86="usr/lib/opengl/nvidia/lib/libGL.so.${PV} + usr/lib/libnvidia-glcore.so.${PV} + usr/lib/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib64/libXvMCNVIDIA.so.${PV} + usr/lib/libXvMCNVIDIA.a:NVXVMC.o + usr/lib/libvdpau_nvidia.so.${PV} + usr/lib/libnvidia-compiler.so.${PV} + usr/lib/libcuda.so.${PV} + usr/lib/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0" + +QA_EXECSTACK_amd64="usr/lib32/libnvidia-glcore.so.${PV} + usr/lib32/opengl/nvidia/lib/libGL.so.${PV} + usr/lib32/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib32/libvdpau_nvidia.so.${PV} + usr/lib32/libcuda.so.${PV} + usr/lib32/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0 + usr/lib32/libnvidia-compiler.so.${PV} + usr/lib64/libXvMCNVIDIA.a:NVXVMC.o + usr/lib64/libnvidia-cfg.so.${PV} + usr/lib64/libnvidia-ml.so.${PV} + usr/lib64/libvdpau_nvidia.so.${PV} + usr/lib64/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib64/opengl/nvidia/lib/libGL.so.${PV} + usr/lib64/libnvidia-glcore.so.${PV} + usr/lib64/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib64/libXvMCNVIDIA.so.${PV} + usr/lib64/libcuda.so.${PV} + usr/lib64/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0 + usr/lib64/libnvidia-compiler.so.${PV} + usr/lib64/xorg/modules/drivers/nvidia_drv.so + opt/bin/nvidia-smi + opt/bin/nvidia-xconfig + opt/bin/nvidia-debugdump + opt/bin/nvidia-settings" + +QA_WX_LOAD_x86="usr/lib/libnvidia-glcore.so.${PV} + usr/lib/opengl/nvidia/lib/libGL.so.${PV} + usr/lib/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib/libXvMCNVIDIA.a + usr/lib64/libXvMCNVIDIA.so.${PV}" + +QA_WX_LOAD_amd64="usr/lib32/opengl/nvidia/lib/libGL.so.${PV} + usr/lib32/libnvidia-glcore.so.${PV} + usr/lib64/opengl/nvidia/lib/libGL.so.${PV} + usr/lib64/libnvidia-glcore.so.${PV} + usr/lib64/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib64/libXvMCNVIDIA.so.${PV}" + +QA_SONAME_x86="usr/lib/libnvidia-compiler.so.${PV}" + +QA_SONAME_amd64="usr/lib64/libnvidia-compiler.so.${PV} + usr/lib32/libnvidia-compiler.so.${PV}" + +QA_DT_HASH_amd64="usr/lib32/libcuda.so.${PV} + usr/lib32/opengl/nvidia/lib/libGL.so.${PV} + usr/lib32/libnvidia-glcore.so.${PV} + usr/lib32/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib32/libvdpau_nvidia.so.${PV} + usr/lib32/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0 + usr/lib32/libnvidia-compiler.so.${PV} + usr/lib64/libXvMCNVIDIA.so.${PV} + usr/lib64/libcuda.so.${PV} + usr/lib64/libnvidia-cfg.so.${PV} + usr/lib64/libnvidia-glcore.so.${PV} + usr/lib64/libnvidia-ml.so.${PV} + usr/lib64/opengl/nvidia/lib/libGL.so.${PV} + usr/lib64/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib64/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib64/xorg/modules/drivers/nvidia_drv.so + usr/lib64/libvdpau_nvidia.so.${PV} + usr/lib64/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0 + usr/lib64/libnvidia-compiler.so.${PV} + usr/lib64/libnvcuvid.so.${PV} + opt/bin/nvidia-smi + opt/bin/nvidia-xconfig + opt/bin/nvidia-debugdump + opt/bin/nvidia-settings" + +QA_DT_HASH_x86="usr/lib/libcuda.so.${PV} + usr/lib/libnvidia-cfg.so.${PV} + usr/lib/libnvidia-glcore.so.${PV} + usr/lib/libnvidia-ml.so.${PV} + usr/lib/opengl/nvidia/lib/libGL.so.${PV} + usr/lib/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib/xorg/modules/drivers/nvidia_drv.so + usr/lib/libXvMCNVIDIA.so.${PV} + usr/lib/libvdpau_nvidia.so.${PV} + usr/lib/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0 + usr/lib/libnvidia-compiler.so.${PV} + usr/lib/libnvcuvid.so.${PV} + opt/bin/nvidia-smi + opt/bin/nvidia-xconfig + opt/bin/nvidia-debugdump + opt/bin/nvidia-settings" + + +S="${WORKDIR}/" + +pkg_setup() { + # try to turn off distcc and ccache for people that have a problem with it + export DISTCC_DISABLE=1 + export CCACHE_DISABLE=1 + + if use amd64 && has_multilib_profile && [ "${DEFAULT_ABI}" != "amd64" ]; then + eerror "This ebuild doesn't currently support changing your default abi." + die "Unexpected \${DEFAULT_ABI} = ${DEFAULT_ABI}" + fi + + # On BSD userland it wants real make command + use userland_BSD && MAKE="$(get_bmake)" + + export _POSIX2_VERSION="199209" + + # set variables to where files are in the package structure + if use kernel_FreeBSD; then + NV_DOC="${S}/doc" + NV_EXEC="${S}/obj" + NV_LIB="${S}/obj" + NV_SRC="${S}/src" + NV_MAN="${S}/x11/man" + NV_X11="${S}/obj" + NV_X11_DRV="${NV_X11}" + NV_X11_EXT="${NV_X11}" + NV_SOVER=1 + elif use kernel_linux; then + NV_DOC="${S}" + NV_EXEC="${S}" + NV_LIB="${S}" + NV_SRC="${S}/kernel" + NV_MAN="${S}" + NV_X11="${S}" + NV_X11_DRV="${NV_X11}" + NV_X11_EXT="${NV_X11}" + NV_SOVER=${PV} + else + die "Could not determine proper NVIDIA package" + fi +} + +src_unpack() { + if ! use x86-fbsd; then + cd "${S}" + unpack_makeself + else + unpack ${A} + fi +} + +src_prepare() { + # Please add a brief description for every added patch + use x86-fbsd && cd doc + cat <<- EOF > "${S}"/nvidia.icd + /usr/$(get_libdir)/libcuda.so + EOF +} + +src_compile() { + # This is already the default on Linux, as there's no toplevel Makefile, but + # on FreeBSD there's one and triggers the kernel module build, as we install + # it by itself, pass this. + + cd "${NV_SRC}" + if use x86-fbsd; then + MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \ + LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die + fi +} + +src_install() { + if use kernel_linux; then + VIDEOGROUP="$(egetent group video | cut -d ':' -f 3)" + if [ -z "$VIDEOGROUP" ]; then + eerror "Failed to determine the video group gid." + die "Failed to determine the video group gid." + fi + + # Add the aliases + [ -f "${FILESDIR}/nvidia-169.07" ] || die "nvidia missing in FILESDIR" + sed -e 's:PACKAGE:'${PF}':g' \ + -e 's:VIDEOGID:'${VIDEOGROUP}':' "${FILESDIR}"/nvidia-169.07 > \ + "${WORKDIR}"/nvidia + insinto /etc/modprobe.d + newins "${WORKDIR}"/nvidia nvidia.conf || die + + # Ensures that our device nodes are created when not using X + exeinto /lib/udev + doexe "${FILESDIR}"/nvidia-udev.sh + + insinto /lib/udev/rules.d + newins "${FILESDIR}"/nvidia.udev-rule 99-nvidia.rules + fi + + # NVIDIA kernel <-> userspace driver config lib + dolib.so ${NV_LIB}/libnvidia-cfg.so.${NV_SOVER} || \ + die "failed to install libnvidia-cfg" + dosym libnvidia-cfg.so.${NV_SOVER} \ + /usr/$(get_libdir)/libnvidia-cfg.so.1 || \ + die "failed to create libnvidia-cfg.so symlink" + dosym libnvidia-cfg.so.1 \ + /usr/$(get_libdir)/libnvidia-cfg.so || \ + die "failed to create libnvidia-cfg.so symlink" + + # NVIDIA monitoring library + dolib.so ${NV_LIB}/libnvidia-ml.so.${NV_SOVER} || \ + die "failed to install libnvidia-ml" + dosym libnvidia-ml.so.${NV_SOVER} \ + /usr/$(get_libdir)/libnvidia-ml.so.1 || \ + die "failed to create libnvidia-ml.so symlink" + dosym libnvidia-ml.so.1 \ + /usr/$(get_libdir)/libnvidia-ml.so || \ + die "failed to create libnvidia-ml.so symlink" + + # NVIDIA video decode <-> CUDA + dolib.so ${NV_LIB}/libnvcuvid.so.${NV_SOVER} || \ + die "failed to install libnvcuvid.so" + dosym libnvcuvid.so.${NV_SOVER} \ + /usr/$(get_libdir)/libnvcuvid.so.1 || \ + die "failed to create libnvcuvid.so symlink" + dosym libnvcuvid.so.1 \ + /usr/$(get_libdir)/libnvcuvid.so || \ + die "failed to create libnvcuvid.so symlink" + + # Xorg DDX driver + insinto /usr/$(get_libdir)/xorg/modules/drivers + doins ${NV_X11_DRV}/nvidia_drv.so || die "failed to install nvidia_drv.so" + + # Xorg GLX driver + insinto /usr/$(get_libdir)/opengl/nvidia/extensions + doins ${NV_X11_EXT}/libglx.so.${NV_SOVER} || \ + die "failed to install libglx.so" + dosym libglx.so.${NV_SOVER} \ + /usr/$(get_libdir)/opengl/nvidia/extensions/libglx.so || \ + die "failed to create libglx.so symlink" + + # XvMC driver + dolib.a ${NV_X11}/libXvMCNVIDIA.a || \ + die "failed to install libXvMCNVIDIA.so" + dolib.so ${NV_X11}/libXvMCNVIDIA.so.${NV_SOVER} || \ + die "failed to install libXvMCNVIDIA.so" + dosym libXvMCNVIDIA.so.${NV_SOVER} \ + /usr/$(get_libdir)/libXvMCNVIDIA.so.1 || \ + die "failed to create libXvMCNVIDIA.so symlink" + dosym libXvMCNVIDIA.so.1 /usr/$(get_libdir)/libXvMCNVIDIA.so || \ + die "failed to create libXvMCNVIDIA.so symlink" + dosym libXvMCNVIDIA.so.${NV_SOVER} \ + /usr/$(get_libdir)/libXvMCNVIDIA_dynamic.so.1 || \ + die "failed to create libXvMCNVIDIA_dynamic.so symlink" + + # OpenCL ICD for NVIDIA + if use kernel_linux; then + insinto /etc/OpenCL/vendors + doins nvidia.icd + fi + + # Documentation + dohtml ${NV_DOC}/html/* + if use x86-fbsd; then + dodoc "${NV_DOC}/README" + doman "${NV_MAN}/nvidia-xconfig.1" + else + # Docs + newdoc "${NV_DOC}/README.txt" README + dodoc "${NV_DOC}/NVIDIA_Changelog" + doman "${NV_MAN}/nvidia-smi.1.gz" + doman "${NV_MAN}/nvidia-xconfig.1.gz" + fi + + # Helper Apps + exeinto /opt/bin/ + doexe ${NV_EXEC}/nvidia-xconfig || die + doexe ${NV_EXEC}/nvidia-debugdump || die + doexe ${NV_EXEC}/nvidia-bug-report.sh || die + if use kernel_linux; then + doexe ${NV_EXEC}/nvidia-smi || die + fi + + 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 + + is_final_abi || die "failed to iterate through all ABIs" + + # GNOME3 gnome-terminal redraw bug workaround, + # see: https://bugzilla.gnome.org/show_bug.cgi?id=664858 + doenvd "${FILESDIR}/90mutter-disable-culling" +} + +# Install nvidia library: +# the first parameter is the place where to install it +# the second parameter is the base name of the library +# the third parameter is the provided soversion +donvidia() { + dodir $1 + exeinto $1 + + libname=$(basename $2) + + doexe $2.$3 || die "failed to install $2" + dosym ${libname}.$3 $1/${libname} || die "failed to symlink $2" + [[ $3 != "1" ]] && dosym ${libname}.$3 $1/${libname}.1 +} + +src_install-libs() { + local inslibdir=$(get_libdir) + local NV_ROOT="/usr/${inslibdir}/opengl/nvidia" + local CL_ROOT=/usr/${inslibdir}/OpenCL/vendors/nvidia + local libdir= sover= + + if use kernel_linux; then + if has_multilib_profile && [[ ${ABI} == "x86" ]] ; then + libdir=32 + else + libdir=. + fi + sover=${PV} + else + libdir=obj + # on FreeBSD it has just .1 suffix + sover=1 + fi + + # The GLX libraries + donvidia ${NV_ROOT}/lib ${libdir}/libGL.so ${sover} + donvidia /usr/${inslibdir} ${libdir}/libnvidia-glcore.so ${sover} + if use x86-fbsd; then + donvidia ${NV_ROOT}/lib ${libdir}/libnvidia-tls.so ${sover} + else + donvidia ${NV_ROOT}/lib ${libdir}/tls/libnvidia-tls.so ${sover} + fi + + # VDPAU + donvidia /usr/${inslibdir} ${libdir}/libvdpau_nvidia.so ${sover} + + # CUDA & OpenCL + if use kernel_linux; then + donvidia /usr/${inslibdir} ${libdir}/libcuda.so ${sover} + donvidia /usr/${inslibdir} ${libdir}/libnvidia-compiler.so ${sover} + donvidia ${CL_ROOT} ${libdir}/libOpenCL.so 1.0.0 + #dosym libOpenCL.so.1 ${CL_ROOT}/libOpenCL.so + fi +} + +pkg_preinst() { + # Clean the dynamic libGL stuff's home to ensure + # we dont have stale libs floating around + if [ -d "${ROOT}"/usr/lib/opengl/nvidia ] ; then + rm -rf "${ROOT}"/usr/lib/opengl/nvidia/* + fi + # Make sure we nuke the old nvidia-glx's env.d file + if [ -e "${ROOT}"/etc/env.d/09nvidia ] ; then + rm -f "${ROOT}"/etc/env.d/09nvidia + fi +} + +pkg_postinst() { + # Switch to the nvidia implementation + "${ROOT}"/usr/bin/eselect opengl set --use-old nvidia + "${ROOT}"/usr/bin/eselect opencl set --use-old nvidia + + elog "To use the NVIDIA GLX, run \"eselect opengl set nvidia\"" + elog + elog "To use the NVIDIA CUDA/OpenCL, run \"eselect opencl set nvidia\"" + elog + elog "NVIDIA has requested that any bug reports submitted have the" + elog "output of /opt/bin/nvidia-bug-report.sh included." + elog + elog "To work with compiz, you must enable the AddARGBGLXVisuals option." + elog + elog "If you are having resolution problems, try disabling DynamicTwinView." + elog +} + +pkg_postrm() { + "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 +} diff --git a/x11-drivers/nvidia-userspace/nvidia-userspace-304.37.ebuild b/x11-drivers/nvidia-userspace/nvidia-userspace-304.37.ebuild new file mode 100644 index 00000000..636221f7 --- /dev/null +++ b/x11-drivers/nvidia-userspace/nvidia-userspace-304.37.ebuild @@ -0,0 +1,385 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=4 + +inherit eutils flag-o-matic linux-info linux-mod multilib nvidia-driver \ + portability toolchain-funcs unpacker user versionator + +X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}" +AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}" +X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}" +AMD64_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86_64-${PV}" + +DESCRIPTION="NVIDIA X11 userspace libraries and applications" +HOMEPAGE="http://www.nvidia.com/" +SRC_URI="x86? ( http://us.download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}.run ) + amd64? ( http://us.download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run ) + amd64-fbsd? ( http://us.download.nvidia.com/XFree86/FreeBSD-x86_64/${PV}/${AMD64_FBSD_NV_PACKAGE}.tar.gz ) + x86-fbsd? ( http://us.download.nvidia.com/XFree86/FreeBSD-x86/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )" + +LICENSE="NVIDIA" +SLOT="0" +KEYWORDS="-* ~amd64 ~x86 ~amd64-fbsd ~x86-fbsd" +IUSE="acpi multilib x-multilib kernel_FreeBSD kernel_linux tools +X" +RESTRICT="strip" +EMULTILIB_PKG="true" + +COMMON="app-admin/eselect-opencl + kernel_linux? ( >=sys-libs/glibc-2.6.1 ) + x-multilib? ( app-emulation/emul-linux-x86-xlibs ) + multilib? ( app-emulation/emul-linux-x86-baselibs ) + X? ( + <x11-base/xorg-server-1.12.99 + >=app-admin/eselect-opengl-1.0.9 + )" +DEPEND="${COMMON}" +RDEPEND="${COMMON} + X? ( x11-libs/libXvMC ) + !<x11-drivers/nvidia-userspace-${PV} + !>x11-drivers/nvidia-userspace-${PV} + acpi? ( sys-power/acpid ) + tools? ( media-video/nvidia-settings )" +PDEPEND="X? ( >=x11-libs/libvdpau-0.3-r1 )" + +REQUIRED_USE="tools? ( X )" +QA_PREBUILT="" +S="${WORKDIR}/" + +pkg_pretend() { + if use amd64 && has_multilib_profile && \ + [ "${DEFAULT_ABI}" != "amd64" ]; then + eerror "This ebuild doesn't currently support changing your default ABI" + die "Unexpected \${DEFAULT_ABI} = ${DEFAULT_ABI}" + fi + + # Kernel features/options to check for + CONFIG_CHECK="~ZONE_DMA ~MTRR ~SYSVIPC ~!LOCKDEP" + use x86 && CONFIG_CHECK+=" ~HIGHMEM" + + # Now do the above checks + use kernel_linux && check_extra_config +} + +pkg_setup() { + # try to turn off distcc and ccache for people that have a problem with it + export DISTCC_DISABLE=1 + export CCACHE_DISABLE=1 + + if use kernel_linux; then + linux-mod_pkg_setup + MODULE_NAMES="nvidia(video:${S}/kernel)" + BUILD_PARAMS="IGNORE_CC_MISMATCH=yes V=1 SYSSRC=${KV_DIR} \ + SYSOUT=${KV_OUT_DIR} CC=$(tc-getBUILD_CC)" + # linux-mod_src_compile calls set_arch_to_kernel, which + # sets the ARCH to x86 but NVIDIA's wrapping Makefile + # expects x86_64 or i386 and then converts it to x86 + # later on in the build process + BUILD_FIXES="ARCH=$(uname -m | sed -e 's/i.86/i386/')" + fi + + # Since Nvidia ships 3 different series of drivers, we need to give the user + # some kind of guidance as to what version they should install. This tries + # to point the user in the right direction but can't be perfect. check + # nvidia-driver.eclass + nvidia-driver-check-warning + + # set variables to where files are in the package structure + if use kernel_FreeBSD; then + use x86-fbsd && S="${WORKDIR}/${X86_FBSD_NV_PACKAGE}" + use amd64-fbsd && S="${WORKDIR}/${AMD64_FBSD_NV_PACKAGE}" + NV_DOC="${S}/doc" + NV_OBJ="${S}/obj" + NV_SRC="${S}/src" + NV_MAN="${S}/x11/man" + NV_X11="${S}/obj" + NV_SOVER=1 + elif use kernel_linux; then + NV_DOC="${S}" + NV_OBJ="${S}" + NV_SRC="${S}/kernel" + NV_MAN="${S}" + NV_X11="${S}" + NV_SOVER=${PV} + else + die "Could not determine proper NVIDIA package" + fi +} + +src_unpack() { + if ! use kernel_FreeBSD; then + cd "${S}" + unpack_makeself + else + unpack ${A} + fi +} + +src_prepare() { + # Please add a brief description for every added patch + cat <<- EOF > "${S}"/nvidia.icd + /usr/$(get_libdir)/libcuda.so + EOF + + # Allow user patches so they can support RC kernels and whatever else + epatch_user +} + +src_compile() { + # This is already the default on Linux, as there's no toplevel Makefile, but + # on FreeBSD there's one and triggers the kernel module build, as we install + # it by itself, pass this. + + cd "${NV_SRC}" + if use kernel_FreeBSD; then + MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \ + LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die + fi +} + +# Install nvidia library: +# the first parameter is the library to install +# the second parameter is the provided soversion +# the third parameter is the target directory if its not /usr/lib +donvidia() { + # Full path to library minus SOVER + MY_LIB="$1" + + # SOVER to use + MY_SOVER="$2" + + # Where to install + MY_DEST="$3" + + if [[ -z "${MY_DEST}" ]]; then + MY_DEST="/usr/$(get_libdir)" + action="dolib.so" + else + exeinto ${MY_DEST} + action="doexe" + fi + + # Get just the library name + libname=$(basename $1) + + # Add it to QA_PREBUILT + QA_PREBUILT+=" ${MY_DEST}/${libname}.${MY_SOVER}" + + # Install the library with the correct SOVER + ${action} ${MY_LIB}.${MY_SOVER} || \ + die "failed to install ${libname}" + + # If SOVER wasn't 1, then we need to create a .1 symlink + if [[ "${MY_SOVER}" != "1" ]]; then + dosym ${libname}.${MY_SOVER} \ + ${MY_DEST}/${libname}.1 || \ + die "failed to create ${libname} symlink" + fi + + # Always create the symlink from the raw lib to the .1 + dosym ${libname}.1 \ + ${MY_DEST}/${libname} || \ + die "failed to create ${libname} symlink" +} + +src_install() { + if use kernel_linux; then + VIDEOGROUP="$(egetent group video | cut -d ':' -f 3)" + if [ -z "$VIDEOGROUP" ]; then + eerror "Failed to determine the video group gid." + die "Failed to determine the video group gid." + fi + + # Add the aliases + [ -f "${FILESDIR}/nvidia-169.07" ] || die "nvidia missing in FILESDIR" + sed -e 's:PACKAGE:'${PF}':g' \ + -e 's:VIDEOGID:'${VIDEOGROUP}':' "${FILESDIR}"/nvidia-169.07 > \ + "${WORKDIR}"/nvidia + insinto /etc/modprobe.d + newins "${WORKDIR}"/nvidia nvidia.conf || die + + local udevdir=/lib/udev + has_version sys-fs/udev && udevdir="$($(tc-getPKG_CONFIG) --variable=udevdir udev)" + + # Ensures that our device nodes are created when not using X + exeinto "${udevdir}" + doexe "${FILESDIR}"/nvidia-udev.sh + + insinto "${udevdir}"/rules.d + newins "${FILESDIR}"/nvidia.udev-rule 99-nvidia.rules + elif use kernel_FreeBSD; then + if use x86-fbsd; then + insinto /boot/modules + doins "${S}/src/nvidia.kld" || die + fi + + exeinto /boot/modules + doexe "${S}/src/nvidia.ko" || die + fi + + # NVIDIA kernel <-> userspace driver config lib + donvidia ${NV_OBJ}/libnvidia-cfg.so ${NV_SOVER} + + if use kernel_linux; then + # NVIDIA video decode <-> CUDA + donvidia ${NV_OBJ}/libnvcuvid.so ${NV_SOVER} + fi + + if use X; then + # Xorg DDX driver + insinto /usr/$(get_libdir)/xorg/modules/drivers + doins ${NV_X11}/nvidia_drv.so || die "failed to install nvidia_drv.so" + + # Xorg GLX driver + donvidia ${NV_X11}/libglx.so ${NV_SOVER} \ + /usr/$(get_libdir)/opengl/nvidia/extensions + + # XvMC driver + dolib.a ${NV_X11}/libXvMCNVIDIA.a || \ + die "failed to install libXvMCNVIDIA.so" + donvidia ${NV_X11}/libXvMCNVIDIA.so ${NV_SOVER} + dosym libXvMCNVIDIA.so.${NV_SOVER} \ + /usr/$(get_libdir)/libXvMCNVIDIA_dynamic.so.1 || \ + die "failed to create libXvMCNVIDIA_dynamic.so symlink" + fi + + # OpenCL ICD for NVIDIA + if use kernel_linux; then + insinto /etc/OpenCL/vendors + doins nvidia.icd + fi + + # Documentation + dohtml ${NV_DOC}/html/* + if use kernel_FreeBSD; then + dodoc "${NV_DOC}/README" + use X && doman "${NV_MAN}/nvidia-xconfig.1" + else + # Docs + newdoc "${NV_DOC}/README.txt" README + dodoc "${NV_DOC}/NVIDIA_Changelog" + doman "${NV_MAN}/nvidia-smi.1.gz" + use X && doman "${NV_MAN}/nvidia-xconfig.1.gz" + doman "${NV_MAN}/nvidia-cuda-proxy-control.1.gz" + fi + + # Helper Apps + exeinto /opt/bin/ + if use X; then + doexe ${NV_OBJ}/nvidia-xconfig || die + fi + + if use kernel_linux ; then + doexe ${NV_OBJ}/nvidia-debugdump || die + doexe ${NV_OBJ}/nvidia-cuda-proxy-control || die + doexe ${NV_OBJ}/nvidia-cuda-proxy-server || die + doexe ${NV_OBJ}/nvidia-smi || die + newinitd "${FILESDIR}/nvidia-smi.init" nvidia-smi + fi + + exeinto /usr/bin/ + doexe ${NV_OBJ}/nvidia-bug-report.sh || die + + 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 + + is_final_abi || die "failed to iterate through all ABIs" + + # GNOME3 gnome-terminal redraw bug workaround, + # see: https://bugzilla.gnome.org/show_bug.cgi?id=664858 + doenvd "${FILESDIR}/90mutter-disable-culling" +} + +src_install-libs() { + local inslibdir=$(get_libdir) + local GL_ROOT="/usr/$(get_libdir)/opengl/nvidia/lib" + local CL_ROOT="/usr/$(get_libdir)/OpenCL/vendors/nvidia" + local libdir=${NV_OBJ} + + if use kernel_linux && has_multilib_profile && \ + [[ ${ABI} == "x86" ]] ; then + libdir=${NV_OBJ}/32 + fi + + if use X; then + # The GLX libraries + donvidia ${libdir}/libGL.so ${NV_SOVER} ${GL_ROOT} + donvidia ${libdir}/libnvidia-glcore.so ${NV_SOVER} + if use kernel_FreeBSD; then + donvidia ${libdir}/libnvidia-tls.so ${NV_SOVER} ${GL_ROOT} + else + donvidia ${libdir}/tls/libnvidia-tls.so ${NV_SOVER} ${GL_ROOT} + fi + + # VDPAU + donvidia ${libdir}/libvdpau_nvidia.so ${NV_SOVER} + fi + + # NVIDIA monitoring library + if use kernel_linux ; then + donvidia ${libdir}/libnvidia-ml.so ${NV_SOVER} + fi + + # CUDA & OpenCL + if use kernel_linux; then + donvidia ${libdir}/libcuda.so ${NV_SOVER} + donvidia ${libdir}/libnvidia-compiler.so ${NV_SOVER} + donvidia ${libdir}/libOpenCL.so 1.0.0 ${CL_ROOT} + fi +} + +pkg_preinst() { + # Clean the dynamic libGL stuff's home to ensure + # we dont have stale libs floating around + if [ -d "${ROOT}"/usr/lib/opengl/nvidia ] ; then + rm -rf "${ROOT}"/usr/lib/opengl/nvidia/* + fi + # Make sure we nuke the old nvidia-glx's env.d file + if [ -e "${ROOT}"/etc/env.d/09nvidia ] ; then + rm -f "${ROOT}"/etc/env.d/09nvidia + fi +} + +pkg_postinst() { + # Switch to the nvidia implementation + use X && "${ROOT}"/usr/bin/eselect opengl set --use-old nvidia + "${ROOT}"/usr/bin/eselect opencl set --use-old nvidia + + elog "You must be in the video group to use the NVIDIA device" + elog "For more info, read the docs at" + elog "http://www.gentoo.org/doc/en/nvidia-guide.xml#doc_chap3_sect6" + elog + elog "To use the NVIDIA GLX, run \"eselect opengl set nvidia\"" + elog + elog "To use the NVIDIA CUDA/OpenCL, run \"eselect opencl set nvidia\"" + elog + elog "NVIDIA has requested that any bug reports submitted have the" + elog "output of /opt/bin/nvidia-bug-report.sh included." + elog + if ! use X; then + elog "You have elected to not install the X.org driver. Along with" + elog "this the OpenGL libraries, XvMC, and VDPAU libraries were not" + elog "installed. Additionally, once the driver is loaded your card" + elog "and fan will run at max speed which may not be desirable." + elog "Use the 'nvidia-smi' init script to have your card and fan" + elog "speed scale appropriately." + elog + fi +} + +pkg_prerm() { + use X && "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 +} + +pkg_postrm() { + use X && "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 +} diff --git a/x11-drivers/nvidia-userspace/nvidia-userspace-304.88.ebuild b/x11-drivers/nvidia-userspace/nvidia-userspace-304.88.ebuild new file mode 100644 index 00000000..eabac720 --- /dev/null +++ b/x11-drivers/nvidia-userspace/nvidia-userspace-304.88.ebuild @@ -0,0 +1,379 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=4 + +inherit eutils flag-o-matic linux-info linux-mod multilib nvidia-driver \ + portability toolchain-funcs unpacker user versionator udev + +X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}" +AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}" +X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}" +AMD64_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86_64-${PV}" + +DESCRIPTION="NVIDIA X11 userspace libraries and applications" +HOMEPAGE="http://www.nvidia.com/" +SRC_URI="x86? ( ftp://download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}.run ) + amd64? ( ftp://download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run ) + amd64-fbsd? ( ftp://download.nvidia.com/XFree86/FreeBSD-x86_64/${PV}/${AMD64_FBSD_NV_PACKAGE}.tar.gz ) + x86-fbsd? ( ftp://download.nvidia.com/XFree86/FreeBSD-x86/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )" + +LICENSE="NVIDIA" +SLOT="0" +KEYWORDS="-* ~amd64 ~x86 ~amd64-fbsd ~x86-fbsd" +IUSE="acpi multilib x-multilib kernel_FreeBSD kernel_linux tools +X" +RESTRICT="strip" +EMULTILIB_PKG="true" + +COMMON="app-admin/eselect-opencl + kernel_linux? ( >=sys-libs/glibc-2.6.1 ) + x-multilib? ( app-emulation/emul-linux-x86-xlibs ) + multilib? ( app-emulation/emul-linux-x86-baselibs ) + X? ( + <x11-base/xorg-server-1.14.99 + >=app-admin/eselect-opengl-1.0.9 + )" +DEPEND="${COMMON}" +RDEPEND="${COMMON} + X? ( x11-libs/libXvMC ) + !<x11-drivers/nvidia-userspace-${PV} + !>x11-drivers/nvidia-userspace-${PV} + acpi? ( sys-power/acpid ) + tools? ( media-video/nvidia-settings )" +PDEPEND="X? ( >=x11-libs/libvdpau-0.3-r1 )" + +REQUIRED_USE="tools? ( X )" +QA_PREBUILT="opt/* usr/lib*" +S="${WORKDIR}/" + +pkg_pretend() { + if use amd64 && has_multilib_profile && \ + [ "${DEFAULT_ABI}" != "amd64" ]; then + eerror "This ebuild doesn't currently support changing your default ABI" + die "Unexpected \${DEFAULT_ABI} = ${DEFAULT_ABI}" + fi + + # Kernel features/options to check for + CONFIG_CHECK="~ZONE_DMA ~MTRR ~SYSVIPC ~!LOCKDEP" + use x86 && CONFIG_CHECK+=" ~HIGHMEM" + + # Now do the above checks + use kernel_linux && check_extra_config +} + +pkg_setup() { + # try to turn off distcc and ccache for people that have a problem with it + export DISTCC_DISABLE=1 + export CCACHE_DISABLE=1 + + if use kernel_linux; then + linux-mod_pkg_setup + MODULE_NAMES="nvidia(video:${S}/kernel)" + BUILD_PARAMS="IGNORE_CC_MISMATCH=yes V=1 SYSSRC=${KV_DIR} \ + SYSOUT=${KV_OUT_DIR} CC=$(tc-getBUILD_CC)" + # linux-mod_src_compile calls set_arch_to_kernel, which + # sets the ARCH to x86 but NVIDIA's wrapping Makefile + # expects x86_64 or i386 and then converts it to x86 + # later on in the build process + BUILD_FIXES="ARCH=$(uname -m | sed -e 's/i.86/i386/')" + fi + + # Since Nvidia ships 3 different series of drivers, we need to give the user + # some kind of guidance as to what version they should install. This tries + # to point the user in the right direction but can't be perfect. check + # nvidia-driver.eclass + nvidia-driver-check-warning + + # set variables to where files are in the package structure + if use kernel_FreeBSD; then + use x86-fbsd && S="${WORKDIR}/${X86_FBSD_NV_PACKAGE}" + use amd64-fbsd && S="${WORKDIR}/${AMD64_FBSD_NV_PACKAGE}" + NV_DOC="${S}/doc" + NV_OBJ="${S}/obj" + NV_SRC="${S}/src" + NV_MAN="${S}/x11/man" + NV_X11="${S}/obj" + NV_SOVER=1 + elif use kernel_linux; then + NV_DOC="${S}" + NV_OBJ="${S}" + NV_SRC="${S}/kernel" + NV_MAN="${S}" + NV_X11="${S}" + NV_SOVER=${PV} + else + die "Could not determine proper NVIDIA package" + fi +} + +src_unpack() { + if ! use kernel_FreeBSD; then + cd "${S}" + unpack_makeself + else + unpack ${A} + fi +} + +src_prepare() { + # Please add a brief description for every added patch + cat <<- EOF > "${S}"/nvidia.icd + /usr/$(get_libdir)/libnvidia-opencl.so + EOF + + # Allow user patches so they can support RC kernels and whatever else + epatch_user +} + +src_compile() { + # This is already the default on Linux, as there's no toplevel Makefile, but + # on FreeBSD there's one and triggers the kernel module build, as we install + # it by itself, pass this. + + cd "${NV_SRC}" + if use kernel_FreeBSD; then + MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \ + LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die + fi +} + +# Install nvidia library: +# the first parameter is the library to install +# the second parameter is the provided soversion +# the third parameter is the target directory if its not /usr/lib +donvidia() { + # Full path to library minus SOVER + MY_LIB="$1" + + # SOVER to use + MY_SOVER="$2" + + # Where to install + MY_DEST="$3" + + if [[ -z "${MY_DEST}" ]]; then + MY_DEST="/usr/$(get_libdir)" + action="dolib.so" + else + exeinto ${MY_DEST} + action="doexe" + fi + + # Get just the library name + libname=$(basename $1) + + # Install the library with the correct SOVER + ${action} ${MY_LIB}.${MY_SOVER} || \ + die "failed to install ${libname}" + + # If SOVER wasn't 1, then we need to create a .1 symlink + if [[ "${MY_SOVER}" != "1" ]]; then + dosym ${libname}.${MY_SOVER} \ + ${MY_DEST}/${libname}.1 || \ + die "failed to create ${libname} symlink" + fi + + # Always create the symlink from the raw lib to the .1 + dosym ${libname}.1 \ + ${MY_DEST}/${libname} || \ + die "failed to create ${libname} symlink" +} + +src_install() { + if use kernel_linux; then + VIDEOGROUP="$(egetent group video | cut -d ':' -f 3)" + if [ -z "$VIDEOGROUP" ]; then + eerror "Failed to determine the video group gid." + die "Failed to determine the video group gid." + fi + + # Add the aliases + [ -f "${FILESDIR}/nvidia-169.07" ] || die "nvidia missing in FILESDIR" + sed -e 's:PACKAGE:'${PF}':g' \ + -e 's:VIDEOGID:'${VIDEOGROUP}':' "${FILESDIR}"/nvidia-169.07 > \ + "${WORKDIR}"/nvidia + insinto /etc/modprobe.d + newins "${WORKDIR}"/nvidia nvidia.conf || die + + # Ensures that our device nodes are created when not using X + exeinto "$(udev_get_udevdir)" + doexe "${FILESDIR}"/nvidia-udev.sh + udev_newrules "${FILESDIR}"/nvidia.udev-rule 99-nvidia.rules + + elif use kernel_FreeBSD; then + if use x86-fbsd; then + insinto /boot/modules + doins "${S}/src/nvidia.kld" || die + fi + + exeinto /boot/modules + doexe "${S}/src/nvidia.ko" || die + fi + + # NVIDIA kernel <-> userspace driver config lib + donvidia ${NV_OBJ}/libnvidia-cfg.so ${NV_SOVER} + + if use kernel_linux; then + # NVIDIA video decode <-> CUDA + donvidia ${NV_OBJ}/libnvcuvid.so ${NV_SOVER} + fi + + if use X; then + # Xorg DDX driver + insinto /usr/$(get_libdir)/xorg/modules/drivers + doins ${NV_X11}/nvidia_drv.so || die "failed to install nvidia_drv.so" + + # Xorg GLX driver + donvidia ${NV_X11}/libglx.so ${NV_SOVER} \ + /usr/$(get_libdir)/opengl/nvidia/extensions + + # XvMC driver + dolib.a ${NV_X11}/libXvMCNVIDIA.a || \ + die "failed to install libXvMCNVIDIA.so" + donvidia ${NV_X11}/libXvMCNVIDIA.so ${NV_SOVER} + dosym libXvMCNVIDIA.so.${NV_SOVER} \ + /usr/$(get_libdir)/libXvMCNVIDIA_dynamic.so.1 || \ + die "failed to create libXvMCNVIDIA_dynamic.so symlink" + fi + + # OpenCL ICD for NVIDIA + if use kernel_linux; then + insinto /etc/OpenCL/vendors + doins nvidia.icd + donvidia ${NV_OBJ}/libnvidia-opencl.so ${NV_SOVER} + fi + + # Documentation + dohtml ${NV_DOC}/html/* + if use kernel_FreeBSD; then + dodoc "${NV_DOC}/README" + use X && doman "${NV_MAN}/nvidia-xconfig.1" + else + # Docs + newdoc "${NV_DOC}/README.txt" README + dodoc "${NV_DOC}/NVIDIA_Changelog" + doman "${NV_MAN}/nvidia-smi.1.gz" + use X && doman "${NV_MAN}/nvidia-xconfig.1.gz" + doman "${NV_MAN}/nvidia-cuda-proxy-control.1.gz" + fi + + # Helper Apps + exeinto /opt/bin/ + if use X; then + doexe ${NV_OBJ}/nvidia-xconfig || die + fi + + if use kernel_linux ; then + doexe ${NV_OBJ}/nvidia-debugdump || die + doexe ${NV_OBJ}/nvidia-cuda-proxy-control || die + doexe ${NV_OBJ}/nvidia-cuda-proxy-server || die + doexe ${NV_OBJ}/nvidia-smi || die + newinitd "${FILESDIR}/nvidia-smi.init" nvidia-smi + fi + + exeinto /usr/bin/ + doexe ${NV_OBJ}/nvidia-bug-report.sh || die + + 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 + + is_final_abi || die "failed to iterate through all ABIs" + + # GNOME3 gnome-terminal redraw bug workaround, + # see: https://bugzilla.gnome.org/show_bug.cgi?id=664858 + doenvd "${FILESDIR}/90mutter-disable-culling" +} + +src_install-libs() { + local inslibdir=$(get_libdir) + local GL_ROOT="/usr/$(get_libdir)/opengl/nvidia/lib" + local CL_ROOT="/usr/$(get_libdir)/OpenCL/vendors/nvidia" + local libdir=${NV_OBJ} + + if use kernel_linux && has_multilib_profile && \ + [[ ${ABI} == "x86" ]] ; then + libdir=${NV_OBJ}/32 + fi + + if use X; then + # The GLX libraries + donvidia ${libdir}/libGL.so ${NV_SOVER} ${GL_ROOT} + donvidia ${libdir}/libnvidia-glcore.so ${NV_SOVER} + if use kernel_FreeBSD; then + donvidia ${libdir}/libnvidia-tls.so ${NV_SOVER} ${GL_ROOT} + else + donvidia ${libdir}/tls/libnvidia-tls.so ${NV_SOVER} ${GL_ROOT} + fi + + # VDPAU + donvidia ${libdir}/libvdpau_nvidia.so ${NV_SOVER} + fi + + # NVIDIA monitoring library + if use kernel_linux ; then + donvidia ${libdir}/libnvidia-ml.so ${NV_SOVER} + fi + + # CUDA & OpenCL + if use kernel_linux; then + donvidia ${libdir}/libcuda.so ${NV_SOVER} + donvidia ${libdir}/libnvidia-compiler.so ${NV_SOVER} + donvidia ${libdir}/libOpenCL.so 1.0.0 ${CL_ROOT} + fi +} + +pkg_preinst() { + # Clean the dynamic libGL stuff's home to ensure + # we dont have stale libs floating around + if [ -d "${ROOT}"/usr/lib/opengl/nvidia ] ; then + rm -rf "${ROOT}"/usr/lib/opengl/nvidia/* + fi + # Make sure we nuke the old nvidia-glx's env.d file + if [ -e "${ROOT}"/etc/env.d/09nvidia ] ; then + rm -f "${ROOT}"/etc/env.d/09nvidia + fi +} + +pkg_postinst() { + # Switch to the nvidia implementation + use X && "${ROOT}"/usr/bin/eselect opengl set --use-old nvidia + "${ROOT}"/usr/bin/eselect opencl set --use-old nvidia + + elog "You must be in the video group to use the NVIDIA device" + elog "For more info, read the docs at" + elog "http://www.gentoo.org/doc/en/nvidia-guide.xml#doc_chap3_sect6" + elog + elog "To use the NVIDIA GLX, run \"eselect opengl set nvidia\"" + elog + elog "To use the NVIDIA CUDA/OpenCL, run \"eselect opencl set nvidia\"" + elog + elog "NVIDIA has requested that any bug reports submitted have the" + elog "output of /opt/bin/nvidia-bug-report.sh included." + elog + if ! use X; then + elog "You have elected to not install the X.org driver. Along with" + elog "this the OpenGL libraries, XvMC, and VDPAU libraries were not" + elog "installed. Additionally, once the driver is loaded your card" + elog "and fan will run at max speed which may not be desirable." + elog "Use the 'nvidia-smi' init script to have your card and fan" + elog "speed scale appropriately." + elog + fi +} + +pkg_prerm() { + use X && "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 +} + +pkg_postrm() { + use X && "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 +} diff --git a/x11-drivers/nvidia-userspace/nvidia-userspace-310.19.ebuild b/x11-drivers/nvidia-userspace/nvidia-userspace-310.19.ebuild new file mode 100644 index 00000000..636221f7 --- /dev/null +++ b/x11-drivers/nvidia-userspace/nvidia-userspace-310.19.ebuild @@ -0,0 +1,385 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=4 + +inherit eutils flag-o-matic linux-info linux-mod multilib nvidia-driver \ + portability toolchain-funcs unpacker user versionator + +X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}" +AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}" +X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}" +AMD64_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86_64-${PV}" + +DESCRIPTION="NVIDIA X11 userspace libraries and applications" +HOMEPAGE="http://www.nvidia.com/" +SRC_URI="x86? ( http://us.download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}.run ) + amd64? ( http://us.download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run ) + amd64-fbsd? ( http://us.download.nvidia.com/XFree86/FreeBSD-x86_64/${PV}/${AMD64_FBSD_NV_PACKAGE}.tar.gz ) + x86-fbsd? ( http://us.download.nvidia.com/XFree86/FreeBSD-x86/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )" + +LICENSE="NVIDIA" +SLOT="0" +KEYWORDS="-* ~amd64 ~x86 ~amd64-fbsd ~x86-fbsd" +IUSE="acpi multilib x-multilib kernel_FreeBSD kernel_linux tools +X" +RESTRICT="strip" +EMULTILIB_PKG="true" + +COMMON="app-admin/eselect-opencl + kernel_linux? ( >=sys-libs/glibc-2.6.1 ) + x-multilib? ( app-emulation/emul-linux-x86-xlibs ) + multilib? ( app-emulation/emul-linux-x86-baselibs ) + X? ( + <x11-base/xorg-server-1.12.99 + >=app-admin/eselect-opengl-1.0.9 + )" +DEPEND="${COMMON}" +RDEPEND="${COMMON} + X? ( x11-libs/libXvMC ) + !<x11-drivers/nvidia-userspace-${PV} + !>x11-drivers/nvidia-userspace-${PV} + acpi? ( sys-power/acpid ) + tools? ( media-video/nvidia-settings )" +PDEPEND="X? ( >=x11-libs/libvdpau-0.3-r1 )" + +REQUIRED_USE="tools? ( X )" +QA_PREBUILT="" +S="${WORKDIR}/" + +pkg_pretend() { + if use amd64 && has_multilib_profile && \ + [ "${DEFAULT_ABI}" != "amd64" ]; then + eerror "This ebuild doesn't currently support changing your default ABI" + die "Unexpected \${DEFAULT_ABI} = ${DEFAULT_ABI}" + fi + + # Kernel features/options to check for + CONFIG_CHECK="~ZONE_DMA ~MTRR ~SYSVIPC ~!LOCKDEP" + use x86 && CONFIG_CHECK+=" ~HIGHMEM" + + # Now do the above checks + use kernel_linux && check_extra_config +} + +pkg_setup() { + # try to turn off distcc and ccache for people that have a problem with it + export DISTCC_DISABLE=1 + export CCACHE_DISABLE=1 + + if use kernel_linux; then + linux-mod_pkg_setup + MODULE_NAMES="nvidia(video:${S}/kernel)" + BUILD_PARAMS="IGNORE_CC_MISMATCH=yes V=1 SYSSRC=${KV_DIR} \ + SYSOUT=${KV_OUT_DIR} CC=$(tc-getBUILD_CC)" + # linux-mod_src_compile calls set_arch_to_kernel, which + # sets the ARCH to x86 but NVIDIA's wrapping Makefile + # expects x86_64 or i386 and then converts it to x86 + # later on in the build process + BUILD_FIXES="ARCH=$(uname -m | sed -e 's/i.86/i386/')" + fi + + # Since Nvidia ships 3 different series of drivers, we need to give the user + # some kind of guidance as to what version they should install. This tries + # to point the user in the right direction but can't be perfect. check + # nvidia-driver.eclass + nvidia-driver-check-warning + + # set variables to where files are in the package structure + if use kernel_FreeBSD; then + use x86-fbsd && S="${WORKDIR}/${X86_FBSD_NV_PACKAGE}" + use amd64-fbsd && S="${WORKDIR}/${AMD64_FBSD_NV_PACKAGE}" + NV_DOC="${S}/doc" + NV_OBJ="${S}/obj" + NV_SRC="${S}/src" + NV_MAN="${S}/x11/man" + NV_X11="${S}/obj" + NV_SOVER=1 + elif use kernel_linux; then + NV_DOC="${S}" + NV_OBJ="${S}" + NV_SRC="${S}/kernel" + NV_MAN="${S}" + NV_X11="${S}" + NV_SOVER=${PV} + else + die "Could not determine proper NVIDIA package" + fi +} + +src_unpack() { + if ! use kernel_FreeBSD; then + cd "${S}" + unpack_makeself + else + unpack ${A} + fi +} + +src_prepare() { + # Please add a brief description for every added patch + cat <<- EOF > "${S}"/nvidia.icd + /usr/$(get_libdir)/libcuda.so + EOF + + # Allow user patches so they can support RC kernels and whatever else + epatch_user +} + +src_compile() { + # This is already the default on Linux, as there's no toplevel Makefile, but + # on FreeBSD there's one and triggers the kernel module build, as we install + # it by itself, pass this. + + cd "${NV_SRC}" + if use kernel_FreeBSD; then + MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \ + LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die + fi +} + +# Install nvidia library: +# the first parameter is the library to install +# the second parameter is the provided soversion +# the third parameter is the target directory if its not /usr/lib +donvidia() { + # Full path to library minus SOVER + MY_LIB="$1" + + # SOVER to use + MY_SOVER="$2" + + # Where to install + MY_DEST="$3" + + if [[ -z "${MY_DEST}" ]]; then + MY_DEST="/usr/$(get_libdir)" + action="dolib.so" + else + exeinto ${MY_DEST} + action="doexe" + fi + + # Get just the library name + libname=$(basename $1) + + # Add it to QA_PREBUILT + QA_PREBUILT+=" ${MY_DEST}/${libname}.${MY_SOVER}" + + # Install the library with the correct SOVER + ${action} ${MY_LIB}.${MY_SOVER} || \ + die "failed to install ${libname}" + + # If SOVER wasn't 1, then we need to create a .1 symlink + if [[ "${MY_SOVER}" != "1" ]]; then + dosym ${libname}.${MY_SOVER} \ + ${MY_DEST}/${libname}.1 || \ + die "failed to create ${libname} symlink" + fi + + # Always create the symlink from the raw lib to the .1 + dosym ${libname}.1 \ + ${MY_DEST}/${libname} || \ + die "failed to create ${libname} symlink" +} + +src_install() { + if use kernel_linux; then + VIDEOGROUP="$(egetent group video | cut -d ':' -f 3)" + if [ -z "$VIDEOGROUP" ]; then + eerror "Failed to determine the video group gid." + die "Failed to determine the video group gid." + fi + + # Add the aliases + [ -f "${FILESDIR}/nvidia-169.07" ] || die "nvidia missing in FILESDIR" + sed -e 's:PACKAGE:'${PF}':g' \ + -e 's:VIDEOGID:'${VIDEOGROUP}':' "${FILESDIR}"/nvidia-169.07 > \ + "${WORKDIR}"/nvidia + insinto /etc/modprobe.d + newins "${WORKDIR}"/nvidia nvidia.conf || die + + local udevdir=/lib/udev + has_version sys-fs/udev && udevdir="$($(tc-getPKG_CONFIG) --variable=udevdir udev)" + + # Ensures that our device nodes are created when not using X + exeinto "${udevdir}" + doexe "${FILESDIR}"/nvidia-udev.sh + + insinto "${udevdir}"/rules.d + newins "${FILESDIR}"/nvidia.udev-rule 99-nvidia.rules + elif use kernel_FreeBSD; then + if use x86-fbsd; then + insinto /boot/modules + doins "${S}/src/nvidia.kld" || die + fi + + exeinto /boot/modules + doexe "${S}/src/nvidia.ko" || die + fi + + # NVIDIA kernel <-> userspace driver config lib + donvidia ${NV_OBJ}/libnvidia-cfg.so ${NV_SOVER} + + if use kernel_linux; then + # NVIDIA video decode <-> CUDA + donvidia ${NV_OBJ}/libnvcuvid.so ${NV_SOVER} + fi + + if use X; then + # Xorg DDX driver + insinto /usr/$(get_libdir)/xorg/modules/drivers + doins ${NV_X11}/nvidia_drv.so || die "failed to install nvidia_drv.so" + + # Xorg GLX driver + donvidia ${NV_X11}/libglx.so ${NV_SOVER} \ + /usr/$(get_libdir)/opengl/nvidia/extensions + + # XvMC driver + dolib.a ${NV_X11}/libXvMCNVIDIA.a || \ + die "failed to install libXvMCNVIDIA.so" + donvidia ${NV_X11}/libXvMCNVIDIA.so ${NV_SOVER} + dosym libXvMCNVIDIA.so.${NV_SOVER} \ + /usr/$(get_libdir)/libXvMCNVIDIA_dynamic.so.1 || \ + die "failed to create libXvMCNVIDIA_dynamic.so symlink" + fi + + # OpenCL ICD for NVIDIA + if use kernel_linux; then + insinto /etc/OpenCL/vendors + doins nvidia.icd + fi + + # Documentation + dohtml ${NV_DOC}/html/* + if use kernel_FreeBSD; then + dodoc "${NV_DOC}/README" + use X && doman "${NV_MAN}/nvidia-xconfig.1" + else + # Docs + newdoc "${NV_DOC}/README.txt" README + dodoc "${NV_DOC}/NVIDIA_Changelog" + doman "${NV_MAN}/nvidia-smi.1.gz" + use X && doman "${NV_MAN}/nvidia-xconfig.1.gz" + doman "${NV_MAN}/nvidia-cuda-proxy-control.1.gz" + fi + + # Helper Apps + exeinto /opt/bin/ + if use X; then + doexe ${NV_OBJ}/nvidia-xconfig || die + fi + + if use kernel_linux ; then + doexe ${NV_OBJ}/nvidia-debugdump || die + doexe ${NV_OBJ}/nvidia-cuda-proxy-control || die + doexe ${NV_OBJ}/nvidia-cuda-proxy-server || die + doexe ${NV_OBJ}/nvidia-smi || die + newinitd "${FILESDIR}/nvidia-smi.init" nvidia-smi + fi + + exeinto /usr/bin/ + doexe ${NV_OBJ}/nvidia-bug-report.sh || die + + 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 + + is_final_abi || die "failed to iterate through all ABIs" + + # GNOME3 gnome-terminal redraw bug workaround, + # see: https://bugzilla.gnome.org/show_bug.cgi?id=664858 + doenvd "${FILESDIR}/90mutter-disable-culling" +} + +src_install-libs() { + local inslibdir=$(get_libdir) + local GL_ROOT="/usr/$(get_libdir)/opengl/nvidia/lib" + local CL_ROOT="/usr/$(get_libdir)/OpenCL/vendors/nvidia" + local libdir=${NV_OBJ} + + if use kernel_linux && has_multilib_profile && \ + [[ ${ABI} == "x86" ]] ; then + libdir=${NV_OBJ}/32 + fi + + if use X; then + # The GLX libraries + donvidia ${libdir}/libGL.so ${NV_SOVER} ${GL_ROOT} + donvidia ${libdir}/libnvidia-glcore.so ${NV_SOVER} + if use kernel_FreeBSD; then + donvidia ${libdir}/libnvidia-tls.so ${NV_SOVER} ${GL_ROOT} + else + donvidia ${libdir}/tls/libnvidia-tls.so ${NV_SOVER} ${GL_ROOT} + fi + + # VDPAU + donvidia ${libdir}/libvdpau_nvidia.so ${NV_SOVER} + fi + + # NVIDIA monitoring library + if use kernel_linux ; then + donvidia ${libdir}/libnvidia-ml.so ${NV_SOVER} + fi + + # CUDA & OpenCL + if use kernel_linux; then + donvidia ${libdir}/libcuda.so ${NV_SOVER} + donvidia ${libdir}/libnvidia-compiler.so ${NV_SOVER} + donvidia ${libdir}/libOpenCL.so 1.0.0 ${CL_ROOT} + fi +} + +pkg_preinst() { + # Clean the dynamic libGL stuff's home to ensure + # we dont have stale libs floating around + if [ -d "${ROOT}"/usr/lib/opengl/nvidia ] ; then + rm -rf "${ROOT}"/usr/lib/opengl/nvidia/* + fi + # Make sure we nuke the old nvidia-glx's env.d file + if [ -e "${ROOT}"/etc/env.d/09nvidia ] ; then + rm -f "${ROOT}"/etc/env.d/09nvidia + fi +} + +pkg_postinst() { + # Switch to the nvidia implementation + use X && "${ROOT}"/usr/bin/eselect opengl set --use-old nvidia + "${ROOT}"/usr/bin/eselect opencl set --use-old nvidia + + elog "You must be in the video group to use the NVIDIA device" + elog "For more info, read the docs at" + elog "http://www.gentoo.org/doc/en/nvidia-guide.xml#doc_chap3_sect6" + elog + elog "To use the NVIDIA GLX, run \"eselect opengl set nvidia\"" + elog + elog "To use the NVIDIA CUDA/OpenCL, run \"eselect opencl set nvidia\"" + elog + elog "NVIDIA has requested that any bug reports submitted have the" + elog "output of /opt/bin/nvidia-bug-report.sh included." + elog + if ! use X; then + elog "You have elected to not install the X.org driver. Along with" + elog "this the OpenGL libraries, XvMC, and VDPAU libraries were not" + elog "installed. Additionally, once the driver is loaded your card" + elog "and fan will run at max speed which may not be desirable." + elog "Use the 'nvidia-smi' init script to have your card and fan" + elog "speed scale appropriately." + elog + fi +} + +pkg_prerm() { + use X && "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 +} + +pkg_postrm() { + use X && "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 +} diff --git a/x11-drivers/nvidia-userspace/nvidia-userspace-313.30.ebuild b/x11-drivers/nvidia-userspace/nvidia-userspace-313.30.ebuild new file mode 100644 index 00000000..97a23ea4 --- /dev/null +++ b/x11-drivers/nvidia-userspace/nvidia-userspace-313.30.ebuild @@ -0,0 +1,368 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=5 + +inherit eutils flag-o-matic linux-info linux-mod multilib nvidia-driver \ + portability toolchain-funcs unpacker user udev + +X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}" +AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}" +X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}" +AMD64_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86_64-${PV}" + +DESCRIPTION="NVIDIA X11 userspace libraries and applications" +HOMEPAGE="http://www.nvidia.com/" +SRC_URI="x86? ( ftp://download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}.run ) + amd64? ( ftp://download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run ) + amd64-fbsd? ( ftp://download.nvidia.com/XFree86/FreeBSD-x86_64/${PV}/${AMD64_FBSD_NV_PACKAGE}.tar.gz ) + x86-fbsd? ( ftp://download.nvidia.com/XFree86/FreeBSD-x86/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )" + +LICENSE="NVIDIA" +SLOT="0" +KEYWORDS="-* ~amd64 ~x86 ~amd64-fbsd ~x86-fbsd" +IUSE="acpi multilib x-multilib kernel_FreeBSD kernel_linux tools +X" +RESTRICT="strip" +EMULTILIB_PKG="true" + +COMMON="app-admin/eselect-opencl + kernel_linux? ( >=sys-libs/glibc-2.6.1 ) + x-multilib? ( app-emulation/emul-linux-x86-xlibs ) + multilib? ( app-emulation/emul-linux-x86-baselibs ) + X? ( + <x11-base/xorg-server-1.14.99 + >=app-admin/eselect-opengl-1.0.9 + )" +DEPEND="${COMMON}" +RDEPEND="${COMMON} + X? ( x11-libs/libXvMC ) + !<x11-drivers/nvidia-userspace-${PV} + !>x11-drivers/nvidia-userspace-${PV} + acpi? ( sys-power/acpid ) + tools? ( media-video/nvidia-settings )" +PDEPEND="X? ( >=x11-libs/libvdpau-0.3-r1 )" + +REQUIRED_USE="tools? ( X )" +QA_PREBUILT="opt/* usr/lib*" +S="${WORKDIR}/" + +pkg_pretend() { + if use amd64 && has_multilib_profile && \ + [ "${DEFAULT_ABI}" != "amd64" ]; then + eerror "This ebuild doesn't currently support changing your default ABI" + die "Unexpected \${DEFAULT_ABI} = ${DEFAULT_ABI}" + fi + + # Kernel features/options to check for + CONFIG_CHECK="~ZONE_DMA ~MTRR ~SYSVIPC ~!LOCKDEP" + use x86 && CONFIG_CHECK+=" ~HIGHMEM" + + # Now do the above checks + use kernel_linux && check_extra_config +} + +pkg_setup() { + # try to turn off distcc and ccache for people that have a problem with it + export DISTCC_DISABLE=1 + export CCACHE_DISABLE=1 + + if use kernel_linux; then + linux-mod_pkg_setup + MODULE_NAMES="nvidia(video:${S}/kernel)" + BUILD_PARAMS="IGNORE_CC_MISMATCH=yes V=1 SYSSRC=${KV_DIR} \ + SYSOUT=${KV_OUT_DIR} CC=$(tc-getBUILD_CC)" + # linux-mod_src_compile calls set_arch_to_kernel, which + # sets the ARCH to x86 but NVIDIA's wrapping Makefile + # expects x86_64 or i386 and then converts it to x86 + # later on in the build process + BUILD_FIXES="ARCH=$(uname -m | sed -e 's/i.86/i386/')" + fi + + # Since Nvidia ships 3 different series of drivers, we need to give the user + # some kind of guidance as to what version they should install. This tries + # to point the user in the right direction but can't be perfect. check + # nvidia-driver.eclass + nvidia-driver-check-warning + + # set variables to where files are in the package structure + if use kernel_FreeBSD; then + use x86-fbsd && S="${WORKDIR}/${X86_FBSD_NV_PACKAGE}" + use amd64-fbsd && S="${WORKDIR}/${AMD64_FBSD_NV_PACKAGE}" + NV_DOC="${S}/doc" + NV_OBJ="${S}/obj" + NV_SRC="${S}/src" + NV_MAN="${S}/x11/man" + NV_X11="${S}/obj" + NV_SOVER=1 + elif use kernel_linux; then + NV_DOC="${S}" + NV_OBJ="${S}" + NV_SRC="${S}/kernel" + NV_MAN="${S}" + NV_X11="${S}" + NV_SOVER=${PV} + else + die "Could not determine proper NVIDIA package" + fi +} + +src_unpack() { + if ! use kernel_FreeBSD; then + cd "${S}" + unpack_makeself + else + unpack ${A} + fi +} + +src_prepare() { + # Please add a brief description for every added patch + + # Allow user patches so they can support RC kernels and whatever else + epatch_user +} + +src_compile() { + # This is already the default on Linux, as there's no toplevel Makefile, but + # on FreeBSD there's one and triggers the kernel module build, as we install + # it by itself, pass this. + + cd "${NV_SRC}" + if use kernel_FreeBSD; then + MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \ + LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die + fi +} + +# Install nvidia library: +# the first parameter is the library to install +# the second parameter is the provided soversion +# the third parameter is the target directory if its not /usr/lib +donvidia() { + # Full path to library minus SOVER + MY_LIB="$1" + + # SOVER to use + MY_SOVER="$2" + + # Where to install + MY_DEST="$3" + + if [[ -z "${MY_DEST}" ]]; then + MY_DEST="/usr/$(get_libdir)" + action="dolib.so" + else + exeinto ${MY_DEST} + action="doexe" + fi + + # Get just the library name + libname=$(basename $1) + + # Install the library with the correct SOVER + ${action} ${MY_LIB}.${MY_SOVER} || \ + die "failed to install ${libname}" + + # If SOVER wasn't 1, then we need to create a .1 symlink + if [[ "${MY_SOVER}" != "1" ]]; then + dosym ${libname}.${MY_SOVER} \ + ${MY_DEST}/${libname}.1 || \ + die "failed to create ${libname} symlink" + fi + + # Always create the symlink from the raw lib to the .1 + dosym ${libname}.1 \ + ${MY_DEST}/${libname} || \ + die "failed to create ${libname} symlink" +} + +src_install() { + if use kernel_linux; then + VIDEOGROUP="$(egetent group video | cut -d ':' -f 3)" + if [ -z "$VIDEOGROUP" ]; then + eerror "Failed to determine the video group gid." + die "Failed to determine the video group gid." + fi + + # Add the aliases + [ -f "${FILESDIR}/nvidia-169.07" ] || die "nvidia missing in FILESDIR" + sed -e 's:PACKAGE:'${PF}':g' \ + -e 's:VIDEOGID:'${VIDEOGROUP}':' "${FILESDIR}"/nvidia-169.07 > \ + "${WORKDIR}"/nvidia + insinto /etc/modprobe.d + newins "${WORKDIR}"/nvidia nvidia.conf || die + + # Ensures that our device nodes are created when not using X + exeinto "$(udev_get_udevdir)" + doexe "${FILESDIR}"/nvidia-udev.sh + udev_newrules "${FILESDIR}"/nvidia.udev-rule 99-nvidia.rules + elif use kernel_FreeBSD; then + if use x86-fbsd; then + insinto /boot/modules + doins "${S}/src/nvidia.kld" || die + fi + + exeinto /boot/modules + doexe "${S}/src/nvidia.ko" || die + fi + + # NVIDIA kernel <-> userspace driver config lib + donvidia ${NV_OBJ}/libnvidia-cfg.so ${NV_SOVER} + + # NVIDIA video encode/decode <-> CUDA + if use kernel_linux; then + donvidia ${NV_OBJ}/libnvcuvid.so ${NV_SOVER} + donvidia ${NV_OBJ}/libnvidia-encode.so ${NV_SOVER} + fi + + if use X; then + # Xorg DDX driver + insinto /usr/$(get_libdir)/xorg/modules/drivers + doins ${NV_X11}/nvidia_drv.so || die "failed to install nvidia_drv.so" + + # Xorg GLX driver + donvidia ${NV_X11}/libglx.so ${NV_SOVER} \ + /usr/$(get_libdir)/opengl/nvidia/extensions + fi + + # OpenCL ICD for NVIDIA + if use kernel_linux; then + insinto /etc/OpenCL/vendors + doins ${NV_OBJ}/nvidia.icd + fi + + # Documentation + dohtml ${NV_DOC}/html/* + if use kernel_FreeBSD; then + dodoc "${NV_DOC}/README" + use X && doman "${NV_MAN}/nvidia-xconfig.1" + else + # Docs + newdoc "${NV_DOC}/README.txt" README + dodoc "${NV_DOC}/NVIDIA_Changelog" + doman "${NV_MAN}/nvidia-smi.1.gz" + use X && doman "${NV_MAN}/nvidia-xconfig.1.gz" + doman "${NV_MAN}/nvidia-cuda-proxy-control.1.gz" + fi + + # Helper Apps + exeinto /opt/bin/ + if use X; then + doexe ${NV_OBJ}/nvidia-xconfig || die + fi + + if use kernel_linux ; then + doexe ${NV_OBJ}/nvidia-debugdump || die + doexe ${NV_OBJ}/nvidia-cuda-proxy-control || die + doexe ${NV_OBJ}/nvidia-cuda-proxy-server || die + doexe ${NV_OBJ}/nvidia-smi || die + newinitd "${FILESDIR}/nvidia-smi.init" nvidia-smi + fi + + exeinto /usr/bin/ + doexe ${NV_OBJ}/nvidia-bug-report.sh || die + + 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 + + is_final_abi || die "failed to iterate through all ABIs" + + # GNOME3 gnome-terminal redraw bug workaround, + # see: https://bugzilla.gnome.org/show_bug.cgi?id=664858 + doenvd "${FILESDIR}/90mutter-disable-culling" +} + +src_install-libs() { + local inslibdir=$(get_libdir) + local GL_ROOT="/usr/$(get_libdir)/opengl/nvidia/lib" + local CL_ROOT="/usr/$(get_libdir)/OpenCL/vendors/nvidia" + local libdir=${NV_OBJ} + + if use kernel_linux && has_multilib_profile && \ + [[ ${ABI} == "x86" ]] ; then + libdir=${NV_OBJ}/32 + fi + + if use X; then + # The GLX libraries + donvidia ${libdir}/libGL.so ${NV_SOVER} ${GL_ROOT} + donvidia ${libdir}/libnvidia-glcore.so ${NV_SOVER} + if use kernel_FreeBSD; then + donvidia ${libdir}/libnvidia-tls.so ${NV_SOVER} + else + donvidia ${libdir}/tls/libnvidia-tls.so ${NV_SOVER} + fi + + # VDPAU + donvidia ${libdir}/libvdpau_nvidia.so ${NV_SOVER} + fi + + # NVIDIA monitoring library + if use kernel_linux ; then + donvidia ${libdir}/libnvidia-ml.so ${NV_SOVER} + fi + + # CUDA & OpenCL + if use kernel_linux; then + donvidia ${libdir}/libcuda.so ${NV_SOVER} + donvidia ${libdir}/libnvidia-compiler.so ${NV_SOVER} + donvidia ${libdir}/libOpenCL.so 1.0.0 ${CL_ROOT} + donvidia ${libdir}/libnvidia-opencl.so ${NV_SOVER} + fi +} + +pkg_preinst() { + # Clean the dynamic libGL stuff's home to ensure + # we dont have stale libs floating around + if [ -d "${ROOT}"/usr/lib/opengl/nvidia ] ; then + rm -rf "${ROOT}"/usr/lib/opengl/nvidia/* + fi + # Make sure we nuke the old nvidia-glx's env.d file + if [ -e "${ROOT}"/etc/env.d/09nvidia ] ; then + rm -f "${ROOT}"/etc/env.d/09nvidia + fi +} + +pkg_postinst() { + # Switch to the nvidia implementation + use X && "${ROOT}"/usr/bin/eselect opengl set --use-old nvidia + "${ROOT}"/usr/bin/eselect opencl set --use-old nvidia + + elog "You must be in the video group to use the NVIDIA device" + elog "For more info, read the docs at" + elog "http://www.gentoo.org/doc/en/nvidia-guide.xml#doc_chap3_sect6" + elog + elog "To use the NVIDIA GLX, run \"eselect opengl set nvidia\"" + elog + elog "To use the NVIDIA CUDA/OpenCL, run \"eselect opencl set nvidia\"" + elog + elog "NVIDIA has requested that any bug reports submitted have the" + elog "output of /opt/bin/nvidia-bug-report.sh included." + elog + if ! use X; then + elog "You have elected to not install the X.org driver. Along with" + elog "this the OpenGL libraries and VDPAU libraries were not" + elog "installed. Additionally, once the driver is loaded your card" + elog "and fan will run at max speed which may not be desirable." + elog "Use the 'nvidia-smi' init script to have your card and fan" + elog "speed scale appropriately." + elog + fi +} + +pkg_prerm() { + use X && "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 +} + +pkg_postrm() { + use X && "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 +} diff --git a/x11-drivers/nvidia-userspace/nvidia-userspace-325.15.ebuild b/x11-drivers/nvidia-userspace/nvidia-userspace-325.15.ebuild new file mode 100644 index 00000000..05413f29 --- /dev/null +++ b/x11-drivers/nvidia-userspace/nvidia-userspace-325.15.ebuild @@ -0,0 +1,372 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=5 + +inherit eutils flag-o-matic linux-info linux-mod multilib nvidia-driver \ + portability toolchain-funcs unpacker user udev + +NV_URI="http://us.download.nvidia.com/XFree86/" +X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}" +AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}" +X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}" +AMD64_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86_64-${PV}" + +DESCRIPTION="NVIDIA X11 userspace libraries and applications" +HOMEPAGE="http://www.nvidia.com/" +SRC_URI=" + amd64-fbsd? ( ${NV_URI}FreeBSD-x86_64/${PV}/${AMD64_FBSD_NV_PACKAGE}.tar.gz ) + amd64? ( ${NV_URI}Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run ) + x86-fbsd? ( ${NV_URI}FreeBSD-x86/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz ) + x86? ( ${NV_URI}Linux-x86/${PV}/${X86_NV_PACKAGE}.run ) +" + +LICENSE="GPL-2 NVIDIA-r1" +SLOT="0" +KEYWORDS="-* ~amd64 ~x86 ~amd64-fbsd ~x86-fbsd" +IUSE="acpi multilib x-multilib kernel_FreeBSD kernel_linux tools +X" +RESTRICT="bindist mirror strip" +EMULTILIB_PKG="true" + +COMMON="app-admin/eselect-opencl + kernel_linux? ( >=sys-libs/glibc-2.6.1 ) + x-multilib? ( app-emulation/emul-linux-x86-xlibs ) + multilib? ( app-emulation/emul-linux-x86-baselibs ) + X? ( + >=app-admin/eselect-opengl-1.0.9 + )" +DEPEND="${COMMON}" +RDEPEND="${COMMON} + X? ( x11-libs/libXvMC ) + !<x11-drivers/nvidia-userspace-${PV} + !>x11-drivers/nvidia-userspace-${PV} + acpi? ( sys-power/acpid ) + tools? ( media-video/nvidia-settings )" +PDEPEND="X? ( + <x11-base/xorg-server-1.14.99 + >=x11-libs/libvdpau-0.3-r1 + )" + +REQUIRED_USE="tools? ( X )" +QA_PREBUILT="opt/* usr/lib*" +S="${WORKDIR}/" + +pkg_pretend() { + if use amd64 && has_multilib_profile && \ + [ "${DEFAULT_ABI}" != "amd64" ]; then + eerror "This ebuild doesn't currently support changing your default ABI" + die "Unexpected \${DEFAULT_ABI} = ${DEFAULT_ABI}" + fi + + # Kernel features/options to check for + CONFIG_CHECK="~ZONE_DMA ~MTRR ~SYSVIPC ~!LOCKDEP" + use x86 && CONFIG_CHECK+=" ~HIGHMEM" + + # Now do the above checks + use kernel_linux && check_extra_config +} + +pkg_setup() { + # try to turn off distcc and ccache for people that have a problem with it + export DISTCC_DISABLE=1 + export CCACHE_DISABLE=1 + + if use kernel_linux; then + linux-mod_pkg_setup + MODULE_NAMES="nvidia(video:${S}/kernel)" + BUILD_PARAMS="IGNORE_CC_MISMATCH=yes V=1 SYSSRC=${KV_DIR} \ + SYSOUT=${KV_OUT_DIR} CC=$(tc-getBUILD_CC)" + # linux-mod_src_compile calls set_arch_to_kernel, which + # sets the ARCH to x86 but NVIDIA's wrapping Makefile + # expects x86_64 or i386 and then converts it to x86 + # later on in the build process + BUILD_FIXES="ARCH=$(uname -m | sed -e 's/i.86/i386/')" + fi + + # set variables to where files are in the package structure + if use kernel_FreeBSD; then + use x86-fbsd && S="${WORKDIR}/${X86_FBSD_NV_PACKAGE}" + use amd64-fbsd && S="${WORKDIR}/${AMD64_FBSD_NV_PACKAGE}" + NV_DOC="${S}/doc" + NV_OBJ="${S}/obj" + NV_SRC="${S}/src" + NV_MAN="${S}/x11/man" + NV_X11="${S}/obj" + NV_SOVER=1 + elif use kernel_linux; then + NV_DOC="${S}" + NV_OBJ="${S}" + NV_SRC="${S}/kernel" + NV_MAN="${S}" + NV_X11="${S}" + NV_SOVER=${PV} + else + die "Could not determine proper NVIDIA package" + fi +} + +src_unpack() { + if ! use kernel_FreeBSD; then + cd "${S}" + unpack_makeself + else + unpack ${A} + fi +} + +src_prepare() { + # Please add a brief description for every added patch + + # Allow user patches so they can support RC kernels and whatever else + epatch_user +} + +src_compile() { + # This is already the default on Linux, as there's no toplevel Makefile, but + # on FreeBSD there's one and triggers the kernel module build, as we install + # it by itself, pass this. + + cd "${NV_SRC}" + if use kernel_FreeBSD; then + MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \ + LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die + fi +} + +# Install nvidia library: +# the first parameter is the library to install +# the second parameter is the provided soversion +# the third parameter is the target directory if its not /usr/lib +donvidia() { + # Full path to library minus SOVER + MY_LIB="$1" + + # SOVER to use + MY_SOVER="$2" + + # Where to install + MY_DEST="$3" + + if [[ -z "${MY_DEST}" ]]; then + MY_DEST="/usr/$(get_libdir)" + action="dolib.so" + else + exeinto ${MY_DEST} + action="doexe" + fi + + # Get just the library name + libname=$(basename $1) + + # Install the library with the correct SOVER + ${action} ${MY_LIB}.${MY_SOVER} || \ + die "failed to install ${libname}" + + # If SOVER wasn't 1, then we need to create a .1 symlink + if [[ "${MY_SOVER}" != "1" ]]; then + dosym ${libname}.${MY_SOVER} \ + ${MY_DEST}/${libname}.1 || \ + die "failed to create ${libname} symlink" + fi + + # Always create the symlink from the raw lib to the .1 + dosym ${libname}.1 \ + ${MY_DEST}/${libname} || \ + die "failed to create ${libname} symlink" +} + +src_install() { + if use kernel_linux; then + VIDEOGROUP="$(egetent group video | cut -d ':' -f 3)" + if [ -z "$VIDEOGROUP" ]; then + eerror "Failed to determine the video group gid." + die "Failed to determine the video group gid." + fi + + # Add the aliases + [ -f "${FILESDIR}/nvidia-169.07" ] || die "nvidia missing in FILESDIR" + sed -e 's:PACKAGE:'${PF}':g' \ + -e 's:VIDEOGID:'${VIDEOGROUP}':' "${FILESDIR}"/nvidia-169.07 > \ + "${WORKDIR}"/nvidia + insinto /etc/modprobe.d + newins "${WORKDIR}"/nvidia nvidia.conf + + # Ensures that our device nodes are created when not using X + exeinto "$(udev_get_udevdir)" + doexe "${FILESDIR}"/nvidia-udev.sh + udev_newrules "${FILESDIR}"/nvidia.udev-rule 99-nvidia.rules + elif use kernel_FreeBSD; then + if use x86-fbsd; then + insinto /boot/modules + doins "${S}/src/nvidia.kld" + fi + + exeinto /boot/modules + doexe "${S}/src/nvidia.ko" + fi + + # NVIDIA kernel <-> userspace driver config lib + donvidia ${NV_OBJ}/libnvidia-cfg.so ${NV_SOVER} + + # NVIDIA video encode/decode <-> CUDA + if use kernel_linux; then + donvidia ${NV_OBJ}/libnvcuvid.so ${NV_SOVER} + donvidia ${NV_OBJ}/libnvidia-encode.so ${NV_SOVER} + fi + + if use X; then + # Xorg DDX driver + insinto /usr/$(get_libdir)/xorg/modules/drivers + doins ${NV_X11}/nvidia_drv.so + + # Xorg GLX driver + donvidia ${NV_X11}/libglx.so ${NV_SOVER} \ + /usr/$(get_libdir)/opengl/nvidia/extensions + fi + + # OpenCL ICD for NVIDIA + if use kernel_linux; then + insinto /etc/OpenCL/vendors + doins ${NV_OBJ}/nvidia.icd + fi + + # Documentation + dohtml ${NV_DOC}/html/* + if use kernel_FreeBSD; then + dodoc "${NV_DOC}/README" + use X && doman "${NV_MAN}/nvidia-xconfig.1" + else + # Docs + newdoc "${NV_DOC}/README.txt" README + dodoc "${NV_DOC}/NVIDIA_Changelog" + doman "${NV_MAN}/nvidia-smi.1.gz" + doman "${NV_MAN}/nvidia-cuda-mps-control.1.gz" + use X && doman "${NV_MAN}/nvidia-xconfig.1.gz" + fi + + # Helper Apps + exeinto /opt/bin/ + if use X; then + doexe ${NV_OBJ}/nvidia-xconfig + fi + + if use kernel_linux ; then + doexe ${NV_OBJ}/nvidia-cuda-mps-control + doexe ${NV_OBJ}/nvidia-cuda-mps-server + doexe ${NV_OBJ}/nvidia-debugdump + doexe ${NV_OBJ}/nvidia-modprobe + doexe ${NV_OBJ}/nvidia-persistenced + doexe ${NV_OBJ}/nvidia-smi + doman nvidia-cuda-mps-control.1.gz + doman nvidia-modprobe.1.gz + doman nvidia-persistenced.1.gz + newinitd "${FILESDIR}/nvidia-smi.init" nvidia-smi + fi + + exeinto /usr/bin/ + doexe ${NV_OBJ}/nvidia-bug-report.sh + + 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 + + is_final_abi || die "failed to iterate through all ABIs" + + # GNOME3 gnome-terminal redraw bug workaround, + # see: https://bugzilla.gnome.org/show_bug.cgi?id=664858 + doenvd "${FILESDIR}/90mutter-disable-culling" +} + +src_install-libs() { + local inslibdir=$(get_libdir) + local GL_ROOT="/usr/$(get_libdir)/opengl/nvidia/lib" + local CL_ROOT="/usr/$(get_libdir)/OpenCL/vendors/nvidia" + local libdir=${NV_OBJ} + + if use kernel_linux && has_multilib_profile && \ + [[ ${ABI} == "x86" ]] ; then + libdir=${NV_OBJ}/32 + fi + + if use X; then + # The GLX libraries + donvidia ${libdir}/libGL.so ${NV_SOVER} ${GL_ROOT} + donvidia ${libdir}/libnvidia-glcore.so ${NV_SOVER} + if use kernel_FreeBSD; then + donvidia ${libdir}/libnvidia-tls.so ${NV_SOVER} + else + donvidia ${libdir}/tls/libnvidia-tls.so ${NV_SOVER} + fi + + # VDPAU + donvidia ${libdir}/libvdpau_nvidia.so ${NV_SOVER} + fi + + # NVIDIA monitoring library + if use kernel_linux ; then + donvidia ${libdir}/libnvidia-ml.so ${NV_SOVER} + fi + + # CUDA & OpenCL + if use kernel_linux; then + donvidia ${libdir}/libcuda.so ${NV_SOVER} + donvidia ${libdir}/libnvidia-compiler.so ${NV_SOVER} + donvidia ${libdir}/libOpenCL.so 1.0.0 ${CL_ROOT} + donvidia ${libdir}/libnvidia-opencl.so ${NV_SOVER} + fi +} + +pkg_preinst() { + # Clean the dynamic libGL stuff's home to ensure + # we dont have stale libs floating around + if [ -d "${ROOT}"/usr/lib/opengl/nvidia ] ; then + rm -rf "${ROOT}"/usr/lib/opengl/nvidia/* + fi + # Make sure we nuke the old nvidia-glx's env.d file + if [ -e "${ROOT}"/etc/env.d/09nvidia ] ; then + rm -f "${ROOT}"/etc/env.d/09nvidia + fi +} + +pkg_postinst() { + # Switch to the nvidia implementation + use X && "${ROOT}"/usr/bin/eselect opengl set --use-old nvidia + "${ROOT}"/usr/bin/eselect opencl set --use-old nvidia + + elog "You must be in the video group to use the NVIDIA device" + elog "For more info, read the docs at" + elog "http://www.gentoo.org/doc/en/nvidia-guide.xml#doc_chap3_sect6" + elog + elog "To use the NVIDIA GLX, run \"eselect opengl set nvidia\"" + elog + elog "To use the NVIDIA CUDA/OpenCL, run \"eselect opencl set nvidia\"" + elog + elog "NVIDIA has requested that any bug reports submitted have the" + elog "output of /opt/bin/nvidia-bug-report.sh included." + elog + if ! use X; then + elog "You have elected to not install the X.org driver. Along with" + elog "this the OpenGL libraries and VDPAU libraries were not" + elog "installed. Additionally, once the driver is loaded your card" + elog "and fan will run at max speed which may not be desirable." + elog "Use the 'nvidia-smi' init script to have your card and fan" + elog "speed scale appropriately." + elog + fi +} + +pkg_prerm() { + use X && "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 +} + +pkg_postrm() { + use X && "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 +} diff --git a/x11-drivers/nvidia-userspace/nvidia-userspace-96.43.20.ebuild b/x11-drivers/nvidia-userspace/nvidia-userspace-96.43.20.ebuild new file mode 100644 index 00000000..ba2362b6 --- /dev/null +++ b/x11-drivers/nvidia-userspace/nvidia-userspace-96.43.20.ebuild @@ -0,0 +1,395 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="2" + +inherit eutils unpacker multilib portability versionator flag-o-matic + +X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}" +AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}" +X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}" + +DESCRIPTION="NVIDIA X11 userspace libraries and applications" +HOMEPAGE="http://www.nvidia.com/" +SRC_URI="x86? ( ftp://download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}-pkg0.run ) + amd64? ( ftp://download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}-pkg2.run ) + x86-fbsd? ( ftp://download.nvidia.com/freebsd/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )" + +LICENSE="NVIDIA" +SLOT="0" +KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd" +IUSE="multilib kernel_linux" +RESTRICT="strip" +EMULTILIB_PKG="true" + +COMMON="x11-base/xorg-server + kernel_linux? ( >=sys-libs/glibc-2.6.1 ) + multilib? ( app-emulation/emul-linux-x86-opengl ) + >=app-admin/eselect-opengl-1.0.9" +DEPEND="${COMMON} + kernel_linux? ( virtual/linux-sources )" +RDEPEND="${COMMON} + !<x11-drivers/nvidia-userspace-${PV} + !>x11-drivers/nvidia-userspace-${PV}" +PDEPEND="~x11-drivers/nvidia-drivers-${PV}" + +QA_TEXTRELS_x86="usr/lib/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib/opengl/nvidia/lib/libGL.so.${PV} + usr/lib/opengl/nvidia/lib/libGLcore.so.${PV} + usr/lib/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib/xorg/modules/drivers/nvidia_drv.so + usr/lib/libcuda.so.${PV} + usr/lib/libnvidia-cfg.so.${PV} + usr/lib/libvdpau_nvidia.so.${PV} + usr/lib/libXvMCNVIDIA.so.${PV}" + +QA_TEXTRELS_x86_fbsd="boot/modules/nvidia.ko + usr/lib/opengl/nvidia/lib/libGL.so.1 + usr/lib/opengl/nvidia/lib/libGLcore.so.1 + usr/lib/libnvidia-cfg.so.1 + usr/lib/opengl/nvidia/extensions/libglx.so.1 + usr/lib/xorg/modules/drivers/nvidia_drv.so" + +QA_TEXTRELS_amd64="usr/lib32/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib32/opengl/nvidia/lib/libGLcore.so.${PV} + usr/lib32/opengl/nvidia/lib/libGL.so.${PV} + usr/lib32/libcuda.so.${PV} + usr/lib32/libvdpau_nvidia.so.${PV}" + +QA_EXECSTACK_x86="usr/lib/opengl/nvidia/lib/libGL.so.${PV} + usr/lib/opengl/nvidia/lib/libGLcore.so.${PV} + usr/lib/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib/xorg/modules/drivers/nvidia_drv.so + usr/lib/libXvMCNVIDIA.a:NVXVMC.o" + +QA_EXECSTACK_amd64="usr/lib32/opengl/nvidia/lib/libGLcore.so.${PV} + usr/lib32/opengl/nvidia/lib/libGL.so.${PV} + usr/lib64/libnvcompiler.so.${PV} + usr/lib64/libXvMCNVIDIA.so.${PV} + usr/lib64/libXvMCNVIDIA.a:NVXVMC.o + usr/lib64/libnvidia-cfg.so.${PV} + usr/lib64/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib64/opengl/nvidia/lib/libGL.so.${PV} + usr/lib64/opengl/nvidia/lib/libGLcore.so.${PV} + usr/lib64/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib64/xorg/modules/drivers/nvidia_drv.so + usr/bin/nvidia-smi + usr/bin/nvidia-xconfig" + +QA_WX_LOAD_x86="usr/lib/opengl/nvidia/lib/libGLcore.so.${PV} + usr/lib/opengl/nvidia/lib/libGL.so.${PV} + usr/lib/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib/libXvMCNVIDIA.a" + +QA_WX_LOAD_amd64="usr/lib32/opengl/nvidia/lib/libGL.so.${PV} + usr/lib32/opengl/nvidia/lib/libGLcore.so.${PV} + usr/lib64/opengl/nvidia/lib/libGL.so.${PV} + usr/lib64/opengl/nvidia/lib/libGLcore.so.${PV} + usr/lib64/opengl/nvidia/extensions/libglx.so.${PV}" + +QA_SONAME_amd64="usr/lib64/libnvcompiler.so.${PV}" + +QA_DT_HASH_amd64="usr/lib32/libcuda.so.${PV} + usr/lib32/opengl/nvidia/lib/libGL.so.${PV} + usr/lib32/opengl/nvidia/lib/libGLcore.so.${PV} + usr/lib32/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib32/libvdpau_nvidia.so.${PV} + usr/lib64/libXvMCNVIDIA.so.${PV} + usr/lib64/libcuda.so.${PV} + usr/lib64/libnvidia-cfg.so.${PV} + usr/lib64/opengl/nvidia/lib/libGLcore.so.${PV} + usr/lib64/opengl/nvidia/lib/libGL.so.${PV} + usr/lib64/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib64/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib64/xorg/modules/drivers/nvidia_drv.so + usr/lib64/libvdpau_nvidia.so.${PV} + usr/bin/nvidia-smi + usr/bin/nvidia-xconfig" + +QA_DT_HASH_x86="usr/lib/libcuda.so.${PV} + usr/lib/libnvidia-cfg.so.${PV} + usr/lib/opengl/nvidia/lib/libGLcore.so.${PV} + usr/lib/opengl/nvidia/lib/libGL.so.${PV} + usr/lib/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib/xorg/modules/drivers/nvidia_drv.so + usr/lib/libXvMCNVIDIA.so.${PV} + usr/lib/libvdpau_nvidia.so.${PV} + usr/bin/nvidia-smi + usr/bin/nvidia-xconfig" + +if use x86; then + PKG_V="-pkg0" + NV_PACKAGE="${X86_NV_PACKAGE}" +elif use amd64; then + PKG_V="-pkg2" + NV_PACKAGE="${AMD64_NV_PACKAGE}" +elif use x86-fbsd; then + PKG_V="" + NV_PACKAGE="${X86_FBSD_NV_PACKAGE}" +fi + +S="${WORKDIR}/${NV_PACKAGE}${PKG_V}" + +pkg_setup() { + # try to turn off distcc and ccache for people that have a problem with it + export DISTCC_DISABLE=1 + export CCACHE_DISABLE=1 + + if use amd64 && has_multilib_profile && [ "${DEFAULT_ABI}" != "amd64" ]; then + eerror "This ebuild doesn't currently support changing your default abi." + die "Unexpected \${DEFAULT_ABI} = ${DEFAULT_ABI}" + fi + + # On BSD userland it wants real make command + use userland_BSD && MAKE="$(get_bmake)" + + export _POSIX2_VERSION="199209" + + # set variables to where files are in the package structure + if use kernel_FreeBSD; then + NV_DOC="${S}/doc" + NV_EXEC="${S}/obj" + NV_LIB="${S}/obj" + NV_SRC="${S}/src" + NV_MAN="${S}/x11/man" + NV_X11="${S}/obj" + NV_X11_DRV="${NV_X11}" + NV_X11_EXT="${NV_X11}" + NV_SOVER=1 + elif use kernel_linux; then + NV_DOC="${S}/usr/share/doc" + NV_EXEC="${S}/usr/bin" + NV_LIB="${S}/usr/lib" + NV_SRC="${S}/usr/src/nv" + NV_MAN="${S}/usr/share/man/man1" + NV_X11="${S}/usr/X11R6/lib" + NV_X11_DRV="${NV_X11}/modules/drivers" + NV_X11_EXT="${NV_X11}/modules/extensions" + NV_SOVER=${PV} + else + die "Could not determine proper NVIDIA package" + fi +} + +src_unpack() { + if ! use x86-fbsd; then + mkdir "${S}" + cd "${S}" + unpack_makeself + else + unpack ${A} + fi +} + +src_prepare() { + # Please add a brief description for every added patch + use x86-fbsd && cd doc + + # Use the correct defines to make gtkglext build work + epatch "${FILESDIR}"/NVIDIA_glx-defines.patch + # Use some more sensible gl headers and make way for new glext.h + epatch "${FILESDIR}"/NVIDIA_glx-glheader.patch +} + +src_compile() { + # This is already the default on Linux, as there's no toplevel Makefile, but + # on FreeBSD there's one and triggers the kernel module build, as we install + # it by itself, pass this. + + cd "${NV_SRC}" + if use x86-fbsd; then + MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \ + LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die + fi +} + +src_install() { + if use kernel_linux; then + VIDEOGROUP="$(egetent group video | cut -d ':' -f 3)" + if [ -z "$VIDEOGROUP" ]; then + eerror "Failed to determine the video group gid." + die "Failed to determine the video group gid." + fi + + # Add the aliases + [ -f "${FILESDIR}/nvidia-169.07" ] || die "nvidia missing in FILESDIR" + sed -e 's:PACKAGE:'${PF}':g' \ + -e 's:VIDEOGID:'${VIDEOGROUP}':' "${FILESDIR}"/nvidia-169.07 > \ + "${WORKDIR}"/nvidia + insinto /etc/modprobe.d + newins "${WORKDIR}"/nvidia nvidia.conf || die + fi + + # NVIDIA kernel <-> userspace driver config lib + dolib.so ${NV_LIB}/libnvidia-cfg.so.${NV_SOVER} || \ + die "failed to install libnvidia-cfg" + + # Xorg DDX driver + insinto /usr/$(get_libdir)/xorg/modules/drivers + doins ${NV_X11_DRV}/nvidia_drv.so || die "failed to install nvidia_drv.so" + + # Xorg GLX driver + insinto /usr/$(get_libdir)/opengl/nvidia/extensions + doins ${NV_X11_EXT}/libglx.so.${NV_SOVER} || \ + die "failed to install libglx.so" + dosym /usr/$(get_libdir)/opengl/nvidia/extensions/libglx.so.${NV_SOVER} \ + /usr/$(get_libdir)/opengl/nvidia/extensions/libglx.so || \ + die "failed to create libglx.so symlink" + + # XvMC driver + dolib.a ${NV_X11}/libXvMCNVIDIA.a || \ + die "failed to install libXvMCNVIDIA.so" + dolib.so ${NV_X11}/libXvMCNVIDIA.so.${NV_SOVER} || \ + die "failed to install libXvMCNVIDIA.so" + dosym libXvMCNVIDIA.so.${NV_SOVER} /usr/$(get_libdir)/libXvMCNVIDIA.so || \ + die "failed to create libXvMCNVIDIA.so symlink" + + # CUDA headers (driver to come) + if use kernel_linux && [[ -d ${S}/usr/include/cuda ]]; then + dodir /usr/include/cuda + insinto /usr/include/cuda + doins usr/include/cuda/*.h || die "failed to install cuda headers" + fi + + # OpenCL headers (driver to come) + if [[ -d ${S}/usr/include/CL ]]; then + dodir /usr/include/CL + insinto /usr/include/CL + doins usr/include/CL/*.h || die "failed to install OpenCL headers" + fi + + # Documentation + dodoc ${NV_DOC}/XF86Config.sample + dohtml ${NV_DOC}/html/* + if use x86-fbsd; then + dodoc "${NV_DOC}/README" + doman "${NV_MAN}/nvidia-xconfig.1" + else + # Docs + newdoc "${NV_DOC}/README.txt" README + dodoc "${NV_DOC}/NVIDIA_Changelog" +# doman "${NV_MAN}/nvidia-smi.1.gz" + doman "${NV_MAN}/nvidia-xconfig.1.gz" + fi + + # Helper Apps + dobin ${NV_EXEC}/nvidia-xconfig || die + dobin ${NV_EXEC}/nvidia-bug-report.sh || die +# if use kernel_linux; then +# dobin ${NV_EXEC}/nvidia-smi || die +# fi + + 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 + + is_final_abi || die "failed to iterate through all ABIs" +} + +# Install nvidia library: +# the first parameter is the place where to install it +# the second parameter is the base name of the library +# the third parameter is the provided soversion +donvidia() { + dodir $1 + exeinto $1 + + libname=$(basename $2) + + doexe $2.$3 || die "failed to install $2" + dosym ${libname}.$3 $1/${libname} || die "failed to symlink $2" + [[ $3 != "1" ]] && dosym ${libname}.$3 $1/${libname}.1 +} + +src_install-libs() { + local inslibdir=$(get_libdir) + local NV_ROOT="/usr/${inslibdir}/opengl/nvidia" + local libdir= sover= + + if use kernel_linux; then + if has_multilib_profile && [[ ${ABI} == "x86" ]] ; then + libdir=usr/lib32 + else + libdir=usr/lib + fi + sover=${PV} + else + libdir=obj + # on FreeBSD it has just .1 suffix + sover=1 + fi + + # The GLX libraries + donvidia ${NV_ROOT}/lib ${libdir}/libGL.so ${sover} + donvidia ${NV_ROOT}/lib ${libdir}/libGLcore.so ${sover} + if use x86-fbsd; then + donvidia ${NV_ROOT}/lib ${libdir}/libnvidia-tls.so ${sover} + else + donvidia ${NV_ROOT}/lib ${libdir}/tls/libnvidia-tls.so ${sover} + fi + + #cuda + if [[ -f ${libdir}/libcuda.so.${sover} ]]; then + dolib.so ${libdir}/libcuda.so.${sover} + [[ "${sover}" != "1" ]] && dosym libcuda.so.${sover} /usr/${inslibdir}/libcuda.so.1 + dosym libcuda.so.1 /usr/${inslibdir}/libcuda.so + fi + + #vdpau + if [[ -f ${libdir}/libvdpau_nvidia.so.${sover} ]]; then + dolib.so ${libdir}/libvdpau_nvidia.so.${sover} + dosym libvdpau_nvidia.so.${sover} /usr/${inslibdir}/libvdpau_nvidia.so + fi + + # OpenCL + # NOTE: This isn't currently available in the publicly released drivers. + if [[ -f ${libdir}/libOpenCL.so.1.0.0 ]]; then + + dolib.so ${libdir}/libnvcompiler.so.${sover} + [[ "${sover}" != "1" ]] && dosym libnvcompiler.so.${sover} /usr/${inslibdir}/libnvcompiler.so.1 + dosym libnvcompiler.so.1 /usr/${inslibdir}/libnvcompiler.so + + dolib.so ${libdir}/libOpenCL.so.1.0.0 + dosym libOpenCL.so.1.0.0 /usr/${inslibdir}/libOpenCL.so.1 + dosym libOpenCL.so.1 /usr/${inslibdir}/libOpenCL.so + fi +} + +pkg_preinst() { + # Clean the dynamic libGL stuff's home to ensure + # we dont have stale libs floating around + if [ -d "${ROOT}"/usr/lib/opengl/nvidia ] ; then + rm -rf "${ROOT}"/usr/lib/opengl/nvidia/* + fi + # Make sure we nuke the old nvidia-glx's env.d file + if [ -e "${ROOT}"/etc/env.d/09nvidia ] ; then + rm -f "${ROOT}"/etc/env.d/09nvidia + fi +} + +pkg_postinst() { + # Switch to the nvidia implementation + eselect opengl set --use-old nvidia + + elog "To use the NVIDIA GLX, run \"eselect opengl set nvidia\"" + elog + elog "NVIDIA has requested that any bug reports submitted have the" + elog "output of /usr/bin/nvidia-bug-report.sh included." + elog + elog "To work with compiz, you must enable the AddARGBGLXVisuals option." + elog + elog "If you are having resolution problems, try disabling DynamicTwinView." +} + +pkg_postrm() { + eselect opengl set --use-old xorg-x11 +} diff --git a/x11-drivers/pvr-omap4/Manifest b/x11-drivers/pvr-omap4/Manifest new file mode 100644 index 00000000..a61361fe --- /dev/null +++ b/x11-drivers/pvr-omap4/Manifest @@ -0,0 +1,4 @@ +DIST pvr-omap4_1.7.10.0.1.9-1.diff.gz 7967 RMD160 9259d8b7bffe0a716435938f7595ed6d69fa88de SHA1 820b85583cef64f6c483437a5bc5fc3ff296ae72 SHA256 d6f81f7e7481f20874e7880f1e994f50e3767f6bffa7ef664c319a247a6f5df9 +DIST pvr-omap4_1.7.10.0.1.9.orig.tar.gz 6293374 RMD160 153fb7c7b9cac505f12f1f6c6925176a103a5072 SHA1 aba00b62ab570c98429abba406243a81b8b4b829 SHA256 b0a15ef5123a953eff26f5cd82aed553b4139fc420a31add8924789d6d1d0341 +EBUILD pvr-omap4-1.7.10.0.1.9.ebuild 833 RMD160 54b790c513cad54281581d7c990356ab79fe5edc SHA1 e5a5a93f6e23aaf7b236ae6128859d9d8cab113e SHA256 8993e09eaad6dfc726d39d99f2f45ad03a6d55b1bda024c4cf1eb0f4a756efcd +MISC README 131 RMD160 202365c2f788d0cb660a9dd4a6ae72ac13976f62 SHA1 3e93e90b03455aa55fb3c70e18a5fa2cb3928b97 SHA256 ac79600bfa4fc961cafa071536220f3f24900b7c1779f2877ebb33013b6c2dda diff --git a/x11-drivers/pvr-omap4/README b/x11-drivers/pvr-omap4/README new file mode 100644 index 00000000..fab6bbd1 --- /dev/null +++ b/x11-drivers/pvr-omap4/README @@ -0,0 +1,2 @@ +This ebuild has been imported from the "pandaboard" layman overlay. +Deps got fixed in order to accomodate sabayon kernel packages. diff --git a/x11-drivers/pvr-omap4/pvr-omap4-1.7.10.0.1.9.ebuild b/x11-drivers/pvr-omap4/pvr-omap4-1.7.10.0.1.9.ebuild new file mode 100644 index 00000000..a4731be6 --- /dev/null +++ b/x11-drivers/pvr-omap4/pvr-omap4-1.7.10.0.1.9.ebuild @@ -0,0 +1,38 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-wireless/zd1211-firmware/zd1211-firmware-1.4.ebuild,v 1.2 2007/11/03 12:03:19 dsd Exp $ + +EAPI="3" + +inherit eutils + +DESCRIPTION="PowerVR SGX540 libraries for OMAP4" + +HOMEPAGE="" +SRC_URI="https://launchpad.net/~tiomap-dev/+archive/release/+files/${PN}_${PV}.orig.tar.gz +https://launchpad.net/~tiomap-dev/+archive/release/+files/${PN}_${PV}-1.diff.gz" + + +LICENSE="TI" +SLOT="0" +KEYWORDS="arm" + +IUSE="" +DEPEND="sys-libs/sgx-libs + <x11-base/xorg-server-1.11 + x11-libs/libdrm" +RDEPEND="${DEPEND}" + +#S="${WORKDIR}" +RESTRICT="strip" + +src_prepare() { + cd "${WORKDIR}" + epatch *.diff +} + +src_install() { + exeinto /usr/lib/xorg/modules/drivers + doexe "${S}"/usr/lib/xorg/modules/drivers/pvr_drv.so +} + diff --git a/x11-drivers/xf86-video-ati/Manifest b/x11-drivers/xf86-video-ati/Manifest new file mode 100644 index 00000000..cb4826b0 --- /dev/null +++ b/x11-drivers/xf86-video-ati/Manifest @@ -0,0 +1,13 @@ +AUX xf86-video-ati-6.14.4-exa-solid-accel-evergreen.patch 10993 SHA256 2bc497c453c5e87f63cde4f224446347c5d730575ebecccc0aa0feba18ce7fd4 SHA512 0e67b38e043d4587b54dbb05fdd5ca5816ed38cb0b02c54f3e1091585ca0759d3d9cc39b675da3db81fb72d22a26e3733d2cb354a8df720b8e508332aa08ef14 WHIRLPOOL 8b7e43b1e478ad5752128d3a058c2a3a5f3a51a2b8f8c08f801b41d8423aa3ea4c16f47cf44bd47746926ec3cce5a80b509fc52cb276751bc5568b5acd245f62 +AUX xf86-video-ati-6.14.4-exa-solid-accel-r100.patch 6527 SHA256 d1d991d7aaef21132ea892757611fbb660dfe64fb6b5ffb1bd33f8b6f2d98342 SHA512 548dc69900b76f3b9eb4674798cad7736dfe9a75972c27c96f431cd2e15f9ebe7173dca3e59e018bdc392fa879e9b2d0a21f9d54479f5a209889b28198ba22c4 WHIRLPOOL 9eaeaa995f356dc8f7a8dac3683476892465cdfd595a3f48e98d54c425496104db367f137e6aa74c16377307d1199ffcfe8715485c0e50edc0232eae75446ef6 +AUX xf86-video-ati-6.14.4-exa-solid-accel-r200.patch 6548 SHA256 0a49ca2a700e90721390eb77e62086aa0c68201ede9db2f9aea21ddc957eb444 SHA512 1f46f12584263053266e39f59720be2950fbfe057d1fcde584f039098294c8499d07b616c10356fbbe1821f444e8a08116b51b2774d0cf378a5ef3f7162b4dfb WHIRLPOOL a55c5145e821e689633ebdf57e6436e93b79fff52d3c0d0aedab48166840e8504f494c083c37d2bb9aab9268962cbe5d7da06cd6d871a7cbe9cadcdf0c2a4614 +AUX xf86-video-ati-6.14.4-exa-solid-accel-r300.patch 20383 SHA256 1ad91f3d120f06beb9d0d905931aeb4086ff7d7342ebbdf681b2d9ffa66169f7 SHA512 bffec3f83b466605ec8b7a62e4c3a882ca095777b7530518eae0d2a97e6d06a0c7216788f5821dfa5185558fc24325080caa7dbc04fd73049698bf63235af014 WHIRLPOOL a637454d3a0fb9101c32b06229a5a7ef139c68e788bc3557b502f2ea112adfc8f85ce718e3d23fee29c3d0a4f0a529c97e0044a4854be94f5ea6514c56dfb3f3 +DIST xf86-video-ati-6.14.4.tar.bz2 1108681 SHA256 4ffe435ef8fbe0989f6576f04f789e147a2de7fdefc3644e39d5ef626c37ef85 SHA512 68913954607680e299cb798ff58cfdaf2381823778f85d18adf2701439cc1f954f92867c226b51830b3adf8c3967119a989b2e07ff3af7c7b4c043e784c8e078 WHIRLPOOL a6f50f2ea1233bec17929404243f08eda636af9c7a9ba46e1bf1503f14e8d42df15627a3f41909d8b04896f2ce0f5e70d912f1768089b80b10a1d5b08600debe +DIST xf86-video-ati-6.14.6.tar.bz2 1139495 SHA256 aa5286b3e4f0187d7df14785c06dd800255d9405205dbf061da5d77df86bec36 SHA512 7ed64bb3596703f7c575aec37a6918bac251819fe638acc66a29aab7648d8a81dedd8d416f970faa1f757fa8e9e3ccdc43e4499d06271cc2751288040d1d957e WHIRLPOOL 9b72e873c3108daeb10cfc68523eb9bc2c12f5525096f9a2639a7dbeb58fd2912b474b8820172ffc9351458d2e046b43e0d064bb4f4189bb99b06a995f3204e8 +DIST xf86-video-ati-7.0.0.tar.bz2 775854 SHA256 c0acc81386425651aae5dfe02d89f935bb63b2a62104da0d88deac3c773ea10e SHA512 f82da3445684aba7f158961fc9882e777c0661ba161a4b923bdf8d3b70a8a16bca08de87af6c7f3943fa6a4308e2aa0ea42b8749a19b52374c1599d669b9512c WHIRLPOOL 4e27614e451fdf5a479695ffe207eb86ea52e45ddfbe5835a5c9912cd58c70968bc118f0586de2f7629183eed1810a70f9bc079763db065f0dc15ae33cd62347 +DIST xf86-video-ati-7.1.0.tar.bz2 804531 SHA256 c8ae44051fcb331625217f98c09a3aa69f493052b69d62c03f41fed0bfe610cd SHA512 eff193b51db162d498b41ebc5b78fbfbcbedbfb2041dcd710ced2f41cee4a039de26ca646dedd65b3cefc9157abfb37a118e3ae2f2e034280e351a00e45db805 WHIRLPOOL d2b1bd7a140fecddc246a6d94f1f6f93fb36ad1d78d447da4f7745060fb4f42fd09b0d85fccb1a7f5b490ce77fd22d3c649982bcb0a06228db2a9b9aa1d8e3d3 +EBUILD xf86-video-ati-6.14.4-r1.ebuild 1193 SHA256 8a70a89d1191782c9579028bfacad59e195b04a1b1f591ccce6b2c493bc021d1 SHA512 a6de0a69c5990f943e8e663ffbe07dbe7907ae64ffba6817af040d92c0ac7a89a1702d6a8a14a02735deb200e513a27a56355da53228100baa0855fc3a958150 WHIRLPOOL 3f0bceaf4810de8eb67f922d7d6bd562e977dcbda69d1c144db0e2d19ad4d80534b002d78fc52eec9b8ec3261b13025e5f70f239668e6e969fe58e6f23807f04 +EBUILD xf86-video-ati-6.14.6-r1.ebuild 972 SHA256 03545ff8484c22a36bb763e6e1d211d495cba67eb696015dd85fa75ef7a3d909 SHA512 7892d21eab399e2a7f687688b62c6ff65a643c8ddfe88052d5d19d5d6dc5ce813e46484b2d98e2520848a73521c1813340bc5efa2e11e9ad848ba04765a3ea83 WHIRLPOOL 5cad5bd388ecbd3dbcb71947b46a9ca4c58e34384b8afe308f1784493c696b40e283f750c2f6b3581bff66dd200af1c654c7cfcb33137647d826636ad3fab4f3 +EBUILD xf86-video-ati-7.0.0.ebuild 834 SHA256 3d051af6cf32d2a91f2d06e77301be460cde549f4e41fa62f84790485c99b314 SHA512 0d9d47f903b653cbde981a9d1e77948208958d669f309f86b95bd26ab068731d290d2ea45ab1fcc56194e0b5f85a6b26f5447b10b6e275439c7fff26b039ac63 WHIRLPOOL 1f5756b6392ab7218efa468f745337a6569710a03fe446c926ee3a8a070b5023b86665a06939bc2f25db20640ba2054f5fe550052f88b622534ea7657ffd50f3 +EBUILD xf86-video-ati-7.1.0.ebuild 965 SHA256 b393b697e14398a463c7dc60d10180dde9c60d9978b05b853946abe7aaa58889 SHA512 0f82babf75d5fe431949bf7b762ca4445705b914d0ea23c73e1508313aae418f37eaa68841582fa20f69259d92fac180299b19e267c574eb8e2dc9a4647e6f2f WHIRLPOOL 9e1949b887a43fb4bb033afe3230b2e07a3cf4831f1dd90886d42fbe48a80e0304c2e3464182a05569482a09bab750539a31ce4ed8b47fea28e17ee3668b1cb4 +MISC metadata.xml 156 SHA256 5101ab0d4cc8c7125eea733c44e86962769bd77acaf53b69223b9cadcdd29055 SHA512 daa9bb2a9b1a16220327bc394f10d93a1a8a427bfbed8808cd247c1dfd5a5b87a4945d55d8243e07fede2c8182a208c618ebd483773d77e9d23862ec77016019 WHIRLPOOL 691e028648bb8b60771d74ef718c51fdb0f4a587e984f6ac4c13d7796415ecf770df2e0fd766399091771924bb65995e9bb290baa35971c56e07d76f2bbf6d93 diff --git a/x11-drivers/xf86-video-ati/files/xf86-video-ati-6.14.4-exa-solid-accel-evergreen.patch b/x11-drivers/xf86-video-ati/files/xf86-video-ati-6.14.4-exa-solid-accel-evergreen.patch new file mode 100644 index 00000000..6e97a383 --- /dev/null +++ b/x11-drivers/xf86-video-ati/files/xf86-video-ati-6.14.4-exa-solid-accel-evergreen.patch @@ -0,0 +1,287 @@ +From cac2d7ed54918579418fc762558497d3ec547fad Mon Sep 17 00:00:00 2001 +From: Alex Deucher <alexander.deucher@amd.com> +Date: Sat, 14 Apr 2012 12:53:39 +0000 +Subject: EXA: Support acceleration of solid pictures on Evergreen/NI. + +Signed-off-by: Alex Deucher <alexander.deucher@amd.com> +Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> +--- +diff --git a/src/evergreen_exa.c b/src/evergreen_exa.c +index cee3ec2..61b47a4 100644 +--- a/src/evergreen_exa.c ++++ b/src/evergreen_exa.c +@@ -748,17 +748,8 @@ static Bool EVERGREENCheckCompositeTexture(PicturePtr pPict, + int op, + int unit) + { +- int w = pPict->pDrawable->width; +- int h = pPict->pDrawable->height; + unsigned int repeatType = pPict->repeat ? pPict->repeatType : RepeatNone; + unsigned int i; +- int max_tex_w, max_tex_h; +- +- max_tex_w = 16384; +- max_tex_h = 16384; +- +- if ((w > max_tex_w) || (h > max_tex_h)) +- RADEON_FALLBACK(("Picture w/h too large (%dx%d)\n", w, h)); + + for (i = 0; i < sizeof(EVERGREENTexFormats) / sizeof(EVERGREENTexFormats[0]); i++) { + if (EVERGREENTexFormats[i].fmt == pPict->format) +@@ -798,9 +789,16 @@ static void EVERGREENXFormSetup(PicturePtr pPict, PixmapPtr pPix, + ScrnInfoPtr pScrn = xf86Screens[pPix->drawable.pScreen->myNum]; + RADEONInfoPtr info = RADEONPTR(pScrn); + struct radeon_accel_state *accel_state = info->accel_state; +- int w = pPict->pDrawable->width; +- int h = pPict->pDrawable->height; + int const_offset = unit * 8; ++ int w, h; ++ ++ if (pPict->pDrawable) { ++ w = pPict->pDrawable->width; ++ h = pPict->pDrawable->height; ++ } else { ++ w = 1; ++ h = 1; ++ } + + if (pPict->transform != 0) { + accel_state->is_transform[unit] = TRUE; +@@ -837,9 +835,7 @@ static Bool EVERGREENTextureSetup(PicturePtr pPict, PixmapPtr pPix, + ScrnInfoPtr pScrn = xf86Screens[pPix->drawable.pScreen->myNum]; + RADEONInfoPtr info = RADEONPTR(pScrn); + struct radeon_accel_state *accel_state = info->accel_state; +- int w = pPict->pDrawable->width; +- int h = pPict->pDrawable->height; +- unsigned int repeatType = pPict->repeat ? pPict->repeatType : RepeatNone; ++ unsigned int repeatType; + unsigned int i; + tex_resource_t tex_res; + tex_sampler_t tex_samp; +@@ -854,9 +850,17 @@ static Bool EVERGREENTextureSetup(PicturePtr pPict, PixmapPtr pPix, + } + + /* Texture */ ++ if (pPict->pDrawable) { ++ tex_res.w = pPict->pDrawable->width; ++ tex_res.h = pPict->pDrawable->height; ++ repeatType = pPict->repeat ? pPict->repeatType : RepeatNone; ++ } else { ++ tex_res.w = 1; ++ tex_res.h = 1; ++ repeatType = RepeatNormal; ++ } ++ + tex_res.id = unit; +- tex_res.w = w; +- tex_res.h = h; + tex_res.pitch = accel_state->src_obj[unit].pitch; + tex_res.depth = 0; + tex_res.dim = SQ_TEX_DIM_2D; +@@ -1054,33 +1058,30 @@ static Bool EVERGREENCheckComposite(int op, PicturePtr pSrcPicture, + { + uint32_t tmp1; + PixmapPtr pSrcPixmap, pDstPixmap; +- int max_tex_w, max_tex_h, max_dst_w, max_dst_h; + + /* Check for unsupported compositing operations. */ + if (op >= (int) (sizeof(EVERGREENBlendOp) / sizeof(EVERGREENBlendOp[0]))) + RADEON_FALLBACK(("Unsupported Composite op 0x%x\n", op)); + +- if (!pSrcPicture->pDrawable) +- RADEON_FALLBACK(("Solid or gradient pictures not supported yet\n")); ++ if (pSrcPicture->pDrawable) { ++ pSrcPixmap = RADEONGetDrawablePixmap(pSrcPicture->pDrawable); + +- pSrcPixmap = RADEONGetDrawablePixmap(pSrcPicture->pDrawable); +- +- max_tex_w = 8192; +- max_tex_h = 8192; +- max_dst_w = 8192; +- max_dst_h = 8192; ++ if (pSrcPixmap->drawable.width >= 16384 || ++ pSrcPixmap->drawable.height >= 16384) { ++ RADEON_FALLBACK(("Source w/h too large (%d,%d).\n", ++ pSrcPixmap->drawable.width, ++ pSrcPixmap->drawable.height)); ++ } + +- if (pSrcPixmap->drawable.width >= max_tex_w || +- pSrcPixmap->drawable.height >= max_tex_h) { +- RADEON_FALLBACK(("Source w/h too large (%d,%d).\n", +- pSrcPixmap->drawable.width, +- pSrcPixmap->drawable.height)); +- } ++ if (!EVERGREENCheckCompositeTexture(pSrcPicture, pDstPicture, op, 0)) ++ return FALSE; ++ } else if (pSrcPicture->pSourcePict->type != SourcePictTypeSolidFill) ++ RADEON_FALLBACK(("Gradient pictures not supported yet\n")); + + pDstPixmap = RADEONGetDrawablePixmap(pDstPicture->pDrawable); + +- if (pDstPixmap->drawable.width >= max_dst_w || +- pDstPixmap->drawable.height >= max_dst_h) { ++ if (pDstPixmap->drawable.width >= 16384 || ++ pDstPixmap->drawable.height >= 16384) { + RADEON_FALLBACK(("Dest w/h too large (%d,%d).\n", + pDstPixmap->drawable.width, + pDstPixmap->drawable.height)); +@@ -1089,38 +1090,35 @@ static Bool EVERGREENCheckComposite(int op, PicturePtr pSrcPicture, + if (pMaskPicture) { + PixmapPtr pMaskPixmap; + +- if (!pMaskPicture->pDrawable) +- RADEON_FALLBACK(("Solid or gradient pictures not supported yet\n")); +- +- pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable); ++ if (pMaskPicture->pDrawable) { ++ pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable); + +- if (pMaskPixmap->drawable.width >= max_tex_w || +- pMaskPixmap->drawable.height >= max_tex_h) { +- RADEON_FALLBACK(("Mask w/h too large (%d,%d).\n", +- pMaskPixmap->drawable.width, +- pMaskPixmap->drawable.height)); +- } ++ if (pMaskPixmap->drawable.width >= 16384 || ++ pMaskPixmap->drawable.height >= 16384) { ++ RADEON_FALLBACK(("Mask w/h too large (%d,%d).\n", ++ pMaskPixmap->drawable.width, ++ pMaskPixmap->drawable.height)); ++ } + +- if (pMaskPicture->componentAlpha) { +- /* Check if it's component alpha that relies on a source alpha and +- * on the source value. We can only get one of those into the +- * single source value that we get to blend with. +- */ +- if (EVERGREENBlendOp[op].src_alpha && +- (EVERGREENBlendOp[op].blend_cntl & COLOR_SRCBLEND_mask) != +- (BLEND_ZERO << COLOR_SRCBLEND_shift)) { +- RADEON_FALLBACK(("Component alpha not supported with source " +- "alpha and source value blending.\n")); ++ if (pMaskPicture->componentAlpha) { ++ /* Check if it's component alpha that relies on a source alpha and ++ * on the source value. We can only get one of those into the ++ * single source value that we get to blend with. ++ */ ++ if (EVERGREENBlendOp[op].src_alpha && ++ (EVERGREENBlendOp[op].blend_cntl & COLOR_SRCBLEND_mask) != ++ (BLEND_ZERO << COLOR_SRCBLEND_shift)) { ++ RADEON_FALLBACK(("Component alpha not supported with source " ++ "alpha and source value blending.\n")); ++ } + } +- } + +- if (!EVERGREENCheckCompositeTexture(pMaskPicture, pDstPicture, op, 1)) +- return FALSE; ++ if (!EVERGREENCheckCompositeTexture(pMaskPicture, pDstPicture, op, 1)) ++ return FALSE; ++ } else if (pMaskPicture->pSourcePict->type != SourcePictTypeSolidFill) ++ RADEON_FALLBACK(("Gradient pictures not supported yet\n")); + } + +- if (!EVERGREENCheckCompositeTexture(pSrcPicture, pDstPicture, op, 0)) +- return FALSE; +- + if (!EVERGREENGetDestFormat(pDstPicture, &tmp1)) + return FALSE; + +@@ -1132,7 +1130,8 @@ static Bool EVERGREENPrepareComposite(int op, PicturePtr pSrcPicture, + PicturePtr pMaskPicture, PicturePtr pDstPicture, + PixmapPtr pSrc, PixmapPtr pMask, PixmapPtr pDst) + { +- ScrnInfoPtr pScrn = xf86Screens[pSrc->drawable.pScreen->myNum]; ++ ScreenPtr pScreen = pDst->drawable.pScreen; ++ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + RADEONInfoPtr info = RADEONPTR(pScrn); + struct radeon_accel_state *accel_state = info->accel_state; + uint32_t dst_format; +@@ -1142,13 +1141,19 @@ static Bool EVERGREENPrepareComposite(int op, PicturePtr pSrcPicture, + struct r600_accel_object src_obj, mask_obj, dst_obj; + float *cbuf; + +- if (pDst->drawable.bitsPerPixel < 8 || pSrc->drawable.bitsPerPixel < 8) ++ if (pDst->drawable.bitsPerPixel < 8 || (pSrc && pSrc->drawable.bitsPerPixel < 8)) + return FALSE; + ++ if (!pSrc) { ++ pSrc = RADEONSolidPixmap(pScreen, pSrcPicture->pSourcePict->solidFill.color); ++ if (!pSrc) ++ RADEON_FALLBACK("Failed to create solid scratch pixmap\n"); ++ } ++ + src_obj.offset = 0; + dst_obj.offset = 0; +- src_obj.bo = radeon_get_pixmap_bo(pSrc); + dst_obj.bo = radeon_get_pixmap_bo(pDst); ++ src_obj.bo = radeon_get_pixmap_bo(pSrc); + dst_obj.surface = radeon_get_pixmap_surface(pDst); + src_obj.surface = radeon_get_pixmap_surface(pSrc); + dst_obj.tiling_flags = radeon_get_pixmap_tiling(pDst); +@@ -1166,7 +1171,15 @@ static Bool EVERGREENPrepareComposite(int op, PicturePtr pSrcPicture, + dst_obj.bpp = pDst->drawable.bitsPerPixel; + dst_obj.domain = RADEON_GEM_DOMAIN_VRAM; + +- if (pMask) { ++ if (pMaskPicture) { ++ if (!pMask) { ++ pMask = RADEONSolidPixmap(pScreen, pMaskPicture->pSourcePict->solidFill.color); ++ if (!pMask) { ++ if (!pSrcPicture->pDrawable) ++ pScreen->DestroyPixmap(pSrc); ++ RADEON_FALLBACK("Failed to create solid scratch pixmap\n"); ++ } ++ } + mask_obj.offset = 0; + mask_obj.bo = radeon_get_pixmap_bo(pMask); + mask_obj.tiling_flags = radeon_get_pixmap_tiling(pMask); +@@ -1363,11 +1376,9 @@ static Bool EVERGREENPrepareComposite(int op, PicturePtr pSrcPicture, + return TRUE; + } + +-static void EVERGREENDoneComposite(PixmapPtr pDst) ++static void EVERGREENFinishComposite(ScrnInfoPtr pScrn, PixmapPtr pDst, ++ struct radeon_accel_state *accel_state) + { +- ScrnInfoPtr pScrn = xf86Screens[pDst->drawable.pScreen->myNum]; +- RADEONInfoPtr info = RADEONPTR(pScrn); +- struct radeon_accel_state *accel_state = info->accel_state; + int vtx_size; + + if (accel_state->vsync) +@@ -1381,6 +1392,22 @@ static void EVERGREENDoneComposite(PixmapPtr pDst) + evergreen_finish_op(pScrn, vtx_size); + } + ++static void EVERGREENDoneComposite(PixmapPtr pDst) ++{ ++ ScreenPtr pScreen = pDst->drawable.pScreen; ++ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; ++ RADEONInfoPtr info = RADEONPTR(pScrn); ++ struct radeon_accel_state *accel_state = info->accel_state; ++ ++ EVERGREENFinishComposite(pScrn, pDst, accel_state); ++ ++ if (!accel_state->src_pic->pDrawable) ++ pScreen->DestroyPixmap(accel_state->src_pix); ++ ++ if (accel_state->msk_pic && !accel_state->msk_pic->pDrawable) ++ pScreen->DestroyPixmap(accel_state->msk_pix); ++} ++ + static void EVERGREENComposite(PixmapPtr pDst, + int srcX, int srcY, + int maskX, int maskY, +@@ -1393,7 +1420,7 @@ static void EVERGREENComposite(PixmapPtr pDst, + float *vb; + + if (CS_FULL(info->cs)) { +- EVERGREENDoneComposite(info->accel_state->dst_pix); ++ EVERGREENFinishComposite(pScrn, pDst, info->accel_state); + radeon_cs_flush_indirect(pScrn); + EVERGREENPrepareComposite(info->accel_state->composite_op, + info->accel_state->src_pic, +-- +cgit v0.9.0.2-2-gbebe diff --git a/x11-drivers/xf86-video-ati/files/xf86-video-ati-6.14.4-exa-solid-accel-r100.patch b/x11-drivers/xf86-video-ati/files/xf86-video-ati-6.14.4-exa-solid-accel-r100.patch new file mode 100644 index 00000000..2397d083 --- /dev/null +++ b/x11-drivers/xf86-video-ati/files/xf86-video-ati-6.14.4-exa-solid-accel-r100.patch @@ -0,0 +1,179 @@ +From a7754b076e355fef3aea082b6e2d3aefbb8e7a9b Mon Sep 17 00:00:00 2001 +From: Alex Deucher <alexander.deucher@amd.com> +Date: Fri, 13 Apr 2012 17:24:46 +0000 +Subject: EXA: Support acceleration of solid pictures on R1xx. + +Signed-off-by: Alex Deucher <alexander.deucher@amd.com> +Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> +--- +diff --git a/src/radeon_exa_render.c b/src/radeon_exa_render.c +index b6cc9e4..451a625 100644 +--- a/src/radeon_exa_render.c ++++ b/src/radeon_exa_render.c +@@ -338,17 +338,8 @@ static Bool R100CheckCompositeTexture(PicturePtr pPict, + int unit) + { + unsigned int repeatType = pPict->repeat ? pPict->repeatType : RepeatNone; +- int w = pPict->pDrawable->width; +- int h = pPict->pDrawable->height; + int i; + +- /* r100 limit should be 2048, there are issues with 2048 +- * see 197a62704742a4a19736c2637ac92d1dc5ab34ed +- */ +- +- if ((w > 2047) || (h > 2047)) +- RADEON_FALLBACK(("Picture w/h too large (%dx%d)\n", w, h)); +- + for (i = 0; i < sizeof(R100TexFormats) / sizeof(R100TexFormats[0]); i++) { + if (R100TexFormats[i].fmt == pPict->format) + break; +@@ -357,7 +348,7 @@ static Bool R100CheckCompositeTexture(PicturePtr pPict, + RADEON_FALLBACK(("Unsupported picture format 0x%x\n", + (int)pPict->format)); + +- if (!RADEONCheckTexturePOT(pPict, unit == 0)) ++ if (pPict->pDrawable && !RADEONCheckTexturePOT(pPict, unit == 0)) + return FALSE; + + if (pPict->filter != PictFilterNearest && +@@ -392,15 +383,24 @@ static Bool FUNC_NAME(R100TextureSetup)(PicturePtr pPict, PixmapPtr pPix, + { + RINFO_FROM_SCREEN(pPix->drawable.pScreen); + uint32_t txfilter, txformat, txoffset, txpitch; +- int w = pPict->pDrawable->width; +- int h = pPict->pDrawable->height; +- unsigned int repeatType = pPict->repeat ? pPict->repeatType : RepeatNone; +- Bool repeat = (repeatType == RepeatNormal || repeatType == RepeatReflect) && +- !(unit == 0 && (info->accel_state->need_src_tile_x || info->accel_state->need_src_tile_y)); +- int i; ++ unsigned int repeatType; ++ Bool repeat; ++ int i, w, h; + struct radeon_exa_pixmap_priv *driver_priv; + ACCEL_PREAMBLE(); + ++ if (pPict->pDrawable) { ++ w = pPict->pDrawable->width; ++ h = pPict->pDrawable->height; ++ repeatType = pPict->repeat ? pPict->repeatType : RepeatNone; ++ } else { ++ w = h = 1; ++ repeatType = RepeatNormal; ++ } ++ ++ repeat = (repeatType == RepeatNormal || repeatType == RepeatReflect) && ++ !(unit == 0 && (info->accel_state->need_src_tile_x || info->accel_state->need_src_tile_y)); ++ + txpitch = exaGetPixmapPitch(pPix); + txoffset = 0; + +@@ -510,22 +510,6 @@ static Bool R100CheckComposite(int op, PicturePtr pSrcPicture, + if (op >= sizeof(RadeonBlendOp) / sizeof(RadeonBlendOp[0])) + RADEON_FALLBACK(("Unsupported Composite op 0x%x\n", op)); + +- if (!pSrcPicture->pDrawable) +- RADEON_FALLBACK(("Solid or gradient pictures not supported yet\n")); +- +- /* r100 limit should be 2048, there are issues with 2048 +- * see 197a62704742a4a19736c2637ac92d1dc5ab34ed +- */ +- +- pSrcPixmap = RADEONGetDrawablePixmap(pSrcPicture->pDrawable); +- +- if (pSrcPixmap->drawable.width > 2047 || +- pSrcPixmap->drawable.height > 2047) { +- RADEON_FALLBACK(("Source w/h too large (%d,%d).\n", +- pSrcPixmap->drawable.width, +- pSrcPixmap->drawable.height)); +- } +- + pDstPixmap = RADEONGetDrawablePixmap(pDstPicture->pDrawable); + + if (pDstPixmap->drawable.width > 2047 || +@@ -535,20 +519,35 @@ static Bool R100CheckComposite(int op, PicturePtr pSrcPicture, + pDstPixmap->drawable.height)); + } + ++ if (pSrcPicture->pDrawable) { ++ /* r100 limit should be 2048, there are issues with 2048 ++ * see 197a62704742a4a19736c2637ac92d1dc5ab34ed ++ */ ++ pSrcPixmap = RADEONGetDrawablePixmap(pSrcPicture->pDrawable); ++ ++ if (pSrcPixmap->drawable.width > 2047 || ++ pSrcPixmap->drawable.height > 2047) { ++ RADEON_FALLBACK(("Source w/h too large (%d,%d).\n", ++ pSrcPixmap->drawable.width, ++ pSrcPixmap->drawable.height)); ++ } ++ } else if (pSrcPicture->pSourcePict->type != SourcePictTypeSolidFill) ++ RADEON_FALLBACK(("Gradient pictures not supported yet\n")); ++ + if (pMaskPicture) { + PixmapPtr pMaskPixmap; + +- if (!pMaskPicture->pDrawable) +- RADEON_FALLBACK(("Solid or gradient pictures not supported yet\n")); +- +- pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable); ++ if (pMaskPicture->pDrawable) { ++ pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable); + +- if (pMaskPixmap->drawable.width > 2047 || +- pMaskPixmap->drawable.height > 2047) { +- RADEON_FALLBACK(("Mask w/h too large (%d,%d).\n", +- pMaskPixmap->drawable.width, +- pMaskPixmap->drawable.height)); +- } ++ if (pMaskPixmap->drawable.width > 2047 || ++ pMaskPixmap->drawable.height > 2047) { ++ RADEON_FALLBACK(("Mask w/h too large (%d,%d).\n", ++ pMaskPixmap->drawable.width, ++ pMaskPixmap->drawable.height)); ++ } ++ } else if (pMaskPicture->pSourcePict->type != SourcePictTypeSolidFill) ++ RADEON_FALLBACK(("Gradient pictures not supported yet\n")); + + if (pMaskPicture->componentAlpha) { + /* Check if it's component alpha that relies on a source alpha and +@@ -624,7 +623,8 @@ static Bool FUNC_NAME(R100PrepareComposite)(int op, + PixmapPtr pMask, + PixmapPtr pDst) + { +- RINFO_FROM_SCREEN(pDst->drawable.pScreen); ++ ScreenPtr pScreen = pDst->drawable.pScreen; ++ RINFO_FROM_SCREEN(pScreen); + uint32_t dst_format, dst_pitch, colorpitch; + uint32_t pp_cntl, blendcntl, cblend, ablend; + int pixel_shift; +@@ -648,12 +648,27 @@ static Bool FUNC_NAME(R100PrepareComposite)(int op, + + CHECK_OFFSET(pDst, 0x0f, "destination"); + ++ if (!pSrc) { ++ pSrc = RADEONSolidPixmap(pScreen, cpu_to_le32(pSrcPicture->pSourcePict->solidFill.color)); ++ if (!pSrc) ++ RADEON_FALLBACK("Failed to create solid scratch pixmap\n"); ++ } ++ + if (((dst_pitch >> pixel_shift) & 0x7) != 0) + RADEON_FALLBACK(("Bad destination pitch 0x%x\n", (int)dst_pitch)); + + if (!RADEONSetupSourceTile(pSrcPicture, pSrc, FALSE, TRUE)) + return FALSE; + ++ if (pMaskPicture && !pMask) { ++ pMask = RADEONSolidPixmap(pScreen, cpu_to_le32(pMaskPicture->pSourcePict->solidFill.color)); ++ if (!pMask) { ++ if (!pSrcPicture->pDrawable) ++ pScreen->DestroyPixmap(pSrc); ++ RADEON_FALLBACK("Failed to create solid scratch pixmap\n"); ++ } ++ } ++ + RADEONPrepareCompositeCS(op, pSrcPicture, pMaskPicture, pDstPicture, + pSrc, pMask, pDst); + +-- +cgit v0.9.0.2-2-gbebe diff --git a/x11-drivers/xf86-video-ati/files/xf86-video-ati-6.14.4-exa-solid-accel-r200.patch b/x11-drivers/xf86-video-ati/files/xf86-video-ati-6.14.4-exa-solid-accel-r200.patch new file mode 100644 index 00000000..ff744eec --- /dev/null +++ b/x11-drivers/xf86-video-ati/files/xf86-video-ati-6.14.4-exa-solid-accel-r200.patch @@ -0,0 +1,176 @@ +From 0bda305f7ab2a4720b3fea3f318ab2a73be151e5 Mon Sep 17 00:00:00 2001 +From: Alex Deucher <alexander.deucher@amd.com> +Date: Fri, 13 Apr 2012 17:28:10 +0000 +Subject: EXA: Support acceleration of solid pictures on R2xx. + +Signed-off-by: Alex Deucher <alexander.deucher@amd.com> +Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> +--- +diff --git a/src/radeon_exa_render.c b/src/radeon_exa_render.c +index 451a625..7f1a3ff 100644 +--- a/src/radeon_exa_render.c ++++ b/src/radeon_exa_render.c +@@ -756,17 +756,8 @@ static Bool R200CheckCompositeTexture(PicturePtr pPict, + int unit) + { + unsigned int repeatType = pPict->repeat ? pPict->repeatType : RepeatNone; +- int w = pPict->pDrawable->width; +- int h = pPict->pDrawable->height; + int i; + +- /* r200 limit should be 2048, there are issues with 2048 +- * see bug 19269 +- */ +- +- if ((w > 2047) || (h > 2047)) +- RADEON_FALLBACK(("Picture w/h too large (%dx%d)\n", w, h)); +- + for (i = 0; i < sizeof(R200TexFormats) / sizeof(R200TexFormats[0]); i++) + { + if (R200TexFormats[i].fmt == pPict->format) +@@ -776,7 +767,7 @@ static Bool R200CheckCompositeTexture(PicturePtr pPict, + RADEON_FALLBACK(("Unsupported picture format 0x%x\n", + (int)pPict->format)); + +- if (!RADEONCheckTexturePOT(pPict, unit == 0)) ++ if (pPict->pDrawable && !RADEONCheckTexturePOT(pPict, unit == 0)) + return FALSE; + + if (pPict->filter != PictFilterNearest && +@@ -809,15 +800,24 @@ static Bool FUNC_NAME(R200TextureSetup)(PicturePtr pPict, PixmapPtr pPix, + { + RINFO_FROM_SCREEN(pPix->drawable.pScreen); + uint32_t txfilter, txformat, txoffset, txpitch; +- int w = pPict->pDrawable->width; +- int h = pPict->pDrawable->height; +- unsigned int repeatType = pPict->repeat ? pPict->repeatType : RepeatNone; +- Bool repeat = (repeatType == RepeatNormal || repeatType == RepeatReflect) && +- !(unit == 0 && (info->accel_state->need_src_tile_x || info->accel_state->need_src_tile_y)); +- int i; ++ unsigned int repeatType; ++ Bool repeat; ++ int i, w, h; + struct radeon_exa_pixmap_priv *driver_priv; + ACCEL_PREAMBLE(); + ++ if (pPict->pDrawable) { ++ w = pPict->pDrawable->width; ++ h = pPict->pDrawable->height; ++ repeatType = pPict->repeat ? pPict->repeatType : RepeatNone; ++ } else { ++ w = h = 1; ++ repeatType = RepeatNormal; ++ } ++ ++ repeat = (repeatType == RepeatNormal || repeatType == RepeatReflect) && ++ !(unit == 0 && (info->accel_state->need_src_tile_x || info->accel_state->need_src_tile_y)); ++ + txpitch = exaGetPixmapPitch(pPix); + + txoffset = 0; +@@ -926,22 +926,6 @@ static Bool R200CheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskP + if (op >= sizeof(RadeonBlendOp) / sizeof(RadeonBlendOp[0])) + RADEON_FALLBACK(("Unsupported Composite op 0x%x\n", op)); + +- if (!pSrcPicture->pDrawable) +- RADEON_FALLBACK(("Solid or gradient pictures not supported yet\n")); +- +- /* r200 limit should be 2048, there are issues with 2048 +- * see bug 19269 +- */ +- +- pSrcPixmap = RADEONGetDrawablePixmap(pSrcPicture->pDrawable); +- +- if (pSrcPixmap->drawable.width > 2047 || +- pSrcPixmap->drawable.height > 2047) { +- RADEON_FALLBACK(("Source w/h too large (%d,%d).\n", +- pSrcPixmap->drawable.width, +- pSrcPixmap->drawable.height)); +- } +- + pDstPixmap = RADEONGetDrawablePixmap(pDstPicture->pDrawable); + + if (pDstPixmap->drawable.width > 2047 || +@@ -951,20 +935,35 @@ static Bool R200CheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskP + pDstPixmap->drawable.height)); + } + ++ if (pSrcPicture->pDrawable) { ++ /* r200 limit should be 2048, there are issues with 2048 ++ * see 197a62704742a4a19736c2637ac92d1dc5ab34ed ++ */ ++ pSrcPixmap = RADEONGetDrawablePixmap(pSrcPicture->pDrawable); ++ ++ if (pSrcPixmap->drawable.width > 2047 || ++ pSrcPixmap->drawable.height > 2047) { ++ RADEON_FALLBACK(("Source w/h too large (%d,%d).\n", ++ pSrcPixmap->drawable.width, ++ pSrcPixmap->drawable.height)); ++ } ++ } else if (pSrcPicture->pSourcePict->type != SourcePictTypeSolidFill) ++ RADEON_FALLBACK(("Gradient pictures not supported yet\n")); ++ + if (pMaskPicture) { + PixmapPtr pMaskPixmap; + +- if (!pMaskPicture->pDrawable) +- RADEON_FALLBACK(("Solid or gradient pictures not supported yet\n")); +- +- pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable); ++ if (pMaskPicture->pDrawable) { ++ pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable); + +- if (pMaskPixmap->drawable.width > 2047 || +- pMaskPixmap->drawable.height > 2047) { +- RADEON_FALLBACK(("Mask w/h too large (%d,%d).\n", +- pMaskPixmap->drawable.width, +- pMaskPixmap->drawable.height)); +- } ++ if (pMaskPixmap->drawable.width > 2047 || ++ pMaskPixmap->drawable.height > 2047) { ++ RADEON_FALLBACK(("Mask w/h too large (%d,%d).\n", ++ pMaskPixmap->drawable.width, ++ pMaskPixmap->drawable.height)); ++ } ++ } else if (pMaskPicture->pSourcePict->type != SourcePictTypeSolidFill) ++ RADEON_FALLBACK(("Gradient pictures not supported yet\n")); + + if (pMaskPicture->componentAlpha) { + /* Check if it's component alpha that relies on a source alpha and +@@ -997,7 +996,8 @@ static Bool FUNC_NAME(R200PrepareComposite)(int op, PicturePtr pSrcPicture, + PicturePtr pMaskPicture, PicturePtr pDstPicture, + PixmapPtr pSrc, PixmapPtr pMask, PixmapPtr pDst) + { +- RINFO_FROM_SCREEN(pDst->drawable.pScreen); ++ ScreenPtr pScreen = pDst->drawable.pScreen; ++ RINFO_FROM_SCREEN(pScreen); + uint32_t dst_format, dst_pitch; + uint32_t pp_cntl, blendcntl, cblend, ablend, colorpitch; + int pixel_shift; +@@ -1024,9 +1024,24 @@ static Bool FUNC_NAME(R200PrepareComposite)(int op, PicturePtr pSrcPicture, + if (((dst_pitch >> pixel_shift) & 0x7) != 0) + RADEON_FALLBACK(("Bad destination pitch 0x%x\n", (int)dst_pitch)); + ++ if (!pSrc) { ++ pSrc = RADEONSolidPixmap(pScreen, cpu_to_le32(pSrcPicture->pSourcePict->solidFill.color)); ++ if (!pSrc) ++ RADEON_FALLBACK("Failed to create solid scratch pixmap\n"); ++ } ++ + if (!RADEONSetupSourceTile(pSrcPicture, pSrc, FALSE, TRUE)) + return FALSE; + ++ if (pMaskPicture && !pMask) { ++ pMask = RADEONSolidPixmap(pScreen, cpu_to_le32(pMaskPicture->pSourcePict->solidFill.color)); ++ if (!pMask) { ++ if (!pSrcPicture->pDrawable) ++ pScreen->DestroyPixmap(pSrc); ++ RADEON_FALLBACK("Failed to create solid scratch pixmap\n"); ++ } ++ } ++ + RADEONPrepareCompositeCS(op, pSrcPicture, pMaskPicture, pDstPicture, + pSrc, pMask, pDst); + +-- +cgit v0.9.0.2-2-gbebe diff --git a/x11-drivers/xf86-video-ati/files/xf86-video-ati-6.14.4-exa-solid-accel-r300.patch b/x11-drivers/xf86-video-ati/files/xf86-video-ati-6.14.4-exa-solid-accel-r300.patch new file mode 100644 index 00000000..819173c5 --- /dev/null +++ b/x11-drivers/xf86-video-ati/files/xf86-video-ati-6.14.4-exa-solid-accel-r300.patch @@ -0,0 +1,560 @@ +From d88b9700137ee407c483f263bb55c77cd6f92fef Mon Sep 17 00:00:00 2001 +From: Michel Dänzer <michel.daenzer@amd.com> +Date: Fri, 13 Apr 2012 07:35:38 +0000 +Subject: EXA: Support acceleration of solid pictures on R3xx-R7xx. + +Allocate 1x1 scratch pixmaps to hold the solid picture colours. + +Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> +--- +diff --git a/src/r600_exa.c b/src/r600_exa.c +index e1eb62f..c3ae553 100644 +--- a/src/r600_exa.c ++++ b/src/r600_exa.c +@@ -901,17 +901,8 @@ static Bool R600CheckCompositeTexture(PicturePtr pPict, + int op, + int unit) + { +- int w = pPict->pDrawable->width; +- int h = pPict->pDrawable->height; + unsigned int repeatType = pPict->repeat ? pPict->repeatType : RepeatNone; + unsigned int i; +- int max_tex_w, max_tex_h; +- +- max_tex_w = 8192; +- max_tex_h = 8192; +- +- if ((w > max_tex_w) || (h > max_tex_h)) +- RADEON_FALLBACK(("Picture w/h too large (%dx%d)\n", w, h)); + + for (i = 0; i < sizeof(R600TexFormats) / sizeof(R600TexFormats[0]); i++) { + if (R600TexFormats[i].fmt == pPict->format) +@@ -951,9 +942,7 @@ static Bool R600TextureSetup(PicturePtr pPict, PixmapPtr pPix, + ScrnInfoPtr pScrn = xf86Screens[pPix->drawable.pScreen->myNum]; + RADEONInfoPtr info = RADEONPTR(pScrn); + struct radeon_accel_state *accel_state = info->accel_state; +- int w = pPict->pDrawable->width; +- int h = pPict->pDrawable->height; +- unsigned int repeatType = pPict->repeat ? pPict->repeatType : RepeatNone; ++ unsigned int repeatType; + unsigned int i; + tex_resource_t tex_res; + tex_sampler_t tex_samp; +@@ -969,9 +958,16 @@ static Bool R600TextureSetup(PicturePtr pPict, PixmapPtr pPix, + } + + /* Texture */ ++ if (pPict->pDrawable) { ++ tex_res.w = pPict->pDrawable->width; ++ tex_res.h = pPict->pDrawable->height; ++ repeatType = pPict->repeat ? pPict->repeatType : RepeatNone; ++ } else { ++ tex_res.w = 1; ++ tex_res.h = 1; ++ repeatType = RepeatNormal; ++ } + tex_res.id = unit; +- tex_res.w = w; +- tex_res.h = h; + tex_res.pitch = accel_state->src_obj[unit].pitch; + tex_res.depth = 0; + tex_res.dim = SQ_TEX_DIM_2D; +@@ -1170,24 +1166,24 @@ static Bool R600TextureSetup(PicturePtr pPict, PixmapPtr pPix, + vs_alu_consts[0] = xFixedToFloat(pPict->transform->matrix[0][0]); + vs_alu_consts[1] = xFixedToFloat(pPict->transform->matrix[0][1]); + vs_alu_consts[2] = xFixedToFloat(pPict->transform->matrix[0][2]); +- vs_alu_consts[3] = 1.0 / w; ++ vs_alu_consts[3] = 1.0 / tex_res.w; + + vs_alu_consts[4] = xFixedToFloat(pPict->transform->matrix[1][0]); + vs_alu_consts[5] = xFixedToFloat(pPict->transform->matrix[1][1]); + vs_alu_consts[6] = xFixedToFloat(pPict->transform->matrix[1][2]); +- vs_alu_consts[7] = 1.0 / h; ++ vs_alu_consts[7] = 1.0 / tex_res.h; + } else { + accel_state->is_transform[unit] = FALSE; + + vs_alu_consts[0] = 1.0; + vs_alu_consts[1] = 0.0; + vs_alu_consts[2] = 0.0; +- vs_alu_consts[3] = 1.0 / w; ++ vs_alu_consts[3] = 1.0 / tex_res.w; + + vs_alu_consts[4] = 0.0; + vs_alu_consts[5] = 1.0; + vs_alu_consts[6] = 0.0; +- vs_alu_consts[7] = 1.0 / h; ++ vs_alu_consts[7] = 1.0 / tex_res.h; + } + + /* VS alu constants */ +@@ -1202,33 +1198,30 @@ static Bool R600CheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskP + { + uint32_t tmp1; + PixmapPtr pSrcPixmap, pDstPixmap; +- int max_tex_w, max_tex_h, max_dst_w, max_dst_h; + + /* Check for unsupported compositing operations. */ + if (op >= (int) (sizeof(R600BlendOp) / sizeof(R600BlendOp[0]))) + RADEON_FALLBACK(("Unsupported Composite op 0x%x\n", op)); + +- if (!pSrcPicture->pDrawable) +- RADEON_FALLBACK(("Solid or gradient pictures not supported yet\n")); +- +- pSrcPixmap = RADEONGetDrawablePixmap(pSrcPicture->pDrawable); ++ if (pSrcPicture->pDrawable) { ++ pSrcPixmap = RADEONGetDrawablePixmap(pSrcPicture->pDrawable); + +- max_tex_w = 8192; +- max_tex_h = 8192; +- max_dst_w = 8192; +- max_dst_h = 8192; ++ if (pSrcPixmap->drawable.width >= 8192 || ++ pSrcPixmap->drawable.height >= 8192) { ++ RADEON_FALLBACK(("Source w/h too large (%d,%d).\n", ++ pSrcPixmap->drawable.width, ++ pSrcPixmap->drawable.height)); ++ } + +- if (pSrcPixmap->drawable.width >= max_tex_w || +- pSrcPixmap->drawable.height >= max_tex_h) { +- RADEON_FALLBACK(("Source w/h too large (%d,%d).\n", +- pSrcPixmap->drawable.width, +- pSrcPixmap->drawable.height)); +- } ++ if (!R600CheckCompositeTexture(pSrcPicture, pDstPicture, op, 0)) ++ return FALSE; ++ } else if (pSrcPicture->pSourcePict->type != SourcePictTypeSolidFill) ++ RADEON_FALLBACK(("Gradient pictures not supported yet\n")); + + pDstPixmap = RADEONGetDrawablePixmap(pDstPicture->pDrawable); + +- if (pDstPixmap->drawable.width >= max_dst_w || +- pDstPixmap->drawable.height >= max_dst_h) { ++ if (pDstPixmap->drawable.width >= 8192 || ++ pDstPixmap->drawable.height >= 8192) { + RADEON_FALLBACK(("Dest w/h too large (%d,%d).\n", + pDstPixmap->drawable.width, + pDstPixmap->drawable.height)); +@@ -1237,38 +1230,35 @@ static Bool R600CheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskP + if (pMaskPicture) { + PixmapPtr pMaskPixmap; + +- if (!pMaskPicture->pDrawable) +- RADEON_FALLBACK(("Solid or gradient pictures not supported yet\n")); ++ if (pMaskPicture->pDrawable) { ++ pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable); + +- pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable); +- +- if (pMaskPixmap->drawable.width >= max_tex_w || +- pMaskPixmap->drawable.height >= max_tex_h) { +- RADEON_FALLBACK(("Mask w/h too large (%d,%d).\n", +- pMaskPixmap->drawable.width, +- pMaskPixmap->drawable.height)); +- } ++ if (pMaskPixmap->drawable.width >= 8192 || ++ pMaskPixmap->drawable.height >= 8192) { ++ RADEON_FALLBACK(("Mask w/h too large (%d,%d).\n", ++ pMaskPixmap->drawable.width, ++ pMaskPixmap->drawable.height)); ++ } + +- if (pMaskPicture->componentAlpha) { +- /* Check if it's component alpha that relies on a source alpha and +- * on the source value. We can only get one of those into the +- * single source value that we get to blend with. +- */ +- if (R600BlendOp[op].src_alpha && +- (R600BlendOp[op].blend_cntl & COLOR_SRCBLEND_mask) != +- (BLEND_ZERO << COLOR_SRCBLEND_shift)) { +- RADEON_FALLBACK(("Component alpha not supported with source " +- "alpha and source value blending.\n")); ++ if (pMaskPicture->componentAlpha) { ++ /* Check if it's component alpha that relies on a source alpha and ++ * on the source value. We can only get one of those into the ++ * single source value that we get to blend with. ++ */ ++ if (R600BlendOp[op].src_alpha && ++ (R600BlendOp[op].blend_cntl & COLOR_SRCBLEND_mask) != ++ (BLEND_ZERO << COLOR_SRCBLEND_shift)) { ++ RADEON_FALLBACK(("Component alpha not supported with source " ++ "alpha and source value blending.\n")); ++ } + } +- } + +- if (!R600CheckCompositeTexture(pMaskPicture, pDstPicture, op, 1)) +- return FALSE; ++ if (!R600CheckCompositeTexture(pMaskPicture, pDstPicture, op, 1)) ++ return FALSE; ++ } else if (pMaskPicture->pSourcePict->type != SourcePictTypeSolidFill) ++ RADEON_FALLBACK(("Gradient pictures not supported yet\n")); + } + +- if (!R600CheckCompositeTexture(pSrcPicture, pDstPicture, op, 0)) +- return FALSE; +- + if (!R600GetDestFormat(pDstPicture, &tmp1)) + return FALSE; + +@@ -1280,7 +1270,8 @@ static Bool R600PrepareComposite(int op, PicturePtr pSrcPicture, + PicturePtr pMaskPicture, PicturePtr pDstPicture, + PixmapPtr pSrc, PixmapPtr pMask, PixmapPtr pDst) + { +- ScrnInfoPtr pScrn = xf86Screens[pSrc->drawable.pScreen->myNum]; ++ ScreenPtr pScreen = pDst->drawable.pScreen; ++ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + RADEONInfoPtr info = RADEONPTR(pScrn); + struct radeon_accel_state *accel_state = info->accel_state; + uint32_t dst_format; +@@ -1288,15 +1279,21 @@ static Bool R600PrepareComposite(int op, PicturePtr pSrcPicture, + shader_config_t vs_conf, ps_conf; + struct r600_accel_object src_obj, mask_obj, dst_obj; + +- if (pDst->drawable.bitsPerPixel < 8 || pSrc->drawable.bitsPerPixel < 8) ++ if (pDst->drawable.bitsPerPixel < 8 || (pSrc && pSrc->drawable.bitsPerPixel < 8)) + return FALSE; + ++ if (!pSrc) { ++ pSrc = RADEONSolidPixmap(pScreen, pSrcPicture->pSourcePict->solidFill.color); ++ if (!pSrc) ++ RADEON_FALLBACK("Failed to create solid scratch pixmap\n"); ++ } ++ + #if defined(XF86DRM_MODE) + if (info->cs) { + src_obj.offset = 0; + dst_obj.offset = 0; +- src_obj.bo = radeon_get_pixmap_bo(pSrc); + dst_obj.bo = radeon_get_pixmap_bo(pDst); ++ src_obj.bo = radeon_get_pixmap_bo(pSrc); + dst_obj.tiling_flags = radeon_get_pixmap_tiling(pDst); + src_obj.tiling_flags = radeon_get_pixmap_tiling(pSrc); + dst_obj.surface = radeon_get_pixmap_surface(pDst); +@@ -1322,7 +1319,16 @@ static Bool R600PrepareComposite(int op, PicturePtr pSrcPicture, + dst_obj.bpp = pDst->drawable.bitsPerPixel; + dst_obj.domain = RADEON_GEM_DOMAIN_VRAM; + +- if (pMask) { ++ if (pMaskPicture) { ++ if (!pMask) { ++ pMask = RADEONSolidPixmap(pScreen, pMaskPicture->pSourcePict->solidFill.color); ++ if (!pMask) { ++ if (!pSrcPicture->pDrawable) ++ pScreen->DestroyPixmap(pSrc); ++ RADEON_FALLBACK("Failed to create solid scratch pixmap\n"); ++ } ++ } ++ + #if defined(XF86DRM_MODE) + if (info->cs) { + mask_obj.offset = 0; +@@ -1509,11 +1515,9 @@ static Bool R600PrepareComposite(int op, PicturePtr pSrcPicture, + return TRUE; + } + +-static void R600DoneComposite(PixmapPtr pDst) ++static void R600FinishComposite(ScrnInfoPtr pScrn, PixmapPtr pDst, ++ struct radeon_accel_state *accel_state) + { +- ScrnInfoPtr pScrn = xf86Screens[pDst->drawable.pScreen->myNum]; +- RADEONInfoPtr info = RADEONPTR(pScrn); +- struct radeon_accel_state *accel_state = info->accel_state; + int vtx_size; + + if (accel_state->vsync) +@@ -1527,6 +1531,22 @@ static void R600DoneComposite(PixmapPtr pDst) + r600_finish_op(pScrn, vtx_size); + } + ++static void R600DoneComposite(PixmapPtr pDst) ++{ ++ ScreenPtr pScreen = pDst->drawable.pScreen; ++ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; ++ RADEONInfoPtr info = RADEONPTR(pScrn); ++ struct radeon_accel_state *accel_state = info->accel_state; ++ ++ R600FinishComposite(pScrn, pDst, accel_state); ++ ++ if (!accel_state->src_pic->pDrawable) ++ pScreen->DestroyPixmap(accel_state->src_pix); ++ ++ if (accel_state->msk_pic && !accel_state->msk_pic->pDrawable) ++ pScreen->DestroyPixmap(accel_state->msk_pix); ++} ++ + static void R600Composite(PixmapPtr pDst, + int srcX, int srcY, + int maskX, int maskY, +@@ -1543,7 +1563,7 @@ static void R600Composite(PixmapPtr pDst, + + #ifdef XF86DRM_MODE + if (info->cs && CS_FULL(info->cs)) { +- R600DoneComposite(info->accel_state->dst_pix); ++ R600FinishComposite(pScrn, pDst, info->accel_state); + radeon_cs_flush_indirect(pScrn); + R600PrepareComposite(info->accel_state->composite_op, + info->accel_state->src_pic, +diff --git a/src/radeon_exa_render.c b/src/radeon_exa_render.c +index e5c231f..b6cc9e4 100644 +--- a/src/radeon_exa_render.c ++++ b/src/radeon_exa_render.c +@@ -299,8 +299,8 @@ static Bool RADEONSetupSourceTile(PicturePtr pPict, + if (repeatType == RepeatNormal || repeatType == RepeatReflect) { + Bool badPitch = needMatchingPitch && !RADEONPitchMatches(pPix); + +- int w = pPict->pDrawable->width; +- int h = pPict->pDrawable->height; ++ int w = pPict->pDrawable ? pPict->pDrawable->width : 1; ++ int h = pPict->pDrawable ? pPict->pDrawable->height : 1; + + if (pPict->transform) { + if (badPitch) +@@ -1112,23 +1112,8 @@ static Bool R300CheckCompositeTexture(PicturePtr pPict, + ScreenPtr pScreen = pDstPict->pDrawable->pScreen; + ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + RADEONInfoPtr info = RADEONPTR(pScrn); +- + unsigned int repeatType = pPict->repeat ? pPict->repeatType : RepeatNone; +- int w = pPict->pDrawable->width; +- int h = pPict->pDrawable->height; + int i; +- int max_tex_w, max_tex_h; +- +- if (is_r500) { +- max_tex_w = 4096; +- max_tex_h = 4096; +- } else { +- max_tex_w = 2048; +- max_tex_h = 2048; +- } +- +- if ((w > max_tex_w) || (h > max_tex_h)) +- RADEON_FALLBACK(("Picture w/h too large (%dx%d)\n", w, h)); + + for (i = 0; i < sizeof(R300TexFormats) / sizeof(R300TexFormats[0]); i++) + { +@@ -1139,7 +1124,7 @@ static Bool R300CheckCompositeTexture(PicturePtr pPict, + RADEON_FALLBACK(("Unsupported picture format 0x%x\n", + (int)pPict->format)); + +- if (!RADEONCheckTexturePOT(pPict, unit == 0)) { ++ if (pPict->pDrawable && !RADEONCheckTexturePOT(pPict, unit == 0)) { + if (info->cs) { + struct radeon_exa_pixmap_priv *driver_priv; + PixmapPtr pPix; +@@ -1181,15 +1166,23 @@ static Bool FUNC_NAME(R300TextureSetup)(PicturePtr pPict, PixmapPtr pPix, + { + RINFO_FROM_SCREEN(pPix->drawable.pScreen); + uint32_t txfilter, txformat0, txformat1, txoffset, txpitch, us_format = 0; +- int w = pPict->pDrawable->width; +- int h = pPict->pDrawable->height; ++ int w, h; + int i, pixel_shift, out_size = 6; +- unsigned int repeatType = pPict->repeat ? pPict->repeatType : RepeatNone; ++ unsigned int repeatType; + struct radeon_exa_pixmap_priv *driver_priv; + ACCEL_PREAMBLE(); + + TRACE; + ++ if (pPict->pDrawable) { ++ w = pPict->pDrawable->width; ++ h = pPict->pDrawable->height; ++ repeatType = pPict->repeat ? pPict->repeatType : RepeatNone; ++ } else { ++ w = h = 1; ++ repeatType = RepeatNormal; ++ } ++ + txpitch = exaGetPixmapPitch(pPix); + txoffset = 0; + +@@ -1394,11 +1387,6 @@ static Bool R300CheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskP + if (op >= sizeof(RadeonBlendOp) / sizeof(RadeonBlendOp[0])) + RADEON_FALLBACK(("Unsupported Composite op 0x%x\n", op)); + +- if (!pSrcPicture->pDrawable) +- RADEON_FALLBACK(("Solid or gradient pictures not supported yet\n")); +- +- pSrcPixmap = RADEONGetDrawablePixmap(pSrcPicture->pDrawable); +- + if (IS_R500_3D) { + max_tex_w = 4096; + max_tex_h = 4096; +@@ -1416,13 +1404,6 @@ static Bool R300CheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskP + } + } + +- if (pSrcPixmap->drawable.width > max_tex_w || +- pSrcPixmap->drawable.height > max_tex_h) { +- RADEON_FALLBACK(("Source w/h too large (%d,%d).\n", +- pSrcPixmap->drawable.width, +- pSrcPixmap->drawable.height)); +- } +- + pDstPixmap = RADEONGetDrawablePixmap(pDstPicture->pDrawable); + + if (pDstPixmap->drawable.width > max_dst_w || +@@ -1432,20 +1413,32 @@ static Bool R300CheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskP + pDstPixmap->drawable.height)); + } + ++ if (pSrcPicture->pDrawable) { ++ pSrcPixmap = RADEONGetDrawablePixmap(pSrcPicture->pDrawable); ++ ++ if (pSrcPixmap->drawable.width > max_tex_w || ++ pSrcPixmap->drawable.height > max_tex_h) { ++ RADEON_FALLBACK(("Source w/h too large (%d,%d).\n", ++ pSrcPixmap->drawable.width, ++ pSrcPixmap->drawable.height)); ++ } ++ } else if (pSrcPicture->pSourcePict->type != SourcePictTypeSolidFill) ++ RADEON_FALLBACK(("Gradient pictures not supported yet\n")); ++ + if (pMaskPicture) { + PixmapPtr pMaskPixmap; + +- if (!pMaskPicture->pDrawable) +- RADEON_FALLBACK(("Solid or gradient pictures not supported yet\n")); ++ if (pMaskPicture->pDrawable) { ++ pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable); + +- pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable); +- +- if (pMaskPixmap->drawable.width > max_tex_w || +- pMaskPixmap->drawable.height > max_tex_h) { +- RADEON_FALLBACK(("Mask w/h too large (%d,%d).\n", +- pMaskPixmap->drawable.width, +- pMaskPixmap->drawable.height)); +- } ++ if (pMaskPixmap->drawable.width > max_tex_w || ++ pMaskPixmap->drawable.height > max_tex_h) { ++ RADEON_FALLBACK(("Mask w/h too large (%d,%d).\n", ++ pMaskPixmap->drawable.width, ++ pMaskPixmap->drawable.height)); ++ } ++ } else if (pMaskPicture->pSourcePict->type != SourcePictTypeSolidFill) ++ RADEON_FALLBACK(("Gradient pictures not supported yet\n")); + + if (pMaskPicture->componentAlpha) { + /* Check if it's component alpha that relies on a source alpha and +@@ -1479,7 +1472,8 @@ static Bool FUNC_NAME(R300PrepareComposite)(int op, PicturePtr pSrcPicture, + PicturePtr pMaskPicture, PicturePtr pDstPicture, + PixmapPtr pSrc, PixmapPtr pMask, PixmapPtr pDst) + { +- RINFO_FROM_SCREEN(pDst->drawable.pScreen); ++ ScreenPtr pScreen = pDst->drawable.pScreen; ++ RINFO_FROM_SCREEN(pScreen); + uint32_t dst_format, dst_pitch; + uint32_t txenable, colorpitch; + uint32_t blendcntl, output_fmt; +@@ -1508,9 +1502,24 @@ static Bool FUNC_NAME(R300PrepareComposite)(int op, PicturePtr pSrcPicture, + if (((dst_pitch >> pixel_shift) & 0x7) != 0) + RADEON_FALLBACK(("Bad destination pitch 0x%x\n", (int)dst_pitch)); + ++ if (!pSrc) { ++ pSrc = RADEONSolidPixmap(pScreen, cpu_to_le32(pSrcPicture->pSourcePict->solidFill.color)); ++ if (!pSrc) ++ RADEON_FALLBACK("Failed to create solid scratch pixmap\n"); ++ } ++ + if (!RADEONSetupSourceTile(pSrcPicture, pSrc, TRUE, FALSE)) + return FALSE; + ++ if (pMaskPicture && !pMask) { ++ pMask = RADEONSolidPixmap(pScreen, cpu_to_le32(pMaskPicture->pSourcePict->solidFill.color)); ++ if (!pMask) { ++ if (!pSrcPicture->pDrawable) ++ pScreen->DestroyPixmap(pSrc); ++ RADEON_FALLBACK("Failed to create solid scratch pixmap\n"); ++ } ++ } ++ + RADEONPrepareCompositeCS(op, pSrcPicture, pMaskPicture, pDstPicture, + pSrc, pMask, pDst); + +@@ -2132,7 +2141,7 @@ static Bool FUNC_NAME(R300PrepareComposite)(int op, PicturePtr pSrcPicture, + return TRUE; + } + +-static void FUNC_NAME(RadeonDoneComposite)(PixmapPtr pDst) ++static void FUNC_NAME(RadeonFinishComposite)(PixmapPtr pDst) + { + RINFO_FROM_SCREEN(pDst->drawable.pScreen); + ACCEL_PREAMBLE(); +@@ -2179,6 +2188,20 @@ static void FUNC_NAME(RadeonDoneComposite)(PixmapPtr pDst) + LEAVE_DRAW(0); + } + ++static void FUNC_NAME(RadeonDoneComposite)(PixmapPtr pDst) ++{ ++ ScreenPtr pScreen = pDst->drawable.pScreen; ++ RINFO_FROM_SCREEN(pScreen); ++ struct radeon_accel_state *accel_state = info->accel_state; ++ ++ FUNC_NAME(RadeonFinishComposite)(pDst); ++ ++ if (!accel_state->src_pic->pDrawable) ++ pScreen->DestroyPixmap(accel_state->src_pix); ++ ++ if (accel_state->msk_pic && !accel_state->msk_pic->pDrawable) ++ pScreen->DestroyPixmap(accel_state->msk_pix); ++} + + #ifdef ACCEL_CP + +@@ -2257,7 +2280,7 @@ static void FUNC_NAME(RadeonCompositeTile)(ScrnInfoPtr pScrn, + if ((info->cs && CS_FULL(info->cs)) || + (!info->cs && (info->cp->indirectBuffer->used + 4 * 32) > + info->cp->indirectBuffer->total)) { +- FUNC_NAME(RadeonDoneComposite)(info->accel_state->dst_pix); ++ FUNC_NAME(RadeonFinishComposite)(info->accel_state->dst_pix); + if (info->cs) + radeon_cs_flush_indirect(pScrn); + else +diff --git a/src/radeon_exa_shared.c b/src/radeon_exa_shared.c +index be1d2fa..28dc335 100644 +--- a/src/radeon_exa_shared.c ++++ b/src/radeon_exa_shared.c +@@ -126,6 +126,25 @@ Bool RADEONCheckBPP(int bpp) + return FALSE; + } + ++PixmapPtr RADEONSolidPixmap(ScreenPtr pScreen, uint32_t solid) ++{ ++ PixmapPtr pPix = pScreen->CreatePixmap(pScreen, 1, 1, 32, 0); ++ struct radeon_bo *bo; ++ ++ exaMoveInPixmap(pPix); ++ bo = radeon_get_pixmap_bo(pPix); ++ ++ if (radeon_bo_map(bo, 1)) { ++ pScreen->DestroyPixmap(pPix); ++ return NULL; ++ } ++ ++ memcpy(bo->ptr, &solid, 4); ++ radeon_bo_unmap(bo); ++ ++ return pPix; ++} ++ + static Bool radeon_vb_get(ScrnInfoPtr pScrn) + { + RADEONInfoPtr info = RADEONPTR(pScrn); +diff --git a/src/radeon_exa_shared.h b/src/radeon_exa_shared.h +index 7b8b5ca..60a1045 100644 +--- a/src/radeon_exa_shared.h ++++ b/src/radeon_exa_shared.h +@@ -40,6 +40,7 @@ extern void RADEONVlineHelperClear(ScrnInfoPtr pScrn); + extern void RADEONVlineHelperSet(ScrnInfoPtr pScrn, int x1, int y1, int x2, int y2); + extern Bool RADEONValidPM(uint32_t pm, int bpp); + extern Bool RADEONCheckBPP(int bpp); ++extern PixmapPtr RADEONSolidPixmap(ScreenPtr pScreen, uint32_t solid); + + #define RADEON_TRACE_FALL 0 + #define RADEON_TRACE_DRAW 0 +-- +cgit v0.9.0.2-2-gbebe diff --git a/x11-drivers/xf86-video-ati/metadata.xml b/x11-drivers/xf86-video-ati/metadata.xml new file mode 100644 index 00000000..01c4c004 --- /dev/null +++ b/x11-drivers/xf86-video-ati/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>x11</herd> +</pkgmetadata> diff --git a/x11-drivers/xf86-video-ati/xf86-video-ati-6.14.4-r1.ebuild b/x11-drivers/xf86-video-ati/xf86-video-ati-6.14.4-r1.ebuild new file mode 100644 index 00000000..9ab51577 --- /dev/null +++ b/x11-drivers/xf86-video-ati/xf86-video-ati-6.14.4-r1.ebuild @@ -0,0 +1,46 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/x11-drivers/xf86-video-ati/xf86-video-ati-6.14.4-r1.ebuild,v 1.8 2012/07/12 17:31:31 ranger Exp $ + +EAPI=4 + +XORG_DRI=always +inherit xorg-2 + +DESCRIPTION="ATI video driver" + +KEYWORDS="~alpha amd64 ~ia64 ppc ppc64 ~sparc x86 ~amd64-fbsd ~x86-fbsd" +IUSE="" + +RDEPEND=">=x11-libs/libdrm-2.4.33[video_cards_radeon]" +DEPEND="${RDEPEND}" + +PATCHES=( + "${FILESDIR}"/${PN}-6.14.4-exa-solid-accel-r300.patch + "${FILESDIR}"/${PN}-6.14.4-exa-solid-accel-evergreen.patch + "${FILESDIR}"/${PN}-6.14.4-exa-solid-accel-r100.patch + "${FILESDIR}"/${PN}-6.14.4-exa-solid-accel-r200.patch +) + +pkg_setup() { + xorg-2_pkg_setup + XORG_CONFIGURE_OPTIONS=( + --enable-dri + --enable-kms + --enable-exa + ) +} + +src_install() { + xorg-2_src_install + + # install a modprobe.d file to make sure that KMS + # is enabled for the radeon kernel driver + # if this package is installed. KMS is now mandatory + # but current Sabayon kernels have it disabled to + # allow fglrx to work + dodir /etc/modprobe.d + echo "options radeon modeset=1" > radeon.conf + insinto /etc/modprobe.d + doins radeon.conf +} diff --git a/x11-drivers/xf86-video-ati/xf86-video-ati-6.14.6-r1.ebuild b/x11-drivers/xf86-video-ati/xf86-video-ati-6.14.6-r1.ebuild new file mode 100644 index 00000000..8d82ae96 --- /dev/null +++ b/x11-drivers/xf86-video-ati/xf86-video-ati-6.14.6-r1.ebuild @@ -0,0 +1,43 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=4 + +XORG_DRI=always +XORG_EAUTORECONF=yes +inherit xorg-2 + +DESCRIPTION="ATI video driver" + +KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd" +IUSE="" + +RDEPEND=">=x11-libs/libdrm-2.4.36[video_cards_radeon]" +DEPEND="${RDEPEND}" + +src_prepare() { + # disable XAA to allow building against >=xorg-server-1.12.99.902, bug #428094 + sed -i '/USE_XAA, 1/d' configure.ac || die + xorg-2_src_prepare +} + +pkg_setup() { + xorg-2_pkg_setup + XORG_CONFIGURE_OPTIONS=( + --enable-dri + --enable-kms + --enable-exa + ) +} + +pkg_preinst() { + # "untrack" radeon.conf, starting from kernel 3.6, this is + # no longer needed. However, we don't want to break the current + # status-quo. + cp "${EROOT}/etc/modprobe.d/"{radeon.conf,radeon.conf.untracked} || die +} + +pkg_postinst() { + mv "${EROOT}/etc/modprobe.d/"{radeon.conf.untracked,radeon.conf} || die +} diff --git a/x11-drivers/xf86-video-ati/xf86-video-ati-7.0.0.ebuild b/x11-drivers/xf86-video-ati/xf86-video-ati-7.0.0.ebuild new file mode 100644 index 00000000..cf517c11 --- /dev/null +++ b/x11-drivers/xf86-video-ati/xf86-video-ati-7.0.0.ebuild @@ -0,0 +1,37 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=4 + +XORG_DRI=always +inherit xorg-2 + +DESCRIPTION="ATI video driver" + +KEYWORDS="~alpha amd64 ~ia64 ~ppc ~ppc64 ~sparc x86" +IUSE="glamor udev" + +RDEPEND=">=x11-libs/libdrm-2.4.36[video_cards_radeon] + glamor? ( x11-libs/glamor ) + udev? ( sys-fs/udev )" +DEPEND="${RDEPEND}" + +src_configure() { + XORG_CONFIGURE_OPTIONS=( + $(use_enable glamor) + $(use_enable udev) + ) + xorg-2_src_configure +} + +pkg_preinst() { + # "untrack" radeon.conf, starting from kernel 3.6, this is + # no longer needed. However, we don't want to break the current + # status-quo. + cp "${EROOT}/etc/modprobe.d/"{radeon.conf,radeon.conf.untracked} || die +} + +pkg_postinst() { + mv "${EROOT}/etc/modprobe.d/"{radeon.conf.untracked,radeon.conf} || die +} diff --git a/x11-drivers/xf86-video-ati/xf86-video-ati-7.1.0.ebuild b/x11-drivers/xf86-video-ati/xf86-video-ati-7.1.0.ebuild new file mode 100644 index 00000000..7a553de5 --- /dev/null +++ b/x11-drivers/xf86-video-ati/xf86-video-ati-7.1.0.ebuild @@ -0,0 +1,41 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=5 + +XORG_DRI=always +inherit xorg-2 + +DESCRIPTION="ATI video driver" + +KEYWORDS="~alpha amd64 ~ia64 ~ppc ~ppc64 ~sparc x86" +IUSE="glamor udev" + +RDEPEND=">=x11-libs/libdrm-2.4.36[video_cards_radeon] + glamor? ( x11-libs/glamor ) + udev? ( virtual/udev )" +DEPEND="${RDEPEND}" + +src_configure() { + XORG_CONFIGURE_OPTIONS=( + $(use_enable glamor) + $(use_enable udev) + ) + xorg-2_src_configure +} + +pkg_preinst() { + # "untrack" radeon.conf, starting from kernel 3.6, this is + # no longer needed. However, we don't want to break the current + # status-quo. + if [ -f "${EROOT}/etc/modprobe.d/radeon.conf" ]; then + cp "${EROOT}/etc/modprobe.d/"{radeon.conf,radeon.conf.untracked} || die + fi +} + +pkg_postinst() { + if [ -f "${EROOT}/etc/modprobe.d/radeon.conf.untracked" ]; then + mv "${EROOT}/etc/modprobe.d/"{radeon.conf.untracked,radeon.conf} || die + fi +} diff --git a/x11-drivers/xf86-video-intel/Manifest b/x11-drivers/xf86-video-intel/Manifest new file mode 100644 index 00000000..3f71f947 --- /dev/null +++ b/x11-drivers/xf86-video-intel/Manifest @@ -0,0 +1,3 @@ +DIST xf86-video-intel-2.20.0.tar.bz2 1552275 SHA256 21949297220ceda32bba430f778c6409002079dc717c7190dbd1062ab4a56783 +EBUILD xf86-video-intel-2.20.0.ebuild 1368 SHA256 e5a3753024787fed056796f71d563dc32082099b61bf30ec3693c84d35362a91 SHA512 214fe3d74846e8b97cd766f2ac79be0251e834ba83859ab75c1e73861a28d58f2b9d35c73b17e49ea079c99573917386a30b90fd54e60330caabfcffade4d3e4 WHIRLPOOL aeb9f7afdc0430166363d1ecb7e6c433a34ced7008af91a3857f1cc652496cb9ea5399a6e5b5212a24e67b64c520396eb3dc2719e89e250939602da4404ff0d2 +MISC metadata.xml 348 SHA256 fa82cf175b029cd8bb6b1376ff254d6505a9dccb779a7a3a94086c91a64aa5bc SHA512 ca2a6176e84b00de3c2aa09c15c6296a9229ec8da6bd1d5d26fb6137972ce696b140803890f274599ce15e9b5b3c8f0ec9c2e2535d37e6ff57a177df7cd45469 WHIRLPOOL a5298f1aa8aadef944aa82bfe4d1572520631d06070fb12d2dfda80ad8605a46284154ac4bc66a03291ac769bb1c812126440cbdf75408f67557fa10fc33f76f diff --git a/x11-drivers/xf86-video-intel/metadata.xml b/x11-drivers/xf86-video-intel/metadata.xml new file mode 100644 index 00000000..da0aa07f --- /dev/null +++ b/x11-drivers/xf86-video-intel/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>x11</herd> + <use> + <flag name="glamor">Enable glamor GL-based acceleration</flag> + <flag name="sna">Enable SandyBridge's New Acceleration (useful on all chipsets, not just SandyBridge)</flag> + </use> +</pkgmetadata> diff --git a/x11-drivers/xf86-video-intel/xf86-video-intel-2.20.0.ebuild b/x11-drivers/xf86-video-intel/xf86-video-intel-2.20.0.ebuild new file mode 100644 index 00000000..0a6d950f --- /dev/null +++ b/x11-drivers/xf86-video-intel/xf86-video-intel-2.20.0.ebuild @@ -0,0 +1,55 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/x11-drivers/xf86-video-intel/xf86-video-intel-2.19.0.ebuild,v 1.7 2012/07/04 22:13:45 remi Exp $ + +EAPI=4 + +XORG_DRI=dri +inherit linux-info xorg-2 + +DESCRIPTION="X.Org driver for Intel cards" + +KEYWORDS="amd64 ~ia64 x86 ~amd64-fbsd -x86-fbsd" +IUSE="glamor sna" + +RDEPEND="x11-libs/libXext + x11-libs/libXfixes + x11-libs/libXvMC + >=x11-libs/libxcb-1.5 + x11-libs/xcb-util + >=x11-libs/libdrm-2.4.29[video_cards_intel] + glamor? ( + x11-libs/glamor + ) + sna? ( + >=x11-base/xorg-server-1.10 + >=x11-libs/pixman-0.24 + )" +DEPEND="${RDEPEND} + >=x11-proto/dri2proto-2.6" + +pkg_setup() { + linux-info_pkg_setup + xorg-2_pkg_setup + XORG_CONFIGURE_OPTIONS=( + $(use_enable dri) + $(use_enable glamor) + $(use_enable sna) + --enable-xvmc + ) +} + +pkg_postinst() { + if linux_config_exists \ + && ! linux_chkconfig_present DRM_I915_KMS; then + echo + ewarn "This driver requires KMS support in your kernel" + ewarn " Device Drivers --->" + ewarn " Graphics support --->" + ewarn " Direct Rendering Manager (XFree86 4.1.0 and higher DRI support) --->" + ewarn " <*> Intel 830M, 845G, 852GM, 855GM, 865G (i915 driver) --->" + ewarn " i915 driver" + ewarn " [*] Enable modesetting on intel by default" + echo + fi +} diff --git a/x11-drivers/xf86-video-radeonhd/Manifest b/x11-drivers/xf86-video-radeonhd/Manifest new file mode 100644 index 00000000..903fdd3e --- /dev/null +++ b/x11-drivers/xf86-video-radeonhd/Manifest @@ -0,0 +1 @@ +EBUILD xf86-video-radeonhd-9999.ebuild 806 SHA256 809185958da48ea3fb412f7e6627980643cc810aeb5c4f732176b13885cb9e7b SHA512 95088fc68797647443a6f800bd48b68975e88214e35cd4c36164a642d7b2fd7f271e6dfa718fe2dfe5262031621f68fd38936a4683d176d1f5755de2e7cae642 WHIRLPOOL 58353a2324c1c46d103b88585ed324b37fa6d7cb0e64f6cddbcda64b807f07cae71a7209500fde083d878f7c25a080fc404667c073486296e3fbf313e30a5295 diff --git a/x11-drivers/xf86-video-radeonhd/xf86-video-radeonhd-9999.ebuild b/x11-drivers/xf86-video-radeonhd/xf86-video-radeonhd-9999.ebuild new file mode 100644 index 00000000..f2aa0e21 --- /dev/null +++ b/x11-drivers/xf86-video-radeonhd/xf86-video-radeonhd-9999.ebuild @@ -0,0 +1,31 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/x11-drivers/xf86-video-radeonhd/xf86-video-radeonhd-1.2.1.ebuild,v 1.3 2008/04/15 15:07:12 drac Exp $ + +XDPVER=-1 +inherit git x-modular + +DESCRIPTION="Experimental Radeon HD video driver." +HOMEPAGE="http://wiki.x.org/wiki/radeonhd" +EGIT_REPO_URI="git://anongit.freedesktop.org/git/xorg/driver/xf86-video-radeonhd" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="dri" + +RDEPEND=">=x11-base/xorg-server-1.3.0 + sys-apps/pciutils + dri? ( >=media-libs/mesa-7.0.3 )" +DEPEND="${RDEPEND} + x11-proto/xextproto + x11-proto/xproto + dri? ( + x11-proto/glproto + x11-proto/xf86driproto + )" + +src_install() { + x-modular_src_install + dobin utils/conntest/rhd_{conntest,dump} +} |