Lines 9-15
Link Here
|
9 |
# slave ports instead (`x11/nvidia-driver-390', `x11/nvidia-driver-340', |
9 |
# slave ports instead (`x11/nvidia-driver-390', `x11/nvidia-driver-340', |
10 |
# or `x11/nvidia-driver-304'). |
10 |
# or `x11/nvidia-driver-304'). |
11 |
|
11 |
|
12 |
PORTNAME= nvidia-driver |
12 |
PORTNAME?= nvidia-driver |
13 |
DISTVERSION?= 460.67 |
13 |
DISTVERSION?= 460.67 |
14 |
# Always try to set PORTREVISION as it can be overridden by the slave ports |
14 |
# Always try to set PORTREVISION as it can be overridden by the slave ports |
15 |
PORTREVISION?= 0 |
15 |
PORTREVISION?= 0 |
Lines 18-25
Link Here
|
18 |
DISTNAME= NVIDIA-FreeBSD-${ARCH_SUFX}-${DISTVERSION} |
18 |
DISTNAME= NVIDIA-FreeBSD-${ARCH_SUFX}-${DISTVERSION} |
19 |
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} |
19 |
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} |
20 |
|
20 |
|
21 |
MAINTAINER= danfe@FreeBSD.org |
21 |
MAINTAINER?= danfe@FreeBSD.org |
22 |
COMMENT= NVidia graphics card binary drivers for hardware OpenGL rendering |
22 |
COMMENT?= NVidia graphics card binary drivers for hardware OpenGL rendering |
23 |
|
23 |
|
24 |
LICENSE_FILE= ${WRKSRC}/doc/license.txt |
24 |
LICENSE_FILE= ${WRKSRC}/doc/license.txt |
25 |
.include "${.CURDIR}/../nvidia-driver/Makefile.common" |
25 |
.include "${.CURDIR}/../nvidia-driver/Makefile.common" |
Lines 39-45
Link Here
|
39 |
MAKE_ENV= DEBUG_FLAGS=${DEBUG_FLAGS} \ |
39 |
MAKE_ENV= DEBUG_FLAGS=${DEBUG_FLAGS} \ |
40 |
EGL_GLVND_JSON_PATH=${STAGEDIR}${GLVND_JSON_PATH} \ |
40 |
EGL_GLVND_JSON_PATH=${STAGEDIR}${GLVND_JSON_PATH} \ |
41 |
EGL_WAYLAND_JSON_PATH=${STAGEDIR}${WAYLAND_JSON_PATH} |
41 |
EGL_WAYLAND_JSON_PATH=${STAGEDIR}${WAYLAND_JSON_PATH} |
42 |
SUB_FILES= pkg-message nvidia.conf |
42 |
SUB_FILES= pkg-message |
|
|
43 |
.if !defined(LIBGLDIR) |
44 |
SUB_FILES+= nvidia.conf |
45 |
.endif |
43 |
.if ${NVVERSION} < 410.057 |
46 |
.if ${NVVERSION} < 410.057 |
44 |
SUB_FILES+= pkg-deinstall pkg-install |
47 |
SUB_FILES+= pkg-deinstall pkg-install |
45 |
.endif |
48 |
.endif |
Lines 50-55
Link Here
|
50 |
extra-patch-src-nvidia_pci.c |
53 |
extra-patch-src-nvidia_pci.c |
51 |
DOCSDIR= ${PREFIX}/share/doc/NVIDIA_GLX-1.0 |
54 |
DOCSDIR= ${PREFIX}/share/doc/NVIDIA_GLX-1.0 |
52 |
MODULESDIR= lib/xorg/modules |
55 |
MODULESDIR= lib/xorg/modules |
|
|
56 |
EXTENSIONSDIR?= ${MODULESDIR}/extensions/.nvidia |
53 |
PORTDOCS= * |
57 |
PORTDOCS= * |
54 |
|
58 |
|
55 |
.if ${NVVERSION} >= 331.013 |
59 |
.if ${NVVERSION} >= 331.013 |
Lines 92-97
Link Here
|
92 |
.endif |
96 |
.endif |
93 |
|
97 |
|
94 |
PLIST_SUB+= MODULESDIR=${MODULESDIR} |
98 |
PLIST_SUB+= MODULESDIR=${MODULESDIR} |
|
|
99 |
.if ${NVVERSION} < 410.057 |
100 |
PLIST_SUB+= EXTENSIONSDIR=${EXTENSIONSDIR} |
101 |
.else |
102 |
PLIST_SUB+= EXTENSIONSDIR="@comment " |
103 |
.endif |
104 |
.if defined(LIBGLDIR) |
105 |
PLIST_SUB+= LIBGLDIR=${LIBGLDIR} LIBGLMAP="@comment " |
106 |
.else |
107 |
PLIST_SUB+= LIBGLDIR="@comment " LIBGLMAP="" |
108 |
.endif |
109 |
|
110 |
.if ${PORTNAME} != nvidia-secondary-driver |
111 |
CONFLICTS_INSTALL+= nvidia-secondary-driver |
112 |
.endif |
95 |
|
113 |
|
96 |
.include <bsd.port.pre.mk> |
114 |
.include <bsd.port.pre.mk> |
97 |
|
115 |
|
Lines 278-285
Link Here
|
278 |
${STAGEDIR}${PREFIX}/lib/libGLESv2-NVIDIA.so.2 |
296 |
${STAGEDIR}${PREFIX}/lib/libGLESv2-NVIDIA.so.2 |
279 |
${RM} ${STAGEDIR}${PREFIX}/lib/libGLESv2.so |
297 |
${RM} ${STAGEDIR}${PREFIX}/lib/libGLESv2.so |
280 |
.endif |
298 |
.endif |
|
|
299 |
# Configuration of Nvidia as secondary GPU requires preserving Mesa libraries |
300 |
# as default implementation; a libmap must not override in this case. |
301 |
.if !defined(LIBGLDIR) |
281 |
@${MKDIR} ${STAGEDIR}${PREFIX}/etc/libmap.d/ |
302 |
@${MKDIR} ${STAGEDIR}${PREFIX}/etc/libmap.d/ |
282 |
${INSTALL_DATA} ${WRKDIR}/nvidia.conf \ |
303 |
${INSTALL_DATA} ${WRKDIR}/nvidia.conf \ |
283 |
${STAGEDIR}${PREFIX}/etc/libmap.d/ |
304 |
${STAGEDIR}${PREFIX}/etc/libmap.d/ |
|
|
305 |
.else |
306 |
# libgl proxies require a library path containing unrenamed lib*GL*.so |
307 |
${MKDIR} ${STAGEDIR}${PREFIX}/${LIBGLDIR} |
308 |
${RLN} ${STAGEDIR}${PREFIX}/lib/libGL-NVIDIA.so.1 \ |
309 |
${STAGEDIR}${PREFIX}/${LIBGLDIR}/libGL.so.1 |
310 |
${RLN} ${STAGEDIR}${PREFIX}/lib/libEGL-NVIDIA.so.1 \ |
311 |
${STAGEDIR}${PREFIX}/${LIBGLDIR}/libEGL.so.1 |
312 |
${RLN} ${STAGEDIR}${PREFIX}/lib/libGLESv2-NVIDIA.so.2 \ |
313 |
${STAGEDIR}${PREFIX}/${LIBGLDIR}/libGLESv2.so.2 |
314 |
.endif |
315 |
# Configuration of Nvidia as secondary GPU requires preserving xorg-server's |
316 |
# libglx.so and moving Nvidia's glx to where it can be found by a secondary |
317 |
# Xorg instance. |
318 |
# Not needed since 410.057: Nvidia driver finds libglxserver_nvidia.so instead. |
319 |
.if ${NVVERSION} < 410.057 |
320 |
.if ${EXTENSIONSDIR} != ${MODULESDIR}/extensions/.nvidia |
321 |
${MKDIR} ${STAGEDIR}${PREFIX}/${EXTENSIONSDIR} |
322 |
${MV} ${STAGEDIR}${PREFIX}/${MODULESDIR}/extensions/.nvidia/* \ |
323 |
${STAGEDIR}${PREFIX}/${EXTENSIONSDIR}/ |
324 |
.endif |
325 |
.endif |
284 |
|
326 |
|
285 |
.include <bsd.port.post.mk> |
327 |
.include <bsd.port.post.mk> |