summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIonen Wolkens <ionen@gentoo.org>2021-10-26 16:35:15 -0400
committerIonen Wolkens <ionen@gentoo.org>2021-10-26 17:34:44 -0400
commitfc989e789959b96c7e17885856beabce70bb8d66 (patch)
tree141ac838683926a629ede607b6a4fc0fdefc1aef /x11-drivers
parentdev-python/hiredis: Relax sub-slot dependency on dev-libs/hiredis (diff)
downloadgentoo-fc989e789959b96c7e17885856beabce70bb8d66.tar.gz
gentoo-fc989e789959b96c7e17885856beabce70bb8d66.tar.bz2
gentoo-fc989e789959b96c7e17885856beabce70bb8d66.zip
x11-drivers/nvidia-drivers: add 495.44
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Diffstat (limited to 'x11-drivers')
-rw-r--r--x11-drivers/nvidia-drivers/Manifest7
-rw-r--r--x11-drivers/nvidia-drivers/nvidia-drivers-495.44.ebuild495
2 files changed, 502 insertions, 0 deletions
diff --git a/x11-drivers/nvidia-drivers/Manifest b/x11-drivers/nvidia-drivers/Manifest
index 52383a84ea29..33c1b0df9e92 100644
--- a/x11-drivers/nvidia-drivers/Manifest
+++ b/x11-drivers/nvidia-drivers/Manifest
@@ -2,6 +2,7 @@ DIST NVIDIA-Linux-aarch64-460.91.03.run 111886330 BLAKE2B 24ab316e216caa61f7edb4
DIST NVIDIA-Linux-aarch64-470.63.01.run 184137823 BLAKE2B d8525d70a3c68a3912d6b03aca2569d657029cc3dce2276f17acf538b5d74001a779e7d8e6c3c7a8d5fe9d12579e0f6170558a4bd596e7e8cab4ea3a20cb911c SHA512 582d7d0f427f4effe02415ae2d248f24c730481f3a0f143987ee640d14476924912827ad17263271f47ad67f24ab9c0dc5af0fd4d49b029b77cc59e4f821a433
DIST NVIDIA-Linux-aarch64-470.74.run 183973692 BLAKE2B dd5e637161b1880e77ce1ac9df62f817af0d6ad3109db437bdca0d248f02c24f18a1a483a0d1efe6c80ebb76a5753cb1901d26c7b18594bdb5208f5eeec20b1a SHA512 29a5a6a3622e316bf31acfba7486fb59485a82b4500860dd8db34e714791a0ea73120354559f412465f8f862b2f2c046a7f2a973068f18913d80fb81f0c839d9
DIST NVIDIA-Linux-aarch64-495.29.05.run 210310796 BLAKE2B ef1cce048a89d8f6ecdc1e14068c4a872a28387b7894d213d0d86ddc594ca77c6ae265b05da27a56bb1b9ea72e1a4eac0b24b5a2ab91d65f557fe1d02ea30abb SHA512 46fb44f285f40873e22cae2e04dc79f4547b94213b3d7491f878c7afe5ef06329811cb0743ab0e71ad13d08fd37ef6e688454b752e9fb24d434b56525b75ffd4
+DIST NVIDIA-Linux-aarch64-495.44.run 210477242 BLAKE2B 8fb5419be19ab4feab158fb43f142fdc1471b756f7d43afac1c9e787465a991e291cac725dda266b2f454022aea7cb3e249c6f132963a89c97564ef378e876b4 SHA512 4d2ed853bc3d7812652f3e677ca1cf56f1b2563bc0a43cee2cf4544f8d3b30d8f29ccc994fc8f95e2c8b40b04efdca066b616983bf2e2fb9247d2d9a8503d4ea
DIST NVIDIA-Linux-x86-390.144.run 49210937 BLAKE2B b7e6edb55af88be74e4322ff1d270388a60a9d9809314c3a0502f86ed97edb99dfcdd3c81c5f51e681c8fcc47ecbfecd124b4d733141d23726226a3965b4c1f1 SHA512 d962c7e7b4b9c4635a887767d34a49c401a89e5975a5e57fa83366ca824ab70d5b8a81f3dce2e05e0528afddc72d70b2fcd69a216bd16d75e7b88ec704390546
DIST NVIDIA-Linux-x86_64-390.144.run 85000417 BLAKE2B 8ecfa768fb8fe92170ff5b82698a7fb22da8bc557ab2036464bf5650b6fffc7028e25a68e1f5638f6bc171eb45a4aba459465490c7a99aacd36dc769994062e8 SHA512 9503ebf41037a14deba995288a364768cb03fb682de8653a4b0c05955b23603443c41c4216c93eac7d7efc301734416012864ede728324ab47b93ff167d93da4
DIST NVIDIA-Linux-x86_64-460.91.03.run 178201292 BLAKE2B 4d407b7bb3a99ab71c62c3cd18dc3549c98a24e7af28276e6e6a21dd33efcab017fed3f782f6dfb060c4437cd718f19c2f9900de367cc47bf19fa2718a18ad55 SHA512 4ac11130fe5a8f1c26f459e9c19660b3ff6f23011e9f77b09ca948fc42609e523ecea70d3bf6def50a75b4a3079ab280018753fb6e53875d9bb8093a033e3b70
@@ -9,28 +10,34 @@ DIST NVIDIA-Linux-x86_64-470.62.05.run 271634590 BLAKE2B a37d33d188e9e36c5bfb3ba
DIST NVIDIA-Linux-x86_64-470.63.01.run 271484294 BLAKE2B 7769f53897dccea716d459a12808d1f5a738072415639063e47dee82b489bb17121516cf585c1bb6b39f71b11f62f636a466284aba5854a5cfb4f553353cf8d3 SHA512 d3dadf93df86e5462ecb4ae6a04f03b05bf1450ad91e8c2aa73e838ddc9aa11b4e926fc32714d32bd7c606498fee5a54c77d5e40ecc08a039d3e9c2d331ad454
DIST NVIDIA-Linux-x86_64-470.74.run 270479241 BLAKE2B dacae4273d67fb9a2ab9ce4d0a6cb6255935abc5dacc7381f33c249ffeb515c84cb88f6c92f9a5bff23a92a55952525fe85594cd67fa4319c046a2e38dd26be6 SHA512 21e4290d98bbbf09eed7be32df8743f0adf728f9e88869afb02fc1d0f0be87cf42af2d4f04322a76d68a1704ef044e83cd403377e60af917ff3ec0a04985801a
DIST NVIDIA-Linux-x86_64-495.29.05.run 282081751 BLAKE2B bd603f9fd08600192be193e8b5d2e5091b319173f7cc7bb1662f537292a36a3ed652740f4fb0e2288f795f81e9bf35aa343d6e41aa892c6370dd607d94971f0e SHA512 bcdb4a52217d98f656d2daad32b4112fe5bda362d8aeb6fd8dda17474a95e5914385823c19dacc71fc1fe2c4327d8f5beb267e6083aed54dd66f7abdae6f5cc1
+DIST NVIDIA-Linux-x86_64-495.44.run 282259831 BLAKE2B ca11406a5b1b25d9691ec61d4125457c22438b8f0af0651043235f72ee75c4b264cfde7b04840bbec15c22bc5eb657a46326b49941e6c776a8990430cf052818 SHA512 bc9054e6028ba172906e6eb9a0b8f5cfc3ae74d57f3e95e0f9057879e3af07a4b19479e80d81e948872bc47bbd674f77f5f81d4debd2e2c3ce45058cd9211802
DIST nvidia-installer-390.144.tar.bz2 150017 BLAKE2B 1a633594ecb9b54ee5a1e3620263a95db30c1ddebf547ecc7f267e1f0b799bcdb44cc3ddd6c96eda085d9be5c8f691e92556296f250495d80eec0c2f155f5bd5 SHA512 e4c624afc18bd1d61264f93bdcbc72afe42687baadf31683a6dd11a45c6257f6a5185b91f4b3d4c0316b8eb03ed79511f9ad260ee9e6f299fc136f5dc2178e42
DIST nvidia-installer-460.91.03.tar.bz2 144463 BLAKE2B b8c381158f614331fbfd04dcfdd7227fcb3eb16cbe4e3cbcbb34ba6af2370b05ebd72dc46375b2099b950817e6a0565c418e62b6364f1d7269f78c1dce5f5535 SHA512 10c873597202a1d8aa0dc4629b1e64f8c1f65a68c91f6babe312cf9fabbb9257b77d03a3917c0f4f5d6994e90cf58c6c7d9a802a675ea3ef60b571c9b7abc391
DIST nvidia-installer-470.63.01.tar.bz2 146093 BLAKE2B 49f16fd7b27552013067410e3cfc80d44a4ec9c454d5db542caaa84b34e20cddabdeba2391d451aab39c832745fc2fbfc5bda3876a67859027d83b482d55118f SHA512 92d680d845abb39d77a51ccc47f1102825387b664e87fb2f5d976a0a4cc6baee508fe86bc92f5f0c77f1cec61506826b155ca1ef02708c39d145c9d897868397
DIST nvidia-installer-470.74.tar.bz2 145896 BLAKE2B d2f77b84ce9802088465bfb7020216436cb7766180fb11f6853beacef535a2f697799854dbd4a61f843dfa51fe8f6c9f6bf5dcdda07d200f424e5316c024f4a5 SHA512 b05f4b40428a6073d3439faeb20dfce2a86f9c18f0cc5cb16a48ff0e11f15eab9260c3a7e1c2eecffc36417e6471cce718923cfef3d36212bb53c6aca10ee80b
DIST nvidia-installer-495.29.05.tar.bz2 147017 BLAKE2B 0cdb79c98d2b80a4174e10c5e8cbb131bf186170345679636573f3054666e92bb46229ef50b7f676b99e5a53fb61db9a636122342bf01418ebc4bcfd7598db65 SHA512 1a72b8cf106b8fc30815afdd03a5e880f892d4950e18e83d9965b292eabadd7d9b03cc3c0489008329229e50326958e404d806dbed00eef48d638091b3694d63
+DIST nvidia-installer-495.44.tar.bz2 147036 BLAKE2B a340d1629ab133d072cd7d673a474ec834c2cd71f35b2e98d837deaa6535a784c93978ec484c5060ff28cf845d5cffa08b368b3b8b18a7ddabb4a7cb1c7a0ad0 SHA512 9f9f592b2d73515a484720eb421774a28b39af0ba3fbea127d1987533ed0f42104f640da6211f9eee63cc1063aad68dddfe8d378e3ef590c7f77d54e56bbb8bd
DIST nvidia-modprobe-390.144.tar.bz2 35308 BLAKE2B 1930c315aeb0e296c0d4795170d44a275da5ff8838fd8230559227852001b679fbca2830142ca7abcfa9c84626c9d9f222f7ab0cb3984d8d517f5ce431e5a9ea SHA512 d542c1a7634a8c5ff803ca79f2fc02b17b129185177226ad60625a4d246bbaf740719ff024dbde0f5aa8273949446561261d700a27cf88217c2572e69882142c
DIST nvidia-modprobe-460.91.03.tar.bz2 38144 BLAKE2B 660b381f8757fe8862f7c4a971e44d3124afa3783d52af29543b8ed67486ba03b76c0b5d8dfadc5da8fdcc2c8799ec5f9c3016fd58e9c209fcc3ae897fb0436b SHA512 aa47a9c0744b8e11e87d2c0f300b13fee435cd5225444be7fb0b6bea49af33811dfa723a9ccfe904c7de2b5a8da36b707c1024eb495e3f0b587e3231a4bc4f39
DIST nvidia-modprobe-470.63.01.tar.bz2 38357 BLAKE2B 906f966df5aafe5478550bb30b4d624247c2c621ecc5e21fa9aa0e37f1ffe39b3e44d70f24864d49c99c63d5a5045057f46b9b364f6f662bd5676b242fa3c265 SHA512 f41a168fe4b2278cd4cc53dd0e334e7e7dfccc91abd818b7e2b5d67c3a806d2ce5d1b11cd3cdc2f4507cc0baf42c3c5985784e19665c7a3bafb9ab433132271e
DIST nvidia-modprobe-470.74.tar.bz2 38346 BLAKE2B 15067809d5ddf9c3e5a09e9851d92f7629843290c109373fc42cd97d06e05d3d8fac2fabfc8da0c57251e23039dbe4cbc827d8e16d60303cf9dc2fb01c91069a SHA512 9d6a51bb9bb329c658040c761f722e8f15897f11cfb08a993ddda8f829a1fa7c028a76a2257cf97a07e6b7d9bcc1dbe86934998094d4aa431ada059ac46a41e9
DIST nvidia-modprobe-495.29.05.tar.bz2 38402 BLAKE2B fdf6bfe0c3e72da7bf36595db282b32f5b5c6b10dce6b39b243f3e0362ff25e1ab1dda8ae3fbb9d930dbc98b0880ef29f5278820c1792039d0efe9e2288deb57 SHA512 8fe71362723be613d133805506a410b457b2b88d7a1ebfd6b49d1aade79caf80b30e24d8a2c98ad1b2abbd5c006d39b2268169daaf59d91a1baf8bbdb981169f
+DIST nvidia-modprobe-495.44.tar.bz2 38377 BLAKE2B f1695c778c25d41795b1bda43df68a1dea9c3d16fc00acebe5948aeffd8aef174cb864d85260565fad8ac8c454ad3ad0cfb76529d9f88c3f10547de11492c61c SHA512 cdf7331609ce2a400f2b0e987bdbd2450a07e837971ac94b5ab746874259e6e7a4bff5eb8b9518f786365af74e8650f1c5ddfb745f867a6777825f550a6a74c0
DIST nvidia-persistenced-390.144.tar.bz2 48672 BLAKE2B 82a92a33eb40971e56b772ffab121214f5675d0a8c618e356e7b55bc38ff9605fd2701d740d00a1e26c158c9df0ab38d0ba10891a3850f8e8cbee8fb231ba52d SHA512 4432f2dd18c7c91fd0d59e4f2bdf7254f58ed2a6b652d319c4f7ce674522da1797a68dd6939c38e71710dcd3b754ae7cc8c6e7acb47a76e13d2091e8a8ee99c8
DIST nvidia-persistenced-460.91.03.tar.bz2 46160 BLAKE2B f7f34cc12de2a4d69184c60caf7a8e8025b58005ade0a3e9a1a0e95856055f7211a710a1145d674d8a2e97cf70a43175cbc5c9a5dabc49ce378623be1720c6ea SHA512 c3ff5875353c264cb224b3f512ff8308bf1b0b95282e34500d88da2574719c3c514581e5900841b089c2e6f0fe29198fa06a11668de8e21c59f9f96244a74757
DIST nvidia-persistenced-470.63.01.tar.bz2 46544 BLAKE2B c2bbc76bc06db1dc963ed34731fc9ca9ad2145dad4326586a7e37a395ff8ffac940800138bec08cdfafa9eb8ab5b79412e66e78cb5ef58aca4ee476d31ce0c89 SHA512 6ae699cae67911f92ac2dae82856e0a4d31a8d47a3d2e8e6fbae6469f28960caab4a56aae1a1ac3de0339c78dedc344c09136ec922690abd9fb5abc96afba5ca
DIST nvidia-persistenced-470.74.tar.bz2 46521 BLAKE2B ee959d6d44c31cf89da0227b5f64f83e2be6e89e55a6249d9d4985e4e4012430fdd057b5267401ed1a185523e8fd795ccbb0fed59898f801a72c899ff7a79de3 SHA512 1bab92b85febf3ca1f5e7195e69faf5db6dc281d2f65a64d58585e48dee573ecb469b5036e7737da9a12bce937ffa7c961cb3b4908765f0d0ce46c6ba708332b
DIST nvidia-persistenced-495.29.05.tar.bz2 46274 BLAKE2B e309795caf2c477c8f8f5be5fcc74e764b14496bab12e48d661ce8aba9cb99ba41bf31dbd819c216f3b9eb404d6f971c30183834416d7b6b33ce6cff60d87fcc SHA512 ac88198d5e7a781bbab773265ab7b1dfe10674292ba21d1fdcc0df8cf24b282cc21bc583a948965a2f8882e905aa46014b6a0bd3f4fac4ac580246401b4744f5
+DIST nvidia-persistenced-495.44.tar.bz2 46259 BLAKE2B ed34bb3b82a24fe7e651eaf671469988f32a9fa4782f0a8d8f08499b85cee596996611f08fe8e26a295a3073ae6a5bd59c44a1d9c6db41138339656e932aa7df SHA512 d295caaad65336495e22ebf890f6a1d323b9fabd0fb4900c8d4e37044f472836327743fceb6d433bd1ef61dffe8a84a655ddf81b2eff085c7e913105a05cb47e
DIST nvidia-settings-390.144.tar.bz2 1109104 BLAKE2B 6724f49c7e469f580206fc17308190bd346b6167348a8b8b3886209f58aca61b65eff30658484c1fee40af8c0d89fb62f73329b05a6ac45178ea4a6870e5aa85 SHA512 90afe201361d492c3152057d3ec46d68c0cd722fe0ea0587aa1156718017d59fb5f26f3db89d91d4680b2390617867dbe93bd14e1fb3dc70402527bfacf0ae5c
DIST nvidia-settings-460.91.03.tar.bz2 1061093 BLAKE2B 13f1da07eda3a0e7e96ac69091e4a34fcd75a8f459a4db3840c64272dd54080694c4df3b7c326884ff032eb1b8708b5e19107b112afee2c80eed242281292b02 SHA512 172ea3366065aa30e71a5a47b31366d076477b8801a8a37e0d76972406e69c8872daa80011ee020960bc5e00163c4e9e5f63aa4f0dc726065671d76851b4ad71
DIST nvidia-settings-470.63.01.tar.bz2 1062399 BLAKE2B b3193ef94cf3cde41cf2b5f38cc39c090e54b5c0f980bdf6bff318554d155cb3639d5d65baf7148b5a5d378f483b3235aaa4ffa0cd625b44e7dd4ffcb7156f00 SHA512 d8458f8e103de0a5026857009da6cd55e969fbc2481d526b7e22fac92e865f9f226a2670bd984b743be093acd0fcd1970c1a20819ca736b0582b645a5c4c6e1e
DIST nvidia-settings-470.74.tar.bz2 1062544 BLAKE2B 283808542e3b24594d52781b6638163ea6de638057792f50c91fb85728f97986d2d0f722f8e18f20866f6d873382e7b4df6d2eb565a4c7a0fb1e8b973ae7a6fb SHA512 eaaff811e9f3968efa82dd5ab60eb504538f34976bcbeec5a1451be14e1bb6f7d1ad7d732dddfd003e275a9e24e80438ab7a5a7ec8ad5c17556a6de1f884b102
DIST nvidia-settings-495.29.05.tar.bz2 1062315 BLAKE2B 65e8525cdb6ce316c58e7a99b00a9dc63ae71b119b6c5de381b0d6e83710d6a79ec842b36594d0cc1cb6d77b4f71bca4ff8590dfa615a674c37939abb0e4f810 SHA512 5e1559cdf7cefbbcff5992cdbab9ed5380eea7a1f1362cc485a517dc3bd3a125c961418403272f93a201536a16ba82962c3ee1ca056e05bec88732cef36a8854
+DIST nvidia-settings-495.44.tar.bz2 1062420 BLAKE2B 98d5ac73f279bc3d415e3902946eca15fe4d61978dde5b21a96e9e1367129b9949078bd2c3778d344237ff4b9cf65a2921025a6410394f007dd97f441dc320f4 SHA512 e69bb32e47a43368de1959a0c8a877281bba0139119b1a34f6da86e006a8b0dce5bafe0fd017221be40a6bddcd93934e9479cbb8f04fb979b84f5f206835118e
DIST nvidia-xconfig-390.144.tar.bz2 107147 BLAKE2B 1b6ea6dfbe33474cd3e9409a7559a38716c4ce8d2583354232225a2a7ec10c7dbc2163f07c6849f4929e16c2fad179d583daad8a67d9cba950a62209b8ebebfa SHA512 09bb3558be178deda4b26031560ebad4e98e68b6186e247d4638cbcb4bb5dc05937c6baeaf1cd4db5a7b7433af97c3150c526ed972ff51b6e1c7552235ec6b51
DIST nvidia-xconfig-460.91.03.tar.bz2 108477 BLAKE2B d95505e508ca16d8ebe8c22c445a1b686c32a626c379b1b48e2a8101969fc03b90446953cc30e945da9388237fa1b9e5f83417aba1fb062d58866a523c256769 SHA512 4bb8f7fc42e7fa5e3897884bd7e722c4fe8ab1e4a87cad4136e1764cdd91d4795f817dcee63a20279315b4839d92fe5244d073ea2310c704f8aacd38bacb28a4
DIST nvidia-xconfig-470.63.01.tar.bz2 109078 BLAKE2B 786d4be4e1aa23ecdd51b0c5628e27a42472f4f119979acc62d100e094d077be6c7b893353d7d31ea4a47fe99135c01ea4ca0b539da62379295644fcd7b38c79 SHA512 5a3b599cba4be7e272fb1fc3c1dc31c09b1f101f81e7d24a27cf88d96746d42c84ba89f5ebeb4f602e012e0aa04804015cab5cf24947e60131652f1e010e96e2
DIST nvidia-xconfig-470.74.tar.bz2 108624 BLAKE2B 1e1df7c80456fd90fb8b54b2fdbdabfc5fce504a7c0ff1de816b47addcd09d0a17d5cfa35da2518e2568525d3092b3829b8de3c1461d75b65794b11b3137e878 SHA512 7c922b4524cc7eee4345b2a06b11c292a19f168187f3670351feccfb3baca2845322b0a8c669e55bfadc8bb4009ba6aabba37245ac3347117ccbf62bbee71cfc
DIST nvidia-xconfig-495.29.05.tar.bz2 108794 BLAKE2B 20958cf72ae0c25ddd1424746e613df7cead4c011963ba3c5fa29a37527604bf1b4b0318c43d39e9757c20fbadbfeb00fc88c91c6537340f2345ac710171f267 SHA512 38d38c2b92b4e17de360b173231003e7f2ab64e3d456689d7d942035f41bede4bf8533f65348dfe4dbbaf48a84017f73550c05bd18c6f52dca413a502c243e5c
+DIST nvidia-xconfig-495.44.tar.bz2 108699 BLAKE2B 8027d9b14f16c792e0839746c549979017e52724a5826cad3b53cda0fa2638b6f7dfe72353e36b84084f4a56a004cd91f87ff1d1d9e542b5d760e47092268993 SHA512 624aa71f319d7d8e3383580eda5c6cfc986ef4c3a9c14493cd561cd3ba758763d79731bb7e7e03fc89d3b8a3a8b65cee324de1d9980b5725678ccd50cb26175e
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-495.44.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-495.44.ebuild
new file mode 100644
index 000000000000..1a55fb59c1b8
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-495.44.ebuild
@@ -0,0 +1,495 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+MODULES_OPTIONAL_USE="driver"
+inherit desktop eapi8-dosym linux-mod multilib-build \
+ readme.gentoo-r1 systemd toolchain-funcs unpacker
+
+NV_KERNEL_MAX="5.14"
+NV_URI="https://download.nvidia.com/XFree86/"
+
+DESCRIPTION="NVIDIA Accelerated Graphics Driver"
+HOMEPAGE="https://www.nvidia.com/download/index.aspx"
+SRC_URI="
+ amd64? ( ${NV_URI}Linux-x86_64/${PV}/NVIDIA-Linux-x86_64-${PV}.run )
+ arm64? ( ${NV_URI}Linux-aarch64/${PV}/NVIDIA-Linux-aarch64-${PV}.run )
+ ${NV_URI}nvidia-installer/nvidia-installer-${PV}.tar.bz2
+ ${NV_URI}nvidia-modprobe/nvidia-modprobe-${PV}.tar.bz2
+ ${NV_URI}nvidia-persistenced/nvidia-persistenced-${PV}.tar.bz2
+ ${NV_URI}nvidia-settings/nvidia-settings-${PV}.tar.bz2
+ ${NV_URI}nvidia-xconfig/nvidia-xconfig-${PV}.tar.bz2"
+# nvidia-installer is unused but here for GPL-2's "distribute sources"
+S="${WORKDIR}"
+
+LICENSE="NVIDIA-r2 BSD GPL-2 MIT ZLIB"
+SLOT="0/${PV%%.*}"
+KEYWORDS="-* ~amd64"
+IUSE="+X +driver static-libs +tools wayland"
+
+COMMON_DEPEND="
+ acct-group/video
+ acct-user/nvpd
+ net-libs/libtirpc:=
+ tools? (
+ dev-libs/atk
+ dev-libs/glib:2
+ dev-libs/jansson
+ media-libs/harfbuzz:=
+ x11-libs/cairo
+ x11-libs/gdk-pixbuf:2
+ x11-libs/gtk+:3
+ x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXxf86vm
+ x11-libs/pango
+ )"
+RDEPEND="
+ ${COMMON_DEPEND}
+ X? (
+ media-libs/libglvnd[X,${MULTILIB_USEDEP}]
+ x11-libs/libX11[${MULTILIB_USEDEP}]
+ x11-libs/libXext[${MULTILIB_USEDEP}]
+ )
+ wayland? (
+ >=gui-libs/egl-wayland-1.1.7-r1
+ media-libs/libglvnd
+ >=media-libs/mesa-21.2[gbm(+)]
+ x11-libs/libdrm
+ )"
+DEPEND="
+ ${COMMON_DEPEND}
+ static-libs? (
+ x11-libs/libX11
+ x11-libs/libXext
+ )
+ tools? (
+ media-libs/libglvnd
+ sys-apps/dbus
+ x11-base/xorg-proto
+ x11-libs/libXrandr
+ x11-libs/libXv
+ x11-libs/libvdpau
+ )"
+BDEPEND="
+ app-misc/pax-utils
+ virtual/pkgconfig"
+
+QA_PREBUILT="lib/firmware/* opt/bin/* usr/lib*"
+
+PATCHES=(
+ "${FILESDIR}"/nvidia-modprobe-390.141-uvm-perms.patch
+)
+
+pkg_setup() {
+ use driver || return
+
+ local CONFIG_CHECK="
+ PROC_FS
+ ~DRM_KMS_HELPER
+ ~SYSVIPC
+ ~!DRM_SIMPLEDRM
+ ~!LOCKDEP
+ ~!SLUB_DEBUG_ON
+ !DEBUG_MUTEXES"
+ local ERROR_DRM_KMS_HELPER="CONFIG_DRM_KMS_HELPER: is not set but needed for Xorg auto-detection
+ of drivers (no custom config), and for wayland / nvidia-drm.modeset=1.
+ Cannot be directly selected in the kernel's menuconfig, so enable
+ options such as CONFIG_DRM_FBDEV_EMULATION instead."
+
+ use amd64 && kernel_is -ge 5 8 && CONFIG_CHECK+=" X86_PAT" #817764
+
+ MODULE_NAMES="
+ nvidia(video:kernel)
+ nvidia-drm(video:kernel)
+ nvidia-modeset(video:kernel)
+ nvidia-peermem(video:kernel)
+ nvidia-uvm(video:kernel)"
+
+ linux-mod_pkg_setup
+
+ [[ ${MERGE_TYPE} == binary ]] && return
+
+ BUILD_PARAMS='NV_VERBOSE=1 IGNORE_CC_MISMATCH=yes SYSSRC="${KV_DIR}" SYSOUT="${KV_OUT_DIR}"'
+ BUILD_TARGETS="modules" # defaults' clean sometimes deletes modules
+
+ if linux_chkconfig_present CC_IS_CLANG; then
+ ewarn "Warning: building ${PN} with a clang-built kernel is experimental."
+
+ BUILD_PARAMS+=' CC=${CHOST}-clang'
+ if linux_chkconfig_present LD_IS_LLD; then
+ BUILD_PARAMS+=' LD=ld.lld'
+ if linux_chkconfig_present LTO_CLANG_THIN; then
+ # kernel enables cache by default leading to sandbox violations
+ BUILD_PARAMS+=' ldflags-y=--thinlto-cache-dir= LDFLAGS_MODULE=--thinlto-cache-dir='
+ fi
+ fi
+ fi
+
+ if kernel_is -gt ${NV_KERNEL_MAX/./ }; then
+ ewarn "Kernel ${KV_MAJOR}.${KV_MINOR} is either known to break this version of nvidia-drivers"
+ ewarn "or was not tested with it. It is recommended to use one of:"
+ ewarn " <=sys-kernel/gentoo-kernel-${NV_KERNEL_MAX}"
+ ewarn " <=sys-kernel/gentoo-sources-${NV_KERNEL_MAX}"
+ ewarn "You are free to try or use /etc/portage/patches, but support will"
+ ewarn "not be given and issues wait until NVIDIA releases a fixed version."
+ ewarn
+ ewarn "Do _not_ file a bug report if run into issues."
+ ewarn
+ fi
+}
+
+src_prepare() {
+ # make user patches usable across versions
+ rm nvidia-modprobe && mv nvidia-modprobe{-${PV},} || die
+ rm nvidia-persistenced && mv nvidia-persistenced{-${PV},} || die
+ rm nvidia-settings && mv nvidia-settings{-${PV},} || die
+ rm nvidia-xconfig && mv nvidia-xconfig{-${PV},} || die
+
+ default
+
+ # prevent detection of incomplete kernel DRM support (bug #603818)
+ sed 's/defined(CONFIG_DRM)/defined(CONFIG_DRM_KMS_HELPER)/' \
+ -i kernel/conftest.sh || die
+
+ sed -e '/Exec=\|Icon=/s/_.*/nvidia-settings/' \
+ -e '/Categories=/s/_.*/System;Settings;/' \
+ -i nvidia-settings/doc/nvidia-settings.desktop || die
+
+ # remove gtk2 support (bug #592730)
+ sed '/^GTK2LIB = /d;/INSTALL.*GTK2LIB/,+1d' \
+ -i nvidia-settings/src/Makefile || die
+
+ sed 's/__USER__/nvpd/' \
+ nvidia-persistenced/init/systemd/nvidia-persistenced.service.template \
+ > nvidia-persistenced.service || die
+
+ # enable nvidia-drm.modeset=1 by default with USE=wayland
+ cp "${FILESDIR}"/nvidia-470.conf "${T}"/nvidia.conf || die
+ use !wayland || sed -i '/^#.*modeset=1$/s/^#//' "${T}"/nvidia.conf || die
+
+ gzip -d nvidia-{cuda-mps-control,smi}.1.gz || die
+}
+
+src_compile() {
+ nvidia-drivers_make() {
+ emake -C nvidia-${1} ${2} \
+ PREFIX="${EPREFIX}/usr" \
+ HOST_CC="$(tc-getBUILD_CC)" \
+ HOST_LD="$(tc-getBUILD_LD)" \
+ NV_USE_BUNDLED_LIBJANSSON=0 \
+ NV_VERBOSE=1 DO_STRIP= OUTPUTDIR=out
+ }
+
+ tc-export AR CC LD OBJCOPY
+
+ # may no longer be relevant but kept as a safety
+ export DISTCC_DISABLE=1 CCACHE_DISABLE=1
+
+ use driver && linux-mod_src_compile
+
+ nvidia-drivers_make modprobe
+ nvidia-drivers_make persistenced
+ use X && nvidia-drivers_make xconfig
+
+ if use tools; then
+ nvidia-drivers_make settings
+ elif use static-libs; then
+ nvidia-drivers_make settings/src out/libXNVCtrl.a
+ fi
+}
+
+src_install() {
+ nvidia-drivers_make_install() {
+ emake -C nvidia-${1} install \
+ DESTDIR="${D}" \
+ PREFIX="${EPREFIX}/usr" \
+ LIBDIR="${ED}/usr/$(get_libdir)" \
+ NV_USE_BUNDLED_LIBJANSSON=0 \
+ NV_VERBOSE=1 DO_STRIP= MANPAGE_GZIP= OUTPUTDIR=out
+ }
+
+ nvidia-drivers_libs_install() {
+ local libs=(
+ EGL_nvidia
+ GLESv1_CM_nvidia
+ GLESv2_nvidia
+ cuda
+ nvcuvid
+ nvidia-allocator
+ nvidia-eglcore
+ nvidia-encode
+ nvidia-glcore
+ nvidia-glsi
+ nvidia-glvkspirv
+ nvidia-ml
+ nvidia-opencl
+ nvidia-opticalflow
+ nvidia-ptxjitcompiler
+ nvidia-tls
+ $(usex X '
+ GLX_nvidia
+ nvidia-fbc
+ vdpau_nvidia
+ ' '')
+ $(usex amd64 nvidia-compiler '')
+ )
+
+ local libdir=.
+ if [[ ${ABI} == x86 ]]; then
+ libdir+=/32
+ else
+ libs+=(
+ libnvidia-nvvm.so.4.0.0
+ nvidia-cfg
+ nvidia-ngx
+ nvidia-rtcore
+ nvoptix
+ $(usex wayland '
+ libnvidia-egl-gbm.so.1.1.0
+ nvidia-vulkan-producer
+ ' '')
+ )
+ fi
+
+ local lib soname
+ for lib in "${libs[@]}"; do
+ [[ ${lib:0:3} != lib ]] && lib=lib${lib}.so.${PV}
+
+ # auto-detect soname and create appropriate symlinks
+ soname=$(scanelf -qF'%S#F' ${lib}) || die "Scanning ${lib} failed"
+ if [[ ${soname} && ${soname} != ${lib} ]]; then
+ ln -s ${lib} ${libdir}/${soname} || die
+ fi
+ ln -s ${lib} ${libdir}/${lib%.so*}.so || die
+
+ dolib.so ${libdir}/${lib%.so*}*
+ done
+ }
+
+ if use driver; then
+ linux-mod_src_install
+
+ insinto /etc/modprobe.d
+ doins "${T}"/nvidia.conf
+
+ insinto /lib/firmware/nvidia/${PV}
+ doins firmware/gsp.bin
+
+ # used for gpu verification with binpkgs (not kept)
+ insinto /usr/share/nvidia
+ doins supported-gpus/supported-gpus.json
+ fi
+
+ if use X; then
+ exeinto /usr/$(get_libdir)/xorg/modules/drivers
+ doexe nvidia_drv.so
+
+ exeinto /usr/$(get_libdir)/xorg/modules/extensions
+ newexe libglxserver_nvidia.so{.${PV},}
+
+ insinto /usr/share/X11/xorg.conf.d
+ newins {,50-}nvidia-drm-outputclass.conf
+
+ # vulkan icd uses libGLX_nvidia.so and so requires X
+ insinto /usr/share/vulkan/icd.d
+ doins nvidia_icd.json
+ insinto /usr/share/vulkan/implicit_layer.d
+ doins nvidia_layers.json
+ fi
+
+ if use wayland; then
+ insinto /usr/share/egl/egl_external_platform.d
+ doins 15_nvidia_gbm.json
+
+ dosym8 -r /usr/$(get_libdir)/{libnvidia-allocator.so.1,gbm/nvidia-drm_gbm.so}
+ fi
+
+ insinto /usr/share/glvnd/egl_vendor.d
+ doins 10_nvidia.json
+
+ insinto /etc/OpenCL/vendors
+ doins nvidia.icd
+
+ insinto /etc/nvidia
+ newins nvidia-application-profiles{-${PV},}-rc
+
+ # install built helpers
+ nvidia-drivers_make_install modprobe
+ # allow video group to load mods and create devs (bug #505092)
+ fowners :video /usr/bin/nvidia-modprobe
+ fperms 4710 /usr/bin/nvidia-modprobe
+
+ nvidia-drivers_make_install persistenced
+ newconfd "${FILESDIR}"/nvidia-persistenced.confd nvidia-persistenced
+ newinitd "${FILESDIR}"/nvidia-persistenced.initd nvidia-persistenced
+ systemd_dounit nvidia-persistenced.service
+
+ use X && nvidia-drivers_make_install xconfig
+
+ if use tools; then
+ nvidia-drivers_make_install settings
+ doicon nvidia-settings/doc/nvidia-settings.png
+ domenu nvidia-settings/doc/nvidia-settings.desktop
+
+ insinto /usr/share/nvidia
+ newins nvidia-application-profiles{-${PV},}-key-documentation
+
+ exeinto /etc/X11/xinit/xinitrc.d
+ newexe "${FILESDIR}"/95-nvidia-settings-r1 95-nvidia-settings
+ fi
+
+ if use static-libs; then
+ dolib.a nvidia-settings/src/out/libXNVCtrl.a
+
+ insinto /usr/include/NVCtrl
+ doins nvidia-settings/src/libXNVCtrl/NVCtrl{Lib,}.h
+ fi
+
+ # install prebuilt-only helpers
+ exeinto /opt/bin
+
+ doexe nvidia-cuda-mps-control
+ doman nvidia-cuda-mps-control.1
+ doexe nvidia-cuda-mps-server
+
+ doexe nvidia-debugdump
+ dobin nvidia-bug-report.sh
+
+ doexe nvidia-ngx-updater
+
+ doexe nvidia-smi
+ doman nvidia-smi.1
+
+ # install prebuilt-only libraries
+ multilib_foreach_abi nvidia-drivers_libs_install
+
+ # install dlls for optional use with proton/wine
+ insinto /usr/$(get_libdir)/nvidia/wine
+ use amd64 && doins {_,}nvngx.dll
+
+ # install systemd sleep services
+ exeinto /lib/systemd/system-sleep
+ doexe systemd/system-sleep/nvidia
+ dobin systemd/nvidia-sleep.sh
+ systemd_dounit systemd/system/nvidia-{hibernate,resume,suspend}.service
+
+ # create README.gentoo
+ local DISABLE_AUTOFORMATTING=yes
+ local DOC_CONTENTS=\
+"Trusted users should be in the 'video' group to use NVIDIA devices.
+You can add yourself by using: gpasswd -a my-user video
+
+See '${EPREFIX}/etc/modprobe.d/nvidia.conf' for modules options.
+
+For general information on using nvidia-drivers, please see:
+https://wiki.gentoo.org/wiki/NVIDIA/nvidia-drivers"
+ readme.gentoo_create_doc
+
+ local DOCS=(
+ README.txt NVIDIA_Changelog supported-gpus/supported-gpus.json
+ nvidia-settings/doc/{FRAMELOCK,NV-CONTROL-API}.txt
+ )
+ local HTML_DOCS=( html/. )
+ einstalldocs
+}
+
+pkg_preinst() {
+ use driver || return
+ linux-mod_pkg_preinst
+
+ # set video group id based on live system (bug #491414)
+ local g=$(getent group video | cut -d: -f3)
+ [[ ${g} ]] || die "Failed to determine video group id"
+ sed -i "s/@VIDEOGID@/${g}/" "${ED}"/etc/modprobe.d/nvidia.conf || die
+
+ # try to find driver mismatches using temporary supported-gpus.json
+ for g in $(grep -l 0x10de /sys/bus/pci/devices/*/vendor 2>/dev/null); do
+ g=$(grep -io "\"devid\":\"$(<${g%vendor}device)\"[^}]*branch\":\"[0-9]*" \
+ "${ED}"/usr/share/nvidia/supported-gpus.json 2>/dev/null)
+ if [[ ${g} ]]; then
+ g=$((${g##*\"}+1))
+ if ver_test -ge ${g}; then
+ NV_LEGACY_MASK=">=${CATEGORY}/${PN}-${g}"
+ break
+ fi
+ fi
+ done
+ rm "${ED}"/usr/share/nvidia/supported-gpus.json || die
+
+ has_version "x11-drivers/nvidia-drivers[wayland]" && NV_HAD_WAYLAND=1
+}
+
+pkg_postinst() {
+ use driver && linux-mod_pkg_postinst
+
+ readme.gentoo_print_elog
+
+ if [[ -r /proc/driver/nvidia/version &&
+ $(grep -o ' [0-9.]* ' /proc/driver/nvidia/version) != " ${PV} " ]]; then
+ ewarn "Currently loaded NVIDIA modules do not match the newly installed"
+ ewarn "libraries and will lead to GPU-using application issues."
+ use driver && ewarn "The easiest way to fix this is usually to reboot."
+ fi
+
+ if [[ $(</proc/cmdline) == *slub_debug=[!-]* ]]; then
+ ewarn "Detected that the current kernel command line is using 'slub_debug=',"
+ ewarn "this may lead to system instability/freezes with this version of"
+ ewarn "${PN}. Bug: https://bugs.gentoo.org/796329"
+ fi
+
+ if [[ ${NV_LEGACY_MASK} ]]; then
+ ewarn
+ ewarn "***WARNING***"
+ ewarn
+ ewarn "You are installing a version of nvidia-drivers known not to work"
+ ewarn "with a GPU of the current system. If unwanted, add the mask:"
+ if [[ -d ${EROOT}/etc/portage/package.mask ]]; then
+ ewarn " echo '${NV_LEGACY_MASK}' > ${EROOT}/etc/portage/package.mask/${PN}"
+ else
+ ewarn " echo '${NV_LEGACY_MASK}' >> ${EROOT}/etc/portage/package.mask"
+ fi
+ ewarn "...then downgrade to a legacy branch if possible. For details, see:"
+ ewarn "https://www.nvidia.com/object/IO_32667.html"
+ fi
+
+ if use wayland && use driver && [[ ! ${NV_HAD_WAYLAND} ]]; then
+ elog
+ elog "With USE=wayland, this version of ${PN} sets nvidia-drm.modeset=1"
+ elog "in '${EROOT}/etc/modprobe.d/nvidia.conf'. This feature is considered"
+ elog "experimental but is required for EGLStream (used for wayland acceleration"
+ elog "in compositors that support it)."
+ elog
+ elog "If you experience issues, please comment out the option from nvidia.conf."
+ elog "Of note, may possibly cause issues with SLI and Reverse PRIME."
+ fi
+
+ if use wayland && [[ ${REPLACING_VERSIONS} ]] &&
+ ver_test ${REPLACING_VERSIONS} -lt 495.53.02; then
+ elog
+ elog "While this version of ${PN} adds GBM support (allowing a wider"
+ elog "range of wayland compositors, such as sway), be warned it is very"
+ elog "experimental. While not essential, some features also need"
+ elog ">=egl-wayland-1.1.8 which is known to cause EGLStream regressions."
+ elog
+ elog "If lacking a cursor with wlroots, try WLR_NO_HARDWARE_CURSORS=1"
+ elog "Also of interest: __GLX_VENDOR_LIBRARY_NAME=nvidia, GBM_BACKEND=nvidia-drm"
+ fi
+
+ # Try to show this message only to users that may really need it
+ # given the workaround is discouraged and usage isn't widespread.
+ if use X && [[ ${REPLACING_VERSIONS} ]] &&
+ ver_test ${REPLACING_VERSIONS} -lt 460.73.01 &&
+ grep -qr Coolbits "${EROOT}"/etc/X11/{xorg.conf,xorg.conf.d/*.conf} 2>/dev/null; then
+ elog
+ elog "Coolbits support with ${PN} has been restricted to require Xorg"
+ elog "with root privilege by NVIDIA (being in video group is not sufficient)."
+ elog "e.g. attempting to change fan speed with nvidia-settings would fail."
+ elog
+ elog "Depending on your display manager (e.g. sddm starts X as root, gdm doesn't)"
+ elog "or if using startx, it may be necessary to emerge x11-base/xorg-server with"
+ elog 'USE="suid -elogind -systemd" if wish to keep using this feature.'
+ elog "Bug: https://bugs.gentoo.org/784248"
+ fi
+}