diff options
author | BlackNoxis <steven.darklight@gmail.com> | 2015-04-24 09:15:01 +0300 |
---|---|---|
committer | BlackNoxis <steven.darklight@gmail.com> | 2015-04-24 09:15:01 +0300 |
commit | bbe082a1a09e9c36ef5de7e649eddbdcb6fd19be (patch) | |
tree | 04de49038ba86665a5be66bb0235d578bc1cfb0e | |
parent | 09b18a36aef91474774ba405a78d384b3297679b (diff) |
[x11-drivers/nvidia-userspace] version bump
-rw-r--r-- | x11-drivers/nvidia-userspace/Manifest | 4 | ||||
-rw-r--r-- | x11-drivers/nvidia-userspace/nvidia-userspace-346.59.ebuild | 353 |
2 files changed, 357 insertions, 0 deletions
diff --git a/x11-drivers/nvidia-userspace/Manifest b/x11-drivers/nvidia-userspace/Manifest index ebbd873d..139cebdf 100644 --- a/x11-drivers/nvidia-userspace/Manifest +++ b/x11-drivers/nvidia-userspace/Manifest @@ -8,6 +8,7 @@ DIST NVIDIA-FreeBSD-x86-340.58.tar.gz 59074607 SHA256 be4fdf4502532c39483a1072ed DIST NVIDIA-FreeBSD-x86-340.76.tar.gz 59362290 SHA256 0abbcc3bed3f017e7f1887a5c2d014e2b5a020462071998986ed49cdb8e7119f SHA512 e6d8b6d03fe0f9ab25ddeef680e0159ea4073d03762d3419761c02b917edefa9a1f81c209bd386838141c1924364c81126b0a356c325b056a0c2451865bed5eb WHIRLPOOL 7ec0cef6f92bfbd4c8b6a051dc8de4b6b138f63fd4f7e18756178a9aebb91ea32523d5ca885481d8c8c3d1531b153699f4e5606c155d6c3aa79a340637d3744b DIST NVIDIA-FreeBSD-x86-343.36.tar.gz 59205879 SHA256 8634e7537eca778790296f8355e39ae9a7e16642648e671a6c9339ee55fe340c SHA512 35fcf57d5e830cbe3c07ec70362ad9f0ff6ec327c6b11b6d3c533315e59031501501b9fdb80a3bef720506e5221ad84496745ce13d2c9885076f1c8e8537ba46 WHIRLPOOL 3ed3230dc190e7670c960743d94b8db1c0d9908b597f952746d851b403847e7b2836f1c60e6af0fe73072c1fda3971dfacc37c21908c227b2c20b5045dbfd61f DIST NVIDIA-FreeBSD-x86-346.35.tar.gz 57980205 SHA256 c2decd38b2ff3e46a611acfd2ca41fd887b7223f6aee1f57f52717b4206e2be3 SHA512 acf8a7792a9a0bd388139548d5923a2daa59680e44877083e8de2935f8eed83821505b036bd18ea282e9c4996d069675f8406d0958b49a0efa9c0fd64e69c3d1 WHIRLPOOL 1ed58654eee9b6e38275c60a6197faff095082ff176e548522c03cf2e5f91f2b632d49341eed8f537422343a43577419239327266243402b0425b6a46ee21f83 +DIST NVIDIA-FreeBSD-x86-346.59.tar.gz 57992895 SHA256 6cb7ad1b38f4f01fea898f335452e95ebe350285c9dfe1bf83c73f450231c9ae SHA512 2e421047dc850c6d3071df17f1507ce4f925ba05adca8efd01e3b6c2451cc45231e077aa4df29b398b99a44ff054b84555803b4d9bf6c11fb681706d3b5c1e50 WHIRLPOOL 88c965f850d6c9daaa27d95124ca456f0484581c1901026fe1becf2c6932cd2ee4e8bffaeca7c0239971f7418bee4565af96ba7e2eebd3b6e60dcc244df20abb DIST NVIDIA-FreeBSD-x86_64-304.125.tar.gz 35498616 SHA256 46b14b8c5ee1c02ff5e30afc9c99f4dd2edc426ccb2b73764093a1787639699d SHA512 34d48f24b1f5019b23c2937f8b5280fcc596764e1f5833cfe33db5e4d8395a0d69aa4c4214a5b97620dbaade73ac0fa333c36cceb4a137bb26d3ba37c31a0eb7 WHIRLPOOL 82677bd2aec3a60fe64211170573ef702b1dd1ab5a71ec922fb56b8d40f2163c0151a7c7f8bdace9127c8afcaf278f8f23a1cb585a8ad3bb7a0d42787ab17fb2 DIST NVIDIA-FreeBSD-x86_64-331.67.tar.gz 46997728 SHA256 5781bba8b7783f96c1f239961140317426910633fbfa3ba80fdcefe54aec7e92 SHA512 1653c03e091451f14c040c2b56de8574e5fd5d7b24db6ce979f99693f6a10e61e6c28fb3a962288a135551664973bba6d2f29b92aff726a4ee592fddc807db4e WHIRLPOOL a97d473c786451c7cb88155edb12a86da5f2888a584da7538dae93056357d0c63f294d638f6949c7a6f8255c60c3db84fdbb28ce10cd6da4c82758f95eb90679 DIST NVIDIA-FreeBSD-x86_64-337.25.tar.gz 58941876 SHA256 189dc0f70528d0099d0396a52bf759af74d6a99203484be2d2d6514faf0d4161 SHA512 458c9200579a6caed02aabbc196ec998a0d19149cca665c5ef9bc709c018b991b27713c92d00bdd1ea6ddd86e04c641f387e1ec8a1235cc9581af9e7a3b19ebf WHIRLPOOL d819cf486edc443b1da39ea67582a12698b1dea1501f3b6738014a80f8a96260aa0ba30a9e2f1fac075f0f7d604dc94978f7f82092b40531dd4989a2954cc420 @@ -17,6 +18,7 @@ DIST NVIDIA-FreeBSD-x86_64-340.58.tar.gz 59892350 SHA256 c59e4c4e1c95a53d1dd797b DIST NVIDIA-FreeBSD-x86_64-340.76.tar.gz 60206978 SHA256 60037d035b9af9f1d4dcdd5033e1b28b0cd4c7ca94f6bcb8d267e037a930fdc0 SHA512 d478eac282dfb43205f7464d6542cf1f71ed4dea6b8381314affb8647d104c5ddf7e658b6b8eb5e0bdb18207b92f76c574b24959ce23034d375cc712998e6e7c WHIRLPOOL 98ebffd792a47e3a9ef369976db11909bc13551f38977f85ece41e5a31a790c2c173badfc166e3a0bfe4361d5221129d19364c074ba11fc4aa9062d5cb1499a8 DIST NVIDIA-FreeBSD-x86_64-343.36.tar.gz 60045074 SHA256 aa189d9fd6448ed49ff4a8dd09dd15c06f6b3ef662fd3d960b4853c485cbab8a SHA512 23c38de071ac6e2c87db2c767b07f243703e55cd6485eb8e538fb72f38e9856b7ff28430fdd7eccc4728f3d36c14eac8b1fbf7155fe864ead93ed4218d5b65b5 WHIRLPOOL 401cdc5675d5fe60b6ca492be912573e9fc56a0a67ad680e2cada783ec8a34c15c6ca1a495c8fdbf09e384bc420295750540f5c77907c459c80f400d8291e44a DIST NVIDIA-FreeBSD-x86_64-346.35.tar.gz 58753495 SHA256 0a1c92efb9e29d0d4e1c099a5f2c69a29ac2431dbc33009cc83a35c794c48d33 SHA512 8838602a1e739043158b29ada81fceb36bb68385b5bdc21cc675eb8daafff45acb75efe9c8c00a45ce74164f510198490e820dcd0a797e52ff41254d93e467d3 WHIRLPOOL 7ecd9a92d3a7fe415faf3c7b9bda9af288aa65880fcbc0ec5131d85f1099dde569497e93e6060d8c96c426145d30e2bcd8d74e53d951591726888137fc3f5873 +DIST NVIDIA-FreeBSD-x86_64-346.59.tar.gz 58735813 SHA256 074840aeacb8965f14bc312db432efa320f97380bb8b21bb9cf1b242384d6651 SHA512 23c74f4ee9268b0583cee06b4e2109d33547a0e8789a67d7450b056f657d745930b834a5831a8709b9a095bcc63dbc76cbee219240519490ece1e40e2bf413eb WHIRLPOOL 985fe2fc59b38f3babaf534d7d04924b1d43ce3bc42b71420ea426f99ecbaed98aed5224bb5d30fbcc2b44978f38d8e812767a2bb7ee41c1d551c32bb345dc8d DIST NVIDIA-Linux-x86-173.14.39-pkg0.run 15134997 SHA256 a09935f37121ed3db8ae3da63a0d8e9d4348a19c859811c9fe44d6ce8e3eab23 SHA512 e24e15ccec725d3cbca502c2b77061776a81ef92917a950adec4ff6bdc34f10903aa654433177ea74be0dade4af81c5380d5710d375a5ea445940d06154bde93 WHIRLPOOL fce3d8e4f6cdf698f5a057514b6fe220bb1011025bdce5bd4cf0e424fb4d306d38251b6726bda03f290ea8137d5a95ed418cf8751722879f9042462abd9181b6 DIST NVIDIA-Linux-x86-304.125.run 40589395 SHA256 aec5b3a792910e152d5af756ef6fd7224c448c564564c7c448ab8ec3fc78c4f7 SHA512 cd77736790876b66c1e88bf30b7a93f755c0f94118edda8fde1701dc07dc4eb60f89a27b0ed432db74729f269cb239f32f3c5e045d701f60baf69da7fc0d0ea7 WHIRLPOOL 85cd375e1b67bbabe9a8119affec20b7a9a258f8b5be89d755f7ea596a94f98df053e8ade33f1aba1f74f753dcb636268c4f2074a09eaf68d858241f1482552c DIST NVIDIA-Linux-x86-331.67.run 37064511 SHA256 696b4a574ad3cb2b3286e0848e7e831940110cc33c63de51890154dbbd31acc6 SHA512 2a17854b366aa67a398c8d66134fb78d0ccdf4a6b2fe874bb7c146cfd24501431ed7448f5b7e24c8f78c6b1f6c2d5da207fbf568c2135ef53e51e83ce02cc374 WHIRLPOOL 4ad64717eb43043bacfbecdd6efe38bc5bf598acf172984e7c3eb1dcd779a9cbe53a76ac6e7b94b1d950d1f279147ceee4037d89be589fef2219d826eb86d09e @@ -27,6 +29,7 @@ DIST NVIDIA-Linux-x86-340.58.run 38527667 SHA256 7cc48ff0681667aad8213a4dd3cf769 DIST NVIDIA-Linux-x86-340.76.run 38818911 SHA256 9b29d93b49009caed84a8852825c3e7c6ebbbba8ec99b03ee5113108c8b036d0 SHA512 45d7b29670f9ca50de80d6d61260015b45f74422bbd12039923d04ae8b033b903b27e9f4c174461055f3cf45a4af44565ce9a8b9cd671e0e54d37770a1156839 WHIRLPOOL da7e072a56e3aff8b4688e60c5acd76c97804fa582d21c70dce043b13fa2317d1021f19927e827cf6132aebe2d40371c750e3eb56697bc7eda16bb7369bf2994 DIST NVIDIA-Linux-x86-343.36.run 41073259 SHA256 8cc1c99fbda29b3258f57dbdacef11921aca2e3ac106ef591f0815716e1b829e SHA512 a6287cf8ad6379daa7c6d7ae6bc08f9985ad9e9353de6d88eb72d8a1acad3e25eb65076b904152c6ddd8ac54b9afcdbb7a5dfb9a46e75c5654be87b3df0e48e1 WHIRLPOOL 7aaa7977a850314045bcfcc36a8f6ed8b3f487ec972e109ea48cbe3edda4ff29c0bf02e7c11dacf6a3e71783259dc809840c32e301aa16f2d4394d7f07cffc0a DIST NVIDIA-Linux-x86-346.35.run 40692611 SHA256 bba63c30c730ad7b8500a77c81cae58562b9f9b57cd576b61f37a2d8bc45df25 SHA512 df9213fe4743b6c329c1789dbdfe962af9c647a4e20380f957bc55369554fc731ffc098c00de922529d372b9686a170f6ccb1ce2e573ae57402396db9a3dc73d WHIRLPOOL 111b5a52fba139171163c6c31faade9d4ff40940520a10477cf90c998b2254c74fa571d7697b82ac515b80b71a3e205d1968b06c60ab057d008a41c45406e68e +DIST NVIDIA-Linux-x86-346.59.run 41370855 SHA256 65cf83fccc02399d54212cbeea1c2364e4974687c3ad6cba87cc109476ad2129 SHA512 f7fd76cd4c73528c9476494e1a35b27dedbbbdc4a190ae5909c27b8e1b0c3ef5c446ef40c199b245eaf39621eda55ef8d4f4adbe8d2d75b8d5f1ba14f703c56c WHIRLPOOL 2895275d549084c596396f6dd7a25f040a4af52c70090ed393f3eb409edb2cbfc17c622d0fd200b44e1ba3e4d4e3f2f6ea11a8c379e81e8c2bc514eb8e0fafcf DIST NVIDIA-Linux-x86_64-173.14.39-pkg2.run 21100833 SHA256 15a953666d5681ba54c97498b578ffd286a1dc96d605f3b02110f3f99813100e SHA512 a65cd496e6ed57f771c3d99f37f616a1242d97844f6faef7a807825ad899c0e536a99fde397020839f0857883b934032f9491024f3047a6b06d3eea1f5d77713 WHIRLPOOL dc5f243b7d1de7e2d1b7f005e018a2940d63335b11a7c83c234b348b7a1839e9131169d2ea928bd8c2f549a4535149b03e16e6c94d59dfa745f7f904ff790a45 DIST NVIDIA-Linux-x86_64-304.125.run 69108272 SHA256 c654889b85a18326f2c610260a8fbc3b1bb6f9b8be1c052a46a213f60bd62262 SHA512 75bd5700281b0aa4e19be5b779e3484711ce3db92641a32f3bf5e890601b353b23113f6218d5a2fa6b2c8d93702fac92810013c7c0f8efe484b0a39d09b1b073 WHIRLPOOL d8b9794253b1ab270680da7420f50df5ab6aa4d5123bad695be5b7891b2df55bf06ecdd0b221fd29e799077c0a64da8059df16ebea9a3535e402f2c0cf482dcf DIST NVIDIA-Linux-x86_64-331.67.run 60231750 SHA256 9c7f2bb44bb26a5effb915d8aa22132a6c06483e0cfa6f47b7265b15da83bbd7 SHA512 7368a60c282386bc5b68599cacd07a18a9be4c3fd624eac9eb92966221318723c3f44ae033163789eae1ae683e729d49268769e79c465aca6632c5a7e6d6942a WHIRLPOOL 552f590257e3e1e53b83563aeea840a78869c10ea2707cea779da99ec726cc17398fada84379537ac2e6a7dc8a653c8b00141ab35adb10a5a49d0da565c2eb73 @@ -37,3 +40,4 @@ DIST NVIDIA-Linux-x86_64-340.58.run 69851185 SHA256 70cc452161b969d659225a3a7d4c DIST NVIDIA-Linux-x86_64-340.76.run 69955037 SHA256 3bf670e9a2bdb184648dec54ce06fab65e798a9a4c9dd5155e2be4efee3e0994 SHA512 59ad49a49f170ec971e2b5ee3a45b9f972521bc4b7ab6f02f46a5cfc5b1998841195cc5c91dffc417d2183de39c5a589eabf7b48864e0c6842363a75051db40c WHIRLPOOL 8c846f2b5b6f56bd2962fe4660751a4485e0ddd2186bde0affccece32271b03f4f3c226377c0b1877ea391ab130ed6f282c316f227205488a63e4f0a19db82cc DIST NVIDIA-Linux-x86_64-343.36.run 73775989 SHA256 2285efa2c0e6675d8724e47a09403630a674c32e514bdcfb54cec3c81810fc78 SHA512 6e76e54b24b0c1fa16e94eaf0f99d2e7dfd28e5aaae0bcb6df3e6d4e20c7a13d5d30902e2bc9bc7609c8d87e5ec8fbf16a5a2dd513bb9d761714176c4ce5e283 WHIRLPOOL 73040a3f3073486c5d6d0a5d84be7d478a3c15bb4aee21f3c590592afe2845f8e9c7064010ddc8f93b764e48940e523952abf9978d09cd32ec1ce8b644e59eb6 DIST NVIDIA-Linux-x86_64-346.35.run 73462796 SHA256 8625acbbc7a2abdda436a5cb9d06f2a7f5913b16e0a35ac4f9f106853a94d086 SHA512 dab2ce5a722a93e83822cb83db6d3ef612274a6e3236b0ff34f081630cc00f76be5a0a1637b85dda2ca289336e44b6586afc82a228cb5de8ca1105d6bd4f4750 WHIRLPOOL f5255f714ff9f14edb26246826c810de05de1d6bcaeaf30f52294313aa1f68fbd432ddbddf576757cee711e19e4b7d2f14fb30f8975c9e2686395fb31998f413 +DIST NVIDIA-Linux-x86_64-346.59.run 73468725 SHA256 231020548431569c0172605815ba131a18f969966b4abf82129f974740bc64ca SHA512 a8d2cfcf750c4f0f155450a50132e1c2a6736212d654ab5539f1dd17233ed6f9ed64777f73f2b394e236d27abee4f4c7a344855372a641552ea40a8973fddfe9 WHIRLPOOL 0e919b147c9088106a8a3bf138262998a02b0da71c8e656d6b888f952e19b11ad8a0b6b4eee6e7181a8421aa2f0b4be86b82c0a14282e56e135f80e1c00aa659 diff --git a/x11-drivers/nvidia-userspace/nvidia-userspace-346.59.ebuild b/x11-drivers/nvidia-userspace/nvidia-userspace-346.59.ebuild new file mode 100644 index 00000000..d02de75b --- /dev/null +++ b/x11-drivers/nvidia-userspace/nvidia-userspace-346.59.ebuild @@ -0,0 +1,353 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=5 + +inherit eutils flag-o-matic linux-info linux-mod multilib nvidia-driver \ + portability toolchain-funcs unpacker user udev + +NV_URI="http://us.download.nvidia.com/XFree86/" +X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}" +AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}" +X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}" +AMD64_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86_64-${PV}" + +DESCRIPTION="NVIDIA X11 userspace libraries and applications" +HOMEPAGE="http://www.nvidia.com/" +SRC_URI=" + amd64-fbsd? ( ${NV_URI}FreeBSD-x86_64/${PV}/${AMD64_FBSD_NV_PACKAGE}.tar.gz ) + amd64? ( ${NV_URI}Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run ) + x86-fbsd? ( ${NV_URI}FreeBSD-x86/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz ) + x86? ( ${NV_URI}Linux-x86/${PV}/${X86_NV_PACKAGE}.run ) +" + +LICENSE="GPL-2 NVIDIA-r2" +SLOT="0" +KEYWORDS="-* ~amd64 ~x86 ~amd64-fbsd ~x86-fbsd" +IUSE="acpi multilib x-multilib kernel_FreeBSD kernel_linux tools +X uvm" +RESTRICT="bindist mirror strip" +EMULTILIB_PKG="true" + +COMMON="app-eselect/eselect-opencl + kernel_linux? ( >=sys-libs/glibc-2.6.1 ) + x-multilib? ( + || ( + ( + x11-libs/libX11[abi_x86_32] + x11-libs/libXext[abi_x86_32] + ) + app-emulation/emul-linux-x86-xlibs + ) + ) + multilib? ( app-emulation/emul-linux-x86-baselibs ) + X? ( + >=app-eselect/eselect-opengl-1.0.9 + )" +DEPEND="${COMMON}" +# Note: do not add !>nvidia-userspace-ver or !<nvidia-userspace-ver +# because it would cause pkg_postrm to set the wrong opengl implementation +RDEPEND="${COMMON} + X? ( x11-libs/libXvMC ) + acpi? ( sys-power/acpid ) + tools? ( media-video/nvidia-settings )" +PDEPEND="X? ( + <x11-base/xorg-server-1.16.99 + >=x11-libs/libvdpau-0.3-r1 + )" + +REQUIRED_USE="tools? ( X )" +QA_PREBUILT="opt/* usr/lib*" +S=${WORKDIR}/ + +pkg_pretend() { + if use amd64 && has_multilib_profile && \ + [ "${DEFAULT_ABI}" != "amd64" ]; then + eerror "This ebuild doesn't currently support changing your default ABI" + die "Unexpected \${DEFAULT_ABI} = ${DEFAULT_ABI}" + fi +} + +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 + + # set variables to where files are in the package structure + if use kernel_FreeBSD; then + use x86-fbsd && S="${WORKDIR}/${X86_FBSD_NV_PACKAGE}" + use amd64-fbsd && S="${WORKDIR}/${AMD64_FBSD_NV_PACKAGE}" + NV_DOC="${S}/doc" + NV_OBJ="${S}/obj" + NV_SRC="${S}/src" + NV_MAN="${S}/x11/man" + NV_X11="${S}/obj" + NV_SOVER=1 + elif use kernel_linux; then + NV_DOC="${S}" + NV_OBJ="${S}" + NV_SRC="${S}/kernel" + NV_MAN="${S}" + NV_X11="${S}" + NV_SOVER=${PV} + else + die "Could not determine proper NVIDIA package" + fi +} + +src_prepare() { + # Please add a brief description for every added patch + + # Allow user patches so they can support RC kernels and whatever else + epatch_user +} + +src_compile() { :; } + +# Install nvidia library: +# the first parameter is the library to install +# the second parameter is the provided soversion +# the third parameter is the target directory if its not /usr/lib +donvidia() { + # Full path to library minus SOVER + MY_LIB="$1" + + # SOVER to use + MY_SOVER="$2" + + # Where to install + MY_DEST="$3" + + if [[ -z "${MY_DEST}" ]]; then + MY_DEST="/usr/$(get_libdir)" + action="dolib.so" + else + exeinto ${MY_DEST} + action="doexe" + fi + + # Get just the library name + libname=$(basename $1) + + # Install the library with the correct SOVER + ${action} ${MY_LIB}.${MY_SOVER} || \ + die "failed to install ${libname}" + + # If SOVER wasn't 1, then we need to create a .1 symlink + if [[ "${MY_SOVER}" != "1" ]]; then + dosym ${libname}.${MY_SOVER} \ + ${MY_DEST}/${libname}.1 || \ + die "failed to create ${libname} symlink" + fi + + # Always create the symlink from the raw lib to the .1 + dosym ${libname}.1 \ + ${MY_DEST}/${libname} || \ + die "failed to create ${libname} symlink" +} + +src_install() { + if use kernel_linux; then + # Add the aliases + # This file is tweaked with the appropriate video group in + # pkg_preinst, see bug #491414 + insinto /etc/modprobe.d + newins "${FILESDIR}"/nvidia-169.07 nvidia.conf + use uvm && doins "${FILESDIR}"/nvidia-uvm.conf + + # Ensures that our device nodes are created when not using X + exeinto "$(get_udevdir)" + doexe "${FILESDIR}"/nvidia-udev.sh + udev_newrules "${FILESDIR}"/nvidia.udev-rule 99-nvidia.rules + elif use kernel_FreeBSD; then + if use x86-fbsd; then + insinto /boot/modules + doins "${S}/src/nvidia.kld" + fi + + exeinto /boot/modules + doexe "${S}/src/nvidia.ko" + fi + + # NVIDIA kernel <-> userspace driver config lib + donvidia ${NV_OBJ}/libnvidia-cfg.so ${NV_SOVER} + + # NVIDIA framebuffer capture library + donvidia ${NV_OBJ}/libnvidia-fbc.so ${NV_SOVER} + + # NVIDIA video encode/decode <-> CUDA + if use kernel_linux; then + donvidia ${NV_OBJ}/libnvcuvid.so ${NV_SOVER} + donvidia ${NV_OBJ}/libnvidia-encode.so ${NV_SOVER} + fi + + if use X; then + # Xorg DDX driver + insinto /usr/$(get_libdir)/xorg/modules/drivers + doins ${NV_X11}/nvidia_drv.so + + # Xorg GLX driver + donvidia ${NV_X11}/libglx.so ${NV_SOVER} \ + /usr/$(get_libdir)/opengl/nvidia/extensions + fi + + # OpenCL ICD for NVIDIA + if use kernel_linux; then + insinto /etc/OpenCL/vendors + doins ${NV_OBJ}/nvidia.icd + fi + + # Documentation + dohtml ${NV_DOC}/html/* + if use kernel_FreeBSD; then + dodoc "${NV_DOC}/README" + use X && doman "${NV_MAN}/nvidia-xconfig.1" + else + # Docs + newdoc "${NV_DOC}/README.txt" README + dodoc "${NV_DOC}/NVIDIA_Changelog" + doman "${NV_MAN}/nvidia-smi.1.gz" + doman "${NV_MAN}/nvidia-cuda-mps-control.1.gz" + use X && doman "${NV_MAN}/nvidia-xconfig.1.gz" + fi + + # Helper Apps + exeinto /opt/bin/ + if use X; then + doexe ${NV_OBJ}/nvidia-xconfig + fi + + if use kernel_linux ; then + doexe ${NV_OBJ}/nvidia-cuda-mps-control + doexe ${NV_OBJ}/nvidia-cuda-mps-server + doexe ${NV_OBJ}/nvidia-debugdump + doexe ${NV_OBJ}/nvidia-persistenced + doexe ${NV_OBJ}/nvidia-smi + + # install nvidia-modprobe setuid and symlink in /usr/bin (bug #505092) + doexe ${NV_OBJ}/nvidia-modprobe + fowners root:video /opt/bin/nvidia-modprobe + fperms 4710 /opt/bin/nvidia-modprobe + dosym /{opt,usr}/bin/nvidia-modprobe + + doman nvidia-cuda-mps-control.1.gz + doman nvidia-modprobe.1.gz + doman nvidia-persistenced.1.gz + newinitd "${FILESDIR}/nvidia-smi.init" nvidia-smi + fi + + exeinto /usr/bin/ + doexe ${NV_OBJ}/nvidia-bug-report.sh + + if has_multilib_profile && use multilib ; then + local OABI=${ABI} + for ABI in $(get_install_abis) ; do + src_install-libs + done + ABI=${OABI} + unset OABI + else + src_install-libs + fi + + is_final_abi || die "failed to iterate through all ABIs" + + readme.gentoo_create_doc +} + +src_install-libs() { + local inslibdir=$(get_libdir) + local GL_ROOT="/usr/$(get_libdir)/opengl/nvidia/lib" + local CL_ROOT="/usr/$(get_libdir)/OpenCL/vendors/nvidia" + local libdir=${NV_OBJ} + + if use kernel_linux && has_multilib_profile && \ + [[ ${ABI} == "x86" ]] ; then + libdir=${NV_OBJ}/32 + fi + + if use X; then + # The GLX libraries + donvidia ${libdir}/libEGL.so ${NV_SOVER} ${GL_ROOT} + donvidia ${libdir}/libGL.so ${NV_SOVER} ${GL_ROOT} + donvidia ${libdir}/libGLESv1_CM.so ${NV_SOVER} ${GL_ROOT} + donvidia ${libdir}/libnvidia-eglcore.so ${NV_SOVER} + donvidia ${libdir}/libnvidia-glcore.so ${NV_SOVER} + donvidia ${libdir}/libnvidia-glsi.so ${NV_SOVER} + donvidia ${libdir}/libnvidia-ifr.so ${NV_SOVER} + if use kernel_FreeBSD; then + donvidia ${libdir}/libnvidia-tls.so ${NV_SOVER} + else + donvidia ${libdir}/tls/libnvidia-tls.so ${NV_SOVER} + fi + + # VDPAU + donvidia ${libdir}/libvdpau_nvidia.so ${NV_SOVER} + + # GLES v2 libraries + insinto ${GL_ROOT} + doexe ${libdir}/libGLESv2.so.${PV} + dosym libGLESv2.so.${PV} ${GL_ROOT}/libGLESv2.so.2 + dosym libGLESv2.so.2 ${GL_ROOT}/libGLESv2.so + fi + + # NVIDIA monitoring library + if use kernel_linux ; then + donvidia ${libdir}/libnvidia-ml.so ${NV_SOVER} + fi + + # CUDA & OpenCL + if use kernel_linux; then + donvidia ${libdir}/libcuda.so ${NV_SOVER} + donvidia ${libdir}/libnvidia-compiler.so ${NV_SOVER} + donvidia ${libdir}/libOpenCL.so 1.0.0 ${CL_ROOT} + donvidia ${libdir}/libnvidia-opencl.so ${NV_SOVER} + fi +} + +pkg_preinst() { + # 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 + + local videogroup="$(getent group video | cut -d ':' -f 3)" + if [ -n "${videogroup}" ]; then + sed -i -e "s:PACKAGE:${PF}:g" \ + -e "s:VIDEOGID:${videogroup}:" "${ROOT}"/etc/modprobe.d/nvidia.conf + else + eerror "Failed to determine the video group gid." + die "Failed to determine the video group gid." + fi +} + +pkg_postinst() { + # Switch to the nvidia implementation + use X && "${ROOT}"/usr/bin/eselect opengl set --use-old nvidia + "${ROOT}"/usr/bin/eselect opencl set --use-old nvidia + + readme.gentoo_print_elog + + if ! use X; then + elog "You have elected to not install the X.org driver. Along with" + elog "this the OpenGL libraries and VDPAU libraries were not" + elog "installed. Additionally, once the driver is loaded your card" + elog "and fan will run at max speed which may not be desirable." + elog "Use the 'nvidia-smi' init script to have your card and fan" + elog "speed scale appropriately." + elog + fi +} + +pkg_prerm() { + use X && "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 +} + +pkg_postrm() { + use X && "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 +} |