commit:     8710f6b8800ff177a075d69979a8290f1027fad3
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Wed Oct 23 08:25:24 2024 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Wed Oct 23 09:07:35 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8710f6b8

x11-drivers/nvidia-drivers: use system gui-libs/egl-x11

On second thought, decided it's better off split now so
it can be tested before a keyworded version.

Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 ...1.ebuild => nvidia-drivers-565.57.01-r2.ebuild} | 33 +++++++++++++---------
 1 file changed, 20 insertions(+), 13 deletions(-)

diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-565.57.01-r1.ebuild 
b/x11-drivers/nvidia-drivers/nvidia-drivers-565.57.01-r2.ebuild
similarity index 95%
rename from x11-drivers/nvidia-drivers/nvidia-drivers-565.57.01-r1.ebuild
rename to x11-drivers/nvidia-drivers/nvidia-drivers-565.57.01-r2.ebuild
index 943fe4d2048c..38afbe8a4548 100644
--- a/x11-drivers/nvidia-drivers/nvidia-drivers-565.57.01-r1.ebuild
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-565.57.01-r2.ebuild
@@ -25,6 +25,7 @@ S=${WORKDIR}
 LICENSE="NVIDIA-r2 Apache-2.0 BSD BSD-2 GPL-2 MIT ZLIB curl openssl"
 SLOT="0/${PV%%.*}"
 # beta drivers do not get keyworded, opt-in at your own risks if wanted
+# reminder: drop the egl-wayland version warning & unmask it when out of beta
 #KEYWORDS="-* ~amd64 ~arm64"
 # note: kernel-open is an upstream default in >=560 if all GPUs on the system
 # support it but, since no automagic here, keeping it off for the wider support
@@ -65,11 +66,7 @@ RDEPEND="
        wayland? (
                >=gui-libs/egl-gbm-1.1.1-r2[abi_x86_32(-)?]
                >=gui-libs/egl-wayland-1.1.13.1[abi_x86_32(-)?]
-               X? (
-                       media-libs/mesa[gbm(+),abi_x86_32(-)?]
-                       x11-libs/libdrm[abi_x86_32(-)?]
-                       x11-libs/libxcb:=[abi_x86_32(-)?]
-               )
+               X? ( gui-libs/egl-x11[abi_x86_32(-)?] )
        )
 "
 DEPEND="
@@ -261,16 +258,12 @@ src_install() {
 
        local skip_files=(
                $(usev !X "libGLX_nvidia libglxserver_nvidia")
-               # TODO?: package egl-x11 separately and drop wayland? ( X? ( 
deps ) )
-               # https://github.com/NVIDIA/egl-x11 (but no release yet, maybe 
wait)
-               $(use !X || use !wayland && echo "
-                       libnvidia-egl-xcb 20_nvidia_xcb.json
-                       libnvidia-egl-xlib 20_nvidia_xlib.json
-               ")
                libGLX_indirect # non-glvnd unused fallback
                libnvidia-{gtk,wayland-client} nvidia-{settings,xconfig} # from 
source
                libnvidia-egl-gbm 15_nvidia_gbm # gui-libs/egl-gbm
                libnvidia-egl-wayland 10_nvidia_wayland # gui-libs/egl-wayland
+               libnvidia-egl-xcb 20_nvidia_xcb.json # gui-libs/egl-x11
+               libnvidia-egl-xlib 20_nvidia_xlib.json # gui-libs/egl-x11
                libnvidia-pkcs11.so # using the openssl3 version instead
        )
        local skip_modules=(
@@ -403,8 +396,8 @@ documentation that is installed alongside this README."
                        continue
                fi
                # avoid portage warning due to missing soname links in manifest
-               [[ ${m[0]} =~ 
.*((libnvidia-ngx.so|libnvidia-egl-(gbm|xcb|xlib).so).*) ]] &&
-                       dosym ${BASH_REMATCH[1]} ${into}/${BASH_REMATCH[2]}.1
+               [[ ${m[0]} =~ ^libnvidia-ngx.so ]] &&
+                       dosym ${m[0]} ${into}/${m[0]%.so*}.so.1
 
                printf -v m[1] %o $((m[1] | 0200)) # 444->644
                insopts -m${m[1]}
@@ -602,4 +595,18 @@ pkg_postinst() {
                elog "Also, the systemd suspend/hibernate/resume services are 
now enabled by"
                elog "default, and for openrc+elogind a similar hook has been 
installed."
        fi
+
+       # TODO: drop this when out of beta, plan is to unmask it then
+       if use X && use wayland && has_version '<gui-libs/egl-wayland-1.1.14'; 
then
+               ewarn
+               ewarn "*** NVIDIA Beta Notice ***"
+               ewarn
+               ewarn ">=gui-libs/egl-wayland-1.1.14 is currently masked, 
however with this"
+               ewarn "beta version of nvidia-drivers it is recommended to use 
latest"
+               ewarn "egl-wayland for better xwayland performance and also 
potentially"
+               ewarn "avoiding some visual glitches."
+               ewarn
+               ewarn "Plan is to unmask it for everyone when out of beta, but 
may want to do"
+               ewarn "so now unless it causes problems (e.g. some applications 
crashing)."
+       fi
 }

Reply via email to