summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTony Vroon <chainsaw@gentoo.org>2008-07-17 11:56:52 +0000
committerTony Vroon <chainsaw@gentoo.org>2008-07-17 11:56:52 +0000
commita421d856448235c6f061fa1081a6ecb094499d8f (patch)
treefbbb8711c719983bd4f453a80e250f72ecb69ed0 /x11-drivers/nvidia-drivers
parentVersion bump (diff)
downloadhistorical-a421d856448235c6f061fa1081a6ecb094499d8f.tar.gz
historical-a421d856448235c6f061fa1081a6ecb094499d8f.tar.bz2
historical-a421d856448235c6f061fa1081a6ecb094499d8f.zip
New upstream releases, both fix secondary TV output sometimes being black & white on some GPUs and are compatible with the newly released 2.6.26 kernel. Install modprobe control file to /etc/modprobe.d instead of the deprecated /etc/modules.d location, closes bug #213878.
Package-Manager: portage-2.2_rc1/cvs/Linux 2.6.26-rc8-00204-gc461a97-dirty x86_64
Diffstat (limited to 'x11-drivers/nvidia-drivers')
-rw-r--r--x11-drivers/nvidia-drivers/ChangeLog12
-rw-r--r--x11-drivers/nvidia-drivers/Manifest14
-rw-r--r--x11-drivers/nvidia-drivers/nvidia-drivers-71.86.06.ebuild475
-rw-r--r--x11-drivers/nvidia-drivers/nvidia-drivers-96.43.07.ebuild483
4 files changed, 979 insertions, 5 deletions
diff --git a/x11-drivers/nvidia-drivers/ChangeLog b/x11-drivers/nvidia-drivers/ChangeLog
index 11b06c99709d..a6db6f13c7fa 100644
--- a/x11-drivers/nvidia-drivers/ChangeLog
+++ b/x11-drivers/nvidia-drivers/ChangeLog
@@ -1,6 +1,16 @@
# 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.103 2008/07/08 05:54:13 opfer Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/ChangeLog,v 1.104 2008/07/17 11:56:52 chainsaw Exp $
+
+*nvidia-drivers-96.43.07 (17 Jul 2008)
+*nvidia-drivers-71.86.06 (17 Jul 2008)
+
+ 17 Jul 2008; <chainsaw@gentoo.org> +nvidia-drivers-71.86.06.ebuild,
+ +nvidia-drivers-96.43.07.ebuild:
+ New upstream releases, both fix secondary TV output sometimes being black
+ & white on some GPUs and are compatible with the newly released 2.6.26
+ kernel. Install modprobe control file to /etc/modprobe.d instead of the
+ deprecated /etc/modules.d location, closes bug #213878.
08 Jul 2008; Christian Faulhammer <opfer@gentoo.org>
nvidia-drivers-173.14.09.ebuild:
diff --git a/x11-drivers/nvidia-drivers/Manifest b/x11-drivers/nvidia-drivers/Manifest
index bd31dd2f748b..c94012f9c66d 100644
--- a/x11-drivers/nvidia-drivers/Manifest
+++ b/x11-drivers/nvidia-drivers/Manifest
@@ -39,8 +39,10 @@ DIST NVIDIA-Linux-x86-173.14.09-pkg0.run 11590266 RMD160 b61f4af4fc51b0f62983a13
DIST NVIDIA-Linux-x86-177.13-pkg0.run 11920970 RMD160 bbb60fb527befc3826f5855c8e1a9f8c5f2756a3 SHA1 a602e602af612b0190deb31890dda708cc479891 SHA256 2a063046137ca0a92c081b4d1d931f4bb7ba18e885e2713467aa72c2706609c4
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-71.86.06-pkg0.run 5261179 RMD160 87541a06f384b567b5762bf5e01faee7c4983fc0 SHA1 744b7885dcb99b1cbc9d3f61a755644f149eb0c9 SHA256 bd89aa8656fbc49f0cf0b5e9d6975f2345d7363ca240f7b67d92690ad8e3e1d7
DIST NVIDIA-Linux-x86-96.43.01-pkg0.run 6597242 RMD160 0a698d55925d5e44a01b5a5089b228dacfcb0af2 SHA1 02ce7a76d9ac1df5f9ec5b805ebdbd13eb42c4aa SHA256 777bb1b7eb5ea1ead80c31e516615e44ba198ff782da4df3bead3c31db4de8ba
DIST NVIDIA-Linux-x86-96.43.05-pkg0.run 6595250 RMD160 8b9c86f6210429d45df0d932e73d1551139f8837 SHA1 de8b015212bb5be09ee5c7ed096fa1e63bd793d2 SHA256 f62a51e376bfa0cb9e33b4aa3617867070dd39cc78ae04d4d2cc8b5721840b74
+DIST NVIDIA-Linux-x86-96.43.07-pkg0.run 6595902 RMD160 beeb827c53dd8ad8712db9b39fda8219308ff05e SHA1 4820162119f81a30b665f37fd8d772545d921be4 SHA256 8a61ad352bc7f3aceebe3fd3fed39354fe13214bb13f7c4ddda557f5bc842515
DIST NVIDIA-Linux-x86_64-100.14.09-pkg2.run 11834257 RMD160 d8c7987c4053835ec4d23facee855ebc35d95da4 SHA1 001bce9cba1c8ba31b0e942e85b429a5533ca72c SHA256 554aa9e63f1ac9e5f2f218f8532a73b514783d5ea1c674bbf888500998877ec7
DIST NVIDIA-Linux-x86_64-100.14.11-pkg2.run 11838502 RMD160 d357c75e9043e1cb089b3136635af04c88420943 SHA1 d542b702fdf7835f5dc7ec767789b2c1ada60908 SHA256 3215f786838d2d05005ec53cc9e3a684d46939ae2ea8c8e6b3e20f092be3b5e1
DIST NVIDIA-Linux-x86_64-100.14.19-pkg2.run 11566207 RMD160 dde900edfb7c12615a85f629a5e65d1ddfcfafa2 SHA1 964337af292d792e92389897ecd1a819880107ef SHA256 2eaf98e6d09ba7daf73d33750a81afc864e78e27a8c8875d145ee92ac10b68c1
@@ -54,8 +56,10 @@ DIST NVIDIA-Linux-x86_64-173.14.09-pkg2.run 16797261 RMD160 496e619f251fc1540b8e
DIST NVIDIA-Linux-x86_64-177.13-pkg2.run 18711739 RMD160 066a4349c79183eb3bdfdc1c7539a291c03e18a4 SHA1 5572e005e30f766d406ba3391128f3fc22d38f65 SHA256 5cca2f0f135a311d230847e17556e65d0e49963991e9e7318d4fba4a58e8a84b
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-71.86.06-pkg2.run 8380369 RMD160 dece285c6e02da8e788d977c2df114b3bbf8cc0f SHA1 518dd3e4d8ff484a6809184064d39afe0004ef45 SHA256 00f21f8ef75eeade437bb611fac98c4df6c4bef82293ad1d4506020f7004b57b
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
+DIST NVIDIA-Linux-x86_64-96.43.07-pkg2.run 10201418 RMD160 a8001232a5f2108a7ed8f2816487873317ebf018 SHA1 7c6e4f8050f1a8221efb458d350b6853f00d2cb4 SHA256 37efff3be9404fc936a074ce2c9e9a189568a02c3893d75bf438d5b45682051e
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
@@ -70,14 +74,16 @@ EBUILD nvidia-drivers-173.14.09.ebuild 15062 RMD160 a0778f68a0bc6a2f734f5196de0a
EBUILD nvidia-drivers-177.13.ebuild 15064 RMD160 cde5df9ef55d811470c00bc27ead9f6969ecdc28 SHA1 af99ef57ba7a2eddf05410f42a62a37146b7910e SHA256 70b4ef2a3ac8bb5d8ecfc030b8cac9abc9eaf13fa9c29efdfcb9604eaf00e387
EBUILD nvidia-drivers-71.86.01.ebuild 14231 RMD160 49d208c3fdc9b1f13bfec79a098c4f9493f7ce19 SHA1 f46f3971df37928329124b55b3bead9f572a2a1c SHA256 6f84e06dce07f610bcdfc95a300ea6d274000ab77bb6b03e39a028aabb61e61a
EBUILD nvidia-drivers-71.86.04.ebuild 14254 RMD160 20d997c621bd4c7f48a8c1b25b97e824e8d5e3f0 SHA1 9a1668688dc15f46f3347608d3773d2b8a2ba8dd SHA256 897ef81130bf95e1ce54dbae35e1db4c140732509e4577a0e1da8e19b6ac58dd
+EBUILD nvidia-drivers-71.86.06.ebuild 14134 RMD160 c56843d3524f151189bd4edf41b79c39135aa902 SHA1 010df2f418f79adb8730ef33508e6ed9da831b1a SHA256 f8267d9d57e93e8de950857b2d41a305a2b4bcfaeb580fbbd099ea5481eaf5da
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 22157 RMD160 69e220c33b07a33c454266e36e33e556eda4fbf3 SHA1 3529a345130a38436d43a0f9be16d0b00e2c507d SHA256 c3da7e9a09408c6ca7a7cc79b740199a2e5e13adeb95f6348cbf3a9f235c21d3
+EBUILD nvidia-drivers-96.43.07.ebuild 14471 RMD160 0a84589bb08d6a88f2f9b288273877ebd5eff305 SHA1 c85a10da3685ceaa2e2ea7c91266c2757d34ecf7 SHA256 51cc640d65b33431d9b4ce980b4d93a6c4cfdd2da817b2a9588d995bdc7d8513
+MISC ChangeLog 22626 RMD160 ad04b6f927c19b38da3970179ec3d4f0f56edacc SHA1 9727f319af233810be994c1c2138d1a6d97f6c63 SHA256 c5ad629bc92ace71acd548a13536f358e9b7b7997b97ca9cfaf2cb0e76a0317a
MISC metadata.xml 292 RMD160 f5979fce13f28cf69ea0ce27655361d3a399d73e SHA1 f98b700a2945e5b0a256b0aad118b7e08880c4a8 SHA256 9e76022e1a4ab0c738f94b9109e4f509f1a416dc63b71e03e1f0735c82ca9fb4
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
-iEYEARECAAYFAkhzAQsACgkQNQqtfCuFnePmMACgiLpQtB9temVfWIJUJouJGA8Z
-sTMAnjLhO0ivKeW7Q+/oKP/EGESgkbZv
-=2FVc
+iEYEARECAAYFAkh/M0YACgkQp5vW4rUFj5pKogCgib7nqRilvFn9jbGN567RwgMR
+UQsAnA/mBLK9Ys+xye9q6oTDPubiDLeK
+=7m7L
-----END PGP SIGNATURE-----
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-71.86.06.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-71.86.06.ebuild
new file mode 100644
index 000000000000..8b8d0a7ed0a0
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-71.86.06.ebuild
@@ -0,0 +1,475 @@
+# 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.06.ebuild,v 1.1 2008/07/17 11:56:52 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 )"
+
+LICENSE="NVIDIA"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+IUSE="acpi gtk multilib"
+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/xorg/libXvMCNVIDIA.so.${PV}
+ usr/lib/opengl/nvidia/lib/libGL.so.${PV}
+ usr/lib/opengl/nvidia/lib/libGLcore.so.${PV}
+ usr/lib/opengl/nvidia/lib/libnvidia-cfg.so.${PV}
+ usr/lib/opengl/nvidia/tls/libnvidia-tls.so.${PV}
+ usr/lib/opengl/nvidia/no-tls/libnvidia-tls.so.${PV}
+ usr/lib/libXvMCNVIDIA.so.${PV}
+ usr/lib/xorg/modules/drivers/nvidia_drv.so
+ usr/lib/opengl/nvidia/extensions/libglx.so"
+
+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.${PV}
+ 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_WX_LOAD_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_TEXTRELS_amd64="usr/lib64/xorg/libXvMCNVIDIA.so.${PV}
+ usr/lib64/opengl/nvidia/lib/libGL.so.${PV}
+ usr/lib64/opengl/nvidia/lib/libGLcore.so.${PV}
+ usr/lib64/opengl/nvidia/lib/libnvidia-cfg.so.${PV}
+ usr/lib64/opengl/nvidia/tls/libnvidia-tls.so.${PV}
+ usr/lib64/opengl/nvidia/no-tls/libnvidia-tls.so.${PV}
+ usr/lib64/libXvMCNVIDIA.so.${PV}
+ usr/lib64/xorg/modules/drivers/nvidia_drv.so
+ usr/lib64/opengl/nvidia/extensions/libglx.so
+ usr/lib32/xorg/libXvMCNVIDIA.so.${PV}
+ usr/lib32/opengl/nvidia/lib/libGL.so.${PV}
+ usr/lib32/opengl/nvidia/lib/libGLcore.so.${PV}
+ usr/lib32/opengl/nvidia/lib/libnvidia-cfg.so.${PV}
+ usr/lib32/opengl/nvidia/tls/libnvidia-tls.so.${PV}
+ usr/lib32/opengl/nvidia/no-tls/libnvidia-tls.so.${PV}
+ usr/lib32/libXvMCNVIDIA.so.${PV}
+ usr/lib32/xorg/modules/drivers/nvidia_drv.so
+ usr/lib32/opengl/nvidia/extensions/libglx.so"
+
+QA_WX_LOAD_amd64="usr/lib64/opengl/nvidia/lib/libGL.so.${PV}
+ usr/lib64/opengl/nvidia/lib/libGLcore.so.${PV}
+ usr/lib64/opengl/nvidia/extensions/libglx.so
+ usr/lib32/opengl/nvidia/lib/libGL.so.${PV}
+ usr/lib32/opengl/nvidia/lib/libGLcore.so.${PV}
+ usr/lib32/opengl/nvidia/extensions/libglx.so"
+
+QA_EXECSTACK_amd64="usr/lib64/xorg/modules/drivers/nvidia_drv.so
+ 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/lib64/libXvMCNVIDIA.so.${PV}
+ usr/bin/nvidia-xconfig"
+
+QA_EXECSTACK_x86="usr/lib/xorg/modules/drivers/nvidia_drv.so
+ usr/lib/opengl/nvidia/lib/libGL.so.${PV}
+ usr/lib/opengl/nvidia/lib/libnvidia-cfg.so.${PV}
+ usr/lib/opengl/nvidia/extensions/libglx.so
+ usr/lib/libXvMCNVIDIA.so.${PV}
+ usr/bin/nvidia-xconfig"
+
+export _POSIX2_VERSION="199209"
+
+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}/usr/src/nv"
+
+# On BSD userland it wants real make command
+MAKE="make"
+
+mtrr_check() {
+ ebegin "Checking for MTRR support"
+ linux_chkconfig_present MTRR
+ eend $?
+
+ if [[ $? -ne 0 ]] ; then
+ eerror "This version needs MTRR support for most chipsets!"
+ 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
+}
+
+pkg_setup() {
+ 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 x86-fbsd; then
+ linux-mod_pkg_setup
+ MODULE_NAMES="nvidia(video:${S})"
+ BUILD_PARAMS="IGNORE_CC_MISMATCH=yes V=1 SYSSRC=${KV_DIR} SYSOUT=${KV_OUT_DIR}"
+ mtrr_check
+ fi
+
+ # Since Nvidia ships 3 different series of drivers, we need to give the user
+ # some kind of guidance as to what version they should install. This tries
+ # to point the user in the right direction but can't be perfect. check
+ # nvidia-driver.eclass
+ nvidia-driver-check-warning
+}
+
+src_unpack() {
+ local NV_PATCH_PREFIX="${FILESDIR}/${PV}/NVIDIA-${PV}"
+
+ if ! use x86-fbsd; then
+ if [[ ${KV_MINOR} -eq 6 && ${KV_PATCH} -lt 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
+ 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
+ use x86-fbsd \
+ && cd "${WORKDIR}/${NV_PACKAGE}${PKG_V}/doc" \
+ || cd "${WORKDIR}/${NV_PACKAGE}${PKG_V}"
+ # 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
+
+ if ! use x86-fbsd; then
+ # Quiet down warnings the user does not need to see
+ sed -i \
+ -e 's:-Wpointer-arith::g' \
+ -e 's:-Wsign-compare::g' \
+ "${S}"/Makefile.kbuild
+
+ # If you set this then it's your own fault when stuff breaks :)
+ [[ -n ${USE_CRAZY_OPTS} ]] && sed -i "s:-O:${CFLAGS}:" Makefile.*
+
+ # If greater than 2.6.5 use M= instead of SUBDIR=
+ cd "${S}"; convert_to_m 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.
+ if use x86-fbsd; then
+ cd "${WORKDIR}/${NV_PACKAGE}${PKG_V}/src"
+ echo LDFLAGS="$(raw-ldflags)"
+ MAKE="$(get_bmake)" emake CC="$(tc-getCC)" LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die
+ else
+ linux-mod_src_compile
+ fi
+}
+
+src_install() {
+ local MLTEST=$(type dyn_unpack)
+
+ cd "${WORKDIR}"/${NV_PACKAGE}${PKG_V}
+
+ if ! use x86-fbsd; 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 > \
+ "${WORKDIR}"/nvidia
+ insinto /etc/modprobe.d
+ doins "${WORKDIR}"/nvidia || die
+ else
+ insinto /boot/modules
+ doins "${WORKDIR}/${X86_FBSD_NV_PACKAGE}/src/nvidia.kld" || die
+
+ exeinto /boot/modules
+ doexe "${WORKDIR}/${X86_FBSD_NV_PACKAGE}/src/nvidia.ko" || die
+ fi
+
+ if [[ "${MLTEST/set_abi}" == "${MLTEST}" ]] && 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
+
+ if ! use x86-fbsd; then
+ # Docs
+ dodoc usr/share/doc/NVIDIA_Changelog
+ dodoc usr/share/doc/XF86Config.sample
+ dohtml usr/share/doc/html/*
+
+ # nVidia want bug reports using this script
+ dobin usr/bin/nvidia-bug-report.sh || die
+ else
+ dodoc doc/{README,XF86Config.sample,Copyrights}
+ dohtml doc/html/*
+ fi
+}
+
+# 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 ! has_version x11-base/xorg-server ; then
+ X11_LIB_DIR="/usr/${inslibdir}"
+ fi
+
+ 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}
+
+ 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
+}
+
+pkg_preinst() {
+ # Can we make up our minds ?!?!?
+ local NV_D=${D}
+
+ 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"
+ fi
+ done
+ 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 x86-fbsd; then
+ linux-mod_pkg_postinst
+ fi
+
+ # Switch to the nvidia implementation
+ eselect opengl set --use-old nvidia
+
+ echo
+ 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
+
+ local valid_chost="true"
+ if use x86 ; then
+ case ${CHOST/-*} in
+ i486|i586|i686) ;;
+ *) valid_chost="false"
+ esac
+ fi
+
+ [[ ${valid_chost} == "false" ]] && return 1
+
+ # 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 x86-fbsd; then
+ linux-mod_pkg_postrm
+ fi
+ eselect opengl set --use-old xorg-x11
+}
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-96.43.07.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-96.43.07.ebuild
new file mode 100644
index 000000000000..e15dbad55101
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-96.43.07.ebuild
@@ -0,0 +1,483 @@
+# 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.07.ebuild,v 1.1 2008/07/17 11:56:52 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 )"
+
+LICENSE="NVIDIA"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+IUSE="acpi gtk multilib"
+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/xorg/libXvMCNVIDIA.so.${PV}
+ usr/lib/opengl/nvidia/lib/libGL.so.${PV}
+ usr/lib/opengl/nvidia/lib/libGLcore.so.${PV}
+ usr/lib/opengl/nvidia/lib/libnvidia-cfg.so.${PV}
+ usr/lib/opengl/nvidia/tls/libnvidia-tls.so.${PV}
+ usr/lib/opengl/nvidia/no-tls/libnvidia-tls.so.${PV}
+ usr/lib/libXvMCNVIDIA.so.${PV}
+ usr/lib/xorg/modules/drivers/nvidia_drv.so
+ usr/lib/opengl/nvidia/extensions/libglx.so"
+
+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.${PV}
+ 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_WX_LOAD_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_TEXTRELS_amd64="usr/lib64/xorg/libXvMCNVIDIA.so.${PV}
+ usr/lib64/opengl/nvidia/lib/libGL.so.${PV}
+ usr/lib64/opengl/nvidia/lib/libGLcore.so.${PV}
+ usr/lib64/opengl/nvidia/lib/libnvidia-cfg.so.${PV}
+ usr/lib64/opengl/nvidia/tls/libnvidia-tls.so.${PV}
+ usr/lib64/opengl/nvidia/no-tls/libnvidia-tls.so.${PV}
+ usr/lib64/libXvMCNVIDIA.so.${PV}
+ usr/lib64/xorg/modules/drivers/nvidia_drv.so
+ usr/lib64/opengl/nvidia/extensions/libglx.so
+ usr/lib32/xorg/libXvMCNVIDIA.so.${PV}
+ usr/lib32/opengl/nvidia/lib/libGL.so.${PV}
+ usr/lib32/opengl/nvidia/lib/libGLcore.so.${PV}
+ usr/lib32/opengl/nvidia/lib/libnvidia-cfg.so.${PV}
+ usr/lib32/opengl/nvidia/tls/libnvidia-tls.so.${PV}
+ usr/lib32/opengl/nvidia/no-tls/libnvidia-tls.so.${PV}
+ usr/lib32/libXvMCNVIDIA.so.${PV}
+ usr/lib32/xorg/modules/drivers/nvidia_drv.so
+ usr/lib32/opengl/nvidia/extensions/libglx.so"
+
+QA_WX_LOAD_amd64="usr/lib64/opengl/nvidia/lib/libGL.so.${PV}
+ usr/lib64/opengl/nvidia/lib/libGLcore.so.${PV}
+ usr/lib64/opengl/nvidia/extensions/libglx.so
+ usr/lib32/opengl/nvidia/lib/libGL.so.${PV}
+ usr/lib32/opengl/nvidia/lib/libGLcore.so.${PV}
+ usr/lib32/opengl/nvidia/extensions/libglx.so"
+
+QA_EXECSTACK_amd64="usr/lib64/xorg/modules/drivers/nvidia_drv.so
+ 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/lib64/libXvMCNVIDIA.so.${PV}
+ usr/bin/nvidia-xconfig"
+
+QA_EXECSTACK_x86="usr/lib/xorg/modules/drivers/nvidia_drv.so
+ usr/lib/opengl/nvidia/lib/libGL.so.${PV}
+ usr/lib/opengl/nvidia/lib/libnvidia-cfg.so.${PV}
+ usr/lib/opengl/nvidia/extensions/libglx.so
+ usr/lib/libXvMCNVIDIA.so.${PV}
+ usr/bin/nvidia-xconfig"
+
+export _POSIX2_VERSION="199209"
+
+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}/usr/src/nv"
+
+# On BSD userland it wants real make command
+MAKE="make"
+
+mtrr_check() {
+ ebegin "Checking for MTRR support"
+ linux_chkconfig_present MTRR
+ eend $?
+
+ if [[ $? -ne 0 ]] ; then
+ eerror "This version needs MTRR support for most chipsets!"
+ 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
+}
+
+pkg_setup() {
+ 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 x86-fbsd; then
+ linux-mod_pkg_setup
+ MODULE_NAMES="nvidia(video:${S})"
+ BUILD_PARAMS="IGNORE_CC_MISMATCH=yes V=1 SYSSRC=${KV_DIR} SYSOUT=${KV_OUT_DIR}"
+ mtrr_check
+ fi
+
+ # Since Nvidia ships 3 different series of drivers, we need to give the user
+ # some kind of guidance as to what version they should install. This tries
+ # to point the user in the right direction but can't be perfect. check
+ # nvidia-driver.eclass
+ nvidia-driver-check-warning
+}
+
+src_unpack() {
+ local NV_PATCH_PREFIX="${FILESDIR}/${PV}/NVIDIA-${PV}"
+
+ if ! use x86-fbsd; then
+ if [[ ${KV_MINOR} -eq 6 && ${KV_PATCH} -lt 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
+ 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
+ use x86-fbsd \
+ && cd "${WORKDIR}/${NV_PACKAGE}${PKG_V}/doc" \
+ || cd "${WORKDIR}/${NV_PACKAGE}${PKG_V}"
+ # 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
+ epatch "${FILESDIR}"/NVIDIA_i2c-hwmon.patch
+
+ if ! use x86-fbsd; then
+ # Quiet down warnings the user does not need to see
+ sed -i \
+ -e 's:-Wpointer-arith::g' \
+ -e 's:-Wsign-compare::g' \
+ "${S}"/Makefile.kbuild
+
+ # If you set this then it's your own fault when stuff breaks :)
+ [[ -n ${USE_CRAZY_OPTS} ]] && sed -i "s:-O:${CFLAGS}:" Makefile.*
+
+ # If greater than 2.6.5 use M= instead of SUBDIR=
+ cd "${S}"; convert_to_m 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.
+ if use x86-fbsd; then
+ cd "${WORKDIR}/${NV_PACKAGE}${PKG_V}/src"
+ echo LDFLAGS="$(raw-ldflags)"
+ MAKE="$(get_bmake)" emake CC="$(tc-getCC)" LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die
+ else
+ linux-mod_src_compile
+ fi
+}
+
+src_install() {
+ local MLTEST=$(type dyn_unpack)
+
+ cd "${WORKDIR}"/${NV_PACKAGE}${PKG_V}
+
+ if ! use x86-fbsd; 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 > \
+ "${WORKDIR}"/nvidia
+ insinto /etc/modprobe.d
+ doins "${WORKDIR}"/nvidia || die
+ else
+ insinto /boot/modules
+ doins "${WORKDIR}/${X86_FBSD_NV_PACKAGE}/src/nvidia.kld" || die
+
+ exeinto /boot/modules
+ doexe "${WORKDIR}/${X86_FBSD_NV_PACKAGE}/src/nvidia.ko" || die
+ fi
+
+ if [[ "${MLTEST/set_abi}" == "${MLTEST}" ]] && 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
+
+ if ! use x86-fbsd; then
+ # Docs
+ newdoc usr/share/doc/README.txt README
+ dodoc usr/share/doc/Copyrights usr/share/doc/NVIDIA_Changelog
+ dodoc usr/share/doc/XF86Config.sample
+ dohtml usr/share/doc/html/*
+
+ # nVidia want bug reports using this script
+ dobin usr/bin/nvidia-bug-report.sh || die
+ else
+ dodoc doc/{README,XF86Config.sample,Copyrights}
+ dohtml doc/html/*
+ fi
+
+ # Taking nvidia-xconfig from nvidia-drivers to help config xorg.conf
+ dobin usr/bin/nvidia-xconfig || 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 ! has_version x11-base/xorg-server ; then
+ X11_LIB_DIR="/usr/${inslibdir}"
+ fi
+
+ 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
+}
+
+pkg_preinst() {
+ # Can we make up our minds ?!?!?
+ local NV_D=${D}
+
+ 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"
+ fi
+ done
+ 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 x86-fbsd; then
+ linux-mod_pkg_postinst
+ fi
+
+ # Switch to the nvidia implementation
+ eselect opengl set --use-old nvidia
+
+ echo
+ 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
+
+ local valid_chost="true"
+ if use x86 ; then
+ case ${CHOST/-*} in
+ i486|i586|i686) ;;
+ *) valid_chost="false"
+ esac
+ fi
+
+ [[ ${valid_chost} == "false" ]] && return 1
+
+ # 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 x86-fbsd; then
+ linux-mod_pkg_postrm
+ fi
+ eselect opengl set --use-old xorg-x11
+}