Gentoo Archives: gentoo-commits

From: Ionen Wolkens <ionen@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: x11-drivers/nvidia-drivers/
Date: Wed, 30 Mar 2022 07:16:58
Message-Id: 1648623320.985044d433b8c287550ea91f6f424110c90502c7.ionen@gentoo
1 commit: 985044d433b8c287550ea91f6f424110c90502c7
2 Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
3 AuthorDate: Wed Mar 30 06:48:30 2022 +0000
4 Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
5 CommitDate: Wed Mar 30 06:55:20 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=985044d4
7
8 x11-drivers/nvidia-drivers: drop 510.54
9
10 510.60.02 been uneventful and gnome issues weren't related to it,
11 shouldn't need to keep this version.
12
13 Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>
14
15 x11-drivers/nvidia-drivers/Manifest | 7 -
16 .../nvidia-drivers/nvidia-drivers-510.54.ebuild | 457 ---------------------
17 2 files changed, 464 deletions(-)
18
19 diff --git a/x11-drivers/nvidia-drivers/Manifest b/x11-drivers/nvidia-drivers/Manifest
20 index 078ff6a37ec6..614b46e1a117 100644
21 --- a/x11-drivers/nvidia-drivers/Manifest
22 +++ b/x11-drivers/nvidia-drivers/Manifest
23 @@ -1,28 +1,21 @@
24 -DIST NVIDIA-Linux-aarch64-510.54.run 211311685 BLAKE2B 506841254f9c9e78ee76bb32b17bc0e6f9934d0e6a565733d6e42605f1a7a2b9a12d999873851592f025e827f4177012c319baab5c0fc5cd1cf9f6f48590bc7b SHA512 9d872748dc0957c0754561582a1984a8f912c345a5e616116edfd86d629efb5674c29723c80ae47d458b23aaec6fc5a71724441dd7e11ba4f5b94f8b04591f81
25 DIST NVIDIA-Linux-aarch64-510.60.02.run 211374897 BLAKE2B 76f31f07f3eb1b0de7a46bab72ef13316ffd18945f824a2d30200d852dbf5de155cd4cf6ec46638b00df9bcd34218f9f7f546b579da5e79561f467f68b20537f SHA512 fca54ba6abff197dbce55761a4755e98aebd16a851b54ba072c2a10296eadc7924adc102be6599d16052d94d9a0a4e260a0d63a098e039afe46210c65dfb3b32
26 DIST NVIDIA-Linux-x86-390.147.run 49303088 BLAKE2B 5a3a02b88af1ee8699b0c6c3fa222d9176338f10437a88c874126c7bacf64ddc44d03d8a44542cba989129af6336e46cae775713458a16d78ea75e4e004dfffb SHA512 c5d47e2a8c034e158093feeefa2455ec49d676fbd1700118aedba0c3b84be4e2060402d0e27e50d1a674de10f369f8e5ca2da8c61f1d0560d2105d33d7238359
27 DIST NVIDIA-Linux-x86_64-390.147.run 85930997 BLAKE2B a8085c9abc1c31251788a8f5abdc2090c9085b3028e364184244bbf24d822dc3266877c88b30f403507fa2dd511c68ec67e1f188d6b0f1f4d7d792881d5253fc SHA512 0d8bda32e916d71da2ea74bc12a4f3cb0a0c2ddda27511cf3c89bbf4aeb28db68f6b7261639d88dd1c0180b91213c09de930d233158268c5d9ab3b223510e964
28 DIST NVIDIA-Linux-x86_64-470.103.01.run 272484410 BLAKE2B 42a19ed990f49d4ceefc1006f3e6e4b69135ad2aaf497c648b9afe7941a81aba3a51296cb14bc419352cdf70f850484d2a55784184fdb820186193501422d742 SHA512 3dc19774a6fef5e6ec0cb9451df4268f77cb31b0a9ede253bf9cf805a048ad457a7bfec852aaeab3e3e297b3353840a3d6c9c7ddc75d57b2b000ab4e0b15530b
29 DIST NVIDIA-Linux-x86_64-470.62.26.run 272619538 BLAKE2B dd68260661473b5d6a10be42eac376d662e9656ab63b24442f8aab4f7bfd916f6255650f931334fedb3c3023acbd2512a9bbaf698a01a0c3ea40d7eee84014bc SHA512 13cd30cea4c7390ea7e0c0a41842258b488082b358b0d9a13c21637b79efe470ae6ee4e86902ba81d01cb6be0700449c6f545d87aca2708f62be22530d41b693
30 -DIST NVIDIA-Linux-x86_64-510.54.run 328899755 BLAKE2B b83ebb1c978f902812d7dae2170eadfa1d52d36dc1e9ed61001c0483743ad8094268f101a4414353936339a4d064d54ad41cc229906ee7dbef3aa56af5315764 SHA512 1e65e96c1ae1cccd5cd483f2b65927e3594d28f3774459dfd094530f445f4b0f5368a3b7eebf4970bd2632438cca2cbb93af50a59a3a87a2c13d08ed5155164c
31 DIST NVIDIA-Linux-x86_64-510.60.02.run 328284028 BLAKE2B 9165e4763a34c3cf474c18dae7d2c548bb6d4edc21507afe67d046959e9f3fb758cf507dcdffcfbc0bf70cf2b677a193429127b3fe589af329fe6a671ac51e6f SHA512 ccc459bdf5f89a37f79a1831bac8c03980deaa13082b516d5e9c74a49e1aea7f1f6b03304705a95564a390bf0ca38df10b8c8b73e3470a31444dd5ebfd981cfd
32 DIST nvidia-installer-390.147.tar.bz2 150157 BLAKE2B 3bf5317aaa3bdb0e6dc3b3e21ad3dbacf6dc782a643b0fa9badf354361891ab25660b57dd408e346f219d469af317a4851937e1cb77ffe59a39e9d98a92f3a40 SHA512 24bd8a2959062551abf2ea039ac95eba224d58c175f59f1386a6d43459ad43b2bddf17f00b53c1c71c45eca3b7a2281dcf05cc65030f6f8bed16d0f0b9f9c282
33 DIST nvidia-installer-470.103.01.tar.bz2 146121 BLAKE2B 06da3693cf8edba849b802f2255dcf2086ba3846f83ef19a02cb813ea2c07a6904f8a49e263018fb8b40c9fece7ab4422d95a50d12030ae6815ec60a7edac055 SHA512 b080f32394a6163c34e152561b80cca9277a53e0b38c5225b91daddc2169403e2ff4cf63a30b488ee0c3a954b21d32065b5624fb9dd33e672313909b9096de02
34 -DIST nvidia-installer-510.54.tar.bz2 144392 BLAKE2B 0938d0dca690af563d253252cc7dfcfb5f666c4ee880f93a13a74870b69d2fec4a2c277aff870363318d11d63ba725ff74bad07a1ce357a0479eb673c2883064 SHA512 2d65a2fa4734e1f8364b3802125d489d93f10965b3de4828743c91ba8d93efb264405ca35958023d66f558614ece6751a1fdb7cf8ac6baf487058c53b1b00b18
35 DIST nvidia-installer-510.60.02.tar.gz 199713 BLAKE2B 47f763effc9305fa267e9c3712cdb75f9d2c1ba77ff150b6e385a4137349f9dc11bd54c6ace257d5f597cb7ac3977e37c42c8dc9de85c2382e0fee26fd9fdfc9 SHA512 c4b50d90d9eb411612daffc8c04a7e82df911eeedc25fafc6fda0f618c0bdae3d134cb88870e580bd4a01d66a1e43d9d8f6d6a72486284176deff872b443c7a2
36 DIST nvidia-modprobe-390.147.tar.bz2 35340 BLAKE2B acb49dea0c5d9d802b7c2f9f8127106bd6f9e2aaa7875941ca94c1d81377411e8d9c53357e7f9aa0170c87e349f6379a45391965e7897d0158951a4c0056a835 SHA512 a731fc990557f40fdd0fba45bcfeb99c315d0579a2d2f49bf6f84c55c91f52a9e65c358bc5a3882483ab8e9d66b546de31adcaba46a494bfc0836a0690c3d0db
37 DIST nvidia-modprobe-470.103.01.tar.bz2 38347 BLAKE2B bd86b8f76d040ea9bad06312b24d839413515c24867e88174d40e9dd0d9006d42fa57f8e789a8a0e8859dd1c1122ef6e57ea25fdda08eedcba10d9291181245c SHA512 ea86b083dd82ff7d8926d337f2aeccbd73cd614a85579cfcbb4ad7225565aa54f151e6d2b5d35b96eb413c3673158025348416193db5045809d743cc98d65281
38 -DIST nvidia-modprobe-510.54.tar.bz2 39062 BLAKE2B 1c218ab42de9a7eea274d633b2a4ac0e9412272e5d287e00233f306b7c7598e11e605d646297ba7c345a3b436486ed202561f6815b61e178c9e3a235ccb613ee SHA512 e3ab7bd4e4c56825ad7f81f1d1b85af6a2eba64cd7cdcf5617e58083cf5dbd53abb1a6c61c1db54e497b6b3517159a3fc6a54f24636ca8da0433c167b9446cea
39 DIST nvidia-modprobe-510.60.02.tar.gz 44318 BLAKE2B 0eda5a6720d21c483c4bc71e1a1140ff48ed731a1a71e77012a2eda96299644133b3e482063969f709c290ef5e06f5db81deae8e9cf7204a2a8e394d7058b3af SHA512 c02d35175ae0fb661b4998686bcfd44a26969257d184c1ba7f11955adb17a7034cbf747c356cc7bb927a6ba6f0f3a0a8375a8ff4e56ea767e26cf968080eae36
40 DIST nvidia-persistenced-390.147.tar.bz2 48712 BLAKE2B d8b2587c8b4374dcff198d8aae1468d30197d9b097badddbec34f0c41e3c4ab4f27b568f152a4c7a4416b3ee15194ae07442c45c50d086a6f4e7e69a5c54f42d SHA512 5877f7b0a40d54b1ca746b2fa1f1270d1ff605068dcf944e078d4cb547bc6f79c08ea9d4fbe3e94e8cd528b9721a89147d43ac849df71b2dc1d903fe1439c4a5
41 DIST nvidia-persistenced-470.103.01.tar.bz2 46549 BLAKE2B ad25193ba3abe1a5a30233aedb1596822a4af1aa74e6862c4449567408bd84ab40526301f600bfeae938c443f26dfdabd7f912888cfd2e307fc7867d7750180e SHA512 00ab77bb84b90bfeced488353db674334796b10bbd9c8da9ed682d668db800aa7bbcba20033d21bbee6663f0659dd17daf3298cb1384f41a89409a5f3a162de6
42 -DIST nvidia-persistenced-510.54.tar.bz2 47096 BLAKE2B e7e78ad6f31964e6ee3854ce663f37f200171ab09ad1ac2749e069eace14f7ab821cb11682de614f9b22c4185b6d976308981a4724ec82ac684f307762ebb018 SHA512 52b94b51451d26984209e720aef236f3096cee80e29ff011ebd214247db0550b34e64baf59219065fcb8d005b105a685b042e029bb487ff0d16a5d908176b0eb
43 DIST nvidia-persistenced-510.60.02.tar.gz 54682 BLAKE2B fe04a72a1a572e443031bcbff2c328d45e0a5dd1dc9345b88c5095741e343418ccf9e32d63542e27b0c1ea7c51c4f86c9d2154ae7ccd131a941f27291714c369 SHA512 d31c07b1f29a8bf7074584550e68a53ad21c2b7378f9934c1302b96341aabc4360a910bbd7cab6b09fbc0c92685613660d088c5f50ec5b787e2c4aa4742cc865
44 DIST nvidia-settings-390.147.tar.bz2 1109104 BLAKE2B b0a2e0c832901db65f41e54d66d61abd9afbc528d1e8095e314d7ce5c1bf73c7bc8cc1857d909d9eab2e3b9ee97831c15c52f2725a8c9f84e00416c4e3db23d1 SHA512 67c30df042b9a9b923f05a26bd2e0bd85487fab0fe2c730ac48025561d652ff0f7455a56cc7951ed8ba2a300e019fa0e52fcd912b644d0d88fd2ac0e63de2327
45 DIST nvidia-settings-470.103.01.tar.bz2 1062124 BLAKE2B a9b95174a2309668951bb090812c9d2098d7bdefa210b396523eb59887fb3ea62f517398ab63cc9cfb395f90e6535c308fd43fb0ac406afba17713e01e98b19d SHA512 62be59eae75965762b5caf6bfb71ca993ee23cc0d12d385a7e67e62c8f9180555078dfae736cc6d6bc0b52525780e32e0b76152c5e4a1be669c6dd181c0f2465
46 -DIST nvidia-settings-510.54.tar.bz2 1075596 BLAKE2B b91094ed2da276738e5264e5ae001e3c3d5a0c8c8a086cea5c4fb6541f3b3c3d86bb523921498ffc99edf5c0bcaaa7b4d1ee0b95f8263b0d87b34fff54c61728 SHA512 02251364ca0aa4a7a06c6faa047b4fa12621f361bcd0236ce6b9544899aa718440d7f72996f3b1a9a958b6cbbc78ebe5bc5070c00705947e92d3b279e64cf042
47 DIST nvidia-settings-510.60.02.tar.gz 1247321 BLAKE2B 0d52a730bc50db58aaf2df435b49a7dd036027ae0da0418c96b85e7e0ce793185d40eeb59b4bf2a03187999c047b9da38ecf86942e9095496546c0dedfe63ea8 SHA512 ca2c53854ce07c3ba5c6878ed069518497365cdfab8972406435d168eb3840b767dc49b9d0ecad79ee3160abccb73c494fbbbc3101b1e4f21acf34f31f379339
48 DIST nvidia-xconfig-390.147.tar.bz2 107426 BLAKE2B c7004dab351581176a4e00fc099a12374cb29f3306769724c874a17600d6c11e79ac807fe218022d72ccf83ed33789d2378b0cdba35e5f94458e30631d725384 SHA512 a530c649ff7e75706ba37072ee58d64d4758348a45b953396a0e9d2608e1d7c3d299298cb50b1e8ee0bf2f6f8817bca64637b77e18aab0685a4edd630f18fb9a
49 DIST nvidia-xconfig-470.103.01.tar.bz2 108687 BLAKE2B 2e5de637f9ba7bb516fd1a6801f8ee5be2934f99503bd20a62eaf87c0105d7624ef8de993614b1316ea8d203f9b7a6be07d3c9d5005d8a6306b7fc89cc0bb443 SHA512 abbabb3bf650395237759cbfaa39565893156ae87d07855bc96bfa0f46e10f34fd9efb628ef184f4dd525f80c63c62938b9661c9a4f3f5e1e5420ae1fdf26f0e
50 -DIST nvidia-xconfig-510.54.tar.bz2 109736 BLAKE2B 3951aab72cef525fc5b9d9794ca78ce72ab2257aec4fe7e07ad2975e92991d78080eeedd936d033803b57544480609206c6c8032ae636ca2290e69aa06f0cd72 SHA512 70f71a8be805819eb9cd7ceb51a6cf17408e45dc8d5d25b250b205c785b90459b263eb8340c708fd473eb2563753e3d8808138a2db7e21807d74fc718d787b0c
51 DIST nvidia-xconfig-510.60.02.tar.gz 144024 BLAKE2B ce0b858bb41db589d04dd5bc19f0bd83a35e337fa00834b04cc215497dd1ca9906b3277378be51d6c124ff1b2574e0a3d5163d41e6c8e4f2b06f71ee15aeeb88 SHA512 77eeb06639d903f91d256ed2955ee813a8f70aa3336b98c9f1d7258523f2dc806c81ba5e26325f799722adcf8993f947113381bea40ee94d9f342475390eb3d7
52
53 diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-510.54.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-510.54.ebuild
54 deleted file mode 100644
55 index bfe63032d41d..000000000000
56 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-510.54.ebuild
57 +++ /dev/null
58 @@ -1,457 +0,0 @@
59 -# Copyright 1999-2022 Gentoo Authors
60 -# Distributed under the terms of the GNU General Public License v2
61 -
62 -EAPI=8
63 -
64 -MODULES_OPTIONAL_USE="driver"
65 -inherit desktop flag-o-matic linux-mod multilib readme.gentoo-r1 \
66 - systemd toolchain-funcs unpacker
67 -
68 -NV_KERNEL_MAX="5.17"
69 -NV_URI="https://download.nvidia.com/XFree86/"
70 -
71 -DESCRIPTION="NVIDIA Accelerated Graphics Driver"
72 -HOMEPAGE="https://www.nvidia.com/download/index.aspx"
73 -SRC_URI="
74 - amd64? ( ${NV_URI}Linux-x86_64/${PV}/NVIDIA-Linux-x86_64-${PV}.run )
75 - arm64? ( ${NV_URI}Linux-aarch64/${PV}/NVIDIA-Linux-aarch64-${PV}.run )
76 - $(printf "${NV_URI}%s/%s-${PV}.tar.bz2 " \
77 - nvidia-{installer,modprobe,persistenced,settings,xconfig}{,})"
78 -# nvidia-installer is unused but here for GPL-2's "distribute sources"
79 -S="${WORKDIR}"
80 -
81 -LICENSE="NVIDIA-r2 BSD BSD-2 GPL-2 MIT ZLIB curl openssl"
82 -SLOT="0/${PV%%.*}"
83 -KEYWORDS="-* ~amd64 ~arm64"
84 -IUSE="+X abi_x86_32 abi_x86_64 +driver persistenced +static-libs +tools wayland"
85 -
86 -COMMON_DEPEND="
87 - acct-group/video
88 - sys-libs/glibc
89 - X? ( x11-libs/libpciaccess )
90 - persistenced? (
91 - acct-user/nvpd
92 - net-libs/libtirpc:=
93 - )
94 - tools? (
95 - dev-libs/atk
96 - dev-libs/glib:2
97 - dev-libs/jansson:=
98 - media-libs/harfbuzz:=
99 - x11-libs/cairo
100 - x11-libs/gdk-pixbuf:2
101 - x11-libs/gtk+:3
102 - x11-libs/libX11
103 - x11-libs/libXext
104 - x11-libs/libXxf86vm
105 - x11-libs/pango
106 - )"
107 -RDEPEND="
108 - ${COMMON_DEPEND}
109 - X? (
110 - media-libs/libglvnd[X,abi_x86_32(-)?]
111 - x11-libs/libX11[abi_x86_32(-)?]
112 - x11-libs/libXext[abi_x86_32(-)?]
113 - )
114 - wayland? (
115 - gui-libs/egl-gbm
116 - >=gui-libs/egl-wayland-1.1.7-r1
117 - media-libs/libglvnd
118 - )"
119 -DEPEND="
120 - ${COMMON_DEPEND}
121 - static-libs? (
122 - x11-libs/libX11
123 - x11-libs/libXext
124 - )
125 - tools? (
126 - media-libs/libglvnd
127 - sys-apps/dbus
128 - x11-base/xorg-proto
129 - x11-libs/libXrandr
130 - x11-libs/libXv
131 - x11-libs/libvdpau
132 - )"
133 -BDEPEND="
134 - sys-devel/m4
135 - virtual/pkgconfig"
136 -
137 -QA_PREBUILT="lib/firmware/* opt/bin/* usr/lib*"
138 -
139 -PATCHES=(
140 - "${FILESDIR}"/nvidia-modprobe-390.141-uvm-perms.patch
141 - "${FILESDIR}"/nvidia-settings-390.144-desktop.patch
142 - "${FILESDIR}"/nvidia-settings-390.144-no-gtk2.patch
143 - "${FILESDIR}"/nvidia-settings-390.144-raw-ldflags.patch
144 -)
145 -
146 -pkg_setup() {
147 - use driver || return
148 -
149 - local CONFIG_CHECK="
150 - PROC_FS
151 - ~DRM_KMS_HELPER
152 - ~SYSVIPC
153 - ~!LOCKDEP
154 - ~!SLUB_DEBUG_ON
155 - !DEBUG_MUTEXES"
156 - local ERROR_DRM_KMS_HELPER="CONFIG_DRM_KMS_HELPER: is not set but needed for Xorg auto-detection
157 - of drivers (no custom config), and for wayland / nvidia-drm.modeset=1.
158 - Cannot be directly selected in the kernel's menuconfig, and may need
159 - selection of a DRM device even if unused, e.g. CONFIG_DRM_AMDGPU=m or
160 - DRM_I915=y, DRM_NOUVEAU=m also acceptable if a module and not built-in."
161 -
162 - use amd64 && kernel_is -ge 5 8 && CONFIG_CHECK+=" X86_PAT" #817764
163 -
164 - MODULE_NAMES="
165 - nvidia(video:kernel)
166 - nvidia-drm(video:kernel)
167 - nvidia-modeset(video:kernel)
168 - nvidia-peermem(video:kernel)
169 - nvidia-uvm(video:kernel)"
170 -
171 - linux-mod_pkg_setup
172 -
173 - [[ ${MERGE_TYPE} == binary ]] && return
174 -
175 - BUILD_PARAMS='NV_VERBOSE=1 IGNORE_CC_MISMATCH=yes SYSSRC="${KV_DIR}" SYSOUT="${KV_OUT_DIR}"'
176 - BUILD_TARGETS="modules"
177 -
178 - if linux_chkconfig_present CC_IS_CLANG; then
179 - ewarn "Warning: building ${PN} with a clang-built kernel is experimental"
180 -
181 - BUILD_PARAMS+=' CC=${CHOST}-clang'
182 - if linux_chkconfig_present LD_IS_LLD; then
183 - BUILD_PARAMS+=' LD=ld.lld'
184 - if linux_chkconfig_present LTO_CLANG_THIN; then
185 - # kernel enables cache by default leading to sandbox violations
186 - BUILD_PARAMS+=' ldflags-y=--thinlto-cache-dir= LDFLAGS_MODULE=--thinlto-cache-dir='
187 - fi
188 - fi
189 - fi
190 -
191 - if kernel_is -gt ${NV_KERNEL_MAX/./ }; then
192 - ewarn "Kernel ${KV_MAJOR}.${KV_MINOR} is either known to break this version of ${PN}"
193 - ewarn "or was not tested with it. It is recommended to use one of:"
194 - ewarn " <=sys-kernel/gentoo-kernel-${NV_KERNEL_MAX}.x"
195 - ewarn " <=sys-kernel/gentoo-sources-${NV_KERNEL_MAX}.x"
196 - ewarn "You are free to try or use /etc/portage/patches, but support will"
197 - ewarn "not be given and issues wait until NVIDIA releases a fixed version."
198 - ewarn
199 - ewarn "Do _not_ file a bug report if run into issues."
200 - ewarn
201 - fi
202 -}
203 -
204 -src_prepare() {
205 - # make patches usable across versions
206 - rm nvidia-modprobe && mv nvidia-modprobe{-${PV},} || die
207 - rm nvidia-persistenced && mv nvidia-persistenced{-${PV},} || die
208 - rm nvidia-settings && mv nvidia-settings{-${PV},} || die
209 - rm nvidia-xconfig && mv nvidia-xconfig{-${PV},} || die
210 -
211 - default
212 -
213 - # prevent detection of incomplete kernel DRM support (bug #603818)
214 - sed 's/defined(CONFIG_DRM/defined(CONFIG_DRM_KMS_HELPER/g' \
215 - -i kernel/conftest.sh || die
216 -
217 - # adjust service files
218 - sed 's/__USER__/nvpd/' \
219 - nvidia-persistenced/init/systemd/nvidia-persistenced.service.template \
220 - > "${T}"/nvidia-persistenced.service || die
221 - use !amd64 || sed -i "s|/usr|${EPREFIX}/opt|" systemd/system/nvidia-powerd.service || die
222 -
223 - # enable nvidia-drm.modeset=1 by default with USE=wayland
224 - cp "${FILESDIR}"/nvidia-470.conf "${T}"/nvidia.conf || die
225 - use !wayland || sed -i '/^#.*modeset=1$/s/^#//' "${T}"/nvidia.conf || die
226 -}
227 -
228 -src_compile() {
229 - tc-export AR CC LD OBJCOPY
230 -
231 - NV_ARGS=(
232 - PREFIX="${EPREFIX}"/usr
233 - HOST_CC="$(tc-getBUILD_CC)"
234 - HOST_LD="$(tc-getBUILD_LD)"
235 - NV_USE_BUNDLED_LIBJANSSON=0
236 - NV_VERBOSE=1 DO_STRIP= MANPAGE_GZIP= OUTPUTDIR=out
237 - )
238 -
239 - use driver && linux-mod_src_compile
240 -
241 - emake "${NV_ARGS[@]}" -C nvidia-modprobe
242 - use persistenced && emake "${NV_ARGS[@]}" -C nvidia-persistenced
243 - use X && emake "${NV_ARGS[@]}" -C nvidia-xconfig
244 -
245 - if use tools; then
246 - # cflags: avoid noisy logs, only use here and set first to let override
247 - # ldflags: abi currently needed if LD=ld.lld
248 - CFLAGS="-Wno-deprecated-declarations ${CFLAGS}" \
249 - RAW_LDFLAGS="$(get_abi_LDFLAGS) $(raw-ldflags)" \
250 - emake "${NV_ARGS[@]}" -C nvidia-settings
251 - elif use static-libs; then
252 - emake "${NV_ARGS[@]}" -C nvidia-settings/src out/libXNVCtrl.a
253 - fi
254 -}
255 -
256 -src_install() {
257 - local libdir=$(get_libdir) libdir32=$(ABI=x86 get_libdir)
258 -
259 - NV_ARGS+=( DESTDIR="${D}" LIBDIR="${ED}"/usr/${libdir} )
260 -
261 - local -A paths=(
262 - [APPLICATION_PROFILE]=/usr/share/nvidia
263 - [CUDA_ICD]=/etc/OpenCL/vendors
264 - [EGL_EXTERNAL_PLATFORM_JSON]=/usr/share/egl/egl_external_platform.d
265 - [FIRMWARE]=/lib/firmware/nvidia/${PV}
266 - [GBM_BACKEND_LIB_SYMLINK]=/usr/${libdir}/gbm
267 - [GLVND_EGL_ICD_JSON]=/usr/share/glvnd/egl_vendor.d
268 - [VULKAN_ICD_JSON]=/usr/share/vulkan
269 - [WINE_LIB]=/usr/${libdir}/nvidia/wine
270 - [XORG_OUTPUTCLASS_CONFIG]=/usr/share/X11/xorg.conf.d
271 -
272 - [GLX_MODULE_SHARED_LIB]=/usr/${libdir}/xorg/modules/extensions
273 - [GLX_MODULE_SYMLINK]=/usr/${libdir}/xorg/modules
274 - [XMODULE_SHARED_LIB]=/usr/${libdir}/xorg/modules
275 - )
276 -
277 - local skip_files=(
278 - # nvidia_icd/layers(vulkan): skip with -X too as it uses libGLX_nvidia
279 - $(usev !X "
280 - libGLX_nvidia libglxserver_nvidia
281 - nvidia_icd.json nvidia_layers.json")
282 - $(usev !wayland libnvidia-vulkan-producer)
283 - libGLX_indirect # non-glvnd unused fallback
284 - libnvidia-gtk nvidia-{settings,xconfig} # built from source
285 - libnvidia-egl-gbm 15_nvidia_gbm # gui-libs/egl-gbm
286 - libnvidia-egl-wayland 10_nvidia_wayland # gui-libs/egl-wayland
287 - )
288 - local skip_modules=(
289 - $(usev !X "nvfbc vdpau xdriver")
290 - $(usev !driver gsp)
291 - installer nvpd # handled separately / built from source
292 - )
293 - local skip_types=(
294 - GLVND_LIB GLVND_SYMLINK EGL_CLIENT.\* GLX_CLIENT.\* # media-libs/libglvnd
295 - OPENCL_WRAPPER.\* # virtual/opencl
296 - DOCUMENTATION DOT_DESKTOP .\*_SRC DKMS_CONF SYSTEMD_UNIT # handled separately / unused
297 - )
298 -
299 - local DOCS=(
300 - README.txt NVIDIA_Changelog supported-gpus/supported-gpus.json
301 - nvidia-settings/doc/{FRAMELOCK,NV-CONTROL-API}.txt
302 - )
303 - local HTML_DOCS=( html/. )
304 - einstalldocs
305 -
306 - local DISABLE_AUTOFORMATTING=yes
307 - local DOC_CONTENTS="\
308 -Trusted users should be in the 'video' group to use NVIDIA devices.
309 -You can add yourself by using: gpasswd -a my-user video\
310 -$(usev driver "
311 -
312 -Like all out-of-tree kernel modules, it is necessary to rebuild
313 -${PN} after upgrading or rebuilding the Linux kernel
314 -by for example running \`emerge @module-rebuild\`. Alternatively,
315 -if using a distribution kernel (sys-kernel/gentoo-kernel{,-bin}),
316 -this can be automated by setting USE=dist-kernel globally.
317 -
318 -Loaded kernel modules also must not mismatch with the installed
319 -${PN} version (excluding -r revision), meaning should
320 -ensure \`eselect kernel list\` points to the kernel that will be
321 -booted before building and preferably reboot after upgrading
322 -${PN} (the ebuild will emit a warning if mismatching).
323 -
324 -See '${EPREFIX}/etc/modprobe.d/nvidia.conf' for modules options.")\
325 -$(use amd64 && usev !abi_x86_32 "
326 -
327 -Note that without USE=abi_x86_32 on ${PN}, 32bit applications
328 -(typically using wine / steam) will not be able to use GPU acceleration.")
329 -
330 -For general information on using ${PN}, please see:
331 -https://wiki.gentoo.org/wiki/NVIDIA/nvidia-drivers"
332 - readme.gentoo_create_doc
333 -
334 - if use driver; then
335 - linux-mod_src_install
336 -
337 - insinto /etc/modprobe.d
338 - doins "${T}"/nvidia.conf
339 -
340 - # used for gpu verification with binpkgs (not kept, see pkg_preinst)
341 - insinto /usr/share/nvidia
342 - doins supported-gpus/supported-gpus.json
343 - fi
344 -
345 - emake "${NV_ARGS[@]}" -C nvidia-modprobe install
346 - fowners :video /usr/bin/nvidia-modprobe #505092
347 - fperms 4710 /usr/bin/nvidia-modprobe
348 -
349 - if use persistenced; then
350 - emake "${NV_ARGS[@]}" -C nvidia-persistenced install
351 - newconfd "${FILESDIR}"/nvidia-persistenced.confd nvidia-persistenced
352 - newinitd "${FILESDIR}"/nvidia-persistenced.initd nvidia-persistenced
353 - systemd_dounit "${T}"/nvidia-persistenced.service
354 - fi
355 -
356 - if use tools; then
357 - emake "${NV_ARGS[@]}" -C nvidia-settings install
358 -
359 - doicon nvidia-settings/doc/nvidia-settings.png
360 - domenu nvidia-settings/doc/nvidia-settings.desktop
361 -
362 - exeinto /etc/X11/xinit/xinitrc.d
363 - newexe "${FILESDIR}"/95-nvidia-settings-r1 95-nvidia-settings
364 - fi
365 -
366 - if use static-libs; then
367 - dolib.a nvidia-settings/src/out/libXNVCtrl.a
368 -
369 - insinto /usr/include/NVCtrl
370 - doins nvidia-settings/src/libXNVCtrl/NVCtrl{Lib,}.h
371 - fi
372 -
373 - use X && emake "${NV_ARGS[@]}" -C nvidia-xconfig install
374 -
375 - # mimic nvidia-installer by reading .manifest to install files
376 - # 0:file 1:perms 2:type 3+:subtype/arguments -:module
377 - local m into
378 - while IFS=' ' read -ra m; do
379 - ! [[ ${#m[@]} -ge 2 && ${m[-1]} =~ MODULE: ]] ||
380 - eval '[[ " ${m[0]##*/}" =~ ^(\ '${skip_files[*]/%/.*|\\}' )$ ]]' ||
381 - eval '[[ " ${m[2]}" =~ ^(\ '${skip_types[*]/%/|\\}' )$ ]]' ||
382 - has ${m[-1]#MODULE:} "${skip_modules[@]}" && continue
383 -
384 - case ${m[2]} in
385 - MANPAGE)
386 - gzip -dc ${m[0]} | newman - ${m[0]%.gz}; assert
387 - continue
388 - ;;
389 - GBM_BACKEND_LIB_SYMLINK) m[4]=../${m[4]};; # missing ../
390 - VDPAU_SYMLINK) m[4]=vdpau/; m[5]=${m[5]#vdpau/};; # .so to vdpau/
391 - esac
392 -
393 - if [[ -v paths[${m[2]}] ]]; then
394 - into=${paths[${m[2]}]}
395 - elif [[ ${m[2]} =~ _BINARY$ ]]; then
396 - into=/opt/bin
397 - elif [[ ${m[3]} == COMPAT32 ]]; then
398 - use abi_x86_32 || continue
399 - into=/usr/${libdir32}
400 - elif [[ ${m[2]} =~ _LIB$|_SYMLINK$ ]]; then
401 - into=/usr/${libdir}
402 - else
403 - die "No known installation path for ${m[0]}"
404 - fi
405 - [[ ${m[3]: -2} == ?/ ]] && into+=/${m[3]%/}
406 - [[ ${m[4]: -2} == ?/ ]] && into+=/${m[4]%/}
407 -
408 - if [[ ${m[2]} =~ _SYMLINK$ ]]; then
409 - [[ ${m[4]: -1} == / ]] && m[4]=${m[5]}
410 - dosym ${m[4]} ${into}/${m[0]}
411 - continue
412 - fi
413 - [[ ${m[0]} =~ ^libnvidia-ngx.so|^libnvidia-egl-gbm.so ]] &&
414 - dosym ${m[0]} ${into}/${m[0]%.so*}.so.1 # soname not in .manifest
415 -
416 - printf -v m[1] %o $((m[1] | 0200)) # 444->644
417 - insopts -m${m[1]}
418 - insinto ${into}
419 - doins ${m[0]}
420 - done < .manifest || die
421 -
422 - # MODULE:installer non-skipped extras
423 - exeinto /lib/systemd/system-sleep
424 - doexe systemd/system-sleep/nvidia
425 - dobin systemd/nvidia-sleep.sh
426 - systemd_dounit systemd/system/nvidia-{hibernate,resume,suspend}.service
427 -
428 - dobin nvidia-bug-report.sh
429 -
430 - # MODULE:powerd extras
431 - if use amd64; then
432 - systemd_dounit systemd/system/nvidia-powerd.service
433 -
434 - insinto /usr/share/dbus-1/system.d
435 - doins nvidia-dbus.conf
436 - fi
437 -}
438 -
439 -pkg_preinst() {
440 - has_version "${CATEGORY}/${PN}[abi_x86_32]" && NV_HAD_ABI32=
441 - has_version "${CATEGORY}/${PN}[wayland]" && NV_HAD_WAYLAND=
442 -
443 - use driver || return
444 - linux-mod_pkg_preinst
445 -
446 - # set video group id based on live system (bug #491414)
447 - local g=$(getent group video | cut -d: -f3)
448 - [[ ${g} ]] || die "Failed to determine video group id"
449 - sed -i "s/@VIDEOGID@/${g}/" "${ED}"/etc/modprobe.d/nvidia.conf || die
450 -
451 - # try to find driver mismatches using temporary supported-gpus.json
452 - for g in $(grep -l 0x10de /sys/bus/pci/devices/*/vendor 2>/dev/null); do
453 - g=$(grep -io "\"devid\":\"$(<${g%vendor}device)\"[^}]*branch\":\"[0-9]*" \
454 - "${ED}"/usr/share/nvidia/supported-gpus.json 2>/dev/null)
455 - if [[ ${g} ]]; then
456 - g=$((${g##*\"}+1))
457 - if ver_test -ge ${g}; then
458 - NV_LEGACY_MASK=">=${CATEGORY}/${PN}-${g}"
459 - break
460 - fi
461 - fi
462 - done
463 - rm "${ED}"/usr/share/nvidia/supported-gpus.json || die
464 -}
465 -
466 -pkg_postinst() {
467 - use driver && linux-mod_pkg_postinst
468 -
469 - readme.gentoo_print_elog
470 -
471 - if [[ -r /proc/driver/nvidia/version &&
472 - $(</proc/driver/nvidia/version) != *" ${PV} "* ]]; then
473 - ewarn "Currently loaded NVIDIA modules do not match the newly installed"
474 - ewarn "libraries and may prevent launching GPU-accelerated applications."
475 - use driver && ewarn "The easiest way to fix this is usually to reboot."
476 - fi
477 -
478 - if [[ $(</proc/cmdline) == *slub_debug=[!-]* ]]; then
479 - ewarn "Detected that the current kernel command line is using 'slub_debug=',"
480 - ewarn "this may lead to system instability/freezes with this version of"
481 - ewarn "${PN}. Bug: https://bugs.gentoo.org/796329"
482 - fi
483 -
484 - if [[ -v NV_LEGACY_MASK ]]; then
485 - ewarn
486 - ewarn "***WARNING***"
487 - ewarn
488 - ewarn "You are installing a version of ${PN} known not to work"
489 - ewarn "with a GPU of the current system. If unwanted, add the mask:"
490 - if [[ -d ${EROOT}/etc/portage/package.mask ]]; then
491 - ewarn " echo '${NV_LEGACY_MASK}' > ${EROOT}/etc/portage/package.mask/${PN}"
492 - else
493 - ewarn " echo '${NV_LEGACY_MASK}' >> ${EROOT}/etc/portage/package.mask"
494 - fi
495 - ewarn "...then downgrade to a legacy branch if possible. For details, see:"
496 - ewarn "https://www.nvidia.com/object/IO_32667.html"
497 - fi
498 -
499 - if use !abi_x86_32 && [[ -v NV_HAD_ABI32 ]]; then
500 - elog
501 - elog "USE=abi_x86_32 is disabled, 32bit applications will not be able to"
502 - elog "use nvidia-drivers for acceleration without it (e.g. commonly used"
503 - elog "with app-emulation/wine-* or steam). Re-enable if needed."
504 - fi
505 -
506 - if use wayland && use driver && [[ ! -v NV_HAD_WAYLAND ]]; then
507 - elog
508 - elog "With USE=wayland, this version of ${PN} sets nvidia-drm.modeset=1"
509 - elog "in '${EROOT}/etc/modprobe.d/nvidia.conf'. This feature is considered"
510 - elog "experimental but is required for wayland."
511 - elog
512 - elog "If you experience issues, either disable wayland or edit nvidia.conf."
513 - elog "Of note, may possibly cause issues with SLI and Reverse PRIME."
514 - fi
515 -}