1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-08 06:48:28 +00:00

x11/nvidia-driver: add support for the new feature branch 495.xx

The `libnvidia-egl-gbm' library is not yet on the SUBDIR list in the
`lib/Makefile', so record newly added pkg-plist entries as commented
out for the moment.

PR:		259496 (part 2)
Submitted by:	jkim
This commit is contained in:
Alexey Dokuchaev 2021-11-02 09:58:24 +00:00
parent 6f8fb58d93
commit 2f121355b0
2 changed files with 14 additions and 3 deletions

View File

@ -43,15 +43,19 @@ USES+= tar:xz
USE_XORG= x11 xorg-server xext
USE_LDCONFIG= yes
EGL_JSON_PATH= ${PREFIX}/share/egl/egl_external_platform.d
GLVND_JSON_PATH= ${PREFIX}/share/glvnd/egl_vendor.d
WAYLAND_JSON_PATH= ${PREFIX}/share/egl/egl_external_platform.d
VKICD_PATH= ${PREFIX}/share/vulkan/icd.d
VKLAYERS_PATH= ${PREFIX}/share/vulkan/implicit_layer.d
MAKE_ENV= DEBUG_FLAGS=${DEBUG_FLAGS} \
EGL_GLVND_JSON_PATH=${STAGEDIR}${GLVND_JSON_PATH} \
EGL_WAYLAND_JSON_PATH=${STAGEDIR}${WAYLAND_JSON_PATH} \
VKICD_PATH=${STAGEDIR}${VKICD_PATH} \
VKLAYERS_PATH=${STAGEDIR}${VKLAYERS_PATH}
.if ${NVVERSION} < 495.02905
MAKE_ENV+= EGL_WAYLAND_JSON_PATH=${STAGEDIR}${EGL_JSON_PATH}
.else
MAKE_ENV+= EGL_EXTERNAL_PLATFORM_JSON_PATH=${STAGEDIR}${EGL_JSON_PATH}
.endif
SUB_FILES= pkg-message
.if !defined(LIBGLDIR)
SUB_FILES+= nvidia.conf
@ -208,7 +212,7 @@ post-patch: .SILENT
.endif
.if ${NVVERSION} >= 415.013
prefix="${PREFIX}" ; padding=$$(($${#prefix}+3)) ; \
gsed ${REINPLACE_ARGS} -E "s,/etc/egl/egl_external_platform\.d.{$$padding},${WAYLAND_JSON_PATH}\x00," \
gsed ${REINPLACE_ARGS} -E "s,/etc/egl/egl_external_platform\.d.{$$padding},${EGL_JSON_PATH}\x00," \
${WRKSRC}/obj/libEGL_nvidia.so.0
.endif
# Finally, process OPTIONS
@ -292,6 +296,10 @@ post-install: .SILENT
.if ${NVVERSION} < 470.074
${REINPLACE_CMD} -e '/libnvidia-vulkan-producer\.so/d' ${TMPPLIST}
.endif
.if ${NVVERSION} < 495.02905
${REINPLACE_CMD} -e '/libnvidia-egl-gbm\.so/d ; \
/15_nvidia_gbm\.json/d' ${TMPPLIST}
.endif
.if ${NVVERSION} < 410.057
# Rename some libraries and install a libmap file to resolve conflict with
# Mesa libraries.

View File

@ -32,6 +32,8 @@ 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
@comment lib/libnvidia-egl-wayland.so
@comment lib/libnvidia-egl-wayland.so.1
lib/libnvidia-eglcore.so
@ -87,6 +89,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/glvnd/egl_vendor.d/10_nvidia.json
share/vulkan/icd.d/nvidia_icd.json
share/vulkan/implicit_layer.d/nvidia_layers.json