Gentoo Archives: gentoo-commits

From: Jeroen Roovers <jer@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: x11-drivers/nvidia-drivers/
Date: Tue, 27 Nov 2018 21:54:40
Message-Id: 1543355672.e37ade9ed9452f5131d1262d3d789e8041ebd315.jer@gentoo
1 commit: e37ade9ed9452f5131d1262d3d789e8041ebd315
2 Author: Jeroen Roovers <jer <AT> gentoo <DOT> org>
3 AuthorDate: Tue Nov 27 21:54:05 2018 +0000
4 Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org>
5 CommitDate: Tue Nov 27 21:54:32 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e37ade9e
7
8 x11-drivers/nvidia-drivers: Old
9
10 Package-Manager: Portage-2.3.52, Repoman-2.3.12
11 Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>
12
13 x11-drivers/nvidia-drivers/Manifest | 9 -
14 .../nvidia-drivers/nvidia-drivers-410.66.ebuild | 590 ---------------------
15 .../nvidia-drivers/nvidia-drivers-410.73.ebuild | 590 ---------------------
16 .../nvidia-drivers/nvidia-drivers-415.13.ebuild | 590 ---------------------
17 4 files changed, 1779 deletions(-)
18
19 diff --git a/x11-drivers/nvidia-drivers/Manifest b/x11-drivers/nvidia-drivers/Manifest
20 index 87a6f7b0a4a..723dd54313c 100644
21 --- a/x11-drivers/nvidia-drivers/Manifest
22 +++ b/x11-drivers/nvidia-drivers/Manifest
23 @@ -15,10 +15,7 @@ DIST NVIDIA-FreeBSD-x86_64-384.130.tar.gz 62901704 BLAKE2B 50be9af398f88caa012a7
24 DIST NVIDIA-FreeBSD-x86_64-387.34.tar.gz 63387097 BLAKE2B 53689ba098b4a4de08dca056618ea533c92d17137ec954dea0ae71e1b2c825c021979871e4ff82c820be0a78d3c365f282b760940ebe2caa1ca5bfd2453e178e SHA512 0a905ee72ee6f4e9c941e5dd1f7cddf96bfb20c6da32fd05599258e1bb154f68463d775ba8ff4f67f0d4b8e637e9ed9624fc9a4873a1f2621dc86732f0d6d70d
25 DIST NVIDIA-FreeBSD-x86_64-390.87.tar.gz 63648591 BLAKE2B 88aa38b11b64b2ad91f723ec84a2adb6829571136aabb1441a9119418395d5f143736487902f0c60b49ebc1284f3100fbd089e4c941cdd3519ab8511cc1d3261 SHA512 0865fef8b8a3be8f6d9fc81908b162fd6062ba0ea81fd00200e7b2a1e3149ef62408b46bc4ccb7a77f1ac943557a22b13a10cfdde084f0b76cf2b23432e57540
26 DIST NVIDIA-FreeBSD-x86_64-396.54.tar.gz 60938322 BLAKE2B a23488b625a15703b0c40bc6871314b05d117d489f64a6f7c70ac3c934b02028b9623be10f0369c98c7d3b5e018e1eb6f1d2cde9d9e1b90be5065f06f6a646dd SHA512 52df85364bfd45a23394078855859ce85de996f7990bb96ba63eb33e516c3cf8e72c4391af9817213f735286f2cf6444bc8ed00312365f12ae17373cfbdc3fc7
27 -DIST NVIDIA-FreeBSD-x86_64-410.66.tar.gz 61916683 BLAKE2B 835e40820339ce333a92b757087a09d8340cf957fa42257cbde1337b00c3156bb5ef23ba7c727b94146883c93e6a55a20ae5db4017d28f79d7d58b17d3b372d5 SHA512 c17d999c1f971ec597a6c52067f97f5395c5ca745d8db4b8c8f4d8519bf244b083b2ab0ac65f1bcf8b1525d18f1fb297092231edf7a7bb175befaaaf51601c06
28 -DIST NVIDIA-FreeBSD-x86_64-410.73.tar.gz 61931692 BLAKE2B 6746f4980a13f5e62816a0ad443a96151fe2053aa6df3184a4c36040a77a52673248474f5025707af1b36d3f3e90b30964f44f251ec804d965792c454b6cd0ca SHA512 3a9aed0996ab1a6cad935ddac669c06d79a82013fbc2297945d8c75fde1a05c9b97d785f230092dc7d931b81f668c8427980f4563ca46d3648b568ad023cf23e
29 DIST NVIDIA-FreeBSD-x86_64-410.78.tar.gz 61935486 BLAKE2B 3bc85aacd0775b600c37cd285de49fe3d35bba04fd8d3db1ec75f1fdfbd93a9d5b3d34b67e6fd82b5056bff875ccbc44cd2f06fed9b66703b26057c85f750867 SHA512 30488f9e5e6a377a478c49f13d648fba77ac910f43c3e561ce7715380480ac8b3860fecfb5b745beefadb6abe0b4c4135684c468a69c5b71b56cd463698b931a
30 -DIST NVIDIA-FreeBSD-x86_64-415.13.tar.gz 62315397 BLAKE2B e785748eb5a981e041f5997bb91d492792a34884a3190d1340841d27296a7a9218b86a2bcb6cdcd5a24ba5da885e6f83d1f0e9b6e4234c43bae7c68f085d7b4f SHA512 1019b8baf8ae6b8f1e2f74d00dfd98ed4a7c504ba15d74a38eb937a5490889cf96e62774fe591653f5e988762462d09fc95adde9c2a7e74254815e306a49be2d
31 DIST NVIDIA-FreeBSD-x86_64-415.18.tar.gz 62328268 BLAKE2B 03b53907ba8eed8751b9270e472b05f21e3865a560a7c4b89b16df0d1981f8ee955d26f42ab51ff538898218caa32745ece0cfa562b8325ad29f866205ab0a68 SHA512 9a80f6e15f57d756f0286db5cbb1c520f6c7553368cdc26d9f062e1f5cd1c6080bf3934b3fd55cdc0b67702be8188dcd177f7aec80697ff978ebc90a6dccbb30
32 DIST NVIDIA-Linux-armv7l-gnueabihf-375.82.run 26650801 BLAKE2B 31446667065c56b48f6a3e737afe29a4517459d3462138136bffe383bc6fe514d6e80b49c391c27edc96b8abc3da3dd4d6ee3f3dca17f3c9a0f1cdf0e72cf099 SHA512 28554f1c24fe63c9257c0de3e84e4e739a45bf1c20ec7a53bc2c1b69b4e2355675061491ef5b03f3ae489cf623e553cfa68442f5536f137837327036d1c53d63
33 DIST NVIDIA-Linux-armv7l-gnueabihf-378.13.run 26514235 BLAKE2B 2b3c540704496a290be7ae3f1ff378487c75af2298c12488da8b3a1814446e5df02a1ed99afd8ee7fc459d950aab472155359eae0bf56ac83389711d70638152 SHA512 253786a821df85fa926ae842114321b3c70502f887ea7c2b6790dfe3836039ee5d390e6722ca8785904ec6487e465916923d3042dc6191b3b4522c3161b80cb0
34 @@ -43,10 +40,7 @@ DIST NVIDIA-Linux-x86_64-384.130.run 82260837 BLAKE2B 55b6f3627680c881821f5d20f0
35 DIST NVIDIA-Linux-x86_64-387.34.run 82784271 BLAKE2B b7140d5d6a693892df50b3ad2e20387673dec6b5ac609cc0300bdc4b4a93ca94849255699126e4d55e67f10e488bfe6008e987197ea239b1a1b643b4ae5c7808 SHA512 6742768f1258a028c9ba56ad1d72f27d7eea4b6bfd324ba29c7f057ab5819816bd728aeaf2a8058031dadcd4c51bc6d08f0e0e0e26c68ed57955e90d68ac5a4b
36 DIST NVIDIA-Linux-x86_64-390.87.run 82690871 BLAKE2B b43a45a7d48160a72185417360a4ff4238922f6d77c7b58c0562f0e01c8aa33e89057e8a5d354e8d3c8e6fa86acf8908a6c2eab81e06158a92908eec18a9b02e SHA512 f4883744f5e07150677918669eed03c7b87774f752112aabd52d903a09ae16351b34105075da2ff0fcb7a847cf66ec17e9797826859fcaecc44fdcd464a61805
37 DIST NVIDIA-Linux-x86_64-396.54.run 86946680 BLAKE2B 9b3ab39c9d09c663238d0fac6346c24feea6ecc44b0ecaf3de871522697685c1c474ec4cc83f3bab0a2bcfecc7c77acea0e6bfee6e8ca8e6883bd338fd6da8a2 SHA512 17139abe99d4f32ec87379ee57af2cc0fec7d24605b2be7e3cd6609d9fcdf871e3c1cb7414b3544e14eb32d2213fec7ac45b3261f27c8d6565d510ccb14a1247
38 -DIST NVIDIA-Linux-x86_64-410.66.run 107130897 BLAKE2B 1f294dd1b248fede6c8a418ffadd3035a9d1c516b9b52a04dc2366fa7dab63993bd2d7d111c0bbc4cc12411bbb219fb504dec1e82e1bfb72a25e719917b32147 SHA512 1773ea5150822735cf02808df68cd2f9ff8b502633632a7748b4bff387daec44527f1bfb0508938c9eee7fb12ac070b99b3f5a903e592bf6d9c6461f4f7a7e9e
39 -DIST NVIDIA-Linux-x86_64-410.73.run 107004565 BLAKE2B c55655aefc410883b4b2c63305e3a9fc66ce2b611cd79fe8fe3225fec49a31ed73707fa4a6e1998fa19e7d13b859af0b5a5bb76f37109fbd9e39e0aa36afbac2 SHA512 2dca98babb4b2ce319089b179619444e1ef9b4b94c0d1981982c35a234f9e6934febe3ec3ca39cf1b3672a126b4290b1bc54469a0617b7fdebb4871cc4c75bac
40 DIST NVIDIA-Linux-x86_64-410.78.run 107944209 BLAKE2B f493efb4b61716ae1f7ac760d57b330e0160e8cd7a90e80dd00744c2277d0c8024f6704eac3a9f95ff13d66f362bf9eecdc8176edb429ea7e45c4622b52beca7 SHA512 0bd7ed61dcfd4d7634ba450b106d7648fc274c256e7e4c4e51e544bd7779d68ffa08cba709ace5333679eeea1dbe4afa0c267361887eaa784d6f1369b717677d
41 -DIST NVIDIA-Linux-x86_64-415.13.run 109005596 BLAKE2B 8e6c7f34f2d7d861a3d5727cffc8e4094359be734ab0636de84f205ab1229f0a25954d62b5600ddd8f93511091624832cc7aa9074f40ca98b34a0071580a1a09 SHA512 4115fe24d615694e3bc7644d8d648ed6be266c69c6ffc92b65c65b9a0b0c8fb9c672d74cd46e9f9be2467464310c55a29f0bd155163bfc760e0e8b39db9598b7
42 DIST NVIDIA-Linux-x86_64-415.18.run 107849060 BLAKE2B e4ffbec6a31f79d8c7f18bfbb4e256b94ef8e741526eb07032fd645da1b37751e867d72e998f6b8b773d55127e40bafeb53e8d5f9a4f8be4ce8a8d079e9c3341 SHA512 8e56b5a62f47b4bbe2b0c59e05e2b1a4beb204252aa2000e6dfc257a16f06d00862232d2a3f404192e47b73c3af9f6d6c92e3d530b977a6ecbe3f2d944a12f7e
43 DIST nvidia-settings-304.137.tar.bz2 1481361 BLAKE2B cf52a55a34eeb03a685a683487af6a198ba467dd8ba9983cc75624a37a226373cd931d98e8448b7b8ed430c54be2118c7b240ed2a9100b19bec5e832e2f6cdad SHA512 676d1f70c9a78ee234f5f1a283412430a386fa604de211afba02806a45906c5e246a002989b724d74752178d28c92a268de1c98d4c87876797d991253f16b0cc
44 DIST nvidia-settings-340.107.tar.bz2 1549413 BLAKE2B 127442ee2c35ceec47ab4f103bdd2d0278c621fcb9be47051111f6f8728ef5699bdc95fe33a3812a807c38c4868b04c2176e2ed218a422171d2a88ac0c00de96 SHA512 593e7e83aa350a3a7beaaa32aca8660d7e203f6f2e460a6e6eabcdc092087f9917ee4e6d141e37ad4e3b0a1b9908c085e4a71d2f579e481a03bbd1c6f75ca776
45 @@ -57,8 +51,5 @@ DIST nvidia-settings-384.130.tar.bz2 1633217 BLAKE2B ffc1381e680e94aee95752074c3
46 DIST nvidia-settings-387.34.tar.gz 1267616 BLAKE2B 62d2fd329417f54bf384918889603921065e0ef6d4fb691e914534a75ab0062a17d8f886c593cf772d29bb6b56ce30aaf7b1548191b2f9ad5fbee71770ed5308 SHA512 559c859c0740575ab93edce013587250b98d7d2cd55198b5103fe97423d31ed9f113d83c240c402404de88074c285a07e46342538610d3d5dade7bed59d60090
47 DIST nvidia-settings-390.87.tar.bz2 1109274 BLAKE2B 20eb809ceeade932e89592ac91071e6d3311f4a075812225d68342806b7ab1f9f8ed0399ea7a47241b7974311794852fd932fd8e824065589de6c124a3c81ef3 SHA512 cafdf2bfefac187409dfcffd593ff23eaba5ab7ab8dd85a9f14a4b6a47ffb3649af770bd2615887af9d30de3ef8fedaad7afc2ebe9f60a8ba7355a9004702959
48 DIST nvidia-settings-396.54.tar.bz2 1116371 BLAKE2B 114b88f393b0909c8d84a56a280854e258d0e7e7ce800ee58547ef68b4989f22a3bbb380795472b8222493a988dc9308fc20ef03c81589448b518a12285cf204 SHA512 23dc3c61bef71200b3e8185940dd52a50dae7ca7f2b8a68fa96eaa937aabc87ded5d5f73081af51d1e7af2b78b0ec10ab80d28dadbcf10a046c32ec14db1d83c
49 -DIST nvidia-settings-410.66.tar.bz2 1115615 BLAKE2B e9e608978849a9b3106745c80ddd85270406e1c1fd6c5353a19e54877a5b3e8aa3f169c06c669a2278a40f64e2cc27930565c02ff2d40250030933b05ecdb962 SHA512 90e4716622d9eabdc32b707fb139390f228db0d60b55bc5d1e3e15ead64ee47a49fd15e47301a85f1ea7dbfb5ae877e03d4b48c88e47db08f3c3ebd280abe989
50 -DIST nvidia-settings-410.73.tar.bz2 1115717 BLAKE2B 7a6ea49cfc378ba7c91c89be51d0761cf2b5a9e872de2169f59e236d75669e86b29719d0479c26d6194ffecef7f8a57e7a18f33efc9356b44299d99c683ccbaf SHA512 b8b95c8a03242b1793fb5694330d57446e06a2c2eeaae4100d2366a48336941b03a51f426648f78fe3b59f858f4261018f7cdd9d28d2bce352187f74b4d1730b
51 DIST nvidia-settings-410.78.tar.bz2 1115872 BLAKE2B 68471e3c3700c68c1082bd7ca349a791a8b7c9524f71882d78791a11ac4ecaa28d40cdd32baea20354732b4ee8e47767ae8c12d534f95a96494da5787869b4c1 SHA512 28aae1cbec6004d4f532aac2a728d66384440525c3f35f1bf5b7221c4722ccd02be119d44b261204c0f0c116d5455eca7555d10cab3f6d4184a39255750ccf97
52 -DIST nvidia-settings-415.13.tar.bz2 1121852 BLAKE2B eeb35a93a7b2931d7e8db2598c03e7214e78c1b94738ff62ba162a63b94ba0bc67e91e968d6e0b66dd68e72f039d5cd3f353c582d45755b7eae43b7654a97fe2 SHA512 e0ab330a1e96dc2ebf27b929d5d09a35a214981e867582718a55a6d0b04fb6b6b6cf339fda0426ec09b3161098597decc07353bc1bf93a890e65569395d3c12e
53 DIST nvidia-settings-415.18.tar.bz2 1121712 BLAKE2B d8e8c16e5d1fb41c77a90e4226c79c00ae07f329f4d6d15be3de7b9f3ab1d8ab09dba32295ffbb77b851f9a51cd11e560b0104f2ece52d1af6f7208602b9f5b4 SHA512 d38e32916cf711bda4b9a1a772b5711af1f0c929d28a9818f4c4dfb761d5c1cf33907794b74d4748122211ade08f63f3feacf0976890c59a9d694c850118ff48
54
55 diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-410.66.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-410.66.ebuild
56 deleted file mode 100644
57 index 85680a2e782..00000000000
58 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-410.66.ebuild
59 +++ /dev/null
60 @@ -1,590 +0,0 @@
61 -# Copyright 1999-2018 Gentoo Authors
62 -# Distributed under the terms of the GNU General Public License v2
63 -
64 -EAPI=6
65 -inherit eutils flag-o-matic linux-info linux-mod multilib-minimal nvidia-driver \
66 - portability toolchain-funcs unpacker user udev
67 -
68 -DESCRIPTION="NVIDIA Accelerated Graphics Driver"
69 -HOMEPAGE="http://www.nvidia.com/ http://www.nvidia.com/Download/Find.aspx"
70 -
71 -AMD64_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86_64-${PV}"
72 -AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}"
73 -ARM_NV_PACKAGE="NVIDIA-Linux-armv7l-gnueabihf-${PV}"
74 -
75 -NV_URI="https://us.download.nvidia.com/XFree86/"
76 -SRC_URI="
77 - amd64-fbsd? ( ${NV_URI}FreeBSD-x86_64/${PV}/${AMD64_FBSD_NV_PACKAGE}.tar.gz )
78 - amd64? ( ${NV_URI}Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run )
79 - tools? (
80 - https://download.nvidia.com/XFree86/nvidia-settings/nvidia-settings-${PV}.tar.bz2
81 - )
82 -"
83 -
84 -LICENSE="GPL-2 NVIDIA-r2"
85 -SLOT="0/${PV%.*}"
86 -KEYWORDS="-* ~amd64 ~amd64-fbsd"
87 -RESTRICT="bindist mirror"
88 -EMULTILIB_PKG="true"
89 -
90 -IUSE="acpi compat +driver gtk3 kernel_FreeBSD kernel_linux +kms multilib pax_kernel static-libs +tools uvm wayland +X"
91 -REQUIRED_USE="
92 - tools? ( X )
93 - static-libs? ( tools )
94 -"
95 -
96 -COMMON="
97 - app-eselect/eselect-opencl
98 - kernel_linux? ( >=sys-libs/glibc-2.6.1 )
99 - tools? (
100 - dev-libs/atk
101 - dev-libs/glib:2
102 - dev-libs/jansson
103 - gtk3? (
104 - x11-libs/gtk+:3
105 - )
106 - x11-libs/cairo
107 - x11-libs/gdk-pixbuf[X]
108 - x11-libs/gtk+:2
109 - x11-libs/libX11
110 - x11-libs/libXext
111 - x11-libs/libXrandr
112 - x11-libs/libXv
113 - x11-libs/libXxf86vm
114 - x11-libs/pango[X]
115 - )
116 - X? (
117 - >=app-eselect/eselect-opengl-1.0.9
118 - app-misc/pax-utils
119 - )
120 -"
121 -DEPEND="
122 - ${COMMON}
123 - kernel_linux? ( virtual/linux-sources )
124 - tools? ( sys-apps/dbus )
125 -"
126 -RDEPEND="
127 - ${COMMON}
128 - acpi? ( sys-power/acpid )
129 - tools? ( !media-video/nvidia-settings )
130 - wayland? ( dev-libs/wayland[${MULTILIB_USEDEP}] )
131 - X? (
132 - <x11-base/xorg-server-1.20.99:=
133 - >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
134 - >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
135 - >=x11-libs/libvdpau-1.0[${MULTILIB_USEDEP}]
136 - sys-libs/zlib[${MULTILIB_USEDEP}]
137 - )
138 -"
139 -QA_PREBUILT="opt/* usr/lib*"
140 -S=${WORKDIR}/
141 -
142 -nvidia_drivers_versions_check() {
143 - if use amd64 && has_multilib_profile && \
144 - [ "${DEFAULT_ABI}" != "amd64" ]; then
145 - eerror "This ebuild doesn't currently support changing your default ABI"
146 - die "Unexpected \${DEFAULT_ABI} = ${DEFAULT_ABI}"
147 - fi
148 -
149 - if use kernel_linux && kernel_is ge 4 19; then
150 - ewarn "Gentoo supports kernels which are supported by NVIDIA"
151 - ewarn "which are limited to the following kernels:"
152 - ewarn "<sys-kernel/gentoo-sources-4.19"
153 - ewarn "<sys-kernel/vanilla-sources-4.19"
154 - ewarn ""
155 - ewarn "You are free to utilize epatch_user to provide whatever"
156 - ewarn "support you feel is appropriate, but will not receive"
157 - ewarn "support as a result of those changes."
158 - ewarn ""
159 - ewarn "Do not file a bug report about this."
160 - ewarn ""
161 - fi
162 -
163 - # Since Nvidia ships many different series of drivers, we need to give the user
164 - # some kind of guidance as to what version they should install. This tries
165 - # to point the user in the right direction but can't be perfect. check
166 - # nvidia-driver.eclass
167 - nvidia-driver-check-warning
168 -
169 - # Kernel features/options to check for
170 - CONFIG_CHECK="~ZONE_DMA ~MTRR ~SYSVIPC ~!LOCKDEP"
171 -
172 - # Now do the above checks
173 - use kernel_linux && check_extra_config
174 -}
175 -
176 -pkg_pretend() {
177 - nvidia_drivers_versions_check
178 -}
179 -
180 -pkg_setup() {
181 - nvidia_drivers_versions_check
182 -
183 - # try to turn off distcc and ccache for people that have a problem with it
184 - export DISTCC_DISABLE=1
185 - export CCACHE_DISABLE=1
186 -
187 - if use driver && use kernel_linux; then
188 - MODULE_NAMES="nvidia(video:${S}/kernel)"
189 - use uvm && MODULE_NAMES+=" nvidia-uvm(video:${S}/kernel)"
190 - use kms && MODULE_NAMES+=" nvidia-modeset(video:${S}/kernel) nvidia-drm(video:${S}/kernel)"
191 -
192 - # This needs to run after MODULE_NAMES (so that the eclass checks
193 - # whether the kernel supports loadable modules) but before BUILD_PARAMS
194 - # is set (so that KV_DIR is populated).
195 - linux-mod_pkg_setup
196 -
197 - BUILD_PARAMS="IGNORE_CC_MISMATCH=yes V=1 SYSSRC=${KV_DIR} \
198 - SYSOUT=${KV_OUT_DIR} CC=$(tc-getBUILD_CC) NV_VERBOSE=1"
199 -
200 - # linux-mod_src_compile calls set_arch_to_kernel, which
201 - # sets the ARCH to x86 but NVIDIA's wrapping Makefile
202 - # expects x86_64 or i386 and then converts it to x86
203 - # later on in the build process
204 - BUILD_FIXES="ARCH=$(uname -m | sed -e 's/i.86/i386/')"
205 - fi
206 -
207 - if use kernel_linux && kernel_is lt 2 6 9; then
208 - eerror "You must build this against 2.6.9 or higher kernels."
209 - fi
210 -
211 - # set variables to where files are in the package structure
212 - if use kernel_FreeBSD; then
213 - use amd64-fbsd && S="${WORKDIR}/${AMD64_FBSD_NV_PACKAGE}"
214 - NV_DOC="${S}/doc"
215 - NV_OBJ="${S}/obj"
216 - NV_SRC="${S}/src"
217 - NV_MAN="${S}/x11/man"
218 - NV_X11="${S}/obj"
219 - NV_SOVER=1
220 - elif use kernel_linux; then
221 - NV_DOC="${S}"
222 - NV_OBJ="${S}"
223 - NV_SRC="${S}/kernel"
224 - NV_MAN="${S}"
225 - NV_X11="${S}"
226 - NV_SOVER=${PV}
227 - else
228 - die "Could not determine proper NVIDIA package"
229 - fi
230 -}
231 -
232 -src_prepare() {
233 - if use pax_kernel; then
234 - ewarn "Using PAX patches is not supported. You will be asked to"
235 - ewarn "use a standard kernel should you have issues. Should you"
236 - ewarn "need support with these patches, contact the PaX team."
237 - eapply "${FILESDIR}"/${PN}-375.20-pax.patch
238 - fi
239 -
240 - local man_file
241 - for man_file in "${NV_MAN}"/*1.gz; do
242 - gunzip $man_file || die
243 - done
244 -
245 - if use tools; then
246 - cp "${FILESDIR}"/nvidia-settings-linker.patch "${WORKDIR}" || die
247 - sed -i \
248 - -e "s:@PV@:${PV}:g" \
249 - "${WORKDIR}"/nvidia-settings-linker.patch || die
250 - eapply "${WORKDIR}"/nvidia-settings-linker.patch
251 - fi
252 -
253 - default
254 -
255 - if ! [ -f nvidia_icd.json ]; then
256 - cp nvidia_icd.json.template nvidia_icd.json || die
257 - sed -i -e 's:__NV_VK_ICD__:libGLX_nvidia.so.0:g' nvidia_icd.json || die
258 - fi
259 -}
260 -
261 -src_compile() {
262 - # This is already the default on Linux, as there's no toplevel Makefile, but
263 - # on FreeBSD there's one and triggers the kernel module build, as we install
264 - # it by itself, pass this.
265 -
266 - cd "${NV_SRC}"
267 - if use kernel_FreeBSD; then
268 - MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \
269 - LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die
270 - elif use driver && use kernel_linux; then
271 - MAKEOPTS=-j1 linux-mod_src_compile
272 - fi
273 -
274 - if use tools; then
275 - emake -C "${S}"/nvidia-settings-${PV}/src \
276 - AR="$(tc-getAR)" \
277 - CC="$(tc-getCC)" \
278 - DO_STRIP= \
279 - LD="$(tc-getCC)" \
280 - LIBDIR="$(get_libdir)" \
281 - NVLD="$(tc-getLD)" \
282 - NV_VERBOSE=1 \
283 - RANLIB="$(tc-getRANLIB)" \
284 - build-xnvctrl
285 -
286 - emake -C "${S}"/nvidia-settings-${PV}/src \
287 - CC="$(tc-getCC)" \
288 - DO_STRIP= \
289 - GTK3_AVAILABLE=$(usex gtk3 1 0) \
290 - LD="$(tc-getCC)" \
291 - LIBDIR="$(get_libdir)" \
292 - NVLD="$(tc-getLD)" \
293 - NVML_ENABLED=0 \
294 - NV_USE_BUNDLED_LIBJANSSON=0 \
295 - NV_VERBOSE=1
296 - fi
297 -}
298 -
299 -# Install nvidia library:
300 -# the first parameter is the library to install
301 -# the second parameter is the provided soversion
302 -# the third parameter is the target directory if it is not /usr/lib
303 -donvidia() {
304 - # Full path to library
305 - nv_LIB="${1}"
306 -
307 - # SOVER to use
308 - nv_SOVER="$(scanelf -qF'%S#F' ${nv_LIB})"
309 -
310 - # Where to install
311 - nv_DEST="${2}"
312 -
313 - # Get just the library name
314 - nv_LIBNAME=$(basename "${nv_LIB}")
315 -
316 - if [[ "${nv_DEST}" ]]; then
317 - exeinto ${nv_DEST}
318 - action="doexe"
319 - else
320 - nv_DEST="/usr/$(get_libdir)"
321 - action="dolib.so"
322 - fi
323 -
324 - # Install the library
325 - ${action} ${nv_LIB} || die "failed to install ${nv_LIBNAME}"
326 -
327 - # If the library has a SONAME and SONAME does not match the library name,
328 - # then we need to create a symlink
329 - if [[ ${nv_SOVER} ]] && ! [[ "${nv_SOVER}" = "${nv_LIBNAME}" ]]; then
330 - dosym ${nv_LIBNAME} ${nv_DEST}/${nv_SOVER} \
331 - || die "failed to create ${nv_DEST}/${nv_SOVER} symlink"
332 - fi
333 -
334 - dosym ${nv_LIBNAME} ${nv_DEST}/${nv_LIBNAME/.so*/.so} \
335 - || die "failed to create ${nv_LIBNAME/.so*/.so} symlink"
336 -}
337 -
338 -src_install() {
339 - if use driver && use kernel_linux; then
340 - linux-mod_src_install
341 -
342 - # Add the aliases
343 - # This file is tweaked with the appropriate video group in
344 - # pkg_preinst, see bug #491414
345 - insinto /etc/modprobe.d
346 - newins "${FILESDIR}"/nvidia-169.07 nvidia.conf
347 - doins "${FILESDIR}"/nvidia-rmmod.conf
348 -
349 - # Ensures that our device nodes are created when not using X
350 - exeinto "$(get_udevdir)"
351 - newexe "${FILESDIR}"/nvidia-udev.sh-r1 nvidia-udev.sh
352 - udev_newrules "${FILESDIR}"/nvidia.udev-rule 99-nvidia.rules
353 - elif use kernel_FreeBSD; then
354 - if use x86-fbsd; then
355 - insinto /boot/modules
356 - doins "${S}/src/nvidia.kld"
357 - fi
358 -
359 - exeinto /boot/modules
360 - doexe "${S}/src/nvidia.ko"
361 - fi
362 -
363 - # NVIDIA kernel <-> userspace driver config lib
364 - donvidia ${NV_OBJ}/libnvidia-cfg.so.${NV_SOVER}
365 -
366 - # NVIDIA framebuffer capture library
367 - donvidia ${NV_OBJ}/libnvidia-fbc.so.${NV_SOVER}
368 -
369 - # NVIDIA video encode/decode <-> CUDA
370 - if use kernel_linux; then
371 - donvidia ${NV_OBJ}/libnvcuvid.so.${NV_SOVER}
372 - donvidia ${NV_OBJ}/libnvidia-encode.so.${NV_SOVER}
373 - fi
374 -
375 - if use X; then
376 - # Xorg DDX driver
377 - insinto /usr/$(get_libdir)/xorg/modules/drivers
378 - doins ${NV_X11}/nvidia_drv.so
379 -
380 - # Xorg GLX driver
381 - donvidia ${NV_X11}/libglxserver_nvidia.so.${NV_SOVER} \
382 - /usr/$(get_libdir)/xorg/modules/extensions
383 -
384 - # Xorg nvidia.conf
385 - if has_version '>=x11-base/xorg-server-1.16'; then
386 - insinto /usr/share/X11/xorg.conf.d
387 - newins {,50-}nvidia-drm-outputclass.conf
388 - fi
389 -
390 - insinto /usr/share/glvnd/egl_vendor.d
391 - doins ${NV_X11}/10_nvidia.json
392 - fi
393 -
394 - if use wayland; then
395 - insinto /usr/share/egl/egl_external_platform.d
396 - doins ${NV_X11}/10_nvidia_wayland.json
397 - fi
398 -
399 - # OpenCL ICD for NVIDIA
400 - if use kernel_linux; then
401 - insinto /etc/OpenCL/vendors
402 - doins ${NV_OBJ}/nvidia.icd
403 - fi
404 -
405 - # Documentation
406 - if use kernel_FreeBSD; then
407 - dodoc "${NV_DOC}/README"
408 - use X && doman "${NV_MAN}"/nvidia-xconfig.1
409 - use tools && doman "${NV_MAN}"/nvidia-settings.1
410 - else
411 - # Docs
412 - newdoc "${NV_DOC}/README.txt" README
413 - dodoc "${NV_DOC}/NVIDIA_Changelog"
414 - doman "${NV_MAN}"/nvidia-smi.1
415 - use X && doman "${NV_MAN}"/nvidia-xconfig.1
416 - use tools && doman "${NV_MAN}"/nvidia-settings.1
417 - doman "${NV_MAN}"/nvidia-cuda-mps-control.1
418 - fi
419 -
420 - docinto html
421 - dodoc -r ${NV_DOC}/html/*
422 -
423 - # Helper Apps
424 - exeinto /opt/bin/
425 -
426 - if use X; then
427 - doexe ${NV_OBJ}/nvidia-xconfig
428 -
429 - insinto /etc/vulkan/icd.d
430 - doins nvidia_icd.json
431 - fi
432 -
433 - if use kernel_linux; then
434 - doexe ${NV_OBJ}/nvidia-cuda-mps-control
435 - doexe ${NV_OBJ}/nvidia-cuda-mps-server
436 - doexe ${NV_OBJ}/nvidia-debugdump
437 - doexe ${NV_OBJ}/nvidia-persistenced
438 - doexe ${NV_OBJ}/nvidia-smi
439 -
440 - # install nvidia-modprobe setuid and symlink in /usr/bin (bug #505092)
441 - doexe ${NV_OBJ}/nvidia-modprobe
442 - fowners root:video /opt/bin/nvidia-modprobe
443 - fperms 4710 /opt/bin/nvidia-modprobe
444 - dosym /{opt,usr}/bin/nvidia-modprobe
445 -
446 - doman nvidia-cuda-mps-control.1
447 - doman nvidia-modprobe.1
448 - doman nvidia-persistenced.1
449 - newinitd "${FILESDIR}/nvidia-smi.init" nvidia-smi
450 - newconfd "${FILESDIR}/nvidia-persistenced.conf" nvidia-persistenced
451 - newinitd "${FILESDIR}/nvidia-persistenced.init" nvidia-persistenced
452 - fi
453 -
454 - if use tools; then
455 - emake -C "${S}"/nvidia-settings-${PV}/src/ \
456 - DESTDIR="${D}" \
457 - GTK3_AVAILABLE=$(usex gtk3 1 0) \
458 - LIBDIR="${D}/usr/$(get_libdir)" \
459 - NV_USE_BUNDLED_LIBJANSSON=0 \
460 - NV_VERBOSE=1 \
461 - PREFIX=/usr \
462 - DO_STRIP= \
463 - install
464 -
465 - if use static-libs; then
466 - dolib.a "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/libXNVCtrl.a
467 -
468 - insinto /usr/include/NVCtrl
469 - doins "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/*.h
470 - fi
471 -
472 - insinto /usr/share/nvidia/
473 - doins nvidia-application-profiles-${PV}-key-documentation
474 -
475 - insinto /etc/nvidia
476 - newins \
477 - nvidia-application-profiles-${PV}-rc nvidia-application-profiles-rc
478 -
479 - # There is no icon in the FreeBSD tarball.
480 - use kernel_FreeBSD || \
481 - doicon ${NV_OBJ}/nvidia-settings.png
482 -
483 - domenu "${FILESDIR}"/nvidia-settings.desktop
484 -
485 - exeinto /etc/X11/xinit/xinitrc.d
486 - newexe "${FILESDIR}"/95-nvidia-settings-r1 95-nvidia-settings
487 - fi
488 -
489 - dobin ${NV_OBJ}/nvidia-bug-report.sh
490 -
491 - if has_multilib_profile && use multilib; then
492 - local OABI=${ABI}
493 - for ABI in $(get_install_abis); do
494 - src_install-libs
495 - done
496 - ABI=${OABI}
497 - unset OABI
498 - else
499 - src_install-libs
500 - fi
501 -
502 - is_final_abi || die "failed to iterate through all ABIs"
503 -
504 - readme.gentoo_create_doc
505 -}
506 -
507 -src_install-libs() {
508 - local inslibdir=$(get_libdir)
509 - local GL_ROOT="/usr/$(get_libdir)/opengl/nvidia/lib"
510 - local CL_ROOT="/usr/$(get_libdir)/OpenCL/vendors/nvidia"
511 - local nv_libdir="${NV_OBJ}"
512 -
513 - if use kernel_linux && has_multilib_profile && [[ ${ABI} == "x86" ]]; then
514 - nv_libdir="${NV_OBJ}"/32
515 - fi
516 -
517 - if use X; then
518 - NV_GLX_LIBRARIES=(
519 - "libEGL.so.$(usex compat ${NV_SOVER} 1.1.0) ${GL_ROOT}"
520 - "libEGL_nvidia.so.${NV_SOVER} ${GL_ROOT}"
521 - "libGL.so.$(usex compat ${NV_SOVER} 1.7.0) ${GL_ROOT}"
522 - "libGLESv1_CM.so.1.2.0 ${GL_ROOT}"
523 - "libGLESv1_CM_nvidia.so.${NV_SOVER} ${GL_ROOT}"
524 - "libGLESv2.so.2.1.0 ${GL_ROOT}"
525 - "libGLESv2_nvidia.so.${NV_SOVER} ${GL_ROOT}"
526 - "libGLX.so.0 ${GL_ROOT}"
527 - "libGLX_nvidia.so.${NV_SOVER} ${GL_ROOT}"
528 - "libGLdispatch.so.0 ${GL_ROOT}"
529 - "libOpenCL.so.1.0.0 ${CL_ROOT}"
530 - "libOpenGL.so.0 ${GL_ROOT}"
531 - "libcuda.so.${NV_SOVER}"
532 - "libnvcuvid.so.${NV_SOVER}"
533 - "libnvidia-compiler.so.${NV_SOVER}"
534 - "libnvidia-eglcore.so.${NV_SOVER}"
535 - "libnvidia-encode.so.${NV_SOVER}"
536 - "libnvidia-fatbinaryloader.so.${NV_SOVER}"
537 - "libnvidia-fbc.so.${NV_SOVER}"
538 - "libnvidia-glcore.so.${NV_SOVER}"
539 - "libnvidia-glsi.so.${NV_SOVER}"
540 - "libnvidia-glvkspirv.so.${NV_SOVER}"
541 - "libnvidia-ifr.so.${NV_SOVER}"
542 - "libnvidia-opencl.so.${NV_SOVER}"
543 - "libnvidia-ptxjitcompiler.so.${NV_SOVER}"
544 - "libvdpau_nvidia.so.${NV_SOVER}"
545 - )
546 -
547 - if use wayland && has_multilib_profile && [[ ${ABI} == "amd64" ]];
548 - then
549 - NV_GLX_LIBRARIES+=(
550 - "libnvidia-egl-wayland.so.1.1.0"
551 - )
552 - fi
553 -
554 - if use kernel_linux && has_multilib_profile && [[ ${ABI} == "amd64" ]];
555 - then
556 - NV_GLX_LIBRARIES+=(
557 - "libnvidia-wfb.so.${NV_SOVER}"
558 - )
559 - fi
560 -
561 - if use kernel_FreeBSD; then
562 - NV_GLX_LIBRARIES+=(
563 - "libnvidia-tls.so.${NV_SOVER}"
564 - )
565 - fi
566 -
567 - if use kernel_linux; then
568 - NV_GLX_LIBRARIES+=(
569 - "libnvidia-ml.so.${NV_SOVER}"
570 - "tls/libnvidia-tls.so.${NV_SOVER}"
571 - )
572 - fi
573 -
574 - if use kernel_linux && has_multilib_profile && [[ ${ABI} == "amd64" ]];
575 - then
576 - NV_GLX_LIBRARIES+=(
577 - "libnvidia-cbl.so.${NV_SOVER}"
578 - "libnvidia-rtcore.so.${NV_SOVER}"
579 - "libnvoptix.so.${NV_SOVER}"
580 - )
581 - fi
582 -
583 - for NV_LIB in "${NV_GLX_LIBRARIES[@]}"; do
584 - donvidia "${nv_libdir}"/${NV_LIB}
585 - done
586 - fi
587 -}
588 -
589 -pkg_preinst() {
590 - if use driver && use kernel_linux; then
591 - linux-mod_pkg_preinst
592 -
593 - local videogroup="$(egetent group video | cut -d ':' -f 3)"
594 - if [ -z "${videogroup}" ]; then
595 - eerror "Failed to determine the video group gid"
596 - die "Failed to determine the video group gid"
597 - else
598 - sed -i \
599 - -e "s:PACKAGE:${PF}:g" \
600 - -e "s:VIDEOGID:${videogroup}:" \
601 - "${D}"/etc/modprobe.d/nvidia.conf || die
602 - fi
603 - fi
604 -
605 - # Clean the dynamic libGL stuff's home to ensure
606 - # we dont have stale libs floating around
607 - if [ -d "${ROOT}"/usr/lib/opengl/nvidia ]; then
608 - rm -rf "${ROOT}"/usr/lib/opengl/nvidia/*
609 - fi
610 - # Make sure we nuke the old nvidia-glx's env.d file
611 - if [ -e "${ROOT}"/etc/env.d/09nvidia ]; then
612 - rm -f "${ROOT}"/etc/env.d/09nvidia
613 - fi
614 -}
615 -
616 -pkg_postinst() {
617 - use driver && use kernel_linux && linux-mod_pkg_postinst
618 -
619 - # Switch to the nvidia implementation
620 - use X && "${ROOT}"/usr/bin/eselect opengl set --use-old nvidia
621 - "${ROOT}"/usr/bin/eselect opencl set --use-old nvidia
622 -
623 - readme.gentoo_print_elog
624 -
625 - if ! use X; then
626 - elog "You have elected to not install the X.org driver. Along with"
627 - elog "this the OpenGL libraries and VDPAU libraries were not"
628 - elog "installed. Additionally, once the driver is loaded your card"
629 - elog "and fan will run at max speed which may not be desirable."
630 - elog "Use the 'nvidia-smi' init script to have your card and fan"
631 - elog "speed scale appropriately."
632 - elog
633 - fi
634 - if ! use tools; then
635 - elog "USE=tools controls whether the nvidia-settings application"
636 - elog "is installed. If you would like to use it, enable that"
637 - elog "flag and re-emerge this ebuild. Optionally you can install"
638 - elog "media-video/nvidia-settings"
639 - elog
640 - fi
641 -}
642 -
643 -pkg_prerm() {
644 - use X && "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11
645 -}
646 -
647 -pkg_postrm() {
648 - use driver && use kernel_linux && linux-mod_pkg_postrm
649 - use X && "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11
650 -}
651
652 diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-410.73.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-410.73.ebuild
653 deleted file mode 100644
654 index f00cbf47d21..00000000000
655 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-410.73.ebuild
656 +++ /dev/null
657 @@ -1,590 +0,0 @@
658 -# Copyright 1999-2018 Gentoo Authors
659 -# Distributed under the terms of the GNU General Public License v2
660 -
661 -EAPI=6
662 -inherit eutils flag-o-matic linux-info linux-mod multilib-minimal nvidia-driver \
663 - portability toolchain-funcs unpacker user udev
664 -
665 -DESCRIPTION="NVIDIA Accelerated Graphics Driver"
666 -HOMEPAGE="http://www.nvidia.com/ http://www.nvidia.com/Download/Find.aspx"
667 -
668 -AMD64_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86_64-${PV}"
669 -AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}"
670 -ARM_NV_PACKAGE="NVIDIA-Linux-armv7l-gnueabihf-${PV}"
671 -
672 -NV_URI="https://us.download.nvidia.com/XFree86/"
673 -SRC_URI="
674 - amd64-fbsd? ( ${NV_URI}FreeBSD-x86_64/${PV}/${AMD64_FBSD_NV_PACKAGE}.tar.gz )
675 - amd64? ( ${NV_URI}Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run )
676 - tools? (
677 - https://download.nvidia.com/XFree86/nvidia-settings/nvidia-settings-${PV}.tar.bz2
678 - )
679 -"
680 -
681 -LICENSE="GPL-2 NVIDIA-r2"
682 -SLOT="0/${PV%.*}"
683 -KEYWORDS="-* ~amd64 ~amd64-fbsd"
684 -RESTRICT="bindist mirror"
685 -EMULTILIB_PKG="true"
686 -
687 -IUSE="acpi compat +driver gtk3 kernel_FreeBSD kernel_linux +kms multilib pax_kernel static-libs +tools uvm wayland +X"
688 -REQUIRED_USE="
689 - tools? ( X )
690 - static-libs? ( tools )
691 -"
692 -
693 -COMMON="
694 - app-eselect/eselect-opencl
695 - kernel_linux? ( >=sys-libs/glibc-2.6.1 )
696 - tools? (
697 - dev-libs/atk
698 - dev-libs/glib:2
699 - dev-libs/jansson
700 - gtk3? (
701 - x11-libs/gtk+:3
702 - )
703 - x11-libs/cairo
704 - x11-libs/gdk-pixbuf[X]
705 - x11-libs/gtk+:2
706 - x11-libs/libX11
707 - x11-libs/libXext
708 - x11-libs/libXrandr
709 - x11-libs/libXv
710 - x11-libs/libXxf86vm
711 - x11-libs/pango[X]
712 - )
713 - X? (
714 - >=app-eselect/eselect-opengl-1.0.9
715 - app-misc/pax-utils
716 - )
717 -"
718 -DEPEND="
719 - ${COMMON}
720 - kernel_linux? ( virtual/linux-sources )
721 - tools? ( sys-apps/dbus )
722 -"
723 -RDEPEND="
724 - ${COMMON}
725 - acpi? ( sys-power/acpid )
726 - tools? ( !media-video/nvidia-settings )
727 - wayland? ( dev-libs/wayland[${MULTILIB_USEDEP}] )
728 - X? (
729 - <x11-base/xorg-server-1.20.99:=
730 - >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
731 - >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
732 - >=x11-libs/libvdpau-1.0[${MULTILIB_USEDEP}]
733 - sys-libs/zlib[${MULTILIB_USEDEP}]
734 - )
735 -"
736 -QA_PREBUILT="opt/* usr/lib*"
737 -S=${WORKDIR}/
738 -
739 -nvidia_drivers_versions_check() {
740 - if use amd64 && has_multilib_profile && \
741 - [ "${DEFAULT_ABI}" != "amd64" ]; then
742 - eerror "This ebuild doesn't currently support changing your default ABI"
743 - die "Unexpected \${DEFAULT_ABI} = ${DEFAULT_ABI}"
744 - fi
745 -
746 - if use kernel_linux && kernel_is ge 4 20; then
747 - ewarn "Gentoo supports kernels which are supported by NVIDIA"
748 - ewarn "which are limited to the following kernels:"
749 - ewarn "<sys-kernel/gentoo-sources-4.20"
750 - ewarn "<sys-kernel/vanilla-sources-4.20"
751 - ewarn ""
752 - ewarn "You are free to utilize epatch_user to provide whatever"
753 - ewarn "support you feel is appropriate, but will not receive"
754 - ewarn "support as a result of those changes."
755 - ewarn ""
756 - ewarn "Do not file a bug report about this."
757 - ewarn ""
758 - fi
759 -
760 - # Since Nvidia ships many different series of drivers, we need to give the user
761 - # some kind of guidance as to what version they should install. This tries
762 - # to point the user in the right direction but can't be perfect. check
763 - # nvidia-driver.eclass
764 - nvidia-driver-check-warning
765 -
766 - # Kernel features/options to check for
767 - CONFIG_CHECK="~ZONE_DMA ~MTRR ~SYSVIPC ~!LOCKDEP"
768 -
769 - # Now do the above checks
770 - use kernel_linux && check_extra_config
771 -}
772 -
773 -pkg_pretend() {
774 - nvidia_drivers_versions_check
775 -}
776 -
777 -pkg_setup() {
778 - nvidia_drivers_versions_check
779 -
780 - # try to turn off distcc and ccache for people that have a problem with it
781 - export DISTCC_DISABLE=1
782 - export CCACHE_DISABLE=1
783 -
784 - if use driver && use kernel_linux; then
785 - MODULE_NAMES="nvidia(video:${S}/kernel)"
786 - use uvm && MODULE_NAMES+=" nvidia-uvm(video:${S}/kernel)"
787 - use kms && MODULE_NAMES+=" nvidia-modeset(video:${S}/kernel) nvidia-drm(video:${S}/kernel)"
788 -
789 - # This needs to run after MODULE_NAMES (so that the eclass checks
790 - # whether the kernel supports loadable modules) but before BUILD_PARAMS
791 - # is set (so that KV_DIR is populated).
792 - linux-mod_pkg_setup
793 -
794 - BUILD_PARAMS="IGNORE_CC_MISMATCH=yes V=1 SYSSRC=${KV_DIR} \
795 - SYSOUT=${KV_OUT_DIR} CC=$(tc-getBUILD_CC) NV_VERBOSE=1"
796 -
797 - # linux-mod_src_compile calls set_arch_to_kernel, which
798 - # sets the ARCH to x86 but NVIDIA's wrapping Makefile
799 - # expects x86_64 or i386 and then converts it to x86
800 - # later on in the build process
801 - BUILD_FIXES="ARCH=$(uname -m | sed -e 's/i.86/i386/')"
802 - fi
803 -
804 - if use kernel_linux && kernel_is lt 2 6 9; then
805 - eerror "You must build this against 2.6.9 or higher kernels."
806 - fi
807 -
808 - # set variables to where files are in the package structure
809 - if use kernel_FreeBSD; then
810 - use amd64-fbsd && S="${WORKDIR}/${AMD64_FBSD_NV_PACKAGE}"
811 - NV_DOC="${S}/doc"
812 - NV_OBJ="${S}/obj"
813 - NV_SRC="${S}/src"
814 - NV_MAN="${S}/x11/man"
815 - NV_X11="${S}/obj"
816 - NV_SOVER=1
817 - elif use kernel_linux; then
818 - NV_DOC="${S}"
819 - NV_OBJ="${S}"
820 - NV_SRC="${S}/kernel"
821 - NV_MAN="${S}"
822 - NV_X11="${S}"
823 - NV_SOVER=${PV}
824 - else
825 - die "Could not determine proper NVIDIA package"
826 - fi
827 -}
828 -
829 -src_prepare() {
830 - if use pax_kernel; then
831 - ewarn "Using PAX patches is not supported. You will be asked to"
832 - ewarn "use a standard kernel should you have issues. Should you"
833 - ewarn "need support with these patches, contact the PaX team."
834 - eapply "${FILESDIR}"/${PN}-375.20-pax.patch
835 - fi
836 -
837 - local man_file
838 - for man_file in "${NV_MAN}"/*1.gz; do
839 - gunzip $man_file || die
840 - done
841 -
842 - if use tools; then
843 - cp "${FILESDIR}"/nvidia-settings-linker.patch "${WORKDIR}" || die
844 - sed -i \
845 - -e "s:@PV@:${PV}:g" \
846 - "${WORKDIR}"/nvidia-settings-linker.patch || die
847 - eapply "${WORKDIR}"/nvidia-settings-linker.patch
848 - fi
849 -
850 - default
851 -
852 - if ! [ -f nvidia_icd.json ]; then
853 - cp nvidia_icd.json.template nvidia_icd.json || die
854 - sed -i -e 's:__NV_VK_ICD__:libGLX_nvidia.so.0:g' nvidia_icd.json || die
855 - fi
856 -}
857 -
858 -src_compile() {
859 - # This is already the default on Linux, as there's no toplevel Makefile, but
860 - # on FreeBSD there's one and triggers the kernel module build, as we install
861 - # it by itself, pass this.
862 -
863 - cd "${NV_SRC}"
864 - if use kernel_FreeBSD; then
865 - MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \
866 - LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die
867 - elif use driver && use kernel_linux; then
868 - MAKEOPTS=-j1 linux-mod_src_compile
869 - fi
870 -
871 - if use tools; then
872 - emake -C "${S}"/nvidia-settings-${PV}/src \
873 - AR="$(tc-getAR)" \
874 - CC="$(tc-getCC)" \
875 - DO_STRIP= \
876 - LD="$(tc-getCC)" \
877 - LIBDIR="$(get_libdir)" \
878 - NVLD="$(tc-getLD)" \
879 - NV_VERBOSE=1 \
880 - RANLIB="$(tc-getRANLIB)" \
881 - build-xnvctrl
882 -
883 - emake -C "${S}"/nvidia-settings-${PV}/src \
884 - CC="$(tc-getCC)" \
885 - DO_STRIP= \
886 - GTK3_AVAILABLE=$(usex gtk3 1 0) \
887 - LD="$(tc-getCC)" \
888 - LIBDIR="$(get_libdir)" \
889 - NVLD="$(tc-getLD)" \
890 - NVML_ENABLED=0 \
891 - NV_USE_BUNDLED_LIBJANSSON=0 \
892 - NV_VERBOSE=1
893 - fi
894 -}
895 -
896 -# Install nvidia library:
897 -# the first parameter is the library to install
898 -# the second parameter is the provided soversion
899 -# the third parameter is the target directory if it is not /usr/lib
900 -donvidia() {
901 - # Full path to library
902 - nv_LIB="${1}"
903 -
904 - # SOVER to use
905 - nv_SOVER="$(scanelf -qF'%S#F' ${nv_LIB})"
906 -
907 - # Where to install
908 - nv_DEST="${2}"
909 -
910 - # Get just the library name
911 - nv_LIBNAME=$(basename "${nv_LIB}")
912 -
913 - if [[ "${nv_DEST}" ]]; then
914 - exeinto ${nv_DEST}
915 - action="doexe"
916 - else
917 - nv_DEST="/usr/$(get_libdir)"
918 - action="dolib.so"
919 - fi
920 -
921 - # Install the library
922 - ${action} ${nv_LIB} || die "failed to install ${nv_LIBNAME}"
923 -
924 - # If the library has a SONAME and SONAME does not match the library name,
925 - # then we need to create a symlink
926 - if [[ ${nv_SOVER} ]] && ! [[ "${nv_SOVER}" = "${nv_LIBNAME}" ]]; then
927 - dosym ${nv_LIBNAME} ${nv_DEST}/${nv_SOVER} \
928 - || die "failed to create ${nv_DEST}/${nv_SOVER} symlink"
929 - fi
930 -
931 - dosym ${nv_LIBNAME} ${nv_DEST}/${nv_LIBNAME/.so*/.so} \
932 - || die "failed to create ${nv_LIBNAME/.so*/.so} symlink"
933 -}
934 -
935 -src_install() {
936 - if use driver && use kernel_linux; then
937 - linux-mod_src_install
938 -
939 - # Add the aliases
940 - # This file is tweaked with the appropriate video group in
941 - # pkg_preinst, see bug #491414
942 - insinto /etc/modprobe.d
943 - newins "${FILESDIR}"/nvidia-169.07 nvidia.conf
944 - doins "${FILESDIR}"/nvidia-rmmod.conf
945 -
946 - # Ensures that our device nodes are created when not using X
947 - exeinto "$(get_udevdir)"
948 - newexe "${FILESDIR}"/nvidia-udev.sh-r1 nvidia-udev.sh
949 - udev_newrules "${FILESDIR}"/nvidia.udev-rule 99-nvidia.rules
950 - elif use kernel_FreeBSD; then
951 - if use x86-fbsd; then
952 - insinto /boot/modules
953 - doins "${S}/src/nvidia.kld"
954 - fi
955 -
956 - exeinto /boot/modules
957 - doexe "${S}/src/nvidia.ko"
958 - fi
959 -
960 - # NVIDIA kernel <-> userspace driver config lib
961 - donvidia ${NV_OBJ}/libnvidia-cfg.so.${NV_SOVER}
962 -
963 - # NVIDIA framebuffer capture library
964 - donvidia ${NV_OBJ}/libnvidia-fbc.so.${NV_SOVER}
965 -
966 - # NVIDIA video encode/decode <-> CUDA
967 - if use kernel_linux; then
968 - donvidia ${NV_OBJ}/libnvcuvid.so.${NV_SOVER}
969 - donvidia ${NV_OBJ}/libnvidia-encode.so.${NV_SOVER}
970 - fi
971 -
972 - if use X; then
973 - # Xorg DDX driver
974 - insinto /usr/$(get_libdir)/xorg/modules/drivers
975 - doins ${NV_X11}/nvidia_drv.so
976 -
977 - # Xorg GLX driver
978 - donvidia ${NV_X11}/libglxserver_nvidia.so.${NV_SOVER} \
979 - /usr/$(get_libdir)/xorg/modules/extensions
980 -
981 - # Xorg nvidia.conf
982 - if has_version '>=x11-base/xorg-server-1.16'; then
983 - insinto /usr/share/X11/xorg.conf.d
984 - newins {,50-}nvidia-drm-outputclass.conf
985 - fi
986 -
987 - insinto /usr/share/glvnd/egl_vendor.d
988 - doins ${NV_X11}/10_nvidia.json
989 - fi
990 -
991 - if use wayland; then
992 - insinto /usr/share/egl/egl_external_platform.d
993 - doins ${NV_X11}/10_nvidia_wayland.json
994 - fi
995 -
996 - # OpenCL ICD for NVIDIA
997 - if use kernel_linux; then
998 - insinto /etc/OpenCL/vendors
999 - doins ${NV_OBJ}/nvidia.icd
1000 - fi
1001 -
1002 - # Documentation
1003 - if use kernel_FreeBSD; then
1004 - dodoc "${NV_DOC}/README"
1005 - use X && doman "${NV_MAN}"/nvidia-xconfig.1
1006 - use tools && doman "${NV_MAN}"/nvidia-settings.1
1007 - else
1008 - # Docs
1009 - newdoc "${NV_DOC}/README.txt" README
1010 - dodoc "${NV_DOC}/NVIDIA_Changelog"
1011 - doman "${NV_MAN}"/nvidia-smi.1
1012 - use X && doman "${NV_MAN}"/nvidia-xconfig.1
1013 - use tools && doman "${NV_MAN}"/nvidia-settings.1
1014 - doman "${NV_MAN}"/nvidia-cuda-mps-control.1
1015 - fi
1016 -
1017 - docinto html
1018 - dodoc -r ${NV_DOC}/html/*
1019 -
1020 - # Helper Apps
1021 - exeinto /opt/bin/
1022 -
1023 - if use X; then
1024 - doexe ${NV_OBJ}/nvidia-xconfig
1025 -
1026 - insinto /etc/vulkan/icd.d
1027 - doins nvidia_icd.json
1028 - fi
1029 -
1030 - if use kernel_linux; then
1031 - doexe ${NV_OBJ}/nvidia-cuda-mps-control
1032 - doexe ${NV_OBJ}/nvidia-cuda-mps-server
1033 - doexe ${NV_OBJ}/nvidia-debugdump
1034 - doexe ${NV_OBJ}/nvidia-persistenced
1035 - doexe ${NV_OBJ}/nvidia-smi
1036 -
1037 - # install nvidia-modprobe setuid and symlink in /usr/bin (bug #505092)
1038 - doexe ${NV_OBJ}/nvidia-modprobe
1039 - fowners root:video /opt/bin/nvidia-modprobe
1040 - fperms 4710 /opt/bin/nvidia-modprobe
1041 - dosym /{opt,usr}/bin/nvidia-modprobe
1042 -
1043 - doman nvidia-cuda-mps-control.1
1044 - doman nvidia-modprobe.1
1045 - doman nvidia-persistenced.1
1046 - newinitd "${FILESDIR}/nvidia-smi.init" nvidia-smi
1047 - newconfd "${FILESDIR}/nvidia-persistenced.conf" nvidia-persistenced
1048 - newinitd "${FILESDIR}/nvidia-persistenced.init" nvidia-persistenced
1049 - fi
1050 -
1051 - if use tools; then
1052 - emake -C "${S}"/nvidia-settings-${PV}/src/ \
1053 - DESTDIR="${D}" \
1054 - GTK3_AVAILABLE=$(usex gtk3 1 0) \
1055 - LIBDIR="${D}/usr/$(get_libdir)" \
1056 - NV_USE_BUNDLED_LIBJANSSON=0 \
1057 - NV_VERBOSE=1 \
1058 - PREFIX=/usr \
1059 - DO_STRIP= \
1060 - install
1061 -
1062 - if use static-libs; then
1063 - dolib.a "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/libXNVCtrl.a
1064 -
1065 - insinto /usr/include/NVCtrl
1066 - doins "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/*.h
1067 - fi
1068 -
1069 - insinto /usr/share/nvidia/
1070 - doins nvidia-application-profiles-${PV}-key-documentation
1071 -
1072 - insinto /etc/nvidia
1073 - newins \
1074 - nvidia-application-profiles-${PV}-rc nvidia-application-profiles-rc
1075 -
1076 - # There is no icon in the FreeBSD tarball.
1077 - use kernel_FreeBSD || \
1078 - doicon ${NV_OBJ}/nvidia-settings.png
1079 -
1080 - domenu "${FILESDIR}"/nvidia-settings.desktop
1081 -
1082 - exeinto /etc/X11/xinit/xinitrc.d
1083 - newexe "${FILESDIR}"/95-nvidia-settings-r1 95-nvidia-settings
1084 - fi
1085 -
1086 - dobin ${NV_OBJ}/nvidia-bug-report.sh
1087 -
1088 - if has_multilib_profile && use multilib; then
1089 - local OABI=${ABI}
1090 - for ABI in $(get_install_abis); do
1091 - src_install-libs
1092 - done
1093 - ABI=${OABI}
1094 - unset OABI
1095 - else
1096 - src_install-libs
1097 - fi
1098 -
1099 - is_final_abi || die "failed to iterate through all ABIs"
1100 -
1101 - readme.gentoo_create_doc
1102 -}
1103 -
1104 -src_install-libs() {
1105 - local inslibdir=$(get_libdir)
1106 - local GL_ROOT="/usr/$(get_libdir)/opengl/nvidia/lib"
1107 - local CL_ROOT="/usr/$(get_libdir)/OpenCL/vendors/nvidia"
1108 - local nv_libdir="${NV_OBJ}"
1109 -
1110 - if use kernel_linux && has_multilib_profile && [[ ${ABI} == "x86" ]]; then
1111 - nv_libdir="${NV_OBJ}"/32
1112 - fi
1113 -
1114 - if use X; then
1115 - NV_GLX_LIBRARIES=(
1116 - "libEGL.so.$(usex compat ${NV_SOVER} 1.1.0) ${GL_ROOT}"
1117 - "libEGL_nvidia.so.${NV_SOVER} ${GL_ROOT}"
1118 - "libGL.so.$(usex compat ${NV_SOVER} 1.7.0) ${GL_ROOT}"
1119 - "libGLESv1_CM.so.1.2.0 ${GL_ROOT}"
1120 - "libGLESv1_CM_nvidia.so.${NV_SOVER} ${GL_ROOT}"
1121 - "libGLESv2.so.2.1.0 ${GL_ROOT}"
1122 - "libGLESv2_nvidia.so.${NV_SOVER} ${GL_ROOT}"
1123 - "libGLX.so.0 ${GL_ROOT}"
1124 - "libGLX_nvidia.so.${NV_SOVER} ${GL_ROOT}"
1125 - "libGLdispatch.so.0 ${GL_ROOT}"
1126 - "libOpenCL.so.1.0.0 ${CL_ROOT}"
1127 - "libOpenGL.so.0 ${GL_ROOT}"
1128 - "libcuda.so.${NV_SOVER}"
1129 - "libnvcuvid.so.${NV_SOVER}"
1130 - "libnvidia-compiler.so.${NV_SOVER}"
1131 - "libnvidia-eglcore.so.${NV_SOVER}"
1132 - "libnvidia-encode.so.${NV_SOVER}"
1133 - "libnvidia-fatbinaryloader.so.${NV_SOVER}"
1134 - "libnvidia-fbc.so.${NV_SOVER}"
1135 - "libnvidia-glcore.so.${NV_SOVER}"
1136 - "libnvidia-glsi.so.${NV_SOVER}"
1137 - "libnvidia-glvkspirv.so.${NV_SOVER}"
1138 - "libnvidia-ifr.so.${NV_SOVER}"
1139 - "libnvidia-opencl.so.${NV_SOVER}"
1140 - "libnvidia-ptxjitcompiler.so.${NV_SOVER}"
1141 - "libvdpau_nvidia.so.${NV_SOVER}"
1142 - )
1143 -
1144 - if use wayland && has_multilib_profile && [[ ${ABI} == "amd64" ]];
1145 - then
1146 - NV_GLX_LIBRARIES+=(
1147 - "libnvidia-egl-wayland.so.1.1.0"
1148 - )
1149 - fi
1150 -
1151 - if use kernel_linux && has_multilib_profile && [[ ${ABI} == "amd64" ]];
1152 - then
1153 - NV_GLX_LIBRARIES+=(
1154 - "libnvidia-wfb.so.${NV_SOVER}"
1155 - )
1156 - fi
1157 -
1158 - if use kernel_FreeBSD; then
1159 - NV_GLX_LIBRARIES+=(
1160 - "libnvidia-tls.so.${NV_SOVER}"
1161 - )
1162 - fi
1163 -
1164 - if use kernel_linux; then
1165 - NV_GLX_LIBRARIES+=(
1166 - "libnvidia-ml.so.${NV_SOVER}"
1167 - "tls/libnvidia-tls.so.${NV_SOVER}"
1168 - )
1169 - fi
1170 -
1171 - if use kernel_linux && has_multilib_profile && [[ ${ABI} == "amd64" ]];
1172 - then
1173 - NV_GLX_LIBRARIES+=(
1174 - "libnvidia-cbl.so.${NV_SOVER}"
1175 - "libnvidia-rtcore.so.${NV_SOVER}"
1176 - "libnvoptix.so.${NV_SOVER}"
1177 - )
1178 - fi
1179 -
1180 - for NV_LIB in "${NV_GLX_LIBRARIES[@]}"; do
1181 - donvidia "${nv_libdir}"/${NV_LIB}
1182 - done
1183 - fi
1184 -}
1185 -
1186 -pkg_preinst() {
1187 - if use driver && use kernel_linux; then
1188 - linux-mod_pkg_preinst
1189 -
1190 - local videogroup="$(egetent group video | cut -d ':' -f 3)"
1191 - if [ -z "${videogroup}" ]; then
1192 - eerror "Failed to determine the video group gid"
1193 - die "Failed to determine the video group gid"
1194 - else
1195 - sed -i \
1196 - -e "s:PACKAGE:${PF}:g" \
1197 - -e "s:VIDEOGID:${videogroup}:" \
1198 - "${D}"/etc/modprobe.d/nvidia.conf || die
1199 - fi
1200 - fi
1201 -
1202 - # Clean the dynamic libGL stuff's home to ensure
1203 - # we dont have stale libs floating around
1204 - if [ -d "${ROOT}"/usr/lib/opengl/nvidia ]; then
1205 - rm -rf "${ROOT}"/usr/lib/opengl/nvidia/*
1206 - fi
1207 - # Make sure we nuke the old nvidia-glx's env.d file
1208 - if [ -e "${ROOT}"/etc/env.d/09nvidia ]; then
1209 - rm -f "${ROOT}"/etc/env.d/09nvidia
1210 - fi
1211 -}
1212 -
1213 -pkg_postinst() {
1214 - use driver && use kernel_linux && linux-mod_pkg_postinst
1215 -
1216 - # Switch to the nvidia implementation
1217 - use X && "${ROOT}"/usr/bin/eselect opengl set --use-old nvidia
1218 - "${ROOT}"/usr/bin/eselect opencl set --use-old nvidia
1219 -
1220 - readme.gentoo_print_elog
1221 -
1222 - if ! use X; then
1223 - elog "You have elected to not install the X.org driver. Along with"
1224 - elog "this the OpenGL libraries and VDPAU libraries were not"
1225 - elog "installed. Additionally, once the driver is loaded your card"
1226 - elog "and fan will run at max speed which may not be desirable."
1227 - elog "Use the 'nvidia-smi' init script to have your card and fan"
1228 - elog "speed scale appropriately."
1229 - elog
1230 - fi
1231 - if ! use tools; then
1232 - elog "USE=tools controls whether the nvidia-settings application"
1233 - elog "is installed. If you would like to use it, enable that"
1234 - elog "flag and re-emerge this ebuild. Optionally you can install"
1235 - elog "media-video/nvidia-settings"
1236 - elog
1237 - fi
1238 -}
1239 -
1240 -pkg_prerm() {
1241 - use X && "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11
1242 -}
1243 -
1244 -pkg_postrm() {
1245 - use driver && use kernel_linux && linux-mod_pkg_postrm
1246 - use X && "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11
1247 -}
1248
1249 diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-415.13.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-415.13.ebuild
1250 deleted file mode 100644
1251 index c5f037b0ecf..00000000000
1252 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-415.13.ebuild
1253 +++ /dev/null
1254 @@ -1,590 +0,0 @@
1255 -# Copyright 1999-2018 Gentoo Authors
1256 -# Distributed under the terms of the GNU General Public License v2
1257 -
1258 -EAPI=6
1259 -inherit eutils flag-o-matic linux-info linux-mod multilib-minimal nvidia-driver \
1260 - portability toolchain-funcs unpacker user udev
1261 -
1262 -DESCRIPTION="NVIDIA Accelerated Graphics Driver"
1263 -HOMEPAGE="http://www.nvidia.com/ http://www.nvidia.com/Download/Find.aspx"
1264 -
1265 -AMD64_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86_64-${PV}"
1266 -AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}"
1267 -ARM_NV_PACKAGE="NVIDIA-Linux-armv7l-gnueabihf-${PV}"
1268 -
1269 -NV_URI="https://us.download.nvidia.com/XFree86/"
1270 -SRC_URI="
1271 - amd64-fbsd? ( ${NV_URI}FreeBSD-x86_64/${PV}/${AMD64_FBSD_NV_PACKAGE}.tar.gz )
1272 - amd64? ( ${NV_URI}Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run )
1273 - tools? (
1274 - https://download.nvidia.com/XFree86/nvidia-settings/nvidia-settings-${PV}.tar.bz2
1275 - )
1276 -"
1277 -
1278 -LICENSE="GPL-2 NVIDIA-r2"
1279 -SLOT="0/${PV%.*}"
1280 -KEYWORDS="-* ~amd64 ~amd64-fbsd"
1281 -RESTRICT="bindist mirror"
1282 -EMULTILIB_PKG="true"
1283 -
1284 -IUSE="acpi compat +driver gtk3 kernel_FreeBSD kernel_linux +kms multilib pax_kernel static-libs +tools uvm wayland +X"
1285 -REQUIRED_USE="
1286 - tools? ( X )
1287 - static-libs? ( tools )
1288 -"
1289 -
1290 -COMMON="
1291 - app-eselect/eselect-opencl
1292 - kernel_linux? ( >=sys-libs/glibc-2.6.1 )
1293 - tools? (
1294 - dev-libs/atk
1295 - dev-libs/glib:2
1296 - dev-libs/jansson
1297 - gtk3? (
1298 - x11-libs/gtk+:3
1299 - )
1300 - x11-libs/cairo
1301 - x11-libs/gdk-pixbuf[X]
1302 - x11-libs/gtk+:2
1303 - x11-libs/libX11
1304 - x11-libs/libXext
1305 - x11-libs/libXrandr
1306 - x11-libs/libXv
1307 - x11-libs/libXxf86vm
1308 - x11-libs/pango[X]
1309 - )
1310 - X? (
1311 - >=app-eselect/eselect-opengl-1.0.9
1312 - app-misc/pax-utils
1313 - )
1314 -"
1315 -DEPEND="
1316 - ${COMMON}
1317 - kernel_linux? ( virtual/linux-sources )
1318 - tools? ( sys-apps/dbus )
1319 -"
1320 -RDEPEND="
1321 - ${COMMON}
1322 - acpi? ( sys-power/acpid )
1323 - tools? ( !media-video/nvidia-settings )
1324 - wayland? ( dev-libs/wayland[${MULTILIB_USEDEP}] )
1325 - X? (
1326 - <x11-base/xorg-server-1.20.99:=
1327 - >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
1328 - >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
1329 - >=x11-libs/libvdpau-1.0[${MULTILIB_USEDEP}]
1330 - sys-libs/zlib[${MULTILIB_USEDEP}]
1331 - )
1332 -"
1333 -QA_PREBUILT="opt/* usr/lib*"
1334 -S=${WORKDIR}/
1335 -
1336 -nvidia_drivers_versions_check() {
1337 - if use amd64 && has_multilib_profile && \
1338 - [ "${DEFAULT_ABI}" != "amd64" ]; then
1339 - eerror "This ebuild doesn't currently support changing your default ABI"
1340 - die "Unexpected \${DEFAULT_ABI} = ${DEFAULT_ABI}"
1341 - fi
1342 -
1343 - if use kernel_linux && kernel_is ge 4 20; then
1344 - ewarn "Gentoo supports kernels which are supported by NVIDIA"
1345 - ewarn "which are limited to the following kernels:"
1346 - ewarn "<sys-kernel/gentoo-sources-4.20"
1347 - ewarn "<sys-kernel/vanilla-sources-4.20"
1348 - ewarn ""
1349 - ewarn "You are free to utilize epatch_user to provide whatever"
1350 - ewarn "support you feel is appropriate, but will not receive"
1351 - ewarn "support as a result of those changes."
1352 - ewarn ""
1353 - ewarn "Do not file a bug report about this."
1354 - ewarn ""
1355 - fi
1356 -
1357 - # Since Nvidia ships many different series of drivers, we need to give the user
1358 - # some kind of guidance as to what version they should install. This tries
1359 - # to point the user in the right direction but can't be perfect. check
1360 - # nvidia-driver.eclass
1361 - nvidia-driver-check-warning
1362 -
1363 - # Kernel features/options to check for
1364 - CONFIG_CHECK="~ZONE_DMA ~MTRR ~SYSVIPC ~!LOCKDEP"
1365 -
1366 - # Now do the above checks
1367 - use kernel_linux && check_extra_config
1368 -}
1369 -
1370 -pkg_pretend() {
1371 - nvidia_drivers_versions_check
1372 -}
1373 -
1374 -pkg_setup() {
1375 - nvidia_drivers_versions_check
1376 -
1377 - # try to turn off distcc and ccache for people that have a problem with it
1378 - export DISTCC_DISABLE=1
1379 - export CCACHE_DISABLE=1
1380 -
1381 - if use driver && use kernel_linux; then
1382 - MODULE_NAMES="nvidia(video:${S}/kernel)"
1383 - use uvm && MODULE_NAMES+=" nvidia-uvm(video:${S}/kernel)"
1384 - use kms && MODULE_NAMES+=" nvidia-modeset(video:${S}/kernel) nvidia-drm(video:${S}/kernel)"
1385 -
1386 - # This needs to run after MODULE_NAMES (so that the eclass checks
1387 - # whether the kernel supports loadable modules) but before BUILD_PARAMS
1388 - # is set (so that KV_DIR is populated).
1389 - linux-mod_pkg_setup
1390 -
1391 - BUILD_PARAMS="IGNORE_CC_MISMATCH=yes V=1 SYSSRC=${KV_DIR} \
1392 - SYSOUT=${KV_OUT_DIR} CC=$(tc-getBUILD_CC) NV_VERBOSE=1"
1393 -
1394 - # linux-mod_src_compile calls set_arch_to_kernel, which
1395 - # sets the ARCH to x86 but NVIDIA's wrapping Makefile
1396 - # expects x86_64 or i386 and then converts it to x86
1397 - # later on in the build process
1398 - BUILD_FIXES="ARCH=$(uname -m | sed -e 's/i.86/i386/')"
1399 - fi
1400 -
1401 - if use kernel_linux && kernel_is lt 2 6 9; then
1402 - eerror "You must build this against 2.6.9 or higher kernels."
1403 - fi
1404 -
1405 - # set variables to where files are in the package structure
1406 - if use kernel_FreeBSD; then
1407 - use amd64-fbsd && S="${WORKDIR}/${AMD64_FBSD_NV_PACKAGE}"
1408 - NV_DOC="${S}/doc"
1409 - NV_OBJ="${S}/obj"
1410 - NV_SRC="${S}/src"
1411 - NV_MAN="${S}/x11/man"
1412 - NV_X11="${S}/obj"
1413 - NV_SOVER=1
1414 - elif use kernel_linux; then
1415 - NV_DOC="${S}"
1416 - NV_OBJ="${S}"
1417 - NV_SRC="${S}/kernel"
1418 - NV_MAN="${S}"
1419 - NV_X11="${S}"
1420 - NV_SOVER=${PV}
1421 - else
1422 - die "Could not determine proper NVIDIA package"
1423 - fi
1424 -}
1425 -
1426 -src_prepare() {
1427 - if use pax_kernel; then
1428 - ewarn "Using PAX patches is not supported. You will be asked to"
1429 - ewarn "use a standard kernel should you have issues. Should you"
1430 - ewarn "need support with these patches, contact the PaX team."
1431 - eapply "${FILESDIR}"/${PN}-375.20-pax.patch
1432 - fi
1433 -
1434 - local man_file
1435 - for man_file in "${NV_MAN}"/*1.gz; do
1436 - gunzip $man_file || die
1437 - done
1438 -
1439 - if use tools; then
1440 - cp "${FILESDIR}"/nvidia-settings-linker.patch "${WORKDIR}" || die
1441 - sed -i \
1442 - -e "s:@PV@:${PV}:g" \
1443 - "${WORKDIR}"/nvidia-settings-linker.patch || die
1444 - eapply "${WORKDIR}"/nvidia-settings-linker.patch
1445 - fi
1446 -
1447 - default
1448 -
1449 - if ! [ -f nvidia_icd.json ]; then
1450 - cp nvidia_icd.json.template nvidia_icd.json || die
1451 - sed -i -e 's:__NV_VK_ICD__:libGLX_nvidia.so.0:g' nvidia_icd.json || die
1452 - fi
1453 -}
1454 -
1455 -src_compile() {
1456 - # This is already the default on Linux, as there's no toplevel Makefile, but
1457 - # on FreeBSD there's one and triggers the kernel module build, as we install
1458 - # it by itself, pass this.
1459 -
1460 - cd "${NV_SRC}"
1461 - if use kernel_FreeBSD; then
1462 - MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \
1463 - LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die
1464 - elif use driver && use kernel_linux; then
1465 - MAKEOPTS=-j1 linux-mod_src_compile
1466 - fi
1467 -
1468 - if use tools; then
1469 - emake -C "${S}"/nvidia-settings-${PV}/src \
1470 - AR="$(tc-getAR)" \
1471 - CC="$(tc-getCC)" \
1472 - DO_STRIP= \
1473 - LD="$(tc-getCC)" \
1474 - LIBDIR="$(get_libdir)" \
1475 - NVLD="$(tc-getLD)" \
1476 - NV_VERBOSE=1 \
1477 - RANLIB="$(tc-getRANLIB)" \
1478 - build-xnvctrl
1479 -
1480 - emake -C "${S}"/nvidia-settings-${PV}/src \
1481 - CC="$(tc-getCC)" \
1482 - DO_STRIP= \
1483 - GTK3_AVAILABLE=$(usex gtk3 1 0) \
1484 - LD="$(tc-getCC)" \
1485 - LIBDIR="$(get_libdir)" \
1486 - NVLD="$(tc-getLD)" \
1487 - NVML_ENABLED=0 \
1488 - NV_USE_BUNDLED_LIBJANSSON=0 \
1489 - NV_VERBOSE=1
1490 - fi
1491 -}
1492 -
1493 -# Install nvidia library:
1494 -# the first parameter is the library to install
1495 -# the second parameter is the provided soversion
1496 -# the third parameter is the target directory if it is not /usr/lib
1497 -donvidia() {
1498 - # Full path to library
1499 - nv_LIB="${1}"
1500 -
1501 - # SOVER to use
1502 - nv_SOVER="$(scanelf -qF'%S#F' ${nv_LIB})"
1503 -
1504 - # Where to install
1505 - nv_DEST="${2}"
1506 -
1507 - # Get just the library name
1508 - nv_LIBNAME=$(basename "${nv_LIB}")
1509 -
1510 - if [[ "${nv_DEST}" ]]; then
1511 - exeinto ${nv_DEST}
1512 - action="doexe"
1513 - else
1514 - nv_DEST="/usr/$(get_libdir)"
1515 - action="dolib.so"
1516 - fi
1517 -
1518 - # Install the library
1519 - ${action} ${nv_LIB} || die "failed to install ${nv_LIBNAME}"
1520 -
1521 - # If the library has a SONAME and SONAME does not match the library name,
1522 - # then we need to create a symlink
1523 - if [[ ${nv_SOVER} ]] && ! [[ "${nv_SOVER}" = "${nv_LIBNAME}" ]]; then
1524 - dosym ${nv_LIBNAME} ${nv_DEST}/${nv_SOVER} \
1525 - || die "failed to create ${nv_DEST}/${nv_SOVER} symlink"
1526 - fi
1527 -
1528 - dosym ${nv_LIBNAME} ${nv_DEST}/${nv_LIBNAME/.so*/.so} \
1529 - || die "failed to create ${nv_LIBNAME/.so*/.so} symlink"
1530 -}
1531 -
1532 -src_install() {
1533 - if use driver && use kernel_linux; then
1534 - linux-mod_src_install
1535 -
1536 - # Add the aliases
1537 - # This file is tweaked with the appropriate video group in
1538 - # pkg_preinst, see bug #491414
1539 - insinto /etc/modprobe.d
1540 - newins "${FILESDIR}"/nvidia-169.07 nvidia.conf
1541 - doins "${FILESDIR}"/nvidia-rmmod.conf
1542 -
1543 - # Ensures that our device nodes are created when not using X
1544 - exeinto "$(get_udevdir)"
1545 - newexe "${FILESDIR}"/nvidia-udev.sh-r1 nvidia-udev.sh
1546 - udev_newrules "${FILESDIR}"/nvidia.udev-rule 99-nvidia.rules
1547 - elif use kernel_FreeBSD; then
1548 - if use x86-fbsd; then
1549 - insinto /boot/modules
1550 - doins "${S}/src/nvidia.kld"
1551 - fi
1552 -
1553 - exeinto /boot/modules
1554 - doexe "${S}/src/nvidia.ko"
1555 - fi
1556 -
1557 - # NVIDIA kernel <-> userspace driver config lib
1558 - donvidia ${NV_OBJ}/libnvidia-cfg.so.${NV_SOVER}
1559 -
1560 - # NVIDIA framebuffer capture library
1561 - donvidia ${NV_OBJ}/libnvidia-fbc.so.${NV_SOVER}
1562 -
1563 - # NVIDIA video encode/decode <-> CUDA
1564 - if use kernel_linux; then
1565 - donvidia ${NV_OBJ}/libnvcuvid.so.${NV_SOVER}
1566 - donvidia ${NV_OBJ}/libnvidia-encode.so.${NV_SOVER}
1567 - fi
1568 -
1569 - if use X; then
1570 - # Xorg DDX driver
1571 - insinto /usr/$(get_libdir)/xorg/modules/drivers
1572 - doins ${NV_X11}/nvidia_drv.so
1573 -
1574 - # Xorg GLX driver
1575 - donvidia ${NV_X11}/libglxserver_nvidia.so.${NV_SOVER} \
1576 - /usr/$(get_libdir)/xorg/modules/extensions
1577 -
1578 - # Xorg nvidia.conf
1579 - if has_version '>=x11-base/xorg-server-1.16'; then
1580 - insinto /usr/share/X11/xorg.conf.d
1581 - newins {,50-}nvidia-drm-outputclass.conf
1582 - fi
1583 -
1584 - insinto /usr/share/glvnd/egl_vendor.d
1585 - doins ${NV_X11}/10_nvidia.json
1586 - fi
1587 -
1588 - if use wayland; then
1589 - insinto /usr/share/egl/egl_external_platform.d
1590 - doins ${NV_X11}/10_nvidia_wayland.json
1591 - fi
1592 -
1593 - # OpenCL ICD for NVIDIA
1594 - if use kernel_linux; then
1595 - insinto /etc/OpenCL/vendors
1596 - doins ${NV_OBJ}/nvidia.icd
1597 - fi
1598 -
1599 - # Documentation
1600 - if use kernel_FreeBSD; then
1601 - dodoc "${NV_DOC}/README"
1602 - use X && doman "${NV_MAN}"/nvidia-xconfig.1
1603 - use tools && doman "${NV_MAN}"/nvidia-settings.1
1604 - else
1605 - # Docs
1606 - newdoc "${NV_DOC}/README.txt" README
1607 - dodoc "${NV_DOC}/NVIDIA_Changelog"
1608 - doman "${NV_MAN}"/nvidia-smi.1
1609 - use X && doman "${NV_MAN}"/nvidia-xconfig.1
1610 - use tools && doman "${NV_MAN}"/nvidia-settings.1
1611 - doman "${NV_MAN}"/nvidia-cuda-mps-control.1
1612 - fi
1613 -
1614 - docinto html
1615 - dodoc -r ${NV_DOC}/html/*
1616 -
1617 - # Helper Apps
1618 - exeinto /opt/bin/
1619 -
1620 - if use X; then
1621 - doexe ${NV_OBJ}/nvidia-xconfig
1622 -
1623 - insinto /etc/vulkan/icd.d
1624 - doins nvidia_icd.json
1625 - fi
1626 -
1627 - if use kernel_linux; then
1628 - doexe ${NV_OBJ}/nvidia-cuda-mps-control
1629 - doexe ${NV_OBJ}/nvidia-cuda-mps-server
1630 - doexe ${NV_OBJ}/nvidia-debugdump
1631 - doexe ${NV_OBJ}/nvidia-persistenced
1632 - doexe ${NV_OBJ}/nvidia-smi
1633 -
1634 - # install nvidia-modprobe setuid and symlink in /usr/bin (bug #505092)
1635 - doexe ${NV_OBJ}/nvidia-modprobe
1636 - fowners root:video /opt/bin/nvidia-modprobe
1637 - fperms 4710 /opt/bin/nvidia-modprobe
1638 - dosym /{opt,usr}/bin/nvidia-modprobe
1639 -
1640 - doman nvidia-cuda-mps-control.1
1641 - doman nvidia-modprobe.1
1642 - doman nvidia-persistenced.1
1643 - newinitd "${FILESDIR}/nvidia-smi.init" nvidia-smi
1644 - newconfd "${FILESDIR}/nvidia-persistenced.conf" nvidia-persistenced
1645 - newinitd "${FILESDIR}/nvidia-persistenced.init" nvidia-persistenced
1646 - fi
1647 -
1648 - if use tools; then
1649 - emake -C "${S}"/nvidia-settings-${PV}/src/ \
1650 - DESTDIR="${D}" \
1651 - GTK3_AVAILABLE=$(usex gtk3 1 0) \
1652 - LIBDIR="${D}/usr/$(get_libdir)" \
1653 - NV_USE_BUNDLED_LIBJANSSON=0 \
1654 - NV_VERBOSE=1 \
1655 - PREFIX=/usr \
1656 - DO_STRIP= \
1657 - install
1658 -
1659 - if use static-libs; then
1660 - dolib.a "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/libXNVCtrl.a
1661 -
1662 - insinto /usr/include/NVCtrl
1663 - doins "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/*.h
1664 - fi
1665 -
1666 - insinto /usr/share/nvidia/
1667 - doins nvidia-application-profiles-${PV}-key-documentation
1668 -
1669 - insinto /etc/nvidia
1670 - newins \
1671 - nvidia-application-profiles-${PV}-rc nvidia-application-profiles-rc
1672 -
1673 - # There is no icon in the FreeBSD tarball.
1674 - use kernel_FreeBSD || \
1675 - doicon ${NV_OBJ}/nvidia-settings.png
1676 -
1677 - domenu "${FILESDIR}"/nvidia-settings.desktop
1678 -
1679 - exeinto /etc/X11/xinit/xinitrc.d
1680 - newexe "${FILESDIR}"/95-nvidia-settings-r1 95-nvidia-settings
1681 - fi
1682 -
1683 - dobin ${NV_OBJ}/nvidia-bug-report.sh
1684 -
1685 - if has_multilib_profile && use multilib; then
1686 - local OABI=${ABI}
1687 - for ABI in $(get_install_abis); do
1688 - src_install-libs
1689 - done
1690 - ABI=${OABI}
1691 - unset OABI
1692 - else
1693 - src_install-libs
1694 - fi
1695 -
1696 - is_final_abi || die "failed to iterate through all ABIs"
1697 -
1698 - readme.gentoo_create_doc
1699 -}
1700 -
1701 -src_install-libs() {
1702 - local inslibdir=$(get_libdir)
1703 - local GL_ROOT="/usr/$(get_libdir)/opengl/nvidia/lib"
1704 - local CL_ROOT="/usr/$(get_libdir)/OpenCL/vendors/nvidia"
1705 - local nv_libdir="${NV_OBJ}"
1706 -
1707 - if use kernel_linux && has_multilib_profile && [[ ${ABI} == "x86" ]]; then
1708 - nv_libdir="${NV_OBJ}"/32
1709 - fi
1710 -
1711 - if use X; then
1712 - NV_GLX_LIBRARIES=(
1713 - "libEGL.so.$(usex compat ${NV_SOVER} 1.1.0) ${GL_ROOT}"
1714 - "libEGL_nvidia.so.${NV_SOVER} ${GL_ROOT}"
1715 - "libGL.so.$(usex compat ${NV_SOVER} 1.7.0) ${GL_ROOT}"
1716 - "libGLESv1_CM.so.1.2.0 ${GL_ROOT}"
1717 - "libGLESv1_CM_nvidia.so.${NV_SOVER} ${GL_ROOT}"
1718 - "libGLESv2.so.2.1.0 ${GL_ROOT}"
1719 - "libGLESv2_nvidia.so.${NV_SOVER} ${GL_ROOT}"
1720 - "libGLX.so.0 ${GL_ROOT}"
1721 - "libGLX_nvidia.so.${NV_SOVER} ${GL_ROOT}"
1722 - "libGLdispatch.so.0 ${GL_ROOT}"
1723 - "libOpenCL.so.1.0.0 ${CL_ROOT}"
1724 - "libOpenGL.so.0 ${GL_ROOT}"
1725 - "libcuda.so.${NV_SOVER}"
1726 - "libnvcuvid.so.${NV_SOVER}"
1727 - "libnvidia-compiler.so.${NV_SOVER}"
1728 - "libnvidia-eglcore.so.${NV_SOVER}"
1729 - "libnvidia-encode.so.${NV_SOVER}"
1730 - "libnvidia-fatbinaryloader.so.${NV_SOVER}"
1731 - "libnvidia-fbc.so.${NV_SOVER}"
1732 - "libnvidia-glcore.so.${NV_SOVER}"
1733 - "libnvidia-glsi.so.${NV_SOVER}"
1734 - "libnvidia-glvkspirv.so.${NV_SOVER}"
1735 - "libnvidia-ifr.so.${NV_SOVER}"
1736 - "libnvidia-opencl.so.${NV_SOVER}"
1737 - "libnvidia-ptxjitcompiler.so.${NV_SOVER}"
1738 - "libvdpau_nvidia.so.${NV_SOVER}"
1739 - )
1740 -
1741 - if use wayland && has_multilib_profile && [[ ${ABI} == "amd64" ]];
1742 - then
1743 - NV_GLX_LIBRARIES+=(
1744 - "libnvidia-egl-wayland.so.1.1.0"
1745 - )
1746 - fi
1747 -
1748 - if use kernel_linux && has_multilib_profile && [[ ${ABI} == "amd64" ]];
1749 - then
1750 - NV_GLX_LIBRARIES+=(
1751 - "libnvidia-wfb.so.${NV_SOVER}"
1752 - )
1753 - fi
1754 -
1755 - if use kernel_FreeBSD; then
1756 - NV_GLX_LIBRARIES+=(
1757 - "libnvidia-tls.so.${NV_SOVER}"
1758 - )
1759 - fi
1760 -
1761 - if use kernel_linux; then
1762 - NV_GLX_LIBRARIES+=(
1763 - "libnvidia-ml.so.${NV_SOVER}"
1764 - "libnvidia-tls.so.${NV_SOVER}"
1765 - )
1766 - fi
1767 -
1768 - if use kernel_linux && has_multilib_profile && [[ ${ABI} == "amd64" ]];
1769 - then
1770 - NV_GLX_LIBRARIES+=(
1771 - "libnvidia-cbl.so.${NV_SOVER}"
1772 - "libnvidia-rtcore.so.${NV_SOVER}"
1773 - "libnvoptix.so.${NV_SOVER}"
1774 - )
1775 - fi
1776 -
1777 - for NV_LIB in "${NV_GLX_LIBRARIES[@]}"; do
1778 - donvidia "${nv_libdir}"/${NV_LIB}
1779 - done
1780 - fi
1781 -}
1782 -
1783 -pkg_preinst() {
1784 - if use driver && use kernel_linux; then
1785 - linux-mod_pkg_preinst
1786 -
1787 - local videogroup="$(egetent group video | cut -d ':' -f 3)"
1788 - if [ -z "${videogroup}" ]; then
1789 - eerror "Failed to determine the video group gid"
1790 - die "Failed to determine the video group gid"
1791 - else
1792 - sed -i \
1793 - -e "s:PACKAGE:${PF}:g" \
1794 - -e "s:VIDEOGID:${videogroup}:" \
1795 - "${D}"/etc/modprobe.d/nvidia.conf || die
1796 - fi
1797 - fi
1798 -
1799 - # Clean the dynamic libGL stuff's home to ensure
1800 - # we dont have stale libs floating around
1801 - if [ -d "${ROOT}"/usr/lib/opengl/nvidia ]; then
1802 - rm -rf "${ROOT}"/usr/lib/opengl/nvidia/*
1803 - fi
1804 - # Make sure we nuke the old nvidia-glx's env.d file
1805 - if [ -e "${ROOT}"/etc/env.d/09nvidia ]; then
1806 - rm -f "${ROOT}"/etc/env.d/09nvidia
1807 - fi
1808 -}
1809 -
1810 -pkg_postinst() {
1811 - use driver && use kernel_linux && linux-mod_pkg_postinst
1812 -
1813 - # Switch to the nvidia implementation
1814 - use X && "${ROOT}"/usr/bin/eselect opengl set --use-old nvidia
1815 - "${ROOT}"/usr/bin/eselect opencl set --use-old nvidia
1816 -
1817 - readme.gentoo_print_elog
1818 -
1819 - if ! use X; then
1820 - elog "You have elected to not install the X.org driver. Along with"
1821 - elog "this the OpenGL libraries and VDPAU libraries were not"
1822 - elog "installed. Additionally, once the driver is loaded your card"
1823 - elog "and fan will run at max speed which may not be desirable."
1824 - elog "Use the 'nvidia-smi' init script to have your card and fan"
1825 - elog "speed scale appropriately."
1826 - elog
1827 - fi
1828 - if ! use tools; then
1829 - elog "USE=tools controls whether the nvidia-settings application"
1830 - elog "is installed. If you would like to use it, enable that"
1831 - elog "flag and re-emerge this ebuild. Optionally you can install"
1832 - elog "media-video/nvidia-settings"
1833 - elog
1834 - fi
1835 -}
1836 -
1837 -pkg_prerm() {
1838 - use X && "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11
1839 -}
1840 -
1841 -pkg_postrm() {
1842 - use driver && use kernel_linux && linux-mod_pkg_postrm
1843 - use X && "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11
1844 -}