git: cbe3fe720370 - main - x11/nvidia-driver, x11/linux-nvidia-libs: update to 525.89.02

From: Kevin Bowling <kbowling_at_FreeBSD.org>
Date: Fri, 21 Apr 2023 19:57:53 UTC
The branch main has been updated by kbowling:

URL: https://cgit.FreeBSD.org/ports/commit/?id=cbe3fe720370f09375c4c6e3157901a1de7c8a5d

commit cbe3fe720370f09375c4c6e3157901a1de7c8a5d
Author:     Bartek Jasicki <thindil@laeran.pl.eu.org>
AuthorDate: 2023-04-21 17:12:43 +0000
Commit:     Kevin Bowling <kbowling@FreeBSD.org>
CommitDate: 2023-04-21 19:57:14 +0000

    x11/nvidia-driver, x11/linux-nvidia-libs: update to 525.89.02
    
    Changes https://www.nvidia.com/Download/driverResults.aspx/199660/en-us/
    
    PR:             267220, 270060
    Tested by:      many
    Approved by:    danfe (previous version), maintainer timeout
---
 x11/linux-nvidia-libs/Makefile  | 32 ++++++++++++++++++++++++++++++--
 x11/linux-nvidia-libs/distinfo  |  6 +++---
 x11/linux-nvidia-libs/pkg-plist | 19 +++++++++++++++++++
 x11/nvidia-driver/Makefile      | 19 ++++++++++++++++---
 x11/nvidia-driver/distinfo      |  6 +++---
 x11/nvidia-driver/pkg-plist     |  9 ++++++---
 6 files changed, 77 insertions(+), 14 deletions(-)

diff --git a/x11/linux-nvidia-libs/Makefile b/x11/linux-nvidia-libs/Makefile
index 43f751b6f574..6d563420abae 100644
--- a/x11/linux-nvidia-libs/Makefile
+++ b/x11/linux-nvidia-libs/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	nvidia-libs
-DISTVERSION?=	515.86.01
+DISTVERSION?=	525.89.02
 # Always try to set PORTREVISION as it can be overridden by the slave ports
 PORTREVISION?=	0
 CATEGORIES=	x11 linux
@@ -122,7 +122,11 @@ PLIST_RE+=	'\,${LINUXBASE}.*libGLESv(1_CM|2)_nvidia\.so,d' \
 		'\,${LINUXBASE}.*libGLX_(nvidia|indirect)\.so,d' \
 		'\,${LINUXBASE}.*libnvidia-ptxjitcompiler\.so,d'
 .endif
-.if ${NVVERSION} >= 495.02905 # 495.29.05
+.if ${NVVERSION} >= 525.08902 # 525.89.02
+LINUX_LIBS+=	libnvidia-egl-wayland.so.1.1.10
+LINUX_LINKS+=	libnvidia-egl-wayland.so.1.1.10 libnvidia-egl-wayland.so.1
+PLIST_RE+=	'\,${LINUXBASE},s/(libnvidia-egl-wayland\.so)\.X/\1.1.1.10/'
+.elif ${NVVERSION} >= 495.02905 # 495.29.05
 LINUX_LIBS+=	libnvidia-egl-wayland.so.1.1.9
 LINUX_LINKS+=	libnvidia-egl-wayland.so.1.1.9 libnvidia-egl-wayland.so.1
 PLIST_RE+=	'\,${LINUXBASE},s/(libnvidia-egl-wayland\.so)\.X/\1.1.1.9/'
@@ -265,6 +269,30 @@ LINUX32_LIBS+=	libnvidia-glvkspirv.so.${PORTVERSION}
 .else
 PLIST_RE+=	'\,${LINUXBASE}.*libnvidia-glvkspirv\.so,d'
 .endif
