summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Roovers <jer@gentoo.org>2018-11-27 22:54:05 +0100
committerJeroen Roovers <jer@gentoo.org>2018-11-27 22:54:32 +0100
commite37ade9ed9452f5131d1262d3d789e8041ebd315 (patch)
tree77f65c9578704129b8713492137b52be2931ccf3 /x11-drivers/nvidia-drivers
parentx11-drivers/nvidia-drivers: Stable for AMD64 too. (diff)
downloadgentoo-e37ade9ed9452f5131d1262d3d789e8041ebd315.tar.gz
gentoo-e37ade9ed9452f5131d1262d3d789e8041ebd315.tar.bz2
gentoo-e37ade9ed9452f5131d1262d3d789e8041ebd315.zip
x11-drivers/nvidia-drivers: Old
Package-Manager: Portage-2.3.52, Repoman-2.3.12 Signed-off-by: Jeroen Roovers <jer@gentoo.org>
Diffstat (limited to 'x11-drivers/nvidia-drivers')
-rw-r--r--x11-drivers/nvidia-drivers/Manifest9
-rw-r--r--x11-drivers/nvidia-drivers/nvidia-drivers-410.66.ebuild590
-rw-r--r--x11-drivers/nvidia-drivers/nvidia-drivers-410.73.ebuild590
-rw-r--r--x11-drivers/nvidia-drivers/nvidia-drivers-415.13.ebuild590
4 files changed, 0 insertions, 1779 deletions
diff --git a/x11-drivers/nvidia-drivers/Manifest b/x11-drivers/nvidia-drivers/Manifest
index 87a6f7b0a4a0..723dd54313cf 100644
--- a/x11-drivers/nvidia-drivers/Manifest
+++ b/x11-drivers/nvidia-drivers/Manifest
@@ -15,10 +15,7 @@ DIST NVIDIA-FreeBSD-x86_64-384.130.tar.gz 62901704 BLAKE2B 50be9af398f88caa012a7
DIST NVIDIA-FreeBSD-x86_64-387.34.tar.gz 63387097 BLAKE2B 53689ba098b4a4de08dca056618ea533c92d17137ec954dea0ae71e1b2c825c021979871e4ff82c820be0a78d3c365f282b760940ebe2caa1ca5bfd2453e178e SHA512 0a905ee72ee6f4e9c941e5dd1f7cddf96bfb20c6da32fd05599258e1bb154f68463d775ba8ff4f67f0d4b8e637e9ed9624fc9a4873a1f2621dc86732f0d6d70d
DIST NVIDIA-FreeBSD-x86_64-390.87.tar.gz 63648591 BLAKE2B 88aa38b11b64b2ad91f723ec84a2adb6829571136aabb1441a9119418395d5f143736487902f0c60b49ebc1284f3100fbd089e4c941cdd3519ab8511cc1d3261 SHA512 0865fef8b8a3be8f6d9fc81908b162fd6062ba0ea81fd00200e7b2a1e3149ef62408b46bc4ccb7a77f1ac943557a22b13a10cfdde084f0b76cf2b23432e57540
DIST NVIDIA-FreeBSD-x86_64-396.54.tar.gz 60938322 BLAKE2B a23488b625a15703b0c40bc6871314b05d117d489f64a6f7c70ac3c934b02028b9623be10f0369c98c7d3b5e018e1eb6f1d2cde9d9e1b90be5065f06f6a646dd SHA512 52df85364bfd45a23394078855859ce85de996f7990bb96ba63eb33e516c3cf8e72c4391af9817213f735286f2cf6444bc8ed00312365f12ae17373cfbdc3fc7
-DIST NVIDIA-FreeBSD-x86_64-410.66.tar.gz 61916683 BLAKE2B 835e40820339ce333a92b757087a09d8340cf957fa42257cbde1337b00c3156bb5ef23ba7c727b94146883c93e6a55a20ae5db4017d28f79d7d58b17d3b372d5 SHA512 c17d999c1f971ec597a6c52067f97f5395c5ca745d8db4b8c8f4d8519bf244b083b2ab0ac65f1bcf8b1525d18f1fb297092231edf7a7bb175befaaaf51601c06
-DIST NVIDIA-FreeBSD-x86_64-410.73.tar.gz 61931692 BLAKE2B 6746f4980a13f5e62816a0ad443a96151fe2053aa6df3184a4c36040a77a52673248474f5025707af1b36d3f3e90b30964f44f251ec804d965792c454b6cd0ca SHA512 3a9aed0996ab1a6cad935ddac669c06d79a82013fbc2297945d8c75fde1a05c9b97d785f230092dc7d931b81f668c8427980f4563ca46d3648b568ad023cf23e
DIST NVIDIA-FreeBSD-x86_64-410.78.tar.gz 61935486 BLAKE2B 3bc85aacd0775b600c37cd285de49fe3d35bba04fd8d3db1ec75f1fdfbd93a9d5b3d34b67e6fd82b5056bff875ccbc44cd2f06fed9b66703b26057c85f750867 SHA512 30488f9e5e6a377a478c49f13d648fba77ac910f43c3e561ce7715380480ac8b3860fecfb5b745beefadb6abe0b4c4135684c468a69c5b71b56cd463698b931a
-DIST NVIDIA-FreeBSD-x86_64-415.13.tar.gz 62315397 BLAKE2B e785748eb5a981e041f5997bb91d492792a34884a3190d1340841d27296a7a9218b86a2bcb6cdcd5a24ba5da885e6f83d1f0e9b6e4234c43bae7c68f085d7b4f SHA512 1019b8baf8ae6b8f1e2f74d00dfd98ed4a7c504ba15d74a38eb937a5490889cf96e62774fe591653f5e988762462d09fc95adde9c2a7e74254815e306a49be2d
DIST NVIDIA-FreeBSD-x86_64-415.18.tar.gz 62328268 BLAKE2B 03b53907ba8eed8751b9270e472b05f21e3865a560a7c4b89b16df0d1981f8ee955d26f42ab51ff538898218caa32745ece0cfa562b8325ad29f866205ab0a68 SHA512 9a80f6e15f57d756f0286db5cbb1c520f6c7553368cdc26d9f062e1f5cd1c6080bf3934b3fd55cdc0b67702be8188dcd177f7aec80697ff978ebc90a6dccbb30
DIST NVIDIA-Linux-armv7l-gnueabihf-375.82.run 26650801 BLAKE2B 31446667065c56b48f6a3e737afe29a4517459d3462138136bffe383bc6fe514d6e80b49c391c27edc96b8abc3da3dd4d6ee3f3dca17f3c9a0f1cdf0e72cf099 SHA512 28554f1c24fe63c9257c0de3e84e4e739a45bf1c20ec7a53bc2c1b69b4e2355675061491ef5b03f3ae489cf623e553cfa68442f5536f137837327036d1c53d63
DIST NVIDIA-Linux-armv7l-gnueabihf-378.13.run 26514235 BLAKE2B 2b3c540704496a290be7ae3f1ff378487c75af2298c12488da8b3a1814446e5df02a1ed99afd8ee7fc459d950aab472155359eae0bf56ac83389711d70638152 SHA512 253786a821df85fa926ae842114321b3c70502f887ea7c2b6790dfe3836039ee5d390e6722ca8785904ec6487e465916923d3042dc6191b3b4522c3161b80cb0
@@ -43,10 +40,7 @@ DIST NVIDIA-Linux-x86_64-384.130.run 82260837 BLAKE2B 55b6f3627680c881821f5d20f0
DIST NVIDIA-Linux-x86_64-387.34.run 82784271 BLAKE2B b7140d5d6a693892df50b3ad2e20387673dec6b5ac609cc0300bdc4b4a93ca94849255699126e4d55e67f10e488bfe6008e987197ea239b1a1b643b4ae5c7808 SHA512 6742768f1258a028c9ba56ad1d72f27d7eea4b6bfd324ba29c7f057ab5819816bd728aeaf2a8058031dadcd4c51bc6d08f0e0e0e26c68ed57955e90d68ac5a4b
DIST NVIDIA-Linux-x86_64-390.87.run 82690871 BLAKE2B b43a45a7d48160a72185417360a4ff4238922f6d77c7b58c0562f0e01c8aa33e89057e8a5d354e8d3c8e6fa86acf8908a6c2eab81e06158a92908eec18a9b02e SHA512 f4883744f5e07150677918669eed03c7b87774f752112aabd52d903a09ae16351b34105075da2ff0fcb7a847cf66ec17e9797826859fcaecc44fdcd464a61805
DIST NVIDIA-Linux-x86_64-396.54.run 86946680 BLAKE2B 9b3ab39c9d09c663238d0fac6346c24feea6ecc44b0ecaf3de871522697685c1c474ec4cc83f3bab0a2bcfecc7c77acea0e6bfee6e8ca8e6883bd338fd6da8a2 SHA512 17139abe99d4f32ec87379ee57af2cc0fec7d24605b2be7e3cd6609d9fcdf871e3c1cb7414b3544e14eb32d2213fec7ac45b3261f27c8d6565d510ccb14a1247
-DIST NVIDIA-Linux-x86_64-410.66.run 107130897 BLAKE2B 1f294dd1b248fede6c8a418ffadd3035a9d1c516b9b52a04dc2366fa7dab63993bd2d7d111c0bbc4cc12411bbb219fb504dec1e82e1bfb72a25e719917b32147 SHA512 1773ea5150822735cf02808df68cd2f9ff8b502633632a7748b4bff387daec44527f1bfb0508938c9eee7fb12ac070b99b3f5a903e592bf6d9c6461f4f7a7e9e
-DIST NVIDIA-Linux-x86_64-410.73.run 107004565 BLAKE2B c55655aefc410883b4b2c63305e3a9fc66ce2b611cd79fe8fe3225fec49a31ed73707fa4a6e1998fa19e7d13b859af0b5a5bb76f37109fbd9e39e0aa36afbac2 SHA512 2dca98babb4b2ce319089b179619444e1ef9b4b94c0d1981982c35a234f9e6934febe3ec3ca39cf1b3672a126b4290b1bc54469a0617b7fdebb4871cc4c75bac
DIST NVIDIA-Linux-x86_64-410.78.run 107944209 BLAKE2B f493efb4b61716ae1f7ac760d57b330e0160e8cd7a90e80dd00744c2277d0c8024f6704eac3a9f95ff13d66f362bf9eecdc8176edb429ea7e45c4622b52beca7 SHA512 0bd7ed61dcfd4d7634ba450b106d7648fc274c256e7e4c4e51e544bd7779d68ffa08cba709ace5333679eeea1dbe4afa0c267361887eaa784d6f1369b717677d
-DIST NVIDIA-Linux-x86_64-415.13.run 109005596 BLAKE2B 8e6c7f34f2d7d861a3d5727cffc8e4094359be734ab0636de84f205ab1229f0a25954d62b5600ddd8f93511091624832cc7aa9074f40ca98b34a0071580a1a09 SHA512 4115fe24d615694e3bc7644d8d648ed6be266c69c6ffc92b65c65b9a0b0c8fb9c672d74cd46e9f9be2467464310c55a29f0bd155163bfc760e0e8b39db9598b7
DIST NVIDIA-Linux-x86_64-415.18.run 107849060 BLAKE2B e4ffbec6a31f79d8c7f18bfbb4e256b94ef8e741526eb07032fd645da1b37751e867d72e998f6b8b773d55127e40bafeb53e8d5f9a4f8be4ce8a8d079e9c3341 SHA512 8e56b5a62f47b4bbe2b0c59e05e2b1a4beb204252aa2000e6dfc257a16f06d00862232d2a3f404192e47b73c3af9f6d6c92e3d530b977a6ecbe3f2d944a12f7e
DIST nvidia-settings-304.137.tar.bz2 1481361 BLAKE2B cf52a55a34eeb03a685a683487af6a198ba467dd8ba9983cc75624a37a226373cd931d98e8448b7b8ed430c54be2118c7b240ed2a9100b19bec5e832e2f6cdad SHA512 676d1f70c9a78ee234f5f1a283412430a386fa604de211afba02806a45906c5e246a002989b724d74752178d28c92a268de1c98d4c87876797d991253f16b0cc
DIST nvidia-settings-340.107.tar.bz2 1549413 BLAKE2B 127442ee2c35ceec47ab4f103bdd2d0278c621fcb9be47051111f6f8728ef5699bdc95fe33a3812a807c38c4868b04c2176e2ed218a422171d2a88ac0c00de96 SHA512 593e7e83aa350a3a7beaaa32aca8660d7e203f6f2e460a6e6eabcdc092087f9917ee4e6d141e37ad4e3b0a1b9908c085e4a71d2f579e481a03bbd1c6f75ca776
@@ -57,8 +51,5 @@ DIST nvidia-settings-384.130.tar.bz2 1633217 BLAKE2B ffc1381e680e94aee95752074c3
DIST nvidia-settings-387.34.tar.gz 1267616 BLAKE2B 62d2fd329417f54bf384918889603921065e0ef6d4fb691e914534a75ab0062a17d8f886c593cf772d29bb6b56ce30aaf7b1548191b2f9ad5fbee71770ed5308 SHA512 559c859c0740575ab93edce013587250b98d7d2cd55198b5103fe97423d31ed9f113d83c240c402404de88074c285a07e46342538610d3d5dade7bed59d60090
DIST nvidia-settings-390.87.tar.bz2 1109274 BLAKE2B 20eb809ceeade932e89592ac91071e6d3311f4a075812225d68342806b7ab1f9f8ed0399ea7a47241b7974311794852fd932fd8e824065589de6c124a3c81ef3 SHA512 cafdf2bfefac187409dfcffd593ff23eaba5ab7ab8dd85a9f14a4b6a47ffb3649af770bd2615887af9d30de3ef8fedaad7afc2ebe9f60a8ba7355a9004702959
DIST nvidia-settings-396.54.tar.bz2 1116371 BLAKE2B 114b88f393b0909c8d84a56a280854e258d0e7e7ce800ee58547ef68b4989f22a3bbb380795472b8222493a988dc9308fc20ef03c81589448b518a12285cf204 SHA512 23dc3c61bef71200b3e8185940dd52a50dae7ca7f2b8a68fa96eaa937aabc87ded5d5f73081af51d1e7af2b78b0ec10ab80d28dadbcf10a046c32ec14db1d83c
-DIST nvidia-settings-410.66.tar.bz2 1115615 BLAKE2B e9e608978849a9b3106745c80ddd85270406e1c1fd6c5353a19e54877a5b3e8aa3f169c06c669a2278a40f64e2cc27930565c02ff2d40250030933b05ecdb962 SHA512 90e4716622d9eabdc32b707fb139390f228db0d60b55bc5d1e3e15ead64ee47a49fd15e47301a85f1ea7dbfb5ae877e03d4b48c88e47db08f3c3ebd280abe989
-DIST nvidia-settings-410.73.tar.bz2 1115717 BLAKE2B 7a6ea49cfc378ba7c91c89be51d0761cf2b5a9e872de2169f59e236d75669e86b29719d0479c26d6194ffecef7f8a57e7a18f33efc9356b44299d99c683ccbaf SHA512 b8b95c8a03242b1793fb5694330d57446e06a2c2eeaae4100d2366a48336941b03a51f426648f78fe3b59f858f4261018f7cdd9d28d2bce352187f74b4d1730b
DIST nvidia-settings-410.78.tar.bz2 1115872 BLAKE2B 68471e3c3700c68c1082bd7ca349a791a8b7c9524f71882d78791a11ac4ecaa28d40cdd32baea20354732b4ee8e47767ae8c12d534f95a96494da5787869b4c1 SHA512 28aae1cbec6004d4f532aac2a728d66384440525c3f35f1bf5b7221c4722ccd02be119d44b261204c0f0c116d5455eca7555d10cab3f6d4184a39255750ccf97
-DIST nvidia-settings-415.13.tar.bz2 1121852 BLAKE2B eeb35a93a7b2931d7e8db2598c03e7214e78c1b94738ff62ba162a63b94ba0bc67e91e968d6e0b66dd68e72f039d5cd3f353c582d45755b7eae43b7654a97fe2 SHA512 e0ab330a1e96dc2ebf27b929d5d09a35a214981e867582718a55a6d0b04fb6b6b6cf339fda0426ec09b3161098597decc07353bc1bf93a890e65569395d3c12e
DIST nvidia-settings-415.18.tar.bz2 1121712 BLAKE2B d8e8c16e5d1fb41c77a90e4226c79c00ae07f329f4d6d15be3de7b9f3ab1d8ab09dba32295ffbb77b851f9a51cd11e560b0104f2ece52d1af6f7208602b9f5b4 SHA512 d38e32916cf711bda4b9a1a772b5711af1f0c929d28a9818f4c4dfb761d5c1cf33907794b74d4748122211ade08f63f3feacf0976890c59a9d694c850118ff48
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-410.66.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-410.66.ebuild
deleted file mode 100644
index 85680a2e7827..000000000000
--- a/x11-drivers/nvidia-drivers/nvidia-drivers-410.66.ebuild
+++ /dev/null
@@ -1,590 +0,0 @@
-# Copyright 1999-2018 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-inherit eutils flag-o-matic linux-info linux-mod multilib-minimal nvidia-driver \
- portability toolchain-funcs unpacker user udev
-
-DESCRIPTION="NVIDIA Accelerated Graphics Driver"
-HOMEPAGE="http://www.nvidia.com/ http://www.nvidia.com/Download/Find.aspx"
-
-AMD64_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86_64-${PV}"
-AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}"
-ARM_NV_PACKAGE="NVIDIA-Linux-armv7l-gnueabihf-${PV}"
-
-NV_URI="https://us.download.nvidia.com/XFree86/"
-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 )
- tools? (
- https://download.nvidia.com/XFree86/nvidia-settings/nvidia-settings-${PV}.tar.bz2
- )
-"
-
-LICENSE="GPL-2 NVIDIA-r2"
-SLOT="0/${PV%.*}"
-KEYWORDS="-* ~amd64 ~amd64-fbsd"
-RESTRICT="bindist mirror"
-EMULTILIB_PKG="true"
-
-IUSE="acpi compat +driver gtk3 kernel_FreeBSD kernel_linux +kms multilib pax_kernel static-libs +tools uvm wayland +X"
-REQUIRED_USE="
- tools? ( X )
- static-libs? ( tools )
-"
-
-COMMON="
- app-eselect/eselect-opencl
- kernel_linux? ( >=sys-libs/glibc-2.6.1 )
- tools? (
- dev-libs/atk
- dev-libs/glib:2
- dev-libs/jansson
- gtk3? (
- x11-libs/gtk+:3
- )
- x11-libs/cairo
- x11-libs/gdk-pixbuf[X]
- x11-libs/gtk+:2
- x11-libs/libX11
- x11-libs/libXext
- x11-libs/libXrandr
- x11-libs/libXv
- x11-libs/libXxf86vm
- x11-libs/pango[X]
- )
- X? (
- >=app-eselect/eselect-opengl-1.0.9
- app-misc/pax-utils
- )
-"
-DEPEND="
- ${COMMON}
- kernel_linux? ( virtual/linux-sources )
- tools? ( sys-apps/dbus )
-"
-RDEPEND="
- ${COMMON}
- acpi? ( sys-power/acpid )
- tools? ( !media-video/nvidia-settings )
- wayland? ( dev-libs/wayland[${MULTILIB_USEDEP}] )
- X? (
- <x11-base/xorg-server-1.20.99:=
- >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
- >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
- >=x11-libs/libvdpau-1.0[${MULTILIB_USEDEP}]
- sys-libs/zlib[${MULTILIB_USEDEP}]
- )
-"
-QA_PREBUILT="opt/* usr/lib*"
-S=${WORKDIR}/
-
-nvidia_drivers_versions_check() {
- 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 19; then
- ewarn "Gentoo supports kernels which are supported by NVIDIA"
- ewarn "which are limited to the following kernels:"
- ewarn "<sys-kernel/gentoo-sources-4.19"
- ewarn "<sys-kernel/vanilla-sources-4.19"
- 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."
- ewarn ""
- fi
-
- # Since Nvidia ships many 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"
-
- # Now do the above checks
- use kernel_linux && check_extra_config
-}
-
-pkg_pretend() {
- nvidia_drivers_versions_check
-}
-
-pkg_setup() {
- nvidia_drivers_versions_check
-
- # 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 driver && 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) nvidia-drm(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
-
- if use kernel_linux && kernel_is lt 2 6 9; then
- eerror "You must build this against 2.6.9 or higher kernels."
- fi
-
- # set variables to where files are in the package structure
- if use kernel_FreeBSD; then
- 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() {
- 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."
- eapply "${FILESDIR}"/${PN}-375.20-pax.patch
- fi
-
- local man_file
- for man_file in "${NV_MAN}"/*1.gz; do
- gunzip $man_file || die
- done
-
- if use tools; then
- cp "${FILESDIR}"/nvidia-settings-linker.patch "${WORKDIR}" || die
- sed -i \
- -e "s:@PV@:${PV}:g" \
- "${WORKDIR}"/nvidia-settings-linker.patch || die
- eapply "${WORKDIR}"/nvidia-settings-linker.patch
- fi
-
- default
-
- if ! [ -f nvidia_icd.json ]; then
- cp nvidia_icd.json.template nvidia_icd.json || die
- sed -i -e 's:__NV_VK_ICD__:libGLX_nvidia.so.0:g' nvidia_icd.json || die
- 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 kernel_FreeBSD; then
- MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \
- LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die
- elif use driver && use kernel_linux; then
- MAKEOPTS=-j1 linux-mod_src_compile
- fi
-
- if use tools; then
- emake -C "${S}"/nvidia-settings-${PV}/src \
- AR="$(tc-getAR)" \
- CC="$(tc-getCC)" \
- DO_STRIP= \
- LD="$(tc-getCC)" \
- LIBDIR="$(get_libdir)" \
- NVLD="$(tc-getLD)" \
- NV_VERBOSE=1 \
- RANLIB="$(tc-getRANLIB)" \
- build-xnvctrl
-
- emake -C "${S}"/nvidia-settings-${PV}/src \
- CC="$(tc-getCC)" \
- DO_STRIP= \
- GTK3_AVAILABLE=$(usex gtk3 1 0) \
- LD="$(tc-getCC)" \
- LIBDIR="$(get_libdir)" \
- NVLD="$(tc-getLD)" \
- NVML_ENABLED=0 \
- NV_USE_BUNDLED_LIBJANSSON=0 \
- NV_VERBOSE=1
- 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
- nv_LIB="${1}"
-
- # SOVER to use
- nv_SOVER="$(scanelf -qF'%S#F' ${nv_LIB})"
-
- # Where to install
- nv_DEST="${2}"
-
- # Get just the library name
- nv_LIBNAME=$(basename "${nv_LIB}")
-
- if [[ "${nv_DEST}" ]]; then
- exeinto ${nv_DEST}
- action="doexe"
- else
- nv_DEST="/usr/$(get_libdir)"
- action="dolib.so"
- fi
-
- # Install the library
- ${action} ${nv_LIB} || die "failed to install ${nv_LIBNAME}"
-
- # If the library has a SONAME and SONAME does not match the library name,
- # then we need to create a symlink
- if [[ ${nv_SOVER} ]] && ! [[ "${nv_SOVER}" = "${nv_LIBNAME}" ]]; then
- dosym ${nv_LIBNAME} ${nv_DEST}/${nv_SOVER} \
- || die "failed to create ${nv_DEST}/${nv_SOVER} symlink"
- fi
-
- dosym ${nv_LIBNAME} ${nv_DEST}/${nv_LIBNAME/.so*/.so} \
- || die "failed to create ${nv_LIBNAME/.so*/.so} symlink"
-}
-
-src_install() {
- if use driver && 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
- doins "${FILESDIR}"/nvidia-rmmod.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}/libglxserver_nvidia.so.${NV_SOVER} \
- /usr/$(get_libdir)/xorg/modules/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
-
- insinto /usr/share/glvnd/egl_vendor.d
- doins ${NV_X11}/10_nvidia.json
- fi
-
- if use wayland; then
- insinto /usr/share/egl/egl_external_platform.d
- doins ${NV_X11}/10_nvidia_wayland.json
- fi
-
- # OpenCL ICD for NVIDIA
- if use kernel_linux; then
- insinto /etc/OpenCL/vendors
- doins ${NV_OBJ}/nvidia.icd
- fi
-
- # Documentation
- 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
- use X && doman "${NV_MAN}"/nvidia-xconfig.1
- use tools && doman "${NV_MAN}"/nvidia-settings.1
- doman "${NV_MAN}"/nvidia-cuda-mps-control.1
- fi
-
- docinto html
- dodoc -r ${NV_DOC}/html/*
-
- # Helper Apps
- exeinto /opt/bin/
-
- if use X; then
- doexe ${NV_OBJ}/nvidia-xconfig
-
- insinto /etc/vulkan/icd.d
- doins nvidia_icd.json
- 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
- doman nvidia-modprobe.1
- doman nvidia-persistenced.1
- 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
- emake -C "${S}"/nvidia-settings-${PV}/src/ \
- DESTDIR="${D}" \
- GTK3_AVAILABLE=$(usex gtk3 1 0) \
- LIBDIR="${D}/usr/$(get_libdir)" \
- NV_USE_BUNDLED_LIBJANSSON=0 \
- NV_VERBOSE=1 \
- PREFIX=/usr \
- DO_STRIP= \
- install
-
- if use static-libs; then
- dolib.a "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/libXNVCtrl.a
-
- insinto /usr/include/NVCtrl
- doins "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/*.h
- fi
-
- insinto /usr/share/nvidia/
- doins nvidia-application-profiles-${PV}-key-documentation
-
- insinto /etc/nvidia
- newins \
- nvidia-application-profiles-${PV}-rc nvidia-application-profiles-rc
-
- # There is no icon in the FreeBSD tarball.
- use kernel_FreeBSD || \
- doicon ${NV_OBJ}/nvidia-settings.png
-
- domenu "${FILESDIR}"/nvidia-settings.desktop
-
- exeinto /etc/X11/xinit/xinitrc.d
- newexe "${FILESDIR}"/95-nvidia-settings-r1 95-nvidia-settings
- fi
-
- dobin ${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 nv_libdir="${NV_OBJ}"
-
- if use kernel_linux && has_multilib_profile && [[ ${ABI} == "x86" ]]; then
- nv_libdir="${NV_OBJ}"/32
- fi
-
- if use X; then
- NV_GLX_LIBRARIES=(
- "libEGL.so.$(usex compat ${NV_SOVER} 1.1.0) ${GL_ROOT}"
- "libEGL_nvidia.so.${NV_SOVER} ${GL_ROOT}"
- "libGL.so.$(usex compat ${NV_SOVER} 1.7.0) ${GL_ROOT}"
- "libGLESv1_CM.so.1.2.0 ${GL_ROOT}"
- "libGLESv1_CM_nvidia.so.${NV_SOVER} ${GL_ROOT}"
- "libGLESv2.so.2.1.0 ${GL_ROOT}"
- "libGLESv2_nvidia.so.${NV_SOVER} ${GL_ROOT}"
- "libGLX.so.0 ${GL_ROOT}"
- "libGLX_nvidia.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-fatbinaryloader.so.${NV_SOVER}"
- "libnvidia-fbc.so.${NV_SOVER}"
- "libnvidia-glcore.so.${NV_SOVER}"
- "libnvidia-glsi.so.${NV_SOVER}"
- "libnvidia-glvkspirv.so.${NV_SOVER}"
- "libnvidia-ifr.so.${NV_SOVER}"
- "libnvidia-opencl.so.${NV_SOVER}"
- "libnvidia-ptxjitcompiler.so.${NV_SOVER}"
- "libvdpau_nvidia.so.${NV_SOVER}"
- )
-
- if use wayland && has_multilib_profile && [[ ${ABI} == "amd64" ]];
- then
- NV_GLX_LIBRARIES+=(
- "libnvidia-egl-wayland.so.1.1.0"
- )
- fi
-
- 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
-
- if use kernel_linux && has_multilib_profile && [[ ${ABI} == "amd64" ]];
- then
- NV_GLX_LIBRARIES+=(
- "libnvidia-cbl.so.${NV_SOVER}"
- "libnvidia-rtcore.so.${NV_SOVER}"
- "libnvoptix.so.${NV_SOVER}"
- )
- fi
-
- for NV_LIB in "${NV_GLX_LIBRARIES[@]}"; do
- donvidia "${nv_libdir}"/${NV_LIB}
- done
- fi
-}
-
-pkg_preinst() {
- if use driver && 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 driver && 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 driver && use kernel_linux && linux-mod_pkg_postrm
- use X && "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11
-}
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-410.73.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-410.73.ebuild
deleted file mode 100644
index f00cbf47d210..000000000000
--- a/x11-drivers/nvidia-drivers/nvidia-drivers-410.73.ebuild
+++ /dev/null
@@ -1,590 +0,0 @@
-# Copyright 1999-2018 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-inherit eutils flag-o-matic linux-info linux-mod multilib-minimal nvidia-driver \
- portability toolchain-funcs unpacker user udev
-
-DESCRIPTION="NVIDIA Accelerated Graphics Driver"
-HOMEPAGE="http://www.nvidia.com/ http://www.nvidia.com/Download/Find.aspx"
-
-AMD64_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86_64-${PV}"
-AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}"
-ARM_NV_PACKAGE="NVIDIA-Linux-armv7l-gnueabihf-${PV}"
-
-NV_URI="https://us.download.nvidia.com/XFree86/"
-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 )
- tools? (
- https://download.nvidia.com/XFree86/nvidia-settings/nvidia-settings-${PV}.tar.bz2
- )
-"
-
-LICENSE="GPL-2 NVIDIA-r2"
-SLOT="0/${PV%.*}"
-KEYWORDS="-* ~amd64 ~amd64-fbsd"
-RESTRICT="bindist mirror"
-EMULTILIB_PKG="true"
-
-IUSE="acpi compat +driver gtk3 kernel_FreeBSD kernel_linux +kms multilib pax_kernel static-libs +tools uvm wayland +X"
-REQUIRED_USE="
- tools? ( X )
- static-libs? ( tools )
-"
-
-COMMON="
- app-eselect/eselect-opencl
- kernel_linux? ( >=sys-libs/glibc-2.6.1 )
- tools? (
- dev-libs/atk
- dev-libs/glib:2
- dev-libs/jansson
- gtk3? (
- x11-libs/gtk+:3
- )
- x11-libs/cairo
- x11-libs/gdk-pixbuf[X]
- x11-libs/gtk+:2
- x11-libs/libX11
- x11-libs/libXext
- x11-libs/libXrandr
- x11-libs/libXv
- x11-libs/libXxf86vm
- x11-libs/pango[X]
- )
- X? (
- >=app-eselect/eselect-opengl-1.0.9
- app-misc/pax-utils
- )
-"
-DEPEND="
- ${COMMON}
- kernel_linux? ( virtual/linux-sources )
- tools? ( sys-apps/dbus )
-"
-RDEPEND="
- ${COMMON}
- acpi? ( sys-power/acpid )
- tools? ( !media-video/nvidia-settings )
- wayland? ( dev-libs/wayland[${MULTILIB_USEDEP}] )
- X? (
- <x11-base/xorg-server-1.20.99:=
- >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
- >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
- >=x11-libs/libvdpau-1.0[${MULTILIB_USEDEP}]
- sys-libs/zlib[${MULTILIB_USEDEP}]
- )
-"
-QA_PREBUILT="opt/* usr/lib*"
-S=${WORKDIR}/
-
-nvidia_drivers_versions_check() {
- 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 20; then
- ewarn "Gentoo supports kernels which are supported by NVIDIA"
- ewarn "which are limited to the following kernels:"
- ewarn "<sys-kernel/gentoo-sources-4.20"
- ewarn "<sys-kernel/vanilla-sources-4.20"
- 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."
- ewarn ""
- fi
-
- # Since Nvidia ships many 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"
-
- # Now do the above checks
- use kernel_linux && check_extra_config
-}
-
-pkg_pretend() {
- nvidia_drivers_versions_check
-}
-
-pkg_setup() {
- nvidia_drivers_versions_check
-
- # 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 driver && 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) nvidia-drm(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
-
- if use kernel_linux && kernel_is lt 2 6 9; then
- eerror "You must build this against 2.6.9 or higher kernels."
- fi
-
- # set variables to where files are in the package structure
- if use kernel_FreeBSD; then
- 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() {
- 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."
- eapply "${FILESDIR}"/${PN}-375.20-pax.patch
- fi
-
- local man_file
- for man_file in "${NV_MAN}"/*1.gz; do
- gunzip $man_file || die
- done
-
- if use tools; then
- cp "${FILESDIR}"/nvidia-settings-linker.patch "${WORKDIR}" || die
- sed -i \
- -e "s:@PV@:${PV}:g" \
- "${WORKDIR}"/nvidia-settings-linker.patch || die
- eapply "${WORKDIR}"/nvidia-settings-linker.patch
- fi
-
- default
-
- if ! [ -f nvidia_icd.json ]; then
- cp nvidia_icd.json.template nvidia_icd.json || die
- sed -i -e 's:__NV_VK_ICD__:libGLX_nvidia.so.0:g' nvidia_icd.json || die
- 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 kernel_FreeBSD; then
- MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \
- LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die
- elif use driver && use kernel_linux; then
- MAKEOPTS=-j1 linux-mod_src_compile
- fi
-
- if use tools; then
- emake -C "${S}"/nvidia-settings-${PV}/src \
- AR="$(tc-getAR)" \
- CC="$(tc-getCC)" \
- DO_STRIP= \
- LD="$(tc-getCC)" \
- LIBDIR="$(get_libdir)" \
- NVLD="$(tc-getLD)" \
- NV_VERBOSE=1 \
- RANLIB="$(tc-getRANLIB)" \
- build-xnvctrl
-
- emake -C "${S}"/nvidia-settings-${PV}/src \
- CC="$(tc-getCC)" \
- DO_STRIP= \
- GTK3_AVAILABLE=$(usex gtk3 1 0) \
- LD="$(tc-getCC)" \
- LIBDIR="$(get_libdir)" \
- NVLD="$(tc-getLD)" \
- NVML_ENABLED=0 \
- NV_USE_BUNDLED_LIBJANSSON=0 \
- NV_VERBOSE=1
- 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
- nv_LIB="${1}"
-
- # SOVER to use
- nv_SOVER="$(scanelf -qF'%S#F' ${nv_LIB})"
-
- # Where to install
- nv_DEST="${2}"
-
- # Get just the library name
- nv_LIBNAME=$(basename "${nv_LIB}")
-
- if [[ "${nv_DEST}" ]]; then
- exeinto ${nv_DEST}
- action="doexe"
- else
- nv_DEST="/usr/$(get_libdir)"
- action="dolib.so"
- fi
-
- # Install the library
- ${action} ${nv_LIB} || die "failed to install ${nv_LIBNAME}"
-
- # If the library has a SONAME and SONAME does not match the library name,
- # then we need to create a symlink
- if [[ ${nv_SOVER} ]] && ! [[ "${nv_SOVER}" = "${nv_LIBNAME}" ]]; then
- dosym ${nv_LIBNAME} ${nv_DEST}/${nv_SOVER} \
- || die "failed to create ${nv_DEST}/${nv_SOVER} symlink"
- fi
-
- dosym ${nv_LIBNAME} ${nv_DEST}/${nv_LIBNAME/.so*/.so} \
- || die "failed to create ${nv_LIBNAME/.so*/.so} symlink"
-}
-
-src_install() {
- if use driver && 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
- doins "${FILESDIR}"/nvidia-rmmod.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}/libglxserver_nvidia.so.${NV_SOVER} \
- /usr/$(get_libdir)/xorg/modules/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
-
- insinto /usr/share/glvnd/egl_vendor.d
- doins ${NV_X11}/10_nvidia.json
- fi
-
- if use wayland; then
- insinto /usr/share/egl/egl_external_platform.d
- doins ${NV_X11}/10_nvidia_wayland.json
- fi
-
- # OpenCL ICD for NVIDIA
- if use kernel_linux; then
- insinto /etc/OpenCL/vendors
- doins ${NV_OBJ}/nvidia.icd
- fi
-
- # Documentation
- 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
- use X && doman "${NV_MAN}"/nvidia-xconfig.1
- use tools && doman "${NV_MAN}"/nvidia-settings.1
- doman "${NV_MAN}"/nvidia-cuda-mps-control.1
- fi
-
- docinto html
- dodoc -r ${NV_DOC}/html/*
-
- # Helper Apps
- exeinto /opt/bin/
-
- if use X; then
- doexe ${NV_OBJ}/nvidia-xconfig
-
- insinto /etc/vulkan/icd.d
- doins nvidia_icd.json
- 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
- doman nvidia-modprobe.1
- doman nvidia-persistenced.1
- 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
- emake -C "${S}"/nvidia-settings-${PV}/src/ \
- DESTDIR="${D}" \
- GTK3_AVAILABLE=$(usex gtk3 1 0) \
- LIBDIR="${D}/usr/$(get_libdir)" \
- NV_USE_BUNDLED_LIBJANSSON=0 \
- NV_VERBOSE=1 \
- PREFIX=/usr \
- DO_STRIP= \
- install
-
- if use static-libs; then
- dolib.a "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/libXNVCtrl.a
-
- insinto /usr/include/NVCtrl
- doins "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/*.h
- fi
-
- insinto /usr/share/nvidia/
- doins nvidia-application-profiles-${PV}-key-documentation
-
- insinto /etc/nvidia
- newins \
- nvidia-application-profiles-${PV}-rc nvidia-application-profiles-rc
-
- # There is no icon in the FreeBSD tarball.
- use kernel_FreeBSD || \
- doicon ${NV_OBJ}/nvidia-settings.png
-
- domenu "${FILESDIR}"/nvidia-settings.desktop
-
- exeinto /etc/X11/xinit/xinitrc.d
- newexe "${FILESDIR}"/95-nvidia-settings-r1 95-nvidia-settings
- fi
-
- dobin ${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 nv_libdir="${NV_OBJ}"
-
- if use kernel_linux && has_multilib_profile && [[ ${ABI} == "x86" ]]; then
- nv_libdir="${NV_OBJ}"/32
- fi
-
- if use X; then
- NV_GLX_LIBRARIES=(
- "libEGL.so.$(usex compat ${NV_SOVER} 1.1.0) ${GL_ROOT}"
- "libEGL_nvidia.so.${NV_SOVER} ${GL_ROOT}"
- "libGL.so.$(usex compat ${NV_SOVER} 1.7.0) ${GL_ROOT}"
- "libGLESv1_CM.so.1.2.0 ${GL_ROOT}"
- "libGLESv1_CM_nvidia.so.${NV_SOVER} ${GL_ROOT}"
- "libGLESv2.so.2.1.0 ${GL_ROOT}"
- "libGLESv2_nvidia.so.${NV_SOVER} ${GL_ROOT}"
- "libGLX.so.0 ${GL_ROOT}"
- "libGLX_nvidia.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-fatbinaryloader.so.${NV_SOVER}"
- "libnvidia-fbc.so.${NV_SOVER}"
- "libnvidia-glcore.so.${NV_SOVER}"
- "libnvidia-glsi.so.${NV_SOVER}"
- "libnvidia-glvkspirv.so.${NV_SOVER}"
- "libnvidia-ifr.so.${NV_SOVER}"
- "libnvidia-opencl.so.${NV_SOVER}"
- "libnvidia-ptxjitcompiler.so.${NV_SOVER}"
- "libvdpau_nvidia.so.${NV_SOVER}"
- )
-
- if use wayland && has_multilib_profile && [[ ${ABI} == "amd64" ]];
- then
- NV_GLX_LIBRARIES+=(
- "libnvidia-egl-wayland.so.1.1.0"
- )
- fi
-
- 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
-
- if use kernel_linux && has_multilib_profile && [[ ${ABI} == "amd64" ]];
- then
- NV_GLX_LIBRARIES+=(
- "libnvidia-cbl.so.${NV_SOVER}"
- "libnvidia-rtcore.so.${NV_SOVER}"
- "libnvoptix.so.${NV_SOVER}"
- )
- fi
-
- for NV_LIB in "${NV_GLX_LIBRARIES[@]}"; do
- donvidia "${nv_libdir}"/${NV_LIB}
- done
- fi
-}
-
-pkg_preinst() {
- if use driver && 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 driver && 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 driver && use kernel_linux && linux-mod_pkg_postrm
- use X && "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11
-}
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-415.13.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-415.13.ebuild
deleted file mode 100644
index c5f037b0ecf4..000000000000
--- a/x11-drivers/nvidia-drivers/nvidia-drivers-415.13.ebuild
+++ /dev/null
@@ -1,590 +0,0 @@
-# Copyright 1999-2018 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-inherit eutils flag-o-matic linux-info linux-mod multilib-minimal nvidia-driver \
- portability toolchain-funcs unpacker user udev
-
-DESCRIPTION="NVIDIA Accelerated Graphics Driver"
-HOMEPAGE="http://www.nvidia.com/ http://www.nvidia.com/Download/Find.aspx"
-
-AMD64_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86_64-${PV}"
-AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}"
-ARM_NV_PACKAGE="NVIDIA-Linux-armv7l-gnueabihf-${PV}"
-
-NV_URI="https://us.download.nvidia.com/XFree86/"
-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 )
- tools? (
- https://download.nvidia.com/XFree86/nvidia-settings/nvidia-settings-${PV}.tar.bz2
- )
-"
-
-LICENSE="GPL-2 NVIDIA-r2"
-SLOT="0/${PV%.*}"
-KEYWORDS="-* ~amd64 ~amd64-fbsd"
-RESTRICT="bindist mirror"
-EMULTILIB_PKG="true"
-
-IUSE="acpi compat +driver gtk3 kernel_FreeBSD kernel_linux +kms multilib pax_kernel static-libs +tools uvm wayland +X"
-REQUIRED_USE="
- tools? ( X )
- static-libs? ( tools )
-"
-
-COMMON="
- app-eselect/eselect-opencl
- kernel_linux? ( >=sys-libs/glibc-2.6.1 )
- tools? (
- dev-libs/atk
- dev-libs/glib:2
- dev-libs/jansson
- gtk3? (
- x11-libs/gtk+:3
- )
- x11-libs/cairo
- x11-libs/gdk-pixbuf[X]
- x11-libs/gtk+:2
- x11-libs/libX11
- x11-libs/libXext
- x11-libs/libXrandr
- x11-libs/libXv
- x11-libs/libXxf86vm
- x11-libs/pango[X]
- )
- X? (
- >=app-eselect/eselect-opengl-1.0.9
- app-misc/pax-utils
- )
-"
-DEPEND="
- ${COMMON}
- kernel_linux? ( virtual/linux-sources )
- tools? ( sys-apps/dbus )
-"
-RDEPEND="
- ${COMMON}
- acpi? ( sys-power/acpid )
- tools? ( !media-video/nvidia-settings )
- wayland? ( dev-libs/wayland[${MULTILIB_USEDEP}] )
- X? (
- <x11-base/xorg-server-1.20.99:=
- >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
- >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
- >=x11-libs/libvdpau-1.0[${MULTILIB_USEDEP}]
- sys-libs/zlib[${MULTILIB_USEDEP}]
- )
-"
-QA_PREBUILT="opt/* usr/lib*"
-S=${WORKDIR}/
-
-nvidia_drivers_versions_check() {
- 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 20; then
- ewarn "Gentoo supports kernels which are supported by NVIDIA"
- ewarn "which are limited to the following kernels:"
- ewarn "<sys-kernel/gentoo-sources-4.20"
- ewarn "<sys-kernel/vanilla-sources-4.20"
- 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."
- ewarn ""
- fi
-
- # Since Nvidia ships many 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"
-
- # Now do the above checks
- use kernel_linux && check_extra_config
-}
-
-pkg_pretend() {
- nvidia_drivers_versions_check
-}
-
-pkg_setup() {
- nvidia_drivers_versions_check
-
- # 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 driver && 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) nvidia-drm(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
-
- if use kernel_linux && kernel_is lt 2 6 9; then
- eerror "You must build this against 2.6.9 or higher kernels."
- fi
-
- # set variables to where files are in the package structure
- if use kernel_FreeBSD; then
- 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() {
- 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."
- eapply "${FILESDIR}"/${PN}-375.20-pax.patch
- fi
-
- local man_file
- for man_file in "${NV_MAN}"/*1.gz; do
- gunzip $man_file || die
- done
-
- if use tools; then
- cp "${FILESDIR}"/nvidia-settings-linker.patch "${WORKDIR}" || die
- sed -i \
- -e "s:@PV@:${PV}:g" \
- "${WORKDIR}"/nvidia-settings-linker.patch || die
- eapply "${WORKDIR}"/nvidia-settings-linker.patch
- fi
-
- default
-
- if ! [ -f nvidia_icd.json ]; then
- cp nvidia_icd.json.template nvidia_icd.json || die
- sed -i -e 's:__NV_VK_ICD__:libGLX_nvidia.so.0:g' nvidia_icd.json || die
- 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 kernel_FreeBSD; then
- MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \
- LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die
- elif use driver && use kernel_linux; then
- MAKEOPTS=-j1 linux-mod_src_compile
- fi
-
- if use tools; then
- emake -C "${S}"/nvidia-settings-${PV}/src \
- AR="$(tc-getAR)" \
- CC="$(tc-getCC)" \
- DO_STRIP= \
- LD="$(tc-getCC)" \
- LIBDIR="$(get_libdir)" \
- NVLD="$(tc-getLD)" \
- NV_VERBOSE=1 \
- RANLIB="$(tc-getRANLIB)" \
- build-xnvctrl
-
- emake -C "${S}"/nvidia-settings-${PV}/src \
- CC="$(tc-getCC)" \
- DO_STRIP= \
- GTK3_AVAILABLE=$(usex gtk3 1 0) \
- LD="$(tc-getCC)" \
- LIBDIR="$(get_libdir)" \
- NVLD="$(tc-getLD)" \
- NVML_ENABLED=0 \
- NV_USE_BUNDLED_LIBJANSSON=0 \
- NV_VERBOSE=1
- 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
- nv_LIB="${1}"
-
- # SOVER to use
- nv_SOVER="$(scanelf -qF'%S#F' ${nv_LIB})"
-
- # Where to install
- nv_DEST="${2}"
-
- # Get just the library name
- nv_LIBNAME=$(basename "${nv_LIB}")
-
- if [[ "${nv_DEST}" ]]; then
- exeinto ${nv_DEST}
- action="doexe"
- else
- nv_DEST="/usr/$(get_libdir)"
- action="dolib.so"
- fi
-
- # Install the library
- ${action} ${nv_LIB} || die "failed to install ${nv_LIBNAME}"
-
- # If the library has a SONAME and SONAME does not match the library name,
- # then we need to create a symlink
- if [[ ${nv_SOVER} ]] && ! [[ "${nv_SOVER}" = "${nv_LIBNAME}" ]]; then
- dosym ${nv_LIBNAME} ${nv_DEST}/${nv_SOVER} \
- || die "failed to create ${nv_DEST}/${nv_SOVER} symlink"
- fi
-
- dosym ${nv_LIBNAME} ${nv_DEST}/${nv_LIBNAME/.so*/.so} \
- || die "failed to create ${nv_LIBNAME/.so*/.so} symlink"
-}
-
-src_install() {
- if use driver && 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
- doins "${FILESDIR}"/nvidia-rmmod.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}/libglxserver_nvidia.so.${NV_SOVER} \
- /usr/$(get_libdir)/xorg/modules/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
-
- insinto /usr/share/glvnd/egl_vendor.d
- doins ${NV_X11}/10_nvidia.json
- fi
-
- if use wayland; then
- insinto /usr/share/egl/egl_external_platform.d
- doins ${NV_X11}/10_nvidia_wayland.json
- fi
-
- # OpenCL ICD for NVIDIA
- if use kernel_linux; then
- insinto /etc/OpenCL/vendors
- doins ${NV_OBJ}/nvidia.icd
- fi
-
- # Documentation
- 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
- use X && doman "${NV_MAN}"/nvidia-xconfig.1
- use tools && doman "${NV_MAN}"/nvidia-settings.1
- doman "${NV_MAN}"/nvidia-cuda-mps-control.1
- fi
-
- docinto html
- dodoc -r ${NV_DOC}/html/*
-
- # Helper Apps
- exeinto /opt/bin/
-
- if use X; then
- doexe ${NV_OBJ}/nvidia-xconfig
-
- insinto /etc/vulkan/icd.d
- doins nvidia_icd.json
- 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
- doman nvidia-modprobe.1
- doman nvidia-persistenced.1
- 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
- emake -C "${S}"/nvidia-settings-${PV}/src/ \
- DESTDIR="${D}" \
- GTK3_AVAILABLE=$(usex gtk3 1 0) \
- LIBDIR="${D}/usr/$(get_libdir)" \
- NV_USE_BUNDLED_LIBJANSSON=0 \
- NV_VERBOSE=1 \
- PREFIX=/usr \
- DO_STRIP= \
- install
-
- if use static-libs; then
- dolib.a "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/libXNVCtrl.a
-
- insinto /usr/include/NVCtrl
- doins "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/*.h
- fi
-
- insinto /usr/share/nvidia/
- doins nvidia-application-profiles-${PV}-key-documentation
-
- insinto /etc/nvidia
- newins \
- nvidia-application-profiles-${PV}-rc nvidia-application-profiles-rc
-
- # There is no icon in the FreeBSD tarball.
- use kernel_FreeBSD || \
- doicon ${NV_OBJ}/nvidia-settings.png
-
- domenu "${FILESDIR}"/nvidia-settings.desktop
-
- exeinto /etc/X11/xinit/xinitrc.d
- newexe "${FILESDIR}"/95-nvidia-settings-r1 95-nvidia-settings
- fi
-
- dobin ${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 nv_libdir="${NV_OBJ}"
-
- if use kernel_linux && has_multilib_profile && [[ ${ABI} == "x86" ]]; then
- nv_libdir="${NV_OBJ}"/32
- fi
-
- if use X; then
- NV_GLX_LIBRARIES=(
- "libEGL.so.$(usex compat ${NV_SOVER} 1.1.0) ${GL_ROOT}"
- "libEGL_nvidia.so.${NV_SOVER} ${GL_ROOT}"
- "libGL.so.$(usex compat ${NV_SOVER} 1.7.0) ${GL_ROOT}"
- "libGLESv1_CM.so.1.2.0 ${GL_ROOT}"
- "libGLESv1_CM_nvidia.so.${NV_SOVER} ${GL_ROOT}"
- "libGLESv2.so.2.1.0 ${GL_ROOT}"
- "libGLESv2_nvidia.so.${NV_SOVER} ${GL_ROOT}"
- "libGLX.so.0 ${GL_ROOT}"
- "libGLX_nvidia.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-fatbinaryloader.so.${NV_SOVER}"
- "libnvidia-fbc.so.${NV_SOVER}"
- "libnvidia-glcore.so.${NV_SOVER}"
- "libnvidia-glsi.so.${NV_SOVER}"
- "libnvidia-glvkspirv.so.${NV_SOVER}"
- "libnvidia-ifr.so.${NV_SOVER}"
- "libnvidia-opencl.so.${NV_SOVER}"
- "libnvidia-ptxjitcompiler.so.${NV_SOVER}"
- "libvdpau_nvidia.so.${NV_SOVER}"
- )
-
- if use wayland && has_multilib_profile && [[ ${ABI} == "amd64" ]];
- then
- NV_GLX_LIBRARIES+=(
- "libnvidia-egl-wayland.so.1.1.0"
- )
- fi
-
- 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}"
- "libnvidia-tls.so.${NV_SOVER}"
- )
- fi
-
- if use kernel_linux && has_multilib_profile && [[ ${ABI} == "amd64" ]];
- then
- NV_GLX_LIBRARIES+=(
- "libnvidia-cbl.so.${NV_SOVER}"
- "libnvidia-rtcore.so.${NV_SOVER}"
- "libnvoptix.so.${NV_SOVER}"
- )
- fi
-
- for NV_LIB in "${NV_GLX_LIBRARIES[@]}"; do
- donvidia "${nv_libdir}"/${NV_LIB}
- done
- fi
-}
-
-pkg_preinst() {
- if use driver && 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 driver && 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 driver && use kernel_linux && linux-mod_pkg_postrm
- use X && "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11
-}