Gentoo Archives: gentoo-commits

From: Jeroen Roovers <jer@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: x11-drivers/nvidia-drivers/, x11-drivers/nvidia-drivers/files/
Date: Wed, 16 Jan 2019 10:01:02
Message-Id: 1547632843.eb22dfef2d7c2ae67f092cbbdd9a0631ca609f56.jer@gentoo
1 commit: eb22dfef2d7c2ae67f092cbbdd9a0631ca609f56
2 Author: Jeroen Roovers <jer <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jan 16 09:59:29 2019 +0000
4 Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org>
5 CommitDate: Wed Jan 16 10:00:43 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eb22dfef
7
8 x11-drivers/nvidia-drivers: Drop unmaintained branches
9
10 Bug: https://bugs.gentoo.org/669588
11 Closes: https://bugs.gentoo.org/673392
12 Closes: https://bugs.gentoo.org/673490
13 Package-Manager: Portage-2.3.56, Repoman-2.3.12
14 Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>
15
16 x11-drivers/nvidia-drivers/Manifest | 38 --
17 .../files/nvidia-drivers-375.82-profiles-rc.patch | 11 -
18 .../files/nvidia-drivers-pax-const.patch | 17 -
19 .../files/nvidia-drivers-pax-usercopy.patch | 54 --
20 .../nvidia-drivers/nvidia-drivers-304.137.ebuild | 499 ------------------
21 .../nvidia-drivers/nvidia-drivers-375.82.ebuild | 569 --------------------
22 .../nvidia-drivers/nvidia-drivers-378.13-r1.ebuild | 572 --------------------
23 .../nvidia-drivers/nvidia-drivers-381.22-r1.ebuild | 573 --------------------
24 .../nvidia-drivers/nvidia-drivers-384.130.ebuild | 581 --------------------
25 .../nvidia-drivers/nvidia-drivers-387.34.ebuild | 586 ---------------------
26 .../nvidia-drivers/nvidia-drivers-396.54.ebuild | 581 --------------------
27 11 files changed, 4081 deletions(-)
28
29 diff --git a/x11-drivers/nvidia-drivers/Manifest b/x11-drivers/nvidia-drivers/Manifest
30 index 591b18640db..34ef26714d8 100644
31 --- a/x11-drivers/nvidia-drivers/Manifest
32 +++ b/x11-drivers/nvidia-drivers/Manifest
33 @@ -1,58 +1,20 @@
34 -DIST NVIDIA-FreeBSD-x86-304.137.tar.gz 35399011 BLAKE2B 823726e4a54f029a47b4c473718099b97d0364b19ac73d36111c0e3552af9a896f60c2aef0eac05d84eb7386fd32ff0a33b2b26d572b6803fddf3c9df0443caa SHA512 9bab183289461d915371b7b5b34e66fdfe8ffff945806dbdf00e0e1cc7242f7b74a0acfc6ed24c3643a6d51edc837cd905ba3b224c30040b0f40d662dc6e7a6d
35 DIST NVIDIA-FreeBSD-x86-340.107.tar.gz 60305952 BLAKE2B b634bfd610653f1c546b68e87d934c5d0e25a2e5be6df15e0cb6016793274b4cf08577669e61c35976f3482da2221b05797459b2814965bcfdbf519c8a6d2681 SHA512 fe09e1b3dd870a07b4edd163d302e2d98f00e139d05a8fa627c292182b61d2bd9b37eb746d639ba592dcf90fecedc57430cf1ef76b6522785ffcb3fd46fe9ba0
36 -DIST NVIDIA-FreeBSD-x86-375.82.tar.gz 59566154 BLAKE2B b888b08cd434899ff73f04a855b47f9416ab247f63023f742dff55e9249d20b8da07bc5cd42e6d555cd9a8ecc62c97821ae09dce1986f0ac2384a16a70c7f181 SHA512 6747bf6d6278c6ed0828c6fdcad5353e516f28384609a3f0a885966707eebb096926a876c17843bfa7626a01a6d4e0ab12c781faf9ac0291771b195c9eb13d85
37 -DIST NVIDIA-FreeBSD-x86-378.13.tar.gz 59610253 BLAKE2B 723b392b869dd5cc9244cfe9df371fc6df6b4ebc4c1f01082fd79b2bbd0cbf4e670cfb69511f1773d28f6fc51a8801777dd6e3066f50fc96888a9efa467e459e SHA512 a0101201089df2bbf5bdc4ded2228dd989da6a47da31c3ec8d55916b1ff3457924555f82c7381934745fdc1b1f8f78e3fc10e5089279eb13423628dbfe560c6b
38 -DIST NVIDIA-FreeBSD-x86-381.22.tar.gz 60112159 BLAKE2B 4a61e9a09218eb7d259f82d0a43fee313754004c8716e921b9a83a3e87fff9a291450bef5d7304b2a7ddf5750a830fb7c5cc9dab890dac4a714354265ca25034 SHA512 ffe5882051fad081854e7b7fefe86a4da55b263b2ca217664991a7e0d84ff2f22d62a37c89afd578f3c99c12be897e5db7a3d1c71c747df655af8e220eb983fa
39 -DIST NVIDIA-FreeBSD-x86-384.130.tar.gz 63719036 BLAKE2B 971006aec05f5bb8f815420f5e1a62103119ae0192a275cc4df3034c20908ebcb8d5a886e030ec06a854102a79e2b31d53c2fcbf3450cb7fa0d9e1f64eeb835f SHA512 54d6d0776190d12f2562fe0ffdf82661fb8a0a4d3d575386a19f5dd5890a7ae4d2ad6704253e7cded62a9a0e1880f1bee9e6bf3aeeb8ce7a265a3d077b0c8018
40 -DIST NVIDIA-FreeBSD-x86-387.34.tar.gz 64228643 BLAKE2B 80011df5d037cd0a2a6faccf6c990e6019cb85c906c1410d4dde033a8a945ecd46e80a1315e46dc05fa47003eb328c6b8e8e41e18dce60942e645c0e6b813717 SHA512 875648459a149d506b20eb7105e73086e1fb51dddfbd8b484b8cc4793682c088ba16b3d374b0e807738f7aa7489dd9eab2449f70bc9feefeec0bf3a88025b9ef
41 DIST NVIDIA-FreeBSD-x86-390.87.tar.gz 64326801 BLAKE2B 91cf9e77040d8c710a0fef58f9bae685a86962f8460a5d55e2c0733dc7bd2050c910bbd0732bb89efb8550d501b08c02e0587118ea767ba768dcf1c356e0e872 SHA512 b7ff9f4e61de08c0626e5e55c1f51e3451640043066944d791f79f4c0b57f39211c0648a2551c0b5ed1622809d7c9579e24b8ee9a46a7988319e25ab709c1400
42 -DIST NVIDIA-FreeBSD-x86_64-304.137.tar.gz 36474676 BLAKE2B bd75e2916d34f76566d838406419991a860118830366f0297fa63baade3a99f637dae601d6bc6a051596222f2715297dffbf9b81ff5478b030741e6c8a09bc13 SHA512 f0ae7ccea417aceedf34bfb9c96fd79b31cbf74a8fa59d5199b0ad7b81b8a4aeb66cd4801a45cc37f836979cb4267aa69e08517beaa9b8cb9c66a477d02ef8de
43 DIST NVIDIA-FreeBSD-x86_64-340.107.tar.gz 61179967 BLAKE2B c12c7c07c090fd7bca78a30082890d0b0330dde07ce9beacdb94fad97d40e9ff9e1413fc36fd94116821137e74076d99a82ab85ecd0a8e16d52b47abeb747802 SHA512 661a4cc79a0adc9a1abebfb3567c26e69628266794b5b539c112112a0989760ea1ea2d8c35a5fe7539b579d4e9cef2685e3e1d12fc7031cd6d1b743c23eadc52
44 -DIST NVIDIA-FreeBSD-x86_64-375.82.tar.gz 58748290 BLAKE2B 629d65b71270d1c0d94c71e4215a72f0e49bb82e68ebb93fd4b14cd56a2031674458764f4c3e2e3dec7379ec0d5ed9212c8d09a64e4361f40352e52aa9b57de5 SHA512 5e2b42ff63e06219764db8187203ce1a2c3c8b478be31fc713ef396e8f8d46def9b2631d7989866740bd0c6a81bbf5d2ed083c14cfa7171c0d993553ca6f431c
45 -DIST NVIDIA-FreeBSD-x86_64-378.13.tar.gz 58779963 BLAKE2B d0a165dab740b25e1d97050e4dfc9f916ae17159eb4e4b79e068a4cd6ec3e2bc146d061abb4a411847cbb0d987253f86327e67ffd6efaf725c4fa4dce27e4fa9 SHA512 34cfc383ba196ecec2cd27fc12bf30dd58f8782b73414e7b4c182e832ae0dce1f8c017afbb2101d7525d4e321f80cac49d3b578a8fc0cf88be9310f4deb77057
46 -DIST NVIDIA-FreeBSD-x86_64-381.22.tar.gz 59284579 BLAKE2B 45703b5658c586fe2fbfaf84a54a591a7d25e836195c47c43375b74a730c1a7aa4dd7bd17d13e7194b37d51da0f11540da1bee564e1c27351ecc6915e65012d5 SHA512 51c5a87fabe87ec7f2589ed97d97447b127ecb5fe501c60bc7c9fce74141c127f4f9bb820d2a9b34fb56db436476d0cb18a73845ab4e7ec2315d4975c8ce4e32
47 -DIST NVIDIA-FreeBSD-x86_64-384.130.tar.gz 62901704 BLAKE2B 50be9af398f88caa012a7af702ed3d150bd4d0e5aca862dab09f30038906d79254999079983fe242dfe8158549e25f3a49ea8ad07114d8d3bcd01c8a076e8c8f SHA512 ad1a32f8268003d165570137947f517c82074b0851b86a1928f016de95f3dacef4d48f4873f00d603d49b44fe2b99d65295ed4e655d4b16f71c284994a1ea148
48 -DIST NVIDIA-FreeBSD-x86_64-387.34.tar.gz 63387097 BLAKE2B 53689ba098b4a4de08dca056618ea533c92d17137ec954dea0ae71e1b2c825c021979871e4ff82c820be0a78d3c365f282b760940ebe2caa1ca5bfd2453e178e SHA512 0a905ee72ee6f4e9c941e5dd1f7cddf96bfb20c6da32fd05599258e1bb154f68463d775ba8ff4f67f0d4b8e637e9ed9624fc9a4873a1f2621dc86732f0d6d70d
49 DIST NVIDIA-FreeBSD-x86_64-390.87.tar.gz 63648591 BLAKE2B 88aa38b11b64b2ad91f723ec84a2adb6829571136aabb1441a9119418395d5f143736487902f0c60b49ebc1284f3100fbd089e4c941cdd3519ab8511cc1d3261 SHA512 0865fef8b8a3be8f6d9fc81908b162fd6062ba0ea81fd00200e7b2a1e3149ef62408b46bc4ccb7a77f1ac943557a22b13a10cfdde084f0b76cf2b23432e57540
50 -DIST NVIDIA-FreeBSD-x86_64-396.54.tar.gz 60938322 BLAKE2B a23488b625a15703b0c40bc6871314b05d117d489f64a6f7c70ac3c934b02028b9623be10f0369c98c7d3b5e018e1eb6f1d2cde9d9e1b90be5065f06f6a646dd SHA512 52df85364bfd45a23394078855859ce85de996f7990bb96ba63eb33e516c3cf8e72c4391af9817213f735286f2cf6444bc8ed00312365f12ae17373cfbdc3fc7
51 DIST NVIDIA-FreeBSD-x86_64-410.93.tar.gz 61977979 BLAKE2B a662fa13866cfb36ef61a0b9dd459519e26ea93a6ad6ae7bf34075fae8e7622a91707d88cec8de0660513cb959c3596e8b6169357891c83e847870ecffd72928 SHA512 ecdd5270f9d5f32117d83cd3e3cf0376f0b37c748fe164e702c4230d225c6b28bdbbea4334555b6928d05f1a7cfaf87caf20dd2e7e06e1259c526f6bd50e4d0e
52 DIST NVIDIA-FreeBSD-x86_64-415.25.tar.gz 62373961 BLAKE2B 4c1ce36ad31933efdb7b9b3a5a530439cadb50c6ee29c0689a521308fbc213266a761765998c44643fd8511159ae96387a3a278accc4a0d00322b06b9b327232 SHA512 792f0cfafb1d6b2137db62c3a5a7e76217d89c3b18cee92ec8317d6c583fdc9676aa46efd55bc795aeaaf1532501f7b40d1d9609d782ffe63e55bb37d0d6db14
53 DIST NVIDIA-FreeBSD-x86_64-415.27.tar.gz 62389955 BLAKE2B 39ac5970ef1a6ffbb03abe8b758a6f5d7eaca787231845fa4b4bff5f26aa770fb7c695bbd5585d919c934c65b9ed0cfe42f9674bcaabd796c9bd8b89cea87ee6 SHA512 857d1523bad2fca21c75b45c29066be0f530afa8ca124806bcaa36509ac5135df1c4037e6b09e5718c701f085b3608925e2b1fea45d0681e69a99ef709c307d0
54 -DIST NVIDIA-Linux-armv7l-gnueabihf-375.82.run 26650801 BLAKE2B 31446667065c56b48f6a3e737afe29a4517459d3462138136bffe383bc6fe514d6e80b49c391c27edc96b8abc3da3dd4d6ee3f3dca17f3c9a0f1cdf0e72cf099 SHA512 28554f1c24fe63c9257c0de3e84e4e739a45bf1c20ec7a53bc2c1b69b4e2355675061491ef5b03f3ae489cf623e553cfa68442f5536f137837327036d1c53d63
55 -DIST NVIDIA-Linux-armv7l-gnueabihf-378.13.run 26514235 BLAKE2B 2b3c540704496a290be7ae3f1ff378487c75af2298c12488da8b3a1814446e5df02a1ed99afd8ee7fc459d950aab472155359eae0bf56ac83389711d70638152 SHA512 253786a821df85fa926ae842114321b3c70502f887ea7c2b6790dfe3836039ee5d390e6722ca8785904ec6487e465916923d3042dc6191b3b4522c3161b80cb0
56 -DIST NVIDIA-Linux-armv7l-gnueabihf-381.22.run 26815484 BLAKE2B e5f0241b07d1e54edea2025dd30061d1018c68cc2c7136c507eb894bbad5be3d0724494e2b9f33d1f8f60da4904999bbb964e6f2e78d045d7cd86bcd46b7f6d0 SHA512 934cda37c7aed26243b5b661122e1c060de5b4df890aaf2295b6650dddea37cb4f0e3f0bebddb00b5d687b66ab5e028a203195c4d4ad3379593babda42febe77
57 -DIST NVIDIA-Linux-armv7l-gnueabihf-384.130.run 28899034 BLAKE2B 4f104243e87d0688d5f234bcadeb501914394ca5ae29c0f7ca7ae8038982c7df14652a1b85fb62a3466a6d4f7cda95c9726367bfd8ab1bf0b73f3fa617418276 SHA512 bd7be99881295f4ddf92b8c6791c4315c7b8699cdd346247dd54dfeb48ee61a40597483379922f5e3d0b28c9b9b9e75dca91c535e4695ebe57734c26f1484f61
58 -DIST NVIDIA-Linux-armv7l-gnueabihf-387.34.run 29406773 BLAKE2B af27fb1bfa8e432c83220f88c57219d572dfab2d3624c8702759a747f25ff962dba7c39028af5746e04c913c9a53dfbec8a46801bfa7e38df65a8823c4858cca SHA512 cb631dc3b851d84881dfcabee776c68a935853d03f21595acfea84a3efbc85276070f9d0958c0bcced1e66f42f25ecf3fd7d615c715274130ca24426da678c2e
59 DIST NVIDIA-Linux-armv7l-gnueabihf-390.87.run 29078256 BLAKE2B a7ce24bcaf82e6c2c95cd11a0d9e0e2aa69c717b8455d4ce0a79a9c03c92f5f6b84107dea6347dedc5c4f8fe076e616fc7a36053c6a5f571af9d794bada6cb1f SHA512 3f8ef4eabc7275685bd5d887c6b7dc20786baab1f4a89bfb23ae6c8d837188d93369c777915d3ea010b08e578c4fb7318d9428811971470e31a8b8b4f51e240f
60 -DIST NVIDIA-Linux-x86-304.137.run 41504115 BLAKE2B 5938d4df818947e5576172c0ee9bfa42a2fc49a7a7a2b14128cf3b967dfea6d4523901b33283284d450cfadc2c6d72a82a1533b27ebb4b542b6b1454fe8ae960 SHA512 021c5a88d50489aa0a1c7eac14259e23542b93578ae339995a2e38b786d06d239968c07933cab3fb78a922cffc7e213d6fa3fe07e34065a9c7f03e24f8729370
61 DIST NVIDIA-Linux-x86-340.107.run 39016798 BLAKE2B 2632c8f257d0cf7c5b9294eb2c0b763eee6feb60eacc316024655971e4d067c4af6548aab3b7b2b295792b064f3f3ac3e6403a2ecfa096761d308dfb6b2569b8 SHA512 0add713942bcdb639d19b5c36f5e0cea14f9e07490191d46dfeba0515ede7700fd8e9467ec531d38329fe1e76bf45905e70e0d440e7bc2dc79c1d767eab03338
62 -DIST NVIDIA-Linux-x86-375.82.run 44633335 BLAKE2B 55392ba748108b47994bf272829a6476dfc23f7756e0c18d56c8e4d827968196ee70e521c2e6307c134ca0c85d59715db777583fb07c8e06ae7325d586a8117b SHA512 cbd6edd7490e0e5ef9dd2020c18eb5f75412993e06b9c4f1919f49a8ffdc36131a96d868ab51691fb5c4a661e826b000ec93363c9b168304f6498014e300bf24
63 -DIST NVIDIA-Linux-x86-378.13.run 44397547 BLAKE2B 5b45bdceba75e214028b9f59a3655482ac1ac2b51cc0a6ea22927e5143b47c670db7078ed898e04663feb9fd495165954c90df5ee3afca00155dcc2ae6a97dc8 SHA512 b96d2558a1003a3c66cade3a1e16abd34d855c0e27cdebacdc0495e0ba3cd5c68bb84cc5f81bff1b9ddce36ac52e0dc125c56d868b77d7c8e2f606d559b13b4a
64 -DIST NVIDIA-Linux-x86-381.22.run 42931990 BLAKE2B cf1ae154854860557bf3e4a50216f1373ff66a45535e7beec67392b1cd1d40a02d758fa3e1cfa0462145b912430b0d1a3b6de3e6d6ede8aa1f484ea0ab46f816 SHA512 15723bfa25b0f39224ad5098c784a292abe4bf1daafaeb2f1df910bbab466e666b848b12e50b0bdd45f83e2d81957425a63501550b3dc5eb8fe3e576a8a10d22
65 -DIST NVIDIA-Linux-x86-384.130.run 47539521 BLAKE2B d0b84aa6e0a41d7202cce247a419adad5c94d0d98feb83594644d8e0a9426d0c07a5b5889297bc830c7456a4e8cc165a3b23c004e83cabad1000bf5a6e1a147a SHA512 0ed01818606eb7309811a3cb0ae71e9906e318d579dfd85bafcbae498a27f801836c1f1eefee6791ec5d9c6a4c41d244c43b8329583ae4991b45171cac99638d
66 -DIST NVIDIA-Linux-x86-387.34.run 47797853 BLAKE2B 4ae211ee00e09fe385f24e05cfac3af28447ec18e7a7f53e7f310c210ec22f60094be087aae45d0ea99c90214a07d3c46ce6867984ac0ff6e56559693fcdf148 SHA512 ba9362123a75f85a0a5a9dcc95c06bcb350a8dff2db864db30a73172db44006fa39eee8e23cf959ab2012b61b922d1f0d7ab225329815737819f27d1be300b95
67 DIST NVIDIA-Linux-x86-390.87.run 47959124 BLAKE2B bb799a53b6d25ecd0e6013cea544402c25332efcedf0db5c490dc7ebfa064f97a31427d529f0453092e0f6495a996acb8ffcdd29dc1fed5fc8af31514d959c80 SHA512 18c5ef058098c0f055bada06888ee07da4d1455d90d393357483c289eab27969d49a593318d28e535941e7ebacde33e349f3a1cb2f7c627366ba5c6b7835ccbd
68 -DIST NVIDIA-Linux-x86_64-304.137.run 70087133 BLAKE2B 8db0ade7cf64231ae11e6fc55a16a68a2f7b11a8bb7debb49799fee96eba06a3062b97fe539b093727623a1ed1067282813de047c2aeb89d93bf35a97c71aac5 SHA512 d7fae1e486005ffa2f2bf7f14f901bf5156fc784407a9acfea584f49bdab92ff5f4d0fb66c4c5b2800a461fc06aebb7d760bcb59f69ce4f2cb4e03e11816b3e9
69 DIST NVIDIA-Linux-x86_64-340.107.run 70233686 BLAKE2B 821a2672dcc3b546fbb3f826230fb06741503d75b06f72cb407dd3c9de4f2cbd150bff34e554dca8aa86e7f6bf64ce4f7f9b52976799a477c6c2659aaa5bb4d3 SHA512 51df9370526732db099a8a925d35cdf1317ae2b0ab2c130eaf82373f25186165b4af7d44f71e51e2a68f7d07c7ae3f441a6c6c4be8467003b15dc770c4f4e89b
70 -DIST NVIDIA-Linux-x86_64-375.82.run 77461911 BLAKE2B e7f32bdf1672d98a1fe98c82d80a08dd6f63b3c859df4c60124977dae19520a21e4239ff7be6c272243d4af9416320b5e166d8f100979daa0d005ea2a44fc16d SHA512 6da63b807d6dd7cc8ac2b794d5c9ab8383e3c0ce6a47adc600941545509fb40b5f06344781afc895bd83f2780b2bce187994df5684db2890f50b41adfee8f910
71 -DIST NVIDIA-Linux-x86_64-378.13.run 76239469 BLAKE2B 0f2be330645f8d9d2828fa6d159f9e41ef09bb32805f94cf3fa255f088a8c6f4c25add584787bd1ed64756ef75821f7143c14330718cc5f5ac3cbcf8b7c3bae4 SHA512 2f6789aa0a400c035c0a074631dc5c26abb4f8a62efe928ca3a2865b89d29acfc09c27f23a664e438275e4bfd25c261745d4d495f9aca5f54ee6c53a389059d2
72 -DIST NVIDIA-Linux-x86_64-381.22.run 76581130 BLAKE2B fdb5912a775b56edf7dd784b640997fe683d0a32d57db6079dc5466a1a8dc1354cd31ff86aa1e993e0a33163e4c18f6a7aa990e334448ad069db3a5ffc4f1ffa SHA512 669a3dd0896d68ba8eef4689b01971b92ec1c54e6cf2a9ff8d3f281ae9f2fe402f079e76109b65e698d76798bcc7a9bb43da9d128fec59ac1fafafd1c4a1e42c
73 -DIST NVIDIA-Linux-x86_64-384.130.run 82260837 BLAKE2B 55b6f3627680c881821f5d20f05cb6c7941b1deebf28f22f6712cac73d07e6202507c9f3b98eb8fc59ca8ed0c6aaa4819db5fc5a331f4505887dac6f31774335 SHA512 301fa7d9d73a0654e0090bf4bae98896388c1f52453f1b886e320e36765dc529f802c509a2d518714f2b348df59f9c9048e01b3874819bde4f53cf98aaa2cfff
74 -DIST NVIDIA-Linux-x86_64-387.34.run 82784271 BLAKE2B b7140d5d6a693892df50b3ad2e20387673dec6b5ac609cc0300bdc4b4a93ca94849255699126e4d55e67f10e488bfe6008e987197ea239b1a1b643b4ae5c7808 SHA512 6742768f1258a028c9ba56ad1d72f27d7eea4b6bfd324ba29c7f057ab5819816bd728aeaf2a8058031dadcd4c51bc6d08f0e0e0e26c68ed57955e90d68ac5a4b
75 DIST NVIDIA-Linux-x86_64-390.87.run 82690871 BLAKE2B b43a45a7d48160a72185417360a4ff4238922f6d77c7b58c0562f0e01c8aa33e89057e8a5d354e8d3c8e6fa86acf8908a6c2eab81e06158a92908eec18a9b02e SHA512 f4883744f5e07150677918669eed03c7b87774f752112aabd52d903a09ae16351b34105075da2ff0fcb7a847cf66ec17e9797826859fcaecc44fdcd464a61805
76 -DIST NVIDIA-Linux-x86_64-396.54.run 86946680 BLAKE2B 9b3ab39c9d09c663238d0fac6346c24feea6ecc44b0ecaf3de871522697685c1c474ec4cc83f3bab0a2bcfecc7c77acea0e6bfee6e8ca8e6883bd338fd6da8a2 SHA512 17139abe99d4f32ec87379ee57af2cc0fec7d24605b2be7e3cd6609d9fcdf871e3c1cb7414b3544e14eb32d2213fec7ac45b3261f27c8d6565d510ccb14a1247
77 DIST NVIDIA-Linux-x86_64-410.93.run 107257681 BLAKE2B 56e9b6a17ab4d2fe2f18d90b4e209fe048c53dc43846ee9c8bd0960999a06ef9d9b6ba7e4c242f77cc35cfc5b9a0e2ae24aa5f07f68cb7662bd5010de41a9b36 SHA512 1132884210e447d20768c4ae84ff572c9f6886fb9a082da4d229a03c13932a5c6ccc518cad3311a9302b6a0d9e9675e3a53199e7183e07c81282d46883d26105
78 DIST NVIDIA-Linux-x86_64-415.25.run 108599932 BLAKE2B 958a345f03157ebd8f8a84da91af78143ada75be4bf1d5abbbec9bc8b0ca11549891efb2f78c3ae89ed86fa94a4bf179834d1b229b2dc7d3587a138235a8ce7f SHA512 d289a37344916f5d17425f17d0530a7838b264c49866a0148665c9b87dcb7c23e868abae866a2568abac425701149d9075da540dd0f45f3d18f67b57102c0857
79 DIST NVIDIA-Linux-x86_64-415.27.run 108399659 BLAKE2B 05fb81a4ab8626d0170a30b70ed114c639ba7f0e5ac260d2f38cb5042a4d6052e40ada51cf2feff6bae0f394781d77cb70014f390873a715b7d9495b86918bf1 SHA512 5919333136042a227ff36c850d0c57898fb428a77d88633d205a269db4b844356a87f5b1e5c3042f40feaf083d4f82d32df5366820375b601f9d69d98cada0b6
80 -DIST nvidia-settings-304.137.tar.bz2 1481361 BLAKE2B cf52a55a34eeb03a685a683487af6a198ba467dd8ba9983cc75624a37a226373cd931d98e8448b7b8ed430c54be2118c7b240ed2a9100b19bec5e832e2f6cdad SHA512 676d1f70c9a78ee234f5f1a283412430a386fa604de211afba02806a45906c5e246a002989b724d74752178d28c92a268de1c98d4c87876797d991253f16b0cc
81 DIST nvidia-settings-340.107.tar.bz2 1549413 BLAKE2B 127442ee2c35ceec47ab4f103bdd2d0278c621fcb9be47051111f6f8728ef5699bdc95fe33a3812a807c38c4868b04c2176e2ed218a422171d2a88ac0c00de96 SHA512 593e7e83aa350a3a7beaaa32aca8660d7e203f6f2e460a6e6eabcdc092087f9917ee4e6d141e37ad4e3b0a1b9908c085e4a71d2f579e481a03bbd1c6f75ca776
82 -DIST nvidia-settings-375.82.tar.bz2 1620463 BLAKE2B 0c100ee95c91bb53c2192da8ddd1042ce4e0dec7defcf4793a1745020f65d538c4b0d09f690f00034bb02f7ec219048a0539e81031c8b3eb12006f2a0d566d2e SHA512 abc650089cad57ae95a3e3456deb16d2e3c116e148aed83ab40ca5e381445561cdf4c3c0d8676930fb4c73dd5f3282dd1cc1a62d876b7ed07146569ccfb38488
83 -DIST nvidia-settings-378.13.tar.bz2 1618011 BLAKE2B cc9d5cf7ad63fce3b084c1116c076925ec5c07b8743b6aea80d19c46177d6f33f1916ac90bf8d639e962599e209a0f23bcf945d78e056839e7cc7adcaa6c1ede SHA512 a12352c92fd4f56002bda2b07e8cddd5573af98521ec3495cd428b784eb368c9f2cb40f9b4372400ba1ea67c9349c6a9b4f7c218ede2d0d5dabb08325eda9844
84 -DIST nvidia-settings-381.22.tar.bz2 1629344 BLAKE2B 1e7fe16b28f12ebef380e85d96597f5a8171fc33b6054eea4c44b5347c579dcf2e114d540c527f9ac5d39d08c90aabfac3a3feab2456e69b336d7d1d8ea64df4 SHA512 be8e7051df88202fdc6afd63da86231453ab19c8ac35d0940ec4d11a011b0bf886919a3c3ba51bd3e8f9b34a29de727586b63dd861eaa6a0ee6190238c682a0f
85 -DIST nvidia-settings-384.130.tar.bz2 1633217 BLAKE2B ffc1381e680e94aee95752074c39163e48082615f92c6184c01fc7d21e20bf18308d30960db0db602baf89b34fdd295a715692446d21fb2491056ec707e8b844 SHA512 3d878552a78234347f4e51920e8358e56b42d595375e8fd2b0520c3495b02d6fc3877d4346354145c420acd79ff1e9607c312330b2a2e27781a3a576f8860939
86 -DIST nvidia-settings-387.34.tar.bz2 1080507 BLAKE2B 4eeae3ad4b489f574832e967f0c72198d2b5be0139e36981b701e5ca2cde17119d584677e705243f1be6f920669b921f8e4b54968e2d56e98142aec81383dff5 SHA512 a7a1a2db170b803b769a7307c8507289b763f6cbcecc746edf988491fcc28d7ef1eb76574d6c1f24283e6aebeb56fc8a99d5302a81422c3384df0c8979f006d6
87 DIST nvidia-settings-390.87.tar.bz2 1109274 BLAKE2B 20eb809ceeade932e89592ac91071e6d3311f4a075812225d68342806b7ab1f9f8ed0399ea7a47241b7974311794852fd932fd8e824065589de6c124a3c81ef3 SHA512 cafdf2bfefac187409dfcffd593ff23eaba5ab7ab8dd85a9f14a4b6a47ffb3649af770bd2615887af9d30de3ef8fedaad7afc2ebe9f60a8ba7355a9004702959
88 -DIST nvidia-settings-396.54.tar.bz2 1116371 BLAKE2B 114b88f393b0909c8d84a56a280854e258d0e7e7ce800ee58547ef68b4989f22a3bbb380795472b8222493a988dc9308fc20ef03c81589448b518a12285cf204 SHA512 23dc3c61bef71200b3e8185940dd52a50dae7ca7f2b8a68fa96eaa937aabc87ded5d5f73081af51d1e7af2b78b0ec10ab80d28dadbcf10a046c32ec14db1d83c
89 DIST nvidia-settings-410.93.tar.bz2 1115704 BLAKE2B 1119181feb2704711593c19a43dce5feb58778d0251cb2dcb8647de7bfb1abe3a7f374bddd62e4c983b07a207bca7c1d99a7ac51cba3ae41f78fb97c4d1e9666 SHA512 4e5a5babae382dbe9f6899e51d3b1081fd7123f9ba5e147f7d5cc1899904892ea8d953983e43643ea4355d06348db40005755a02c7c0ff6ba104eac4a9d450f2
90 DIST nvidia-settings-415.25.tar.bz2 1121689 BLAKE2B acd9dd12b4d9a3d76e08d1498fe2373327308d0764791c7e14c6471cf98e79f635a1073dfacdaa4fa60dd148c15803a18061b185cdea24676d851b3a1b695184 SHA512 8646e4eb8d491cbd20205766833fa9f0629a2567797fbb7ca085e07946f4698645cc134615bc20a42090d4f4fe826df48ab4be717b227ee59c17941d185e0b0b
91 DIST nvidia-settings-415.27.tar.bz2 1128013 BLAKE2B 36513252ff3d5f2036c80250e012d79bebfc14daff56fdaabb032856f5f78ce77cf4ce32d6eaee5fe4c1a18db63d5c69d6848517f025c711f133e28b3e509396 SHA512 5ac3b673c41194a1952ec10cd3c961aefd281bb044ecae5c9d11cb55d4555fed44e6056b5a2e97b5b87687743cd7f702f33ce7e0f841f04c8175d63693a24594
92
93 diff --git a/x11-drivers/nvidia-drivers/files/nvidia-drivers-375.82-profiles-rc.patch b/x11-drivers/nvidia-drivers/files/nvidia-drivers-375.82-profiles-rc.patch
94 deleted file mode 100644
95 index 552f0d6df0e..00000000000
96 --- a/x11-drivers/nvidia-drivers/files/nvidia-drivers-375.82-profiles-rc.patch
97 +++ /dev/null
98 @@ -1,11 +0,0 @@
99 ---- a/nvidia-application-profiles-375.82-rc
100 -+++ b/nvidia-application-profiles-375.82-rc
101 -@@ -48,7 +48,7 @@
102 - {
103 - "name" : "NoEnforceShaderInputOutputMatching",
104 - "settings" : [ "GLShaderPortabilityWarnings", false ]
105 -- },
106 -+ }
107 - ],
108 - "rules" : [
109 - {
110
111 diff --git a/x11-drivers/nvidia-drivers/files/nvidia-drivers-pax-const.patch b/x11-drivers/nvidia-drivers/files/nvidia-drivers-pax-const.patch
112 deleted file mode 100644
113 index f3b82593570..00000000000
114 --- a/x11-drivers/nvidia-drivers/files/nvidia-drivers-pax-const.patch
115 +++ /dev/null
116 @@ -1,17 +0,0 @@
117 -Binary files kernel.orig/.nv-procfs.c.swp and kernel/.nv-procfs.c.swp differ
118 -diff -urp kernel.orig/nv-procfs.c kernel/nv-procfs.c
119 ---- kernel.orig/nv-procfs.c 2011-07-13 03:29:30.000000000 +0200
120 -+++ kernel/nv-procfs.c 2011-07-19 15:45:27.982993911 +0200
121 -@@ -707,8 +707,10 @@ int nv_register_procfs(void)
122 - * However, in preparation for this, we need to preserve
123 - * the procfs read() and write() operations.
124 - */
125 -- nv_procfs_registry_fops.read = entry->proc_fops->read;
126 -- nv_procfs_registry_fops.write = entry->proc_fops->write;
127 -+ pax_open_kernel();
128 -+ *(void **)&nv_procfs_registry_fops.read = entry->proc_fops->read;
129 -+ *(void **)&nv_procfs_registry_fops.write = entry->proc_fops->write;
130 -+ pax_close_kernel();
131 -
132 - entry = NV_CREATE_PROC_FILE("registry", proc_nvidia,
133 - nv_procfs_read_registry,
134
135 diff --git a/x11-drivers/nvidia-drivers/files/nvidia-drivers-pax-usercopy.patch b/x11-drivers/nvidia-drivers/files/nvidia-drivers-pax-usercopy.patch
136 deleted file mode 100644
137 index ce8c201b8e0..00000000000
138 --- a/x11-drivers/nvidia-drivers/files/nvidia-drivers-pax-usercopy.patch
139 +++ /dev/null
140 @@ -1,54 +0,0 @@
141 -diff -urp kernel.orig/nv.c kernel/nv.c
142 ---- kernel.orig/nv.c 2011-09-24 02:32:09.000000000 +0200
143 -+++ kernel/nv.c 2011-10-05 19:13:41.474242252 +0200
144 -@@ -1105,7 +1105,7 @@ static int __init nvidia_init_module(voi
145 - NV_SPIN_LOCK_INIT(&km_lock);
146 - #endif
147 -
148 -- NV_KMEM_CACHE_CREATE(nv_stack_t_cache, "nv_stack_t", nv_stack_t);
149 -+ NV_KMEM_CACHE_CREATE(nv_stack_t_cache, "nv_stack_t", nv_stack_t, SLAB_USERCOPY);
150 - if (nv_stack_t_cache == NULL)
151 - {
152 - nv_printf(NV_DBG_ERRORS, "NVRM: stack cache allocation failed!\n");
153 -@@ -1220,7 +1220,7 @@ static int __init nvidia_init_module(voi
154 - }
155 - #endif
156 -
157 -- NV_KMEM_CACHE_CREATE(nv_pte_t_cache, "nv_pte_t", nv_pte_t);
158 -+ NV_KMEM_CACHE_CREATE(nv_pte_t_cache, "nv_pte_t", nv_pte_t, 0);
159 - if (nv_pte_t_cache == NULL)
160 - {
161 - rc = -ENOMEM;
162 -@@ -1229,7 +1229,7 @@ static int __init nvidia_init_module(voi
163 - }
164 -
165 - NV_KMEM_CACHE_CREATE(nvidia_p2p_page_t_cache, "nvidia_p2p_page_t",
166 -- nvidia_p2p_page_t);
167 -+ nvidia_p2p_page_t, 0);
168 - if (nvidia_p2p_page_t_cache == NULL)
169 - {
170 - rc = -ENOMEM;
171 -diff -urp kernel.orig/nv-linux.h kernel/nv-linux.h
172 ---- kernel.orig/nv-linux.h 2011-09-24 02:32:09.000000000 +0200
173 -+++ kernel/nv-linux.h 2011-10-05 19:14:42.522238996 +0200
174 -@@ -695,16 +695,16 @@ extern nv_spinlock_t km_lock;
175 -
176 - #if defined(NV_KMEM_CACHE_CREATE_PRESENT)
177 - #if (NV_KMEM_CACHE_CREATE_ARGUMENT_COUNT == 6)
178 --#define NV_KMEM_CACHE_CREATE(kmem_cache, name, type) \
179 -+#define NV_KMEM_CACHE_CREATE(kmem_cache, name, type, flags) \
180 - { \
181 - kmem_cache = kmem_cache_create(name, sizeof(type), \
182 -- 0, 0, NULL, NULL); \
183 -+ 0, flags, NULL, NULL); \
184 - }
185 - #elif (NV_KMEM_CACHE_CREATE_ARGUMENT_COUNT == 5)
186 --#define NV_KMEM_CACHE_CREATE(kmem_cache, name, type) \
187 -+#define NV_KMEM_CACHE_CREATE(kmem_cache, name, type, flags) \
188 - { \
189 - kmem_cache = kmem_cache_create(name, sizeof(type), \
190 -- 0, 0, NULL); \
191 -+ 0, flags, NULL); \
192 - }
193 - #else
194 - #error "NV_KMEM_CACHE_CREATE_ARGUMENT_COUNT value unrecognized!"
195
196 diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-304.137.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-304.137.ebuild
197 deleted file mode 100644
198 index 97647bdcaa3..00000000000
199 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-304.137.ebuild
200 +++ /dev/null
201 @@ -1,499 +0,0 @@
202 -# Copyright 1999-2018 Gentoo Authors
203 -# Distributed under the terms of the GNU General Public License v2
204 -
205 -EAPI=6
206 -inherit eutils flag-o-matic linux-info linux-mod multilib-minimal nvidia-driver \
207 - portability toolchain-funcs unpacker user versionator udev
208 -
209 -NV_URI="https://us.download.nvidia.com/XFree86/"
210 -X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}"
211 -AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}"
212 -X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}"
213 -AMD64_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86_64-${PV}"
214 -
215 -DESCRIPTION="NVIDIA Accelerated Graphics Driver"
216 -HOMEPAGE="http://www.nvidia.com/ http://www.nvidia.com/Download/Find.aspx"
217 -SRC_URI="
218 - amd64-fbsd? ( ${NV_URI}FreeBSD-x86_64/${PV}/${AMD64_FBSD_NV_PACKAGE}.tar.gz )
219 - amd64? ( ${NV_URI}Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run )
220 - x86-fbsd? ( ${NV_URI}FreeBSD-x86/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )
221 - x86? ( ${NV_URI}Linux-x86/${PV}/${X86_NV_PACKAGE}.run )
222 - tools? (
223 - https://download.nvidia.com/XFree86/nvidia-settings/nvidia-settings-${PV}.tar.bz2
224 - )
225 -"
226 -
227 -LICENSE="GPL-2 NVIDIA-r1"
228 -SLOT="0/${PV%.*}"
229 -KEYWORDS="-* amd64 x86 ~amd64-fbsd ~x86-fbsd"
230 -IUSE="acpi multilib kernel_FreeBSD kernel_linux pax_kernel static-libs +tools +X"
231 -RESTRICT="bindist mirror"
232 -EMULTILIB_PKG="true"
233 -
234 -COMMON="
235 - app-eselect/eselect-opencl
236 - kernel_linux? ( >=sys-libs/glibc-2.6.1 )
237 - tools? (
238 - dev-libs/atk
239 - dev-libs/glib:2
240 - x11-libs/gdk-pixbuf[X]
241 - x11-libs/gtk+:2
242 - x11-libs/libX11
243 - x11-libs/libXext
244 - x11-libs/libXv
245 - x11-libs/pango[X]
246 - x11-libs/pangox-compat
247 - )
248 - X? (
249 - >=app-eselect/eselect-opengl-1.0.9
250 - )
251 -"
252 -DEPEND="${COMMON}
253 - kernel_linux? (
254 - virtual/linux-sources
255 - virtual/pkgconfig
256 - )"
257 -RDEPEND="${COMMON}
258 - acpi? ( sys-power/acpid )
259 - tools? ( !media-video/nvidia-settings )
260 - X? (
261 - <x11-base/xorg-server-1.19.99:=
262 - >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
263 - >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
264 - sys-libs/zlib[${MULTILIB_USEDEP}]
265 - x11-libs/libXvMC[${MULTILIB_USEDEP}]
266 - )
267 -"
268 -PDEPEND="X? ( >=x11-libs/libvdpau-0.3-r1[${MULTILIB_USEDEP}] )"
269 -
270 -REQUIRED_USE="
271 - tools? ( X )
272 - static-libs? ( tools )
273 -"
274 -
275 -QA_PREBUILT="opt/* usr/lib*"
276 -
277 -S=${WORKDIR}/
278 -
279 -nvidia_drivers_versions_check() {
280 - if use amd64 && has_multilib_profile && \
281 - [ "${DEFAULT_ABI}" != "amd64" ]; then
282 - eerror "This ebuild doesn't currently support changing your default ABI"
283 - die "Unexpected \${DEFAULT_ABI} = ${DEFAULT_ABI}"
284 - fi
285 -
286 - if use kernel_linux && kernel_is ge 4 13; then
287 - ewarn "Gentoo supports kernels which are supported by NVIDIA"
288 - ewarn "which are limited to the following kernels:"
289 - ewarn "<sys-kernel/gentoo-sources-4.13"
290 - ewarn "<sys-kernel/vanilla-sources-4.13"
291 - ewarn ""
292 - ewarn "You are free to utilize eapply_user to provide whatever"
293 - ewarn "support you feel is appropriate, but will not receive"
294 - ewarn "support as a result of those changes."
295 - ewarn ""
296 - ewarn "Do not file a bug report about this."
297 - ewarn ""
298 - fi
299 -
300 - # Since Nvidia ships many different series of drivers, we need to give the user
301 - # some kind of guidance as to what version they should install. This tries
302 - # to point the user in the right direction but can't be perfect. check
303 - # nvidia-driver.eclass
304 - nvidia-driver-check-warning
305 -
306 - # Kernel features/options to check for
307 - CONFIG_CHECK="!DEBUG_MUTEXES ~!LOCKDEP ~MTRR ~SYSVIPC ~ZONE_DMA"
308 - use x86 && CONFIG_CHECK+=" ~HIGHMEM"
309 -
310 - # Now do the above checks
311 - use kernel_linux && check_extra_config
312 -}
313 -
314 -pkg_pretend() {
315 - nvidia_drivers_versions_check
316 -}
317 -
318 -pkg_setup() {
319 - nvidia_drivers_versions_check
320 -
321 - # try to turn off distcc and ccache for people that have a problem with it
322 - export DISTCC_DISABLE=1
323 - export CCACHE_DISABLE=1
324 -
325 - if use kernel_linux; then
326 - linux-mod_pkg_setup
327 - MODULE_NAMES="nvidia(video:${S}/kernel)"
328 - BUILD_PARAMS="IGNORE_CC_MISMATCH=yes V=1 SYSSRC=${KV_DIR} \
329 - SYSOUT=${KV_OUT_DIR} CC=$(tc-getBUILD_CC)"
330 - # linux-mod_src_compile calls set_arch_to_kernel, which
331 - # sets the ARCH to x86 but NVIDIA's wrapping Makefile
332 - # expects x86_64 or i386 and then converts it to x86
333 - # later on in the build process
334 - BUILD_FIXES="ARCH=$(uname -m | sed -e 's/i.86/i386/')"
335 - fi
336 -
337 - # set variables to where files are in the package structure
338 - if use kernel_FreeBSD; then
339 - use x86-fbsd && S="${WORKDIR}/${X86_FBSD_NV_PACKAGE}"
340 - use amd64-fbsd && S="${WORKDIR}/${AMD64_FBSD_NV_PACKAGE}"
341 - NV_DOC="${S}/doc"
342 - NV_OBJ="${S}/obj"
343 - NV_SRC="${S}/src"
344 - NV_MAN="${S}/x11/man"
345 - NV_X11="${S}/obj"
346 - NV_SOVER=1
347 - elif use kernel_linux; then
348 - NV_DOC="${S}"
349 - NV_OBJ="${S}"
350 - NV_SRC="${S}/kernel"
351 - NV_MAN="${S}"
352 - NV_X11="${S}"
353 - NV_SOVER=${PV}
354 - else
355 - die "Could not determine proper NVIDIA package"
356 - fi
357 -}
358 -
359 -src_prepare() {
360 - # Please add a brief description for every added patch
361 -
362 - if use kernel_linux; then
363 - if kernel_is lt 2 6 9 ; then
364 - eerror "You must build this against 2.6.9 or higher kernels."
365 - fi
366 -
367 - # If greater than 2.6.5 use M= instead of SUBDIR=
368 - convert_to_m "${NV_SRC}"/Makefile.kbuild
369 - fi
370 -
371 - if use pax_kernel; then
372 - ewarn "Using PAX patches is not supported. You will be asked to"
373 - ewarn "use a standard kernel should you have issues. Should you"
374 - ewarn "need support with these patches, contact the PaX team."
375 - eapply "${FILESDIR}"/${PN}-pax-const.patch
376 - eapply "${FILESDIR}"/${PN}-pax-usercopy.patch
377 - fi
378 -
379 - cat <<- EOF > "${S}"/nvidia.icd
380 - /usr/$(get_libdir)/libnvidia-opencl.so
381 - EOF
382 -
383 - local man_file
384 - for man_file in "${NV_MAN}"/*1.gz; do
385 - gunzip $man_file || die
386 - done
387 -
388 - # Allow user patches so they can support RC kernels and whatever else
389 - eapply_user
390 -}
391 -
392 -src_compile() {
393 - # This is already the default on Linux, as there's no toplevel Makefile, but
394 - # on FreeBSD there's one and triggers the kernel module build, as we install
395 - # it by itself, pass this.
396 -
397 - cd "${NV_SRC}"
398 - if use kernel_FreeBSD; then
399 - MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \
400 - LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die
401 - elif use kernel_linux; then
402 - linux-mod_src_compile src="${KERNEL_DIR}" KERNELRELEASE="${KV_FULL}"
403 - fi
404 -
405 - if use tools; then
406 - emake -C "${S}"/nvidia-settings-${PV}/src/libXNVCtrl clean
407 - emake -C "${S}"/nvidia-settings-${PV}/src/libXNVCtrl \
408 - AR="$(tc-getAR)" \
409 - CC="$(tc-getCC)" \
410 - RANLIB="$(tc-getRANLIB)" \
411 - libXNVCtrl.a
412 - emake -C "${S}"/nvidia-settings-${PV}/src \
413 - AR="$(tc-getAR)" \
414 - CC="$(tc-getCC)" \
415 - LD="$(tc-getCC)" \
416 - LIBDIR="$(get_libdir)" \
417 - NVML_ENABLED=0 \
418 - NV_USE_BUNDLED_LIBJANSSON=0 \
419 - NV_VERBOSE=1 \
420 - RANLIB="$(tc-getRANLIB)" \
421 - STRIP_CMD=true
422 - fi
423 -}
424 -
425 -# Install nvidia library:
426 -# the first parameter is the library to install
427 -# the second parameter is the provided soversion
428 -# the third parameter is the target directory if its not /usr/lib
429 -donvidia() {
430 - # Full path to library minus SOVER
431 - MY_LIB="$1"
432 -
433 - # SOVER to use
434 - MY_SOVER="$2"
435 -
436 - # Where to install
437 - MY_DEST="$3"
438 -
439 - if [[ -z "${MY_DEST}" ]]; then
440 - MY_DEST="/usr/$(get_libdir)"
441 - action="dolib.so"
442 - else
443 - exeinto ${MY_DEST}
444 - action="doexe"
445 - fi
446 -
447 - # Get just the library name
448 - libname=$(basename $1)
449 -
450 - # Install the library with the correct SOVER
451 - ${action} ${MY_LIB}.${MY_SOVER} || \
452 - die "failed to install ${libname}"
453 -
454 - # If SOVER wasn't 1, then we need to create a .1 symlink
455 - if [[ "${MY_SOVER}" != "1" ]]; then
456 - dosym ${libname}.${MY_SOVER} \
457 - ${MY_DEST}/${libname}.1 || \
458 - die "failed to create ${libname} symlink"
459 - fi
460 -
461 - # Always create the symlink from the raw lib to the .1
462 - dosym ${libname}.1 \
463 - ${MY_DEST}/${libname} || \
464 - die "failed to create ${libname} symlink"
465 -}
466 -
467 -src_install() {
468 - if use kernel_linux; then
469 - linux-mod_src_install
470 -
471 - # Add the aliases
472 - # This file is tweaked with the appropriate video group in
473 - # pkg_preinst, see bug #491414
474 - insinto /etc/modprobe.d
475 - newins "${FILESDIR}"/nvidia-169.07 nvidia.conf
476 -
477 - # Ensures that our device nodes are created when not using X
478 - exeinto "$(get_udevdir)"
479 - newexe "${FILESDIR}"/nvidia-udev.sh-r1 nvidia-udev.sh
480 - udev_newrules "${FILESDIR}"/nvidia.udev-rule 99-nvidia.rules
481 - elif use kernel_FreeBSD; then
482 - if use x86-fbsd; then
483 - insinto /boot/modules
484 - doins "${S}/src/nvidia.kld"
485 - fi
486 -
487 - exeinto /boot/modules
488 - doexe "${S}/src/nvidia.ko"
489 - fi
490 -
491 - # NVIDIA kernel <-> userspace driver config lib
492 - donvidia "${NV_OBJ}"/libnvidia-cfg.so ${NV_SOVER}
493 -
494 - if use kernel_linux; then
495 - # NVIDIA video decode <-> CUDA
496 - donvidia "${NV_OBJ}"/libnvcuvid.so ${NV_SOVER}
497 - fi
498 -
499 - if use X; then
500 - # Xorg DDX driver
501 - insinto /usr/$(get_libdir)/xorg/modules/drivers
502 - doins "${NV_X11}"/nvidia_drv.so
503 -
504 - # Xorg GLX driver
505 - donvidia "${NV_X11}"/libglx.so ${NV_SOVER} \
506 - /usr/$(get_libdir)/opengl/nvidia/extensions
507 -
508 - # XvMC driver
509 - dolib.a "${NV_X11}"/libXvMCNVIDIA.a || \
510 - die "failed to install libXvMCNVIDIA.so"
511 - donvidia "${NV_X11}"/libXvMCNVIDIA.so ${NV_SOVER}
512 - dosym libXvMCNVIDIA.so.${NV_SOVER} \
513 - /usr/$(get_libdir)/libXvMCNVIDIA_dynamic.so.1 || \
514 - die "failed to create libXvMCNVIDIA_dynamic.so symlink"
515 - fi
516 -
517 - # OpenCL ICD for NVIDIA
518 - if use kernel_linux; then
519 - insinto /etc/OpenCL/vendors
520 - doins nvidia.icd
521 - donvidia "${NV_OBJ}"/libnvidia-opencl.so ${NV_SOVER}
522 - fi
523 -
524 - # Documentation
525 - dodoc -r "${NV_DOC}"/html
526 - if use kernel_FreeBSD; then
527 - dodoc "${NV_DOC}"/README
528 - use X && doman "${NV_MAN}"/nvidia-xconfig.1
529 - use tools && doman "${NV_MAN}"/nvidia-settings.1
530 - else
531 - # Docs
532 - newdoc "${NV_DOC}"/README.txt README
533 - dodoc "${NV_DOC}"/NVIDIA_Changelog
534 - doman "${NV_MAN}"/nvidia-smi.1
535 - use X && doman "${NV_MAN}"/nvidia-xconfig.1
536 - use tools && doman "${NV_MAN}"/nvidia-settings.1
537 - doman "${NV_MAN}"/nvidia-cuda-proxy-control.1
538 - fi
539 -
540 - # Helper Apps
541 - exeinto /opt/bin/
542 -
543 - if use X; then
544 - doexe "${NV_OBJ}"/nvidia-xconfig
545 - fi
546 -
547 - if use kernel_linux ; then
548 - doexe "${NV_OBJ}"/nvidia-debugdump
549 - doexe "${NV_OBJ}"/nvidia-cuda-proxy-control
550 - doexe "${NV_OBJ}"/nvidia-cuda-proxy-server
551 - doexe "${NV_OBJ}"/nvidia-smi
552 - newinitd "${FILESDIR}/nvidia-smi.init" nvidia-smi
553 - fi
554 -
555 - dobin "${NV_OBJ}"/nvidia-bug-report.sh
556 -
557 - # Desktop entries for nvidia-settings
558 - if use tools ; then
559 - emake -C "${S}"/nvidia-settings-${PV}/src/ \
560 - DESTDIR="${D}" \
561 - LIBDIR="${D}/usr/$(get_libdir)" \
562 - PREFIX=/usr \
563 - NV_USE_BUNDLED_LIBJANSSON=0 \
564 - install
565 -
566 - if use static-libs; then
567 - dolib.a "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/libXNVCtrl.a
568 -
569 - insinto /usr/include/NVCtrl
570 - doins "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/*.h
571 - fi
572 -
573 - # There is no icon in the FreeBSD tarball.
574 - use kernel_FreeBSD || \
575 - doicon "${NV_OBJ}"/nvidia-settings.png
576 -
577 - domenu "${FILESDIR}"/nvidia-settings.desktop
578 -
579 - exeinto /etc/X11/xinit/xinitrc.d
580 - newexe "${FILESDIR}"/95-nvidia-settings-r1 95-nvidia-settings
581 - fi
582 -
583 - #doenvd "${FILESDIR}"/50nvidia-prelink-blacklist
584 -
585 - if has_multilib_profile && use multilib ; then
586 - local OABI=${ABI}
587 - for ABI in $(get_install_abis) ; do
588 - src_install-libs
589 - done
590 - ABI=${OABI}
591 - unset OABI
592 - else
593 - src_install-libs
594 - fi
595 -
596 - is_final_abi || die "failed to iterate through all ABIs"
597 -
598 - readme.gentoo_create_doc
599 -}
600 -
601 -src_install-libs() {
602 - local inslibdir=$(get_libdir)
603 - local GL_ROOT="/usr/$(get_libdir)/opengl/nvidia/lib"
604 - local CL_ROOT="/usr/$(get_libdir)/OpenCL/vendors/nvidia"
605 - local nv_libdir="${NV_OBJ}"
606 -
607 - if use kernel_linux && has_multilib_profile && \
608 - [[ ${ABI} == "x86" ]] ; then
609 - nv_libdir="${NV_OBJ}"/32
610 - fi
611 -
612 - if use X; then
613 - # The GLX libraries
614 - donvidia "${nv_libdir}"/libGL.so ${NV_SOVER} ${GL_ROOT}
615 - donvidia "${nv_libdir}"/libnvidia-glcore.so ${NV_SOVER}
616 - if use kernel_FreeBSD; then
617 - donvidia "${nv_libdir}"/libnvidia-tls.so ${NV_SOVER} ${GL_ROOT}
618 - else
619 - donvidia "${nv_libdir}"/tls/libnvidia-tls.so ${NV_SOVER} ${GL_ROOT}
620 - fi
621 -
622 - # VDPAU
623 - donvidia "${nv_libdir}"/libvdpau_nvidia.so ${NV_SOVER}
624 - fi
625 -
626 - # NVIDIA monitoring library
627 - if use kernel_linux ; then
628 - donvidia "${nv_libdir}"/libnvidia-ml.so ${NV_SOVER}
629 - fi
630 -
631 - # CUDA & OpenCL
632 - if use kernel_linux; then
633 - donvidia "${nv_libdir}"/libcuda.so ${NV_SOVER}
634 - donvidia "${nv_libdir}"/libnvidia-compiler.so ${NV_SOVER}
635 - donvidia "${nv_libdir}"/libOpenCL.so 1.0.0 ${CL_ROOT}
636 - fi
637 -}
638 -
639 -pkg_preinst() {
640 - if use kernel_linux; then
641 - linux-mod_pkg_preinst
642 -
643 - local videogroup="$(egetent group video | cut -d ':' -f 3)"
644 - if [ -z "${videogroup}" ]; then
645 - eerror "Failed to determine the video group gid"
646 - die "Failed to determine the video group gid"
647 - else
648 - sed -i \
649 - -e "s:PACKAGE:${PF}:g" \
650 - -e "s:VIDEOGID:${videogroup}:" \
651 - "${D}"/etc/modprobe.d/nvidia.conf || die
652 - fi
653 - fi
654 -
655 - # Clean the dynamic libGL stuff's home to ensure
656 - # we dont have stale libs floating around
657 - if [ -d "${ROOT}"/usr/lib/opengl/nvidia ] ; then
658 - rm -rf "${ROOT}"/usr/lib/opengl/nvidia/*
659 - fi
660 - # Make sure we nuke the old nvidia-glx's env.d file
661 - if [ -e "${ROOT}"/etc/env.d/09nvidia ] ; then
662 - rm -f "${ROOT}"/etc/env.d/09nvidia
663 - fi
664 -}
665 -
666 -pkg_postinst() {
667 - use kernel_linux && linux-mod_pkg_postinst
668 -
669 - # Switch to the nvidia implementation
670 - use X && "${ROOT}"/usr/bin/eselect opengl set --use-old nvidia
671 - "${ROOT}"/usr/bin/eselect opencl set --use-old nvidia
672 -
673 - readme.gentoo_print_elog
674 -
675 - if ! use X; then
676 - elog "You have elected to not install the X.org driver. Along with"
677 - elog "this the OpenGL libraries, XvMC, and VDPAU libraries were not"
678 - elog "installed. Additionally, once the driver is loaded your card"
679 - elog "and fan will run at max speed which may not be desirable."
680 - elog "Use the 'nvidia-smi' init script to have your card and fan"
681 - elog "speed scale appropriately."
682 - elog
683 - fi
684 - if ! use tools; then
685 - elog "USE=tools controls whether the nvidia-settings application"
686 - elog "is installed. If you would like to use it, enable that"
687 - elog "flag and re-emerge this ebuild. Optionally you can install"
688 - elog "media-video/nvidia-settings"
689 - elog
690 - fi
691 -}
692 -
693 -pkg_prerm() {
694 - use X && "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11
695 -}
696 -
697 -pkg_postrm() {
698 - use kernel_linux && linux-mod_pkg_postrm
699 - use X && "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11
700 -}
701
702 diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-375.82.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-375.82.ebuild
703 deleted file mode 100644
704 index beb76b9a771..00000000000
705 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-375.82.ebuild
706 +++ /dev/null
707 @@ -1,569 +0,0 @@
708 -# Copyright 1999-2018 Gentoo Authors
709 -# Distributed under the terms of the GNU General Public License v2
710 -
711 -EAPI=6
712 -inherit eutils flag-o-matic linux-info linux-mod multilib-minimal nvidia-driver \
713 - portability toolchain-funcs unpacker user udev
714 -
715 -NV_URI="https://download.nvidia.com/XFree86/"
716 -X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}"
717 -AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}"
718 -ARM_NV_PACKAGE="NVIDIA-Linux-armv7l-gnueabihf-${PV}"
719 -X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}"
720 -AMD64_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86_64-${PV}"
721 -
722 -DESCRIPTION="NVIDIA Accelerated Graphics Driver"
723 -HOMEPAGE="http://www.nvidia.com/ http://www.nvidia.com/Download/Find.aspx"
724 -SRC_URI="
725 - amd64-fbsd? ( ${NV_URI}FreeBSD-x86_64/${PV}/${AMD64_FBSD_NV_PACKAGE}.tar.gz )
726 - amd64? ( ${NV_URI}Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run )
727 - arm? ( ${NV_URI}Linux-32bit-ARM/${PV}/${ARM_NV_PACKAGE}.run )
728 - x86-fbsd? ( ${NV_URI}FreeBSD-x86/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )
729 - x86? ( ${NV_URI}Linux-x86/${PV}/${X86_NV_PACKAGE}.run )
730 - tools? (
731 - https://download.nvidia.com/XFree86/nvidia-settings/nvidia-settings-${PV}.tar.bz2
732 - )
733 -"
734 -
735 -LICENSE="GPL-2 NVIDIA-r2"
736 -SLOT="0/${PV%.*}"
737 -KEYWORDS="-* amd64 x86 ~amd64-fbsd ~x86-fbsd"
738 -RESTRICT="bindist mirror"
739 -EMULTILIB_PKG="true"
740 -
741 -IUSE="acpi compat +driver gtk3 kernel_FreeBSD kernel_linux +kms multilib pax_kernel static-libs +tools uvm wayland +X"
742 -REQUIRED_USE="
743 - tools? ( X )
744 - static-libs? ( tools )
745 -"
746 -
747 -COMMON="
748 - app-eselect/eselect-opencl
749 - kernel_linux? ( >=sys-libs/glibc-2.6.1 )
750 - tools? (
751 - dev-libs/atk
752 - dev-libs/glib:2
753 - dev-libs/jansson
754 - gtk3? (
755 - x11-libs/gtk+:3
756 - )
757 - x11-libs/cairo
758 - x11-libs/gdk-pixbuf[X]
759 - x11-libs/gtk+:2
760 - x11-libs/libX11
761 - x11-libs/libXext
762 - x11-libs/libXrandr
763 - x11-libs/libXv
764 - x11-libs/libXxf86vm
765 - x11-libs/pango[X]
766 - )
767 - X? (
768 - >=app-eselect/eselect-opengl-1.0.9
769 - app-misc/pax-utils
770 - )
771 -"
772 -DEPEND="
773 - ${COMMON}
774 - kernel_linux? ( virtual/linux-sources )
775 -"
776 -RDEPEND="
777 - ${COMMON}
778 - acpi? ( sys-power/acpid )
779 - tools? ( !media-video/nvidia-settings )
780 - wayland? ( dev-libs/wayland[${MULTILIB_USEDEP}] )
781 - X? (
782 - <x11-base/xorg-server-1.19.99:=
783 - >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
784 - >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
785 - >=x11-libs/libvdpau-1.0[${MULTILIB_USEDEP}]
786 - sys-libs/zlib[${MULTILIB_USEDEP}]
787 - )
788 -"
789 -
790 -QA_PREBUILT="opt/* usr/lib*"
791 -
792 -S=${WORKDIR}/
793 -
794 -nvidia_drivers_versions_check() {
795 - if use amd64 && has_multilib_profile && \
796 - [ "${DEFAULT_ABI}" != "amd64" ]; then
797 - eerror "This ebuild doesn't currently support changing your default ABI"
798 - die "Unexpected \${DEFAULT_ABI} = ${DEFAULT_ABI}"
799 - fi
800 -
801 - if use kernel_linux && kernel_is ge 4 14; then
802 - ewarn "Gentoo supports kernels which are supported by NVIDIA"
803 - ewarn "which are limited to the following kernels:"
804 - ewarn "<sys-kernel/gentoo-sources-4.14"
805 - ewarn "<sys-kernel/vanilla-sources-4.14"
806 - ewarn ""
807 - ewarn "You are free to utilize epatch_user to provide whatever"
808 - ewarn "support you feel is appropriate, but will not receive"
809 - ewarn "support as a result of those changes."
810 - ewarn ""
811 - ewarn "Do not file a bug report about this."
812 - ewarn ""
813 - fi
814 -
815 - # Since Nvidia ships many different series of drivers, we need to give the user
816 - # some kind of guidance as to what version they should install. This tries
817 - # to point the user in the right direction but can't be perfect. check
818 - # nvidia-driver.eclass
819 - nvidia-driver-check-warning
820 -
821 - # Kernel features/options to check for
822 - CONFIG_CHECK="!DEBUG_MUTEXES ~!LOCKDEP ~MTRR ~SYSVIPC ~ZONE_DMA"
823 - use x86 && CONFIG_CHECK+=" ~HIGHMEM"
824 -
825 - # Now do the above checks
826 - use kernel_linux && check_extra_config
827 -}
828 -
829 -pkg_pretend() {
830 - nvidia_drivers_versions_check
831 -}
832 -
833 -pkg_setup() {
834 - nvidia_drivers_versions_check
835 -
836 - # try to turn off distcc and ccache for people that have a problem with it
837 - export DISTCC_DISABLE=1
838 - export CCACHE_DISABLE=1
839 -
840 - if use driver && use kernel_linux; then
841 - MODULE_NAMES="nvidia(video:${S}/kernel)"
842 - use uvm && MODULE_NAMES+=" nvidia-uvm(video:${S}/kernel)"
843 - use kms && MODULE_NAMES+=" nvidia-modeset(video:${S}/kernel) nvidia-drm(video:${S}/kernel)"
844 -
845 - # This needs to run after MODULE_NAMES (so that the eclass checks
846 - # whether the kernel supports loadable modules) but before BUILD_PARAMS
847 - # is set (so that KV_DIR is populated).
848 - linux-mod_pkg_setup
849 -
850 - BUILD_PARAMS="IGNORE_CC_MISMATCH=yes V=1 SYSSRC=${KV_DIR} \
851 - SYSOUT=${KV_OUT_DIR} CC=$(tc-getBUILD_CC) NV_VERBOSE=1"
852 -
853 - # linux-mod_src_compile calls set_arch_to_kernel, which
854 - # sets the ARCH to x86 but NVIDIA's wrapping Makefile
855 - # expects x86_64 or i386 and then converts it to x86
856 - # later on in the build process
857 - BUILD_FIXES="ARCH=$(uname -m | sed -e 's/i.86/i386/')"
858 - fi
859 -
860 - if use kernel_linux && kernel_is lt 2 6 9; then
861 - eerror "You must build this against 2.6.9 or higher kernels."
862 - fi
863 -
864 - # set variables to where files are in the package structure
865 - if use kernel_FreeBSD; then
866 - use x86-fbsd && S="${WORKDIR}/${X86_FBSD_NV_PACKAGE}"
867 - use amd64-fbsd && S="${WORKDIR}/${AMD64_FBSD_NV_PACKAGE}"
868 - NV_DOC="${S}/doc"
869 - NV_OBJ="${S}/obj"
870 - NV_SRC="${S}/src"
871 - NV_MAN="${S}/x11/man"
872 - NV_X11="${S}/obj"
873 - NV_SOVER=1
874 - elif use kernel_linux; then
875 - NV_DOC="${S}"
876 - NV_OBJ="${S}"
877 - NV_SRC="${S}/kernel"
878 - NV_MAN="${S}"
879 - NV_X11="${S}"
880 - NV_SOVER=${PV}
881 - else
882 - die "Could not determine proper NVIDIA package"
883 - fi
884 -}
885 -
886 -src_prepare() {
887 - eapply "${FILESDIR}"/${P}-profiles-rc.patch
888 -
889 - if use pax_kernel; then
890 - ewarn "Using PAX patches is not supported. You will be asked to"
891 - ewarn "use a standard kernel should you have issues. Should you"
892 - ewarn "need support with these patches, contact the PaX team."
893 - eapply "${FILESDIR}"/${PN}-375.20-pax.patch
894 - fi
895 -
896 - local man_file
897 - for man_file in "${NV_MAN}"/*1.gz; do
898 - gunzip $man_file || die
899 - done
900 -
901 - # Allow user patches so they can support RC kernels and whatever else
902 - eapply_user
903 -}
904 -
905 -src_compile() {
906 - # This is already the default on Linux, as there's no toplevel Makefile, but
907 - # on FreeBSD there's one and triggers the kernel module build, as we install
908 - # it by itself, pass this.
909 -
910 - cd "${NV_SRC}"
911 - if use kernel_FreeBSD; then
912 - MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \
913 - LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die
914 - elif use driver && use kernel_linux; then
915 - MAKEOPTS=-j1 linux-mod_src_compile
916 - fi
917 -
918 - if use tools; then
919 - emake -C "${S}"/nvidia-settings-${PV}/src \
920 - AR="$(tc-getAR)" \
921 - CC="$(tc-getCC)" \
922 - LIBDIR="$(get_libdir)" \
923 - NV_VERBOSE=1 \
924 - RANLIB="$(tc-getRANLIB)" \
925 - DO_STRIP= \
926 - build-xnvctrl
927 -
928 - emake -C "${S}"/nvidia-settings-${PV}/src \
929 - CC="$(tc-getCC)" \
930 - GTK3_AVAILABLE=$(usex gtk3 1 0) \
931 - LD="$(tc-getCC)" \
932 - LIBDIR="$(get_libdir)" \
933 - NVML_ENABLED=0 \
934 - NV_USE_BUNDLED_LIBJANSSON=0 \
935 - NV_VERBOSE=1 \
936 - DO_STRIP=
937 - fi
938 -}
939 -
940 -# Install nvidia library:
941 -# the first parameter is the library to install
942 -# the second parameter is the provided soversion
943 -# the third parameter is the target directory if it is not /usr/lib
944 -donvidia() {
945 - # Full path to library
946 - nv_LIB="${1}"
947 -
948 - # SOVER to use
949 - nv_SOVER="$(scanelf -qF'%S#F' ${nv_LIB})"
950 -
951 - # Where to install
952 - nv_DEST="${2}"
953 -
954 - # Get just the library name
955 - nv_LIBNAME=$(basename "${nv_LIB}")
956 -
957 - if [[ "${nv_DEST}" ]]; then
958 - exeinto ${nv_DEST}
959 - action="doexe"
960 - else
961 - nv_DEST="/usr/$(get_libdir)"
962 - action="dolib.so"
963 - fi
964 -
965 - # Install the library
966 - ${action} ${nv_LIB} || die "failed to install ${nv_LIBNAME}"
967 -
968 - # If the library has a SONAME and SONAME does not match the library name,
969 - # then we need to create a symlink
970 - if [[ ${nv_SOVER} ]] && ! [[ "${nv_SOVER}" = "${nv_LIBNAME}" ]]; then
971 - dosym ${nv_LIBNAME} ${nv_DEST}/${nv_SOVER} \
972 - || die "failed to create ${nv_DEST}/${nv_SOVER} symlink"
973 - fi
974 -
975 - dosym ${nv_LIBNAME} ${nv_DEST}/${nv_LIBNAME/.so*/.so} \
976 - || die "failed to create ${nv_LIBNAME/.so*/.so} symlink"
977 -}
978 -
979 -src_install() {
980 - if use driver && use kernel_linux; then
981 - linux-mod_src_install
982 -
983 - # Add the aliases
984 - # This file is tweaked with the appropriate video group in
985 - # pkg_preinst, see bug #491414
986 - insinto /etc/modprobe.d
987 - newins "${FILESDIR}"/nvidia-169.07 nvidia.conf
988 - doins "${FILESDIR}"/nvidia-rmmod.conf
989 -
990 - # Ensures that our device nodes are created when not using X
991 - exeinto "$(get_udevdir)"
992 - newexe "${FILESDIR}"/nvidia-udev.sh-r1 nvidia-udev.sh
993 - udev_newrules "${FILESDIR}"/nvidia.udev-rule 99-nvidia.rules
994 - elif use kernel_FreeBSD; then
995 - if use x86-fbsd; then
996 - insinto /boot/modules
997 - doins "${S}/src/nvidia.kld"
998 - fi
999 -
1000 - exeinto /boot/modules
1001 - doexe "${S}/src/nvidia.ko"
1002 - fi
1003 -
1004 - # NVIDIA kernel <-> userspace driver config lib
1005 - donvidia "${NV_OBJ}"/libnvidia-cfg.so.${NV_SOVER}
1006 -
1007 - # NVIDIA framebuffer capture library
1008 - donvidia "${NV_OBJ}"/libnvidia-fbc.so.${NV_SOVER}
1009 -
1010 - # NVIDIA video encode/decode <-> CUDA
1011 - if use kernel_linux; then
1012 - donvidia "${NV_OBJ}"/libnvcuvid.so.${NV_SOVER}
1013 - donvidia "${NV_OBJ}"/libnvidia-encode.so.${NV_SOVER}
1014 - fi
1015 -
1016 - if use X; then
1017 - # Xorg DDX driver
1018 - insinto /usr/$(get_libdir)/xorg/modules/drivers
1019 - doins "${NV_X11}"/nvidia_drv.so
1020 -
1021 - # Xorg GLX driver
1022 - donvidia "${NV_X11}"/libglx.so.${NV_SOVER} \
1023 - /usr/$(get_libdir)/opengl/nvidia/extensions
1024 -
1025 - # Xorg nvidia.conf
1026 - if has_version '>=x11-base/xorg-server-1.16'; then
1027 - insinto /usr/share/X11/xorg.conf.d
1028 - newins {,50-}nvidia-drm-outputclass.conf
1029 - fi
1030 -
1031 - insinto /usr/share/glvnd/egl_vendor.d
1032 - doins "${NV_X11}"/10_nvidia.json
1033 - fi
1034 -
1035 - # OpenCL ICD for NVIDIA
1036 - if use kernel_linux; then
1037 - insinto /etc/OpenCL/vendors
1038 - doins "${NV_OBJ}"/nvidia.icd
1039 - fi
1040 -
1041 - # Documentation
1042 - if use kernel_FreeBSD; then
1043 - dodoc "${NV_DOC}"/README
1044 - use X && doman "${NV_MAN}"/nvidia-xconfig.1
1045 - use tools && doman "${NV_MAN}"/nvidia-settings.1
1046 - else
1047 - # Docs
1048 - newdoc "${NV_DOC}"/README.txt README
1049 - dodoc "${NV_DOC}"/NVIDIA_Changelog
1050 - doman "${NV_MAN}"/nvidia-smi.1
1051 - use X && doman "${NV_MAN}"/nvidia-xconfig.1
1052 - use tools && doman "${NV_MAN}"/nvidia-settings.1
1053 - doman "${NV_MAN}"/nvidia-cuda-mps-control.1
1054 - fi
1055 -
1056 - docinto html
1057 - dodoc -r "${NV_DOC}"/html/*
1058 -
1059 - # Helper Apps
1060 - exeinto /opt/bin/
1061 -
1062 - if use X; then
1063 - doexe "${NV_OBJ}"/nvidia-xconfig
1064 -
1065 - insinto /etc/vulkan/icd.d
1066 - doins nvidia_icd.json
1067 - fi
1068 -
1069 - if use kernel_linux; then
1070 - doexe "${NV_OBJ}"/nvidia-cuda-mps-control
1071 - doexe "${NV_OBJ}"/nvidia-cuda-mps-server
1072 - doexe "${NV_OBJ}"/nvidia-debugdump
1073 - doexe "${NV_OBJ}"/nvidia-persistenced
1074 - doexe "${NV_OBJ}"/nvidia-smi
1075 -
1076 - # install nvidia-modprobe setuid and symlink in /usr/bin (bug #505092)
1077 - doexe "${NV_OBJ}"/nvidia-modprobe
1078 - fowners root:video /opt/bin/nvidia-modprobe
1079 - fperms 4710 /opt/bin/nvidia-modprobe
1080 - dosym /{opt,usr}/bin/nvidia-modprobe
1081 -
1082 - doman nvidia-cuda-mps-control.1
1083 - doman nvidia-modprobe.1
1084 - doman nvidia-persistenced.1
1085 - newinitd "${FILESDIR}/nvidia-smi.init" nvidia-smi
1086 - newconfd "${FILESDIR}/nvidia-persistenced.conf" nvidia-persistenced
1087 - newinitd "${FILESDIR}/nvidia-persistenced.init" nvidia-persistenced
1088 - fi
1089 -
1090 - if use tools; then
1091 - emake -C "${S}"/nvidia-settings-${PV}/src/ \
1092 - DESTDIR="${D}" \
1093 - GTK3_AVAILABLE=$(usex gtk3 1 0) \
1094 - LIBDIR="${D}/usr/$(get_libdir)" \
1095 - NV_USE_BUNDLED_LIBJANSSON=0 \
1096 - NV_VERBOSE=1 \
1097 - PREFIX=/usr \
1098 - DO_STRIP= \
1099 - install
1100 -
1101 - if use static-libs; then
1102 - dolib.a "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/libXNVCtrl.a
1103 -
1104 - insinto /usr/include/NVCtrl
1105 - doins "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/*.h
1106 - fi
1107 -
1108 - insinto /usr/share/nvidia/
1109 - doins nvidia-application-profiles-${PV}-key-documentation
1110 -
1111 - insinto /etc/nvidia
1112 - newins \
1113 - nvidia-application-profiles-${PV}-rc nvidia-application-profiles-rc
1114 -
1115 - # There is no icon in the FreeBSD tarball.
1116 - use kernel_FreeBSD || \
1117 - doicon "${NV_OBJ}"/nvidia-settings.png
1118 -
1119 - domenu "${FILESDIR}"/nvidia-settings.desktop
1120 -
1121 - exeinto /etc/X11/xinit/xinitrc.d
1122 - newexe "${FILESDIR}"/95-nvidia-settings-r1 95-nvidia-settings
1123 - fi
1124 -
1125 - dobin "${NV_OBJ}"/nvidia-bug-report.sh
1126 -
1127 - if has_multilib_profile && use multilib; then
1128 - local OABI=${ABI}
1129 - for ABI in $(get_install_abis); do
1130 - src_install-libs
1131 - done
1132 - ABI=${OABI}
1133 - unset OABI
1134 - else
1135 - src_install-libs
1136 - fi
1137 -
1138 - is_final_abi || die "failed to iterate through all ABIs"
1139 -
1140 - readme.gentoo_create_doc
1141 -}
1142 -
1143 -src_install-libs() {
1144 - local inslibdir=$(get_libdir)
1145 - local GL_ROOT="/usr/$(get_libdir)/opengl/nvidia/lib"
1146 - local CL_ROOT="/usr/$(get_libdir)/OpenCL/vendors/nvidia"
1147 - local nv_libdir="${NV_OBJ}"
1148 -
1149 - if use kernel_linux && has_multilib_profile && [[ ${ABI} == "x86" ]]; then
1150 - nv_libdir="${NV_OBJ}"/32
1151 - fi
1152 -
1153 - if use X; then
1154 - NV_GLX_LIBRARIES=(
1155 - "libEGL.so.$(usex compat ${NV_SOVER} 1) ${GL_ROOT}"
1156 - "libEGL_nvidia.so.${NV_SOVER} ${GL_ROOT}"
1157 - "libGL.so.$(usex compat ${NV_SOVER} 1.0.0) ${GL_ROOT}"
1158 - "libGLESv1_CM.so.1 ${GL_ROOT}"
1159 - "libGLESv1_CM_nvidia.so.${NV_SOVER} ${GL_ROOT}"
1160 - "libGLESv2.so.2 ${GL_ROOT}"
1161 - "libGLESv2_nvidia.so.${NV_SOVER} ${GL_ROOT}"
1162 - "libGLX.so.0 ${GL_ROOT}"
1163 - "libGLX_nvidia.so.${NV_SOVER} ${GL_ROOT}"
1164 - "libGLdispatch.so.0 ${GL_ROOT}"
1165 - "libOpenCL.so.1.0.0 ${CL_ROOT}"
1166 - "libOpenGL.so.0 ${GL_ROOT}"
1167 - "libcuda.so.${NV_SOVER}"
1168 - "libnvcuvid.so.${NV_SOVER}"
1169 - "libnvidia-compiler.so.${NV_SOVER}"
1170 - "libnvidia-eglcore.so.${NV_SOVER}"
1171 - "libnvidia-encode.so.${NV_SOVER}"
1172 - "libnvidia-fatbinaryloader.so.${NV_SOVER}"
1173 - "libnvidia-fbc.so.${NV_SOVER}"
1174 - "libnvidia-glcore.so.${NV_SOVER}"
1175 - "libnvidia-glsi.so.${NV_SOVER}"
1176 - "libnvidia-ifr.so.${NV_SOVER}"
1177 - "libnvidia-opencl.so.${NV_SOVER}"
1178 - "libnvidia-ptxjitcompiler.so.${NV_SOVER}"
1179 - "libvdpau_nvidia.so.${NV_SOVER}"
1180 - )
1181 -
1182 - if use wayland && has_multilib_profile && [[ ${ABI} == "amd64" ]];
1183 - then
1184 - NV_GLX_LIBRARIES+=(
1185 - "libnvidia-egl-wayland.so.${NV_SOVER}"
1186 - )
1187 - fi
1188 -
1189 - if use kernel_linux && has_multilib_profile && [[ ${ABI} == "amd64" ]];
1190 - then
1191 - NV_GLX_LIBRARIES+=(
1192 - "libnvidia-wfb.so.${NV_SOVER}"
1193 - )
1194 - fi
1195 -
1196 - if use kernel_FreeBSD; then
1197 - NV_GLX_LIBRARIES+=(
1198 - "libnvidia-tls.so.${NV_SOVER}"
1199 - )
1200 - fi
1201 -
1202 - if use kernel_linux; then
1203 - NV_GLX_LIBRARIES+=(
1204 - "libnvidia-ml.so.${NV_SOVER}"
1205 - "tls/libnvidia-tls.so.${NV_SOVER}"
1206 - )
1207 - fi
1208 -
1209 - for NV_LIB in "${NV_GLX_LIBRARIES[@]}"; do
1210 - donvidia "${nv_libdir}"/${NV_LIB}
1211 - done
1212 - fi
1213 -}
1214 -
1215 -pkg_preinst() {
1216 - if use driver && use kernel_linux; then
1217 - linux-mod_pkg_preinst
1218 -
1219 - local videogroup="$(egetent group video | cut -d ':' -f 3)"
1220 - if [ -z "${videogroup}" ]; then
1221 - eerror "Failed to determine the video group gid"
1222 - die "Failed to determine the video group gid"
1223 - else
1224 - sed -i \
1225 - -e "s:PACKAGE:${PF}:g" \
1226 - -e "s:VIDEOGID:${videogroup}:" \
1227 - "${D}"/etc/modprobe.d/nvidia.conf || die
1228 - fi
1229 - fi
1230 -
1231 - # Clean the dynamic libGL stuff's home to ensure
1232 - # we dont have stale libs floating around
1233 - if [ -d "${ROOT}"/usr/lib/opengl/nvidia ]; then
1234 - rm -rf "${ROOT}"/usr/lib/opengl/nvidia/*
1235 - fi
1236 - # Make sure we nuke the old nvidia-glx's env.d file
1237 - if [ -e "${ROOT}"/etc/env.d/09nvidia ]; then
1238 - rm -f "${ROOT}"/etc/env.d/09nvidia
1239 - fi
1240 -}
1241 -
1242 -pkg_postinst() {
1243 - use driver && use kernel_linux && linux-mod_pkg_postinst
1244 -
1245 - # Switch to the nvidia implementation
1246 - use X && "${ROOT}"/usr/bin/eselect opengl set --use-old nvidia
1247 - "${ROOT}"/usr/bin/eselect opencl set --use-old nvidia
1248 -
1249 - readme.gentoo_print_elog
1250 -
1251 - if ! use X; then
1252 - elog "You have elected to not install the X.org driver. Along with"
1253 - elog "this the OpenGL libraries and VDPAU libraries were not"
1254 - elog "installed. Additionally, once the driver is loaded your card"
1255 - elog "and fan will run at max speed which may not be desirable."
1256 - elog "Use the 'nvidia-smi' init script to have your card and fan"
1257 - elog "speed scale appropriately."
1258 - elog
1259 - fi
1260 - if ! use tools; then
1261 - elog "USE=tools controls whether the nvidia-settings application"
1262 - elog "is installed. If you would like to use it, enable that"
1263 - elog "flag and re-emerge this ebuild. Optionally you can install"
1264 - elog "media-video/nvidia-settings"
1265 - elog
1266 - fi
1267 -}
1268 -
1269 -pkg_prerm() {
1270 - use X && "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11
1271 -}
1272 -
1273 -pkg_postrm() {
1274 - use driver && use kernel_linux && linux-mod_pkg_postrm
1275 - use X && "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11
1276 -}
1277
1278 diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-378.13-r1.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-378.13-r1.ebuild
1279 deleted file mode 100644
1280 index 66cd8db5127..00000000000
1281 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-378.13-r1.ebuild
1282 +++ /dev/null
1283 @@ -1,572 +0,0 @@
1284 -# Copyright 1999-2018 Gentoo Authors
1285 -# Distributed under the terms of the GNU General Public License v2
1286 -
1287 -EAPI=6
1288 -inherit eutils flag-o-matic linux-info linux-mod multilib-minimal nvidia-driver \
1289 - portability toolchain-funcs unpacker user udev
1290 -
1291 -NV_URI="https://download.nvidia.com/XFree86/"
1292 -X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}"
1293 -AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}"
1294 -ARM_NV_PACKAGE="NVIDIA-Linux-armv7l-gnueabihf-${PV}"
1295 -X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}"
1296 -AMD64_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86_64-${PV}"
1297 -
1298 -DESCRIPTION="NVIDIA Accelerated Graphics Driver"
1299 -HOMEPAGE="http://www.nvidia.com/ http://www.nvidia.com/Download/Find.aspx"
1300 -SRC_URI="
1301 - amd64-fbsd? ( ${NV_URI}FreeBSD-x86_64/${PV}/${AMD64_FBSD_NV_PACKAGE}.tar.gz )
1302 - amd64? ( ${NV_URI}Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run )
1303 - arm? ( ${NV_URI}Linux-32bit-ARM/${PV}/${ARM_NV_PACKAGE}.run )
1304 - x86-fbsd? ( ${NV_URI}FreeBSD-x86/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )
1305 - x86? ( ${NV_URI}Linux-x86/${PV}/${X86_NV_PACKAGE}.run )
1306 - tools? (
1307 - https://download.nvidia.com/XFree86/nvidia-settings/nvidia-settings-${PV}.tar.bz2
1308 - )
1309 -"
1310 -
1311 -LICENSE="GPL-2 NVIDIA-r2"
1312 -SLOT="0/${PV%.*}"
1313 -KEYWORDS="-* amd64 x86 ~amd64-fbsd ~x86-fbsd"
1314 -RESTRICT="bindist mirror"
1315 -EMULTILIB_PKG="true"
1316 -
1317 -IUSE="acpi compat +driver gtk3 kernel_FreeBSD kernel_linux +kms multilib pax_kernel static-libs +tools uvm wayland +X"
1318 -REQUIRED_USE="
1319 - tools? ( X )
1320 - static-libs? ( tools )
1321 -"
1322 -
1323 -COMMON="
1324 - app-eselect/eselect-opencl
1325 - kernel_linux? ( >=sys-libs/glibc-2.6.1 )
1326 - tools? (
1327 - dev-libs/atk
1328 - dev-libs/glib:2
1329 - dev-libs/jansson
1330 - gtk3? (
1331 - x11-libs/gtk+:3
1332 - )
1333 - x11-libs/cairo
1334 - x11-libs/gdk-pixbuf[X]
1335 - x11-libs/gtk+:2
1336 - x11-libs/libX11
1337 - x11-libs/libXext
1338 - x11-libs/libXrandr
1339 - x11-libs/libXv
1340 - x11-libs/libXxf86vm
1341 - x11-libs/pango[X]
1342 - )
1343 - X? (
1344 - >=app-eselect/eselect-opengl-1.0.9
1345 - app-misc/pax-utils
1346 - )
1347 -"
1348 -DEPEND="
1349 - ${COMMON}
1350 - kernel_linux? ( virtual/linux-sources )
1351 -"
1352 -RDEPEND="
1353 - ${COMMON}
1354 - acpi? ( sys-power/acpid )
1355 - tools? ( !media-video/nvidia-settings )
1356 - wayland? ( dev-libs/wayland[${MULTILIB_USEDEP}] )
1357 - X? (
1358 - <x11-base/xorg-server-1.19.99:=
1359 - >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
1360 - >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
1361 - >=x11-libs/libvdpau-1.0[${MULTILIB_USEDEP}]
1362 - sys-libs/zlib[${MULTILIB_USEDEP}]
1363 - )
1364 -"
1365 -
1366 -QA_PREBUILT="opt/* usr/lib*"
1367 -
1368 -S=${WORKDIR}/
1369 -
1370 -nvidia_drivers_versions_check() {
1371 - if use amd64 && has_multilib_profile && \
1372 - [ "${DEFAULT_ABI}" != "amd64" ]; then
1373 - eerror "This ebuild doesn't currently support changing your default ABI"
1374 - die "Unexpected \${DEFAULT_ABI} = ${DEFAULT_ABI}"
1375 - fi
1376 -
1377 - if use kernel_linux && kernel_is ge 4 10; then
1378 - ewarn "Gentoo supports kernels which are supported by NVIDIA"
1379 - ewarn "which are limited to the following kernels:"
1380 - ewarn "<sys-kernel/gentoo-sources-4.10"
1381 - ewarn "<sys-kernel/vanilla-sources-4.10"
1382 - ewarn ""
1383 - ewarn "You are free to utilize epatch_user to provide whatever"
1384 - ewarn "support you feel is appropriate, but will not receive"
1385 - ewarn "support as a result of those changes."
1386 - ewarn ""
1387 - ewarn "Do not file a bug report about this."
1388 - ewarn ""
1389 - fi
1390 -
1391 - # Since Nvidia ships many different series of drivers, we need to give the user
1392 - # some kind of guidance as to what version they should install. This tries
1393 - # to point the user in the right direction but can't be perfect. check
1394 - # nvidia-driver.eclass
1395 - nvidia-driver-check-warning
1396 -
1397 - # Kernel features/options to check for
1398 - CONFIG_CHECK="!DEBUG_MUTEXES ~!LOCKDEP ~MTRR ~SYSVIPC ~ZONE_DMA"
1399 - use x86 && CONFIG_CHECK+=" ~HIGHMEM"
1400 -
1401 - # Now do the above checks
1402 - use kernel_linux && check_extra_config
1403 -}
1404 -
1405 -pkg_pretend() {
1406 - nvidia_drivers_versions_check
1407 -}
1408 -
1409 -pkg_setup() {
1410 - nvidia_drivers_versions_check
1411 -
1412 - # try to turn off distcc and ccache for people that have a problem with it
1413 - export DISTCC_DISABLE=1
1414 - export CCACHE_DISABLE=1
1415 -
1416 - if use driver && use kernel_linux; then
1417 - MODULE_NAMES="nvidia(video:${S}/kernel)"
1418 - use uvm && MODULE_NAMES+=" nvidia-uvm(video:${S}/kernel)"
1419 - use kms && MODULE_NAMES+=" nvidia-modeset(video:${S}/kernel) nvidia-drm(video:${S}/kernel)"
1420 -
1421 - # This needs to run after MODULE_NAMES (so that the eclass checks
1422 - # whether the kernel supports loadable modules) but before BUILD_PARAMS
1423 - # is set (so that KV_DIR is populated).
1424 - linux-mod_pkg_setup
1425 -
1426 - BUILD_PARAMS="IGNORE_CC_MISMATCH=yes V=1 SYSSRC=${KV_DIR} \
1427 - SYSOUT=${KV_OUT_DIR} CC=$(tc-getBUILD_CC) NV_VERBOSE=1"
1428 -
1429 - # linux-mod_src_compile calls set_arch_to_kernel, which
1430 - # sets the ARCH to x86 but NVIDIA's wrapping Makefile
1431 - # expects x86_64 or i386 and then converts it to x86
1432 - # later on in the build process
1433 - BUILD_FIXES="ARCH=$(uname -m | sed -e 's/i.86/i386/')"
1434 - fi
1435 -
1436 - if use kernel_linux && kernel_is lt 2 6 9; then
1437 - eerror "You must build this against 2.6.9 or higher kernels."
1438 - fi
1439 -
1440 - # set variables to where files are in the package structure
1441 - if use kernel_FreeBSD; then
1442 - use x86-fbsd && S="${WORKDIR}/${X86_FBSD_NV_PACKAGE}"
1443 - use amd64-fbsd && S="${WORKDIR}/${AMD64_FBSD_NV_PACKAGE}"
1444 - NV_DOC="${S}/doc"
1445 - NV_OBJ="${S}/obj"
1446 - NV_SRC="${S}/src"
1447 - NV_MAN="${S}/x11/man"
1448 - NV_X11="${S}/obj"
1449 - NV_SOVER=1
1450 - elif use kernel_linux; then
1451 - NV_DOC="${S}"
1452 - NV_OBJ="${S}"
1453 - NV_SRC="${S}/kernel"
1454 - NV_MAN="${S}"
1455 - NV_X11="${S}"
1456 - NV_SOVER=${PV}
1457 - else
1458 - die "Could not determine proper NVIDIA package"
1459 - fi
1460 -}
1461 -
1462 -src_prepare() {
1463 - if use pax_kernel; then
1464 - ewarn "Using PAX patches is not supported. You will be asked to"
1465 - ewarn "use a standard kernel should you have issues. Should you"
1466 - ewarn "need support with these patches, contact the PaX team."
1467 - eapply "${FILESDIR}"/${PN}-375.20-pax.patch
1468 - fi
1469 -
1470 - local man_file
1471 - for man_file in "${NV_MAN}"/*1.gz; do
1472 - gunzip $man_file || die
1473 - done
1474 -
1475 - # Allow user patches so they can support RC kernels and whatever else
1476 - eapply_user
1477 -}
1478 -
1479 -src_compile() {
1480 - # This is already the default on Linux, as there's no toplevel Makefile, but
1481 - # on FreeBSD there's one and triggers the kernel module build, as we install
1482 - # it by itself, pass this.
1483 -
1484 - cd "${NV_SRC}"
1485 - if use kernel_FreeBSD; then
1486 - MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \
1487 - LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die
1488 - elif use driver && use kernel_linux; then
1489 - MAKEOPTS=-j1 linux-mod_src_compile
1490 - fi
1491 -
1492 - if use tools; then
1493 - emake -C "${S}"/nvidia-settings-${PV}/src \
1494 - AR="$(tc-getAR)" \
1495 - CC="$(tc-getCC)" \
1496 - LIBDIR="$(get_libdir)" \
1497 - NV_VERBOSE=1 \
1498 - RANLIB="$(tc-getRANLIB)" \
1499 - DO_STRIP= \
1500 - build-xnvctrl
1501 -
1502 - emake -C "${S}"/nvidia-settings-${PV}/src \
1503 - CC="$(tc-getCC)" \
1504 - GTK3_AVAILABLE=$(usex gtk3 1 0) \
1505 - LD="$(tc-getCC)" \
1506 - LIBDIR="$(get_libdir)" \
1507 - NVML_ENABLED=0 \
1508 - NV_USE_BUNDLED_LIBJANSSON=0 \
1509 - NV_VERBOSE=1 \
1510 - DO_STRIP=
1511 - fi
1512 -}
1513 -
1514 -# Install nvidia library:
1515 -# the first parameter is the library to install
1516 -# the second parameter is the provided soversion
1517 -# the third parameter is the target directory if it is not /usr/lib
1518 -donvidia() {
1519 - # Full path to library
1520 - nv_LIB="${1}"
1521 -
1522 - # SOVER to use
1523 - nv_SOVER="$(scanelf -qF'%S#F' ${nv_LIB})"
1524 -
1525 - # Where to install
1526 - nv_DEST="${2}"
1527 -
1528 - # Get just the library name
1529 - nv_LIBNAME=$(basename "${nv_LIB}")
1530 -
1531 - if [[ "${nv_DEST}" ]]; then
1532 - exeinto ${nv_DEST}
1533 - action="doexe"
1534 - else
1535 - nv_DEST="/usr/$(get_libdir)"
1536 - action="dolib.so"
1537 - fi
1538 -
1539 - # Install the library
1540 - ${action} ${nv_LIB} || die "failed to install ${nv_LIBNAME}"
1541 -
1542 - # If the library has a SONAME and SONAME does not match the library name,
1543 - # then we need to create a symlink
1544 - if [[ ${nv_SOVER} ]] && ! [[ "${nv_SOVER}" = "${nv_LIBNAME}" ]]; then
1545 - dosym ${nv_LIBNAME} ${nv_DEST}/${nv_SOVER} \
1546 - || die "failed to create ${nv_DEST}/${nv_SOVER} symlink"
1547 - fi
1548 -
1549 - dosym ${nv_LIBNAME} ${nv_DEST}/${nv_LIBNAME/.so*/.so} \
1550 - || die "failed to create ${nv_LIBNAME/.so*/.so} symlink"
1551 -}
1552 -
1553 -src_install() {
1554 - if use driver && use kernel_linux; then
1555 - linux-mod_src_install
1556 -
1557 - # Add the aliases
1558 - # This file is tweaked with the appropriate video group in
1559 - # pkg_preinst, see bug #491414
1560 - insinto /etc/modprobe.d
1561 - newins "${FILESDIR}"/nvidia-169.07 nvidia.conf
1562 - doins "${FILESDIR}"/nvidia-rmmod.conf
1563 -
1564 - # Ensures that our device nodes are created when not using X
1565 - exeinto "$(get_udevdir)"
1566 - newexe "${FILESDIR}"/nvidia-udev.sh-r1 nvidia-udev.sh
1567 - udev_newrules "${FILESDIR}"/nvidia.udev-rule 99-nvidia.rules
1568 - elif use kernel_FreeBSD; then
1569 - if use x86-fbsd; then
1570 - insinto /boot/modules
1571 - doins "${S}/src/nvidia.kld"
1572 - fi
1573 -
1574 - exeinto /boot/modules
1575 - doexe "${S}/src/nvidia.ko"
1576 - fi
1577 -
1578 - # NVIDIA kernel <-> userspace driver config lib
1579 - donvidia ${NV_OBJ}/libnvidia-cfg.so.${NV_SOVER}
1580 -
1581 - # NVIDIA framebuffer capture library
1582 - donvidia ${NV_OBJ}/libnvidia-fbc.so.${NV_SOVER}
1583 -
1584 - # NVIDIA video encode/decode <-> CUDA
1585 - if use kernel_linux; then
1586 - donvidia ${NV_OBJ}/libnvcuvid.so.${NV_SOVER}
1587 - donvidia ${NV_OBJ}/libnvidia-encode.so.${NV_SOVER}
1588 - fi
1589 -
1590 - if use X; then
1591 - # Xorg DDX driver
1592 - insinto /usr/$(get_libdir)/xorg/modules/drivers
1593 - doins ${NV_X11}/nvidia_drv.so
1594 -
1595 - # Xorg GLX driver
1596 - donvidia ${NV_X11}/libglx.so.${NV_SOVER} \
1597 - /usr/$(get_libdir)/opengl/nvidia/extensions
1598 -
1599 - # Xorg nvidia.conf
1600 - if has_version '>=x11-base/xorg-server-1.16'; then
1601 - insinto /usr/share/X11/xorg.conf.d
1602 - newins {,50-}nvidia-drm-outputclass.conf
1603 - fi
1604 -
1605 - insinto /usr/share/glvnd/egl_vendor.d
1606 - doins ${NV_X11}/10_nvidia.json
1607 - fi
1608 -
1609 - if use wayland; then
1610 - insinto /usr/share/egl/egl_external_platform.d
1611 - doins ${NV_X11}/10_nvidia_wayland.json
1612 - fi
1613 -
1614 - # OpenCL ICD for NVIDIA
1615 - if use kernel_linux; then
1616 - insinto /etc/OpenCL/vendors
1617 - doins ${NV_OBJ}/nvidia.icd
1618 - fi
1619 -
1620 - # Documentation
1621 - if use kernel_FreeBSD; then
1622 - dodoc "${NV_DOC}/README"
1623 - use X && doman "${NV_MAN}/nvidia-xconfig.1"
1624 - use tools && doman "${NV_MAN}/nvidia-settings.1"
1625 - else
1626 - # Docs
1627 - newdoc "${NV_DOC}/README.txt" README
1628 - dodoc "${NV_DOC}/NVIDIA_Changelog"
1629 - doman "${NV_MAN}"/nvidia-smi.1
1630 - use X && doman "${NV_MAN}"/nvidia-xconfig.1
1631 - use tools && doman "${NV_MAN}"/nvidia-settings.1
1632 - doman "${NV_MAN}"/nvidia-cuda-mps-control.1
1633 - fi
1634 -
1635 - docinto html
1636 - dodoc -r ${NV_DOC}/html/*
1637 -
1638 - # Helper Apps
1639 - exeinto /opt/bin/
1640 -
1641 - if use X; then
1642 - doexe ${NV_OBJ}/nvidia-xconfig
1643 -
1644 - insinto /etc/vulkan/icd.d
1645 - doins nvidia_icd.json
1646 - fi
1647 -
1648 - if use kernel_linux; then
1649 - doexe ${NV_OBJ}/nvidia-cuda-mps-control
1650 - doexe ${NV_OBJ}/nvidia-cuda-mps-server
1651 - doexe ${NV_OBJ}/nvidia-debugdump
1652 - doexe ${NV_OBJ}/nvidia-persistenced
1653 - doexe ${NV_OBJ}/nvidia-smi
1654 -
1655 - # install nvidia-modprobe setuid and symlink in /usr/bin (bug #505092)
1656 - doexe ${NV_OBJ}/nvidia-modprobe
1657 - fowners root:video /opt/bin/nvidia-modprobe
1658 - fperms 4710 /opt/bin/nvidia-modprobe
1659 - dosym /{opt,usr}/bin/nvidia-modprobe
1660 -
1661 - doman nvidia-cuda-mps-control.1
1662 - doman nvidia-modprobe.1
1663 - doman nvidia-persistenced.1
1664 - newinitd "${FILESDIR}/nvidia-smi.init" nvidia-smi
1665 - newconfd "${FILESDIR}/nvidia-persistenced.conf" nvidia-persistenced
1666 - newinitd "${FILESDIR}/nvidia-persistenced.init" nvidia-persistenced
1667 - fi
1668 -
1669 - if use tools; then
1670 - emake -C "${S}"/nvidia-settings-${PV}/src/ \
1671 - DESTDIR="${D}" \
1672 - GTK3_AVAILABLE=$(usex gtk3 1 0) \
1673 - LIBDIR="${D}/usr/$(get_libdir)" \
1674 - NV_USE_BUNDLED_LIBJANSSON=0 \
1675 - NV_VERBOSE=1 \
1676 - PREFIX=/usr \
1677 - DO_STRIP= \
1678 - install
1679 -
1680 - if use static-libs; then
1681 - dolib.a "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/libXNVCtrl.a
1682 -
1683 - insinto /usr/include/NVCtrl
1684 - doins "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/*.h
1685 - fi
1686 -
1687 - insinto /usr/share/nvidia/
1688 - doins nvidia-application-profiles-${PV}-key-documentation
1689 -
1690 - insinto /etc/nvidia
1691 - newins \
1692 - nvidia-application-profiles-${PV}-rc nvidia-application-profiles-rc
1693 -
1694 - # There is no icon in the FreeBSD tarball.
1695 - use kernel_FreeBSD || \
1696 - doicon ${NV_OBJ}/nvidia-settings.png
1697 -
1698 - domenu "${FILESDIR}"/nvidia-settings.desktop
1699 -
1700 - exeinto /etc/X11/xinit/xinitrc.d
1701 - newexe "${FILESDIR}"/95-nvidia-settings-r1 95-nvidia-settings
1702 - fi
1703 -
1704 - dobin ${NV_OBJ}/nvidia-bug-report.sh
1705 -
1706 - if has_multilib_profile && use multilib; then
1707 - local OABI=${ABI}
1708 - for ABI in $(get_install_abis); do
1709 - src_install-libs
1710 - done
1711 - ABI=${OABI}
1712 - unset OABI
1713 - else
1714 - src_install-libs
1715 - fi
1716 -
1717 - is_final_abi || die "failed to iterate through all ABIs"
1718 -
1719 - readme.gentoo_create_doc
1720 -}
1721 -
1722 -src_install-libs() {
1723 - local inslibdir=$(get_libdir)
1724 - local GL_ROOT="/usr/$(get_libdir)/opengl/nvidia/lib"
1725 - local CL_ROOT="/usr/$(get_libdir)/OpenCL/vendors/nvidia"
1726 - local nv_libdir="${NV_OBJ}"
1727 -
1728 - if use kernel_linux && has_multilib_profile && [[ ${ABI} == "x86" ]]; then
1729 - nv_libdir="${NV_OBJ}"/32
1730 - fi
1731 -
1732 - if use X; then
1733 - NV_GLX_LIBRARIES=(
1734 - "libEGL.so.$(usex compat ${NV_SOVER} 1) ${GL_ROOT}"
1735 - "libEGL_nvidia.so.${NV_SOVER} ${GL_ROOT}"
1736 - "libGL.so.$(usex compat ${NV_SOVER} 1.0.0) ${GL_ROOT}"
1737 - "libGLESv1_CM.so.1 ${GL_ROOT}"
1738 - "libGLESv1_CM_nvidia.so.${NV_SOVER} ${GL_ROOT}"
1739 - "libGLESv2.so.2 ${GL_ROOT}"
1740 - "libGLESv2_nvidia.so.${NV_SOVER} ${GL_ROOT}"
1741 - "libGLX.so.0 ${GL_ROOT}"
1742 - "libGLX_nvidia.so.${NV_SOVER} ${GL_ROOT}"
1743 - "libGLdispatch.so.0 ${GL_ROOT}"
1744 - "libOpenCL.so.1.0.0 ${CL_ROOT}"
1745 - "libOpenGL.so.0 ${GL_ROOT}"
1746 - "libcuda.so.${NV_SOVER}"
1747 - "libnvcuvid.so.${NV_SOVER}"
1748 - "libnvidia-compiler.so.${NV_SOVER}"
1749 - "libnvidia-eglcore.so.${NV_SOVER}"
1750 - "libnvidia-encode.so.${NV_SOVER}"
1751 - "libnvidia-fatbinaryloader.so.${NV_SOVER}"
1752 - "libnvidia-fbc.so.${NV_SOVER}"
1753 - "libnvidia-glcore.so.${NV_SOVER}"
1754 - "libnvidia-glsi.so.${NV_SOVER}"
1755 - "libnvidia-ifr.so.${NV_SOVER}"
1756 - "libnvidia-opencl.so.${NV_SOVER}"
1757 - "libnvidia-ptxjitcompiler.so.${NV_SOVER}"
1758 - "libvdpau_nvidia.so.${NV_SOVER}"
1759 - )
1760 -
1761 - if use wayland && has_multilib_profile && [[ ${ABI} == "amd64" ]];
1762 - then
1763 - NV_GLX_LIBRARIES+=(
1764 - "libnvidia-egl-wayland.so.1.0.1"
1765 - )
1766 - fi
1767 -
1768 - if use kernel_linux && has_multilib_profile && [[ ${ABI} == "amd64" ]];
1769 - then
1770 - NV_GLX_LIBRARIES+=(
1771 - "libnvidia-wfb.so.${NV_SOVER}"
1772 - )
1773 - fi
1774 -
1775 - if use kernel_FreeBSD; then
1776 - NV_GLX_LIBRARIES+=(
1777 - "libnvidia-tls.so.${NV_SOVER}"
1778 - )
1779 - fi
1780 -
1781 - if use kernel_linux; then
1782 - NV_GLX_LIBRARIES+=(
1783 - "libnvidia-ml.so.${NV_SOVER}"
1784 - "tls/libnvidia-tls.so.${NV_SOVER}"
1785 - )
1786 - fi
1787 -
1788 - for NV_LIB in "${NV_GLX_LIBRARIES[@]}"; do
1789 - donvidia "${nv_libdir}"/${NV_LIB}
1790 - done
1791 - fi
1792 -}
1793 -
1794 -pkg_preinst() {
1795 - if use driver && use kernel_linux; then
1796 - linux-mod_pkg_preinst
1797 -
1798 - local videogroup="$(egetent group video | cut -d ':' -f 3)"
1799 - if [ -z "${videogroup}" ]; then
1800 - eerror "Failed to determine the video group gid"
1801 - die "Failed to determine the video group gid"
1802 - else
1803 - sed -i \
1804 - -e "s:PACKAGE:${PF}:g" \
1805 - -e "s:VIDEOGID:${videogroup}:" \
1806 - "${D}"/etc/modprobe.d/nvidia.conf || die
1807 - fi
1808 - fi
1809 -
1810 - # Clean the dynamic libGL stuff's home to ensure
1811 - # we dont have stale libs floating around
1812 - if [ -d "${ROOT}"/usr/lib/opengl/nvidia ]; then
1813 - rm -rf "${ROOT}"/usr/lib/opengl/nvidia/*
1814 - fi
1815 - # Make sure we nuke the old nvidia-glx's env.d file
1816 - if [ -e "${ROOT}"/etc/env.d/09nvidia ]; then
1817 - rm -f "${ROOT}"/etc/env.d/09nvidia
1818 - fi
1819 -}
1820 -
1821 -pkg_postinst() {
1822 - use driver && use kernel_linux && linux-mod_pkg_postinst
1823 -
1824 - # Switch to the nvidia implementation
1825 - use X && "${ROOT}"/usr/bin/eselect opengl set --use-old nvidia
1826 - "${ROOT}"/usr/bin/eselect opencl set --use-old nvidia
1827 -
1828 - readme.gentoo_print_elog
1829 -
1830 - if ! use X; then
1831 - elog "You have elected to not install the X.org driver. Along with"
1832 - elog "this the OpenGL libraries and VDPAU libraries were not"
1833 - elog "installed. Additionally, once the driver is loaded your card"
1834 - elog "and fan will run at max speed which may not be desirable."
1835 - elog "Use the 'nvidia-smi' init script to have your card and fan"
1836 - elog "speed scale appropriately."
1837 - elog
1838 - fi
1839 - if ! use tools; then
1840 - elog "USE=tools controls whether the nvidia-settings application"
1841 - elog "is installed. If you would like to use it, enable that"
1842 - elog "flag and re-emerge this ebuild. Optionally you can install"
1843 - elog "media-video/nvidia-settings"
1844 - elog
1845 - fi
1846 -}
1847 -
1848 -pkg_prerm() {
1849 - use X && "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11
1850 -}
1851 -
1852 -pkg_postrm() {
1853 - use driver && use kernel_linux && linux-mod_pkg_postrm
1854 - use X && "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11
1855 -}
1856
1857 diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-381.22-r1.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-381.22-r1.ebuild
1858 deleted file mode 100644
1859 index 2d4d3a73dcd..00000000000
1860 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-381.22-r1.ebuild
1861 +++ /dev/null
1862 @@ -1,573 +0,0 @@
1863 -# Copyright 1999-2018 Gentoo Authors
1864 -# Distributed under the terms of the GNU General Public License v2
1865 -
1866 -EAPI=6
1867 -inherit eutils flag-o-matic linux-info linux-mod multilib-minimal nvidia-driver \
1868 - portability toolchain-funcs unpacker user udev
1869 -
1870 -NV_URI="https://download.nvidia.com/XFree86/"
1871 -X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}"
1872 -AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}"
1873 -ARM_NV_PACKAGE="NVIDIA-Linux-armv7l-gnueabihf-${PV}"
1874 -X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}"
1875 -AMD64_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86_64-${PV}"
1876 -
1877 -DESCRIPTION="NVIDIA Accelerated Graphics Driver"
1878 -HOMEPAGE="http://www.nvidia.com/ http://www.nvidia.com/Download/Find.aspx"
1879 -SRC_URI="
1880 - amd64-fbsd? ( ${NV_URI}FreeBSD-x86_64/${PV}/${AMD64_FBSD_NV_PACKAGE}.tar.gz )
1881 - amd64? ( ${NV_URI}Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run )
1882 - arm? ( ${NV_URI}Linux-32bit-ARM/${PV}/${ARM_NV_PACKAGE}.run )
1883 - x86-fbsd? ( ${NV_URI}FreeBSD-x86/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )
1884 - x86? ( ${NV_URI}Linux-x86/${PV}/${X86_NV_PACKAGE}.run )
1885 - tools? (
1886 - ${NV_URI}nvidia-settings/nvidia-settings-${PV}.tar.bz2
1887 - )
1888 -"
1889 -
1890 -LICENSE="GPL-2 NVIDIA-r2"
1891 -SLOT="0/${PV%.*}"
1892 -KEYWORDS="-* amd64 x86 ~amd64-fbsd ~x86-fbsd"
1893 -RESTRICT="bindist mirror"
1894 -EMULTILIB_PKG="true"
1895 -
1896 -IUSE="acpi compat +driver gtk3 kernel_FreeBSD kernel_linux +kms multilib pax_kernel static-libs +tools uvm wayland +X"
1897 -REQUIRED_USE="
1898 - tools? ( X )
1899 - static-libs? ( tools )
1900 -"
1901 -
1902 -COMMON="
1903 - app-eselect/eselect-opencl
1904 - kernel_linux? ( >=sys-libs/glibc-2.6.1 )
1905 - tools? (
1906 - dev-libs/atk
1907 - dev-libs/glib:2
1908 - dev-libs/jansson
1909 - gtk3? (
1910 - x11-libs/gtk+:3
1911 - )
1912 - x11-libs/cairo
1913 - x11-libs/gdk-pixbuf[X]
1914 - x11-libs/gtk+:2
1915 - x11-libs/libX11
1916 - x11-libs/libXext
1917 - x11-libs/libXrandr
1918 - x11-libs/libXv
1919 - x11-libs/libXxf86vm
1920 - x11-libs/pango[X]
1921 - )
1922 - X? (
1923 - >=app-eselect/eselect-opengl-1.0.9
1924 - app-misc/pax-utils
1925 - )
1926 -"
1927 -DEPEND="
1928 - ${COMMON}
1929 - kernel_linux? ( virtual/linux-sources )
1930 - tools? ( sys-apps/dbus )
1931 -"
1932 -RDEPEND="
1933 - ${COMMON}
1934 - acpi? ( sys-power/acpid )
1935 - tools? ( !media-video/nvidia-settings )
1936 - wayland? ( dev-libs/wayland[${MULTILIB_USEDEP}] )
1937 - X? (
1938 - <x11-base/xorg-server-1.19.99:=
1939 - >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
1940 - >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
1941 - >=x11-libs/libvdpau-1.0[${MULTILIB_USEDEP}]
1942 - sys-libs/zlib[${MULTILIB_USEDEP}]
1943 - )
1944 -"
1945 -
1946 -QA_PREBUILT="opt/* usr/lib*"
1947 -
1948 -S=${WORKDIR}/
1949 -
1950 -nvidia_drivers_versions_check() {
1951 - if use amd64 && has_multilib_profile && \
1952 - [ "${DEFAULT_ABI}" != "amd64" ]; then
1953 - eerror "This ebuild doesn't currently support changing your default ABI"
1954 - die "Unexpected \${DEFAULT_ABI} = ${DEFAULT_ABI}"
1955 - fi
1956 -
1957 - if use kernel_linux && kernel_is ge 4 12; then
1958 - ewarn "Gentoo supports kernels which are supported by NVIDIA"
1959 - ewarn "which are limited to the following kernels:"
1960 - ewarn "<sys-kernel/gentoo-sources-4.12"
1961 - ewarn "<sys-kernel/vanilla-sources-4.12"
1962 - ewarn ""
1963 - ewarn "You are free to utilize epatch_user to provide whatever"
1964 - ewarn "support you feel is appropriate, but will not receive"
1965 - ewarn "support as a result of those changes."
1966 - ewarn ""
1967 - ewarn "Do not file a bug report about this."
1968 - ewarn ""
1969 - fi
1970 -
1971 - # Since Nvidia ships many different series of drivers, we need to give the user
1972 - # some kind of guidance as to what version they should install. This tries
1973 - # to point the user in the right direction but can't be perfect. check
1974 - # nvidia-driver.eclass
1975 - nvidia-driver-check-warning
1976 -
1977 - # Kernel features/options to check for
1978 - CONFIG_CHECK="!DEBUG_MUTEXES ~!LOCKDEP ~MTRR ~SYSVIPC ~ZONE_DMA"
1979 - use x86 && CONFIG_CHECK+=" ~HIGHMEM"
1980 -
1981 - # Now do the above checks
1982 - use kernel_linux && check_extra_config
1983 -}
1984 -
1985 -pkg_pretend() {
1986 - nvidia_drivers_versions_check
1987 -}
1988 -
1989 -pkg_setup() {
1990 - nvidia_drivers_versions_check
1991 -
1992 - # try to turn off distcc and ccache for people that have a problem with it
1993 - export DISTCC_DISABLE=1
1994 - export CCACHE_DISABLE=1
1995 -
1996 - if use driver && use kernel_linux; then
1997 - MODULE_NAMES="nvidia(video:${S}/kernel)"
1998 - use uvm && MODULE_NAMES+=" nvidia-uvm(video:${S}/kernel)"
1999 - use kms && MODULE_NAMES+=" nvidia-modeset(video:${S}/kernel) nvidia-drm(video:${S}/kernel)"
2000 -
2001 - # This needs to run after MODULE_NAMES (so that the eclass checks
2002 - # whether the kernel supports loadable modules) but before BUILD_PARAMS
2003 - # is set (so that KV_DIR is populated).
2004 - linux-mod_pkg_setup
2005 -
2006 - BUILD_PARAMS="IGNORE_CC_MISMATCH=yes V=1 SYSSRC=${KV_DIR} \
2007 - SYSOUT=${KV_OUT_DIR} CC=$(tc-getBUILD_CC) NV_VERBOSE=1"
2008 -
2009 - # linux-mod_src_compile calls set_arch_to_kernel, which
2010 - # sets the ARCH to x86 but NVIDIA's wrapping Makefile
2011 - # expects x86_64 or i386 and then converts it to x86
2012 - # later on in the build process
2013 - BUILD_FIXES="ARCH=$(uname -m | sed -e 's/i.86/i386/')"
2014 - fi
2015 -
2016 - if use kernel_linux && kernel_is lt 2 6 9; then
2017 - eerror "You must build this against 2.6.9 or higher kernels."
2018 - fi
2019 -
2020 - # set variables to where files are in the package structure
2021 - if use kernel_FreeBSD; then
2022 - use x86-fbsd && S="${WORKDIR}/${X86_FBSD_NV_PACKAGE}"
2023 - use amd64-fbsd && S="${WORKDIR}/${AMD64_FBSD_NV_PACKAGE}"
2024 - NV_DOC="${S}/doc"
2025 - NV_OBJ="${S}/obj"
2026 - NV_SRC="${S}/src"
2027 - NV_MAN="${S}/x11/man"
2028 - NV_X11="${S}/obj"
2029 - NV_SOVER=1
2030 - elif use kernel_linux; then
2031 - NV_DOC="${S}"
2032 - NV_OBJ="${S}"
2033 - NV_SRC="${S}/kernel"
2034 - NV_MAN="${S}"
2035 - NV_X11="${S}"
2036 - NV_SOVER=${PV}
2037 - else
2038 - die "Could not determine proper NVIDIA package"
2039 - fi
2040 -}
2041 -
2042 -src_prepare() {
2043 - if use pax_kernel; then
2044 - ewarn "Using PAX patches is not supported. You will be asked to"
2045 - ewarn "use a standard kernel should you have issues. Should you"
2046 - ewarn "need support with these patches, contact the PaX team."
2047 - eapply "${FILESDIR}"/${PN}-375.20-pax.patch
2048 - fi
2049 -
2050 - local man_file
2051 - for man_file in "${NV_MAN}"/*1.gz; do
2052 - gunzip $man_file || die
2053 - done
2054 -
2055 - # Allow user patches so they can support RC kernels and whatever else
2056 - eapply_user
2057 -}
2058 -
2059 -src_compile() {
2060 - # This is already the default on Linux, as there's no toplevel Makefile, but
2061 - # on FreeBSD there's one and triggers the kernel module build, as we install
2062 - # it by itself, pass this.
2063 -
2064 - cd "${NV_SRC}"
2065 - if use kernel_FreeBSD; then
2066 - MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \
2067 - LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die
2068 - elif use driver && use kernel_linux; then
2069 - MAKEOPTS=-j1 linux-mod_src_compile
2070 - fi
2071 -
2072 - if use tools; then
2073 - emake -C "${S}"/nvidia-settings-${PV}/src \
2074 - AR="$(tc-getAR)" \
2075 - CC="$(tc-getCC)" \
2076 - LIBDIR="$(get_libdir)" \
2077 - NV_VERBOSE=1 \
2078 - RANLIB="$(tc-getRANLIB)" \
2079 - DO_STRIP= \
2080 - build-xnvctrl
2081 -
2082 - emake -C "${S}"/nvidia-settings-${PV}/src \
2083 - CC="$(tc-getCC)" \
2084 - GTK3_AVAILABLE=$(usex gtk3 1 0) \
2085 - LD="$(tc-getCC)" \
2086 - LIBDIR="$(get_libdir)" \
2087 - NVML_ENABLED=0 \
2088 - NV_USE_BUNDLED_LIBJANSSON=0 \
2089 - NV_VERBOSE=1 \
2090 - DO_STRIP=
2091 - fi
2092 -}
2093 -
2094 -# Install nvidia library:
2095 -# the first parameter is the library to install
2096 -# the second parameter is the provided soversion
2097 -# the third parameter is the target directory if it is not /usr/lib
2098 -donvidia() {
2099 - # Full path to library
2100 - nv_LIB="${1}"
2101 -
2102 - # SOVER to use
2103 - nv_SOVER="$(scanelf -qF'%S#F' ${nv_LIB})"
2104 -
2105 - # Where to install
2106 - nv_DEST="${2}"
2107 -
2108 - # Get just the library name
2109 - nv_LIBNAME=$(basename "${nv_LIB}")
2110 -
2111 - if [[ "${nv_DEST}" ]]; then
2112 - exeinto ${nv_DEST}
2113 - action="doexe"
2114 - else
2115 - nv_DEST="/usr/$(get_libdir)"
2116 - action="dolib.so"
2117 - fi
2118 -
2119 - # Install the library
2120 - ${action} ${nv_LIB} || die "failed to install ${nv_LIBNAME}"
2121 -
2122 - # If the library has a SONAME and SONAME does not match the library name,
2123 - # then we need to create a symlink
2124 - if [[ ${nv_SOVER} ]] && ! [[ "${nv_SOVER}" = "${nv_LIBNAME}" ]]; then
2125 - dosym ${nv_LIBNAME} ${nv_DEST}/${nv_SOVER} \
2126 - || die "failed to create ${nv_DEST}/${nv_SOVER} symlink"
2127 - fi
2128 -
2129 - dosym ${nv_LIBNAME} ${nv_DEST}/${nv_LIBNAME/.so*/.so} \
2130 - || die "failed to create ${nv_LIBNAME/.so*/.so} symlink"
2131 -}
2132 -
2133 -src_install() {
2134 - if use driver && use kernel_linux; then
2135 - linux-mod_src_install
2136 -
2137 - # Add the aliases
2138 - # This file is tweaked with the appropriate video group in
2139 - # pkg_preinst, see bug #491414
2140 - insinto /etc/modprobe.d
2141 - newins "${FILESDIR}"/nvidia-169.07 nvidia.conf
2142 - doins "${FILESDIR}"/nvidia-rmmod.conf
2143 -
2144 - # Ensures that our device nodes are created when not using X
2145 - exeinto "$(get_udevdir)"
2146 - newexe "${FILESDIR}"/nvidia-udev.sh-r1 nvidia-udev.sh
2147 - udev_newrules "${FILESDIR}"/nvidia.udev-rule 99-nvidia.rules
2148 - elif use kernel_FreeBSD; then
2149 - if use x86-fbsd; then
2150 - insinto /boot/modules
2151 - doins "${S}/src/nvidia.kld"
2152 - fi
2153 -
2154 - exeinto /boot/modules
2155 - doexe "${S}/src/nvidia.ko"
2156 - fi
2157 -
2158 - # NVIDIA kernel <-> userspace driver config lib
2159 - donvidia ${NV_OBJ}/libnvidia-cfg.so.${NV_SOVER}
2160 -
2161 - # NVIDIA framebuffer capture library
2162 - donvidia ${NV_OBJ}/libnvidia-fbc.so.${NV_SOVER}
2163 -
2164 - # NVIDIA video encode/decode <-> CUDA
2165 - if use kernel_linux; then
2166 - donvidia ${NV_OBJ}/libnvcuvid.so.${NV_SOVER}
2167 - donvidia ${NV_OBJ}/libnvidia-encode.so.${NV_SOVER}
2168 - fi
2169 -
2170 - if use X; then
2171 - # Xorg DDX driver
2172 - insinto /usr/$(get_libdir)/xorg/modules/drivers
2173 - doins ${NV_X11}/nvidia_drv.so
2174 -
2175 - # Xorg GLX driver
2176 - donvidia ${NV_X11}/libglx.so.${NV_SOVER} \
2177 - /usr/$(get_libdir)/opengl/nvidia/extensions
2178 -
2179 - # Xorg nvidia.conf
2180 - if has_version '>=x11-base/xorg-server-1.16'; then
2181 - insinto /usr/share/X11/xorg.conf.d
2182 - newins {,50-}nvidia-drm-outputclass.conf
2183 - fi
2184 -
2185 - insinto /usr/share/glvnd/egl_vendor.d
2186 - doins ${NV_X11}/10_nvidia.json
2187 - fi
2188 -
2189 - if use wayland; then
2190 - insinto /usr/share/egl/egl_external_platform.d
2191 - doins ${NV_X11}/10_nvidia_wayland.json
2192 - fi
2193 -
2194 - # OpenCL ICD for NVIDIA
2195 - if use kernel_linux; then
2196 - insinto /etc/OpenCL/vendors
2197 - doins ${NV_OBJ}/nvidia.icd
2198 - fi
2199 -
2200 - # Documentation
2201 - if use kernel_FreeBSD; then
2202 - dodoc "${NV_DOC}/README"
2203 - use X && doman "${NV_MAN}"/nvidia-xconfig.1
2204 - use tools && doman "${NV_MAN}"/nvidia-settings.1
2205 - else
2206 - # Docs
2207 - newdoc "${NV_DOC}/README.txt" README
2208 - dodoc "${NV_DOC}/NVIDIA_Changelog"
2209 - doman "${NV_MAN}"/nvidia-smi.1
2210 - use X && doman "${NV_MAN}"/nvidia-xconfig.1
2211 - use tools && doman "${NV_MAN}"/nvidia-settings.1
2212 - doman "${NV_MAN}"/nvidia-cuda-mps-control.1
2213 - fi
2214 -
2215 - docinto html
2216 - dodoc -r ${NV_DOC}/html/*
2217 -
2218 - # Helper Apps
2219 - exeinto /opt/bin/
2220 -
2221 - if use X; then
2222 - doexe ${NV_OBJ}/nvidia-xconfig
2223 -
2224 - insinto /etc/vulkan/icd.d
2225 - doins nvidia_icd.json
2226 - fi
2227 -
2228 - if use kernel_linux; then
2229 - doexe ${NV_OBJ}/nvidia-cuda-mps-control
2230 - doexe ${NV_OBJ}/nvidia-cuda-mps-server
2231 - doexe ${NV_OBJ}/nvidia-debugdump
2232 - doexe ${NV_OBJ}/nvidia-persistenced
2233 - doexe ${NV_OBJ}/nvidia-smi
2234 -
2235 - # install nvidia-modprobe setuid and symlink in /usr/bin (bug #505092)
2236 - doexe ${NV_OBJ}/nvidia-modprobe
2237 - fowners root:video /opt/bin/nvidia-modprobe
2238 - fperms 4710 /opt/bin/nvidia-modprobe
2239 - dosym /{opt,usr}/bin/nvidia-modprobe
2240 -
2241 - doman nvidia-cuda-mps-control.1
2242 - doman nvidia-modprobe.1
2243 - doman nvidia-persistenced.1
2244 - newinitd "${FILESDIR}/nvidia-smi.init" nvidia-smi
2245 - newconfd "${FILESDIR}/nvidia-persistenced.conf" nvidia-persistenced
2246 - newinitd "${FILESDIR}/nvidia-persistenced.init" nvidia-persistenced
2247 - fi
2248 -
2249 - if use tools; then
2250 - emake -C "${S}"/nvidia-settings-${PV}/src/ \
2251 - DESTDIR="${D}" \
2252 - GTK3_AVAILABLE=$(usex gtk3 1 0) \
2253 - LIBDIR="${D}/usr/$(get_libdir)" \
2254 - NV_USE_BUNDLED_LIBJANSSON=0 \
2255 - NV_VERBOSE=1 \
2256 - PREFIX=/usr \
2257 - DO_STRIP= \
2258 - install
2259 -
2260 - if use static-libs; then
2261 - dolib.a "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/libXNVCtrl.a
2262 -
2263 - insinto /usr/include/NVCtrl
2264 - doins "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/*.h
2265 - fi
2266 -
2267 - insinto /usr/share/nvidia/
2268 - doins nvidia-application-profiles-${PV}-key-documentation
2269 -
2270 - insinto /etc/nvidia
2271 - newins \
2272 - nvidia-application-profiles-${PV}-rc nvidia-application-profiles-rc
2273 -
2274 - # There is no icon in the FreeBSD tarball.
2275 - use kernel_FreeBSD || \
2276 - doicon ${NV_OBJ}/nvidia-settings.png
2277 -
2278 - domenu "${FILESDIR}"/nvidia-settings.desktop
2279 -
2280 - exeinto /etc/X11/xinit/xinitrc.d
2281 - newexe "${FILESDIR}"/95-nvidia-settings-r1 95-nvidia-settings
2282 - fi
2283 -
2284 - dobin ${NV_OBJ}/nvidia-bug-report.sh
2285 -
2286 - if has_multilib_profile && use multilib; then
2287 - local OABI=${ABI}
2288 - for ABI in $(get_install_abis); do
2289 - src_install-libs
2290 - done
2291 - ABI=${OABI}
2292 - unset OABI
2293 - else
2294 - src_install-libs
2295 - fi
2296 -
2297 - is_final_abi || die "failed to iterate through all ABIs"
2298 -
2299 - readme.gentoo_create_doc
2300 -}
2301 -
2302 -src_install-libs() {
2303 - local inslibdir=$(get_libdir)
2304 - local GL_ROOT="/usr/$(get_libdir)/opengl/nvidia/lib"
2305 - local CL_ROOT="/usr/$(get_libdir)/OpenCL/vendors/nvidia"
2306 - local nv_libdir="${NV_OBJ}"
2307 -
2308 - if use kernel_linux && has_multilib_profile && [[ ${ABI} == "x86" ]]; then
2309 - nv_libdir="${NV_OBJ}"/32
2310 - fi
2311 -
2312 - if use X; then
2313 - NV_GLX_LIBRARIES=(
2314 - "libEGL.so.$(usex compat ${NV_SOVER} 1) ${GL_ROOT}"
2315 - "libEGL_nvidia.so.${NV_SOVER} ${GL_ROOT}"
2316 - "libGL.so.$(usex compat ${NV_SOVER} 1.0.0) ${GL_ROOT}"
2317 - "libGLESv1_CM.so.1 ${GL_ROOT}"
2318 - "libGLESv1_CM_nvidia.so.${NV_SOVER} ${GL_ROOT}"
2319 - "libGLESv2.so.2 ${GL_ROOT}"
2320 - "libGLESv2_nvidia.so.${NV_SOVER} ${GL_ROOT}"
2321 - "libGLX.so.0 ${GL_ROOT}"
2322 - "libGLX_nvidia.so.${NV_SOVER} ${GL_ROOT}"
2323 - "libGLdispatch.so.0 ${GL_ROOT}"
2324 - "libOpenCL.so.1.0.0 ${CL_ROOT}"
2325 - "libOpenGL.so.0 ${GL_ROOT}"
2326 - "libcuda.so.${NV_SOVER}"
2327 - "libnvcuvid.so.${NV_SOVER}"
2328 - "libnvidia-compiler.so.${NV_SOVER}"
2329 - "libnvidia-eglcore.so.${NV_SOVER}"
2330 - "libnvidia-encode.so.${NV_SOVER}"
2331 - "libnvidia-fatbinaryloader.so.${NV_SOVER}"
2332 - "libnvidia-fbc.so.${NV_SOVER}"
2333 - "libnvidia-glcore.so.${NV_SOVER}"
2334 - "libnvidia-glsi.so.${NV_SOVER}"
2335 - "libnvidia-ifr.so.${NV_SOVER}"
2336 - "libnvidia-opencl.so.${NV_SOVER}"
2337 - "libnvidia-ptxjitcompiler.so.${NV_SOVER}"
2338 - "libvdpau_nvidia.so.${NV_SOVER}"
2339 - )
2340 -
2341 - if use wayland && has_multilib_profile && [[ ${ABI} == "amd64" ]];
2342 - then
2343 - NV_GLX_LIBRARIES+=(
2344 - "libnvidia-egl-wayland.so.1.0.1"
2345 - )
2346 - fi
2347 -
2348 - if use kernel_linux && has_multilib_profile && [[ ${ABI} == "amd64" ]];
2349 - then
2350 - NV_GLX_LIBRARIES+=(
2351 - "libnvidia-wfb.so.${NV_SOVER}"
2352 - )
2353 - fi
2354 -
2355 - if use kernel_FreeBSD; then
2356 - NV_GLX_LIBRARIES+=(
2357 - "libnvidia-tls.so.${NV_SOVER}"
2358 - )
2359 - fi
2360 -
2361 - if use kernel_linux; then
2362 - NV_GLX_LIBRARIES+=(
2363 - "libnvidia-ml.so.${NV_SOVER}"
2364 - "tls/libnvidia-tls.so.${NV_SOVER}"
2365 - )
2366 - fi
2367 -
2368 - for NV_LIB in "${NV_GLX_LIBRARIES[@]}"; do
2369 - donvidia "${nv_libdir}"/${NV_LIB}
2370 - done
2371 - fi
2372 -}
2373 -
2374 -pkg_preinst() {
2375 - if use driver && use kernel_linux; then
2376 - linux-mod_pkg_preinst
2377 -
2378 - local videogroup="$(egetent group video | cut -d ':' -f 3)"
2379 - if [ -z "${videogroup}" ]; then
2380 - eerror "Failed to determine the video group gid"
2381 - die "Failed to determine the video group gid"
2382 - else
2383 - sed -i \
2384 - -e "s:PACKAGE:${PF}:g" \
2385 - -e "s:VIDEOGID:${videogroup}:" \
2386 - "${D}"/etc/modprobe.d/nvidia.conf || die
2387 - fi
2388 - fi
2389 -
2390 - # Clean the dynamic libGL stuff's home to ensure
2391 - # we dont have stale libs floating around
2392 - if [ -d "${ROOT}"/usr/lib/opengl/nvidia ]; then
2393 - rm -rf "${ROOT}"/usr/lib/opengl/nvidia/*
2394 - fi
2395 - # Make sure we nuke the old nvidia-glx's env.d file
2396 - if [ -e "${ROOT}"/etc/env.d/09nvidia ]; then
2397 - rm -f "${ROOT}"/etc/env.d/09nvidia
2398 - fi
2399 -}
2400 -
2401 -pkg_postinst() {
2402 - use driver && use kernel_linux && linux-mod_pkg_postinst
2403 -
2404 - # Switch to the nvidia implementation
2405 - use X && "${ROOT}"/usr/bin/eselect opengl set --use-old nvidia
2406 - "${ROOT}"/usr/bin/eselect opencl set --use-old nvidia
2407 -
2408 - readme.gentoo_print_elog
2409 -
2410 - if ! use X; then
2411 - elog "You have elected to not install the X.org driver. Along with"
2412 - elog "this the OpenGL libraries and VDPAU libraries were not"
2413 - elog "installed. Additionally, once the driver is loaded your card"
2414 - elog "and fan will run at max speed which may not be desirable."
2415 - elog "Use the 'nvidia-smi' init script to have your card and fan"
2416 - elog "speed scale appropriately."
2417 - elog
2418 - fi
2419 - if ! use tools; then
2420 - elog "USE=tools controls whether the nvidia-settings application"
2421 - elog "is installed. If you would like to use it, enable that"
2422 - elog "flag and re-emerge this ebuild. Optionally you can install"
2423 - elog "media-video/nvidia-settings"
2424 - elog
2425 - fi
2426 -}
2427 -
2428 -pkg_prerm() {
2429 - use X && "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11
2430 -}
2431 -
2432 -pkg_postrm() {
2433 - use driver && use kernel_linux && linux-mod_pkg_postrm
2434 - use X && "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11
2435 -}
2436
2437 diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-384.130.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-384.130.ebuild
2438 deleted file mode 100644
2439 index 398ef28e2d0..00000000000
2440 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-384.130.ebuild
2441 +++ /dev/null
2442 @@ -1,581 +0,0 @@
2443 -# Copyright 1999-2018 Gentoo Authors
2444 -# Distributed under the terms of the GNU General Public License v2
2445 -
2446 -EAPI=6
2447 -inherit eutils flag-o-matic linux-info linux-mod multilib-minimal nvidia-driver \
2448 - portability toolchain-funcs unpacker user udev
2449 -
2450 -DESCRIPTION="NVIDIA Accelerated Graphics Driver"
2451 -HOMEPAGE="http://www.nvidia.com/ http://www.nvidia.com/Download/Find.aspx"
2452 -
2453 -AMD64_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86_64-${PV}"
2454 -AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}"
2455 -ARM_NV_PACKAGE="NVIDIA-Linux-armv7l-gnueabihf-${PV}"
2456 -X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}"
2457 -X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}"
2458 -
2459 -NV_URI="https://download.nvidia.com/XFree86/"
2460 -SRC_URI="
2461 - amd64-fbsd? ( ${NV_URI}FreeBSD-x86_64/${PV}/${AMD64_FBSD_NV_PACKAGE}.tar.gz )
2462 - amd64? ( ${NV_URI}Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run )
2463 - arm? ( ${NV_URI}Linux-32bit-ARM/${PV}/${ARM_NV_PACKAGE}.run )
2464 - x86-fbsd? (
2465 - https://us.download.nvidia.com/XFree86/FreeBSD-x86/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz
2466 - )
2467 - x86? ( ${NV_URI}Linux-x86/${PV}/${X86_NV_PACKAGE}.run )
2468 - tools? (
2469 - ${NV_URI}nvidia-settings/nvidia-settings-${PV}.tar.bz2
2470 - )
2471 -"
2472 -
2473 -LICENSE="GPL-2 NVIDIA-r2"
2474 -SLOT="0/${PV%.*}"
2475 -KEYWORDS="-* amd64 x86 ~amd64-fbsd ~x86-fbsd"
2476 -RESTRICT="bindist mirror"
2477 -EMULTILIB_PKG="true"
2478 -
2479 -IUSE="acpi compat +driver gtk3 kernel_FreeBSD kernel_linux +kms multilib pax_kernel static-libs +tools uvm wayland +X"
2480 -REQUIRED_USE="
2481 - tools? ( X )
2482 - static-libs? ( tools )
2483 -"
2484 -
2485 -COMMON="
2486 - app-eselect/eselect-opencl
2487 - kernel_linux? ( >=sys-libs/glibc-2.6.1 )
2488 - tools? (
2489 - dev-libs/atk
2490 - dev-libs/glib:2
2491 - dev-libs/jansson
2492 - gtk3? (
2493 - x11-libs/gtk+:3
2494 - )
2495 - x11-libs/cairo
2496 - x11-libs/gdk-pixbuf[X]
2497 - x11-libs/gtk+:2
2498 - x11-libs/libX11
2499 - x11-libs/libXext
2500 - x11-libs/libXrandr
2501 - x11-libs/libXv
2502 - x11-libs/libXxf86vm
2503 - x11-libs/pango[X]
2504 - )
2505 - X? (
2506 - >=app-eselect/eselect-opengl-1.0.9
2507 - app-misc/pax-utils
2508 - )
2509 -"
2510 -DEPEND="
2511 - ${COMMON}
2512 - kernel_linux? ( virtual/linux-sources )
2513 - tools? ( sys-apps/dbus )
2514 -"
2515 -RDEPEND="
2516 - ${COMMON}
2517 - acpi? ( sys-power/acpid )
2518 - tools? ( !media-video/nvidia-settings )
2519 - wayland? ( dev-libs/wayland[${MULTILIB_USEDEP}] )
2520 - X? (
2521 - <x11-base/xorg-server-1.19.99:=
2522 - >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
2523 - >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
2524 - >=x11-libs/libvdpau-1.0[${MULTILIB_USEDEP}]
2525 - sys-libs/zlib[${MULTILIB_USEDEP}]
2526 - )
2527 -"
2528 -
2529 -QA_PREBUILT="opt/* usr/lib*"
2530 -
2531 -S=${WORKDIR}/
2532 -
2533 -nvidia_drivers_versions_check() {
2534 - if use amd64 && has_multilib_profile && \
2535 - [ "${DEFAULT_ABI}" != "amd64" ]; then
2536 - eerror "This ebuild doesn't currently support changing your default ABI"
2537 - die "Unexpected \${DEFAULT_ABI} = ${DEFAULT_ABI}"
2538 - fi
2539 -
2540 - if use kernel_linux && kernel_is ge 4 16; then
2541 - ewarn "Gentoo supports kernels which are supported by NVIDIA"
2542 - ewarn "which are limited to the following kernels:"
2543 - ewarn "<sys-kernel/gentoo-sources-4.16"
2544 - ewarn "<sys-kernel/vanilla-sources-4.16"
2545 - ewarn ""
2546 - ewarn "You are free to utilize epatch_user to provide whatever"
2547 - ewarn "support you feel is appropriate, but will not receive"
2548 - ewarn "support as a result of those changes."
2549 - ewarn ""
2550 - ewarn "Do not file a bug report about this."
2551 - ewarn ""
2552 - fi
2553 -
2554 - # Since Nvidia ships many different series of drivers, we need to give the user
2555 - # some kind of guidance as to what version they should install. This tries
2556 - # to point the user in the right direction but can't be perfect. check
2557 - # nvidia-driver.eclass
2558 - nvidia-driver-check-warning
2559 -
2560 - # Kernel features/options to check for
2561 - CONFIG_CHECK="!DEBUG_MUTEXES ~!LOCKDEP ~MTRR ~SYSVIPC ~ZONE_DMA"
2562 - use x86 && CONFIG_CHECK+=" ~HIGHMEM"
2563 -
2564 - # Now do the above checks
2565 - use kernel_linux && check_extra_config
2566 -}
2567 -
2568 -pkg_pretend() {
2569 - nvidia_drivers_versions_check
2570 -}
2571 -
2572 -pkg_setup() {
2573 - nvidia_drivers_versions_check
2574 -
2575 - # try to turn off distcc and ccache for people that have a problem with it
2576 - export DISTCC_DISABLE=1
2577 - export CCACHE_DISABLE=1
2578 -
2579 - if use driver && use kernel_linux; then
2580 - MODULE_NAMES="nvidia(video:${S}/kernel)"
2581 - use uvm && MODULE_NAMES+=" nvidia-uvm(video:${S}/kernel)"
2582 - use kms && MODULE_NAMES+=" nvidia-modeset(video:${S}/kernel) nvidia-drm(video:${S}/kernel)"
2583 -
2584 - # This needs to run after MODULE_NAMES (so that the eclass checks
2585 - # whether the kernel supports loadable modules) but before BUILD_PARAMS
2586 - # is set (so that KV_DIR is populated).
2587 - linux-mod_pkg_setup
2588 -
2589 - BUILD_PARAMS="IGNORE_CC_MISMATCH=yes V=1 SYSSRC=${KV_DIR} \
2590 - SYSOUT=${KV_OUT_DIR} CC=$(tc-getBUILD_CC) NV_VERBOSE=1"
2591 -
2592 - # linux-mod_src_compile calls set_arch_to_kernel, which
2593 - # sets the ARCH to x86 but NVIDIA's wrapping Makefile
2594 - # expects x86_64 or i386 and then converts it to x86
2595 - # later on in the build process
2596 - BUILD_FIXES="ARCH=$(uname -m | sed -e 's/i.86/i386/')"
2597 - fi
2598 -
2599 - if use kernel_linux && kernel_is lt 2 6 9; then
2600 - eerror "You must build this against 2.6.9 or higher kernels."
2601 - fi
2602 -
2603 - # set variables to where files are in the package structure
2604 - if use kernel_FreeBSD; then
2605 - use x86-fbsd && S="${WORKDIR}/${X86_FBSD_NV_PACKAGE}"
2606 - use amd64-fbsd && S="${WORKDIR}/${AMD64_FBSD_NV_PACKAGE}"
2607 - NV_DOC="${S}/doc"
2608 - NV_OBJ="${S}/obj"
2609 - NV_SRC="${S}/src"
2610 - NV_MAN="${S}/x11/man"
2611 - NV_X11="${S}/obj"
2612 - NV_SOVER=1
2613 - elif use kernel_linux; then
2614 - NV_DOC="${S}"
2615 - NV_OBJ="${S}"
2616 - NV_SRC="${S}/kernel"
2617 - NV_MAN="${S}"
2618 - NV_X11="${S}"
2619 - NV_SOVER=${PV}
2620 - else
2621 - die "Could not determine proper NVIDIA package"
2622 - fi
2623 -}
2624 -
2625 -src_prepare() {
2626 - if use pax_kernel; then
2627 - ewarn "Using PAX patches is not supported. You will be asked to"
2628 - ewarn "use a standard kernel should you have issues. Should you"
2629 - ewarn "need support with these patches, contact the PaX team."
2630 - eapply "${FILESDIR}"/${PN}-375.20-pax.patch
2631 - fi
2632 -
2633 - local man_file
2634 - for man_file in "${NV_MAN}"/*1.gz; do
2635 - gunzip $man_file || die
2636 - done
2637 -
2638 - # Allow user patches so they can support RC kernels and whatever else
2639 - eapply_user
2640 -
2641 - if ! [ -f nvidia_icd.json ]; then
2642 - cp nvidia_icd.json.template nvidia_icd.json || die
2643 - sed -i -e 's:__NV_VK_ICD__:libGLX_nvidia.so.0:g' nvidia_icd.json || die
2644 - fi
2645 -}
2646 -
2647 -src_compile() {
2648 - # This is already the default on Linux, as there's no toplevel Makefile, but
2649 - # on FreeBSD there's one and triggers the kernel module build, as we install
2650 - # it by itself, pass this.
2651 -
2652 - cd "${NV_SRC}"
2653 - if use kernel_FreeBSD; then
2654 - MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \
2655 - LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die
2656 - elif use driver && use kernel_linux; then
2657 - linux-mod_src_compile src="${KERNEL_DIR}" KERNELRELEASE="${KV_FULL}"
2658 - fi
2659 -
2660 - if use tools; then
2661 - emake -C "${S}"/nvidia-settings-${PV}/src \
2662 - AR="$(tc-getAR)" \
2663 - CC="$(tc-getCC)" \
2664 - LIBDIR="$(get_libdir)" \
2665 - NV_VERBOSE=1 \
2666 - RANLIB="$(tc-getRANLIB)" \
2667 - DO_STRIP= \
2668 - build-xnvctrl
2669 -
2670 - emake -C "${S}"/nvidia-settings-${PV}/src \
2671 - CC="$(tc-getCC)" \
2672 - GTK3_AVAILABLE=$(usex gtk3 1 0) \
2673 - LD="$(tc-getCC)" \
2674 - LIBDIR="$(get_libdir)" \
2675 - NVML_ENABLED=0 \
2676 - NV_USE_BUNDLED_LIBJANSSON=0 \
2677 - NV_VERBOSE=1 \
2678 - DO_STRIP=
2679 - fi
2680 -}
2681 -
2682 -# Install nvidia library:
2683 -# the first parameter is the library to install
2684 -# the second parameter is the provided soversion
2685 -# the third parameter is the target directory if it is not /usr/lib
2686 -donvidia() {
2687 - # Full path to library
2688 - nv_LIB="${1}"
2689 -
2690 - # SOVER to use
2691 - nv_SOVER="$(scanelf -qF'%S#F' ${nv_LIB})"
2692 -
2693 - # Where to install
2694 - nv_DEST="${2}"
2695 -
2696 - # Get just the library name
2697 - nv_LIBNAME=$(basename "${nv_LIB}")
2698 -
2699 - if [[ "${nv_DEST}" ]]; then
2700 - exeinto ${nv_DEST}
2701 - action="doexe"
2702 - else
2703 - nv_DEST="/usr/$(get_libdir)"
2704 - action="dolib.so"
2705 - fi
2706 -
2707 - # Install the library
2708 - ${action} ${nv_LIB} || die "failed to install ${nv_LIBNAME}"
2709 -
2710 - # If the library has a SONAME and SONAME does not match the library name,
2711 - # then we need to create a symlink
2712 - if [[ ${nv_SOVER} ]] && ! [[ "${nv_SOVER}" = "${nv_LIBNAME}" ]]; then
2713 - dosym ${nv_LIBNAME} ${nv_DEST}/${nv_SOVER} \
2714 - || die "failed to create ${nv_DEST}/${nv_SOVER} symlink"
2715 - fi
2716 -
2717 - dosym ${nv_LIBNAME} ${nv_DEST}/${nv_LIBNAME/.so*/.so} \
2718 - || die "failed to create ${nv_LIBNAME/.so*/.so} symlink"
2719 -}
2720 -
2721 -src_install() {
2722 - if use driver && use kernel_linux; then
2723 - linux-mod_src_install
2724 -
2725 - # Add the aliases
2726 - # This file is tweaked with the appropriate video group in
2727 - # pkg_preinst, see bug #491414
2728 - insinto /etc/modprobe.d
2729 - newins "${FILESDIR}"/nvidia-169.07 nvidia.conf
2730 - doins "${FILESDIR}"/nvidia-rmmod.conf
2731 -
2732 - # Ensures that our device nodes are created when not using X
2733 - exeinto "$(get_udevdir)"
2734 - newexe "${FILESDIR}"/nvidia-udev.sh-r1 nvidia-udev.sh
2735 - udev_newrules "${FILESDIR}"/nvidia.udev-rule 99-nvidia.rules
2736 - elif use kernel_FreeBSD; then
2737 - if use x86-fbsd; then
2738 - insinto /boot/modules
2739 - doins "${S}/src/nvidia.kld"
2740 - fi
2741 -
2742 - exeinto /boot/modules
2743 - doexe "${S}/src/nvidia.ko"
2744 - fi
2745 -
2746 - # NVIDIA kernel <-> userspace driver config lib
2747 - donvidia ${NV_OBJ}/libnvidia-cfg.so.${NV_SOVER}
2748 -
2749 - # NVIDIA framebuffer capture library
2750 - donvidia ${NV_OBJ}/libnvidia-fbc.so.${NV_SOVER}
2751 -
2752 - # NVIDIA video encode/decode <-> CUDA
2753 - if use kernel_linux; then
2754 - donvidia ${NV_OBJ}/libnvcuvid.so.${NV_SOVER}
2755 - donvidia ${NV_OBJ}/libnvidia-encode.so.${NV_SOVER}
2756 - fi
2757 -
2758 - if use X; then
2759 - # Xorg DDX driver
2760 - insinto /usr/$(get_libdir)/xorg/modules/drivers
2761 - doins ${NV_X11}/nvidia_drv.so
2762 -
2763 - # Xorg GLX driver
2764 - donvidia ${NV_X11}/libglx.so.${NV_SOVER} \
2765 - /usr/$(get_libdir)/opengl/nvidia/extensions
2766 -
2767 - # Xorg nvidia.conf
2768 - if has_version '>=x11-base/xorg-server-1.16'; then
2769 - insinto /usr/share/X11/xorg.conf.d
2770 - newins {,50-}nvidia-drm-outputclass.conf
2771 - fi
2772 -
2773 - insinto /usr/share/glvnd/egl_vendor.d
2774 - doins ${NV_X11}/10_nvidia.json
2775 - fi
2776 -
2777 - if use wayland; then
2778 - insinto /usr/share/egl/egl_external_platform.d
2779 - doins ${NV_X11}/10_nvidia_wayland.json
2780 - fi
2781 -
2782 - # OpenCL ICD for NVIDIA
2783 - if use kernel_linux; then
2784 - insinto /etc/OpenCL/vendors
2785 - doins ${NV_OBJ}/nvidia.icd
2786 - fi
2787 -
2788 - # Documentation
2789 - if use kernel_FreeBSD; then
2790 - dodoc "${NV_DOC}/README"
2791 - use X && doman "${NV_MAN}"/nvidia-xconfig.1
2792 - use tools && doman "${NV_MAN}"/nvidia-settings.1
2793 - else
2794 - # Docs
2795 - newdoc "${NV_DOC}/README.txt" README
2796 - dodoc "${NV_DOC}/NVIDIA_Changelog"
2797 - doman "${NV_MAN}"/nvidia-smi.1
2798 - use X && doman "${NV_MAN}"/nvidia-xconfig.1
2799 - use tools && doman "${NV_MAN}"/nvidia-settings.1
2800 - doman "${NV_MAN}"/nvidia-cuda-mps-control.1
2801 - fi
2802 -
2803 - docinto html
2804 - dodoc -r ${NV_DOC}/html/*
2805 -
2806 - # Helper Apps
2807 - exeinto /opt/bin/
2808 -
2809 - if use X; then
2810 - doexe ${NV_OBJ}/nvidia-xconfig
2811 -
2812 - insinto /etc/vulkan/icd.d
2813 - doins nvidia_icd.json
2814 - fi
2815 -
2816 - if use kernel_linux; then
2817 - doexe ${NV_OBJ}/nvidia-cuda-mps-control
2818 - doexe ${NV_OBJ}/nvidia-cuda-mps-server
2819 - doexe ${NV_OBJ}/nvidia-debugdump
2820 - doexe ${NV_OBJ}/nvidia-persistenced
2821 - doexe ${NV_OBJ}/nvidia-smi
2822 -
2823 - # install nvidia-modprobe setuid and symlink in /usr/bin (bug #505092)
2824 - doexe ${NV_OBJ}/nvidia-modprobe
2825 - fowners root:video /opt/bin/nvidia-modprobe
2826 - fperms 4710 /opt/bin/nvidia-modprobe
2827 - dosym /{opt,usr}/bin/nvidia-modprobe
2828 -
2829 - doman nvidia-cuda-mps-control.1
2830 - doman nvidia-modprobe.1
2831 - doman nvidia-persistenced.1
2832 - newinitd "${FILESDIR}/nvidia-smi.init" nvidia-smi
2833 - newconfd "${FILESDIR}/nvidia-persistenced.conf" nvidia-persistenced
2834 - newinitd "${FILESDIR}/nvidia-persistenced.init" nvidia-persistenced
2835 - fi
2836 -
2837 - if use tools; then
2838 - emake -C "${S}"/nvidia-settings-${PV}/src/ \
2839 - DESTDIR="${D}" \
2840 - GTK3_AVAILABLE=$(usex gtk3 1 0) \
2841 - LIBDIR="${D}/usr/$(get_libdir)" \
2842 - NV_USE_BUNDLED_LIBJANSSON=0 \
2843 - NV_VERBOSE=1 \
2844 - PREFIX=/usr \
2845 - DO_STRIP= \
2846 - install
2847 -
2848 - if use static-libs; then
2849 - dolib.a "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/libXNVCtrl.a
2850 -
2851 - insinto /usr/include/NVCtrl
2852 - doins "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/*.h
2853 - fi
2854 -
2855 - insinto /usr/share/nvidia/
2856 - doins nvidia-application-profiles-${PV}-key-documentation
2857 -
2858 - insinto /etc/nvidia
2859 - newins \
2860 - nvidia-application-profiles-${PV}-rc nvidia-application-profiles-rc
2861 -
2862 - # There is no icon in the FreeBSD tarball.
2863 - use kernel_FreeBSD || \
2864 - doicon ${NV_OBJ}/nvidia-settings.png
2865 -
2866 - domenu "${FILESDIR}"/nvidia-settings.desktop
2867 -
2868 - exeinto /etc/X11/xinit/xinitrc.d
2869 - newexe "${FILESDIR}"/95-nvidia-settings-r1 95-nvidia-settings
2870 - fi
2871 -
2872 - dobin ${NV_OBJ}/nvidia-bug-report.sh
2873 -
2874 - if has_multilib_profile && use multilib; then
2875 - local OABI=${ABI}
2876 - for ABI in $(get_install_abis); do
2877 - src_install-libs
2878 - done
2879 - ABI=${OABI}
2880 - unset OABI
2881 - else
2882 - src_install-libs
2883 - fi
2884 -
2885 - is_final_abi || die "failed to iterate through all ABIs"
2886 -
2887 - readme.gentoo_create_doc
2888 -}
2889 -
2890 -src_install-libs() {
2891 - local inslibdir=$(get_libdir)
2892 - local GL_ROOT="/usr/$(get_libdir)/opengl/nvidia/lib"
2893 - local CL_ROOT="/usr/$(get_libdir)/OpenCL/vendors/nvidia"
2894 - local nv_libdir="${NV_OBJ}"
2895 -
2896 - if use kernel_linux && has_multilib_profile && [[ ${ABI} == "x86" ]]; then
2897 - nv_libdir="${NV_OBJ}"/32
2898 - fi
2899 -
2900 - if use X; then
2901 - NV_GLX_LIBRARIES=(
2902 - "libEGL.so.$(usex compat ${NV_SOVER} 1.1.0) ${GL_ROOT}"
2903 - "libEGL_nvidia.so.${NV_SOVER} ${GL_ROOT}"
2904 - "libGL.so.$(usex compat ${NV_SOVER} 1.7.0) ${GL_ROOT}"
2905 - "libGLESv1_CM.so.$(usex compat ${NV_SOVER} 1.2.0) ${GL_ROOT}"
2906 - "libGLESv1_CM_nvidia.so.${NV_SOVER} ${GL_ROOT}"
2907 - "libGLESv2.so.$(usex compat ${NV_SOVER} 2.1.0) ${GL_ROOT}"
2908 - "libGLESv2_nvidia.so.${NV_SOVER} ${GL_ROOT}"
2909 - "libGLX.so.0 ${GL_ROOT}"
2910 - "libGLX_nvidia.so.${NV_SOVER} ${GL_ROOT}"
2911 - "libGLdispatch.so.0 ${GL_ROOT}"
2912 - "libOpenCL.so.1.0.0 ${CL_ROOT}"
2913 - "libOpenGL.so.0 ${GL_ROOT}"
2914 - "libcuda.so.${NV_SOVER}"
2915 - "libnvcuvid.so.${NV_SOVER}"
2916 - "libnvidia-compiler.so.${NV_SOVER}"
2917 - "libnvidia-eglcore.so.${NV_SOVER}"
2918 - "libnvidia-encode.so.${NV_SOVER}"
2919 - "libnvidia-fatbinaryloader.so.${NV_SOVER}"
2920 - "libnvidia-fbc.so.${NV_SOVER}"
2921 - "libnvidia-glcore.so.${NV_SOVER}"
2922 - "libnvidia-glsi.so.${NV_SOVER}"
2923 - "libnvidia-ifr.so.${NV_SOVER}"
2924 - "libnvidia-opencl.so.${NV_SOVER}"
2925 - "libnvidia-ptxjitcompiler.so.${NV_SOVER}"
2926 - "libvdpau_nvidia.so.${NV_SOVER}"
2927 - )
2928 -
2929 - if use wayland && has_multilib_profile && [[ ${ABI} == "amd64" ]];
2930 - then
2931 - NV_GLX_LIBRARIES+=(
2932 - "libnvidia-egl-wayland.so.1.0.1"
2933 - )
2934 - fi
2935 -
2936 - if use kernel_linux && has_multilib_profile && [[ ${ABI} == "amd64" ]];
2937 - then
2938 - NV_GLX_LIBRARIES+=(
2939 - "libnvidia-wfb.so.${NV_SOVER}"
2940 - )
2941 - fi
2942 -
2943 - if use kernel_FreeBSD; then
2944 - NV_GLX_LIBRARIES+=(
2945 - "libnvidia-tls.so.${NV_SOVER}"
2946 - )
2947 - fi
2948 -
2949 - if use kernel_linux; then
2950 - NV_GLX_LIBRARIES+=(
2951 - "libnvidia-ml.so.${NV_SOVER}"
2952 - "tls/libnvidia-tls.so.${NV_SOVER}"
2953 - )
2954 - fi
2955 -
2956 - for NV_LIB in "${NV_GLX_LIBRARIES[@]}"; do
2957 - donvidia "${nv_libdir}"/${NV_LIB}
2958 - done
2959 - fi
2960 -}
2961 -
2962 -pkg_preinst() {
2963 - if use driver && use kernel_linux; then
2964 - linux-mod_pkg_preinst
2965 -
2966 - local videogroup="$(egetent group video | cut -d ':' -f 3)"
2967 - if [ -z "${videogroup}" ]; then
2968 - eerror "Failed to determine the video group gid"
2969 - die "Failed to determine the video group gid"
2970 - else
2971 - sed -i \
2972 - -e "s:PACKAGE:${PF}:g" \
2973 - -e "s:VIDEOGID:${videogroup}:" \
2974 - "${D}"/etc/modprobe.d/nvidia.conf || die
2975 - fi
2976 - fi
2977 -
2978 - # Clean the dynamic libGL stuff's home to ensure
2979 - # we dont have stale libs floating around
2980 - if [ -d "${ROOT}"/usr/lib/opengl/nvidia ]; then
2981 - rm -rf "${ROOT}"/usr/lib/opengl/nvidia/*
2982 - fi
2983 - # Make sure we nuke the old nvidia-glx's env.d file
2984 - if [ -e "${ROOT}"/etc/env.d/09nvidia ]; then
2985 - rm -f "${ROOT}"/etc/env.d/09nvidia
2986 - fi
2987 -}
2988 -
2989 -pkg_postinst() {
2990 - use driver && use kernel_linux && linux-mod_pkg_postinst
2991 -
2992 - # Switch to the nvidia implementation
2993 - use X && "${ROOT}"/usr/bin/eselect opengl set --use-old nvidia
2994 - "${ROOT}"/usr/bin/eselect opencl set --use-old nvidia
2995 -
2996 - readme.gentoo_print_elog
2997 -
2998 - if ! use X; then
2999 - elog "You have elected to not install the X.org driver. Along with"
3000 - elog "this the OpenGL libraries and VDPAU libraries were not"
3001 - elog "installed. Additionally, once the driver is loaded your card"
3002 - elog "and fan will run at max speed which may not be desirable."
3003 - elog "Use the 'nvidia-smi' init script to have your card and fan"
3004 - elog "speed scale appropriately."
3005 - elog
3006 - fi
3007 - if ! use tools; then
3008 - elog "USE=tools controls whether the nvidia-settings application"
3009 - elog "is installed. If you would like to use it, enable that"
3010 - elog "flag and re-emerge this ebuild. Optionally you can install"
3011 - elog "media-video/nvidia-settings"
3012 - elog
3013 - fi
3014 -}
3015 -
3016 -pkg_prerm() {
3017 - use X && "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11
3018 -}
3019 -
3020 -pkg_postrm() {
3021 - use driver && use kernel_linux && linux-mod_pkg_postrm
3022 - use X && "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11
3023 -}
3024
3025 diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-387.34.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-387.34.ebuild
3026 deleted file mode 100644
3027 index 0673bc7bb2a..00000000000
3028 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-387.34.ebuild
3029 +++ /dev/null
3030 @@ -1,586 +0,0 @@
3031 -# Copyright 1999-2018 Gentoo Authors
3032 -# Distributed under the terms of the GNU General Public License v2
3033 -
3034 -EAPI=6
3035 -inherit eutils flag-o-matic linux-info linux-mod multilib-minimal nvidia-driver \
3036 - portability toolchain-funcs unpacker user udev
3037 -
3038 -NV_URI="https://us.download.nvidia.com/XFree86/"
3039 -X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}"
3040 -AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}"
3041 -ARM_NV_PACKAGE="NVIDIA-Linux-armv7l-gnueabihf-${PV}"
3042 -X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}"
3043 -AMD64_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86_64-${PV}"
3044 -
3045 -DESCRIPTION="NVIDIA Accelerated Graphics Driver"
3046 -HOMEPAGE="http://www.nvidia.com/ http://www.nvidia.com/Download/Find.aspx"
3047 -SRC_URI="
3048 - amd64-fbsd? ( ${NV_URI}FreeBSD-x86_64/${PV}/${AMD64_FBSD_NV_PACKAGE}.tar.gz )
3049 - amd64? ( ${NV_URI}Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run )
3050 - arm? ( https://download.nvidia.com/XFree86/Linux-32bit-ARM/${PV}/${ARM_NV_PACKAGE}.run )
3051 - x86-fbsd? ( ${NV_URI}FreeBSD-x86/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )
3052 - x86? ( ${NV_URI}Linux-x86/${PV}/${X86_NV_PACKAGE}.run )
3053 - tools? (
3054 - https://download.nvidia.com/XFree86/nvidia-settings/nvidia-settings-${PV}.tar.bz2
3055 - )
3056 -"
3057 -
3058 -LICENSE="GPL-2 NVIDIA-r2"
3059 -SLOT="0/${PV%.*}"
3060 -KEYWORDS="-* amd64 x86 ~amd64-fbsd ~x86-fbsd"
3061 -RESTRICT="bindist mirror"
3062 -EMULTILIB_PKG="true"
3063 -
3064 -IUSE="acpi compat +driver gtk3 kernel_FreeBSD kernel_linux +kms multilib pax_kernel static-libs +tools uvm wayland +X"
3065 -REQUIRED_USE="
3066 - tools? ( X )
3067 - static-libs? ( tools )
3068 -"
3069 -
3070 -COMMON="
3071 - app-eselect/eselect-opencl
3072 - kernel_linux? ( >=sys-libs/glibc-2.6.1 )
3073 - tools? (
3074 - dev-libs/atk
3075 - dev-libs/glib:2
3076 - dev-libs/jansson
3077 - gtk3? (
3078 - x11-libs/gtk+:3
3079 - )
3080 - x11-libs/cairo
3081 - x11-libs/gdk-pixbuf[X]
3082 - x11-libs/gtk+:2
3083 - x11-libs/libX11
3084 - x11-libs/libXext
3085 - x11-libs/libXrandr
3086 - x11-libs/libXv
3087 - x11-libs/libXxf86vm
3088 - x11-libs/pango[X]
3089 - )
3090 - X? (
3091 - >=app-eselect/eselect-opengl-1.0.9
3092 - app-misc/pax-utils
3093 - )
3094 -"
3095 -DEPEND="
3096 - ${COMMON}
3097 - kernel_linux? ( virtual/linux-sources )
3098 - tools? ( sys-apps/dbus )
3099 -"
3100 -RDEPEND="
3101 - ${COMMON}
3102 - acpi? ( sys-power/acpid )
3103 - tools? ( !media-video/nvidia-settings )
3104 - wayland? ( dev-libs/wayland[${MULTILIB_USEDEP}] )
3105 - X? (
3106 - <x11-base/xorg-server-1.19.99:=
3107 - >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
3108 - >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
3109 - >=x11-libs/libvdpau-1.0[${MULTILIB_USEDEP}]
3110 - sys-libs/zlib[${MULTILIB_USEDEP}]
3111 - )
3112 -"
3113 -QA_PREBUILT="opt/* usr/lib*"
3114 -S=${WORKDIR}/
3115 -
3116 -nvidia_drivers_versions_check() {
3117 - if use amd64 && has_multilib_profile && \
3118 - [ "${DEFAULT_ABI}" != "amd64" ]; then
3119 - eerror "This ebuild doesn't currently support changing your default ABI"
3120 - die "Unexpected \${DEFAULT_ABI} = ${DEFAULT_ABI}"
3121 - fi
3122 -
3123 - if use kernel_linux && kernel_is ge 4 15; then
3124 - ewarn "Gentoo supports kernels which are supported by NVIDIA"
3125 - ewarn "which are limited to the following kernels:"
3126 - ewarn "<sys-kernel/gentoo-sources-4.15"
3127 - ewarn "<sys-kernel/vanilla-sources-4.15"
3128 - ewarn ""
3129 - ewarn "You are free to utilize epatch_user to provide whatever"
3130 - ewarn "support you feel is appropriate, but will not receive"
3131 - ewarn "support as a result of those changes."
3132 - ewarn ""
3133 - ewarn "Do not file a bug report about this."
3134 - ewarn ""
3135 - fi
3136 -
3137 - # Since Nvidia ships many different series of drivers, we need to give the user
3138 - # some kind of guidance as to what version they should install. This tries
3139 - # to point the user in the right direction but can't be perfect. check
3140 - # nvidia-driver.eclass
3141 - nvidia-driver-check-warning
3142 -
3143 - # Kernel features/options to check for
3144 - CONFIG_CHECK="!DEBUG_MUTEXES ~!LOCKDEP ~MTRR ~SYSVIPC ~ZONE_DMA"
3145 - use x86 && CONFIG_CHECK+=" ~HIGHMEM"
3146 -
3147 - # Now do the above checks
3148 - use kernel_linux && check_extra_config
3149 -}
3150 -
3151 -pkg_pretend() {
3152 - nvidia_drivers_versions_check
3153 -}
3154 -
3155 -pkg_setup() {
3156 - nvidia_drivers_versions_check
3157 -
3158 - # try to turn off distcc and ccache for people that have a problem with it
3159 - export DISTCC_DISABLE=1
3160 - export CCACHE_DISABLE=1
3161 -
3162 - if use driver && use kernel_linux; then
3163 - MODULE_NAMES="nvidia(video:${S}/kernel)"
3164 - use uvm && MODULE_NAMES+=" nvidia-uvm(video:${S}/kernel)"
3165 - use kms && MODULE_NAMES+=" nvidia-modeset(video:${S}/kernel) nvidia-drm(video:${S}/kernel)"
3166 -
3167 - # This needs to run after MODULE_NAMES (so that the eclass checks
3168 - # whether the kernel supports loadable modules) but before BUILD_PARAMS
3169 - # is set (so that KV_DIR is populated).
3170 - linux-mod_pkg_setup
3171 -
3172 - BUILD_PARAMS="IGNORE_CC_MISMATCH=yes V=1 SYSSRC=${KV_DIR} \
3173 - SYSOUT=${KV_OUT_DIR} CC=$(tc-getBUILD_CC) NV_VERBOSE=1"
3174 -
3175 - # linux-mod_src_compile calls set_arch_to_kernel, which
3176 - # sets the ARCH to x86 but NVIDIA's wrapping Makefile
3177 - # expects x86_64 or i386 and then converts it to x86
3178 - # later on in the build process
3179 - BUILD_FIXES="ARCH=$(uname -m | sed -e 's/i.86/i386/')"
3180 - fi
3181 -
3182 - if use kernel_linux && kernel_is lt 2 6 9; then
3183 - eerror "You must build this against 2.6.9 or higher kernels."
3184 - fi
3185 -
3186 - # set variables to where files are in the package structure
3187 - if use kernel_FreeBSD; then
3188 - use x86-fbsd && S="${WORKDIR}/${X86_FBSD_NV_PACKAGE}"
3189 - use amd64-fbsd && S="${WORKDIR}/${AMD64_FBSD_NV_PACKAGE}"
3190 - NV_DOC="${S}/doc"
3191 - NV_OBJ="${S}/obj"
3192 - NV_SRC="${S}/src"
3193 - NV_MAN="${S}/x11/man"
3194 - NV_X11="${S}/obj"
3195 - NV_SOVER=1
3196 - elif use kernel_linux; then
3197 - NV_DOC="${S}"
3198 - NV_OBJ="${S}"
3199 - NV_SRC="${S}/kernel"
3200 - NV_MAN="${S}"
3201 - NV_X11="${S}"
3202 - NV_SOVER=${PV}
3203 - else
3204 - die "Could not determine proper NVIDIA package"
3205 - fi
3206 -}
3207 -
3208 -src_prepare() {
3209 - if use pax_kernel; then
3210 - ewarn "Using PAX patches is not supported. You will be asked to"
3211 - ewarn "use a standard kernel should you have issues. Should you"
3212 - ewarn "need support with these patches, contact the PaX team."
3213 - eapply "${FILESDIR}"/${PN}-375.20-pax.patch
3214 - fi
3215 -
3216 - local man_file
3217 - for man_file in "${NV_MAN}"/*1.gz; do
3218 - gunzip $man_file || die
3219 - done
3220 -
3221 - if use tools; then
3222 - cp "${FILESDIR}"/nvidia-settings-linker.patch "${WORKDIR}" || die
3223 - sed -i \
3224 - -e "s:@PV@:${PV}:g" \
3225 - "${WORKDIR}"/nvidia-settings-linker.patch || die
3226 - eapply "${WORKDIR}"/nvidia-settings-linker.patch
3227 - fi
3228 -
3229 - default
3230 -
3231 - if ! [ -f nvidia_icd.json ]; then
3232 - cp nvidia_icd.json.template nvidia_icd.json || die
3233 - sed -i -e 's:__NV_VK_ICD__:libGLX_nvidia.so.0:g' nvidia_icd.json || die
3234 - fi
3235 -}
3236 -
3237 -src_compile() {
3238 - # This is already the default on Linux, as there's no toplevel Makefile, but
3239 - # on FreeBSD there's one and triggers the kernel module build, as we install
3240 - # it by itself, pass this.
3241 -
3242 - cd "${NV_SRC}"
3243 - if use kernel_FreeBSD; then
3244 - MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \
3245 - LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die
3246 - elif use driver && use kernel_linux; then
3247 - linux-mod_src_compile src="${KERNEL_DIR}" KERNELRELEASE="${KV_FULL}"
3248 - fi
3249 -
3250 - if use tools; then
3251 - emake -C "${S}"/nvidia-settings-${PV}/src \
3252 - AR="$(tc-getAR)" \
3253 - CC="$(tc-getCC)" \
3254 - DO_STRIP= \
3255 - LD="$(tc-getCC)" \
3256 - LIBDIR="$(get_libdir)" \
3257 - NVLD="$(tc-getLD)" \
3258 - NV_VERBOSE=1 \
3259 - RANLIB="$(tc-getRANLIB)" \
3260 - build-xnvctrl
3261 -
3262 - emake -C "${S}"/nvidia-settings-${PV}/src \
3263 - CC="$(tc-getCC)" \
3264 - DO_STRIP= \
3265 - GTK3_AVAILABLE=$(usex gtk3 1 0) \
3266 - LD="$(tc-getCC)" \
3267 - LIBDIR="$(get_libdir)" \
3268 - NVLD="$(tc-getLD)" \
3269 - NVML_ENABLED=0 \
3270 - NV_USE_BUNDLED_LIBJANSSON=0 \
3271 - NV_VERBOSE=1
3272 - fi
3273 -}
3274 -
3275 -# Install nvidia library:
3276 -# the first parameter is the library to install
3277 -# the second parameter is the provided soversion
3278 -# the third parameter is the target directory if it is not /usr/lib
3279 -donvidia() {
3280 - # Full path to library
3281 - nv_LIB="${1}"
3282 -
3283 - # SOVER to use
3284 - nv_SOVER="$(scanelf -qF'%S#F' ${nv_LIB})"
3285 -
3286 - # Where to install
3287 - nv_DEST="${2}"
3288 -
3289 - # Get just the library name
3290 - nv_LIBNAME=$(basename "${nv_LIB}")
3291 -
3292 - if [[ "${nv_DEST}" ]]; then
3293 - exeinto ${nv_DEST}
3294 - action="doexe"
3295 - else
3296 - nv_DEST="/usr/$(get_libdir)"
3297 - action="dolib.so"
3298 - fi
3299 -
3300 - # Install the library
3301 - ${action} ${nv_LIB} || die "failed to install ${nv_LIBNAME}"
3302 -
3303 - # If the library has a SONAME and SONAME does not match the library name,
3304 - # then we need to create a symlink
3305 - if [[ ${nv_SOVER} ]] && ! [[ "${nv_SOVER}" = "${nv_LIBNAME}" ]]; then
3306 - dosym ${nv_LIBNAME} ${nv_DEST}/${nv_SOVER} \
3307 - || die "failed to create ${nv_DEST}/${nv_SOVER} symlink"
3308 - fi
3309 -
3310 - dosym ${nv_LIBNAME} ${nv_DEST}/${nv_LIBNAME/.so*/.so} \
3311 - || die "failed to create ${nv_LIBNAME/.so*/.so} symlink"
3312 -}
3313 -
3314 -src_install() {
3315 - if use driver && use kernel_linux; then
3316 - linux-mod_src_install
3317 -
3318 - # Add the aliases
3319 - # This file is tweaked with the appropriate video group in
3320 - # pkg_preinst, see bug #491414
3321 - insinto /etc/modprobe.d
3322 - newins "${FILESDIR}"/nvidia-169.07 nvidia.conf
3323 - doins "${FILESDIR}"/nvidia-rmmod.conf
3324 -
3325 - # Ensures that our device nodes are created when not using X
3326 - exeinto "$(get_udevdir)"
3327 - newexe "${FILESDIR}"/nvidia-udev.sh-r1 nvidia-udev.sh
3328 - udev_newrules "${FILESDIR}"/nvidia.udev-rule 99-nvidia.rules
3329 - elif use kernel_FreeBSD; then
3330 - if use x86-fbsd; then
3331 - insinto /boot/modules
3332 - doins "${S}/src/nvidia.kld"
3333 - fi
3334 -
3335 - exeinto /boot/modules
3336 - doexe "${S}/src/nvidia.ko"
3337 - fi
3338 -
3339 - # NVIDIA kernel <-> userspace driver config lib
3340 - donvidia ${NV_OBJ}/libnvidia-cfg.so.${NV_SOVER}
3341 -
3342 - # NVIDIA framebuffer capture library
3343 - donvidia ${NV_OBJ}/libnvidia-fbc.so.${NV_SOVER}
3344 -
3345 - # NVIDIA video encode/decode <-> CUDA
3346 - if use kernel_linux; then
3347 - donvidia ${NV_OBJ}/libnvcuvid.so.${NV_SOVER}
3348 - donvidia ${NV_OBJ}/libnvidia-encode.so.${NV_SOVER}
3349 - fi
3350 -
3351 - if use X; then
3352 - # Xorg DDX driver
3353 - insinto /usr/$(get_libdir)/xorg/modules/drivers
3354 - doins ${NV_X11}/nvidia_drv.so
3355 -
3356 - # Xorg GLX driver
3357 - donvidia ${NV_X11}/libglx.so.${NV_SOVER} \
3358 - /usr/$(get_libdir)/opengl/nvidia/extensions
3359 -
3360 - # Xorg nvidia.conf
3361 - if has_version '>=x11-base/xorg-server-1.16'; then
3362 - insinto /usr/share/X11/xorg.conf.d
3363 - newins {,50-}nvidia-drm-outputclass.conf
3364 - fi
3365 -
3366 - insinto /usr/share/glvnd/egl_vendor.d
3367 - doins ${NV_X11}/10_nvidia.json
3368 - fi
3369 -
3370 - if use wayland; then
3371 - insinto /usr/share/egl/egl_external_platform.d
3372 - doins ${NV_X11}/10_nvidia_wayland.json
3373 - fi
3374 -
3375 - # OpenCL ICD for NVIDIA
3376 - if use kernel_linux; then
3377 - insinto /etc/OpenCL/vendors
3378 - doins ${NV_OBJ}/nvidia.icd
3379 - fi
3380 -
3381 - # Documentation
3382 - if use kernel_FreeBSD; then
3383 - dodoc "${NV_DOC}/README"
3384 - use X && doman "${NV_MAN}"/nvidia-xconfig.1
3385 - use tools && doman "${NV_MAN}"/nvidia-settings.1
3386 - else
3387 - # Docs
3388 - newdoc "${NV_DOC}/README.txt" README
3389 - dodoc "${NV_DOC}/NVIDIA_Changelog"
3390 - doman "${NV_MAN}"/nvidia-smi.1
3391 - use X && doman "${NV_MAN}"/nvidia-xconfig.1
3392 - use tools && doman "${NV_MAN}"/nvidia-settings.1
3393 - doman "${NV_MAN}"/nvidia-cuda-mps-control.1
3394 - fi
3395 -
3396 - docinto html
3397 - dodoc -r ${NV_DOC}/html/*
3398 -
3399 - # Helper Apps
3400 - exeinto /opt/bin/
3401 -
3402 - if use X; then
3403 - doexe ${NV_OBJ}/nvidia-xconfig
3404 -
3405 - insinto /etc/vulkan/icd.d
3406 - doins nvidia_icd.json
3407 - fi
3408 -
3409 - if use kernel_linux; then
3410 - doexe ${NV_OBJ}/nvidia-cuda-mps-control
3411 - doexe ${NV_OBJ}/nvidia-cuda-mps-server
3412 - doexe ${NV_OBJ}/nvidia-debugdump
3413 - doexe ${NV_OBJ}/nvidia-persistenced
3414 - doexe ${NV_OBJ}/nvidia-smi
3415 -
3416 - # install nvidia-modprobe setuid and symlink in /usr/bin (bug #505092)
3417 - doexe ${NV_OBJ}/nvidia-modprobe
3418 - fowners root:video /opt/bin/nvidia-modprobe
3419 - fperms 4710 /opt/bin/nvidia-modprobe
3420 - dosym /{opt,usr}/bin/nvidia-modprobe
3421 -
3422 - doman nvidia-cuda-mps-control.1
3423 - doman nvidia-modprobe.1
3424 - doman nvidia-persistenced.1
3425 - newinitd "${FILESDIR}/nvidia-smi.init" nvidia-smi
3426 - newconfd "${FILESDIR}/nvidia-persistenced.conf" nvidia-persistenced
3427 - newinitd "${FILESDIR}/nvidia-persistenced.init" nvidia-persistenced
3428 - fi
3429 -
3430 - if use tools; then
3431 - emake -C "${S}"/nvidia-settings-${PV}/src/ \
3432 - DESTDIR="${D}" \
3433 - GTK3_AVAILABLE=$(usex gtk3 1 0) \
3434 - LIBDIR="${D}/usr/$(get_libdir)" \
3435 - NV_USE_BUNDLED_LIBJANSSON=0 \
3436 - NV_VERBOSE=1 \
3437 - PREFIX=/usr \
3438 - DO_STRIP= \
3439 - install
3440 -
3441 - if use static-libs; then
3442 - dolib.a "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/libXNVCtrl.a
3443 -
3444 - insinto /usr/include/NVCtrl
3445 - doins "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/*.h
3446 - fi
3447 -
3448 - insinto /usr/share/nvidia/
3449 - doins nvidia-application-profiles-${PV}-key-documentation
3450 -
3451 - insinto /etc/nvidia
3452 - newins \
3453 - nvidia-application-profiles-${PV}-rc nvidia-application-profiles-rc
3454 -
3455 - # There is no icon in the FreeBSD tarball.
3456 - use kernel_FreeBSD || \
3457 - doicon ${NV_OBJ}/nvidia-settings.png
3458 -
3459 - domenu "${FILESDIR}"/nvidia-settings.desktop
3460 -
3461 - exeinto /etc/X11/xinit/xinitrc.d
3462 - newexe "${FILESDIR}"/95-nvidia-settings-r1 95-nvidia-settings
3463 - fi
3464 -
3465 - dobin ${NV_OBJ}/nvidia-bug-report.sh
3466 -
3467 - if has_multilib_profile && use multilib; then
3468 - local OABI=${ABI}
3469 - for ABI in $(get_install_abis); do
3470 - src_install-libs
3471 - done
3472 - ABI=${OABI}
3473 - unset OABI
3474 - else
3475 - src_install-libs
3476 - fi
3477 -
3478 - is_final_abi || die "failed to iterate through all ABIs"
3479 -
3480 - readme.gentoo_create_doc
3481 -}
3482 -
3483 -src_install-libs() {
3484 - local inslibdir=$(get_libdir)
3485 - local GL_ROOT="/usr/$(get_libdir)/opengl/nvidia/lib"
3486 - local CL_ROOT="/usr/$(get_libdir)/OpenCL/vendors/nvidia"
3487 - local nv_libdir="${NV_OBJ}"
3488 -
3489 - if use kernel_linux && has_multilib_profile && [[ ${ABI} == "x86" ]]; then
3490 - nv_libdir="${NV_OBJ}"/32
3491 - fi
3492 -
3493 - if use X; then
3494 - NV_GLX_LIBRARIES=(
3495 - "libEGL.so.$(usex compat ${NV_SOVER} 1) ${GL_ROOT}"
3496 - "libEGL_nvidia.so.${NV_SOVER} ${GL_ROOT}"
3497 - "libGL.so.$(usex compat ${NV_SOVER} 1.0.0) ${GL_ROOT}"
3498 - "libGLESv1_CM.so.1 ${GL_ROOT}"
3499 - "libGLESv1_CM_nvidia.so.${NV_SOVER} ${GL_ROOT}"
3500 - "libGLESv2.so.2 ${GL_ROOT}"
3501 - "libGLESv2_nvidia.so.${NV_SOVER} ${GL_ROOT}"
3502 - "libGLX.so.0 ${GL_ROOT}"
3503 - "libGLX_nvidia.so.${NV_SOVER} ${GL_ROOT}"
3504 - "libGLdispatch.so.0 ${GL_ROOT}"
3505 - "libOpenCL.so.1.0.0 ${CL_ROOT}"
3506 - "libOpenGL.so.0 ${GL_ROOT}"
3507 - "libcuda.so.${NV_SOVER}"
3508 - "libnvcuvid.so.${NV_SOVER}"
3509 - "libnvidia-compiler.so.${NV_SOVER}"
3510 - "libnvidia-eglcore.so.${NV_SOVER}"
3511 - "libnvidia-encode.so.${NV_SOVER}"
3512 - "libnvidia-fatbinaryloader.so.${NV_SOVER}"
3513 - "libnvidia-fbc.so.${NV_SOVER}"
3514 - "libnvidia-glcore.so.${NV_SOVER}"
3515 - "libnvidia-glsi.so.${NV_SOVER}"
3516 - "libnvidia-ifr.so.${NV_SOVER}"
3517 - "libnvidia-opencl.so.${NV_SOVER}"
3518 - "libnvidia-ptxjitcompiler.so.${NV_SOVER}"
3519 - "libvdpau_nvidia.so.${NV_SOVER}"
3520 - )
3521 -
3522 - if use wayland && has_multilib_profile && [[ ${ABI} == "amd64" ]];
3523 - then
3524 - NV_GLX_LIBRARIES+=(
3525 - "libnvidia-egl-wayland.so.1.0.2"
3526 - )
3527 - fi
3528 -
3529 - if use kernel_linux && has_multilib_profile && [[ ${ABI} == "amd64" ]];
3530 - then
3531 - NV_GLX_LIBRARIES+=(
3532 - "libnvidia-wfb.so.${NV_SOVER}"
3533 - )
3534 - fi
3535 -
3536 - if use kernel_FreeBSD; then
3537 - NV_GLX_LIBRARIES+=(
3538 - "libnvidia-tls.so.${NV_SOVER}"
3539 - )
3540 - fi
3541 -
3542 - if use kernel_linux; then
3543 - NV_GLX_LIBRARIES+=(
3544 - "libnvidia-ml.so.${NV_SOVER}"
3545 - "tls/libnvidia-tls.so.${NV_SOVER}"
3546 - )
3547 - fi
3548 -
3549 - for NV_LIB in "${NV_GLX_LIBRARIES[@]}"; do
3550 - donvidia "${nv_libdir}"/${NV_LIB}
3551 - done
3552 - fi
3553 -}
3554 -
3555 -pkg_preinst() {
3556 - if use driver && use kernel_linux; then
3557 - linux-mod_pkg_preinst
3558 -
3559 - local videogroup="$(egetent group video | cut -d ':' -f 3)"
3560 - if [ -z "${videogroup}" ]; then
3561 - eerror "Failed to determine the video group gid"
3562 - die "Failed to determine the video group gid"
3563 - else
3564 - sed -i \
3565 - -e "s:PACKAGE:${PF}:g" \
3566 - -e "s:VIDEOGID:${videogroup}:" \
3567 - "${D}"/etc/modprobe.d/nvidia.conf || die
3568 - fi
3569 - fi
3570 -
3571 - # Clean the dynamic libGL stuff's home to ensure
3572 - # we dont have stale libs floating around
3573 - if [ -d "${ROOT}"/usr/lib/opengl/nvidia ]; then
3574 - rm -rf "${ROOT}"/usr/lib/opengl/nvidia/*
3575 - fi
3576 - # Make sure we nuke the old nvidia-glx's env.d file
3577 - if [ -e "${ROOT}"/etc/env.d/09nvidia ]; then
3578 - rm -f "${ROOT}"/etc/env.d/09nvidia
3579 - fi
3580 -}
3581 -
3582 -pkg_postinst() {
3583 - use driver && use kernel_linux && linux-mod_pkg_postinst
3584 -
3585 - # Switch to the nvidia implementation
3586 - use X && "${ROOT}"/usr/bin/eselect opengl set --use-old nvidia
3587 - "${ROOT}"/usr/bin/eselect opencl set --use-old nvidia
3588 -
3589 - readme.gentoo_print_elog
3590 -
3591 - if ! use X; then
3592 - elog "You have elected to not install the X.org driver. Along with"
3593 - elog "this the OpenGL libraries and VDPAU libraries were not"
3594 - elog "installed. Additionally, once the driver is loaded your card"
3595 - elog "and fan will run at max speed which may not be desirable."
3596 - elog "Use the 'nvidia-smi' init script to have your card and fan"
3597 - elog "speed scale appropriately."
3598 - elog
3599 - fi
3600 - if ! use tools; then
3601 - elog "USE=tools controls whether the nvidia-settings application"
3602 - elog "is installed. If you would like to use it, enable that"
3603 - elog "flag and re-emerge this ebuild. Optionally you can install"
3604 - elog "media-video/nvidia-settings"
3605 - elog
3606 - fi
3607 -}
3608 -
3609 -pkg_prerm() {
3610 - use X && "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11
3611 -}
3612 -
3613 -pkg_postrm() {
3614 - use driver && use kernel_linux && linux-mod_pkg_postrm
3615 - use X && "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11
3616 -}
3617
3618 diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-396.54.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-396.54.ebuild
3619 deleted file mode 100644
3620 index 7a038cf22fe..00000000000
3621 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-396.54.ebuild
3622 +++ /dev/null
3623 @@ -1,581 +0,0 @@
3624 -# Copyright 1999-2018 Gentoo Authors
3625 -# Distributed under the terms of the GNU General Public License v2
3626 -
3627 -EAPI=6
3628 -inherit eutils flag-o-matic linux-info linux-mod multilib-minimal nvidia-driver \
3629 - portability toolchain-funcs unpacker user udev
3630 -
3631 -DESCRIPTION="NVIDIA Accelerated Graphics Driver"
3632 -HOMEPAGE="http://www.nvidia.com/ http://www.nvidia.com/Download/Find.aspx"
3633 -
3634 -AMD64_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86_64-${PV}"
3635 -AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}"
3636 -ARM_NV_PACKAGE="NVIDIA-Linux-armv7l-gnueabihf-${PV}"
3637 -
3638 -NV_URI="https://us.download.nvidia.com/XFree86/"
3639 -SRC_URI="
3640 - amd64-fbsd? ( ${NV_URI}FreeBSD-x86_64/${PV}/${AMD64_FBSD_NV_PACKAGE}.tar.gz )
3641 - amd64? ( ${NV_URI}Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run )
3642 - tools? (
3643 - https://download.nvidia.com/XFree86/nvidia-settings/nvidia-settings-${PV}.tar.bz2
3644 - )
3645 -"
3646 -
3647 -LICENSE="GPL-2 NVIDIA-r2"
3648 -SLOT="0/${PV%.*}"
3649 -KEYWORDS="-* amd64 ~amd64-fbsd"
3650 -RESTRICT="bindist mirror"
3651 -EMULTILIB_PKG="true"
3652 -
3653 -IUSE="acpi compat +driver gtk3 kernel_FreeBSD kernel_linux +kms multilib pax_kernel static-libs +tools uvm wayland +X"
3654 -REQUIRED_USE="
3655 - tools? ( X )
3656 - static-libs? ( tools )
3657 -"
3658 -
3659 -COMMON="
3660 - app-eselect/eselect-opencl
3661 - kernel_linux? ( >=sys-libs/glibc-2.6.1 )
3662 - tools? (
3663 - dev-libs/atk
3664 - dev-libs/glib:2
3665 - dev-libs/jansson
3666 - gtk3? (
3667 - x11-libs/gtk+:3
3668 - )
3669 - x11-libs/cairo
3670 - x11-libs/gdk-pixbuf[X]
3671 - x11-libs/gtk+:2
3672 - x11-libs/libX11
3673 - x11-libs/libXext
3674 - x11-libs/libXrandr
3675 - x11-libs/libXv
3676 - x11-libs/libXxf86vm
3677 - x11-libs/pango[X]
3678 - )
3679 - X? (
3680 - >=app-eselect/eselect-opengl-1.0.9
3681 - app-misc/pax-utils
3682 - )
3683 -"
3684 -DEPEND="
3685 - ${COMMON}
3686 - kernel_linux? ( virtual/linux-sources )
3687 - tools? ( sys-apps/dbus )
3688 -"
3689 -RDEPEND="
3690 - ${COMMON}
3691 - acpi? ( sys-power/acpid )
3692 - tools? ( !media-video/nvidia-settings )
3693 - wayland? ( dev-libs/wayland[${MULTILIB_USEDEP}] )
3694 - X? (
3695 - <x11-base/xorg-server-1.20.99:=
3696 - >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
3697 - >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
3698 - >=x11-libs/libvdpau-1.0[${MULTILIB_USEDEP}]
3699 - sys-libs/zlib[${MULTILIB_USEDEP}]
3700 - )
3701 -"
3702 -QA_PREBUILT="opt/* usr/lib*"
3703 -S=${WORKDIR}/
3704 -
3705 -nvidia_drivers_versions_check() {
3706 - if use amd64 && has_multilib_profile && \
3707 - [ "${DEFAULT_ABI}" != "amd64" ]; then
3708 - eerror "This ebuild doesn't currently support changing your default ABI"
3709 - die "Unexpected \${DEFAULT_ABI} = ${DEFAULT_ABI}"
3710 - fi
3711 -
3712 - if use kernel_linux && kernel_is ge 4 19; then
3713 - ewarn "Gentoo supports kernels which are supported by NVIDIA"
3714 - ewarn "which are limited to the following kernels:"
3715 - ewarn "<sys-kernel/gentoo-sources-4.19"
3716 - ewarn "<sys-kernel/vanilla-sources-4.19"
3717 - ewarn ""
3718 - ewarn "You are free to utilize epatch_user to provide whatever"
3719 - ewarn "support you feel is appropriate, but will not receive"
3720 - ewarn "support as a result of those changes."
3721 - ewarn ""
3722 - ewarn "Do not file a bug report about this."
3723 - ewarn ""
3724 - fi
3725 -
3726 - # Since Nvidia ships many different series of drivers, we need to give the user
3727 - # some kind of guidance as to what version they should install. This tries
3728 - # to point the user in the right direction but can't be perfect. check
3729 - # nvidia-driver.eclass
3730 - nvidia-driver-check-warning
3731 -
3732 - # Kernel features/options to check for
3733 - CONFIG_CHECK="!DEBUG_MUTEXES ~!LOCKDEP ~MTRR ~SYSVIPC ~ZONE_DMA"
3734 -
3735 - # Now do the above checks
3736 - use kernel_linux && check_extra_config
3737 -}
3738 -
3739 -pkg_pretend() {
3740 - nvidia_drivers_versions_check
3741 -}
3742 -
3743 -pkg_setup() {
3744 - nvidia_drivers_versions_check
3745 -
3746 - # try to turn off distcc and ccache for people that have a problem with it
3747 - export DISTCC_DISABLE=1
3748 - export CCACHE_DISABLE=1
3749 -
3750 - if use driver && use kernel_linux; then
3751 - MODULE_NAMES="nvidia(video:${S}/kernel)"
3752 - use uvm && MODULE_NAMES+=" nvidia-uvm(video:${S}/kernel)"
3753 - use kms && MODULE_NAMES+=" nvidia-modeset(video:${S}/kernel) nvidia-drm(video:${S}/kernel)"
3754 -
3755 - # This needs to run after MODULE_NAMES (so that the eclass checks
3756 - # whether the kernel supports loadable modules) but before BUILD_PARAMS
3757 - # is set (so that KV_DIR is populated).
3758 - linux-mod_pkg_setup
3759 -
3760 - BUILD_PARAMS="IGNORE_CC_MISMATCH=yes V=1 SYSSRC=${KV_DIR} \
3761 - SYSOUT=${KV_OUT_DIR} CC=$(tc-getBUILD_CC) NV_VERBOSE=1"
3762 -
3763 - # linux-mod_src_compile calls set_arch_to_kernel, which
3764 - # sets the ARCH to x86 but NVIDIA's wrapping Makefile
3765 - # expects x86_64 or i386 and then converts it to x86
3766 - # later on in the build process
3767 - BUILD_FIXES="ARCH=$(uname -m | sed -e 's/i.86/i386/')"
3768 - fi
3769 -
3770 - if use kernel_linux && kernel_is lt 2 6 9; then
3771 - eerror "You must build this against 2.6.9 or higher kernels."
3772 - fi
3773 -
3774 - # set variables to where files are in the package structure
3775 - if use kernel_FreeBSD; then
3776 - use amd64-fbsd && S="${WORKDIR}/${AMD64_FBSD_NV_PACKAGE}"
3777 - NV_DOC="${S}/doc"
3778 - NV_OBJ="${S}/obj"
3779 - NV_SRC="${S}/src"
3780 - NV_MAN="${S}/x11/man"
3781 - NV_X11="${S}/obj"
3782 - NV_SOVER=1
3783 - elif use kernel_linux; then
3784 - NV_DOC="${S}"
3785 - NV_OBJ="${S}"
3786 - NV_SRC="${S}/kernel"
3787 - NV_MAN="${S}"
3788 - NV_X11="${S}"
3789 - NV_SOVER=${PV}
3790 - else
3791 - die "Could not determine proper NVIDIA package"
3792 - fi
3793 -}
3794 -
3795 -src_prepare() {
3796 - if use pax_kernel; then
3797 - ewarn "Using PAX patches is not supported. You will be asked to"
3798 - ewarn "use a standard kernel should you have issues. Should you"
3799 - ewarn "need support with these patches, contact the PaX team."
3800 - eapply "${FILESDIR}"/${PN}-375.20-pax.patch
3801 - fi
3802 -
3803 - local man_file
3804 - for man_file in "${NV_MAN}"/*1.gz; do
3805 - gunzip $man_file || die
3806 - done
3807 -
3808 - if use tools; then
3809 - cp "${FILESDIR}"/nvidia-settings-linker.patch "${WORKDIR}" || die
3810 - sed -i \
3811 - -e "s:@PV@:${PV}:g" \
3812 - "${WORKDIR}"/nvidia-settings-linker.patch || die
3813 - eapply "${WORKDIR}"/nvidia-settings-linker.patch
3814 - fi
3815 -
3816 - default
3817 -
3818 - if ! [ -f nvidia_icd.json ]; then
3819 - cp nvidia_icd.json.template nvidia_icd.json || die
3820 - sed -i -e 's:__NV_VK_ICD__:libGLX_nvidia.so.0:g' nvidia_icd.json || die
3821 - fi
3822 -}
3823 -
3824 -src_compile() {
3825 - # This is already the default on Linux, as there's no toplevel Makefile, but
3826 - # on FreeBSD there's one and triggers the kernel module build, as we install
3827 - # it by itself, pass this.
3828 -
3829 - cd "${NV_SRC}"
3830 - if use kernel_FreeBSD; then
3831 - MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \
3832 - LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die
3833 - elif use driver && use kernel_linux; then
3834 - linux-mod_src_compile src="${KERNEL_DIR}" KERNELRELEASE="${KV_FULL}"
3835 - fi
3836 -
3837 - if use tools; then
3838 - emake -C "${S}"/nvidia-settings-${PV}/src \
3839 - AR="$(tc-getAR)" \
3840 - CC="$(tc-getCC)" \
3841 - DO_STRIP= \
3842 - LD="$(tc-getCC)" \
3843 - LIBDIR="$(get_libdir)" \
3844 - NVLD="$(tc-getLD)" \
3845 - NV_VERBOSE=1 \
3846 - RANLIB="$(tc-getRANLIB)" \
3847 - build-xnvctrl
3848 -
3849 - emake -C "${S}"/nvidia-settings-${PV}/src \
3850 - CC="$(tc-getCC)" \
3851 - DO_STRIP= \
3852 - GTK3_AVAILABLE=$(usex gtk3 1 0) \
3853 - LD="$(tc-getCC)" \
3854 - LIBDIR="$(get_libdir)" \
3855 - NVLD="$(tc-getLD)" \
3856 - NVML_ENABLED=0 \
3857 - NV_USE_BUNDLED_LIBJANSSON=0 \
3858 - NV_VERBOSE=1
3859 - fi
3860 -}
3861 -
3862 -# Install nvidia library:
3863 -# the first parameter is the library to install
3864 -# the second parameter is the provided soversion
3865 -# the third parameter is the target directory if it is not /usr/lib
3866 -donvidia() {
3867 - # Full path to library
3868 - nv_LIB="${1}"
3869 -
3870 - # SOVER to use
3871 - nv_SOVER="$(scanelf -qF'%S#F' ${nv_LIB})"
3872 -
3873 - # Where to install
3874 - nv_DEST="${2}"
3875 -
3876 - # Get just the library name
3877 - nv_LIBNAME=$(basename "${nv_LIB}")
3878 -
3879 - if [[ "${nv_DEST}" ]]; then
3880 - exeinto ${nv_DEST}
3881 - action="doexe"
3882 - else
3883 - nv_DEST="/usr/$(get_libdir)"
3884 - action="dolib.so"
3885 - fi
3886 -
3887 - # Install the library
3888 - ${action} ${nv_LIB} || die "failed to install ${nv_LIBNAME}"
3889 -
3890 - # If the library has a SONAME and SONAME does not match the library name,
3891 - # then we need to create a symlink
3892 - if [[ ${nv_SOVER} ]] && ! [[ "${nv_SOVER}" = "${nv_LIBNAME}" ]]; then
3893 - dosym ${nv_LIBNAME} ${nv_DEST}/${nv_SOVER} \
3894 - || die "failed to create ${nv_DEST}/${nv_SOVER} symlink"
3895 - fi
3896 -
3897 - dosym ${nv_LIBNAME} ${nv_DEST}/${nv_LIBNAME/.so*/.so} \
3898 - || die "failed to create ${nv_LIBNAME/.so*/.so} symlink"
3899 -}
3900 -
3901 -src_install() {
3902 - if use driver && use kernel_linux; then
3903 - linux-mod_src_install
3904 -
3905 - # Add the aliases
3906 - # This file is tweaked with the appropriate video group in
3907 - # pkg_preinst, see bug #491414
3908 - insinto /etc/modprobe.d
3909 - newins "${FILESDIR}"/nvidia-169.07 nvidia.conf
3910 - doins "${FILESDIR}"/nvidia-rmmod.conf
3911 -
3912 - # Ensures that our device nodes are created when not using X
3913 - exeinto "$(get_udevdir)"
3914 - newexe "${FILESDIR}"/nvidia-udev.sh-r1 nvidia-udev.sh
3915 - udev_newrules "${FILESDIR}"/nvidia.udev-rule 99-nvidia.rules
3916 - elif use kernel_FreeBSD; then
3917 - if use x86-fbsd; then
3918 - insinto /boot/modules
3919 - doins "${S}/src/nvidia.kld"
3920 - fi
3921 -
3922 - exeinto /boot/modules
3923 - doexe "${S}/src/nvidia.ko"
3924 - fi
3925 -
3926 - # NVIDIA kernel <-> userspace driver config lib
3927 - donvidia ${NV_OBJ}/libnvidia-cfg.so.${NV_SOVER}
3928 -
3929 - # NVIDIA framebuffer capture library
3930 - donvidia ${NV_OBJ}/libnvidia-fbc.so.${NV_SOVER}
3931 -
3932 - # NVIDIA video encode/decode <-> CUDA
3933 - if use kernel_linux; then
3934 - donvidia ${NV_OBJ}/libnvcuvid.so.${NV_SOVER}
3935 - donvidia ${NV_OBJ}/libnvidia-encode.so.${NV_SOVER}
3936 - fi
3937 -
3938 - if use X; then
3939 - # Xorg DDX driver
3940 - insinto /usr/$(get_libdir)/xorg/modules/drivers
3941 - doins ${NV_X11}/nvidia_drv.so
3942 -
3943 - # Xorg GLX driver
3944 - donvidia ${NV_X11}/libglx.so.${NV_SOVER} \
3945 - /usr/$(get_libdir)/opengl/nvidia/extensions
3946 -
3947 - # Xorg nvidia.conf
3948 - if has_version '>=x11-base/xorg-server-1.16'; then
3949 - insinto /usr/share/X11/xorg.conf.d
3950 - newins {,50-}nvidia-drm-outputclass.conf
3951 - fi
3952 -
3953 - insinto /usr/share/glvnd/egl_vendor.d
3954 - doins ${NV_X11}/10_nvidia.json
3955 - fi
3956 -
3957 - if use wayland; then
3958 - insinto /usr/share/egl/egl_external_platform.d
3959 - doins ${NV_X11}/10_nvidia_wayland.json
3960 - fi
3961 -
3962 - # OpenCL ICD for NVIDIA
3963 - if use kernel_linux; then
3964 - insinto /etc/OpenCL/vendors
3965 - doins ${NV_OBJ}/nvidia.icd
3966 - fi
3967 -
3968 - # Documentation
3969 - if use kernel_FreeBSD; then
3970 - dodoc "${NV_DOC}/README"
3971 - use X && doman "${NV_MAN}"/nvidia-xconfig.1
3972 - use tools && doman "${NV_MAN}"/nvidia-settings.1
3973 - else
3974 - # Docs
3975 - newdoc "${NV_DOC}/README.txt" README
3976 - dodoc "${NV_DOC}/NVIDIA_Changelog"
3977 - doman "${NV_MAN}"/nvidia-smi.1
3978 - use X && doman "${NV_MAN}"/nvidia-xconfig.1
3979 - use tools && doman "${NV_MAN}"/nvidia-settings.1
3980 - doman "${NV_MAN}"/nvidia-cuda-mps-control.1
3981 - fi
3982 -
3983 - docinto html
3984 - dodoc -r ${NV_DOC}/html/*
3985 -
3986 - # Helper Apps
3987 - exeinto /opt/bin/
3988 -
3989 - if use X; then
3990 - doexe ${NV_OBJ}/nvidia-xconfig
3991 -
3992 - insinto /etc/vulkan/icd.d
3993 - doins nvidia_icd.json
3994 - fi
3995 -
3996 - if use kernel_linux; then
3997 - doexe ${NV_OBJ}/nvidia-cuda-mps-control
3998 - doexe ${NV_OBJ}/nvidia-cuda-mps-server
3999 - doexe ${NV_OBJ}/nvidia-debugdump
4000 - doexe ${NV_OBJ}/nvidia-persistenced
4001 - doexe ${NV_OBJ}/nvidia-smi
4002 -
4003 - # install nvidia-modprobe setuid and symlink in /usr/bin (bug #505092)
4004 - doexe ${NV_OBJ}/nvidia-modprobe
4005 - fowners root:video /opt/bin/nvidia-modprobe
4006 - fperms 4710 /opt/bin/nvidia-modprobe
4007 - dosym /{opt,usr}/bin/nvidia-modprobe
4008 -
4009 - doman nvidia-cuda-mps-control.1
4010 - doman nvidia-modprobe.1
4011 - doman nvidia-persistenced.1
4012 - newinitd "${FILESDIR}/nvidia-smi.init" nvidia-smi
4013 - newconfd "${FILESDIR}/nvidia-persistenced.conf" nvidia-persistenced
4014 - newinitd "${FILESDIR}/nvidia-persistenced.init" nvidia-persistenced
4015 - fi
4016 -
4017 - if use tools; then
4018 - emake -C "${S}"/nvidia-settings-${PV}/src/ \
4019 - DESTDIR="${D}" \
4020 - GTK3_AVAILABLE=$(usex gtk3 1 0) \
4021 - LIBDIR="${D}/usr/$(get_libdir)" \
4022 - NV_USE_BUNDLED_LIBJANSSON=0 \
4023 - NV_VERBOSE=1 \
4024 - PREFIX=/usr \
4025 - DO_STRIP= \
4026 - install
4027 -
4028 - if use static-libs; then
4029 - dolib.a "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/libXNVCtrl.a
4030 -
4031 - insinto /usr/include/NVCtrl
4032 - doins "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/*.h
4033 - fi
4034 -
4035 - insinto /usr/share/nvidia/
4036 - doins nvidia-application-profiles-${PV}-key-documentation
4037 -
4038 - insinto /etc/nvidia
4039 - newins \
4040 - nvidia-application-profiles-${PV}-rc nvidia-application-profiles-rc
4041 -
4042 - # There is no icon in the FreeBSD tarball.
4043 - use kernel_FreeBSD || \
4044 - doicon ${NV_OBJ}/nvidia-settings.png
4045 -
4046 - domenu "${FILESDIR}"/nvidia-settings.desktop
4047 -
4048 - exeinto /etc/X11/xinit/xinitrc.d
4049 - newexe "${FILESDIR}"/95-nvidia-settings-r1 95-nvidia-settings
4050 - fi
4051 -
4052 - dobin ${NV_OBJ}/nvidia-bug-report.sh
4053 -
4054 - if has_multilib_profile && use multilib; then
4055 - local OABI=${ABI}
4056 - for ABI in $(get_install_abis); do
4057 - src_install-libs
4058 - done
4059 - ABI=${OABI}
4060 - unset OABI
4061 - else
4062 - src_install-libs
4063 - fi
4064 -
4065 - is_final_abi || die "failed to iterate through all ABIs"
4066 -
4067 - readme.gentoo_create_doc
4068 -}
4069 -
4070 -src_install-libs() {
4071 - local inslibdir=$(get_libdir)
4072 - local GL_ROOT="/usr/$(get_libdir)/opengl/nvidia/lib"
4073 - local CL_ROOT="/usr/$(get_libdir)/OpenCL/vendors/nvidia"
4074 - local nv_libdir="${NV_OBJ}"
4075 -
4076 - if use kernel_linux && has_multilib_profile && [[ ${ABI} == "x86" ]]; then
4077 - nv_libdir="${NV_OBJ}"/32
4078 - fi
4079 -
4080 - if use X; then
4081 - NV_GLX_LIBRARIES=(
4082 - "libEGL.so.$(usex compat ${NV_SOVER} 1.1.0) ${GL_ROOT}"
4083 - "libEGL_nvidia.so.${NV_SOVER} ${GL_ROOT}"
4084 - "libGL.so.$(usex compat ${NV_SOVER} 1.7.0) ${GL_ROOT}"
4085 - "libGLESv1_CM.so.1.2.0 ${GL_ROOT}"
4086 - "libGLESv1_CM_nvidia.so.${NV_SOVER} ${GL_ROOT}"
4087 - "libGLESv2.so.2.1.0 ${GL_ROOT}"
4088 - "libGLESv2_nvidia.so.${NV_SOVER} ${GL_ROOT}"
4089 - "libGLX.so.0 ${GL_ROOT}"
4090 - "libGLX_nvidia.so.${NV_SOVER} ${GL_ROOT}"
4091 - "libGLdispatch.so.0 ${GL_ROOT}"
4092 - "libOpenCL.so.1.0.0 ${CL_ROOT}"
4093 - "libOpenGL.so.0 ${GL_ROOT}"
4094 - "libcuda.so.${NV_SOVER}"
4095 - "libnvcuvid.so.${NV_SOVER}"
4096 - "libnvidia-compiler.so.${NV_SOVER}"
4097 - "libnvidia-eglcore.so.${NV_SOVER}"
4098 - "libnvidia-encode.so.${NV_SOVER}"
4099 - "libnvidia-fatbinaryloader.so.${NV_SOVER}"
4100 - "libnvidia-fbc.so.${NV_SOVER}"
4101 - "libnvidia-glcore.so.${NV_SOVER}"
4102 - "libnvidia-glsi.so.${NV_SOVER}"
4103 - "libnvidia-glvkspirv.so.${NV_SOVER}"
4104 - "libnvidia-ifr.so.${NV_SOVER}"
4105 - "libnvidia-opencl.so.${NV_SOVER}"
4106 - "libnvidia-ptxjitcompiler.so.${NV_SOVER}"
4107 - "libvdpau_nvidia.so.${NV_SOVER}"
4108 - )
4109 -
4110 - if use wayland && has_multilib_profile && [[ ${ABI} == "amd64" ]];
4111 - then
4112 - NV_GLX_LIBRARIES+=(
4113 - "libnvidia-egl-wayland.so.1.0.3"
4114 - )
4115 - fi
4116 -
4117 - if use kernel_linux && has_multilib_profile && [[ ${ABI} == "amd64" ]];
4118 - then
4119 - NV_GLX_LIBRARIES+=(
4120 - "libnvidia-wfb.so.${NV_SOVER}"
4121 - )
4122 - fi
4123 -
4124 - if use kernel_FreeBSD; then
4125 - NV_GLX_LIBRARIES+=(
4126 - "libnvidia-tls.so.${NV_SOVER}"
4127 - )
4128 - fi
4129 -
4130 - if use kernel_linux; then
4131 - NV_GLX_LIBRARIES+=(
4132 - "libnvidia-ml.so.${NV_SOVER}"
4133 - "tls/libnvidia-tls.so.${NV_SOVER}"
4134 - )
4135 - fi
4136 -
4137 - for NV_LIB in "${NV_GLX_LIBRARIES[@]}"; do
4138 - donvidia "${nv_libdir}"/${NV_LIB}
4139 - done
4140 - fi
4141 -}
4142 -
4143 -pkg_preinst() {
4144 - if use driver && use kernel_linux; then
4145 - linux-mod_pkg_preinst
4146 -
4147 - local videogroup="$(egetent group video | cut -d ':' -f 3)"
4148 - if [ -z "${videogroup}" ]; then
4149 - eerror "Failed to determine the video group gid"
4150 - die "Failed to determine the video group gid"
4151 - else
4152 - sed -i \
4153 - -e "s:PACKAGE:${PF}:g" \
4154 - -e "s:VIDEOGID:${videogroup}:" \
4155 - "${D}"/etc/modprobe.d/nvidia.conf || die
4156 - fi
4157 - fi
4158 -
4159 - # Clean the dynamic libGL stuff's home to ensure
4160 - # we dont have stale libs floating around
4161 - if [ -d "${ROOT}"/usr/lib/opengl/nvidia ]; then
4162 - rm -rf "${ROOT}"/usr/lib/opengl/nvidia/*
4163 - fi
4164 - # Make sure we nuke the old nvidia-glx's env.d file
4165 - if [ -e "${ROOT}"/etc/env.d/09nvidia ]; then
4166 - rm -f "${ROOT}"/etc/env.d/09nvidia
4167 - fi
4168 -}
4169 -
4170 -pkg_postinst() {
4171 - use driver && use kernel_linux && linux-mod_pkg_postinst
4172 -
4173 - # Switch to the nvidia implementation
4174 - use X && "${ROOT}"/usr/bin/eselect opengl set --use-old nvidia
4175 - "${ROOT}"/usr/bin/eselect opencl set --use-old nvidia
4176 -
4177 - readme.gentoo_print_elog
4178 -
4179 - if ! use X; then
4180 - elog "You have elected to not install the X.org driver. Along with"
4181 - elog "this the OpenGL libraries and VDPAU libraries were not"
4182 - elog "installed. Additionally, once the driver is loaded your card"
4183 - elog "and fan will run at max speed which may not be desirable."
4184 - elog "Use the 'nvidia-smi' init script to have your card and fan"
4185 - elog "speed scale appropriately."
4186 - elog
4187 - fi
4188 - if ! use tools; then
4189 - elog "USE=tools controls whether the nvidia-settings application"
4190 - elog "is installed. If you would like to use it, enable that"
4191 - elog "flag and re-emerge this ebuild. Optionally you can install"
4192 - elog "media-video/nvidia-settings"
4193 - elog
4194 - fi
4195 -}
4196 -
4197 -pkg_prerm() {
4198 - use X && "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11
4199 -}
4200 -
4201 -pkg_postrm() {
4202 - use driver && use kernel_linux && linux-mod_pkg_postrm
4203 - use X && "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11
4204 -}