+.if ${NVVERSION} >= 525.08902 # 525.89.02
+LINUX_LIBS+=	libnvoptix.so.${PORTVERSION} \
+		libnvidia-nvvm.so.${PORTVERSION} \
+		libnvidia-ngx.so.${PORTVERSION} \
+		libnvidia-allocator.so.${PORTVERSION} \
+		libnvidia-opticalflow.so.${PORTVERSION} \
+		libnvidia-egl-gbm.so.1.1.0
+LINUX_LINKS+=	libnvidia-egl-gbm.so.1.1.0 libnvidia-egl-gbm.so.1 \
+		libnvidia-egl-gbm.so.1.1.0 libnvidia-egl-gbm.so \
+		libnvidia-nvvm.so.${PORTVERSION} libnvidia-nvvm.so.4 \
+		libnvidia-nvvm.so.${PORTVERSION} libnvidia-nvvm.so \
+		libnvidia-opticalflow.so.${PORTVERSION} libnvidia-opticalflow.so.1 \
+		libnvidia-opticalflow.so.${PORTVERSION} libnvidia-opticalflow.so \
+		libnvoptix.so.${PORTVERSION} libnvoptix.so.1 \
+		libnvoptix.so.${PORTVERSION} libnvoptix.so
+LINUX32_LIBS+=  libnvidia-nvvm.so.${PORTVERSION} \
+		libnvidia-allocator.so.${PORTVERSION} \
+		libnvidia-opticalflow.so.${PORTVERSION}
+LINUX32_LINKS+= libnvidia-nvvm.so.${PORTVERSION} libnvidia-nvvm.so.4 \
+		libnvidia-nvvm.so.${PORTVERSION} libnvidia-nvvm.so
+.else
+PLIST_RE+=	'\,${LINUXBASE}.*libnvoptix\.so,d' \
+		'\,${LINUXBASE}.*libnvidia-(allocator|egl-gbm|ngx|nvvm|opticalflow),d'
+.endif
 
 PLIST_SUB+=	LINUXBASE=${LINUXBASE} \
 		LINUX_LIBDIR=${LINUX_LIBDIR} \
diff --git a/x11/linux-nvidia-libs/distinfo b/x11/linux-nvidia-libs/distinfo
index 29a68c3aed5f..2b45292fbefc 100644
--- a/x11/linux-nvidia-libs/distinfo
+++ b/x11/linux-nvidia-libs/distinfo
@@ -1,6 +1,6 @@
-TIMESTAMP = 1677612334
-SHA256 (NVIDIA-Linux-x86_64-515.86.01.run) = 141777e1ca2f11e97d8d33260213f1be327eb73922ae22f4ddab404bb2ef4664
-SIZE (NVIDIA-Linux-x86_64-515.86.01.run) = 363743089
+TIMESTAMP = 1678276890
+SHA256 (NVIDIA-Linux-x86_64-525.89.02.run) = 0e412c88c5bd98f842a839a6f64614f20e4c0950ef7cffb12b158a71633593e9
+SIZE (NVIDIA-Linux-x86_64-525.89.02.run) = 414116295
 SHA256 (NVIDIA-Linux-x86_64-470.161.03.run) = 5da82a7f8c76e781e7d7f0be7b798db4d344f26bd4facf9abcf3c71c71fe7640
 SIZE (NVIDIA-Linux-x86_64-470.161.03.run) = 272397700
 SHA256 (NVIDIA-Linux-x86_64-390.154.run) = f4420280c55210964c008d5b724f2615845d47ad4c9c05d8ed26a62fc6331f7c
diff --git a/x11/linux-nvidia-libs/pkg-plist b/x11/linux-nvidia-libs/pkg-plist
index 2e63cad81bab..63bbb1054769 100644
--- a/x11/linux-nvidia-libs/pkg-plist
+++ b/x11/linux-nvidia-libs/pkg-plist
@@ -43,6 +43,7 @@
 %%LINUX32%%%%LINUXBASE%%/usr/lib/libnvcuvid.so
 %%LINUX32%%%%LINUXBASE%%/usr/lib/libnvcuvid.so.1
 %%LINUX32%%%%LINUXBASE%%/usr/lib/libnvcuvid.so.%%SHLIB_VERSION%%
+%%LINUX32%%%%LINUXBASE%%/usr/lib/libnvidia-allocator.so.%%SHLIB_VERSION%%
 %%LINUX32%%%%LINUXBASE%%/usr/lib/libnvidia-compiler.so.%%SHLIB_VERSION%%
 %%LINUX32%%%%LINUXBASE%%/usr/lib/libnvidia-eglcore.so.%%SHLIB_VERSION%%
 %%LINUX32%%%%LINUXBASE%%/usr/lib/libnvidia-encode.so
@@ -63,11 +64,15 @@
 %%LINUX32%%%%LINUXBASE%%/usr/lib/libnvidia-ml.so.%%SHLIB_VERSION%%
 %%LINUX32%%%%LINUXBASE%%/usr/lib/libnvidia-opencl.so.1
 %%LINUX32%%%%LINUXBASE%%/usr/lib/libnvidia-opencl.so.%%SHLIB_VERSION%%
