Lines 14-20
Link Here
|
14 |
PORTNAME?= nvidia-driver |
14 |
PORTNAME?= nvidia-driver |
15 |
DISTVERSION?= 525.89.02 |
15 |
DISTVERSION?= 525.89.02 |
16 |
# Always try to set PORTREVISION as it can be overridden by the slave ports |
16 |
# Always try to set PORTREVISION as it can be overridden by the slave ports |
17 |
PORTREVISION?= 1 |
17 |
PORTREVISION?= 0 |
18 |
CATEGORIES= x11 |
18 |
CATEGORIES= x11 |
19 |
MASTER_SITES= NVIDIA/XFree86/FreeBSD-${ARCH_SUFX}/${DISTVERSION} |
19 |
MASTER_SITES= NVIDIA/XFree86/FreeBSD-${ARCH_SUFX}/${DISTVERSION} |
20 |
DISTNAME= NVIDIA-FreeBSD-${ARCH_SUFX}-${DISTVERSION} |
20 |
DISTNAME= NVIDIA-FreeBSD-${ARCH_SUFX}-${DISTVERSION} |
Lines 34-41
PATCH_DEPENDS= gsed:textproc/gsed
Link Here
|
34 |
BUILD_DEPENDS= pkg-config:devel/pkgconf |
34 |
BUILD_DEPENDS= pkg-config:devel/pkgconf |
35 |
LIB_DEPENDS= libOpenGL.so:graphics/libglvnd |
35 |
LIB_DEPENDS= libOpenGL.so:graphics/libglvnd |
36 |
.endif |
36 |
.endif |
37 |
.if ${NVVERSION} >= 525.08902 |
37 |
.if ${NVVERSION} >= 415.013 |
38 |
LIB_DEPENDS+= libnvidia-egl-wayland.so.1:graphics/egl-wayland |
38 |
LIB_DEPENDS+= libnvidia-egl-wayland.so:graphics/egl-wayland |
39 |
.endif |
39 |
.endif |
40 |
|
40 |
|
41 |
USES= kmod uidfix xorg |
41 |
USES= kmod uidfix xorg |
Lines 138-148
PLIST_SUB+= LIBGLDIR=${LIBGLDIR} LIBGLMAP="@comment "
Link Here
|
138 |
.else |
138 |
.else |
139 |
PLIST_SUB+= LIBGLDIR="@comment " LIBGLMAP="" |
139 |
PLIST_SUB+= LIBGLDIR="@comment " LIBGLMAP="" |
140 |
.endif |
140 |
.endif |
141 |
.if ${NVVERSION} >= 525.08902 |
|
|
142 |
PLIST_SUB+= NVEGL="" |
143 |
.else |
144 |
PLIST_SUB+= NVEGL="@comment " |
145 |
.endif |
146 |
|
141 |
|
147 |
.if ${NVVERSION} >= 515.08601 |
142 |
.if ${NVVERSION} >= 515.08601 |
148 |
PLIST_FILES+= lib/libnvidia-wayland-client.so.${DISTVERSION} |
143 |
PLIST_FILES+= lib/libnvidia-wayland-client.so.${DISTVERSION} |
Lines 251-256
post-patch: .SILENT
Link Here
|
251 |
${REINPLACE_CMD} -e '/void nvidia_dev_dtor/,+8s,.*status.*,,' \ |
246 |
${REINPLACE_CMD} -e '/void nvidia_dev_dtor/,+8s,.*status.*,,' \ |
252 |
${WRKSRC}/src/${NVSRC}/nvidia_dev.c |
247 |
${WRKSRC}/src/${NVSRC}/nvidia_dev.c |
253 |
.endif |
248 |
.endif |
|
|
249 |
# Move symlinks under PREFIX |
250 |
.if ${NVVERSION} >= 525.08902 |
251 |
${REINPLACE_CMD} -e '/ln/s/$${LOCALBASE}\/lib/../' \ |
252 |
-e '/LIBDIR/!s/$${LOCALBASE}/$${DESTDIR}$${PREFIX}/' \ |
253 |
${WRKSRC}/lib/libnvidia-allocator/Makefile |
254 |
.endif |
254 |
# After src 2a99dd30dfaa, DRIVER_MODULE should not include nvidia_devclass |
255 |
# After src 2a99dd30dfaa, DRIVER_MODULE should not include nvidia_devclass |
255 |
.if ${OSVERSION} >= 1400058 |
256 |
.if ${OSVERSION} >= 1400058 |
256 |
${REINPLACE_CMD} -e '/^DRIVER_MODULE/s/, nvidia_devclass//' \ |
257 |
${REINPLACE_CMD} -e '/^DRIVER_MODULE/s/, nvidia_devclass//' \ |
Lines 350-355
post-install: .SILENT
Link Here
|
350 |
${REINPLACE_CMD} -e '/libnvidia-egl-gbm\.so/d ; \ |
351 |
${REINPLACE_CMD} -e '/libnvidia-egl-gbm\.so/d ; \ |
351 |
/15_nvidia_gbm\.json/d' ${TMPPLIST} |
352 |
/15_nvidia_gbm\.json/d' ${TMPPLIST} |
352 |
.endif |
353 |
.endif |
|
|
354 |
.if ${NVVERSION} < 525.08902 |
355 |
${REINPLACE_CMD} -e '/libnvidia-allocator\.so/d ; \ |
356 |
/nvidia-drm_gbm\.so/d' ${TMPPLIST} |
357 |
.endif |
353 |
.if ${NVVERSION} < 410.057 |
358 |
.if ${NVVERSION} < 410.057 |
354 |
# Rename some libraries and install a libmap file to resolve conflict with |
359 |
# Rename some libraries and install a libmap file to resolve conflict with |
355 |
# Mesa libraries. |
360 |
# Mesa libraries. |
Lines 405-414
post-install: .SILENT
Link Here
|
405 |
@${ECHO_CMD} "libGLX_indirect.so.0 libGLX_nvidia.so.0" \ |
410 |
@${ECHO_CMD} "libGLX_indirect.so.0 libGLX_nvidia.so.0" \ |
406 |
>${STAGEDIR}${PREFIX}/etc/libmap.d/nvidia.conf |
411 |
>${STAGEDIR}${PREFIX}/etc/libmap.d/nvidia.conf |
407 |
.endif |
412 |
.endif |
408 |
.if ${NVVERSION} >= 525.08902 |
|
|
409 |
${MKDIR} ${STAGEDIR}${PREFIX}/lib/gbm |
410 |
${LN} -sf ../libnvidia-allocator.so.1 \ |
411 |
${STAGEDIR}${PREFIX}/lib/gbm/nvidia-drm_gbm.so |
412 |
.endif |
413 |
|
413 |
|
414 |
.include <bsd.port.post.mk> |
414 |
.include <bsd.port.post.mk> |