mirror of
https://github.com/pentoo/pentoo-overlay
synced 2026-04-20 13:51:00 +02:00
nvidia-drivers: reforking nvidia-drivers, from the look of https://bugs.gentoo.org/show_bug.cgi?id=447566 it will stay this way
This commit is contained in:
parent
b375754217
commit
f8f44f04fa
26 changed files with 1815 additions and 0 deletions
34
x11-drivers/nvidia-drivers/Manifest
Normal file
34
x11-drivers/nvidia-drivers/Manifest
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
AUX 09nvidia 61 SHA256 14702d6726cc9f0ad832a3cc90059999eb956f9e3a35397cb63cfa6347b33e39 SHA512 14c47fa164bde3422b64224e3e46e0a6097599de6193b6d36eb162271d41130f0498f6aee09f5cb60fe43727bf74051f9127afa1b4af42efc28d40af2e4fa86f WHIRLPOOL 34bc9975d132da84506a61a119a5d8d8b5be35af5c1511b5e3228fa3d9f0f3b7f84821c0ab09252054d1471ac7901522309d440c82342d6dfdd2beb73f680460
|
||||
AUX 50nvidia-prelink-blacklist 319 SHA256 61adce61498451898c22fb538151379438729957418eacf4f69195b3e03ec1f4 SHA512 7252b464c45669bb402859ddb2c95f4553a37027870b6aeada3e1dd58fefe7b4713d3486d301177efdcd7559dbc31ceb6078220d5c0187bdc636d817a98e1a41 WHIRLPOOL 93e14ed7c8fb5dba87295c87e1e8906afac290f63dc6ea023fa6c387ed47ff13d488b3b24c400aee42a22737856a7782925d9a3a412ddcd1984dbbd7e51579a5
|
||||
AUX 95-nvidia-settings 54 SHA256 c4b293c6c2659bebcbad9cffc1e237c6908a3763599e432aba89d07bc2826ba0 SHA512 0fdaff8701598081eeb78defcd140b78f75309ace998df67569a15d0ff653aca7ad0576912bf9a619f42990e6fb35cdb79e21f8181d3cd04dea719d912da8be9 WHIRLPOOL d71fef01f8c346089ef2556ffe62c5094f89582b73500711a7f18f25424e59baa12f6b0861bd8efd9bf4c5bbf794642927ca322cee218fd2da9fc7baa50fa827
|
||||
AUX NVIDIA_glx-defines.patch 437 SHA256 0007f3d962edb87da4788ce58869679c1b10f28223a6bf1c23696fede57305da SHA512 a9cbbe5d5d362db0eb92d5b9fe87f28cccb600df9b44ae2b323ed08da97c32d6a4a0553c7c82ea3777ab91a1a4bf6b74f04d89b6ec28e60565e677cc4af48351 WHIRLPOOL a826b11c86803530346a65612ebd1a12f77f6c6ba1d93af597435993086451648b825fbc245a2c5850e0680c58129924843744d7e29013d5087c3b4dd9fefb14
|
||||
AUX NVIDIA_glx-glheader.patch 380 SHA256 f630e24067bf6199a64f8fe8c5d6fc158cb4b153bda65ffc3f97b36a9cb08faf SHA512 366ebbe967001f4d694e9d6ae61fbd8b57e2946bba495894936809634bb87bd6ba6b10689969977e4d0eaba6983c16fe8d78830112b5b28f01c78381a0a095d6 WHIRLPOOL 8609fcedb439299189d9d05606a290a63de8b207bab855f874faa36e892396f41159d26e505dfead89fdac9d7e61aeeb50b16877aa14ad62dc3cd617353d7d60
|
||||
AUX nvidia 1510 SHA256 b193cc3f6d6f39138720a2282d9f161fc8f2e8a15bc43d183a30eb879add06c5 SHA512 4ffdf49c2634b261be122a0016b0f69d30db6fe4b4a29767cfeee2e1d60671e7e6fc5e5c3a237b351a4def64404db121cf296a0cdb6e1bbd4f8e78ab40587000 WHIRLPOOL faab4c87940e4703b2a30f284cae34bdf4ac486cb1d402b5bd91ef65c23f443c2c961ad914fbcbd5258dd5bbaeee583f189fcf5fc14f2b9925c8ccfa0fc422c7
|
||||
AUX nvidia-169.07 639 SHA256 a8c4860f008d53776fda7a17b59524f271236559af688e9a2c9845cbbcba1577 SHA512 3af295c026280dc3a2b73c2cc7772254686b09cad15f1333ab0b4de8cb0ccf78e725ced2a399b10edcf8af6ba42ab1485dc0661af67461b0c3789f786357772f WHIRLPOOL 626ae3c01c879e0cfe05bd373e0b9dfd6f462dd9ef6ae94a7d60276fe2d17c57fbb20aaa4d2a186a0ffc2a860076692aac854d00a3545bc9736e7bb8d0581055
|
||||
AUX nvidia-autostart.desktop 227 SHA256 850c22fad5ac5a0cf6795b47cfc34f88f151f2802fa1256d2c2422108d59400a SHA512 704b0291505e74c75b55b6d1c75f23399b2e76743093d1ad4dfdf1eafc71bba70aa4e0003b155f247fa4b861fffecf53cd72eeef04e86ba15c0c4e4af477d69a WHIRLPOOL 74e93677417c721fc06691078f813717b59d9fd8a07e00870dcfe518f904143b7af4a253595c0c226c926012ae0fe5b439f387578fc53246a0a8c0e4de00c2a0
|
||||
AUX nvidia-blacklist-vga-pmu-registers-256-304.diff 1713 SHA256 674a51e77beb3e076dd29b1d9a37ee23e1498ab128490ea2efb2140e45b44fde SHA512 abf4642278a4da01cefaea4abb116a3229b21c487c0e42d388561af3032d307fee734f5acd792efd4f4dd60e6a8ec18220f2a906c4cd82e71db769248e15c157 WHIRLPOOL 0bcdbf14ca6b4c6abc59ea6ca60da2feb7ff36739574290da109055f8153caf8a0adb6d0534e5ff43d814ba1dff24f894d18811f4c89b61565d2c1f4975213f8
|
||||
AUX nvidia-drivers-190.53-2.6.33.patch 2893 SHA256 68f5cdf4489fb6bc480319e4bda6e6481beb189cf37920b939b8f7bbf77aed1f SHA512 e6d4b1735c49b64f6b6f5a55273fe052913dfa775d1d3e6a76316e6d78dead566ebf4e695a30cd1e4fb25eb3e22572fcef2817fa4ea7f24dfdf5aea8b4db7ea8 WHIRLPOOL 09383431cce49789982827ee47016377623b124a7af8def45acb5c3bfb74839e09d46ca37e6331649983f4c3427a1d2f854fdd83023527addd8cadeef8327d01
|
||||
AUX nvidia-drivers-313.18-builddir-config.patch 1450 SHA256 28872397c455457fc4757c5309864ef00e737b719e607cb723b5e678bedc9807 SHA512 e554b1a5f776e6078bea6e30ccb1375b30c247e9e674609d4d20fbd7250b2fe6014bf69ab9404985c91cbfb41b9803dceda5d00f735a0bdfe0e506591f60e659 WHIRLPOOL 2fe5b0cdb022b04420b31177d2a23d92cf42ee8ad5faed7bf0ff3b85815032555ba1ccba1e124609ed63d49d0c90390bb7d70c87c8b5003ff32802836ce989d2
|
||||
AUX nvidia-drivers-313.18-linux-3.7+.patch 990 SHA256 1ef3c4f6016189117a1dc7c1ef4949376fd762f29d6cb07bd3016dc01b483bcd SHA512 0eb41c71b0c96314022e2a6ae7fbed15b9247de087032e78e8e623137127cdbab4c79d454c7cab00ae5e0710fe48909df607d56592813e005eb2124cc2c1374f WHIRLPOOL 496a92c9b10c1bd7f1c797f57213d5033460329377ce759f25ecd90e900bc3277abf4aabaac73a6d7bcb5c563925919638d7f1a092d7b80c34de437a87deb354
|
||||
AUX nvidia-drivers-313.18-linux-3.8+.patch 461 SHA256 a22245e4a44d0aeb36a95519e80efd24416b7a927852b23dd23e514849d9e076 SHA512 07f266cb3af92ace0e2c92f2d23bf716067c83c5b9da24d8670de5a8228b998b28380f01eca84c27a6e7a8d6c296db62182b90c71e29939022b083341e21d612 WHIRLPOOL 6cb29e35bd86160a62b26b0a2976b6557c717d196407ad32f186269001dd6a3786906bced5a739385e3010ef3142a1c1ff1ea3648ccb6ffe2e5932323f03995d
|
||||
AUX nvidia-drivers-pax-const.patch 833 SHA256 74ba8aa3b03e1b4a0515fd84c159eaeb7635fa1364e77544b01ff6f571f0e6d8 SHA512 6ef94db71cab2dd47273eaed1857209d03ef648d268c7645f3ca4caf6b894590e42a8e716e4354f2eed656e7d55a4c1774b1e6a4be215fbf59fc9d0b1a5762a0 WHIRLPOOL 1b2d737ee7ccee831c85bd8af9605c0633fd025bb209e6d76c13f49a5664aa490bd5b6ce48855e541fe87380cd7b723162e1965b803e1ed630f239bf4dbd0d19
|
||||
AUX nvidia-drivers-pax-usercopy.patch 2350 SHA256 56980f43db38d582bc6a9bfd881973fce6e3e056b77ce4f4005bdcf79526a863 SHA512 54a1354ba008d014a608044610027b4d808120f8e77cc7d5ac855c3dcf4f487b0a4c0870ae4e727db0643cb56ee21513b803976e9a30c6838adf2f5414232804 WHIRLPOOL 78ac54bfe52cc3b6dfa28e17020991dfb7056984d667b0fefa41d23372b03e1a8e6d66c74e1dee234733d5b2b36e2c0813f507a89716ae2d8f1f6db917fdf01d
|
||||
AUX nvidia-drivers-settings.desktop 193 SHA256 31c062449b8bcc8adcd3ee649d8aebf0bef502400bcbbbb46124217e1efb17a3 SHA512 fbb81d2520e9025fbffb2a8e7b3647f621ddc9d36c79d063d49e901286e8d1ea45de1274f42e33ff1aece5cebd547a42829d65b421db39d808947554b0f57453 WHIRLPOOL c797eb0ec1044ecaaa979ca5180f840d9c82c5c040dd81b2d86ca4afade9f0c006fb8951f04cc4d2b206110d38b339690386d291ff8f625a22b38178a3cd970b
|
||||
AUX nvidia-smi.init 671 SHA256 5776a661b510e072d34e779c23dfc710a13d04c49acc22772d2aeb0e415820d6 SHA512 f71bcdf2fcaf4aac69056a04f3e57c9f5e4d6c210fe571704d3f9a0798cc9615cd0560840ae336744f43563528db5b9a7b67730895eff438be330b13ab863ed6 WHIRLPOOL db48549b0d2b02d2f9ca6a86f38229dae67853939ac1c2147d5066b9b8958c2e0fb8539f70ddf5c92ae6ad642bb48ea8b1119d1779c80dd66bb450240fd0b40a
|
||||
AUX nvidia-udev.sh 185 SHA256 120c0af2b64fbcbd7032217a78eec8b104874c1ca68726367bce22c57944e07e SHA512 166df3a4e7c1862ca2e0f634bf5eed7aad1bdd7e55764ca42371b91a7077c59f0bc243de5616fd38dac9694159d1695d54fbd08ac89d4d3f3649c70c7db5977e WHIRLPOOL cb9995029cdb2fe1bc7fe5ae54041ee5de8da86bf5eb3616d062475e56c44d436e1e66683ecddd986fc5bca5723d88da4b1a42f65f3cd7e15636928bd21fce14
|
||||
AUX nvidia.udev-rule 462 SHA256 37b152a5055a16d1947171567178e2841679ddf03dba9d48e7d30f1e3b469ac6 SHA512 96f9edaa0b46bea5fce17596f868bea5265b303d7185af6ba81527bbd7b8fdf92de9311317cbde51a29d222083d451c25ab77c3d6837cbc4072a50d9af89aa86 WHIRLPOOL 89ed95f33db7485a3a1acd91df33ecdfb7d0a249db2d7674f134fb85b35a54653d0458e478503315ce506ae5d3c8dcd4ac20420711fdbdd087ea4bd779627d13
|
||||
DIST NVIDIA-FreeBSD-x86-304.64.tar.gz 33320263 SHA256 e129d0d0e8d256d6328cddc4c18edb96c1e444c354f7c806ece4192621a1c1b5 SHA512 032de0524f2e68a06e6218f3737f55e16e6ae6ea9991b539bacabf4814a101d2f0786d8e2fe750d59ddaf5b5cee5b1527adedc44539d2015370e879ee8b37948 WHIRLPOOL f042065e63a5a74b2d3b586135072df77156481383a5cb7993598efef841859c3a7d9a7c6ad7eb83016376bfe5d2b044088918711a6304380a8ade6c808ab60c
|
||||
DIST NVIDIA-FreeBSD-x86-310.32.tar.gz 32541283 SHA256 3f00f5a13dc04f51b2a1b000ad53741ac6b81bd6e70258e7b9f200daf8f52b2d SHA512 f7d6e55a11cb8c44e5ddad00326942968800b671b6695303cbb3a689f843977f09c742705b4c44d1b77d4602229d59f3a713fbf0687c104c4220da34d6e45830 WHIRLPOOL 3ae11e4e4740a83e73ba028d6066c556e848956476e7b7633b3d36c6319a9751398d6b1a9392b279c0fec28277f355c05a06d9506159060a67ec8b29116711c3
|
||||
DIST NVIDIA-FreeBSD-x86-313.18.tar.gz 32592785 SHA256 515b8470dcea3e122403f5902ba6ce3d710d9ddc4d9edd581ffe85e184af989f SHA512 00f15def371cbd2c433b2cecc1f5ff455ea1b112951b3453512b88371f7fa25047e5409cdbd7e34b7c8e6d5b1691b6d662076737dcfd6239f60926a013a1de52 WHIRLPOOL d6a49d027a4cc66c05a246f84ca8360265ce98d50e1e35d4d8828f2003c472d2154eb277cecddd1eb39ecc44896795e529daa743f37174c0e1e2a84b9fa7bada
|
||||
DIST NVIDIA-FreeBSD-x86_64-304.64.tar.gz 34247065 SHA256 9887e4147fcb16141dcb6b153ff71a28c73cf2a4c16b60e4c6fcb8586a1c5400 SHA512 31750ebf8f8583e82dd3211888e729dac866b73c9cce4cf666900f7d1269097ed1df9e30173c8091e0ed5196dd3d4d9b09e2aaeaef2936aa3f95fb673a37622b WHIRLPOOL 1412c1e9deaecd2f7fd086ef57afb6ea8b2252b57a4e69a71561768a6fed7e6387d10db4e4efa5c9772e2954bc0fd2c1902bff29a8b48ce6dc05e87ec913c908
|
||||
DIST NVIDIA-FreeBSD-x86_64-310.32.tar.gz 33511666 SHA256 f0935abf74a1298471a5eb0ede56ab913e358b76935557d618915a97efda9224 SHA512 fae5fef9cfc1f49c5d2a2c0a36cebd3b1e95ce306a2ef59fe93b9536d64489bbac09d8e78d92b2cd7e66bbe7cf68b86b0431d95b84267cbe06f9c7e485cc23a8 WHIRLPOOL 3b4aa1363ef70940f7c85e5e3ce4c13c5976f774b191567f45a7944daa89d89d823710ae4441f6c5746b30578457a339f3aa9cd650c25d071662ca21f048126b
|
||||
DIST NVIDIA-FreeBSD-x86_64-313.18.tar.gz 33554240 SHA256 57fbf9c85fb19a7f2fb3c6c2f50421e70309cd3360c059a2fc6efc125681ff10 SHA512 fe2c0ec88b7cb5d49905dd082d46f3a4268dea78bf4dbdc6d82b60f1ec9998d478b4332de48094af7bb7b9b51eb6885aae446998830c28555521715db7a59dbe WHIRLPOOL 95e3c577b3831bda11f0ddd8ee1fddc2f1a3138db35c78277fe99ac6c75d9dca0e9b8acf59ca31413f11775772d82bef85077355796bb6882bf9804868361b66
|
||||
DIST NVIDIA-Linux-x86-304.64.run 39386363 SHA256 23464129f7ea5a00f724f67627206b322b6d08efb7134192a56ba50ea93d2252 SHA512 106e40ec6453c0f08c0ec926e5121357535395c5d97acfdaa3c1b95f9baa256d1797cde56e1fa696e267cd1d12fcb1624d6e60e28256d9658bfed12580669c5c WHIRLPOOL a6ab62b283963a417781d4d90c03f7a1b2afedb69d1e2e862bdc67c6e8148a29de396e362dea46a4024f65470ecc2f984b468df9ab784aca7327e80529af2bc7
|
||||
DIST NVIDIA-Linux-x86-310.32.run 38844819 SHA256 d43e56486a53fa99690c7038005797699cec54ab5e2c7cee229340118616ac8d SHA512 523745e428874445fe2df65bd111c68707b378305d7bbeea6a94b01b13a1f6233b4e27d74555f1c43457e8d49692e786eab3157c2bd3e158228316534746a2d8 WHIRLPOOL 642d64eb1e62f6e305b89712112f54e8e6f6eee9726cad0544d7caf02307e570a2418482318df18fd1de2376cbde918732d96af5400634d150d4625d40467c3c
|
||||
DIST NVIDIA-Linux-x86-313.18.run 38865783 SHA256 58e5e2191890ace94849444f5d2de4c2921dfe02cd97825d81a128754ff4488f SHA512 70ec92071de3aabe77ee5304a4c2c1b7eda0e2b44860f63b05c8c004aaf748c18b40e5f7558dd6bcb99e1e394557a2c189ca462400fdde28aee408a64b8b7e27 WHIRLPOOL 3f6506e17414a78d4dc7a69e52e34d5172529d061dd8aa7b7e31066281525a0cbfefd846b2bfdb21820ed3c6a0c1348fae4e0d7d21c82d6633e284f5a0dfbd52
|
||||
DIST NVIDIA-Linux-x86_64-304.64.run 67695715 SHA256 b3c3bb7f136ccd978c9c5a511a02199ec2498c4243baae19ac68e5d905ca5340 SHA512 77241676900bf5f9fa93f5628ae9c5ffc35c41de31fbb9e777e55204cd1183d344d7ad5d00e52efe5caa91330f6157d9d2cba66764256673dbfbe61fe6797de3 WHIRLPOOL a8744fb747569e5106d486200231f0caf99ac3896b8cc358ea581486cf98506ed21b54407665acb461c40fcd89cfa04ac540b6c959856aaf14979abce75999d1
|
||||
DIST NVIDIA-Linux-x86_64-310.32.run 68342787 SHA256 e5f179a62d1a0e6a877f3f89315d0a28cb7c3cbceff7df13e1a71ab189ac3616 SHA512 c0f3c6327a6fe01e84a84f92578c01367abc1b7c8435d4485bb117874ac9156800b82e7f59fd5a3caf74d3a44b067b890ce12a0dc35efde81cc6ee6388b8b4ce WHIRLPOOL 480419d3f329808e73f5ff9556f05f02d7488eec4af91444f858d0347ab331a0cc75700361ba47ea4151cc549e716ab9f980b3bfb5bbea205fc1b4d12d0b50a3
|
||||
DIST NVIDIA-Linux-x86_64-313.18.run 68386461 SHA256 9aaf6ce2fb08f72b2ab4f7a2d9fc5af8216ac263fa4883deec3844f34ea7ba3a SHA512 d1017763f6cef96a443f9d7890ca940d742cd17fb8b1d926440483987e22d350a57bcce98962d6130c5e2ac697926dbb560f148f45ba7659ff3412443b53473c WHIRLPOOL 0180fff2e5e7bd9fb731fdee3c81e1b26a7962d989e998dc9fa67e4a836526e10e6de01cfc1e6650d9ff4a5cc334b5c27740df309b3dd403dfd13795c48d6f29
|
||||
EBUILD nvidia-drivers-304.64.ebuild 13183 SHA256 0325daacf979f44ee8f4b93a0cf911a72d2dc1a5459dbfeda5ee65058a137fc1 SHA512 7615f5736b3d09a471c6b9f88fe35168df72553167bdf2d54b3391b4cfc6a5a7e727d27eebba961112a66f34ed0561c0e0c40359dcbb8ae6969f7c81e2ab2d0e WHIRLPOOL 0d15750d9bb21a046ed20edd209a236452798fdbbda164ba951d834d4c031451171e9a3d6703f69d45401c4a296812915dbf2287eb22d2b74ddbaca72fb34f93
|
||||
EBUILD nvidia-drivers-310.32.ebuild 12773 SHA256 4d3c9e2045cb7a4f2bf60c222ff3bb894b10f11d36a80ebfe8abeb2c00d624b9 SHA512 d8bc2111d17b05dde2a7f4ea4ad2ab1658991d39de6803fe8bf1201586334c429428ec17d1554a433e0a305cbadead0bcc1024db18407c389d1dd7940ee05816 WHIRLPOOL 23b2992b99cfe5cfd554d9f8576567737a3e4ea799a9fc32f07ea55bffa3075adfe47a099f28fd46003d2ecd05b854c77461261b62b26255a4710bf2e77c3392
|
||||
EBUILD nvidia-drivers-313.18.ebuild 13089 SHA256 dccffb4060a1debabd719e048fc2f55049fa3065555412a3c33d665b2d0913cb SHA512 a83ad87322ae7f6885900b52f237854e772c18aeb64d42906e57667535436c849eb28705e47681d733ce93d3e1c26830a1d021047c9fc23f554b4641231f4756 WHIRLPOOL 5cd3ee554171ffbb9aae760011e3315739b9a448d30f07e99783183f3246e6a5c2f430323cb6af489c6d656e38b50fd95ca82014745b255fc342f848ee5509ce
|
||||
2
x11-drivers/nvidia-drivers/files/09nvidia
Normal file
2
x11-drivers/nvidia-drivers/files/09nvidia
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
# Has to precede X11's own libraries!
|
||||
LDPATH=/opt/nvidia/lib
|
||||
|
|
@ -0,0 +1 @@
|
|||
PRELINK_PATH_MASK="/usr/lib{,64}/tls/libnvidia-tls*:/usr/lib{,64}/libnvidia*:/usr/lib{,64}/libGL*:/usr/lib{,64}/opengl/nvidia/*:/usr/lib{,64}/OpenCL/vendors/nvidia/*:/usr/lib{,64}/xorg/modules/drivers/nvidia*:/usr/lib{,64}/libvdpau_nvidia*:/usr/lib{,64}/libXvMCNVIDIA*:/usr/lib{,64}/libcuda*:/usr/lib{,64}/libnvcuvid*"
|
||||
2
x11-drivers/nvidia-drivers/files/95-nvidia-settings
Normal file
2
x11-drivers/nvidia-drivers/files/95-nvidia-settings
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
#!/bin/sh
|
||||
/opt/bin/nvidia-settings --load-config-only
|
||||
20
x11-drivers/nvidia-drivers/files/CVS/Entries
Normal file
20
x11-drivers/nvidia-drivers/files/CVS/Entries
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
/09nvidia/1.1/Thu Jul 6 19:52:04 2006//
|
||||
/NVIDIA_glx-defines.patch/1.1/Thu Jul 6 19:52:04 2006//
|
||||
/NVIDIA_glx-glheader.patch/1.1/Thu Jul 6 19:52:04 2006//
|
||||
/nvidia/1.3/Thu Sep 20 19:55:12 2007//
|
||||
/nvidia-169.07/1.3/Sun Jun 14 13:58:48 2009//
|
||||
/nvidia-drivers-190.53-2.6.33.patch/1.1/Sun Feb 28 17:43:37 2010//
|
||||
/nvidia-udev.sh/1.1/Fri Apr 6 01:52:26 2012//
|
||||
/nvidia.udev-rule/1.2/Fri Apr 6 18:20:47 2012//
|
||||
/50nvidia-prelink-blacklist/1.1/Sun Jul 22 21:08:43 2012//
|
||||
/nvidia-smi.init/1.1/Sun Jul 22 21:08:43 2012//
|
||||
/nvidia-drivers-settings.desktop/1.2/Mon Jul 23 19:29:16 2012//
|
||||
/nvidia-blacklist-vga-pmu-registers-256-304.diff/1.1/Sun Aug 5 22:43:04 2012//
|
||||
/nvidia-autostart.desktop/1.3/Mon Aug 13 01:34:27 2012//
|
||||
/nvidia-drivers-pax-const.patch/1.1/Wed Aug 29 03:41:50 2012//
|
||||
/nvidia-drivers-pax-usercopy.patch/1.1/Wed Aug 29 03:41:50 2012//
|
||||
/95-nvidia-settings/1.1/Thu Sep 13 16:37:31 2012//
|
||||
/nvidia-drivers-313.18-builddir-config.patch/0/dummy timestamp//
|
||||
/nvidia-drivers-313.18-linux-3.7+.patch/0/dummy timestamp//
|
||||
/nvidia-drivers-313.18-linux-3.8+.patch/0/dummy timestamp//
|
||||
D
|
||||
1
x11-drivers/nvidia-drivers/files/CVS/Repository
Normal file
1
x11-drivers/nvidia-drivers/files/CVS/Repository
Normal file
|
|
@ -0,0 +1 @@
|
|||
gentoo-x86/x11-drivers/nvidia-drivers/files
|
||||
1
x11-drivers/nvidia-drivers/files/CVS/Root
Normal file
1
x11-drivers/nvidia-drivers/files/CVS/Root
Normal file
|
|
@ -0,0 +1 @@
|
|||
zerochaos@cvs.gentoo.org:/var/cvsroot
|
||||
11
x11-drivers/nvidia-drivers/files/NVIDIA_glx-defines.patch
Normal file
11
x11-drivers/nvidia-drivers/files/NVIDIA_glx-defines.patch
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
diff -ur NVIDIA_GLX-1.0-4191/usr/include/GL/glx.h NVIDIA_GLX-1.0-4191.new/usr/include/GL/glx.h
|
||||
--- NVIDIA_GLX-1.0-4191/usr/include/GL/glx.h 2002-12-09 21:26:55.000000000 +0100
|
||||
+++ NVIDIA_GLX-1.0-4191.new/usr/include/GL/glx.h 2003-01-30 18:20:23.000000000 +0100
|
||||
@@ -39,6 +39,7 @@
|
||||
typedef XID GLXPixmap;
|
||||
typedef XID GLXDrawable;
|
||||
typedef XID GLXPbuffer;
|
||||
+typedef XID GLXPbufferSGIX;
|
||||
typedef XID GLXWindow;
|
||||
typedef XID GLXFBConfigID;
|
||||
|
||||
13
x11-drivers/nvidia-drivers/files/NVIDIA_glx-glheader.patch
Normal file
13
x11-drivers/nvidia-drivers/files/NVIDIA_glx-glheader.patch
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
--- usr/include/GL/gl.g.orig 2004-07-17 19:56:59.789410584 +1000
|
||||
+++ usr/include/GL/gl.h 2004-07-17 19:59:08.844791184 +1000
|
||||
@@ -66,6 +66,10 @@
|
||||
typedef double GLclampd;
|
||||
typedef void GLvoid;
|
||||
|
||||
+/* Patching for some better defines in the global system */
|
||||
+#ifndef GL_GLEXT_LEGACY
|
||||
+#include <GL/glext.h>
|
||||
+#endif
|
||||
|
||||
/*************************************************************/
|
||||
|
||||
40
x11-drivers/nvidia-drivers/files/nvidia
Normal file
40
x11-drivers/nvidia-drivers/files/nvidia
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
# Nvidia drivers support
|
||||
alias char-major-195 nvidia
|
||||
alias /dev/nvidiactl char-major-195
|
||||
|
||||
# To tweak the driver the following options can be used, note that
|
||||
# you should be careful, as it could cause instability!! For more
|
||||
# options see /usr/share/doc/PACKAGE/README
|
||||
#
|
||||
# To enable Side Band Adressing: NVreg_EnableAGPSBA=1
|
||||
#
|
||||
# To enable Fast Writes: NVreg_EnableAGPFW=1
|
||||
#
|
||||
# To enable both for instance, uncomment following line:
|
||||
#
|
||||
#options nvidia NVreg_EnableAGPSBA=1 NVreg_EnableAGPFW=1
|
||||
# If you have a mobile chip, you may need to enable this option
|
||||
# if you have hard lockups when starting X.
|
||||
#
|
||||
# See: Appendix I. Configuring your laptop
|
||||
# In /usr/share/doc/PACKAGE/README for full details
|
||||
#
|
||||
# Choose the appropriate value for NVreg_Mobile from the table:
|
||||
# Value Meaning
|
||||
# ---------- --------------------------------------------------
|
||||
# 0xFFFFFFFF let the kernel module autodetect the correct value
|
||||
# 1 Dell laptops
|
||||
# 2 non-Compal Toshiba laptops
|
||||
# 3 all other laptops
|
||||
# 4 Compal Toshiba laptops
|
||||
# 5 Gateway laptops
|
||||
#
|
||||
#options nvidia NVreg_SoftEDIDs=0 NVreg_Mobile=3
|
||||
|
||||
|
||||
# !!! SECURITY WARNING !!!
|
||||
# DO NOT MODIFY OR REMOVE THE DEVICE FILE RELATED OPTIONS UNLESS YOU KNOW
|
||||
# WHAT YOU ARE DOING.
|
||||
# ONLY ADD TRUSTED USERS TO THE VIDEO GROUP, THESE USERS MAY BE ABLE TO CRASH,
|
||||
# COMPROMISE, OR IRREPARABLY DAMAGE THE MACHINE.
|
||||
options nvidia NVreg_DeviceFileMode=432 NVreg_DeviceFileUID=0 NVreg_DeviceFileGID=VIDEOGID NVreg_ModifyDeviceFiles=1
|
||||
14
x11-drivers/nvidia-drivers/files/nvidia-169.07
Normal file
14
x11-drivers/nvidia-drivers/files/nvidia-169.07
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
# Nvidia drivers support
|
||||
alias char-major-195 nvidia
|
||||
alias /dev/nvidiactl char-major-195
|
||||
|
||||
# To tweak the driver the following options can be used, note that
|
||||
# you should be careful, as it could cause instability!! For more
|
||||
# options see /usr/share/doc/PACKAGE/README
|
||||
#
|
||||
# !!! SECURITY WARNING !!!
|
||||
# DO NOT MODIFY OR REMOVE THE DEVICE FILE RELATED OPTIONS UNLESS YOU KNOW
|
||||
# WHAT YOU ARE DOING.
|
||||
# ONLY ADD TRUSTED USERS TO THE VIDEO GROUP, THESE USERS MAY BE ABLE TO CRASH,
|
||||
# COMPROMISE, OR IRREPARABLY DAMAGE THE MACHINE.
|
||||
options nvidia NVreg_DeviceFileMode=432 NVreg_DeviceFileUID=0 NVreg_DeviceFileGID=VIDEOGID NVreg_ModifyDeviceFiles=1
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=NVIDIA X Server Settings
|
||||
Comment=Configure NVIDIA X Server Settings
|
||||
Exec=sh -c "/opt/bin/nvidia-settings --load-config-only"
|
||||
Terminal=false
|
||||
Icon=nvidia-settings
|
||||
Categories=System;Settings;
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
diff -ur kernel/nv.h kernel/nv.h
|
||||
--- kernel/nv.h 2012-08-02 18:19:37.000000000 -0700
|
||||
+++ kernel/nv.h 2012-08-02 18:19:37.000000000 -0700
|
||||
@@ -448,7 +448,20 @@
|
||||
|
||||
#define IS_BLACKLISTED_REG_OFFSET(nv, offset, length) \
|
||||
((IS_REG_RANGE_WITHIN_MAPPING(nv, 0x1000, 0x1000, offset, length)) ||\
|
||||
- (IS_REG_RANGE_WITHIN_MAPPING(nv, 0x700000, 0x100000, offset, length)))
|
||||
+ (IS_REG_RANGE_WITHIN_MAPPING(nv, 0x84000, 0x1000, offset, length)) ||\
|
||||
+ (IS_REG_RANGE_WITHIN_MAPPING(nv, 0x85000, 0x1000, offset, length)) ||\
|
||||
+ (IS_REG_RANGE_WITHIN_MAPPING(nv, 0x86000, 0x1000, offset, length)) ||\
|
||||
+ (IS_REG_RANGE_WITHIN_MAPPING(nv, 0x87000, 0x1000, offset, length)) ||\
|
||||
+ (IS_REG_RANGE_WITHIN_MAPPING(nv, 0x89000, 0x1000, offset, length)) ||\
|
||||
+ (IS_REG_RANGE_WITHIN_MAPPING(nv, 0xa0000, 0x20000, offset, length)) ||\
|
||||
+ (IS_REG_RANGE_WITHIN_MAPPING(nv, 0x104000, 0x1000, offset, length)) ||\
|
||||
+ (IS_REG_RANGE_WITHIN_MAPPING(nv, 0x105000, 0x1000, offset, length)) ||\
|
||||
+ (IS_REG_RANGE_WITHIN_MAPPING(nv, 0x10a000, 0x1000, offset, length)) ||\
|
||||
+ (IS_REG_RANGE_WITHIN_MAPPING(nv, 0x1c2000, 0x1000, offset, length)) ||\
|
||||
+ (IS_REG_RANGE_WITHIN_MAPPING(nv, 0x1c3000, 0x1000, offset, length)) ||\
|
||||
+ (IS_REG_RANGE_WITHIN_MAPPING(nv, 0x618000, 0x2000, offset, length)) ||\
|
||||
+ (IS_REG_RANGE_WITHIN_MAPPING(nv, 0x627000, 0x1000, offset, length)) ||\
|
||||
+ (IS_REG_RANGE_WITHIN_MAPPING(nv, 0x700000, 0x100000, offset, length)))
|
||||
|
||||
/* duplicated from nvos.h for external builds */
|
||||
#ifndef NVOS_AGP_CONFIG_DISABLE_AGP
|
||||
|
|
@ -0,0 +1,92 @@
|
|||
Index: usr/src/nv/conftest.sh
|
||||
===================================================================
|
||||
--- usr/src/nv/conftest.sh
|
||||
+++ usr/src/nv/conftest.sh 2010-01-06 12:10:56.000000000 +0530
|
||||
@@ -32,14 +32,14 @@
|
||||
# CONFIG_XEN and CONFIG_PARAVIRT are present, text_xen() treats
|
||||
# the kernel as a stand-alone kernel.
|
||||
#
|
||||
- FILE="linux/autoconf.h"
|
||||
+ FILE="generated/autoconf.h"
|
||||
|
||||
if [ -f $HEADERS/$FILE -o -f $OUTPUT/include/$FILE ]; then
|
||||
#
|
||||
# We are looking at a configured source tree; verify
|
||||
# that it's not a Xen kernel.
|
||||
#
|
||||
- echo "#include <linux/autoconf.h>
|
||||
+ echo "#include <generated/autoconf.h>
|
||||
#if defined(CONFIG_XEN) && !defined(CONFIG_PARAVIRT)
|
||||
#error CONFIG_XEN defined!
|
||||
#endif
|
||||
@@ -111,7 +111,12 @@
|
||||
fi
|
||||
}
|
||||
|
||||
-CONFTEST_PREAMBLE="#include <linux/autoconf.h>
|
||||
+CONFTEST_PREAMBLE="#include <linux/version.h>
|
||||
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
|
||||
+ #include <generated/autoconf.h>
|
||||
+ #else
|
||||
+ #include <linux/autoconf.h>
|
||||
+ #endif
|
||||
#if defined(CONFIG_XEN) && \
|
||||
defined(CONFIG_XEN_INTERFACE_VERSION) && !defined(__XEN_INTERFACE_VERSION__)
|
||||
#define __XEN_INTERFACE_VERSION__ CONFIG_XEN_INTERFACE_VERSION
|
||||
@@ -1294,7 +1299,7 @@
|
||||
echo "";
|
||||
fi
|
||||
fi
|
||||
- exit $RET
|
||||
+# exit $RET
|
||||
;;
|
||||
|
||||
get_uname)
|
||||
@@ -1316,11 +1321,11 @@
|
||||
# tree or at headers shipped for a specific kernel.
|
||||
# Determine the kernel version using a compile check.
|
||||
#
|
||||
- FILE="linux/utsrelease.h"
|
||||
+ FILE="generated/utsrelease.h"
|
||||
|
||||
if [ -f $HEADERS/$FILE -o -f $OUTPUT/include/$FILE ]; then
|
||||
echo "$CONFTEST_PREAMBLE
|
||||
- #include <linux/utsrelease.h>
|
||||
+ #include <generated/utsrelease.h>
|
||||
int main() {
|
||||
printf(\"%s\", UTS_RELEASE);
|
||||
return 0;
|
||||
@@ -1375,7 +1380,7 @@
|
||||
#
|
||||
RET=1
|
||||
VERBOSE=$6
|
||||
- FILE="linux/autoconf.h"
|
||||
+ FILE="generated/autoconf.h"
|
||||
|
||||
if [ -f $HEADERS/$FILE -o -f $OUTPUT/include/$FILE ]; then
|
||||
#
|
||||
@@ -1429,7 +1434,7 @@
|
||||
#
|
||||
RET=1
|
||||
VERBOSE=$6
|
||||
- FILE="linux/autoconf.h"
|
||||
+ FILE="generated/autoconf.h"
|
||||
|
||||
if [ -f $HEADERS/$FILE -o -f $OUTPUT/include/$FILE ]; then
|
||||
#
|
||||
Index: usr/src/nv/nvacpi.c
|
||||
===================================================================
|
||||
--- usr/src/nv/nvacpi.c
|
||||
+++ usr/src/nv/nvacpi.c 2010-01-06 12:10:56.000000000 +0530
|
||||
@@ -49,6 +49,10 @@
|
||||
};
|
||||
#endif
|
||||
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 33)
|
||||
+#define acpi_walk_namespace(a,b,c,d,e,f) acpi_walk_namespace(a,b,c,d,e,f,NULL)
|
||||
+#endif
|
||||
+
|
||||
static struct acpi_driver *nv_acpi_driver;
|
||||
static acpi_handle nvif_handle = NULL;
|
||||
static acpi_handle dsm_handle = NULL;
|
||||
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
the .config file is found in the output dir, not the source dir.
|
||||
search for it in the right place to fix kernels that are built
|
||||
via standard out-of-tree methods (KBUILD_OUTPUT).
|
||||
|
||||
--- a/kernel/conftest.sh
|
||||
+++ b/kernel/conftest.sh
|
||||
@@ -63,7 +63,7 @@ test_xen() {
|
||||
XEN_PRESENT=0
|
||||
fi
|
||||
else
|
||||
- CONFIG=$HEADERS/../.config
|
||||
+ CONFIG=$OUTPUT/.config
|
||||
if [ -f $CONFIG ]; then
|
||||
if [ -z "$(grep "^CONFIG_XEN=y" $CONFIG)" ]; then
|
||||
XEN_PRESENT="0"
|
||||
@@ -1688,7 +1688,7 @@ case "$6" in
|
||||
rm -f conftest.h
|
||||
else
|
||||
MAKEFILE=$HEADERS/../Makefile
|
||||
- CONFIG=$HEADERS/../.config
|
||||
+ CONFIG=$OUTPUT/.config
|
||||
|
||||
if [ -f $MAKEFILE -a -f $CONFIG ]; then
|
||||
#
|
||||
@@ -1857,7 +1857,7 @@ case "$6" in
|
||||
rm -f conftest$$.c conftest$$.o
|
||||
rm -f conftest.h
|
||||
else
|
||||
- CONFIG=$HEADERS/../.config
|
||||
+ CONFIG=$OUTPUT/.config
|
||||
if [ -f $CONFIG ]; then
|
||||
if [ -z "$(grep "^CONFIG_FB_RIVA=y" $CONFIG)" ]; then
|
||||
RET=0
|
||||
@@ -1923,7 +1923,7 @@ case "$6" in
|
||||
rm -f conftest$$.c conftest$$.o
|
||||
rm -f conftest.h
|
||||
else
|
||||
- CONFIG=$HEADERS/../.config
|
||||
+ CONFIG=$OUTPUT/.config
|
||||
if [ -f $CONFIG ]; then
|
||||
if [ -z "$(grep "^CONFIG_FB_NVIDIA=y" $CONFIG)" ]; then
|
||||
RET=0
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
the nvidia drivers are trying to test for version 2.6.6, but fail to take into
|
||||
account the first digit. so 3.7.0+ ends up failing the test.
|
||||
|
||||
https://bugs.gentoo.org/447566
|
||||
|
||||
--- a/kernel/conftest.sh
|
||||
+++ b/kernel/conftest.sh
|
||||
@@ -1697,13 +1697,15 @@
|
||||
# kernel older than 2.6.6, that's all we require to
|
||||
# build the module.
|
||||
#
|
||||
+ VERSION=$(grep "^VERSION =" $MAKEFILE | cut -d " " -f 3)
|
||||
PATCHLEVEL=$(grep "^PATCHLEVEL =" $MAKEFILE | cut -d " " -f 3)
|
||||
SUBLEVEL=$(grep "^SUBLEVEL =" $MAKEFILE | cut -d " " -f 3)
|
||||
|
||||
- if [ -n "$PATCHLEVEL" -a $PATCHLEVEL -ge 6 \
|
||||
+ if [ -n "$VERSION" -a $VERSION -ge 3 ] || \
|
||||
+ [ -n "$PATCHLEVEL" -a $PATCHLEVEL -ge 6 \
|
||||
-a -n "$SUBLEVEL" -a $SUBLEVEL -le 5 ]; then
|
||||
SELECTED_MAKEFILE=Makefile.kbuild
|
||||
RET=0
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
http://bugs.gentoo.org/447566
|
||||
|
||||
--- a/kernel/conftest.sh
|
||||
+++ b/kernel/conftest.sh
|
||||
@@ -160,6 +160,7 @@ build_cflags() {
|
||||
|
||||
if [ "$ARCH" = "i386" -o "$ARCH" = "x86_64" ]; then
|
||||
CFLAGS="$CFLAGS -I$SOURCES/arch/x86/include"
|
||||
+ CFLAGS="$CFLAGS -I$SOURCES/arch/x86/include/uapi"
|
||||
CFLAGS="$CFLAGS -I$OUTPUT/arch/x86/include/generated"
|
||||
CFLAGS="$CFLAGS -I$OUTPUT/arch/x86/include/generated/uapi"
|
||||
elif [ "$ARCH" = "arm" ]; then
|
||||
--
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
Binary files kernel.orig/.nv-procfs.c.swp and kernel/.nv-procfs.c.swp differ
|
||||
diff -urp kernel.orig/nv-procfs.c kernel/nv-procfs.c
|
||||
--- kernel.orig/nv-procfs.c 2011-07-13 03:29:30.000000000 +0200
|
||||
+++ kernel/nv-procfs.c 2011-07-19 15:45:27.982993911 +0200
|
||||
@@ -707,8 +707,10 @@ int nv_register_procfs(void)
|
||||
* However, in preparation for this, we need to preserve
|
||||
* the procfs read() and write() operations.
|
||||
*/
|
||||
- nv_procfs_registry_fops.read = entry->proc_fops->read;
|
||||
- nv_procfs_registry_fops.write = entry->proc_fops->write;
|
||||
+ pax_open_kernel();
|
||||
+ *(void **)&nv_procfs_registry_fops.read = entry->proc_fops->read;
|
||||
+ *(void **)&nv_procfs_registry_fops.write = entry->proc_fops->write;
|
||||
+ pax_close_kernel();
|
||||
|
||||
entry = NV_CREATE_PROC_FILE("registry", proc_nvidia,
|
||||
nv_procfs_read_registry,
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
diff -urp kernel.orig/nv.c kernel/nv.c
|
||||
--- kernel.orig/nv.c 2011-09-24 02:32:09.000000000 +0200
|
||||
+++ kernel/nv.c 2011-10-05 19:13:41.474242252 +0200
|
||||
@@ -1105,7 +1105,7 @@ static int __init nvidia_init_module(voi
|
||||
NV_SPIN_LOCK_INIT(&km_lock);
|
||||
#endif
|
||||
|
||||
- NV_KMEM_CACHE_CREATE(nv_stack_t_cache, "nv_stack_t", nv_stack_t);
|
||||
+ NV_KMEM_CACHE_CREATE(nv_stack_t_cache, "nv_stack_t", nv_stack_t, SLAB_USERCOPY);
|
||||
if (nv_stack_t_cache == NULL)
|
||||
{
|
||||
nv_printf(NV_DBG_ERRORS, "NVRM: stack cache allocation failed!\n");
|
||||
@@ -1220,7 +1220,7 @@ static int __init nvidia_init_module(voi
|
||||
}
|
||||
#endif
|
||||
|
||||
- NV_KMEM_CACHE_CREATE(nv_pte_t_cache, "nv_pte_t", nv_pte_t);
|
||||
+ NV_KMEM_CACHE_CREATE(nv_pte_t_cache, "nv_pte_t", nv_pte_t, 0);
|
||||
if (nv_pte_t_cache == NULL)
|
||||
{
|
||||
rc = -ENOMEM;
|
||||
@@ -1229,7 +1229,7 @@ static int __init nvidia_init_module(voi
|
||||
}
|
||||
|
||||
NV_KMEM_CACHE_CREATE(nvidia_p2p_page_t_cache, "nvidia_p2p_page_t",
|
||||
- nvidia_p2p_page_t);
|
||||
+ nvidia_p2p_page_t, 0);
|
||||
if (nvidia_p2p_page_t_cache == NULL)
|
||||
{
|
||||
rc = -ENOMEM;
|
||||
diff -urp kernel.orig/nv-linux.h kernel/nv-linux.h
|
||||
--- kernel.orig/nv-linux.h 2011-09-24 02:32:09.000000000 +0200
|
||||
+++ kernel/nv-linux.h 2011-10-05 19:14:42.522238996 +0200
|
||||
@@ -695,16 +695,16 @@ extern nv_spinlock_t km_lock;
|
||||
|
||||
#if defined(NV_KMEM_CACHE_CREATE_PRESENT)
|
||||
#if (NV_KMEM_CACHE_CREATE_ARGUMENT_COUNT == 6)
|
||||
-#define NV_KMEM_CACHE_CREATE(kmem_cache, name, type) \
|
||||
+#define NV_KMEM_CACHE_CREATE(kmem_cache, name, type, flags) \
|
||||
{ \
|
||||
kmem_cache = kmem_cache_create(name, sizeof(type), \
|
||||
- 0, 0, NULL, NULL); \
|
||||
+ 0, flags, NULL, NULL); \
|
||||
}
|
||||
#elif (NV_KMEM_CACHE_CREATE_ARGUMENT_COUNT == 5)
|
||||
-#define NV_KMEM_CACHE_CREATE(kmem_cache, name, type) \
|
||||
+#define NV_KMEM_CACHE_CREATE(kmem_cache, name, type, flags) \
|
||||
{ \
|
||||
kmem_cache = kmem_cache_create(name, sizeof(type), \
|
||||
- 0, 0, NULL); \
|
||||
+ 0, flags, NULL); \
|
||||
}
|
||||
#else
|
||||
#error "NV_KMEM_CACHE_CREATE_ARGUMENT_COUNT value unrecognized!"
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=NVIDIA X Server Settings
|
||||
Comment=Configure NVIDIA X Server Settings
|
||||
Exec=/opt/bin/nvidia-settings
|
||||
Icon=nvidia-drivers-settings
|
||||
Categories=System;Settings;
|
||||
25
x11-drivers/nvidia-drivers/files/nvidia-smi.init
Normal file
25
x11-drivers/nvidia-drivers/files/nvidia-smi.init
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
#!/sbin/runscript
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/files/nvidia-smi.init,v 1.1 2012/07/22 21:08:43 cardoe Exp $
|
||||
|
||||
pidfile="/var/run/nvidia-smi.pid"
|
||||
|
||||
depend() {
|
||||
after modules
|
||||
}
|
||||
|
||||
start() {
|
||||
ebegin "Starting NVIDIA System Management Interface"
|
||||
rm -f ${pidfile}
|
||||
start-stop-daemon --start --quiet --pidfile ${pidfile} \
|
||||
--make-pidfile --background --exec /opt/bin/nvidia-smi -- \
|
||||
-q -l 300
|
||||
eend $?
|
||||
}
|
||||
|
||||
stop() {
|
||||
ebegin "Stopping NVIDIA System Management Interface"
|
||||
start-stop-daemon --stop --quiet --pidfile ${pidfile}
|
||||
eend $?
|
||||
}
|
||||
17
x11-drivers/nvidia-drivers/files/nvidia-udev.sh
Normal file
17
x11-drivers/nvidia-drivers/files/nvidia-udev.sh
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ $# -ne 1 ]; then
|
||||
echo "Invalid args" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case $1 in
|
||||
add|ADD)
|
||||
/opt/bin/nvidia-smi > /dev/null
|
||||
;;
|
||||
remove|REMOVE)
|
||||
rm -f /dev/nvidia*
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
6
x11-drivers/nvidia-drivers/files/nvidia.udev-rule
Normal file
6
x11-drivers/nvidia-drivers/files/nvidia.udev-rule
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
ACTION=="add", DEVPATH=="/module/nvidia", SUBSYSTEM=="module", RUN+="nvidia-udev.sh $env{ACTION}"
|
||||
# Previously the ACTION was "add|remove" but one user on bug #376527 had a
|
||||
# problem until he recompiled udev-171-r5, which is one of the versions I
|
||||
# tested with and it was fine. I'm breaking the rules out just to be safe
|
||||
# so someone else doesn't have an issue
|
||||
ACTION=="remove", DEVPATH=="/module/nvidia", SUBSYSTEM=="module", RUN+="nvidia-udev.sh $env{ACTION}"
|
||||
455
x11-drivers/nvidia-drivers/nvidia-drivers-304.64.ebuild
Normal file
455
x11-drivers/nvidia-drivers/nvidia-drivers-304.64.ebuild
Normal file
|
|
@ -0,0 +1,455 @@
|
|||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/nvidia-drivers-304.64.ebuild,v 1.6 2013/03/02 16:07:11 cardoe Exp $
|
||||
|
||||
EAPI=4
|
||||
|
||||
inherit eutils flag-o-matic linux-info linux-mod multilib nvidia-driver \
|
||||
portability toolchain-funcs unpacker user versionator udev
|
||||
|
||||
X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}"
|
||||
AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}"
|
||||
X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}"
|
||||
AMD64_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86_64-${PV}"
|
||||
|
||||
DESCRIPTION="NVIDIA X11 driver and GLX libraries"
|
||||
HOMEPAGE="http://www.nvidia.com/"
|
||||
SRC_URI="x86? ( ftp://download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}.run )
|
||||
amd64? ( ftp://download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run )
|
||||
amd64-fbsd? ( ftp://download.nvidia.com/XFree86/FreeBSD-x86_64/${PV}/${AMD64_FBSD_NV_PACKAGE}.tar.gz )
|
||||
x86-fbsd? ( ftp://download.nvidia.com/XFree86/FreeBSD-x86/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )"
|
||||
|
||||
LICENSE="NVIDIA"
|
||||
SLOT="0"
|
||||
KEYWORDS="-* amd64 x86 ~amd64-fbsd ~x86-fbsd"
|
||||
IUSE="acpi multilib kernel_FreeBSD kernel_linux pax_kernel +tools +X"
|
||||
RESTRICT="strip"
|
||||
EMULTILIB_PKG="true"
|
||||
|
||||
COMMON="app-admin/eselect-opencl
|
||||
kernel_linux? ( >=sys-libs/glibc-2.6.1 )
|
||||
multilib? ( app-emulation/emul-linux-x86-xlibs )
|
||||
X? (
|
||||
<x11-base/xorg-server-1.13.99
|
||||
>=app-admin/eselect-opengl-1.0.9
|
||||
)"
|
||||
DEPEND="${COMMON}
|
||||
kernel_linux? (
|
||||
virtual/linux-sources
|
||||
virtual/pkgconfig
|
||||
)"
|
||||
RDEPEND="${COMMON}
|
||||
acpi? ( sys-power/acpid )
|
||||
tools? (
|
||||
dev-libs/atk
|
||||
dev-libs/glib
|
||||
x11-libs/gdk-pixbuf
|
||||
x11-libs/gtk+:2
|
||||
x11-libs/libX11
|
||||
x11-libs/libXext
|
||||
x11-libs/pango[X]
|
||||
|| ( x11-libs/pangox-compat <x11-libs/pango-1.31[X] )
|
||||
)
|
||||
X? ( x11-libs/libXvMC )"
|
||||
PDEPEND="X? ( >=x11-libs/libvdpau-0.3-r1 )"
|
||||
|
||||
REQUIRED_USE="tools? ( X )"
|
||||
|
||||
QA_PREBUILT="opt/* usr/lib*"
|
||||
|
||||
S=${WORKDIR}/
|
||||
|
||||
pkg_pretend() {
|
||||
|
||||
if use amd64 && has_multilib_profile && \
|
||||
[ "${DEFAULT_ABI}" != "amd64" ]; then
|
||||
eerror "This ebuild doesn't currently support changing your default ABI"
|
||||
die "Unexpected \${DEFAULT_ABI} = ${DEFAULT_ABI}"
|
||||
fi
|
||||
|
||||
# Kernel features/options to check for
|
||||
CONFIG_CHECK="~ZONE_DMA ~MTRR ~SYSVIPC ~!LOCKDEP"
|
||||
use x86 && CONFIG_CHECK+=" ~HIGHMEM"
|
||||
|
||||
# Now do the above checks
|
||||
use kernel_linux && check_extra_config
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
# try to turn off distcc and ccache for people that have a problem with it
|
||||
export DISTCC_DISABLE=1
|
||||
export CCACHE_DISABLE=1
|
||||
|
||||
if use kernel_linux; then
|
||||
linux-mod_pkg_setup
|
||||
MODULE_NAMES="nvidia(video:${S}/kernel)"
|
||||
BUILD_PARAMS="IGNORE_CC_MISMATCH=yes V=1 SYSSRC=${KV_DIR} \
|
||||
SYSOUT=${KV_OUT_DIR} CC=$(tc-getBUILD_CC)"
|
||||
# linux-mod_src_compile calls set_arch_to_kernel, which
|
||||
# sets the ARCH to x86 but NVIDIA's wrapping Makefile
|
||||
# expects x86_64 or i386 and then converts it to x86
|
||||
# later on in the build process
|
||||
BUILD_FIXES="ARCH=$(uname -m | sed -e 's/i.86/i386/')"
|
||||
fi
|
||||
|
||||
if use kernel_linux && kernel_is ge 3 7 ; then
|
||||
ewarn "Gentoo supports kernel's which are supported by NVIDIA"
|
||||
ewarn "which are limited to the following kernels:"
|
||||
ewarn "<sys-kernel/gentoo-sources-3.7"
|
||||
ewarn "<sys-kernel/vanilla-sources-3.7"
|
||||
ewarn ""
|
||||
ewarn "You are free to utilize epatch_user to provide whatever"
|
||||
ewarn "support you feel is appropriate, but will not receive"
|
||||
ewarn "support as a result of those changes."
|
||||
fi
|
||||
|
||||
# Since Nvidia ships 3 different series of drivers, we need to give the user
|
||||
# some kind of guidance as to what version they should install. This tries
|
||||
# to point the user in the right direction but can't be perfect. check
|
||||
# nvidia-driver.eclass
|
||||
nvidia-driver-check-warning
|
||||
|
||||
# set variables to where files are in the package structure
|
||||
if use kernel_FreeBSD; then
|
||||
use x86-fbsd && S="${WORKDIR}/${X86_FBSD_NV_PACKAGE}"
|
||||
use amd64-fbsd && S="${WORKDIR}/${AMD64_FBSD_NV_PACKAGE}"
|
||||
NV_DOC="${S}/doc"
|
||||
NV_OBJ="${S}/obj"
|
||||
NV_SRC="${S}/src"
|
||||
NV_MAN="${S}/x11/man"
|
||||
NV_X11="${S}/obj"
|
||||
NV_SOVER=1
|
||||
elif use kernel_linux; then
|
||||
NV_DOC="${S}"
|
||||
NV_OBJ="${S}"
|
||||
NV_SRC="${S}/kernel"
|
||||
NV_MAN="${S}"
|
||||
NV_X11="${S}"
|
||||
NV_SOVER=${PV}
|
||||
else
|
||||
die "Could not determine proper NVIDIA package"
|
||||
fi
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
if ! use kernel_FreeBSD; then
|
||||
cd "${S}"
|
||||
unpack_makeself
|
||||
else
|
||||
unpack ${A}
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Please add a brief description for every added patch
|
||||
|
||||
if use kernel_linux; then
|
||||
if kernel_is lt 2 6 9 ; then
|
||||
eerror "You must build this against 2.6.9 or higher kernels."
|
||||
fi
|
||||
|
||||
# If greater than 2.6.5 use M= instead of SUBDIR=
|
||||
convert_to_m "${NV_SRC}"/Makefile.kbuild
|
||||
fi
|
||||
|
||||
if use pax_kernel; then
|
||||
ewarn "Using PAX patches is not supported. You will be asked to"
|
||||
ewarn "use a standard kernel should you have issues. Should you"
|
||||
ewarn "need support with these patches, contact the PaX team."
|
||||
epatch "${FILESDIR}"/nvidia-drivers-pax-const.patch
|
||||
epatch "${FILESDIR}"/nvidia-drivers-pax-usercopy.patch
|
||||
fi
|
||||
|
||||
cat <<- EOF > "${S}"/nvidia.icd
|
||||
/usr/$(get_libdir)/libnvidia-opencl.so
|
||||
EOF
|
||||
|
||||
# Allow user patches so they can support RC kernels and whatever else
|
||||
epatch_user
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# This is already the default on Linux, as there's no toplevel Makefile, but
|
||||
# on FreeBSD there's one and triggers the kernel module build, as we install
|
||||
# it by itself, pass this.
|
||||
|
||||
cd "${NV_SRC}"
|
||||
if use kernel_FreeBSD; then
|
||||
MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \
|
||||
LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die
|
||||
elif use kernel_linux; then
|
||||
linux-mod_src_compile
|
||||
fi
|
||||
}
|
||||
|
||||
# Install nvidia library:
|
||||
# the first parameter is the library to install
|
||||
# the second parameter is the provided soversion
|
||||
# the third parameter is the target directory if its not /usr/lib
|
||||
donvidia() {
|
||||
# Full path to library minus SOVER
|
||||
MY_LIB="$1"
|
||||
|
||||
# SOVER to use
|
||||
MY_SOVER="$2"
|
||||
|
||||
# Where to install
|
||||
MY_DEST="$3"
|
||||
|
||||
if [[ -z "${MY_DEST}" ]]; then
|
||||
MY_DEST="/usr/$(get_libdir)"
|
||||
action="dolib.so"
|
||||
else
|
||||
exeinto ${MY_DEST}
|
||||
action="doexe"
|
||||
fi
|
||||
|
||||
# Get just the library name
|
||||
libname=$(basename $1)
|
||||
|
||||
# Install the library with the correct SOVER
|
||||
${action} ${MY_LIB}.${MY_SOVER} || \
|
||||
die "failed to install ${libname}"
|
||||
|
||||
# If SOVER wasn't 1, then we need to create a .1 symlink
|
||||
if [[ "${MY_SOVER}" != "1" ]]; then
|
||||
dosym ${libname}.${MY_SOVER} \
|
||||
${MY_DEST}/${libname}.1 || \
|
||||
die "failed to create ${libname} symlink"
|
||||
fi
|
||||
|
||||
# Always create the symlink from the raw lib to the .1
|
||||
dosym ${libname}.1 \
|
||||
${MY_DEST}/${libname} || \
|
||||
die "failed to create ${libname} symlink"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
if use kernel_linux; then
|
||||
linux-mod_src_install
|
||||
|
||||
VIDEOGROUP="$(egetent group video | cut -d ':' -f 3)"
|
||||
if [ -z "$VIDEOGROUP" ]; then
|
||||
eerror "Failed to determine the video group gid."
|
||||
die "Failed to determine the video group gid."
|
||||
fi
|
||||
|
||||
# Add the aliases
|
||||
[ -f "${FILESDIR}/nvidia-169.07" ] || die "nvidia missing in FILESDIR"
|
||||
sed -e 's:PACKAGE:'${PF}':g' \
|
||||
-e 's:VIDEOGID:'${VIDEOGROUP}':' "${FILESDIR}"/nvidia-169.07 > \
|
||||
"${WORKDIR}"/nvidia
|
||||
insinto /etc/modprobe.d
|
||||
newins "${WORKDIR}"/nvidia nvidia.conf || die
|
||||
|
||||
# Ensures that our device nodes are created when not using X
|
||||
exeinto "$(udev_get_udevdir)"
|
||||
doexe "${FILESDIR}"/nvidia-udev.sh
|
||||
udev_newrules "${FILESDIR}"/nvidia.udev-rule 99-nvidia.rules
|
||||
|
||||
elif use kernel_FreeBSD; then
|
||||
if use x86-fbsd; then
|
||||
insinto /boot/modules
|
||||
doins "${S}/src/nvidia.kld" || die
|
||||
fi
|
||||
|
||||
exeinto /boot/modules
|
||||
doexe "${S}/src/nvidia.ko" || die
|
||||
fi
|
||||
|
||||
# NVIDIA kernel <-> userspace driver config lib
|
||||
donvidia ${NV_OBJ}/libnvidia-cfg.so ${NV_SOVER}
|
||||
|
||||
if use kernel_linux; then
|
||||
# NVIDIA video decode <-> CUDA
|
||||
donvidia ${NV_OBJ}/libnvcuvid.so ${NV_SOVER}
|
||||
fi
|
||||
|
||||
if use X; then
|
||||
# Xorg DDX driver
|
||||
insinto /usr/$(get_libdir)/xorg/modules/drivers
|
||||
doins ${NV_X11}/nvidia_drv.so || die "failed to install nvidia_drv.so"
|
||||
|
||||
# Xorg GLX driver
|
||||
donvidia ${NV_X11}/libglx.so ${NV_SOVER} \
|
||||
/usr/$(get_libdir)/opengl/nvidia/extensions
|
||||
|
||||
# XvMC driver
|
||||
dolib.a ${NV_X11}/libXvMCNVIDIA.a || \
|
||||
die "failed to install libXvMCNVIDIA.so"
|
||||
donvidia ${NV_X11}/libXvMCNVIDIA.so ${NV_SOVER}
|
||||
dosym libXvMCNVIDIA.so.${NV_SOVER} \
|
||||
/usr/$(get_libdir)/libXvMCNVIDIA_dynamic.so.1 || \
|
||||
die "failed to create libXvMCNVIDIA_dynamic.so symlink"
|
||||
fi
|
||||
|
||||
# OpenCL ICD for NVIDIA
|
||||
if use kernel_linux; then
|
||||
insinto /etc/OpenCL/vendors
|
||||
doins nvidia.icd
|
||||
donvidia ${NV_OBJ}/libnvidia-opencl.so ${NV_SOVER}
|
||||
fi
|
||||
|
||||
# Documentation
|
||||
dohtml ${NV_DOC}/html/*
|
||||
if use kernel_FreeBSD; then
|
||||
dodoc "${NV_DOC}/README"
|
||||
use X && doman "${NV_MAN}/nvidia-xconfig.1"
|
||||
use tools && doman "${NV_MAN}/nvidia-settings.1"
|
||||
else
|
||||
# Docs
|
||||
newdoc "${NV_DOC}/README.txt" README
|
||||
dodoc "${NV_DOC}/NVIDIA_Changelog"
|
||||
doman "${NV_MAN}/nvidia-smi.1.gz"
|
||||
use X && doman "${NV_MAN}/nvidia-xconfig.1.gz"
|
||||
use tools && doman "${NV_MAN}/nvidia-settings.1.gz"
|
||||
doman "${NV_MAN}/nvidia-cuda-proxy-control.1.gz"
|
||||
fi
|
||||
|
||||
# Helper Apps
|
||||
exeinto /opt/bin/
|
||||
|
||||
if use X; then
|
||||
doexe ${NV_OBJ}/nvidia-xconfig || die
|
||||
fi
|
||||
|
||||
if use kernel_linux ; then
|
||||
doexe ${NV_OBJ}/nvidia-debugdump || die
|
||||
doexe ${NV_OBJ}/nvidia-cuda-proxy-control || die
|
||||
doexe ${NV_OBJ}/nvidia-cuda-proxy-server || die
|
||||
doexe ${NV_OBJ}/nvidia-smi || die
|
||||
newinitd "${FILESDIR}/nvidia-smi.init" nvidia-smi
|
||||
fi
|
||||
|
||||
if use tools; then
|
||||
doexe ${NV_OBJ}/nvidia-settings || die
|
||||
fi
|
||||
|
||||
exeinto /usr/bin/
|
||||
doexe ${NV_OBJ}/nvidia-bug-report.sh || die
|
||||
|
||||
# Desktop entries for nvidia-settings
|
||||
if use tools ; then
|
||||
# There is no icon in the FreeBSD tarball.
|
||||
use kernel_FreeBSD || newicon ${NV_OBJ}/nvidia-settings.png nvidia-drivers-settings.png
|
||||
domenu "${FILESDIR}"/nvidia-drivers-settings.desktop
|
||||
exeinto /etc/X11/xinit/xinitrc.d
|
||||
doexe "${FILESDIR}"/95-nvidia-settings
|
||||
fi
|
||||
|
||||
#doenvd "${FILESDIR}"/50nvidia-prelink-blacklist
|
||||
|
||||
if has_multilib_profile && use multilib ; then
|
||||
local OABI=${ABI}
|
||||
for ABI in $(get_install_abis) ; do
|
||||
src_install-libs
|
||||
done
|
||||
ABI=${OABI}
|
||||
unset OABI
|
||||
else
|
||||
src_install-libs
|
||||
fi
|
||||
|
||||
is_final_abi || die "failed to iterate through all ABIs"
|
||||
}
|
||||
|
||||
src_install-libs() {
|
||||
local inslibdir=$(get_libdir)
|
||||
local GL_ROOT="/usr/$(get_libdir)/opengl/nvidia/lib"
|
||||
local CL_ROOT="/usr/$(get_libdir)/OpenCL/vendors/nvidia"
|
||||
local libdir=${NV_OBJ}
|
||||
|
||||
if use kernel_linux && has_multilib_profile && \
|
||||
[[ ${ABI} == "x86" ]] ; then
|
||||
libdir=${NV_OBJ}/32
|
||||
fi
|
||||
|
||||
if use X; then
|
||||
# The GLX libraries
|
||||
donvidia ${libdir}/libGL.so ${NV_SOVER} ${GL_ROOT}
|
||||
donvidia ${libdir}/libnvidia-glcore.so ${NV_SOVER}
|
||||
if use kernel_FreeBSD; then
|
||||
donvidia ${libdir}/libnvidia-tls.so ${NV_SOVER} ${GL_ROOT}
|
||||
else
|
||||
donvidia ${libdir}/tls/libnvidia-tls.so ${NV_SOVER} ${GL_ROOT}
|
||||
fi
|
||||
|
||||
# VDPAU
|
||||
donvidia ${libdir}/libvdpau_nvidia.so ${NV_SOVER}
|
||||
fi
|
||||
|
||||
# NVIDIA monitoring library
|
||||
if use kernel_linux ; then
|
||||
donvidia ${libdir}/libnvidia-ml.so ${NV_SOVER}
|
||||
fi
|
||||
|
||||
# CUDA & OpenCL
|
||||
if use kernel_linux; then
|
||||
donvidia ${libdir}/libcuda.so ${NV_SOVER}
|
||||
donvidia ${libdir}/libnvidia-compiler.so ${NV_SOVER}
|
||||
donvidia ${libdir}/libOpenCL.so 1.0.0 ${CL_ROOT}
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
use kernel_linux && linux-mod_pkg_preinst
|
||||
|
||||
# Clean the dynamic libGL stuff's home to ensure
|
||||
# we dont have stale libs floating around
|
||||
if [ -d "${ROOT}"/usr/lib/opengl/nvidia ] ; then
|
||||
rm -rf "${ROOT}"/usr/lib/opengl/nvidia/*
|
||||
fi
|
||||
# Make sure we nuke the old nvidia-glx's env.d file
|
||||
if [ -e "${ROOT}"/etc/env.d/09nvidia ] ; then
|
||||
rm -f "${ROOT}"/etc/env.d/09nvidia
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
use kernel_linux && linux-mod_pkg_postinst
|
||||
|
||||
# Switch to the nvidia implementation
|
||||
use X && "${ROOT}"/usr/bin/eselect opengl set --use-old nvidia
|
||||
"${ROOT}"/usr/bin/eselect opencl set --use-old nvidia
|
||||
|
||||
elog "You must be in the video group to use the NVIDIA device"
|
||||
elog "For more info, read the docs at"
|
||||
elog "http://www.gentoo.org/doc/en/nvidia-guide.xml#doc_chap3_sect6"
|
||||
elog
|
||||
elog "This ebuild installs a kernel module and X driver. Both must"
|
||||
elog "match explicitly in their version. This means, if you restart"
|
||||
elog "X, you must modprobe -r nvidia before starting it back up"
|
||||
elog
|
||||
elog "To use the NVIDIA GLX, run \"eselect opengl set nvidia\""
|
||||
elog
|
||||
elog "To use the NVIDIA CUDA/OpenCL, run \"eselect opencl set nvidia\""
|
||||
elog
|
||||
elog "NVIDIA has requested that any bug reports submitted have the"
|
||||
elog "output of /opt/bin/nvidia-bug-report.sh included."
|
||||
elog
|
||||
if ! use X; then
|
||||
elog "You have elected to not install the X.org driver. Along with"
|
||||
elog "this the OpenGL libraries, XvMC, and VDPAU libraries were not"
|
||||
elog "installed. Additionally, once the driver is loaded your card"
|
||||
elog "and fan will run at max speed which may not be desirable."
|
||||
elog "Use the 'nvidia-smi' init script to have your card and fan"
|
||||
elog "speed scale appropriately."
|
||||
elog
|
||||
fi
|
||||
if ! use tools; then
|
||||
elog "USE=tools controls whether the nvidia-settings application"
|
||||
elog "is installed. If you would like to use it, enable that"
|
||||
elog "flag and re-emerge this ebuild. Optionally you can install"
|
||||
elog "media-video/nvidia-settings"
|
||||
elog
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_prerm() {
|
||||
use X && "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
use kernel_linux && linux-mod_pkg_postrm
|
||||
use X && "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11
|
||||
}
|
||||
442
x11-drivers/nvidia-drivers/nvidia-drivers-310.32.ebuild
Normal file
442
x11-drivers/nvidia-drivers/nvidia-drivers-310.32.ebuild
Normal file
|
|
@ -0,0 +1,442 @@
|
|||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/nvidia-drivers-310.32.ebuild,v 1.5 2013/03/02 16:07:11 cardoe Exp $
|
||||
|
||||
EAPI=4
|
||||
|
||||
inherit eutils flag-o-matic linux-info linux-mod multilib nvidia-driver \
|
||||
portability toolchain-funcs unpacker user udev
|
||||
|
||||
X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}"
|
||||
AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}"
|
||||
X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}"
|
||||
AMD64_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86_64-${PV}"
|
||||
|
||||
DESCRIPTION="NVIDIA X11 driver and GLX libraries"
|
||||
HOMEPAGE="http://www.nvidia.com/"
|
||||
SRC_URI="x86? ( ftp://download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}.run )
|
||||
amd64? ( ftp://download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run )
|
||||
amd64-fbsd? ( ftp://download.nvidia.com/XFree86/FreeBSD-x86_64/${PV}/${AMD64_FBSD_NV_PACKAGE}.tar.gz )
|
||||
x86-fbsd? ( ftp://download.nvidia.com/XFree86/FreeBSD-x86/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )"
|
||||
|
||||
LICENSE="NVIDIA"
|
||||
SLOT="0"
|
||||
KEYWORDS="-* amd64 x86 ~amd64-fbsd ~x86-fbsd"
|
||||
IUSE="acpi multilib kernel_FreeBSD kernel_linux pax_kernel +tools +X"
|
||||
RESTRICT="strip"
|
||||
EMULTILIB_PKG="true"
|
||||
|
||||
COMMON="app-admin/eselect-opencl
|
||||
kernel_linux? ( >=sys-libs/glibc-2.6.1 )
|
||||
multilib? ( app-emulation/emul-linux-x86-xlibs )
|
||||
X? (
|
||||
<x11-base/xorg-server-1.14.99
|
||||
>=app-admin/eselect-opengl-1.0.9
|
||||
)"
|
||||
DEPEND="${COMMON}
|
||||
kernel_linux? (
|
||||
virtual/linux-sources
|
||||
)"
|
||||
RDEPEND="${COMMON}
|
||||
acpi? ( sys-power/acpid )
|
||||
tools? (
|
||||
dev-libs/atk
|
||||
dev-libs/glib
|
||||
x11-libs/gdk-pixbuf
|
||||
x11-libs/gtk+:2
|
||||
x11-libs/libX11
|
||||
x11-libs/libXext
|
||||
x11-libs/pango[X]
|
||||
|| ( x11-libs/pangox-compat <x11-libs/pango-1.31[X] )
|
||||
)
|
||||
X? ( >=x11-libs/libvdpau-0.3-r1 )"
|
||||
|
||||
REQUIRED_USE="tools? ( X )"
|
||||
|
||||
QA_PREBUILT="opt/* usr/lib*"
|
||||
|
||||
S=${WORKDIR}/
|
||||
|
||||
pkg_pretend() {
|
||||
|
||||
if use amd64 && has_multilib_profile && \
|
||||
[ "${DEFAULT_ABI}" != "amd64" ]; then
|
||||
eerror "This ebuild doesn't currently support changing your default ABI"
|
||||
die "Unexpected \${DEFAULT_ABI} = ${DEFAULT_ABI}"
|
||||
fi
|
||||
|
||||
if use kernel_linux && kernel_is ge 3 7 ; then
|
||||
ewarn "Gentoo supports kernel's which are supported by NVIDIA"
|
||||
ewarn "which are limited to the following kernels:"
|
||||
ewarn "<sys-kernel/gentoo-sources-3.7"
|
||||
ewarn "<sys-kernel/vanilla-sources-3.7"
|
||||
ewarn ""
|
||||
ewarn "You are free to utilize epatch_user to provide whatever"
|
||||
ewarn "support you feel is appropriate, but will not receive"
|
||||
ewarn "support as a result of those changes."
|
||||
fi
|
||||
|
||||
# Since Nvidia ships 3 different series of drivers, we need to give the user
|
||||
# some kind of guidance as to what version they should install. This tries
|
||||
# to point the user in the right direction but can't be perfect. check
|
||||
# nvidia-driver.eclass
|
||||
nvidia-driver-check-warning
|
||||
|
||||
# Kernel features/options to check for
|
||||
CONFIG_CHECK="~ZONE_DMA ~MTRR ~SYSVIPC ~!LOCKDEP"
|
||||
use x86 && CONFIG_CHECK+=" ~HIGHMEM"
|
||||
|
||||
# Now do the above checks
|
||||
use kernel_linux && check_extra_config
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
# try to turn off distcc and ccache for people that have a problem with it
|
||||
export DISTCC_DISABLE=1
|
||||
export CCACHE_DISABLE=1
|
||||
|
||||
if use kernel_linux; then
|
||||
linux-mod_pkg_setup
|
||||
MODULE_NAMES="nvidia(video:${S}/kernel)"
|
||||
BUILD_PARAMS="IGNORE_CC_MISMATCH=yes V=1 SYSSRC=${KV_DIR} \
|
||||
SYSOUT=${KV_OUT_DIR} CC=$(tc-getBUILD_CC)"
|
||||
# linux-mod_src_compile calls set_arch_to_kernel, which
|
||||
# sets the ARCH to x86 but NVIDIA's wrapping Makefile
|
||||
# expects x86_64 or i386 and then converts it to x86
|
||||
# later on in the build process
|
||||
BUILD_FIXES="ARCH=$(uname -m | sed -e 's/i.86/i386/')"
|
||||
fi
|
||||
|
||||
# set variables to where files are in the package structure
|
||||
if use kernel_FreeBSD; then
|
||||
use x86-fbsd && S="${WORKDIR}/${X86_FBSD_NV_PACKAGE}"
|
||||
use amd64-fbsd && S="${WORKDIR}/${AMD64_FBSD_NV_PACKAGE}"
|
||||
NV_DOC="${S}/doc"
|
||||
NV_OBJ="${S}/obj"
|
||||
NV_SRC="${S}/src"
|
||||
NV_MAN="${S}/x11/man"
|
||||
NV_X11="${S}/obj"
|
||||
NV_SOVER=1
|
||||
elif use kernel_linux; then
|
||||
NV_DOC="${S}"
|
||||
NV_OBJ="${S}"
|
||||
NV_SRC="${S}/kernel"
|
||||
NV_MAN="${S}"
|
||||
NV_X11="${S}"
|
||||
NV_SOVER=${PV}
|
||||
else
|
||||
die "Could not determine proper NVIDIA package"
|
||||
fi
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
if ! use kernel_FreeBSD; then
|
||||
cd "${S}"
|
||||
unpack_makeself
|
||||
else
|
||||
unpack ${A}
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Please add a brief description for every added patch
|
||||
|
||||
if use kernel_linux; then
|
||||
if kernel_is lt 2 6 9 ; then
|
||||
eerror "You must build this against 2.6.9 or higher kernels."
|
||||
fi
|
||||
|
||||
# If greater than 2.6.5 use M= instead of SUBDIR=
|
||||
convert_to_m "${NV_SRC}"/Makefile.kbuild
|
||||
fi
|
||||
|
||||
if use pax_kernel; then
|
||||
ewarn "Using PAX patches is not supported. You will be asked to"
|
||||
ewarn "use a standard kernel should you have issues. Should you"
|
||||
ewarn "need support with these patches, contact the PaX team."
|
||||
epatch "${FILESDIR}"/nvidia-drivers-pax-const.patch
|
||||
epatch "${FILESDIR}"/nvidia-drivers-pax-usercopy.patch
|
||||
fi
|
||||
|
||||
# Allow user patches so they can support RC kernels and whatever else
|
||||
epatch_user
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# This is already the default on Linux, as there's no toplevel Makefile, but
|
||||
# on FreeBSD there's one and triggers the kernel module build, as we install
|
||||
# it by itself, pass this.
|
||||
|
||||
cd "${NV_SRC}"
|
||||
if use kernel_FreeBSD; then
|
||||
MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \
|
||||
LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die
|
||||
elif use kernel_linux; then
|
||||
linux-mod_src_compile
|
||||
fi
|
||||
}
|
||||
|
||||
# Install nvidia library:
|
||||
# the first parameter is the library to install
|
||||
# the second parameter is the provided soversion
|
||||
# the third parameter is the target directory if its not /usr/lib
|
||||
donvidia() {
|
||||
# Full path to library minus SOVER
|
||||
MY_LIB="$1"
|
||||
|
||||
# SOVER to use
|
||||
MY_SOVER="$2"
|
||||
|
||||
# Where to install
|
||||
MY_DEST="$3"
|
||||
|
||||
if [[ -z "${MY_DEST}" ]]; then
|
||||
MY_DEST="/usr/$(get_libdir)"
|
||||
action="dolib.so"
|
||||
else
|
||||
exeinto ${MY_DEST}
|
||||
action="doexe"
|
||||
fi
|
||||
|
||||
# Get just the library name
|
||||
libname=$(basename $1)
|
||||
|
||||
# Install the library with the correct SOVER
|
||||
${action} ${MY_LIB}.${MY_SOVER} || \
|
||||
die "failed to install ${libname}"
|
||||
|
||||
# If SOVER wasn't 1, then we need to create a .1 symlink
|
||||
if [[ "${MY_SOVER}" != "1" ]]; then
|
||||
dosym ${libname}.${MY_SOVER} \
|
||||
${MY_DEST}/${libname}.1 || \
|
||||
die "failed to create ${libname} symlink"
|
||||
fi
|
||||
|
||||
# Always create the symlink from the raw lib to the .1
|
||||
dosym ${libname}.1 \
|
||||
${MY_DEST}/${libname} || \
|
||||
die "failed to create ${libname} symlink"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
if use kernel_linux; then
|
||||
linux-mod_src_install
|
||||
|
||||
VIDEOGROUP="$(egetent group video | cut -d ':' -f 3)"
|
||||
if [ -z "$VIDEOGROUP" ]; then
|
||||
eerror "Failed to determine the video group gid."
|
||||
die "Failed to determine the video group gid."
|
||||
fi
|
||||
|
||||
# Add the aliases
|
||||
[ -f "${FILESDIR}/nvidia-169.07" ] || die "nvidia missing in FILESDIR"
|
||||
sed -e 's:PACKAGE:'${PF}':g' \
|
||||
-e 's:VIDEOGID:'${VIDEOGROUP}':' "${FILESDIR}"/nvidia-169.07 > \
|
||||
"${WORKDIR}"/nvidia
|
||||
insinto /etc/modprobe.d
|
||||
newins "${WORKDIR}"/nvidia nvidia.conf || die
|
||||
|
||||
# Ensures that our device nodes are created when not using X
|
||||
exeinto "$(udev_get_udevdir)"
|
||||
doexe "${FILESDIR}"/nvidia-udev.sh
|
||||
udev_newrules "${FILESDIR}"/nvidia.udev-rule 99-nvidia.rules
|
||||
|
||||
elif use kernel_FreeBSD; then
|
||||
if use x86-fbsd; then
|
||||
insinto /boot/modules
|
||||
doins "${S}/src/nvidia.kld" || die
|
||||
fi
|
||||
|
||||
exeinto /boot/modules
|
||||
doexe "${S}/src/nvidia.ko" || die
|
||||
fi
|
||||
|
||||
# NVIDIA kernel <-> userspace driver config lib
|
||||
donvidia ${NV_OBJ}/libnvidia-cfg.so ${NV_SOVER}
|
||||
|
||||
# NVIDIA video encode/decode <-> CUDA
|
||||
if use kernel_linux; then
|
||||
donvidia ${NV_OBJ}/libnvcuvid.so ${NV_SOVER}
|
||||
donvidia ${NV_OBJ}/libnvidia-encode.so ${NV_SOVER}
|
||||
fi
|
||||
|
||||
if use X; then
|
||||
# Xorg DDX driver
|
||||
insinto /usr/$(get_libdir)/xorg/modules/drivers
|
||||
doins ${NV_X11}/nvidia_drv.so || die "failed to install nvidia_drv.so"
|
||||
|
||||
# Xorg GLX driver
|
||||
donvidia ${NV_X11}/libglx.so ${NV_SOVER} \
|
||||
/usr/$(get_libdir)/opengl/nvidia/extensions
|
||||
fi
|
||||
|
||||
# OpenCL ICD for NVIDIA
|
||||
if use kernel_linux; then
|
||||
insinto /etc/OpenCL/vendors
|
||||
doins ${NV_OBJ}/nvidia.icd
|
||||
fi
|
||||
|
||||
# Documentation
|
||||
dohtml ${NV_DOC}/html/*
|
||||
if use kernel_FreeBSD; then
|
||||
dodoc "${NV_DOC}/README"
|
||||
use X && doman "${NV_MAN}/nvidia-xconfig.1"
|
||||
use tools && doman "${NV_MAN}/nvidia-settings.1"
|
||||
else
|
||||
# Docs
|
||||
newdoc "${NV_DOC}/README.txt" README
|
||||
dodoc "${NV_DOC}/NVIDIA_Changelog"
|
||||
doman "${NV_MAN}/nvidia-smi.1.gz"
|
||||
use X && doman "${NV_MAN}/nvidia-xconfig.1.gz"
|
||||
use tools && doman "${NV_MAN}/nvidia-settings.1.gz"
|
||||
doman "${NV_MAN}/nvidia-cuda-proxy-control.1.gz"
|
||||
fi
|
||||
|
||||
# Helper Apps
|
||||
exeinto /opt/bin/
|
||||
|
||||
if use X; then
|
||||
doexe ${NV_OBJ}/nvidia-xconfig || die
|
||||
fi
|
||||
|
||||
if use kernel_linux ; then
|
||||
doexe ${NV_OBJ}/nvidia-debugdump || die
|
||||
doexe ${NV_OBJ}/nvidia-cuda-proxy-control || die
|
||||
doexe ${NV_OBJ}/nvidia-cuda-proxy-server || die
|
||||
doexe ${NV_OBJ}/nvidia-smi || die
|
||||
newinitd "${FILESDIR}/nvidia-smi.init" nvidia-smi
|
||||
fi
|
||||
|
||||
if use tools; then
|
||||
doexe ${NV_OBJ}/nvidia-settings || die
|
||||
fi
|
||||
|
||||
exeinto /usr/bin/
|
||||
doexe ${NV_OBJ}/nvidia-bug-report.sh || die
|
||||
|
||||
# Desktop entries for nvidia-settings
|
||||
if use tools ; then
|
||||
# There is no icon in the FreeBSD tarball.
|
||||
use kernel_FreeBSD || newicon ${NV_OBJ}/nvidia-settings.png nvidia-drivers-settings.png
|
||||
domenu "${FILESDIR}"/nvidia-drivers-settings.desktop
|
||||
exeinto /etc/X11/xinit/xinitrc.d
|
||||
doexe "${FILESDIR}"/95-nvidia-settings
|
||||
fi
|
||||
|
||||
#doenvd "${FILESDIR}"/50nvidia-prelink-blacklist
|
||||
|
||||
if has_multilib_profile && use multilib ; then
|
||||
local OABI=${ABI}
|
||||
for ABI in $(get_install_abis) ; do
|
||||
src_install-libs
|
||||
done
|
||||
ABI=${OABI}
|
||||
unset OABI
|
||||
else
|
||||
src_install-libs
|
||||
fi
|
||||
|
||||
is_final_abi || die "failed to iterate through all ABIs"
|
||||
}
|
||||
|
||||
src_install-libs() {
|
||||
local inslibdir=$(get_libdir)
|
||||
local GL_ROOT="/usr/$(get_libdir)/opengl/nvidia/lib"
|
||||
local CL_ROOT="/usr/$(get_libdir)/OpenCL/vendors/nvidia"
|
||||
local libdir=${NV_OBJ}
|
||||
|
||||
if use kernel_linux && has_multilib_profile && \
|
||||
[[ ${ABI} == "x86" ]] ; then
|
||||
libdir=${NV_OBJ}/32
|
||||
fi
|
||||
|
||||
if use X; then
|
||||
# The GLX libraries
|
||||
donvidia ${libdir}/libGL.so ${NV_SOVER} ${GL_ROOT}
|
||||
donvidia ${libdir}/libnvidia-glcore.so ${NV_SOVER}
|
||||
if use kernel_FreeBSD; then
|
||||
donvidia ${libdir}/libnvidia-tls.so ${NV_SOVER}
|
||||
else
|
||||
donvidia ${libdir}/tls/libnvidia-tls.so ${NV_SOVER}
|
||||
fi
|
||||
|
||||
# VDPAU
|
||||
donvidia ${libdir}/libvdpau_nvidia.so ${NV_SOVER}
|
||||
fi
|
||||
|
||||
# NVIDIA monitoring library
|
||||
if use kernel_linux ; then
|
||||
donvidia ${libdir}/libnvidia-ml.so ${NV_SOVER}
|
||||
fi
|
||||
|
||||
# CUDA & OpenCL
|
||||
if use kernel_linux; then
|
||||
donvidia ${libdir}/libcuda.so ${NV_SOVER}
|
||||
donvidia ${libdir}/libnvidia-compiler.so ${NV_SOVER}
|
||||
donvidia ${libdir}/libOpenCL.so 1.0.0 ${CL_ROOT}
|
||||
donvidia ${libdir}/libnvidia-opencl.so ${NV_SOVER}
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
use kernel_linux && linux-mod_pkg_preinst
|
||||
|
||||
# Clean the dynamic libGL stuff's home to ensure
|
||||
# we dont have stale libs floating around
|
||||
if [ -d "${ROOT}"/usr/lib/opengl/nvidia ] ; then
|
||||
rm -rf "${ROOT}"/usr/lib/opengl/nvidia/*
|
||||
fi
|
||||
# Make sure we nuke the old nvidia-glx's env.d file
|
||||
if [ -e "${ROOT}"/etc/env.d/09nvidia ] ; then
|
||||
rm -f "${ROOT}"/etc/env.d/09nvidia
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
use kernel_linux && linux-mod_pkg_postinst
|
||||
|
||||
# Switch to the nvidia implementation
|
||||
use X && "${ROOT}"/usr/bin/eselect opengl set --use-old nvidia
|
||||
"${ROOT}"/usr/bin/eselect opencl set --use-old nvidia
|
||||
|
||||
elog "You must be in the video group to use the NVIDIA device"
|
||||
elog "For more info, read the docs at"
|
||||
elog "http://www.gentoo.org/doc/en/nvidia-guide.xml#doc_chap3_sect6"
|
||||
elog
|
||||
elog "This ebuild installs a kernel module and X driver. Both must"
|
||||
elog "match explicitly in their version. This means, if you restart"
|
||||
elog "X, you must modprobe -r nvidia before starting it back up"
|
||||
elog
|
||||
elog "To use the NVIDIA GLX, run \"eselect opengl set nvidia\""
|
||||
elog
|
||||
elog "To use the NVIDIA CUDA/OpenCL, run \"eselect opencl set nvidia\""
|
||||
elog
|
||||
elog "NVIDIA has requested that any bug reports submitted have the"
|
||||
elog "output of /opt/bin/nvidia-bug-report.sh included."
|
||||
elog
|
||||
if ! use X; then
|
||||
elog "You have elected to not install the X.org driver. Along with"
|
||||
elog "this the OpenGL libraries and VDPAU libraries were not"
|
||||
elog "installed. Additionally, once the driver is loaded your card"
|
||||
elog "and fan will run at max speed which may not be desirable."
|
||||
elog "Use the 'nvidia-smi' init script to have your card and fan"
|
||||
elog "speed scale appropriately."
|
||||
elog
|
||||
fi
|
||||
if ! use tools; then
|
||||
elog "USE=tools controls whether the nvidia-settings application"
|
||||
elog "is installed. If you would like to use it, enable that"
|
||||
elog "flag and re-emerge this ebuild. Optionally you can install"
|
||||
elog "media-video/nvidia-settings"
|
||||
elog
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_prerm() {
|
||||
use X && "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
use kernel_linux && linux-mod_pkg_postrm
|
||||
use X && "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11
|
||||
}
|
||||
449
x11-drivers/nvidia-drivers/nvidia-drivers-313.18.ebuild
Normal file
449
x11-drivers/nvidia-drivers/nvidia-drivers-313.18.ebuild
Normal file
|
|
@ -0,0 +1,449 @@
|
|||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/nvidia-drivers-313.18.ebuild,v 1.7 2013/03/02 16:07:11 cardoe Exp $
|
||||
|
||||
EAPI=5
|
||||
|
||||
inherit eutils flag-o-matic linux-info linux-mod multilib nvidia-driver \
|
||||
portability toolchain-funcs unpacker user udev
|
||||
|
||||
X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}"
|
||||
AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}"
|
||||
X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}"
|
||||
AMD64_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86_64-${PV}"
|
||||
|
||||
DESCRIPTION="NVIDIA X11 driver and GLX libraries"
|
||||
HOMEPAGE="http://www.nvidia.com/"
|
||||
SRC_URI="x86? ( ftp://download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}.run )
|
||||
amd64? ( ftp://download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run )
|
||||
amd64-fbsd? ( ftp://download.nvidia.com/XFree86/FreeBSD-x86_64/${PV}/${AMD64_FBSD_NV_PACKAGE}.tar.gz )
|
||||
x86-fbsd? ( ftp://download.nvidia.com/XFree86/FreeBSD-x86/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )"
|
||||
|
||||
LICENSE="NVIDIA"
|
||||
SLOT="0"
|
||||
KEYWORDS="-* ~amd64 ~x86 ~amd64-fbsd ~x86-fbsd"
|
||||
IUSE="acpi multilib kernel_FreeBSD kernel_linux pax_kernel +tools +vanilla +X"
|
||||
RESTRICT="strip"
|
||||
EMULTILIB_PKG="true"
|
||||
|
||||
COMMON="app-admin/eselect-opencl
|
||||
kernel_linux? ( >=sys-libs/glibc-2.6.1 )
|
||||
multilib? ( app-emulation/emul-linux-x86-xlibs )
|
||||
X? (
|
||||
<x11-base/xorg-server-1.14.99
|
||||
>=app-admin/eselect-opengl-1.0.9
|
||||
)"
|
||||
DEPEND="${COMMON}
|
||||
kernel_linux? (
|
||||
virtual/linux-sources
|
||||
)"
|
||||
RDEPEND="${COMMON}
|
||||
acpi? ( sys-power/acpid )
|
||||
tools? (
|
||||
dev-libs/atk
|
||||
dev-libs/glib
|
||||
x11-libs/gdk-pixbuf
|
||||
x11-libs/gtk+:2
|
||||
x11-libs/libX11
|
||||
x11-libs/libXext
|
||||
x11-libs/pango[X]
|
||||
|| ( x11-libs/pangox-compat <x11-libs/pango-1.31[X] )
|
||||
)
|
||||
X? ( >=x11-libs/libvdpau-0.3-r1 )"
|
||||
|
||||
REQUIRED_USE="tools? ( X )"
|
||||
|
||||
QA_PREBUILT="opt/* usr/lib*"
|
||||
|
||||
S=${WORKDIR}/
|
||||
|
||||
pkg_pretend() {
|
||||
|
||||
if use amd64 && has_multilib_profile && \
|
||||
[ "${DEFAULT_ABI}" != "amd64" ]; then
|
||||
eerror "This ebuild doesn't currently support changing your default ABI"
|
||||
die "Unexpected \${DEFAULT_ABI} = ${DEFAULT_ABI}"
|
||||
fi
|
||||
|
||||
if use kernel_linux && kernel_is ge 3 7 ; then
|
||||
if use vanilla ; then
|
||||
ewarn "Gentoo supports kernel's which are supported by NVIDIA"
|
||||
ewarn "which are limited to the following kernels:"
|
||||
ewarn "<sys-kernel/gentoo-sources-3.7"
|
||||
ewarn "<sys-kernel/vanilla-sources-3.7"
|
||||
ewarn "If you want to build anyway, disable USE=vanilla"
|
||||
else
|
||||
ewarn "USE=vanilla has been disabled and you are building for"
|
||||
ewarn "kernel 3.7 or greater. As a result, you won't be supported"
|
||||
ewarn "by NVIDIA, and you may not be supported by Gentoo."
|
||||
ewarn "The risks are yours, this may work, or may kill your hardware"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Since Nvidia ships 3 different series of drivers, we need to give the user
|
||||
# some kind of guidance as to what version they should install. This tries
|
||||
# to point the user in the right direction but can't be perfect. check
|
||||
# nvidia-driver.eclass
|
||||
nvidia-driver-check-warning
|
||||
|
||||
# Kernel features/options to check for
|
||||
CONFIG_CHECK="~ZONE_DMA ~MTRR ~SYSVIPC ~!LOCKDEP"
|
||||
use x86 && CONFIG_CHECK+=" ~HIGHMEM"
|
||||
|
||||
# Now do the above checks
|
||||
use kernel_linux && check_extra_config
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
# try to turn off distcc and ccache for people that have a problem with it
|
||||
export DISTCC_DISABLE=1
|
||||
export CCACHE_DISABLE=1
|
||||
|
||||
if use kernel_linux; then
|
||||
linux-mod_pkg_setup
|
||||
MODULE_NAMES="nvidia(video:${S}/kernel)"
|
||||
BUILD_PARAMS="IGNORE_CC_MISMATCH=yes V=1 SYSSRC=${KV_DIR} \
|
||||
SYSOUT=${KV_OUT_DIR} CC=$(tc-getBUILD_CC)"
|
||||
# linux-mod_src_compile calls set_arch_to_kernel, which
|
||||
# sets the ARCH to x86 but NVIDIA's wrapping Makefile
|
||||
# expects x86_64 or i386 and then converts it to x86
|
||||
# later on in the build process
|
||||
BUILD_FIXES="ARCH=$(uname -m | sed -e 's/i.86/i386/')"
|
||||
fi
|
||||
|
||||
# set variables to where files are in the package structure
|
||||
if use kernel_FreeBSD; then
|
||||
use x86-fbsd && S="${WORKDIR}/${X86_FBSD_NV_PACKAGE}"
|
||||
use amd64-fbsd && S="${WORKDIR}/${AMD64_FBSD_NV_PACKAGE}"
|
||||
NV_DOC="${S}/doc"
|
||||
NV_OBJ="${S}/obj"
|
||||
NV_SRC="${S}/src"
|
||||
NV_MAN="${S}/x11/man"
|
||||
NV_X11="${S}/obj"
|
||||
NV_SOVER=1
|
||||
elif use kernel_linux; then
|
||||
NV_DOC="${S}"
|
||||
NV_OBJ="${S}"
|
||||
NV_SRC="${S}/kernel"
|
||||
NV_MAN="${S}"
|
||||
NV_X11="${S}"
|
||||
NV_SOVER=${PV}
|
||||
else
|
||||
die "Could not determine proper NVIDIA package"
|
||||
fi
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
if ! use kernel_FreeBSD; then
|
||||
cd "${S}"
|
||||
unpack_makeself
|
||||
else
|
||||
unpack ${A}
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Please add a brief description for every added patch
|
||||
|
||||
if use kernel_linux; then
|
||||
if kernel_is lt 2 6 9 ; then
|
||||
eerror "You must build this against 2.6.9 or higher kernels."
|
||||
fi
|
||||
|
||||
# If greater than 2.6.5 use M= instead of SUBDIR=
|
||||
convert_to_m "${NV_SRC}"/Makefile.kbuild
|
||||
fi
|
||||
|
||||
if use pax_kernel; then
|
||||
ewarn "Using PAX patches is not supported. You will be asked to"
|
||||
ewarn "use a standard kernel should you have issues. Should you"
|
||||
ewarn "need support with these patches, contact the PaX team."
|
||||
epatch "${FILESDIR}"/nvidia-drivers-pax-const.patch
|
||||
epatch "${FILESDIR}"/nvidia-drivers-pax-usercopy.patch
|
||||
fi
|
||||
|
||||
epatch "${FILESDIR}"/${PN}-313.18-builddir-config.patch
|
||||
epatch "${FILESDIR}"/${PN}-313.18-linux-3.{7,8}+.patch #447566
|
||||
|
||||
# Allow user patches so they can support RC kernels and whatever else
|
||||
epatch_user
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# This is already the default on Linux, as there's no toplevel Makefile, but
|
||||
# on FreeBSD there's one and triggers the kernel module build, as we install
|
||||
# it by itself, pass this.
|
||||
|
||||
cd "${NV_SRC}"
|
||||
if use kernel_FreeBSD; then
|
||||
MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \
|
||||
LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die
|
||||
elif use kernel_linux; then
|
||||
linux-mod_src_compile
|
||||
fi
|
||||
}
|
||||
|
||||
# Install nvidia library:
|
||||
# the first parameter is the library to install
|
||||
# the second parameter is the provided soversion
|
||||
# the third parameter is the target directory if its not /usr/lib
|
||||
donvidia() {
|
||||
# Full path to library minus SOVER
|
||||
MY_LIB="$1"
|
||||
|
||||
# SOVER to use
|
||||
MY_SOVER="$2"
|
||||
|
||||
# Where to install
|
||||
MY_DEST="$3"
|
||||
|
||||
if [[ -z "${MY_DEST}" ]]; then
|
||||
MY_DEST="/usr/$(get_libdir)"
|
||||
action="dolib.so"
|
||||
else
|
||||
exeinto ${MY_DEST}
|
||||
action="doexe"
|
||||
fi
|
||||
|
||||
# Get just the library name
|
||||
libname=$(basename $1)
|
||||
|
||||
# Install the library with the correct SOVER
|
||||
${action} ${MY_LIB}.${MY_SOVER} || \
|
||||
die "failed to install ${libname}"
|
||||
|
||||
# If SOVER wasn't 1, then we need to create a .1 symlink
|
||||
if [[ "${MY_SOVER}" != "1" ]]; then
|
||||
dosym ${libname}.${MY_SOVER} \
|
||||
${MY_DEST}/${libname}.1 || \
|
||||
die "failed to create ${libname} symlink"
|
||||
fi
|
||||
|
||||
# Always create the symlink from the raw lib to the .1
|
||||
dosym ${libname}.1 \
|
||||
${MY_DEST}/${libname} || \
|
||||
die "failed to create ${libname} symlink"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
if use kernel_linux; then
|
||||
linux-mod_src_install
|
||||
|
||||
VIDEOGROUP="$(egetent group video | cut -d ':' -f 3)"
|
||||
if [ -z "$VIDEOGROUP" ]; then
|
||||
eerror "Failed to determine the video group gid."
|
||||
die "Failed to determine the video group gid."
|
||||
fi
|
||||
|
||||
# Add the aliases
|
||||
[ -f "${FILESDIR}/nvidia-169.07" ] || die "nvidia missing in FILESDIR"
|
||||
sed -e 's:PACKAGE:'${PF}':g' \
|
||||
-e 's:VIDEOGID:'${VIDEOGROUP}':' "${FILESDIR}"/nvidia-169.07 > \
|
||||
"${WORKDIR}"/nvidia
|
||||
insinto /etc/modprobe.d
|
||||
newins "${WORKDIR}"/nvidia nvidia.conf || die
|
||||
|
||||
# Ensures that our device nodes are created when not using X
|
||||
exeinto "$(udev_get_udevdir)"
|
||||
doexe "${FILESDIR}"/nvidia-udev.sh
|
||||
udev_newrules "${FILESDIR}"/nvidia.udev-rule 99-nvidia.rules
|
||||
|
||||
elif use kernel_FreeBSD; then
|
||||
if use x86-fbsd; then
|
||||
insinto /boot/modules
|
||||
doins "${S}/src/nvidia.kld" || die
|
||||
fi
|
||||
|
||||
exeinto /boot/modules
|
||||
doexe "${S}/src/nvidia.ko" || die
|
||||
fi
|
||||
|
||||
# NVIDIA kernel <-> userspace driver config lib
|
||||
donvidia ${NV_OBJ}/libnvidia-cfg.so ${NV_SOVER}
|
||||
|
||||
# NVIDIA video encode/decode <-> CUDA
|
||||
if use kernel_linux; then
|
||||
donvidia ${NV_OBJ}/libnvcuvid.so ${NV_SOVER}
|
||||
donvidia ${NV_OBJ}/libnvidia-encode.so ${NV_SOVER}
|
||||
fi
|
||||
|
||||
if use X; then
|
||||
# Xorg DDX driver
|
||||
insinto /usr/$(get_libdir)/xorg/modules/drivers
|
||||
doins ${NV_X11}/nvidia_drv.so || die "failed to install nvidia_drv.so"
|
||||
|
||||
# Xorg GLX driver
|
||||
donvidia ${NV_X11}/libglx.so ${NV_SOVER} \
|
||||
/usr/$(get_libdir)/opengl/nvidia/extensions
|
||||
fi
|
||||
|
||||
# OpenCL ICD for NVIDIA
|
||||
if use kernel_linux; then
|
||||
insinto /etc/OpenCL/vendors
|
||||
doins ${NV_OBJ}/nvidia.icd
|
||||
fi
|
||||
|
||||
# Documentation
|
||||
dohtml ${NV_DOC}/html/*
|
||||
if use kernel_FreeBSD; then
|
||||
dodoc "${NV_DOC}/README"
|
||||
use X && doman "${NV_MAN}/nvidia-xconfig.1"
|
||||
use tools && doman "${NV_MAN}/nvidia-settings.1"
|
||||
else
|
||||
# Docs
|
||||
newdoc "${NV_DOC}/README.txt" README
|
||||
dodoc "${NV_DOC}/NVIDIA_Changelog"
|
||||
doman "${NV_MAN}/nvidia-smi.1.gz"
|
||||
use X && doman "${NV_MAN}/nvidia-xconfig.1.gz"
|
||||
use tools && doman "${NV_MAN}/nvidia-settings.1.gz"
|
||||
doman "${NV_MAN}/nvidia-cuda-proxy-control.1.gz"
|
||||
fi
|
||||
|
||||
# Helper Apps
|
||||
exeinto /opt/bin/
|
||||
|
||||
if use X; then
|
||||
doexe ${NV_OBJ}/nvidia-xconfig || die
|
||||
fi
|
||||
|
||||
if use kernel_linux ; then
|
||||
doexe ${NV_OBJ}/nvidia-debugdump || die
|
||||
doexe ${NV_OBJ}/nvidia-cuda-proxy-control || die
|
||||
doexe ${NV_OBJ}/nvidia-cuda-proxy-server || die
|
||||
doexe ${NV_OBJ}/nvidia-smi || die
|
||||
newinitd "${FILESDIR}/nvidia-smi.init" nvidia-smi
|
||||
fi
|
||||
|
||||
if use tools; then
|
||||
doexe ${NV_OBJ}/nvidia-settings || die
|
||||
fi
|
||||
|
||||
exeinto /usr/bin/
|
||||
doexe ${NV_OBJ}/nvidia-bug-report.sh || die
|
||||
|
||||
# Desktop entries for nvidia-settings
|
||||
if use tools ; then
|
||||
# There is no icon in the FreeBSD tarball.
|
||||
use kernel_FreeBSD || newicon ${NV_OBJ}/nvidia-settings.png nvidia-drivers-settings.png
|
||||
domenu "${FILESDIR}"/nvidia-drivers-settings.desktop
|
||||
exeinto /etc/X11/xinit/xinitrc.d
|
||||
doexe "${FILESDIR}"/95-nvidia-settings
|
||||
fi
|
||||
|
||||
#doenvd "${FILESDIR}"/50nvidia-prelink-blacklist
|
||||
|
||||
if has_multilib_profile && use multilib ; then
|
||||
local OABI=${ABI}
|
||||
for ABI in $(get_install_abis) ; do
|
||||
src_install-libs
|
||||
done
|
||||
ABI=${OABI}
|
||||
unset OABI
|
||||
else
|
||||
src_install-libs
|
||||
fi
|
||||
|
||||
is_final_abi || die "failed to iterate through all ABIs"
|
||||
}
|
||||
|
||||
src_install-libs() {
|
||||
local inslibdir=$(get_libdir)
|
||||
local GL_ROOT="/usr/$(get_libdir)/opengl/nvidia/lib"
|
||||
local CL_ROOT="/usr/$(get_libdir)/OpenCL/vendors/nvidia"
|
||||
local libdir=${NV_OBJ}
|
||||
|
||||
if use kernel_linux && has_multilib_profile && \
|
||||
[[ ${ABI} == "x86" ]] ; then
|
||||
libdir=${NV_OBJ}/32
|
||||
fi
|
||||
|
||||
if use X; then
|
||||
# The GLX libraries
|
||||
donvidia ${libdir}/libGL.so ${NV_SOVER} ${GL_ROOT}
|
||||
donvidia ${libdir}/libnvidia-glcore.so ${NV_SOVER}
|
||||
if use kernel_FreeBSD; then
|
||||
donvidia ${libdir}/libnvidia-tls.so ${NV_SOVER}
|
||||
else
|
||||
donvidia ${libdir}/tls/libnvidia-tls.so ${NV_SOVER}
|
||||
fi
|
||||
|
||||
# VDPAU
|
||||
donvidia ${libdir}/libvdpau_nvidia.so ${NV_SOVER}
|
||||
fi
|
||||
|
||||
# NVIDIA monitoring library
|
||||
if use kernel_linux ; then
|
||||
donvidia ${libdir}/libnvidia-ml.so ${NV_SOVER}
|
||||
fi
|
||||
|
||||
# CUDA & OpenCL
|
||||
if use kernel_linux; then
|
||||
donvidia ${libdir}/libcuda.so ${NV_SOVER}
|
||||
donvidia ${libdir}/libnvidia-compiler.so ${NV_SOVER}
|
||||
donvidia ${libdir}/libOpenCL.so 1.0.0 ${CL_ROOT}
|
||||
donvidia ${libdir}/libnvidia-opencl.so ${NV_SOVER}
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
use kernel_linux && linux-mod_pkg_preinst
|
||||
|
||||
# Clean the dynamic libGL stuff's home to ensure
|
||||
# we dont have stale libs floating around
|
||||
if [ -d "${ROOT}"/usr/lib/opengl/nvidia ] ; then
|
||||
rm -rf "${ROOT}"/usr/lib/opengl/nvidia/*
|
||||
fi
|
||||
# Make sure we nuke the old nvidia-glx's env.d file
|
||||
if [ -e "${ROOT}"/etc/env.d/09nvidia ] ; then
|
||||
rm -f "${ROOT}"/etc/env.d/09nvidia
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
use kernel_linux && linux-mod_pkg_postinst
|
||||
|
||||
# Switch to the nvidia implementation
|
||||
use X && "${ROOT}"/usr/bin/eselect opengl set --use-old nvidia
|
||||
"${ROOT}"/usr/bin/eselect opencl set --use-old nvidia
|
||||
|
||||
elog "You must be in the video group to use the NVIDIA device"
|
||||
elog "For more info, read the docs at"
|
||||
elog "http://www.gentoo.org/doc/en/nvidia-guide.xml#doc_chap3_sect6"
|
||||
elog
|
||||
elog "This ebuild installs a kernel module and X driver. Both must"
|
||||
elog "match explicitly in their version. This means, if you restart"
|
||||
elog "X, you must modprobe -r nvidia before starting it back up"
|
||||
elog
|
||||
elog "To use the NVIDIA GLX, run \"eselect opengl set nvidia\""
|
||||
elog
|
||||
elog "To use the NVIDIA CUDA/OpenCL, run \"eselect opencl set nvidia\""
|
||||
elog
|
||||
elog "NVIDIA has requested that any bug reports submitted have the"
|
||||
elog "output of /opt/bin/nvidia-bug-report.sh included."
|
||||
elog
|
||||
if ! use X; then
|
||||
elog "You have elected to not install the X.org driver. Along with"
|
||||
elog "this the OpenGL libraries and VDPAU libraries were not"
|
||||
elog "installed. Additionally, once the driver is loaded your card"
|
||||
elog "and fan will run at max speed which may not be desirable."
|
||||
elog "Use the 'nvidia-smi' init script to have your card and fan"
|
||||
elog "speed scale appropriately."
|
||||
elog
|
||||
fi
|
||||
if ! use tools; then
|
||||
elog "USE=tools controls whether the nvidia-settings application"
|
||||
elog "is installed. If you would like to use it, enable that"
|
||||
elog "flag and re-emerge this ebuild. Optionally you can install"
|
||||
elog "media-video/nvidia-settings"
|
||||
elog
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_prerm() {
|
||||
use X && "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
use kernel_linux && linux-mod_pkg_postrm
|
||||
use X && "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11
|
||||
}
|
||||
Loading…
Reference in a new issue