diff options
author | Doug Goldstein <cardoe@gentoo.org> | 2011-01-24 18:13:43 +0000 |
---|---|---|
committer | Doug Goldstein <cardoe@gentoo.org> | 2011-01-24 18:13:43 +0000 |
commit | d3e1be07ea77186bfed83b77ec43558a7f9a85de (patch) | |
tree | 54b1da1050189de0622a2b2769718187de3798ad /x11-drivers/nvidia-drivers | |
parent | mask beta nvidia-drivers (diff) | |
download | historical-d3e1be07ea77186bfed83b77ec43558a7f9a85de.tar.gz historical-d3e1be07ea77186bfed83b77ec43558a7f9a85de.tar.bz2 historical-d3e1be07ea77186bfed83b77ec43558a7f9a85de.zip |
Add new nvidia-drivers beta. Adds a new library and adds initial support for X.org 1.10
Package-Manager: portage-2.1.9.35/cvs/Linux x86_64
Diffstat (limited to 'x11-drivers/nvidia-drivers')
-rw-r--r-- | x11-drivers/nvidia-drivers/ChangeLog | 9 | ||||
-rw-r--r-- | x11-drivers/nvidia-drivers/Manifest | 6 | ||||
-rw-r--r-- | x11-drivers/nvidia-drivers/nvidia-drivers-270.18.ebuild | 541 |
3 files changed, 554 insertions, 2 deletions
diff --git a/x11-drivers/nvidia-drivers/ChangeLog b/x11-drivers/nvidia-drivers/ChangeLog index c144bbcbf509..f69d094d3142 100644 --- a/x11-drivers/nvidia-drivers/ChangeLog +++ b/x11-drivers/nvidia-drivers/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for x11-drivers/nvidia-drivers # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/ChangeLog,v 1.267 2011/01/24 15:39:30 cardoe Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/ChangeLog,v 1.268 2011/01/24 18:13:43 cardoe Exp $ + +*nvidia-drivers-270.18 (24 Jan 2011) + + 24 Jan 2011; Doug Goldstein <cardoe@gentoo.org> + +nvidia-drivers-270.18.ebuild: + Add new nvidia-drivers beta. Adds a new library and adds initial support for + X.org 1.10 *nvidia-drivers-260.19.36 (24 Jan 2011) diff --git a/x11-drivers/nvidia-drivers/Manifest b/x11-drivers/nvidia-drivers/Manifest index bf0e52ab57f5..64c7e554b22c 100644 --- a/x11-drivers/nvidia-drivers/Manifest +++ b/x11-drivers/nvidia-drivers/Manifest @@ -24,6 +24,7 @@ DIST NVIDIA-FreeBSD-x86-260.19.21.tar.gz 27196165 RMD160 bb3584195e607ddab1ba2de DIST NVIDIA-FreeBSD-x86-260.19.26.tar.gz 27257210 RMD160 206971fa2af336603e80549892e9366fcedfe2da SHA1 fec5029b6329beb575cc6b879563ec2b3ac6d078 SHA256 09a78cbcfeb8284b3ec88a7839d4815f2d6d08c893a0bc68d15e1d1e9011af13 DIST NVIDIA-FreeBSD-x86-260.19.29.tar.gz 27276949 RMD160 3790fe65aa8c73ed6f7b601f99feccfcfe29bd96 SHA1 6eb77a6acfdda85da3241987c751b32f70d9c2a6 SHA256 f7b3a450b2de30927207a0a6603b1baf0c778093ea98641921b55df660f149af DIST NVIDIA-FreeBSD-x86-260.19.36.tar.gz 27282754 RMD160 0f09df3ce5df2f6b091c393c1686e8a6b8c48299 SHA1 55ae4831a822cfa40a3fb6e8330677a718cea7e4 SHA256 03e41a19ad93668034efa8306983b57b69fcca1e328a5a70c9295096fb9675d5 +DIST NVIDIA-FreeBSD-x86-270.18.tar.gz 28184265 RMD160 68467cdf8bc7bafcfd23a364e6a18089836f9524 SHA1 54b70e630075aafe7f8bec5933f65104302fe7de SHA256 416f4fb383e4f7f942642fcaa56abd4c9a86b8a92eb0386541cc4408d7a45659 DIST NVIDIA-FreeBSD-x86-96.43.16.tar.gz 11842453 RMD160 c52b6c99b4745869d7f1de80009edbd57df52fc9 SHA1 fc74c5a65e69bcb50b1f9467f435f8001970b2a3 SHA256 38bf334284dc600d92d8436333c98d5577e34d69456ed71f1cccc75caa6dffcd DIST NVIDIA-FreeBSD-x86-96.43.18.tar.gz 11841250 RMD160 ee0df712144ae68dfb1fa072a395ad7286c93c42 SHA1 36333977088c59f3f1c5aa9e49f1412bf3c5cf80 SHA256 89d4b1283f36c93641d9f0b177da9408089eb309c454940ebe7908fcbdb87cb1 DIST NVIDIA-FreeBSD-x86-96.43.19.tar.gz 13352481 RMD160 376311eb6708f4b7f20b6326bb88d9a33e7b3d37 SHA1 72555f3da8a796e491eaa67192334ccefcdd2256 SHA256 b5dce181cc654a729ba06dd528a180d14a792b0328fcfbf86bb0f819285c0dd5 @@ -40,6 +41,7 @@ DIST NVIDIA-Linux-x86-260.19.21.run 28463230 RMD160 f19a6e6e4b2b34d439cb2d21a588 DIST NVIDIA-Linux-x86-260.19.26.run 28528478 RMD160 1563a5df5cab5f9a201a94ecdb2ece323d051c4a SHA1 ed2dd72aed2b1dd930a026f05e7c6510f0a149ec SHA256 e6866c8a8d9c8aafc13bc45b02f80477153fad08ab72ce06fcc078635dd23b51 DIST NVIDIA-Linux-x86-260.19.29.run 28544910 RMD160 ddf0ffba36de8b51b2f43e1409897e880d4c3fbe SHA1 15edf89b614ca4027287acc8623b4522425ce8c5 SHA256 b6e709964b652fe4dad1b756b432e45e513c7c3ffa2359c2fbab0cb6f8ad727d DIST NVIDIA-Linux-x86-260.19.36.run 28558478 RMD160 5909bf9def30b73911e237b269eab0d9a335dfad SHA1 35c0a2ac0f0a097a010c304e4ba12602b0b0252b SHA256 6cfbb7cbfdb8ca5399303d43204e73ca3aad5bbc03c938f11ce5e154ec76cc6d +DIST NVIDIA-Linux-x86-270.18.run 29362182 RMD160 297b4757ee8d6c14fcca53789064d02d65c77ef4 SHA1 75420fc592b57bf3ee9c38bc8adb4ad76a2bf129 SHA256 2b47c8ca5b4ca39e948c6df876801b2acff8812830640e42a07f77208e6f94ff DIST NVIDIA-Linux-x86-96.43.16-pkg0.run 8441195 RMD160 3d1b09b87013d765e0fc602b9fe77aa96e650e70 SHA1 f17ff6c4862ba06b2208eb18e46c323927db65eb SHA256 243e458ccaf898c49794030cbbc59a0d740a4cefb2891ecc5721f6db79088ced DIST NVIDIA-Linux-x86-96.43.18-pkg0.run 8443640 RMD160 b59b60709c74f466fb33ac0f260d3bd1772c66ae SHA1 392632fa8c6414e28a138caf1bb130eb28b486bc SHA256 dcab1421fbfb3d9557e457a0e02feb44b971530206b5ff7516543e5977c9542a DIST NVIDIA-Linux-x86-96.43.19-pkg0.run 9721273 RMD160 ca40f0572e36479bfdd4d921be45da7055692762 SHA1 dc5f0d5b068756991a7d7e50e17bfcf09684702f SHA256 e25810e809ea56ab33ebb3e79e885eb19784dcce2bb0102c0cb5daa372aaf1c8 @@ -56,6 +58,7 @@ DIST NVIDIA-Linux-x86_64-260.19.21.run 47986632 RMD160 0794068ebd1b3392b47689d20 DIST NVIDIA-Linux-x86_64-260.19.26.run 48052654 RMD160 edc65f6f04a8eaaf92ce6ba50a4f1fc5cd03e30f SHA1 0559351f953d469b2e661cae66aea07c2fc7bdda SHA256 78ce4e3344ee15330708054b5c3ceabb96aabaa1194a9bc92cee9559c7cd3c9f DIST NVIDIA-Linux-x86_64-260.19.29.run 48087733 RMD160 5d9fdf47fd1469994ec8bd9d1da3fc633e86d59d SHA1 bc7b1fb15718ae11738be2845ce6ed6259aa12ea SHA256 09461a1eb6f46b394e9a2cfef20448311a395c3969521881b334c413715174eb DIST NVIDIA-Linux-x86_64-260.19.36.run 48081798 RMD160 5913b83130dc72c4b7bd84b6f4adc86f461d9606 SHA1 9c771763959273cf1e9876aad9a5d296b4b48148 SHA256 35a8769585e1f9b426c9c21b5f5898c06251a642ed73e9fb9eea9ab87ef91067 +DIST NVIDIA-Linux-x86_64-270.18.run 49229749 RMD160 54b6629cd2568e3b4455e78932ca00daa7931195 SHA1 7e092e13661dd3e21ca3d104b652dc48ad5c4d5e SHA256 b10af40db402f9f8e6a3a5a55b2385a06e2b8b14c8fc539624b07c63d70bef32 DIST NVIDIA-Linux-x86_64-96.43.16-pkg2.run 12337604 RMD160 fd7c586b53ff0b19034f8ef24dd24bec41940136 SHA1 b06a13d23565966821061c8d7cd1a636079ed1d8 SHA256 476538ffc3f7a5e964c7449d5242b0a684c95013d6fb1f5baa2324ef34aa5a73 DIST NVIDIA-Linux-x86_64-96.43.18-pkg2.run 12338886 RMD160 38cf91827e3011a35b00c064747bf98e965097a1 SHA1 b7811f14d86d4ed00c780351765580ec3d353968 SHA256 4644b1b3a78e651af079f85c8cf55b3666cca9ae466a43135d5857be31fa1ac8 DIST NVIDIA-Linux-x86_64-96.43.19-pkg2.run 13829870 RMD160 c9b2edd825d30f8deea101d5dfd51f86dbf09ffe SHA1 f3cdb5d95c5bb9057d09331395e72fe8d5006f17 SHA256 81939f9ee45255cc137719a10b8947bc90cf5697da9e27991cee5a7061d5de19 @@ -73,8 +76,9 @@ EBUILD nvidia-drivers-260.19.21.ebuild 16188 RMD160 3a4adaaf4b15f5ae845fa6205086 EBUILD nvidia-drivers-260.19.26.ebuild 16187 RMD160 f4174dfa13e976dcb6eb442bed5929c32351e509 SHA1 87a876bbb9830c5c24233ca38ef65b5ec956bb87 SHA256 fcee0480f1f689309aab40f125eb77e773c6791a72cb27860682a78ac675cb5f EBUILD nvidia-drivers-260.19.29.ebuild 16197 RMD160 54aa628e171b4287c7d08a76c57452de859c5cc9 SHA1 e00711fdf8260374e8be1fce6e1a83a995e1330d SHA256 a948acb04f89b8780d62fa13230710846e8a77afb939156553029ea910fe2770 EBUILD nvidia-drivers-260.19.36.ebuild 16200 RMD160 5005cae41127a3984a299b8aaba02e3b4b4cecc1 SHA1 93cd9a50986f8dfbc797bb88f4528b9d8b654da3 SHA256 616984d734675220d4dcd124cd7d7f0bddbb91eaea127dc1019c015db0db8ab5 +EBUILD nvidia-drivers-270.18.ebuild 16622 RMD160 7a3dcd3914d74f85773c23b5789719d4a76d445e SHA1 a1dfb58236596514b12af10f56e2942194b18ed1 SHA256 7425775fa91c300ce055d56d4262e684bd9d08cafd70b5231925d11c2571f823 EBUILD nvidia-drivers-96.43.16.ebuild 15375 RMD160 7f5c11269019caa7a32416a1762404487a17b76a SHA1 a78162fc120650cde3fe7078a481c24bad50df4f SHA256 9260a5e3421b9b9f7a704531bb965d7bd317e552fc3a35140faf3838ae78621e EBUILD nvidia-drivers-96.43.18.ebuild 15371 RMD160 157df03ce0e958ac9f06aa602a762a5da23b4468 SHA1 677b245bbf68381db0ea3b03f03db2aa83bcc7c0 SHA256 7191c8ed7f3aa4682d312c7ad1973e9df94a195fada91340fc8e3450b416838a EBUILD nvidia-drivers-96.43.19.ebuild 15363 RMD160 5dba1acc31669bead70a48ff985b1ac6464bb279 SHA1 79db9caa4cab0d39f054e9432b93420f2e55c407 SHA256 dcd00862dea4287bbaaa461fc2b92993aba94b4da58c85dc7bad67c1f5d98395 -MISC ChangeLog 57727 RMD160 95c1a27df15fc2a8bfcfd9931f112950f155d50c SHA1 222aeae4747f906574c7f89c3b56d719d7feae0f SHA256 b75b42dd2eec23a948c28f4414bd7c1d48f93f393de840a487242a868a6cb076 +MISC ChangeLog 57941 RMD160 3a33697f3d1dabfd142fe1a4d337c08189f68429 SHA1 32f6d170fa12168e27b8c805508cf7d50196baa0 SHA256 8db96a7773fe1257d277e74b62b962e0037124df88b5e965b5e5a059dbfeeded MISC metadata.xml 549 RMD160 b6f8cfd5fe9668f4031b43d2167ba4712b3cb508 SHA1 c48be9c87aa8b237fa09848a53625f8312fa2056 SHA256 22653e2d8ee95e57ce47b6292a9988feecada431dde56c2c97198efd6f4b9354 diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-270.18.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-270.18.ebuild new file mode 100644 index 000000000000..56c99afd0af2 --- /dev/null +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-270.18.ebuild @@ -0,0 +1,541 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/nvidia-drivers-270.18.ebuild,v 1.1 2011/01/24 18:13:43 cardoe Exp $ + +EAPI="2" + +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}.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 gtk multilib kernel_linux" +RESTRICT="strip" +EMULTILIB_PKG="true" + +COMMON="<x11-base/xorg-server-1.10.99 + kernel_linux? ( >=sys-libs/glibc-2.6.1 ) + multilib? ( app-emulation/emul-linux-x86-xlibs ) + >=app-admin/eselect-opengl-1.0.9 + !<media-video/nvidia-settings-256.52" +DEPEND="${COMMON} + kernel_linux? ( virtual/linux-sources )" +RDEPEND="${COMMON} + x11-libs/libXvMC + kernel_linux? ( virtual/modutils ) + acpi? ( sys-power/acpid )" +PDEPEND=">=x11-libs/libvdpau-0.3-r1 + gtk? ( media-video/nvidia-settings )" + +QA_TEXTRELS_x86="usr/lib/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib/opengl/nvidia/lib/libGL.so.${PV} + usr/lib/libnvidia-glcore.so.${PV} + usr/lib/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib/xorg/modules/drivers/nvidia_drv.so + usr/lib/libcuda.so.${PV} + usr/lib/libnvidia-cfg.so.${PV} + usr/lib/libnvidia-ml.so.${PV} + usr/lib/libvdpau_nvidia.so.${PV} + usr/lib/libOpenCL.so.1.0.0 + usr/lib/libnvidia-compiler.so.${PV}" + +QA_TEXTRELS_x86_fbsd="boot/modules/nvidia.ko + usr/lib/opengl/nvidia/lib/libGL.so.1 + usr/lib/libnvidia-glcore.so.1 + usr/lib/libnvidia-cfg.so.1 + usr/lib/libnvidia-ml.so.1 + usr/lib/opengl/nvidia/extensions/libglx.so.1 + usr/lib/xorg/modules/drivers/nvidia_drv.so" + +QA_TEXTRELS_amd64="usr/lib32/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib32/libnvidia-glcore.so.${PV} + usr/lib32/opengl/nvidia/lib/libGL.so.${PV} + usr/lib32/libcuda.so.${PV} + usr/lib32/libvdpau_nvidia.so.${PV} + usr/lib32/libOpenCL.so.1.0.0 + usr/lib32/libnvidia-compiler.so.${PV}" + +QA_EXECSTACK_x86="usr/lib/opengl/nvidia/lib/libGL.so.${PV} + usr/lib/libnvidia-glcore.so.${PV} + usr/lib/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib64/libXvMCNVIDIA.so.${PV} + usr/lib/libXvMCNVIDIA.a:NVXVMC.o + usr/lib/libnvidia-compiler.so.${PV} + usr/lib/libvdpau_nvidia.so.${PV} + usr/lib/libcuda.so.${PV} + usr/lib/libOpenCL.so.1.0.0" + +QA_EXECSTACK_amd64="usr/lib32/libnvidia-glcore.so.${PV} + usr/lib32/opengl/nvidia/lib/libGL.so.${PV} + usr/lib32/libnvidia-compiler.so.${PV} + usr/lib32/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib32/libvdpau_nvidia.so.${PV} + usr/lib32/libcuda.so.${PV} + usr/lib32/libOpenCL.so.1.0.0 + usr/lib64/libnvidia-compiler.so.${PV} + usr/lib64/libXvMCNVIDIA.a:NVXVMC.o + usr/lib64/libnvidia-cfg.so.${PV} + usr/lib64/libnvidia-ml.so.${PV} + usr/lib64/libvdpau_nvidia.so.${PV} + usr/lib64/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib64/opengl/nvidia/lib/libGL.so.${PV} + usr/lib64/libnvidia-glcore.so.${PV} + usr/lib64/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib64/libXvMCNVIDIA.so.${PV} + usr/lib64/libcuda.so.${PV} + usr/lib64/libOpenCL.so.1.0.0 + usr/lib64/xorg/modules/drivers/nvidia_drv.so + usr/bin/nvidia-smi + usr/bin/nvidia-xconfig + usr/bin/nvidia-settings" + +QA_WX_LOAD_x86="usr/lib/libnvidia-glcore.so.${PV} + usr/lib/opengl/nvidia/lib/libGL.so.${PV} + usr/lib/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib/libXvMCNVIDIA.a + usr/lib64/libXvMCNVIDIA.so.${PV}" + +QA_WX_LOAD_amd64="usr/lib32/opengl/nvidia/lib/libGL.so.${PV} + usr/lib32/libnvidia-glcore.so.${PV} + usr/lib64/opengl/nvidia/lib/libGL.so.${PV} + usr/lib64/libnvidia-glcore.so.${PV} + usr/lib64/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib64/libXvMCNVIDIA.so.${PV}" + +QA_SONAME_x86="usr/lib/libnvidia-compiler.so.${PV}" + +QA_SONAME_amd64="usr/lib64/libnvidia-compiler.so.${PV} + usr/lib32/libnvidia-compiler.so.${PV}" + +QA_DT_HASH_amd64="usr/lib32/libcuda.so.${PV} + usr/lib32/opengl/nvidia/lib/libGL.so.${PV} + usr/lib32/libnvidia-glcore.so.${PV} + usr/lib32/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib32/libvdpau_nvidia.so.${PV} + usr/lib32/libOpenCL.so.1.0.0 + usr/lib32/libnvidia-compiler.so.${PV} + usr/lib64/libXvMCNVIDIA.so.${PV} + usr/lib64/libcuda.so.${PV} + usr/lib64/libnvidia-cfg.so.${PV} + usr/lib64/libnvidia-glcore.so.${PV} + usr/lib64/libnvidia-ml.so.${PV} + usr/lib64/opengl/nvidia/lib/libGL.so.${PV} + usr/lib64/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib64/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib64/xorg/modules/drivers/nvidia_drv.so + usr/lib64/libvdpau_nvidia.so.${PV} + usr/lib64/libOpenCL.so.1.0.0 + usr/lib64/libnvidia-compiler.so.${PV} + usr/lib64/libnvcuvid.so.${PV} + usr/bin/nvidia-smi + usr/bin/nvidia-xconfig + usr/bin/nvidia-settings" + +QA_DT_HASH_x86="usr/lib/libcuda.so.${PV} + usr/lib/libnvidia-cfg.so.${PV} + usr/lib/libnvidia-glcore.so.${PV} + usr/lib/libnvidia-ml.so.${PV} + usr/lib/opengl/nvidia/lib/libGL.so.${PV} + usr/lib/opengl/nvidia/lib/libnvidia-tls.so.${PV} + usr/lib/opengl/nvidia/extensions/libglx.so.${PV} + usr/lib/xorg/modules/drivers/nvidia_drv.so + usr/lib/libXvMCNVIDIA.so.${PV} + usr/lib/libvdpau_nvidia.so.${PV} + usr/lib/libOpenCL.so.1.0.0 + usr/lib/libnvidia-compiler.so.${PV} + usr/lib/libnvcuvid.so.${PV} + usr/bin/nvidia-smi + usr/bin/nvidia-xconfig + usr/bin/nvidia-settings" + +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 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}/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_DOC="${S}/doc" + NV_EXEC="${S}/obj" + NV_LIB="${S}/obj" + NV_SRC="${S}/src" + NV_MAN="${S}/x11/man" + NV_X11="${S}/obj" + NV_X11_DRV="${NV_X11}" + NV_X11_EXT="${NV_X11}" + NV_SOVER=1 + elif use kernel_linux; then + NV_DOC="${S}" + NV_EXEC="${S}" + NV_LIB="${S}" + NV_SRC="${S}/kernel" + NV_MAN="${S}" + NV_X11="${S}" + NV_X11_DRV="${NV_X11}" + NV_X11_EXT="${NV_X11}" + NV_SOVER=${PV} + 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 + + 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 + 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 + + # NVIDIA kernel <-> userspace driver config lib + dolib.so ${NV_LIB}/libnvidia-cfg.so.${NV_SOVER} || \ + die "failed to install libnvidia-cfg" + dosym /usr/$(get_libdir)/libnvidia-cfg.so.${NV_SOVER} \ + /usr/$(get_libdir)/libnvidia-cfg.so || \ + die "failed to create libnvidia-cfg.so symlink" + + # NVIDIA monitoring library + dolib.so ${NV_LIB}/libnvidia-ml.so.${NV_SOVER} || \ + die "failed to install libnvidia-ml" + dosym /usr/$(get_libdir)/libnvidia-ml.so.${NV_SOVER} \ + /usr/$(get_libdir)/libnvidia-ml.so || \ + die "failed to create libnvidia-ml.so symlink" + + # NVIDIA video decode <-> CUDA + dolib.so ${NV_LIB}/libnvcuvid.so.${NV_SOVER} || \ + die "failed to install libnvcuvid.so" + dosym /usr/$(get_libdir)/libnvcuvid.so.${NV_SOVER} \ + /usr/$(get_libdir)/libnvcuvid.so || \ + die "failed to create libnvcuvid.so symlink" + + # Xorg DDX driver + insinto /usr/$(get_libdir)/xorg/modules/drivers + doins ${NV_X11_DRV}/nvidia_drv.so || die "failed to install nvidia_drv.so" + + # Xorg GLX driver + insinto /usr/$(get_libdir)/opengl/nvidia/extensions + doins ${NV_X11_EXT}/libglx.so.${NV_SOVER} || \ + die "failed to install libglx.so" + dosym /usr/$(get_libdir)/opengl/nvidia/extensions/libglx.so.${NV_SOVER} \ + /usr/$(get_libdir)/opengl/nvidia/extensions/libglx.so || \ + die "failed to create libglx.so symlink" + + # XvMC driver + dolib.a ${NV_X11}/libXvMCNVIDIA.a || \ + die "failed to install libXvMCNVIDIA.so" + dolib.so ${NV_X11}/libXvMCNVIDIA.so.${NV_SOVER} || \ + die "failed to install libXvMCNVIDIA.so" + dosym libXvMCNVIDIA.so.${NV_SOVER} /usr/$(get_libdir)/libXvMCNVIDIA.so || \ + die "failed to create libXvMCNVIDIA.so symlink" + + # OpenCL ICD for NVIDIA + if use kernel_linux; then + dodir /etc/OpenCL/vendors + insinto /etc/OpenCL/vendors + doins nvidia.icd + fi + + # Documentation + dohtml ${NV_DOC}/html/* + if use x86-fbsd; then + dodoc "${NV_DOC}/README" + doman "${NV_MAN}/nvidia-xconfig.1" + use gtk && 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" + doman "${NV_MAN}/nvidia-xconfig.1.gz" + use gtk && doman "${NV_MAN}/nvidia-settings.1.gz" + fi + + # Helper Apps + dobin ${NV_EXEC}/nvidia-xconfig || die + if use gtk; then + dobin ${NV_EXEC}/nvidia-settings || die + fi + dobin ${NV_EXEC}/nvidia-bug-report.sh || die + if use kernel_linux; then + dobin ${NV_EXEC}/nvidia-smi || die + fi + + # Desktop entries for nvidia-settings + if use gtk; then + sed -e 's:__UTILS_PATH__:/usr/bin:' \ + -e 's:__PIXMAP_PATH__:/usr/share/pixmaps:' \ + -i "${NV_EXEC}/nvidia-settings.desktop" + domenu ${NV_EXEC}/nvidia-settings.desktop + + doicon ${NV_EXEC}/nvidia-settings.png + fi + + if has_multilib_profile ; 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" +} + +# 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 || die "failed to install $2" + dosym ${libname}.$3 $1/${libname} || die "failed to symlink $2" + [[ $3 != "1" ]] && dosym ${libname}.$3 $1/${libname}.1 +} + +src_install-libs() { + local inslibdir=$(get_libdir) + local NV_ROOT="/usr/${inslibdir}/opengl/nvidia" + local libdir= sover= + + if use kernel_linux; then + if has_multilib_profile && [[ ${ABI} == "x86" ]] ; then + libdir=32 + else + libdir=. + fi + sover=${PV} + else + libdir=obj + # on FreeBSD it has just .1 suffix + sover=1 + fi + + # The GLX libraries + donvidia ${NV_ROOT}/lib ${libdir}/libGL.so ${sover} + donvidia /usr/${inslibdir} ${libdir}/libnvidia-glcore.so ${sover} + if use x86-fbsd; then + donvidia ${NV_ROOT}/lib ${libdir}/libnvidia-tls.so ${sover} + else + donvidia ${NV_ROOT}/lib ${libdir}/tls/libnvidia-tls.so ${sover} + fi + + # VDPAU + donvidia /usr/${inslibdir} ${libdir}/libvdpau_nvidia.so ${sover} + + # CUDA & OpenCL + if use kernel_linux; then + donvidia /usr/${inslibdir} ${libdir}/libcuda.so ${sover} + donvidia /usr/${inslibdir} ${libdir}/libnvidia-compiler.so ${sover} + donvidia /usr/${inslibdir} ${libdir}/libOpenCL.so 1.0.0 + dosym libOpenCL.so.1 /usr/${inslibdir}/libOpenCL.so + fi +} + +pkg_preinst() { + if use kernel_linux; then + linux-mod_pkg_postinst + fi + + # 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 must 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." + elog + + if ! use gtk; then + elog "USE=gtk 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. media-video/nvidia-settings" + elog "no longer installs nvidia-settings but only installs the" + elog "associated user space libraries." + fi +} + +pkg_postrm() { + if use kernel_linux; then + linux-mod_pkg_postrm + fi + eselect opengl set --use-old xorg-x11 +} |