+%%LINUX32%%%%LINUXBASE%%/usr/lib/libnvidia-opticalflow.so.%%SHLIB_VERSION%%
 %%LINUX32%%%%LINUXBASE%%/usr/lib/libnvidia-ptxjitcompiler.so
 %%LINUX32%%%%LINUXBASE%%/usr/lib/libnvidia-ptxjitcompiler.so.1
 %%LINUX32%%%%LINUXBASE%%/usr/lib/libnvidia-ptxjitcompiler.so.%%SHLIB_VERSION%%
 %%LINUX32%%%%LINUXBASE%%/usr/lib/libnvidia-tls.so.%%SHLIB_VERSION%%
 %%LINUX32%%%%LINUXBASE%%/usr/lib/libvdpau_nvidia.so.%%SHLIB_VERSION%%
+%%LINUX32%%%%LINUXBASE%%/usr/lib/libnvidia-nvvm.so
+%%LINUX32%%%%LINUXBASE%%/usr/lib/libnvidia-nvvm.so.4
+%%LINUX32%%%%LINUXBASE%%/usr/lib/libnvidia-nvvm.so.%%SHLIB_VERSION%%
 %%LINUX32%%%%LINUXBASE%%/usr/lib/tls/libnvidia-tls.so.%%SHLIB_VERSION%%
 %%LINUX32%%%%LINUXBASE%%/usr/lib/vdpau/libvdpau_nvidia.so.1
 %%LINUXBASE%%%%LINUX_LIBDIR%%/libEGL.so.1
@@ -108,11 +113,15 @@
 %%LINUXBASE%%%%LINUX_LIBDIR%%/libnvcuvid.so
 %%LINUXBASE%%%%LINUX_LIBDIR%%/libnvcuvid.so.1
 %%LINUXBASE%%%%LINUX_LIBDIR%%/libnvcuvid.so.%%SHLIB_VERSION%%
+%%LINUXBASE%%%%LINUX_LIBDIR%%/libnvidia-allocator.so.%%SHLIB_VERSION%%
 %%LINUXBASE%%%%LINUX_LIBDIR%%/libnvidia-cbl.so.%%SHLIB_VERSION%%
 %%LINUXBASE%%%%LINUX_LIBDIR%%/libnvidia-cfg.so
 %%LINUXBASE%%%%LINUX_LIBDIR%%/libnvidia-cfg.so.1
 %%LINUXBASE%%%%LINUX_LIBDIR%%/libnvidia-cfg.so.%%SHLIB_VERSION%%
 %%LINUXBASE%%%%LINUX_LIBDIR%%/libnvidia-compiler.so.%%SHLIB_VERSION%%
+%%LINUXBASE%%%%LINUX_LIBDIR%%/libnvidia-egl-gbm.so
+%%LINUXBASE%%%%LINUX_LIBDIR%%/libnvidia-egl-gbm.so.1
+%%LINUXBASE%%%%LINUX_LIBDIR%%/libnvidia-egl-gbm.so.1.1.0
 %%LINUXBASE%%%%LINUX_LIBDIR%%/libnvidia-egl-wayland.so.1
 %%LINUXBASE%%%%LINUX_LIBDIR%%/libnvidia-egl-wayland.so.X
 %%LINUXBASE%%%%LINUX_LIBDIR%%/libnvidia-eglcore.so.%%SHLIB_VERSION%%
@@ -136,12 +145,22 @@
 %%LINUXBASE%%%%LINUX_LIBDIR%%/libnvidia-ml.so.%%SHLIB_VERSION%%
 %%LINUXBASE%%%%LINUX_LIBDIR%%/libnvidia-opencl.so.1
 %%LINUXBASE%%%%LINUX_LIBDIR%%/libnvidia-opencl.so.%%SHLIB_VERSION%%
