x11-drivers/nvidia-drivers: Version bump (bug #559650 by Nuno Lopes).
authorJeroen Roovers <jer@gentoo.org>
Sat, 5 Sep 2015 13:23:28 +0000 (15:23 +0200)
committerJeroen Roovers <jer@gentoo.org>
Sat, 5 Sep 2015 13:28:38 +0000 (15:28 +0200)
Package-Manager: portage-2.2.20.1

x11-drivers/nvidia-drivers/Manifest
x11-drivers/nvidia-drivers/nvidia-drivers-340.93.ebuild [new file with mode: 0644]
x11-drivers/nvidia-drivers/nvidia-drivers-346.96.ebuild [new file with mode: 0644]
x11-drivers/nvidia-drivers/nvidia-drivers-352.41.ebuild [new file with mode: 0644]
x11-drivers/nvidia-drivers/nvidia-drivers-355.11.ebuild [new file with mode: 0644]

index 29b31675716c1cfde44437e44f7960b4add00d8e..b568f7b503526914bd0b949195a321df81ce5f2d 100644 (file)
@@ -2,37 +2,53 @@ DIST NVIDIA-FreeBSD-x86-173.14.39.tar.gz 20038266 SHA256 63a922ce4c5b676b4cb1ace
 DIST NVIDIA-FreeBSD-x86-304.125.tar.gz 34494889 SHA256 806d0bff9d394390b3a257472bc342857f150e9dba6673e6b930f47a93ec0269 SHA512 d2760196d3f0dfb1837d496bd11dbedab6a2bf3de98da35f16c92133452b915b425a718f72e560f5d6483caf5e2e5bcf99a462b2e392d7a08c77b59695649108 WHIRLPOOL eb008e1956043d48af5f928dc594c8ae9c8a946834d889db5b4a9b3f16bfaeb311221e5d3f83c8c599dee860b54a42030dccf2aaec31dffb6e8460bf646b82ad
 DIST NVIDIA-FreeBSD-x86-331.113.tar.gz 56371300 SHA256 f3b4b5ddf5977223646d2cdb0617ea8a5f667814ca23b29cb225c5685eacd9d7 SHA512 5c45142807a5b8ecb5e037921e4e449f4710a65358579087429e14ee50124863e6a65fbf8cc73efec22bd8ca85d3eb5a815c7301403dd3236e0bb0b177e5f3e8 WHIRLPOOL 97240066b1c45c887770bfe8539b733a2957fdc1511af5b08de4149b0ce9fedc87b6aa8ee8d243793d225c98c09681e4cca93dd1c5f601389637644e659d7863
 DIST NVIDIA-FreeBSD-x86-340.76.tar.gz 59362290 SHA256 0abbcc3bed3f017e7f1887a5c2d014e2b5a020462071998986ed49cdb8e7119f SHA512 e6d8b6d03fe0f9ab25ddeef680e0159ea4073d03762d3419761c02b917edefa9a1f81c209bd386838141c1924364c81126b0a356c325b056a0c2451865bed5eb WHIRLPOOL 7ec0cef6f92bfbd4c8b6a051dc8de4b6b138f63fd4f7e18756178a9aebb91ea32523d5ca885481d8c8c3d1531b153699f4e5606c155d6c3aa79a340637d3744b
+DIST NVIDIA-FreeBSD-x86-340.93.tar.gz 59385673 SHA256 094dc6df60b8e57cf9b94d982cb29c32d5e0c1d81796dbadb39145e78a3b0086 SHA512 ae5ef62aa8dea2f67026dc9e7f369294895516cd443daa277ac2c783ef1fe85df23706aef70cbce41722d239a50c562b66210fd76f662186e25c58b38e617230 WHIRLPOOL 816b2b8c1de3609c03059fbb6f102f54fba5fcc64539745701ef3e20e435ca767ff8fe93c7f0242fcee5fb941210781a526b67cf693a48974723ccbf8e95595f
 DIST NVIDIA-FreeBSD-x86-343.36.tar.gz 59205879 SHA256 8634e7537eca778790296f8355e39ae9a7e16642648e671a6c9339ee55fe340c SHA512 35fcf57d5e830cbe3c07ec70362ad9f0ff6ec327c6b11b6d3c533315e59031501501b9fdb80a3bef720506e5221ad84496745ce13d2c9885076f1c8e8537ba46 WHIRLPOOL 3ed3230dc190e7670c960743d94b8db1c0d9908b597f952746d851b403847e7b2836f1c60e6af0fe73072c1fda3971dfacc37c21908c227b2c20b5045dbfd61f
 DIST NVIDIA-FreeBSD-x86-346.87.tar.gz 58003852 SHA256 72481c38989c1aa1835485d2222e6a98f12f7265518fef4bd2c089fe8023d32e SHA512 6a8bf0671a48f9bfe74f844586985d7132a56b4056536e5581d695414bdebd4e393ac85bd6dd6d06f89a46dfd3b4aea0953bb254cab1b1ade2b383292686d6ae WHIRLPOOL 2358746b56d426be75af6a6665b78f2bcbf8abd7dcf954203cc09d945baf89b75fa004fec4be31cd407efc46bf2aaf5add1010ade7a6616fe8347d8954e892ef
+DIST NVIDIA-FreeBSD-x86-346.96.tar.gz 58010757 SHA256 a27d7b79c053702bf6524b2c4725321fa557be18a585735e0b8122d884348c3e SHA512 f05ff7f98ae56ef992c21440e94dc12537f91353c9ba6fbe74b5928744823cb0cce38e7aa2da6c88569dda52f9ae0f6674c29255db155a2fada9b78f024dda8d WHIRLPOOL d21cfd27971847dac0118429b58b34be24f19fefc9ee05f70454e7c350d4a8678e2d01f7db72e05bd1026c45fa9373783b9817efcf76f70b70f6a5ecd8a5bc7c
 DIST NVIDIA-FreeBSD-x86-349.16.tar.gz 59441939 SHA256 d8b633790036f032b48196503bc6a85ca82de54edd2409f7c1ec86c053e89e07 SHA512 7d914c74b8b4b50931f27f085ca587fab9a4ba0dafab1cdbb751605cdf702b84e2e31b999b374c7adaa096d6dac6268e9b2ff6fcde5ac37b6dbdfd0ebf4a1422 WHIRLPOOL ab68e75c05a0cf2df803fcf3755c366a04cf6f973bb02b673df58dcdee6cb13a4cb5e6fec5270918c725603780b2fefbb89927789b92ddd01647852d34562b9a
 DIST NVIDIA-FreeBSD-x86-352.30.tar.gz 55043903 SHA256 6d91dce0171a0c7c21d9ce2c4c371940e4ccd273941c3c32bfd04bdc4166d2ae SHA512 cb3e160292f80aaae5d3a17fa9dbba9f3799e42e2a86c2ddae41ff2bce1ac80c68f15dc512fc3879bd7e9fdc8af472852e9d5d3c2ab5afe4e1c9cde7017fbfd9 WHIRLPOOL 351861aab1a22193f71e8231f76397ccc89a1109f583c0cc512ed1657263dd224211b7505e8b7647282bad0f85e15a38ae4d3da7d88ad45dde8d05e87877f157
+DIST NVIDIA-FreeBSD-x86-352.41.tar.gz 55205144 SHA256 dadc8281bc13559aa4672b2436e7f7f6227fe3073882ba46765f156deb26e4c2 SHA512 6e4314e8ab4578343972ce0bd5eb0f6c847dcdf5b682b9ac04fa4fc9e0757a645d935c32d41fb18ad1468a62f5edb0f5081c2082071ce930f6205c72716f94fd WHIRLPOOL 33bb2954c4dbfe15456d467c0a41c8ac585f7f1b046e2540b7ef943434cd33c2ffe863bb80f193a783eb52a356a79e57af304b3f2a83c298de4bb601f2fd8876
 DIST NVIDIA-FreeBSD-x86-355.06.tar.gz 56677167 SHA256 49f691695228e0c2effcee4ad0f3ea90bb1086d0dd28af8f88eb10231753010a SHA512 f8698a6afb10d27e27559f56029fa38db9d0d5a7d4ead7a1f4097f113b618eb4b73c82ebbf1c53b0766a43e6a0dfe8eec9a85200b85df450f3c8d70aa713cbb4 WHIRLPOOL bf97c042f55b43ac5d9e286b2eadb75cab6d8a12e8cc54c061a9b0bcaabfd8d8b4df81f73ffff02df058fccd762afff16063b12e1d186b0e31f3aa6dece5d323
+DIST NVIDIA-FreeBSD-x86-355.11.tar.gz 56832647 SHA256 3d4d5d8fcf558a8f5f1a88846161b1a89bd7fc66c0268b40613c7e3457f5ce7b SHA512 744d9b8c48b82bac0bfeea5e8b2b2bbaa0e6a183cbd1f5d4f782fa7b21a6f6c5b252e556a8b2161c3b5d43938ef8fabf6cb36f995ee823fbf792f3c9a92b87e1 WHIRLPOOL 43bceb8e8d3b00789cf2c8163a055b1d2405ef93e471fda4c4e2146093289891557f4ec8debfe6bca89ad6ed6dc2e389f1d3060759a71e8949df343bc31b85b9
 DIST NVIDIA-FreeBSD-x86-96.43.23.tar.gz 15463464 SHA256 18d855db8381eda1a6cf548c9e5095fc5bb8694bf1d6e24fc1072fba4e54cd78 SHA512 42d7b1b76cdb3b23680363e565614a22112162a5dd3639cb804fe670c0c3f3f23595bbefa3f78afdc6a8ca848446dee853c7a355f2c96a0d01b354753ba2785c WHIRLPOOL f8e59ce521990cd9edee441e73f973f074db492952807a0931e362102874cddbb47604ff5c5eb20a0cbde27f9b6d4e440dd12cc2e5a20c9cb65bf3c0b3e62511
 DIST NVIDIA-FreeBSD-x86_64-304.125.tar.gz 35498616 SHA256 46b14b8c5ee1c02ff5e30afc9c99f4dd2edc426ccb2b73764093a1787639699d SHA512 34d48f24b1f5019b23c2937f8b5280fcc596764e1f5833cfe33db5e4d8395a0d69aa4c4214a5b97620dbaade73ac0fa333c36cceb4a137bb26d3ba37c31a0eb7 WHIRLPOOL 82677bd2aec3a60fe64211170573ef702b1dd1ab5a71ec922fb56b8d40f2163c0151a7c7f8bdace9127c8afcaf278f8f23a1cb585a8ad3bb7a0d42787ab17fb2
 DIST NVIDIA-FreeBSD-x86_64-331.113.tar.gz 47509194 SHA256 c848e187c79064ea3f52406312aa09d06f0aaef5063be7522b2b2319c43c872c SHA512 4e206719afcee47179e0756ac67fc4e61d513efb1cd0264b28726d6de16846feee873a2df362bf645b0527d395b6d82f5b54dbc447bccb74128d7bff37bb7b1b WHIRLPOOL a51b0bd9f7301d9bb76b54ffa44337ad4d875125281c4b9921e66a76d434879832f542df9c6ba436ef83fb3fa0afe5197f3425f1b7aa16274aca5080259f343d
 DIST NVIDIA-FreeBSD-x86_64-340.76.tar.gz 60206978 SHA256 60037d035b9af9f1d4dcdd5033e1b28b0cd4c7ca94f6bcb8d267e037a930fdc0 SHA512 d478eac282dfb43205f7464d6542cf1f71ed4dea6b8381314affb8647d104c5ddf7e658b6b8eb5e0bdb18207b92f76c574b24959ce23034d375cc712998e6e7c WHIRLPOOL 98ebffd792a47e3a9ef369976db11909bc13551f38977f85ece41e5a31a790c2c173badfc166e3a0bfe4361d5221129d19364c074ba11fc4aa9062d5cb1499a8
+DIST NVIDIA-FreeBSD-x86_64-340.93.tar.gz 60215584 SHA256 07208f6a832c2da8748b1c4f8b5ce42a7b617f2ee1ac59155fecaff952c30988 SHA512 c480df2f36c3d6eba53af9c3070e1561ae7c56cd5d31fb531dcb6897ca02d0d205c0ce99597304ea36b7b75b173e31a9a4c07ddd143ad13884aff0a7c3479bce WHIRLPOOL c1b28898ffe733961bdb622e8b430715c74871cfaab0348a9e5990df5a92676e8fb8c199ea1f1a06fa6c6ded65877b987b802a7a9ea0b7023cbaa62fb52eda01
 DIST NVIDIA-FreeBSD-x86_64-343.36.tar.gz 60045074 SHA256 aa189d9fd6448ed49ff4a8dd09dd15c06f6b3ef662fd3d960b4853c485cbab8a SHA512 23c38de071ac6e2c87db2c767b07f243703e55cd6485eb8e538fb72f38e9856b7ff28430fdd7eccc4728f3d36c14eac8b1fbf7155fe864ead93ed4218d5b65b5 WHIRLPOOL 401cdc5675d5fe60b6ca492be912573e9fc56a0a67ad680e2cada783ec8a34c15c6ca1a495c8fdbf09e384bc420295750540f5c77907c459c80f400d8291e44a
 DIST NVIDIA-FreeBSD-x86_64-346.87.tar.gz 58770347 SHA256 fb91a3f66562843465cb6eb28d7d078a31dd9d9ccd65d63d87ee3d7cd7e91d8e SHA512 f1d0e1acfc0eae69d4db3200410babe559d72f46ae7d2beca4f214a35d2b6418bf6b9c333df669f2e77256e1e55959401c0525ae6568121e9b3e6aac0e77bc66 WHIRLPOOL 0df2ee60b2f49c36559aba1135d67a71b9f99dd71c8eb6f19221887f152f7b639176721f2ab3d9b75ae7de62a4248117a15ba25c2af2c469559688c0e6dc5577
+DIST NVIDIA-FreeBSD-x86_64-346.96.tar.gz 58774970 SHA256 89daaff29afe92d825ec8c00149a703b4eb234e4f16bbfb98673f077521bcff9 SHA512 99fd84f1b2177b4af2fd83088c4f8a9a6259f059c002a771ff9c3993953787dd96f83322e4ce611234674a00792a83fa439af915d6ad6886af6de2d88de94edb WHIRLPOOL 5bca7c540c713b8e070b7d8412bcc2547335b9379429dc3a04ab50eae22c03eaa922486a900b2ab3cf147e0c4f2e8d3b60e81aa329b6b2956c28d2b32900082c
 DIST NVIDIA-FreeBSD-x86_64-349.16.tar.gz 60290477 SHA256 b4cb3f3738f8a68b90fb7830ff9b48d9f1e51d3aa6e2dd555b690b4848101a86 SHA512 47c3f59f76b644e5ac69197a22ec8d17d764aa9090049633d274c579d59af8b36780e7a1aa97fa92414eb3c0e76d36e7bdf317f20ed2647482866cd5575f134d WHIRLPOOL a5455b5329211f92ca8f6e87fb796d9844e293878d4a64d2ef6a40a15b57687e66ab81baefb0132790d922b6b4e0c577469c75f98ad208433e14760cc77c6bf7
 DIST NVIDIA-FreeBSD-x86_64-352.30.tar.gz 56681273 SHA256 5fed650cb7b4298d6dac9750ee2e396b2fe24902700c16784c2d38ef0ecd80c1 SHA512 18f878325a02cf5caaba24b7892f55d0ce554492a563dce0a720741c39652c0520708432406d6c78c61fb6f92a4c9dae52dd428c02e3e8442188c49e693edc4d WHIRLPOOL aa2ea6d143a3382fef6a012ee3bfac26df26e1dcdb54ab5d34eab893b1a0459e2a1875925ccda3d531bb59d9336a166d4e369055151ecabae31356be19fd288f
+DIST NVIDIA-FreeBSD-x86_64-352.41.tar.gz 56851306 SHA256 4af779cd17c0cb00df3fd280d7d8199f0e41617b501c810632ebd1c8ca3012f9 SHA512 84ad4ac30c76af62532420a4f62dffe5386d047d999f66ad9cf0fceb4c7aac29cad6370560a01b0de772057d78f84df76ddc5686a41a155318566640fa859939 WHIRLPOOL 77e4a736e7296402190a7fb79024e62b9178bddc7ee0dbba212ceb1882ecd086a9a3c10bb862c985ec4c5ecfc8335e5672a81a5e486f20c9126209fcc761b8ac
 DIST NVIDIA-FreeBSD-x86_64-355.06.tar.gz 53894942 SHA256 65c5c44bdb6eb19817dfce99df052430b471b9412bd53b95b3723847b195f108 SHA512 f0bb9cff6b914a4526f48f91cb12a10a4ed99a7b550a76b73b087a8f08c90a0d5e8b6b0fb8eb866a1a7dcacbc1242064736c53a164aa48c85c9416a10e68f9ac WHIRLPOOL 989924bd876d440952a13492ea79794f2ca0a9fd026a8fd231d0d52a98bd5610a6560f628998b754cdc62b5e7c2e47948f2bbc2b01415666f433d126db26e06d
+DIST NVIDIA-FreeBSD-x86_64-355.11.tar.gz 54031364 SHA256 3637a879905bb541bf02f9bcdfe37c242a52ec6071671a0ba33581efdce1504e SHA512 84add7d90c7f45d19d736ee70c1c4a6434be1c512bafa29cbbf9221e99a31fc383971696dce99da5a77a171eb3537c98cfec7005ff061411ac9c310fa219c906 WHIRLPOOL d8ade5d63c3ef78fa92f9dc07934eed8fdd4ead1e40f1820ad95feb166264a95a800879e1fc6374bf2deef419b0838b4864796d9f81a81110d06ccd9b65c459d
 DIST NVIDIA-Linux-x86-173.14.39-pkg0.run 15134997 SHA256 a09935f37121ed3db8ae3da63a0d8e9d4348a19c859811c9fe44d6ce8e3eab23 SHA512 e24e15ccec725d3cbca502c2b77061776a81ef92917a950adec4ff6bdc34f10903aa654433177ea74be0dade4af81c5380d5710d375a5ea445940d06154bde93 WHIRLPOOL fce3d8e4f6cdf698f5a057514b6fe220bb1011025bdce5bd4cf0e424fb4d306d38251b6726bda03f290ea8137d5a95ed418cf8751722879f9042462abd9181b6
 DIST NVIDIA-Linux-x86-304.125.run 40589395 SHA256 aec5b3a792910e152d5af756ef6fd7224c448c564564c7c448ab8ec3fc78c4f7 SHA512 cd77736790876b66c1e88bf30b7a93f755c0f94118edda8fde1701dc07dc4eb60f89a27b0ed432db74729f269cb239f32f3c5e045d701f60baf69da7fc0d0ea7 WHIRLPOOL 85cd375e1b67bbabe9a8119affec20b7a9a258f8b5be89d755f7ea596a94f98df053e8ade33f1aba1f74f753dcb636268c4f2074a09eaf68d858241f1482552c
 DIST NVIDIA-Linux-x86-331.113.run 37300924 SHA256 42535a99ab68452d30d9c3fad2fb162db01d1f6821115a3c1733ed203efd588b SHA512 bc820609e0379cc5805a5428cc364795b8a5d9e5a2a4395a1ddaa1dda85e6acc59368f87f5974a39fb42bd272458627b2c742fbf1f7fedddb17102439883b111 WHIRLPOOL 1d7b5cb8be5bb76dbe1b238aab4e39ccda0e5b07da268f0652966e79d5e0d2192773316d8f22a2d6a551305b17b610242918822e94e43263c9dbfba8a48bf49b
 DIST NVIDIA-Linux-x86-340.76.run 38818911 SHA256 9b29d93b49009caed84a8852825c3e7c6ebbbba8ec99b03ee5113108c8b036d0 SHA512 45d7b29670f9ca50de80d6d61260015b45f74422bbd12039923d04ae8b033b903b27e9f4c174461055f3cf45a4af44565ce9a8b9cd671e0e54d37770a1156839 WHIRLPOOL da7e072a56e3aff8b4688e60c5acd76c97804fa582d21c70dce043b13fa2317d1021f19927e827cf6132aebe2d40371c750e3eb56697bc7eda16bb7369bf2994
+DIST NVIDIA-Linux-x86-340.93.run 38703394 SHA256 4a81c158302c595e1e72b5a1812eb3c67c8cf584ca74b1bc24163dad5289d612 SHA512 7507553bd4b11cac2cd882cd8afba59e773f58a26e67ee7e781c488be963a4f1eb54dcd72b40b29d33dd81c74d4748a76c1632b2c8ea08b524b4318c18b5dfe5 WHIRLPOOL 242190999da74f2fe4bfe4b223f43dec6ec73d97afd1e84e2c78c5fd5616d9814b647067ddf3f591ea8064d29234491de1c6f87b442e240d2aac4a1e598aefad
 DIST NVIDIA-Linux-x86-343.36.run 41073259 SHA256 8cc1c99fbda29b3258f57dbdacef11921aca2e3ac106ef591f0815716e1b829e SHA512 a6287cf8ad6379daa7c6d7ae6bc08f9985ad9e9353de6d88eb72d8a1acad3e25eb65076b904152c6ddd8ac54b9afcdbb7a5dfb9a46e75c5654be87b3df0e48e1 WHIRLPOOL 7aaa7977a850314045bcfcc36a8f6ed8b3f487ec972e109ea48cbe3edda4ff29c0bf02e7c11dacf6a3e71783259dc809840c32e301aa16f2d4394d7f07cffc0a
 DIST NVIDIA-Linux-x86-346.87.run 41303879 SHA256 0050d31e3c9d91d2372ddfe05ad7e217cdb68cd65aad60406a0c7ea878793999 SHA512 10b923847571576fbe31a037a16bdbaf9bac38caa7b380c12805f60163d6b0a359465e0d6acfa869c72dae701f62eb416b5874872e5cc34ae6cb5659ea899231 WHIRLPOOL ea7bc4cc1d70160f42bfcc082acbc00d39112d66e03f0b6cf17294cf9ac9b543e5242ddba3286eb3eff0f32d37227f40016dd40cf5e34ff1b26640bbba88f58b
+DIST NVIDIA-Linux-x86-346.96.run 40751579 SHA256 8a299ddce7d34389206599a306a41d30754bb9bddda1be1a7fd85012f9aedf39 SHA512 9d413dd0559a4035a842527371cb1a27030c9eaeff510e529d2a205ea3eddc6e5666989418a6172aead4f5b2a924cf4cbf05269cb435dc2516af37eb35ba5d4d WHIRLPOOL 055127105804f2a6dc5067b20e771b4c12ad9dad62f4e874719385c7115e8394a8618eed3d6b330c8b5d90cbd3ae7fd09998e2a0017e35b4adca0f626110f238
 DIST NVIDIA-Linux-x86-349.16.run 42751511 SHA256 35c8d00ece6a450e8e72aac2bff45e89ce40ffbe3278802e8a0b4ff65c793d11 SHA512 d3609c4ccfbf6b005a8c58dc5bc3091c7b603229bb27bf48c545fafd9d7175a06ab4d5b414586a5234f2699bed4f613b809c058dff4e1f5fe4416adc53c4d3ab WHIRLPOOL ff4ff2f83e50c6675ec35035a2bd0d534acfb2f8fbb4d5b2d00770dae3b4f48db83fa789c57a6f958f13d8bdbb68971c5ba10cf2fc7b0c4a5a8cb836a09d4586
 DIST NVIDIA-Linux-x86-352.30.run 42931523 SHA256 563eb858584f3eec38f137055039cd4addc7bb4c8f47f90e87a0cc1f88db32e3 SHA512 53f03aa6bd0162d5cc068f4626f465a4a2f79c56609d8d3a86999f4cfcb4113752598337a0b893c6005b529924b677a0fd43c4e9e782b7e6e7d3d50337a07fc7 WHIRLPOOL ca56068eb5dd45b081634cabea1e9f96c54d388de79a19d7237059c45ee110118decb5a8d658605b65517ac39adae623b2c366e5d7bec219c8b9169ee71d7767
+DIST NVIDIA-Linux-x86-352.41.run 42407126 SHA256 b3fc5af7bb2852305272ffb3d5d73fbfba639d6a2af9e34a007dde3c6133f6e3 SHA512 7c06aff7916b28b58be63b41e8e24203b35cbb6353712b651b7b461d006a4f636dd461faa4a98060c4dc0e0f0c99f51332600f9f494a91b3af839b965cb81c5a WHIRLPOOL 206071a60f49353d944d7268a6f76e6fbc2369203ba6071d68a8c662a93e8e7458b586ada91f75f5d355d845aae455d7b0d19e40d23cc3de1e83e6c4367568e5
 DIST NVIDIA-Linux-x86-355.06.run 42921947 SHA256 741ba8e974f0592d3a7940cc16f9ea7b69fe8f42908c8e81988b9814a74d7859 SHA512 9229747fcdb34fefe14a89e70cc41f476cadc491245d7bc50ff7ca8b484b41f94bd900f4910eba9b6183cb0ed872cafc8918bfde82975fed5c56612b545406e9 WHIRLPOOL 1af2fc985e59686b147d7506cafd9d9e8097f071a096af103c7ef7fd22a0f684abd6b6aa25b5e82edb488c7e901f5ee41d1f9d89998c9a6a65795884ca5e3979
+DIST NVIDIA-Linux-x86-355.11.run 43569515 SHA256 94ce6b879581b931b84d83a9111040b9a5aa9306b012b4380cd93f6ffede3066 SHA512 450caea472c5e1b3d7098adba28d18c1221cf809c6bd0071466ff2a946dd0eca6555475f5f6bc044fb19a21c8939b1020357d4aeb0ce47d0edfcda071a66fd46 WHIRLPOOL 3a95e83ab3f46e64150caf1489aa3173aae69919bf432eabcdd0501de8bcdee5402cdb33e149a4d5d429ccb85e4b4af9b30bec5516ad7b7f091ae42f6093d26f
 DIST NVIDIA-Linux-x86-96.43.23-pkg0.run 11504817 SHA256 51e6adf4ba73071622045fc37169f80db3ae3e784dff53b29d35146a04042142 SHA512 bed5726e57637481fe4e3c03a65ec14fe949f00860e729ebde408f4fd861d7bfdc296a78bc2f5d42e8b282db09f4bbde1e0545df7228fa20227080dc4b868ba7 WHIRLPOOL 6d4fd1786c11f4e326cc3101d0bb1a2f8b63c25c3dd59f10188f8355759e2861ce44fd53d60258b513d5a1d6124d0f91ba8edf4d3668b6feabfb3e8d585f14fe
 DIST NVIDIA-Linux-x86_64-173.14.39-pkg2.run 21100833 SHA256 15a953666d5681ba54c97498b578ffd286a1dc96d605f3b02110f3f99813100e SHA512 a65cd496e6ed57f771c3d99f37f616a1242d97844f6faef7a807825ad899c0e536a99fde397020839f0857883b934032f9491024f3047a6b06d3eea1f5d77713 WHIRLPOOL dc5f243b7d1de7e2d1b7f005e018a2940d63335b11a7c83c234b348b7a1839e9131169d2ea928bd8c2f549a4535149b03e16e6c94d59dfa745f7f904ff790a45
 DIST NVIDIA-Linux-x86_64-304.125.run 69108272 SHA256 c654889b85a18326f2c610260a8fbc3b1bb6f9b8be1c052a46a213f60bd62262 SHA512 75bd5700281b0aa4e19be5b779e3484711ce3db92641a32f3bf5e890601b353b23113f6218d5a2fa6b2c8d93702fac92810013c7c0f8efe484b0a39d09b1b073 WHIRLPOOL d8b9794253b1ab270680da7420f50df5ab6aa4d5123bad695be5b7891b2df55bf06ecdd0b221fd29e799077c0a64da8059df16ebea9a3535e402f2c0cf482dcf
 DIST NVIDIA-Linux-x86_64-331.113.run 60509547 SHA256 e9d5eb4394ef31825f7a86290b19b522851d1b599284095d81bac0f33a996219 SHA512 f71f3d20016bebe4e7f83704a7539f0d53c92a2598a34f9f48ad421e5743ef554aa97315f2a762f132b730b1f37c5811aa617fed3c5a90d3e2e9cc5320e366b7 WHIRLPOOL 2f06c45cb4750eb5c7d6a2ff4e4c3abaf813df135da13691f30238baf89c2fa1477d5694088f268d8681cf719889b9e2644fc1d707785113703cd2e4d7c0b27f
 DIST NVIDIA-Linux-x86_64-340.76.run 69955037 SHA256 3bf670e9a2bdb184648dec54ce06fab65e798a9a4c9dd5155e2be4efee3e0994 SHA512 59ad49a49f170ec971e2b5ee3a45b9f972521bc4b7ab6f02f46a5cfc5b1998841195cc5c91dffc417d2183de39c5a589eabf7b48864e0c6842363a75051db40c WHIRLPOOL 8c846f2b5b6f56bd2962fe4660751a4485e0ddd2186bde0affccece32271b03f4f3c226377c0b1877ea391ab130ed6f282c316f227205488a63e4f0a19db82cc
+DIST NVIDIA-Linux-x86_64-340.93.run 69813449 SHA256 ea2ac747fd473ea55ed5f6263bd314efa94c71384f3e03d527f8d550ba84c218 SHA512 f7540f3a49ccd67346b81332e4bfd03becef135f7e777cef3256fe33b3313456456ae095a352e333bbf6463bb13b9486a70718fa4c4355d66222bb0a7437de29 WHIRLPOOL e5286fbcaeffbcd3bd66c5adba8c20eb9cd64915b38606289cfab41a754a46b250667e6ac3485f8c3ed3b5a16bc14dcce6a9227d486be71d5b58298ca7d70f4d
 DIST NVIDIA-Linux-x86_64-343.36.run 73775989 SHA256 2285efa2c0e6675d8724e47a09403630a674c32e514bdcfb54cec3c81810fc78 SHA512 6e76e54b24b0c1fa16e94eaf0f99d2e7dfd28e5aaae0bcb6df3e6d4e20c7a13d5d30902e2bc9bc7609c8d87e5ec8fbf16a5a2dd513bb9d761714176c4ce5e283 WHIRLPOOL 73040a3f3073486c5d6d0a5d84be7d478a3c15bb4aee21f3c590592afe2845f8e9c7064010ddc8f93b764e48940e523952abf9978d09cd32ec1ce8b644e59eb6
 DIST NVIDIA-Linux-x86_64-346.87.run 74056785 SHA256 908446b20c9992cc6a7700866d36c13d9f53646837842d096d91b35644ee4e31 SHA512 fa192cd5b1dc44bcf23abd188b3fa292ad04cf8cc6b10042c465f10371db55e7218bd37e3101309a9b4c7e58b863c26526d33966a57ea7761d75dc04d382a119 WHIRLPOOL 6666aedd8ceffa0694ecb884e548db32899f3372b14b4fefba05ff4361655c4a1b4ff5d6b9a3ac7f354f140511fb11be01e287cb7efcdee6dcbe95bf5d6f5a75
+DIST NVIDIA-Linux-x86_64-346.96.run 73538317 SHA256 229b28a6b65965a248d07223d941de7d79b54cee7c6574f1037293e8a8026727 SHA512 188f8aac88085c3cac9637e87f4d9259d0c508075bbbf684775650a12f4760f47ba9e92f79e8bbe96d33ee014092edd38efce7dd730f67e0f11c2079eca938c5 WHIRLPOOL c9f4a5163018dc0b53aeff84b410cb34720d06ca7bdd17ce166ad3a2b057ffe94e6773594cd617fce79d9d0a02e5e1cd0525ca30dade7247ad5b7b20ff661a64
 DIST NVIDIA-Linux-x86_64-349.16.run 77513301 SHA256 f980b22729b20c9eb3a3a800af524da181afbc78e2409a3f83845894983f8322 SHA512 143999f5401ac8634049786073203fab7e8d23dc9e0d4d62d4c6ba9945c20f7d4034c37d0f721aae540503f6bcffbf200a0af70520ae7ee10a2529ed92a14866 WHIRLPOOL 9a6817c03d11253ed606294d2cc2b5f2c4c612af2f8b6f72228a9e21d4991f8bcf248a28ff70d6f477860a64bcf795ec0ee2f73c34904e5cdf0979d41e370042
 DIST NVIDIA-Linux-x86_64-352.30.run 77669309 SHA256 4c5fb75ba94c97b6d70ddb9ea2cb11b5ed01829b5f671d9e8abce7afba20aef5 SHA512 165d2053ffb6f9251b3dbff7516541f363c460397cb0c83e4e867a9df4202082e524c8afc25402bd97d7f7ec769ec00fbec041070ee59ea88908d9f55aaeb2b7 WHIRLPOOL dc9e6abee93c49be6096e86e68a880727dcfb92b311fefac3b2e5b88d17d795e615c6cba0e5db32ce4ed4ec462a46ca659516e707e378d30f4543e6a67975852
+DIST NVIDIA-Linux-x86_64-352.41.run 77180264 SHA256 0eb60d0543a0e7c5c3cfec13702005ffec6e2b8c7f22c631f324736ba2a1a832 SHA512 e898eda296de9b3158b0d0ab62a806d9ffed4d06ac378281009d82e0f4dc6579b1507661c022de8cdc25c506c642169baead79bf45567b31d8a6369885a17592 WHIRLPOOL 5e5c670cbad0998dd90858ac0b4a7ad110903c33b04b4dcb216af625191b9bf955cb77588a0bd4d23059d357dd9ef3dfd7b7ed72ec46da1388cfa2f2b0413ab4
 DIST NVIDIA-Linux-x86_64-355.06.run 75926474 SHA256 898304e1455bbccad4a3da3520d7fe17db254413f3458d0a296b45fb9cf2bcd6 SHA512 e9c617c2877ba9049f1242664dc6796c09714c495dbe7ec7705fdaf788c0ab11f35cb7a48058670ab4a56d777b7e02bc1e1f7b90959e4f1dd687a8f2f805f8a4 WHIRLPOOL 909025e9a4705a6ae1be9d1572c0491fdeeb708b3746fd2b2b38ab7e34d37c54f279861c8b33d36a71dd173ec15937b050bbc4c8c554dbeb60174348e005f201
+DIST NVIDIA-Linux-x86_64-355.11.run 76490009 SHA256 a59b425381add9d9058dc2d987bf3087ab59c43224b5eb04c3f273f5886451ed SHA512 bfc7ab7741183408aa0226dc29176c8ffe08566fbea7cebf78f4aa30627dc27ddf90bb82951c99006b34bc481be15712b4f5867ef543a32bfe3fe81a8e6ddeae WHIRLPOOL bb5d3397a855a53c2cd7e48056564085b906550f856207932e4670fef995030a3a7bcc0a9b97fee2e60aaff9b41c4a954afc57585441f5dec92c795358da810a
 DIST NVIDIA-Linux-x86_64-96.43.23-pkg2.run 15962375 SHA256 ce8d8253e7dab7da63fbdac449ebf190cd0c10cbfffea0f8d0165515f851bc64 SHA512 04bec1187a6024a2b9839f008ec829281f1f2602dae2e639030bc385943186506bcaa2b46a230b2ab87f9217190841abc62f9e2d6395ab5559623389c31c6563 WHIRLPOOL 0651c44a51a1a06fcff5bfddbf9c3e408977e03263c7fe806cb6c01f9fe92f716dfe4e5190ffe1048bde72fcffdc8bca8267e74dd43ba5c9dfb22b6201fcc2bb
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-340.93.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-340.93.ebuild
new file mode 100644 (file)
index 0000000..6eef187
--- /dev/null
@@ -0,0 +1,479 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 Accelerated Graphics Driver"
+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-r2"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="acpi multilib kernel_FreeBSD kernel_linux pax_kernel +tools +X uvm"
+RESTRICT="bindist mirror strip"
+EMULTILIB_PKG="true"
+
+COMMON="
+       app-eselect/eselect-opencl
+       kernel_linux? ( >=sys-libs/glibc-2.6.1 )
+       X? (
+               >=app-eselect/eselect-opengl-1.0.9
+       )
+"
+DEPEND="
+       ${COMMON}
+       app-arch/xz-utils
+       kernel_linux? ( virtual/linux-sources )
+"
+RDEPEND="
+       ${COMMON}
+       acpi? ( sys-power/acpid )
+       tools? (
+               dev-libs/atk
+               dev-libs/glib:2
+               x11-libs/gdk-pixbuf
+               >=x11-libs/gtk+-2.4:2
+               x11-libs/libX11
+               x11-libs/libXext
+               x11-libs/pango[X]
+       )
+       X? (
+               <x11-base/xorg-server-1.17.99:=
+               >=x11-libs/libvdpau-0.3-r1
+               multilib? (
+                       >=x11-libs/libX11-1.6.2[abi_x86_32]
+                       >=x11-libs/libXext-1.3.2[abi_x86_32]
+               )
+       )
+"
+
+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
+
+       if use kernel_linux && kernel_is ge 4 3; then
+               ewarn "Gentoo supports kernels which are supported by NVIDIA"
+               ewarn "which are limited to the following kernels:"
+               ewarn "<sys-kernel/gentoo-sources-4.3"
+               ewarn "<sys-kernel/vanilla-sources-4.3"
+               ewarn ""
+               ewarn "You are free to utilize epatch_user to provide whatever"
+               ewarn "support you feel is appropriate, but will not receive"
+               ewarn "support as a result of those changes."
+               ewarn ""
+               ewarn "Do not file a bug report about this."
+       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
+
+       # 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
+               MODULE_NAMES="nvidia(video:${S}/kernel)"
+               use uvm && MODULE_NAMES+=" nvidia-uvm(video:${S}/kernel/uvm)"
+
+               # This needs to run after MODULE_NAMES (so that the eclass checks
+               # whether the kernel supports loadable modules) but before BUILD_PARAMS
+               # is set (so that KV_DIR is populated).
+               linux-mod_pkg_setup
+
+               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_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}"/${PN}-331.13-pax-usercopy.patch
+               epatch "${FILESDIR}"/${PN}-337.12-pax-constify.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
+               use uvm && MAKEOPTS=-j1
+               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
+
+               # Add the aliases
+               # This file is tweaked with the appropriate video group in
+               # pkg_preinst, see bug #491414
+               insinto /etc/modprobe.d
+               newins "${FILESDIR}"/nvidia-169.07 nvidia.conf
+               use uvm && doins "${FILESDIR}"/nvidia-uvm.conf
+
+               # Ensures that our device nodes are created when not using X
+               exeinto "$(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 framebuffer capture library
+       donvidia ${NV_OBJ}/libnvidia-fbc.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"
+               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-mps-control.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-persistenced
+               doexe ${NV_OBJ}/nvidia-smi
+
+               # install nvidia-modprobe setuid and symlink in /usr/bin (bug #505092)
+               doexe ${NV_OBJ}/nvidia-modprobe
+               fowners root:video /opt/bin/nvidia-modprobe
+               fperms 4710 /opt/bin/nvidia-modprobe
+               dosym /{opt,usr}/bin/nvidia-modprobe
+
+               doman nvidia-cuda-mps-control.1.gz
+               doman nvidia-modprobe.1.gz
+               doman nvidia-persistenced.1.gz
+               newinitd "${FILESDIR}/nvidia-smi.init" nvidia-smi
+               newconfd "${FILESDIR}/nvidia-persistenced.conf" nvidia-persistenced
+               newinitd "${FILESDIR}/nvidia-persistenced.init" nvidia-persistenced
+       fi
+
+       if use tools; then
+               doexe ${NV_OBJ}/nvidia-settings
+               insinto /usr/share/nvidia/
+               doins nvidia-application-profiles-${PV}-key-documentation
+               insinto /etc/nvidia
+               newins nvidia-application-profiles-${PV}-rc nvidia-application-profiles-rc
+       fi
+
+       dobin ${NV_OBJ}/nvidia-bug-report.sh
+
+       # 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 ${PN}-settings.png
+               domenu "${FILESDIR}"/${PN}-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"
+
+       readme.gentoo_create_doc
+}
+
+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}/libEGL.so ${NV_SOVER} ${GL_ROOT}
+               donvidia ${libdir}/libGL.so ${NV_SOVER} ${GL_ROOT}
+               donvidia ${libdir}/libGLESv1_CM.so ${NV_SOVER} ${GL_ROOT}
+               donvidia ${libdir}/libnvidia-eglcore.so ${NV_SOVER}
+               donvidia ${libdir}/libnvidia-glcore.so ${NV_SOVER}
+               donvidia ${libdir}/libnvidia-glsi.so ${NV_SOVER}
+               donvidia ${libdir}/libnvidia-ifr.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}
+
+               # GLES v2 libraries
+               insinto ${GL_ROOT}
+               doexe ${libdir}/libGLESv2.so.${PV}
+               dosym libGLESv2.so.${PV} ${GL_ROOT}/libGLESv2.so.2
+               dosym libGLESv2.so.2 ${GL_ROOT}/libGLESv2.so
+       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() {
+       if use kernel_linux; then
+               linux-mod_pkg_preinst
+
+               local 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"
+               else
+                       sed -i \
+                               -e "s:PACKAGE:${PF}:g" \
+                               -e "s:VIDEOGID:${videogroup}:" \
+                               "${D}"/etc/modprobe.d/nvidia.conf || die
+               fi
+       fi
+
+       # 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
+
+       readme.gentoo_print_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-346.96.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-346.96.ebuild
new file mode 100644 (file)
index 0000000..cfa3416
--- /dev/null
@@ -0,0 +1,489 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 Accelerated Graphics Driver"
+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-r2"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86 ~amd64-fbsd ~x86-fbsd"
+RESTRICT="bindist mirror strip"
+EMULTILIB_PKG="true"
+
+IUSE="acpi multilib kernel_FreeBSD kernel_linux pax_kernel +tools gtk2 gtk3 +X uvm"
+REQUIRED_USE="
+       tools? ( X || ( gtk2 gtk3 ) )
+"
+
+COMMON="
+       app-eselect/eselect-opencl
+       kernel_linux? ( >=sys-libs/glibc-2.6.1 )
+       X? (
+               >=app-eselect/eselect-opengl-1.0.9
+       )
+"
+DEPEND="
+       ${COMMON}
+       app-arch/xz-utils
+       kernel_linux? ( virtual/linux-sources )
+"
+RDEPEND="
+       ${COMMON}
+       acpi? ( sys-power/acpid )
+       tools? (
+               dev-libs/atk
+               dev-libs/glib:2
+               x11-libs/gdk-pixbuf
+               gtk2? ( >=x11-libs/gtk+-2.4:2 )
+               gtk3? ( x11-libs/gtk+:3 )
+               x11-libs/libX11
+               x11-libs/libXext
+               x11-libs/pango[X]
+       )
+       X? (
+               <x11-base/xorg-server-1.17.99:=
+               >=x11-libs/libvdpau-0.3-r1
+               multilib? (
+                       >=x11-libs/libX11-1.6.2[abi_x86_32]
+                       >=x11-libs/libXext-1.3.2[abi_x86_32]
+               )
+       )
+"
+
+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
+
+       if use kernel_linux && kernel_is ge 4 3; then
+               ewarn "Gentoo supports kernels which are supported by NVIDIA"
+               ewarn "which are limited to the following kernels:"
+               ewarn "<sys-kernel/gentoo-sources-4.3"
+               ewarn "<sys-kernel/vanilla-sources-4.3"
+               ewarn ""
+               ewarn "You are free to utilize epatch_user to provide whatever"
+               ewarn "support you feel is appropriate, but will not receive"
+               ewarn "support as a result of those changes."
+               ewarn ""
+               ewarn "Do not file a bug report about this."
+       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
+
+       # 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
+               MODULE_NAMES="nvidia(video:${S}/kernel)"
+               use uvm && MODULE_NAMES+=" nvidia-uvm(video:${S}/kernel/uvm)"
+
+               # This needs to run after MODULE_NAMES (so that the eclass checks
+               # whether the kernel supports loadable modules) but before BUILD_PARAMS
+               # is set (so that KV_DIR is populated).
+               linux-mod_pkg_setup
+
+               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_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}"/${PN}-346.16-pax-usercopy.patch
+               epatch "${FILESDIR}"/${PN}-346.16-pax-constify.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
+               MAKEOPTS=-j1
+               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
+
+               # Add the aliases
+               # This file is tweaked with the appropriate video group in
+               # pkg_preinst, see bug #491414
+               insinto /etc/modprobe.d
+               newins "${FILESDIR}"/nvidia-169.07 nvidia.conf
+               use uvm && doins "${FILESDIR}"/nvidia-uvm.conf
+
+               # Ensures that our device nodes are created when not using X
+               exeinto "$(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 framebuffer capture library
+       donvidia ${NV_OBJ}/libnvidia-fbc.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
+
+               # Xorg nvidia.conf
+               if has_version '>=x11-base/xorg-server-1.16'; then
+                       insinto /usr/share/X11/xorg.conf.d
+                       newins {,50-}nvidia-drm-outputclass.conf
+               fi
+       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-mps-control.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-persistenced
+               doexe ${NV_OBJ}/nvidia-smi
+
+               # install nvidia-modprobe setuid and symlink in /usr/bin (bug #505092)
+               doexe ${NV_OBJ}/nvidia-modprobe
+               fowners root:video /opt/bin/nvidia-modprobe
+               fperms 4710 /opt/bin/nvidia-modprobe
+               dosym /{opt,usr}/bin/nvidia-modprobe
+
+               doman nvidia-cuda-mps-control.1.gz
+               doman nvidia-modprobe.1.gz
+               doman nvidia-persistenced.1.gz
+               newinitd "${FILESDIR}/nvidia-smi.init" nvidia-smi
+               newconfd "${FILESDIR}/nvidia-persistenced.conf" nvidia-persistenced
+               newinitd "${FILESDIR}/nvidia-persistenced.init" nvidia-persistenced
+       fi
+
+       if use tools; then
+               doexe ${NV_OBJ}/nvidia-settings
+               use gtk2 && donvidia libnvidia-gtk2.so ${PV}
+               use gtk3 && donvidia libnvidia-gtk3.so ${PV}
+               insinto /usr/share/nvidia/
+               doins nvidia-application-profiles-${PV}-key-documentation
+               insinto /etc/nvidia
+               newins nvidia-application-profiles-${PV}-rc nvidia-application-profiles-rc
+       fi
+
+       dobin ${NV_OBJ}/nvidia-bug-report.sh
+
+       # 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 ${PN}-settings.png
+               domenu "${FILESDIR}"/${PN}-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"
+
+       readme.gentoo_create_doc
+}
+
+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}/libEGL.so ${NV_SOVER} ${GL_ROOT}
+               donvidia ${libdir}/libGL.so ${NV_SOVER} ${GL_ROOT}
+               donvidia ${libdir}/libGLESv1_CM.so ${NV_SOVER} ${GL_ROOT}
+               donvidia ${libdir}/libnvidia-eglcore.so ${NV_SOVER}
+               donvidia ${libdir}/libnvidia-glcore.so ${NV_SOVER}
+               donvidia ${libdir}/libnvidia-glsi.so ${NV_SOVER}
+               donvidia ${libdir}/libnvidia-ifr.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}
+
+               # GLES v2 libraries
+               insinto ${GL_ROOT}
+               doexe ${libdir}/libGLESv2.so.${PV}
+               dosym libGLESv2.so.${PV} ${GL_ROOT}/libGLESv2.so.2
+               dosym libGLESv2.so.2 ${GL_ROOT}/libGLESv2.so
+       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() {
+       if use kernel_linux; then
+               linux-mod_pkg_preinst
+
+               local 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"
+               else
+                       sed -i \
+                               -e "s:PACKAGE:${PF}:g" \
+                               -e "s:VIDEOGID:${videogroup}:" \
+                               "${D}"/etc/modprobe.d/nvidia.conf || die
+               fi
+       fi
+
+       # 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
+
+       readme.gentoo_print_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-352.41.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-352.41.ebuild
new file mode 100644 (file)
index 0000000..cfa3416
--- /dev/null
@@ -0,0 +1,489 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 Accelerated Graphics Driver"
+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-r2"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86 ~amd64-fbsd ~x86-fbsd"
+RESTRICT="bindist mirror strip"
+EMULTILIB_PKG="true"
+
+IUSE="acpi multilib kernel_FreeBSD kernel_linux pax_kernel +tools gtk2 gtk3 +X uvm"
+REQUIRED_USE="
+       tools? ( X || ( gtk2 gtk3 ) )
+"
+
+COMMON="
+       app-eselect/eselect-opencl
+       kernel_linux? ( >=sys-libs/glibc-2.6.1 )
+       X? (
+               >=app-eselect/eselect-opengl-1.0.9
+       )
+"
+DEPEND="
+       ${COMMON}
+       app-arch/xz-utils
+       kernel_linux? ( virtual/linux-sources )
+"
+RDEPEND="
+       ${COMMON}
+       acpi? ( sys-power/acpid )
+       tools? (
+               dev-libs/atk
+               dev-libs/glib:2
+               x11-libs/gdk-pixbuf
+               gtk2? ( >=x11-libs/gtk+-2.4:2 )
+               gtk3? ( x11-libs/gtk+:3 )
+               x11-libs/libX11
+               x11-libs/libXext
+               x11-libs/pango[X]
+       )
+       X? (
+               <x11-base/xorg-server-1.17.99:=
+               >=x11-libs/libvdpau-0.3-r1
+               multilib? (
+                       >=x11-libs/libX11-1.6.2[abi_x86_32]
+                       >=x11-libs/libXext-1.3.2[abi_x86_32]
+               )
+       )
+"
+
+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
+
+       if use kernel_linux && kernel_is ge 4 3; then
+               ewarn "Gentoo supports kernels which are supported by NVIDIA"
+               ewarn "which are limited to the following kernels:"
+               ewarn "<sys-kernel/gentoo-sources-4.3"
+               ewarn "<sys-kernel/vanilla-sources-4.3"
+               ewarn ""
+               ewarn "You are free to utilize epatch_user to provide whatever"
+               ewarn "support you feel is appropriate, but will not receive"
+               ewarn "support as a result of those changes."
+               ewarn ""
+               ewarn "Do not file a bug report about this."
+       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
+
+       # 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
+               MODULE_NAMES="nvidia(video:${S}/kernel)"
+               use uvm && MODULE_NAMES+=" nvidia-uvm(video:${S}/kernel/uvm)"
+
+               # This needs to run after MODULE_NAMES (so that the eclass checks
+               # whether the kernel supports loadable modules) but before BUILD_PARAMS
+               # is set (so that KV_DIR is populated).
+               linux-mod_pkg_setup
+
+               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_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}"/${PN}-346.16-pax-usercopy.patch
+               epatch "${FILESDIR}"/${PN}-346.16-pax-constify.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
+               MAKEOPTS=-j1
+               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
+
+               # Add the aliases
+               # This file is tweaked with the appropriate video group in
+               # pkg_preinst, see bug #491414
+               insinto /etc/modprobe.d
+               newins "${FILESDIR}"/nvidia-169.07 nvidia.conf
+               use uvm && doins "${FILESDIR}"/nvidia-uvm.conf
+
+               # Ensures that our device nodes are created when not using X
+               exeinto "$(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 framebuffer capture library
+       donvidia ${NV_OBJ}/libnvidia-fbc.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
+
+               # Xorg nvidia.conf
+               if has_version '>=x11-base/xorg-server-1.16'; then
+                       insinto /usr/share/X11/xorg.conf.d
+                       newins {,50-}nvidia-drm-outputclass.conf
+               fi
+       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-mps-control.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-persistenced
+               doexe ${NV_OBJ}/nvidia-smi
+
+               # install nvidia-modprobe setuid and symlink in /usr/bin (bug #505092)
+               doexe ${NV_OBJ}/nvidia-modprobe
+               fowners root:video /opt/bin/nvidia-modprobe
+               fperms 4710 /opt/bin/nvidia-modprobe
+               dosym /{opt,usr}/bin/nvidia-modprobe
+
+               doman nvidia-cuda-mps-control.1.gz
+               doman nvidia-modprobe.1.gz
+               doman nvidia-persistenced.1.gz
+               newinitd "${FILESDIR}/nvidia-smi.init" nvidia-smi
+               newconfd "${FILESDIR}/nvidia-persistenced.conf" nvidia-persistenced
+               newinitd "${FILESDIR}/nvidia-persistenced.init" nvidia-persistenced
+       fi
+
+       if use tools; then
+               doexe ${NV_OBJ}/nvidia-settings
+               use gtk2 && donvidia libnvidia-gtk2.so ${PV}
+               use gtk3 && donvidia libnvidia-gtk3.so ${PV}
+               insinto /usr/share/nvidia/
+               doins nvidia-application-profiles-${PV}-key-documentation
+               insinto /etc/nvidia
+               newins nvidia-application-profiles-${PV}-rc nvidia-application-profiles-rc
+       fi
+
+       dobin ${NV_OBJ}/nvidia-bug-report.sh
+
+       # 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 ${PN}-settings.png
+               domenu "${FILESDIR}"/${PN}-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"
+
+       readme.gentoo_create_doc
+}
+
+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}/libEGL.so ${NV_SOVER} ${GL_ROOT}
+               donvidia ${libdir}/libGL.so ${NV_SOVER} ${GL_ROOT}
+               donvidia ${libdir}/libGLESv1_CM.so ${NV_SOVER} ${GL_ROOT}
+               donvidia ${libdir}/libnvidia-eglcore.so ${NV_SOVER}
+               donvidia ${libdir}/libnvidia-glcore.so ${NV_SOVER}
+               donvidia ${libdir}/libnvidia-glsi.so ${NV_SOVER}
+               donvidia ${libdir}/libnvidia-ifr.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}
+
+               # GLES v2 libraries
+               insinto ${GL_ROOT}
+               doexe ${libdir}/libGLESv2.so.${PV}
+               dosym libGLESv2.so.${PV} ${GL_ROOT}/libGLESv2.so.2
+               dosym libGLESv2.so.2 ${GL_ROOT}/libGLESv2.so
+       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() {
+       if use kernel_linux; then
+               linux-mod_pkg_preinst
+
+               local 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"
+               else
+                       sed -i \
+                               -e "s:PACKAGE:${PF}:g" \
+                               -e "s:VIDEOGID:${videogroup}:" \
+                               "${D}"/etc/modprobe.d/nvidia.conf || die
+               fi
+       fi
+
+       # 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
+
+       readme.gentoo_print_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-355.11.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-355.11.ebuild
new file mode 100644 (file)
index 0000000..410fa72
--- /dev/null
@@ -0,0 +1,500 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 Accelerated Graphics Driver"
+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-r2"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86 ~amd64-fbsd ~x86-fbsd"
+RESTRICT="bindist mirror strip"
+EMULTILIB_PKG="true"
+
+IUSE="acpi multilib kernel_FreeBSD kernel_linux pax_kernel +tools gtk2 gtk3 +X uvm"
+REQUIRED_USE="
+       tools? ( X || ( gtk2 gtk3 ) )
+"
+
+COMMON="
+       app-eselect/eselect-opencl
+       kernel_linux? ( >=sys-libs/glibc-2.6.1 )
+       X? (
+               >=app-eselect/eselect-opengl-1.0.9
+       )
+"
+DEPEND="
+       ${COMMON}
+       app-arch/xz-utils
+       kernel_linux? ( virtual/linux-sources )
+"
+RDEPEND="
+       ${COMMON}
+       acpi? ( sys-power/acpid )
+       tools? (
+               dev-libs/atk
+               dev-libs/glib:2
+               x11-libs/gdk-pixbuf
+               gtk2? ( >=x11-libs/gtk+-2.4:2 )
+               gtk3? ( x11-libs/gtk+:3 )
+               x11-libs/libX11
+               x11-libs/libXext
+               x11-libs/pango[X]
+       )
+       X? (
+               <x11-base/xorg-server-1.17.99:=
+               >=x11-libs/libvdpau-0.3-r1
+               multilib? (
+                       >=x11-libs/libX11-1.6.2[abi_x86_32]
+                       >=x11-libs/libXext-1.3.2[abi_x86_32]
+               )
+       )
+"
+
+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
+
+       if use kernel_linux && kernel_is ge 4 3; then
+               ewarn "Gentoo supports kernels which are supported by NVIDIA"
+               ewarn "which are limited to the following kernels:"
+               ewarn "<sys-kernel/gentoo-sources-4.3"
+               ewarn "<sys-kernel/vanilla-sources-4.3"
+               ewarn ""
+               ewarn "You are free to utilize epatch_user to provide whatever"
+               ewarn "support you feel is appropriate, but will not receive"
+               ewarn "support as a result of those changes."
+               ewarn ""
+               ewarn "Do not file a bug report about this."
+       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
+
+       # 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
+               MODULE_NAMES="nvidia(video:${S}/kernel)"
+               use uvm && MODULE_NAMES+=" nvidia-uvm(video:${S}/kernel)"
+
+               # This needs to run after MODULE_NAMES (so that the eclass checks
+               # whether the kernel supports loadable modules) but before BUILD_PARAMS
+               # is set (so that KV_DIR is populated).
+               linux-mod_pkg_setup
+
+               BUILD_PARAMS="IGNORE_CC_MISMATCH=yes V=1 SYSSRC=${KV_DIR} \
+               SYSOUT=${KV_OUT_DIR} CC=$(tc-getBUILD_CC) NV_VERBOSE=1"
+
+               # 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_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}"/${PN}-346.16-pax-usercopy.patch
+               epatch "${FILESDIR}"/${PN}-346.16-pax-constify.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
+               MAKEOPTS=-j1
+               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 it is 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
+
+               # Add the aliases
+               # This file is tweaked with the appropriate video group in
+               # pkg_preinst, see bug #491414
+               insinto /etc/modprobe.d
+               newins "${FILESDIR}"/nvidia-169.07 nvidia.conf
+               use uvm && doins "${FILESDIR}"/nvidia-uvm.conf
+
+               # Ensures that our device nodes are created when not using X
+               exeinto "$(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 framebuffer capture library
+       donvidia ${NV_OBJ}/libnvidia-fbc.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
+
+               # Xorg nvidia.conf
+               if has_version '>=x11-base/xorg-server-1.16'; then
+                       insinto /usr/share/X11/xorg.conf.d
+                       newins {,50-}nvidia-drm-outputclass.conf
+               fi
+       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-mps-control.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-persistenced
+               doexe ${NV_OBJ}/nvidia-smi
+
+               # install nvidia-modprobe setuid and symlink in /usr/bin (bug #505092)
+               doexe ${NV_OBJ}/nvidia-modprobe
+               fowners root:video /opt/bin/nvidia-modprobe
+               fperms 4710 /opt/bin/nvidia-modprobe
+               dosym /{opt,usr}/bin/nvidia-modprobe
+
+               doman nvidia-cuda-mps-control.1.gz
+               doman nvidia-modprobe.1.gz
+               doman nvidia-persistenced.1.gz
+               newinitd "${FILESDIR}/nvidia-smi.init" nvidia-smi
+               newconfd "${FILESDIR}/nvidia-persistenced.conf" nvidia-persistenced
+               newinitd "${FILESDIR}/nvidia-persistenced.init" nvidia-persistenced
+       fi
+
+       if use tools; then
+               doexe ${NV_OBJ}/nvidia-settings
+               use gtk2 && donvidia libnvidia-gtk2.so ${PV}
+               use gtk3 && donvidia libnvidia-gtk3.so ${PV}
+               insinto /usr/share/nvidia/
+               doins nvidia-application-profiles-${PV}-key-documentation
+               insinto /etc/nvidia
+               newins nvidia-application-profiles-${PV}-rc nvidia-application-profiles-rc
+       fi
+
+       dobin ${NV_OBJ}/nvidia-bug-report.sh
+
+       # 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 ${PN}-settings.png
+               domenu "${FILESDIR}"/${PN}-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"
+
+       readme.gentoo_create_doc
+}
+
+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
+               NV_GLX_LIBRARIES=(
+                       "libEGL.so 1 ${GL_ROOT}"
+                       "libEGL_nvidia.so 0 ${GL_ROOT}"
+                       "libGL.so ${NV_SOVER} ${GL_ROOT}"
+                       "libGLESv1_CM.so ${NV_SOVER} ${GL_ROOT}"
+                       "libGLdispatch.so 0 ${GL_ROOT}"
+                       "libOpenCL.so 1.0.0 ${CL_ROOT}"
+                       "libOpenGL.so 0 ${GL_ROOT}"
+                       "libcuda.so ${NV_SOVER}"
+                       "libnvcuvid.so ${NV_SOVER}"
+                       "libnvidia-compiler.so ${NV_SOVER}"
+                       "libnvidia-eglcore.so ${NV_SOVER}"
+                       "libnvidia-encode.so ${NV_SOVER}"
+                       "libnvidia-fbc.so ${NV_SOVER}"
+                       "libnvidia-glcore.so ${NV_SOVER}"
+                       "libnvidia-glsi.so ${NV_SOVER}"
+                       "libnvidia-ifr.so ${NV_SOVER}"
+                       "libnvidia-opencl.so ${NV_SOVER}"
+                       "libvdpau.so ${NV_SOVER} ${GL_ROOT}"
+                       "libvdpau_nvidia.so ${NV_SOVER}"
+                       "libvdpau_trace.so ${NV_SOVER} ${GL_ROOT}"
+               )
+               if use kernel_linux && has_multilib_profile && [[ ${ABI} == "amd64" ]];
+               then
+                       NV_GLX_LIBRARIES+=( "libnvidia-wfb.so ${NV_SOVER}" )
+               fi
+
+               if use kernel_FreeBSD; then
+                       NV_GLX_LIBRARIES+=( "libnvidia-tls.so ${NV_SOVER}" )
+               fi
+
+               if use kernel_linux; then
+                       NV_GLX_LIBRARIES+=(
+                               "libnvidia-ml.so ${NV_SOVER}"
+                               "tls/libnvidia-tls.so ${NV_SOVER}"
+                       )
+               fi
+
+               for NV_LIB in "${NV_GLX_LIBRARIES[@]}"; do
+                       donvidia ${libdir}/${NV_LIB}
+               done
+
+               # GLES v2 library is special
+               insinto ${GL_ROOT}
+               doexe ${libdir}/libGLESv2.so.${PV}
+               dosym libGLESv2.so.${PV} ${GL_ROOT}/libGLESv2.so.2
+               dosym libGLESv2.so.2 ${GL_ROOT}/libGLESv2.so
+       fi
+}
+
+pkg_preinst() {
+       if use kernel_linux; then
+               linux-mod_pkg_preinst
+
+               local 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"
+               else
+                       sed -i \
+                               -e "s:PACKAGE:${PF}:g" \
+                               -e "s:VIDEOGID:${videogroup}:" \
+                               "${D}"/etc/modprobe.d/nvidia.conf || die
+               fi
+       fi
+
+       # 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
+
+       readme.gentoo_print_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
+}