summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Goldstein <cardoe@gentoo.org>2008-02-28 15:35:48 +0000
committerDoug Goldstein <cardoe@gentoo.org>2008-02-28 15:35:48 +0000
commit31886a46c36356cc6e4e3a05f9d38b35ce0c5d3d (patch)
tree543a4153305ca9c05bf80b6c36bd1f5dfeec7d98 /x11-drivers/nvidia-drivers
parentAdded ~ppc wrt bug 211718 (diff)
downloadhistorical-31886a46c36356cc6e4e3a05f9d38b35ce0c5d3d.tar.gz
historical-31886a46c36356cc6e4e3a05f9d38b35ce0c5d3d.tar.bz2
historical-31886a46c36356cc6e4e3a05f9d38b35ce0c5d3d.zip
version bump
Package-Manager: portage-2.1.4.4
Diffstat (limited to 'x11-drivers/nvidia-drivers')
-rw-r--r--x11-drivers/nvidia-drivers/ChangeLog7
-rw-r--r--x11-drivers/nvidia-drivers/Manifest12
-rw-r--r--x11-drivers/nvidia-drivers/nvidia-drivers-169.12.ebuild509
3 files changed, 523 insertions, 5 deletions
diff --git a/x11-drivers/nvidia-drivers/ChangeLog b/x11-drivers/nvidia-drivers/ChangeLog
index 76f05977063c..264533fbceef 100644
--- a/x11-drivers/nvidia-drivers/ChangeLog
+++ b/x11-drivers/nvidia-drivers/ChangeLog
@@ -1,6 +1,11 @@
# 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.84 2008/02/23 20:42:52 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/ChangeLog,v 1.85 2008/02/28 15:35:48 cardoe Exp $
+
+*nvidia-drivers-169.12 (28 Feb 2008)
+
+ 28 Feb 2008; Doug Klima <cardoe@gentoo.org> +nvidia-drivers-169.12.ebuild:
+ version bump
18 Feb 2008; Doug Klima <cardoe@gentoo.org>
nvidia-drivers-169.09-r1.ebuild:
diff --git a/x11-drivers/nvidia-drivers/Manifest b/x11-drivers/nvidia-drivers/Manifest
index 34c44639815a..2c17f8d2ca71 100644
--- a/x11-drivers/nvidia-drivers/Manifest
+++ b/x11-drivers/nvidia-drivers/Manifest
@@ -14,6 +14,7 @@ DIST NVIDIA-FreeBSD-x86-100.14.11.tar.gz 11419761 RMD160 ec5aa5226535bbad07bbd3b
DIST NVIDIA-FreeBSD-x86-100.14.19.tar.gz 11146166 RMD160 144d7a91fb4da94ae45bf9767ac66b2a3b2f0801 SHA1 8f34cd0467672a51103fed0fce64264b4ef71957 SHA256 c5a37e34266538b0ecfbbec95c7d5f9767e0d750cbf66a7cb54cc13895d601ad
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-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
@@ -22,6 +23,7 @@ DIST NVIDIA-Linux-x86-100.14.19-pkg0.run 7592917 RMD160 717c168cbc78c804c540b813
DIST NVIDIA-Linux-x86-100.14.23-pkg0.run 7594280 RMD160 b133f0d71f81037fc210d15d9c96755fd36ad667 SHA1 d28f2f04448ceb7615d0c8de908d4394fa996c85 SHA256 58117fc5d098b65566eb8a034685bc5f1b5c66f717bc2a2e5a5dd414f3a8e1db
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-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
@@ -32,6 +34,7 @@ DIST NVIDIA-Linux-x86_64-100.14.19-pkg2.run 11566207 RMD160 dde900edfb7c12615a85
DIST NVIDIA-Linux-x86_64-100.14.23-pkg2.run 11573717 RMD160 11e74e8d3073b35757ecf68c7b250db3bdc6853a SHA1 2eb25cff2bfcaa10483965131f07b224863135d0 SHA256 b994fa10b8292a0c7ce0e7f40ea75e7b44f22014a2724aa74d64d2ad30d17751
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-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
@@ -43,16 +46,17 @@ EBUILD nvidia-drivers-100.14.23.ebuild 14658 RMD160 a43fab1e59d9f01e381ea864b717
EBUILD nvidia-drivers-169.07.ebuild 13602 RMD160 4db23cbdd13745e858229d10413e20c8e61b5760 SHA1 8e007b0aa01eba6e55d7e167beb81264d2c73ded SHA256 c1bb89fd04972d6357de58c0edbfeb3e6818b46fdbe3d75cfa247b788e974ab4
EBUILD nvidia-drivers-169.09-r1.ebuild 14796 RMD160 47c25c58027cfd30d8cec0edece7ea6a8708f6fe SHA1 cbf8c407fee9444e23186e4002289e1eb6046a55 SHA256 3674b89a77a9d83fa30e2539fca730438e3d9d6c3d263e36e24928ec7f6a1b99
EBUILD nvidia-drivers-169.09.ebuild 13501 RMD160 7e6d779d8db3d5988b79ddd2da44a9586893f401 SHA1 d59cee3a96fe64c5e9040351a9f6d16420b6b4d8 SHA256 f46eb4b931c87b1915361d82d92814c0a91296f2b74cf56d1a1ef0d765dbc635
+EBUILD nvidia-drivers-169.12.ebuild 14893 RMD160 9595c3b9d4591446e1523c8feaaed1dd480708f1 SHA1 dda0d86ff604c0b2aa6f85ea0535d90961894f95 SHA256 92ac51f9eb8468237f454ce3d7d96f0ffa69c9ba4e68d7fa0ca357cfbfdda745
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 14458 RMD160 a53b255b38ae393473a19375f6ce124794cca7a0 SHA1 ef0b9f9e33db4c3cdc1fb590b264b61cb52d1ffc SHA256 14b9cb315503a5fbc36942b1df5209c0fef679ee505436c1dcc639bd0c6f928d
-MISC ChangeLog 18251 RMD160 a613bc7718ae3aa26d6eb40c9d0b15d33cc6d98b SHA1 c8fc2d89d414b8b64e4f2a622e7f096e42d03ce5 SHA256 123c9ff54fe1910cb2845ed5295879b21fca054429c9c12fcac3246d24cafb6e
+MISC ChangeLog 18382 RMD160 a592f59a6dba0486c77f363733e3c7175e5f808c SHA1 2893b128b947e8e62ab9ae72cbfb5f30cf6a3d70 SHA256 0f43257c7dc7e3839c58399472aea145316bb0014c3200b7f4be64b51c98c755
MISC metadata.xml 290 RMD160 66ba1c11dc5c04b4a554a5635946552294496efe SHA1 109194d161805cdf7c9c7a0e4a6d95967952b16e SHA256 8537d578e142848f65f5d0a1e00e54a3298e4f65133c9837b83bef6ca3234f8f
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)
-iD8DBQFHwIVRj9hvisErhMIRAjoyAJoCZ83G9uwTIUEpgAXoEi5OdfNqfACgg/de
-Vzhfu3/FCjVdtgqW1v/nqw0=
-=Yuhq
+iD8DBQFHxtUOoeSe8B0zEfwRAn7QAJ9dHeMg0bBcGuM+ZbQxUS2FklPcbgCghLO2
+UAgB5HnTrM0epozYN6/4+Mg=
+=kMSt
-----END PGP SIGNATURE-----
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-169.12.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-169.12.ebuild
new file mode 100644
index 000000000000..1716f04b1a4f
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-169.12.ebuild
@@ -0,0 +1,509 @@
+# 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-169.12.ebuild,v 1.1 2008/02/28 15:35:48 cardoe 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 ~x86 ~x86-fbsd"
+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
+ 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/modules.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
+}