+%%LINUXBASE%%%%LINUX_LIBDIR%%/libnvidia-opticalflow.so
+%%LINUXBASE%%%%LINUX_LIBDIR%%/libnvidia-opticalflow.so.1
+%%LINUXBASE%%%%LINUX_LIBDIR%%/libnvidia-opticalflow.so.%%SHLIB_VERSION%%
 %%LINUXBASE%%%%LINUX_LIBDIR%%/libnvidia-ptxjitcompiler.so
 %%LINUXBASE%%%%LINUX_LIBDIR%%/libnvidia-ptxjitcompiler.so.1
 %%LINUXBASE%%%%LINUX_LIBDIR%%/libnvidia-ptxjitcompiler.so.%%SHLIB_VERSION%%
 %%LINUXBASE%%%%LINUX_LIBDIR%%/libnvidia-rtcore.so.%%SHLIB_VERSION%%
 %%LINUXBASE%%%%LINUX_LIBDIR%%/libnvidia-tls.so.%%SHLIB_VERSION%%
 %%LINUXBASE%%%%LINUX_LIBDIR%%/libvdpau_nvidia.so.%%SHLIB_VERSION%%
+%%LINUXBASE%%%%LINUX_LIBDIR%%/libnvoptix.so
+%%LINUXBASE%%%%LINUX_LIBDIR%%/libnvoptix.so.1
+%%LINUXBASE%%%%LINUX_LIBDIR%%/libnvoptix.so.%%SHLIB_VERSION%%
+%%LINUXBASE%%%%LINUX_LIBDIR%%/libnvidia-nvvm.so
+%%LINUXBASE%%%%LINUX_LIBDIR%%/libnvidia-nvvm.so.4
+%%LINUXBASE%%%%LINUX_LIBDIR%%/libnvidia-nvvm.so.%%SHLIB_VERSION%%
+%%LINUXBASE%%%%LINUX_LIBDIR%%/libnvidia-ngx.so.%%SHLIB_VERSION%%
 %%LINUXBASE%%%%LINUX_LIBDIR%%/tls/libnvidia-tls.so.%%SHLIB_VERSION%%
 %%LINUXBASE%%%%LINUX_LIBDIR%%/vdpau/libvdpau_nvidia.so.1
 %%LINUXBASE%%/usr/share/egl/egl_external_platform.d/10_nvidia_wayland.json
diff --git a/x11/nvidia-driver/Makefile b/x11/nvidia-driver/Makefile
index 81f9c8ea3d53..59be773cdcd1 100644
--- a/x11/nvidia-driver/Makefile
+++ b/x11/nvidia-driver/Makefile
@@ -12,9 +12,9 @@
 # ``make DISTVERSION=xxx.yy.zz -DNO_CHECKSUM'' should typically work.
 
 PORTNAME?=	nvidia-driver
-DISTVERSION?=	515.86.01
+DISTVERSION?=	525.89.02
 # Always try to set PORTREVISION as it can be overridden by the slave ports
-PORTREVISION?=	1
+PORTREVISION?=	0
 CATEGORIES=	x11
 MASTER_SITES=	NVIDIA/XFree86/FreeBSD-${ARCH_SUFX}/${DISTVERSION}
 DISTNAME=	NVIDIA-FreeBSD-${ARCH_SUFX}-${DISTVERSION}
@@ -34,6 +34,9 @@ PATCH_DEPENDS=	gsed:textproc/gsed
 BUILD_DEPENDS=	pkg-config:devel/pkgconf
 LIB_DEPENDS=	libOpenGL.so:graphics/libglvnd
 .endif
+.if ${NVVERSION} >= 415.013
+LIB_DEPENDS+=	libnvidia-egl-wayland.so:graphics/egl-wayland
+.endif
 
 USES=		kmod uidfix xorg
 .if ${NVVERSION} >= 470.04201
@@ -136,7 +139,7 @@ PLIST_SUB+=	LIBGLDIR=${LIBGLDIR} LIBGLMAP="@comment "
 PLIST_SUB+=	LIBGLDIR="@comment " LIBGLMAP=""
 .endif
 
-.if ${NVVERSION} >= 515.8601
+.if ${NVVERSION} >= 515.08601
 PLIST_FILES+=	lib/libnvidia-wayland-client.so.${DISTVERSION}
 .endif
 
@@ -243,6 +246,12 @@ post-patch: .SILENT
 	${REINPLACE_CMD} -e '/void nvidia_dev_dtor/,+8s,.*status.*,,' \
 		${WRKSRC}/src/${NVSRC}/nvidia_dev.c
 .endif
