diff options
author | Jeroen Roovers <jer@gentoo.org> | 2017-03-30 09:27:47 +0200 |
---|---|---|
committer | Jeroen Roovers <jer@gentoo.org> | 2017-03-30 09:27:47 +0200 |
commit | 99ee8e677f6609be4ba52fc047336548106a03fd (patch) | |
tree | 378c1a845d4686d27ee6795f6f5d28acc5d46423 /x11-drivers | |
parent | www-client/vivaldi: Old. (diff) | |
download | gentoo-99ee8e677f6609be4ba52fc047336548106a03fd.tar.gz gentoo-99ee8e677f6609be4ba52fc047336548106a03fd.tar.bz2 gentoo-99ee8e677f6609be4ba52fc047336548106a03fd.zip |
x11-drivers/nvidia-drivers: Drop obsolete branches (bug #611712).
Package-Manager: Portage-2.3.5, Repoman-2.3.2
Diffstat (limited to 'x11-drivers')
30 files changed, 0 insertions, 11393 deletions
diff --git a/x11-drivers/nvidia-drivers/Manifest b/x11-drivers/nvidia-drivers/Manifest index cecb11b35022..d4065462f182 100644 --- a/x11-drivers/nvidia-drivers/Manifest +++ b/x11-drivers/nvidia-drivers/Manifest @@ -3,15 +3,6 @@ DIST NVIDIA-FreeBSD-x86-304.134.tar.gz 35095790 SHA256 e7a164807c83ab0f1be98eb24 DIST NVIDIA-FreeBSD-x86-304.135.tar.gz 35092250 SHA256 3bcecc26c67588174bcee96b25f4f70265f463e4b3eb85d83363977acf3b6d33 SHA512 2e8e8b6cc02bcb44fcfc5f7b378cfe104669d2092e5191261c800bb458281e4ae269d8ae3f7230f5e1432004d55120e063166ead5d91d80b96eb158f7927b34a WHIRLPOOL b42379f450630f20ece6f3af95b9f02d8c91121454d9c883f23cbb7a46e2099c41de2f15663932befb218eea856cb0a861fc34b19f3e84061cd0fa4f4c8722e6 DIST NVIDIA-FreeBSD-x86-340.101.tar.gz 59992166 SHA256 f62038819eb4ba074e92ce8d26b6330ed3bc32d1c07bcc95f4e2964fa667e03b SHA512 b0d3e04acd60c1699850ecebbbdc2677f9691d3acf700effa369daedf3a45d7068c365a3298214acf396d7bcd531cfec26e9ef02e02c0896f01240219b338beb WHIRLPOOL 955e8ad5152137641fcf2d5515e8c3b0a7ed9cac5ab646c2551fb4b1b0c0295ef3e3007905d5b5f2c50daaab1b74b7d6ffeb3f96f617b464c2db745ca4b33473 DIST NVIDIA-FreeBSD-x86-340.102.tar.gz 12057262 SHA256 d3edf43d6fc518869c35ae8d98ab5d55b86ade71127956ef66b201f60bc5dfe8 SHA512 bf15e68b1eee85e83474aaa480096991eac7506481f1192b53e0e10ff891f177c50c1492c51fb68ce0af3c5ccc54dad60edc90ec42b156e8338e51b9f9542520 WHIRLPOOL 6eb5df57b709ea2c3ab1c81d7a186fd106ff019400d66bc68c91da12d27b0b365e2f1b44c6d41cd45f605a813be1b88d587fcd7b3513c251e3248dc2f243d529 -DIST NVIDIA-FreeBSD-x86-346.96.tar.gz 58010757 SHA256 a27d7b79c053702bf6524b2c4725321fa557be18a585735e0b8122d884348c3e SHA512 f05ff7f98ae56ef992c21440e94dc12537f91353c9ba6fbe74b5928744823cb0cce38e7aa2da6c88569dda52f9ae0f6674c29255db155a2fada9b78f024dda8d WHIRLPOOL d21cfd27971847dac0118429b58b34be24f19fefc9ee05f70454e7c350d4a8678e2d01f7db72e05bd1026c45fa9373783b9817efcf76f70b70f6a5ecd8a5bc7c -DIST NVIDIA-FreeBSD-x86-352.79.tar.gz 55381403 SHA256 baf99225383aa1b114c14504d00a400b4e2c72b521941210287d5a2f848a6189 SHA512 14dd0f52ae9fbc88b441392e32df6610121baeb5b08337d7a341d110f2735591c91a789c7825ca95fb542693f6971053a00b3dc4d7d224362d7b12a07cb315d5 WHIRLPOOL 7d5ac1efa1afb5a4cf5ef714b27fbc02190775bd11ae281df5552b836a22bc5377572a310c683d54910cbcbf5a4d57702309e5b3e61c295fb767568f8d8746bf -DIST NVIDIA-FreeBSD-x86-355.11.tar.gz 56832647 SHA256 3d4d5d8fcf558a8f5f1a88846161b1a89bd7fc66c0268b40613c7e3457f5ce7b SHA512 744d9b8c48b82bac0bfeea5e8b2b2bbaa0e6a183cbd1f5d4f782fa7b21a6f6c5b252e556a8b2161c3b5d43938ef8fabf6cb36f995ee823fbf792f3c9a92b87e1 WHIRLPOOL 43bceb8e8d3b00789cf2c8163a055b1d2405ef93e471fda4c4e2146093289891557f4ec8debfe6bca89ad6ed6dc2e389f1d3060759a71e8949df343bc31b85b9 -DIST NVIDIA-FreeBSD-x86-358.16.tar.gz 58548165 SHA256 2257d9a2b3661d024be0864e2fe192de34fdf8e206073930541e0fa6f232016e SHA512 e1d84c2cc3473253b31aa3df8e2ad7418da5789e31d6f71f07e6bf5e712ffcb6417cf8931c16e5e5a19d0f4cdaebf229e4edbee53d5613bea1ff6b4e4c6657cc WHIRLPOOL 15b760556d978c9e82b063c1135089e1b1222460285ab2c40d450cf26820e701ff5d7ebdd04815f80a68a07eea0e622fa621b8369883f4168af5b45d4edde62d -DIST NVIDIA-FreeBSD-x86-361.42.tar.gz 64942474 SHA256 46a28392fbe5d1688b6855c37db2e34daff0ffcdfb0c82557878b9839465a966 SHA512 74fdab9a0ef827e227cf7265768c491a1c073da5f7f3445a819749284176b8087f6bb10ca90e555685261af42e4eff9687a6c6fa2af33302b6393d0789674164 WHIRLPOOL 33f7b8ace23e50849ebf5cf4aa50310f1ee92ef17bf9f9797e8db5be3548de7502706624c219269c28e99d1ac1dcf5e114d953399f324835524356cb4bf7f544 -DIST NVIDIA-FreeBSD-x86-361.45.18.tar.gz 64962160 SHA256 5c6b04d2ee446e27466935891dc895943797e32226e8e6c486b47ee8e068bdb2 SHA512 fbe22499543e5cc900fe6b14efe12f3cb7c820fd6a1b79e0129d843ed430d77b2cb87365df123612382e32f02ce5d579b33c29c913692178d92683da868e233f WHIRLPOOL ab37570185bafacad0a27fbb0c6cd26f133b5cae34ab4c5535394a0bdc647350248179a296b3642b57700842ed713d12f23b9196880ab86b00163f5281a4475a -DIST NVIDIA-FreeBSD-x86-364.19.tar.gz 65807198 SHA256 5096640e9ad8a774fa76d0b64d94e209110fe58f472671f63ae21fc8bca0b376 SHA512 b2dba9f06464dab01e7fcf2e488d5df1be25feaf66c9138111f1ad6db50ef893783b53d16f8676a853971ccd354b06db4b7ee0a9c48fa757b8acaae9b7ff9df9 WHIRLPOOL 5c074ca0381159cf545ab4a9efb2e9e12822a071e2aa98e9ca2faff46a2d6f8d84e08543693dc3db9b93f617821e9a1787c9e3f5b40e60c1373ee693a4c36bdd -DIST NVIDIA-FreeBSD-x86-367.57.tar.gz 62859799 SHA256 64a0bde687aac1ec2aad859d5bea47d0691b916a851c64992bd460a05ad7c162 SHA512 13269f76d53a1818690ba8fd7aa604783e80059a031e3668c21a70158eeaa97251adda9ac058a712342e95780db86be5b893eebe0422cfce7f1073d88ea9293d WHIRLPOOL 303bebf3d73d8bc232a188c9e3a23164a70fafdd44974e5f5b1873488f682979702e2f18d838d85072a22520d959ded6bb3a4b79cb3d7cafc5de0feca6241061 -DIST NVIDIA-FreeBSD-x86-370.28.tar.gz 58718517 SHA256 52193b15b4ca822b029f860eed4d00270c925f5d24f7bb511a5b7bbea696d58c SHA512 83ffb19069cc240f8836d808a5eb02c142e7ad923fc2e3049a3b316acc12df070d42dfdc5a8a8e1411ccc9fba0bfa4ed84f457435e985434cd86ae966a63a3f4 WHIRLPOOL b1bec4d5e34ea39c3b1b44adcf85b7392cef39517979d32bc800e48a79a57cfb5f1ca5ff82bc302aa67ed12094782e09ab146f021a9c04e18430034a5ab341a9 DIST NVIDIA-FreeBSD-x86-375.26.tar.gz 59091851 SHA256 5249d01a21bb846a08975c4f3a90935b6dc8fd33ec8e5faa0d624ef15bcf2b88 SHA512 281f41f341ccf7f7c1e0de9a6519813c7fd2d13ef59001c0a6f126cd5b8f2b67848c780ddaf6647e0c8b9a79c12ff77493c07203510084e741746834b26f5fdb WHIRLPOOL 48e5f810f41337f6b8f5db419288ae5050c3efd71d0b4b7f7b64251612860d5c7e83cb78885a73f6752160ca8dce852560db7d95ce93d5d86dba21e59bae5e77 DIST NVIDIA-FreeBSD-x86-375.39.tar.gz 59111267 SHA256 ca39ab55716516bbca62fc888ec786745a8df7f346e68703f54e1a42afad733e SHA512 8f5bf9ffc731ca90a2604b80c3974ee123a12d7db9ee9be1811f5e78711798d7a29737a3651406c1c5e24a197d50f2f2fc39d94c8d11f9700900ef13266a5bf7 WHIRLPOOL e6ce83478238b2f6497ed48688531a6ba4bf78baa2d376e6c8a0f04b35039ed1532a4618f8a53c60ab0778330313ca1e9eecb836a4ade4c5b006844386d4b23f DIST NVIDIA-FreeBSD-x86-378.13.tar.gz 59610253 SHA256 aca461f050950f1a3a81137ec8adf2057deaa20ad166bdd4ce8f3e34616e7a98 SHA512 a0101201089df2bbf5bdc4ded2228dd989da6a47da31c3ec8d55916b1ff3457924555f82c7381934745fdc1b1f8f78e3fc10e5089279eb13423628dbfe560c6b WHIRLPOOL ac67d07d3ffb0959f685b7d59de152ba8fc97e11c30ed3f1a200511bcaf3de1cd1879147f37fde66a1c8d13dd327aac8a9ac78d42cc9656ef79e3180897aaef1 @@ -20,20 +11,9 @@ DIST NVIDIA-FreeBSD-x86_64-304.134.tar.gz 36148973 SHA256 3eafced8f8095c7f1135fe DIST NVIDIA-FreeBSD-x86_64-304.135.tar.gz 36144428 SHA256 0e415045b96bb272150d35d72c4a17c3d8e7b593dc7ffc577f6f25cc04f9de95 SHA512 8939f0153e7dc98ed147c79a042731461f87582ef46c4762afadf6a5e1cd0ca32ca99415a3819f7e5abefb2df5c59731454e80873d3d622b73f27e75518c8793 WHIRLPOOL e8689e07f12e169f9abad243111bcddee7796826f0028d29bb5eb340649696a3688a74068f07f52d6764fba9924ddd1dba18e8ae442654fffa9b902ccbde2c7f DIST NVIDIA-FreeBSD-x86_64-340.101.tar.gz 60860185 SHA256 aa75da2de6656bf8c4b8cf73b9e330b21ebc5da6de509cf90aed8a571716b111 SHA512 0a69e90c2ddd574736ae666fb0216afe639423c8bf73c69e7403bbd5e2aca640f130196402d81924137b34d30befeaaf8174a3fe3ca7efc16a2c5e650e87ab99 WHIRLPOOL b7652dcfc6116f865876cbb43807b1573ee6506e8f626a0da9123efe6fd6987d6bdd3c78dc833a38f0bff78ea290c34ecd69a65f7870248ac2c1bdff6cdb87b5 DIST NVIDIA-FreeBSD-x86_64-340.102.tar.gz 60862932 SHA256 6d1108c2e8d1b25eb16cd8dc4eb221f2a20d2e4c39a515c0b5809fb407991f94 SHA512 fddef644937093550f9e5dfc25dc5cb81280785735c2d11f644b5eece8144b23bc88a353534ca95e925f54da9131ed5dd7460b72e554b6625df33e243476588f WHIRLPOOL 0b19ef96124768b8cafb0211a79f8ba6e3d04d9289d5194a59fdaa4eb15ab898c103346892007d9fd6eac75d6d503cd9724ab8f60bd7cf28fee2f9307b03d70b -DIST NVIDIA-FreeBSD-x86_64-346.96.tar.gz 58774970 SHA256 89daaff29afe92d825ec8c00149a703b4eb234e4f16bbfb98673f077521bcff9 SHA512 99fd84f1b2177b4af2fd83088c4f8a9a6259f059c002a771ff9c3993953787dd96f83322e4ce611234674a00792a83fa439af915d6ad6886af6de2d88de94edb WHIRLPOOL 5bca7c540c713b8e070b7d8412bcc2547335b9379429dc3a04ab50eae22c03eaa922486a900b2ab3cf147e0c4f2e8d3b60e81aa329b6b2956c28d2b32900082c -DIST NVIDIA-FreeBSD-x86_64-352.79.tar.gz 57044396 SHA256 d2a406c4a7502096964b6fd19e99a046a0106a60ffb9e45865156c62718bf49a SHA512 7fe8564744e522b0f8ddb2fb3bc44235e5189d87acff1f894f271404315bbd17ea41f469c6cdbaf51a27f85e8103ed3cec574ed29323deeb56869746691e977c WHIRLPOOL 677b670218510228d9a03dc0f259e36a5896124ead204fff2d294135c1b7d79dd10c0b2e144e79a68d27b282e12097adf76f8694ecb5daa53f4b689935130c6f -DIST NVIDIA-FreeBSD-x86_64-355.11.tar.gz 54031364 SHA256 3637a879905bb541bf02f9bcdfe37c242a52ec6071671a0ba33581efdce1504e SHA512 84add7d90c7f45d19d736ee70c1c4a6434be1c512bafa29cbbf9221e99a31fc383971696dce99da5a77a171eb3537c98cfec7005ff061411ac9c310fa219c906 WHIRLPOOL d8ade5d63c3ef78fa92f9dc07934eed8fdd4ead1e40f1820ad95feb166264a95a800879e1fc6374bf2deef419b0838b4864796d9f81a81110d06ccd9b65c459d -DIST NVIDIA-FreeBSD-x86_64-358.16.tar.gz 55338634 SHA256 29b62c266bb96604e82c5a514aebea86b65057fa59ba37f91bd01cd870a0725c SHA512 2e5aef35d5c4aa605ebe18a23ab132fe373c9b87a915ada005ecd28d75a476d6ac9d978394f8c63123f98a408dcc97d624b5deda5f242faea7304fc8ddf76d0d WHIRLPOOL bc8ee78214209fdeb0c6fc196cbc3acc244c777df8a83b5a5489959a73b744ecc125d7a9be6ca2f08d43b6a080898b1090eca45e627c96210dcfeb6207512c8e -DIST NVIDIA-FreeBSD-x86_64-361.42.tar.gz 61730815 SHA256 5ac9a081d3b27307d79a20dfda82de38c3be319a93dbbe80b3458c0c521fb723 SHA512 d4331158b4d2a75b9884fb8999c6ae9cf1a0697ce1d4fcd8bd5e2c3d6043bdfd1bdb7665031828dd94226f9205d2c8a4a2585cff5fef5548fbf5ffff531e0e2c WHIRLPOOL 01f54f0b8bd25f7af888e27223807a1a182adca1d427d03500e9ec3b89a0f618bd2fb91fab4853e996cc1b3115680859b4fc91fe997ed32c36f75fb25da4cc43 -DIST NVIDIA-FreeBSD-x86_64-361.45.18.tar.gz 61749816 SHA256 7edcb70fa7388fa15fc949d5bfd2c952b66d3fe6f7cb1a0a9c415dbf84da5fb2 SHA512 27f5f98db0a41938f9c9ca2433486fae8e90136e355d51ee49ff4932f45e0e073f79a1f7e693fa5170dd3367e148cc04e51b440b0d51bdae0236e6f8caf3f01e WHIRLPOOL 835c1a73ae33113518d05b7a1a864d96f22c2a0a8c6993d56884b1b769b2a0d20943a36eb366e32f9e7ee52af67c58d23d8062791e35220641f5210f0eefe134 -DIST NVIDIA-FreeBSD-x86_64-364.19.tar.gz 62553892 SHA256 3b691c259b2a85da49d16ceab52b62363496fd764bbc3772e30c5f138a832ec3 SHA512 0e0cf1cea93a8e272bb7e7a939b73ea5a54888b0d4e870472cca92bc0f07ca7ec33616bf0a3f8f741167b7ffc173813574da541fdff83d66d19a230a07622b21 WHIRLPOOL 29945d058e24967afa4c5fdf71fb70f8bd8e0a80b6280d4a0ed47b27bf770da384ed04534681fa25869e3d2814400aafa0c57e44d6339ff2d16f5039ead04a4a -DIST NVIDIA-FreeBSD-x86_64-367.57.tar.gz 59604884 SHA256 6f2986941a9f4cdcb3692c39919e5eeec09f2799b7797d3c0be0d4c61f7eed5b SHA512 06e4fd656efc88260c10b2a86308461754302dc9bad88285efe8b864012806f2d7147173ded9ee7b4ef2518ddbd6f02c5d36b184f913176732dd90cce0df006c WHIRLPOOL 9c33dd392ba0335b08c7710aaf97564d7cc0fdcc2fe87ec67ae1932848dbd6e6ad0437f6b44409b11cefc7ec33be7656199dcb2a34ab296f969fd65243bd114e -DIST NVIDIA-FreeBSD-x86_64-370.28.tar.gz 57905860 SHA256 5087a93af8aaab6cff35ba60c9d67b4249827f6b7681abaaa571a20784a54552 SHA512 40637d64a0ee5029bb1c5ad7a590c5be61253ef6283c4217666768ad8601d7f51ef0d8705c8711f65c3d0a5a5721490813220c5f9186c6d2d12baf5d9c11122e WHIRLPOOL 361648788b7efb9e550b3e67d2e6022e31dab29f5660c42a1b6c961fe4638216fb8785814ee9fa1636fc39c39afce7caffbdc24fcf8bbd14e4eec5b5eeaeb1eb DIST NVIDIA-FreeBSD-x86_64-375.26.tar.gz 58287080 SHA256 c7d32cb434f9a7e84903a1305d7577705f991fdb6eb4ab3ff79d41b2df82265d SHA512 514c92636eeffa68cea5140819a9ad14888c18c1c60b0865e5cc9f9896b503f22c1236f76e65ed5e11cf3685ceb483c78d2a442b4e9bf274ae3ab399cf40ed9e WHIRLPOOL aa4eb254a6f3c5b0a9b2aaab12a011a92763e7a966b31840a595c18e24d82935dbe0ab3faa4c9aeb7ae24ec7505cb60c20c1e117396cf0527161a2aa1face296 DIST NVIDIA-FreeBSD-x86_64-375.39.tar.gz 58308585 SHA256 0d58c450b3391cf28655f15505aaca8d011590efe5dd3ebc6a3212a9d7597b17 SHA512 2b9e4fe4c850c59050d6f586be743e6e9511d12ee3e5f760b6c6ef5ff2084b7bc147267a7844191db1bfab842806a47054ce8f7534d5fee614efbf08e1faaca4 WHIRLPOOL fe195242a1a3657609eb9ea0eda27daa22fcc40beaa35e3cfcda575978361f68da27a46411ad38a93bef333bba91c06b911545d4d14f19b3dd2d085ae7012408 DIST NVIDIA-FreeBSD-x86_64-378.13.tar.gz 58779963 SHA256 451b9e4b2da86609c760a9a133efa8d37d844ad036299689f007c90463a7ca39 SHA512 34cfc383ba196ecec2cd27fc12bf30dd58f8782b73414e7b4c182e832ae0dce1f8c017afbb2101d7525d4e321f80cac49d3b578a8fc0cf88be9310f4deb77057 WHIRLPOOL 23929abd50467f267cf6b7d58a49fc6f667036b7e92363cc05b021790d0d5ebc61e181c3b2e7c32a6338328cfcc05311d74112b005d638c0295b2c6189dfa3b8 -DIST NVIDIA-Linux-armv7l-gnueabihf-367.57.run 25701866 SHA256 e856debfabffe0e4ed2900e4acbc8e68340c4773651ec7a0000659588431ef7d SHA512 2d1221b8c6f01148412790c24f88a74104da4dc40f30ebe57a47468818c811119ed629ffa565f3ed58ce0b12b292b4304a2b364a83faff41ba14ea747f4e1c88 WHIRLPOOL bf7011f50360516f76ea5e176aea7d761193de877a5357a54704c60d512faf1af8e8e2450c547b5181fba98ee627a297b1c573e147c4db623324c1c35396330d -DIST NVIDIA-Linux-armv7l-gnueabihf-370.28.run 26117701 SHA256 efb60a23aa22b46e94e91d5f5a5fc0c17b47bcf50471e4371653ced5a5350dce SHA512 04699849441bccfb9214fda4c7ff8ecefa11249d1fbfe470e37fefdd132becc225a1bcc16bc976c3fb145a427961f5402c95ecc84b613adb71caef9c96fe7d90 WHIRLPOOL 675a495594c46666ec11c83a76cdc8821e9b57079ee53cd7adcf00e783d121e163b7c5b10598aa55a1fee72eee47defc514fba986685af41c90ab2c5d890abbd DIST NVIDIA-Linux-armv7l-gnueabihf-375.26.run 26735389 SHA256 8d2b7b36e74ceb1c439b2a5f8d2cdf009fda4f668509bb5d45171455abc774b9 SHA512 f18031c9b9ca6825f93f433d3f59b76a380a12b55e2f4556c2a1725fcdbea58176f22dcdb322f20e27d524f3fda75dd4f5a2a9263268411e0f5e361c580d865d WHIRLPOOL 4ecd41bebae3df91a39612849eb6f7e926398e906d2cb878aa788571976fb1cdfeabd47ac0cd3db26c4a0408608b8dfbc3815d10cdd1acd8eeaba6ed5824bb73 DIST NVIDIA-Linux-armv7l-gnueabihf-375.39.run 25350238 SHA256 52f512bbb3e2d5747df9b294667df9975564408c5ce4f3124aca7dba4355a3a9 SHA512 d888ab0c81c53138eec06e25be683798b5459a6862affa92429feb1e63fcd4cd7ac76bd78eff8c1bef245a25a6a7eb77994ad99c15ed65e8be1a64b3e4c45030 WHIRLPOOL 5714fdcd9e226a336e0abd46bd8a91eef486fc14de543a98d284b3ae3955e924dbde10a08144309b6c0b4e19fcb011bffb8c046a05cbe05f6123b22d270e2939 DIST NVIDIA-Linux-armv7l-gnueabihf-378.13.run 26514235 SHA256 399abf527d84e4b4d01ea66e0de4a1f9b1b39871b180ef3bf99c4718ebe3db91 SHA512 253786a821df85fa926ae842114321b3c70502f887ea7c2b6790dfe3836039ee5d390e6722ca8785904ec6487e465916923d3042dc6191b3b4522c3161b80cb0 WHIRLPOOL 154b13ecb368716980ab779894942831c13e4b2d47c1d5765ab14590663b34be1571df7934e1277c9a29cdfe93e209a04e2a9fed2830c407a42547433fd9e721 @@ -42,15 +22,6 @@ DIST NVIDIA-Linux-x86-304.134.run 41201159 SHA256 84f7891af131bb9f9a8a34401dfef4 DIST NVIDIA-Linux-x86-304.135.run 41202842 SHA256 5cb0a191ddca7b4c72b3c26cd57b7d719878ce628d24b5b026a0e5c8d3a00d93 SHA512 c2645cc9a6f23641d8b6da51e72e203980068c05e365fcc73b32322a6875ce95e81f4e0d893276e14e84e93464488539c16db6b3be04f5324cf7d7a12bb557f8 WHIRLPOOL 79d0d0badd36c94f3d48eef2c40184ee876bf78e153b18e73521fbe756cd78248da38405e7c08abbfa400ee8cd8150d81987bd7f45501937a77c39f7fc9a0ee6 DIST NVIDIA-Linux-x86-340.101.run 38932143 SHA256 5f5eda9c3d9bf53b56ef4f546dd1be5317eed46df425edbdd2c34023fb9eb062 SHA512 5866f2b4e6e22863c54d9fc08c9c88c9c911df2396d0ceaca653ded04589ea3a9e4550ed58f4b182b0a42cfe205ef643fe43ea709478e5df5360a7f74fa87f41 WHIRLPOOL d44d6075dd64804cfc3fbdc28510defc7796a2f22ac24625aab8552bd8bd6b16f51dea15f04d56f7b53ed3df514a92582171d27ec4e9aa099bef2d3e940a62be DIST NVIDIA-Linux-x86-340.102.run 38779756 SHA256 61b13d5dae0f6f5d788a4d8c4c98e8d971d19cb90b606058060d007946248828 SHA512 bea700c925a6044fcded40324bb389c5fa1aadc40831f685a76e7b0ded11161f492960950c201467e564d157dcbe0c330d13a2014f51d0073002c5a262a6f0ca WHIRLPOOL f7a3e3c5f8bb9eedf0a93104564d3d9c3eabc39a807c47e87f84373f89513afcafecb94e602b12fd24f872971f2d16a5f945326c670a6eebcd9ffcdcb70cb99e -DIST NVIDIA-Linux-x86-346.96.run 40751579 SHA256 8a299ddce7d34389206599a306a41d30754bb9bddda1be1a7fd85012f9aedf39 SHA512 9d413dd0559a4035a842527371cb1a27030c9eaeff510e529d2a205ea3eddc6e5666989418a6172aead4f5b2a924cf4cbf05269cb435dc2516af37eb35ba5d4d WHIRLPOOL 055127105804f2a6dc5067b20e771b4c12ad9dad62f4e874719385c7115e8394a8618eed3d6b330c8b5d90cbd3ae7fd09998e2a0017e35b4adca0f626110f238 -DIST NVIDIA-Linux-x86-352.79.run 42378162 SHA256 2929d6e509ed4502312c1b7384f6d12cb63bd4af03fc847a281d3ccdd4db4f69 SHA512 d2b50e55110f84412fd5c456849ceac0537ede643d12d1228cdda9dcca52f1f9d0a6e5a02eb4ee32cb68bbfa5adeacb8e4fc4e299848f70954d032daa989c122 WHIRLPOOL 19153e166b561dcc04730b6439999e625b5c4358f69d18127cf347cb86d39cb22f87b75d2623916021e9e774d234d6b41c3dc91f0524cebdf44f2a3007d4b8ee -DIST NVIDIA-Linux-x86-355.11.run 43569515 SHA256 94ce6b879581b931b84d83a9111040b9a5aa9306b012b4380cd93f6ffede3066 SHA512 450caea472c5e1b3d7098adba28d18c1221cf809c6bd0071466ff2a946dd0eca6555475f5f6bc044fb19a21c8939b1020357d4aeb0ce47d0edfcda071a66fd46 WHIRLPOOL 3a95e83ab3f46e64150caf1489aa3173aae69919bf432eabcdd0501de8bcdee5402cdb33e149a4d5d429ccb85e4b4af9b30bec5516ad7b7f091ae42f6093d26f -DIST NVIDIA-Linux-x86-358.16.run 43972195 SHA256 d3a2842cbfb1163e20c658fbfaf5a235d5c9f035cd2d657f15df8a14b3fe80b1 SHA512 a5d37fb56a59b9958f6c34139250baf13a1c42ffc70f7deb19ffaac1ae6c2ce80b96649c5797d60754050d75792d14141cd5ebc8820bb73ee4aad4aa6d6c5b20 WHIRLPOOL 336e56827619ad53622c3fbf9fb3e9895a08b8500b81f3830514a34913180e3dc5c6f170f14675fa628e2c9658a084d7f9c45f47213d28335ecfee53c8110907 -DIST NVIDIA-Linux-x86-361.42.run 49273826 SHA256 e32d047f62da3aaabe718a5b835e6efa2c0265e76dd0f4e6b9af35266b6e4e82 SHA512 f20af256d3ab4cbac0bdf59ada558c27827439ab0170e22824bf10f52a4a7944994904db8b062d0948f2e5470c3220ea4ff6e8dae74000ae29d2badc71022cba WHIRLPOOL 8d798514726b9d36777464ce13e8ddc8900cf831b2c878cee54ca17e0af3af8c8800f3ac5130b9066aa94b02d7997e06441ffced9f89343277534d9464d43f8e -DIST NVIDIA-Linux-x86-361.45.18.run 49760149 SHA256 0128d396b90cdd84446a893439fc1a76d2e84cfb057a1837f2cb804a4bf71407 SHA512 8f6b7fa4ecdea21090e56d4227e50186c8ac1009006c8e1848f118483355f73cd63c7425477dffc523e7b61acdf7b1cf97a66a4f61c30a57d6ffe3efcbfd1f70 WHIRLPOOL d1597c2b6a6ef6dfc7b8178ab135ccf8014e80d7429d790a4a6bddfe0df32608472513e87464069624982d7aada73c50f1852e392361727b42a649962f2c0237 -DIST NVIDIA-Linux-x86-364.19.run 50074922 SHA256 9f891d4b22c43c9094b59af5c8474e29c70813110b346834a5cad81a224d4112 SHA512 2b1cb0769d8c4d817588ab1071dbdbeda54291274392fd74009fc666bf198e6fcba1fe15db9d925a56ef98b147b48e58042a079b4f5773e95efe85531e25b01a WHIRLPOOL be7c48441e62c7038b58a3008dcb673f26607751ab62ab0197edf5d165b5d1ceb64ed654fd515746fe3cabe81d286e14b8343cf586cc5cb4ffcedf1f6df7eeeb -DIST NVIDIA-Linux-x86-367.57.run 44731570 SHA256 43d4e926f71ac6c581018badf467458709822e97a7564ed9f1b521b7b63d88bb SHA512 6316cdd94131057a584b3a893cfbca5e8b0f5e79060cb5bfe2c149b5a76bdcdc21d20338febb54f7201985c5b05545c3f6b63b26c32699717057cfb047993972 WHIRLPOOL 443ca9b389f78c13ae5344cb3cce67035a2b5a605b94518d91c253965263d37a84dff9ca29d47509a2d43017afde4786a55bfd45613882b5d4889dc27b67622f -DIST NVIDIA-Linux-x86-370.28.run 44189522 SHA256 6323254ccf2a75d7ced1374a76ca56778689d0d8a9819e4ee5378ea3347b9835 SHA512 2df8b3d1064073c8b793287994fe0648625d095f3434b7b67531e19632cbad318994df90b55de18aa457d55a1374b35d64a646564259995d3f2197c48737921c WHIRLPOOL 85a089c833311abdc06bbc1fc68cd5ff8ed43dd5e5887d340dc854f905ae741de0ae4343d024259f493dd668075096c460bc1f93c1795d2befb81dd3c4a4983a DIST NVIDIA-Linux-x86-375.26.run 44541069 SHA256 7c79cfaae5512f34ff14cf0fe76632c7c720600d4bbae71d90ff73f1674e617b SHA512 3bc859a95469a45f3c627018248d83e178d160385c3d17d9f890b0d142ecd1220fb21c442e4fe7755b831227a9c820736f447b162acd9699819c6e8145d6d841 WHIRLPOOL 33ad62f7021f38fd9dfa6b0fcfbc0b69a263409bd5b3b8da8eea6aa9af84299f0d5318bbc8b54139b1744b96fa08114029f8cc70b4f80b0fbd2d76efc47d0462 DIST NVIDIA-Linux-x86-375.39.run 44434734 SHA256 7f33f6572c5c5c57df71531749c7339309a2097918375685ea8018826cf19456 SHA512 0f4e784f69f7b4c4696b62779892d8e77aef0adb701dcf5e844027e3a1870aa56bb913bc05f30b079c2519bdda87fa0096d612e9d74ea35b97882fc54fa5d2ca WHIRLPOOL 1d1e6a49d86a72f38d3c84a0b75735c9b64b0bbc75bc54e91318b316298609dd34ab3affff5795fedba44133536e22bf287a76d8271bf0cee990204a383e8a93 DIST NVIDIA-Linux-x86-378.13.run 44397547 SHA256 05e62a6098aac7373438ee381072253a861d56522f74948c2b714e20e69a46b1 SHA512 b96d2558a1003a3c66cade3a1e16abd34d855c0e27cdebacdc0495e0ba3cd5c68bb84cc5f81bff1b9ddce36ac52e0dc125c56d868b77d7c8e2f606d559b13b4a WHIRLPOOL e8231978664cec766813821c0f363ef437ba627debc2d2664164fe44c344c480c50799710dbeeee782fdacdb66b16317d69a9dec4f21d347dc40e471201b3ed1 @@ -60,15 +31,6 @@ DIST NVIDIA-Linux-x86_64-304.134.run 69761152 SHA256 a014261a28a0a9829d255a5580c DIST NVIDIA-Linux-x86_64-304.135.run 69766944 SHA256 706269a507995544a24d24b3386d8f7bddbad3ce52167fae0da9e00dad8ab588 SHA512 1b444eb4af219506c88fdc78746eca1afb8571017858cb387d8546f1950d6d82c1077c74e9bda9ccebb0e42bc5cb4d50d9b8c01989ae4cb52c3fc069304b7ab5 WHIRLPOOL 1fdb38f634ad8e41e37e1fb7d84ffb22566b4c5e182aa90f6a034db99c251864759909ad0b9db77ed08645c0da50362e40bc37574f526d58bb3eece7c37772a6 DIST NVIDIA-Linux-x86_64-340.101.run 70042051 SHA256 d2cf81b5994a1728dc4851cdf0480cde0a34b040c94de0d5265edcfe3b90680a SHA512 64e3acee913864296421f0fcc44ffef0d89d20fc9f422e61f9a30a0c867ddedd2e88ead4a9607842a639ef593a19e725b70cf4ee051651d1d2ad48f3c5a189f3 WHIRLPOOL 59a7c3b40ae75e0fb3b7ae2c1125fd73071882347cfee6b6c0b76e9a117dfaa93bf6b391459f2ca96c50df24b220e5b8941e02f4cf48e7ae0833af67e180b195 DIST NVIDIA-Linux-x86_64-340.102.run 69960567 SHA256 2b96d2f26c00405471e0ce10dca0b6639e91aeb43f7c5aadbdae28445a28df5a SHA512 eead5b6f18afd5384f30f36a9ef569dea7d6ca1dbc590f63d603694bcc6a8bf251942b36ca606cfd5e6775ef180cd564f3cf226a3f4c04d7ed354204fec15577 WHIRLPOOL 6596a178aa35ac841bf287fa1372f6748cda0430c6b4bcd18fa63d63030331df59e75d4a3dde63f28a6fa15cdfaa90d27136c96e9abe81fb05202f00430ecaa9 -DIST NVIDIA-Linux-x86_64-346.96.run 73538317 SHA256 229b28a6b65965a248d07223d941de7d79b54cee7c6574f1037293e8a8026727 SHA512 188f8aac88085c3cac9637e87f4d9259d0c508075bbbf684775650a12f4760f47ba9e92f79e8bbe96d33ee014092edd38efce7dd730f67e0f11c2079eca938c5 WHIRLPOOL c9f4a5163018dc0b53aeff84b410cb34720d06ca7bdd17ce166ad3a2b057ffe94e6773594cd617fce79d9d0a02e5e1cd0525ca30dade7247ad5b7b20ff661a64 -DIST NVIDIA-Linux-x86_64-352.79.run 77140528 SHA256 e05a825a5e0027f062b1a1344ff3484286f50df990d66d567348b80101a0c4e3 SHA512 b54257e9aa6f6353d4f149d4dfab5ea12bf1907260ad98fd9102da1b458c1cf32e28707c8c5136efdaeccd0f60e6e013736b349a59ea50044dceddf265afa38b WHIRLPOOL 25be659c5784558c42c4f2fb0b50d5d56c0419f175ad8c019e00bdc033707297668705e051e4f176fff67340ec68054848a8b3aa5a9922ee0c9f9a270787a6d6 -DIST NVIDIA-Linux-x86_64-355.11.run 76490009 SHA256 a59b425381add9d9058dc2d987bf3087ab59c43224b5eb04c3f273f5886451ed SHA512 bfc7ab7741183408aa0226dc29176c8ffe08566fbea7cebf78f4aa30627dc27ddf90bb82951c99006b34bc481be15712b4f5867ef543a32bfe3fe81a8e6ddeae WHIRLPOOL bb5d3397a855a53c2cd7e48056564085b906550f856207932e4670fef995030a3a7bcc0a9b97fee2e60aaff9b41c4a954afc57585441f5dec92c795358da810a -DIST NVIDIA-Linux-x86_64-358.16.run 77353969 SHA256 a942cdb29ed715ff1ce25beb06b6c2490126b98ef8bee5d9973967b557596bf2 SHA512 4ae43f5e8c311d6c97eb89b02504bf52e3a947c71662f30641988a78eb9fe083370124aeee3b89db74f8ee50f454338db98dc7abeb35a242ba5729fefccead77 WHIRLPOOL 3dd0dcd4b455fcac12d55f40cfb8db0536af82d90c32b8471528b44a9fa1b3f3706ac26558d7395f82649c37550fded17b48d75d5584b3a41390c94bb1135c48 -DIST NVIDIA-Linux-x86_64-361.42.run 86760004 SHA256 b7011cbae605bed5db7082d7028db3ee5d9a37e802f26a095719e7cfa5716cba SHA512 7a018be43f810f1cd674e0817d2975e0ca490149809455f014cfc3d0cc550ec60c1097d7442d3fa302e03465172156131e4e99523f509c6d010c61eb01369bc0 WHIRLPOOL 3b3c6f8f0ee2351bee6d0a36b8279305b1cc4ee3a980402f8736047181be2df822c773c65914034efe8e03d8b6e20a455d47369790cffe5d9dcd282d5d429298 -DIST NVIDIA-Linux-x86_64-361.45.18.run 87468802 SHA256 fb43b321609f314d39435a1146392b4d3920dbce593dcd19b3848a056e91c570 SHA512 a085766075d990b11586c701e2efe758a6940b5f3ddc4db8a3840f7e587e82785e38473ab266535f39da0552b95ba97c789398ad6c795041c7073ed301fba8ec WHIRLPOOL 37d30388937d2eb0797a094615057c936d9e0c9b176b52605b277a2c5b35624674de67adcdc7ee55312498611a5e99fc24af8eca71bf04faf64bdfddf1fc9349 -DIST NVIDIA-Linux-x86_64-364.19.run 87961023 SHA256 7b8680a815ac74d5b3a7e3d38113b05ed1e2ce781575e966c27f68457aaf694e SHA512 c02fea3eb0404e9f17eb6fdef43008c09653239b884fc599d3639f50a36b8d2708539c429e4b3be96d509c83ce5416145add7f152a3f08cada555617e9fcf1fc WHIRLPOOL 40c19fb5bfbc3a6b2c631e7768a04af9b250b4e8845adbf40b6408e2e7c6bb5b2b3142760387995c83450490e26591029d44aa8a6ee7a7b39a50128c7e4211af -DIST NVIDIA-Linux-x86_64-367.57.run 77127324 SHA256 a1615db29f1377817b610cca997e0339753ee9d58b28e1618b892691df3a8851 SHA512 fc94f5df7eb2ef243db381bc4458f911a6d76bff949701bedb249a3ebf369ff3da8dc5a7d52ab6ae3f23e947c419923f303cd57429a266a0f8e96df1039b1f5d WHIRLPOOL 5580b7839652c250ba134ecc97438d1810453d5bd5d8cffd44f01379d7509bca6f0c58318a150a5b4786f955d4de708ce9be618572212eca2c7098a36eab24d5 -DIST NVIDIA-Linux-x86_64-370.28.run 76690360 SHA256 90aa3c186e45b39e6fc0064ab8dbda8bcc897cb61d2e7b7cb30b4ec9a4b39239 SHA512 931476f92a63d142478b2d6b3da4031769fd3b93aee2387800a78b1354b59a5fb5e4e293436b6b4c246627d51c0f55d140ab230de385cb1567bc8b25518eb741 WHIRLPOOL ce866c38291d2ab4aeeff05654a0e61196129f77baea5af93ddbc22fab9574ba39cc05d58020ea2407cc7342f0bcf5c2702d42290f4cc3b53c9e04fb7c617413 DIST NVIDIA-Linux-x86_64-375.26.run 75869960 SHA256 4f42b2c3709dc2f11a1deca89628582062f4e9bca87f28a4fde50d25bd4a1ecf SHA512 0990ac2e7b045bf62a8c58eb7acf91458756de91887d43486d9754bfc1493b28193072a9687d2d892cc98aaa4e584a8b2a8471756d4f19965da904d51e437dd1 WHIRLPOOL b9890e705dbc3e967a978c5f823f71a418b03aa1b36669c1763559ed81a6a103e9d011246ffe049eda899425e254e8955b921ea9132a8d36530dc4a230cb4832 DIST NVIDIA-Linux-x86_64-375.39.run 77264092 SHA256 91be5a20841678d671f32074e2901791fe12c00ce1f3b6b3c4199ce302da85a7 SHA512 9a7e865db44f8e65be257b26250adcdf6f3dfac4e164f14a42b8e03c576016dfedf152d6a6cb84fb3ae9930d2b4ba472a63cf32d557395ff7fa429d9b8c9ccd0 WHIRLPOOL 03a27813464847958d9d2adb0bc260e31c6458df18e567c4c36e1eac5f7288108f88147cf1115f360b159a6d0ab459692abb35a79879e19fec2db30709802df1 DIST NVIDIA-Linux-x86_64-378.13.run 76239469 SHA256 3de379249ef25a8c10a24be2718bf1cb2e338da204e37874c4a0c66dbcdf42ee SHA512 2f6789aa0a400c035c0a074631dc5c26abb4f8a62efe928ca3a2865b89d29acfc09c27f23a664e438275e4bfd25c261745d4d495f9aca5f54ee6c53a389059d2 WHIRLPOOL 6e8dcc7be0981591f377babbd9e1430fddeac9a42291f36a95243d418882bc8b38a1e692e2fd62d4b785feca93165e54a64c015bd99193c699831465f512b180 @@ -77,14 +39,6 @@ DIST nvidia-settings-304.134.tar.bz2 1480967 SHA256 8e562823fe9a7b1d33775db56050 DIST nvidia-settings-304.135.tar.bz2 1480857 SHA256 f5431a6547d7727506b72616156c18f927a89c0702e7f939b5043fdb66e4faf8 SHA512 ce77819c223d02bc5330a57047b45cf9022159b0d03b3fb1572a64aebbcb5872312acef3f56e2574acc4c2c92eae9ac6e602327fd2658c47f2b97c69cf61ebfb WHIRLPOOL 5fc6c4ada22d8a1b0cade4049691c013a5dfa0a7777d7789f310d363c9c4ed5cb724acc153ec562fcc2266228325096e3f733e8f1517a74c047388a4361d25d8 DIST nvidia-settings-340.101.tar.bz2 1550221 SHA256 e98d2816f30182826aebb4315d4069d212709d28c129528295c012e11c5c5bd5 SHA512 145cfff7828b61566c13644d58e62495e5dfcbc0d24c49b04b24953d6822bb406de166879ef681a9ad6a6cb64fbc85948a93afb2f63f4e0a24107818eb0f2882 WHIRLPOOL bca223365521625d30bef14a752eb02d6166ee1e988087c584c0f325413cf0d92a67989d9f456f16b09611558af0eab4f8f3a37894db8c1df1fe3446bc3975ee DIST nvidia-settings-340.102.tar.bz2 1550093 SHA256 2895d4e2597a6ea0c425d74c7a0808775065f5cf58397fbbe6e626b00c60a55a SHA512 1ab190d8bcba7cc39d47f38db2bee28fab48d48c9a6674c9ff29ea3f51103e13746ee1df2d30581bd8259fc1104fed90b36cba88907bb2f202c931d256eab66a WHIRLPOOL 58105b371bc7156c2749f4bf85377f06fca71eb0a933721d70987aa53bb6c94494de3be25363ccf326105ca475405dcd7c884ceb6158df352ac6cc70dcffbf7e -DIST nvidia-settings-346.96.tar.bz2 1558100 SHA256 b293f269aac01dfdf59e9dff46d774f7ca77d4628f377c01cabfbfccd28f3cd9 SHA512 9ead0fa5f0a55c1080d9b4da6cf96c2435c1a166297187f2c7d8b95a9e66c2e9cdd2e35739a4304b02ff1ccedb0421a7dc99a546df3a8f18804da133b93f50e3 WHIRLPOOL 4bddea94bb4c0dcde6b2b06507ffe890a1996471603de2d494f54b783cd36d44aa620fe03d16bc104ce99d6371a50666b0f029a309b78226810761cc13053f98 -DIST nvidia-settings-352.79.tar.bz2 1570988 SHA256 1f103cbfe162281355c484a5c3ef9ac1bb0528acba2d229111da7e58cf18f217 SHA512 d56e20844bf71d55e51aebca38e922a2985fdbd4edab29a07f9a4a8a0b883ca469c3b949f048837ec77464da90e2d485e5efcd314afc2810c44ad7dc497b53fe WHIRLPOOL 51999a744f6b3e36c4d12f841c136a754533de09c1802f60392666392beeccbb0bf1489269cac33b12ccb061554609d3dc8d8ffbf45b4cb860108fd9f86e2139 -DIST nvidia-settings-358.16.tar.bz2 1571104 SHA256 8cd78df738a824e282771755ae9a41d5b194b15f9df96b9fd23fcf3005967d35 SHA512 0438aa2599e98f68a04c9f663f4ef9b05092df512fbca40ad0fe17e25ca4d940d02cc55e9fd44a2551950a2a30782d1e48553c4bebd071bfff280869a6dde556 WHIRLPOOL 60b7e9abba3163ac877a3a9d944cf72352e28d2fd1a3af0996d3b7d40ef48be7f057c1063f9ca61c693cbf1bff57be61704f13d941220bf74a8049954f87154d -DIST nvidia-settings-361.42.tar.bz2 1571226 SHA256 d8a8943289de60ccebc86335bbe1f16f7486afedc4334a9584aa56ab6e7cb8bf SHA512 052e35f1204068e631cf34108783a95bf96350475776e3fe7074cd6e2186e9f0f34642ff298389c5aaabd3e2dcd905e0b14604efc71e9a54054d59df43ebe173 WHIRLPOOL 9a89d47c42360fd1712f2fa14d65a416a5b6fe42176439f22b250c754ac2e63826df3449118941073dcf704eb96023d4256475772ca1a1511aa4cc1facbf5910 -DIST nvidia-settings-361.45.18.tar.bz2 1571655 SHA256 15a26c318114675c5906879388fbd14445570935454200d39c510abdaa8256ae SHA512 bb4d7234065a9541317aeab1d1229f75b092a99a4b5b1093cb4eb854ccc4005615b12010cf20b299ac46f1bccb0c35c323451d3262ef3325f0b55e88ce11e6bf WHIRLPOOL bbdabbd29882d3323338308878eb95b25e84bd2a4b5d0188e8049457d2dc5b37cba4c1e55aac0088bc6d950a9abb0117744914e6c58d1e1576929ab00434326f -DIST nvidia-settings-364.19.tar.bz2 1573005 SHA256 fe8e9cc4d0ade9caaf51109e7e5287d1cbea111e73fae56f6c1b36ff8e55c370 SHA512 5274d908df284bc0ad2f7e6dd62c4052b2d0445e36dc84007bcb7c4e2382a8e9a4439e3507c229e96461031e1f3207911e659ddc73eea847052fa98b677f82c0 WHIRLPOOL dc93fc3635ff78b0a74d717a825ac630d38779f280c0d611fe43ff69adfda116c2363cb88cac1035d0169038ff4f82e51cd1b741cb5394e8e285cf5fe72ef046 -DIST nvidia-settings-367.57.tar.bz2 1571905 SHA256 aacb66b130e4adc034e10afb518c919a96029b31b14da8975b08d250d8750140 SHA512 57bf414f4aefacd994e73ea3b31de8cf9f5d6ddc9a95ea1456c21905510c4ba9219e690a1b1bb1346b57a80caf9856c5fede80734163392f0788b995d1bd4cea WHIRLPOOL 7294f84afe8a00f59e2073773d12dc0b31273ab49fe318558eee84a72b7df1233fa004949c0512bff1974c5edbc4749eed68e172336241ea9cb24d6c585a8979 -DIST nvidia-settings-370.28.tar.bz2 1573509 SHA256 59d7818a4837144e373ce958233db059fde59e279477001e187579770ebf0c5f SHA512 c4da6ae54839a8f91d3557153a648f69095e9a486dbaaf73e453d625660f1adcada12ee5c4bccc1afe2cfd454ead13c1df0e59d5d6aa70f6065823d53f7bb461 WHIRLPOOL e5f0a9fd67e50aee42598d6a0ce9a69a162405a6121518c7aaf9ede409e9bdeb44e3102a123eb6f8c963e0fdaca429a8b693f6af2f0467e746c42f57a496d45f DIST nvidia-settings-375.26.tar.bz2 1615459 SHA256 beb0d88e2f63427239fd2014299ef7bf780e70800f68be5d011575e858711fe9 SHA512 e575670ccf7e3ef0089ee6a969f107f6f43d742a60cc325c6d95efc4773f34a6e013fd2c4e38b5f90054e24146a05c2300c0cf6a9b7013b556bacc1402956f49 WHIRLPOOL 854e4444beb330c97b29ebc00936c9d2f2522165ef2ca86f68ae28abadef516aedb341e2b2bf6d7a762decaeac4d5c3084bddaa21492b0a60607a2bbf541c301 DIST nvidia-settings-375.39.tar.bz2 1618873 SHA256 e5965788368c85e8a83db27d725ea9492068d0e79f961b22fe38d22f090e0839 SHA512 de6dc16850f032f228313582c83e27fefcb045261cb8b5fdef428cca5264307ef58a5e78d91fe3624a39ab2a4361e3939d4b6592c32837a1f43caf381120bed8 WHIRLPOOL 100102effcb2fb04976f6ecadd23631b5ea28206076fdac24f2ae481c96e6856239295c65e2e527d7c9558d97f3f5a25e6c48907cb41eff0a23ee6d878790716 DIST nvidia-settings-378.13.tar.bz2 1618011 SHA256 b23f931e3107897ff73c57ce02aa77e8e1dc95559bfa338e898126731a230023 SHA512 a12352c92fd4f56002bda2b07e8cddd5573af98521ec3495cd428b784eb368c9f2cb40f9b4372400ba1ea67c9349c6a9b4f7c218ede2d0d5dabb08325eda9844 WHIRLPOOL d143ae5fd3d09e235aca4d5f95d87d9ab0e3adee4aab5496fba89bcc75903dae5a604f76e9b34331f561dcc8e9aa222ee91e6e15ce91635cefc1e4e40eb8097f diff --git a/x11-drivers/nvidia-drivers/files/nvidia-drivers-346.16-pax-constify.patch b/x11-drivers/nvidia-drivers/files/nvidia-drivers-346.16-pax-constify.patch deleted file mode 100644 index 9b9f53e45dcc..000000000000 --- a/x11-drivers/nvidia-drivers/files/nvidia-drivers-346.16-pax-constify.patch +++ /dev/null @@ -1,25 +0,0 @@ ---- a/kernel/uvm/uvm_common.c -+++ b/kernel/uvm/uvm_common.c -@@ -95,7 +95,6 @@ static RM_STATUS uvmnext_gpu_event_stop_ - #endif // NVIDIA_UVM_NEXT_ENABLED - - static dev_t g_uvmBaseDev; --struct UvmOpsUvmEvents g_exportedUvmOps; - - // TODO: This would be easier if RM allowed for multiple registrations, since we - // could register UVM-Lite and UVM-Next separately (bug 1372835). -@@ -147,9 +146,11 @@ static RM_STATUS uvmSetupGpuProvider(voi - RM_STATUS status = RM_OK; - - #ifdef NVIDIA_UVM_RM_ENABLED -- g_exportedUvmOps.startDevice = uvm_gpu_event_start_device; -- g_exportedUvmOps.stopDevice = uvm_gpu_event_stop_device; -- g_exportedUvmOps.isrTopHalf = uvmnext_isr_top_half; -+ static struct UvmOpsUvmEvents g_exportedUvmOps = { -+ .startDevice = uvm_gpu_event_start_device, -+ .stopDevice = uvm_gpu_event_stop_device, -+ .isrTopHalf = uvmnext_isr_top_half, -+ }; - - // call RM to exchange the function pointers. - status = nvUvmInterfaceRegisterUvmCallbacks(&g_exportedUvmOps); diff --git a/x11-drivers/nvidia-drivers/files/nvidia-drivers-346.16-pax-usercopy.patch b/x11-drivers/nvidia-drivers/files/nvidia-drivers-346.16-pax-usercopy.patch deleted file mode 100644 index d1a440c94aae..000000000000 --- a/x11-drivers/nvidia-drivers/files/nvidia-drivers-346.16-pax-usercopy.patch +++ /dev/null @@ -1,47 +0,0 @@ ---- a/kernel/nv.c -+++ b/kernel/nv.c -@@ -705,7 +705,7 @@ int __init nvidia_init_module(void) - #endif - - nvidia_stack_t_cache = NV_KMEM_CACHE_CREATE(nvidia_stack_cache_name, -- nvidia_stack_t); -+ nvidia_stack_t, SLAB_USERCOPY); - if (nvidia_stack_t_cache == NULL) - { - nv_printf(NV_DBG_ERRORS, "NVRM: stack cache allocation failed!\n"); -@@ -846,7 +846,7 @@ int __init nvidia_init_module(void) - nv_lock_init_locks(nv); - - nvidia_pte_t_cache = NV_KMEM_CACHE_CREATE(nvidia_pte_cache_name, -- nvidia_pte_t); -+ nvidia_pte_t, 0); - if (nvidia_pte_t_cache == NULL) - { - rc = -ENOMEM; -@@ -857,7 +857,7 @@ int __init nvidia_init_module(void) - if (!nv_multiple_kernel_modules) - { - nvidia_p2p_page_t_cache = NV_KMEM_CACHE_CREATE(nvidia_p2p_page_cache_name, -- nvidia_p2p_page_t); -+ nvidia_p2p_page_t, 0); - if (nvidia_p2p_page_t_cache == NULL) - { - rc = -ENOMEM; ---- a/kernel/nv-linux.h -+++ b/kernel/nv-linux.h -@@ -1431,11 +1431,11 @@ extern void *nvidia_stack_t_cache; - - #if !defined(NV_VMWARE) - #if (NV_KMEM_CACHE_CREATE_ARGUMENT_COUNT == 5) --#define NV_KMEM_CACHE_CREATE(name, type) \ -- kmem_cache_create(name, sizeof(type), 0, 0, NULL) -+#define NV_KMEM_CACHE_CREATE(name, type, flags) \ -+ kmem_cache_create(name, sizeof(type), 0, flags, NULL) - #else --#define NV_KMEM_CACHE_CREATE(name, type) \ -- kmem_cache_create(name, sizeof(type), 0, 0, NULL, \ -+#define NV_KMEM_CACHE_CREATE(name, type, flags) \ -+ kmem_cache_create(name, sizeof(type), 0, flags, NULL, \ - NULL) - #endif - #define NV_KMEM_CACHE_DESTROY(kmem_cache) \ diff --git a/x11-drivers/nvidia-drivers/files/nvidia-drivers-355.06-pax.patch b/x11-drivers/nvidia-drivers/files/nvidia-drivers-355.06-pax.patch deleted file mode 100644 index cc5ebdf79574..000000000000 --- a/x11-drivers/nvidia-drivers/files/nvidia-drivers-355.06-pax.patch +++ /dev/null @@ -1,102 +0,0 @@ -diff -urp NVIDIA-Linux-x86_64-355.06.orig/kernel/common/inc/nv-linux.h NVIDIA-Linux-x86_64-355.06/kernel/common/inc/nv-linux.h ---- NVIDIA-Linux-x86_64-355.06.orig/kernel/common/inc/nv-linux.h 2015-07-29 05:13:57.000000000 +0200 -+++ NVIDIA-Linux-x86_64-355.06/kernel/common/inc/nv-linux.h 2015-08-21 16:45:55.624336728 +0200 -@@ -1408,11 +1408,11 @@ extern void *nvidia_stack_t_cache; - - #if !defined(NV_VMWARE) - #if (NV_KMEM_CACHE_CREATE_ARGUMENT_COUNT == 5) --#define NV_KMEM_CACHE_CREATE(name, type) \ -- kmem_cache_create(name, sizeof(type), 0, 0, NULL) -+#define NV_KMEM_CACHE_CREATE(name, type, flags) \ -+ kmem_cache_create(name, sizeof(type), 0, flags, NULL) - #else --#define NV_KMEM_CACHE_CREATE(name, type) \ -- kmem_cache_create(name, sizeof(type), 0, 0, NULL, \ -+#define NV_KMEM_CACHE_CREATE(name, type, flags) \ -+ kmem_cache_create(name, sizeof(type), 0, flags, NULL, \ - NULL) - #endif - #define NV_KMEM_CACHE_DESTROY(kmem_cache) \ -diff -urp NVIDIA-Linux-x86_64-355.06.orig/kernel/nvidia/nv.c NVIDIA-Linux-x86_64-355.06/kernel/nvidia/nv.c ---- NVIDIA-Linux-x86_64-355.06.orig/kernel/nvidia/nv.c 2015-07-29 05:13:57.000000000 +0200 -+++ NVIDIA-Linux-x86_64-355.06/kernel/nvidia/nv.c 2015-08-21 16:44:51.008340178 +0200 -@@ -719,7 +719,7 @@ int __init nvidia_init_module(void) - #endif - - nvidia_stack_t_cache = NV_KMEM_CACHE_CREATE(nvidia_stack_cache_name, -- nvidia_stack_t); -+ nvidia_stack_t, SLAB_USERCOPY); - if (nvidia_stack_t_cache == NULL) - { - nv_printf(NV_DBG_ERRORS, "NVRM: stack cache allocation failed!\n"); -@@ -861,7 +861,7 @@ int __init nvidia_init_module(void) - nv_state_init_gpu_uuid_cache(nv); - - nvidia_pte_t_cache = NV_KMEM_CACHE_CREATE(nvidia_pte_cache_name, -- nvidia_pte_t); -+ nvidia_pte_t, 0); - if (nvidia_pte_t_cache == NULL) - { - rc = -ENOMEM; -@@ -872,7 +872,7 @@ int __init nvidia_init_module(void) - if (!nv_multiple_kernel_modules) - { - nvidia_p2p_page_t_cache = NV_KMEM_CACHE_CREATE(nvidia_p2p_page_cache_name, -- nvidia_p2p_page_t); -+ nvidia_p2p_page_t, 0); - if (nvidia_p2p_page_t_cache == NULL) - { - rc = -ENOMEM; -diff -urp NVIDIA-Linux-x86_64-355.06.orig/kernel/nvidia/nv-mmap.c NVIDIA-Linux-x86_64-355.06/kernel/nvidia/nv-mmap.c ---- NVIDIA-Linux-x86_64-355.06.orig/kernel/nvidia/nv-mmap.c 2015-07-29 05:13:57.000000000 +0200 -+++ NVIDIA-Linux-x86_64-355.06/kernel/nvidia/nv-mmap.c 2015-08-21 16:58:15.968297199 +0200 -@@ -113,12 +113,12 @@ nvidia_vma_release(struct vm_area_struct - } - - #if defined(NV_VM_OPERATIONS_STRUCT_HAS_ACCESS) --static int -+static ssize_t - nvidia_vma_access( - struct vm_area_struct *vma, - unsigned long addr, - void *buffer, -- int length, -+ size_t length, - int write - ) - { -diff -urp NVIDIA-Linux-x86_64-355.06.orig/kernel/nvidia-uvm/uvm_common.c NVIDIA-Linux-x86_64-355.06/kernel/nvidia-uvm/uvm_common.c ---- NVIDIA-Linux-x86_64-355.06.orig/kernel/nvidia-uvm/uvm_common.c 2015-07-29 05:10:08.000000000 +0200 -+++ NVIDIA-Linux-x86_64-355.06/kernel/nvidia-uvm/uvm_common.c 2015-08-21 17:00:33.788289841 +0200 -@@ -60,7 +60,7 @@ static void uvmnext_exit(void) - { - - } --static NV_STATUS uvmnext_isr_top_half(void) -+static NV_STATUS uvmnext_isr_top_half(UvmGpuUuid *gpuUuidStruct) - { - return NV_ERR_NO_INTR_PENDING; - } -@@ -79,7 +79,6 @@ NvBool uvmnext_activated(void) - #endif // NVIDIA_UVM_NEXT_ENABLED - - static dev_t g_uvmBaseDev; --struct UvmOpsUvmEvents g_exportedUvmOps; - - // TODO: This would be easier if RM allowed for multiple registrations, since we - // could register UVM-Lite and UVM-Next separately (bug 1372835). -@@ -112,9 +111,11 @@ static NV_STATUS uvmSetupGpuProvider(voi - NV_STATUS status = NV_OK; - - #ifdef NVIDIA_UVM_RM_ENABLED -- g_exportedUvmOps.startDevice = uvm_gpu_event_start_device; -- g_exportedUvmOps.stopDevice = uvm_gpu_event_stop_device; -- g_exportedUvmOps.isrTopHalf = uvmnext_isr_top_half; -+ static struct UvmOpsUvmEvents g_exportedUvmOps = { -+ .startDevice = uvm_gpu_event_start_device, -+ .stopDevice = uvm_gpu_event_stop_device, -+ .isrTopHalf = uvmnext_isr_top_half, -+ }; - - // call RM to exchange the function pointers. - status = nvUvmInterfaceRegisterUvmCallbacks(&g_exportedUvmOps); diff --git a/x11-drivers/nvidia-drivers/files/nvidia-drivers-361.28-pax.patch b/x11-drivers/nvidia-drivers/files/nvidia-drivers-361.28-pax.patch deleted file mode 100644 index 09e4384b9420..000000000000 --- a/x11-drivers/nvidia-drivers/files/nvidia-drivers-361.28-pax.patch +++ /dev/null @@ -1,351 +0,0 @@ -diff -urp work.orig/kernel/common/inc/nv-linux.h work/kernel/common/inc/nv-linux.h ---- work.orig/kernel/common/inc/nv-linux.h 2016-02-03 23:31:51.000000000 +0100 -+++ work/kernel/common/inc/nv-linux.h 2016-02-10 11:49:15.309410457 +0100 -@@ -1351,6 +1351,9 @@ extern void *nvidia_stack_t_cache; - #define NV_KMEM_CACHE_CREATE(name, type) \ - NV_KMEM_CACHE_CREATE_FULL(name, sizeof(type), 0, 0, NULL) - -+#define NV_KMEM_CACHE_CREATE_USERCOPY(name, type) \ -+ NV_KMEM_CACHE_CREATE_FULL(name, sizeof(type), 0, SLAB_USERCOPY, NULL) -+ - #define NV_KMEM_CACHE_DESTROY(kmem_cache) \ - kmem_cache_destroy(kmem_cache) - -diff -urp work.orig/kernel/common/inc/nv-modeset-interface.h work/kernel/common/inc/nv-modeset-interface.h ---- work.orig/kernel/common/inc/nv-modeset-interface.h 2016-02-03 23:31:51.000000000 +0100 -+++ work/kernel/common/inc/nv-modeset-interface.h 2016-02-10 11:49:54.970985152 +0100 -@@ -70,7 +70,7 @@ typedef struct { - * mix nvidia and nvidia-modeset kernel modules from different - * releases. - */ -- const char *version_string; -+// const char *version_string; - - /* - * Allocate and free an nvidia_stack_t to pass into -@@ -104,6 +104,6 @@ typedef struct { - - } nvidia_modeset_rm_ops_t; - --NV_STATUS nvidia_get_rm_ops(nvidia_modeset_rm_ops_t *rm_ops); -+NV_STATUS nvidia_get_rm_ops(const nvidia_modeset_rm_ops_t **rm_ops, const char **version_string); - - #endif /* _NV_MODESET_INTERFACE_H_ */ -diff -urp work.orig/kernel/common/inc/nv-register-module.h work/kernel/common/inc/nv-register-module.h ---- work.orig/kernel/common/inc/nv-register-module.h 2016-02-03 23:31:51.000000000 +0100 -+++ work/kernel/common/inc/nv-register-module.h 2016-02-10 11:50:18.941376865 +0100 -@@ -34,7 +34,7 @@ typedef struct nvidia_module_s { - int (*ioctl)(struct inode *, struct file * file, unsigned int cmd, unsigned long arg); - unsigned int (*poll)(struct file * file, poll_table *wait); - --} nvidia_module_t; -+} __do_const nvidia_module_t; - - int nvidia_register_module(nvidia_module_t *); - int nvidia_unregister_module(nvidia_module_t *); -diff -urp work.orig/kernel/nvidia/nv.c work/kernel/nvidia/nv.c ---- work.orig/kernel/nvidia/nv.c 2016-02-03 23:31:51.000000000 +0100 -+++ work/kernel/nvidia/nv.c 2016-02-10 11:50:40.191828792 +0100 -@@ -704,7 +704,7 @@ int __init nvidia_init_module(void) - NV_SPIN_LOCK_INIT(&km_lock); - #endif - -- nvidia_stack_t_cache = NV_KMEM_CACHE_CREATE(nvidia_stack_cache_name, -+ nvidia_stack_t_cache = NV_KMEM_CACHE_CREATE_USERCOPY(nvidia_stack_cache_name, - nvidia_stack_t); - if (nvidia_stack_t_cache == NULL) - { -diff -urp work.orig/kernel/nvidia/nv-chrdev.c work/kernel/nvidia/nv-chrdev.c ---- work.orig/kernel/nvidia/nv-chrdev.c 2016-02-03 23:31:51.000000000 +0100 -+++ work/kernel/nvidia/nv-chrdev.c 2016-02-10 11:50:57.201126955 +0100 -@@ -20,8 +20,6 @@ int nv_register_chrdev(void *param) - { - nvidia_module_t *module = (nvidia_module_t *)param; - -- module->instance = nv_module_instance; -- - return (nvidia_register_module(module)); - } - -diff -urp work.orig/kernel/nvidia/nv-instance.c work/kernel/nvidia/nv-instance.c ---- work.orig/kernel/nvidia/nv-instance.c 2016-02-03 23:31:51.000000000 +0100 -+++ work/kernel/nvidia/nv-instance.c 2016-02-10 11:51:35.418977554 +0100 -@@ -54,6 +54,7 @@ struct pci_driver nv_pci_driver = { - nvidia_module_t nv_fops = { - .owner = THIS_MODULE, - .module_name = MODULE_NAME, -+ .instance = MODULE_INSTANCE_NUMBER, - .open = nvidia_open, - .close = nvidia_close, - .ioctl = nvidia_ioctl, -diff -urp work.orig/kernel/nvidia/nv-mmap.c work/kernel/nvidia/nv-mmap.c ---- work.orig/kernel/nvidia/nv-mmap.c 2016-02-03 23:31:51.000000000 +0100 -+++ work/kernel/nvidia/nv-mmap.c 2016-02-10 11:14:27.996577127 +0100 -@@ -113,12 +113,12 @@ nvidia_vma_release(struct vm_area_struct - } - - #if defined(NV_VM_OPERATIONS_STRUCT_HAS_ACCESS) --static int -+static ssize_t - nvidia_vma_access( - struct vm_area_struct *vma, - unsigned long addr, - void *buffer, -- int length, -+ size_t length, - int write - ) - { -diff -urp work.orig/kernel/nvidia/nv-modeset-interface.c work/kernel/nvidia/nv-modeset-interface.c ---- work.orig/kernel/nvidia/nv-modeset-interface.c 2016-02-03 23:31:51.000000000 +0100 -+++ work/kernel/nvidia/nv-modeset-interface.c 2016-02-10 12:05:23.822391866 +0100 -@@ -59,10 +59,9 @@ void nvidia_modeset_resume(NvU32 gpuId) - } - } - --NV_STATUS nvidia_get_rm_ops(nvidia_modeset_rm_ops_t *rm_ops) -+NV_STATUS nvidia_get_rm_ops(const nvidia_modeset_rm_ops_t **rm_ops, const char **version_string) - { -- const nvidia_modeset_rm_ops_t local_rm_ops = { -- .version_string = NV_VERSION_STRING, -+ static const nvidia_modeset_rm_ops_t local_rm_ops = { - .alloc_stack = nvidia_modeset_rm_ops_alloc_stack, - .free_stack = nvidia_modeset_rm_ops_free_stack, - .get_gpuid_list = nvidia_get_gpuid_list, -@@ -72,13 +71,13 @@ NV_STATUS nvidia_get_rm_ops(nvidia_modes - .set_callbacks = nvidia_modeset_set_callbacks, - }; - -- if (strcmp(rm_ops->version_string, NV_VERSION_STRING) != 0) -+ if (strcmp(*version_string, NV_VERSION_STRING) != 0) - { -- rm_ops->version_string = NV_VERSION_STRING; -+ *version_string = NV_VERSION_STRING; - return NV_ERR_GENERIC; - } - -- *rm_ops = local_rm_ops; -+ *rm_ops = &local_rm_ops; - - return NV_OK; - } -diff -urp work.orig/kernel/nvidia-modeset/nvidia-modeset-linux.c work/kernel/nvidia-modeset/nvidia-modeset-linux.c ---- work.orig/kernel/nvidia-modeset/nvidia-modeset-linux.c 2016-02-03 23:32:20.000000000 +0100 -+++ work/kernel/nvidia-modeset/nvidia-modeset-linux.c 2016-02-10 12:08:02.275059160 +0100 -@@ -320,49 +320,48 @@ static void nvkms_resume(NvU32 gpuId) - * so we can use a single nvidia_modeset_stack_ptr for calling RM. - *************************************************************************/ - --static nvidia_modeset_rm_ops_t __rm_ops = { 0 }; -+static const nvidia_modeset_rm_ops_t *__rm_ops; - static nvidia_modeset_stack_ptr nvkms_nvidia_stack = NULL; - static nvidia_modeset_callbacks_t nvkms_rm_callbacks = { -- nvkms_suspend, -- nvkms_resume -+ .suspend = nvkms_suspend, -+ .resume = nvkms_resume - }; - - static int nvkms_alloc_rm(void) - { - NV_STATUS nvstatus; - int ret; -+ const char *version_string = NV_VERSION_STRING; - -- __rm_ops.version_string = NV_VERSION_STRING; -- -- nvstatus = nvidia_get_rm_ops(&__rm_ops); -+ nvstatus = nvidia_get_rm_ops(&__rm_ops, &version_string); - - if (nvstatus != NV_OK) { - printk(KERN_ERR NVKMS_LOG_PREFIX "Version mismatch: " - "nvidia.ko(%s) nvidia-modeset.ko(%s)\n", -- __rm_ops.version_string, NV_VERSION_STRING); -+ version_string, NV_VERSION_STRING); - return -EINVAL; - } - -- ret = __rm_ops.set_callbacks(&nvkms_rm_callbacks); -+ ret = __rm_ops->set_callbacks(&nvkms_rm_callbacks); - if (ret < 0) { - printk(KERN_ERR NVKMS_LOG_PREFIX "Failed to register callbacks\n"); - return ret; - } - -- return __rm_ops.alloc_stack(&nvkms_nvidia_stack); -+ return __rm_ops->alloc_stack(&nvkms_nvidia_stack); - } - - static void nvkms_free_rm(void) - { -- __rm_ops.set_callbacks(NULL); -- if (__rm_ops.free_stack != NULL) { -- __rm_ops.free_stack(nvkms_nvidia_stack); -+ __rm_ops->set_callbacks(NULL); -+ if (__rm_ops->free_stack != NULL) { -+ __rm_ops->free_stack(nvkms_nvidia_stack); - } - } - - void NVKMS_API_CALL nvkms_call_rm(void *ops) - { -- __rm_ops.op(nvkms_nvidia_stack, ops); -+ __rm_ops->op(nvkms_nvidia_stack, ops); - } - - /************************************************************************* -@@ -681,17 +680,17 @@ done: - - NvBool NVKMS_API_CALL nvkms_open_gpu(NvU32 gpuId) - { -- return __rm_ops.open_gpu(gpuId, nvkms_nvidia_stack) == 0; -+ return __rm_ops->open_gpu(gpuId, nvkms_nvidia_stack) == 0; - } - - void NVKMS_API_CALL nvkms_close_gpu(NvU32 gpuId) - { -- __rm_ops.close_gpu(gpuId, nvkms_nvidia_stack); -+ __rm_ops->close_gpu(gpuId, nvkms_nvidia_stack); - } - - NvBool NVKMS_API_CALL nvkms_list_gpus(NvU32 *gpu_ids, NvU32 *gpu_count) - { -- return __rm_ops.get_gpuid_list(gpu_ids, gpu_count); -+ return __rm_ops->get_gpuid_list(gpu_ids, gpu_count); - } - - /************************************************************************* -diff -urp work.orig/kernel/nvidia-uvm/uvm8_channel.c work/kernel/nvidia-uvm/uvm8_channel.c ---- work.orig/kernel/nvidia-uvm/uvm8_channel.c 2016-02-03 23:32:32.000000000 +0100 -+++ work/kernel/nvidia-uvm/uvm8_channel.c 2016-02-10 11:39:16.735603941 +0100 -@@ -268,7 +268,7 @@ void uvm_channel_end_push(uvm_push_t *pu - mb(); - - channel->cpu_put = new_cpu_put; -- ACCESS_ONCE(*channel->channel_info.GPPut) = new_cpu_put; -+ ACCESS_ONCE_RW(*channel->channel_info.GPPut) = new_cpu_put; - - uvm_spin_unlock(&channel->pool->lock); - -diff -urp work.orig/kernel/nvidia-uvm/uvm8_global.c work/kernel/nvidia-uvm/uvm8_global.c ---- work.orig/kernel/nvidia-uvm/uvm8_global.c 2016-02-03 23:32:32.000000000 +0100 -+++ work/kernel/nvidia-uvm/uvm8_global.c 2016-02-10 11:28:23.142115625 +0100 -@@ -32,16 +32,16 @@ - #include "nv_uvm_interface.h" - - uvm_global_t g_uvm_global; --static struct UvmOpsUvmEvents g_exported_uvm8_ops; -+static struct UvmOpsUvmEvents g_exported_uvm8_ops = { -+ .startDevice = NULL, -+ .stopDevice = NULL, -+ .isrTopHalf = uvm8_isr_top_half, -+}; - - static NV_STATUS uvm8_register_callbacks(void) - { - NV_STATUS status = NV_OK; - -- g_exported_uvm8_ops.startDevice = NULL; -- g_exported_uvm8_ops.stopDevice = NULL; -- g_exported_uvm8_ops.isrTopHalf = uvm8_isr_top_half; -- - // Register the UVM callbacks with the main GPU driver: - status = uvm_rm_locked_call(nvUvmInterfaceRegisterUvmCallbacks(&g_exported_uvm8_ops)); - return status; -diff -urp work.orig/kernel/nvidia-uvm/uvm8_gpu_semaphore.c work/kernel/nvidia-uvm/uvm8_gpu_semaphore.c ---- work.orig/kernel/nvidia-uvm/uvm8_gpu_semaphore.c 2016-02-03 23:32:32.000000000 +0100 -+++ work/kernel/nvidia-uvm/uvm8_gpu_semaphore.c 2016-02-10 11:38:57.478030852 +0100 -@@ -288,7 +288,7 @@ NvU64 uvm_gpu_semaphore_get_gpu_va(uvm_g - - NvU32 uvm_gpu_semaphore_get_payload(uvm_gpu_semaphore_t *semaphore) - { -- return ACCESS_ONCE(*semaphore->payload); -+ return ACCESS_ONCE_RW(*semaphore->payload); - } - - void uvm_gpu_semaphore_set_payload(uvm_gpu_semaphore_t *semaphore, NvU32 payload) -@@ -304,7 +304,7 @@ void uvm_gpu_semaphore_set_payload(uvm_g - // being optimized out on non-SMP configs (we need them for interacting with - // the GPU correctly even on non-SMP). - mb(); -- ACCESS_ONCE(*semaphore->payload) = payload; -+ ACCESS_ONCE_RW(*semaphore->payload) = payload; - } - - NV_STATUS uvm_gpu_tracking_semaphore_alloc(uvm_gpu_semaphore_pool_t *pool, uvm_gpu_tracking_semaphore_t *tracking_sem) -diff -urp work.orig/kernel/nvidia-uvm/uvm8_hal.c work/kernel/nvidia-uvm/uvm8_hal.c ---- work.orig/kernel/nvidia-uvm/uvm8_hal.c 2016-02-03 23:32:32.000000000 +0100 -+++ work/kernel/nvidia-uvm/uvm8_hal.c 2016-02-10 11:47:13.377356162 +0100 -@@ -58,7 +58,7 @@ typedef struct - // arch_ops: id is an architecture - uvm_arch_hal_t arch_ops; - } u; --} uvm_hal_class_ops_t; -+} __do_const uvm_hal_class_ops_t; - - // Table for copy engine functions. - // Each entry is associated with a copy engine class through the 'class' field. -diff -urp work.orig/kernel/nvidia-uvm/uvm8_mmu.h work/kernel/nvidia-uvm/uvm8_mmu.h ---- work.orig/kernel/nvidia-uvm/uvm8_mmu.h 2016-02-03 23:32:32.000000000 +0100 -+++ work/kernel/nvidia-uvm/uvm8_mmu.h 2016-02-10 12:09:05.463637996 +0100 -@@ -24,7 +24,6 @@ - #ifndef __UVM8_MMU_H__ - #define __UVM8_MMU_H__ - --#include "uvm8_forward_decl.h" - #include "uvm8_pmm_gpu.h" - #include "uvmtypes.h" - #include "uvm_common.h" -diff -urp work.orig/kernel/nvidia-uvm/uvm_common.c work/kernel/nvidia-uvm/uvm_common.c ---- work.orig/kernel/nvidia-uvm/uvm_common.c 2016-02-03 23:32:32.000000000 +0100 -+++ work/kernel/nvidia-uvm/uvm_common.c 2016-02-10 11:45:58.008501609 +0100 -@@ -74,7 +74,6 @@ static int uvmnext_activated(void) - #endif - - static dev_t g_uvmBaseDev; --struct UvmOpsUvmEvents g_exportedUvmOps; - - static char* uvm_driver_mode = "lite"; - -@@ -198,12 +197,17 @@ static NV_STATUS uvmSetupGpuProvider(voi - { - NV_STATUS status = NV_OK; - -- g_exportedUvmOps.startDevice = uvm_gpu_event_start_device; -- g_exportedUvmOps.stopDevice = uvm_gpu_event_stop_device; -+ static struct UvmOpsUvmEvents g_exportedUvmOps = { -+ .startDevice = uvm_gpu_event_start_device, -+ .stopDevice = uvm_gpu_event_stop_device, -+ }; -+ -+ pax_open_kernel(); - if (uvmnext_activated()) -- g_exportedUvmOps.isrTopHalf = uvmnext_isr_top_half; -+ *(void **)&g_exportedUvmOps.isrTopHalf = uvmnext_isr_top_half; - else if (uvmfull_activated()) -- g_exportedUvmOps.isrTopHalf = uvmfull_isr_top_half; -+ *(void **)&g_exportedUvmOps.isrTopHalf = uvmfull_isr_top_half; -+ pax_close_kernel(); - - // call RM to exchange the function pointers. - status = nvUvmInterfaceRegisterUvmCallbacks(&g_exportedUvmOps); -diff -urp work.orig/kernel/nvidia-uvm/uvm_full_fault_buffer.h work/kernel/nvidia-uvm/uvm_full_fault_buffer.h ---- work.orig/kernel/nvidia-uvm/uvm_full_fault_buffer.h 2016-02-03 23:32:32.000000000 +0100 -+++ work/kernel/nvidia-uvm/uvm_full_fault_buffer.h 2016-02-10 11:26:28.143422741 +0100 -@@ -31,6 +31,7 @@ - #define _UVM_FULL_FAULT_BUFFER_H_ - - #include "uvmtypes.h" -+#include "linux/compiler.h" - - #define MAXWELL_FAULT_BUFFER_A (0xb069) - #define MEM_RD32(a) (*(const volatile NvU32 *)(a)) -@@ -303,7 +304,7 @@ typedef struct - NvUvmControlPrefetch_t controlPrefetch; - NvUvmTestFaultBufferOverflow_t testFaultBufferOverflow; - NvUvmClearFaultBufferOverflow_t clearFaultBufferOverflow; --} UvmFaultBufferOps; -+} __no_const UvmFaultBufferOps; - - /****************************************************************************** - uvmfull_fault_buffer_init diff --git a/x11-drivers/nvidia-drivers/files/nvidia-drivers-364.12-pax.patch b/x11-drivers/nvidia-drivers/files/nvidia-drivers-364.12-pax.patch deleted file mode 100644 index 18c316282bc7..000000000000 --- a/x11-drivers/nvidia-drivers/files/nvidia-drivers-364.12-pax.patch +++ /dev/null @@ -1,398 +0,0 @@ -diff -urp work.orig/kernel/common/inc/nv-linux.h work/kernel/common/inc/nv-linux.h ---- work.orig/kernel/common/inc/nv-linux.h 2016-03-17 03:58:29.000000000 +0100 -+++ work/kernel/common/inc/nv-linux.h 2016-03-22 13:51:58.637292065 +0100 -@@ -1307,6 +1307,9 @@ extern void *nvidia_stack_t_cache; - #define NV_KMEM_CACHE_CREATE(name, type) \ - NV_KMEM_CACHE_CREATE_FULL(name, sizeof(type), 0, 0, NULL) - -+#define NV_KMEM_CACHE_CREATE_USERCOPY(name, type) \ -+ NV_KMEM_CACHE_CREATE_FULL(name, sizeof(type), 0, SLAB_USERCOPY, NULL) -+ - #define NV_KMEM_CACHE_DESTROY(kmem_cache) \ - kmem_cache_destroy(kmem_cache) - -diff -urp work.orig/kernel/common/inc/nv-modeset-interface.h work/kernel/common/inc/nv-modeset-interface.h ---- work.orig/kernel/common/inc/nv-modeset-interface.h 2016-03-17 03:58:29.000000000 +0100 -+++ work/kernel/common/inc/nv-modeset-interface.h 2016-03-22 13:51:58.637292065 +0100 -@@ -72,7 +72,7 @@ typedef struct { - * mix nvidia and nvidia-modeset kernel modules from different - * releases. - */ -- const char *version_string; -+// const char *version_string; - - /* - * Allocate and free an nvidia_stack_t to pass into -@@ -115,6 +115,6 @@ typedef struct { - - } nvidia_modeset_rm_ops_t; - --NV_STATUS nvidia_get_rm_ops(nvidia_modeset_rm_ops_t *rm_ops); -+NV_STATUS nvidia_get_rm_ops(const nvidia_modeset_rm_ops_t **rm_ops, const char **version_string); - - #endif /* _NV_MODESET_INTERFACE_H_ */ -diff -urp work.orig/kernel/common/inc/nv-register-module.h work/kernel/common/inc/nv-register-module.h ---- work.orig/kernel/common/inc/nv-register-module.h 2016-03-17 03:58:29.000000000 +0100 -+++ work/kernel/common/inc/nv-register-module.h 2016-03-22 13:51:58.637292065 +0100 -@@ -34,7 +34,7 @@ typedef struct nvidia_module_s { - int (*ioctl)(struct inode *, struct file * file, unsigned int cmd, unsigned long arg); - unsigned int (*poll)(struct file * file, poll_table *wait); - --} nvidia_module_t; -+} __do_const nvidia_module_t; - - int nvidia_register_module(nvidia_module_t *); - int nvidia_unregister_module(nvidia_module_t *); -diff -urp work.orig/kernel/nvidia/nv.c work/kernel/nvidia/nv.c ---- work.orig/kernel/nvidia/nv.c 2016-03-17 03:58:29.000000000 +0100 -+++ work/kernel/nvidia/nv.c 2016-03-22 13:51:58.637292065 +0100 -@@ -654,7 +654,7 @@ int __init nvidia_init_module(void) - NV_SPIN_LOCK_INIT(&km_lock); - #endif - -- nvidia_stack_t_cache = NV_KMEM_CACHE_CREATE(nvidia_stack_cache_name, -+ nvidia_stack_t_cache = NV_KMEM_CACHE_CREATE_USERCOPY(nvidia_stack_cache_name, - nvidia_stack_t); - if (nvidia_stack_t_cache == NULL) - { -diff -urp work.orig/kernel/nvidia/nv-chrdev.c work/kernel/nvidia/nv-chrdev.c ---- work.orig/kernel/nvidia/nv-chrdev.c 2016-03-17 03:58:29.000000000 +0100 -+++ work/kernel/nvidia/nv-chrdev.c 2016-03-22 13:51:58.637292065 +0100 -@@ -20,8 +20,6 @@ int nv_register_chrdev(void *param) - { - nvidia_module_t *module = (nvidia_module_t *)param; - -- module->instance = nv_module_instance; -- - return (nvidia_register_module(module)); - } - -diff -urp work.orig/kernel/nvidia/nv-instance.c work/kernel/nvidia/nv-instance.c ---- work.orig/kernel/nvidia/nv-instance.c 2016-03-17 03:58:29.000000000 +0100 -+++ work/kernel/nvidia/nv-instance.c 2016-03-22 13:51:58.637292065 +0100 -@@ -51,6 +51,7 @@ struct pci_driver nv_pci_driver = { - nvidia_module_t nv_fops = { - .owner = THIS_MODULE, - .module_name = MODULE_NAME, -+ .instance = MODULE_INSTANCE_NUMBER, - .open = nvidia_open, - .close = nvidia_close, - .ioctl = nvidia_ioctl, -diff -urp work.orig/kernel/nvidia/nv-mmap.c work/kernel/nvidia/nv-mmap.c ---- work.orig/kernel/nvidia/nv-mmap.c 2016-03-17 03:58:29.000000000 +0100 -+++ work/kernel/nvidia/nv-mmap.c 2016-03-22 13:51:58.637292065 +0100 -@@ -113,12 +113,12 @@ nvidia_vma_release(struct vm_area_struct - } - - #if defined(NV_VM_OPERATIONS_STRUCT_HAS_ACCESS) --static int -+static ssize_t - nvidia_vma_access( - struct vm_area_struct *vma, - unsigned long addr, - void *buffer, -- int length, -+ size_t length, - int write - ) - { -diff -urp work.orig/kernel/nvidia/nv-modeset-interface.c work/kernel/nvidia/nv-modeset-interface.c ---- work.orig/kernel/nvidia/nv-modeset-interface.c 2016-03-17 03:58:29.000000000 +0100 -+++ work/kernel/nvidia/nv-modeset-interface.c 2016-03-22 13:56:37.019870910 +0100 -@@ -100,10 +100,9 @@ static NvU32 nvidia_modeset_enumerate_gp - return count; - } - --NV_STATUS nvidia_get_rm_ops(nvidia_modeset_rm_ops_t *rm_ops) -+NV_STATUS nvidia_get_rm_ops(const nvidia_modeset_rm_ops_t **rm_ops, const char **version_string) - { -- const nvidia_modeset_rm_ops_t local_rm_ops = { -- .version_string = NV_VERSION_STRING, -+ static const nvidia_modeset_rm_ops_t local_rm_ops = { - .alloc_stack = nvidia_modeset_rm_ops_alloc_stack, - .free_stack = nvidia_modeset_rm_ops_free_stack, - .get_gpuid_list = nvidia_get_gpuid_list, -@@ -114,13 +113,13 @@ NV_STATUS nvidia_get_rm_ops(nvidia_modes - .set_callbacks = nvidia_modeset_set_callbacks, - }; - -- if (strcmp(rm_ops->version_string, NV_VERSION_STRING) != 0) -+ if (strcmp(*version_string, NV_VERSION_STRING) != 0) - { -- rm_ops->version_string = NV_VERSION_STRING; -+ *version_string = NV_VERSION_STRING; - return NV_ERR_GENERIC; - } - -- *rm_ops = local_rm_ops; -+ *rm_ops = &local_rm_ops; - - return NV_OK; - } -diff -urp work.orig/kernel/nvidia-drm/nvidia-drm-drv.c work/kernel/nvidia-drm/nvidia-drm-drv.c ---- work.orig/kernel/nvidia-drm/nvidia-drm-drv.c 2016-03-17 03:57:24.000000000 +0100 -+++ work/kernel/nvidia-drm/nvidia-drm-drv.c 2016-03-22 14:23:07.084230003 +0100 -@@ -586,7 +586,7 @@ static const struct drm_ioctl_desc nv_dr - DRM_CONTROL_ALLOW|DRM_RENDER_ALLOW|DRM_UNLOCKED), - }; - --static struct drm_driver nv_drm_driver = { -+static drm_driver_no_const nv_drm_driver __read_only = { - - .driver_features = DRIVER_GEM | DRIVER_PRIME | DRIVER_RENDER, - -@@ -643,6 +643,7 @@ static void nvidia_update_drm_driver_fea - return; - } - -+ pax_open_kernel(); - nv_drm_driver.driver_features |= DRIVER_MODESET | DRIVER_ATOMIC; - - nv_drm_driver.master_set = nvidia_drm_master_set; -@@ -651,6 +652,7 @@ static void nvidia_update_drm_driver_fea - nv_drm_driver.dumb_create = nvidia_drm_dumb_create; - nv_drm_driver.dumb_map_offset = nvidia_drm_dumb_map_offset; - nv_drm_driver.dumb_destroy = drm_gem_dumb_destroy; -+ pax_close_kernel(); - - #endif /* NV_DRM_ATOMIC_MODESET_AVAILABLE */ - } -diff -urp work.orig/kernel/nvidia-modeset/nvidia-modeset-linux.c work/kernel/nvidia-modeset/nvidia-modeset-linux.c ---- work.orig/kernel/nvidia-modeset/nvidia-modeset-linux.c 2016-03-17 03:57:25.000000000 +0100 -+++ work/kernel/nvidia-modeset/nvidia-modeset-linux.c 2016-03-22 13:55:05.208148788 +0100 -@@ -317,29 +317,28 @@ static void nvkms_resume(NvU32 gpuId) - * Interface with resman. - *************************************************************************/ - --static nvidia_modeset_rm_ops_t __rm_ops = { 0 }; -+static const nvidia_modeset_rm_ops_t *__rm_ops; - static nvidia_modeset_callbacks_t nvkms_rm_callbacks = { -- nvkms_suspend, -- nvkms_resume -+ .suspend = nvkms_suspend, -+ .resume = nvkms_resume - }; - - static int nvkms_alloc_rm(void) - { - NV_STATUS nvstatus; - int ret; -+ const char *version_string = NV_VERSION_STRING; - -- __rm_ops.version_string = NV_VERSION_STRING; -- -- nvstatus = nvidia_get_rm_ops(&__rm_ops); -+ nvstatus = nvidia_get_rm_ops(&__rm_ops, &version_string); - - if (nvstatus != NV_OK) { - printk(KERN_ERR NVKMS_LOG_PREFIX "Version mismatch: " - "nvidia.ko(%s) nvidia-modeset.ko(%s)\n", -- __rm_ops.version_string, NV_VERSION_STRING); -+ version_string, NV_VERSION_STRING); - return -EINVAL; - } - -- ret = __rm_ops.set_callbacks(&nvkms_rm_callbacks); -+ ret = __rm_ops->set_callbacks(&nvkms_rm_callbacks); - if (ret < 0) { - printk(KERN_ERR NVKMS_LOG_PREFIX "Failed to register callbacks\n"); - return ret; -@@ -350,20 +349,20 @@ static int nvkms_alloc_rm(void) - - static void nvkms_free_rm(void) - { -- __rm_ops.set_callbacks(NULL); -+ __rm_ops->set_callbacks(NULL); - } - - void NVKMS_API_CALL nvkms_call_rm(void *ops) - { - nvidia_modeset_stack_ptr stack = NULL; - -- if (__rm_ops.alloc_stack(&stack) != 0) { -+ if (__rm_ops->alloc_stack(&stack) != 0) { - return; - } - -- __rm_ops.op(stack, ops); -+ __rm_ops->op(stack, ops); - -- __rm_ops.free_stack(stack); -+ __rm_ops->free_stack(stack); - } - - /************************************************************************* -@@ -685,13 +684,13 @@ NvBool NVKMS_API_CALL nvkms_open_gpu(NvU - nvidia_modeset_stack_ptr stack = NULL; - NvBool ret; - -- if (__rm_ops.alloc_stack(&stack) != 0) { -+ if (__rm_ops->alloc_stack(&stack) != 0) { - return NV_FALSE; - } - -- ret = __rm_ops.open_gpu(gpuId, stack) == 0; -+ ret = __rm_ops->open_gpu(gpuId, stack) == 0; - -- __rm_ops.free_stack(stack); -+ __rm_ops->free_stack(stack); - - return ret; - } -@@ -700,18 +699,18 @@ void NVKMS_API_CALL nvkms_close_gpu(NvU3 - { - nvidia_modeset_stack_ptr stack = NULL; - -- if (__rm_ops.alloc_stack(&stack) != 0) { -+ if (__rm_ops->alloc_stack(&stack) != 0) { - return; - } - -- __rm_ops.close_gpu(gpuId, stack); -+ __rm_ops->close_gpu(gpuId, stack); - -- __rm_ops.free_stack(stack); -+ __rm_ops->free_stack(stack); - } - - NvU32 NVKMS_API_CALL nvkms_enumerate_gpus(nv_gpu_info_t *gpu_info) - { -- return __rm_ops.enumerate_gpus(gpu_info); -+ return __rm_ops->enumerate_gpus(gpu_info); - } - - /************************************************************************* -diff -urp work.orig/kernel/nvidia-uvm/uvm8_global.c work/kernel/nvidia-uvm/uvm8_global.c ---- work.orig/kernel/nvidia-uvm/uvm8_global.c 2016-03-17 03:59:59.000000000 +0100 -+++ work/kernel/nvidia-uvm/uvm8_global.c 2016-03-22 14:00:03.852089935 +0100 -@@ -33,17 +33,17 @@ - #include "nv_uvm_interface.h" - - uvm_global_t g_uvm_global; --static struct UvmOpsUvmEvents g_exported_uvm8_ops; -+static struct UvmOpsUvmEvents g_exported_uvm8_ops = { -+ .startDevice = NULL, -+ .stopDevice = NULL, -+ .isrTopHalf = uvm8_isr_top_half, -+}; - static bool g_ops_registered = false; - - static NV_STATUS uvm8_register_callbacks(void) - { - NV_STATUS status = NV_OK; - -- g_exported_uvm8_ops.startDevice = NULL; -- g_exported_uvm8_ops.stopDevice = NULL; -- g_exported_uvm8_ops.isrTopHalf = uvm8_isr_top_half; -- - // Register the UVM callbacks with the main GPU driver: - status = uvm_rm_locked_call(nvUvmInterfaceRegisterUvmCallbacks(&g_exported_uvm8_ops)); - if (status != NV_OK) -diff -urp work.orig/kernel/nvidia-uvm/uvm8_gpu_semaphore.c work/kernel/nvidia-uvm/uvm8_gpu_semaphore.c ---- work.orig/kernel/nvidia-uvm/uvm8_gpu_semaphore.c 2016-03-17 03:59:59.000000000 +0100 -+++ work/kernel/nvidia-uvm/uvm8_gpu_semaphore.c 2016-03-22 13:51:58.641294799 +0100 -@@ -285,7 +285,7 @@ NvU64 uvm_gpu_semaphore_get_gpu_va(uvm_g - - NvU32 uvm_gpu_semaphore_get_payload(uvm_gpu_semaphore_t *semaphore) - { -- return ACCESS_ONCE(*semaphore->payload); -+ return ACCESS_ONCE_RW(*semaphore->payload); - } - - void uvm_gpu_semaphore_set_payload(uvm_gpu_semaphore_t *semaphore, NvU32 payload) -@@ -301,7 +301,7 @@ void uvm_gpu_semaphore_set_payload(uvm_g - // being optimized out on non-SMP configs (we need them for interacting with - // the GPU correctly even on non-SMP). - mb(); -- ACCESS_ONCE(*semaphore->payload) = payload; -+ ACCESS_ONCE_RW(*semaphore->payload) = payload; - } - - NV_STATUS uvm_gpu_tracking_semaphore_alloc(uvm_gpu_semaphore_pool_t *pool, uvm_gpu_tracking_semaphore_t *tracking_sem) -diff -urp work.orig/kernel/nvidia-uvm/uvm8_hal.h work/kernel/nvidia-uvm/uvm8_hal.h ---- work.orig/kernel/nvidia-uvm/uvm8_hal.h 2016-03-17 03:59:59.000000000 +0100 -+++ work/kernel/nvidia-uvm/uvm8_hal.h 2016-03-22 13:55:38.620347598 +0100 -@@ -293,7 +293,7 @@ typedef struct - // fault_buffer_ops: id is a hardware class - uvm_fault_buffer_hal_t fault_buffer_ops; - } u; --} uvm_hal_class_ops_t; -+} __do_const uvm_hal_class_ops_t; - - // When UVM next support is enabled support for future chips in the hal is - // enabled by providing additional hal table entries below. -diff -urp work.orig/kernel/nvidia-uvm/uvm8_mmu.h work/kernel/nvidia-uvm/uvm8_mmu.h ---- work.orig/kernel/nvidia-uvm/uvm8_mmu.h 2016-03-17 03:59:59.000000000 +0100 -+++ work/kernel/nvidia-uvm/uvm8_mmu.h 2016-03-22 13:57:44.255581049 +0100 -@@ -24,7 +24,6 @@ - #ifndef __UVM8_MMU_H__ - #define __UVM8_MMU_H__ - --#include "uvm8_forward_decl.h" - #include "uvm8_hal_types.h" - #include "uvm8_pmm_gpu.h" - #include "uvmtypes.h" -diff -urp work.orig/kernel/nvidia-uvm/uvm_common.c work/kernel/nvidia-uvm/uvm_common.c ---- work.orig/kernel/nvidia-uvm/uvm_common.c 2016-03-17 03:59:59.000000000 +0100 -+++ work/kernel/nvidia-uvm/uvm_common.c 2016-03-22 13:59:20.045675359 +0100 -@@ -54,7 +54,6 @@ - #include "uvm8_forward_decl.h" - - static dev_t g_uvmBaseDev; --struct UvmOpsUvmEvents g_exportedUvmOps; - - static char* uvm_driver_mode = "lite"; - -@@ -171,10 +170,16 @@ static NV_STATUS uvmSetupGpuProvider(voi - { - NV_STATUS status = NV_OK; - -- g_exportedUvmOps.startDevice = uvm_gpu_event_start_device; -- g_exportedUvmOps.stopDevice = uvm_gpu_event_stop_device; -- if (uvmfull_activated()) -- g_exportedUvmOps.isrTopHalf = uvmfull_isr_top_half; -+ static struct UvmOpsUvmEvents g_exportedUvmOps = { -+ .startDevice = uvm_gpu_event_start_device, -+ .stopDevice = uvm_gpu_event_stop_device, -+ }; -+ -+ if (uvmfull_activated()) { -+ pax_open_kernel(); -+ *(void **)&g_exportedUvmOps.isrTopHalf = uvmfull_isr_top_half; -+ pax_close_kernel(); -+ } - - // call RM to exchange the function pointers. - status = nvUvmInterfaceRegisterUvmCallbacks(&g_exportedUvmOps); -diff -urp work.orig/kernel/nvidia-uvm/uvm_full_fault_buffer.h work/kernel/nvidia-uvm/uvm_full_fault_buffer.h ---- work.orig/kernel/nvidia-uvm/uvm_full_fault_buffer.h 2016-03-17 03:59:59.000000000 +0100 -+++ work/kernel/nvidia-uvm/uvm_full_fault_buffer.h 2016-03-22 13:51:58.645297533 +0100 -@@ -31,6 +31,7 @@ - #define _UVM_FULL_FAULT_BUFFER_H_ - - #include "uvmtypes.h" -+#include "linux/compiler.h" - - #define MAXWELL_FAULT_BUFFER_A (0xb069) - #define MEM_RD32(a) (*(const volatile NvU32 *)(a)) -@@ -303,7 +304,7 @@ typedef struct - NvUvmControlPrefetch_t controlPrefetch; - NvUvmTestFaultBufferOverflow_t testFaultBufferOverflow; - NvUvmClearFaultBufferOverflow_t clearFaultBufferOverflow; --} UvmFaultBufferOps; -+} __no_const UvmFaultBufferOps; - - /****************************************************************************** - uvmfull_fault_buffer_init -diff -urp work.orig/kernel/nvidia-uvm/uvm_linux.h work/kernel/nvidia-uvm/uvm_linux.h ---- work.orig/kernel/nvidia-uvm/uvm_linux.h 2016-03-17 03:59:59.000000000 +0100 -+++ work/kernel/nvidia-uvm/uvm_linux.h 2016-03-22 14:09:14.810534336 +0100 -@@ -485,7 +485,7 @@ static inline NvU64 NV_GETTIME(void) - - // WRITE_ONCE/READ_ONCE have incompatible definitions across versions, which produces warnings. - // Therefore, we define our own macros --#define UVM_WRITE_ONCE(x, val) (ACCESS_ONCE(x) = (val)) -+#define UVM_WRITE_ONCE(x, val) (ACCESS_ONCE_RW(x) = (val)) - #define UVM_READ_ONCE(x) ACCESS_ONCE(x) - - // Added in 3.11 diff --git a/x11-drivers/nvidia-drivers/files/nvidia-drivers-367.35-pax.patch b/x11-drivers/nvidia-drivers/files/nvidia-drivers-367.35-pax.patch deleted file mode 100644 index b615064ddc42..000000000000 --- a/x11-drivers/nvidia-drivers/files/nvidia-drivers-367.35-pax.patch +++ /dev/null @@ -1,404 +0,0 @@ -diff -urp work.orig/kernel/common/inc/nv-linux.h work/kernel/common/inc/nv-linux.h ---- work.orig/kernel/common/inc/nv-linux.h 2016-07-12 06:52:21.000000000 +0200 -+++ work/kernel/common/inc/nv-linux.h 2016-07-16 22:45:59.870806346 +0200 -@@ -1308,6 +1308,9 @@ extern void *nvidia_stack_t_cache; - #define NV_KMEM_CACHE_CREATE(name, type) \ - NV_KMEM_CACHE_CREATE_FULL(name, sizeof(type), 0, 0, NULL) - -+#define NV_KMEM_CACHE_CREATE_USERCOPY(name, type) \ -+ NV_KMEM_CACHE_CREATE_FULL(name, sizeof(type), 0, SLAB_USERCOPY, NULL) -+ - #define NV_KMEM_CACHE_DESTROY(kmem_cache) \ - kmem_cache_destroy(kmem_cache) - -diff -urp work.orig/kernel/common/inc/nv-modeset-interface.h work/kernel/common/inc/nv-modeset-interface.h ---- work.orig/kernel/common/inc/nv-modeset-interface.h 2016-07-12 06:52:21.000000000 +0200 -+++ work/kernel/common/inc/nv-modeset-interface.h 2016-07-16 22:46:16.223400774 +0200 -@@ -72,7 +72,7 @@ typedef struct { - * mix nvidia and nvidia-modeset kernel modules from different - * releases. - */ -- const char *version_string; -+// const char *version_string; - - /* - * Return system information. -@@ -117,6 +117,6 @@ typedef struct { - - } nvidia_modeset_rm_ops_t; - --NV_STATUS nvidia_get_rm_ops(nvidia_modeset_rm_ops_t *rm_ops); -+NV_STATUS nvidia_get_rm_ops(const nvidia_modeset_rm_ops_t **rm_ops, const char **version_string); - - #endif /* _NV_MODESET_INTERFACE_H_ */ -diff -urp work.orig/kernel/common/inc/nv-register-module.h work/kernel/common/inc/nv-register-module.h ---- work.orig/kernel/common/inc/nv-register-module.h 2016-07-12 06:52:21.000000000 +0200 -+++ work/kernel/common/inc/nv-register-module.h 2016-07-16 22:45:59.870806346 +0200 -@@ -34,7 +34,7 @@ typedef struct nvidia_module_s { - int (*ioctl)(struct inode *, struct file * file, unsigned int cmd, unsigned long arg); - unsigned int (*poll)(struct file * file, poll_table *wait); - --} nvidia_module_t; -+} __do_const nvidia_module_t; - - int nvidia_register_module(nvidia_module_t *); - int nvidia_unregister_module(nvidia_module_t *); -diff -urp work.orig/kernel/nvidia/nv.c work/kernel/nvidia/nv.c ---- work.orig/kernel/nvidia/nv.c 2016-07-12 06:52:21.000000000 +0200 -+++ work/kernel/nvidia/nv.c 2016-07-16 22:45:59.874809435 +0200 -@@ -654,7 +654,7 @@ int __init nvidia_init_module(void) - NV_SPIN_LOCK_INIT(&km_lock); - #endif - -- nvidia_stack_t_cache = NV_KMEM_CACHE_CREATE(nvidia_stack_cache_name, -+ nvidia_stack_t_cache = NV_KMEM_CACHE_CREATE_USERCOPY(nvidia_stack_cache_name, - nvidia_stack_t); - if (nvidia_stack_t_cache == NULL) - { -diff -urp work.orig/kernel/nvidia/nv-chrdev.c work/kernel/nvidia/nv-chrdev.c ---- work.orig/kernel/nvidia/nv-chrdev.c 2016-07-12 06:52:21.000000000 +0200 -+++ work/kernel/nvidia/nv-chrdev.c 2016-07-16 22:45:59.874809435 +0200 -@@ -20,8 +20,6 @@ int nv_register_chrdev(void *param) - { - nvidia_module_t *module = (nvidia_module_t *)param; - -- module->instance = nv_module_instance; -- - return (nvidia_register_module(module)); - } - -diff -urp work.orig/kernel/nvidia/nv-instance.c work/kernel/nvidia/nv-instance.c ---- work.orig/kernel/nvidia/nv-instance.c 2016-07-12 06:52:21.000000000 +0200 -+++ work/kernel/nvidia/nv-instance.c 2016-07-16 22:45:59.874809435 +0200 -@@ -51,6 +51,7 @@ struct pci_driver nv_pci_driver = { - nvidia_module_t nv_fops = { - .owner = THIS_MODULE, - .module_name = MODULE_NAME, -+ .instance = MODULE_INSTANCE_NUMBER, - .open = nvidia_open, - .close = nvidia_close, - .ioctl = nvidia_ioctl, -diff -urp work.orig/kernel/nvidia/nv-mmap.c work/kernel/nvidia/nv-mmap.c ---- work.orig/kernel/nvidia/nv-mmap.c 2016-07-12 06:52:21.000000000 +0200 -+++ work/kernel/nvidia/nv-mmap.c 2016-07-16 22:45:59.874809435 +0200 -@@ -113,12 +113,12 @@ nvidia_vma_release(struct vm_area_struct - } - - #if defined(NV_VM_OPERATIONS_STRUCT_HAS_ACCESS) --static int -+static ssize_t - nvidia_vma_access( - struct vm_area_struct *vma, - unsigned long addr, - void *buffer, -- int length, -+ size_t length, - int write - ) - { -diff -urp work.orig/kernel/nvidia/nv-modeset-interface.c work/kernel/nvidia/nv-modeset-interface.c ---- work.orig/kernel/nvidia/nv-modeset-interface.c 2016-07-12 06:52:21.000000000 +0200 -+++ work/kernel/nvidia/nv-modeset-interface.c 2016-07-16 22:54:36.567962197 +0200 -@@ -100,10 +100,9 @@ static NvU32 nvidia_modeset_enumerate_gp - return count; - } - --NV_STATUS nvidia_get_rm_ops(nvidia_modeset_rm_ops_t *rm_ops) -+NV_STATUS nvidia_get_rm_ops(const nvidia_modeset_rm_ops_t **rm_ops, const char **version_string) - { -- const nvidia_modeset_rm_ops_t local_rm_ops = { -- .version_string = NV_VERSION_STRING, -+ static const nvidia_modeset_rm_ops_t local_rm_ops = { - .system_info = { - .allow_write_combining = NV_FALSE, - }, -@@ -116,17 +115,26 @@ NV_STATUS nvidia_get_rm_ops(nvidia_modes - .set_callbacks = nvidia_modeset_set_callbacks, - }; - -- if (strcmp(rm_ops->version_string, NV_VERSION_STRING) != 0) -+ static const nvidia_modeset_rm_ops_t local_rm_ops_wc = { -+ .system_info = { -+ .allow_write_combining = NV_TRUE, -+ }, -+ .alloc_stack = nvidia_modeset_rm_ops_alloc_stack, -+ .free_stack = nvidia_modeset_rm_ops_free_stack, -+ .enumerate_gpus = nvidia_modeset_enumerate_gpus, -+ .open_gpu = nvidia_dev_get, -+ .close_gpu = nvidia_dev_put, -+ .op = rm_kernel_rmapi_op, /* provided by nv-kernel.o */ -+ .set_callbacks = nvidia_modeset_set_callbacks, -+ }; -+ -+ if (strcmp(*version_string, NV_VERSION_STRING) != 0) - { -- rm_ops->version_string = NV_VERSION_STRING; -+ *version_string = NV_VERSION_STRING; - return NV_ERR_GENERIC; - } - -- *rm_ops = local_rm_ops; -- -- if (NV_ALLOW_WRITE_COMBINING(NV_MEMORY_TYPE_FRAMEBUFFER)) { -- rm_ops->system_info.allow_write_combining = NV_TRUE; -- } -+ *rm_ops = NV_ALLOW_WRITE_COMBINING(NV_MEMORY_TYPE_FRAMEBUFFER) ? &local_rm_ops_wc : &local_rm_ops; - - return NV_OK; - } -diff -urp work.orig/kernel/nvidia-drm/nvidia-drm-drv.c work/kernel/nvidia-drm/nvidia-drm-drv.c ---- work.orig/kernel/nvidia-drm/nvidia-drm-drv.c 2016-07-12 06:53:45.000000000 +0200 -+++ work/kernel/nvidia-drm/nvidia-drm-drv.c 2016-07-16 22:45:59.878812524 +0200 -@@ -592,7 +592,7 @@ static const struct drm_ioctl_desc nv_dr - DRM_CONTROL_ALLOW|DRM_RENDER_ALLOW|DRM_UNLOCKED), - }; - --static struct drm_driver nv_drm_driver = { -+static drm_driver_no_const nv_drm_driver __read_only = { - - .driver_features = DRIVER_GEM | DRIVER_PRIME | DRIVER_RENDER, - -@@ -649,6 +649,7 @@ static void nvidia_update_drm_driver_fea - return; - } - -+ pax_open_kernel(); - nv_drm_driver.driver_features |= DRIVER_MODESET | DRIVER_ATOMIC; - - nv_drm_driver.master_set = nvidia_drm_master_set; -@@ -657,6 +658,7 @@ static void nvidia_update_drm_driver_fea - nv_drm_driver.dumb_create = nvidia_drm_dumb_create; - nv_drm_driver.dumb_map_offset = nvidia_drm_dumb_map_offset; - nv_drm_driver.dumb_destroy = drm_gem_dumb_destroy; -+ pax_close_kernel(); - - #endif /* NV_DRM_ATOMIC_MODESET_AVAILABLE */ - } -diff -urp work.orig/kernel/nvidia-modeset/nvidia-modeset-linux.c work/kernel/nvidia-modeset/nvidia-modeset-linux.c ---- work.orig/kernel/nvidia-modeset/nvidia-modeset-linux.c 2016-07-12 06:53:46.000000000 +0200 -+++ work/kernel/nvidia-modeset/nvidia-modeset-linux.c 2016-07-16 22:47:09.334133112 +0200 -@@ -317,29 +317,28 @@ static void nvkms_resume(NvU32 gpuId) - * Interface with resman. - *************************************************************************/ - --static nvidia_modeset_rm_ops_t __rm_ops = { 0 }; -+static const nvidia_modeset_rm_ops_t *__rm_ops; - static nvidia_modeset_callbacks_t nvkms_rm_callbacks = { -- nvkms_suspend, -- nvkms_resume -+ .suspend = nvkms_suspend, -+ .resume = nvkms_resume - }; - - static int nvkms_alloc_rm(void) - { - NV_STATUS nvstatus; - int ret; -+ const char *version_string = NV_VERSION_STRING; - -- __rm_ops.version_string = NV_VERSION_STRING; -- -- nvstatus = nvidia_get_rm_ops(&__rm_ops); -+ nvstatus = nvidia_get_rm_ops(&__rm_ops, &version_string); - - if (nvstatus != NV_OK) { - printk(KERN_ERR NVKMS_LOG_PREFIX "Version mismatch: " - "nvidia.ko(%s) nvidia-modeset.ko(%s)\n", -- __rm_ops.version_string, NV_VERSION_STRING); -+ version_string, NV_VERSION_STRING); - return -EINVAL; - } - -- ret = __rm_ops.set_callbacks(&nvkms_rm_callbacks); -+ ret = __rm_ops->set_callbacks(&nvkms_rm_callbacks); - if (ret < 0) { - printk(KERN_ERR NVKMS_LOG_PREFIX "Failed to register callbacks\n"); - return ret; -@@ -350,20 +349,20 @@ static int nvkms_alloc_rm(void) - - static void nvkms_free_rm(void) - { -- __rm_ops.set_callbacks(NULL); -+ __rm_ops->set_callbacks(NULL); - } - - void NVKMS_API_CALL nvkms_call_rm(void *ops) - { - nvidia_modeset_stack_ptr stack = NULL; - -- if (__rm_ops.alloc_stack(&stack) != 0) { -+ if (__rm_ops->alloc_stack(&stack) != 0) { - return; - } - -- __rm_ops.op(stack, ops); -+ __rm_ops->op(stack, ops); - -- __rm_ops.free_stack(stack); -+ __rm_ops->free_stack(stack); - } - - /************************************************************************* -@@ -685,13 +684,13 @@ NvBool NVKMS_API_CALL nvkms_open_gpu(NvU - nvidia_modeset_stack_ptr stack = NULL; - NvBool ret; - -- if (__rm_ops.alloc_stack(&stack) != 0) { -+ if (__rm_ops->alloc_stack(&stack) != 0) { - return NV_FALSE; - } - -- ret = __rm_ops.open_gpu(gpuId, stack) == 0; -+ ret = __rm_ops->open_gpu(gpuId, stack) == 0; - -- __rm_ops.free_stack(stack); -+ __rm_ops->free_stack(stack); - - return ret; - } -@@ -700,23 +699,23 @@ void NVKMS_API_CALL nvkms_close_gpu(NvU3 - { - nvidia_modeset_stack_ptr stack = NULL; - -- if (__rm_ops.alloc_stack(&stack) != 0) { -+ if (__rm_ops->alloc_stack(&stack) != 0) { - return; - } - -- __rm_ops.close_gpu(gpuId, stack); -+ __rm_ops->close_gpu(gpuId, stack); - -- __rm_ops.free_stack(stack); -+ __rm_ops->free_stack(stack); - } - - NvU32 NVKMS_API_CALL nvkms_enumerate_gpus(nv_gpu_info_t *gpu_info) - { -- return __rm_ops.enumerate_gpus(gpu_info); -+ return __rm_ops->enumerate_gpus(gpu_info); - } - - NvBool NVKMS_API_CALL nvkms_allow_write_combining(void) - { -- return __rm_ops.system_info.allow_write_combining; -+ return __rm_ops->system_info.allow_write_combining; - } - - /************************************************************************* -diff -urp work.orig/kernel/nvidia-uvm/uvm8_global.c work/kernel/nvidia-uvm/uvm8_global.c ---- work.orig/kernel/nvidia-uvm/uvm8_global.c 2016-07-12 06:52:17.000000000 +0200 -+++ work/kernel/nvidia-uvm/uvm8_global.c 2016-07-16 22:45:59.878812524 +0200 -@@ -35,17 +35,17 @@ - #include "nv_uvm_interface.h" - - uvm_global_t g_uvm_global; --static struct UvmOpsUvmEvents g_exported_uvm8_ops; -+static struct UvmOpsUvmEvents g_exported_uvm8_ops = { -+ .startDevice = NULL, -+ .stopDevice = NULL, -+ .isrTopHalf = uvm8_isr_top_half, -+}; - static bool g_ops_registered = false; - - static NV_STATUS uvm8_register_callbacks(void) - { - NV_STATUS status = NV_OK; - -- g_exported_uvm8_ops.startDevice = NULL; -- g_exported_uvm8_ops.stopDevice = NULL; -- g_exported_uvm8_ops.isrTopHalf = uvm8_isr_top_half; -- - // Register the UVM callbacks with the main GPU driver: - status = uvm_rm_locked_call(nvUvmInterfaceRegisterUvmCallbacks(&g_exported_uvm8_ops)); - if (status != NV_OK) -diff -urp work.orig/kernel/nvidia-uvm/uvm8_gpu_semaphore.c work/kernel/nvidia-uvm/uvm8_gpu_semaphore.c ---- work.orig/kernel/nvidia-uvm/uvm8_gpu_semaphore.c 2016-07-12 06:52:17.000000000 +0200 -+++ work/kernel/nvidia-uvm/uvm8_gpu_semaphore.c 2016-07-16 22:45:59.878812524 +0200 -@@ -368,7 +368,7 @@ void uvm_gpu_semaphore_set_payload(uvm_g - // being optimized out on non-SMP configs (we need them for interacting with - // the GPU correctly even on non-SMP). - mb(); -- ACCESS_ONCE(*semaphore->payload) = payload; -+ ACCESS_ONCE_RW(*semaphore->payload) = payload; - } - - // This function is intended to catch channels which have been left dangling in -diff -urp work.orig/kernel/nvidia-uvm/uvm8_hal.h work/kernel/nvidia-uvm/uvm8_hal.h ---- work.orig/kernel/nvidia-uvm/uvm8_hal.h 2016-07-12 06:52:17.000000000 +0200 -+++ work/kernel/nvidia-uvm/uvm8_hal.h 2016-07-16 22:45:59.878812524 +0200 -@@ -310,7 +310,7 @@ typedef struct - // fault_buffer_ops: id is a hardware class - uvm_fault_buffer_hal_t fault_buffer_ops; - } u; --} uvm_hal_class_ops_t; -+} __do_const uvm_hal_class_ops_t; - - // When UVM next support is enabled support for future chips in the hal is - // enabled by providing additional hal table entries below. -diff -urp work.orig/kernel/nvidia-uvm/uvm8_mmu.h work/kernel/nvidia-uvm/uvm8_mmu.h ---- work.orig/kernel/nvidia-uvm/uvm8_mmu.h 2016-07-12 06:52:17.000000000 +0200 -+++ work/kernel/nvidia-uvm/uvm8_mmu.h 2016-07-16 22:45:59.878812524 +0200 -@@ -24,7 +24,6 @@ - #ifndef __UVM8_MMU_H__ - #define __UVM8_MMU_H__ - --#include "uvm8_forward_decl.h" - #include "uvm8_hal_types.h" - #include "uvm8_pmm_gpu.h" - #include "uvmtypes.h" -diff -urp work.orig/kernel/nvidia-uvm/uvm_common.c work/kernel/nvidia-uvm/uvm_common.c ---- work.orig/kernel/nvidia-uvm/uvm_common.c 2016-07-12 06:52:17.000000000 +0200 -+++ work/kernel/nvidia-uvm/uvm_common.c 2016-07-16 22:45:59.878812524 +0200 -@@ -51,7 +51,6 @@ - #define UVM_SPIN_LOOP_PRINT_TIMEOUT_SEC 30ULL - - static dev_t g_uvmBaseDev; --struct UvmOpsUvmEvents g_exportedUvmOps; - - static char* uvm_driver_mode = "8"; - -@@ -175,8 +174,10 @@ static NV_STATUS uvmSetupGpuProvider(voi - { - NV_STATUS status = NV_OK; - -- g_exportedUvmOps.startDevice = uvm_gpu_event_start_device; -- g_exportedUvmOps.stopDevice = uvm_gpu_event_stop_device; -+ static struct UvmOpsUvmEvents g_exportedUvmOps = { -+ .startDevice = uvm_gpu_event_start_device, -+ .stopDevice = uvm_gpu_event_stop_device, -+ }; - - // call RM to exchange the function pointers. - status = nvUvmInterfaceRegisterUvmCallbacks(&g_exportedUvmOps); -diff -urp work.orig/kernel/nvidia-uvm/uvm_full_fault_buffer.h work/kernel/nvidia-uvm/uvm_full_fault_buffer.h ---- work.orig/kernel/nvidia-uvm/uvm_full_fault_buffer.h 2016-07-12 06:52:17.000000000 +0200 -+++ work/kernel/nvidia-uvm/uvm_full_fault_buffer.h 2016-07-16 22:45:59.878812524 +0200 -@@ -31,6 +31,7 @@ - #define _UVM_FULL_FAULT_BUFFER_H_ - - #include "uvmtypes.h" -+#include "linux/compiler.h" - - #define MAXWELL_FAULT_BUFFER_A (0xb069) - #define MEM_RD32(a) (*(const volatile NvU32 *)(a)) -@@ -303,7 +304,7 @@ typedef struct - NvUvmControlPrefetch_t controlPrefetch; - NvUvmTestFaultBufferOverflow_t testFaultBufferOverflow; - NvUvmClearFaultBufferOverflow_t clearFaultBufferOverflow; --} UvmFaultBufferOps; -+} __no_const UvmFaultBufferOps; - - /****************************************************************************** - uvmfull_fault_buffer_init -diff -urp work.orig/kernel/nvidia-uvm/uvm_linux.h work/kernel/nvidia-uvm/uvm_linux.h ---- work.orig/kernel/nvidia-uvm/uvm_linux.h 2016-07-12 06:52:17.000000000 +0200 -+++ work/kernel/nvidia-uvm/uvm_linux.h 2016-07-16 22:45:59.882815613 +0200 -@@ -508,7 +508,7 @@ static inline NvU64 NV_GETTIME(void) - - // WRITE_ONCE/READ_ONCE have incompatible definitions across versions, which produces warnings. - // Therefore, we define our own macros --#define UVM_WRITE_ONCE(x, val) (ACCESS_ONCE(x) = (val)) -+#define UVM_WRITE_ONCE(x, val) (ACCESS_ONCE_RW(x) = (val)) - #define UVM_READ_ONCE(x) ACCESS_ONCE(x) - - // Added in 3.11 diff --git a/x11-drivers/nvidia-drivers/files/nvidia-drivers-367.57-pax.patch b/x11-drivers/nvidia-drivers/files/nvidia-drivers-367.57-pax.patch deleted file mode 100644 index bf2013265ad2..000000000000 --- a/x11-drivers/nvidia-drivers/files/nvidia-drivers-367.57-pax.patch +++ /dev/null @@ -1,391 +0,0 @@ -diff -urp work.orig/kernel/common/inc/nv-linux.h work/kernel/common/inc/nv-linux.h ---- work.orig/kernel/common/inc/nv-linux.h 2016-07-12 06:52:21.000000000 +0200 -+++ work/kernel/common/inc/nv-linux.h 2016-07-16 22:45:59.870806346 +0200 -@@ -1308,6 +1308,9 @@ extern void *nvidia_stack_t_cache; - #define NV_KMEM_CACHE_CREATE(name, type) \ - NV_KMEM_CACHE_CREATE_FULL(name, sizeof(type), 0, 0, NULL) - -+#define NV_KMEM_CACHE_CREATE_USERCOPY(name, type) \ -+ NV_KMEM_CACHE_CREATE_FULL(name, sizeof(type), 0, SLAB_USERCOPY, NULL) -+ - #define NV_KMEM_CACHE_DESTROY(kmem_cache) \ - kmem_cache_destroy(kmem_cache) - -diff -urp work.orig/kernel/common/inc/nv-modeset-interface.h work/kernel/common/inc/nv-modeset-interface.h ---- work.orig/kernel/common/inc/nv-modeset-interface.h 2016-07-12 06:52:21.000000000 +0200 -+++ work/kernel/common/inc/nv-modeset-interface.h 2016-07-16 22:46:16.223400774 +0200 -@@ -72,7 +72,7 @@ typedef struct { - * mix nvidia and nvidia-modeset kernel modules from different - * releases. - */ -- const char *version_string; -+// const char *version_string; - - /* - * Return system information. -@@ -117,6 +117,6 @@ typedef struct { - - } nvidia_modeset_rm_ops_t; - --NV_STATUS nvidia_get_rm_ops(nvidia_modeset_rm_ops_t *rm_ops); -+NV_STATUS nvidia_get_rm_ops(const nvidia_modeset_rm_ops_t **rm_ops, const char **version_string); - - #endif /* _NV_MODESET_INTERFACE_H_ */ -diff -urp work.orig/kernel/common/inc/nv-register-module.h work/kernel/common/inc/nv-register-module.h ---- work.orig/kernel/common/inc/nv-register-module.h 2016-07-12 06:52:21.000000000 +0200 -+++ work/kernel/common/inc/nv-register-module.h 2016-07-16 22:45:59.870806346 +0200 -@@ -34,7 +34,7 @@ typedef struct nvidia_module_s { - int (*ioctl)(struct inode *, struct file * file, unsigned int cmd, unsigned long arg); - unsigned int (*poll)(struct file * file, poll_table *wait); - --} nvidia_module_t; -+} __do_const nvidia_module_t; - - int nvidia_register_module(nvidia_module_t *); - int nvidia_unregister_module(nvidia_module_t *); -diff -urp work.orig/kernel/nvidia/nv.c work/kernel/nvidia/nv.c ---- work.orig/kernel/nvidia/nv.c 2016-07-12 06:52:21.000000000 +0200 -+++ work/kernel/nvidia/nv.c 2016-07-16 22:45:59.874809435 +0200 -@@ -654,7 +654,7 @@ int __init nvidia_init_module(void) - NV_SPIN_LOCK_INIT(&km_lock); - #endif - -- nvidia_stack_t_cache = NV_KMEM_CACHE_CREATE(nvidia_stack_cache_name, -+ nvidia_stack_t_cache = NV_KMEM_CACHE_CREATE_USERCOPY(nvidia_stack_cache_name, - nvidia_stack_t); - if (nvidia_stack_t_cache == NULL) - { -diff -urp work.orig/kernel/nvidia/nv-chrdev.c work/kernel/nvidia/nv-chrdev.c ---- work.orig/kernel/nvidia/nv-chrdev.c 2016-07-12 06:52:21.000000000 +0200 -+++ work/kernel/nvidia/nv-chrdev.c 2016-07-16 22:45:59.874809435 +0200 -@@ -20,8 +20,6 @@ int nv_register_chrdev(void *param) - { - nvidia_module_t *module = (nvidia_module_t *)param; - -- module->instance = nv_module_instance; -- - return (nvidia_register_module(module)); - } - -diff -urp work.orig/kernel/nvidia/nv-instance.c work/kernel/nvidia/nv-instance.c ---- work.orig/kernel/nvidia/nv-instance.c 2016-07-12 06:52:21.000000000 +0200 -+++ work/kernel/nvidia/nv-instance.c 2016-07-16 22:45:59.874809435 +0200 -@@ -51,6 +51,7 @@ struct pci_driver nv_pci_driver = { - nvidia_module_t nv_fops = { - .owner = THIS_MODULE, - .module_name = MODULE_NAME, -+ .instance = MODULE_INSTANCE_NUMBER, - .open = nvidia_open, - .close = nvidia_close, - .ioctl = nvidia_ioctl, -diff -urp work.orig/kernel/nvidia/nv-mmap.c work/kernel/nvidia/nv-mmap.c ---- work.orig/kernel/nvidia/nv-mmap.c 2016-07-12 06:52:21.000000000 +0200 -+++ work/kernel/nvidia/nv-mmap.c 2016-07-16 22:45:59.874809435 +0200 -@@ -113,12 +113,12 @@ nvidia_vma_release(struct vm_area_struct - } - - #if defined(NV_VM_OPERATIONS_STRUCT_HAS_ACCESS) --static int -+static ssize_t - nvidia_vma_access( - struct vm_area_struct *vma, - unsigned long addr, - void *buffer, -- int length, -+ size_t length, - int write - ) - { -diff -urp work.orig/kernel/nvidia/nv-modeset-interface.c work/kernel/nvidia/nv-modeset-interface.c ---- work.orig/kernel/nvidia/nv-modeset-interface.c 2016-07-12 06:52:21.000000000 +0200 -+++ work/kernel/nvidia/nv-modeset-interface.c 2016-07-16 22:54:36.567962197 +0200 -@@ -100,10 +100,9 @@ static NvU32 nvidia_modeset_enumerate_gp - return count; - } - --NV_STATUS nvidia_get_rm_ops(nvidia_modeset_rm_ops_t *rm_ops) -+NV_STATUS nvidia_get_rm_ops(const nvidia_modeset_rm_ops_t **rm_ops, const char **version_string) - { -- const nvidia_modeset_rm_ops_t local_rm_ops = { -- .version_string = NV_VERSION_STRING, -+ static const nvidia_modeset_rm_ops_t local_rm_ops = { - .system_info = { - .allow_write_combining = NV_FALSE, - }, -@@ -116,17 +115,26 @@ NV_STATUS nvidia_get_rm_ops(nvidia_modes - .set_callbacks = nvidia_modeset_set_callbacks, - }; - -- if (strcmp(rm_ops->version_string, NV_VERSION_STRING) != 0) -+ static const nvidia_modeset_rm_ops_t local_rm_ops_wc = { -+ .system_info = { -+ .allow_write_combining = NV_TRUE, -+ }, -+ .alloc_stack = nvidia_modeset_rm_ops_alloc_stack, -+ .free_stack = nvidia_modeset_rm_ops_free_stack, -+ .enumerate_gpus = nvidia_modeset_enumerate_gpus, -+ .open_gpu = nvidia_dev_get, -+ .close_gpu = nvidia_dev_put, -+ .op = rm_kernel_rmapi_op, /* provided by nv-kernel.o */ -+ .set_callbacks = nvidia_modeset_set_callbacks, -+ }; -+ -+ if (strcmp(*version_string, NV_VERSION_STRING) != 0) - { -- rm_ops->version_string = NV_VERSION_STRING; -+ *version_string = NV_VERSION_STRING; - return NV_ERR_GENERIC; - } - -- *rm_ops = local_rm_ops; -- -- if (NV_ALLOW_WRITE_COMBINING(NV_MEMORY_TYPE_FRAMEBUFFER)) { -- rm_ops->system_info.allow_write_combining = NV_TRUE; -- } -+ *rm_ops = NV_ALLOW_WRITE_COMBINING(NV_MEMORY_TYPE_FRAMEBUFFER) ? &local_rm_ops_wc : &local_rm_ops; - - return NV_OK; - } -diff -urp work.orig/kernel/nvidia-drm/nvidia-drm-drv.c work/kernel/nvidia-drm/nvidia-drm-drv.c ---- work.orig/kernel/nvidia-drm/nvidia-drm-drv.c 2016-07-12 06:53:45.000000000 +0200 -+++ work/kernel/nvidia-drm/nvidia-drm-drv.c 2016-07-16 22:45:59.878812524 +0200 -@@ -592,7 +592,7 @@ static const struct drm_ioctl_desc nv_dr - DRM_CONTROL_ALLOW|DRM_RENDER_ALLOW|DRM_UNLOCKED), - }; - --static struct drm_driver nv_drm_driver = { -+static drm_driver_no_const nv_drm_driver __read_only = { - - .driver_features = DRIVER_GEM | DRIVER_PRIME | DRIVER_RENDER, - -@@ -649,6 +649,7 @@ static void nvidia_update_drm_driver_fea - return; - } - -+ pax_open_kernel(); - nv_drm_driver.driver_features |= DRIVER_MODESET | DRIVER_ATOMIC; - - nv_drm_driver.master_set = nvidia_drm_master_set; -@@ -657,6 +658,7 @@ static void nvidia_update_drm_driver_fea - nv_drm_driver.dumb_create = nvidia_drm_dumb_create; - nv_drm_driver.dumb_map_offset = nvidia_drm_dumb_map_offset; - nv_drm_driver.dumb_destroy = drm_gem_dumb_destroy; -+ pax_close_kernel(); - - #endif /* NV_DRM_ATOMIC_MODESET_AVAILABLE */ - } -diff -urp work.orig/kernel/nvidia-modeset/nvidia-modeset-linux.c work/kernel/nvidia-modeset/nvidia-modeset-linux.c ---- work.orig/kernel/nvidia-modeset/nvidia-modeset-linux.c 2016-07-12 06:53:46.000000000 +0200 -+++ work/kernel/nvidia-modeset/nvidia-modeset-linux.c 2016-07-16 22:47:09.334133112 +0200 -@@ -317,29 +317,28 @@ static void nvkms_resume(NvU32 gpuId) - * Interface with resman. - *************************************************************************/ - --static nvidia_modeset_rm_ops_t __rm_ops = { 0 }; -+static const nvidia_modeset_rm_ops_t *__rm_ops; - static nvidia_modeset_callbacks_t nvkms_rm_callbacks = { -- nvkms_suspend, -- nvkms_resume -+ .suspend = nvkms_suspend, -+ .resume = nvkms_resume - }; - - static int nvkms_alloc_rm(void) - { - NV_STATUS nvstatus; - int ret; -+ const char *version_string = NV_VERSION_STRING; - -- __rm_ops.version_string = NV_VERSION_STRING; -- -- nvstatus = nvidia_get_rm_ops(&__rm_ops); -+ nvstatus = nvidia_get_rm_ops(&__rm_ops, &version_string); - - if (nvstatus != NV_OK) { - printk(KERN_ERR NVKMS_LOG_PREFIX "Version mismatch: " - "nvidia.ko(%s) nvidia-modeset.ko(%s)\n", -- __rm_ops.version_string, NV_VERSION_STRING); -+ version_string, NV_VERSION_STRING); - return -EINVAL; - } - -- ret = __rm_ops.set_callbacks(&nvkms_rm_callbacks); -+ ret = __rm_ops->set_callbacks(&nvkms_rm_callbacks); - if (ret < 0) { - printk(KERN_ERR NVKMS_LOG_PREFIX "Failed to register callbacks\n"); - return ret; -@@ -350,20 +349,20 @@ static int nvkms_alloc_rm(void) - - static void nvkms_free_rm(void) - { -- __rm_ops.set_callbacks(NULL); -+ __rm_ops->set_callbacks(NULL); - } - - void NVKMS_API_CALL nvkms_call_rm(void *ops) - { - nvidia_modeset_stack_ptr stack = NULL; - -- if (__rm_ops.alloc_stack(&stack) != 0) { -+ if (__rm_ops->alloc_stack(&stack) != 0) { - return; - } - -- __rm_ops.op(stack, ops); -+ __rm_ops->op(stack, ops); - -- __rm_ops.free_stack(stack); -+ __rm_ops->free_stack(stack); - } - - /************************************************************************* -@@ -685,13 +684,13 @@ NvBool NVKMS_API_CALL nvkms_open_gpu(NvU - nvidia_modeset_stack_ptr stack = NULL; - NvBool ret; - -- if (__rm_ops.alloc_stack(&stack) != 0) { -+ if (__rm_ops->alloc_stack(&stack) != 0) { - return NV_FALSE; - } - -- ret = __rm_ops.open_gpu(gpuId, stack) == 0; -+ ret = __rm_ops->open_gpu(gpuId, stack) == 0; - -- __rm_ops.free_stack(stack); -+ __rm_ops->free_stack(stack); - - return ret; - } -@@ -700,23 +699,23 @@ void NVKMS_API_CALL nvkms_close_gpu(NvU3 - { - nvidia_modeset_stack_ptr stack = NULL; - -- if (__rm_ops.alloc_stack(&stack) != 0) { -+ if (__rm_ops->alloc_stack(&stack) != 0) { - return; - } - -- __rm_ops.close_gpu(gpuId, stack); -+ __rm_ops->close_gpu(gpuId, stack); - -- __rm_ops.free_stack(stack); -+ __rm_ops->free_stack(stack); - } - - NvU32 NVKMS_API_CALL nvkms_enumerate_gpus(nv_gpu_info_t *gpu_info) - { -- return __rm_ops.enumerate_gpus(gpu_info); -+ return __rm_ops->enumerate_gpus(gpu_info); - } - - NvBool NVKMS_API_CALL nvkms_allow_write_combining(void) - { -- return __rm_ops.system_info.allow_write_combining; -+ return __rm_ops->system_info.allow_write_combining; - } - - /************************************************************************* -diff -urp work.orig/kernel/nvidia-uvm/uvm8_global.c work/kernel/nvidia-uvm/uvm8_global.c ---- work.orig/kernel/nvidia-uvm/uvm8_global.c 2016-07-12 06:52:17.000000000 +0200 -+++ work/kernel/nvidia-uvm/uvm8_global.c 2016-07-16 22:45:59.878812524 +0200 -@@ -35,17 +35,17 @@ - #include "nv_uvm_interface.h" - - uvm_global_t g_uvm_global; --static struct UvmOpsUvmEvents g_exported_uvm8_ops; -+static struct UvmOpsUvmEvents g_exported_uvm8_ops = { -+ .startDevice = NULL, -+ .stopDevice = NULL, -+ .isrTopHalf = uvm8_isr_top_half, -+}; - static bool g_ops_registered = false; - - static NV_STATUS uvm8_register_callbacks(void) - { - NV_STATUS status = NV_OK; - -- g_exported_uvm8_ops.startDevice = NULL; -- g_exported_uvm8_ops.stopDevice = NULL; -- g_exported_uvm8_ops.isrTopHalf = uvm8_isr_top_half; -- - // Register the UVM callbacks with the main GPU driver: - status = uvm_rm_locked_call(nvUvmInterfaceRegisterUvmCallbacks(&g_exported_uvm8_ops)); - if (status != NV_OK) -diff -urp work.orig/kernel/nvidia-uvm/uvm8_gpu_semaphore.c work/kernel/nvidia-uvm/uvm8_gpu_semaphore.c ---- work.orig/kernel/nvidia-uvm/uvm8_gpu_semaphore.c 2016-07-12 06:52:17.000000000 +0200 -+++ work/kernel/nvidia-uvm/uvm8_gpu_semaphore.c 2016-07-16 22:45:59.878812524 +0200 -@@ -368,7 +368,7 @@ void uvm_gpu_semaphore_set_payload(uvm_g - // being optimized out on non-SMP configs (we need them for interacting with - // the GPU correctly even on non-SMP). - mb(); -- ACCESS_ONCE(*semaphore->payload) = payload; -+ ACCESS_ONCE_RW(*semaphore->payload) = payload; - } - - // This function is intended to catch channels which have been left dangling in -diff -urp work.orig/kernel/nvidia-uvm/uvm8_hal.h work/kernel/nvidia-uvm/uvm8_hal.h ---- work.orig/kernel/nvidia-uvm/uvm8_hal.h 2016-07-12 06:52:17.000000000 +0200 -+++ work/kernel/nvidia-uvm/uvm8_hal.h 2016-07-16 22:45:59.878812524 +0200 -@@ -310,7 +310,7 @@ typedef struct - // fault_buffer_ops: id is a hardware class - uvm_fault_buffer_hal_t fault_buffer_ops; - } u; --} uvm_hal_class_ops_t; -+} __do_const uvm_hal_class_ops_t; - - // When UVM next support is enabled support for future chips in the hal is - // enabled by providing additional hal table entries below. -diff -urp work.orig/kernel/nvidia-uvm/uvm8_mmu.h work/kernel/nvidia-uvm/uvm8_mmu.h ---- work.orig/kernel/nvidia-uvm/uvm8_mmu.h 2016-07-12 06:52:17.000000000 +0200 -+++ work/kernel/nvidia-uvm/uvm8_mmu.h 2016-07-16 22:45:59.878812524 +0200 -@@ -24,7 +24,6 @@ - #ifndef __UVM8_MMU_H__ - #define __UVM8_MMU_H__ - --#include "uvm8_forward_decl.h" - #include "uvm8_hal_types.h" - #include "uvm8_pmm_gpu.h" - #include "uvmtypes.h" -diff -urp work.orig/kernel/nvidia-uvm/uvm_common.c work/kernel/nvidia-uvm/uvm_common.c ---- work.orig/kernel/nvidia-uvm/uvm_common.c 2016-07-12 06:52:17.000000000 +0200 -+++ work/kernel/nvidia-uvm/uvm_common.c 2016-07-16 22:45:59.878812524 +0200 -@@ -51,7 +51,6 @@ - #define UVM_SPIN_LOOP_PRINT_TIMEOUT_SEC 30ULL - - static dev_t g_uvmBaseDev; --struct UvmOpsUvmEvents g_exportedUvmOps; - - static char* uvm_driver_mode = "8"; - -diff -urp work.orig/kernel/nvidia-uvm/uvm_full_fault_buffer.h work/kernel/nvidia-uvm/uvm_full_fault_buffer.h ---- work.orig/kernel/nvidia-uvm/uvm_full_fault_buffer.h 2016-07-12 06:52:17.000000000 +0200 -+++ work/kernel/nvidia-uvm/uvm_full_fault_buffer.h 2016-07-16 22:45:59.878812524 +0200 -@@ -31,6 +31,7 @@ - #define _UVM_FULL_FAULT_BUFFER_H_ - - #include "uvmtypes.h" -+#include "linux/compiler.h" - - #define MAXWELL_FAULT_BUFFER_A (0xb069) - #define MEM_RD32(a) (*(const volatile NvU32 *)(a)) -@@ -303,7 +304,7 @@ typedef struct - NvUvmControlPrefetch_t controlPrefetch; - NvUvmTestFaultBufferOverflow_t testFaultBufferOverflow; - NvUvmClearFaultBufferOverflow_t clearFaultBufferOverflow; --} UvmFaultBufferOps; -+} __no_const UvmFaultBufferOps; - - /****************************************************************************** - uvmfull_fault_buffer_init -diff -urp work.orig/kernel/nvidia-uvm/uvm_linux.h work/kernel/nvidia-uvm/uvm_linux.h ---- work.orig/kernel/nvidia-uvm/uvm_linux.h 2016-07-12 06:52:17.000000000 +0200 -+++ work/kernel/nvidia-uvm/uvm_linux.h 2016-07-16 22:45:59.882815613 +0200 -@@ -508,7 +508,7 @@ static inline NvU64 NV_GETTIME(void) - - // WRITE_ONCE/READ_ONCE have incompatible definitions across versions, which produces warnings. - // Therefore, we define our own macros --#define UVM_WRITE_ONCE(x, val) (ACCESS_ONCE(x) = (val)) -+#define UVM_WRITE_ONCE(x, val) (ACCESS_ONCE_RW(x) = (val)) - #define UVM_READ_ONCE(x) ACCESS_ONCE(x) - - // Added in 3.11 diff --git a/x11-drivers/nvidia-drivers/files/nvidia-drivers-367.57-profiles-rc.patch b/x11-drivers/nvidia-drivers/files/nvidia-drivers-367.57-profiles-rc.patch deleted file mode 100644 index b29895c3dff6..000000000000 --- a/x11-drivers/nvidia-drivers/files/nvidia-drivers-367.57-profiles-rc.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/nvidia-application-profiles-367.57-rc -+++ b/nvidia-application-profiles-367.57-rc -@@ -44,7 +44,7 @@ - { - "name" : "NamedVertexAttributesApplyDivisor", - "settings" : [ "GL23cd0e", 1 ] -- }, -+ } - ], - "rules" : [ - { diff --git a/x11-drivers/nvidia-drivers/files/nvidia-drivers-370.28-profiles-rc.patch b/x11-drivers/nvidia-drivers/files/nvidia-drivers-370.28-profiles-rc.patch deleted file mode 100644 index cec890b28ccf..000000000000 --- a/x11-drivers/nvidia-drivers/files/nvidia-drivers-370.28-profiles-rc.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/nvidia-application-profiles-370.28-rc -+++ b/nvidia-application-profiles-370.28-rc -@@ -44,7 +44,7 @@ - { - "name" : "NamedVertexAttributesApplyDivisor", - "settings" : [ "GL23cd0e", 1 ] -- }, -+ } - ], - "rules" : [ - { diff --git a/x11-drivers/nvidia-drivers/files/nvidia-drivers-settings.desktop b/x11-drivers/nvidia-drivers/files/nvidia-drivers-settings.desktop deleted file mode 100644 index 773a5af24668..000000000000 --- a/x11-drivers/nvidia-drivers/files/nvidia-drivers-settings.desktop +++ /dev/null @@ -1,7 +0,0 @@ -[Desktop Entry] -Type=Application -Name=NVIDIA X Server Settings -Comment=Configure NVIDIA X Server Settings -Exec=/opt/bin/nvidia-settings -Icon=nvidia-drivers-settings -Categories=System;Settings; diff --git a/x11-drivers/nvidia-drivers/metadata.xml b/x11-drivers/nvidia-drivers/metadata.xml index 8f630f276558..8de5b844b79d 100644 --- a/x11-drivers/nvidia-drivers/metadata.xml +++ b/x11-drivers/nvidia-drivers/metadata.xml @@ -17,7 +17,6 @@ branches. <flag name="compat">Install non-GLVND libGL for backwards compatibility</flag> <flag name="driver">Install the kernel driver module</flag> <flag name="X">Install the X.org driver, OpenGL libraries, XvMC libraries, and VDPAU libraries</flag> - <flag name="gtk2">Install nvidia-settings with support for GTK+ 2</flag> <flag name="gtk3">Install nvidia-settings with support for GTK+ 3</flag> <flag name="kms">Enable support for kernel mode setting (KMS)</flag> <flag name="pax_kernel">PaX patches from the PaX project</flag> diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-346.96-r6.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-346.96-r6.ebuild deleted file mode 100644 index 2efeb5df2502..000000000000 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-346.96-r6.ebuild +++ /dev/null @@ -1,527 +0,0 @@ -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -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/ http://www.nvidia.com/Download/Find.aspx" -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 ) - tools? ( ftp://download.nvidia.com/XFree86/nvidia-settings/nvidia-settings-${PV}.tar.bz2 ) -" - -LICENSE="GPL-2 NVIDIA-r2" -SLOT="0/${PV%.*}" -KEYWORDS="-* amd64 x86 ~amd64-fbsd ~x86-fbsd" -RESTRICT="bindist mirror" -EMULTILIB_PKG="true" - -IUSE="acpi gtk3 kernel_FreeBSD kernel_linux multilib pax_kernel static-libs +tools uvm +X" -REQUIRED_USE=" - tools? ( X ) - static-libs? ( tools ) -" - -COMMON=" - app-eselect/eselect-opencl - kernel_linux? ( >=sys-libs/glibc-2.6.1 ) - tools? ( - dev-libs/atk - dev-libs/glib:2 - dev-libs/jansson - gtk3? ( x11-libs/gtk+:3 ) - x11-libs/cairo - x11-libs/gdk-pixbuf[X] - x11-libs/gtk+:2 - x11-libs/libX11 - x11-libs/libXext - x11-libs/libXrandr - x11-libs/libXv - x11-libs/libXxf86vm - x11-libs/pango[X] - ) - 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? ( !media-video/nvidia-settings ) - X? ( - <x11-base/xorg-server-1.18.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 many 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 - - if use tools; then - emake -C "${S}"/nvidia-settings-${PV}/src \ - AR="$(tc-getAR)" \ - CC="$(tc-getCC)" \ - LIBDIR="$(get_libdir)" \ - RANLIB="$(tc-getRANLIB)" \ - build-xnvctrl - - emake -C "${S}"/nvidia-settings-${PV}/src \ - CC="$(tc-getCC)" \ - GTK3_AVAILABLE=$(usex gtk3 1 0) \ - LD="$(tc-getCC)" \ - LIBDIR="$(get_libdir)" \ - NVML_ENABLED=0 \ - NV_USE_BUNDLED_LIBJANSSON=0 \ - NV_VERBOSE=1 \ - STRIP_CMD=true - 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)" - newexe "${FILESDIR}"/nvidia-udev.sh-r1 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 - emake -C "${S}"/nvidia-settings-${PV}/src/ \ - DESTDIR="${D}" \ - GTK3_AVAILABLE=$(usex gtk3 1 0) \ - LIBDIR="${D}/usr/$(get_libdir)" \ - PREFIX=/usr \ - NV_USE_BUNDLED_LIBJANSSON=0 \ - install - - if use static-libs; then - dolib.a "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/libXNVCtrl.a - - insinto /usr/include/NVCtrl - doins "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/*.h - fi - - insinto /usr/share/nvidia/ - doins nvidia-application-profiles-${PV}-key-documentation - - insinto /etc/nvidia - newins \ - nvidia-application-profiles-${PV}-rc nvidia-application-profiles-rc - - # There is no icon in the FreeBSD tarball. - use kernel_FreeBSD || \ - doicon ${NV_OBJ}/nvidia-settings.png - - domenu "${FILESDIR}"/nvidia-settings.desktop - - exeinto /etc/X11/xinit/xinitrc.d - newexe "${FILESDIR}"/95-nvidia-settings-r1 95-nvidia-settings - fi - - dobin ${NV_OBJ}/nvidia-bug-report.sh - - if has_multilib_profile && use multilib ; then - local OABI=${ABI} - for ABI in $(get_install_abis) ; do - src_install-libs - done - ABI=${OABI} - unset OABI - else - src_install-libs - fi - - is_final_abi || die "failed to iterate through all ABIs" - - 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-r7.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-346.96-r7.ebuild deleted file mode 100644 index 5fca7a1b6971..000000000000 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-346.96-r7.ebuild +++ /dev/null @@ -1,528 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=5 - -inherit eutils flag-o-matic linux-info linux-mod multilib-minimal 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/ http://www.nvidia.com/Download/Find.aspx" -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 ) - tools? ( ftp://download.nvidia.com/XFree86/nvidia-settings/nvidia-settings-${PV}.tar.bz2 ) -" - -LICENSE="GPL-2 NVIDIA-r2" -SLOT="0/${PV%.*}" -KEYWORDS="-* ~amd64 ~x86 ~amd64-fbsd ~x86-fbsd" -RESTRICT="bindist mirror" -EMULTILIB_PKG="true" - -IUSE="acpi gtk3 kernel_FreeBSD kernel_linux multilib pax_kernel static-libs +tools uvm +X" -REQUIRED_USE=" - tools? ( X ) - static-libs? ( tools ) -" - -COMMON=" - app-eselect/eselect-opencl - kernel_linux? ( >=sys-libs/glibc-2.6.1 ) - tools? ( - dev-libs/atk - dev-libs/glib:2 - dev-libs/jansson - gtk3? ( - x11-libs/gtk+:3 - ) - x11-libs/cairo - x11-libs/gdk-pixbuf[X] - x11-libs/gtk+:2 - x11-libs/libX11 - x11-libs/libXext - x11-libs/libXrandr - x11-libs/libXv - x11-libs/libXxf86vm - x11-libs/pango[X] - ) - 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? ( !media-video/nvidia-settings ) - X? ( - <x11-base/xorg-server-1.18.99:= - >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}] - >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}] - >=x11-libs/libvdpau-0.3-r1[${MULTILIB_USEDEP}] - sys-libs/zlib[${MULTILIB_USEDEP}] - ) -" - -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 many 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 - - if use tools; then - emake -C "${S}"/nvidia-settings-${PV}/src \ - AR="$(tc-getAR)" \ - CC="$(tc-getCC)" \ - LIBDIR="$(get_libdir)" \ - RANLIB="$(tc-getRANLIB)" \ - build-xnvctrl - - emake -C "${S}"/nvidia-settings-${PV}/src \ - CC="$(tc-getCC)" \ - GTK3_AVAILABLE=$(usex gtk3 1 0) \ - LD="$(tc-getCC)" \ - LIBDIR="$(get_libdir)" \ - NVML_ENABLED=0 \ - NV_USE_BUNDLED_LIBJANSSON=0 \ - NV_VERBOSE=1 \ - STRIP_CMD=true - 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)" - newexe "${FILESDIR}"/nvidia-udev.sh-r1 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 - emake -C "${S}"/nvidia-settings-${PV}/src/ \ - DESTDIR="${D}" \ - GTK3_AVAILABLE=$(usex gtk3 1 0) \ - LIBDIR="${D}/usr/$(get_libdir)" \ - PREFIX=/usr \ - NV_USE_BUNDLED_LIBJANSSON=0 \ - install - - if use static-libs; then - dolib.a "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/libXNVCtrl.a - - insinto /usr/include/NVCtrl - doins "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/*.h - fi - - insinto /usr/share/nvidia/ - doins nvidia-application-profiles-${PV}-key-documentation - - insinto /etc/nvidia - newins \ - nvidia-application-profiles-${PV}-rc nvidia-application-profiles-rc - - # There is no icon in the FreeBSD tarball. - use kernel_FreeBSD || \ - doicon ${NV_OBJ}/nvidia-settings.png - - domenu "${FILESDIR}"/nvidia-settings.desktop - - exeinto /etc/X11/xinit/xinitrc.d - newexe "${FILESDIR}"/95-nvidia-settings-r1 95-nvidia-settings - fi - - dobin ${NV_OBJ}/nvidia-bug-report.sh - - if has_multilib_profile && use multilib ; then - local OABI=${ABI} - for ABI in $(get_install_abis) ; do - src_install-libs - done - ABI=${OABI} - unset OABI - else - src_install-libs - fi - - is_final_abi || die "failed to iterate through all ABIs" - - 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.79-r4.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-352.79-r4.ebuild deleted file mode 100644 index dd5ab2bf43c9..000000000000 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-352.79-r4.ebuild +++ /dev/null @@ -1,526 +0,0 @@ -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -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/ http://www.nvidia.com/Download/Find.aspx" -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 ) - tools? ( ftp://download.nvidia.com/XFree86/nvidia-settings/nvidia-settings-${PV}.tar.bz2 ) -" - -LICENSE="GPL-2 NVIDIA-r2" -SLOT="0/${PV%.*}" -KEYWORDS="-* amd64 x86 ~amd64-fbsd ~x86-fbsd" -RESTRICT="bindist mirror" -EMULTILIB_PKG="true" - -IUSE="acpi gtk3 multilib kernel_FreeBSD kernel_linux pax_kernel static-libs +tools +X uvm" -REQUIRED_USE=" - tools? ( X ) - static-libs? ( tools ) -" - -COMMON=" - app-eselect/eselect-opencl - kernel_linux? ( >=sys-libs/glibc-2.6.1 ) - tools? ( - dev-libs/atk - dev-libs/glib:2 - dev-libs/jansson - gtk3? ( - x11-libs/gtk+:3 - ) - x11-libs/cairo - x11-libs/gdk-pixbuf[X] - x11-libs/gtk+:2 - x11-libs/libX11 - x11-libs/libXext - x11-libs/libXrandr - x11-libs/libXv - x11-libs/libXxf86vm - x11-libs/pango[X] - ) - X? ( - >=app-eselect/eselect-opengl-1.0.9 - ) -" -DEPEND=" - ${COMMON} - kernel_linux? ( virtual/linux-sources ) -" -RDEPEND=" - ${COMMON} - acpi? ( sys-power/acpid ) - tools? ( !media-video/nvidia-settings ) - X? ( - <x11-base/xorg-server-1.18.99:= - >=x11-libs/libvdpau-1.0 - 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 4; then - ewarn "Gentoo supports kernels which are supported by NVIDIA" - ewarn "which are limited to the following kernels:" - ewarn "<sys-kernel/gentoo-sources-4.4" - ewarn "<sys-kernel/vanilla-sources-4.4" - 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." - ewarn "" - fi - - # Since Nvidia ships many 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 - - if use tools; then - emake -C "${S}"/nvidia-settings-${PV}/src \ - AR="$(tc-getAR)" \ - CC="$(tc-getCC)" \ - LIBDIR="$(get_libdir)" \ - RANLIB="$(tc-getRANLIB)" \ - build-xnvctrl - - emake -C "${S}"/nvidia-settings-${PV}/src \ - CC="$(tc-getCC)" \ - GTK3_AVAILABLE=$(usex gtk3 1 0) \ - LD="$(tc-getCC)" \ - LIBDIR="$(get_libdir)" \ - NVML_ENABLED=0 \ - NV_USE_BUNDLED_LIBJANSSON=0 \ - NV_VERBOSE=1 \ - STRIP_CMD=true - 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)" - newexe "${FILESDIR}"/nvidia-udev.sh-r1 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 - emake -C "${S}"/nvidia-settings-${PV}/src/ \ - DESTDIR="${D}" \ - GTK3_AVAILABLE=$(usex gtk3 1 0) \ - LIBDIR="${D}/usr/$(get_libdir)" \ - PREFIX=/usr \ - NV_USE_BUNDLED_LIBJANSSON=0 \ - install - - if use static-libs; then - dolib.a "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/libXNVCtrl.a - - insinto /usr/share/nvidia/ - doins nvidia-application-profiles-${PV}-key-documentation - fi - - insinto /etc/nvidia - newins \ - nvidia-application-profiles-${PV}-rc nvidia-application-profiles-rc - - # There is no icon in the FreeBSD tarball. - use kernel_FreeBSD || \ - doicon ${NV_OBJ}/nvidia-settings.png - - domenu "${FILESDIR}"/nvidia-settings.desktop - - exeinto /etc/X11/xinit/xinitrc.d - newexe "${FILESDIR}"/95-nvidia-settings-r1 95-nvidia-settings - fi - - dobin ${NV_OBJ}/nvidia-bug-report.sh - - if has_multilib_profile && use multilib ; then - local OABI=${ABI} - for ABI in $(get_install_abis) ; do - src_install-libs - done - ABI=${OABI} - unset OABI - else - src_install-libs - fi - - is_final_abi || die "failed to iterate through all ABIs" - - 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.79-r5.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-352.79-r5.ebuild deleted file mode 100644 index 7451b354b2f0..000000000000 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-352.79-r5.ebuild +++ /dev/null @@ -1,525 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=5 - -inherit eutils flag-o-matic linux-info linux-mod multilib-minimal 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/ http://www.nvidia.com/Download/Find.aspx" -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 ) - tools? ( ftp://download.nvidia.com/XFree86/nvidia-settings/nvidia-settings-${PV}.tar.bz2 ) -" - -LICENSE="GPL-2 NVIDIA-r2" -SLOT="0/${PV%.*}" -KEYWORDS="-* ~amd64 ~x86 ~amd64-fbsd ~x86-fbsd" -RESTRICT="bindist mirror" -EMULTILIB_PKG="true" - -IUSE="acpi gtk3 multilib kernel_FreeBSD kernel_linux pax_kernel static-libs +tools +X uvm" -REQUIRED_USE=" - tools? ( X ) - static-libs? ( tools ) -" - -COMMON=" - app-eselect/eselect-opencl - kernel_linux? ( >=sys-libs/glibc-2.6.1 ) - tools? ( - dev-libs/atk - dev-libs/glib:2 - dev-libs/jansson - gtk3? ( - x11-libs/gtk+:3 - ) - x11-libs/cairo - x11-libs/gdk-pixbuf[X] - x11-libs/gtk+:2 - x11-libs/libX11 - x11-libs/libXext - x11-libs/libXrandr - x11-libs/libXv - x11-libs/libXxf86vm - x11-libs/pango[X] - ) - X? ( - >=app-eselect/eselect-opengl-1.0.9 - ) -" -DEPEND=" - ${COMMON} - kernel_linux? ( virtual/linux-sources ) -" -RDEPEND=" - ${COMMON} - acpi? ( sys-power/acpid ) - tools? ( !media-video/nvidia-settings ) - X? ( - <x11-base/xorg-server-1.18.99:= - >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}] - >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}] - >=x11-libs/libvdpau-1.0[${MULTILIB_USEDEP}] - sys-libs/zlib[${MULTILIB_USEDEP}] - ) -" - -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 4; then - ewarn "Gentoo supports kernels which are supported by NVIDIA" - ewarn "which are limited to the following kernels:" - ewarn "<sys-kernel/gentoo-sources-4.4" - ewarn "<sys-kernel/vanilla-sources-4.4" - 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." - ewarn "" - fi - - # Since Nvidia ships many 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 - - if use tools; then - emake -C "${S}"/nvidia-settings-${PV}/src \ - AR="$(tc-getAR)" \ - CC="$(tc-getCC)" \ - LIBDIR="$(get_libdir)" \ - RANLIB="$(tc-getRANLIB)" \ - build-xnvctrl - - emake -C "${S}"/nvidia-settings-${PV}/src \ - CC="$(tc-getCC)" \ - GTK3_AVAILABLE=$(usex gtk3 1 0) \ - LD="$(tc-getCC)" \ - LIBDIR="$(get_libdir)" \ - NVML_ENABLED=0 \ - NV_USE_BUNDLED_LIBJANSSON=0 \ - NV_VERBOSE=1 \ - STRIP_CMD=true - 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)" - newexe "${FILESDIR}"/nvidia-udev.sh-r1 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 - emake -C "${S}"/nvidia-settings-${PV}/src/ \ - DESTDIR="${D}" \ - GTK3_AVAILABLE=$(usex gtk3 1 0) \ - LIBDIR="${D}/usr/$(get_libdir)" \ - PREFIX=/usr \ - NV_USE_BUNDLED_LIBJANSSON=0 \ - install - - if use static-libs; then - dolib.a "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/libXNVCtrl.a - - insinto /usr/share/nvidia/ - doins nvidia-application-profiles-${PV}-key-documentation - fi - - insinto /etc/nvidia - newins \ - nvidia-application-profiles-${PV}-rc nvidia-application-profiles-rc - - # There is no icon in the FreeBSD tarball. - use kernel_FreeBSD || \ - doicon ${NV_OBJ}/nvidia-settings.png - - domenu "${FILESDIR}"/nvidia-settings.desktop - - exeinto /etc/X11/xinit/xinitrc.d - newexe "${FILESDIR}"/95-nvidia-settings-r1 95-nvidia-settings - fi - - dobin ${NV_OBJ}/nvidia-bug-report.sh - - if has_multilib_profile && use multilib ; then - local OABI=${ABI} - for ABI in $(get_install_abis) ; do - src_install-libs - done - ABI=${OABI} - unset OABI - else - src_install-libs - fi - - is_final_abi || die "failed to iterate through all ABIs" - - 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-r4.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-355.11-r4.ebuild deleted file mode 100644 index 4dc2199f3e77..000000000000 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-355.11-r4.ebuild +++ /dev/null @@ -1,499 +0,0 @@ -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -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/ http://www.nvidia.com/Download/Find.aspx" -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/${PV%.*}" -KEYWORDS="-* amd64 x86 ~amd64-fbsd ~x86-fbsd" -RESTRICT="bindist mirror" -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 - gtk3? ( x11-libs/cairo ) - 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.18.99:= - >=x11-libs/libvdpau-1.0 - 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 many 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}-355.06-pax.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)" - newexe "${FILESDIR}"/nvidia-udev.sh-r1 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 -} diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-355.11-r5.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-355.11-r5.ebuild deleted file mode 100644 index 2bdc6e727dee..000000000000 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-355.11-r5.ebuild +++ /dev/null @@ -1,502 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=5 - -inherit eutils flag-o-matic linux-info linux-mod multilib-minimal 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/ http://www.nvidia.com/Download/Find.aspx" -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/${PV%.*}" -KEYWORDS="-* ~amd64 ~x86 ~amd64-fbsd ~x86-fbsd" -RESTRICT="bindist mirror" -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 - gtk3? ( x11-libs/cairo[${MULTILIB_USEDEP}] ) - 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.18.99:= - >=x11-libs/libvdpau-1.0[${MULTILIB_USEDEP}] - sys-libs/zlib[${MULTILIB_USEDEP}] - >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}] - >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}] - ) -" - -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 many 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}-355.06-pax.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)" - newexe "${FILESDIR}"/nvidia-udev.sh-r1 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 -} diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-358.16-r5.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-358.16-r5.ebuild deleted file mode 100644 index d01fb4263817..000000000000 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-358.16-r5.ebuild +++ /dev/null @@ -1,538 +0,0 @@ -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -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/ http://www.nvidia.com/Download/Find.aspx" -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 ) - tools? ( ftp://download.nvidia.com/XFree86/nvidia-settings/nvidia-settings-${PV}.tar.bz2 ) -" - -LICENSE="GPL-2 NVIDIA-r2" -SLOT="0/${PV%.*}" -KEYWORDS="-* amd64 x86 ~amd64-fbsd ~x86-fbsd" -RESTRICT="bindist mirror" -EMULTILIB_PKG="true" - -IUSE="acpi multilib kernel_FreeBSD kernel_linux +kms pax_kernel static-libs +tools gtk3 +X uvm" -REQUIRED_USE=" - tools? ( X ) - static-libs? ( tools ) -" - -COMMON=" - app-eselect/eselect-opencl - kernel_linux? ( >=sys-libs/glibc-2.6.1 ) - tools? ( - dev-libs/atk - dev-libs/glib:2 - dev-libs/jansson - gtk3? ( x11-libs/gtk+:3 ) - x11-libs/cairo - x11-libs/gdk-pixbuf[X] - x11-libs/gtk+:2 - x11-libs/libX11 - x11-libs/libXext - x11-libs/libXrandr - x11-libs/libXv - x11-libs/libXxf86vm - x11-libs/pango[X] - ) - X? ( - >=app-eselect/eselect-opengl-1.0.9 - ) -" -DEPEND=" - ${COMMON} - kernel_linux? ( virtual/linux-sources ) -" -RDEPEND=" - ${COMMON} - acpi? ( sys-power/acpid ) - tools? ( !media-video/nvidia-settings ) - X? ( - <x11-base/xorg-server-1.18.99:= - >=x11-libs/libvdpau-1.0 - 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 4; then - ewarn "Gentoo supports kernels which are supported by NVIDIA" - ewarn "which are limited to the following kernels:" - ewarn "<sys-kernel/gentoo-sources-4.4" - ewarn "<sys-kernel/vanilla-sources-4.4" - 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." - ewarn "" - fi - - # Since Nvidia ships many 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)" - use kms && MODULE_NAMES+=" nvidia-modeset(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}-355.06-pax.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 - - if use tools; then - emake -C "${S}"/nvidia-settings-${PV}/src \ - AR="$(tc-getAR)" \ - CC="$(tc-getCC)" \ - LIBDIR="$(get_libdir)" \ - RANLIB="$(tc-getRANLIB)" \ - build-xnvctrl - - emake -C "${S}"/nvidia-settings-${PV}/src \ - CC="$(tc-getCC)" \ - GTK3_AVAILABLE=$(usex gtk3 1 0) \ - LD="$(tc-getCC)" \ - LIBDIR="$(get_libdir)" \ - NVML_ENABLED=0 \ - NV_USE_BUNDLED_LIBJANSSON=0 \ - NV_VERBOSE=1 \ - STRIP_CMD=true - 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 - doins "${FILESDIR}"/nvidia-rmmod.conf - - # Ensures that our device nodes are created when not using X - exeinto "$(get_udevdir)" - newexe "${FILESDIR}"/nvidia-udev.sh-r1 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 - emake -C "${S}"/nvidia-settings-${PV}/src/ \ - DESTDIR="${D}" \ - GTK3_AVAILABLE=$(usex gtk3 1 0) \ - LIBDIR="${D}/usr/$(get_libdir)" \ - PREFIX=/usr \ - NV_USE_BUNDLED_LIBJANSSON=0 \ - install - - if use static-libs; then - dolib.a "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/libXNVCtrl.a - - insinto /usr/include/NVCtrl - doins "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/*.h - fi - - insinto /usr/share/nvidia/ - doins nvidia-application-profiles-${PV}-key-documentation - - insinto /etc/nvidia - newins \ - nvidia-application-profiles-${PV}-rc nvidia-application-profiles-rc - - # There is no icon in the FreeBSD tarball. - use kernel_FreeBSD || \ - doicon ${NV_OBJ}/nvidia-settings.png - - domenu "${FILESDIR}"/nvidia-settings.desktop - - exeinto /etc/X11/xinit/xinitrc.d - newexe "${FILESDIR}"/95-nvidia-settings-r1 95-nvidia-settings - fi - - dobin ${NV_OBJ}/nvidia-bug-report.sh - - if has_multilib_profile && use multilib; then - local OABI=${ABI} - for ABI in $(get_install_abis); do - src_install-libs - done - ABI=${OABI} - unset OABI - else - src_install-libs - fi - - is_final_abi || die "failed to iterate through all ABIs" - - 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 -} diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-358.16-r6.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-358.16-r6.ebuild deleted file mode 100644 index de83a03dd35a..000000000000 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-358.16-r6.ebuild +++ /dev/null @@ -1,539 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=5 - -inherit eutils flag-o-matic linux-info linux-mod multilib-minimal 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/ http://www.nvidia.com/Download/Find.aspx" -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 ) - tools? ( ftp://download.nvidia.com/XFree86/nvidia-settings/nvidia-settings-${PV}.tar.bz2 ) -" - -LICENSE="GPL-2 NVIDIA-r2" -SLOT="0/${PV%.*}" -KEYWORDS="-* ~amd64 ~x86 ~amd64-fbsd ~x86-fbsd" -RESTRICT="bindist mirror" -EMULTILIB_PKG="true" - -IUSE="acpi multilib kernel_FreeBSD kernel_linux +kms pax_kernel static-libs +tools gtk3 +X uvm" -REQUIRED_USE=" - tools? ( X ) - static-libs? ( tools ) -" - -COMMON=" - app-eselect/eselect-opencl - kernel_linux? ( >=sys-libs/glibc-2.6.1 ) - tools? ( - dev-libs/atk - dev-libs/glib:2 - dev-libs/jansson - gtk3? ( - x11-libs/gtk+:3 - ) - x11-libs/cairo - x11-libs/gdk-pixbuf[X] - x11-libs/gtk+:2 - x11-libs/libX11 - x11-libs/libXext - x11-libs/libXrandr - x11-libs/libXv - x11-libs/libXxf86vm - x11-libs/pango[X] - ) - X? ( - >=app-eselect/eselect-opengl-1.0.9 - ) -" -DEPEND=" - ${COMMON} - kernel_linux? ( virtual/linux-sources ) -" -RDEPEND=" - ${COMMON} - acpi? ( sys-power/acpid ) - tools? ( !media-video/nvidia-settings ) - X? ( - <x11-base/xorg-server-1.18.99:= - >=x11-libs/libvdpau-1.0[${MULTILIB_USEDEP}] - sys-libs/zlib[${MULTILIB_USEDEP}] - >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}] - >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}] - ) -" - -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 4; then - ewarn "Gentoo supports kernels which are supported by NVIDIA" - ewarn "which are limited to the following kernels:" - ewarn "<sys-kernel/gentoo-sources-4.4" - ewarn "<sys-kernel/vanilla-sources-4.4" - 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." - ewarn "" - fi - - # Since Nvidia ships many 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)" - use kms && MODULE_NAMES+=" nvidia-modeset(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}-355.06-pax.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 - - if use tools; then - emake -C "${S}"/nvidia-settings-${PV}/src \ - AR="$(tc-getAR)" \ - CC="$(tc-getCC)" \ - LIBDIR="$(get_libdir)" \ - RANLIB="$(tc-getRANLIB)" \ - build-xnvctrl - - emake -C "${S}"/nvidia-settings-${PV}/src \ - CC="$(tc-getCC)" \ - GTK3_AVAILABLE=$(usex gtk3 1 0) \ - LD="$(tc-getCC)" \ - LIBDIR="$(get_libdir)" \ - NVML_ENABLED=0 \ - NV_USE_BUNDLED_LIBJANSSON=0 \ - NV_VERBOSE=1 \ - STRIP_CMD=true - 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 - doins "${FILESDIR}"/nvidia-rmmod.conf - - # Ensures that our device nodes are created when not using X - exeinto "$(get_udevdir)" - newexe "${FILESDIR}"/nvidia-udev.sh-r1 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 - emake -C "${S}"/nvidia-settings-${PV}/src/ \ - DESTDIR="${D}" \ - GTK3_AVAILABLE=$(usex gtk3 1 0) \ - LIBDIR="${D}/usr/$(get_libdir)" \ - PREFIX=/usr \ - NV_USE_BUNDLED_LIBJANSSON=0 \ - install - - if use static-libs; then - dolib.a "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/libXNVCtrl.a - - insinto /usr/include/NVCtrl - doins "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/*.h - fi - - insinto /usr/share/nvidia/ - doins nvidia-application-profiles-${PV}-key-documentation - - insinto /etc/nvidia - newins \ - nvidia-application-profiles-${PV}-rc nvidia-application-profiles-rc - - # There is no icon in the FreeBSD tarball. - use kernel_FreeBSD || \ - doicon ${NV_OBJ}/nvidia-settings.png - - domenu "${FILESDIR}"/nvidia-settings.desktop - - exeinto /etc/X11/xinit/xinitrc.d - newexe "${FILESDIR}"/95-nvidia-settings-r1 95-nvidia-settings - fi - - dobin ${NV_OBJ}/nvidia-bug-report.sh - - if has_multilib_profile && use multilib; then - local OABI=${ABI} - for ABI in $(get_install_abis); do - src_install-libs - done - ABI=${OABI} - unset OABI - else - src_install-libs - fi - - is_final_abi || die "failed to iterate through all ABIs" - - 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 -} diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-361.42-r1.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-361.42-r1.ebuild deleted file mode 100644 index 0dba6a68af0c..000000000000 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-361.42-r1.ebuild +++ /dev/null @@ -1,529 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -inherit eutils flag-o-matic linux-info linux-mod multilib-minimal 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/ http://www.nvidia.com/Download/Find.aspx" -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 ) - tools? ( ftp://download.nvidia.com/XFree86/nvidia-settings/nvidia-settings-${PV}.tar.bz2 ) -" - -LICENSE="GPL-2 NVIDIA-r2" -SLOT="0/${PV%.*}" -KEYWORDS="-* ~amd64 ~x86 ~amd64-fbsd ~x86-fbsd" -RESTRICT="bindist mirror" -EMULTILIB_PKG="true" - -IUSE="acpi compat +driver gtk3 kernel_FreeBSD kernel_linux +kms multilib pax_kernel static-libs +tools uvm +X" -REQUIRED_USE=" - tools? ( X ) - static-libs? ( tools ) -" - -COMMON=" - app-eselect/eselect-opencl - kernel_linux? ( >=sys-libs/glibc-2.6.1 ) - tools? ( - dev-libs/atk - dev-libs/glib:2 - dev-libs/jansson - gtk3? ( - x11-libs/gtk+:3 - ) - x11-libs/cairo - x11-libs/gdk-pixbuf[X] - x11-libs/gtk+:2 - x11-libs/libX11 - x11-libs/libXext - x11-libs/libXrandr - x11-libs/libXv - x11-libs/libXxf86vm - x11-libs/pango[X] - ) - X? ( - >=app-eselect/eselect-opengl-1.0.9 - app-misc/pax-utils - ) -" -DEPEND=" - ${COMMON} - kernel_linux? ( virtual/linux-sources ) -" -RDEPEND=" - ${COMMON} - acpi? ( sys-power/acpid ) - tools? ( !media-video/nvidia-settings ) - X? ( - <x11-base/xorg-server-1.18.99:= - >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}] - >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}] - >=x11-libs/libvdpau-1.0 - sys-libs/zlib[${MULTILIB_USEDEP}] - ) -" - -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 5; then - ewarn "Gentoo supports kernels which are supported by NVIDIA" - ewarn "which are limited to the following kernels:" - ewarn "<sys-kernel/gentoo-sources-4.5" - ewarn "<sys-kernel/vanilla-sources-4.5" - ewarn "" - ewarn "You are free to utilize eapply_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." - ewarn "" - fi - - # Since Nvidia ships many 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 driver && use kernel_linux; then - MODULE_NAMES="nvidia(video:${S}/kernel)" - use uvm && MODULE_NAMES+=" nvidia-uvm(video:${S}/kernel)" - use kms && MODULE_NAMES+=" nvidia-modeset(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 - - if use kernel_linux && kernel_is lt 2 6 9; then - eerror "You must build this against 2.6.9 or higher kernels." - 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() { - 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." - eapply "${FILESDIR}"/${PN}-361.28-pax.patch - fi - - # Allow user patches so they can support RC kernels and whatever else - eapply_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 driver && use kernel_linux; then - MAKEOPTS=-j1 linux-mod_src_compile - fi - - if use tools; then - emake -C "${S}"/nvidia-settings-${PV}/src \ - AR="$(tc-getAR)" \ - CC="$(tc-getCC)" \ - LIBDIR="$(get_libdir)" \ - RANLIB="$(tc-getRANLIB)" \ - build-xnvctrl - - emake -C "${S}"/nvidia-settings-${PV}/src \ - CC="$(tc-getCC)" \ - GTK3_AVAILABLE=$(usex gtk3 1 0) \ - LD="$(tc-getCC)" \ - LIBDIR="$(get_libdir)" \ - NVML_ENABLED=0 \ - NV_USE_BUNDLED_LIBJANSSON=0 \ - NV_VERBOSE=1 \ - STRIP_CMD=true - 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 - nv_LIB="${1}" - - # SOVER to use - nv_SOVER="$(scanelf -qF'%S#F' ${nv_LIB})" - - # Where to install - nv_DEST="${2}" - - # Get just the library name - nv_LIBNAME=$(basename "${nv_LIB}") - - if [[ "${nv_DEST}" ]]; then - exeinto ${nv_DEST} - action="doexe" - else - nv_DEST="/usr/$(get_libdir)" - action="dolib.so" - fi - - # Install the library - ${action} ${nv_LIB} || die "failed to install ${nv_LIBNAME}" - - # If the library has a SONAME and SONAME does not match the library name, - # then we need to create a symlink - if [[ ${nv_SOVER} ]] && ! [[ "${nv_SOVER}" = "${nv_LIBNAME}" ]]; then - dosym ${nv_LIBNAME} ${nv_DEST}/${nv_SOVER} \ - || die "failed to create ${nv_DEST}/${nv_SOVER} symlink" - fi - - dosym ${nv_LIBNAME} ${nv_DEST}/${nv_LIBNAME/.so*/.so} \ - || die "failed to create ${nv_LIBNAME/.so*/.so} symlink" -} - -src_install() { - if use driver && 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 - doins "${FILESDIR}"/nvidia-rmmod.conf - - # Ensures that our device nodes are created when not using X - exeinto "$(get_udevdir)" - newexe "${FILESDIR}"/nvidia-udev.sh-r1 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 - emake -C "${S}"/nvidia-settings-${PV}/src/ \ - DESTDIR="${D}" \ - GTK3_AVAILABLE=$(usex gtk3 1 0) \ - LIBDIR="${D}/usr/$(get_libdir)" \ - PREFIX=/usr \ - NV_USE_BUNDLED_LIBJANSSON=0 \ - install - - if use static-libs; then - dolib.a "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/libXNVCtrl.a - - insinto /usr/include/NVCtrl - doins "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/*.h - fi - - insinto /usr/share/nvidia/ - doins nvidia-application-profiles-${PV}-key-documentation - - insinto /etc/nvidia - newins \ - nvidia-application-profiles-${PV}-rc nvidia-application-profiles-rc - - # There is no icon in the FreeBSD tarball. - use kernel_FreeBSD || \ - doicon ${NV_OBJ}/nvidia-settings.png - - domenu "${FILESDIR}"/nvidia-settings.desktop - - exeinto /etc/X11/xinit/xinitrc.d - newexe "${FILESDIR}"/95-nvidia-settings-r1 95-nvidia-settings - fi - - dobin ${NV_OBJ}/nvidia-bug-report.sh - - if has_multilib_profile && use multilib; then - local OABI=${ABI} - for ABI in $(get_install_abis); do - src_install-libs - done - ABI=${OABI} - unset OABI - else - src_install-libs - fi - - is_final_abi || die "failed to iterate through all ABIs" - - 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.${NV_SOVER} ${GL_ROOT}" - "libGL.so.$(usex compat ${NV_SOVER} 1.0.0) ${GL_ROOT}" - "libGLESv1_CM.so.1 ${GL_ROOT}" - "libGLESv1_CM_nvidia.so.${NV_SOVER} ${GL_ROOT}" - "libGLESv2.so.2 ${GL_ROOT}" - "libGLESv2_nvidia.so.${NV_SOVER} ${GL_ROOT}" - "libGLX.so.0 ${GL_ROOT}" - "libGLX_nvidia.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-fatbinaryloader.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}" - "libnvidia-ptxjitcompiler.so.${NV_SOVER}" - "libvdpau_nvidia.so.${NV_SOVER}" - ) - - 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 - fi -} - -pkg_preinst() { - if use driver && 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 driver && 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 driver && 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-361.42.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-361.42.ebuild deleted file mode 100644 index c1de4d2fe82e..000000000000 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-361.42.ebuild +++ /dev/null @@ -1,528 +0,0 @@ -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -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/ http://www.nvidia.com/Download/Find.aspx" -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 ) - tools? ( ftp://download.nvidia.com/XFree86/nvidia-settings/nvidia-settings-${PV}.tar.bz2 ) -" - -LICENSE="GPL-2 NVIDIA-r2" -SLOT="0/${PV%.*}" -KEYWORDS="-* amd64 x86 ~amd64-fbsd ~x86-fbsd" -RESTRICT="bindist mirror" -EMULTILIB_PKG="true" - -IUSE="acpi compat +driver gtk3 kernel_FreeBSD kernel_linux +kms multilib pax_kernel static-libs +tools uvm +X" -REQUIRED_USE=" - tools? ( X ) - static-libs? ( tools ) -" - -COMMON=" - app-eselect/eselect-opencl - kernel_linux? ( >=sys-libs/glibc-2.6.1 ) - tools? ( - dev-libs/atk - dev-libs/glib:2 - dev-libs/jansson - gtk3? ( x11-libs/gtk+:3 ) - x11-libs/cairo - x11-libs/gdk-pixbuf[X] - x11-libs/gtk+:2 - x11-libs/libX11 - x11-libs/libXext - x11-libs/libXrandr - x11-libs/libXv - x11-libs/libXxf86vm - x11-libs/pango[X] - ) - X? ( - >=app-eselect/eselect-opengl-1.0.9 - app-misc/pax-utils - ) -" -DEPEND=" - ${COMMON} - kernel_linux? ( virtual/linux-sources ) -" -RDEPEND=" - ${COMMON} - acpi? ( sys-power/acpid ) - tools? ( !media-video/nvidia-settings ) - X? ( - <x11-base/xorg-server-1.18.99:= - >=x11-libs/libvdpau-1.0 - 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 5; then - ewarn "Gentoo supports kernels which are supported by NVIDIA" - ewarn "which are limited to the following kernels:" - ewarn "<sys-kernel/gentoo-sources-4.5" - ewarn "<sys-kernel/vanilla-sources-4.5" - 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." - ewarn "" - fi - - # Since Nvidia ships many 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 driver && use kernel_linux; then - MODULE_NAMES="nvidia(video:${S}/kernel)" - use uvm && MODULE_NAMES+=" nvidia-uvm(video:${S}/kernel)" - use kms && MODULE_NAMES+=" nvidia-modeset(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 - - if use kernel_linux && kernel_is lt 2 6 9; then - eerror "You must build this against 2.6.9 or higher kernels." - 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() { - 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}-361.28-pax.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 driver && use kernel_linux; then - MAKEOPTS=-j1 linux-mod_src_compile - fi - - if use tools; then - emake -C "${S}"/nvidia-settings-${PV}/src \ - AR="$(tc-getAR)" \ - CC="$(tc-getCC)" \ - LIBDIR="$(get_libdir)" \ - RANLIB="$(tc-getRANLIB)" \ - build-xnvctrl - - emake -C "${S}"/nvidia-settings-${PV}/src \ - CC="$(tc-getCC)" \ - GTK3_AVAILABLE=$(usex gtk3 1 0) \ - LD="$(tc-getCC)" \ - LIBDIR="$(get_libdir)" \ - NVML_ENABLED=0 \ - NV_USE_BUNDLED_LIBJANSSON=0 \ - NV_VERBOSE=1 \ - STRIP_CMD=true - 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 - nv_LIB="${1}" - - # SOVER to use - nv_SOVER="$(scanelf -qF'%S#F' ${nv_LIB})" - - # Where to install - nv_DEST="${2}" - - # Get just the library name - nv_LIBNAME=$(basename "${nv_LIB}") - - if [[ "${nv_DEST}" ]]; then - exeinto ${nv_DEST} - action="doexe" - else - nv_DEST="/usr/$(get_libdir)" - action="dolib.so" - fi - - # Install the library - ${action} ${nv_LIB} || die "failed to install ${nv_LIBNAME}" - - # If the library has a SONAME and SONAME does not match the library name, - # then we need to create a symlink - if [[ ${nv_SOVER} ]] && ! [[ "${nv_SOVER}" = "${nv_LIBNAME}" ]]; then - dosym ${nv_LIBNAME} ${nv_DEST}/${nv_SOVER} \ - || die "failed to create ${nv_DEST}/${nv_SOVER} symlink" - fi - - dosym ${nv_LIBNAME} ${nv_DEST}/${nv_LIBNAME/.so*/.so} \ - || die "failed to create ${nv_LIBNAME/.so*/.so} symlink" -} - -src_install() { - if use driver && 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 - doins "${FILESDIR}"/nvidia-rmmod.conf - - # Ensures that our device nodes are created when not using X - exeinto "$(get_udevdir)" - newexe "${FILESDIR}"/nvidia-udev.sh-r1 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 - emake -C "${S}"/nvidia-settings-${PV}/src/ \ - DESTDIR="${D}" \ - GTK3_AVAILABLE=$(usex gtk3 1 0) \ - LIBDIR="${D}/usr/$(get_libdir)" \ - PREFIX=/usr \ - NV_USE_BUNDLED_LIBJANSSON=0 \ - install - - if use static-libs; then - dolib.a "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/libXNVCtrl.a - - insinto /usr/include/NVCtrl - doins "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/*.h - fi - - insinto /usr/share/nvidia/ - doins nvidia-application-profiles-${PV}-key-documentation - - insinto /etc/nvidia - newins \ - nvidia-application-profiles-${PV}-rc nvidia-application-profiles-rc - - # There is no icon in the FreeBSD tarball. - use kernel_FreeBSD || \ - doicon ${NV_OBJ}/nvidia-settings.png - - domenu "${FILESDIR}"/nvidia-settings.desktop - - exeinto /etc/X11/xinit/xinitrc.d - newexe "${FILESDIR}"/95-nvidia-settings-r1 95-nvidia-settings - fi - - dobin ${NV_OBJ}/nvidia-bug-report.sh - - if has_multilib_profile && use multilib; then - local OABI=${ABI} - for ABI in $(get_install_abis); do - src_install-libs - done - ABI=${OABI} - unset OABI - else - src_install-libs - fi - - is_final_abi || die "failed to iterate through all ABIs" - - 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.${NV_SOVER} ${GL_ROOT}" - "libGL.so.$(usex compat ${NV_SOVER} 1.0.0) ${GL_ROOT}" - "libGLESv1_CM.so.1 ${GL_ROOT}" - "libGLESv1_CM_nvidia.so.${NV_SOVER} ${GL_ROOT}" - "libGLESv2.so.2 ${GL_ROOT}" - "libGLESv2_nvidia.so.${NV_SOVER} ${GL_ROOT}" - "libGLX.so.0 ${GL_ROOT}" - "libGLX_nvidia.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-fatbinaryloader.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}" - "libnvidia-ptxjitcompiler.so.${NV_SOVER}" - "libvdpau_nvidia.so.${NV_SOVER}" - ) - - 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 - fi -} - -pkg_preinst() { - if use driver && 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 driver && 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 driver && 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-361.45.18-r1.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-361.45.18-r1.ebuild deleted file mode 100644 index bf8d4b7c2364..000000000000 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-361.45.18-r1.ebuild +++ /dev/null @@ -1,529 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=5 - -inherit eutils flag-o-matic linux-info linux-mod multilib-minimal 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/ http://www.nvidia.com/Download/Find.aspx" -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 ) - tools? ( ftp://download.nvidia.com/XFree86/nvidia-settings/nvidia-settings-${PV}.tar.bz2 ) -" - -LICENSE="GPL-2 NVIDIA-r2" -SLOT="0/${PV%.*}" -KEYWORDS="-* ~amd64 ~x86 ~amd64-fbsd ~x86-fbsd" -RESTRICT="bindist mirror" -EMULTILIB_PKG="true" - -IUSE="acpi compat +driver gtk3 kernel_FreeBSD kernel_linux +kms multilib pax_kernel static-libs +tools uvm +X" -REQUIRED_USE=" - tools? ( X ) - static-libs? ( tools ) -" - -COMMON=" - app-eselect/eselect-opencl - kernel_linux? ( >=sys-libs/glibc-2.6.1 ) - tools? ( - dev-libs/atk - dev-libs/glib:2 - dev-libs/jansson - gtk3? ( - x11-libs/gtk+:3 - ) - x11-libs/cairo - x11-libs/gdk-pixbuf[X] - x11-libs/gtk+:2 - x11-libs/libX11 - x11-libs/libXext - x11-libs/libXrandr - x11-libs/libXv - x11-libs/libXxf86vm - x11-libs/pango[X] - ) - X? ( - >=app-eselect/eselect-opengl-1.0.9 - app-misc/pax-utils - ) -" -DEPEND=" - ${COMMON} - kernel_linux? ( virtual/linux-sources ) -" -RDEPEND=" - ${COMMON} - acpi? ( sys-power/acpid ) - tools? ( !media-video/nvidia-settings ) - X? ( - <x11-base/xorg-server-1.18.99:= - >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}] - >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}] - >=x11-libs/libvdpau-1.0[${MULTILIB_USEDEP}] - sys-libs/zlib[${MULTILIB_USEDEP}] - ) -" - -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 5; then - ewarn "Gentoo supports kernels which are supported by NVIDIA" - ewarn "which are limited to the following kernels:" - ewarn "<sys-kernel/gentoo-sources-4.5" - ewarn "<sys-kernel/vanilla-sources-4.5" - 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." - ewarn "" - fi - - # Since Nvidia ships many 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 driver && use kernel_linux; then - MODULE_NAMES="nvidia(video:${S}/kernel)" - use uvm && MODULE_NAMES+=" nvidia-uvm(video:${S}/kernel)" - use kms && MODULE_NAMES+=" nvidia-modeset(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 - - if use kernel_linux && kernel_is lt 2 6 9; then - eerror "You must build this against 2.6.9 or higher kernels." - 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() { - 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}-361.28-pax.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 driver && use kernel_linux; then - MAKEOPTS=-j1 linux-mod_src_compile - fi - - if use tools; then - emake -C "${S}"/nvidia-settings-${PV}/src \ - AR="$(tc-getAR)" \ - CC="$(tc-getCC)" \ - LIBDIR="$(get_libdir)" \ - RANLIB="$(tc-getRANLIB)" \ - build-xnvctrl - - emake -C "${S}"/nvidia-settings-${PV}/src \ - CC="$(tc-getCC)" \ - GTK3_AVAILABLE=$(usex gtk3 1 0) \ - LD="$(tc-getCC)" \ - LIBDIR="$(get_libdir)" \ - NVML_ENABLED=0 \ - NV_USE_BUNDLED_LIBJANSSON=0 \ - NV_VERBOSE=1 \ - STRIP_CMD=true - 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 - nv_LIB="${1}" - - # SOVER to use - nv_SOVER="$(scanelf -qF'%S#F' ${nv_LIB})" - - # Where to install - nv_DEST="${2}" - - # Get just the library name - nv_LIBNAME=$(basename "${nv_LIB}") - - if [[ "${nv_DEST}" ]]; then - exeinto ${nv_DEST} - action="doexe" - else - nv_DEST="/usr/$(get_libdir)" - action="dolib.so" - fi - - # Install the library - ${action} ${nv_LIB} || die "failed to install ${nv_LIBNAME}" - - # If the library has a SONAME and SONAME does not match the library name, - # then we need to create a symlink - if [[ ${nv_SOVER} ]] && ! [[ "${nv_SOVER}" = "${nv_LIBNAME}" ]]; then - dosym ${nv_LIBNAME} ${nv_DEST}/${nv_SOVER} \ - || die "failed to create ${nv_DEST}/${nv_SOVER} symlink" - fi - - dosym ${nv_LIBNAME} ${nv_DEST}/${nv_LIBNAME/.so*/.so} \ - || die "failed to create ${nv_LIBNAME/.so*/.so} symlink" -} - -src_install() { - if use driver && 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 - doins "${FILESDIR}"/nvidia-rmmod.conf - - # Ensures that our device nodes are created when not using X - exeinto "$(get_udevdir)" - newexe "${FILESDIR}"/nvidia-udev.sh-r1 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 - emake -C "${S}"/nvidia-settings-${PV}/src/ \ - DESTDIR="${D}" \ - GTK3_AVAILABLE=$(usex gtk3 1 0) \ - LIBDIR="${D}/usr/$(get_libdir)" \ - PREFIX=/usr \ - NV_USE_BUNDLED_LIBJANSSON=0 \ - install - - if use static-libs; then - dolib.a "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/libXNVCtrl.a - - insinto /usr/include/NVCtrl - doins "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/*.h - fi - - insinto /usr/share/nvidia/ - doins nvidia-application-profiles-${PV}-key-documentation - - insinto /etc/nvidia - newins \ - nvidia-application-profiles-${PV}-rc nvidia-application-profiles-rc - - # There is no icon in the FreeBSD tarball. - use kernel_FreeBSD || \ - doicon ${NV_OBJ}/nvidia-settings.png - - domenu "${FILESDIR}"/nvidia-settings.desktop - - exeinto /etc/X11/xinit/xinitrc.d - newexe "${FILESDIR}"/95-nvidia-settings-r1 95-nvidia-settings - fi - - dobin ${NV_OBJ}/nvidia-bug-report.sh - - if has_multilib_profile && use multilib; then - local OABI=${ABI} - for ABI in $(get_install_abis); do - src_install-libs - done - ABI=${OABI} - unset OABI - else - src_install-libs - fi - - is_final_abi || die "failed to iterate through all ABIs" - - 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.${NV_SOVER} ${GL_ROOT}" - "libGL.so.$(usex compat ${NV_SOVER} 1.0.0) ${GL_ROOT}" - "libGLESv1_CM.so.1 ${GL_ROOT}" - "libGLESv1_CM_nvidia.so.${NV_SOVER} ${GL_ROOT}" - "libGLESv2.so.2 ${GL_ROOT}" - "libGLESv2_nvidia.so.${NV_SOVER} ${GL_ROOT}" - "libGLX.so.0 ${GL_ROOT}" - "libGLX_nvidia.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-fatbinaryloader.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}" - "libnvidia-ptxjitcompiler.so.${NV_SOVER}" - "libvdpau_nvidia.so.${NV_SOVER}" - ) - - 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 - fi -} - -pkg_preinst() { - if use driver && 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 driver && 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 driver && 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-361.45.18.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-361.45.18.ebuild deleted file mode 100644 index e8e413de669c..000000000000 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-361.45.18.ebuild +++ /dev/null @@ -1,528 +0,0 @@ -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -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/ http://www.nvidia.com/Download/Find.aspx" -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 ) - tools? ( ftp://download.nvidia.com/XFree86/nvidia-settings/nvidia-settings-${PV}.tar.bz2 ) -" - -LICENSE="GPL-2 NVIDIA-r2" -SLOT="0/${PV%.*}" -KEYWORDS="-* ~amd64 ~x86 ~amd64-fbsd ~x86-fbsd" -RESTRICT="bindist mirror" -EMULTILIB_PKG="true" - -IUSE="acpi compat +driver gtk3 kernel_FreeBSD kernel_linux +kms multilib pax_kernel static-libs +tools uvm +X" -REQUIRED_USE=" - tools? ( X ) - static-libs? ( tools ) -" - -COMMON=" - app-eselect/eselect-opencl - kernel_linux? ( >=sys-libs/glibc-2.6.1 ) - tools? ( - dev-libs/atk - dev-libs/glib:2 - dev-libs/jansson - gtk3? ( x11-libs/gtk+:3 ) - x11-libs/cairo - x11-libs/gdk-pixbuf[X] - x11-libs/gtk+:2 - x11-libs/libX11 - x11-libs/libXext - x11-libs/libXrandr - x11-libs/libXv - x11-libs/libXxf86vm - x11-libs/pango[X] - ) - X? ( - >=app-eselect/eselect-opengl-1.0.9 - app-misc/pax-utils - ) -" -DEPEND=" - ${COMMON} - kernel_linux? ( virtual/linux-sources ) -" -RDEPEND=" - ${COMMON} - acpi? ( sys-power/acpid ) - tools? ( !media-video/nvidia-settings ) - X? ( - <x11-base/xorg-server-1.18.99:= - >=x11-libs/libvdpau-1.0 - 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 5; then - ewarn "Gentoo supports kernels which are supported by NVIDIA" - ewarn "which are limited to the following kernels:" - ewarn "<sys-kernel/gentoo-sources-4.5" - ewarn "<sys-kernel/vanilla-sources-4.5" - 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." - ewarn "" - fi - - # Since Nvidia ships many 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 driver && use kernel_linux; then - MODULE_NAMES="nvidia(video:${S}/kernel)" - use uvm && MODULE_NAMES+=" nvidia-uvm(video:${S}/kernel)" - use kms && MODULE_NAMES+=" nvidia-modeset(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 - - if use kernel_linux && kernel_is lt 2 6 9; then - eerror "You must build this against 2.6.9 or higher kernels." - 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() { - 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}-361.28-pax.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 driver && use kernel_linux; then - MAKEOPTS=-j1 linux-mod_src_compile - fi - - if use tools; then - emake -C "${S}"/nvidia-settings-${PV}/src \ - AR="$(tc-getAR)" \ - CC="$(tc-getCC)" \ - LIBDIR="$(get_libdir)" \ - RANLIB="$(tc-getRANLIB)" \ - build-xnvctrl - - emake -C "${S}"/nvidia-settings-${PV}/src \ - CC="$(tc-getCC)" \ - GTK3_AVAILABLE=$(usex gtk3 1 0) \ - LD="$(tc-getCC)" \ - LIBDIR="$(get_libdir)" \ - NVML_ENABLED=0 \ - NV_USE_BUNDLED_LIBJANSSON=0 \ - NV_VERBOSE=1 \ - STRIP_CMD=true - 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 - nv_LIB="${1}" - - # SOVER to use - nv_SOVER="$(scanelf -qF'%S#F' ${nv_LIB})" - - # Where to install - nv_DEST="${2}" - - # Get just the library name - nv_LIBNAME=$(basename "${nv_LIB}") - - if [[ "${nv_DEST}" ]]; then - exeinto ${nv_DEST} - action="doexe" - else - nv_DEST="/usr/$(get_libdir)" - action="dolib.so" - fi - - # Install the library - ${action} ${nv_LIB} || die "failed to install ${nv_LIBNAME}" - - # If the library has a SONAME and SONAME does not match the library name, - # then we need to create a symlink - if [[ ${nv_SOVER} ]] && ! [[ "${nv_SOVER}" = "${nv_LIBNAME}" ]]; then - dosym ${nv_LIBNAME} ${nv_DEST}/${nv_SOVER} \ - || die "failed to create ${nv_DEST}/${nv_SOVER} symlink" - fi - - dosym ${nv_LIBNAME} ${nv_DEST}/${nv_LIBNAME/.so*/.so} \ - || die "failed to create ${nv_LIBNAME/.so*/.so} symlink" -} - -src_install() { - if use driver && 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 - doins "${FILESDIR}"/nvidia-rmmod.conf - - # Ensures that our device nodes are created when not using X - exeinto "$(get_udevdir)" - newexe "${FILESDIR}"/nvidia-udev.sh-r1 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 - emake -C "${S}"/nvidia-settings-${PV}/src/ \ - DESTDIR="${D}" \ - GTK3_AVAILABLE=$(usex gtk3 1 0) \ - LIBDIR="${D}/usr/$(get_libdir)" \ - PREFIX=/usr \ - NV_USE_BUNDLED_LIBJANSSON=0 \ - install - - if use static-libs; then - dolib.a "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/libXNVCtrl.a - - insinto /usr/include/NVCtrl - doins "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/*.h - fi - - insinto /usr/share/nvidia/ - doins nvidia-application-profiles-${PV}-key-documentation - - insinto /etc/nvidia - newins \ - nvidia-application-profiles-${PV}-rc nvidia-application-profiles-rc - - # There is no icon in the FreeBSD tarball. - use kernel_FreeBSD || \ - doicon ${NV_OBJ}/nvidia-settings.png - - domenu "${FILESDIR}"/nvidia-settings.desktop - - exeinto /etc/X11/xinit/xinitrc.d - newexe "${FILESDIR}"/95-nvidia-settings-r1 95-nvidia-settings - fi - - dobin ${NV_OBJ}/nvidia-bug-report.sh - - if has_multilib_profile && use multilib; then - local OABI=${ABI} - for ABI in $(get_install_abis); do - src_install-libs - done - ABI=${OABI} - unset OABI - else - src_install-libs - fi - - is_final_abi || die "failed to iterate through all ABIs" - - 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.${NV_SOVER} ${GL_ROOT}" - "libGL.so.$(usex compat ${NV_SOVER} 1.0.0) ${GL_ROOT}" - "libGLESv1_CM.so.1 ${GL_ROOT}" - "libGLESv1_CM_nvidia.so.${NV_SOVER} ${GL_ROOT}" - "libGLESv2.so.2 ${GL_ROOT}" - "libGLESv2_nvidia.so.${NV_SOVER} ${GL_ROOT}" - "libGLX.so.0 ${GL_ROOT}" - "libGLX_nvidia.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-fatbinaryloader.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}" - "libnvidia-ptxjitcompiler.so.${NV_SOVER}" - "libvdpau_nvidia.so.${NV_SOVER}" - ) - - 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 - fi -} - -pkg_preinst() { - if use driver && 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 driver && 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 driver && 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-364.19-r1.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-364.19-r1.ebuild deleted file mode 100644 index 5ce6ae9fa3f0..000000000000 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-364.19-r1.ebuild +++ /dev/null @@ -1,547 +0,0 @@ -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -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/ http://www.nvidia.com/Download/Find.aspx" -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 ) - tools? ( ftp://download.nvidia.com/XFree86/nvidia-settings/nvidia-settings-${PV}.tar.bz2 ) -" - -LICENSE="GPL-2 NVIDIA-r2" -SLOT="0/${PV%.*}" -KEYWORDS="-* amd64 x86 ~amd64-fbsd ~x86-fbsd" -RESTRICT="bindist mirror" -EMULTILIB_PKG="true" - -IUSE="acpi compat +driver gtk3 kernel_FreeBSD kernel_linux +kms multilib pax_kernel static-libs +tools uvm wayland +X" -REQUIRED_USE=" - tools? ( X ) - static-libs? ( tools ) -" - -COMMON=" - app-eselect/eselect-opencl - kernel_linux? ( >=sys-libs/glibc-2.6.1 ) - tools? ( - dev-libs/atk - dev-libs/glib:2 - dev-libs/jansson - gtk3? ( x11-libs/gtk+:3 ) - x11-libs/cairo - x11-libs/gdk-pixbuf[X] - x11-libs/gtk+:2 - x11-libs/libX11 - x11-libs/libXext - x11-libs/libXrandr - x11-libs/libXv - x11-libs/libXxf86vm - x11-libs/pango[X] - ) - X? ( - >=app-eselect/eselect-opengl-1.0.9 - app-misc/pax-utils - ) -" -DEPEND=" - ${COMMON} - kernel_linux? ( virtual/linux-sources ) -" -RDEPEND=" - ${COMMON} - acpi? ( sys-power/acpid ) - tools? ( !media-video/nvidia-settings ) - wayland? ( dev-libs/wayland ) - X? ( - <x11-base/xorg-server-1.18.99:= - >=x11-libs/libvdpau-1.0 - 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 6; then - ewarn "Gentoo supports kernels which are supported by NVIDIA" - ewarn "which are limited to the following kernels:" - ewarn "<sys-kernel/gentoo-sources-4.6" - ewarn "<sys-kernel/vanilla-sources-4.6" - 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." - ewarn "" - fi - - # Since Nvidia ships many 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 driver && use kernel_linux; then - MODULE_NAMES="nvidia(video:${S}/kernel)" - use uvm && MODULE_NAMES+=" nvidia-uvm(video:${S}/kernel)" - use kms && MODULE_NAMES+=" nvidia-modeset(video:${S}/kernel) nvidia-drm(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 - - if use kernel_linux && kernel_is lt 2 6 9; then - eerror "You must build this against 2.6.9 or higher kernels." - 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() { - 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}-364.12-pax.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 driver && use kernel_linux; then - MAKEOPTS=-j1 linux-mod_src_compile - fi - - if use tools; then - emake -C "${S}"/nvidia-settings-${PV}/src \ - AR="$(tc-getAR)" \ - CC="$(tc-getCC)" \ - LIBDIR="$(get_libdir)" \ - NV_VERBOSE=1 \ - RANLIB="$(tc-getRANLIB)" \ - DO_STRIP= \ - build-xnvctrl - - emake -C "${S}"/nvidia-settings-${PV}/src \ - CC="$(tc-getCC)" \ - GTK3_AVAILABLE=$(usex gtk3 1 0) \ - LD="$(tc-getCC)" \ - LIBDIR="$(get_libdir)" \ - NVML_ENABLED=0 \ - NV_USE_BUNDLED_LIBJANSSON=0 \ - NV_VERBOSE=1 \ - DO_STRIP= - 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 - nv_LIB="${1}" - - # SOVER to use - nv_SOVER="$(scanelf -qF'%S#F' ${nv_LIB})" - - # Where to install - nv_DEST="${2}" - - # Get just the library name - nv_LIBNAME=$(basename "${nv_LIB}") - - if [[ "${nv_DEST}" ]]; then - exeinto ${nv_DEST} - action="doexe" - else - nv_DEST="/usr/$(get_libdir)" - action="dolib.so" - fi - - # Install the library - ${action} ${nv_LIB} || die "failed to install ${nv_LIBNAME}" - - # If the library has a SONAME and SONAME does not match the library name, - # then we need to create a symlink - if [[ ${nv_SOVER} ]] && ! [[ "${nv_SOVER}" = "${nv_LIBNAME}" ]]; then - dosym ${nv_LIBNAME} ${nv_DEST}/${nv_SOVER} \ - || die "failed to create ${nv_DEST}/${nv_SOVER} symlink" - fi - - dosym ${nv_LIBNAME} ${nv_DEST}/${nv_LIBNAME/.so*/.so} \ - || die "failed to create ${nv_LIBNAME/.so*/.so} symlink" -} - -src_install() { - if use driver && 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 - doins "${FILESDIR}"/nvidia-rmmod.conf - - # Ensures that our device nodes are created when not using X - exeinto "$(get_udevdir)" - newexe "${FILESDIR}"/nvidia-udev.sh-r1 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 - - insinto /etc/vulkan/icd.d - doins nvidia_icd.json - 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 - emake -C "${S}"/nvidia-settings-${PV}/src/ \ - DESTDIR="${D}" \ - GTK3_AVAILABLE=$(usex gtk3 1 0) \ - LIBDIR="${D}/usr/$(get_libdir)" \ - NV_USE_BUNDLED_LIBJANSSON=0 \ - NV_VERBOSE=1 \ - PREFIX=/usr \ - DO_STRIP= \ - install - - if use static-libs; then - dolib.a "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/libXNVCtrl.a - - insinto /usr/include/NVCtrl - doins "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/*.h - fi - - insinto /usr/share/nvidia/ - doins nvidia-application-profiles-${PV}-key-documentation - - insinto /etc/nvidia - newins \ - nvidia-application-profiles-${PV}-rc nvidia-application-profiles-rc - - # There is no icon in the FreeBSD tarball. - use kernel_FreeBSD || \ - doicon ${NV_OBJ}/nvidia-settings.png - - domenu "${FILESDIR}"/nvidia-settings.desktop - - exeinto /etc/X11/xinit/xinitrc.d - newexe "${FILESDIR}"/95-nvidia-settings-r1 95-nvidia-settings - fi - - dobin ${NV_OBJ}/nvidia-bug-report.sh - - if has_multilib_profile && use multilib; then - local OABI=${ABI} - for ABI in $(get_install_abis); do - src_install-libs - done - ABI=${OABI} - unset OABI - else - src_install-libs - fi - - is_final_abi || die "failed to iterate through all ABIs" - - 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.${NV_SOVER} ${GL_ROOT}" - "libGL.so.$(usex compat ${NV_SOVER} 1.0.0) ${GL_ROOT}" - "libGLESv1_CM.so.1 ${GL_ROOT}" - "libGLESv1_CM_nvidia.so.${NV_SOVER} ${GL_ROOT}" - "libGLESv2.so.2 ${GL_ROOT}" - "libGLESv2_nvidia.so.${NV_SOVER} ${GL_ROOT}" - "libGLX.so.0 ${GL_ROOT}" - "libGLX_nvidia.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-fatbinaryloader.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}" - "libnvidia-ptxjitcompiler.so.${NV_SOVER}" - "libvdpau_nvidia.so.${NV_SOVER}" - ) - - if use wayland && has_multilib_profile && [[ ${ABI} == "amd64" ]]; - then - NV_GLX_LIBRARIES+=( - "libnvidia-egl-wayland.so.${NV_SOVER}" - ) - fi - - 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 - fi -} - -pkg_preinst() { - if use driver && 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 driver && 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 driver && 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-364.19-r2.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-364.19-r2.ebuild deleted file mode 100644 index a0179c22bb67..000000000000 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-364.19-r2.ebuild +++ /dev/null @@ -1,548 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -inherit eutils flag-o-matic linux-info linux-mod multilib-minimal 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/ http://www.nvidia.com/Download/Find.aspx" -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 ) - tools? ( ftp://download.nvidia.com/XFree86/nvidia-settings/nvidia-settings-${PV}.tar.bz2 ) -" - -LICENSE="GPL-2 NVIDIA-r2" -SLOT="0/${PV%.*}" -KEYWORDS="-* ~amd64 ~x86 ~amd64-fbsd ~x86-fbsd" -RESTRICT="bindist mirror" -EMULTILIB_PKG="true" - -IUSE="acpi compat +driver gtk3 kernel_FreeBSD kernel_linux +kms multilib pax_kernel static-libs +tools uvm wayland +X" -REQUIRED_USE=" - tools? ( X ) - static-libs? ( tools ) -" - -COMMON=" - app-eselect/eselect-opencl - kernel_linux? ( >=sys-libs/glibc-2.6.1 ) - tools? ( - dev-libs/atk - dev-libs/glib:2 - dev-libs/jansson - gtk3? ( - x11-libs/gtk+:3 - ) - x11-libs/cairo - x11-libs/gdk-pixbuf[X] - x11-libs/gtk+:2 - x11-libs/libX11 - x11-libs/libXext - x11-libs/libXrandr - x11-libs/libXv - x11-libs/libXxf86vm - x11-libs/pango[X] - ) - X? ( - >=app-eselect/eselect-opengl-1.0.9 - app-misc/pax-utils - ) -" -DEPEND=" - ${COMMON} - kernel_linux? ( virtual/linux-sources ) -" -RDEPEND=" - ${COMMON} - acpi? ( sys-power/acpid ) - tools? ( !media-video/nvidia-settings ) - wayland? ( dev-libs/wayland[${MULTILIB_USEDEP}] ) - X? ( - <x11-base/xorg-server-1.18.99:= - >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}] - >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}] - >=x11-libs/libvdpau-1.0[${MULTILIB_USEDEP}] - sys-libs/zlib[${MULTILIB_USEDEP}] - ) -" - -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 6; then - ewarn "Gentoo supports kernels which are supported by NVIDIA" - ewarn "which are limited to the following kernels:" - ewarn "<sys-kernel/gentoo-sources-4.6" - ewarn "<sys-kernel/vanilla-sources-4.6" - ewarn "" - ewarn "You are free to utilize eapply_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." - ewarn "" - fi - - # Since Nvidia ships many 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 driver && use kernel_linux; then - MODULE_NAMES="nvidia(video:${S}/kernel)" - use uvm && MODULE_NAMES+=" nvidia-uvm(video:${S}/kernel)" - use kms && MODULE_NAMES+=" nvidia-modeset(video:${S}/kernel) nvidia-drm(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 - - if use kernel_linux && kernel_is lt 2 6 9; then - eerror "You must build this against 2.6.9 or higher kernels." - 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() { - 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." - eapply "${FILESDIR}"/${PN}-364.12-pax.patch - fi - - # Allow user patches so they can support RC kernels and whatever else - eapply_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 driver && use kernel_linux; then - MAKEOPTS=-j1 linux-mod_src_compile - fi - - if use tools; then - emake -C "${S}"/nvidia-settings-${PV}/src \ - AR="$(tc-getAR)" \ - CC="$(tc-getCC)" \ - LIBDIR="$(get_libdir)" \ - NV_VERBOSE=1 \ - RANLIB="$(tc-getRANLIB)" \ - DO_STRIP= \ - build-xnvctrl - - emake -C "${S}"/nvidia-settings-${PV}/src \ - CC="$(tc-getCC)" \ - GTK3_AVAILABLE=$(usex gtk3 1 0) \ - LD="$(tc-getCC)" \ - LIBDIR="$(get_libdir)" \ - NVML_ENABLED=0 \ - NV_USE_BUNDLED_LIBJANSSON=0 \ - NV_VERBOSE=1 \ - DO_STRIP= - 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 - nv_LIB="${1}" - - # SOVER to use - nv_SOVER="$(scanelf -qF'%S#F' ${nv_LIB})" - - # Where to install - nv_DEST="${2}" - - # Get just the library name - nv_LIBNAME=$(basename "${nv_LIB}") - - if [[ "${nv_DEST}" ]]; then - exeinto ${nv_DEST} - action="doexe" - else - nv_DEST="/usr/$(get_libdir)" - action="dolib.so" - fi - - # Install the library - ${action} ${nv_LIB} || die "failed to install ${nv_LIBNAME}" - - # If the library has a SONAME and SONAME does not match the library name, - # then we need to create a symlink - if [[ ${nv_SOVER} ]] && ! [[ "${nv_SOVER}" = "${nv_LIBNAME}" ]]; then - dosym ${nv_LIBNAME} ${nv_DEST}/${nv_SOVER} \ - || die "failed to create ${nv_DEST}/${nv_SOVER} symlink" - fi - - dosym ${nv_LIBNAME} ${nv_DEST}/${nv_LIBNAME/.so*/.so} \ - || die "failed to create ${nv_LIBNAME/.so*/.so} symlink" -} - -src_install() { - if use driver && 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 - doins "${FILESDIR}"/nvidia-rmmod.conf - - # Ensures that our device nodes are created when not using X - exeinto "$(get_udevdir)" - newexe "${FILESDIR}"/nvidia-udev.sh-r1 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 - - insinto /etc/vulkan/icd.d - doins nvidia_icd.json - 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 - emake -C "${S}"/nvidia-settings-${PV}/src/ \ - DESTDIR="${D}" \ - GTK3_AVAILABLE=$(usex gtk3 1 0) \ - LIBDIR="${D}/usr/$(get_libdir)" \ - NV_USE_BUNDLED_LIBJANSSON=0 \ - NV_VERBOSE=1 \ - PREFIX=/usr \ - DO_STRIP= \ - install - - if use static-libs; then - dolib.a "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/libXNVCtrl.a - - insinto /usr/include/NVCtrl - doins "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/*.h - fi - - insinto /usr/share/nvidia/ - doins nvidia-application-profiles-${PV}-key-documentation - - insinto /etc/nvidia - newins \ - nvidia-application-profiles-${PV}-rc nvidia-application-profiles-rc - - # There is no icon in the FreeBSD tarball. - use kernel_FreeBSD || \ - doicon ${NV_OBJ}/nvidia-settings.png - - domenu "${FILESDIR}"/nvidia-settings.desktop - - exeinto /etc/X11/xinit/xinitrc.d - newexe "${FILESDIR}"/95-nvidia-settings-r1 95-nvidia-settings - fi - - dobin ${NV_OBJ}/nvidia-bug-report.sh - - if has_multilib_profile && use multilib; then - local OABI=${ABI} - for ABI in $(get_install_abis); do - src_install-libs - done - ABI=${OABI} - unset OABI - else - src_install-libs - fi - - is_final_abi || die "failed to iterate through all ABIs" - - 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.${NV_SOVER} ${GL_ROOT}" - "libGL.so.$(usex compat ${NV_SOVER} 1.0.0) ${GL_ROOT}" - "libGLESv1_CM.so.1 ${GL_ROOT}" - "libGLESv1_CM_nvidia.so.${NV_SOVER} ${GL_ROOT}" - "libGLESv2.so.2 ${GL_ROOT}" - "libGLESv2_nvidia.so.${NV_SOVER} ${GL_ROOT}" - "libGLX.so.0 ${GL_ROOT}" - "libGLX_nvidia.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-fatbinaryloader.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}" - "libnvidia-ptxjitcompiler.so.${NV_SOVER}" - "libvdpau_nvidia.so.${NV_SOVER}" - ) - - if use wayland && has_multilib_profile && [[ ${ABI} == "amd64" ]]; - then - NV_GLX_LIBRARIES+=( - "libnvidia-egl-wayland.so.${NV_SOVER}" - ) - fi - - 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 - fi -} - -pkg_preinst() { - if use driver && 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 driver && 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 driver && 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-367.57-r1.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-367.57-r1.ebuild deleted file mode 100644 index a7576025aead..000000000000 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-367.57-r1.ebuild +++ /dev/null @@ -1,551 +0,0 @@ -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -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}" -ARM_NV_PACKAGE="NVIDIA-Linux-armv7l-gnueabihf-${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/ http://www.nvidia.com/Download/Find.aspx" -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 ) - arm? ( ${NV_URI}Linux-x86-ARM/${PV}/${ARM_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 ) - tools? ( ftp://download.nvidia.com/XFree86/nvidia-settings/nvidia-settings-${PV}.tar.bz2 ) -" - -LICENSE="GPL-2 NVIDIA-r2" -SLOT="0/${PV%.*}" -KEYWORDS="-* amd64 x86 ~amd64-fbsd ~x86-fbsd" -RESTRICT="bindist mirror" -EMULTILIB_PKG="true" - -IUSE="acpi compat +driver gtk3 kernel_FreeBSD kernel_linux +kms multilib pax_kernel static-libs +tools uvm wayland +X" -REQUIRED_USE=" - tools? ( X ) - static-libs? ( tools ) -" - -COMMON=" - app-eselect/eselect-opencl - kernel_linux? ( >=sys-libs/glibc-2.6.1 ) - tools? ( - dev-libs/atk - dev-libs/glib:2 - dev-libs/jansson - gtk3? ( x11-libs/gtk+:3 ) - x11-libs/cairo - x11-libs/gdk-pixbuf[X] - x11-libs/gtk+:2 - x11-libs/libX11 - x11-libs/libXext - x11-libs/libXrandr - x11-libs/libXv - x11-libs/libXxf86vm - x11-libs/pango[X] - ) - X? ( - >=app-eselect/eselect-opengl-1.0.9 - app-misc/pax-utils - ) -" -DEPEND=" - ${COMMON} - kernel_linux? ( virtual/linux-sources ) -" -RDEPEND=" - ${COMMON} - acpi? ( sys-power/acpid ) - tools? ( !media-video/nvidia-settings ) - wayland? ( dev-libs/wayland ) - X? ( - <x11-base/xorg-server-1.18.99:= - >=x11-libs/libvdpau-1.0 - 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 9; then - ewarn "Gentoo supports kernels which are supported by NVIDIA" - ewarn "which are limited to the following kernels:" - ewarn "<sys-kernel/gentoo-sources-4.9" - ewarn "<sys-kernel/vanilla-sources-4.9" - 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." - ewarn "" - fi - - # Since Nvidia ships many 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 driver && use kernel_linux; then - MODULE_NAMES="nvidia(video:${S}/kernel)" - use uvm && MODULE_NAMES+=" nvidia-uvm(video:${S}/kernel)" - use kms && MODULE_NAMES+=" nvidia-modeset(video:${S}/kernel) nvidia-drm(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 - - if use kernel_linux && kernel_is lt 2 6 9; then - eerror "You must build this against 2.6.9 or higher kernels." - 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() { - epatch "${FILESDIR}"/${PN}-367.57-profiles-rc.patch - - 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}-367.57-pax.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 driver && use kernel_linux; then - MAKEOPTS=-j1 linux-mod_src_compile - fi - - if use tools; then - emake -C "${S}"/nvidia-settings-${PV}/src \ - AR="$(tc-getAR)" \ - CC="$(tc-getCC)" \ - LIBDIR="$(get_libdir)" \ - NV_VERBOSE=1 \ - RANLIB="$(tc-getRANLIB)" \ - DO_STRIP= \ - build-xnvctrl - - emake -C "${S}"/nvidia-settings-${PV}/src \ - CC="$(tc-getCC)" \ - GTK3_AVAILABLE=$(usex gtk3 1 0) \ - LD="$(tc-getCC)" \ - LIBDIR="$(get_libdir)" \ - NVML_ENABLED=0 \ - NV_USE_BUNDLED_LIBJANSSON=0 \ - NV_VERBOSE=1 \ - DO_STRIP= - 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 - nv_LIB="${1}" - - # SOVER to use - nv_SOVER="$(scanelf -qF'%S#F' ${nv_LIB})" - - # Where to install - nv_DEST="${2}" - - # Get just the library name - nv_LIBNAME=$(basename "${nv_LIB}") - - if [[ "${nv_DEST}" ]]; then - exeinto ${nv_DEST} - action="doexe" - else - nv_DEST="/usr/$(get_libdir)" - action="dolib.so" - fi - - # Install the library - ${action} ${nv_LIB} || die "failed to install ${nv_LIBNAME}" - - # If the library has a SONAME and SONAME does not match the library name, - # then we need to create a symlink - if [[ ${nv_SOVER} ]] && ! [[ "${nv_SOVER}" = "${nv_LIBNAME}" ]]; then - dosym ${nv_LIBNAME} ${nv_DEST}/${nv_SOVER} \ - || die "failed to create ${nv_DEST}/${nv_SOVER} symlink" - fi - - dosym ${nv_LIBNAME} ${nv_DEST}/${nv_LIBNAME/.so*/.so} \ - || die "failed to create ${nv_LIBNAME/.so*/.so} symlink" -} - -src_install() { - if use driver && 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 - doins "${FILESDIR}"/nvidia-rmmod.conf - - # Ensures that our device nodes are created when not using X - exeinto "$(get_udevdir)" - newexe "${FILESDIR}"/nvidia-udev.sh-r1 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 - - insinto /etc/vulkan/icd.d - doins nvidia_icd.json - 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 - emake -C "${S}"/nvidia-settings-${PV}/src/ \ - DESTDIR="${D}" \ - GTK3_AVAILABLE=$(usex gtk3 1 0) \ - LIBDIR="${D}/usr/$(get_libdir)" \ - NV_USE_BUNDLED_LIBJANSSON=0 \ - NV_VERBOSE=1 \ - PREFIX=/usr \ - DO_STRIP= \ - install - - if use static-libs; then - dolib.a "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/libXNVCtrl.a - - insinto /usr/include/NVCtrl - doins "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/*.h - fi - - insinto /usr/share/nvidia/ - doins nvidia-application-profiles-${PV}-key-documentation - - insinto /etc/nvidia - newins \ - nvidia-application-profiles-${PV}-rc nvidia-application-profiles-rc - - # There is no icon in the FreeBSD tarball. - use kernel_FreeBSD || \ - doicon ${NV_OBJ}/nvidia-settings.png - - domenu "${FILESDIR}"/nvidia-settings.desktop - - exeinto /etc/X11/xinit/xinitrc.d - newexe "${FILESDIR}"/95-nvidia-settings-r1 95-nvidia-settings - fi - - dobin ${NV_OBJ}/nvidia-bug-report.sh - - if has_multilib_profile && use multilib; then - local OABI=${ABI} - for ABI in $(get_install_abis); do - src_install-libs - done - ABI=${OABI} - unset OABI - else - src_install-libs - fi - - is_final_abi || die "failed to iterate through all ABIs" - - 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.${NV_SOVER} ${GL_ROOT}" - "libGL.so.$(usex compat ${NV_SOVER} 1.0.0) ${GL_ROOT}" - "libGLESv1_CM.so.1 ${GL_ROOT}" - "libGLESv1_CM_nvidia.so.${NV_SOVER} ${GL_ROOT}" - "libGLESv2.so.2 ${GL_ROOT}" - "libGLESv2_nvidia.so.${NV_SOVER} ${GL_ROOT}" - "libGLX.so.0 ${GL_ROOT}" - "libGLX_nvidia.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-fatbinaryloader.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}" - "libnvidia-ptxjitcompiler.so.${NV_SOVER}" - "libvdpau_nvidia.so.${NV_SOVER}" - ) - - if use wayland && has_multilib_profile && [[ ${ABI} == "amd64" ]]; - then - NV_GLX_LIBRARIES+=( - "libnvidia-egl-wayland.so.${NV_SOVER}" - ) - fi - - 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 - fi -} - -pkg_preinst() { - if use driver && 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 driver && 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 driver && 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-367.57-r2.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-367.57-r2.ebuild deleted file mode 100644 index d7c31e087d50..000000000000 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-367.57-r2.ebuild +++ /dev/null @@ -1,552 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=5 - -inherit eutils flag-o-matic linux-info linux-mod multilib-minimal 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}" -ARM_NV_PACKAGE="NVIDIA-Linux-armv7l-gnueabihf-${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/ http://www.nvidia.com/Download/Find.aspx" -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 ) - arm? ( ${NV_URI}Linux-x86-ARM/${PV}/${ARM_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 ) - tools? ( ftp://download.nvidia.com/XFree86/nvidia-settings/nvidia-settings-${PV}.tar.bz2 ) -" - -LICENSE="GPL-2 NVIDIA-r2" -SLOT="0/${PV%.*}" -KEYWORDS="-* ~amd64 ~x86 ~amd64-fbsd ~x86-fbsd" -RESTRICT="bindist mirror" -EMULTILIB_PKG="true" - -IUSE="acpi compat +driver gtk3 kernel_FreeBSD kernel_linux +kms multilib pax_kernel static-libs +tools uvm wayland +X" -REQUIRED_USE=" - tools? ( X ) - static-libs? ( tools ) -" - -COMMON=" - app-eselect/eselect-opencl - kernel_linux? ( >=sys-libs/glibc-2.6.1 ) - tools? ( - dev-libs/atk - dev-libs/glib:2 - dev-libs/jansson - gtk3? ( - x11-libs/gtk+:3 - ) - x11-libs/cairo - x11-libs/gdk-pixbuf[X] - x11-libs/gtk+:2 - x11-libs/libX11 - x11-libs/libXext - x11-libs/libXrandr - x11-libs/libXv - x11-libs/libXxf86vm - x11-libs/pango[X] - ) - X? ( - >=app-eselect/eselect-opengl-1.0.9 - app-misc/pax-utils - ) -" -DEPEND=" - ${COMMON} - kernel_linux? ( virtual/linux-sources ) -" -RDEPEND=" - ${COMMON} - acpi? ( sys-power/acpid ) - tools? ( !media-video/nvidia-settings ) - wayland? ( dev-libs/wayland[${MULTILIB_USEDEP}] ) - X? ( - <x11-base/xorg-server-1.18.99:= - >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}] - >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}] - >=x11-libs/libvdpau-1.0[${MULTILIB_USEDEP}] - sys-libs/zlib[${MULTILIB_USEDEP}] - ) -" - -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 9; then - ewarn "Gentoo supports kernels which are supported by NVIDIA" - ewarn "which are limited to the following kernels:" - ewarn "<sys-kernel/gentoo-sources-4.9" - ewarn "<sys-kernel/vanilla-sources-4.9" - 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." - ewarn "" - fi - - # Since Nvidia ships many 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 driver && use kernel_linux; then - MODULE_NAMES="nvidia(video:${S}/kernel)" - use uvm && MODULE_NAMES+=" nvidia-uvm(video:${S}/kernel)" - use kms && MODULE_NAMES+=" nvidia-modeset(video:${S}/kernel) nvidia-drm(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 - - if use kernel_linux && kernel_is lt 2 6 9; then - eerror "You must build this against 2.6.9 or higher kernels." - 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() { - epatch "${FILESDIR}"/${PN}-367.57-profiles-rc.patch - - 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}-367.57-pax.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 driver && use kernel_linux; then - MAKEOPTS=-j1 linux-mod_src_compile - fi - - if use tools; then - emake -C "${S}"/nvidia-settings-${PV}/src \ - AR="$(tc-getAR)" \ - CC="$(tc-getCC)" \ - LIBDIR="$(get_libdir)" \ - NV_VERBOSE=1 \ - RANLIB="$(tc-getRANLIB)" \ - DO_STRIP= \ - build-xnvctrl - - emake -C "${S}"/nvidia-settings-${PV}/src \ - CC="$(tc-getCC)" \ - GTK3_AVAILABLE=$(usex gtk3 1 0) \ - LD="$(tc-getCC)" \ - LIBDIR="$(get_libdir)" \ - NVML_ENABLED=0 \ - NV_USE_BUNDLED_LIBJANSSON=0 \ - NV_VERBOSE=1 \ - DO_STRIP= - 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 - nv_LIB="${1}" - - # SOVER to use - nv_SOVER="$(scanelf -qF'%S#F' ${nv_LIB})" - - # Where to install - nv_DEST="${2}" - - # Get just the library name - nv_LIBNAME=$(basename "${nv_LIB}") - - if [[ "${nv_DEST}" ]]; then - exeinto ${nv_DEST} - action="doexe" - else - nv_DEST="/usr/$(get_libdir)" - action="dolib.so" - fi - - # Install the library - ${action} ${nv_LIB} || die "failed to install ${nv_LIBNAME}" - - # If the library has a SONAME and SONAME does not match the library name, - # then we need to create a symlink - if [[ ${nv_SOVER} ]] && ! [[ "${nv_SOVER}" = "${nv_LIBNAME}" ]]; then - dosym ${nv_LIBNAME} ${nv_DEST}/${nv_SOVER} \ - || die "failed to create ${nv_DEST}/${nv_SOVER} symlink" - fi - - dosym ${nv_LIBNAME} ${nv_DEST}/${nv_LIBNAME/.so*/.so} \ - || die "failed to create ${nv_LIBNAME/.so*/.so} symlink" -} - -src_install() { - if use driver && 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 - doins "${FILESDIR}"/nvidia-rmmod.conf - - # Ensures that our device nodes are created when not using X - exeinto "$(get_udevdir)" - newexe "${FILESDIR}"/nvidia-udev.sh-r1 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 - - insinto /etc/vulkan/icd.d - doins nvidia_icd.json - 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 - emake -C "${S}"/nvidia-settings-${PV}/src/ \ - DESTDIR="${D}" \ - GTK3_AVAILABLE=$(usex gtk3 1 0) \ - LIBDIR="${D}/usr/$(get_libdir)" \ - NV_USE_BUNDLED_LIBJANSSON=0 \ - NV_VERBOSE=1 \ - PREFIX=/usr \ - DO_STRIP= \ - install - - if use static-libs; then - dolib.a "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/libXNVCtrl.a - - insinto /usr/include/NVCtrl - doins "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/*.h - fi - - insinto /usr/share/nvidia/ - doins nvidia-application-profiles-${PV}-key-documentation - - insinto /etc/nvidia - newins \ - nvidia-application-profiles-${PV}-rc nvidia-application-profiles-rc - - # There is no icon in the FreeBSD tarball. - use kernel_FreeBSD || \ - doicon ${NV_OBJ}/nvidia-settings.png - - domenu "${FILESDIR}"/nvidia-settings.desktop - - exeinto /etc/X11/xinit/xinitrc.d - newexe "${FILESDIR}"/95-nvidia-settings-r1 95-nvidia-settings - fi - - dobin ${NV_OBJ}/nvidia-bug-report.sh - - if has_multilib_profile && use multilib; then - local OABI=${ABI} - for ABI in $(get_install_abis); do - src_install-libs - done - ABI=${OABI} - unset OABI - else - src_install-libs - fi - - is_final_abi || die "failed to iterate through all ABIs" - - 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.${NV_SOVER} ${GL_ROOT}" - "libGL.so.$(usex compat ${NV_SOVER} 1.0.0) ${GL_ROOT}" - "libGLESv1_CM.so.1 ${GL_ROOT}" - "libGLESv1_CM_nvidia.so.${NV_SOVER} ${GL_ROOT}" - "libGLESv2.so.2 ${GL_ROOT}" - "libGLESv2_nvidia.so.${NV_SOVER} ${GL_ROOT}" - "libGLX.so.0 ${GL_ROOT}" - "libGLX_nvidia.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-fatbinaryloader.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}" - "libnvidia-ptxjitcompiler.so.${NV_SOVER}" - "libvdpau_nvidia.so.${NV_SOVER}" - ) - - if use wayland && has_multilib_profile && [[ ${ABI} == "amd64" ]]; - then - NV_GLX_LIBRARIES+=( - "libnvidia-egl-wayland.so.${NV_SOVER}" - ) - fi - - 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 - fi -} - -pkg_preinst() { - if use driver && 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 driver && 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 driver && 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-370.28-r1.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-370.28-r1.ebuild deleted file mode 100644 index 403c7b8d0037..000000000000 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-370.28-r1.ebuild +++ /dev/null @@ -1,551 +0,0 @@ -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -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}" -ARM_NV_PACKAGE="NVIDIA-Linux-armv7l-gnueabihf-${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/ http://www.nvidia.com/Download/Find.aspx" -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 ) - arm? ( ${NV_URI}Linux-x86-ARM/${PV}/${ARM_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 ) - tools? ( ftp://download.nvidia.com/XFree86/nvidia-settings/nvidia-settings-${PV}.tar.bz2 ) -" - -LICENSE="GPL-2 NVIDIA-r2" -SLOT="0/${PV%.*}" -KEYWORDS="-* amd64 x86 ~amd64-fbsd ~x86-fbsd" -RESTRICT="bindist mirror" -EMULTILIB_PKG="true" - -IUSE="acpi compat +driver gtk3 kernel_FreeBSD kernel_linux +kms multilib pax_kernel static-libs +tools uvm wayland +X" -REQUIRED_USE=" - tools? ( X ) - static-libs? ( tools ) -" - -COMMON=" - app-eselect/eselect-opencl - kernel_linux? ( >=sys-libs/glibc-2.6.1 ) - tools? ( - dev-libs/atk - dev-libs/glib:2 - dev-libs/jansson - gtk3? ( x11-libs/gtk+:3 ) - x11-libs/cairo - x11-libs/gdk-pixbuf[X] - x11-libs/gtk+:2 - x11-libs/libX11 - x11-libs/libXext - x11-libs/libXrandr - x11-libs/libXv - x11-libs/libXxf86vm - x11-libs/pango[X] - ) - X? ( - >=app-eselect/eselect-opengl-1.0.9 - app-misc/pax-utils - ) -" -DEPEND=" - ${COMMON} - kernel_linux? ( virtual/linux-sources ) -" -RDEPEND=" - ${COMMON} - acpi? ( sys-power/acpid ) - tools? ( !media-video/nvidia-settings ) - wayland? ( dev-libs/wayland ) - X? ( - <x11-base/xorg-server-1.18.99:= - >=x11-libs/libvdpau-1.0 - 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 8; then - ewarn "Gentoo supports kernels which are supported by NVIDIA" - ewarn "which are limited to the following kernels:" - ewarn "<sys-kernel/gentoo-sources-4.8" - ewarn "<sys-kernel/vanilla-sources-4.8" - 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." - ewarn "" - fi - - # Since Nvidia ships many 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 driver && use kernel_linux; then - MODULE_NAMES="nvidia(video:${S}/kernel)" - use uvm && MODULE_NAMES+=" nvidia-uvm(video:${S}/kernel)" - use kms && MODULE_NAMES+=" nvidia-modeset(video:${S}/kernel) nvidia-drm(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 - - if use kernel_linux && kernel_is lt 2 6 9; then - eerror "You must build this against 2.6.9 or higher kernels." - 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() { - epatch "${FILESDIR}"/${P}-profiles-rc.patch - - 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}-367.35-pax.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 driver && use kernel_linux; then - MAKEOPTS=-j1 linux-mod_src_compile - fi - - if use tools; then - emake -C "${S}"/nvidia-settings-${PV}/src \ - AR="$(tc-getAR)" \ - CC="$(tc-getCC)" \ - LIBDIR="$(get_libdir)" \ - NV_VERBOSE=1 \ - RANLIB="$(tc-getRANLIB)" \ - DO_STRIP= \ - build-xnvctrl - - emake -C "${S}"/nvidia-settings-${PV}/src \ - CC="$(tc-getCC)" \ - GTK3_AVAILABLE=$(usex gtk3 1 0) \ - LD="$(tc-getCC)" \ - LIBDIR="$(get_libdir)" \ - NVML_ENABLED=0 \ - NV_USE_BUNDLED_LIBJANSSON=0 \ - NV_VERBOSE=1 \ - DO_STRIP= - 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 - nv_LIB="${1}" - - # SOVER to use - nv_SOVER="$(scanelf -qF'%S#F' ${nv_LIB})" - - # Where to install - nv_DEST="${2}" - - # Get just the library name - nv_LIBNAME=$(basename "${nv_LIB}") - - if [[ "${nv_DEST}" ]]; then - exeinto ${nv_DEST} - action="doexe" - else - nv_DEST="/usr/$(get_libdir)" - action="dolib.so" - fi - - # Install the library - ${action} ${nv_LIB} || die "failed to install ${nv_LIBNAME}" - - # If the library has a SONAME and SONAME does not match the library name, - # then we need to create a symlink - if [[ ${nv_SOVER} ]] && ! [[ "${nv_SOVER}" = "${nv_LIBNAME}" ]]; then - dosym ${nv_LIBNAME} ${nv_DEST}/${nv_SOVER} \ - || die "failed to create ${nv_DEST}/${nv_SOVER} symlink" - fi - - dosym ${nv_LIBNAME} ${nv_DEST}/${nv_LIBNAME/.so*/.so} \ - || die "failed to create ${nv_LIBNAME/.so*/.so} symlink" -} - -src_install() { - if use driver && 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 - doins "${FILESDIR}"/nvidia-rmmod.conf - - # Ensures that our device nodes are created when not using X - exeinto "$(get_udevdir)" - newexe "${FILESDIR}"/nvidia-udev.sh-r1 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 - - insinto /etc/vulkan/icd.d - doins nvidia_icd.json - 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 - emake -C "${S}"/nvidia-settings-${PV}/src/ \ - DESTDIR="${D}" \ - GTK3_AVAILABLE=$(usex gtk3 1 0) \ - LIBDIR="${D}/usr/$(get_libdir)" \ - NV_USE_BUNDLED_LIBJANSSON=0 \ - NV_VERBOSE=1 \ - PREFIX=/usr \ - DO_STRIP= \ - install - - if use static-libs; then - dolib.a "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/libXNVCtrl.a - - insinto /usr/include/NVCtrl - doins "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/*.h - fi - - insinto /usr/share/nvidia/ - doins nvidia-application-profiles-${PV}-key-documentation - - insinto /etc/nvidia - newins \ - nvidia-application-profiles-${PV}-rc nvidia-application-profiles-rc - - # There is no icon in the FreeBSD tarball. - use kernel_FreeBSD || \ - doicon ${NV_OBJ}/nvidia-settings.png - - domenu "${FILESDIR}"/nvidia-settings.desktop - - exeinto /etc/X11/xinit/xinitrc.d - newexe "${FILESDIR}"/95-nvidia-settings-r1 95-nvidia-settings - fi - - dobin ${NV_OBJ}/nvidia-bug-report.sh - - if has_multilib_profile && use multilib; then - local OABI=${ABI} - for ABI in $(get_install_abis); do - src_install-libs - done - ABI=${OABI} - unset OABI - else - src_install-libs - fi - - is_final_abi || die "failed to iterate through all ABIs" - - 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.${NV_SOVER} ${GL_ROOT}" - "libGL.so.$(usex compat ${NV_SOVER} 1.0.0) ${GL_ROOT}" - "libGLESv1_CM.so.1 ${GL_ROOT}" - "libGLESv1_CM_nvidia.so.${NV_SOVER} ${GL_ROOT}" - "libGLESv2.so.2 ${GL_ROOT}" - "libGLESv2_nvidia.so.${NV_SOVER} ${GL_ROOT}" - "libGLX.so.0 ${GL_ROOT}" - "libGLX_nvidia.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-fatbinaryloader.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}" - "libnvidia-ptxjitcompiler.so.${NV_SOVER}" - "libvdpau_nvidia.so.${NV_SOVER}" - ) - - if use wayland && has_multilib_profile && [[ ${ABI} == "amd64" ]]; - then - NV_GLX_LIBRARIES+=( - "libnvidia-egl-wayland.so.${NV_SOVER}" - ) - fi - - 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 - fi -} - -pkg_preinst() { - if use driver && 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 driver && 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 driver && 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-370.28-r2.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-370.28-r2.ebuild deleted file mode 100644 index 88425bac1ca5..000000000000 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-370.28-r2.ebuild +++ /dev/null @@ -1,552 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=5 - -inherit eutils flag-o-matic linux-info linux-mod multilib-minimal 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}" -ARM_NV_PACKAGE="NVIDIA-Linux-armv7l-gnueabihf-${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/ http://www.nvidia.com/Download/Find.aspx" -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 ) - arm? ( ${NV_URI}Linux-x86-ARM/${PV}/${ARM_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 ) - tools? ( ftp://download.nvidia.com/XFree86/nvidia-settings/nvidia-settings-${PV}.tar.bz2 ) -" - -LICENSE="GPL-2 NVIDIA-r2" -SLOT="0/${PV%.*}" -KEYWORDS="-* ~amd64 ~x86 ~amd64-fbsd ~x86-fbsd" -RESTRICT="bindist mirror" -EMULTILIB_PKG="true" - -IUSE="acpi compat +driver gtk3 kernel_FreeBSD kernel_linux +kms multilib pax_kernel static-libs +tools uvm wayland +X" -REQUIRED_USE=" - tools? ( X ) - static-libs? ( tools ) -" - -COMMON=" - app-eselect/eselect-opencl - kernel_linux? ( >=sys-libs/glibc-2.6.1 ) - tools? ( - dev-libs/atk - dev-libs/glib:2 - dev-libs/jansson - gtk3? ( - x11-libs/gtk+:3 - ) - x11-libs/cairo - x11-libs/gdk-pixbuf[X] - x11-libs/gtk+:2 - x11-libs/libX11 - x11-libs/libXext - x11-libs/libXrandr - x11-libs/libXv - x11-libs/libXxf86vm - x11-libs/pango[X] - ) - X? ( - >=app-eselect/eselect-opengl-1.0.9 - app-misc/pax-utils - ) -" -DEPEND=" - ${COMMON} - kernel_linux? ( virtual/linux-sources ) -" -RDEPEND=" - ${COMMON} - acpi? ( sys-power/acpid ) - tools? ( !media-video/nvidia-settings ) - wayland? ( dev-libs/wayland[${MULTILIB_USEDEP}] ) - X? ( - <x11-base/xorg-server-1.18.99:= - >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}] - >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}] - >=x11-libs/libvdpau-1.0[${MULTILIB_USEDEP}] - sys-libs/zlib[${MULTILIB_USEDEP}] - ) -" - -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 8; then - ewarn "Gentoo supports kernels which are supported by NVIDIA" - ewarn "which are limited to the following kernels:" - ewarn "<sys-kernel/gentoo-sources-4.8" - ewarn "<sys-kernel/vanilla-sources-4.8" - 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." - ewarn "" - fi - - # Since Nvidia ships many 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 driver && use kernel_linux; then - MODULE_NAMES="nvidia(video:${S}/kernel)" - use uvm && MODULE_NAMES+=" nvidia-uvm(video:${S}/kernel)" - use kms && MODULE_NAMES+=" nvidia-modeset(video:${S}/kernel) nvidia-drm(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 - - if use kernel_linux && kernel_is lt 2 6 9; then - eerror "You must build this against 2.6.9 or higher kernels." - 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() { - epatch "${FILESDIR}"/${P}-profiles-rc.patch - - 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}-367.35-pax.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 driver && use kernel_linux; then - MAKEOPTS=-j1 linux-mod_src_compile - fi - - if use tools; then - emake -C "${S}"/nvidia-settings-${PV}/src \ - AR="$(tc-getAR)" \ - CC="$(tc-getCC)" \ - LIBDIR="$(get_libdir)" \ - NV_VERBOSE=1 \ - RANLIB="$(tc-getRANLIB)" \ - DO_STRIP= \ - build-xnvctrl - - emake -C "${S}"/nvidia-settings-${PV}/src \ - CC="$(tc-getCC)" \ - GTK3_AVAILABLE=$(usex gtk3 1 0) \ - LD="$(tc-getCC)" \ - LIBDIR="$(get_libdir)" \ - NVML_ENABLED=0 \ - NV_USE_BUNDLED_LIBJANSSON=0 \ - NV_VERBOSE=1 \ - DO_STRIP= - 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 - nv_LIB="${1}" - - # SOVER to use - nv_SOVER="$(scanelf -qF'%S#F' ${nv_LIB})" - - # Where to install - nv_DEST="${2}" - - # Get just the library name - nv_LIBNAME=$(basename "${nv_LIB}") - - if [[ "${nv_DEST}" ]]; then - exeinto ${nv_DEST} - action="doexe" - else - nv_DEST="/usr/$(get_libdir)" - action="dolib.so" - fi - - # Install the library - ${action} ${nv_LIB} || die "failed to install ${nv_LIBNAME}" - - # If the library has a SONAME and SONAME does not match the library name, - # then we need to create a symlink - if [[ ${nv_SOVER} ]] && ! [[ "${nv_SOVER}" = "${nv_LIBNAME}" ]]; then - dosym ${nv_LIBNAME} ${nv_DEST}/${nv_SOVER} \ - || die "failed to create ${nv_DEST}/${nv_SOVER} symlink" - fi - - dosym ${nv_LIBNAME} ${nv_DEST}/${nv_LIBNAME/.so*/.so} \ - || die "failed to create ${nv_LIBNAME/.so*/.so} symlink" -} - -src_install() { - if use driver && 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 - doins "${FILESDIR}"/nvidia-rmmod.conf - - # Ensures that our device nodes are created when not using X - exeinto "$(get_udevdir)" - newexe "${FILESDIR}"/nvidia-udev.sh-r1 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 - - insinto /etc/vulkan/icd.d - doins nvidia_icd.json - 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 - emake -C "${S}"/nvidia-settings-${PV}/src/ \ - DESTDIR="${D}" \ - GTK3_AVAILABLE=$(usex gtk3 1 0) \ - LIBDIR="${D}/usr/$(get_libdir)" \ - NV_USE_BUNDLED_LIBJANSSON=0 \ - NV_VERBOSE=1 \ - PREFIX=/usr \ - DO_STRIP= \ - install - - if use static-libs; then - dolib.a "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/libXNVCtrl.a - - insinto /usr/include/NVCtrl - doins "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/*.h - fi - - insinto /usr/share/nvidia/ - doins nvidia-application-profiles-${PV}-key-documentation - - insinto /etc/nvidia - newins \ - nvidia-application-profiles-${PV}-rc nvidia-application-profiles-rc - - # There is no icon in the FreeBSD tarball. - use kernel_FreeBSD || \ - doicon ${NV_OBJ}/nvidia-settings.png - - domenu "${FILESDIR}"/nvidia-settings.desktop - - exeinto /etc/X11/xinit/xinitrc.d - newexe "${FILESDIR}"/95-nvidia-settings-r1 95-nvidia-settings - fi - - dobin ${NV_OBJ}/nvidia-bug-report.sh - - if has_multilib_profile && use multilib; then - local OABI=${ABI} - for ABI in $(get_install_abis); do - src_install-libs - done - ABI=${OABI} - unset OABI - else - src_install-libs - fi - - is_final_abi || die "failed to iterate through all ABIs" - - 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.${NV_SOVER} ${GL_ROOT}" - "libGL.so.$(usex compat ${NV_SOVER} 1.0.0) ${GL_ROOT}" - "libGLESv1_CM.so.1 ${GL_ROOT}" - "libGLESv1_CM_nvidia.so.${NV_SOVER} ${GL_ROOT}" - "libGLESv2.so.2 ${GL_ROOT}" - "libGLESv2_nvidia.so.${NV_SOVER} ${GL_ROOT}" - "libGLX.so.0 ${GL_ROOT}" - "libGLX_nvidia.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-fatbinaryloader.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}" - "libnvidia-ptxjitcompiler.so.${NV_SOVER}" - "libvdpau_nvidia.so.${NV_SOVER}" - ) - - if use wayland && has_multilib_profile && [[ ${ABI} == "amd64" ]]; - then - NV_GLX_LIBRARIES+=( - "libnvidia-egl-wayland.so.${NV_SOVER}" - ) - fi - - 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 - fi -} - -pkg_preinst() { - if use driver && 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 driver && 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 driver && use kernel_linux && linux-mod_pkg_postrm - use X && "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 -} |