summaryrefslogtreecommitdiff
path: root/x11-drivers/nvidia-drivers
diff options
context:
space:
mode:
authorBlackNoxis <steven.darklight@gmail.com>2014-02-15 23:24:26 +0200
committerBlackNoxis <steven.darklight@gmail.com>2014-02-15 23:24:26 +0200
commit7224c1253228e5c29c78cb3f0f26ce34770f2356 (patch)
tree1684924656132935256e034f35f92abee6623265 /x11-drivers/nvidia-drivers
Added ebuilds for kogaion desktop
Diffstat (limited to 'x11-drivers/nvidia-drivers')
-rw-r--r--x11-drivers/nvidia-drivers/Manifest120
-rw-r--r--x11-drivers/nvidia-drivers/files/10nvidia1
-rw-r--r--x11-drivers/nvidia-drivers/files/256.35-unified-arch.patch30
-rw-r--r--x11-drivers/nvidia-drivers/files/eblits/donvidia.eblit21
-rw-r--r--x11-drivers/nvidia-drivers/files/eblits/mtrr_check.eblit19
-rw-r--r--x11-drivers/nvidia-drivers/files/eblits/src_install-libs.eblit116
-rw-r--r--x11-drivers/nvidia-drivers/files/eblits/want_tls.eblit33
-rw-r--r--x11-drivers/nvidia-drivers/files/libGL.la-r232
-rw-r--r--x11-drivers/nvidia-drivers/files/make-use-of-the-new-uapi-framework.patch46
-rw-r--r--x11-drivers/nvidia-drivers/files/nvidia40
-rw-r--r--x11-drivers/nvidia-drivers/files/nvidia-169.0714
-rw-r--r--x11-drivers/nvidia-drivers/files/nvidia-drivers-173-3.10.patch714
-rw-r--r--x11-drivers/nvidia-drivers/files/nvidia-drivers-260.19.44-2.6.39.patch10
-rw-r--r--x11-drivers/nvidia-drivers/files/nvidia-drivers-290.10-3.2.8+.patch11
-rw-r--r--x11-drivers/nvidia-drivers/files/nvidia-drivers-304-3.10.patch626
-rw-r--r--x11-drivers/nvidia-drivers/files/nvidia-drivers-313.18-3.8.patch24
-rw-r--r--x11-drivers/nvidia-drivers/files/nvidia-drivers-319.23-3.10.patch604
-rw-r--r--x11-drivers/nvidia-drivers/files/nvidia-drivers-96.43.19-2.6.39.patch10
-rw-r--r--x11-drivers/nvidia-drivers/files/nvidia-drivers-pax-const.patch17
-rw-r--r--x11-drivers/nvidia-drivers/files/nvidia-drivers-pax-usercopy.patch54
-rw-r--r--x11-drivers/nvidia-drivers/files/replace-VM_RESERVED-with-VM_DONTEXPAND-and-VM_DONTDU.patch28
-rw-r--r--x11-drivers/nvidia-drivers/metadata.xml10
-rw-r--r--x11-drivers/nvidia-drivers/nvidia-drivers-173.14.31.ebuild199
-rw-r--r--x11-drivers/nvidia-drivers/nvidia-drivers-173.14.34.ebuild204
-rw-r--r--x11-drivers/nvidia-drivers/nvidia-drivers-173.14.35.ebuild204
-rw-r--r--x11-drivers/nvidia-drivers/nvidia-drivers-275.09.07.ebuild192
-rw-r--r--x11-drivers/nvidia-drivers/nvidia-drivers-280.13.ebuild195
-rw-r--r--x11-drivers/nvidia-drivers/nvidia-drivers-285.05.09.ebuild192
-rw-r--r--x11-drivers/nvidia-drivers/nvidia-drivers-290.10.ebuild195
-rw-r--r--x11-drivers/nvidia-drivers/nvidia-drivers-295.20.ebuild192
-rw-r--r--x11-drivers/nvidia-drivers/nvidia-drivers-295.33.ebuild192
-rw-r--r--x11-drivers/nvidia-drivers/nvidia-drivers-295.40.ebuild192
-rw-r--r--x11-drivers/nvidia-drivers/nvidia-drivers-295.49.ebuild192
-rw-r--r--x11-drivers/nvidia-drivers/nvidia-drivers-295.53.ebuild192
-rw-r--r--x11-drivers/nvidia-drivers/nvidia-drivers-295.59.ebuild192
-rw-r--r--x11-drivers/nvidia-drivers/nvidia-drivers-302.17.ebuild192
-rw-r--r--x11-drivers/nvidia-drivers/nvidia-drivers-304.22.ebuild192
-rw-r--r--x11-drivers/nvidia-drivers/nvidia-drivers-304.37.ebuild180
-rw-r--r--x11-drivers/nvidia-drivers/nvidia-drivers-304.64.ebuild444
-rw-r--r--x11-drivers/nvidia-drivers/nvidia-drivers-304.88.ebuild187
-rw-r--r--x11-drivers/nvidia-drivers/nvidia-drivers-310.19.ebuild180
-rw-r--r--x11-drivers/nvidia-drivers/nvidia-drivers-313.18.ebuild431
-rw-r--r--x11-drivers/nvidia-drivers/nvidia-drivers-313.30.ebuild184
-rw-r--r--x11-drivers/nvidia-drivers/nvidia-drivers-325.15.ebuild192
-rw-r--r--x11-drivers/nvidia-drivers/nvidia-drivers-96.43.20.ebuild199
45 files changed, 7494 insertions, 0 deletions
diff --git a/x11-drivers/nvidia-drivers/Manifest b/x11-drivers/nvidia-drivers/Manifest
new file mode 100644
index 00000000..f905799c
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/Manifest
@@ -0,0 +1,120 @@
+AUX 10nvidia 26 SHA256 1f3469ad49cf83d5d0dafd53729d6b20a8e2c9a070bcd4062ec7a1046a3dc2ca SHA512 471ffa2ee4d238a3f3a2e90a04f635fee57ed133f1a02ae6033e8ca5342c2ab1f5a8fb5672a189b19d91e70010f17507246ea8864788120df1285265cc8c5f4e WHIRLPOOL bd9f31661ef22fbbe1efaa51d8cea2d05fa9ba487ae1195f5137289682a9b7bd551093c1e08de3ee85a202feef83f9e1845cbac8fe763b0ca2b2bdecfd1dd705
+AUX 256.35-unified-arch.patch 1498 SHA256 7861431595e425c5df8acffb8bf536befa7a13618d6f66456aef6dac4db5c314 SHA512 0be0097e0ac540d672ded293168a56969bf26d62efd78d8ac320cbbd426744536c451835cb46f002f112a172fee0d44c8633add0932ab2c3b41ca6841f780f63 WHIRLPOOL e4a652d358519010f76cba94b0e9e97f3632f301ace8d5ea56fc8ae896e57445e08623189cf9240a99efad801774adee39a1ceea9ab982c5f36ae57e949c95b7
+AUX eblits/donvidia.eblit 695 SHA256 d404dd7e5657d83ccf3687720fb978030a3716e47957fb8bb80dea3ed57b3672 SHA512 606d2a496ddae2ac89d3ac0ce5b80bac90cabfe74d6b29c577ab047c3b83ce8965bb4b91b29f37bf55d4f34eaab623ac886760920efb9d306d3904cb3b51291c WHIRLPOOL e0a945c4cbaa0514e19eecf8faa4daaa76c8fc6392fb9a2a607e011e7994c535a3ba4b024de9ee9f4f34c7d4e0d48a0c3315f4cf9687be05fb577ec8dd3c0fe2
+AUX eblits/mtrr_check.eblit 629 SHA256 ae1b8fb37985fc3e42a4a776779b3fe3d70be2c826df5c3f99d03ba7209ca0b1 SHA512 db1bcee808c616536e21f98d65cd0c2b64b26b8b0db827decfc8fe12b031431bf961f1f2016a22170b9400672aeb508f548a66c15018570b44fe1cd535692f86 WHIRLPOOL 4f4961dc5aa71f273871f9171f485aaf5dd27906a564e1967b9298362b2302d9b137a757c6e6918b4b3d1efef75b0ed266f08d83c898e0a1f2b47653e1ca7335
+AUX eblits/src_install-libs.eblit 3472 SHA256 6f301de374736cec316794bf1935a15de025b3c505981f24e06e3df75818ad6a SHA512 f3dd0cb69276cec6f2b7cbb452c77c8e0a82fc37514c31a21fb9a251e38027e4adfdda6ca8b1897635897608a0e70c81f03ff88466a7db1387ed7a4241924ce8 WHIRLPOOL a2e84fba09347bec9b27129f02311696938ad5ca61fa7ff8d9efa10ad9c63a01a622cba1d08b1e166c737e88b50add234c7c0d59b88e5b64442269a7dd47cbf8
+AUX eblits/want_tls.eblit 952 SHA256 e5ce767a2e9a5c0682e764b9ba42a20e721a093f4c0626605570c8b5e3afecd0 SHA512 eafa21a324f095e3d80ac0385c1a5159011a57e3aa2465927c71524c6329147f2ee804f6b0772d4ad97083637451df397be0da748d8674d5be42b308fb25ae2d WHIRLPOOL 8291d0fa548518926252fafabaa0ebbfd7ac165b380650beeed17c86918f95d658a3daadab6c4bde0adbdf1ce7b63a88ed6135cfcf9dceb4798f0b1ccefc8fcc
+AUX libGL.la-r2 733 SHA256 4856e7a2c31763ade41c93a395f3e80a2705ac2ab4dbd73e5161cdba132f407b SHA512 52fbc3d704274fc5403b95a5d696824684302f4a77e0b08d5a59850435b12d9bdc4cf931f346f91e950f246cc342e0a673e7657cc2cea95e991ed3aab8c1c928 WHIRLPOOL 6a0006277a8444b4b5191a7e07c972efde43c3a9ff8a7286d1d1f78c69c3ba394572f31716b684f1e28355572a6e9f9cbd5437bb9dba127d727f8789fbd2a980
+AUX make-use-of-the-new-uapi-framework.patch 1503 SHA256 47122d37911638163252557cfa754f35bda3d1db91812ac19aae86e9f6b4612a SHA512 a8e0de8b861b52cb66fe508456110df6effa3ddea42d023cc9ebeeb373d3bcc4fba5d9f6910343e4c211ebf64abf9073aedca25d0baf7f4e8ea4fd3b44a947da WHIRLPOOL 14d3dfecba46ddf6da0f1290730916c8d22bfcad8ebbf4af8720b1b3a76072c076444141a14927af9c7339f48b6fd3b9f3924bb050a13e2ab30158b9a1e102a5
+AUX nvidia 1510 SHA256 b193cc3f6d6f39138720a2282d9f161fc8f2e8a15bc43d183a30eb879add06c5 SHA512 4ffdf49c2634b261be122a0016b0f69d30db6fe4b4a29767cfeee2e1d60671e7e6fc5e5c3a237b351a4def64404db121cf296a0cdb6e1bbd4f8e78ab40587000 WHIRLPOOL faab4c87940e4703b2a30f284cae34bdf4ac486cb1d402b5bd91ef65c23f443c2c961ad914fbcbd5258dd5bbaeee583f189fcf5fc14f2b9925c8ccfa0fc422c7
+AUX nvidia-169.07 639 SHA256 a8c4860f008d53776fda7a17b59524f271236559af688e9a2c9845cbbcba1577 SHA512 3af295c026280dc3a2b73c2cc7772254686b09cad15f1333ab0b4de8cb0ccf78e725ced2a399b10edcf8af6ba42ab1485dc0661af67461b0c3789f786357772f WHIRLPOOL 626ae3c01c879e0cfe05bd373e0b9dfd6f462dd9ef6ae94a7d60276fe2d17c57fbb20aaa4d2a186a0ffc2a860076692aac854d00a3545bc9736e7bb8d0581055
+AUX nvidia-drivers-173-3.10.patch 22318 SHA256 e1e84b3f882df06295295050003855d435669be049fd8cdf73f95917e4ed2c3a SHA512 8c96fa9c945e4a2620372d171049a1bf3318a2d0bfba6857717eb7c1132a2538edb536b9958e0d7647f93fe60bdb2b2c153b3dac3b2ff4fd057a78288b1e6e5f WHIRLPOOL 741ffb283a249f39c74f83b38e897489dcc4d644daa27c40af00a51f1768336c4d4371f379f5fa6c1c3ec80e011ea83a8703fe90307f00e12d0befa96b94fbc0
+AUX nvidia-drivers-260.19.44-2.6.39.patch 481 SHA256 f4aebb017e5a054171df7594220674583dbb25c0e8f78778141bdc5694fad521 SHA512 37a46b1e0fb688144a1a40bb403b1ffa718aa215e413887c757423d4e3b3e6a12187dd0c96607063c0358522d2a383e6ffd71ec855a108340fe7710e0106bf96 WHIRLPOOL 5fdff3d8cc58218d8151d68d45c99fde31eb913985302f76f74414fa2e4a3bb8d11470ec9be124a1c96648d002c13f350a9ee8bf9811b594f7c618ce0555138f
+AUX nvidia-drivers-290.10-3.2.8+.patch 481 SHA256 e34491c1b8cbb0b310f14aabea34c4dbc6bb3ee20c78ac87d62f960134f5dda0 SHA512 d40b728f3955ea651ee6fefa9b8a7b7cc2c5aee9cbbf0662f5abb6709a6b62cfb13e80d9595e08de35f2d8c4631200e17c91cd4b8c32059f866d35c00f750ef1 WHIRLPOOL d8938f7ce01713ad6a5e194ce3b1299d705cffcbabb6791dcc0feb0fd4d386401dc5d810496db0b30c7bcc8b184d37d07f27979514ec09c2b83e78cbce0b5b3b
+AUX nvidia-drivers-304-3.10.patch 18864 SHA256 a5793ff1620b062880fd23f4c5bc469bde70e2ee6f74f7261636298b33154bd2 SHA512 d985d4982728167fcb491081a151fa7a7f6536d8fd0152dd627b6be02b357a780732d78bffc41a4e8f25903cd6213eb79a8763ddd9787e01e067dc200e0213a2 WHIRLPOOL 3c07a3ac4891f2685ed0057a2c340d8b949480ca1e3e13d13cc9b801652b101d54934e98b5951522f186559f55638a240327862540e1cbcd1e494bf937e91113
+AUX nvidia-drivers-313.18-3.8.patch 775 SHA256 329a38af4a6ea8c76e61129140b8dec16694b50328934346a40ff5e571671083 SHA512 0dbb88a54d8daffb1c6654623187f505e62042ad92f8dab8e7c15a1d43d461965b159c08a8c8971e342b88050274a8a72d578ceebb025891cdf083dd65213ce5 WHIRLPOOL 269a97eb0ceb66ad9418bf4e453b5e891bcf96c29dec8b4bc8aee0674448d05edb155587b03b98dfb20d1e071c6419badc64d6982601c46edb7e4b916a17c8e1
+AUX nvidia-drivers-319.23-3.10.patch 17669 SHA256 68d9c37dd177829bd240447d070489fab3d58f4552d09d46ff0a2ee7cb07d127 SHA512 a0a3c22d0c65b8759929b982155f233e49d279a5de74c7cae438681666324656319d1a1bf8e867453c945eb4bd12406287bf497440c1801142c1ba327e473c58 WHIRLPOOL 98e7a37285c5a2e94ab33c29221803f404ef6aa6fcaf0398563e2131c132c708095f09d97e4e82e73146f95da39e07589d620a8bf1c8ad7e23bec9196c4b316a
+AUX nvidia-drivers-96.43.19-2.6.39.patch 561 SHA256 63e9f372023454943583e9b9c0603a12df3481fb3e36b89c411e8d70b5d9aa26 SHA512 f479b491ca863556d6f7b1ad23962b339c7815ab29ce8a5b1be8275cebce04f009ca59a6204f5e0b56dea57f276e9ad1953072b65a448111c1c85731fe05d608 WHIRLPOOL b0895792f6faedfd8cb0a0b5af9e6a2584f882690aef129b3be88913c364fd476ff05757664c0a2cc48db5b7d6cec19f56d09897e682b2c18f62e2cf82968e73
+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 replace-VM_RESERVED-with-VM_DONTEXPAND-and-VM_DONTDU.patch 829 SHA256 28c9254efcff3f8ff51c8f8fdb1a277a49c1b3e424064454b8aa43f114e38bfd SHA512 bbb0844f0688e3a7e75e26ada19633c451bd9259e8084e6b49f5889414b417f047878e7819276c878136679c5a69575a02d2c1562e9c53ddd3dba8b61f2708f5 WHIRLPOOL ddd315ffaf6ae48f0f369813001b55920e76682a1c0d1bc694ef64bc8828c9bd1e87f8849b35f006e387aa6ff2fb93bb628c59c1f91b348b8573396a6c5ff686
+DIST NVIDIA-FreeBSD-x86-173.14.31.tar.gz 17991684 SHA256 98699bc8dc1dad86cebc2ed067b4fc5cd37b8540e897bb218f38ac80c4b4d875 SHA512 4e6fbbeaff54563a135346e60372046cb2cd2562cc606836dc3169d4f50c0b112095b1f0f3f14f2f0facf2be1235064c13766432a04b927f2ab81ef50c8f4f34 WHIRLPOOL 0cc4f196d7ccbdd45f8584fef9f98dd1af2fa260a8e694a6000e5436ae2ab35df6ba5f8967261e36f0107962744423fc73eef9d0e59807f78536ecf8de0f5963
+DIST NVIDIA-FreeBSD-x86-173.14.34.tar.gz 18792829 SHA256 44368464ad72addb999aa7bf3a1d684d4cddd1bba08d7bca9e45a825cb8865ae
+DIST NVIDIA-FreeBSD-x86-173.14.35.tar.gz 18748428 SHA256 51e82a12db81b5af4ae5ee59612875c0dbef52cb641d61a44c72f2e1cd7f4c78
+DIST NVIDIA-FreeBSD-x86-275.09.07.tar.gz 30304023 SHA256 d5d119c2f066539da0f2d1926193f6bc2bfbf2a1dcdff77322a23b42c5df91d9
+DIST NVIDIA-FreeBSD-x86-280.13.tar.gz 29589886 SHA256 2ad1882467a2d8a0b65dfa15e710e4938786e51f688e1d02d4d3343868b9239e
+DIST NVIDIA-FreeBSD-x86-285.05.09.tar.gz 30697710 SHA256 d3ad51145cd57c70678ee659112a0973187b1b02e3062addadd0fe094b3c46fb
+DIST NVIDIA-FreeBSD-x86-290.10.tar.gz 32042469 SHA256 f5accbdac0b231a8073f76c1d1d8ace7cb98ebe167888c31183a2752a669ee92
+DIST NVIDIA-FreeBSD-x86-295.20.tar.gz 31993959 SHA256 fea6d5552a50e2aedc4726944fea85ac8baf0d0b26661fc3b1f97f54ebec6736
+DIST NVIDIA-FreeBSD-x86-295.33.tar.gz 32039170 SHA256 e3f8052fdac78defafcef495febea2a77f820f2c4c9ecbe47fb92bf630321afc
+DIST NVIDIA-FreeBSD-x86-295.40.tar.gz 32029253 SHA256 f47b603f39dfd2e405949aab6fbc7abd4b24f43c6fb47b4f23d7618f32021364
+DIST NVIDIA-FreeBSD-x86-295.49.tar.gz 32078716 SHA256 aa7c9a13931a55e358c542e1d18feb0aeaa7b18550e9675698b152265134d938
+DIST NVIDIA-FreeBSD-x86-295.53.tar.gz 32085530 SHA256 ecb637754ec31a0c058017e04b363abb831b96584ca9684b676a93ecb5af93ca
+DIST NVIDIA-FreeBSD-x86-295.59.tar.gz 32092806 SHA256 9a3e1794418add03ad97aad93608d1bc1f2f9c5a82e0321a2a8ba1c9db7d41dd
+DIST NVIDIA-FreeBSD-x86-302.17.tar.gz 32072917 SHA256 b0d50c3333ee7c485bfd5287b37e253ed358dd5d205997f0c50e16f04b7714c5
+DIST NVIDIA-FreeBSD-x86-304.22.tar.gz 32975645 SHA256 20a84c23339695fe73d9be977662b19572360d8d87b54aeca428f73e2510c1e5 SHA512 15788983073427a9729b61a37b684c37bafd57618bbacec40fe8f9bd0a3f6f30d417297dee5e3ca287f0b71c74bbe03163edef048f8ad38cf2493124820244dd WHIRLPOOL f823ce885ebcd8ab9af427487c8dfffe5cc7adc61e1c4af31371b808df449584df1f571310610e901bc83c4e52cb553d2a71d0ae5e3fadfadf56ce1a97447484
+DIST NVIDIA-FreeBSD-x86-304.37.tar.gz 33291575 SHA256 e6c3a1d4a757b5d4f2ab54a43d5d7008fcb1b481f14515f58adcd31f3edc6576
+DIST NVIDIA-FreeBSD-x86-304.64.tar.gz 33320263 SHA256 e129d0d0e8d256d6328cddc4c18edb96c1e444c354f7c806ece4192621a1c1b5 SHA512 032de0524f2e68a06e6218f3737f55e16e6ae6ea9991b539bacabf4814a101d2f0786d8e2fe750d59ddaf5b5cee5b1527adedc44539d2015370e879ee8b37948 WHIRLPOOL f042065e63a5a74b2d3b586135072df77156481383a5cb7993598efef841859c3a7d9a7c6ad7eb83016376bfe5d2b044088918711a6304380a8ade6c808ab60c
+DIST NVIDIA-FreeBSD-x86-304.88.tar.gz 33651825 SHA256 739325b26a93d934d015159c420ef1875a24ccd62a5bb482e688cf918d4fa33d SHA512 6dab929d2d2bacfc3a96ab24ff02996938613851e2b3c050ed3a1d0cca3751c574f12508e21119f2b43ff0421c3f88bf4edd51a37f3374c72c6337bcb8d6bcdb WHIRLPOOL b9be513a8dd8ce4cd6eeb23a24e725c751bb2cce0745477df2b4b84d7d03ad557d0b16bcdfb8d642168de09d59b057cb2955fca11f50b281ebad92f30a7dc4e1
+DIST NVIDIA-FreeBSD-x86-310.19.tar.gz 32264033 SHA256 29635a45e87fd240d472868dcd1ff9030f7eb85d78ffe85dea0f420be390d3e0 SHA512 77fd63c0c2cca5462c7e969e300f027dff9cb60f4234868f42317604d537a7bccb2631958f2a0cf74f46ee685d8f2a25f3dab2792be00a5c638d9756deb5a582 WHIRLPOOL bc896389ed9ad32e8e2e087476a3bafac9f828b8a1167c7b99cd58688d56d5454717dbe99b83fa1eca3111a80ffa9f721332364c8fdf95c02f4c5e05f989248f
+DIST NVIDIA-FreeBSD-x86-313.18.tar.gz 32592785 SHA256 515b8470dcea3e122403f5902ba6ce3d710d9ddc4d9edd581ffe85e184af989f SHA512 00f15def371cbd2c433b2cecc1f5ff455ea1b112951b3453512b88371f7fa25047e5409cdbd7e34b7c8e6d5b1691b6d662076737dcfd6239f60926a013a1de52 WHIRLPOOL d6a49d027a4cc66c05a246f84ca8360265ce98d50e1e35d4d8828f2003c472d2154eb277cecddd1eb39ecc44896795e529daa743f37174c0e1e2a84b9fa7bada
+DIST NVIDIA-FreeBSD-x86-313.30.tar.gz 32591892 SHA256 1e02831fbaddf2f27808ea26352d835417f59bcf54ddb3e9c0f1d7b76dcb4666 SHA512 68cf61fabf707dfa1225011cab3749959ab29f09f611347eb9f9bd55065012d04382998e67091c4d3c1af9be21be6381aef9b6414448ee15f9a36d44448f5bf8 WHIRLPOOL 71ded70f45e880db2c2850c596cebafd004adf89f7131adaf324d1d38abbb5457a700bfa9e671bfa144515556f011df8a37fdf22b78b879f39007be6487f060a
+DIST NVIDIA-FreeBSD-x86-325.15.tar.gz 34164781 SHA256 745d8454833d1ad59f6480ac2d1ca744862e4e711e16deeebc0d04ff86925c4d SHA512 b1ce1041d7f3a926c3e62e398a618063e24675cdd919206c11e556f38d3b0078233ba31207d04e9d94e26bbf5eae4d43f8db457e7ac4fecfb8d407d2dbbf3040 WHIRLPOOL 9a37ecaa745ab9ff80755f01100610f85467fdfb55f5568dd358cb39302c0951edd91d518f1027bb0d43628e575ff9c1799ad956b9e673a31d38f7f3db125c63
+DIST NVIDIA-FreeBSD-x86-96.43.20.tar.gz 14060884 SHA256 e75fce272e72644d53e6ad3c0957fe173735a4b621726ce227ba8ecf9bd9c5cf
+DIST NVIDIA-FreeBSD-x86_64-304.37.tar.gz 34210803 SHA256 0d00046c8463954b6c8e13e245b2619758e947389161a113aa005ef7566e5dd3
+DIST NVIDIA-FreeBSD-x86_64-304.64.tar.gz 34247065 SHA256 9887e4147fcb16141dcb6b153ff71a28c73cf2a4c16b60e4c6fcb8586a1c5400 SHA512 31750ebf8f8583e82dd3211888e729dac866b73c9cce4cf666900f7d1269097ed1df9e30173c8091e0ed5196dd3d4d9b09e2aaeaef2936aa3f95fb673a37622b WHIRLPOOL 1412c1e9deaecd2f7fd086ef57afb6ea8b2252b57a4e69a71561768a6fed7e6387d10db4e4efa5c9772e2954bc0fd2c1902bff29a8b48ce6dc05e87ec913c908
+DIST NVIDIA-FreeBSD-x86_64-304.88.tar.gz 34597351 SHA256 be0e20a543fa14a8f91481dd64b080093b19edf951bf631c62365a64dadb1934 SHA512 143af863aef72962d83c6f77160512d0860a62964e92043400674b0be95735ae6f2dbdd25c42fa96b4511cece9c73b7072f829a88d46ab6b79aa750b65e64748 WHIRLPOOL 74b5014736065e178b261716e81f367395252efb3aa3b84faab6b6d26f561caa129e1d9bc0e02ce98f83dcaa3603fddd155de4b50e760bf2ea8df4c176b21e76
+DIST NVIDIA-FreeBSD-x86_64-310.19.tar.gz 33184883 SHA256 82607fdd14c666867b842205be3ec8b8095fb0c9da1cb2286b0bf85a769eb9ae SHA512 5f112a4dbb379977c9b1417536964d02498cb9d4a4ff3c35291dfaa5c90fcc8b2073ec75a1db9358c98686661d525db5e7e42036500281d09a1be608f9c2b851 WHIRLPOOL 3b629c57cc63319b18805fb67ebf75d07907a52b2c1d7cad12cca8837c29e6557c772c416d52d15f1e8f7b01b65b8a7728bd4cf5c0da890644e3151421fb901d
+DIST NVIDIA-FreeBSD-x86_64-313.18.tar.gz 33554240 SHA256 57fbf9c85fb19a7f2fb3c6c2f50421e70309cd3360c059a2fc6efc125681ff10 SHA512 fe2c0ec88b7cb5d49905dd082d46f3a4268dea78bf4dbdc6d82b60f1ec9998d478b4332de48094af7bb7b9b51eb6885aae446998830c28555521715db7a59dbe WHIRLPOOL 95e3c577b3831bda11f0ddd8ee1fddc2f1a3138db35c78277fe99ac6c75d9dca0e9b8acf59ca31413f11775772d82bef85077355796bb6882bf9804868361b66
+DIST NVIDIA-FreeBSD-x86_64-313.30.tar.gz 33557658 SHA256 192ad1bb8a0cd649e12bcccf97c5f4d2002d6695126fea81586991d9e95248d3 SHA512 79b3b47bdcbc99f724f8c424733c11f1b2653103bbe0ba9849587628611d9da08ea434c786cc7d3d891bde3dfe4068298a7377ce5b1a3484fb64ef4d28c896da WHIRLPOOL 7307d6adb04b47b8403134e7394bf9af4f90839d1fb62aa3b7b7c6d8e367392829fb249dc8d444e66158fa5b5b15cf5b6c16e1f5659a22a15c17f55eda026660
+DIST NVIDIA-FreeBSD-x86_64-325.15.tar.gz 34590166 SHA256 92429119ca8e50baa06c6681ed2b9eb6c37cdf256a19ba4e1827be4b202a0569 SHA512 c9e4d41a5dcb02a280fb323fd4578bc7851d4242890f1d8e69a59e083a2a76cccdaba3ed55f8eb8f983e9c89326f0a9d7152bd7770230fbe45fc7b5865c486b6 WHIRLPOOL c54638af7fb6aaf63222ea75cc377e5e449dfaa80dd47a23aed2eec8da1c460c9e3c24627a2853287585a65b0f562e3efc7916fe985a4816d82aebc12bf7021b
+DIST NVIDIA-Linux-x86-173.14.31-pkg0.run 13407481 SHA256 e855a62f16a9d0eff1bf470a8fcedd48cd1b718e969ad5ebe89a557d039d1924 SHA512 bb58aa1ee84c71311a7b5cd3d87fa2827b6b41bb4645849611381ce7e255516da66fff9cc9a295a39ea185668d7f91fde0eaf56a18b04ae67ae468e1e509bc46 WHIRLPOOL d9a28dd96bf77051e6cf91a1b29c59fac716e14f3d3726867ecd9e43ac90d62d4ace0f0add7aff619f4933a8dc9e87734df3fcb5483db62bf99a77320d4e2f33
+DIST NVIDIA-Linux-x86-173.14.34-pkg0.run 14071464 SHA256 a873b7a28b1d83fcb7a97e4d5fcb471bb96bb5094bcd5e86c728ec22b49b258e
+DIST NVIDIA-Linux-x86-173.14.35-pkg0.run 14028887 SHA256 2d26100f7691047e424e1614deca0f1d862da5fa69e04e967f0c1dbb84ec729a
+DIST NVIDIA-Linux-x86-275.09.07.run 30930605 SHA256 27d1b2073c11bd56e423ed80bd22773f1f282c39ab3b76773144cfa680a1ff0c
+DIST NVIDIA-Linux-x86-280.13.run 32704856 SHA256 b222afe19c6310f1aa2a2574f27fa9e2b877738177daa60162bb5705758bac9b
+DIST NVIDIA-Linux-x86-285.05.09.run 33592492 SHA256 ce03fa99b62081b52bd5dae3594ac5942413ed530cda3d76a82f4ab0afd36f96
+DIST NVIDIA-Linux-x86-290.10.run 34691272 SHA256 99be8f53aa1f777445e5a4cac27acd7d85990db712b5c29caac865145fc5adaa
+DIST NVIDIA-Linux-x86-295.20.run 34641353 SHA256 0f9dc3d493053cffe37f72b6783edc6c14afd31532b43a7cf0bfce763cf2d500
+DIST NVIDIA-Linux-x86-295.33.run 34675369 SHA256 90a866c9c2f3904bc25b7a5829f8b40a419e60a79ad13c980b48d3bf89625a47
+DIST NVIDIA-Linux-x86-295.40.run 34668138 SHA256 ccd46574dd843a50327f50daa6f0b635ad7eca4a5b9a5fa963d0871bfa74ce2a
+DIST NVIDIA-Linux-x86-295.49.run 34716936 SHA256 f13b44725f4904ed3f5250d733b45b5815f54e8b588dfe6c6180918e80f35c6a
+DIST NVIDIA-Linux-x86-295.53.run 34718461 SHA256 0040096216ac6f8695743c9124a067787d30947f7c64f2734bac474f5af0b0a0
+DIST NVIDIA-Linux-x86-295.59.run 34730118 SHA256 084bbb76c57d5c2a5b780322a95dcc230ec6e25b4f6c176574a93621399ce5a0
+DIST NVIDIA-Linux-x86-302.17.run 34598956 SHA256 3525d3814361bd202998cea2962bb3d1bb3419206d02fd8ac30d61358c1a284f
+DIST NVIDIA-Linux-x86-304.22.run 35433519 SHA256 174be68a403f234cadd6dbac785459f7a7463989050fa4e6c92ed65b638ededb SHA512 885a0a8a7ecc387a9bbb806b2f36942d7bee2bdfdb784169490b72667db4218b76e19b4ebdecf107e1498f8e1d5544e3d44ae6b02cc6d6855431602e4afc3064 WHIRLPOOL ab691f2aded714b38afad1f6ff966dcb016cb409e4b78c37137aac439c06d2df112b74d72abf205526b65cae7d90a7e5f5081426d29e1cd310139511b77794c4
+DIST NVIDIA-Linux-x86-304.37.run 39349097 SHA256 ab3174a0c9ab37a8fc3f4a8fc1121d72fbdd5e00ddecf44f7dbd84bb8d51b337
+DIST NVIDIA-Linux-x86-304.64.run 39386363 SHA256 23464129f7ea5a00f724f67627206b322b6d08efb7134192a56ba50ea93d2252 SHA512 106e40ec6453c0f08c0ec926e5121357535395c5d97acfdaa3c1b95f9baa256d1797cde56e1fa696e267cd1d12fcb1624d6e60e28256d9658bfed12580669c5c WHIRLPOOL a6ab62b283963a417781d4d90c03f7a1b2afedb69d1e2e862bdc67c6e8148a29de396e362dea46a4024f65470ecc2f984b468df9ab784aca7327e80529af2bc7
+DIST NVIDIA-Linux-x86-304.88.run 39682604 SHA256 71e10294f073e31a387da4282b95cdde5fbfc996cb1c564f290eb0df1289b7cb SHA512 ba6f0236aead2f5161c94c7eaffb2497815ba1a7cbf872ae37d620d66533d4847acb6dfcc230e2b751aa9717ae552940ed6d3da1a9209aa54f6a810e3f551e49 WHIRLPOOL 9c2e0438630e86ca8c7aa2f26928113e5f15dcf808be8a4c2e937fd04b8d1aa7304bda714580834cc5ef4dc57304f41be62b55ee75545b9cfca3533b6db737e6
+DIST NVIDIA-Linux-x86-310.19.run 38581112 SHA256 85d082c06a1ea07f514d22c0de4d5d2af065bcac37c377c3d755904bbf780c2f SHA512 ef24e695b76b57cee1d13601c5856fe723da9da678e0f78739f0e291c5d00cea9e0da5b110f4125a79edd420127fed0a48883eaad591ed16e6660b139b7cb289 WHIRLPOOL 064bf26184b644210f565ad9b1b400abb26b9c8b61b519d2831ce04128fcc58c57e9474bb2ec5f3d935799857a1ca4c3273b68a36aca1d2285318f2679251f5e
+DIST NVIDIA-Linux-x86-313.18.run 38865783 SHA256 58e5e2191890ace94849444f5d2de4c2921dfe02cd97825d81a128754ff4488f SHA512 70ec92071de3aabe77ee5304a4c2c1b7eda0e2b44860f63b05c8c004aaf748c18b40e5f7558dd6bcb99e1e394557a2c189ca462400fdde28aee408a64b8b7e27 WHIRLPOOL 3f6506e17414a78d4dc7a69e52e34d5172529d061dd8aa7b7e31066281525a0cbfefd846b2bfdb21820ed3c6a0c1348fae4e0d7d21c82d6633e284f5a0dfbd52
+DIST NVIDIA-Linux-x86-313.30.run 38845860 SHA256 0a0f10979b1bca8e4a244e204b58aeb9a580924a9dd7b11b21d15abfe1ad49ad SHA512 c3b07e7186fcf5a1f3e73f4e9510dddff2a42c0202bc471a946e38e636af27b2d17206b7105a7a80179fc17ebceab6c2802ff6ddaabae9e16a930dfa1252a2db WHIRLPOOL 2d4402883a480ae3050af18f3fe1aec4110132aa4eda0ce9675f79471a526e8b90b9ebe6a0a5c76321474be6ace963520b903cf809835472649b095be757ec52
+DIST NVIDIA-Linux-x86-325.15.run 27409286 SHA256 3d790e4bfed24641f7cc76879144ab5d52b12271012ba381b0d33aa1a2e08775 SHA512 48052c3daa8748a7c43de1c24e00fdd3f94cebbe7f5efbb185a0472a1d0bbab8adfe377359ccdc6cd8e437a80506fdd551408237b0842c194a3497c43cf3487e WHIRLPOOL 387fb8af1a31cc295abe7b15fee7d5bc01c515603b178abe7f50864dbbf0685ca50f88e67359adc4af8e90caaeb1fba95aa6af9f54e6fced46c82c5cfc094390
+DIST NVIDIA-Linux-x86-96.43.20-pkg0.run 10323541 SHA256 bc778062cf745ee4916de77a702f702312d33eeb3b6f379b63e4366fa5197517
+DIST NVIDIA-Linux-x86_64-173.14.31-pkg2.run 18967067 SHA256 c56cfe43c4fa95102d099e4f1c4e75e58b57d73b4b36a858d54a2a339aad56d9 SHA512 fcb3f004495c8e3ef93b4229b2b64e8ee83a12f2cc5ba1c33bf486b6bf8687e1e1d5b45c2da8721422f6c2190150f7f86bd4b9ec0987d4440343fafb9e18c208 WHIRLPOOL 585728e3d03b1a9cf90fd80c413f2dd432870f49df60bd1335ec0c7143b59005819b4fd655587b0f76d19c28eaa946d6893c4358b8ec7e33000486429684cd1f
+DIST NVIDIA-Linux-x86_64-173.14.34-pkg2.run 19769116 SHA256 30dcdd3cfba4f7d2b5f4977faea573463700b44252e46fb43402e269183dec3e
+DIST NVIDIA-Linux-x86_64-173.14.35-pkg2.run 19767039 SHA256 5af64646b098021b550242fe8eb03817f862af0442023545d1295027f589595f
+DIST NVIDIA-Linux-x86_64-275.09.07.run 51646025 SHA256 747c09b0a0a8d60e1b5fee49fb1ea07ee5812f8e85a87b2403011af6de58164d
+DIST NVIDIA-Linux-x86_64-280.13.run 55011572 SHA256 98a08c7d943912a178a9bbe419db60634088e5262ae9053bf2fe730984e5a012
+DIST NVIDIA-Linux-x86_64-285.05.09.run 56674677 SHA256 7159a1f7e898b50dd49ea2273ac6facb870546ad5496bf70c6fbe1642d2c4970
+DIST NVIDIA-Linux-x86_64-290.10.run 58334192 SHA256 34a2ab07f4ae7afdeb2c8415f3f37c1099e6690eb25f3dbef92eca771f7ce4cd
+DIST NVIDIA-Linux-x86_64-295.20.run 58403208 SHA256 3b84fdeae335c047193f68a1da26f2a736461c35cfe94566fc7ace1e5762d34c
+DIST NVIDIA-Linux-x86_64-295.33.run 58435170 SHA256 4e939bac1ebc03c6439969d638540b99900b0fe4e4799b4186e5ff9521d37b73
+DIST NVIDIA-Linux-x86_64-295.40.run 58446405 SHA256 f6d5ae338b3b8ac6c512d06b335010934a62728f181a1fa5253aa84b7bf45e7a
+DIST NVIDIA-Linux-x86_64-295.49.run 58521195 SHA256 61dc9623ea1981f801d97de7c67c32b7e4f7ef4aaa6744910967cb634d9ace62
+DIST NVIDIA-Linux-x86_64-295.53.run 58522001 SHA256 4525e994a0d0a8cd776415401423e7de3985923637642955c3fe50a3d047d4ca
+DIST NVIDIA-Linux-x86_64-295.59.run 58529480 SHA256 4b1d96389abd2b804ad470c5189142a02ee4c82c1ac56cea37ecb45e8051313e
+DIST NVIDIA-Linux-x86_64-302.17.run 58653717 SHA256 5cf9059ebb70ade99e5621c0a605ed5bbb6c274f7c52a7ef40342ceb41b381fc
+DIST NVIDIA-Linux-x86_64-304.22.run 60141600 SHA256 4c1b6f7dcda007622bb5e243b858abdb3881d5d5befdc617b23393545d9c96fd SHA512 06dac9e042baa836b1f2d9cd360b2ca3545dcff4b382ed9d29e8e442ab5e9dc241b5f75250c3dce73e0e7958bccaa16ac48415ae5f2fc7cbc65689bd7a6e7640 WHIRLPOOL a7d1a1abe5cdedc743b43fa1627dc9094ab32cea3645cdd5cfd53a33929d0a48f4d3efaa7311ff6f0ba99d31a112e6872cb4cad3d1cafbd996646020d8dd7f40
+DIST NVIDIA-Linux-x86_64-304.37.run 64075318 SHA256 cae75158047d0b97ea48f269fd2903a6731f53b978a1065720343436c97ca9c2
+DIST NVIDIA-Linux-x86_64-304.64.run 67695715 SHA256 b3c3bb7f136ccd978c9c5a511a02199ec2498c4243baae19ac68e5d905ca5340 SHA512 77241676900bf5f9fa93f5628ae9c5ffc35c41de31fbb9e777e55204cd1183d344d7ad5d00e52efe5caa91330f6157d9d2cba66764256673dbfbe61fe6797de3 WHIRLPOOL a8744fb747569e5106d486200231f0caf99ac3896b8cc358ea581486cf98506ed21b54407665acb461c40fcd89cfa04ac540b6c959856aaf14979abce75999d1
+DIST NVIDIA-Linux-x86_64-304.88.run 68041437 SHA256 c1a73211566b085214b0ad1824733aa56d09c6139f729feebd0eff44f6113da3 SHA512 8a907f9ed307b1e4b5563a9aba9d6c1c036885cd64a4a229d6831eb7a855921971e652b7940333e366d5088f97cf3596fb739853b3c3cf94446ee0cea6164ab2 WHIRLPOOL 2e43479bb52d1dcbe1007cda779ab21ed064883769358a09bdd765e55f6b35a855a51006e070d33ddd2a3808802cdb4fa2ae63cc7cc189561934d00574492ca8
+DIST NVIDIA-Linux-x86_64-310.19.run 68022245 SHA256 3326cf9eb432a10fee5cb663132cd6c175813d0225750ef237dcc7feefd20fca SHA512 035a0cb62f4d307683ada7fff380fbe8a9433cee0ee6a8b1986e9d59b55a23484305903f84e77fb6a7440e06efce012feae1da658a304e790e2022c028541a69 WHIRLPOOL 523a9ca07d18cfa1afb1f4e527cecf1c4778650eaa81d1e627fd1c65b4ab459d02e5ce726d0190c57e677c6ef3c22afef8c6aaa99892731faf3415138e9e7635
+DIST NVIDIA-Linux-x86_64-313.18.run 68386461 SHA256 9aaf6ce2fb08f72b2ab4f7a2d9fc5af8216ac263fa4883deec3844f34ea7ba3a SHA512 d1017763f6cef96a443f9d7890ca940d742cd17fb8b1d926440483987e22d350a57bcce98962d6130c5e2ac697926dbb560f148f45ba7659ff3412443b53473c WHIRLPOOL 0180fff2e5e7bd9fb731fdee3c81e1b26a7962d989e998dc9fa67e4a836526e10e6de01cfc1e6650d9ff4a5cc334b5c27740df309b3dd403dfd13795c48d6f29
+DIST NVIDIA-Linux-x86_64-313.30.run 68379307 SHA256 72317f2e4c459c33c764e3283deb3e1615b1852ead1f9bfad82148e120506022 SHA512 ae4439697e47eff98e06e5f77de979bdce096f95efa8bdee9c6fc939b42b5ce3b11c23d7691e974cf0f6f783eeb0fb694670636538352a0e8979f88d687f1f86 WHIRLPOOL c12a68fcc4d78f3856d87a86cef43c3632c0db1b6c5799b6482584d4d83a7cc863b9b394a501b96534175e11663c602d72f6ffa49f85461eaf4324dc61e654ff
+DIST NVIDIA-Linux-x86_64-325.15.run 48034648 SHA256 01446fbd94f6eb3b2e1b3d3f2b06970bf470c3ee2cb1838b3d0c2416e6c74500 SHA512 323cbd8e6f3ce29a1556b83b2fb3456f919964ede1cbee4ddaa3539ab75eda7abe26b96ba500462eed2ade4163b8de20d1db6ea987af923710f0e1a60e432e83 WHIRLPOOL 7c05717a2cfcb003a8c1f9fc5f5e24cfd5216aca7167ee8f29b60c43262fc61afab9619147ee07cb2541aa1d55b13a730b52c90979b7970df709fb659fe782ff
+DIST NVIDIA-Linux-x86_64-96.43.20-pkg2.run 14572507 SHA256 562107a262e250b836966e29851628f6162ee2857d53252221c780d9b201de18
+EBUILD nvidia-drivers-173.14.31.ebuild 5562 SHA256 b159128f017cdb21513d46a76dfa6500ef0db483caa3d614a28bdaa51f083398 SHA512 c34ef34d443f31bb02b41e809c6414359882684cb5ed3ae9e484feb421a254d2edfbf8763dd7008534babd5440f33f0ded61400d1975314e9beadfa50ac34df5 WHIRLPOOL efb4fbf62503500710c3ad768be155cb136172687af5c5f9a04d089c670e7435e90397dd80e74de1393358b2a7e957658735e50b3824829ed71dee9f3e116bc6
+EBUILD nvidia-drivers-173.14.34.ebuild 5822 SHA256 5ebfe7996d5ff32b05f1cfcfc7ec97d6b5e8c9853861f3b4c6e32677b93da15d SHA512 5f72430412008986d5597e0f25c415be81c80d7507a194c748a8341076e878bb6f40b24ece667e92cfcd2dab00b22d91ff85508d5a31678926a07fc1dc0598b8 WHIRLPOOL 3840deaeb534b10bb9a1155fe8395c96366e995390ade2d20cc712705740b9f2d5eaaa81e0aff197d10c98851ab2e2408d3fdfd21e602ca504ab13dffd5e6ca8
+EBUILD nvidia-drivers-173.14.35.ebuild 5822 SHA256 5ebfe7996d5ff32b05f1cfcfc7ec97d6b5e8c9853861f3b4c6e32677b93da15d SHA512 5f72430412008986d5597e0f25c415be81c80d7507a194c748a8341076e878bb6f40b24ece667e92cfcd2dab00b22d91ff85508d5a31678926a07fc1dc0598b8 WHIRLPOOL 3840deaeb534b10bb9a1155fe8395c96366e995390ade2d20cc712705740b9f2d5eaaa81e0aff197d10c98851ab2e2408d3fdfd21e602ca504ab13dffd5e6ca8
+EBUILD nvidia-drivers-275.09.07.ebuild 5459 SHA256 d6f5fbf5c6da10e99f622d69d9f8bb1b612160dc238839ba77bfb078b4e89ae9 SHA512 8b228d2175740bc6ecec275985059816111f16c1cd3528c90d62fcf1364e56fad8787924d35b51d7a080b40a6b6ce714cb8b85dfa46ff857028c208f2e7c9ad7 WHIRLPOOL d029d3d0549c7bcb16f6f0712366ccc406f8a1bed8987b6dbf56f010c87776d8c6693c2f891487dc1b023f45bfd11777a1d4d969a83aff079e92c610c64d0a9f
+EBUILD nvidia-drivers-280.13.ebuild 5533 SHA256 608ad531cc444b4fde265af01834d9c72d836c92c34a0441fc42608f1b42ac6d SHA512 d6371d637c4057f514d6afb6519b9b4d988ac005101d7b57029634c7c87c32656b73d11f54a95966d4d8255ab6da5c1b7969d745d13884361a43fbe759c74b64 WHIRLPOOL 0f0d236a07929d7e8daa531c720b015f00f283b75c3d9846dd31e801c2beef5deb5b3fc0acdc183953adbcb68f6a265c272d253b197938e4372c320e6fd0b46d
+EBUILD nvidia-drivers-285.05.09.ebuild 5459 SHA256 d6f5fbf5c6da10e99f622d69d9f8bb1b612160dc238839ba77bfb078b4e89ae9 SHA512 8b228d2175740bc6ecec275985059816111f16c1cd3528c90d62fcf1364e56fad8787924d35b51d7a080b40a6b6ce714cb8b85dfa46ff857028c208f2e7c9ad7 WHIRLPOOL d029d3d0549c7bcb16f6f0712366ccc406f8a1bed8987b6dbf56f010c87776d8c6693c2f891487dc1b023f45bfd11777a1d4d969a83aff079e92c610c64d0a9f
+EBUILD nvidia-drivers-290.10.ebuild 5542 SHA256 c541fd027041539c16214b10e5e3ebd103b7a1487bf57aefa7a0842ed862acfc SHA512 18e5169d8f46028547af0b17391cef60295e2a0782fc7f94f549b9801d8445214d2aa7af570c608b98081faa75a446c3f2a6c6846b03c9101c45507e1461e983 WHIRLPOOL 41da7159daa32e57658e0675f9d0c5fdf26ae578dfaac799bdff55611f54d8800cd17b2ade5b2cebc514ad9775de6d51a7578c36191fdf5cccd4d315602fdf0c
+EBUILD nvidia-drivers-295.20.ebuild 5459 SHA256 d6f5fbf5c6da10e99f622d69d9f8bb1b612160dc238839ba77bfb078b4e89ae9 SHA512 8b228d2175740bc6ecec275985059816111f16c1cd3528c90d62fcf1364e56fad8787924d35b51d7a080b40a6b6ce714cb8b85dfa46ff857028c208f2e7c9ad7 WHIRLPOOL d029d3d0549c7bcb16f6f0712366ccc406f8a1bed8987b6dbf56f010c87776d8c6693c2f891487dc1b023f45bfd11777a1d4d969a83aff079e92c610c64d0a9f
+EBUILD nvidia-drivers-295.33.ebuild 5699 SHA256 3c9ddccc632ce94f53f26b0211b4c0c0b4c24182262ab015ded84d562009c33b SHA512 76aba3c4b55a6ccfe815a3cd9ec2873da9328aaac282428839cdab5d133f878d3172c457338d6b0906e294e20ddf1bb3e8663fbdcc3370cdb3a43fab8cf13ad1 WHIRLPOOL cff6e71156996dab3876f39f3d089786cb35fdb61718adb9d923f9f04b00f4244107ed4f4a1aff776c9d9a2a2eb2bf73181dd58e0eb21002918140aa6feb0ac8
+EBUILD nvidia-drivers-295.40.ebuild 5699 SHA256 3c9ddccc632ce94f53f26b0211b4c0c0b4c24182262ab015ded84d562009c33b SHA512 76aba3c4b55a6ccfe815a3cd9ec2873da9328aaac282428839cdab5d133f878d3172c457338d6b0906e294e20ddf1bb3e8663fbdcc3370cdb3a43fab8cf13ad1 WHIRLPOOL cff6e71156996dab3876f39f3d089786cb35fdb61718adb9d923f9f04b00f4244107ed4f4a1aff776c9d9a2a2eb2bf73181dd58e0eb21002918140aa6feb0ac8
+EBUILD nvidia-drivers-295.49.ebuild 5699 SHA256 3c9ddccc632ce94f53f26b0211b4c0c0b4c24182262ab015ded84d562009c33b SHA512 76aba3c4b55a6ccfe815a3cd9ec2873da9328aaac282428839cdab5d133f878d3172c457338d6b0906e294e20ddf1bb3e8663fbdcc3370cdb3a43fab8cf13ad1 WHIRLPOOL cff6e71156996dab3876f39f3d089786cb35fdb61718adb9d923f9f04b00f4244107ed4f4a1aff776c9d9a2a2eb2bf73181dd58e0eb21002918140aa6feb0ac8
+EBUILD nvidia-drivers-295.53.ebuild 5699 SHA256 3c9ddccc632ce94f53f26b0211b4c0c0b4c24182262ab015ded84d562009c33b SHA512 76aba3c4b55a6ccfe815a3cd9ec2873da9328aaac282428839cdab5d133f878d3172c457338d6b0906e294e20ddf1bb3e8663fbdcc3370cdb3a43fab8cf13ad1 WHIRLPOOL cff6e71156996dab3876f39f3d089786cb35fdb61718adb9d923f9f04b00f4244107ed4f4a1aff776c9d9a2a2eb2bf73181dd58e0eb21002918140aa6feb0ac8
+EBUILD nvidia-drivers-295.59.ebuild 5699 SHA256 3c9ddccc632ce94f53f26b0211b4c0c0b4c24182262ab015ded84d562009c33b SHA512 76aba3c4b55a6ccfe815a3cd9ec2873da9328aaac282428839cdab5d133f878d3172c457338d6b0906e294e20ddf1bb3e8663fbdcc3370cdb3a43fab8cf13ad1 WHIRLPOOL cff6e71156996dab3876f39f3d089786cb35fdb61718adb9d923f9f04b00f4244107ed4f4a1aff776c9d9a2a2eb2bf73181dd58e0eb21002918140aa6feb0ac8
+EBUILD nvidia-drivers-302.17.ebuild 5699 SHA256 3c9ddccc632ce94f53f26b0211b4c0c0b4c24182262ab015ded84d562009c33b SHA512 76aba3c4b55a6ccfe815a3cd9ec2873da9328aaac282428839cdab5d133f878d3172c457338d6b0906e294e20ddf1bb3e8663fbdcc3370cdb3a43fab8cf13ad1 WHIRLPOOL cff6e71156996dab3876f39f3d089786cb35fdb61718adb9d923f9f04b00f4244107ed4f4a1aff776c9d9a2a2eb2bf73181dd58e0eb21002918140aa6feb0ac8
+EBUILD nvidia-drivers-304.22.ebuild 5699 SHA256 3c9ddccc632ce94f53f26b0211b4c0c0b4c24182262ab015ded84d562009c33b SHA512 76aba3c4b55a6ccfe815a3cd9ec2873da9328aaac282428839cdab5d133f878d3172c457338d6b0906e294e20ddf1bb3e8663fbdcc3370cdb3a43fab8cf13ad1 WHIRLPOOL cff6e71156996dab3876f39f3d089786cb35fdb61718adb9d923f9f04b00f4244107ed4f4a1aff776c9d9a2a2eb2bf73181dd58e0eb21002918140aa6feb0ac8
+EBUILD nvidia-drivers-304.37.ebuild 5194 SHA256 9a59cc5bedb79f5eeac96fe9aee931eee160fb1eb2e1c8f581d363b135212ca1 SHA512 ade6904be753f54e6f7d11c7101040826b8d1358d5232c88ec7f7bccc7266f0d98abb97097b35e57743a9b5bb6ade15c9736484a226540cd2c0d370a612eaaf9 WHIRLPOOL 1577089a20d3e65bd160170e12bbe562e71e923e18aa9d59c59183866f8810fafd0d326f4bd427031383c90c989c10ab3af85ce0427cd4b6a851bc4d9ed9ed59
+EBUILD nvidia-drivers-304.64.ebuild 12742 SHA256 bae8fe02ef6129f3015c37d976a6812529ca402d34dc17eec4f51f32d8e8d991 SHA512 b2d769d594f39ae0a8afa70f3113b7f4a755925e536fdc2b44c4313059e1eed74146844acf93bbb05da481272d1be897c977726d500cb395b92f796ef39effc8 WHIRLPOOL 9cec9dfa9056512bf4b9e7297cf28e49e3688bc97616dfe62bcb35e0aff84829bdd5213c6e779510e83a5e4a00d493737648f944519b7b7dc18dd58eb9bd325d
+EBUILD nvidia-drivers-304.88.ebuild 5534 SHA256 a5f3fc0447e44ef665327e6c6f81fd5c6e42b411307ba16f5c162c49b59ed770 SHA512 7b4abd4e2b14bb775ff9439b771d910a0fbc5fa542cee5cf06dea09d3567c3a2caea2d05738937842a322d050d4e3e43850b586f0dad3cea1670c2abccd13070 WHIRLPOOL 31cf94b729e6fa89a5c906b54c99f13fd2f4c7460c625f72935978654b324f03a4b1c4d67358d9898c855c43d8450964a059ec0da3dcb6d7345c431383805146
+EBUILD nvidia-drivers-310.19.ebuild 5194 SHA256 9a59cc5bedb79f5eeac96fe9aee931eee160fb1eb2e1c8f581d363b135212ca1 SHA512 ade6904be753f54e6f7d11c7101040826b8d1358d5232c88ec7f7bccc7266f0d98abb97097b35e57743a9b5bb6ade15c9736484a226540cd2c0d370a612eaaf9 WHIRLPOOL 1577089a20d3e65bd160170e12bbe562e71e923e18aa9d59c59183866f8810fafd0d326f4bd427031383c90c989c10ab3af85ce0427cd4b6a851bc4d9ed9ed59
+EBUILD nvidia-drivers-313.18.ebuild 12331 SHA256 bac39af82126d68e14a6ee565283fa44c9e01e8266a712ca96a959c552af4cf1 SHA512 800513f01ba2724f9d463b30731b4dd43bb032a1a344857feceebf7f5b9a49455e7fd08efe729902307771b235c018875a49216dc54216415423186ad9bd9b45 WHIRLPOOL e292caf68db2aa4c958a040e706dda09d1e0d70291989a712400905c1301f5b5801bac7519e950f0266e56f2e8dfe0360a0a1b8831ab11cdf1838ed7953c0a9d
+EBUILD nvidia-drivers-313.30.ebuild 5446 SHA256 8006292fb618edc9830e2374af58e409ab0a1fa4e8a7efd46196f72651e28b2a SHA512 da272cc2007ddebcd9a6f1e28625023766052a9656c313a694f7a8d2c903bc13a93e32ee56fc515117d1a4c6d5b96bb900f311dd1d9a02c433852d153d9b5cae WHIRLPOOL 9d3e7eaf35aefac774ef5d5b0d32aaa05359e9cf428c96e5e0df00774faf5bdf6eecee50319c0294d66b8120328dca426f79e3c2e4f921d2ce9976134a271c48
+EBUILD nvidia-drivers-325.15.ebuild 5519 SHA256 b22c16ffc827d78f70817ba80486ad395489b10d35b8e05be2e741416ff5c393 SHA512 a815a04e9e1776a7e5282de03143c9cc474e747f2c23c048d72883d6b1cbac34500bebe13d2a7bf82c22c0f98fb926a674f34ca476e4b0317c690394380cc430 WHIRLPOOL c2fff2f946bfe5dc7da16c0bdb6f23cfda350e075688d9cbad4ab344b67b676c3b7488a73cff9cd0fac570d4a7ac726718dc689ca4bae4bce6224909a484cae1
+EBUILD nvidia-drivers-96.43.20.ebuild 5562 SHA256 b159128f017cdb21513d46a76dfa6500ef0db483caa3d614a28bdaa51f083398 SHA512 c34ef34d443f31bb02b41e809c6414359882684cb5ed3ae9e484feb421a254d2edfbf8763dd7008534babd5440f33f0ded61400d1975314e9beadfa50ac34df5 WHIRLPOOL efb4fbf62503500710c3ad768be155cb136172687af5c5f9a04d089c670e7435e90397dd80e74de1393358b2a7e957658735e50b3824829ed71dee9f3e116bc6
+MISC metadata.xml 340 SHA256 a8c83e426e095e92dc8d7553bde38172a3bb73717ec0469c78dba0a46f86194d SHA512 757fe60892996ee752008276a385ed2ba785837723beac28744e414d19e2312f956e300559519005ff3d465db2593e61804e6b7907e1faaf551d2633cf09c6aa WHIRLPOOL 483042f678dacfba03244f676d5b47035de23751c6cf306c87d0ff12856ca3dd8ce10bc826bdc90bcb1b9be8a673cc68fbe506998bac564f0a55d7bf64481fe8
diff --git a/x11-drivers/nvidia-drivers/files/10nvidia b/x11-drivers/nvidia-drivers/files/10nvidia
new file mode 100644
index 00000000..f1bc2fef
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/files/10nvidia
@@ -0,0 +1 @@
+__GL_NO_DSO_FINALIZER="1"
diff --git a/x11-drivers/nvidia-drivers/files/256.35-unified-arch.patch b/x11-drivers/nvidia-drivers/files/256.35-unified-arch.patch
new file mode 100644
index 00000000..da92b8f0
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/files/256.35-unified-arch.patch
@@ -0,0 +1,30 @@
+diff -NuarpbB NVIDIA-Linux-x86-256.25-ori/kernel/conftest.sh NVIDIA-Linux-x86-256.25/kernel/conftest.sh
+--- NVIDIA-Linux-x86-256.25-ori/kernel/conftest.sh 2010-05-19 05:38:57.000000000 +0200
++++ NVIDIA-Linux-x86-256.25/kernel/conftest.sh 2010-05-22 02:13:56.000000000 +0200
+@@ -101,7 +101,7 @@ build_cflags() {
+
+ if [ "$OUTPUT" != "$SOURCES" ]; then
+ MACH_CFLAGS="-I$HEADERS/asm-$ARCH/mach-default"
+- if [ "$ARCH" = "i386" -o "$ARCH" = "x86_64" ]; then
++ if [ "$ARCH" = "i386" -o "$ARCH" = "x86_64" -o "$ARCH" = "x86" ]; then
+ MACH_CFLAGS="$MACH_CFLAGS -I$HEADERS/asm-x86/mach-default"
+ MACH_CFLAGS="$MACH_CFLAGS -I$SOURCES/arch/x86/include/asm/mach-default"
+ fi
+@@ -110,7 +110,7 @@ build_cflags() {
+ fi
+ else
+ MACH_CFLAGS="-I$HEADERS/asm/mach-default"
+- if [ "$ARCH" = "i386" -o "$ARCH" = "x86_64" ]; then
++ if [ "$ARCH" = "i386" -o "$ARCH" = "x86_64" -o "$ARCH" = "x86" ]; then
+ MACH_CFLAGS="$MACH_CFLAGS -I$HEADERS/asm-x86/mach-default"
+ MACH_CFLAGS="$MACH_CFLAGS -I$SOURCES/arch/x86/include/asm/mach-default"
+ fi
+@@ -121,7 +121,7 @@ build_cflags() {
+
+ CFLAGS="$BASE_CFLAGS $MACH_CFLAGS $OUTPUT_CFLAGS -I$HEADERS $AUTOCONF_CFLAGS"
+
+- if [ "$ARCH" = "i386" -o "$ARCH" = "x86_64" ]; then
++ if [ "$ARCH" = "i386" -o "$ARCH" = "x86_64" -o "$ARCH" = "x86" ]; then
+ CFLAGS="$CFLAGS -I$SOURCES/arch/x86/include"
+ fi
+ if [ -n "$BUILD_PARAMS" ]; then
diff --git a/x11-drivers/nvidia-drivers/files/eblits/donvidia.eblit b/x11-drivers/nvidia-drivers/files/eblits/donvidia.eblit
new file mode 100644
index 00000000..75b39cfb
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/files/eblits/donvidia.eblit
@@ -0,0 +1,21 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/files/eblits/donvidia.eblit,v 1.1 2008/12/18 18:27:35 cardoe Exp $
+
+# Install nvidia library:
+# the first parameter is the place where to install it
+# the second parameter is the base name of the library
+# the third parameter is the provided soversion
+donvidia() {
+ dodir $1
+ exeinto $1
+
+ libname=$(basename $2)
+
+ # libnvidia-cfg.so is no longer supplied in lib32; step over it gracefully
+ if [ -e $2.$3 ] ; then
+ doexe $2.$3
+ dosym ${libname}.$3 $1/${libname}
+ [[ $3 != "1" ]] && dosym ${libname}.$3 $1/${libname}.1
+ fi
+}
diff --git a/x11-drivers/nvidia-drivers/files/eblits/mtrr_check.eblit b/x11-drivers/nvidia-drivers/files/eblits/mtrr_check.eblit
new file mode 100644
index 00000000..b14df34b
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/files/eblits/mtrr_check.eblit
@@ -0,0 +1,19 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/files/eblits/mtrr_check.eblit,v 1.1 2008/12/18 18:27:35 cardoe Exp $
+
+mtrr_check() {
+ ebegin "Checking for MTRR support"
+ linux_chkconfig_present MTRR
+ eend $?
+
+ if [[ $? -ne 0 ]] ; then
+ eerror "Please enable MTRR support in your kernel config, found at:"
+ eerror
+ eerror " Processor type and features"
+ eerror " [*] MTRR (Memory Type Range Register) support"
+ eerror
+ eerror "and recompile your kernel ..."
+ die "MTRR support not detected!"
+ fi
+}
diff --git a/x11-drivers/nvidia-drivers/files/eblits/src_install-libs.eblit b/x11-drivers/nvidia-drivers/files/eblits/src_install-libs.eblit
new file mode 100644
index 00000000..e48d11ce
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/files/eblits/src_install-libs.eblit
@@ -0,0 +1,116 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distribnuted under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/files/eblits/src_install-libs.eblit,v 1.1 2008/12/18 18:27:35 cardoe Exp $
+#
+src_install-libs() {
+ local pkglibdir=lib
+ local inslibdir=$(get_libdir)
+
+ if [[ ${#} -eq 2 ]] ; then
+ pkglibdir=${1}
+ inslibdir=${2}
+ elif has_multilib_profile && [[ ${ABI} == "x86" ]] ; then
+ pkglibdir=lib32
+ fi
+
+ local usrpkglibdir=usr/${pkglibdir}
+ local libdir=usr/X11R6/${pkglibdir}
+ local drvdir=${libdir}/modules/drivers
+ local extdir=${libdir}/modules/extensions
+ local incdir=usr/include/GL
+ local sover=${PV}
+ local NV_ROOT="/usr/${inslibdir}/opengl/nvidia"
+ local NO_TLS_ROOT="${NV_ROOT}/no-tls"
+ local TLS_ROOT="${NV_ROOT}/tls"
+ local X11_LIB_DIR="/usr/${inslibdir}/xorg"
+
+ if use x86-fbsd; then
+ # on FreeBSD everything is on obj/
+ pkglibdir=obj
+ usrpkglibdir=obj
+ x11pkglibdir=obj
+ drvdir=obj
+ extdir=obj
+
+ # don't ask me why the headers are there.. glxext.h is missing
+ incdir=doc
+
+ # on FreeBSD it has just .1 suffix
+ sover=1
+ fi
+
+ # The GLX libraries
+ donvidia ${NV_ROOT}/lib ${usrpkglibdir}/libGL.so ${sover}
+ donvidia ${NV_ROOT}/lib ${usrpkglibdir}/libGLcore.so ${sover}
+
+ donvidia ${NV_ROOT}/lib ${usrpkglibdir}/libnvidia-cfg.so ${sover}
+
+ dodir ${NO_TLS_ROOT}
+ donvidia ${NO_TLS_ROOT} ${usrpkglibdir}/libnvidia-tls.so ${sover}
+
+ if ! use x86-fbsd; then
+ donvidia ${TLS_ROOT} ${usrpkglibdir}/tls/libnvidia-tls.so ${sover}
+ fi
+
+ if want_tls ; then
+ dosym ../tls/libnvidia-tls.so ${NV_ROOT}/lib
+ dosym ../tls/libnvidia-tls.so.1 ${NV_ROOT}/lib
+ dosym ../tls/libnvidia-tls.so.${sover} ${NV_ROOT}/lib
+ else
+ dosym ../no-tls/libnvidia-tls.so ${NV_ROOT}/lib
+ dosym ../no-tls/libnvidia-tls.so.1 ${NV_ROOT}/lib
+ dosym ../no-tls/libnvidia-tls.so.${sover} ${NV_ROOT}/lib
+ fi
+
+ if ! use x86-fbsd; then
+ # Install the .la file for libtool, to prevent e.g. bug #176423
+ [ -f "${FILESDIR}/libGL.la-r2" ] || die "libGL.la-r2 missing in FILESDIR"
+ local ver1=$(get_version_component_range 1)
+ local ver2=$(get_version_component_range 2)
+ local ver3=$(get_version_component_range 3)
+ sed -e "s:\${PV}:${PV}:" \
+ -e "s:\${ver1}:${ver1}:" \
+ -e "s:\${ver2}:${ver2}:" \
+ -e "s:\${ver3}:${ver3}:" \
+ -e "s:\${libdir}:${inslibdir}:" \
+ "${FILESDIR}"/libGL.la-r2 > "${D}"/${NV_ROOT}/lib/libGL.la
+ fi
+
+ exeinto ${X11_LIB_DIR}/modules/drivers
+
+ [[ -f ${drvdir}/nvidia_drv.so ]] && \
+ doexe ${drvdir}/nvidia_drv.so
+
+ insinto /usr/${inslibdir}
+ [[ -f ${libdir}/libXvMCNVIDIA.a ]] && \
+ doins ${libdir}/libXvMCNVIDIA.a
+ exeinto /usr/${inslibdir}
+ # fix Bug 131315
+ [[ -f ${libdir}/libXvMCNVIDIA.so.${PV} ]] && \
+ doexe ${libdir}/libXvMCNVIDIA.so.${PV} && \
+ dosym libXvMCNVIDIA.so.${PV} \
+ /usr/${inslibdir}/libXvMCNVIDIA.so
+
+ exeinto ${NV_ROOT}/extensions
+ [[ -f ${libdir}/modules/libnvidia-wfb.so.${sover} ]] && \
+ newexe ${libdir}/modules/libnvidia-wfb.so.${sover} libwfb.so
+ [[ -f ${extdir}/libglx.so.${sover} ]] && \
+ newexe ${extdir}/libglx.so.${sover} libglx.so
+
+ # Includes
+ insinto ${NV_ROOT}/include
+ doins ${incdir}/*.h
+
+ #cuda
+ if [[ -f usr/include/cuda/cuda.h ]]; then
+ dodir /usr/include/cuda
+ insinto /usr/include/cuda
+ doins usr/include/cuda/*.h
+
+ if [[ -f usr/${pkglibdir}/libcuda.so.${PV} ]]; then
+ dolib.so usr/${pkglibdir}/libcuda.so.${PV}
+ dosym libcuda.so.${PV} /usr/${inslibdir}/libcuda.so.1
+ dosym libcuda.so.1 /usr/${inslibdir}/libcuda.so
+ fi
+ fi
+}
diff --git a/x11-drivers/nvidia-drivers/files/eblits/want_tls.eblit b/x11-drivers/nvidia-drivers/files/eblits/want_tls.eblit
new file mode 100644
index 00000000..4debb85d
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/files/eblits/want_tls.eblit
@@ -0,0 +1,33 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/files/eblits/want_tls.eblit,v 1.1 2008/12/18 18:27:35 cardoe Exp $
+
+want_tls() {
+ # For uclibc or anything non glibc, return false
+ has_version sys-libs/glibc || return 1
+
+ # Old versions of glibc were lt/no-tls only
+ has_version '<sys-libs/glibc-2.3.2' && return 1
+
+ if use x86 ; then
+ case ${CHOST/-*} in
+ i486|i586|i686) ;;
+ *) return 1 ;;
+ esac
+ fi
+
+ # If we've got nptl, we've got tls
+ built_with_use --missing true sys-libs/glibc nptl && return 0
+
+ # 2.3.5 turned off tls for linuxthreads glibc on i486 and i586
+ if use x86 && has_version '>=sys-libs/glibc-2.3.5' ; then
+ case ${CHOST/-*} in
+ i486|i586) return 1 ;;
+ esac
+ fi
+
+ # These versions built linuxthreads version to support tls, too
+ has_version '>=sys-libs/glibc-2.3.4.20040619-r2' && return 0
+
+ return 1
+}
diff --git a/x11-drivers/nvidia-drivers/files/libGL.la-r2 b/x11-drivers/nvidia-drivers/files/libGL.la-r2
new file mode 100644
index 00000000..863d1844
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/files/libGL.la-r2
@@ -0,0 +1,32 @@
+# libGL.la - a libtool library file
+# Generated by ltmain.sh - GNU libtool 1.4 (1.920 2001/04/24 23:26:18)
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname='libGL.so.1'
+
+# Names of this library.
+library_names='libGL.so.${PV} libGL.so.1 libGL.so'
+
+# The name of the static archive.
+old_library=''
+
+# Libraries that this one depends upon.
+dependency_libs='-L/usr/${libdir} -lm -lX11 -lXext -ldl'
+
+# Version information for libGL.
+current=${ver1}
+age=${ver2}
+revision=${ver3}
+
+# Is this an already installed library?
+installed=yes
+
+# Files to dlopen/dlpreopen
+dlopen=''
+dlpreopen=''
+
+# Directory that this library needs to be installed in:
+libdir='/usr/${libdir}'
diff --git a/x11-drivers/nvidia-drivers/files/make-use-of-the-new-uapi-framework.patch b/x11-drivers/nvidia-drivers/files/make-use-of-the-new-uapi-framework.patch
new file mode 100644
index 00000000..b408b6ae
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/files/make-use-of-the-new-uapi-framework.patch
@@ -0,0 +1,46 @@
+From 1e3d34ce7d8c4912c08386589843fcc4ba4d38bf Mon Sep 17 00:00:00 2001
+From: Alberto Milone <alberto.milone@canonical.com>
+Date: Wed, 7 Nov 2012 12:03:46 +0100
+Subject: [PATCH 1/2] Make use of the new uapi framework
+
+---
+ conftest.sh | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/conftest.sh b/conftest.sh
+index 388e268..8eff4d7 100755
+--- a/conftest.sh
++++ b/conftest.sh
+@@ -20,6 +20,7 @@ ARCH=$3
+ ISYSTEM=`$CC -print-file-name=include 2> /dev/null`
+ SOURCES=$4
+ HEADERS=$SOURCES/include
++HEADERSA=$SOURCES/include/uapi
+ OUTPUT=$5
+ XEN_PRESENT=1
+
+@@ -118,7 +119,7 @@ build_cflags() {
+ fi
+ fi
+
+- CFLAGS="$CFLAGS $OUTPUT_CFLAGS -I$HEADERS $AUTOCONF_CFLAGS"
++ CFLAGS="$CFLAGS $OUTPUT_CFLAGS -I$HEADERS -I$HEADERSA $AUTOCONF_CFLAGS"
+
+ test_xen
+
+@@ -146,10 +147,10 @@ build_cflags() {
+ fi
+ fi
+
+- CFLAGS="$BASE_CFLAGS $MACH_CFLAGS $OUTPUT_CFLAGS -I$HEADERS $AUTOCONF_CFLAGS"
++ CFLAGS="$BASE_CFLAGS $MACH_CFLAGS $OUTPUT_CFLAGS -I$HEADERS -I$HEADERSA $AUTOCONF_CFLAGS"
+
+ if [ "$ARCH" = "i386" -o "$ARCH" = "x86_64" ]; then
+- CFLAGS="$CFLAGS -I$SOURCES/arch/x86/include -I$OUTPUT/arch/x86/include/generated"
++ CFLAGS="$CFLAGS -I$SOURCES/arch/x86/include -I$SOURCES/arch/x86/include/uapi -I$OUTPUT/arch/x86/include/generated -I$OUTPUT/arch/x86/include/generated/uapi"
+ elif [ "$ARCH" = "arm" ]; then
+ CFLAGS="$CFLAGS -I$SOURCES/arch/arm/include -I$OUTPUT/arch/arm/include/generated"
+ fi
+--
+1.7.9.5
+
diff --git a/x11-drivers/nvidia-drivers/files/nvidia b/x11-drivers/nvidia-drivers/files/nvidia
new file mode 100644
index 00000000..7cf0f7c0
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/files/nvidia
@@ -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
diff --git a/x11-drivers/nvidia-drivers/files/nvidia-169.07 b/x11-drivers/nvidia-drivers/files/nvidia-169.07
new file mode 100644
index 00000000..a96b0cd1
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/files/nvidia-169.07
@@ -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
diff --git a/x11-drivers/nvidia-drivers/files/nvidia-drivers-173-3.10.patch b/x11-drivers/nvidia-drivers/files/nvidia-drivers-173-3.10.patch
new file mode 100644
index 00000000..9d3016ba
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/files/nvidia-drivers-173-3.10.patch
@@ -0,0 +1,714 @@
+From c3248bb6c976c112e9efa9e8f202590b2f9b40a5 Mon Sep 17 00:00:00 2001
+From: Alberto Milone <alberto.milone@canonical.com>
+Date: Tue, 18 Jun 2013 15:16:18 +0200
+Subject: [PATCH 1/1] Add support for Linux 3.10
+
+---
+ nv-i2c.c | 13 +--
+ nv-linux.h | 1 +
+ nv.c | 375 ++++++++++++++++++++++++++++++++++++++----------------------
+ 3 files changed, 241 insertions(+), 148 deletions(-)
+
+diff --git a/nv-i2c.c b/nv-i2c.c
+index 143f9e4..aaee787 100644
+--- a/usr/src/nv/nv-i2c.c
++++ b/usr/src/nv/nv-i2c.c
+@@ -307,8 +307,6 @@ void* NV_API_CALL nv_i2c_add_adapter(nv_state_t *nv, U032 port)
+ BOOL NV_API_CALL nv_i2c_del_adapter(nv_state_t *nv, void *data)
+ {
+ struct i2c_adapter *pI2cAdapter = (struct i2c_adapter *)data;
+- int osstatus = 0;
+- BOOL wasReleased = FALSE;
+
+ #if defined(KERNEL_2_4)
+ if (!NV_WEAK_SYMBOL_PRESENT(i2c_add_adapter))
+@@ -320,15 +318,10 @@ BOOL NV_API_CALL nv_i2c_del_adapter(nv_state_t *nv, void *data)
+ if (!pI2cAdapter) return FALSE;
+
+ // attempt release with the OS
+- osstatus = i2c_del_adapter(pI2cAdapter);
+-
+- if (!osstatus)
+- {
+- os_free_mem(pI2cAdapter);
+- wasReleased = TRUE;
+- }
++ i2c_del_adapter(pI2cAdapter);
++ os_free_mem(pI2cAdapter);
+
+- return wasReleased;
++ return TRUE;
+ }
+
+ #else // (defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE))
+diff --git a/nv-linux.h b/nv-linux.h
+index 963e059..9aac81a 100644
+--- a/usr/src/nv/nv-linux.h
++++ b/usr/src/nv/nv-linux.h
+@@ -163,6 +163,7 @@
+
+ #ifdef CONFIG_PROC_FS
+ #include <linux/proc_fs.h>
++#include <linux/seq_file.h>
+ #endif
+
+ #ifdef CONFIG_MTRR
+diff --git a/nv.c b/nv.c
+index f82e46f..570c266 100644
+--- a/usr/src/nv/nv.c
++++ b/usr/src/nv/nv.c
+@@ -291,7 +291,6 @@ void NV_API_CALL nv_verify_pci_config(nv_state_t *nv, BOOL check_the_bars)
+
+ /* nvos_ functions.. do not take a state device parameter */
+ static void nvos_proc_create(void);
+-static void nvos_proc_remove_all(struct proc_dir_entry *);
+ static void nvos_proc_remove(void);
+ static int nvos_count_devices(nv_stack_t *);
+
+@@ -333,12 +332,34 @@ void nv_kern_rc_timer(unsigned long);
+ static int nv_kern_apm_event(struct pm_dev *, pm_request_t, void *);
+ #endif
+
+-static int nv_kern_read_cardinfo(char *, char **, off_t off, int, int *, void *);
+-static int nv_kern_read_status(char *, char **, off_t off, int, int *, void *);
+-static int nv_kern_read_registry(char *, char **, off_t off, int, int *, void *);
+-static int nv_kern_read_agpinfo(char *, char **, off_t off, int, int *, void *);
+-static int nv_kern_read_version(char *, char **, off_t off, int, int *, void *);
+-static int nv_kern_read_text_file(char *, char **, off_t off, int, int *, void *);
++static const struct file_operations nv_procfs_text_fops;
++static const struct file_operations nv_procfs_read_card_info_fops;
++static const struct file_operations nv_procfs_version_fops;
++static const struct file_operations nv_procfs_read_agp_info_fops;
++static const struct file_operations nv_procfs_read_agp_info_gpu_fops;
++static const struct file_operations nv_procfs_read_agp_status_fops;
++static const struct file_operations nv_procfs_registry_fops;
++
++static int nv_procfs_show_text_file(struct seq_file *, void *);
++static int nv_procfs_open_text_file(struct inode *, struct file *);
++static void nvos_proc_add_text_file(struct proc_dir_entry *, const char *, const char *);
++
++static int nv_procfs_show_card_info(struct seq_file *, void *);
++static int nv_procfs_read_card_info(struct inode *, struct file *);
++
++static int nv_procfs_show_version(struct seq_file *, void *);
++static int nv_procfs_open_version(struct inode *, struct file *);
++
++static int nv_procfs_show_agp_info(struct seq_file *, void *);
++static int nv_procfs_read_agp_info(struct inode *, struct file *);
++
++static int nv_procfs_read_agp_info_gpu(struct inode *, struct file *file);
++static int nv_procfs_show_agp_status(struct seq_file *, void *);
++static int nv_procfs_read_agp_status(struct inode *, struct file *);
++
++static int nv_procfs_show_registry(struct seq_file *, void *);
++static int nv_procfs_open_registry(struct inode *, struct file *);
++
+
+ int nv_kern_ctl_open(struct inode *, struct file *);
+ int nv_kern_ctl_close(struct inode *, struct file *);
+@@ -604,6 +625,12 @@ static struct pci_dev* nv_get_pci_device(nv_state_t *nv)
+ return NULL;
+ }
+
++#if LINUX_VERSION_CODE <= KERNEL_VERSION(3,9,255)
++static inline void *PDE_DATA(const struct inode *inode) {
++ return PDE(inode)->data;
++}
++#endif
++
+ static void nvos_proc_create(void)
+ {
+ #ifdef CONFIG_PROC_FS
+@@ -623,19 +650,19 @@ static void nvos_proc_create(void)
+ nv_state_t *nv;
+ nv_linux_state_t *nvl;
+
+- proc_nvidia = create_proc_entry("driver/nvidia", d_flags, NULL);
++ proc_nvidia = proc_mkdir_mode("driver/nvidia", d_flags, NULL);
+ if (!proc_nvidia)
+ goto failed;
+
+- proc_nvidia_cards = create_proc_entry("cards", d_flags, proc_nvidia);
++ proc_nvidia_cards = proc_mkdir_mode("cards", d_flags, proc_nvidia);
+ if (!proc_nvidia_cards)
+ goto failed;
+
+- proc_nvidia_warnings = create_proc_entry("warnings", d_flags, proc_nvidia);
++ proc_nvidia_warnings = proc_mkdir_mode("warnings", d_flags, proc_nvidia);
+ if (!proc_nvidia_warnings)
+ goto failed;
+
+- proc_nvidia_patches = create_proc_entry("patches", d_flags, proc_nvidia);
++ proc_nvidia_patches = proc_mkdir_mode("patches", d_flags, proc_nvidia);
+ if (!proc_nvidia_patches)
+ goto failed;
+
+@@ -660,24 +687,19 @@ static void nvos_proc_create(void)
+ break;
+
+ sprintf(name, "%d", i++);
+- entry = create_proc_entry(name, flags, proc_nvidia_cards);
++ entry = proc_create_data(name, flags, proc_nvidia_cards,
++ &nv_procfs_read_card_info_fops, nv);
+ if (!entry) {
+ NV_PCI_DEV_PUT(dev);
+ goto failed;
+ }
+
+- entry->data = nv;
+- entry->read_proc = nv_kern_read_cardinfo;
+-#if defined(NV_PROC_DIR_ENTRY_HAS_OWNER)
+- entry->owner = THIS_MODULE;
+-#endif
+-
+ if (nvos_find_agp_capability(dev)) {
+ /*
+ * Create the /proc/driver/nvidia/agp/{status,host-bridge,card}
+ * entries now that we know there's AGP hardware.
+ */
+- entry = create_proc_entry("agp", d_flags, proc_nvidia);
++ entry = proc_mkdir_mode("agp", d_flags, proc_nvidia);
+ if (!entry) {
+ NV_PCI_DEV_PUT(dev);
+ goto failed;
+@@ -688,72 +710,78 @@ static void nvos_proc_create(void)
+ #endif
+ proc_nvidia_agp = entry;
+
+- entry = create_proc_entry("status", flags, proc_nvidia_agp);
++ entry = proc_create_data("status", flags, proc_nvidia_agp,
++ &nv_procfs_read_agp_status_fops, nv);
+ if (!entry) {
+ NV_PCI_DEV_PUT(dev);
+ goto failed;
+ }
+
+- entry->data = nv;
+- entry->read_proc = nv_kern_read_status;
+-#if defined(NV_PROC_DIR_ENTRY_HAS_OWNER)
+- entry->owner = THIS_MODULE;
+-#endif
++ entry = proc_create("host-bridge", flags, proc_nvidia_agp,
++ &nv_procfs_read_agp_info_fops);
+
+- entry = create_proc_entry("host-bridge", flags, proc_nvidia_agp);
+ if (!entry) {
+ NV_PCI_DEV_PUT(dev);
+ goto failed;
+ }
+
+- entry->data = NULL;
+- entry->read_proc = nv_kern_read_agpinfo;
+-#if defined(NV_PROC_DIR_ENTRY_HAS_OWNER)
+- entry->owner = THIS_MODULE;
+-#endif
+-
+- entry = create_proc_entry("card", flags, proc_nvidia_agp);
++ entry = proc_create_data("card", flags, proc_nvidia_agp,
++ &nv_procfs_read_agp_info_gpu_fops, nv);
+ if (!entry) {
+ NV_PCI_DEV_PUT(dev);
+ goto failed;
+ }
+
+- entry->data = nv;
+- entry->read_proc = nv_kern_read_agpinfo;
+-#if defined(NV_PROC_DIR_ENTRY_HAS_OWNER)
+- entry->owner = THIS_MODULE;
+-#endif
+ }
+
+ NV_PCI_DEV_PUT(dev);
+ }
+
+- entry = create_proc_entry("version", flags, proc_nvidia);
++ entry = proc_create("version", flags, proc_nvidia, &nv_procfs_version_fops);
+ if (!entry)
+ goto failed;
+
+- entry->read_proc = nv_kern_read_version;
+-#if defined(NV_PROC_DIR_ENTRY_HAS_OWNER)
+- entry->owner = THIS_MODULE;
+-#endif
+-
+- entry = create_proc_entry("registry", flags, proc_nvidia);
++ entry = proc_create("registry", flags, proc_nvidia,
++ &nv_procfs_registry_fops);
+ if (!entry)
+ goto failed;
+
+- entry->read_proc = nv_kern_read_registry;
+-#if defined(NV_PROC_DIR_ENTRY_HAS_OWNER)
+- entry->owner = THIS_MODULE;
+-#endif
+-
+ return;
+
+ failed:
+ nv_printf(NV_DBG_ERRORS, "NVRM: failed to create /proc entries!\n");
+- nvos_proc_remove_all(proc_nvidia);
++ remove_proc_subtree("nvidia", proc_nvidia);
+ #endif
+ }
+
++static int
++nv_procfs_show_text_file(
++ struct seq_file *m,
++ void *v
++)
++{
++ seq_printf(m, "%s", (char *)m->private);
++
++ return 0;
++}
++
++static int
++nv_procfs_open_text_file(
++ struct inode *inode,
++ struct file *file
++)
++{
++ return single_open(file, nv_procfs_show_text_file, PDE_DATA(inode));
++}
++
++static const struct file_operations nv_procfs_text_fops = {
++ .owner = THIS_MODULE,
++ .open = nv_procfs_open_text_file,
++ .read = seq_read,
++ .llseek = seq_lseek,
++ .release = single_release,
++};
++
+ static void
+ nvos_proc_add_text_file(
+ struct proc_dir_entry *parent,
+@@ -762,41 +790,18 @@ nvos_proc_add_text_file(
+ )
+ {
+ #ifdef CONFIG_PROC_FS
+- struct proc_dir_entry *entry;
+-
+ /* world readable file */
+ int flags = S_IFREG | S_IRUGO;
+
+- entry = create_proc_entry(filename, flags, parent);
+- if (!entry) return;
+-
+- entry->data = (void *)text;
+- entry->read_proc = nv_kern_read_text_file;
+-#if defined(NV_PROC_DIR_ENTRY_HAS_OWNER)
+- entry->owner = THIS_MODULE;
+-#endif
++ proc_create_data(filename, flags, parent, &nv_procfs_text_fops,
++ (void *)text);
+ #endif
+ }
+
+-#ifdef CONFIG_PROC_FS
+-static void nvos_proc_remove_all(struct proc_dir_entry *entry)
+-{
+- while (entry) {
+- struct proc_dir_entry *next = entry->next;
+- if (entry->subdir)
+- nvos_proc_remove_all(entry->subdir);
+- remove_proc_entry(entry->name, entry->parent);
+- if (entry == proc_nvidia)
+- break;
+- entry = next;
+- }
+-}
+-#endif
+-
+ static void nvos_proc_remove(void)
+ {
+ #ifdef CONFIG_PROC_FS
+- nvos_proc_remove_all(proc_nvidia);
++ remove_proc_subtree("nvidia", proc_nvidia);
+ #endif
+ }
+
+@@ -3065,18 +3070,19 @@ void NV_API_CALL nv_set_dma_address_size(
+ }
+
+ static int
+-nv_kern_read_cardinfo(char *page, char **start, off_t off,
+- int count, int *eof, void *data)
++nv_procfs_show_card_info(
++ struct seq_file *m,
++ void *v
++)
+ {
+ struct pci_dev *dev;
+ char *type, *fmt, tmpstr[NV_DEVICE_NAME_LENGTH];
+- int len = 0, status;
++ int status;
+ U032 vbios_rev1, vbios_rev2, vbios_rev3, vbios_rev4, vbios_rev5;
+ nv_stack_t *sp = NULL;
+
+ nv_state_t *nv;
+- nv = (nv_state_t *) data;
+- *eof = 1;
++ nv = (nv_state_t *) m->private;
+
+ dev = nv_get_pci_device(nv);
+ if (!dev)
+@@ -3094,38 +3100,38 @@ nv_kern_read_cardinfo(char *page, char **start, off_t off,
+ strcpy (tmpstr, "Unknown");
+ }
+
+- len += sprintf(page+len, "Model: \t\t %s\n", tmpstr);
+- len += sprintf(page+len, "IRQ: \t\t %d\n", nv->interrupt_line);
++ seq_printf(m, "Model: \t\t %s\n", tmpstr);
++ seq_printf(m, "IRQ: \t\t %d\n", nv->interrupt_line);
+
+ status = rm_get_vbios_version(sp, nv, &vbios_rev1, &vbios_rev2,
+ &vbios_rev3, &vbios_rev4, &vbios_rev5);
+
+ if (status < 0) {
+ /* before rm_init_adapter */
+- len += sprintf(page+len, "Video BIOS: \t ??.??.??.??.??\n");
++ seq_printf(m, "Video BIOS: \t ??.??.??.??.??\n");
+ } else {
+ fmt = "Video BIOS: \t %02x.%02x.%02x.%02x.%02x\n";
+- len += sprintf(page+len, fmt, vbios_rev1, vbios_rev2, vbios_rev3,
++ seq_printf(m, fmt, vbios_rev1, vbios_rev2, vbios_rev3,
+ vbios_rev4, vbios_rev5);
+ }
+
+ if (nvos_find_agp_capability(dev)) type = "AGP";
+ else if (nvos_find_pci_express_capability(dev)) type = "PCI-E";
+ else type = "PCI";
+- len += sprintf(page+len, "Card Type: \t %s\n", type);
++ seq_printf(m, "Card Type: \t %s\n", type);
+
+ // Report the number of bits set in dev->dma_mask
+- len += sprintf(page+len, "DMA Size: \t %d bits\n",
++ seq_printf(m, "DMA Size: \t %d bits\n",
+ nv_count_bits(dev->dma_mask));
+- len += sprintf(page+len, "DMA Mask: \t 0x%llx\n", dev->dma_mask);
+- len += sprintf(page+len, "Bus Location: \t %02x.%02x.%x\n",
++ seq_printf(m, "DMA Mask: \t 0x%llx\n", dev->dma_mask);
++ seq_printf(m, "Bus Location: \t %02x.%02x.%x\n",
+ nv->bus, nv->slot, PCI_FUNC(dev->devfn));
+ #ifdef DEBUG
+ do
+ {
+ int j;
+ for (j = 0; j < NV_GPU_NUM_BARS; j++)
+- len += sprintf(page+len, "BAR%i: \t\t 0x%08x (%iMB)\n",
++ seq_printf(m, "BAR%i: \t\t 0x%08x (%iMB)\n",
+ j, nv->bars[j].address, nv->bars[j].size >> 20);
+ } while(0);
+ #endif
+@@ -3133,35 +3139,68 @@ nv_kern_read_cardinfo(char *page, char **start, off_t off,
+ NV_KMEM_CACHE_FREE_STACK(sp);
+
+ NV_PCI_DEV_PUT(dev);
+- return len;
++ return 0;
++}
++
++static int
++nv_procfs_read_card_info(
++ struct inode *inode,
++ struct file *file
++)
++{
++ return single_open(file, nv_procfs_show_card_info, PDE_DATA(inode));
+ }
+
++static const struct file_operations nv_procfs_read_card_info_fops = {
++ .owner = THIS_MODULE,
++ .open = nv_procfs_read_card_info,
++ .read = seq_read,
++ .llseek = seq_lseek,
++ .release = single_release,
++};
++
+ static int
+-nv_kern_read_version(char *page, char **start, off_t off,
+- int count, int *eof, void *data)
++nv_procfs_show_version(
++ struct seq_file *m,
++ void *v
++)
+ {
+- int len = 0;
+- *eof = 1;
+-
+- len += sprintf(page+len, "NVRM version: %s\n", pNVRM_ID);
+- len += sprintf(page+len, "GCC version: %s\n", NV_COMPILER);
+-
+- return len;
++ seq_printf(m, "NVRM version: %s\n", pNVRM_ID);
++ seq_printf(m, "GCC version: %s\n", NV_COMPILER);
++
++ return 0;
++}
++
++static int
++nv_procfs_open_version(
++ struct inode *inode,
++ struct file *file
++)
++{
++ return single_open(file, nv_procfs_show_version, NULL);
+ }
+
++static const struct file_operations nv_procfs_version_fops = {
++ .owner = THIS_MODULE,
++ .open = nv_procfs_open_version,
++ .read = seq_read,
++ .llseek = seq_lseek,
++ .release = single_release,
++};
++
+ static int
+-nv_kern_read_agpinfo(char *page, char **start, off_t off,
+- int count, int *eof, void *data)
++nv_procfs_show_agp_info(
++ struct seq_file *m,
++ void *v
++)
+ {
+ struct pci_dev *dev;
+ char *fw, *sba;
+ u8 cap_ptr;
+ u32 status, command, agp_rate;
+- int len = 0;
+
+ nv_state_t *nv;
+- nv = (nv_state_t *) data;
+- *eof = 1;
++ nv = (nv_state_t *) m->private;
+
+ if (nv) {
+ dev = nv_get_pci_device(nv);
+@@ -3172,12 +3211,12 @@ nv_kern_read_agpinfo(char *page, char **start, off_t off,
+ if (!dev)
+ return 0;
+
+- len += sprintf(page+len, "Host Bridge: \t ");
++ seq_printf(m, "Host Bridge: \t ");
+
+ #if defined(CONFIG_PCI_NAMES)
+- len += sprintf(page+len, "%s\n", NV_PCI_DEVICE_NAME(dev));
++ seq_printf(m, "%s\n", NV_PCI_DEVICE_NAME(dev));
+ #else
+- len += sprintf(page+len, "PCI device %04x:%04x\n",
++ seq_printf(m, "PCI device %04x:%04x\n",
+ dev->vendor, dev->device);
+ #endif
+ }
+@@ -3191,40 +3230,74 @@ nv_kern_read_agpinfo(char *page, char **start, off_t off,
+ fw = (status & 0x00000010) ? "Supported" : "Not Supported";
+ sba = (status & 0x00000200) ? "Supported" : "Not Supported";
+
+- len += sprintf(page+len, "Fast Writes: \t %s\n", fw);
+- len += sprintf(page+len, "SBA: \t\t %s\n", sba);
++ seq_printf(m, "Fast Writes: \t %s\n", fw);
++ seq_printf(m, "SBA: \t\t %s\n", sba);
+
+ agp_rate = status & 0x7;
+ if (status & 0x8) // agp 3.0
+ agp_rate <<= 2;
+
+- len += sprintf(page+len, "AGP Rates: \t %s%s%s%s\n",
++ seq_printf(m, "AGP Rates: \t %s%s%s%s\n",
+ (agp_rate & 0x00000008) ? "8x " : "",
+ (agp_rate & 0x00000004) ? "4x " : "",
+ (agp_rate & 0x00000002) ? "2x " : "",
+ (agp_rate & 0x00000001) ? "1x " : "");
+
+- len += sprintf(page+len, "Registers: \t 0x%08x:0x%08x\n", status, command);
++ seq_printf(m, "Registers: \t 0x%08x:0x%08x\n", status, command);
+
+ NV_PCI_DEV_PUT(dev);
+- return len;
++ return 0;
++}
++
++static int
++nv_procfs_read_agp_info(
++ struct inode *inode,
++ struct file *file
++)
++{
++ return single_open(file, nv_procfs_show_agp_info, NULL);
+ }
+
++static const struct file_operations nv_procfs_read_agp_info_fops = {
++ .owner = THIS_MODULE,
++ .open = nv_procfs_read_agp_info,
++ .read = seq_read,
++ .llseek = seq_lseek,
++ .release = single_release,
++};
++
+ static int
+-nv_kern_read_status(char *page, char **start, off_t off,
+- int count, int *eof, void *data)
++nv_procfs_read_agp_info_gpu(
++ struct inode *inode,
++ struct file *file
++)
++{
++ return single_open(file, nv_procfs_show_agp_info, PDE_DATA(inode));
++}
++
++static const struct file_operations nv_procfs_read_agp_info_gpu_fops = {
++ .owner = THIS_MODULE,
++ .open = nv_procfs_read_agp_info_gpu,
++ .read = seq_read,
++ .llseek = seq_lseek,
++ .release = single_release,
++};
++
++static int
++nv_procfs_show_agp_status(
++ struct seq_file *m,
++ void *v
++)
+ {
+ struct pci_dev *dev;
+ char *fw, *sba, *drv;
+- int len = 0;
+ u8 cap_ptr;
+ u32 scratch;
+ u32 status, command, agp_rate;
+ nv_stack_t *sp = NULL;
+
+ nv_state_t *nv;
+- nv = (nv_state_t *) data;
+- *eof = 1;
++ nv = (nv_state_t *) m->private;
+
+ dev = nvos_get_agp_device_by_class(PCI_CLASS_BRIDGE_HOST);
+ if (!dev)
+@@ -3246,10 +3319,10 @@ nv_kern_read_status(char *page, char **start, off_t off,
+ command &= scratch;
+
+ if (NV_AGP_ENABLED(nv) && (command & 0x100)) {
+- len += sprintf(page+len, "Status: \t Enabled\n");
++ seq_printf(m, "Status: \t Enabled\n");
+
+ drv = NV_OSAGP_ENABLED(nv) ? "AGPGART" : "NVIDIA";
+- len += sprintf(page+len, "Driver: \t %s\n", drv);
++ seq_printf(m, "Driver: \t %s\n", drv);
+
+ // mask off agp rate.
+ // If this is agp 3.0, we need to shift the value
+@@ -3257,13 +3330,13 @@ nv_kern_read_status(char *page, char **start, off_t off,
+ if (status & 0x8) // agp 3.0
+ agp_rate <<= 2;
+
+- len += sprintf(page+len, "AGP Rate: \t %dx\n", agp_rate);
++ seq_printf(m, "AGP Rate: \t %dx\n", agp_rate);
+
+ fw = (command & 0x00000010) ? "Enabled" : "Disabled";
+- len += sprintf(page+len, "Fast Writes: \t %s\n", fw);
++ seq_printf(m, "Fast Writes: \t %s\n", fw);
+
+ sba = (command & 0x00000200) ? "Enabled" : "Disabled";
+- len += sprintf(page+len, "SBA: \t\t %s\n", sba);
++ seq_printf(m, "SBA: \t\t %s\n", sba);
+ } else {
+ int agp_config = 0;
+
+@@ -3274,7 +3347,7 @@ nv_kern_read_status(char *page, char **start, off_t off,
+ return 0;
+ }
+
+- len += sprintf(page+len, "Status: \t Disabled\n\n");
++ seq_printf(m, "Status: \t Disabled\n\n");
+
+ /*
+ * If we find AGP is disabled, but the RM registry indicates it
+@@ -3288,7 +3361,7 @@ nv_kern_read_status(char *page, char **start, off_t off,
+ rm_read_registry_dword(sp, nv, "NVreg", "XNvAGP", &agp_config);
+
+ if (agp_config != NVOS_AGP_CONFIG_DISABLE_AGP && NV_AGP_FAILED(nv)) {
+- len += sprintf(page+len,
++ seq_printf(m,
+ "AGP initialization failed, please check the ouput \n"
+ "of the 'dmesg' command and/or your system log file \n"
+ "for additional information on this problem. \n");
+@@ -3298,37 +3371,63 @@ nv_kern_read_status(char *page, char **start, off_t off,
+ }
+
+ NV_PCI_DEV_PUT(dev);
+- return len;
++ return 0;
++}
++
++static int
++nv_procfs_read_agp_status(
++ struct inode *inode,
++ struct file *file
++)
++{
++ return single_open(file, nv_procfs_show_agp_status, PDE_DATA(inode));
+ }
+
++static const struct file_operations nv_procfs_read_agp_status_fops = {
++ .owner = THIS_MODULE,
++ .open = nv_procfs_read_agp_status,
++ .read = seq_read,
++ .llseek = seq_lseek,
++ .release = single_release,
++};
++
+ extern nv_parm_t nv_parms[];
+ extern char *NVreg_RegistryDwords;
+
+ static int
+-nv_kern_read_registry(char *page, char **start, off_t off,
+- int count, int *eof, void *data)
++nv_procfs_show_registry(
++ struct seq_file *m,
++ void *v
++)
+ {
+- unsigned int i, len = 0;
++ unsigned int i;
+ nv_parm_t *entry;
+- *eof = 1;
+
+ for (i = 0; (entry = &nv_parms[i])->name != NULL; i++)
+- len += sprintf(page+len, "%s: %u\n", entry->name, *entry->data);
++ seq_printf(m, "%s: %u\n", entry->name, *entry->data);
+
+- len += sprintf(page+len, "RegistryDwords: \"%s\"\n",
++ seq_printf(m, "RegistryDwords: \"%s\"\n",
+ (NVreg_RegistryDwords != NULL) ? NVreg_RegistryDwords : "");
+
+- return len;
++ return 0;
+ }
+
+ static int
+-nv_kern_read_text_file(char *page, char **start, off_t off,
+- int count, int *eof, void *data)
++nv_procfs_open_registry(
++ struct inode *inode,
++ struct file *file
++)
+ {
+- *eof = 1;
+- return sprintf(page, "%s", (char *)data);
++ return single_open(file, nv_procfs_show_registry, NULL);
+ }
+
++static const struct file_operations nv_procfs_registry_fops = {
++ .open = nv_procfs_open_registry,
++ .read = seq_read,
++ .llseek = seq_lseek,
++ .release = single_release,
++};
++
+ /***
+ *** EXPORTS to rest of resman
+ ***/
+--
+1.7.9.5
+
diff --git a/x11-drivers/nvidia-drivers/files/nvidia-drivers-260.19.44-2.6.39.patch b/x11-drivers/nvidia-drivers/files/nvidia-drivers-260.19.44-2.6.39.patch
new file mode 100644
index 00000000..32efbf12
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/files/nvidia-drivers-260.19.44-2.6.39.patch
@@ -0,0 +1,10 @@
+--- kernel.orig/nv-linux.h
++++ kernel/nv-linux.h
+@@ -87,7 +87,6 @@
+ #if !defined(KERNEL_2_4)
+ #include <linux/sched.h> /* suser(), capable() replacement */
+ #include <linux/moduleparam.h> /* module_param() */
+-#include <linux/smp_lock.h> /* kernel_locked */
+ #include <asm/tlbflush.h> /* flush_tlb(), flush_tlb_all() */
+ #include <asm/kmap_types.h> /* page table entry lookup */
+ #endif
diff --git a/x11-drivers/nvidia-drivers/files/nvidia-drivers-290.10-3.2.8+.patch b/x11-drivers/nvidia-drivers/files/nvidia-drivers-290.10-3.2.8+.patch
new file mode 100644
index 00000000..4834f7b8
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/files/nvidia-drivers-290.10-3.2.8+.patch
@@ -0,0 +1,11 @@
+--- a/kernel/conftest.sh
++++ b/kernel/conftest.sh
+@@ -122,7 +122,7 @@ build_cflags() {
+ CFLAGS="$BASE_CFLAGS $MACH_CFLAGS $OUTPUT_CFLAGS -I$HEADERS $AUTOCONF_CFLAGS"
+
+ if [ "$ARCH" = "i386" -o "$ARCH" = "x86_64" -o "$ARCH" = "x86" ]; then
+- CFLAGS="$CFLAGS -I$SOURCES/arch/x86/include"
++ CFLAGS="$CFLAGS -I$SOURCES/arch/x86/include -I$SOURCES/arch/x86/include/generated"
+ fi
+ if [ -n "$BUILD_PARAMS" ]; then
+ CFLAGS="$CFLAGS -D$BUILD_PARAMS"
diff --git a/x11-drivers/nvidia-drivers/files/nvidia-drivers-304-3.10.patch b/x11-drivers/nvidia-drivers/files/nvidia-drivers-304-3.10.patch
new file mode 100644
index 00000000..514e671e
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/files/nvidia-drivers-304-3.10.patch
@@ -0,0 +1,626 @@
+diff -Nurp work.orig/kernel/nv-i2c.c work/kernel/nv-i2c.c
+--- work.orig/kernel/nv-i2c.c 2013-07-04 13:19:12.255911539 +0000
++++ work/kernel/nv-i2c.c 2013-07-04 13:08:08.479793566 +0000
+@@ -311,8 +311,6 @@ void* NV_API_CALL nv_i2c_add_adapter(nv_
+ BOOL NV_API_CALL nv_i2c_del_adapter(nv_state_t *nv, void *data)
+ {
+ struct i2c_adapter *pI2cAdapter = (struct i2c_adapter *)data;
+- int osstatus = 0;
+- BOOL wasReleased = FALSE;
+
+ #if defined(KERNEL_2_4)
+ if (!NV_WEAK_SYMBOL_PRESENT(i2c_add_adapter))
+@@ -324,15 +322,10 @@ BOOL NV_API_CALL nv_i2c_del_adapter(nv_s
+ if (!pI2cAdapter) return FALSE;
+
+ // attempt release with the OS
+- osstatus = i2c_del_adapter(pI2cAdapter);
++ i2c_del_adapter(pI2cAdapter);
++ os_free_mem(pI2cAdapter);
+
+- if (!osstatus)
+- {
+- os_free_mem(pI2cAdapter);
+- wasReleased = TRUE;
+- }
+-
+- return wasReleased;
++ return TRUE;
+ }
+
+ #else // (defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE))
+diff -Nurp work.orig/kernel/nv-procfs.c work/kernel/nv-procfs.c
+--- work.orig/kernel/nv-procfs.c 2013-07-04 13:19:12.259244771 +0000
++++ work/kernel/nv-procfs.c 2013-07-04 13:17:31.246205962 +0000
+@@ -60,60 +60,41 @@ static char nv_registry_keys[NV_MAX_REGI
+ __entry; \
+ })
+
+-#define NV_CREATE_PROC_FILE(name,parent,__read_proc, \
+- __write_proc,__fops,__data) \
+- ({ \
+- struct proc_dir_entry *__entry; \
+- int __mode = (S_IFREG | S_IRUGO); \
+- if ((NvUPtr)(__write_proc) != 0) \
+- __mode |= S_IWUSR; \
+- __entry = NV_CREATE_PROC_ENTRY(name, __mode, parent); \
+- if (__entry != NULL) \
+- { \
+- if ((NvUPtr)(__read_proc) != 0) \
+- __entry->read_proc = (__read_proc); \
+- if ((NvUPtr)(__write_proc) != 0) \
+- { \
+- __entry->write_proc = (__write_proc); \
+- __entry->proc_fops = (__fops); \
+- } \
+- __entry->data = (__data); \
+- } \
+- __entry; \
+- })
++#define NV_PROC_RW (S_IFREG|S_IRUGO|S_IWUSR)
++#define NV_PROC_RO (S_IFREG|S_IRUGO)
+
+ #define NV_CREATE_PROC_DIR(name,parent) \
+ ({ \
+ struct proc_dir_entry *__entry; \
+ int __mode = (S_IFDIR | S_IRUGO | S_IXUGO); \
+- __entry = NV_CREATE_PROC_ENTRY(name, __mode, parent); \
++ __entry = proc_mkdir_mode(name, __mode, parent); \
+ __entry; \
+ })
+
++//#if LINUX_VERSION_CODE <= KERNEL_VERSION(3,9,255)
++//static inline void *PDE_DATA(const struct inode *inode) {
++// return PDE(inode)->data;
++//}
++//#endif
++
+ #define NV_PROC_WRITE_BUFFER_SIZE (64 * RM_PAGE_SIZE)
+
+ static int
+-nv_procfs_read_gpu_info(
+- char *page,
+- char **start,
+- off_t off,
+- int count,
+- int *eof,
+- void *data
++nv_procfs_show_gpu_info(
++ struct seq_file *m,
++ void *v
+ )
+ {
+- nv_state_t *nv = data;
++ nv_state_t *nv = m->private;
+ nv_linux_state_t *nvl = NV_GET_NVL_FROM_NV_STATE(nv);
+ struct pci_dev *dev = nvl->dev;
+ char *type, *fmt, tmpstr[NV_DEVICE_NAME_LENGTH];
+- int len = 0, status;
++ int status;
+ NvU8 *uuid;
+ NvU32 vbios_rev1, vbios_rev2, vbios_rev3, vbios_rev4, vbios_rev5;
+ NvU32 fpga_rev1, fpga_rev2, fpga_rev3;
+ nv_stack_t *sp = NULL;
+
+- *eof = 1;
+-
+ NV_KMEM_CACHE_ALLOC_STACK(sp);
+ if (sp == NULL)
+ {
+@@ -134,31 +115,31 @@ nv_procfs_read_gpu_info(
+ if (rm_get_device_name(sp, nv, dev->device, dev->subsystem_vendor,
+ dev->subsystem_device, NV_DEVICE_NAME_LENGTH,
+ tmpstr) != RM_OK)
+- {
++ {
+ strcpy (tmpstr, "Unknown");
+ }
+ }
+
+- len += sprintf(page+len, "Model: \t\t %s\n", tmpstr);
+- len += sprintf(page+len, "IRQ: \t\t %d\n", nv->interrupt_line);
++ seq_printf(m, "Model: \t\t %s\n", tmpstr);
++ seq_printf(m, "IRQ: \t\t %d\n", nv->interrupt_line);
+
+ if (NV_IS_GVI_DEVICE(nv))
+ {
+ status = rm_gvi_get_firmware_version(sp, nv, &fpga_rev1, &fpga_rev2,
+ &fpga_rev3);
+ if (status != RM_OK)
+- len += sprintf(page+len, "Firmware: \t ????.??.??\n");
++ seq_printf(m, "Firmware: \t ????.??.??\n");
+ else
+ {
+ fmt = "Firmware: \t %x.%x.%x\n";
+- len += sprintf(page+len, fmt, fpga_rev1, fpga_rev2, fpga_rev3);
++ seq_printf(m, fmt, fpga_rev1, fpga_rev2, fpga_rev3);
+ }
+ }
+ else
+ {
+ if (rm_get_gpu_uuid(sp, nv, &uuid, NULL) == RM_OK)
+ {
+- len += sprintf(page+len, "GPU UUID: \t %s\n", (char *)uuid);
++ seq_printf(m, "GPU UUID: \t %s\n", (char *)uuid);
+ os_free_mem(uuid);
+ }
+
+@@ -166,12 +147,12 @@ nv_procfs_read_gpu_info(
+ &vbios_rev3, &vbios_rev4,
+ &vbios_rev5) != RM_OK)
+ {
+- len += sprintf(page+len, "Video BIOS: \t ??.??.??.??.??\n");
++ seq_printf(m, "Video BIOS: \t ??.??.??.??.??\n");
+ }
+ else
+ {
+ fmt = "Video BIOS: \t %02x.%02x.%02x.%02x.%02x\n";
+- len += sprintf(page+len, fmt, vbios_rev1, vbios_rev2, vbios_rev3,
++ seq_printf(m, fmt, vbios_rev1, vbios_rev2, vbios_rev3,
+ vbios_rev4, vbios_rev5);
+ }
+ }
+@@ -182,12 +163,12 @@ nv_procfs_read_gpu_info(
+ type = "PCI-E";
+ else
+ type = "PCI";
+- len += sprintf(page+len, "Bus Type: \t %s\n", type);
++ seq_printf(m, "Bus Type: \t %s\n", type);
+
+- len += sprintf(page+len, "DMA Size: \t %d bits\n",
++ seq_printf(m, "DMA Size: \t %d bits\n",
+ nv_count_bits(dev->dma_mask));
+- len += sprintf(page+len, "DMA Mask: \t 0x%llx\n", dev->dma_mask);
+- len += sprintf(page+len, "Bus Location: \t %04x:%02x.%02x.%x\n",
++ seq_printf(m, "DMA Mask: \t 0x%llx\n", dev->dma_mask);
++ seq_printf(m, "Bus Location: \t %04x:%02x.%02x.%x\n",
+ nv->domain, nv->bus, nv->slot, PCI_FUNC(dev->devfn));
+ #if defined(DEBUG)
+ do
+@@ -195,7 +176,7 @@ nv_procfs_read_gpu_info(
+ int j;
+ for (j = 0; j < NV_GPU_NUM_BARS; j++)
+ {
+- len += sprintf(page+len, "BAR%u: \t\t 0x%llx (%lluMB)\n",
++ seq_printf(m, "BAR%u: \t\t 0x%llx (%lluMB)\n",
+ j, nv->bars[j].address, (nv->bars[j].size >> 20));
+ }
+ } while (0);
+@@ -203,26 +184,120 @@ nv_procfs_read_gpu_info(
+
+ NV_KMEM_CACHE_FREE_STACK(sp);
+
+- return len;
++ return 0;
+ }
+
+ static int
+-nv_procfs_read_version(
+- char *page,
+- char **start,
+- off_t off,
+- int count,
+- int *eof,
+- void *data
++nv_procfs_open_gpu_info(
++ struct inode *inode,
++ struct file *file
+ )
+ {
+- int len = 0;
+- *eof = 1;
++ return single_open(file, nv_procfs_show_gpu_info, PDE_DATA(inode));
++}
+
+- len += sprintf(page+len, "NVRM version: %s\n", pNVRM_ID);
+- len += sprintf(page+len, "GCC version: %s\n", NV_COMPILER);
++static const struct file_operations nv_procfs_gpu_info_fops = {
++ .owner = THIS_MODULE,
++ .open = nv_procfs_open_gpu_info,
++ .read = seq_read,
++ .llseek = seq_lseek,
++ .release = single_release,
++};
+
+- return len;
++static int
++nv_procfs_show_version(
++ struct seq_file *m,
++ void *v
++)
++{
++ seq_printf(m, "NVRM version: %s\n", pNVRM_ID);
++ seq_printf(m, "GCC version: %s\n", NV_COMPILER);
++
++ return 0;
++}
++
++static int
++nv_procfs_open_version(
++ struct inode *inode,
++ struct file *file
++)
++{
++ return single_open(file, nv_procfs_show_version, NULL);
++}
++
++static const struct file_operations nv_procfs_version_fops = {
++ .owner = THIS_MODULE,
++ .open = nv_procfs_open_version,
++ .read = seq_read,
++ .llseek = seq_lseek,
++ .release = single_release,
++};
++
++static int
++nv_procfs_show_registry(
++ struct seq_file *m,
++ void *v
++)
++{
++ nv_state_t *nv = m->private;
++ nv_linux_state_t *nvl = NULL;
++ char *registry_keys;
++
++ if (nv != NULL)
++ nvl = NV_GET_NVL_FROM_NV_STATE(nv);
++ registry_keys = ((nvl != NULL) ?
++ nvl->registry_keys : nv_registry_keys);
++
++ seq_printf(m, "Binary: \"%s\"\n", registry_keys);
++
++ return 0;
++}
++
++static ssize_t
++nv_procfs_write_registry(
++ struct file *file,
++ const char __user *buffer,
++ size_t count,
++ loff_t *pos
++)
++{
++ int status = 0;
++ nv_file_private_t *nvfp = NV_GET_FILE_PRIVATE(file);
++ char *proc_buffer;
++ unsigned long bytes_left;
++
++ down(&nvfp->fops_sp_lock[NV_FOPS_STACK_INDEX_PROCFS]);
++
++ bytes_left = (NV_PROC_WRITE_BUFFER_SIZE - nvfp->off - 1);
++
++ if (count == 0)
++ {
++ status = -EINVAL;
++ goto done;
++ }
++ else if ((bytes_left == 0) || (count > bytes_left))
++ {
++ status = -ENOSPC;
++ goto done;
++ }
++
++ proc_buffer = &((char *)nvfp->data)[nvfp->off];
++
++ if (copy_from_user(proc_buffer, buffer, count))
++ {
++ nv_printf(NV_DBG_ERRORS, "NVRM: failed to copy in proc data!\n");
++ status = -EFAULT;
++ }
++ else
++ {
++ nvfp->proc_data = PDE_DATA(file->f_inode);
++ nvfp->off += count;
++ }
++
++done:
++ up(&nvfp->fops_sp_lock[NV_FOPS_STACK_INDEX_PROCFS]);
++
++ return ((status < 0) ? status : count);
+ }
+
+ static struct pci_dev *nv_get_agp_device_by_class(unsigned int class)
+@@ -432,7 +507,7 @@ nv_procfs_open_registry(
+ nv_stack_t *sp = NULL;
+
+ if (0 == (file->f_mode & FMODE_WRITE))
+- return 0;
++ return single_open(file, nv_procfs_show_registry, PDE_DATA(inode));
+
+ nvfp = nv_alloc_file_private();
+ if (nvfp == NULL)
+@@ -481,6 +556,9 @@ nv_procfs_close_registry(
+ RM_STATUS rm_status;
+ int rc = 0;
+
++ if (0 == (file->f_mode & FMODE_WRITE))
++ return single_release(inode, file);
++
+ nvfp = NV_GET_FILE_PRIVATE(file);
+ if (nvfp == NULL)
+ return 0;
+@@ -545,122 +623,81 @@ done:
+ return rc;
+ }
+
+-static struct file_operations nv_procfs_registry_fops = {
++static const struct file_operations nv_procfs_registry_fops = {
+ .open = nv_procfs_open_registry,
++ .read = seq_read,
++ .llseek = seq_lseek,
++ .write = nv_procfs_write_registry,
+ .release = nv_procfs_close_registry,
+ };
+
+ static int
+-nv_procfs_read_params(
+- char *page,
+- char **start,
+- off_t off,
+- int count,
+- int *eof,
+- void *data
++nv_procfs_show_params(
++ struct seq_file *m,
++ void *v
+ )
+ {
+ unsigned int i;
+- int len = 0;
+ nv_parm_t *entry;
+
+- *eof = 1;
+
+ for (i = 0; (entry = &nv_parms[i])->name != NULL; i++)
+- len += sprintf(page+len, "%s: %u\n", entry->name, *entry->data);
++ seq_printf(m, "%s: %u\n", entry->name, *entry->data);
+
+- len += sprintf(page+len, "RegistryDwords: \"%s\"\n",
++ seq_printf(m, "RegistryDwords: \"%s\"\n",
+ (NVreg_RegistryDwords != NULL) ? NVreg_RegistryDwords : "");
+- len += sprintf(page+len, "RmMsg: \"%s\"\n",
++ seq_printf(m, "RmMsg: \"%s\"\n",
+ (NVreg_RmMsg != NULL) ? NVreg_RmMsg : "");
+
+- return len;
++ return 0;
+ }
+
+ static int
+-nv_procfs_read_registry(
+- char *page,
+- char **start,
+- off_t off,
+- int count,
+- int *eof,
+- void *data
+-)
++nv_procfs_open_params(
++ struct inode *inode,
++ struct file *file
++)
+ {
+- nv_state_t *nv = data;
+- nv_linux_state_t *nvl = NULL;
+- char *registry_keys;
++ return single_open(file, nv_procfs_show_params, NULL);
++}
+
+- if (nv != NULL)
+- nvl = NV_GET_NVL_FROM_NV_STATE(nv);
+- registry_keys = ((nvl != NULL) ?
+- nvl->registry_keys : nv_registry_keys);
++static const struct file_operations nv_procfs_params_fops = {
++ .owner = THIS_MODULE,
++ .open = nv_procfs_open_params,
++ .read = seq_read,
++ .llseek = seq_lseek,
++ .release = single_release,
++};
+
+- *eof = 1;
+- return sprintf(page, "Binary: \"%s\"\n", registry_keys);
+-}
+
+ static int
+-nv_procfs_write_registry(
+- struct file *file,
+- const char *buffer,
+- unsigned long count,
+- void *data
++nv_procfs_show_text_file(
++ struct seq_file *m,
++ void *v
+ )
+ {
+- int status = 0;
+- nv_file_private_t *nvfp = NV_GET_FILE_PRIVATE(file);
+- char *proc_buffer;
+- unsigned long bytes_left;
+-
+- down(&nvfp->fops_sp_lock[NV_FOPS_STACK_INDEX_PROCFS]);
++ seq_printf(m, "%s", (char *)m->private);
+
+- bytes_left = (NV_PROC_WRITE_BUFFER_SIZE - nvfp->off - 1);
+-
+- if (count == 0)
+- {
+- status = -EINVAL;
+- goto done;
+- }
+- else if ((bytes_left == 0) || (count > bytes_left))
+- {
+- status = -ENOSPC;
+- goto done;
+- }
+-
+- proc_buffer = &((char *)nvfp->data)[nvfp->off];
+-
+- if (copy_from_user(proc_buffer, buffer, count))
+- {
+- nv_printf(NV_DBG_ERRORS, "NVRM: failed to copy in proc data!\n");
+- status = -EFAULT;
+- }
+- else
+- {
+- nvfp->proc_data = data;
+- nvfp->off += count;
+- }
+-
+-done:
+- up(&nvfp->fops_sp_lock[NV_FOPS_STACK_INDEX_PROCFS]);
+-
+- return ((status < 0) ? status : (int)count);
++ return 0;
+ }
+
+ static int
+-nv_procfs_read_text_file(
+- char *page,
+- char **start,
+- off_t off,
+- int count,
+- int *eof,
+- void *data
++nv_procfs_open_text_file(
++ struct inode *inode,
++ struct file *file
+ )
+ {
+- *eof = 1;
+- return sprintf(page, "%s", (char *)data);
++ return single_open(file, nv_procfs_show_text_file, PDE_DATA(inode));
+ }
+
++static const struct file_operations nv_procfs_text_fops = {
++ .owner = THIS_MODULE,
++ .open = nv_procfs_open_text_file,
++ .read = seq_read,
++ .llseek = seq_lseek,
++ .release = single_release,
++};
++
+ static void
+ nv_procfs_add_text_file(
+ struct proc_dir_entry *parent,
+@@ -668,22 +705,7 @@ nv_procfs_add_text_file(
+ const char *text
+ )
+ {
+- NV_CREATE_PROC_FILE(filename, parent,
+- nv_procfs_read_text_file, NULL, NULL, (void *)text);
+-}
+-
+-static void nv_procfs_unregister_all(struct proc_dir_entry *entry)
+-{
+- while (entry)
+- {
+- struct proc_dir_entry *next = entry->next;
+- if (entry->subdir)
+- nv_procfs_unregister_all(entry->subdir);
+- remove_proc_entry(entry->name, entry->parent);
+- if (entry == proc_nvidia)
+- break;
+- entry = next;
+- }
++ proc_create_data(filename, NV_PROC_RO, parent, &nv_procfs_text_fops, (void *)text);
+ }
+ #endif
+
+@@ -713,26 +735,11 @@ int nv_register_procfs(void)
+ if (!proc_nvidia)
+ goto failed;
+
+- entry = NV_CREATE_PROC_FILE("params", proc_nvidia,
+- nv_procfs_read_params, NULL, NULL, NULL);
++ entry = proc_create("params", NV_PROC_RO, proc_nvidia, &nv_procfs_params_fops);
+ if (!entry)
+ goto failed;
+
+- /*
+- * entry->proc_fops originally points to a constant
+- * structure, so to add more methods for the
+- * binary registry write path, we need to replace the
+- * said entry->proc_fops with a new fops structure.
+- * 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;
+-
+- entry = NV_CREATE_PROC_FILE("registry", proc_nvidia,
+- nv_procfs_read_registry,
+- nv_procfs_write_registry,
+- &nv_procfs_registry_fops, NULL);
++ entry = proc_create("registry", NV_PROC_RW, proc_nvidia, &nv_procfs_registry_fops);
+ if (!entry)
+ goto failed;
+
+@@ -753,8 +760,7 @@ int nv_register_procfs(void)
+
+ nv_procfs_add_text_file(proc_nvidia_patches, "README", __README_patches);
+
+- entry = NV_CREATE_PROC_FILE("version", proc_nvidia,
+- nv_procfs_read_version, NULL, NULL, NULL);
++ entry = proc_create("version", NV_PROC_RO, proc_nvidia, &nv_procfs_version_fops);
+ if (!entry)
+ goto failed;
+
+@@ -771,15 +777,11 @@ int nv_register_procfs(void)
+ if (!proc_nvidia_gpu)
+ goto failed;
+
+- entry = NV_CREATE_PROC_FILE("information", proc_nvidia_gpu,
+- nv_procfs_read_gpu_info, NULL, NULL, nv);
++ entry = proc_create_data("information", NV_PROC_RO, proc_nvidia_gpu, &nv_procfs_gpu_info_fops, nv);
+ if (!entry)
+ goto failed;
+
+- entry = NV_CREATE_PROC_FILE("registry", proc_nvidia_gpu,
+- nv_procfs_read_registry,
+- nv_procfs_write_registry,
+- &nv_procfs_registry_fops, nv);
++ entry = proc_create_data("registry", NV_PROC_RW, proc_nvidia_gpu, &nv_procfs_registry_fops, nv);
+ if (!entry)
+ goto failed;
+
+@@ -789,18 +791,15 @@ int nv_register_procfs(void)
+ if (!proc_nvidia_agp)
+ goto failed;
+
+- entry = NV_CREATE_PROC_FILE("status", proc_nvidia_agp,
+- nv_procfs_read_agp_status, NULL, NULL, nv);
++ entry = proc_create("status", NV_PROC_RO, proc_nvidia_agp, &nv_procfs_read_agp_status);
+ if (!entry)
+ goto failed;
+
+- entry = NV_CREATE_PROC_FILE("host-bridge", proc_nvidia_agp,
+- nv_procfs_read_agp_info, NULL, NULL, NULL);
++ entry = proc_create("host-bridge", NV_PROC_RO, proc_nvidia_agp, &nv_procfs_read_agp_info);
+ if (!entry)
+ goto failed;
+
+- entry = NV_CREATE_PROC_FILE("gpu", proc_nvidia_agp,
+- nv_procfs_read_agp_info, NULL, NULL, nv);
++ entry = proc_create("gpu", NV_PROC_RO, proc_nvidia_agp, &nv_procfs_read_agp_info);
+ if (!entry)
+ goto failed;
+ }
+@@ -809,7 +808,7 @@ int nv_register_procfs(void)
+ return 0;
+ #if defined(CONFIG_PROC_FS)
+ failed:
+- nv_procfs_unregister_all(proc_nvidia);
++ remove_proc_subtree("nvidia", proc_nvidia);
+ return -1;
+ #endif
+ }
+@@ -817,6 +816,6 @@ failed:
+ void nv_unregister_procfs(void)
+ {
+ #if defined(CONFIG_PROC_FS)
+- nv_procfs_unregister_all(proc_nvidia);
++ remove_proc_subtree("nvidia", proc_nvidia);
+ #endif
+ }
+
diff --git a/x11-drivers/nvidia-drivers/files/nvidia-drivers-313.18-3.8.patch b/x11-drivers/nvidia-drivers/files/nvidia-drivers-313.18-3.8.patch
new file mode 100644
index 00000000..bf2f95e6
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/files/nvidia-drivers-313.18-3.8.patch
@@ -0,0 +1,24 @@
+From 9100c380c0a8c15b658b3153c107cd99e7110a7b Mon Sep 17 00:00:00 2001
+From: Alberto Milone <alberto.milone@canonical.com>
+Date: Wed, 9 Jan 2013 11:42:03 +0100
+Subject: [PATCH 1/1] Add support for Linux 3.8
+
+---
+ conftest.sh | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/conftest.sh b/conftest.sh
+index 9720cab..1bfbe6f 100755
+--- 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
+--
+1.7.9.5
+
diff --git a/x11-drivers/nvidia-drivers/files/nvidia-drivers-319.23-3.10.patch b/x11-drivers/nvidia-drivers/files/nvidia-drivers-319.23-3.10.patch
new file mode 100644
index 00000000..b81967bb
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/files/nvidia-drivers-319.23-3.10.patch
@@ -0,0 +1,604 @@
+diff -ur -X - NVIDIA-Linux-x86_64-319.17-no-compat32.orig/kernel/nv-i2c.c NVIDIA-Linux-x86_64-319.17-no-compat32/kernel/nv-i2c.c
+--- NVIDIA-Linux-x86_64-319.17-no-compat32.orig/kernel/nv-i2c.c 2013-04-26 00:22:30.000000000 -0400
++++ NVIDIA-Linux-x86_64-319.17-no-compat32/kernel/nv-i2c.c 2013-05-13 05:20:55.571981365 -0400
+@@ -311,8 +311,6 @@
+ BOOL NV_API_CALL nv_i2c_del_adapter(nv_state_t *nv, void *data)
+ {
+ struct i2c_adapter *pI2cAdapter = (struct i2c_adapter *)data;
+- int osstatus = 0;
+- BOOL wasReleased = FALSE;
+
+ #if defined(KERNEL_2_4)
+ if (!NV_WEAK_SYMBOL_PRESENT(i2c_add_adapter))
+@@ -324,15 +322,10 @@
+ if (!pI2cAdapter) return FALSE;
+
+ // attempt release with the OS
+- osstatus = i2c_del_adapter(pI2cAdapter);
++ i2c_del_adapter(pI2cAdapter);
++ os_free_mem(pI2cAdapter);
+
+- if (!osstatus)
+- {
+- os_free_mem(pI2cAdapter);
+- wasReleased = TRUE;
+- }
+-
+- return wasReleased;
++ return TRUE;
+ }
+
+ #else // (defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE))
+diff -ur -X - NVIDIA-Linux-x86_64-319.17-no-compat32.orig/kernel/nv-procfs.c NVIDIA-Linux-x86_64-319.17-no-compat32/kernel/nv-procfs.c
+--- NVIDIA-Linux-x86_64-319.17-no-compat32.orig/kernel/nv-procfs.c 2013-04-26 00:22:30.000000000 -0400
++++ NVIDIA-Linux-x86_64-319.17-no-compat32/kernel/nv-procfs.c 2013-05-22 04:52:45.229495748 -0400
+@@ -60,60 +60,41 @@
+ __entry; \
+ })
+
+-#define NV_CREATE_PROC_FILE(name,parent,__read_proc, \
+- __write_proc,__fops,__data) \
+- ({ \
+- struct proc_dir_entry *__entry; \
+- int __mode = (S_IFREG | S_IRUGO); \
+- if ((NvUPtr)(__write_proc) != 0) \
+- __mode |= S_IWUSR; \
+- __entry = NV_CREATE_PROC_ENTRY(name, __mode, parent); \
+- if (__entry != NULL) \
+- { \
+- if ((NvUPtr)(__read_proc) != 0) \
+- __entry->read_proc = (__read_proc); \
+- if ((NvUPtr)(__write_proc) != 0) \
+- { \
+- __entry->write_proc = (__write_proc); \
+- __entry->proc_fops = (__fops); \
+- } \
+- __entry->data = (__data); \
+- } \
+- __entry; \
+- })
++#define NV_PROC_RW (S_IFREG|S_IRUGO|S_IWUSR)
++#define NV_PROC_RO (S_IFREG|S_IRUGO)
+
+ #define NV_CREATE_PROC_DIR(name,parent) \
+ ({ \
+ struct proc_dir_entry *__entry; \
+ int __mode = (S_IFDIR | S_IRUGO | S_IXUGO); \
+- __entry = NV_CREATE_PROC_ENTRY(name, __mode, parent); \
++ __entry = proc_mkdir_mode(name, __mode, parent); \
+ __entry; \
+ })
+
++//#if LINUX_VERSION_CODE <= KERNEL_VERSION(3,9,255)
++//static inline void *PDE_DATA(const struct inode *inode) {
++// return PDE(inode)->data;
++//}
++//#endif
++
+ #define NV_PROC_WRITE_BUFFER_SIZE (64 * RM_PAGE_SIZE)
+
+ static int
+-nv_procfs_read_gpu_info(
+- char *page,
+- char **start,
+- off_t off,
+- int count,
+- int *eof,
+- void *data
++nv_procfs_show_gpu_info(
++ struct seq_file *m,
++ void *v
+ )
+ {
+- nv_state_t *nv = data;
++ nv_state_t *nv = m->private;
+ nv_linux_state_t *nvl = NV_GET_NVL_FROM_NV_STATE(nv);
+ struct pci_dev *dev = nvl->dev;
+ char *type, *fmt, tmpstr[NV_DEVICE_NAME_LENGTH];
+- int len = 0, status;
++ int status;
+ NvU8 *uuid;
+ NvU32 vbios_rev1, vbios_rev2, vbios_rev3, vbios_rev4, vbios_rev5;
+ NvU32 fpga_rev1, fpga_rev2, fpga_rev3;
+ nv_stack_t *sp = NULL;
+
+- *eof = 1;
+-
+ NV_KMEM_CACHE_ALLOC_STACK(sp);
+ if (sp == NULL)
+ {
+@@ -134,31 +115,31 @@
+ if (rm_get_device_name(sp, nv, dev->device, dev->subsystem_vendor,
+ dev->subsystem_device, NV_DEVICE_NAME_LENGTH,
+ tmpstr) != RM_OK)
+- {
++ {
+ strcpy (tmpstr, "Unknown");
+ }
+ }
+
+- len += sprintf(page+len, "Model: \t\t %s\n", tmpstr);
+- len += sprintf(page+len, "IRQ: \t\t %d\n", nv->interrupt_line);
++ seq_printf(m, "Model: \t\t %s\n", tmpstr);
++ seq_printf(m, "IRQ: \t\t %d\n", nv->interrupt_line);
+
+ if (NV_IS_GVI_DEVICE(nv))
+ {
+ status = rm_gvi_get_firmware_version(sp, nv, &fpga_rev1, &fpga_rev2,
+ &fpga_rev3);
+ if (status != RM_OK)
+- len += sprintf(page+len, "Firmware: \t ????.??.??\n");
++ seq_printf(m, "Firmware: \t ????.??.??\n");
+ else
+ {
+ fmt = "Firmware: \t %x.%x.%x\n";
+- len += sprintf(page+len, fmt, fpga_rev1, fpga_rev2, fpga_rev3);
++ seq_printf(m, fmt, fpga_rev1, fpga_rev2, fpga_rev3);
+ }
+ }
+ else
+ {
+ if (rm_get_gpu_uuid(sp, nv, &uuid, NULL) == RM_OK)
+ {
+- len += sprintf(page+len, "GPU UUID: \t %s\n", (char *)uuid);
++ seq_printf(m, "GPU UUID: \t %s\n", (char *)uuid);
+ os_free_mem(uuid);
+ }
+
+@@ -166,12 +147,12 @@
+ &vbios_rev3, &vbios_rev4,
+ &vbios_rev5) != RM_OK)
+ {
+- len += sprintf(page+len, "Video BIOS: \t ??.??.??.??.??\n");
++ seq_printf(m, "Video BIOS: \t ??.??.??.??.??\n");
+ }
+ else
+ {
+ fmt = "Video BIOS: \t %02x.%02x.%02x.%02x.%02x\n";
+- len += sprintf(page+len, fmt, vbios_rev1, vbios_rev2, vbios_rev3,
++ seq_printf(m, fmt, vbios_rev1, vbios_rev2, vbios_rev3,
+ vbios_rev4, vbios_rev5);
+ }
+ }
+@@ -180,12 +161,12 @@
+ type = "PCI-E";
+ else
+ type = "PCI";
+- len += sprintf(page+len, "Bus Type: \t %s\n", type);
++ seq_printf(m, "Bus Type: \t %s\n", type);
+
+- len += sprintf(page+len, "DMA Size: \t %d bits\n",
++ seq_printf(m, "DMA Size: \t %d bits\n",
+ nv_count_bits(dev->dma_mask));
+- len += sprintf(page+len, "DMA Mask: \t 0x%llx\n", dev->dma_mask);
+- len += sprintf(page+len, "Bus Location: \t %04x:%02x.%02x.%x\n",
++ seq_printf(m, "DMA Mask: \t 0x%llx\n", dev->dma_mask);
++ seq_printf(m, "Bus Location: \t %04x:%02x.%02x.%x\n",
+ nv->domain, nv->bus, nv->slot, PCI_FUNC(dev->devfn));
+ #if defined(DEBUG)
+ do
+@@ -193,7 +174,7 @@
+ int j;
+ for (j = 0; j < NV_GPU_NUM_BARS; j++)
+ {
+- len += sprintf(page+len, "BAR%u: \t\t 0x%llx (%lluMB)\n",
++ seq_printf(m, "BAR%u: \t\t 0x%llx (%lluMB)\n",
+ j, nv->bars[j].address, (nv->bars[j].size >> 20));
+ }
+ } while (0);
+@@ -201,26 +182,120 @@
+
+ NV_KMEM_CACHE_FREE_STACK(sp);
+
+- return len;
++ return 0;
+ }
+
+ static int
+-nv_procfs_read_version(
+- char *page,
+- char **start,
+- off_t off,
+- int count,
+- int *eof,
+- void *data
++nv_procfs_open_gpu_info(
++ struct inode *inode,
++ struct file *file
++)
++{
++ return single_open(file, nv_procfs_show_gpu_info, PDE_DATA(inode));
++}
++
++static const struct file_operations nv_procfs_gpu_info_fops = {
++ .owner = THIS_MODULE,
++ .open = nv_procfs_open_gpu_info,
++ .read = seq_read,
++ .llseek = seq_lseek,
++ .release = single_release,
++};
++
++static int
++nv_procfs_show_version(
++ struct seq_file *m,
++ void *v
++)
++{
++ seq_printf(m, "NVRM version: %s\n", pNVRM_ID);
++ seq_printf(m, "GCC version: %s\n", NV_COMPILER);
++
++ return 0;
++}
++
++static int
++nv_procfs_open_version(
++ struct inode *inode,
++ struct file *file
++)
++{
++ return single_open(file, nv_procfs_show_version, NULL);
++}
++
++static const struct file_operations nv_procfs_version_fops = {
++ .owner = THIS_MODULE,
++ .open = nv_procfs_open_version,
++ .read = seq_read,
++ .llseek = seq_lseek,
++ .release = single_release,
++};
++
++static int
++nv_procfs_show_registry(
++ struct seq_file *m,
++ void *v
++)
++{
++ nv_state_t *nv = m->private;
++ nv_linux_state_t *nvl = NULL;
++ char *registry_keys;
++
++ if (nv != NULL)
++ nvl = NV_GET_NVL_FROM_NV_STATE(nv);
++ registry_keys = ((nvl != NULL) ?
++ nvl->registry_keys : nv_registry_keys);
++
++ seq_printf(m, "Binary: \"%s\"\n", registry_keys);
++
++ return 0;
++}
++
++static ssize_t
++nv_procfs_write_registry(
++ struct file *file,
++ const char __user *buffer,
++ size_t count,
++ loff_t *pos
+ )
+ {
+- int len = 0;
+- *eof = 1;
++ int status = 0;
++ nv_file_private_t *nvfp = NV_GET_FILE_PRIVATE(file);
++ char *proc_buffer;
++ unsigned long bytes_left;
++
++ down(&nvfp->fops_sp_lock[NV_FOPS_STACK_INDEX_PROCFS]);
++
++ bytes_left = (NV_PROC_WRITE_BUFFER_SIZE - nvfp->off - 1);
++
++ if (count == 0)
++ {
++ status = -EINVAL;
++ goto done;
++ }
++ else if ((bytes_left == 0) || (count > bytes_left))
++ {
++ status = -ENOSPC;
++ goto done;
++ }
++
++ proc_buffer = &((char *)nvfp->data)[nvfp->off];
++
++ if (copy_from_user(proc_buffer, buffer, count))
++ {
++ nv_printf(NV_DBG_ERRORS, "NVRM: failed to copy in proc data!\n");
++ status = -EFAULT;
++ }
++ else
++ {
++ nvfp->proc_data = PDE_DATA(file->f_inode);
++ nvfp->off += count;
++ }
+
+- len += sprintf(page+len, "NVRM version: %s\n", pNVRM_ID);
+- len += sprintf(page+len, "GCC version: %s\n", NV_COMPILER);
++done:
++ up(&nvfp->fops_sp_lock[NV_FOPS_STACK_INDEX_PROCFS]);
+
+- return len;
++ return ((status < 0) ? status : count);
+ }
+
+ static int
+@@ -233,7 +308,7 @@
+ nv_stack_t *sp = NULL;
+
+ if (0 == (file->f_mode & FMODE_WRITE))
+- return 0;
++ return single_open(file, nv_procfs_show_registry, PDE_DATA(inode));
+
+ nvfp = nv_alloc_file_private();
+ if (nvfp == NULL)
+@@ -282,6 +357,9 @@
+ RM_STATUS rm_status;
+ int rc = 0;
+
++ if (0 == (file->f_mode & FMODE_WRITE))
++ return single_release(inode, file);
++
+ nvfp = NV_GET_FILE_PRIVATE(file);
+ if (nvfp == NULL)
+ return 0;
+@@ -346,122 +424,81 @@
+ return rc;
+ }
+
+-static struct file_operations nv_procfs_registry_fops = {
++static const struct file_operations nv_procfs_registry_fops = {
+ .open = nv_procfs_open_registry,
++ .read = seq_read,
++ .llseek = seq_lseek,
++ .write = nv_procfs_write_registry,
+ .release = nv_procfs_close_registry,
+ };
+
+ static int
+-nv_procfs_read_params(
+- char *page,
+- char **start,
+- off_t off,
+- int count,
+- int *eof,
+- void *data
++nv_procfs_show_params(
++ struct seq_file *m,
++ void *v
+ )
+ {
+ unsigned int i;
+- int len = 0;
+ nv_parm_t *entry;
+
+- *eof = 1;
+
+ for (i = 0; (entry = &nv_parms[i])->name != NULL; i++)
+- len += sprintf(page+len, "%s: %u\n", entry->name, *entry->data);
++ seq_printf(m, "%s: %u\n", entry->name, *entry->data);
+
+- len += sprintf(page+len, "RegistryDwords: \"%s\"\n",
++ seq_printf(m, "RegistryDwords: \"%s\"\n",
+ (NVreg_RegistryDwords != NULL) ? NVreg_RegistryDwords : "");
+- len += sprintf(page+len, "RmMsg: \"%s\"\n",
++ seq_printf(m, "RmMsg: \"%s\"\n",
+ (NVreg_RmMsg != NULL) ? NVreg_RmMsg : "");
+
+- return len;
++ return 0;
+ }
+
+ static int
+-nv_procfs_read_registry(
+- char *page,
+- char **start,
+- off_t off,
+- int count,
+- int *eof,
+- void *data
+-)
++nv_procfs_open_params(
++ struct inode *inode,
++ struct file *file
++)
+ {
+- nv_state_t *nv = data;
+- nv_linux_state_t *nvl = NULL;
+- char *registry_keys;
++ return single_open(file, nv_procfs_show_params, NULL);
++}
+
+- if (nv != NULL)
+- nvl = NV_GET_NVL_FROM_NV_STATE(nv);
+- registry_keys = ((nvl != NULL) ?
+- nvl->registry_keys : nv_registry_keys);
++static const struct file_operations nv_procfs_params_fops = {
++ .owner = THIS_MODULE,
++ .open = nv_procfs_open_params,
++ .read = seq_read,
++ .llseek = seq_lseek,
++ .release = single_release,
++};
+
+- *eof = 1;
+- return sprintf(page, "Binary: \"%s\"\n", registry_keys);
+-}
+
+ static int
+-nv_procfs_write_registry(
+- struct file *file,
+- const char *buffer,
+- unsigned long count,
+- void *data
++nv_procfs_show_text_file(
++ struct seq_file *m,
++ void *v
+ )
+ {
+- int status = 0;
+- nv_file_private_t *nvfp = NV_GET_FILE_PRIVATE(file);
+- char *proc_buffer;
+- unsigned long bytes_left;
+-
+- down(&nvfp->fops_sp_lock[NV_FOPS_STACK_INDEX_PROCFS]);
+-
+- bytes_left = (NV_PROC_WRITE_BUFFER_SIZE - nvfp->off - 1);
++ seq_printf(m, "%s", (char *)m->private);
+
+- if (count == 0)
+- {
+- status = -EINVAL;
+- goto done;
+- }
+- else if ((bytes_left == 0) || (count > bytes_left))
+- {
+- status = -ENOSPC;
+- goto done;
+- }
+-
+- proc_buffer = &((char *)nvfp->data)[nvfp->off];
+-
+- if (copy_from_user(proc_buffer, buffer, count))
+- {
+- nv_printf(NV_DBG_ERRORS, "NVRM: failed to copy in proc data!\n");
+- status = -EFAULT;
+- }
+- else
+- {
+- nvfp->proc_data = data;
+- nvfp->off += count;
+- }
+-
+-done:
+- up(&nvfp->fops_sp_lock[NV_FOPS_STACK_INDEX_PROCFS]);
+-
+- return ((status < 0) ? status : (int)count);
++ return 0;
+ }
+
+ static int
+-nv_procfs_read_text_file(
+- char *page,
+- char **start,
+- off_t off,
+- int count,
+- int *eof,
+- void *data
++nv_procfs_open_text_file(
++ struct inode *inode,
++ struct file *file
+ )
+ {
+- *eof = 1;
+- return sprintf(page, "%s", (char *)data);
++ return single_open(file, nv_procfs_show_text_file, PDE_DATA(inode));
+ }
+
++static const struct file_operations nv_procfs_text_fops = {
++ .owner = THIS_MODULE,
++ .open = nv_procfs_open_text_file,
++ .read = seq_read,
++ .llseek = seq_lseek,
++ .release = single_release,
++};
++
+ static void
+ nv_procfs_add_text_file(
+ struct proc_dir_entry *parent,
+@@ -469,22 +506,7 @@
+ const char *text
+ )
+ {
+- NV_CREATE_PROC_FILE(filename, parent,
+- nv_procfs_read_text_file, NULL, NULL, (void *)text);
+-}
+-
+-static void nv_procfs_unregister_all(struct proc_dir_entry *entry)
+-{
+- while (entry)
+- {
+- struct proc_dir_entry *next = entry->next;
+- if (entry->subdir)
+- nv_procfs_unregister_all(entry->subdir);
+- remove_proc_entry(entry->name, entry->parent);
+- if (entry == proc_nvidia)
+- break;
+- entry = next;
+- }
++ proc_create_data(filename, NV_PROC_RO, parent, &nv_procfs_text_fops, (void *)text);
+ }
+ #endif
+
+@@ -513,26 +535,11 @@
+ if (!proc_nvidia)
+ goto failed;
+
+- entry = NV_CREATE_PROC_FILE("params", proc_nvidia,
+- nv_procfs_read_params, NULL, NULL, NULL);
++ entry = proc_create("params", NV_PROC_RO, proc_nvidia, &nv_procfs_params_fops);
+ if (!entry)
+ goto failed;
+
+- /*
+- * entry->proc_fops originally points to a constant
+- * structure, so to add more methods for the
+- * binary registry write path, we need to replace the
+- * said entry->proc_fops with a new fops structure.
+- * 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;
+-
+- entry = NV_CREATE_PROC_FILE("registry", proc_nvidia,
+- nv_procfs_read_registry,
+- nv_procfs_write_registry,
+- &nv_procfs_registry_fops, NULL);
++ entry = proc_create("registry", NV_PROC_RW, proc_nvidia, &nv_procfs_registry_fops);
+ if (!entry)
+ goto failed;
+
+@@ -553,8 +560,7 @@
+
+ nv_procfs_add_text_file(proc_nvidia_patches, "README", __README_patches);
+
+- entry = NV_CREATE_PROC_FILE("version", proc_nvidia,
+- nv_procfs_read_version, NULL, NULL, NULL);
++ entry = proc_create("version", NV_PROC_RO, proc_nvidia, &nv_procfs_version_fops);
+ if (!entry)
+ goto failed;
+
+@@ -571,15 +577,11 @@
+ if (!proc_nvidia_gpu)
+ goto failed;
+
+- entry = NV_CREATE_PROC_FILE("information", proc_nvidia_gpu,
+- nv_procfs_read_gpu_info, NULL, NULL, nv);
++ entry = proc_create_data("information", NV_PROC_RO, proc_nvidia_gpu, &nv_procfs_gpu_info_fops, nv);
+ if (!entry)
+ goto failed;
+
+- entry = NV_CREATE_PROC_FILE("registry", proc_nvidia_gpu,
+- nv_procfs_read_registry,
+- nv_procfs_write_registry,
+- &nv_procfs_registry_fops, nv);
++ entry = proc_create_data("registry", NV_PROC_RW, proc_nvidia_gpu, &nv_procfs_registry_fops, nv);
+ if (!entry)
+ goto failed;
+ }
+@@ -587,7 +589,7 @@
+ return 0;
+ #if defined(CONFIG_PROC_FS)
+ failed:
+- nv_procfs_unregister_all(proc_nvidia);
++ remove_proc_subtree("nvidia", proc_nvidia);
+ return -1;
+ #endif
+ }
+@@ -595,6 +597,6 @@
+ void nv_unregister_procfs(void)
+ {
+ #if defined(CONFIG_PROC_FS)
+- nv_procfs_unregister_all(proc_nvidia);
++ remove_proc_subtree("nvidia", proc_nvidia);
+ #endif
+ }
+
diff --git a/x11-drivers/nvidia-drivers/files/nvidia-drivers-96.43.19-2.6.39.patch b/x11-drivers/nvidia-drivers/files/nvidia-drivers-96.43.19-2.6.39.patch
new file mode 100644
index 00000000..4ee8ba60
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/files/nvidia-drivers-96.43.19-2.6.39.patch
@@ -0,0 +1,10 @@
+--- usr/src/nv/nv-linux.h.orig 2010-10-28 04:23:04.000000000 +0200
++++ usr/src/nv/nv-linux.h 2011-05-21 08:58:35.714633248 +0200
+@@ -80,7 +80,6 @@
+ #if !defined(KERNEL_2_4)
+ #include <linux/sched.h> /* suser(), capable() replacement */
+ #include <linux/moduleparam.h> /* module_param() */
+-#include <linux/smp_lock.h> /* kernel_locked */
+ #include <asm/tlbflush.h> /* flush_tlb(), flush_tlb_all() */
+ #include <asm/kmap_types.h> /* page table entry lookup */
+ #endif
diff --git a/x11-drivers/nvidia-drivers/files/nvidia-drivers-pax-const.patch b/x11-drivers/nvidia-drivers/files/nvidia-drivers-pax-const.patch
new file mode 100644
index 00000000..f3b82593
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/files/nvidia-drivers-pax-const.patch
@@ -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,
diff --git a/x11-drivers/nvidia-drivers/files/nvidia-drivers-pax-usercopy.patch b/x11-drivers/nvidia-drivers/files/nvidia-drivers-pax-usercopy.patch
new file mode 100644
index 00000000..ce8c201b
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/files/nvidia-drivers-pax-usercopy.patch
@@ -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!"
diff --git a/x11-drivers/nvidia-drivers/files/replace-VM_RESERVED-with-VM_DONTEXPAND-and-VM_DONTDU.patch b/x11-drivers/nvidia-drivers/files/replace-VM_RESERVED-with-VM_DONTEXPAND-and-VM_DONTDU.patch
new file mode 100644
index 00000000..51aa2851
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/files/replace-VM_RESERVED-with-VM_DONTEXPAND-and-VM_DONTDU.patch
@@ -0,0 +1,28 @@
+From fed1fa17202cf13bf80bbbad3bf0ffdfd192df42 Mon Sep 17 00:00:00 2001
+From: Alberto Milone <alberto.milone@canonical.com>
+Date: Wed, 7 Nov 2012 12:11:02 +0100
+Subject: [PATCH 1/1] Replace VM_RESERVED with VM_DONTEXPAND and VM_DONTDUMP
+
+---
+ nv-mmap.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/nv-mmap.c b/nv-mmap.c
+index acc02ec..b2d5cdb 100644
+--- a/nv-mmap.c
++++ b/nv-mmap.c
+@@ -463,7 +463,11 @@ int nv_kern_mmap(
+ NV_PRINT_AT(NV_DBG_MEMINFO, at);
+ nv_vm_list_page_count(&at->page_table[i], pages);
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0)
++ vma->vm_flags |= (VM_IO | VM_LOCKED | (VM_DONTEXPAND | VM_DONTDUMP));
++#else
+ vma->vm_flags |= (VM_IO | VM_LOCKED | VM_RESERVED);
++#endif
+
+ #if defined(VM_DRIVER_PAGES)
+ vma->vm_flags |= VM_DRIVER_PAGES;
+--
+1.7.9.5
+
diff --git a/x11-drivers/nvidia-drivers/metadata.xml b/x11-drivers/nvidia-drivers/metadata.xml
new file mode 100644
index 00000000..b4cf3e70
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>no-herd</herd>
+<maintainer>
+ <email>lxnay@gentoo.org</email>
+ <description>General maintainer</description>
+</maintainer>
+<longdescription>NVIDIA X11 driver and GLX libraries</longdescription>
+</pkgmetadata>
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-173.14.31.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-173.14.31.ebuild
new file mode 100644
index 00000000..d1694146
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-173.14.31.ebuild
@@ -0,0 +1,199 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="2"
+
+inherit eutils unpacker portability versionator linux-mod flag-o-matic nvidia-driver
+
+X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}"
+AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}"
+X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}"
+
+DESCRIPTION="NVIDIA GPUs kernel drivers"
+HOMEPAGE="http://www.nvidia.com/"
+SRC_URI="x86? ( ftp://download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}-pkg0.run )
+ amd64? ( ftp://download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}-pkg2.run )
+ x86-fbsd? ( ftp://download.nvidia.com/freebsd/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )"
+
+LICENSE="NVIDIA"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
+IUSE="acpi custom-cflags multilib kernel_linux"
+RESTRICT="strip"
+
+DEPEND="kernel_linux? ( virtual/linux-sources )"
+RDEPEND="~x11-drivers/nvidia-userspace-${PV}
+ multilib? ( ~x11-drivers/nvidia-userspace-${PV}[multilib] )
+ acpi? ( sys-power/acpid )"
+PDEPEND=""
+
+if use x86; then
+ PKG_V="-pkg0"
+ NV_PACKAGE="${X86_NV_PACKAGE}"
+elif use amd64; then
+ PKG_V="-pkg2"
+ NV_PACKAGE="${AMD64_NV_PACKAGE}"
+elif use x86-fbsd; then
+ PKG_V=""
+ NV_PACKAGE="${X86_FBSD_NV_PACKAGE}"
+fi
+
+S="${WORKDIR}/${NV_PACKAGE}${PKG_V}"
+
+mtrr_check() {
+ ebegin "Checking for MTRR support"
+ linux_chkconfig_present MTRR
+ eend $?
+
+ if [[ $? -ne 0 ]] ; then
+ eerror "Please enable MTRR support in your kernel config, found at:"
+ eerror
+ eerror " Processor type and features"
+ eerror " [*] MTRR (Memory Type Range Register) support"
+ eerror
+ eerror "and recompile your kernel ..."
+ die "MTRR support not detected!"
+ fi
+}
+
+lockdep_check() {
+ if linux_chkconfig_present LOCKDEP; then
+ eerror "You've enabled LOCKDEP -- lock tracking -- in the kernel."
+ eerror "Unfortunately, this option exports the symbol 'lockdep_init_map' as GPL-only"
+ eerror "which will prevent ${P} from compiling."
+ eerror "Please make sure the following options have been unset:"
+ eerror " Kernel hacking --->"
+ eerror " [ ] Lock debugging: detect incorrect freeing of live locks"
+ eerror " [ ] Lock debugging: prove locking correctness"
+ eerror " [ ] Lock usage statistics"
+ eerror "in 'menuconfig'"
+ die "LOCKDEP enabled"
+ fi
+}
+
+pkg_setup() {
+ if use kernel_linux; then
+ linux-mod_pkg_setup
+ MODULE_NAMES="nvidia(video:${S}/usr/src/nv)"
+ BUILD_PARAMS="IGNORE_CC_MISMATCH=yes V=1 SYSSRC=${KV_DIR} \
+ SYSOUT=${KV_OUT_DIR} HOST_CC=$(tc-getBUILD_CC)"
+ mtrr_check
+ lockdep_check
+ fi
+
+ # On BSD userland it wants real make command
+ use userland_BSD && MAKE="$(get_bmake)"
+
+ export _POSIX2_VERSION="199209"
+
+ # 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
+ NV_SRC="${S}/src"
+ elif use kernel_linux; then
+ NV_SRC="${S}/usr/src/nv"
+ else
+ die "Could not determine proper NVIDIA package"
+ fi
+}
+
+src_unpack() {
+ if use kernel_linux && kernel_is lt 2 6 7; then
+ echo
+ ewarn "Your kernel version is ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}"
+ ewarn "This is not officially supported for ${P}. It is likely you"
+ ewarn "will not be able to compile or use the kernel module."
+ ewarn "It is recommended that you upgrade your kernel to a version >= 2.6.7"
+ echo
+ ewarn "DO NOT file bug reports for kernel versions less than 2.6.7 as they will be ignored."
+ fi
+
+ if ! use x86-fbsd; then
+ mkdir "${S}"
+ cd "${S}"
+ unpack_makeself
+ else
+ unpack ${A}
+ fi
+}
+
+src_prepare() {
+ # Please add a brief description for every added patch
+ use x86-fbsd && cd doc
+
+ if use kernel_linux; then
+ # Quiet down warnings the user does not need to see
+ sed -i \
+ -e 's:-Wpointer-arith::g' \
+ -e 's:-Wsign-compare::g' \
+ "${NV_SRC}"/Makefile.kbuild
+
+ # If you set this then it's your own fault when stuff breaks :)
+ use custom-cflags && sed -i "s:-O:${CFLAGS}:" "${NV_SRC}"/Makefile.*
+
+ # If greater than 2.6.5 use M= instead of SUBDIR=
+ convert_to_m "${NV_SRC}"/Makefile.kbuild
+ fi
+}
+
+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 x86-fbsd; 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
+}
+
+src_install() {
+ if use kernel_linux; then
+ linux-mod_src_install
+ elif use x86-fbsd; then
+ insinto /boot/modules
+ doins "${WORKDIR}/${NV_PACKAGE}/src/nvidia.kld" || die
+
+ exeinto /boot/modules
+ doexe "${WORKDIR}/${NV_PACKAGE}/src/nvidia.ko" || die
+ fi
+}
+
+pkg_preinst() {
+ if use kernel_linux; then
+ linux-mod_pkg_postinst
+ fi
+}
+
+pkg_postinst() {
+ if use kernel_linux; then
+ linux-mod_pkg_postinst
+ fi
+
+ echo
+ 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 package 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
+ echo
+}
+
+pkg_postrm() {
+ if use kernel_linux; then
+ linux-mod_pkg_postrm
+ fi
+}
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-173.14.34.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-173.14.34.ebuild
new file mode 100644
index 00000000..23bf384c
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-173.14.34.ebuild
@@ -0,0 +1,204 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="2"
+
+inherit eutils unpacker portability versionator linux-mod flag-o-matic nvidia-driver
+
+X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}"
+AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}"
+X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}"
+
+DESCRIPTION="NVIDIA GPUs kernel drivers"
+HOMEPAGE="http://www.nvidia.com/"
+SRC_URI="x86? ( ftp://download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}-pkg0.run )
+ amd64? ( ftp://download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}-pkg2.run )
+ x86-fbsd? ( ftp://download.nvidia.com/freebsd/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )"
+
+LICENSE="NVIDIA"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
+IUSE="acpi custom-cflags multilib kernel_linux"
+RESTRICT="strip"
+
+DEPEND="kernel_linux? ( virtual/linux-sources )"
+RDEPEND="~x11-drivers/nvidia-userspace-${PV}
+ multilib? ( ~x11-drivers/nvidia-userspace-${PV}[multilib] )
+ acpi? ( sys-power/acpid )"
+PDEPEND=""
+
+if use x86; then
+ PKG_V="-pkg0"
+ NV_PACKAGE="${X86_NV_PACKAGE}"
+elif use amd64; then
+ PKG_V="-pkg2"
+ NV_PACKAGE="${AMD64_NV_PACKAGE}"
+elif use x86-fbsd; then
+ PKG_V=""
+ NV_PACKAGE="${X86_FBSD_NV_PACKAGE}"
+fi
+
+S="${WORKDIR}/${NV_PACKAGE}${PKG_V}"
+
+mtrr_check() {
+ ebegin "Checking for MTRR support"
+ linux_chkconfig_present MTRR
+ eend $?
+
+ if [[ $? -ne 0 ]] ; then
+ eerror "Please enable MTRR support in your kernel config, found at:"
+ eerror
+ eerror " Processor type and features"
+ eerror " [*] MTRR (Memory Type Range Register) support"
+ eerror
+ eerror "and recompile your kernel ..."
+ die "MTRR support not detected!"
+ fi
+}
+
+lockdep_check() {
+ if linux_chkconfig_present LOCKDEP; then
+ eerror "You've enabled LOCKDEP -- lock tracking -- in the kernel."
+ eerror "Unfortunately, this option exports the symbol 'lockdep_init_map' as GPL-only"
+ eerror "which will prevent ${P} from compiling."
+ eerror "Please make sure the following options have been unset:"
+ eerror " Kernel hacking --->"
+ eerror " [ ] Lock debugging: detect incorrect freeing of live locks"
+ eerror " [ ] Lock debugging: prove locking correctness"
+ eerror " [ ] Lock usage statistics"
+ eerror "in 'menuconfig'"
+ die "LOCKDEP enabled"
+ fi
+}
+
+pkg_setup() {
+ if use kernel_linux; then
+ linux-mod_pkg_setup
+ MODULE_NAMES="nvidia(video:${S}/usr/src/nv)"
+ BUILD_PARAMS="IGNORE_CC_MISMATCH=yes V=1 SYSSRC=${KV_DIR} \
+ SYSOUT=${KV_OUT_DIR} HOST_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/')"
+ mtrr_check
+ lockdep_check
+ fi
+
+ # On BSD userland it wants real make command
+ use userland_BSD && MAKE="$(get_bmake)"
+
+ export _POSIX2_VERSION="199209"
+
+ # 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
+ NV_SRC="${S}/src"
+ elif use kernel_linux; then
+ NV_SRC="${S}/usr/src/nv"
+ else
+ die "Could not determine proper NVIDIA package"
+ fi
+}
+
+src_unpack() {
+ if use kernel_linux && kernel_is lt 2 6 7; then
+ echo
+ ewarn "Your kernel version is ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}"
+ ewarn "This is not officially supported for ${P}. It is likely you"
+ ewarn "will not be able to compile or use the kernel module."
+ ewarn "It is recommended that you upgrade your kernel to a version >= 2.6.7"
+ echo
+ ewarn "DO NOT file bug reports for kernel versions less than 2.6.7 as they will be ignored."
+ fi
+
+ if ! use x86-fbsd; then
+ mkdir "${S}"
+ cd "${S}"
+ unpack_makeself
+ else
+ unpack ${A}
+ fi
+}
+
+src_prepare() {
+ # Please add a brief description for every added patch
+ use x86-fbsd && cd doc
+
+ if use kernel_linux; then
+ # Quiet down warnings the user does not need to see
+ sed -i \
+ -e 's:-Wpointer-arith::g' \
+ -e 's:-Wsign-compare::g' \
+ "${NV_SRC}"/Makefile.kbuild
+
+ # If you set this then it's your own fault when stuff breaks :)
+ use custom-cflags && sed -i "s:-O:${CFLAGS}:" "${NV_SRC}"/Makefile.*
+
+ # If greater than 2.6.5 use M= instead of SUBDIR=
+ convert_to_m "${NV_SRC}"/Makefile.kbuild
+ fi
+}
+
+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 x86-fbsd; 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
+}
+
+src_install() {
+ if use kernel_linux; then
+ linux-mod_src_install
+ elif use x86-fbsd; then
+ insinto /boot/modules
+ doins "${WORKDIR}/${NV_PACKAGE}/src/nvidia.kld" || die
+
+ exeinto /boot/modules
+ doexe "${WORKDIR}/${NV_PACKAGE}/src/nvidia.ko" || die
+ fi
+}
+
+pkg_preinst() {
+ if use kernel_linux; then
+ linux-mod_pkg_postinst
+ fi
+}
+
+pkg_postinst() {
+ if use kernel_linux; then
+ linux-mod_pkg_postinst
+ fi
+
+ echo
+ 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 package 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
+ echo
+}
+
+pkg_postrm() {
+ if use kernel_linux; then
+ linux-mod_pkg_postrm
+ fi
+}
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-173.14.35.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-173.14.35.ebuild
new file mode 100644
index 00000000..23bf384c
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-173.14.35.ebuild
@@ -0,0 +1,204 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="2"
+
+inherit eutils unpacker portability versionator linux-mod flag-o-matic nvidia-driver
+
+X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}"
+AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}"
+X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}"
+
+DESCRIPTION="NVIDIA GPUs kernel drivers"
+HOMEPAGE="http://www.nvidia.com/"
+SRC_URI="x86? ( ftp://download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}-pkg0.run )
+ amd64? ( ftp://download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}-pkg2.run )
+ x86-fbsd? ( ftp://download.nvidia.com/freebsd/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )"
+
+LICENSE="NVIDIA"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
+IUSE="acpi custom-cflags multilib kernel_linux"
+RESTRICT="strip"
+
+DEPEND="kernel_linux? ( virtual/linux-sources )"
+RDEPEND="~x11-drivers/nvidia-userspace-${PV}
+ multilib? ( ~x11-drivers/nvidia-userspace-${PV}[multilib] )
+ acpi? ( sys-power/acpid )"
+PDEPEND=""
+
+if use x86; then
+ PKG_V="-pkg0"
+ NV_PACKAGE="${X86_NV_PACKAGE}"
+elif use amd64; then
+ PKG_V="-pkg2"
+ NV_PACKAGE="${AMD64_NV_PACKAGE}"
+elif use x86-fbsd; then
+ PKG_V=""
+ NV_PACKAGE="${X86_FBSD_NV_PACKAGE}"
+fi
+
+S="${WORKDIR}/${NV_PACKAGE}${PKG_V}"
+
+mtrr_check() {
+ ebegin "Checking for MTRR support"
+ linux_chkconfig_present MTRR
+ eend $?
+
+ if [[ $? -ne 0 ]] ; then
+ eerror "Please enable MTRR support in your kernel config, found at:"
+ eerror
+ eerror " Processor type and features"
+ eerror " [*] MTRR (Memory Type Range Register) support"
+ eerror
+ eerror "and recompile your kernel ..."
+ die "MTRR support not detected!"
+ fi
+}
+
+lockdep_check() {
+ if linux_chkconfig_present LOCKDEP; then
+ eerror "You've enabled LOCKDEP -- lock tracking -- in the kernel."
+ eerror "Unfortunately, this option exports the symbol 'lockdep_init_map' as GPL-only"
+ eerror "which will prevent ${P} from compiling."
+ eerror "Please make sure the following options have been unset:"
+ eerror " Kernel hacking --->"
+ eerror " [ ] Lock debugging: detect incorrect freeing of live locks"
+ eerror " [ ] Lock debugging: prove locking correctness"
+ eerror " [ ] Lock usage statistics"
+ eerror "in 'menuconfig'"
+ die "LOCKDEP enabled"
+ fi
+}
+
+pkg_setup() {
+ if use kernel_linux; then
+ linux-mod_pkg_setup
+ MODULE_NAMES="nvidia(video:${S}/usr/src/nv)"
+ BUILD_PARAMS="IGNORE_CC_MISMATCH=yes V=1 SYSSRC=${KV_DIR} \
+ SYSOUT=${KV_OUT_DIR} HOST_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/')"
+ mtrr_check
+ lockdep_check
+ fi
+
+ # On BSD userland it wants real make command
+ use userland_BSD && MAKE="$(get_bmake)"
+
+ export _POSIX2_VERSION="199209"
+
+ # 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
+ NV_SRC="${S}/src"
+ elif use kernel_linux; then
+ NV_SRC="${S}/usr/src/nv"
+ else
+ die "Could not determine proper NVIDIA package"
+ fi
+}
+
+src_unpack() {
+ if use kernel_linux && kernel_is lt 2 6 7; then
+ echo
+ ewarn "Your kernel version is ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}"
+ ewarn "This is not officially supported for ${P}. It is likely you"
+ ewarn "will not be able to compile or use the kernel module."
+ ewarn "It is recommended that you upgrade your kernel to a version >= 2.6.7"
+ echo
+ ewarn "DO NOT file bug reports for kernel versions less than 2.6.7 as they will be ignored."
+ fi
+
+ if ! use x86-fbsd; then
+ mkdir "${S}"
+ cd "${S}"
+ unpack_makeself
+ else
+ unpack ${A}
+ fi
+}
+
+src_prepare() {
+ # Please add a brief description for every added patch
+ use x86-fbsd && cd doc
+
+ if use kernel_linux; then
+ # Quiet down warnings the user does not need to see
+ sed -i \
+ -e 's:-Wpointer-arith::g' \
+ -e 's:-Wsign-compare::g' \
+ "${NV_SRC}"/Makefile.kbuild
+
+ # If you set this then it's your own fault when stuff breaks :)
+ use custom-cflags && sed -i "s:-O:${CFLAGS}:" "${NV_SRC}"/Makefile.*
+
+ # If greater than 2.6.5 use M= instead of SUBDIR=
+ convert_to_m "${NV_SRC}"/Makefile.kbuild
+ fi
+}
+
+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 x86-fbsd; 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
+}
+
+src_install() {
+ if use kernel_linux; then
+ linux-mod_src_install
+ elif use x86-fbsd; then
+ insinto /boot/modules
+ doins "${WORKDIR}/${NV_PACKAGE}/src/nvidia.kld" || die
+
+ exeinto /boot/modules
+ doexe "${WORKDIR}/${NV_PACKAGE}/src/nvidia.ko" || die
+ fi
+}
+
+pkg_preinst() {
+ if use kernel_linux; then
+ linux-mod_pkg_postinst
+ fi
+}
+
+pkg_postinst() {
+ if use kernel_linux; then
+ linux-mod_pkg_postinst
+ fi
+
+ echo
+ 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 package 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
+ echo
+}
+
+pkg_postrm() {
+ if use kernel_linux; then
+ linux-mod_pkg_postrm
+ fi
+}
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-275.09.07.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-275.09.07.ebuild
new file mode 100644
index 00000000..d82b365a
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-275.09.07.ebuild
@@ -0,0 +1,192 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="2"
+
+inherit eutils unpacker portability versionator linux-mod flag-o-matic nvidia-driver
+
+X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}"
+AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}"
+X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}"
+
+DESCRIPTION="NVIDIA GPUs kernel drivers"
+HOMEPAGE="http://www.nvidia.com/"
+SRC_URI="x86? ( http://download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}.run )
+ amd64? ( http://download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run )
+ x86-fbsd? ( http://download.nvidia.com/XFree86/FreeBSD-x86/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )"
+
+LICENSE="NVIDIA"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
+IUSE="acpi custom-cflags multilib kernel_linux"
+RESTRICT="strip"
+
+DEPEND="kernel_linux? ( virtual/linux-sources )"
+RDEPEND="~x11-drivers/nvidia-userspace-${PV}
+ multilib? ( ~x11-drivers/nvidia-userspace-${PV}[multilib] )
+ x11-libs/libXvMC
+ acpi? ( sys-power/acpid )"
+PDEPEND=">=x11-libs/libvdpau-0.3-r1"
+
+S="${WORKDIR}/"
+
+mtrr_check() {
+ ebegin "Checking for MTRR support"
+ linux_chkconfig_present MTRR
+ eend $?
+
+ if [[ $? -ne 0 ]] ; then
+ eerror "Please enable MTRR support in your kernel config, found at:"
+ eerror
+ eerror " Processor type and features"
+ eerror " [*] MTRR (Memory Type Range Register) support"
+ eerror
+ eerror "and recompile your kernel ..."
+ die "MTRR support not detected!"
+ fi
+}
+
+lockdep_check() {
+ if linux_chkconfig_present LOCKDEP; then
+ eerror "You've enabled LOCKDEP -- lock tracking -- in the kernel."
+ eerror "Unfortunately, this option exports the symbol "
+ eerror "'lockdep_init_map' as GPL-only which will prevent "
+ eerror "${P} from compiling."
+ eerror "Please make sure the following options have been unset:"
+ eerror
+ eerror " Kernel hacking --->"
+ eerror " [ ] Lock debugging: detect incorrect freeing of live locks"
+ eerror " [ ] Lock debugging: prove locking correctness"
+ eerror " [ ] Lock usage statistics"
+ eerror "in 'menuconfig'"
+ die "LOCKDEP enabled"
+ fi
+}
+
+pkg_setup() {
+ 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} HOST_CC=$(tc-getBUILD_CC)"
+ mtrr_check
+ lockdep_check
+ fi
+
+ # On BSD userland it wants real make command
+ use userland_BSD && MAKE="$(get_bmake)"
+
+ export _POSIX2_VERSION="199209"
+
+ # 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
+ NV_SRC="${S}/src"
+ elif use kernel_linux; then
+ NV_SRC="${S}/kernel"
+ else
+ die "Could not determine proper NVIDIA package"
+ fi
+}
+
+src_unpack() {
+ if use kernel_linux && kernel_is lt 2 6 7; then
+ echo
+ ewarn "Your kernel version is ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}"
+ ewarn "This is not officially supported for ${P}. It is likely you"
+ ewarn "will not be able to compile or use the kernel module."
+ ewarn "It is recommended that you upgrade your kernel to a version >= 2.6.7"
+ echo
+ ewarn "DO NOT file bug reports for kernel versions less than 2.6.7 as they will be ignored."
+ fi
+
+ if ! use x86-fbsd; then
+ cd "${S}"
+ unpack_makeself
+ else
+ unpack ${A}
+ fi
+}
+
+src_prepare() {
+ # Please add a brief description for every added patch
+ use x86-fbsd && cd doc
+
+ if use kernel_linux; then
+ # Quiet down warnings the user does not need to see
+ sed -i \
+ -e 's:-Wsign-compare::g' \
+ "${NV_SRC}"/Makefile.kbuild
+
+ # Add support for the 'x86' unified kernel arch in conftest.sh
+ epatch "${FILESDIR}"/256.35-unified-arch.patch
+
+ # If you set this then it's your own fault when stuff breaks :)
+ use custom-cflags && sed -i "s:-O:${CFLAGS}:" "${NV_SRC}"/Makefile.*
+
+ # If greater than 2.6.5 use M= instead of SUBDIR=
+ convert_to_m "${NV_SRC}"/Makefile.kbuild
+ fi
+}
+
+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 x86-fbsd; 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
+}
+
+src_install() {
+ if use kernel_linux; then
+ linux-mod_src_install
+ elif use x86-fbsd; then
+ insinto /boot/modules
+ doins "${WORKDIR}/${NV_PACKAGE}/src/nvidia.kld" || die
+
+ exeinto /boot/modules
+ doexe "${WORKDIR}/${NV_PACKAGE}/src/nvidia.ko" || die
+ fi
+}
+
+pkg_preinst() {
+ if use kernel_linux; then
+ linux-mod_pkg_postinst
+ fi
+}
+
+pkg_postinst() {
+ if use kernel_linux; then
+ linux-mod_pkg_postinst
+ fi
+
+ echo
+ 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 package 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
+
+}
+
+pkg_postrm() {
+ if use kernel_linux; then
+ linux-mod_pkg_postrm
+ fi
+}
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-280.13.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-280.13.ebuild
new file mode 100644
index 00000000..3cbcd0ee
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-280.13.ebuild
@@ -0,0 +1,195 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="2"
+
+inherit eutils unpacker portability versionator linux-mod flag-o-matic nvidia-driver
+
+X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}"
+AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}"
+X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}"
+
+DESCRIPTION="NVIDIA GPUs kernel drivers"
+HOMEPAGE="http://www.nvidia.com/"
+SRC_URI="x86? ( http://download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}.run )
+ amd64? ( http://download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run )
+ x86-fbsd? ( http://download.nvidia.com/XFree86/FreeBSD-x86/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )"
+
+LICENSE="NVIDIA"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
+IUSE="acpi custom-cflags multilib kernel_linux"
+RESTRICT="strip"
+
+DEPEND="kernel_linux? ( virtual/linux-sources )"
+RDEPEND="~x11-drivers/nvidia-userspace-${PV}
+ multilib? ( ~x11-drivers/nvidia-userspace-${PV}[multilib] )
+ x11-libs/libXvMC
+ acpi? ( sys-power/acpid )"
+PDEPEND=">=x11-libs/libvdpau-0.3-r1"
+
+S="${WORKDIR}/"
+
+mtrr_check() {
+ ebegin "Checking for MTRR support"
+ linux_chkconfig_present MTRR
+ eend $?
+
+ if [[ $? -ne 0 ]] ; then
+ eerror "Please enable MTRR support in your kernel config, found at:"
+ eerror
+ eerror " Processor type and features"
+ eerror " [*] MTRR (Memory Type Range Register) support"
+ eerror
+ eerror "and recompile your kernel ..."
+ die "MTRR support not detected!"
+ fi
+}
+
+lockdep_check() {
+ if linux_chkconfig_present LOCKDEP; then
+ eerror "You've enabled LOCKDEP -- lock tracking -- in the kernel."
+ eerror "Unfortunately, this option exports the symbol "
+ eerror "'lockdep_init_map' as GPL-only which will prevent "
+ eerror "${P} from compiling."
+ eerror "Please make sure the following options have been unset:"
+ eerror
+ eerror " Kernel hacking --->"
+ eerror " [ ] Lock debugging: detect incorrect freeing of live locks"
+ eerror " [ ] Lock debugging: prove locking correctness"
+ eerror " [ ] Lock usage statistics"
+ eerror "in 'menuconfig'"
+ die "LOCKDEP enabled"
+ fi
+}
+
+pkg_setup() {
+ 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} HOST_CC=$(tc-getBUILD_CC)"
+ mtrr_check
+ lockdep_check
+ fi
+
+ # On BSD userland it wants real make command
+ use userland_BSD && MAKE="$(get_bmake)"
+
+ export _POSIX2_VERSION="199209"
+
+ # 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
+ NV_SRC="${S}/src"
+ elif use kernel_linux; then
+ NV_SRC="${S}/kernel"
+ else
+ die "Could not determine proper NVIDIA package"
+ fi
+}
+
+src_unpack() {
+ if use kernel_linux && kernel_is lt 2 6 7; then
+ echo
+ ewarn "Your kernel version is ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}"
+ ewarn "This is not officially supported for ${P}. It is likely you"
+ ewarn "will not be able to compile or use the kernel module."
+ ewarn "It is recommended that you upgrade your kernel to a version >= 2.6.7"
+ echo
+ ewarn "DO NOT file bug reports for kernel versions less than 2.6.7 as they will be ignored."
+ fi
+
+ if ! use x86-fbsd; then
+ cd "${S}"
+ unpack_makeself
+ else
+ unpack ${A}
+ fi
+}
+
+src_prepare() {
+ # Please add a brief description for every added patch
+ use x86-fbsd && cd doc
+
+ if use kernel_linux; then
+ # Quiet down warnings the user does not need to see
+ sed -i \
+ -e 's:-Wsign-compare::g' \
+ "${NV_SRC}"/Makefile.kbuild
+
+ # Add support for the 'x86' unified kernel arch in conftest.sh
+ epatch "${FILESDIR}"/256.35-unified-arch.patch
+
+ # If you set this then it's your own fault when stuff breaks :)
+ use custom-cflags && sed -i "s:-O:${CFLAGS}:" "${NV_SRC}"/Makefile.*
+
+ # If greater than 2.6.5 use M= instead of SUBDIR=
+ convert_to_m "${NV_SRC}"/Makefile.kbuild
+ fi
+}
+
+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 x86-fbsd; 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
+}
+
+src_install() {
+ if use kernel_linux; then
+ linux-mod_src_install
+ elif use x86-fbsd; then
+ insinto /boot/modules
+ doins "${WORKDIR}/${NV_PACKAGE}/src/nvidia.kld" || die
+
+ exeinto /boot/modules
+ doexe "${WORKDIR}/${NV_PACKAGE}/src/nvidia.ko" || die
+ fi
+
+ # Gentoo bug #375615 -- GTK apps hanging
+ doenvd "${FILESDIR}"/10nvidia
+}
+
+pkg_preinst() {
+ if use kernel_linux; then
+ linux-mod_pkg_postinst
+ fi
+}
+
+pkg_postinst() {
+ if use kernel_linux; then
+ linux-mod_pkg_postinst
+ fi
+
+ echo
+ 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 package 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
+
+}
+
+pkg_postrm() {
+ if use kernel_linux; then
+ linux-mod_pkg_postrm
+ fi
+}
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-285.05.09.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-285.05.09.ebuild
new file mode 100644
index 00000000..d82b365a
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-285.05.09.ebuild
@@ -0,0 +1,192 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="2"
+
+inherit eutils unpacker portability versionator linux-mod flag-o-matic nvidia-driver
+
+X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}"
+AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}"
+X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}"
+
+DESCRIPTION="NVIDIA GPUs kernel drivers"
+HOMEPAGE="http://www.nvidia.com/"
+SRC_URI="x86? ( http://download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}.run )
+ amd64? ( http://download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run )
+ x86-fbsd? ( http://download.nvidia.com/XFree86/FreeBSD-x86/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )"
+
+LICENSE="NVIDIA"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
+IUSE="acpi custom-cflags multilib kernel_linux"
+RESTRICT="strip"
+
+DEPEND="kernel_linux? ( virtual/linux-sources )"
+RDEPEND="~x11-drivers/nvidia-userspace-${PV}
+ multilib? ( ~x11-drivers/nvidia-userspace-${PV}[multilib] )
+ x11-libs/libXvMC
+ acpi? ( sys-power/acpid )"
+PDEPEND=">=x11-libs/libvdpau-0.3-r1"
+
+S="${WORKDIR}/"
+
+mtrr_check() {
+ ebegin "Checking for MTRR support"
+ linux_chkconfig_present MTRR
+ eend $?
+
+ if [[ $? -ne 0 ]] ; then
+ eerror "Please enable MTRR support in your kernel config, found at:"
+ eerror
+ eerror " Processor type and features"
+ eerror " [*] MTRR (Memory Type Range Register) support"
+ eerror
+ eerror "and recompile your kernel ..."
+ die "MTRR support not detected!"
+ fi
+}
+
+lockdep_check() {
+ if linux_chkconfig_present LOCKDEP; then
+ eerror "You've enabled LOCKDEP -- lock tracking -- in the kernel."
+ eerror "Unfortunately, this option exports the symbol "
+ eerror "'lockdep_init_map' as GPL-only which will prevent "
+ eerror "${P} from compiling."
+ eerror "Please make sure the following options have been unset:"
+ eerror
+ eerror " Kernel hacking --->"
+ eerror " [ ] Lock debugging: detect incorrect freeing of live locks"
+ eerror " [ ] Lock debugging: prove locking correctness"
+ eerror " [ ] Lock usage statistics"
+ eerror "in 'menuconfig'"
+ die "LOCKDEP enabled"
+ fi
+}
+
+pkg_setup() {
+ 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} HOST_CC=$(tc-getBUILD_CC)"
+ mtrr_check
+ lockdep_check
+ fi
+
+ # On BSD userland it wants real make command
+ use userland_BSD && MAKE="$(get_bmake)"
+
+ export _POSIX2_VERSION="199209"
+
+ # 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
+ NV_SRC="${S}/src"
+ elif use kernel_linux; then
+ NV_SRC="${S}/kernel"
+ else
+ die "Could not determine proper NVIDIA package"
+ fi
+}
+
+src_unpack() {
+ if use kernel_linux && kernel_is lt 2 6 7; then
+ echo
+ ewarn "Your kernel version is ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}"
+ ewarn "This is not officially supported for ${P}. It is likely you"
+ ewarn "will not be able to compile or use the kernel module."
+ ewarn "It is recommended that you upgrade your kernel to a version >= 2.6.7"
+ echo
+ ewarn "DO NOT file bug reports for kernel versions less than 2.6.7 as they will be ignored."
+ fi
+
+ if ! use x86-fbsd; then
+ cd "${S}"
+ unpack_makeself
+ else
+ unpack ${A}
+ fi
+}
+
+src_prepare() {
+ # Please add a brief description for every added patch
+ use x86-fbsd && cd doc
+
+ if use kernel_linux; then
+ # Quiet down warnings the user does not need to see
+ sed -i \
+ -e 's:-Wsign-compare::g' \
+ "${NV_SRC}"/Makefile.kbuild
+
+ # Add support for the 'x86' unified kernel arch in conftest.sh
+ epatch "${FILESDIR}"/256.35-unified-arch.patch
+
+ # If you set this then it's your own fault when stuff breaks :)
+ use custom-cflags && sed -i "s:-O:${CFLAGS}:" "${NV_SRC}"/Makefile.*
+
+ # If greater than 2.6.5 use M= instead of SUBDIR=
+ convert_to_m "${NV_SRC}"/Makefile.kbuild
+ fi
+}
+
+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 x86-fbsd; 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
+}
+
+src_install() {
+ if use kernel_linux; then
+ linux-mod_src_install
+ elif use x86-fbsd; then
+ insinto /boot/modules
+ doins "${WORKDIR}/${NV_PACKAGE}/src/nvidia.kld" || die
+
+ exeinto /boot/modules
+ doexe "${WORKDIR}/${NV_PACKAGE}/src/nvidia.ko" || die
+ fi
+}
+
+pkg_preinst() {
+ if use kernel_linux; then
+ linux-mod_pkg_postinst
+ fi
+}
+
+pkg_postinst() {
+ if use kernel_linux; then
+ linux-mod_pkg_postinst
+ fi
+
+ echo
+ 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 package 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
+
+}
+
+pkg_postrm() {
+ if use kernel_linux; then
+ linux-mod_pkg_postrm
+ fi
+}
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-290.10.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-290.10.ebuild
new file mode 100644
index 00000000..bd17664d
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-290.10.ebuild
@@ -0,0 +1,195 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="2"
+
+inherit eutils unpacker portability versionator linux-mod flag-o-matic nvidia-driver
+
+X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}"
+AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}"
+X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}"
+
+DESCRIPTION="NVIDIA GPUs kernel drivers"
+HOMEPAGE="http://www.nvidia.com/"
+SRC_URI="x86? ( http://download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}.run )
+ amd64? ( http://download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run )
+ x86-fbsd? ( http://download.nvidia.com/XFree86/FreeBSD-x86/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )"
+
+LICENSE="NVIDIA"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
+IUSE="acpi custom-cflags multilib kernel_linux"
+RESTRICT="strip"
+
+DEPEND="kernel_linux? ( virtual/linux-sources )"
+RDEPEND="~x11-drivers/nvidia-userspace-${PV}
+ multilib? ( ~x11-drivers/nvidia-userspace-${PV}[multilib] )
+ x11-libs/libXvMC
+ acpi? ( sys-power/acpid )"
+PDEPEND=">=x11-libs/libvdpau-0.3-r1"
+
+S="${WORKDIR}/"
+
+mtrr_check() {
+ ebegin "Checking for MTRR support"
+ linux_chkconfig_present MTRR
+ eend $?
+
+ if [[ $? -ne 0 ]] ; then
+ eerror "Please enable MTRR support in your kernel config, found at:"
+ eerror
+ eerror " Processor type and features"
+ eerror " [*] MTRR (Memory Type Range Register) support"
+ eerror
+ eerror "and recompile your kernel ..."
+ die "MTRR support not detected!"
+ fi
+}
+
+lockdep_check() {
+ if linux_chkconfig_present LOCKDEP; then
+ eerror "You've enabled LOCKDEP -- lock tracking -- in the kernel."
+ eerror "Unfortunately, this option exports the symbol "
+ eerror "'lockdep_init_map' as GPL-only which will prevent "
+ eerror "${P} from compiling."
+ eerror "Please make sure the following options have been unset:"
+ eerror
+ eerror " Kernel hacking --->"
+ eerror " [ ] Lock debugging: detect incorrect freeing of live locks"
+ eerror " [ ] Lock debugging: prove locking correctness"
+ eerror " [ ] Lock usage statistics"
+ eerror "in 'menuconfig'"
+ die "LOCKDEP enabled"
+ fi
+}
+
+pkg_setup() {
+ 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} HOST_CC=$(tc-getBUILD_CC)"
+ mtrr_check
+ lockdep_check
+ fi
+
+ # On BSD userland it wants real make command
+ use userland_BSD && MAKE="$(get_bmake)"
+
+ export _POSIX2_VERSION="199209"
+
+ # 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
+ NV_SRC="${S}/src"
+ elif use kernel_linux; then
+ NV_SRC="${S}/kernel"
+ else
+ die "Could not determine proper NVIDIA package"
+ fi
+}
+
+src_unpack() {
+ if use kernel_linux && kernel_is lt 2 6 7; then
+ echo
+ ewarn "Your kernel version is ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}"
+ ewarn "This is not officially supported for ${P}. It is likely you"
+ ewarn "will not be able to compile or use the kernel module."
+ ewarn "It is recommended that you upgrade your kernel to a version >= 2.6.7"
+ echo
+ ewarn "DO NOT file bug reports for kernel versions less than 2.6.7 as they will be ignored."
+ fi
+
+ if ! use x86-fbsd; then
+ cd "${S}"
+ unpack_makeself
+ else
+ unpack ${A}
+ fi
+}
+
+src_prepare() {
+ # Please add a brief description for every added patch
+ use x86-fbsd && cd doc
+
+ if use kernel_linux; then
+ # Quiet down warnings the user does not need to see
+ sed -i \
+ -e 's:-Wsign-compare::g' \
+ "${NV_SRC}"/Makefile.kbuild
+
+ # Add support for the 'x86' unified kernel arch in conftest.sh
+ epatch "${FILESDIR}"/256.35-unified-arch.patch
+
+ # Linux 3.2.8+ and 3.3 patches
+ epatch "${FILESDIR}/${PN}-290.10-3.2.8+.patch"
+
+ # If you set this then it's your own fault when stuff breaks :)
+ use custom-cflags && sed -i "s:-O:${CFLAGS}:" "${NV_SRC}"/Makefile.*
+
+ # If greater than 2.6.5 use M= instead of SUBDIR=
+ convert_to_m "${NV_SRC}"/Makefile.kbuild
+ fi
+}
+
+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 x86-fbsd; 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
+}
+
+src_install() {
+ if use kernel_linux; then
+ linux-mod_src_install
+ elif use x86-fbsd; then
+ insinto /boot/modules
+ doins "${WORKDIR}/${NV_PACKAGE}/src/nvidia.kld" || die
+
+ exeinto /boot/modules
+ doexe "${WORKDIR}/${NV_PACKAGE}/src/nvidia.ko" || die
+ fi
+}
+
+pkg_preinst() {
+ if use kernel_linux; then
+ linux-mod_pkg_postinst
+ fi
+}
+
+pkg_postinst() {
+ if use kernel_linux; then
+ linux-mod_pkg_postinst
+ fi
+
+ echo
+ 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 package 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
+
+}
+
+pkg_postrm() {
+ if use kernel_linux; then
+ linux-mod_pkg_postrm
+ fi
+}
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-295.20.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-295.20.ebuild
new file mode 100644
index 00000000..d82b365a
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-295.20.ebuild
@@ -0,0 +1,192 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="2"
+
+inherit eutils unpacker portability versionator linux-mod flag-o-matic nvidia-driver
+
+X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}"
+AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}"
+X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}"
+
+DESCRIPTION="NVIDIA GPUs kernel drivers"
+HOMEPAGE="http://www.nvidia.com/"
+SRC_URI="x86? ( http://download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}.run )
+ amd64? ( http://download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run )
+ x86-fbsd? ( http://download.nvidia.com/XFree86/FreeBSD-x86/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )"
+
+LICENSE="NVIDIA"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
+IUSE="acpi custom-cflags multilib kernel_linux"
+RESTRICT="strip"
+
+DEPEND="kernel_linux? ( virtual/linux-sources )"
+RDEPEND="~x11-drivers/nvidia-userspace-${PV}
+ multilib? ( ~x11-drivers/nvidia-userspace-${PV}[multilib] )
+ x11-libs/libXvMC
+ acpi? ( sys-power/acpid )"
+PDEPEND=">=x11-libs/libvdpau-0.3-r1"
+
+S="${WORKDIR}/"
+
+mtrr_check() {
+ ebegin "Checking for MTRR support"
+ linux_chkconfig_present MTRR
+ eend $?
+
+ if [[ $? -ne 0 ]] ; then
+ eerror "Please enable MTRR support in your kernel config, found at:"
+ eerror
+ eerror " Processor type and features"
+ eerror " [*] MTRR (Memory Type Range Register) support"
+ eerror
+ eerror "and recompile your kernel ..."
+ die "MTRR support not detected!"
+ fi
+}
+
+lockdep_check() {
+ if linux_chkconfig_present LOCKDEP; then
+ eerror "You've enabled LOCKDEP -- lock tracking -- in the kernel."
+ eerror "Unfortunately, this option exports the symbol "
+ eerror "'lockdep_init_map' as GPL-only which will prevent "
+ eerror "${P} from compiling."
+ eerror "Please make sure the following options have been unset:"
+ eerror
+ eerror " Kernel hacking --->"
+ eerror " [ ] Lock debugging: detect incorrect freeing of live locks"
+ eerror " [ ] Lock debugging: prove locking correctness"
+ eerror " [ ] Lock usage statistics"
+ eerror "in 'menuconfig'"
+ die "LOCKDEP enabled"
+ fi
+}
+
+pkg_setup() {
+ 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} HOST_CC=$(tc-getBUILD_CC)"
+ mtrr_check
+ lockdep_check
+ fi
+
+ # On BSD userland it wants real make command
+ use userland_BSD && MAKE="$(get_bmake)"
+
+ export _POSIX2_VERSION="199209"
+
+ # 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
+ NV_SRC="${S}/src"
+ elif use kernel_linux; then
+ NV_SRC="${S}/kernel"
+ else
+ die "Could not determine proper NVIDIA package"
+ fi
+}
+
+src_unpack() {
+ if use kernel_linux && kernel_is lt 2 6 7; then
+ echo
+ ewarn "Your kernel version is ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}"
+ ewarn "This is not officially supported for ${P}. It is likely you"
+ ewarn "will not be able to compile or use the kernel module."
+ ewarn "It is recommended that you upgrade your kernel to a version >= 2.6.7"
+ echo
+ ewarn "DO NOT file bug reports for kernel versions less than 2.6.7 as they will be ignored."
+ fi
+
+ if ! use x86-fbsd; then
+ cd "${S}"
+ unpack_makeself
+ else
+ unpack ${A}
+ fi
+}
+
+src_prepare() {
+ # Please add a brief description for every added patch
+ use x86-fbsd && cd doc
+
+ if use kernel_linux; then
+ # Quiet down warnings the user does not need to see
+ sed -i \
+ -e 's:-Wsign-compare::g' \
+ "${NV_SRC}"/Makefile.kbuild
+
+ # Add support for the 'x86' unified kernel arch in conftest.sh
+ epatch "${FILESDIR}"/256.35-unified-arch.patch
+
+ # If you set this then it's your own fault when stuff breaks :)
+ use custom-cflags && sed -i "s:-O:${CFLAGS}:" "${NV_SRC}"/Makefile.*
+
+ # If greater than 2.6.5 use M= instead of SUBDIR=
+ convert_to_m "${NV_SRC}"/Makefile.kbuild
+ fi
+}
+
+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 x86-fbsd; 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
+}
+
+src_install() {
+ if use kernel_linux; then
+ linux-mod_src_install
+ elif use x86-fbsd; then
+ insinto /boot/modules
+ doins "${WORKDIR}/${NV_PACKAGE}/src/nvidia.kld" || die
+
+ exeinto /boot/modules
+ doexe "${WORKDIR}/${NV_PACKAGE}/src/nvidia.ko" || die
+ fi
+}
+
+pkg_preinst() {
+ if use kernel_linux; then
+ linux-mod_pkg_postinst
+ fi
+}
+
+pkg_postinst() {
+ if use kernel_linux; then
+ linux-mod_pkg_postinst
+ fi
+
+ echo
+ 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 package 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
+
+}
+
+pkg_postrm() {
+ if use kernel_linux; then
+ linux-mod_pkg_postrm
+ fi
+}
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-295.33.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-295.33.ebuild
new file mode 100644
index 00000000..fd51b319
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-295.33.ebuild
@@ -0,0 +1,192 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="2"
+
+inherit eutils unpacker portability versionator linux-mod flag-o-matic nvidia-driver
+
+X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}"
+AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}"
+X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}"
+
+DESCRIPTION="NVIDIA GPUs kernel drivers"
+HOMEPAGE="http://www.nvidia.com/"
+SRC_URI="x86? ( http://us.download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}.run )
+ amd64? ( http://us.download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run )
+ x86-fbsd? ( http://us.download.nvidia.com/XFree86/FreeBSD-x86/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )"
+
+LICENSE="NVIDIA"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
+IUSE="acpi custom-cflags multilib kernel_linux"
+RESTRICT="strip"
+
+DEPEND="kernel_linux? ( virtual/linux-sources )"
+RDEPEND="~x11-drivers/nvidia-userspace-${PV}
+ multilib? ( ~x11-drivers/nvidia-userspace-${PV}[multilib] )
+ x11-libs/libXvMC
+ acpi? ( sys-power/acpid )"
+PDEPEND=">=x11-libs/libvdpau-0.3-r1"
+
+S="${WORKDIR}/"
+
+mtrr_check() {
+ ebegin "Checking for MTRR support"
+ linux_chkconfig_present MTRR
+ eend $?
+
+ if [[ $? -ne 0 ]] ; then
+ eerror "Please enable MTRR support in your kernel config, found at:"
+ eerror
+ eerror " Processor type and features"
+ eerror " [*] MTRR (Memory Type Range Register) support"
+ eerror
+ eerror "and recompile your kernel ..."
+ die "MTRR support not detected!"
+ fi
+}
+
+lockdep_check() {
+ if linux_chkconfig_present LOCKDEP; then
+ eerror "You've enabled LOCKDEP -- lock tracking -- in the kernel."
+ eerror "Unfortunately, this option exports the symbol "
+ eerror "'lockdep_init_map' as GPL-only which will prevent "
+ eerror "${P} from compiling."
+ eerror "Please make sure the following options have been unset:"
+ eerror
+ eerror " Kernel hacking --->"
+ eerror " [ ] Lock debugging: detect incorrect freeing of live locks"
+ eerror " [ ] Lock debugging: prove locking correctness"
+ eerror " [ ] Lock usage statistics"
+ eerror "in 'menuconfig'"
+ die "LOCKDEP enabled"
+ fi
+}
+
+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/')"
+ mtrr_check
+ lockdep_check
+ fi
+
+ # On BSD userland it wants real make command
+ use userland_BSD && MAKE="$(get_bmake)"
+
+ export _POSIX2_VERSION="199209"
+
+ # 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
+ NV_SRC="${S}/src"
+ elif use kernel_linux; then
+ NV_SRC="${S}/kernel"
+ else
+ die "Could not determine proper NVIDIA package"
+ fi
+}
+
+src_unpack() {
+ if use kernel_linux && kernel_is lt 2 6 7; then
+ echo
+ ewarn "Your kernel version is ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}"
+ ewarn "This is not officially supported for ${P}. It is likely you"
+ ewarn "will not be able to compile or use the kernel module."
+ ewarn "It is recommended that you upgrade your kernel to a version >= 2.6.7"
+ echo
+ ewarn "DO NOT file bug reports for kernel versions less than 2.6.7 as they will be ignored."
+ fi
+
+ if ! use x86-fbsd; then
+ cd "${S}"
+ unpack_makeself
+ else
+ unpack ${A}
+ fi
+}
+
+src_prepare() {
+ # Please add a brief description for every added patch
+ use x86-fbsd && cd doc
+
+ if use kernel_linux; then
+ # Quiet down warnings the user does not need to see
+ sed -i \
+ -e 's:-Wsign-compare::g' \
+ "${NV_SRC}"/Makefile.kbuild
+
+ # If you set this then it's your own fault when stuff breaks :)
+ use custom-cflags && sed -i "s:-O:${CFLAGS}:" "${NV_SRC}"/Makefile.*
+
+ # If greater than 2.6.5 use M= instead of SUBDIR=
+ convert_to_m "${NV_SRC}"/Makefile.kbuild
+ fi
+}
+
+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 x86-fbsd; 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
+}
+
+src_install() {
+ if use kernel_linux; then
+ linux-mod_src_install
+ elif use x86-fbsd; then
+ insinto /boot/modules
+ doins "${WORKDIR}/${NV_PACKAGE}/src/nvidia.kld" || die
+
+ exeinto /boot/modules
+ doexe "${WORKDIR}/${NV_PACKAGE}/src/nvidia.ko" || die
+ fi
+}
+
+pkg_preinst() {
+ use kernel_linux && linux-mod_pkg_postinst
+}
+
+pkg_postinst() {
+ use kernel_linux && linux-mod_pkg_postinst
+
+ echo
+ 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 package 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
+
+}
+
+pkg_postrm() {
+ use kernel_linux && linux-mod_pkg_postrm
+}
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-295.40.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-295.40.ebuild
new file mode 100644
index 00000000..fd51b319
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-295.40.ebuild
@@ -0,0 +1,192 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="2"
+
+inherit eutils unpacker portability versionator linux-mod flag-o-matic nvidia-driver
+
+X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}"
+AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}"
+X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}"
+
+DESCRIPTION="NVIDIA GPUs kernel drivers"
+HOMEPAGE="http://www.nvidia.com/"
+SRC_URI="x86? ( http://us.download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}.run )
+ amd64? ( http://us.download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run )
+ x86-fbsd? ( http://us.download.nvidia.com/XFree86/FreeBSD-x86/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )"
+
+LICENSE="NVIDIA"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
+IUSE="acpi custom-cflags multilib kernel_linux"
+RESTRICT="strip"
+
+DEPEND="kernel_linux? ( virtual/linux-sources )"
+RDEPEND="~x11-drivers/nvidia-userspace-${PV}
+ multilib? ( ~x11-drivers/nvidia-userspace-${PV}[multilib] )
+ x11-libs/libXvMC
+ acpi? ( sys-power/acpid )"
+PDEPEND=">=x11-libs/libvdpau-0.3-r1"
+
+S="${WORKDIR}/"
+
+mtrr_check() {
+ ebegin "Checking for MTRR support"
+ linux_chkconfig_present MTRR
+ eend $?
+
+ if [[ $? -ne 0 ]] ; then
+ eerror "Please enable MTRR support in your kernel config, found at:"
+ eerror
+ eerror " Processor type and features"
+ eerror " [*] MTRR (Memory Type Range Register) support"
+ eerror
+ eerror "and recompile your kernel ..."
+ die "MTRR support not detected!"
+ fi
+}
+
+lockdep_check() {
+ if linux_chkconfig_present LOCKDEP; then
+ eerror "You've enabled LOCKDEP -- lock tracking -- in the kernel."
+ eerror "Unfortunately, this option exports the symbol "
+ eerror "'lockdep_init_map' as GPL-only which will prevent "
+ eerror "${P} from compiling."
+ eerror "Please make sure the following options have been unset:"
+ eerror
+ eerror " Kernel hacking --->"
+ eerror " [ ] Lock debugging: detect incorrect freeing of live locks"
+ eerror " [ ] Lock debugging: prove locking correctness"
+ eerror " [ ] Lock usage statistics"
+ eerror "in 'menuconfig'"
+ die "LOCKDEP enabled"
+ fi
+}
+
+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/')"
+ mtrr_check
+ lockdep_check
+ fi
+
+ # On BSD userland it wants real make command
+ use userland_BSD && MAKE="$(get_bmake)"
+
+ export _POSIX2_VERSION="199209"
+
+ # 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
+ NV_SRC="${S}/src"
+ elif use kernel_linux; then
+ NV_SRC="${S}/kernel"
+ else
+ die "Could not determine proper NVIDIA package"
+ fi
+}
+
+src_unpack() {
+ if use kernel_linux && kernel_is lt 2 6 7; then
+ echo
+ ewarn "Your kernel version is ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}"
+ ewarn "This is not officially supported for ${P}. It is likely you"
+ ewarn "will not be able to compile or use the kernel module."
+ ewarn "It is recommended that you upgrade your kernel to a version >= 2.6.7"
+ echo
+ ewarn "DO NOT file bug reports for kernel versions less than 2.6.7 as they will be ignored."
+ fi
+
+ if ! use x86-fbsd; then
+ cd "${S}"
+ unpack_makeself
+ else
+ unpack ${A}
+ fi
+}
+
+src_prepare() {
+ # Please add a brief description for every added patch
+ use x86-fbsd && cd doc
+
+ if use kernel_linux; then
+ # Quiet down warnings the user does not need to see
+ sed -i \
+ -e 's:-Wsign-compare::g' \
+ "${NV_SRC}"/Makefile.kbuild
+
+ # If you set this then it's your own fault when stuff breaks :)
+ use custom-cflags && sed -i "s:-O:${CFLAGS}:" "${NV_SRC}"/Makefile.*
+
+ # If greater than 2.6.5 use M= instead of SUBDIR=
+ convert_to_m "${NV_SRC}"/Makefile.kbuild
+ fi
+}
+
+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 x86-fbsd; 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
+}
+
+src_install() {
+ if use kernel_linux; then
+ linux-mod_src_install
+ elif use x86-fbsd; then
+ insinto /boot/modules
+ doins "${WORKDIR}/${NV_PACKAGE}/src/nvidia.kld" || die
+
+ exeinto /boot/modules
+ doexe "${WORKDIR}/${NV_PACKAGE}/src/nvidia.ko" || die
+ fi
+}
+
+pkg_preinst() {
+ use kernel_linux && linux-mod_pkg_postinst
+}
+
+pkg_postinst() {
+ use kernel_linux && linux-mod_pkg_postinst
+
+ echo
+ 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 package 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
+
+}
+
+pkg_postrm() {
+ use kernel_linux && linux-mod_pkg_postrm
+}
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-295.49.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-295.49.ebuild
new file mode 100644
index 00000000..fd51b319
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-295.49.ebuild
@@ -0,0 +1,192 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="2"
+
+inherit eutils unpacker portability versionator linux-mod flag-o-matic nvidia-driver
+
+X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}"
+AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}"
+X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}"
+
+DESCRIPTION="NVIDIA GPUs kernel drivers"
+HOMEPAGE="http://www.nvidia.com/"
+SRC_URI="x86? ( http://us.download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}.run )
+ amd64? ( http://us.download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run )
+ x86-fbsd? ( http://us.download.nvidia.com/XFree86/FreeBSD-x86/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )"
+
+LICENSE="NVIDIA"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
+IUSE="acpi custom-cflags multilib kernel_linux"
+RESTRICT="strip"
+
+DEPEND="kernel_linux? ( virtual/linux-sources )"
+RDEPEND="~x11-drivers/nvidia-userspace-${PV}
+ multilib? ( ~x11-drivers/nvidia-userspace-${PV}[multilib] )
+ x11-libs/libXvMC
+ acpi? ( sys-power/acpid )"
+PDEPEND=">=x11-libs/libvdpau-0.3-r1"
+
+S="${WORKDIR}/"
+
+mtrr_check() {
+ ebegin "Checking for MTRR support"
+ linux_chkconfig_present MTRR
+ eend $?
+
+ if [[ $? -ne 0 ]] ; then
+ eerror "Please enable MTRR support in your kernel config, found at:"
+ eerror
+ eerror " Processor type and features"
+ eerror " [*] MTRR (Memory Type Range Register) support"
+ eerror
+ eerror "and recompile your kernel ..."
+ die "MTRR support not detected!"
+ fi
+}
+
+lockdep_check() {
+ if linux_chkconfig_present LOCKDEP; then
+ eerror "You've enabled LOCKDEP -- lock tracking -- in the kernel."
+ eerror "Unfortunately, this option exports the symbol "
+ eerror "'lockdep_init_map' as GPL-only which will prevent "
+ eerror "${P} from compiling."
+ eerror "Please make sure the following options have been unset:"
+ eerror
+ eerror " Kernel hacking --->"
+ eerror " [ ] Lock debugging: detect incorrect freeing of live locks"
+ eerror " [ ] Lock debugging: prove locking correctness"
+ eerror " [ ] Lock usage statistics"
+ eerror "in 'menuconfig'"
+ die "LOCKDEP enabled"
+ fi
+}
+
+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/')"
+ mtrr_check
+ lockdep_check
+ fi
+
+ # On BSD userland it wants real make command
+ use userland_BSD && MAKE="$(get_bmake)"
+
+ export _POSIX2_VERSION="199209"
+
+ # 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
+ NV_SRC="${S}/src"
+ elif use kernel_linux; then
+ NV_SRC="${S}/kernel"
+ else
+ die "Could not determine proper NVIDIA package"
+ fi
+}
+
+src_unpack() {
+ if use kernel_linux && kernel_is lt 2 6 7; then
+ echo
+ ewarn "Your kernel version is ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}"
+ ewarn "This is not officially supported for ${P}. It is likely you"
+ ewarn "will not be able to compile or use the kernel module."
+ ewarn "It is recommended that you upgrade your kernel to a version >= 2.6.7"
+ echo
+ ewarn "DO NOT file bug reports for kernel versions less than 2.6.7 as they will be ignored."
+ fi
+
+ if ! use x86-fbsd; then
+ cd "${S}"
+ unpack_makeself
+ else
+ unpack ${A}
+ fi
+}
+
+src_prepare() {
+ # Please add a brief description for every added patch
+ use x86-fbsd && cd doc
+
+ if use kernel_linux; then
+ # Quiet down warnings the user does not need to see
+ sed -i \
+ -e 's:-Wsign-compare::g' \
+ "${NV_SRC}"/Makefile.kbuild
+
+ # If you set this then it's your own fault when stuff breaks :)
+ use custom-cflags && sed -i "s:-O:${CFLAGS}:" "${NV_SRC}"/Makefile.*
+
+ # If greater than 2.6.5 use M= instead of SUBDIR=
+ convert_to_m "${NV_SRC}"/Makefile.kbuild
+ fi
+}
+
+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 x86-fbsd; 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
+}
+
+src_install() {
+ if use kernel_linux; then
+ linux-mod_src_install
+ elif use x86-fbsd; then
+ insinto /boot/modules
+ doins "${WORKDIR}/${NV_PACKAGE}/src/nvidia.kld" || die
+
+ exeinto /boot/modules
+ doexe "${WORKDIR}/${NV_PACKAGE}/src/nvidia.ko" || die
+ fi
+}
+
+pkg_preinst() {
+ use kernel_linux && linux-mod_pkg_postinst
+}
+
+pkg_postinst() {
+ use kernel_linux && linux-mod_pkg_postinst
+
+ echo
+ 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 package 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
+
+}
+
+pkg_postrm() {
+ use kernel_linux && linux-mod_pkg_postrm
+}
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-295.53.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-295.53.ebuild
new file mode 100644
index 00000000..fd51b319
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-295.53.ebuild
@@ -0,0 +1,192 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="2"
+
+inherit eutils unpacker portability versionator linux-mod flag-o-matic nvidia-driver
+
+X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}"
+AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}"
+X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}"
+
+DESCRIPTION="NVIDIA GPUs kernel drivers"
+HOMEPAGE="http://www.nvidia.com/"
+SRC_URI="x86? ( http://us.download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}.run )
+ amd64? ( http://us.download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run )
+ x86-fbsd? ( http://us.download.nvidia.com/XFree86/FreeBSD-x86/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )"
+
+LICENSE="NVIDIA"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
+IUSE="acpi custom-cflags multilib kernel_linux"
+RESTRICT="strip"
+
+DEPEND="kernel_linux? ( virtual/linux-sources )"
+RDEPEND="~x11-drivers/nvidia-userspace-${PV}
+ multilib? ( ~x11-drivers/nvidia-userspace-${PV}[multilib] )
+ x11-libs/libXvMC
+ acpi? ( sys-power/acpid )"
+PDEPEND=">=x11-libs/libvdpau-0.3-r1"
+
+S="${WORKDIR}/"
+
+mtrr_check() {
+ ebegin "Checking for MTRR support"
+ linux_chkconfig_present MTRR
+ eend $?
+
+ if [[ $? -ne 0 ]] ; then
+ eerror "Please enable MTRR support in your kernel config, found at:"
+ eerror
+ eerror " Processor type and features"
+ eerror " [*] MTRR (Memory Type Range Register) support"
+ eerror
+ eerror "and recompile your kernel ..."
+ die "MTRR support not detected!"
+ fi
+}
+
+lockdep_check() {
+ if linux_chkconfig_present LOCKDEP; then
+ eerror "You've enabled LOCKDEP -- lock tracking -- in the kernel."
+ eerror "Unfortunately, this option exports the symbol "
+ eerror "'lockdep_init_map' as GPL-only which will prevent "
+ eerror "${P} from compiling."
+ eerror "Please make sure the following options have been unset:"
+ eerror
+ eerror " Kernel hacking --->"
+ eerror " [ ] Lock debugging: detect incorrect freeing of live locks"
+ eerror " [ ] Lock debugging: prove locking correctness"
+ eerror " [ ] Lock usage statistics"
+ eerror "in 'menuconfig'"
+ die "LOCKDEP enabled"
+ fi
+}
+
+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/')"
+ mtrr_check
+ lockdep_check
+ fi
+
+ # On BSD userland it wants real make command
+ use userland_BSD && MAKE="$(get_bmake)"
+
+ export _POSIX2_VERSION="199209"
+
+ # 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
+ NV_SRC="${S}/src"
+ elif use kernel_linux; then
+ NV_SRC="${S}/kernel"
+ else
+ die "Could not determine proper NVIDIA package"
+ fi
+}
+
+src_unpack() {
+ if use kernel_linux && kernel_is lt 2 6 7; then
+ echo
+ ewarn "Your kernel version is ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}"
+ ewarn "This is not officially supported for ${P}. It is likely you"
+ ewarn "will not be able to compile or use the kernel module."
+ ewarn "It is recommended that you upgrade your kernel to a version >= 2.6.7"
+ echo
+ ewarn "DO NOT file bug reports for kernel versions less than 2.6.7 as they will be ignored."
+ fi
+
+ if ! use x86-fbsd; then
+ cd "${S}"
+ unpack_makeself
+ else
+ unpack ${A}
+ fi
+}
+
+src_prepare() {
+ # Please add a brief description for every added patch
+ use x86-fbsd && cd doc
+
+ if use kernel_linux; then
+ # Quiet down warnings the user does not need to see
+ sed -i \
+ -e 's:-Wsign-compare::g' \
+ "${NV_SRC}"/Makefile.kbuild
+
+ # If you set this then it's your own fault when stuff breaks :)
+ use custom-cflags && sed -i "s:-O:${CFLAGS}:" "${NV_SRC}"/Makefile.*
+
+ # If greater than 2.6.5 use M= instead of SUBDIR=
+ convert_to_m "${NV_SRC}"/Makefile.kbuild
+ fi
+}
+
+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 x86-fbsd; 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
+}
+
+src_install() {
+ if use kernel_linux; then
+ linux-mod_src_install
+ elif use x86-fbsd; then
+ insinto /boot/modules
+ doins "${WORKDIR}/${NV_PACKAGE}/src/nvidia.kld" || die
+
+ exeinto /boot/modules
+ doexe "${WORKDIR}/${NV_PACKAGE}/src/nvidia.ko" || die
+ fi
+}
+
+pkg_preinst() {
+ use kernel_linux && linux-mod_pkg_postinst
+}
+
+pkg_postinst() {
+ use kernel_linux && linux-mod_pkg_postinst
+
+ echo
+ 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 package 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
+
+}
+
+pkg_postrm() {
+ use kernel_linux && linux-mod_pkg_postrm
+}
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-295.59.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-295.59.ebuild
new file mode 100644
index 00000000..fd51b319
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-295.59.ebuild
@@ -0,0 +1,192 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="2"
+
+inherit eutils unpacker portability versionator linux-mod flag-o-matic nvidia-driver
+
+X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}"
+AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}"
+X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}"
+
+DESCRIPTION="NVIDIA GPUs kernel drivers"
+HOMEPAGE="http://www.nvidia.com/"
+SRC_URI="x86? ( http://us.download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}.run )
+ amd64? ( http://us.download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run )
+ x86-fbsd? ( http://us.download.nvidia.com/XFree86/FreeBSD-x86/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )"
+
+LICENSE="NVIDIA"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
+IUSE="acpi custom-cflags multilib kernel_linux"
+RESTRICT="strip"
+
+DEPEND="kernel_linux? ( virtual/linux-sources )"
+RDEPEND="~x11-drivers/nvidia-userspace-${PV}
+ multilib? ( ~x11-drivers/nvidia-userspace-${PV}[multilib] )
+ x11-libs/libXvMC
+ acpi? ( sys-power/acpid )"
+PDEPEND=">=x11-libs/libvdpau-0.3-r1"
+
+S="${WORKDIR}/"
+
+mtrr_check() {
+ ebegin "Checking for MTRR support"
+ linux_chkconfig_present MTRR
+ eend $?
+
+ if [[ $? -ne 0 ]] ; then
+ eerror "Please enable MTRR support in your kernel config, found at:"
+ eerror
+ eerror " Processor type and features"
+ eerror " [*] MTRR (Memory Type Range Register) support"
+ eerror
+ eerror "and recompile your kernel ..."
+ die "MTRR support not detected!"
+ fi
+}
+
+lockdep_check() {
+ if linux_chkconfig_present LOCKDEP; then
+ eerror "You've enabled LOCKDEP -- lock tracking -- in the kernel."
+ eerror "Unfortunately, this option exports the symbol "
+ eerror "'lockdep_init_map' as GPL-only which will prevent "
+ eerror "${P} from compiling."
+ eerror "Please make sure the following options have been unset:"
+ eerror
+ eerror " Kernel hacking --->"
+ eerror " [ ] Lock debugging: detect incorrect freeing of live locks"
+ eerror " [ ] Lock debugging: prove locking correctness"
+ eerror " [ ] Lock usage statistics"
+ eerror "in 'menuconfig'"
+ die "LOCKDEP enabled"
+ fi
+}
+
+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/')"
+ mtrr_check
+ lockdep_check
+ fi
+
+ # On BSD userland it wants real make command
+ use userland_BSD && MAKE="$(get_bmake)"
+
+ export _POSIX2_VERSION="199209"
+
+ # 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
+ NV_SRC="${S}/src"
+ elif use kernel_linux; then
+ NV_SRC="${S}/kernel"
+ else
+ die "Could not determine proper NVIDIA package"
+ fi
+}
+
+src_unpack() {
+ if use kernel_linux && kernel_is lt 2 6 7; then
+ echo
+ ewarn "Your kernel version is ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}"
+ ewarn "This is not officially supported for ${P}. It is likely you"
+ ewarn "will not be able to compile or use the kernel module."
+ ewarn "It is recommended that you upgrade your kernel to a version >= 2.6.7"
+ echo
+ ewarn "DO NOT file bug reports for kernel versions less than 2.6.7 as they will be ignored."
+ fi
+
+ if ! use x86-fbsd; then
+ cd "${S}"
+ unpack_makeself
+ else
+ unpack ${A}
+ fi
+}
+
+src_prepare() {
+ # Please add a brief description for every added patch
+ use x86-fbsd && cd doc
+
+ if use kernel_linux; then
+ # Quiet down warnings the user does not need to see
+ sed -i \
+ -e 's:-Wsign-compare::g' \
+ "${NV_SRC}"/Makefile.kbuild
+
+ # If you set this then it's your own fault when stuff breaks :)
+ use custom-cflags && sed -i "s:-O:${CFLAGS}:" "${NV_SRC}"/Makefile.*
+
+ # If greater than 2.6.5 use M= instead of SUBDIR=
+ convert_to_m "${NV_SRC}"/Makefile.kbuild
+ fi
+}
+
+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 x86-fbsd; 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
+}
+
+src_install() {
+ if use kernel_linux; then
+ linux-mod_src_install
+ elif use x86-fbsd; then
+ insinto /boot/modules
+ doins "${WORKDIR}/${NV_PACKAGE}/src/nvidia.kld" || die
+
+ exeinto /boot/modules
+ doexe "${WORKDIR}/${NV_PACKAGE}/src/nvidia.ko" || die
+ fi
+}
+
+pkg_preinst() {
+ use kernel_linux && linux-mod_pkg_postinst
+}
+
+pkg_postinst() {
+ use kernel_linux && linux-mod_pkg_postinst
+
+ echo
+ 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 package 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
+
+}
+
+pkg_postrm() {
+ use kernel_linux && linux-mod_pkg_postrm
+}
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-302.17.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-302.17.ebuild
new file mode 100644
index 00000000..fd51b319
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-302.17.ebuild
@@ -0,0 +1,192 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="2"
+
+inherit eutils unpacker portability versionator linux-mod flag-o-matic nvidia-driver
+
+X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}"
+AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}"
+X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}"
+
+DESCRIPTION="NVIDIA GPUs kernel drivers"
+HOMEPAGE="http://www.nvidia.com/"
+SRC_URI="x86? ( http://us.download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}.run )
+ amd64? ( http://us.download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run )
+ x86-fbsd? ( http://us.download.nvidia.com/XFree86/FreeBSD-x86/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )"
+
+LICENSE="NVIDIA"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
+IUSE="acpi custom-cflags multilib kernel_linux"
+RESTRICT="strip"
+
+DEPEND="kernel_linux? ( virtual/linux-sources )"
+RDEPEND="~x11-drivers/nvidia-userspace-${PV}
+ multilib? ( ~x11-drivers/nvidia-userspace-${PV}[multilib] )
+ x11-libs/libXvMC
+ acpi? ( sys-power/acpid )"
+PDEPEND=">=x11-libs/libvdpau-0.3-r1"
+
+S="${WORKDIR}/"
+
+mtrr_check() {
+ ebegin "Checking for MTRR support"
+ linux_chkconfig_present MTRR
+ eend $?
+
+ if [[ $? -ne 0 ]] ; then
+ eerror "Please enable MTRR support in your kernel config, found at:"
+ eerror
+ eerror " Processor type and features"
+ eerror " [*] MTRR (Memory Type Range Register) support"
+ eerror
+ eerror "and recompile your kernel ..."
+ die "MTRR support not detected!"
+ fi
+}
+
+lockdep_check() {
+ if linux_chkconfig_present LOCKDEP; then
+ eerror "You've enabled LOCKDEP -- lock tracking -- in the kernel."
+ eerror "Unfortunately, this option exports the symbol "
+ eerror "'lockdep_init_map' as GPL-only which will prevent "
+ eerror "${P} from compiling."
+ eerror "Please make sure the following options have been unset:"
+ eerror
+ eerror " Kernel hacking --->"
+ eerror " [ ] Lock debugging: detect incorrect freeing of live locks"
+ eerror " [ ] Lock debugging: prove locking correctness"
+ eerror " [ ] Lock usage statistics"
+ eerror "in 'menuconfig'"
+ die "LOCKDEP enabled"
+ fi
+}
+
+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/')"
+ mtrr_check
+ lockdep_check
+ fi
+
+ # On BSD userland it wants real make command
+ use userland_BSD && MAKE="$(get_bmake)"
+
+ export _POSIX2_VERSION="199209"
+
+ # 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
+ NV_SRC="${S}/src"
+ elif use kernel_linux; then
+ NV_SRC="${S}/kernel"
+ else
+ die "Could not determine proper NVIDIA package"
+ fi
+}
+
+src_unpack() {
+ if use kernel_linux && kernel_is lt 2 6 7; then
+ echo
+ ewarn "Your kernel version is ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}"
+ ewarn "This is not officially supported for ${P}. It is likely you"
+ ewarn "will not be able to compile or use the kernel module."
+ ewarn "It is recommended that you upgrade your kernel to a version >= 2.6.7"
+ echo
+ ewarn "DO NOT file bug reports for kernel versions less than 2.6.7 as they will be ignored."
+ fi
+
+ if ! use x86-fbsd; then
+ cd "${S}"
+ unpack_makeself
+ else
+ unpack ${A}
+ fi
+}
+
+src_prepare() {
+ # Please add a brief description for every added patch
+ use x86-fbsd && cd doc
+
+ if use kernel_linux; then
+ # Quiet down warnings the user does not need to see
+ sed -i \
+ -e 's:-Wsign-compare::g' \
+ "${NV_SRC}"/Makefile.kbuild
+
+ # If you set this then it's your own fault when stuff breaks :)
+ use custom-cflags && sed -i "s:-O:${CFLAGS}:" "${NV_SRC}"/Makefile.*
+
+ # If greater than 2.6.5 use M= instead of SUBDIR=
+ convert_to_m "${NV_SRC}"/Makefile.kbuild
+ fi
+}
+
+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 x86-fbsd; 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
+}
+
+src_install() {
+ if use kernel_linux; then
+ linux-mod_src_install
+ elif use x86-fbsd; then
+ insinto /boot/modules
+ doins "${WORKDIR}/${NV_PACKAGE}/src/nvidia.kld" || die
+
+ exeinto /boot/modules
+ doexe "${WORKDIR}/${NV_PACKAGE}/src/nvidia.ko" || die
+ fi
+}
+
+pkg_preinst() {
+ use kernel_linux && linux-mod_pkg_postinst
+}
+
+pkg_postinst() {
+ use kernel_linux && linux-mod_pkg_postinst
+
+ echo
+ 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 package 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
+
+}
+
+pkg_postrm() {
+ use kernel_linux && linux-mod_pkg_postrm
+}
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-304.22.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-304.22.ebuild
new file mode 100644
index 00000000..fd51b319
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-304.22.ebuild
@@ -0,0 +1,192 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="2"
+
+inherit eutils unpacker portability versionator linux-mod flag-o-matic nvidia-driver
+
+X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}"
+AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}"
+X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}"
+
+DESCRIPTION="NVIDIA GPUs kernel drivers"
+HOMEPAGE="http://www.nvidia.com/"
+SRC_URI="x86? ( http://us.download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}.run )
+ amd64? ( http://us.download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run )
+ x86-fbsd? ( http://us.download.nvidia.com/XFree86/FreeBSD-x86/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )"
+
+LICENSE="NVIDIA"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
+IUSE="acpi custom-cflags multilib kernel_linux"
+RESTRICT="strip"
+
+DEPEND="kernel_linux? ( virtual/linux-sources )"
+RDEPEND="~x11-drivers/nvidia-userspace-${PV}
+ multilib? ( ~x11-drivers/nvidia-userspace-${PV}[multilib] )
+ x11-libs/libXvMC
+ acpi? ( sys-power/acpid )"
+PDEPEND=">=x11-libs/libvdpau-0.3-r1"
+
+S="${WORKDIR}/"
+
+mtrr_check() {
+ ebegin "Checking for MTRR support"
+ linux_chkconfig_present MTRR
+ eend $?
+
+ if [[ $? -ne 0 ]] ; then
+ eerror "Please enable MTRR support in your kernel config, found at:"
+ eerror
+ eerror " Processor type and features"
+ eerror " [*] MTRR (Memory Type Range Register) support"
+ eerror
+ eerror "and recompile your kernel ..."
+ die "MTRR support not detected!"
+ fi
+}
+
+lockdep_check() {
+ if linux_chkconfig_present LOCKDEP; then
+ eerror "You've enabled LOCKDEP -- lock tracking -- in the kernel."
+ eerror "Unfortunately, this option exports the symbol "
+ eerror "'lockdep_init_map' as GPL-only which will prevent "
+ eerror "${P} from compiling."
+ eerror "Please make sure the following options have been unset:"
+ eerror
+ eerror " Kernel hacking --->"
+ eerror " [ ] Lock debugging: detect incorrect freeing of live locks"
+ eerror " [ ] Lock debugging: prove locking correctness"
+ eerror " [ ] Lock usage statistics"
+ eerror "in 'menuconfig'"
+ die "LOCKDEP enabled"
+ fi
+}
+
+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/')"
+ mtrr_check
+ lockdep_check
+ fi
+
+ # On BSD userland it wants real make command
+ use userland_BSD && MAKE="$(get_bmake)"
+
+ export _POSIX2_VERSION="199209"
+
+ # 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
+ NV_SRC="${S}/src"
+ elif use kernel_linux; then
+ NV_SRC="${S}/kernel"
+ else
+ die "Could not determine proper NVIDIA package"
+ fi
+}
+
+src_unpack() {
+ if use kernel_linux && kernel_is lt 2 6 7; then
+ echo
+ ewarn "Your kernel version is ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}"
+ ewarn "This is not officially supported for ${P}. It is likely you"
+ ewarn "will not be able to compile or use the kernel module."
+ ewarn "It is recommended that you upgrade your kernel to a version >= 2.6.7"
+ echo
+ ewarn "DO NOT file bug reports for kernel versions less than 2.6.7 as they will be ignored."
+ fi
+
+ if ! use x86-fbsd; then
+ cd "${S}"
+ unpack_makeself
+ else
+ unpack ${A}
+ fi
+}
+
+src_prepare() {
+ # Please add a brief description for every added patch
+ use x86-fbsd && cd doc
+
+ if use kernel_linux; then
+ # Quiet down warnings the user does not need to see
+ sed -i \
+ -e 's:-Wsign-compare::g' \
+ "${NV_SRC}"/Makefile.kbuild
+
+ # If you set this then it's your own fault when stuff breaks :)
+ use custom-cflags && sed -i "s:-O:${CFLAGS}:" "${NV_SRC}"/Makefile.*
+
+ # If greater than 2.6.5 use M= instead of SUBDIR=
+ convert_to_m "${NV_SRC}"/Makefile.kbuild
+ fi
+}
+
+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 x86-fbsd; 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
+}
+
+src_install() {
+ if use kernel_linux; then
+ linux-mod_src_install
+ elif use x86-fbsd; then
+ insinto /boot/modules
+ doins "${WORKDIR}/${NV_PACKAGE}/src/nvidia.kld" || die
+
+ exeinto /boot/modules
+ doexe "${WORKDIR}/${NV_PACKAGE}/src/nvidia.ko" || die
+ fi
+}
+
+pkg_preinst() {
+ use kernel_linux && linux-mod_pkg_postinst
+}
+
+pkg_postinst() {
+ use kernel_linux && linux-mod_pkg_postinst
+
+ echo
+ 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 package 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
+
+}
+
+pkg_postrm() {
+ use kernel_linux && linux-mod_pkg_postrm
+}
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-304.37.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-304.37.ebuild
new file mode 100644
index 00000000..c26611c4
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-304.37.ebuild
@@ -0,0 +1,180 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=4
+
+inherit eutils flag-o-matic linux-info linux-mod multilib nvidia-driver \
+ portability toolchain-funcs unpacker user versionator
+
+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 GPUs kernel drivers"
+HOMEPAGE="http://www.nvidia.com/"
+SRC_URI="x86? ( http://us.download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}.run )
+ amd64? ( http://us.download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run )
+ amd64-fbsd? ( http://us.download.nvidia.com/XFree86/FreeBSD-x86_64/${PV}/${AMD64_FBSD_NV_PACKAGE}.tar.gz )
+ x86-fbsd? ( http://us.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 custom-cflags multilib x-multilib kernel_FreeBSD kernel_linux tools X"
+RESTRICT="strip"
+
+DEPEND="kernel_linux? ( virtual/linux-sources )"
+RDEPEND="~x11-drivers/nvidia-userspace-${PV}
+ x-multilib? ( ~x11-drivers/nvidia-userspace-${PV}[x-multilib] )
+ multilib? ( ~x11-drivers/nvidia-userspace-${PV}[multilib] )
+ ~x11-drivers/nvidia-userspace-${PV}[tools=]
+ ~x11-drivers/nvidia-userspace-${PV}[X=]"
+PDEPEND=""
+
+S="${WORKDIR}/"
+
+mtrr_check() {
+ ebegin "Checking for MTRR support"
+ linux_chkconfig_present MTRR
+ eend $?
+
+ if [[ $? -ne 0 ]] ; then
+ eerror "Please enable MTRR support in your kernel config, found at:"
+ eerror
+ eerror " Processor type and features"
+ eerror " [*] MTRR (Memory Type Range Register) support"
+ eerror
+ eerror "and recompile your kernel ..."
+ die "MTRR support not detected!"
+ fi
+}
+
+lockdep_check() {
+ # 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
+
+ # 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_SRC="${S}/src"
+ NV_SOVER=1
+ elif use kernel_linux; then
+ NV_SRC="${S}/kernel"
+ 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
+ cat <<- EOF > "${S}"/nvidia.icd
+ /usr/$(get_libdir)/libcuda.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
+}
+
+src_install() {
+ if use kernel_linux; then
+ linux-mod_src_install
+ 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
+
+ is_final_abi || die "failed to iterate through all ABIs"
+}
+
+pkg_preinst() {
+ use kernel_linux && linux-mod_pkg_preinst
+}
+
+pkg_postinst() {
+ use kernel_linux && linux-mod_pkg_postinst
+
+ echo
+ 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 package 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
+
+}
+
+pkg_postrm() {
+ use kernel_linux && linux-mod_pkg_postrm
+}
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-304.64.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-304.64.ebuild
new file mode 100644
index 00000000..757a7ff2
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-304.64.ebuild
@@ -0,0 +1,444 @@
+# 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/nvidia-drivers-304.64.ebuild,v 1.4 2012/12/19 16:52:01 tetromino 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
+
+ # 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
+}
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-304.88.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-304.88.ebuild
new file mode 100644
index 00000000..a0f9b979
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-304.88.ebuild
@@ -0,0 +1,187 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=4
+
+inherit eutils flag-o-matic linux-info linux-mod multilib nvidia-driver \
+ portability toolchain-funcs unpacker user versionator
+
+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 GPUs kernel drivers"
+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 custom-cflags multilib x-multilib kernel_FreeBSD kernel_linux pax_kernel tools X"
+RESTRICT="strip"
+
+DEPEND="kernel_linux? ( virtual/linux-sources )"
+RDEPEND="~x11-drivers/nvidia-userspace-${PV}
+ x-multilib? ( ~x11-drivers/nvidia-userspace-${PV}[x-multilib] )
+ multilib? ( ~x11-drivers/nvidia-userspace-${PV}[multilib] )
+ ~x11-drivers/nvidia-userspace-${PV}[tools=]
+ ~x11-drivers/nvidia-userspace-${PV}[X=]"
+PDEPEND=""
+
+S="${WORKDIR}/"
+
+mtrr_check() {
+ ebegin "Checking for MTRR support"
+ linux_chkconfig_present MTRR
+ eend $?
+
+ if [[ $? -ne 0 ]] ; then
+ eerror "Please enable MTRR support in your kernel config, found at:"
+ eerror
+ eerror " Processor type and features"
+ eerror " [*] MTRR (Memory Type Range Register) support"
+ eerror
+ eerror "and recompile your kernel ..."
+ die "MTRR support not detected!"
+ fi
+}
+
+lockdep_check() {
+ # 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
+
+ # 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_SRC="${S}/src"
+ NV_SOVER=1
+ elif use kernel_linux; then
+ NV_SRC="${S}/kernel"
+ 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
+}
+
+src_install() {
+ if use kernel_linux; then
+ linux-mod_src_install
+ 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
+
+ is_final_abi || die "failed to iterate through all ABIs"
+}
+
+pkg_preinst() {
+ use kernel_linux && linux-mod_pkg_preinst
+}
+
+pkg_postinst() {
+ use kernel_linux && linux-mod_pkg_postinst
+
+ echo
+ 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 package 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
+
+}
+
+pkg_postrm() {
+ use kernel_linux && linux-mod_pkg_postrm
+}
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-310.19.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-310.19.ebuild
new file mode 100644
index 00000000..c26611c4
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-310.19.ebuild
@@ -0,0 +1,180 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=4
+
+inherit eutils flag-o-matic linux-info linux-mod multilib nvidia-driver \
+ portability toolchain-funcs unpacker user versionator
+
+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 GPUs kernel drivers"
+HOMEPAGE="http://www.nvidia.com/"
+SRC_URI="x86? ( http://us.download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}.run )
+ amd64? ( http://us.download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run )
+ amd64-fbsd? ( http://us.download.nvidia.com/XFree86/FreeBSD-x86_64/${PV}/${AMD64_FBSD_NV_PACKAGE}.tar.gz )
+ x86-fbsd? ( http://us.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 custom-cflags multilib x-multilib kernel_FreeBSD kernel_linux tools X"
+RESTRICT="strip"
+
+DEPEND="kernel_linux? ( virtual/linux-sources )"
+RDEPEND="~x11-drivers/nvidia-userspace-${PV}
+ x-multilib? ( ~x11-drivers/nvidia-userspace-${PV}[x-multilib] )
+ multilib? ( ~x11-drivers/nvidia-userspace-${PV}[multilib] )
+ ~x11-drivers/nvidia-userspace-${PV}[tools=]
+ ~x11-drivers/nvidia-userspace-${PV}[X=]"
+PDEPEND=""
+
+S="${WORKDIR}/"
+
+mtrr_check() {
+ ebegin "Checking for MTRR support"
+ linux_chkconfig_present MTRR
+ eend $?
+
+ if [[ $? -ne 0 ]] ; then
+ eerror "Please enable MTRR support in your kernel config, found at:"
+ eerror
+ eerror " Processor type and features"
+ eerror " [*] MTRR (Memory Type Range Register) support"
+ eerror
+ eerror "and recompile your kernel ..."
+ die "MTRR support not detected!"
+ fi
+}
+
+lockdep_check() {
+ # 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
+
+ # 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_SRC="${S}/src"
+ NV_SOVER=1
+ elif use kernel_linux; then
+ NV_SRC="${S}/kernel"
+ 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
+ cat <<- EOF > "${S}"/nvidia.icd
+ /usr/$(get_libdir)/libcuda.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
+}
+
+src_install() {
+ if use kernel_linux; then
+ linux-mod_src_install
+ 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
+
+ is_final_abi || die "failed to iterate through all ABIs"
+}
+
+pkg_preinst() {
+ use kernel_linux && linux-mod_pkg_preinst
+}
+
+pkg_postinst() {
+ use kernel_linux && linux-mod_pkg_postinst
+
+ echo
+ 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 package 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
+
+}
+
+pkg_postrm() {
+ use kernel_linux && linux-mod_pkg_postrm
+}
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-313.18.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-313.18.ebuild
new file mode 100644
index 00000000..3dc5972c
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-313.18.ebuild
@@ -0,0 +1,431 @@
+# 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.2 2013/01/17 18:29:22 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 +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
+
+ # 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
+
+ # 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
+
+ # 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
+}
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-313.30.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-313.30.ebuild
new file mode 100644
index 00000000..d8507b3a
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-313.30.ebuild
@@ -0,0 +1,184 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=5
+
+inherit eutils flag-o-matic linux-info linux-mod multilib nvidia-driver \
+ portability toolchain-funcs unpacker user
+
+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 GPUs kernel drivers"
+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 custom-cflags multilib x-multilib kernel_FreeBSD kernel_linux pax_kernel tools X"
+RESTRICT="strip"
+
+DEPEND="kernel_linux? ( virtual/linux-sources )"
+RDEPEND="~x11-drivers/nvidia-userspace-${PV}
+ x-multilib? ( ~x11-drivers/nvidia-userspace-${PV}[x-multilib] )
+ multilib? ( ~x11-drivers/nvidia-userspace-${PV}[multilib] )
+ ~x11-drivers/nvidia-userspace-${PV}[tools=]
+ ~x11-drivers/nvidia-userspace-${PV}[X=]"
+PDEPEND=""
+
+S="${WORKDIR}/"
+
+mtrr_check() {
+ ebegin "Checking for MTRR support"
+ linux_chkconfig_present MTRR
+ eend $?
+
+ if [[ $? -ne 0 ]] ; then
+ eerror "Please enable MTRR support in your kernel config, found at:"
+ eerror
+ eerror " Processor type and features"
+ eerror " [*] MTRR (Memory Type Range Register) support"
+ eerror
+ eerror "and recompile your kernel ..."
+ die "MTRR support not detected!"
+ fi
+}
+
+lockdep_check() {
+ # 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
+
+ # 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_SRC="${S}/src"
+ NV_SOVER=1
+ elif use kernel_linux; then
+ NV_SRC="${S}/kernel"
+ 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
+}
+
+src_install() {
+ if use kernel_linux; then
+ linux-mod_src_install
+ 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
+
+ is_final_abi || die "failed to iterate through all ABIs"
+}
+
+pkg_preinst() {
+ use kernel_linux && linux-mod_pkg_preinst
+}
+
+pkg_postinst() {
+ use kernel_linux && linux-mod_pkg_postinst
+
+ echo
+ 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 package 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
+
+}
+
+pkg_postrm() {
+ use kernel_linux && linux-mod_pkg_postrm
+}
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-325.15.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-325.15.ebuild
new file mode 100644
index 00000000..fd3e8354
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-325.15.ebuild
@@ -0,0 +1,192 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=5
+
+inherit eutils flag-o-matic linux-info linux-mod multilib nvidia-driver \
+ portability toolchain-funcs unpacker user
+
+NV_URI="http://us.download.nvidia.com/XFree86/"
+X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}"
+AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}"
+X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}"
+AMD64_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86_64-${PV}"
+
+DESCRIPTION="NVIDIA GPUs kernel drivers"
+HOMEPAGE="http://www.nvidia.com/"
+SRC_URI="
+ amd64-fbsd? ( ${NV_URI}FreeBSD-x86_64/${PV}/${AMD64_FBSD_NV_PACKAGE}.tar.gz )
+ amd64? ( ${NV_URI}Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run )
+ x86-fbsd? ( ${NV_URI}FreeBSD-x86/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )
+ x86? ( ${NV_URI}Linux-x86/${PV}/${X86_NV_PACKAGE}.run )
+"
+
+LICENSE="NVIDIA-r1"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="acpi custom-cflags multilib x-multilib kernel_FreeBSD kernel_linux pax_kernel tools X"
+RESTRICT="bindist mirror strip"
+
+DEPEND="kernel_linux? ( virtual/linux-sources )"
+RDEPEND="~x11-drivers/nvidia-userspace-${PV}
+ x-multilib? ( ~x11-drivers/nvidia-userspace-${PV}[x-multilib] )
+ multilib? ( ~x11-drivers/nvidia-userspace-${PV}[multilib] )
+ ~x11-drivers/nvidia-userspace-${PV}[tools=]
+ ~x11-drivers/nvidia-userspace-${PV}[X=]"
+PDEPEND=""
+
+S="${WORKDIR}/"
+
+mtrr_check() {
+ ebegin "Checking for MTRR support"
+ linux_chkconfig_present MTRR
+ eend $?
+
+ if [[ $? -ne 0 ]] ; then
+ eerror "Please enable MTRR support in your kernel config, found at:"
+ eerror
+ eerror " Processor type and features"
+ eerror " [*] MTRR (Memory Type Range Register) support"
+ eerror
+ eerror "and recompile your kernel ..."
+ die "MTRR support not detected!"
+ fi
+}
+
+lockdep_check() {
+ # 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
+
+ # 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_SRC="${S}/src"
+ NV_SOVER=1
+ elif use kernel_linux; then
+ NV_SRC="${S}/kernel"
+ 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
+ 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
+
+ if kernel_is ge 3 10 0; then
+ #epatch "${FILESDIR}/${PN}-319.23-3.10.patch"
+ ewarn "Should we keep this?"
+ 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
+}
+
+src_install() {
+ if use kernel_linux; then
+ linux-mod_src_install
+ 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
+
+ is_final_abi || die "failed to iterate through all ABIs"
+}
+
+pkg_preinst() {
+ use kernel_linux && linux-mod_pkg_preinst
+}
+
+pkg_postinst() {
+ use kernel_linux && linux-mod_pkg_postinst
+
+ echo
+ 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 package 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
+
+}
+
+pkg_postrm() {
+ use kernel_linux && linux-mod_pkg_postrm
+}
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-96.43.20.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-96.43.20.ebuild
new file mode 100644
index 00000000..d1694146
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-96.43.20.ebuild
@@ -0,0 +1,199 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="2"
+
+inherit eutils unpacker portability versionator linux-mod flag-o-matic nvidia-driver
+
+X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}"
+AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}"
+X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}"
+
+DESCRIPTION="NVIDIA GPUs kernel drivers"
+HOMEPAGE="http://www.nvidia.com/"
+SRC_URI="x86? ( ftp://download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}-pkg0.run )
+ amd64? ( ftp://download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}-pkg2.run )
+ x86-fbsd? ( ftp://download.nvidia.com/freebsd/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )"
+
+LICENSE="NVIDIA"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
+IUSE="acpi custom-cflags multilib kernel_linux"
+RESTRICT="strip"
+
+DEPEND="kernel_linux? ( virtual/linux-sources )"
+RDEPEND="~x11-drivers/nvidia-userspace-${PV}
+ multilib? ( ~x11-drivers/nvidia-userspace-${PV}[multilib] )
+ acpi? ( sys-power/acpid )"
+PDEPEND=""
+
+if use x86; then
+ PKG_V="-pkg0"
+ NV_PACKAGE="${X86_NV_PACKAGE}"
+elif use amd64; then
+ PKG_V="-pkg2"
+ NV_PACKAGE="${AMD64_NV_PACKAGE}"
+elif use x86-fbsd; then
+ PKG_V=""
+ NV_PACKAGE="${X86_FBSD_NV_PACKAGE}"
+fi
+
+S="${WORKDIR}/${NV_PACKAGE}${PKG_V}"
+
+mtrr_check() {
+ ebegin "Checking for MTRR support"
+ linux_chkconfig_present MTRR
+ eend $?
+
+ if [[ $? -ne 0 ]] ; then
+ eerror "Please enable MTRR support in your kernel config, found at:"
+ eerror
+ eerror " Processor type and features"
+ eerror " [*] MTRR (Memory Type Range Register) support"
+ eerror
+ eerror "and recompile your kernel ..."
+ die "MTRR support not detected!"
+ fi
+}
+
+lockdep_check() {
+ if linux_chkconfig_present LOCKDEP; then
+ eerror "You've enabled LOCKDEP -- lock tracking -- in the kernel."
+ eerror "Unfortunately, this option exports the symbol 'lockdep_init_map' as GPL-only"
+ eerror "which will prevent ${P} from compiling."
+ eerror "Please make sure the following options have been unset:"
+ eerror " Kernel hacking --->"
+ eerror " [ ] Lock debugging: detect incorrect freeing of live locks"
+ eerror " [ ] Lock debugging: prove locking correctness"
+ eerror " [ ] Lock usage statistics"
+ eerror "in 'menuconfig'"
+ die "LOCKDEP enabled"
+ fi
+}
+
+pkg_setup() {
+ if use kernel_linux; then
+ linux-mod_pkg_setup
+ MODULE_NAMES="nvidia(video:${S}/usr/src/nv)"
+ BUILD_PARAMS="IGNORE_CC_MISMATCH=yes V=1 SYSSRC=${KV_DIR} \
+ SYSOUT=${KV_OUT_DIR} HOST_CC=$(tc-getBUILD_CC)"
+ mtrr_check
+ lockdep_check
+ fi
+
+ # On BSD userland it wants real make command
+ use userland_BSD && MAKE="$(get_bmake)"
+
+ export _POSIX2_VERSION="199209"
+
+ # 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
+ NV_SRC="${S}/src"
+ elif use kernel_linux; then
+ NV_SRC="${S}/usr/src/nv"
+ else
+ die "Could not determine proper NVIDIA package"
+ fi
+}
+
+src_unpack() {
+ if use kernel_linux && kernel_is lt 2 6 7; then
+ echo
+ ewarn "Your kernel version is ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}"
+ ewarn "This is not officially supported for ${P}. It is likely you"
+ ewarn "will not be able to compile or use the kernel module."
+ ewarn "It is recommended that you upgrade your kernel to a version >= 2.6.7"
+ echo
+ ewarn "DO NOT file bug reports for kernel versions less than 2.6.7 as they will be ignored."
+ fi
+
+ if ! use x86-fbsd; then
+ mkdir "${S}"
+ cd "${S}"
+ unpack_makeself
+ else
+ unpack ${A}
+ fi
+}
+
+src_prepare() {
+ # Please add a brief description for every added patch
+ use x86-fbsd && cd doc
+
+ if use kernel_linux; then
+ # Quiet down warnings the user does not need to see
+ sed -i \
+ -e 's:-Wpointer-arith::g' \
+ -e 's:-Wsign-compare::g' \
+ "${NV_SRC}"/Makefile.kbuild
+
+ # If you set this then it's your own fault when stuff breaks :)
+ use custom-cflags && sed -i "s:-O:${CFLAGS}:" "${NV_SRC}"/Makefile.*
+
+ # If greater than 2.6.5 use M= instead of SUBDIR=
+ convert_to_m "${NV_SRC}"/Makefile.kbuild
+ fi
+}
+
+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 x86-fbsd; 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
+}
+
+src_install() {
+ if use kernel_linux; then
+ linux-mod_src_install
+ elif use x86-fbsd; then
+ insinto /boot/modules
+ doins "${WORKDIR}/${NV_PACKAGE}/src/nvidia.kld" || die
+
+ exeinto /boot/modules
+ doexe "${WORKDIR}/${NV_PACKAGE}/src/nvidia.ko" || die
+ fi
+}
+
+pkg_preinst() {
+ if use kernel_linux; then
+ linux-mod_pkg_postinst
+ fi
+}
+
+pkg_postinst() {
+ if use kernel_linux; then
+ linux-mod_pkg_postinst
+ fi
+
+ echo
+ 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 package 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
+ echo
+}
+
+pkg_postrm() {
+ if use kernel_linux; then
+ linux-mod_pkg_postrm
+ fi
+}