+# Move symlinks under PREFIX
+.if ${NVVERSION} >= 525.08902
+	${REINPLACE_CMD} -e '/ln/s/$${LOCALBASE}\/lib/../' \
+		-e '/LIBDIR/!s/$${LOCALBASE}/$${DESTDIR}$${PREFIX}/' \
+		${WRKSRC}/lib/libnvidia-allocator/Makefile
+.endif
 # After src 2a99dd30dfaa, DRIVER_MODULE should not include nvidia_devclass
 .if ${OSVERSION} >= 1400058
 	${REINPLACE_CMD} -e '/^DRIVER_MODULE/s/, nvidia_devclass//' \
@@ -342,6 +351,10 @@ post-install: .SILENT
 	${REINPLACE_CMD} -e '/libnvidia-egl-gbm\.so/d ; \
 		/15_nvidia_gbm\.json/d' ${TMPPLIST}
 .endif
+.if ${NVVERSION} < 525.08902
+	${REINPLACE_CMD} -e '/libnvidia-allocator\.so/d ; \
+		/nvidia-drm_gbm\.so/d' ${TMPPLIST}
+.endif
 .if ${NVVERSION} < 410.057
 # Rename some libraries and install a libmap file to resolve conflict with
 # Mesa libraries.
diff --git a/x11/nvidia-driver/distinfo b/x11/nvidia-driver/distinfo
index b25ea828ab14..4cca554e5ab0 100644
--- a/x11/nvidia-driver/distinfo
+++ b/x11/nvidia-driver/distinfo
@@ -1,6 +1,6 @@
-TIMESTAMP = 1677612209
-SHA256 (NVIDIA-FreeBSD-x86_64-515.86.01.tar.xz) = 5807c76dd6680754d68d33876ffbd8ab076398f28428ae0c85d67c89e13c589f
-SIZE (NVIDIA-FreeBSD-x86_64-515.86.01.tar.xz) = 112400260
+TIMESTAMP = 1678263830
+SHA256 (NVIDIA-FreeBSD-x86_64-525.89.02.tar.xz) = 2d032b8c0b311af0adb90e2f16d6345939d38de7eae9fbb7836038844d58f2f7
+SIZE (NVIDIA-FreeBSD-x86_64-525.89.02.tar.xz) = 136622256
 SHA256 (NVIDIA-FreeBSD-x86_64-470.161.03.tar.xz) = 54f87e6cadc4aedebc4f862e3d25657fddb867ddc3fe01ad06c9d54bcfa8d607
 SIZE (NVIDIA-FreeBSD-x86_64-470.161.03.tar.xz) = 99719576
 SHA256 (NVIDIA-FreeBSD-x86_64-390.154.tar.gz) = 5994c77c3510a4a89076ecf2bf402f1da635b250cca07655efc913f2a94bee84
diff --git a/x11/nvidia-driver/pkg-plist b/x11/nvidia-driver/pkg-plist
index 796e2a79bdad..181879ff34bf 100644
--- a/x11/nvidia-driver/pkg-plist
+++ b/x11/nvidia-driver/pkg-plist
@@ -32,10 +32,13 @@ lib/libXvMCNVIDIA.so.1
 lib/libXvMCNVIDIA_dynamic.so.1
 lib/libnvidia-cfg.so
 lib/libnvidia-cfg.so.1
-@comment lib/libnvidia-egl-gbm.so
-@comment lib/libnvidia-egl-gbm.so.1
+lib/libnvidia-egl-gbm.so
+lib/libnvidia-egl-gbm.so.1
 @comment lib/libnvidia-egl-wayland.so
 @comment lib/libnvidia-egl-wayland.so.1
+lib/libnvidia-allocator.so
+lib/libnvidia-allocator.so.1
+lib/gbm/nvidia-drm_gbm.so
 lib/libnvidia-eglcore.so
 lib/libnvidia-eglcore.so.1
 lib/libnvidia-glcore.so
@@ -89,7 +92,7 @@ lib32/libnvidia-tls.so.1
 lib32/vdpau/libvdpau_nvidia.so.1
 man/man1/nvidia-smi.1.gz
 @comment share/egl/egl_external_platform.d/10_nvidia_wayland.json
-@comment share/egl/egl_external_platform.d/15_nvidia_gbm.json
+share/egl/egl_external_platform.d/15_nvidia_gbm.json
 share/glvnd/egl_vendor.d/10_nvidia.json
 share/vulkan/icd.d/nvidia_icd.json
 share/vulkan/implicit_layer.d/nvidia_layers.json