diff options
author | Jeroen Roovers <jer@gentoo.org> | 2015-10-14 05:23:06 +0200 |
---|---|---|
committer | Jeroen Roovers <jer@gentoo.org> | 2015-10-14 05:24:23 +0200 |
commit | d8b80d6c0ba2eb9134fcb9f0903958f20c58eabd (patch) | |
tree | 12dd52eaa7afe719e3b3431c6d527719ea3a2a4d /x11-drivers | |
parent | net-dns/avahi: version bump to 0.6.32_rc (diff) | |
download | gentoo-d8b80d6c0ba2eb9134fcb9f0903958f20c58eabd.tar.gz gentoo-d8b80d6c0ba2eb9134fcb9f0903958f20c58eabd.tar.bz2 gentoo-d8b80d6c0ba2eb9134fcb9f0903958f20c58eabd.zip |
x11-drivers/nvidia-drivers: Version bump.
Package-Manager: portage-2.2.23
Diffstat (limited to 'x11-drivers')
-rw-r--r-- | x11-drivers/nvidia-drivers/Manifest | 4 | ||||
-rw-r--r-- | x11-drivers/nvidia-drivers/metadata.xml | 1 | ||||
-rw-r--r-- | x11-drivers/nvidia-drivers/nvidia-drivers-358.09.ebuild | 501 |
3 files changed, 506 insertions, 0 deletions
diff --git a/x11-drivers/nvidia-drivers/Manifest b/x11-drivers/nvidia-drivers/Manifest index f76a73798193..a2fee153f13e 100644 --- a/x11-drivers/nvidia-drivers/Manifest +++ b/x11-drivers/nvidia-drivers/Manifest @@ -4,18 +4,21 @@ DIST NVIDIA-FreeBSD-x86-340.93.tar.gz 59385673 SHA256 094dc6df60b8e57cf9b94d982c DIST NVIDIA-FreeBSD-x86-346.96.tar.gz 58010757 SHA256 a27d7b79c053702bf6524b2c4725321fa557be18a585735e0b8122d884348c3e SHA512 f05ff7f98ae56ef992c21440e94dc12537f91353c9ba6fbe74b5928744823cb0cce38e7aa2da6c88569dda52f9ae0f6674c29255db155a2fada9b78f024dda8d WHIRLPOOL d21cfd27971847dac0118429b58b34be24f19fefc9ee05f70454e7c350d4a8678e2d01f7db72e05bd1026c45fa9373783b9817efcf76f70b70f6a5ecd8a5bc7c DIST NVIDIA-FreeBSD-x86-352.41.tar.gz 55205144 SHA256 dadc8281bc13559aa4672b2436e7f7f6227fe3073882ba46765f156deb26e4c2 SHA512 6e4314e8ab4578343972ce0bd5eb0f6c847dcdf5b682b9ac04fa4fc9e0757a645d935c32d41fb18ad1468a62f5edb0f5081c2082071ce930f6205c72716f94fd WHIRLPOOL 33bb2954c4dbfe15456d467c0a41c8ac585f7f1b046e2540b7ef943434cd33c2ffe863bb80f193a783eb52a356a79e57af304b3f2a83c298de4bb601f2fd8876 DIST NVIDIA-FreeBSD-x86-355.11.tar.gz 56832647 SHA256 3d4d5d8fcf558a8f5f1a88846161b1a89bd7fc66c0268b40613c7e3457f5ce7b SHA512 744d9b8c48b82bac0bfeea5e8b2b2bbaa0e6a183cbd1f5d4f782fa7b21a6f6c5b252e556a8b2161c3b5d43938ef8fabf6cb36f995ee823fbf792f3c9a92b87e1 WHIRLPOOL 43bceb8e8d3b00789cf2c8163a055b1d2405ef93e471fda4c4e2146093289891557f4ec8debfe6bca89ad6ed6dc2e389f1d3060759a71e8949df343bc31b85b9 +DIST NVIDIA-FreeBSD-x86-358.09.tar.gz 58416284 SHA256 45af760f645b0881e632c63e6211f539f26ab7ac29e9118e5197b06a01f80cf0 SHA512 5b438f90b973773912169daa7986442323a893d9638b20ffbcd1782bd0bff301e0730d4482af74fcf619e8dbd01802cd69f89691200803d4876cd1c8417808b4 WHIRLPOOL fca235548624f86d631330bce7cf3c5782f31ab10e04548fb7f5f1470fc95e07389613ac07c6b8650c5ec7e1945271d734c608e660a9bb70da8cd2c04a460401 DIST NVIDIA-FreeBSD-x86-96.43.23.tar.gz 15463464 SHA256 18d855db8381eda1a6cf548c9e5095fc5bb8694bf1d6e24fc1072fba4e54cd78 SHA512 42d7b1b76cdb3b23680363e565614a22112162a5dd3639cb804fe670c0c3f3f23595bbefa3f78afdc6a8ca848446dee853c7a355f2c96a0d01b354753ba2785c WHIRLPOOL f8e59ce521990cd9edee441e73f973f074db492952807a0931e362102874cddbb47604ff5c5eb20a0cbde27f9b6d4e440dd12cc2e5a20c9cb65bf3c0b3e62511 DIST NVIDIA-FreeBSD-x86_64-304.128.tar.gz 35481444 SHA256 ee38635fb02eb598dd0cdfdbc9014096774104d75ba42fee7688126e531fed8f SHA512 36b045bd556512c83fc841e5d379b1af70b47df99f7042b64d3ed009f3dadb8e7a06e34506b839d0e936de06064c343aac370dad3fe96ea53aa3e25322eda0ff WHIRLPOOL bc53f009da857ca34396f6d49e9c8774e0062cfb437a1b711256b3c0bbbd50d49bb4691697ce7bee347533aeb150d7fe6d061170c1ca9ced6a694694399542c8 DIST NVIDIA-FreeBSD-x86_64-340.93.tar.gz 60215584 SHA256 07208f6a832c2da8748b1c4f8b5ce42a7b617f2ee1ac59155fecaff952c30988 SHA512 c480df2f36c3d6eba53af9c3070e1561ae7c56cd5d31fb531dcb6897ca02d0d205c0ce99597304ea36b7b75b173e31a9a4c07ddd143ad13884aff0a7c3479bce WHIRLPOOL c1b28898ffe733961bdb622e8b430715c74871cfaab0348a9e5990df5a92676e8fb8c199ea1f1a06fa6c6ded65877b987b802a7a9ea0b7023cbaa62fb52eda01 DIST NVIDIA-FreeBSD-x86_64-346.96.tar.gz 58774970 SHA256 89daaff29afe92d825ec8c00149a703b4eb234e4f16bbfb98673f077521bcff9 SHA512 99fd84f1b2177b4af2fd83088c4f8a9a6259f059c002a771ff9c3993953787dd96f83322e4ce611234674a00792a83fa439af915d6ad6886af6de2d88de94edb WHIRLPOOL 5bca7c540c713b8e070b7d8412bcc2547335b9379429dc3a04ab50eae22c03eaa922486a900b2ab3cf147e0c4f2e8d3b60e81aa329b6b2956c28d2b32900082c DIST NVIDIA-FreeBSD-x86_64-352.41.tar.gz 56851306 SHA256 4af779cd17c0cb00df3fd280d7d8199f0e41617b501c810632ebd1c8ca3012f9 SHA512 84ad4ac30c76af62532420a4f62dffe5386d047d999f66ad9cf0fceb4c7aac29cad6370560a01b0de772057d78f84df76ddc5686a41a155318566640fa859939 WHIRLPOOL 77e4a736e7296402190a7fb79024e62b9178bddc7ee0dbba212ceb1882ecd086a9a3c10bb862c985ec4c5ecfc8335e5672a81a5e486f20c9126209fcc761b8ac DIST NVIDIA-FreeBSD-x86_64-355.11.tar.gz 54031364 SHA256 3637a879905bb541bf02f9bcdfe37c242a52ec6071671a0ba33581efdce1504e SHA512 84add7d90c7f45d19d736ee70c1c4a6434be1c512bafa29cbbf9221e99a31fc383971696dce99da5a77a171eb3537c98cfec7005ff061411ac9c310fa219c906 WHIRLPOOL d8ade5d63c3ef78fa92f9dc07934eed8fdd4ead1e40f1820ad95feb166264a95a800879e1fc6374bf2deef419b0838b4864796d9f81a81110d06ccd9b65c459d +DIST NVIDIA-FreeBSD-x86_64-358.09.tar.gz 55191037 SHA256 d6d92c23a1d15ca275db03a59add2969fa8f1ffcafc3cb0786e7c840fe162bc0 SHA512 e6cafaf32f779537133b10005ccd2eb9fd6e012699905759f5b497ffff5b7d65d1b98119798beb7b19ca6e83be45d916fb6b29d0a3905ee8b5650c6f2bcbdb27 WHIRLPOOL 053fa5336edd67a24084ab32d0396da376cc44ff828b134621190cb4d2263e7faee70ca907143d83fc3361c4bfbd762e2db9e6e03b1e7dbb2517715898e4d2a6 DIST NVIDIA-Linux-x86-173.14.39-pkg0.run 15134997 SHA256 a09935f37121ed3db8ae3da63a0d8e9d4348a19c859811c9fe44d6ce8e3eab23 SHA512 e24e15ccec725d3cbca502c2b77061776a81ef92917a950adec4ff6bdc34f10903aa654433177ea74be0dade4af81c5380d5710d375a5ea445940d06154bde93 WHIRLPOOL fce3d8e4f6cdf698f5a057514b6fe220bb1011025bdce5bd4cf0e424fb4d306d38251b6726bda03f290ea8137d5a95ed418cf8751722879f9042462abd9181b6 DIST NVIDIA-Linux-x86-304.128.run 40607927 SHA256 f6aa695b3375473e3444412e4a3b7ef6bd8b13e3f3678f4cbe7a3649b5129068 SHA512 9822b61872ae28751cd5c41714048612f7ddf0fd9f02e6340598150afbea43dddeba88482a8c88bcf893b015d14b2a2cf5157ed60583da57fdfe183ecb620c90 WHIRLPOOL 6ffb8d0638af82c3a844f699c57379863fbef3a79b1308bb382c38015fbf26889e41f911f327b63a955586c1c636ecc4ad399fc12db189739d9e80fd63ed1390 DIST NVIDIA-Linux-x86-340.93.run 38703394 SHA256 4a81c158302c595e1e72b5a1812eb3c67c8cf584ca74b1bc24163dad5289d612 SHA512 7507553bd4b11cac2cd882cd8afba59e773f58a26e67ee7e781c488be963a4f1eb54dcd72b40b29d33dd81c74d4748a76c1632b2c8ea08b524b4318c18b5dfe5 WHIRLPOOL 242190999da74f2fe4bfe4b223f43dec6ec73d97afd1e84e2c78c5fd5616d9814b647067ddf3f591ea8064d29234491de1c6f87b442e240d2aac4a1e598aefad DIST NVIDIA-Linux-x86-346.96.run 40751579 SHA256 8a299ddce7d34389206599a306a41d30754bb9bddda1be1a7fd85012f9aedf39 SHA512 9d413dd0559a4035a842527371cb1a27030c9eaeff510e529d2a205ea3eddc6e5666989418a6172aead4f5b2a924cf4cbf05269cb435dc2516af37eb35ba5d4d WHIRLPOOL 055127105804f2a6dc5067b20e771b4c12ad9dad62f4e874719385c7115e8394a8618eed3d6b330c8b5d90cbd3ae7fd09998e2a0017e35b4adca0f626110f238 DIST NVIDIA-Linux-x86-352.41.run 42407126 SHA256 b3fc5af7bb2852305272ffb3d5d73fbfba639d6a2af9e34a007dde3c6133f6e3 SHA512 7c06aff7916b28b58be63b41e8e24203b35cbb6353712b651b7b461d006a4f636dd461faa4a98060c4dc0e0f0c99f51332600f9f494a91b3af839b965cb81c5a WHIRLPOOL 206071a60f49353d944d7268a6f76e6fbc2369203ba6071d68a8c662a93e8e7458b586ada91f75f5d355d845aae455d7b0d19e40d23cc3de1e83e6c4367568e5 DIST NVIDIA-Linux-x86-355.11.run 43569515 SHA256 94ce6b879581b931b84d83a9111040b9a5aa9306b012b4380cd93f6ffede3066 SHA512 450caea472c5e1b3d7098adba28d18c1221cf809c6bd0071466ff2a946dd0eca6555475f5f6bc044fb19a21c8939b1020357d4aeb0ce47d0edfcda071a66fd46 WHIRLPOOL 3a95e83ab3f46e64150caf1489aa3173aae69919bf432eabcdd0501de8bcdee5402cdb33e149a4d5d429ccb85e4b4af9b30bec5516ad7b7f091ae42f6093d26f +DIST NVIDIA-Linux-x86-358.09.run 44098888 SHA256 ce51529905fe32ade279959177a3162f95cb4860f8f8ed6e6fbacbea3ec348cf SHA512 31e6d02b206e2e476ca25a3b80c00200ea9c8d68e7e85f1b175f7849be67a74c254c9e2c0ee3f14a6ae96860ec1d2f34077ab25dcd89926805371182802b0e60 WHIRLPOOL f33d77558aca5d4607e7ed664a575abc1440b5ebd0544e610fac9bb861db4c9c3b232d8423929ba4cbd80e9bb0a28d294fb3e464bb7f74233772515519255302 DIST NVIDIA-Linux-x86-96.43.23-pkg0.run 11504817 SHA256 51e6adf4ba73071622045fc37169f80db3ae3e784dff53b29d35146a04042142 SHA512 bed5726e57637481fe4e3c03a65ec14fe949f00860e729ebde408f4fd861d7bfdc296a78bc2f5d42e8b282db09f4bbde1e0545df7228fa20227080dc4b868ba7 WHIRLPOOL 6d4fd1786c11f4e326cc3101d0bb1a2f8b63c25c3dd59f10188f8355759e2861ce44fd53d60258b513d5a1d6124d0f91ba8edf4d3668b6feabfb3e8d585f14fe DIST NVIDIA-Linux-x86_64-173.14.39-pkg2.run 21100833 SHA256 15a953666d5681ba54c97498b578ffd286a1dc96d605f3b02110f3f99813100e SHA512 a65cd496e6ed57f771c3d99f37f616a1242d97844f6faef7a807825ad899c0e536a99fde397020839f0857883b934032f9491024f3047a6b06d3eea1f5d77713 WHIRLPOOL dc5f243b7d1de7e2d1b7f005e018a2940d63335b11a7c83c234b348b7a1839e9131169d2ea928bd8c2f549a4535149b03e16e6c94d59dfa745f7f904ff790a45 DIST NVIDIA-Linux-x86_64-304.128.run 69091465 SHA256 e301342b93af24a6676519cb3a7fbe5d557b6a23a588ef121478b7fbab8a495f SHA512 493b6c9647122c9fda5ac3146f3e8f60000d3efd09e93762d49d70266baffeba493479fb046cf2f6465b2ce9e53a8699254cbd165b5a3efcefee5fca9fb11056 WHIRLPOOL fe9735282f91e8e68c50325a4c0506d18347b53fb11f0328a6d0fc1f395ec3d2ea48a510b90f3c05f1c447b40db94216a0445eadac220ff500c5864439845b1b @@ -23,4 +26,5 @@ DIST NVIDIA-Linux-x86_64-340.93.run 69813449 SHA256 ea2ac747fd473ea55ed5f6263bd3 DIST NVIDIA-Linux-x86_64-346.96.run 73538317 SHA256 229b28a6b65965a248d07223d941de7d79b54cee7c6574f1037293e8a8026727 SHA512 188f8aac88085c3cac9637e87f4d9259d0c508075bbbf684775650a12f4760f47ba9e92f79e8bbe96d33ee014092edd38efce7dd730f67e0f11c2079eca938c5 WHIRLPOOL c9f4a5163018dc0b53aeff84b410cb34720d06ca7bdd17ce166ad3a2b057ffe94e6773594cd617fce79d9d0a02e5e1cd0525ca30dade7247ad5b7b20ff661a64 DIST NVIDIA-Linux-x86_64-352.41.run 77180264 SHA256 0eb60d0543a0e7c5c3cfec13702005ffec6e2b8c7f22c631f324736ba2a1a832 SHA512 e898eda296de9b3158b0d0ab62a806d9ffed4d06ac378281009d82e0f4dc6579b1507661c022de8cdc25c506c642169baead79bf45567b31d8a6369885a17592 WHIRLPOOL 5e5c670cbad0998dd90858ac0b4a7ad110903c33b04b4dcb216af625191b9bf955cb77588a0bd4d23059d357dd9ef3dfd7b7ed72ec46da1388cfa2f2b0413ab4 DIST NVIDIA-Linux-x86_64-355.11.run 76490009 SHA256 a59b425381add9d9058dc2d987bf3087ab59c43224b5eb04c3f273f5886451ed SHA512 bfc7ab7741183408aa0226dc29176c8ffe08566fbea7cebf78f4aa30627dc27ddf90bb82951c99006b34bc481be15712b4f5867ef543a32bfe3fe81a8e6ddeae WHIRLPOOL bb5d3397a855a53c2cd7e48056564085b906550f856207932e4670fef995030a3a7bcc0a9b97fee2e60aaff9b41c4a954afc57585441f5dec92c795358da810a +DIST NVIDIA-Linux-x86_64-358.09.run 77365758 SHA256 4e9ab7f20d63fd604a72b8656c0296dd4278cf523252d1c1fd28f27b78fe0671 SHA512 6b366aeed9d3a0f7a8c46925e4c3831dd6a19cf8f9fda62f16e9f373cf0c43ab6e7ead969b163af17eb6ce2681124ed60ec709a3f55d527ff72fb15813009088 WHIRLPOOL 417fed0295e6ddb26be0b516a2ea27e54205e0a7ac42d2ee592d40e06a896cfc576d27a94ea04b3d5419fcf043af3618f35059928275833ac8f828fb9c120957 DIST NVIDIA-Linux-x86_64-96.43.23-pkg2.run 15962375 SHA256 ce8d8253e7dab7da63fbdac449ebf190cd0c10cbfffea0f8d0165515f851bc64 SHA512 04bec1187a6024a2b9839f008ec829281f1f2602dae2e639030bc385943186506bcaa2b46a230b2ab87f9217190841abc62f9e2d6395ab5559623389c31c6563 WHIRLPOOL 0651c44a51a1a06fcff5bfddbf9c3e408977e03263c7fe806cb6c01f9fe92f716dfe4e5190ffe1048bde72fcffdc8bca8267e74dd43ba5c9dfb22b6201fcc2bb diff --git a/x11-drivers/nvidia-drivers/metadata.xml b/x11-drivers/nvidia-drivers/metadata.xml index f65392ec0c40..59988e3cb7f5 100644 --- a/x11-drivers/nvidia-drivers/metadata.xml +++ b/x11-drivers/nvidia-drivers/metadata.xml @@ -14,6 +14,7 @@ branches. <flag name='X'>Install the X.org driver, OpenGL libraries, XvMC libraries, and VDPAU libraries</flag> <flag name='gtk2'>Install nvidia-settings with support for GTK+ 2</flag> <flag name='gtk3'>Install nvidia-settings with support for GTK+ 3</flag> + <flag name='kms'>Enable support for kernel mode setting (KMS)</flag> <flag name='pax_kernel'>PaX patches from the PaX project</flag> <flag name='tools'>Install additional tools such as nvidia-settings</flag> <flag name='uvm'>Install the Unified Memory kernel module (nvidia-uvm) for sharing memory between CPU and GPU in CUDA programs</flag> diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-358.09.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-358.09.ebuild new file mode 100644 index 000000000000..5f1c913b92fa --- /dev/null +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-358.09.ebuild @@ -0,0 +1,501 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +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 Accelerated Graphics Driver" +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/358" +KEYWORDS="-* ~amd64 ~x86 ~amd64-fbsd ~x86-fbsd" +RESTRICT="bindist mirror strip" +EMULTILIB_PKG="true" + +IUSE="acpi multilib kernel_FreeBSD kernel_linux kms pax_kernel +tools gtk2 gtk3 +X uvm" +REQUIRED_USE=" + tools? ( X || ( gtk2 gtk3 ) ) +" + +COMMON=" + app-eselect/eselect-opencl + gtk3? ( x11-libs/cairo ) + kernel_linux? ( >=sys-libs/glibc-2.6.1 ) + X? ( + >=app-eselect/eselect-opengl-1.0.9 + ) +" +DEPEND=" + ${COMMON} + app-arch/xz-utils + kernel_linux? ( virtual/linux-sources ) +" +RDEPEND=" + ${COMMON} + acpi? ( sys-power/acpid ) + tools? ( + dev-libs/atk + dev-libs/glib:2 + x11-libs/gdk-pixbuf + gtk2? ( >=x11-libs/gtk+-2.4:2 ) + gtk3? ( x11-libs/gtk+:3 ) + x11-libs/libX11 + x11-libs/libXext + x11-libs/pango[X] + ) + X? ( + <x11-base/xorg-server-1.17.99:= + >=x11-libs/libvdpau-0.3-r1 + multilib? ( + >=x11-libs/libX11-1.6.2[abi_x86_32] + >=x11-libs/libXext-1.3.2[abi_x86_32] + ) + ) +" + +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 + + if use kernel_linux && kernel_is ge 4 3; then + ewarn "Gentoo supports kernels which are supported by NVIDIA" + ewarn "which are limited to the following kernels:" + ewarn "<sys-kernel/gentoo-sources-4.3" + ewarn "<sys-kernel/vanilla-sources-4.3" + ewarn "" + ewarn "You are free to utilize epatch_user to provide whatever" + ewarn "support you feel is appropriate, but will not receive" + ewarn "support as a result of those changes." + ewarn "" + ewarn "Do not file a bug report about this." + 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 + + # Kernel features/options to check for + CONFIG_CHECK="~ZONE_DMA ~MTRR ~SYSVIPC ~!LOCKDEP" + use x86 && CONFIG_CHECK+=" ~HIGHMEM" + + # Now do the above checks + use kernel_linux && check_extra_config +} + +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 kernel_linux; then + MODULE_NAMES="nvidia(video:${S}/kernel)" + use uvm && MODULE_NAMES+=" nvidia-uvm(video:${S}/kernel)" + use kms && MODULE_NAMES+=" nvidia-modeset(video:${S}/kernel)" + + # This needs to run after MODULE_NAMES (so that the eclass checks + # whether the kernel supports loadable modules) but before BUILD_PARAMS + # is set (so that KV_DIR is populated). + linux-mod_pkg_setup + + BUILD_PARAMS="IGNORE_CC_MISMATCH=yes V=1 SYSSRC=${KV_DIR} \ + SYSOUT=${KV_OUT_DIR} CC=$(tc-getBUILD_CC) NV_VERBOSE=1" + + # linux-mod_src_compile calls set_arch_to_kernel, which + # sets the ARCH to x86 but NVIDIA's wrapping Makefile + # expects x86_64 or i386 and then converts it to x86 + # later on in the build process + BUILD_FIXES="ARCH=$(uname -m | sed -e 's/i.86/i386/')" + fi + + # 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 + + if use kernel_linux; then + if kernel_is lt 2 6 9; then + eerror "You must build this against 2.6.9 or higher kernels." + fi + + # If greater than 2.6.5 use M= instead of SUBDIR= +# convert_to_m "${NV_SRC}"/Makefile.kbuild + fi + + if use pax_kernel; then + ewarn "Using PAX patches is not supported. You will be asked to" + ewarn "use a standard kernel should you have issues. Should you" + ewarn "need support with these patches, contact the PaX team." + epatch "${FILESDIR}"/${PN}-355.06-pax.patch + fi + + # Allow user patches so they can support RC kernels and whatever else + epatch_user +} + +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 kernel_FreeBSD; then + MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \ + LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die + elif use kernel_linux; then + MAKEOPTS=-j1 + linux-mod_src_compile + fi +} + +# 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 it is 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 + linux-mod_src_install + + # 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)" + newexe "${FILESDIR}"/nvidia-udev.sh-r1 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 + + # Xorg nvidia.conf + if has_version '>=x11-base/xorg-server-1.16'; then + insinto /usr/share/X11/xorg.conf.d + newins {,50-}nvidia-drm-outputclass.conf + fi + 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" + use tools && 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" + use X && doman "${NV_MAN}/nvidia-xconfig.1.gz" + use tools && doman "${NV_MAN}/nvidia-settings.1.gz" + doman "${NV_MAN}/nvidia-cuda-mps-control.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 + newconfd "${FILESDIR}/nvidia-persistenced.conf" nvidia-persistenced + newinitd "${FILESDIR}/nvidia-persistenced.init" nvidia-persistenced + fi + + if use tools; then + doexe ${NV_OBJ}/nvidia-settings + use gtk2 && donvidia libnvidia-gtk2.so ${PV} + use gtk3 && donvidia libnvidia-gtk3.so ${PV} + insinto /usr/share/nvidia/ + doins nvidia-application-profiles-${PV}-key-documentation + insinto /etc/nvidia + newins nvidia-application-profiles-${PV}-rc nvidia-application-profiles-rc + fi + + dobin ${NV_OBJ}/nvidia-bug-report.sh + + # Desktop entries for nvidia-settings + if use tools; then + # There is no icon in the FreeBSD tarball. + use kernel_FreeBSD || newicon ${NV_OBJ}/nvidia-settings.png ${PN}-settings.png + domenu "${FILESDIR}"/${PN}-settings.desktop + exeinto /etc/X11/xinit/xinitrc.d + doexe "${FILESDIR}"/95-nvidia-settings + fi + + #doenvd "${FILESDIR}"/50nvidia-prelink-blacklist + + 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 + NV_GLX_LIBRARIES=( + "libEGL.so 1 ${GL_ROOT}" + "libEGL_nvidia.so 0 ${GL_ROOT}" + "libGL.so ${NV_SOVER} ${GL_ROOT}" + "libGLESv1_CM.so ${NV_SOVER} ${GL_ROOT}" + "libGLdispatch.so 0 ${GL_ROOT}" + "libOpenCL.so 1.0.0 ${CL_ROOT}" + "libOpenGL.so 0 ${GL_ROOT}" + "libcuda.so ${NV_SOVER}" + "libnvcuvid.so ${NV_SOVER}" + "libnvidia-compiler.so ${NV_SOVER}" + "libnvidia-eglcore.so ${NV_SOVER}" + "libnvidia-encode.so ${NV_SOVER}" + "libnvidia-fbc.so ${NV_SOVER}" + "libnvidia-glcore.so ${NV_SOVER}" + "libnvidia-glsi.so ${NV_SOVER}" + "libnvidia-ifr.so ${NV_SOVER}" + "libnvidia-opencl.so ${NV_SOVER}" + "libvdpau.so ${NV_SOVER} ${GL_ROOT}" + "libvdpau_nvidia.so ${NV_SOVER}" + "libvdpau_trace.so ${NV_SOVER} ${GL_ROOT}" + ) + if use kernel_linux && has_multilib_profile && [[ ${ABI} == "amd64" ]]; + then + NV_GLX_LIBRARIES+=( "libnvidia-wfb.so ${NV_SOVER}" ) + fi + + if use kernel_FreeBSD; then + NV_GLX_LIBRARIES+=( "libnvidia-tls.so ${NV_SOVER}" ) + fi + + if use kernel_linux; then + NV_GLX_LIBRARIES+=( + "libnvidia-ml.so ${NV_SOVER}" + "tls/libnvidia-tls.so ${NV_SOVER}" + ) + fi + + for NV_LIB in "${NV_GLX_LIBRARIES[@]}"; do + donvidia ${libdir}/${NV_LIB} + done + + # GLES v2 library is special + 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 +} + +pkg_preinst() { + if use kernel_linux; then + linux-mod_pkg_preinst + + local 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" + else + sed -i \ + -e "s:PACKAGE:${PF}:g" \ + -e "s:VIDEOGID:${videogroup}:" \ + "${D}"/etc/modprobe.d/nvidia.conf || die + fi + 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() { + use kernel_linux && linux-mod_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 + if ! use tools; then + elog "USE=tools 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. Optionally you can install" + elog "media-video/nvidia-settings" + elog + fi +} + +pkg_prerm() { + use X && "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 +} + +pkg_postrm() { + use kernel_linux && linux-mod_pkg_postrm + use X && "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 +} |