diff options
author | Tony Vroon <chainsaw@gentoo.org> | 2008-05-07 16:33:41 +0000 |
---|---|---|
committer | Tony Vroon <chainsaw@gentoo.org> | 2008-05-07 16:33:41 +0000 |
commit | a4809b3775da9ef162384d935de7bf41f63e4e54 (patch) | |
tree | 34a44669b14ae678606ca707748695dd245cfe23 /x11-drivers/nvidia-drivers | |
parent | calling php-ext-source-r1_src_unpack explicitly, bug 220519 (diff) | |
download | historical-a4809b3775da9ef162384d935de7bf41f63e4e54.tar.gz historical-a4809b3775da9ef162384d935de7bf41f63e4e54.tar.bz2 historical-a4809b3775da9ef162384d935de7bf41f63e4e54.zip |
Masked beta driver 173.08 with upstream patch from Zander ( http://www.nvnews.net/vbulletin/showpost.php?p=1648357&postcount=35 ) for >=2.6.26-rc1 compatibility. Dropped keywords as this has only been tested on 2.6.26-rc1-00166-gc0a1811 SMP x86_64 so far. Now installs module control file in modprobe.d where it belongs. Upstream advises to use PAT over MTRR. Some reports of low performance and 2D corruption, tread carefully. Quoted variables for greater repoman happiness.
Package-Manager: portage-2.1.5_rc7
Diffstat (limited to 'x11-drivers/nvidia-drivers')
12 files changed, 1181 insertions, 59 deletions
diff --git a/x11-drivers/nvidia-drivers/ChangeLog b/x11-drivers/nvidia-drivers/ChangeLog index 821879113ba3..0df7ed013677 100644 --- a/x11-drivers/nvidia-drivers/ChangeLog +++ b/x11-drivers/nvidia-drivers/ChangeLog @@ -1,6 +1,26 @@ # ChangeLog for x11-drivers/nvidia-drivers # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/ChangeLog,v 1.93 2008/04/18 19:54:04 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/ChangeLog,v 1.94 2008/05/07 16:33:40 chainsaw Exp $ + + 07 May 2008; <chainsaw@gentoo.org> + +files/NVIDIA_kernel-173.08-2404825.diff, nvidia-drivers-71.86.01.ebuild, + nvidia-drivers-71.86.04.ebuild, nvidia-drivers-96.43.01.ebuild, + nvidia-drivers-96.43.05.ebuild, nvidia-drivers-100.14.09.ebuild, + nvidia-drivers-100.14.11.ebuild, nvidia-drivers-100.14.19.ebuild, + nvidia-drivers-100.14.23.ebuild, +nvidia-drivers-173.08.ebuild: + Quote variables where appropriate. + +*nvidia-drivers-173.08 (07 May 2008) + + 07 May 2008; <chainsaw@gentoo.org> + +files/NVIDIA_kernel-173.08-2404825.diff, +nvidia-drivers-173.08.ebuild: + Masked beta driver 173.08 with upstream patch from Zander ( + http://www.nvnews.net/vbulletin/showpost.php?p=1648357&postcount=35 ) for + >=2.6.26-rc1 compatibility. Dropped keywords as this has only been tested + on 2.6.26-rc1-00166-gc0a1811 SMP x86_64 so far. Now installs module + control file in modprobe.d where it belongs. Upstream advises to use PAT + over MTRR. Some reports of low performance and 2D corruption, tread + carefully. 18 Apr 2008; Mike Frysinger <vapier@gentoo.org> +files/NVIDIA_kernel-96.43.05-2290218.diff, diff --git a/x11-drivers/nvidia-drivers/Manifest b/x11-drivers/nvidia-drivers/Manifest index 2c0569a677c9..5c93c183aa55 100644 --- a/x11-drivers/nvidia-drivers/Manifest +++ b/x11-drivers/nvidia-drivers/Manifest @@ -7,6 +7,7 @@ AUX NVIDIA_glx-glheader.patch 380 RMD160 ee9a10cfbed10d5711f58a80553ffebeea5853b AUX NVIDIA_glx-makefile.patch 602 RMD160 6c92e177c7a551ee43dc9bb0a58790d18497fef4 SHA1 cea7e59f91b0baa41d980a07de92d7dcde4baa77 SHA256 074d041899563641d65bf257b3835fe5aea9e7220af24830d96d1183cd18392e AUX NVIDIA_i2c-hwmon.patch 669 RMD160 812e7081d8f31116031edb0d8eb9c570b09caf89 SHA1 b0f132851cb1a7d8bdd9f205b4f187fcaf9e87d8 SHA256 0aaa05e1167bd722e00fcb90bd9853413ceb4ce3b00b308c314330f47c82f21a AUX NVIDIA_kernel-169.12-2286310.diff 22442 RMD160 20d6473e2762d3fc5e65ccfeb529540ac50b1a71 SHA1 7e445a84b9d73ce7d6febbb04b1ebf8fee6d5ba2 SHA256 4cbd64d7606cbc759f903adabf050911da2a80415f1cef592efe5f2ecaaf2d4d +AUX NVIDIA_kernel-173.08-2404825.diff 17474 RMD160 4de7bd3fa7df9be377b1a681b63a9b4367d63ebb SHA1 80cca8eb7664eed7d0300a1cca4fc64e7bbb3b10 SHA256 11fa8292e76f2d3f203efbacd693ec49245ebd35dd3c60c02c432ca6bde244dc AUX NVIDIA_kernel-96.43.05-2290218.diff 22045 RMD160 3dceffdc2b37dbdb2535bf44e9025c0ed6844c5a SHA1 4762156dfe4c8a32063da1ed7399f21ffa3855d5 SHA256 79e16a0b9c2fa3804e376a06c095079430ec5932ceb789f39a061d88820884f4 AUX libGL.la-r2 733 RMD160 479612ab30c04ca0683c7d9edaf9ab3de783e4a9 SHA1 88656b7e7234ade4f5564373fd6eb5c040167655 SHA256 4856e7a2c31763ade41c93a395f3e80a2705ac2ab4dbd73e5161cdba132f407b AUX nvidia 1510 RMD160 ca0d0e5375109d9edf682d9bdda743b7c693e4d4 SHA1 85cf9bff167dcc063ba61426523973e9598085f7 SHA256 b193cc3f6d6f39138720a2282d9f161fc8f2e8a15bc43d183a30eb879add06c5 @@ -17,6 +18,7 @@ DIST NVIDIA-FreeBSD-x86-100.14.19.tar.gz 11146166 RMD160 144d7a91fb4da94ae45bf97 DIST NVIDIA-FreeBSD-x86-100.14.23.tar.gz 11150297 RMD160 d6c3ac9d4dd812176169398db7c482fcb7895f32 SHA1 d532e5f93f3d4ec473847ea1689f46015182f5ef SHA256 bff55a3a8d6d485c290c73017046692ae48c4d0ccc5aa84276882c88b444724d DIST NVIDIA-FreeBSD-x86-169.07.tar.gz 13751526 RMD160 d38d9081ac3d870788be4bbdee84f66c43d66c06 SHA1 56c3cb3f28ee26132faba6bde79b7b8fd8f002c2 SHA256 9eb417d164bfa6ee53f10227b23e6fae8270bd9890b9777495460c2bbe8e332d DIST NVIDIA-FreeBSD-x86-169.12.tar.gz 13862817 RMD160 bc600a8cb270d1ac0e51bd9ee836ca2ca5034ad6 SHA1 f75b54554a00fa3baba6e0ff3c59844830965e14 SHA256 a237da7664ddcfd2f68336765734ac84de2a2ce0f6535063534b3e6f32f0ac3b +DIST NVIDIA-FreeBSD-x86-173.08.tar.gz 15735811 RMD160 44c9844105f2c29f725316d51d385fd025fb85ae SHA1 53b6e783c181c83f817cd3f7a794584875a6d074 SHA256 bf77023363065fe1ba090847d8bdcb37f5c0a984cd7ce28ec522594b30a74ba1 DIST NVIDIA-FreeBSD-x86-71.86.01.tar.gz 8437426 RMD160 7dd8cc85fed09a9ad40d46b06b6eb1f8b916fabc SHA1 2b5c9ed04ad7c67200622f015a18445ccc3e6c6c SHA256 61f33f5735c91d7f700eaf12a586bd0ddfe12506869819e42a95c2dd2fd2b259 DIST NVIDIA-FreeBSD-x86-96.43.01.tar.gz 9675336 RMD160 cc891f39011b6455207adfebe86a6819bcfc2aa0 SHA1 39ebbc578cb6b068f757ddde1a74d930f42a94ec SHA256 75b43958ba3331dec15cb3ca72d073c428bf58e6fe766852a1b98a0cd0a74908 DIST NVIDIA-Linux-x86-100.14.09-pkg0.run 7855581 RMD160 53f0a664dfb27488943697ffac618574ac388f03 SHA1 a71c46749e5ffa4e95473c13cb1183ca240cc381 SHA256 92ec9b407530018df14c7ccfef9c5e76ad8ba49ee7fd83a1324a5514a82a7b9a @@ -26,6 +28,7 @@ DIST NVIDIA-Linux-x86-100.14.23-pkg0.run 7594280 RMD160 b133f0d71f81037fc210d15d DIST NVIDIA-Linux-x86-169.07-pkg0.run 10105925 RMD160 8cdf4f5b3cd90fdaf83fcd4213c637af28ef233e SHA1 cff35a9b13b76b561ce8aa80c29e141b514f2d27 SHA256 ee7147592588c566ff77ca5dfdd604c4a7fa011af9a414651f1255610a3e4b87 DIST NVIDIA-Linux-x86-169.09-pkg0.run 10190968 RMD160 f89353a2e97939983183d66f7f698f3deaba99c9 SHA1 c516b580baceb730d855b7eacdebe2d6eb093363 SHA256 cd63f52d5d5346d8c1bf83c42f24042bcb1f2404b93aa4d2f9f4642bf5d21106 DIST NVIDIA-Linux-x86-169.12-pkg0.run 10190818 RMD160 9d22a0529bb7d0a4664c3068f6c19e4546fb3173 SHA1 0cf75b9f01d28b11fbd63d1606a8dcec138f1d66 SHA256 bc2768c46d4f8caae60ba30ed1d6907247c083619e3f57ae71f0a26c84357545 +DIST NVIDIA-Linux-x86-173.08-pkg0.run 11489268 RMD160 e82578df8fdf08d615e6c03d9b2f41730e694358 SHA1 319cb2d6a82249922b42c187ad6f0e25b5691a0b SHA256 931dadcf7aacdb6378f03d5bb25b9a133e9f6119774bde27bfd11456acc5eb8d DIST NVIDIA-Linux-x86-71.86.01-pkg0.run 5581876 RMD160 2baa09b7e96d8c5ce4aba566ee985ddd309bbdbf SHA1 e99d273313958ce1629ff8188ed4e5eda3b1ca44 SHA256 9b6fbaf9af198544588e8f433e1d2a294db1f09b7db34e5e826503a4c6ef01f1 DIST NVIDIA-Linux-x86-71.86.04-pkg0.run 5262138 RMD160 e8da0bab680cba8eba4c2e260ec4c36493283809 SHA1 a209fdb1340fcba33843ab94e35fe10ae58065dc SHA256 0236c77ebf9702c86f1c94b33bd16b680ac426e83c250ce28b6b7bc8baa2f2a5 DIST NVIDIA-Linux-x86-96.43.01-pkg0.run 6597242 RMD160 0a698d55925d5e44a01b5a5089b228dacfcb0af2 SHA1 02ce7a76d9ac1df5f9ec5b805ebdbd13eb42c4aa SHA256 777bb1b7eb5ea1ead80c31e516615e44ba198ff782da4df3bead3c31db4de8ba @@ -37,28 +40,30 @@ DIST NVIDIA-Linux-x86_64-100.14.23-pkg2.run 11573717 RMD160 11e74e8d3073b35757ec DIST NVIDIA-Linux-x86_64-169.07-pkg2.run 15426910 RMD160 df77e0b527998364c9ba60380bfc614a190c54c0 SHA1 4cd53e97b57e6a536ae30d6a9d3c300ddfeeca44 SHA256 b1d8ffe39ac9f0ecd40b8b36956e8dde7e4a6cf97560c2a270fe44d2a0e4b91a DIST NVIDIA-Linux-x86_64-169.09-pkg2.run 15629147 RMD160 f16fba6ffcbd99a515054dba380328ea48c6d457 SHA1 18ff8301461bd496e7305052aea5f7f652b15e76 SHA256 2bc39df072453e0ca5275570aebdd8c12e71d2eb8de1c07312ef87b5eff8973b DIST NVIDIA-Linux-x86_64-169.12-pkg2.run 15628910 RMD160 f9022317be683dce17d622210de050354ecce9ac SHA1 62f9e1055ce6cd4d7806757ece0a144695ef12ff SHA256 8ef5a78d6be3bcc3d2f99e6ba1ff52d46a9aa5692657b115e0aafdf115e050bb +DIST NVIDIA-Linux-x86_64-173.08-pkg2.run 17930205 RMD160 25b9d94f7a94a2e4ea5885f5717453454958d914 SHA1 09726ccfde1d2e543659be7464e5f0e45154def6 SHA256 d5bd59993971afe334e47704b43a057355b59104da6c522eca935da8b894bdf0 DIST NVIDIA-Linux-x86_64-71.86.01-pkg2.run 8779794 RMD160 f1811ed90a2a920f9cad11e722236ea077d066d7 SHA1 7b1e4dbad7347140ba5c67e0e074457588165b3f SHA256 1f5507852546bd7514f24d0337b2bd6972582f62f0eacd8c66b40d20985d9be0 DIST NVIDIA-Linux-x86_64-71.86.04-pkg2.run 8375637 RMD160 237bca0486188f22526788ce76b19d654fb9213e SHA1 123e52d0b4340cc9a11da26d997acf84f67c269f SHA256 30f0b3fd5a40f31f5fa3b62a5995dd21fff0632da03fb234a03673c931eb6282 DIST NVIDIA-Linux-x86_64-96.43.01-pkg2.run 10245900 RMD160 02b5ef36ae55a5901ada43c5cffca36128d652ba SHA1 d0dc8d61c32631eb397a8348630eadbae2744e96 SHA256 187d40c0bbcceba5c78f9f49ebb526989a7670bcfd7f5f38f2201fba29c98bbf DIST NVIDIA-Linux-x86_64-96.43.05-pkg2.run 10245467 RMD160 858e917abc5529f286250d845cd8694164321b69 SHA1 9f20838b33c54c3d54e7fdbe87a3b47d542d21f1 SHA256 58fdf6a7abeb60b31db7ac233db684b9cb279c97549d3ea93d994419ff213ec9 -EBUILD nvidia-drivers-100.14.09.ebuild 14566 RMD160 f37a31d8d32584bd45be4498e6dc99c12870c2cb SHA1 9ec0e9260cd1eaeefc953303055c58c0a3c86acf SHA256 12c4560a2a0740b2979dc7ed65b9953fa6cfc5bd86e939671737b4742c63267b -EBUILD nvidia-drivers-100.14.11.ebuild 14568 RMD160 c62b5610dc3124cd6a9c2d4b158d36523a535adf SHA1 b34bc49b11fd55b8e59c1eb438580fd876aba066 SHA256 a9877a839c5590a97f57a542d493140d859c726ae50553be1b327bff4d920792 -EBUILD nvidia-drivers-100.14.19.ebuild 14657 RMD160 80dbbd5fc4f536eff54229cbde52f9b7fd7276fa SHA1 6d951a1b1d566dd608262aede45539b79d560b1e SHA256 44100555ff2df0f6faaf48226580888d42a1f61cd8bc047a09f97ebdedc2c5fe -EBUILD nvidia-drivers-100.14.23.ebuild 14658 RMD160 a43fab1e59d9f01e381ea864b717192522f420cd SHA1 1ee1666dcfd13bd51495c6a445be9808120b3eaa SHA256 9dba80ac97d614bb39940ceb3c66f592a4fffc3945447033b279f5b653eb1f53 +EBUILD nvidia-drivers-100.14.09.ebuild 14578 RMD160 1899b18d29723188c39cebd12ef5b00f0574798f SHA1 7fa7ce5dc76ae93a68737c067cf77fba51f8d35e SHA256 51f2864af118cd2d24dd8178c0d7f75c3a7da7d7304e5a6b39aa3d99f582c153 +EBUILD nvidia-drivers-100.14.11.ebuild 14580 RMD160 b197ffe63f6a403471a6c00a686031ae8dfc6735 SHA1 2aab2ca8bfd89c724257dfe49f6f46a503b61d8e SHA256 3c829f7927a710d7cf95cddf953ec9b3baeb4f7a69d7f4936e5025fce9a6aea5 +EBUILD nvidia-drivers-100.14.19.ebuild 14669 RMD160 1432b1faca7cd5c89a57c22f8c6e4be1a5bf22a1 SHA1 c7d1616f5ee3e0c941824652f91ef799ccd62a62 SHA256 716ab31f4a2daa12a01a758333349af51f382195ec08a7461c4b7cb8eec57932 +EBUILD nvidia-drivers-100.14.23.ebuild 14670 RMD160 ba6f1933758eb62e49e94dd03078b8c2d9f443b0 SHA1 39f36ed6d4aceec151e1720ca43c6669c6b37bc2 SHA256 536efaaff9f85d222c220d3f7c0dcb6de6b661dfa6decec7937d258524618399 EBUILD nvidia-drivers-169.07.ebuild 13602 RMD160 4db23cbdd13745e858229d10413e20c8e61b5760 SHA1 8e007b0aa01eba6e55d7e167beb81264d2c73ded SHA256 c1bb89fd04972d6357de58c0edbfeb3e6818b46fdbe3d75cfa247b788e974ab4 EBUILD nvidia-drivers-169.09-r1.ebuild 14794 RMD160 9152c4cc2e70f91e01c25d36dbfd883e0edac5e7 SHA1 e2e430b3849c03a7e342b32d63c1ebf365351836 SHA256 3ea6246be2acb72f7007b03d9c9a043ffb918369e3a771591062045dc0bfc2bb EBUILD nvidia-drivers-169.09.ebuild 13501 RMD160 7e6d779d8db3d5988b79ddd2da44a9586893f401 SHA1 d59cee3a96fe64c5e9040351a9f6d16420b6b4d8 SHA256 f46eb4b931c87b1915361d82d92814c0a91296f2b74cf56d1a1ef0d765dbc635 EBUILD nvidia-drivers-169.12.ebuild 14974 RMD160 8345f5c357173d953fc94a156b5b01bb6ccced19 SHA1 2779da36fae81d682a3c1189c6a84e03963387cc SHA256 00409c9adadb8485e57b46fc31b1d24c2655b07be522799615d751424aefb82e -EBUILD nvidia-drivers-71.86.01.ebuild 14218 RMD160 44a3cbc6c1c1aad593dfac08ce8070d3ba5e2c54 SHA1 875154af5015448fc238e34c6b9bf95211b8460d SHA256 0db0dc634b5d4cfb06bd50b6cd2ff97844786bc5e9bc5af20ce9b4983da0b3f1 -EBUILD nvidia-drivers-71.86.04.ebuild 14121 RMD160 a850cd138c52f4e8b79887a7f3ecd0c600eba585 SHA1 b0fe2cf1c58f061cdb85391a9a101ac34e22f5c3 SHA256 1eb4a290ebb01e00cbff9bec950f4b6c46c3953ef8cb6ff4c5fdbbd91d7da200 -EBUILD nvidia-drivers-96.43.01.ebuild 14557 RMD160 9ec8f373685cba6402687b7f9fa4fbd62ae307f1 SHA1 21886ca6fbc46a998aaefadad06a21c60ba83249 SHA256 247dede1b041aff2b08dc8a630c83bddba9ab77f4392ddf76dbefad4860a321b -EBUILD nvidia-drivers-96.43.05.ebuild 14538 RMD160 29ff35578de12b65668a1448b12f4599eaf0eebc SHA1 964abfdb3f4c6780e0e557ee79d0bb3981776e67 SHA256 6f87d063b26fb9cb896932c885a000e0d559e884ea9ab0b54480ecc55ac0e156 -MISC ChangeLog 19518 RMD160 14b44a2d4191375881dae368592d2689856ef1e9 SHA1 5dea0a22d9297aae1fb57d5c0447c2c39d7fc067 SHA256 972756e7b845896bd2e83fdcc456e69f739902a7a423d3c18e523cebbffc846c +EBUILD nvidia-drivers-173.08.ebuild 14962 RMD160 815b90f18073eb0562ed246f17dd63d87a2d6994 SHA1 d5a5d73f7ad267e11034d8e493e39835d0152534 SHA256 cbce28278e6ceef22da643156afa1e4163365934818901428e3d97eaced79ccf +EBUILD nvidia-drivers-71.86.01.ebuild 14231 RMD160 49d208c3fdc9b1f13bfec79a098c4f9493f7ce19 SHA1 f46f3971df37928329124b55b3bead9f572a2a1c SHA256 6f84e06dce07f610bcdfc95a300ea6d274000ab77bb6b03e39a028aabb61e61a +EBUILD nvidia-drivers-71.86.04.ebuild 14133 RMD160 3884bbc6577be6563d039ed328faeace5bc73b4e SHA1 9c2da592ef6ed48dd51538869f69531b53f7c6ce SHA256 3c6140e497263eb14f3ff866db49ecc7375fe33760a41921d53d950d3adb0b09 +EBUILD nvidia-drivers-96.43.01.ebuild 14568 RMD160 c436bb8f142d2cb39109dbb6e5c173dc1140f1a6 SHA1 e344039085ac27e11fc5d9c9f16b62c642dd24e0 SHA256 731e05ce94ae6cc4613955ecb736b1ede4371b02c31ce74cc8fe367edaf7575a +EBUILD nvidia-drivers-96.43.05.ebuild 14550 RMD160 79053e54d8baab3c5cc4b3391829d14e5b481565 SHA1 dfef82067f0d568a844c325c9de7d0b280932818 SHA256 fb9ff76607e7d1e9a1e73c856e147dc5b0c2d6af4c584144451b5e77e85d6f8a +MISC ChangeLog 20531 RMD160 4dd850d946ac24da9817e20a982ac568c3cda5e5 SHA1 9b1e7e71bc51ba36c90d20f022cc6e185c91b66f SHA256 7ac63226b43598429794d3f1026370b13899bc585aeb97fdd0137aadd03ed41c MISC metadata.xml 292 RMD160 f5979fce13f28cf69ea0ce27655361d3a399d73e SHA1 f98b700a2945e5b0a256b0aad118b7e08880c4a8 SHA256 9e76022e1a4ab0c738f94b9109e4f509f1a416dc63b71e03e1f0735c82ca9fb4 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) -iEYEARECAAYFAkghwcwACgkQoeSe8B0zEfz4AwCfX//SBbGdRlZQc3PjOzuQXNBk -bhUAn2pQ9rHjg/9xXdOxcbuFhrSCk93Z -=SzpE +iEYEARECAAYFAkgh2dQACgkQp5vW4rUFj5qQkwCbBJINLuBOcljTQn4XPRx3ckk8 +OoYAniPUU8D6CtE0J8A9aSwfA7voSrUt +=XevK -----END PGP SIGNATURE----- diff --git a/x11-drivers/nvidia-drivers/files/NVIDIA_kernel-173.08-2404825.diff b/x11-drivers/nvidia-drivers/files/NVIDIA_kernel-173.08-2404825.diff new file mode 100644 index 000000000000..75726c58d4d5 --- /dev/null +++ b/x11-drivers/nvidia-drivers/files/NVIDIA_kernel-173.08-2404825.diff @@ -0,0 +1,586 @@ +diff -ru usr/src/nv/nv-linux.h usr/src/nv.2404825/nv-linux.h +--- usr/src/nv/nv-linux.h 2008-04-02 01:17:56.000000000 -0700 ++++ usr/src/nv.2404825/nv-linux.h 2008-05-06 16:22:16.603101044 -0700 +@@ -145,16 +145,19 @@ + #endif + + #if (defined(NVCPU_X86) || defined(NVCPU_X86_64)) && !defined(CONFIG_XEN) +-#define NV_BUILD_NV_PAT_SUPPORT 1 ++#define NV_ENABLE_PAT_SUPPORT + #endif + +-#if defined(NV_BUILD_NV_PAT_SUPPORT) +-#include "pat.h" ++#define NV_PAT_MODE_DISABLED 0 ++#define NV_PAT_MODE_KERNEL 1 ++#define NV_PAT_MODE_BUILTIN 2 ++ ++extern int nv_pat_mode; ++ + #if defined(CONFIG_HOTPLUG_CPU) + #include <linux/cpu.h> /* CPU hotplug support */ + #include <linux/notifier.h> /* struct notifier_block, etc */ + #endif +-#endif + + #if (defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)) + #include <linux/i2c.h> +@@ -681,6 +684,13 @@ + #define nv_down(lock) down(&lock) + #define nv_up(lock) up(&lock) + ++#define NV_INIT_MUTEX(mutex) \ ++ { \ ++ struct semaphore __mutex = \ ++ __SEMAPHORE_INITIALIZER(*(mutex), 1); \ ++ *(mutex) = __mutex; \ ++ } ++ + #if defined (KERNEL_2_4) + # define NV_IS_SUSER() suser() + # define NV_PCI_DEVICE_NAME(dev) ((dev)->name) +@@ -1029,20 +1039,6 @@ + return new_prot; + } + #endif +- +-#if defined(NV_BUILD_NV_PAT_SUPPORT) && !defined (pgprot_writecombined) +-static inline pgprot_t pgprot_writecombined(pgprot_t old_prot) +- { +- pgprot_t new_prot = old_prot; +- if (boot_cpu_data.x86 > 3) +- { +- pgprot_val(old_prot) &= ~(_PAGE_PCD | _PAGE_PWT); +- new_prot = __pgprot(pgprot_val(old_prot) | _PAGE_WRTCOMB); +- } +- return new_prot; +- } +-#endif +- + #endif /* defined(NVCPU_X86) || defined(NVCPU_X86_64) */ + + #if defined(KERNEL_2_4) && defined(NVCPU_X86) && !defined(pfn_to_page) +@@ -1142,8 +1138,6 @@ + struct semaphore at_lock; + } nv_linux_state_t; + +-extern int nv_pat_enabled; +- + #if defined(NV_LINUX_ACPI_EVENTS_SUPPORTED) + /* + * acpi data storage structure +diff -ru usr/src/nv/nv-reg.h usr/src/nv.2404825/nv-reg.h +--- usr/src/nv/nv-reg.h 2008-04-02 01:17:56.000000000 -0700 ++++ usr/src/nv.2404825/nv-reg.h 2008-05-06 16:22:16.603101044 -0700 +@@ -471,6 +471,37 @@ + #define __NV_RM_EDGE_INTR_CHECK RMEdgeIntrCheck + #define NV_REG_RM_EDGE_INTR_CHECK NV_REG_STRING(__NV_RM_EDGE_INTR_CHECK) + ++/* ++ * Option: UsePageAttributeTable ++ * ++ * Description: ++ * ++ * Enable/disable use of the page attribute table (PAT) available in ++ * modern x86/x86-64 processors to set the effective memory type of memory ++ * mappings to write-combining (WC). If disabled, the driver will fall ++ * back to using MTRRs, if possible. ++ * ++ * If enabled, an x86 processor with PAT support is present and the host ++ * system's Linux kernel did not configure one of the PAT entries to ++ * indicate the WC memory type, the driver will change the second entry in ++ * the PAT from its default (write-through (WT)) to WC at module load ++ * time. If the kernel did update one of the PAT entries, the driver will ++ * not modify the PAT. ++ * ++ * In both cases, the driver will honor attempts to map memory with the WC ++ * memory type by selecting the appropriate PAT entry using the correct ++ * set of PTE flags. ++ * ++ * Possible values: ++ * ++ * ~0 = use the NVIDIA driver's default logic (default) ++ * 1 = enable use of the PAT for WC mappings. ++ * 0 = disable use of the PAT for WC mappings. ++ */ ++ ++#define __NV_USE_PAGE_ATTRIBUTE_TABLE UsePageAttributeTable ++#define NV_USE_PAGE_ATTRIBUTE_TABLE NV_REG_STRING(__NV_USE_PAGE_ATTRIBUTE_TABLE) ++ + + + #if defined(NV_DEFINE_REGISTRY_KEY_TABLE) +@@ -495,6 +526,7 @@ + NV_DEFINE_REG_ENTRY(__NV_UPDATE_MEMORY_TYPES, ~0); + NV_DEFINE_REG_ENTRY(__NV_USE_VBIOS, 1); + NV_DEFINE_REG_ENTRY(__NV_RM_EDGE_INTR_CHECK, 1); ++NV_DEFINE_REG_ENTRY(__NV_USE_PAGE_ATTRIBUTE_TABLE, ~0); + + #if defined(NV_LINUX) + NV_DEFINE_REG_STRING_ENTRY(__NV_REGISTRY_DWORDS, NULL); +@@ -540,6 +572,7 @@ + NV_DEFINE_PARAMS_TABLE_ENTRY(__NV_UPDATE_MEMORY_TYPES), + NV_DEFINE_PARAMS_TABLE_ENTRY(__NV_USE_VBIOS), + NV_DEFINE_PARAMS_TABLE_ENTRY(__NV_RM_EDGE_INTR_CHECK), ++ NV_DEFINE_PARAMS_TABLE_ENTRY(__NV_USE_PAGE_ATTRIBUTE_TABLE), + {NULL, NULL, NULL} + }; + +diff -ru usr/src/nv/nv.c usr/src/nv.2404825/nv.c +--- usr/src/nv/nv.c 2008-04-02 01:17:56.000000000 -0700 ++++ usr/src/nv.2404825/nv.c 2008-05-06 16:22:16.603101044 -0700 +@@ -22,10 +22,9 @@ + #endif + + #if defined(KERNEL_2_4) && (defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)) +-// weak linking? + extern int i2c_add_adapter (struct i2c_adapter *) __attribute__ ((weak)); + extern int i2c_del_adapter (struct i2c_adapter *) __attribute__ ((weak)); +-#endif // defined(KERNEL_2_4) && (defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)) ++#endif + + /* + * our global state; one per device +@@ -41,14 +40,7 @@ + static struct pm_dev *apm_nv_dev[NV_MAX_DEVICES] = { 0 }; + #endif + +-int nv_pat_enabled = 0; +- +-#if !defined(NV_BUILD_NV_PAT_SUPPORT) +-static int nv_disable_pat = 1; +-#else +-static int nv_disable_pat = 0; +-NV_MODULE_PARAMETER(nv_disable_pat); +-#endif ++int nv_pat_mode = NV_PAT_MODE_DISABLED; + + #if defined(NVCPU_X86) || defined(NVCPU_X86_64) + NvU64 __nv_supported_pte_mask = ~_PAGE_NX; +@@ -611,7 +603,7 @@ + nv_state_t *nv; + nv_linux_state_t *nvl; + +- proc_nvidia = create_proc_entry("nvidia", d_flags, proc_root_driver); ++ proc_nvidia = create_proc_entry("driver/nvidia", d_flags, NULL); + if (!proc_nvidia) + goto failed; + +@@ -863,18 +855,20 @@ + static int __nv_enable_pat_support (void); + static void __nv_disable_pat_support (void); + +-#if defined(NV_BUILD_NV_PAT_SUPPORT) ++#if defined(NV_ENABLE_PAT_SUPPORT) + /* +- * Private PAT support for use by the NVIDIA driver. This is an +- * interim solution until the kernel offers PAT support. ++ * Private PAT support for use by the NVIDIA driver. This is used on ++ * kernels that do not modify the PAT to include a write-combining ++ * entry. + */ + static int __check_pat_support (void); + static void __nv_setup_pat_entries (void *); + static void __nv_restore_pat_entries (void *); + +-#define NV_READ_PAT_ENTRIES(pat1, pat2) rdmsr(IA32_CR_PAT, (pat1), (pat2)) +-#define NV_WRITE_PAT_ENTRIES(pat1, pat2) wrmsr(IA32_CR_PAT, (pat1), (pat2)) +-#define NV_PAT_ENTRY(pat, index) (((pat) & (0xff<<((index)*8)))>>((index)*8)) ++#define NV_READ_PAT_ENTRIES(pat1, pat2) rdmsr(0x277, (pat1), (pat2)) ++#define NV_WRITE_PAT_ENTRIES(pat1, pat2) wrmsr(0x277, (pat1), (pat2)) ++#define NV_PAT_ENTRY(pat, index) \ ++ (((pat) & (0xff << ((index)*8))) >> ((index)*8)) + + static inline void __nv_disable_caches(unsigned long *cr4) + { +@@ -898,8 +892,10 @@ + static int __check_pat_support() + { + unsigned int pat1, pat2, i; ++ U008 PAT_WC_index; + +- if (!test_bit(X86_FEATURE_PAT, (volatile unsigned long *)&boot_cpu_data.x86_capability)) ++ if (!test_bit(X86_FEATURE_PAT, ++ (volatile unsigned long *)&boot_cpu_data.x86_capability)) + { + nv_printf(NV_DBG_ERRORS, + "NVRM: CPU does not support the PAT, falling back to MTRRs.\n"); +@@ -907,24 +903,30 @@ + } + + NV_READ_PAT_ENTRIES(pat1, pat2); ++ PAT_WC_index = 0xf; + + for (i = 0; i < 4; i++) + { +- // we plan to mark PAT entry 1 as WC. if it's already marked such, +- // that's fine, since it would be no different than us setting it. +- if ((i != 1) && NV_PAT_ENTRY(pat1, i) == 1) +- { +- nv_printf(NV_DBG_ERRORS, "NVRM: PAT index %d already configured for Write-Combining!\n", i); +- nv_printf(NV_DBG_ERRORS, "NVRM: Aborting, due to PAT already being configured\n"); +- return 0; +- } +- +- if (NV_PAT_ENTRY(pat2, i) == 1) +- { +- nv_printf(NV_DBG_ERRORS, "NVRM: PAT index %d already configured for Write-Combining!\n", i + 4); +- nv_printf(NV_DBG_ERRORS, "NVRM: Aborting, due to PAT already being configured\n"); +- return 0; +- } ++ if (NV_PAT_ENTRY(pat1, i) == 0x01) ++ { ++ PAT_WC_index = i; ++ break; ++ } ++ ++ if (NV_PAT_ENTRY(pat2, i) == 0x01) ++ { ++ PAT_WC_index = (i + 4); ++ break; ++ } ++ } ++ ++ if (PAT_WC_index == 1) ++ nv_pat_mode = NV_PAT_MODE_KERNEL; ++ else if (PAT_WC_index != 0xf) ++ { ++ nv_printf(NV_DBG_ERRORS, ++ "NVRM: PAT configuration unsupported, falling back to MTRRs.\n"); ++ return 0; + } + + return 1; +@@ -978,20 +980,22 @@ + __nv_enable_caches(cr4); + NV_RESTORE_FLAGS(eflags); + } +- +-#endif /* defined(NV_BUILD_NV_PAT_SUPPORT) */ ++#endif + + static int __nv_enable_pat_support() + { +-#if defined(NV_BUILD_NV_PAT_SUPPORT) ++#if defined(NV_ENABLE_PAT_SUPPORT) + unsigned long pat1, pat2; + +- if (nv_pat_enabled) ++ if (nv_pat_mode != NV_PAT_MODE_DISABLED) + return 1; + + if (!__check_pat_support()) + return 0; + ++ if (nv_pat_mode != NV_PAT_MODE_DISABLED) ++ return 1; ++ + NV_READ_PAT_ENTRIES(orig_pat1, orig_pat2); + nv_printf(NV_DBG_SETUP, "saved orig pats as 0x%lx 0x%lx\n", orig_pat1, orig_pat2); + +@@ -1001,31 +1005,30 @@ + return 0; + } + +- nv_pat_enabled = 1; ++ nv_pat_mode = NV_PAT_MODE_BUILTIN; + + NV_READ_PAT_ENTRIES(pat1, pat2); + nv_printf(NV_DBG_SETUP, "changed pats to 0x%lx 0x%lx\n", pat1, pat2); +-#endif /* defined(NV_BUILD_NV_PAT_SUPPORT) */ +- ++#endif + return 1; + } + + static void __nv_disable_pat_support() + { +-#if defined(NV_BUILD_NV_PAT_SUPPORT) ++#if defined(NV_ENABLE_PAT_SUPPORT) + unsigned long pat1, pat2; + +- if (!nv_pat_enabled) ++ if (nv_pat_mode != NV_PAT_MODE_BUILTIN) + return; + + if (nv_execute_on_all_cpus(__nv_restore_pat_entries, NULL) != 0) + return; + +- nv_pat_enabled = 0; ++ nv_pat_mode = NV_PAT_MODE_DISABLED; + + NV_READ_PAT_ENTRIES(pat1, pat2); + nv_printf(NV_DBG_SETUP, "restored orig pats as 0x%lx 0x%lx\n", pat1, pat2); +-#endif /* defined(NV_BUILD_NV_PAT_SUPPORT) */ ++#endif + } + + #if defined(NV_CHANGE_PAGE_ATTR_BUG_PRESENT) +@@ -1242,7 +1245,7 @@ + break; + default: + expected = pgprot_val(PAGE_KERNEL_NOCACHE); +- if ((flags & ~_PAGE_NX) == (expected & ~_PAGE_NX)) ++ if ((flags & ~(_PAGE_NX | _PAGE_PWT)) == (expected & ~(_PAGE_NX | _PAGE_PWT))) + retval = 0; + break; + } +@@ -1273,7 +1276,7 @@ + #endif + } + +-#if defined(NV_BUILD_NV_PAT_SUPPORT) && defined(CONFIG_HOTPLUG_CPU) ++#if defined(NV_ENABLE_PAT_SUPPORT) && defined(CONFIG_HOTPLUG_CPU) + static int + nv_kern_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu) + { +@@ -1305,8 +1308,7 @@ + .notifier_call = nv_kern_cpu_callback, + .priority = 0 + }; +- +-#endif /* defined(NV_BUILD_NV_PAT_SUPPORT) && defined(CONFIG_HOTPLUG_CPU) */ ++#endif + + + /*** +@@ -1315,7 +1317,7 @@ + + static int __init nvidia_init_module(void) + { +- int rc; ++ int rc, disable_pat = 0; + U032 i, count, data; + nv_state_t *nv = NV_STATE_PTR(&nv_ctl_device); + nv_stack_t *sp = NULL; +@@ -1443,18 +1445,6 @@ + nv_printf(NV_DBG_ERRORS, "NVRM: pte cache allocation failed\n"); + goto failed; + } +- +-#if defined(NV_BUILD_NV_PAT_SUPPORT) && defined(CONFIG_HOTPLUG_CPU) +- if (!nv_disable_pat) +- { +- if (register_hotcpu_notifier(&nv_hotcpu_nfb) != 0) +- { +- rc = -EIO; +- nv_printf(NV_DBG_ERRORS, "NVRM: CPU hotplug notifier registration failed!\n"); +- goto failed; +- } +- } +-#endif + + #if defined(NV_SG_MAP_BUFFERS) + rm_read_registry_dword(sp, nv, "NVreg", "RemapLimit", &nv_remap_limit); +@@ -1532,8 +1522,30 @@ + + nvos_proc_add_warning_file("README", __README_warning); + +- if (!nv_disable_pat) ++ rc = rm_read_registry_dword(sp, nv, ++ "NVreg", NV_USE_PAGE_ATTRIBUTE_TABLE, &data); ++ if ((rc == 0) && ((int)data != ~0)) ++ { ++ disable_pat = (data == 0); ++ } ++ ++ if (!disable_pat) ++ { + __nv_enable_pat_support(); ++#if defined(NV_ENABLE_PAT_SUPPORT) && defined(CONFIG_HOTPLUG_CPU) ++ if (nv_pat_mode == NV_PAT_MODE_BUILTIN) ++ { ++ if (register_hotcpu_notifier(&nv_hotcpu_nfb) != 0)) ++ { ++ __nv_disable_pat_support(); ++ rc = -EIO; ++ nv_printf(NV_DBG_ERRORS, ++ "NVRM: CPU hotplug notifier registration failed!\n"); ++ goto failed; ++ } ++ } ++#endif ++ } + else + { + nv_printf(NV_DBG_ERRORS, +@@ -1686,10 +1698,10 @@ + rm_unregister_compatible_ioctls(sp); + #endif + +- if (nv_pat_enabled) ++ if (nv_pat_mode == NV_PAT_MODE_BUILTIN) + { + __nv_disable_pat_support(); +-#if defined(NV_BUILD_NV_PAT_SUPPORT) && defined(CONFIG_HOTPLUG_CPU) ++#if defined(NV_ENABLE_PAT_SUPPORT) && defined(CONFIG_HOTPLUG_CPU) + unregister_hotcpu_notifier(&nv_hotcpu_nfb); + #endif + } +@@ -1825,6 +1837,8 @@ + } + } + ++#if !defined(NV_VM_INSERT_PAGE_PRESENT) ++static + struct page *nv_kern_vma_nopage( + struct vm_area_struct *vma, + unsigned long address, +@@ -1835,22 +1849,21 @@ + #endif + ) + { +-#if !defined(NV_VM_INSERT_PAGE_PRESENT) + struct page *page; + + page = pfn_to_page(vma->vm_pgoff); + get_page(page); + + return page; +-#else +- return NOPAGE_SIGBUS; +-#endif + } ++#endif + + struct vm_operations_struct nv_vm_ops = { + .open = nv_kern_vma_open, + .close = nv_kern_vma_release, /* "close" */ ++#if !defined(NV_VM_INSERT_PAGE_PRESENT) + .nopage = nv_kern_vma_nopage, ++#endif + }; + + static nv_file_private_t * +@@ -1864,7 +1877,7 @@ + + memset(nvfp, 0, sizeof(nv_file_private_t)); + +- sema_init(&nvfp->sp_lock, 1); ++ NV_INIT_MUTEX(&nvfp->sp_lock); + + // initialize this file's event queue + init_waitqueue_head(&nvfp->waitqueue); +@@ -2214,11 +2227,12 @@ + break; + #if defined(NVCPU_X86) || defined(NVCPU_X86_64) + case NV_MEMORY_WRITECOMBINED: +-#if defined(NV_BUILD_NV_PAT_SUPPORT) +- if (nv_pat_enabled && +- (memory_type != NV_MEMORY_TYPE_REGISTERS)) ++#if defined(NV_ENABLE_PAT_SUPPORT) ++ if ((nv_pat_mode != NV_PAT_MODE_DISABLED) && ++ (memory_type != NV_MEMORY_TYPE_REGISTERS)) + { +- *prot = pgprot_writecombined(*prot); ++ pgprot_val(*prot) &= ~(_PAGE_PSE | _PAGE_PCD | _PAGE_PWT); ++ *prot = __pgprot(pgprot_val(*prot) | _PAGE_PWT); + break; + } + #endif +@@ -2242,7 +2256,6 @@ + return 1; + #endif + case NV_MEMORY_CACHED: +- //case NV_MEMORY_WRITEBACK: + #if !defined(NVCPU_X86) && !defined(NVCPU_X86_64) + if (memory_type != NV_MEMORY_TYPE_REGISTERS) + break; +@@ -2264,8 +2277,6 @@ + if (memory_type == NV_MEMORY_TYPE_SYSTEM) + break; + #endif +- //case NV_MEMORY_WRITETHRU: +- //case NV_MEMORY_WRITEPROTECT: + default: + if(nv_ext_encode_caching(prot, cache_type, memory_type) == 0) + return 0; +@@ -3501,6 +3512,10 @@ + BOOL kern + ) + { ++#if defined(NV_SET_PAGES_UC_PRESENT) && defined(NVCPU_X86) ++ nv_printf(NV_DBG_ERRORS, ++ "NVRM: can't translate address in nv_get_phys_address()!\n"); ++#else + struct mm_struct *mm; + pgd_t *pgd = NULL; + pmd_t *pmd = NULL; +@@ -3513,15 +3528,7 @@ + down_read(&mm->mmap_sem); + } + else +- { +-#if defined(NV_SET_PAGES_UC_PRESENT) && defined(NVCPU_X86) +- nv_printf(NV_DBG_ERRORS, +- "NVRM: can't translate KVA in nv_get_phys_address()!\n"); +- return 0; +-#else + mm = NULL; +-#endif +- } + + pgd = NV_PGD_OFFSET(address, kern, mm); + if (!NV_PGD_PRESENT(pgd)) +@@ -3549,6 +3556,7 @@ + failed: + if (!kern) + up_read(&mm->mmap_sem); ++#endif + return 0; + } + +@@ -3789,8 +3797,9 @@ + + nv_init_lock(nvl->rm_lock); + +- sema_init(&nvl->ldata_lock, 1); +- sema_init(&nvl->at_lock, 1); ++ NV_INIT_MUTEX(&nvl->ldata_lock); ++ NV_INIT_MUTEX(&nvl->at_lock); ++ + NV_ATOMIC_SET(nvl->usage_count, 0); + + nvl->rm_lock_cpu = -1; +diff -ru usr/src/nv/os-agp.c usr/src/nv.2404825/os-agp.c +--- usr/src/nv/os-agp.c 2008-04-02 01:17:56.000000000 -0700 ++++ usr/src/nv.2404825/os-agp.c 2008-05-06 16:22:16.603101044 -0700 +@@ -115,7 +115,7 @@ + goto release; + } + +- if (!nv_pat_enabled) ++ if (nv_pat_mode == NV_PAT_MODE_DISABLED) + { + #ifdef CONFIG_MTRR + /* +@@ -175,7 +175,7 @@ + + failed: + #ifdef CONFIG_MTRR +- if (!nv_pat_enabled) ++ if (nv_pat_mode == NV_PAT_MODE_DISABLED) + mtrr_del(-1, agp_info.aper_base, agp_info.aper_size << 20); + #endif + release: +@@ -205,7 +205,7 @@ + nvl = NV_GET_NVL_FROM_NV_STATE(nv); + + #ifdef CONFIG_MTRR +- if (!nv_pat_enabled) ++ if (nv_pat_mode == NV_PAT_MODE_DISABLED) + mtrr_del(-1, nv->agp.address, nv->agp.size); + #endif + +diff -ru usr/src/nv/os-interface.c usr/src/nv.2404825/os-interface.c +--- usr/src/nv/os-interface.c 2008-04-02 01:17:56.000000000 -0700 ++++ usr/src/nv.2404825/os-interface.c 2008-05-06 16:22:16.607101272 -0700 +@@ -1355,7 +1355,7 @@ + + BOOL NV_API_CALL os_pat_supported(void) + { +- return nv_pat_enabled; ++ return (nv_pat_mode != NV_PAT_MODE_DISABLED); + } + + void NV_API_CALL os_dump_stack() diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-100.14.09.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-100.14.09.ebuild index 6c6600a01ad8..660b04b1a245 100644 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-100.14.09.ebuild +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-100.14.09.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2007 Gentoo Foundation +# 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/nvidia-drivers-100.14.09.ebuild,v 1.11 2007/10/07 15:38:58 cardoe Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/nvidia-drivers-100.14.09.ebuild,v 1.12 2008/05/07 16:33:40 chainsaw Exp $ inherit eutils multilib versionator linux-mod flag-o-matic nvidia-driver @@ -169,7 +169,7 @@ src_unpack() { if ! use x86-fbsd; then cd "${WORKDIR}" - bash ${DISTDIR}/${NV_PACKAGE}${PKG_V}.run --extract-only + bash "${DISTDIR}/${NV_PACKAGE}${PKG_V}.run" --extract-only else unpack ${A} fi @@ -405,9 +405,9 @@ pkg_preinst() { if ! has_version x11-base/xorg-server ; then for dir in lib lib32 lib64 ; do - if [[ -d ${NV_D}/usr/${dir}/xorg ]] ; then - mv ${NV_D}/usr/${dir}/xorg/* ${NV_D}/usr/${dir} - rmdir ${NV_D}/usr/${dir}/xorg + if [[ -d "${NV_D}/usr/${dir}/xorg" ]] ; then + mv "${NV_D}/usr/${dir}"/xorg/* "${NV_D}/usr/${dir}" + rmdir "${NV_D}/usr/${dir}/xorg" fi done fi diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-100.14.11.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-100.14.11.ebuild index 86d5a159e505..fa5cfd966be3 100644 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-100.14.11.ebuild +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-100.14.11.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2007 Gentoo Foundation +# 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/nvidia-drivers-100.14.11.ebuild,v 1.12 2007/10/07 15:38:58 cardoe Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/nvidia-drivers-100.14.11.ebuild,v 1.13 2008/05/07 16:33:40 chainsaw Exp $ inherit eutils multilib versionator linux-mod flag-o-matic nvidia-driver @@ -169,7 +169,7 @@ src_unpack() { if ! use x86-fbsd; then cd "${WORKDIR}" - bash ${DISTDIR}/${NV_PACKAGE}${PKG_V}.run --extract-only + bash "${DISTDIR}/${NV_PACKAGE}${PKG_V}.run" --extract-only else unpack ${A} fi @@ -405,9 +405,9 @@ pkg_preinst() { if ! has_version x11-base/xorg-server ; then for dir in lib lib32 lib64 ; do - if [[ -d ${NV_D}/usr/${dir}/xorg ]] ; then - mv ${NV_D}/usr/${dir}/xorg/* ${NV_D}/usr/${dir} - rmdir ${NV_D}/usr/${dir}/xorg + if [[ -d "${NV_D}/usr/${dir}/xorg" ]] ; then + mv "${NV_D}/usr/${dir}"/xorg/* "${NV_D}/usr/${dir}" + rmdir "${NV_D}/usr/${dir}/xorg" fi done fi diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-100.14.19.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-100.14.19.ebuild index 2eae00ae9cc6..ef08a21485b7 100644 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-100.14.19.ebuild +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-100.14.19.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2007 Gentoo Foundation +# 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/nvidia-drivers-100.14.19.ebuild,v 1.11 2007/12/27 19:43:03 cardoe Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/nvidia-drivers-100.14.19.ebuild,v 1.12 2008/05/07 16:33:40 chainsaw Exp $ inherit eutils multilib versionator linux-mod flag-o-matic nvidia-driver @@ -169,7 +169,7 @@ src_unpack() { if ! use x86-fbsd; then cd "${WORKDIR}" - bash ${DISTDIR}/${NV_PACKAGE}${PKG_V}.run --extract-only + bash "${DISTDIR}/${NV_PACKAGE}${PKG_V}.run" --extract-only else unpack ${A} fi @@ -411,9 +411,9 @@ pkg_preinst() { if ! has_version x11-base/xorg-server ; then for dir in lib lib32 lib64 ; do - if [[ -d ${NV_D}/usr/${dir}/xorg ]] ; then - mv ${NV_D}/usr/${dir}/xorg/* ${NV_D}/usr/${dir} - rmdir ${NV_D}/usr/${dir}/xorg + if [[ -d "${NV_D}/usr/${dir}/xorg" ]] ; then + mv "${NV_D}/usr/${dir}"/xorg/* "${NV_D}/usr/${dir}" + rmdir "${NV_D}/usr/${dir}/xorg" fi done fi diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-100.14.23.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-100.14.23.ebuild index 8ff2dc542398..c107fda8cbd4 100644 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-100.14.23.ebuild +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-100.14.23.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2007 Gentoo Foundation +# 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/nvidia-drivers-100.14.23.ebuild,v 1.3 2007/12/26 19:47:24 cardoe Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/nvidia-drivers-100.14.23.ebuild,v 1.4 2008/05/07 16:33:40 chainsaw Exp $ inherit eutils multilib versionator linux-mod flag-o-matic nvidia-driver @@ -169,7 +169,7 @@ src_unpack() { if ! use x86-fbsd; then cd "${WORKDIR}" - bash ${DISTDIR}/${NV_PACKAGE}${PKG_V}.run --extract-only + bash "${DISTDIR}/${NV_PACKAGE}${PKG_V}.run" --extract-only else unpack ${A} fi @@ -411,9 +411,9 @@ pkg_preinst() { if ! has_version x11-base/xorg-server ; then for dir in lib lib32 lib64 ; do - if [[ -d ${NV_D}/usr/${dir}/xorg ]] ; then - mv ${NV_D}/usr/${dir}/xorg/* ${NV_D}/usr/${dir} - rmdir ${NV_D}/usr/${dir}/xorg + if [[ -d "${NV_D}/usr/${dir}/xorg" ]] ; then + mv "${NV_D}/usr/${dir}"/xorg/* "${NV_D}/usr/${dir}" + rmdir "${NV_D}/usr/${dir}/xorg" fi done fi diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-173.08.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-173.08.ebuild new file mode 100644 index 000000000000..582090b536c9 --- /dev/null +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-173.08.ebuild @@ -0,0 +1,511 @@ +# 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/nvidia-drivers-173.08.ebuild,v 1.1 2008/05/07 16:33:40 chainsaw Exp $ + +inherit eutils multilib 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 X11 driver and GLX libraries" +HOMEPAGE="http://www.nvidia.com/" +SRC_URI="x86? ( http://us.download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}-pkg0.run ) + amd64? ( http://us.download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}-pkg2.run ) + x86-fbsd? ( http://us.download.nvidia.com/freebsd/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )" + +LICENSE="NVIDIA" +SLOT="0" +KEYWORDS="-* ~amd64" +IUSE="acpi custom-cflags gtk multilib kernel_linux" +RESTRICT="strip" +EMULTILIB_PKG="true" + +COMMON="x11-base/xorg-server + multilib? ( app-emulation/emul-linux-x86-xlibs ) + kernel_FreeBSD? ( !media-video/nvidia-freebsd ) + !app-emulation/emul-linux-x86-nvidia + !x11-drivers/nvidia-legacy-drivers" +DEPEND="${COMMON} + kernel_linux? ( virtual/linux-sources ) + app-admin/eselect-opengl" +RDEPEND="${COMMON} + kernel_linux? ( virtual/modutils ) + media-libs/mesa + acpi? ( sys-power/acpid )" +PDEPEND="gtk? ( media-video/nvidia-settings )" + +QA_TEXTRELS_x86="usr/lib/libXvMCNVIDIA.so.${PV} + usr/lib/opengl/nvidia/no-tls/libnvidia-tls.so.${PV} + usr/lib/opengl/nvidia/tls/libnvidia-tls.so.${PV} + usr/lib/opengl/nvidia/lib/libGL.so.${PV} + usr/lib/opengl/nvidia/lib/libnvidia-cfg.so.${PV} + usr/lib/opengl/nvidia/lib/libGLcore.so.${PV} + usr/lib/opengl/nvidia/extensions/libglx.so + usr/lib/xorg/modules/drivers/nvidia_drv.so + usr/lib/libcuda.so.${PV}" + +QA_TEXTRELS_x86_fbsd="boot/modules/nvidia.ko + usr/lib/opengl/nvidia/lib/libGL.so.1 + usr/lib/opengl/nvidia/lib/libGLcore.so.1 + usr/lib/opengl/nvidia/lib/libnvidia-cfg.so.1 + usr/lib/opengl/nvidia/no-tls/libnvidia-tls.so.1 + usr/lib/opengl/nvidia/extensions/libglx.so + usr/lib/xorg/modules/drivers/nvidia_drv.so" + +QA_TEXTRELS_amd64="usr/lib32/opengl/nvidia/tls/libnvidia-tls.so.${PV} + usr/lib32/opengl/nvidia/no-tls/libnvidia-tls.so.${PV} + usr/lib32/opengl/nvidia/lib/libGLcore.so.${PV} + usr/lib32/opengl/nvidia/lib/libGL.so.${PV} + usr/lib32/opengl/nvidia/lib/libnvidia-cfg.so.${PV} + usr/lib32/libcuda.so.${PV}" + +QA_EXECSTACK_x86="usr/lib/opengl/nvidia/lib/libGL.so.${PV} + usr/lib/opengl/nvidia/lib/libGLcore.so.${PV} + usr/lib/opengl/nvidia/extensions/libglx.so" + +QA_EXECSTACK_amd64="usr/lib32/opengl/nvidia/lib/libGLcore.so.${PV} + usr/lib32/opengl/nvidia/lib/libGL.so.${PV} + usr/lib64/xorg/modules/drivers/nvidia_drv.so + usr/lib64/libXvMCNVIDIA.so.${PV} + usr/lib64/opengl/nvidia/tls/libnvidia-tls.so.${PV} + usr/lib64/opengl/nvidia/no-tls/libnvidia-tls.so.${PV} + usr/lib64/opengl/nvidia/lib/libGLcore.so.${PV} + usr/lib64/opengl/nvidia/lib/libGL.so.${PV} + usr/lib64/opengl/nvidia/lib/libnvidia-cfg.so.${PV} + usr/lib64/opengl/nvidia/extensions/libglx.so + usr/bin/nvidia-xconfig" + +QA_WX_LOAD_x86="usr/lib/opengl/nvidia/lib/libGLcore.so.${PV} + usr/lib/opengl/nvidia/lib/libGL.so.${PV} + usr/lib/opengl/nvidia/extensions/libglx.so" + +QA_WX_LOAD_amd64="usr/lib32/opengl/nvidia/lib/libGLcore.so.${PV} + usr/lib32/opengl/nvidia/lib/libGL.so.${PV} + usr/lib64/opengl/nvidia/lib/libGLcore.so.${PV} + usr/lib64/opengl/nvidia/lib/libGL.so.${PV} + usr/lib64/opengl/nvidia/extensions/libglx.so" + +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 +} + +paravirt_check() { + ebegin "Checking for Paravirtualized guest support" + linux_chkconfig_present PARAVIRT + + if [[ $? -eq 0 ]]; then + eerror "Please disable PARAVIRT in your kernel config, found at:" + eerror + eerror " Processor type and features" + eerror " [*] Paravirtualized guest support" + eerror + eerror "or XEN support" + eerror + eerror "and recompile your kernel .." + die "PARAVIRT support detected!" + 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 amd64 && has_multilib_profile && [ "${DEFAULT_ABI}" != "amd64" ]; then + eerror "This ebuild doesn't currently support changing your default abi." + die "Unexpected \${DEFAULT_ABI} = ${DEFAULT_ABI}" + fi + + if use kernel_linux; 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 + paravirt_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_DOC="${S}/doc" + NV_EXEC="${S}/obj" + NV_SRC="${S}/src" + elif use kernel_linux; then + NV_DOC="${S}/usr/share/doc" + NV_EXEC="${S}/usr/bin" + 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 + cd "${WORKDIR}" + bash "${DISTDIR}"/${NV_PACKAGE}${PKG_V}.run --extract-only + else + unpack ${A} + fi + + # Patches go below here, add brief description + cd "${S}" + use x86-fbsd && cd doc + + # Use the correct defines to make gtkglext build work + epatch "${FILESDIR}"/NVIDIA_glx-defines.patch + # Use some more sensible gl headers and make way for new glext.h + epatch "${FILESDIR}"/NVIDIA_glx-glheader.patch + + # allow on board sensors to work with lm_sensors + if use kernel_linux; then + epatch "${FILESDIR}"/NVIDIA_i2c-hwmon.patch + + kernel_is ge 2 6 26 && epatch "${FILESDIR}"/NVIDIA_kernel-173.08-2404825.diff + fi + + 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}:" 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() { + local MLTEST=$(type dyn_unpack) + + cd "${S}" + + 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" ] || 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 + doins "${WORKDIR}"/nvidia || die + 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 + + if has_multilib_profile ; then + local OABI=${ABI} + for ABI in $(get_install_abis) ; do + src_install-libs + done + ABI=${OABI} + unset OABI + elif use amd64 ; then + src_install-libs lib32 $(get_multilibdir) + src_install-libs lib $(get_libdir) + + rm -rf "${D}"/usr/$(get_multilibdir)/opengl/nvidia/include + rm -rf "${D}"/usr/$(get_multilibdir)/opengl/nvidia/extensions + else + src_install-libs + fi + + is_final_abi || return 0 + + # Documentation + dodoc "${NV_DOC}"/{XF86Config.sample,Copyrights} + dohtml "${NV_DOC}"/html/* + if use x86-fbsd; then + dodoc "${NV_DOC}/README" + else + # Docs + newdoc "${NV_DOC}/README.txt" README + dodoc "${NV_DOC}/NVIDIA_Changelog" + fi + + # Helper Apps + dobin ${NV_EXEC}/nvidia-xconfig || die + dobin ${NV_EXEC}/nvidia-bug-report.sh || die +} + +# 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) + + doexe $2.$3 + dosym ${libname}.$3 $1/${libname} + + [[ $3 != "1" ]] && dosym ${libname}.$3 $1/${libname}.1 +} + +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 + + 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 +} + +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() { + if use kernel_linux; then + linux-mod_pkg_postinst + fi + + # Switch to the nvidia implementation + eselect opengl set --use-old nvidia + + 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 ebuild installs a kernel module and X driver. Both must" + elog "match explicitly in their version. This means, if you restart" + elog "X, you most modprobe -r nvidia before starting it back up" + elog + + elog "To use the NVIDIA GLX, run \"eselect opengl set nvidia\"" + elog + elog "nVidia has requested that any bug reports submitted have the" + elog "output of /usr/bin/nvidia-bug-report.sh included." + elog + elog "To work with compiz, you must enable the AddARGBGLXVisuals option." + elog + elog "If you are having resolution problems, try disabling DynamicTwinView." + echo +} + +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 +} + +pkg_postrm() { + if use kernel_linux; then + linux-mod_pkg_postrm + fi + eselect opengl set --use-old xorg-x11 +} diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-71.86.01.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-71.86.01.ebuild index 0e42ac80e46e..06e4f71bf506 100644 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-71.86.01.ebuild +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-71.86.01.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2007 Gentoo Foundation +# 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/nvidia-drivers-71.86.01.ebuild,v 1.5 2007/11/20 12:05:02 opfer Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/nvidia-drivers-71.86.01.ebuild,v 1.6 2008/05/07 16:33:40 chainsaw Exp $ inherit eutils multilib versionator linux-mod flag-o-matic nvidia-driver @@ -169,7 +169,7 @@ src_unpack() { if ! use x86-fbsd; then cd "${WORKDIR}" - bash ${DISTDIR}/${NV_PACKAGE}${PKG_V}.run --extract-only + bash "${DISTDIR}/${NV_PACKAGE}${PKG_V}.run" --extract-only else unpack ${A} fi @@ -397,9 +397,9 @@ pkg_preinst() { if ! has_version x11-base/xorg-server ; then for dir in lib lib32 lib64 ; do - if [[ -d ${NV_D}/usr/${dir}/xorg ]] ; then - mv ${NV_D}/usr/${dir}/xorg/* ${NV_D}/usr/${dir} - rmdir ${NV_D}/usr/${dir}/xorg + if [[ -d "${NV_D}/usr/${dir}/xorg" ]] ; then + mv "${NV_D}/usr/${dir}"/xorg/* "${NV_D}/usr/${dir}" + rmdir "${NV_D}/usr/${dir}/xorg" fi done fi diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-71.86.04.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-71.86.04.ebuild index 34851040140d..eca92eb42741 100644 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-71.86.04.ebuild +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-71.86.04.ebuild @@ -1,6 +1,6 @@ # 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/nvidia-drivers-71.86.04.ebuild,v 1.1 2008/02/04 17:52:58 cardoe Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/nvidia-drivers-71.86.04.ebuild,v 1.2 2008/05/07 16:33:40 chainsaw Exp $ inherit eutils multilib versionator linux-mod flag-o-matic nvidia-driver @@ -168,7 +168,7 @@ src_unpack() { if ! use x86-fbsd; then cd "${WORKDIR}" - bash ${DISTDIR}/${NV_PACKAGE}${PKG_V}.run --extract-only + bash "${DISTDIR}/${NV_PACKAGE}${PKG_V}.run" --extract-only else unpack ${A} fi @@ -396,9 +396,9 @@ pkg_preinst() { if ! has_version x11-base/xorg-server ; then for dir in lib lib32 lib64 ; do - if [[ -d ${NV_D}/usr/${dir}/xorg ]] ; then - mv ${NV_D}/usr/${dir}/xorg/* ${NV_D}/usr/${dir} - rmdir ${NV_D}/usr/${dir}/xorg + if [[ -d "${NV_D}/usr/${dir}/xorg" ]] ; then + mv "${NV_D}/usr/${dir}"/xorg/* "${NV_D}/usr/${dir}" + rmdir "${NV_D}/usr/${dir}/xorg" fi done fi diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-96.43.01.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-96.43.01.ebuild index fd4915645044..5ac915d55e6f 100644 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-96.43.01.ebuild +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-96.43.01.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2007 Gentoo Foundation +# 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/nvidia-drivers-96.43.01.ebuild,v 1.5 2007/11/14 15:03:59 beandog Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/nvidia-drivers-96.43.01.ebuild,v 1.6 2008/05/07 16:33:40 chainsaw Exp $ inherit eutils multilib versionator linux-mod flag-o-matic nvidia-driver @@ -169,7 +169,7 @@ src_unpack() { if ! use x86-fbsd; then cd "${WORKDIR}" - bash ${DISTDIR}/${NV_PACKAGE}${PKG_V}.run --extract-only + bash "${DISTDIR}/${NV_PACKAGE}${PKG_V}.run" --extract-only else unpack ${A} fi @@ -405,9 +405,9 @@ pkg_preinst() { if ! has_version x11-base/xorg-server ; then for dir in lib lib32 lib64 ; do - if [[ -d ${NV_D}/usr/${dir}/xorg ]] ; then - mv ${NV_D}/usr/${dir}/xorg/* ${NV_D}/usr/${dir} - rmdir ${NV_D}/usr/${dir}/xorg + if [[ -d "${NV_D}/usr/${dir}/xorg" ]] ; then + mv "${NV_D}/usr/${dir}"/xorg/* "${NV_D}/usr/${dir}" + rmdir "${NV_D}/usr/${dir}/xorg" fi done fi diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-96.43.05.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-96.43.05.ebuild index 6e35a74f9346..64745332f163 100644 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-96.43.05.ebuild +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-96.43.05.ebuild @@ -1,6 +1,6 @@ # 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/nvidia-drivers-96.43.05.ebuild,v 1.3 2008/04/18 19:54:04 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/nvidia-drivers-96.43.05.ebuild,v 1.4 2008/05/07 16:33:40 chainsaw Exp $ inherit eutils multilib versionator linux-mod flag-o-matic nvidia-driver @@ -168,7 +168,7 @@ src_unpack() { if ! use x86-fbsd; then cd "${WORKDIR}" - bash ${DISTDIR}/${NV_PACKAGE}${PKG_V}.run --extract-only + bash "${DISTDIR}/${NV_PACKAGE}${PKG_V}.run" --extract-only else unpack ${A} fi @@ -405,9 +405,9 @@ pkg_preinst() { if ! has_version x11-base/xorg-server ; then for dir in lib lib32 lib64 ; do - if [[ -d ${NV_D}/usr/${dir}/xorg ]] ; then - mv ${NV_D}/usr/${dir}/xorg/* ${NV_D}/usr/${dir} - rmdir ${NV_D}/usr/${dir}/xorg + if [[ -d "${NV_D}/usr/${dir}/xorg" ]] ; then + mv "${NV_D}/usr/${dir}"/xorg/* "${NV_D}/usr/${dir}" + rmdir "${NV_D}/usr/${dir}/xorg" fi done fi |