View | Details | Raw Unified | Return to bug 271523
Collapse All | Expand All

(-)b/x11/linux-nvidia-libs/Makefile (-7 / +11 lines)
Lines 1-502 Link Here
1
PORTNAME=	nvidia-libs
1
PORTNAME=	nvidia-libs
2
DISTVERSION?=	525.116.03
2
DISTVERSION?=	535.54.03
3
# Always try to set PORTREVISION as it can be overridden by the slave ports
3
# Always try to set PORTREVISION as it can be overridden by the slave ports
4
PORTREVISION?=	0
4
PORTREVISION?=	0
5
CATEGORIES=	x11 linux
5
CATEGORIES=	x11 linux
6
MASTER_SITES=	NVIDIA/XFree86/Linux-${ARCH_SUFX}/${DISTVERSION}/
6
MASTER_SITES=	NVIDIA/XFree86/Linux-${ARCH_SUFX}/${DISTVERSION}/
7
DISTNAME=	NVIDIA-Linux-${ARCH_SUFX}-${DISTVERSION}
7
DISTNAME=	NVIDIA-Linux-${ARCH_SUFX}-${DISTVERSION}
8
EXTRACT_SUFX=	.run
8
EXTRACT_SUFX=	.run
9
PKGNAMEPREFIX=	linux-
9
PKGNAMEPREFIX=	linux-
10
10
11
MAINTAINER=	x11@FreeBSD.org
11
MAINTAINER=	x11@FreeBSD.org
12
COMMENT=	NVidia graphics libraries and programs (Linux version)
12
COMMENT=	NVidia graphics libraries and programs (Linux version)
13
WWW=		https://www.nvidia.com/object/unix.html
13
WWW=		https://www.nvidia.com/object/unix.html
14
14
15
LICENSE_FILE=	${WRKSRC}/LICENSE
15
LICENSE_FILE=	${WRKSRC}/LICENSE
16
.include "${.CURDIR}/../nvidia-driver/Makefile.common"
16
.include "${.CURDIR}/../nvidia-driver/Makefile.common"
17
17
18
.if ${DISTVERSION:R} > 390
18
.if ${DISTVERSION:R} > 390
19
PORTSCOUT=	limit:\.\d+$$		# ignore *-no-compat32 distfiles
19
PORTSCOUT=	limit:\.\d+$$		# ignore *-no-compat32 distfiles
20
.else
20
.else
21
PORTSCOUT=	limit:^${DISTVERSION:R}\.\d+$$
21
PORTSCOUT=	limit:^${DISTVERSION:R}\.\d+$$
22
.endif
22
.endif
23
23
24
USES=		linux
24
USES=		linux
25
USE_LINUX=	xorglibs
25
USE_LINUX=	xorglibs
26
USE_LDCONFIG=	yes
26
USE_LDCONFIG=	yes
27
NO_BUILD=	yes
27
NO_BUILD=	yes
28
28
29
PLIST_RE=	# empty
29
PLIST_RE=	# empty
30
30
31
LINUX_LIBDIR=	/usr/lib${ARCH:S/i386//:S/amd//}
31
LINUX_LIBDIR=	/usr/lib${ARCH:S/i386//:S/amd//}
32
32
33
LINUX_LIBS=	libcuda.so.${PORTVERSION} \
33
LINUX_LIBS=	libcuda.so.${PORTVERSION} \
34
		libnvcuvid.so.${PORTVERSION} \
34
		libnvcuvid.so.${PORTVERSION} \
35
		libnvidia-cfg.so.${PORTVERSION} \
35
		libnvidia-cfg.so.${PORTVERSION} \
36
		libnvidia-compiler.so.${PORTVERSION} \
37
		libnvidia-glcore.so.${PORTVERSION} \
36
		libnvidia-glcore.so.${PORTVERSION} \
38
		libnvidia-ml.so.${PORTVERSION} \
37
		libnvidia-ml.so.${PORTVERSION} \
39
		libnvidia-opencl.so.${PORTVERSION} \
38
		libnvidia-opencl.so.${PORTVERSION} \
40
		libnvidia-tls.so.${PORTVERSION} \
39
		libnvidia-tls.so.${PORTVERSION} \
41
		libvdpau_nvidia.so.${PORTVERSION}
40
		libvdpau_nvidia.so.${PORTVERSION}
42
LINUX_LINKS=	libcuda.so.${PORTVERSION} libcuda.so.1 \
41
LINUX_LINKS=	libcuda.so.${PORTVERSION} libcuda.so.1 \
43
		libcuda.so.${PORTVERSION} libcuda.so \
42
		libcuda.so.${PORTVERSION} libcuda.so \
44
		libnvcuvid.so.${PORTVERSION} libnvcuvid.so.1 \
43
		libnvcuvid.so.${PORTVERSION} libnvcuvid.so.1 \
45
		libnvcuvid.so.${PORTVERSION} libnvcuvid.so \
44
		libnvcuvid.so.${PORTVERSION} libnvcuvid.so \
46
		libnvidia-cfg.so.${PORTVERSION} libnvidia-cfg.so.1 \
45
		libnvidia-cfg.so.${PORTVERSION} libnvidia-cfg.so.1 \
47
		libnvidia-cfg.so.${PORTVERSION} libnvidia-cfg.so \
46
		libnvidia-cfg.so.${PORTVERSION} libnvidia-cfg.so \
48
		libnvidia-ml.so.${PORTVERSION} libnvidia-ml.so.1 \
47
		libnvidia-ml.so.${PORTVERSION} libnvidia-ml.so.1 \
49
		libnvidia-ml.so.${PORTVERSION} libnvidia-ml.so \
48
		libnvidia-ml.so.${PORTVERSION} libnvidia-ml.so \
50
		libnvidia-opencl.so.${PORTVERSION} libnvidia-opencl.so.1 \
49
		libnvidia-opencl.so.${PORTVERSION} libnvidia-opencl.so.1 \
51
		libvdpau_nvidia.so.${PORTVERSION} vdpau/libvdpau_nvidia.so.1
50
		libvdpau_nvidia.so.${PORTVERSION} vdpau/libvdpau_nvidia.so.1
52
LINUX32_LIBS=	libcuda.so.${PORTVERSION} \
51
LINUX32_LIBS=	libcuda.so.${PORTVERSION} \
53
		libnvidia-compiler.so.${PORTVERSION} \
54
		libnvidia-glcore.so.${PORTVERSION} \
52
		libnvidia-glcore.so.${PORTVERSION} \
55
		libnvidia-ml.so.${PORTVERSION} \
53
		libnvidia-ml.so.${PORTVERSION} \
56
		libnvidia-opencl.so.${PORTVERSION} \
54
		libnvidia-opencl.so.${PORTVERSION} \
57
		libnvidia-tls.so.${PORTVERSION} \
55
		libnvidia-tls.so.${PORTVERSION} \
58
		libvdpau_nvidia.so.${PORTVERSION}
56
		libvdpau_nvidia.so.${PORTVERSION}
59
.if ${NVVERSION} < 415.013
57
.if ${NVVERSION} < 415.013
60
LINUX_LIBS+=	tls/libnvidia-tls.so.${PORTVERSION}
58
LINUX_LIBS+=	tls/libnvidia-tls.so.${PORTVERSION}
61
LINUX32_LIBS+=	tls/libnvidia-tls.so.${PORTVERSION}
59
LINUX32_LIBS+=	tls/libnvidia-tls.so.${PORTVERSION}
62
.endif
60
.endif
63
LINUX32_LINKS=	libcuda.so.${PORTVERSION} libcuda.so.1 \
61
LINUX32_LINKS=	libcuda.so.${PORTVERSION} libcuda.so.1 \
64
		libcuda.so.${PORTVERSION} libcuda.so \
62
		libcuda.so.${PORTVERSION} libcuda.so \
65
		libnvidia-ml.so.${PORTVERSION} libnvidia-ml.so.1 \
63
		libnvidia-ml.so.${PORTVERSION} libnvidia-ml.so.1 \
66
		libnvidia-ml.so.${PORTVERSION} libnvidia-ml.so \
64
		libnvidia-ml.so.${PORTVERSION} libnvidia-ml.so \
67
		libnvidia-opencl.so.${PORTVERSION} libnvidia-opencl.so.1 \
65
		libnvidia-opencl.so.${PORTVERSION} libnvidia-opencl.so.1 \
68
		libvdpau_nvidia.so.${PORTVERSION} vdpau/libvdpau_nvidia.so.1
66
		libvdpau_nvidia.so.${PORTVERSION} vdpau/libvdpau_nvidia.so.1
69
LINUX_PROGS=	nvidia-debugdump nvidia-settings nvidia-smi nvidia-xconfig
67
LINUX_PROGS=	nvidia-debugdump nvidia-settings nvidia-smi nvidia-xconfig
70
LINUX_MANS=	nvidia-settings nvidia-smi nvidia-xconfig
68
LINUX_MANS=	nvidia-settings nvidia-smi nvidia-xconfig
71
LINUX_DATA=	nvidia.icd /etc/OpenCL/vendors
69
LINUX_DATA=	nvidia.icd /etc/OpenCL/vendors
72
.if ${NVVERSION} >= 375.010
70
.if ${NVVERSION} >= 375.010
73
LINUX_DATA+=	10_nvidia.json /usr/share/glvnd/egl_vendor.d
71
LINUX_DATA+=	10_nvidia.json /usr/share/glvnd/egl_vendor.d
74
.else
72
.else
75
PLIST_RE+=	'\,${LINUXBASE}/usr/share/glvnd,d'
73
PLIST_RE+=	'\,${LINUXBASE}/usr/share/glvnd,d'
76
.endif
74
.endif
77
.if ${NVVERSION} >= 378.009
75
.if ${NVVERSION} >= 378.009
78
LINUX_DATA+=	10_nvidia_wayland.json /usr/share/egl/egl_external_platform.d
76
LINUX_DATA+=	10_nvidia_wayland.json /usr/share/egl/egl_external_platform.d
79
.else
77
.else
80
PLIST_RE+=	'\,${LINUXBASE}/usr/share/egl,d'
78
PLIST_RE+=	'\,${LINUXBASE}/usr/share/egl,d'
81
.endif
79
.endif
82
.if ${NVVERSION} >= 361.016
80
.if ${NVVERSION} >= 361.016
83
LINUX_LIBS+=	libEGL_nvidia.so.${PORTVERSION}
81
LINUX_LIBS+=	libEGL_nvidia.so.${PORTVERSION}
84
LINUX_LINKS+=	libEGL_nvidia.so.${PORTVERSION} libEGL_nvidia.so.0
82
LINUX_LINKS+=	libEGL_nvidia.so.${PORTVERSION} libEGL_nvidia.so.0
85
LINUX32_LIBS+=	libEGL_nvidia.so.${PORTVERSION}
83
LINUX32_LIBS+=	libEGL_nvidia.so.${PORTVERSION}
86
LINUX32_LINKS+=	libEGL_nvidia.so.${PORTVERSION} libEGL_nvidia.so.0
84
LINUX32_LINKS+=	libEGL_nvidia.so.${PORTVERSION} libEGL_nvidia.so.0
87
.elif ${NVVERSION} >= 355.006
85
.elif ${NVVERSION} >= 355.006
88
LINUX_LIBS+=	libEGL_nvidia.so.0
86
LINUX_LIBS+=	libEGL_nvidia.so.0
89
PLIST_RE+=	'\,${LINUXBASE}.*libEGL_nvidia\.so\.${PORTVERSION},d'
87
PLIST_RE+=	'\,${LINUXBASE}.*libEGL_nvidia\.so\.${PORTVERSION},d'
90
.else
88
.else
91
PLIST_RE+=	'\,${LINUXBASE}.*libEGL_nvidia\.so,d'
89
PLIST_RE+=	'\,${LINUXBASE}.*libEGL_nvidia\.so,d'
92
.endif
90
.endif
93
.if ${NVVERSION} >= 361.016 && ${NVVERSION} < 450.051
91
.if ${NVVERSION} >= 361.016 && ${NVVERSION} < 450.051
94
LINUX_LIBS+=	libnvidia-fatbinaryloader.so.${PORTVERSION}
92
LINUX_LIBS+=	libnvidia-fatbinaryloader.so.${PORTVERSION}
95
LINUX32_LIBS+=	libnvidia-fatbinaryloader.so.${PORTVERSION}
93
LINUX32_LIBS+=	libnvidia-fatbinaryloader.so.${PORTVERSION}
96
.else
94
.else
97
PLIST_RE+=	'\,${LINUXBASE}.*libnvidia-fatbinaryloader\.so,d'
95
PLIST_RE+=	'\,${LINUXBASE}.*libnvidia-fatbinaryloader\.so,d'
98
.endif
96
.endif
99
.if ${NVVERSION} >= 361.016
97
.if ${NVVERSION} >= 361.016
100
LINUX_LIBS+=	libGLESv1_CM_nvidia.so.${PORTVERSION} \
98
LINUX_LIBS+=	libGLESv1_CM_nvidia.so.${PORTVERSION} \
101
		libGLESv2_nvidia.so.${PORTVERSION} \
99
		libGLESv2_nvidia.so.${PORTVERSION} \
102
		libGLX_nvidia.so.${PORTVERSION} \
100
		libGLX_nvidia.so.${PORTVERSION} \
103
		libnvidia-ptxjitcompiler.so.${PORTVERSION}
101
		libnvidia-ptxjitcompiler.so.${PORTVERSION}
104
LINUX_LINKS+=	libGLESv1_CM_nvidia.so.${PORTVERSION} libGLESv1_CM_nvidia.so.1 \
102
LINUX_LINKS+=	libGLESv1_CM_nvidia.so.${PORTVERSION} libGLESv1_CM_nvidia.so.1 \
105
		libGLESv2_nvidia.so.${PORTVERSION} libGLESv2_nvidia.so.2 \
103
		libGLESv2_nvidia.so.${PORTVERSION} libGLESv2_nvidia.so.2 \
106
		libGLX_nvidia.so.${PORTVERSION} libGLX_nvidia.so.0 \
104
		libGLX_nvidia.so.${PORTVERSION} libGLX_nvidia.so.0 \
107
		libGLX_nvidia.so.${PORTVERSION} libGLX_indirect.so.0 \
105
		libGLX_nvidia.so.${PORTVERSION} libGLX_indirect.so.0 \
108
		libnvidia-ptxjitcompiler.so.${PORTVERSION} libnvidia-ptxjitcompiler.so.1 \
106
		libnvidia-ptxjitcompiler.so.${PORTVERSION} libnvidia-ptxjitcompiler.so.1 \
109
		libnvidia-ptxjitcompiler.so.${PORTVERSION} libnvidia-ptxjitcompiler.so
107
		libnvidia-ptxjitcompiler.so.${PORTVERSION} libnvidia-ptxjitcompiler.so
110
LINUX32_LIBS+=	libGLESv1_CM_nvidia.so.${PORTVERSION} \
108
LINUX32_LIBS+=	libGLESv1_CM_nvidia.so.${PORTVERSION} \
111
		libGLESv2_nvidia.so.${PORTVERSION} \
109
		libGLESv2_nvidia.so.${PORTVERSION} \
112
		libGLX_nvidia.so.${PORTVERSION} \
110
		libGLX_nvidia.so.${PORTVERSION} \
113
		libnvidia-ptxjitcompiler.so.${PORTVERSION}
111
		libnvidia-ptxjitcompiler.so.${PORTVERSION}
114
LINUX32_LINKS+=	libGLESv1_CM_nvidia.so.${PORTVERSION} libGLESv1_CM_nvidia.so.1 \
112
LINUX32_LINKS+=	libGLESv1_CM_nvidia.so.${PORTVERSION} libGLESv1_CM_nvidia.so.1 \
115
		libGLESv2_nvidia.so.${PORTVERSION} libGLESv2_nvidia.so.2 \
113
		libGLESv2_nvidia.so.${PORTVERSION} libGLESv2_nvidia.so.2 \
116
		libGLX_nvidia.so.${PORTVERSION} libGLX_nvidia.so.0 \
114
		libGLX_nvidia.so.${PORTVERSION} libGLX_nvidia.so.0 \
117
		libGLX_nvidia.so.${PORTVERSION} libGLX_indirect.so.0 \
115
		libGLX_nvidia.so.${PORTVERSION} libGLX_indirect.so.0 \
118
		libnvidia-ptxjitcompiler.so.${PORTVERSION} libnvidia-ptxjitcompiler.so.1 \
116
		libnvidia-ptxjitcompiler.so.${PORTVERSION} libnvidia-ptxjitcompiler.so.1 \
119
		libnvidia-ptxjitcompiler.so.${PORTVERSION} libnvidia-ptxjitcompiler.so
117
		libnvidia-ptxjitcompiler.so.${PORTVERSION} libnvidia-ptxjitcompiler.so
120
.else
118
.else
121
PLIST_RE+=	'\,${LINUXBASE}.*libGLESv(1_CM|2)_nvidia\.so,d' \
119
PLIST_RE+=	'\,${LINUXBASE}.*libGLESv(1_CM|2)_nvidia\.so,d' \
122
		'\,${LINUXBASE}.*libGLX_(nvidia|indirect)\.so,d' \
120
		'\,${LINUXBASE}.*libGLX_(nvidia|indirect)\.so,d' \
123
		'\,${LINUXBASE}.*libnvidia-ptxjitcompiler\.so,d'
121
		'\,${LINUXBASE}.*libnvidia-ptxjitcompiler\.so,d'
124
.endif
122
.endif
125
.if ${NVVERSION} >= 525.08902 # 525.89.02
123
.if ${NVVERSION} >= 535.05403 # 535.54.03
126
LINUX_LIBS+=	libnvidia-egl-wayland.so.1.1.10
124
PLIST_RE+=	'\,${LINUXBASE}.*libnvidia-compiler\.so,d'
127
LINUX_LINKS+=	libnvidia-egl-wayland.so.1.1.10 libnvidia-egl-wayland.so.1
125
.else
128
PLIST_RE+=	'\,${LINUXBASE},s/(libnvidia-egl-wayland\.so)\.X/\1.1.1.10/'
126
LINUX_LIBS+=	libnvidia-compiler.so.${PORTVERSION}
127
LINUX32_LIBS+=	libnvidia-compiler.so.${PORTVERSION}
128
.endif
129
.if ${NVVERSION} >= 535.05403 # 535.54.03
130
LINUX_LIBS+=	libnvidia-egl-wayland.so.1.1.11
131
LINUX_LINKS+=	libnvidia-egl-wayland.so.1.1.11 libnvidia-egl-wayland.so.1
132
PLIST_RE+=	'\,${LINUXBASE},s/(libnvidia-egl-wayland\.so)\.X/\1.1.1.11/'
129
.elif ${NVVERSION} >= 495.02905 # 495.29.05
133
.elif ${NVVERSION} >= 495.02905 # 495.29.05
130
LINUX_LIBS+=	libnvidia-egl-wayland.so.1.1.9
134
LINUX_LIBS+=	libnvidia-egl-wayland.so.1.1.9
131
LINUX_LINKS+=	libnvidia-egl-wayland.so.1.1.9 libnvidia-egl-wayland.so.1
135
LINUX_LINKS+=	libnvidia-egl-wayland.so.1.1.9 libnvidia-egl-wayland.so.1
132
PLIST_RE+=	'\,${LINUXBASE},s/(libnvidia-egl-wayland\.so)\.X/\1.1.1.9/'
136
PLIST_RE+=	'\,${LINUXBASE},s/(libnvidia-egl-wayland\.so)\.X/\1.1.1.9/'
133
.elif ${NVVERSION} >= 470.04201 # 470.42.01
137
.elif ${NVVERSION} >= 470.04201 # 470.42.01
134
LINUX_LIBS+=	libnvidia-egl-wayland.so.1.1.7
138
LINUX_LIBS+=	libnvidia-egl-wayland.so.1.1.7
135
LINUX_LINKS+=	libnvidia-egl-wayland.so.1.1.7 libnvidia-egl-wayland.so.1
139
LINUX_LINKS+=	libnvidia-egl-wayland.so.1.1.7 libnvidia-egl-wayland.so.1
136
PLIST_RE+=	'\,${LINUXBASE},s/(libnvidia-egl-wayland\.so)\.X/\1.1.1.7/'
140
PLIST_RE+=	'\,${LINUXBASE},s/(libnvidia-egl-wayland\.so)\.X/\1.1.1.7/'
137
.elif ${NVVERSION} >= 460.02704 # 460.27.04
141
.elif ${NVVERSION} >= 460.02704 # 460.27.04
138
LINUX_LIBS+=	libnvidia-egl-wayland.so.1.1.5
142
LINUX_LIBS+=	libnvidia-egl-wayland.so.1.1.5
139
LINUX_LINKS+=	libnvidia-egl-wayland.so.1.1.5 libnvidia-egl-wayland.so.1
143
LINUX_LINKS+=	libnvidia-egl-wayland.so.1.1.5 libnvidia-egl-wayland.so.1
140
PLIST_RE+=	'\,${LINUXBASE},s/(libnvidia-egl-wayland\.so)\.X/\1.1.1.5/'
144
PLIST_RE+=	'\,${LINUXBASE},s/(libnvidia-egl-wayland\.so)\.X/\1.1.1.5/'
141
.elif ${NVVERSION} >= 440.026
145
.elif ${NVVERSION} >= 440.026
142
LINUX_LIBS+=	libnvidia-egl-wayland.so.1.1.4
146
LINUX_LIBS+=	libnvidia-egl-wayland.so.1.1.4
143
LINUX_LINKS+=	libnvidia-egl-wayland.so.1.1.4 libnvidia-egl-wayland.so.1
147
LINUX_LINKS+=	libnvidia-egl-wayland.so.1.1.4 libnvidia-egl-wayland.so.1
144
PLIST_RE+=	'\,${LINUXBASE},s/(libnvidia-egl-wayland\.so)\.X/\1.1.1.4/'
148
PLIST_RE+=	'\,${LINUXBASE},s/(libnvidia-egl-wayland\.so)\.X/\1.1.1.4/'
145
.elif ${NVVERSION} >= 435.017
149
.elif ${NVVERSION} >= 435.017
146
LINUX_LIBS+=	libnvidia-egl-wayland.so.1.1.3
150
LINUX_LIBS+=	libnvidia-egl-wayland.so.1.1.3
147
LINUX_LINKS+=	libnvidia-egl-wayland.so.1.1.3 libnvidia-egl-wayland.so.1
151
LINUX_LINKS+=	libnvidia-egl-wayland.so.1.1.3 libnvidia-egl-wayland.so.1
148
PLIST_RE+=	'\,${LINUXBASE},s/(libnvidia-egl-wayland\.so)\.X/\1.1.1.3/'
152
PLIST_RE+=	'\,${LINUXBASE},s/(libnvidia-egl-wayland\.so)\.X/\1.1.1.3/'
149
.elif ${NVVERSION} >= 418.030
153
.elif ${NVVERSION} >= 418.030
150
LINUX_LIBS+=	libnvidia-egl-wayland.so.1.1.2
154
LINUX_LIBS+=	libnvidia-egl-wayland.so.1.1.2
151
LINUX_LINKS+=	libnvidia-egl-wayland.so.1.1.2 libnvidia-egl-wayland.so.1
155
LINUX_LINKS+=	libnvidia-egl-wayland.so.1.1.2 libnvidia-egl-wayland.so.1
152
PLIST_RE+=	'\,${LINUXBASE},s/(libnvidia-egl-wayland\.so)\.X/\1.1.1.2/'
156
PLIST_RE+=	'\,${LINUXBASE},s/(libnvidia-egl-wayland\.so)\.X/\1.1.1.2/'
153
.elif ${NVVERSION} >= 410.057
157
.elif ${NVVERSION} >= 410.057
154
LINUX_LIBS+=	libnvidia-egl-wayland.so.1.1.0
158
LINUX_LIBS+=	libnvidia-egl-wayland.so.1.1.0
155
LINUX_LINKS+=	libnvidia-egl-wayland.so.1.1.0 libnvidia-egl-wayland.so.1
159
LINUX_LINKS+=	libnvidia-egl-wayland.so.1.1.0 libnvidia-egl-wayland.so.1
156
PLIST_RE+=	'\,${LINUXBASE},s/(libnvidia-egl-wayland\.so)\.X/\1.1.1.0/'
160
PLIST_RE+=	'\,${LINUXBASE},s/(libnvidia-egl-wayland\.so)\.X/\1.1.1.0/'
157
.elif ${NVVERSION} >= 396.018
161
.elif ${NVVERSION} >= 396.018
158
LINUX_LIBS+=	libnvidia-egl-wayland.so.1.0.3
162
LINUX_LIBS+=	libnvidia-egl-wayland.so.1.0.3
159
LINUX_LINKS+=	libnvidia-egl-wayland.so.1.0.3 libnvidia-egl-wayland.so.1
163
LINUX_LINKS+=	libnvidia-egl-wayland.so.1.0.3 libnvidia-egl-wayland.so.1
160
PLIST_RE+=	'\,${LINUXBASE},s/(libnvidia-egl-wayland\.so)\.X/\1.1.0.3/'
164
PLIST_RE+=	'\,${LINUXBASE},s/(libnvidia-egl-wayland\.so)\.X/\1.1.0.3/'
161
.elif ${NVVERSION} >= 387.012
165
.elif ${NVVERSION} >= 387.012
162
LINUX_LIBS+=	libnvidia-egl-wayland.so.1.0.2
166
LINUX_LIBS+=	libnvidia-egl-wayland.so.1.0.2
163
LINUX_LINKS+=	libnvidia-egl-wayland.so.1.0.2 libnvidia-egl-wayland.so.1
167
LINUX_LINKS+=	libnvidia-egl-wayland.so.1.0.2 libnvidia-egl-wayland.so.1
164
PLIST_RE+=	'\,${LINUXBASE},s/(libnvidia-egl-wayland\.so)\.X/\1.1.0.2/'
168
PLIST_RE+=	'\,${LINUXBASE},s/(libnvidia-egl-wayland\.so)\.X/\1.1.0.2/'
165
.elif ${NVVERSION} >= 378.013
169
.elif ${NVVERSION} >= 378.013
166
LINUX_LIBS+=	libnvidia-egl-wayland.so.1.0.1
170
LINUX_LIBS+=	libnvidia-egl-wayland.so.1.0.1
167
LINUX_LINKS+=	libnvidia-egl-wayland.so.1.0.1 libnvidia-egl-wayland.so.1
171
LINUX_LINKS+=	libnvidia-egl-wayland.so.1.0.1 libnvidia-egl-wayland.so.1
168
PLIST_RE+=	'\,${LINUXBASE},s/(libnvidia-egl-wayland\.so)\.X/\1.1.0.1/'
172
PLIST_RE+=	'\,${LINUXBASE},s/(libnvidia-egl-wayland\.so)\.X/\1.1.0.1/'
169
.elif ${NVVERSION} >= 378.009
173
.elif ${NVVERSION} >= 378.009
170
LINUX_LIBS+=	libnvidia-egl-wayland.so.1.0.0
174
LINUX_LIBS+=	libnvidia-egl-wayland.so.1.0.0
171
LINUX_LINKS+=	libnvidia-egl-wayland.so.1.0.0 libnvidia-egl-wayland.so.1
175
LINUX_LINKS+=	libnvidia-egl-wayland.so.1.0.0 libnvidia-egl-wayland.so.1
172
PLIST_RE+=	'\,${LINUXBASE},s/(libnvidia-egl-wayland\.so)\.X/\1.1.0.0/'
176
PLIST_RE+=	'\,${LINUXBASE},s/(libnvidia-egl-wayland\.so)\.X/\1.1.0.0/'
173
.elif ${NVVERSION} >= 364.012
177
.elif ${NVVERSION} >= 364.012
174
LINUX_LIBS+=	libnvidia-egl-wayland.so.${PORTVERSION}
178
LINUX_LIBS+=	libnvidia-egl-wayland.so.${PORTVERSION}
175
LINUX_LINKS+=	libnvidia-egl-wayland.so.${PORTVERSION} libnvidia-egl-wayland.so.1
179
LINUX_LINKS+=	libnvidia-egl-wayland.so.${PORTVERSION} libnvidia-egl-wayland.so.1
176
PLIST_RE+=	'\,${LINUXBASE},s/(libnvidia-egl-wayland\.so)\.X/\1.${PORTVERSION}/'
180
PLIST_RE+=	'\,${LINUXBASE},s/(libnvidia-egl-wayland\.so)\.X/\1.${PORTVERSION}/'
177
.else
181
.else
178
PLIST_RE+=	'\,${LINUXBASE}.*libnvidia-egl-wayland\.so,d'
182
PLIST_RE+=	'\,${LINUXBASE}.*libnvidia-egl-wayland\.so,d'
179
.endif
183
.endif
180
.if ${NVVERSION} >= 331.013 && ${NVVERSION} < 495.02905
184
.if ${NVVERSION} >= 331.013 && ${NVVERSION} < 495.02905
181
LINUX_LIBS+=	libnvidia-ifr.so.${PORTVERSION}
185
LINUX_LIBS+=	libnvidia-ifr.so.${PORTVERSION}
182
LINUX_LINKS+=	libnvidia-ifr.so.${PORTVERSION} libnvidia-ifr.so.1 \
186
LINUX_LINKS+=	libnvidia-ifr.so.${PORTVERSION} libnvidia-ifr.so.1 \
183
		libnvidia-ifr.so.${PORTVERSION} libnvidia-ifr.so
187
		libnvidia-ifr.so.${PORTVERSION} libnvidia-ifr.so
184
LINUX32_LIBS+=	libnvidia-ifr.so.${PORTVERSION}
188
LINUX32_LIBS+=	libnvidia-ifr.so.${PORTVERSION}
185
LINUX32_LINKS+=	libnvidia-ifr.so.${PORTVERSION} libnvidia-ifr.so.1 \
189
LINUX32_LINKS+=	libnvidia-ifr.so.${PORTVERSION} libnvidia-ifr.so.1 \
186
		libnvidia-ifr.so.${PORTVERSION} libnvidia-ifr.so
190
		libnvidia-ifr.so.${PORTVERSION} libnvidia-ifr.so
187
.else
191
.else
188
PLIST_RE+=	'\,${LINUXBASE}.*libnvidia-ifr,d'
192
PLIST_RE+=	'\,${LINUXBASE}.*libnvidia-ifr,d'
189
.endif
193
.endif
190
.if ${NVVERSION} >= 331.013
194
.if ${NVVERSION} >= 331.013
191
LINUX_LIBS+=	libnvidia-eglcore.so.${PORTVERSION} \
195
LINUX_LIBS+=	libnvidia-eglcore.so.${PORTVERSION} \
192
		libnvidia-fbc.so.${PORTVERSION} \
196
		libnvidia-fbc.so.${PORTVERSION} \
193
		libnvidia-glsi.so.${PORTVERSION}
197
		libnvidia-glsi.so.${PORTVERSION}
194
LINUX_LINKS+=	libnvidia-fbc.so.${PORTVERSION} libnvidia-fbc.so.1 \
198
LINUX_LINKS+=	libnvidia-fbc.so.${PORTVERSION} libnvidia-fbc.so.1 \
195
		libnvidia-fbc.so.${PORTVERSION} libnvidia-fbc.so
199
		libnvidia-fbc.so.${PORTVERSION} libnvidia-fbc.so
196
LINUX32_LIBS+=	libnvidia-eglcore.so.${PORTVERSION} \
200
LINUX32_LIBS+=	libnvidia-eglcore.so.${PORTVERSION} \
197
		libnvidia-fbc.so.${PORTVERSION} \
201
		libnvidia-fbc.so.${PORTVERSION} \
198
		libnvidia-glsi.so.${PORTVERSION}
202
		libnvidia-glsi.so.${PORTVERSION}
199
LINUX32_LINKS+=	libnvidia-fbc.so.${PORTVERSION} libnvidia-fbc.so.1 \
203
LINUX32_LINKS+=	libnvidia-fbc.so.${PORTVERSION} libnvidia-fbc.so.1 \
200
		libnvidia-fbc.so.${PORTVERSION} libnvidia-fbc.so
204
		libnvidia-fbc.so.${PORTVERSION} libnvidia-fbc.so
201
.else
205
.else
202
PLIST_RE+=	'\,${LINUXBASE}.*libnvidia-(eglcore|fbc|glsi),d'
206
PLIST_RE+=	'\,${LINUXBASE}.*libnvidia-(eglcore|fbc|glsi),d'
203
.endif
207
.endif
204
.if ${NVVERSION} >= 310.014
208
.if ${NVVERSION} >= 310.014
205
LINUX_LIBS+=	libnvidia-encode.so.${PORTVERSION}
209
LINUX_LIBS+=	libnvidia-encode.so.${PORTVERSION}
206
LINUX_LINKS+=	libnvidia-encode.so.${PORTVERSION} libnvidia-encode.so.1 \
210
LINUX_LINKS+=	libnvidia-encode.so.${PORTVERSION} libnvidia-encode.so.1 \
207
		libnvidia-encode.so.${PORTVERSION} libnvidia-encode.so
211
		libnvidia-encode.so.${PORTVERSION} libnvidia-encode.so
208
LINUX32_LIBS+=	libnvidia-encode.so.${PORTVERSION}
212
LINUX32_LIBS+=	libnvidia-encode.so.${PORTVERSION}
209
LINUX32_LINKS+=	libnvidia-encode.so.${PORTVERSION} libnvidia-encode.so.1 \
213
LINUX32_LINKS+=	libnvidia-encode.so.${PORTVERSION} libnvidia-encode.so.1 \
210
		libnvidia-encode.so.${PORTVERSION} libnvidia-encode.so
214
		libnvidia-encode.so.${PORTVERSION} libnvidia-encode.so
211
PLIST_RE+=	'\,${LINUXBASE}.*libXvMCNVIDIA,d'
215
PLIST_RE+=	'\,${LINUXBASE}.*libXvMCNVIDIA,d'
212
.else
216
.else
213
LINUX_LIBS+=	libXvMCNVIDIA.so.${PORTVERSION}
217
LINUX_LIBS+=	libXvMCNVIDIA.so.${PORTVERSION}
214
LINUX_LINKS+=	libXvMCNVIDIA.so.${PORTVERSION} libXvMCNVIDIA_dynamic.so.1 \
218
LINUX_LINKS+=	libXvMCNVIDIA.so.${PORTVERSION} libXvMCNVIDIA_dynamic.so.1 \
215
		libXvMCNVIDIA.so.${PORTVERSION} libXvMCNVIDIA_dynamic.so
219
		libXvMCNVIDIA.so.${PORTVERSION} libXvMCNVIDIA_dynamic.so
216
PLIST_RE+=	'\,${LINUXBASE}.*libnvidia-encode,d'
220
PLIST_RE+=	'\,${LINUXBASE}.*libnvidia-encode,d'
217
.endif
221
.endif
218
.if ${NVVERSION} >= 346.016
222
.if ${NVVERSION} >= 346.016
219
LINUX_LIBS+=	libnvidia-gtk2.so.${PORTVERSION} \
223
LINUX_LIBS+=	libnvidia-gtk2.so.${PORTVERSION} \
220
		libnvidia-gtk3.so.${PORTVERSION}
224
		libnvidia-gtk3.so.${PORTVERSION}
221
.else
225
.else
222
PLIST_RE+=	'\,${LINUXBASE}.*libnvidia-gtk(2|3)\.so,d'
226
PLIST_RE+=	'\,${LINUXBASE}.*libnvidia-gtk(2|3)\.so,d'
223
.endif
227
.endif
224
.if ${NVVERSION} >= 331.049 && ${NVVERSION} < 352.009
228
.if ${NVVERSION} >= 331.049 && ${NVVERSION} < 352.009
225
LINUX_DATA+=	monitoring.conf /usr/share/nvidia \
229
LINUX_DATA+=	monitoring.conf /usr/share/nvidia \
226
		${WRKSRC}/pci.ids /usr/share/nvidia
230
		${WRKSRC}/pci.ids /usr/share/nvidia
227
.else
231
.else
228
PLIST_RE+=	'\,${LINUXBASE}.*monitoring\.conf,d' \
232
PLIST_RE+=	'\,${LINUXBASE}.*monitoring\.conf,d' \
229
		'\,${LINUXBASE}.*pci\.ids,d'
233
		'\,${LINUXBASE}.*pci\.ids,d'
230
.endif
234
.endif
231
.if ${NVVERSION} >= 334.016
235
.if ${NVVERSION} >= 334.016
232
LINUX_DATA+=	nvidia-application-profiles-${PORTVERSION}-key-documentation /usr/share/nvidia
236
LINUX_DATA+=	nvidia-application-profiles-${PORTVERSION}-key-documentation /usr/share/nvidia
233
.else
237
.else
234
PLIST_RE+=	'\,${LINUXBASE}.*application-profiles-${PORTVERSION}-key-documentation,d'
238
PLIST_RE+=	'\,${LINUXBASE}.*application-profiles-${PORTVERSION}-key-documentation,d'
235
.endif
239
.endif
236
.if ${NVVERSION} >= 319.012
240
.if ${NVVERSION} >= 319.012
237
LINUX_DATA+=	nvidia-application-profiles-${PORTVERSION}-rc /usr/share/nvidia
241
LINUX_DATA+=	nvidia-application-profiles-${PORTVERSION}-rc /usr/share/nvidia
238
.else
242
.else
239
PLIST_RE+=	'\,${LINUXBASE}.*share/nvidia,d'
243
PLIST_RE+=	'\,${LINUXBASE}.*share/nvidia,d'
240
.endif
244
.endif
241
.if ${NVVERSION} >= 319.017
245
.if ${NVVERSION} >= 319.017
242
LINUX_PROGS+=	nvidia-cuda-mps-control nvidia-cuda-mps-server \
246
LINUX_PROGS+=	nvidia-cuda-mps-control nvidia-cuda-mps-server \
243
		nvidia-persistenced
247
		nvidia-persistenced
244
LINUX_MANS+=	nvidia-cuda-mps-control nvidia-persistenced
248
LINUX_MANS+=	nvidia-cuda-mps-control nvidia-persistenced
245
.else
249
.else
246
LINUX_PROGS+=	nvidia-cuda-proxy-control nvidia-cuda-proxy-server
250
LINUX_PROGS+=	nvidia-cuda-proxy-control nvidia-cuda-proxy-server
247
LINUX_MANS+=	nvidia-cuda-proxy-control
251
LINUX_MANS+=	nvidia-cuda-proxy-control
248
PLIST_RE+=	'\,${LINUXBASE},s/cuda-mps/cuda-proxy/' \
252
PLIST_RE+=	'\,${LINUXBASE},s/cuda-mps/cuda-proxy/' \
249
		'\,${LINUXBASE}.*nvidia-persistenced,d'
253
		'\,${LINUXBASE}.*nvidia-persistenced,d'
250
.endif
254
.endif
251
.if ${NVVERSION} >= 364.012
255
.if ${NVVERSION} >= 364.012
252
LINUX_DATA+=	nvidia_icd.json /etc/vulkan/icd.d
256
LINUX_DATA+=	nvidia_icd.json /etc/vulkan/icd.d
253
.else
257
.else
254
PLIST_RE+=	'\,${LINUXBASE}/etc/vulkan,d'
258
PLIST_RE+=	'\,${LINUXBASE}/etc/vulkan,d'
255
.endif
259
.endif
256
.if ${NVVERSION} >= 410.057 && ${NVVERSION} < 495.02905
260
.if ${NVVERSION} >= 410.057 && ${NVVERSION} < 495.02905
257
LINUX_LIBS+=	libnvidia-cbl.so.${PORTVERSION}
261
LINUX_LIBS+=	libnvidia-cbl.so.${PORTVERSION}
258
.else
262
.else
259
PLIST_RE+=	'\,${LINUXBASE}.*libnvidia-cbl\.so,d'
263
PLIST_RE+=	'\,${LINUXBASE}.*libnvidia-cbl\.so,d'
260
.endif
264
.endif
261
.if ${NVVERSION} >= 410.057
265
.if ${NVVERSION} >= 410.057
262
LINUX_LIBS+=	libnvidia-rtcore.so.${PORTVERSION}
266
LINUX_LIBS+=	libnvidia-rtcore.so.${PORTVERSION}
263
.else
267
.else
264
PLIST_RE+=	'\,${LINUXBASE}.*libnvidia-rtcore\.so,d'
268
PLIST_RE+=	'\,${LINUXBASE}.*libnvidia-rtcore\.so,d'
265
.endif
269
.endif
266
.if ${NVVERSION} >= 396.018
270
.if ${NVVERSION} >= 396.018
267
LINUX_LIBS+=	libnvidia-glvkspirv.so.${PORTVERSION}
271
LINUX_LIBS+=	libnvidia-glvkspirv.so.${PORTVERSION}
268
LINUX32_LIBS+=	libnvidia-glvkspirv.so.${PORTVERSION}
272
LINUX32_LIBS+=	libnvidia-glvkspirv.so.${PORTVERSION}
269
.else
273
.else
270
PLIST_RE+=	'\,${LINUXBASE}.*libnvidia-glvkspirv\.so,d'
274
PLIST_RE+=	'\,${LINUXBASE}.*libnvidia-glvkspirv\.so,d'
271
.endif
275
.endif
272
.if ${NVVERSION} >= 525.08902 # 525.89.02
276
.if ${NVVERSION} >= 525.08902 # 525.89.02
273
LINUX_LIBS+=	libnvoptix.so.${PORTVERSION} \
277
LINUX_LIBS+=	libnvoptix.so.${PORTVERSION} \
274
		libnvidia-nvvm.so.${PORTVERSION} \
278
		libnvidia-nvvm.so.${PORTVERSION} \
275
		libnvidia-ngx.so.${PORTVERSION} \
279
		libnvidia-ngx.so.${PORTVERSION} \
276
		libnvidia-allocator.so.${PORTVERSION} \
280
		libnvidia-allocator.so.${PORTVERSION} \
277
		libnvidia-opticalflow.so.${PORTVERSION} \
281
		libnvidia-opticalflow.so.${PORTVERSION} \
278
		libnvidia-egl-gbm.so.1.1.0
282
		libnvidia-egl-gbm.so.1.1.0
279
LINUX_LINKS+=	libnvidia-egl-gbm.so.1.1.0 libnvidia-egl-gbm.so.1 \
283
LINUX_LINKS+=	libnvidia-egl-gbm.so.1.1.0 libnvidia-egl-gbm.so.1 \
280
		libnvidia-egl-gbm.so.1.1.0 libnvidia-egl-gbm.so \
284
		libnvidia-egl-gbm.so.1.1.0 libnvidia-egl-gbm.so \
281
		libnvidia-nvvm.so.${PORTVERSION} libnvidia-nvvm.so.4 \
285
		libnvidia-nvvm.so.${PORTVERSION} libnvidia-nvvm.so.4 \
282
		libnvidia-nvvm.so.${PORTVERSION} libnvidia-nvvm.so \
286
		libnvidia-nvvm.so.${PORTVERSION} libnvidia-nvvm.so \
283
		libnvidia-opticalflow.so.${PORTVERSION} libnvidia-opticalflow.so.1 \
287
		libnvidia-opticalflow.so.${PORTVERSION} libnvidia-opticalflow.so.1 \
284
		libnvidia-opticalflow.so.${PORTVERSION} libnvidia-opticalflow.so \
288
		libnvidia-opticalflow.so.${PORTVERSION} libnvidia-opticalflow.so \
285
		libnvoptix.so.${PORTVERSION} libnvoptix.so.1 \
289
		libnvoptix.so.${PORTVERSION} libnvoptix.so.1 \
286
		libnvoptix.so.${PORTVERSION} libnvoptix.so
290
		libnvoptix.so.${PORTVERSION} libnvoptix.so
287
LINUX32_LIBS+=  libnvidia-nvvm.so.${PORTVERSION} \
291
LINUX32_LIBS+=  libnvidia-nvvm.so.${PORTVERSION} \
288
		libnvidia-allocator.so.${PORTVERSION} \
292
		libnvidia-allocator.so.${PORTVERSION} \
289
		libnvidia-opticalflow.so.${PORTVERSION}
293
		libnvidia-opticalflow.so.${PORTVERSION}
290
LINUX32_LINKS+= libnvidia-nvvm.so.${PORTVERSION} libnvidia-nvvm.so.4 \
294
LINUX32_LINKS+= libnvidia-nvvm.so.${PORTVERSION} libnvidia-nvvm.so.4 \
291
		libnvidia-nvvm.so.${PORTVERSION} libnvidia-nvvm.so
295
		libnvidia-nvvm.so.${PORTVERSION} libnvidia-nvvm.so
292
.else
296
.else
293
PLIST_RE+=	'\,${LINUXBASE}.*libnvoptix\.so,d' \
297
PLIST_RE+=	'\,${LINUXBASE}.*libnvoptix\.so,d' \
294
		'\,${LINUXBASE}.*libnvidia-(allocator|egl-gbm|ngx|nvvm|opticalflow),d'
298
		'\,${LINUXBASE}.*libnvidia-(allocator|egl-gbm|ngx|nvvm|opticalflow),d'
295
.endif
299
.endif
296
300
297
PLIST_SUB+=	LINUXBASE=${LINUXBASE} \
301
PLIST_SUB+=	LINUXBASE=${LINUXBASE} \
298
		LINUX_LIBDIR=${LINUX_LIBDIR} \
302
		LINUX_LIBDIR=${LINUX_LIBDIR} \
299
		SHLIB_VERSION=${PORTVERSION}
303
		SHLIB_VERSION=${PORTVERSION}
300
304
301
.include <bsd.port.pre.mk>
305
.include <bsd.port.pre.mk>
302
306
303
.if ${NVVERSION} >= 390.042 && ${LINUX_DEFAULT} != c6
307
.if ${NVVERSION} >= 390.042 && ${LINUX_DEFAULT} != c6
304
USE_LINUX+=	libglvnd
308
USE_LINUX+=	libglvnd
305
PLIST_RE+=	'\,${LINUXBASE}.*libEGL\.so,d' \
309
PLIST_RE+=	'\,${LINUXBASE}.*libEGL\.so,d' \
306
		'\,${LINUXBASE}.*libGL\.so,d' \
310
		'\,${LINUXBASE}.*libGL\.so,d' \
307
		'\,${LINUXBASE}.*libGLESv(1_CM|2)\.so,d' \
311
		'\,${LINUXBASE}.*libGLESv(1_CM|2)\.so,d' \
308
		'\,${LINUXBASE}.*libGLX\.so,d' \
312
		'\,${LINUXBASE}.*libGLX\.so,d' \
309
		'\,${LINUXBASE}.*libGLdispatch\.so,d' \
313
		'\,${LINUXBASE}.*libGLdispatch\.so,d' \
310
		'\,${LINUXBASE}.*libOpenGL\.so,d'
314
		'\,${LINUXBASE}.*libOpenGL\.so,d'
311
.else
315
.else
312
.if ${NVVERSION} >= 390.042
316
.if ${NVVERSION} >= 390.042
313
LINUX_LIBS+=	libEGL.so.1.1.0
317
LINUX_LIBS+=	libEGL.so.1.1.0
314
LINUX_LINKS+=	libEGL.so.1.1.0 libEGL.so.1
318
LINUX_LINKS+=	libEGL.so.1.1.0 libEGL.so.1
315
LINUX32_LIBS+=	libEGL.so.1.1.0
319
LINUX32_LIBS+=	libEGL.so.1.1.0
316
LINUX32_LINKS+=	libEGL.so.1.1.0 libEGL.so.1
320
LINUX32_LINKS+=	libEGL.so.1.1.0 libEGL.so.1
317
PLIST_RE+=	'\,${LINUXBASE},s/(libEGL\.so)\.X/\1.1.1.0/'
321
PLIST_RE+=	'\,${LINUXBASE},s/(libEGL\.so)\.X/\1.1.1.0/'
318
.elif ${NVVERSION} >= 355.006
322
.elif ${NVVERSION} >= 355.006
319
LINUX_LIBS+=	libEGL.so.1
323
LINUX_LIBS+=	libEGL.so.1
320
LINUX32_LIBS+=	libEGL.so.1
324
LINUX32_LIBS+=	libEGL.so.1
321
PLIST_RE+=	'\,${LINUXBASE}.*libEGL\.so\.X,d'
325
PLIST_RE+=	'\,${LINUXBASE}.*libEGL\.so\.X,d'
322
.elif ${NVVERSION} >= 331.013
326
.elif ${NVVERSION} >= 331.013
323
LINUX_LIBS+=	libEGL.so.${PORTVERSION}
327
LINUX_LIBS+=	libEGL.so.${PORTVERSION}
324
LINUX_LINKS+=	libEGL.so.${PORTVERSION} libEGL.so.1
328
LINUX_LINKS+=	libEGL.so.${PORTVERSION} libEGL.so.1
325
LINUX32_LIBS+=	libEGL.so.${PORTVERSION}
329
LINUX32_LIBS+=	libEGL.so.${PORTVERSION}
326
LINUX32_LINKS+=	libEGL.so.${PORTVERSION} libEGL.so.1
330
LINUX32_LINKS+=	libEGL.so.${PORTVERSION} libEGL.so.1
327
PLIST_RE+=	'\,${LINUXBASE},s/(libEGL\.so)\.X/\1.${PORTVERSION}/'
331
PLIST_RE+=	'\,${LINUXBASE},s/(libEGL\.so)\.X/\1.${PORTVERSION}/'
328
.else
332
.else
329
PLIST_RE+=	'\,${LINUXBASE}.*libEGL\.so,d'
333
PLIST_RE+=	'\,${LINUXBASE}.*libEGL\.so,d'
330
.endif
334
.endif
331
.if ${NVVERSION} >= 390.042
335
.if ${NVVERSION} >= 390.042
332
LINUX_LIBS+=	libGL.so.1.7.0
336
LINUX_LIBS+=	libGL.so.1.7.0
333
LINUX_LINKS+=	libGL.so.1.7.0 libGL.so.1
337
LINUX_LINKS+=	libGL.so.1.7.0 libGL.so.1
334
LINUX32_LIBS+=	libGL.so.1.7.0
338
LINUX32_LIBS+=	libGL.so.1.7.0
335
LINUX32_LINKS+=	libGL.so.1.7.0 libGL.so.1
339
LINUX32_LINKS+=	libGL.so.1.7.0 libGL.so.1
336
PLIST_RE+=	'\,${LINUXBASE},s/(libGL\.so)\.X/\1.1.7.0/'
340
PLIST_RE+=	'\,${LINUXBASE},s/(libGL\.so)\.X/\1.1.7.0/'
337
.elif ${NVVERSION} >= 361.028
341
.elif ${NVVERSION} >= 361.028
338
LINUX_LIBS+=	libGL.so.1.0.0
342
LINUX_LIBS+=	libGL.so.1.0.0
339
LINUX_LINKS+=	libGL.so.1.0.0 libGL.so.1
343
LINUX_LINKS+=	libGL.so.1.0.0 libGL.so.1
340
LINUX32_LIBS+=	libGL.so.1.0.0
344
LINUX32_LIBS+=	libGL.so.1.0.0
341
LINUX32_LINKS+=	libGL.so.1.0.0 libGL.so.1
345
LINUX32_LINKS+=	libGL.so.1.0.0 libGL.so.1
342
PLIST_RE+=	'\,${LINUXBASE},s/(libGL\.so)\.X/\1.1.0.0/'
346
PLIST_RE+=	'\,${LINUXBASE},s/(libGL\.so)\.X/\1.1.0.0/'
343
.elif ${NVVERSION} >= 361.016
347
.elif ${NVVERSION} >= 361.016
344
LINUX_LIBS+=	libGL.so.1
348
LINUX_LIBS+=	libGL.so.1
345
LINUX32_LIBS+=	libGL.so.1
349
LINUX32_LIBS+=	libGL.so.1
346
PLIST_RE+=	'\,${LINUXBASE}.*libGL\.so\.X,d'
350
PLIST_RE+=	'\,${LINUXBASE}.*libGL\.so\.X,d'
347
.else
351
.else
348
LINUX_LIBS+=	libGL.so.${PORTVERSION}
352
LINUX_LIBS+=	libGL.so.${PORTVERSION}
349
LINUX_LINKS+=	libGL.so.${PORTVERSION} libGL.so.1
353
LINUX_LINKS+=	libGL.so.${PORTVERSION} libGL.so.1
350
LINUX32_LIBS+=	libGL.so.${PORTVERSION}
354
LINUX32_LIBS+=	libGL.so.${PORTVERSION}
351
LINUX32_LINKS+=	libGL.so.${PORTVERSION} libGL.so.1
355
LINUX32_LINKS+=	libGL.so.${PORTVERSION} libGL.so.1
352
PLIST_RE+=	'\,${LINUXBASE},s/(libGL\.so)\.X/\1.${PORTVERSION}/'
356
PLIST_RE+=	'\,${LINUXBASE},s/(libGL\.so)\.X/\1.${PORTVERSION}/'
353
.endif
357
.endif
354
.if ${NVVERSION} >= 390.042
358
.if ${NVVERSION} >= 390.042
355
LINUX_LIBS+=	libGLESv1_CM.so.1.2.0 \
359
LINUX_LIBS+=	libGLESv1_CM.so.1.2.0 \
356
		libGLESv2.so.2.1.0
360
		libGLESv2.so.2.1.0
357
LINUX_LINKS+=	libGLESv1_CM.so.1.2.0 libGLESv1_CM.so.1 \
361
LINUX_LINKS+=	libGLESv1_CM.so.1.2.0 libGLESv1_CM.so.1 \
358
		libGLESv2.so.2.1.0 libGLESv2.so.2
362
		libGLESv2.so.2.1.0 libGLESv2.so.2
359
LINUX32_LIBS+=	libGLESv1_CM.so.1.2.0 \
363
LINUX32_LIBS+=	libGLESv1_CM.so.1.2.0 \
360
		libGLESv2.so.2.1.0
364
		libGLESv2.so.2.1.0
361
LINUX32_LINKS+=	libGLESv1_CM.so.1.2.0 libGLESv1_CM.so.1 \
365
LINUX32_LINKS+=	libGLESv1_CM.so.1.2.0 libGLESv1_CM.so.1 \
362
		libGLESv2.so.2.1.0 libGLESv2.so.2
366
		libGLESv2.so.2.1.0 libGLESv2.so.2
363
PLIST_RE+=	'\,${LINUXBASE},s/(libGLESv1_CM\.so)\.X/\1.1.2.0/' \
367
PLIST_RE+=	'\,${LINUXBASE},s/(libGLESv1_CM\.so)\.X/\1.1.2.0/' \
364
		'\,${LINUXBASE},s/(libGLESv2\.so)\.X/\1.2.1.0/'
368
		'\,${LINUXBASE},s/(libGLESv2\.so)\.X/\1.2.1.0/'
365
.elif ${NVVERSION} >= 361.016
369
.elif ${NVVERSION} >= 361.016
366
LINUX_LIBS+=	libGLESv1_CM.so.1 \
370
LINUX_LIBS+=	libGLESv1_CM.so.1 \
367
		libGLESv2.so.2
371
		libGLESv2.so.2
368
LINUX32_LIBS+=	libGLESv1_CM.so.1 \
372
LINUX32_LIBS+=	libGLESv1_CM.so.1 \
369
		libGLESv2.so.2
373
		libGLESv2.so.2
370
PLIST_RE+=	'\,${LINUXBASE}.*GLESv(1_CM|2)\.so\.X,d'
374
PLIST_RE+=	'\,${LINUXBASE}.*GLESv(1_CM|2)\.so\.X,d'
371
.elif ${NVVERSION} >= 331.013
375
.elif ${NVVERSION} >= 331.013
372
LINUX_LIBS+=	libGLESv1_CM.so.${PORTVERSION} \
376
LINUX_LIBS+=	libGLESv1_CM.so.${PORTVERSION} \
373
		libGLESv2.so.${PORTVERSION}
377
		libGLESv2.so.${PORTVERSION}
374
LINUX_LINKS+=	libGLESv1_CM.so.${PORTVERSION} libGLESv1_CM.so.1 \
378
LINUX_LINKS+=	libGLESv1_CM.so.${PORTVERSION} libGLESv1_CM.so.1 \
375
		libGLESv2.so.${PORTVERSION} libGLESv2.so.2
379
		libGLESv2.so.${PORTVERSION} libGLESv2.so.2
376
LINUX32_LIBS+=	libGLESv1_CM.so.${PORTVERSION} \
380
LINUX32_LIBS+=	libGLESv1_CM.so.${PORTVERSION} \
377
		libGLESv2.so.${PORTVERSION}
381
		libGLESv2.so.${PORTVERSION}
378
LINUX32_LINKS+=	libGLESv1_CM.so.${PORTVERSION} libGLESv1_CM.so.1 \
382
LINUX32_LINKS+=	libGLESv1_CM.so.${PORTVERSION} libGLESv1_CM.so.1 \
379
		libGLESv2.so.${PORTVERSION} libGLESv2.so.2
383
		libGLESv2.so.${PORTVERSION} libGLESv2.so.2
380
PLIST_RE+=	'\,${LINUXBASE},s/(libGLESv(1_CM|2)\.so)\.X/\1.${PORTVERSION}/'
384
PLIST_RE+=	'\,${LINUXBASE},s/(libGLESv(1_CM|2)\.so)\.X/\1.${PORTVERSION}/'
381
.else
385
.else
382
PLIST_RE+=	'\,${LINUXBASE}.*libGLESv(1_CM|2)\.so,d'
386
PLIST_RE+=	'\,${LINUXBASE}.*libGLESv(1_CM|2)\.so,d'
383
.endif
387
.endif
384
.if ${NVVERSION} >= 361.016
388
.if ${NVVERSION} >= 361.016
385
LINUX_LIBS+=	libGLX.so.0
389
LINUX_LIBS+=	libGLX.so.0
386
LINUX32_LIBS+=	libGLX.so.0
390
LINUX32_LIBS+=	libGLX.so.0
387
.else
391
.else
388
PLIST_RE+=	'\,${LINUXBASE}.*libGLX\.so,d'
392
PLIST_RE+=	'\,${LINUXBASE}.*libGLX\.so,d'
389
.endif
393
.endif
390
.if ${NVVERSION} >= 355.006
394
.if ${NVVERSION} >= 355.006
391
LINUX_LIBS+=	libGLdispatch.so.0 \
395
LINUX_LIBS+=	libGLdispatch.so.0 \
392
		libOpenGL.so.0
396
		libOpenGL.so.0
393
LINUX32_LIBS+=	libGLdispatch.so.0 \
397
LINUX32_LIBS+=	libGLdispatch.so.0 \
394
		libOpenGL.so.0
398
		libOpenGL.so.0
395
.else
399
.else
396
PLIST_RE+=	'\,${LINUXBASE}.*libGLdispatch\.so,d' \
400
PLIST_RE+=	'\,${LINUXBASE}.*libGLdispatch\.so,d' \
397
		'\,${LINUXBASE}.*libOpenGL\.so,d'
401
		'\,${LINUXBASE}.*libOpenGL\.so,d'
398
.endif
402
.endif
399
.endif	# ${NVVERSION} >= 390.042 && ${LINUX_DEFAULT} != c6
403
.endif	# ${NVVERSION} >= 390.042 && ${LINUX_DEFAULT} != c6
400
404
401
.if ${ARCH} == amd64
405
.if ${ARCH} == amd64
402
.if ${NVVERSION} >= 310.014
406
.if ${NVVERSION} >= 310.014
403
LINUX32_LIBS+=	libnvcuvid.so.${PORTVERSION}
407
LINUX32_LIBS+=	libnvcuvid.so.${PORTVERSION}
404
LINUX32_LINKS+=	libnvcuvid.so.${PORTVERSION} libnvcuvid.so.1 \
408
LINUX32_LINKS+=	libnvcuvid.so.${PORTVERSION} libnvcuvid.so.1 \
405
		libnvcuvid.so.${PORTVERSION} libnvcuvid.so
409
		libnvcuvid.so.${PORTVERSION} libnvcuvid.so
406
.else
410
.else
407
PLIST_RE+=	'\,${LINUXBASE}/usr/lib/libnvcuvid\.so,d'
411
PLIST_RE+=	'\,${LINUXBASE}/usr/lib/libnvcuvid\.so,d'
408
.endif
412
.endif
409
.endif
413
.endif
410
414
411
.if ${ARCH} == amd64
415
.if ${ARCH} == amd64
412
PLIST_SUB+=	LINUX32=""
416
PLIST_SUB+=	LINUX32=""
413
.else
417
.else
414
PLIST_SUB+=	LINUX32="@comment "
418
PLIST_SUB+=	LINUX32="@comment "
415
.endif
419
.endif
416
420
417
do-extract:
421
do-extract:
418
	@(cd ${WRKDIR} && ${SH} \
422
	@(cd ${WRKDIR} && ${SH} \
419
		${DISTDIR}/NVIDIA-Linux-${ARCH_SUFX}-${DISTVERSION}.run \
423
		${DISTDIR}/NVIDIA-Linux-${ARCH_SUFX}-${DISTVERSION}.run \
420
		--extract-only > /dev/null)
424
		--extract-only > /dev/null)
421
425
422
post-patch:
426
post-patch:
423
.if ${NVVERSION} >= 384.047 && ${NVVERSION} < 435.017
427
.if ${NVVERSION} >= 384.047 && ${NVVERSION} < 435.017
424
	@${SED} 's/__NV_VK_ICD__/libGLX_nvidia.so.0/' \
428
	@${SED} 's/__NV_VK_ICD__/libGLX_nvidia.so.0/' \
425
		${WRKSRC}/nvidia_icd.json.template > \
429
		${WRKSRC}/nvidia_icd.json.template > \
426
		${WRKSRC}/nvidia_icd.json
430
		${WRKSRC}/nvidia_icd.json
427
.endif
431
.endif
428
432
429
do-install:
433
do-install:
430
# pkg-plist is already overbloated, so use these hacks instead of PLIST_SUB's
434
# pkg-plist is already overbloated, so use these hacks instead of PLIST_SUB's
431
.if ${NVVERSION} >= 304.128 && ${NVVERSION} < 310.019 || ${NVVERSION} >= 361.016
435
.if ${NVVERSION} >= 304.128 && ${NVVERSION} < 310.019 || ${NVVERSION} >= 361.016
432
	${REINPLACE_CMD} -E '\,${LINUXBASE},!{/libvdpau(_trace)?\.so/d;}' \
436
	${REINPLACE_CMD} -E '\,${LINUXBASE},!{/libvdpau(_trace)?\.so/d;}' \
433
		${TMPPLIST}
437
		${TMPPLIST}
434
.endif
438
.endif
435
.if ${NVVERSION} >= 310.019
439
.if ${NVVERSION} >= 310.019
436
	${REINPLACE_CMD} -e '\,${LINUXBASE},!{/libXvMCNVIDIA/d;}' ${TMPPLIST}
440
	${REINPLACE_CMD} -e '\,${LINUXBASE},!{/libXvMCNVIDIA/d;}' ${TMPPLIST}
437
.endif
441
.endif
438
.if ${NVVERSION} < 331.013 || ${ARCH} == amd64 && ${NVVERSION} < 334.016
442
.if ${NVVERSION} < 331.013 || ${ARCH} == amd64 && ${NVVERSION} < 334.016
439
	${REINPLACE_CMD} -E '\,${LINUXBASE},!{/lib(nvidia-)?(EGL|eglcore|GLESv|glsi)/d;}' \
443
	${REINPLACE_CMD} -E '\,${LINUXBASE},!{/lib(nvidia-)?(EGL|eglcore|GLESv|glsi)/d;}' \
440
		${TMPPLIST}
444
		${TMPPLIST}
441
.endif
445
.endif
442
.if ${NVVERSION} < 352.009
446
.if ${NVVERSION} < 352.009
443
	${REINPLACE_CMD} -E '\,${LINUXBASE},!{/(lib)?nvidia-(debugdump|smi|ml)/d;}' \
447
	${REINPLACE_CMD} -E '\,${LINUXBASE},!{/(lib)?nvidia-(debugdump|smi|ml)/d;}' \
444
		${TMPPLIST}
448
		${TMPPLIST}
445
.endif
449
.endif
446
.if ${NVVERSION} < 355.006
450
.if ${NVVERSION} < 355.006
447
	${REINPLACE_CMD} -E '\,${LINUXBASE},!{/(libEGL_nvidia|GLdispatch|OpenGL)/d;}' \
451
	${REINPLACE_CMD} -E '\,${LINUXBASE},!{/(libEGL_nvidia|GLdispatch|OpenGL)/d;}' \
448
		${TMPPLIST}
452
		${TMPPLIST}
449
.else
453
.else
450
	${REINPLACE_CMD} '\,${LINUXBASE},!s/libEGL\.so\.${PORTVERSION}/libEGL.so/' \
454
	${REINPLACE_CMD} '\,${LINUXBASE},!s/libEGL\.so\.${PORTVERSION}/libEGL.so/' \
451
		${TMPPLIST}
455
		${TMPPLIST}
452
.endif
456
.endif
453
.if ${NVVERSION} >= 361.028
457
.if ${NVVERSION} >= 361.028
454
	${REINPLACE_CMD} -E '\,${LINUXBASE},!{/(EGL_nvidia\.so|GLESv[12](_CM)?(\.so\.[0-9]+\.[0-9]+))$$/d;}' \
458
	${REINPLACE_CMD} -E '\,${LINUXBASE},!{/(EGL_nvidia\.so|GLESv[12](_CM)?(\.so\.[0-9]+\.[0-9]+))$$/d;}' \
455
		${TMPPLIST}
459
		${TMPPLIST}
456
.else
460
.else
457
	${REINPLACE_CMD} -E '\,${LINUXBASE},!{/\/lib\/libGLESv[12](_CM)?(\.so)?(_nvidia.so(\.[0-9]|\.[0-9]+\.[0-9]+)?)?$$/d ; \
461
	${REINPLACE_CMD} -E '\,${LINUXBASE},!{/\/lib\/libGLESv[12](_CM)?(\.so)?(_nvidia.so(\.[0-9]|\.[0-9]+\.[0-9]+)?)?$$/d ; \
458
		/libEGL_nvidia\.so\.${PORTVERSION}/d;}' ${TMPPLIST}
462
		/libEGL_nvidia\.so\.${PORTVERSION}/d;}' ${TMPPLIST}
459
.endif
463
.endif
460
.if ${NVVERSION} >= 415.013
464
.if ${NVVERSION} >= 415.013
461
	${REINPLACE_CMD} -e '/tls\/libnvidia-tls\.so/d' ${TMPPLIST}
465
	${REINPLACE_CMD} -e '/tls\/libnvidia-tls\.so/d' ${TMPPLIST}
462
.endif
466
.endif
463
	${REINPLACE_CMD} -E ${PLIST_RE:S/^/-e /} ${TMPPLIST}
467
	${REINPLACE_CMD} -E ${PLIST_RE:S/^/-e /} ${TMPPLIST}
464
.for f d in ${LINUX_DATA}
468
.for f d in ${LINUX_DATA}
465
	${MKDIR} ${STAGEDIR}${LINUXBASE}${d}
469
	${MKDIR} ${STAGEDIR}${LINUXBASE}${d}
466
	${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${LINUXBASE}${d}
470
	${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${LINUXBASE}${d}
467
.endfor
471
.endfor
468
	${MKDIR} ${STAGEDIR}${LINUXBASE}/usr/bin
472
	${MKDIR} ${STAGEDIR}${LINUXBASE}/usr/bin
469
	${INSTALL_SCRIPT} ${WRKSRC}/nvidia-bug-report.sh \
473
	${INSTALL_SCRIPT} ${WRKSRC}/nvidia-bug-report.sh \
470
		${STAGEDIR}${LINUXBASE}/usr/bin
474
		${STAGEDIR}${LINUXBASE}/usr/bin
471
.for p in ${LINUX_PROGS}
475
.for p in ${LINUX_PROGS}
472
	${INSTALL_PROGRAM} ${WRKSRC}/${p} ${STAGEDIR}${LINUXBASE}/usr/bin
476
	${INSTALL_PROGRAM} ${WRKSRC}/${p} ${STAGEDIR}${LINUXBASE}/usr/bin
473
.endfor
477
.endfor
474
	${MKDIR} ${STAGEDIR}${LINUXBASE}/usr/share/man/man1
478
	${MKDIR} ${STAGEDIR}${LINUXBASE}/usr/share/man/man1
475
.for m in ${LINUX_MANS}
479
.for m in ${LINUX_MANS}
476
	${INSTALL_MAN} ${WRKSRC}/${m}.1.gz \
480
	${INSTALL_MAN} ${WRKSRC}/${m}.1.gz \
477
		${STAGEDIR}${LINUXBASE}/usr/share/man/man1
481
		${STAGEDIR}${LINUXBASE}/usr/share/man/man1
478
.endfor
482
.endfor
479
	${MKDIR} ${STAGEDIR}${LINUXBASE}${LINUX_LIBDIR}/tls
483
	${MKDIR} ${STAGEDIR}${LINUXBASE}${LINUX_LIBDIR}/tls
480
	${MKDIR} ${STAGEDIR}${LINUXBASE}${LINUX_LIBDIR}/vdpau
484
	${MKDIR} ${STAGEDIR}${LINUXBASE}${LINUX_LIBDIR}/vdpau
481
.for l in ${LINUX_LIBS}
485
.for l in ${LINUX_LIBS}
482
	${INSTALL_LIB} ${WRKSRC}/${l} \
486
	${INSTALL_LIB} ${WRKSRC}/${l} \
483
		${STAGEDIR}${LINUXBASE}${LINUX_LIBDIR}/${l}
487
		${STAGEDIR}${LINUXBASE}${LINUX_LIBDIR}/${l}
484
.endfor
488
.endfor
485
.for s t in ${LINUX_LINKS}
489
.for s t in ${LINUX_LINKS}
486
	${RLN} ${STAGEDIR}${LINUXBASE}${LINUX_LIBDIR}/${s} \
490
	${RLN} ${STAGEDIR}${LINUXBASE}${LINUX_LIBDIR}/${s} \
487
		${STAGEDIR}${LINUXBASE}${LINUX_LIBDIR}/${t}
491
		${STAGEDIR}${LINUXBASE}${LINUX_LIBDIR}/${t}
488
.endfor
492
.endfor
489
.if ${ARCH} == amd64
493
.if ${ARCH} == amd64
490
	${MKDIR} ${STAGEDIR}${LINUXBASE}/usr/lib/tls
494
	${MKDIR} ${STAGEDIR}${LINUXBASE}/usr/lib/tls
491
	${MKDIR} ${STAGEDIR}${LINUXBASE}/usr/lib/vdpau
495
	${MKDIR} ${STAGEDIR}${LINUXBASE}/usr/lib/vdpau
492
.for l in ${LINUX32_LIBS}
496
.for l in ${LINUX32_LIBS}
493
	${INSTALL_LIB} ${WRKSRC}/32/${l} \
497
	${INSTALL_LIB} ${WRKSRC}/32/${l} \
494
		${STAGEDIR}${LINUXBASE}/usr/lib/${l}
498
		${STAGEDIR}${LINUXBASE}/usr/lib/${l}
495
.endfor
499
.endfor
496
.for s t in ${LINUX32_LINKS}
500
.for s t in ${LINUX32_LINKS}
497
	${RLN} ${STAGEDIR}${LINUXBASE}/usr/lib/${s} \
501
	${RLN} ${STAGEDIR}${LINUXBASE}/usr/lib/${s} \
498
		${STAGEDIR}${LINUXBASE}/usr/lib/${t}
502
		${STAGEDIR}${LINUXBASE}/usr/lib/${t}
499
.endfor
503
.endfor
500
.endif
504
.endif
501
505
502
.include <bsd.port.post.mk>
506
.include <bsd.port.post.mk>
(-)b/x11/linux-nvidia-libs/distinfo (-3 / +3 lines)
Lines 1-17 Link Here
1
TIMESTAMP = 1682616491
1
TIMESTAMP = 1687976311
2
SHA256 (NVIDIA-Linux-x86_64-525.116.03.run) = 5c295b02ebec2e9a9ec0d79ba9292eb623b4b2fbba8a6ed619060929a30d0469
2
SHA256 (NVIDIA-Linux-x86_64-535.54.03.run) = 454764f57ea1b9e19166a370f78be10e71f0626438fb197f726dc3caf05b4082
3
SIZE (NVIDIA-Linux-x86_64-525.116.03.run) = 414602354
3
SIZE (NVIDIA-Linux-x86_64-535.54.03.run) = 347109768
4
SHA256 (NVIDIA-Linux-x86_64-470.161.03.run) = 5da82a7f8c76e781e7d7f0be7b798db4d344f26bd4facf9abcf3c71c71fe7640
4
SHA256 (NVIDIA-Linux-x86_64-470.161.03.run) = 5da82a7f8c76e781e7d7f0be7b798db4d344f26bd4facf9abcf3c71c71fe7640
5
SIZE (NVIDIA-Linux-x86_64-470.161.03.run) = 272397700
5
SIZE (NVIDIA-Linux-x86_64-470.161.03.run) = 272397700
6
SHA256 (NVIDIA-Linux-x86_64-390.154.run) = f4420280c55210964c008d5b724f2615845d47ad4c9c05d8ed26a62fc6331f7c
6
SHA256 (NVIDIA-Linux-x86_64-390.154.run) = f4420280c55210964c008d5b724f2615845d47ad4c9c05d8ed26a62fc6331f7c
7
SIZE (NVIDIA-Linux-x86_64-390.154.run) = 84438529
7
SIZE (NVIDIA-Linux-x86_64-390.154.run) = 84438529
8
SHA256 (NVIDIA-Linux-x86-390.154.run) = 5ee871b84bd9f28e225b7a3e5f1be1f9e2d0067f37b8d6b8d0c251702f06d3e7
8
SHA256 (NVIDIA-Linux-x86-390.154.run) = 5ee871b84bd9f28e225b7a3e5f1be1f9e2d0067f37b8d6b8d0c251702f06d3e7
9
SIZE (NVIDIA-Linux-x86-390.154.run) = 49362860
9
SIZE (NVIDIA-Linux-x86-390.154.run) = 49362860
10
SHA256 (NVIDIA-Linux-x86_64-340.108.run) = c671d4f1b7c09bc1af079b98b447adb06d704b04f802f7045a611fa50133b71b
10
SHA256 (NVIDIA-Linux-x86_64-340.108.run) = c671d4f1b7c09bc1af079b98b447adb06d704b04f802f7045a611fa50133b71b
11
SIZE (NVIDIA-Linux-x86_64-340.108.run) = 70165522
11
SIZE (NVIDIA-Linux-x86_64-340.108.run) = 70165522
12
SHA256 (NVIDIA-Linux-x86-340.108.run) = 2032aad612d9f3af1aecf979cfdfe423d79aa76929ef8bf8d3a403076f507cca
12
SHA256 (NVIDIA-Linux-x86-340.108.run) = 2032aad612d9f3af1aecf979cfdfe423d79aa76929ef8bf8d3a403076f507cca
13
SIZE (NVIDIA-Linux-x86-340.108.run) = 38902892
13
SIZE (NVIDIA-Linux-x86-340.108.run) = 38902892
14
SHA256 (NVIDIA-Linux-x86_64-304.137.run) = eb1f56db3a2bea13e3ccde7b5ae14abe8cd6c6dbe69af4c71c68a623cc96e3e2
14
SHA256 (NVIDIA-Linux-x86_64-304.137.run) = eb1f56db3a2bea13e3ccde7b5ae14abe8cd6c6dbe69af4c71c68a623cc96e3e2
15
SIZE (NVIDIA-Linux-x86_64-304.137.run) = 70087133
15
SIZE (NVIDIA-Linux-x86_64-304.137.run) = 70087133
16
SHA256 (NVIDIA-Linux-x86-304.137.run) = ca98379fc2090bdfe8b74113d6ac7bcc7eadbd86a489c3c4ec4cd5ba9f6064f8
16
SHA256 (NVIDIA-Linux-x86-304.137.run) = ca98379fc2090bdfe8b74113d6ac7bcc7eadbd86a489c3c4ec4cd5ba9f6064f8
17
SIZE (NVIDIA-Linux-x86-304.137.run) = 41504115
17
SIZE (NVIDIA-Linux-x86-304.137.run) = 41504115
(-)b/x11/nvidia-driver/Makefile (-3 / +9 lines)
Lines 1-420 Link Here
1
# For those wondering why this port is not under `x11-drivers' category,
1
# For those wondering why this port is not under `x11-drivers' category,
2
# have a look at https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=121930.
2
# have a look at https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=121930.
3
#
3
#
4
# Starting with version 1.0-7667, NVidia has dropped support for numerous
4
# Starting with version 1.0-7667, NVidia has dropped support for numerous
5
# "legacy" GPUs.  Consult NVidia README (the Appendix) to find out whether
5
# "legacy" GPUs.  Consult NVidia README (the Appendix) to find out whether
6
# you need to use legacy driver version and install one of corresponding
6
# you need to use legacy driver version and install one of corresponding
7
# slave ports instead (`x11/nvidia-driver-470', `x11/nvidia-driver-390',
7
# slave ports instead (`x11/nvidia-driver-470', `x11/nvidia-driver-390',
8
# `x11/nvidia-driver-340', or `x11/nvidia-driver-304').
8
# `x11/nvidia-driver-340', or `x11/nvidia-driver-304').
9
#
9
#
10
# To simplify testing of new feature branches and beta driver versions,
10
# To simplify testing of new feature branches and beta driver versions,
11
# the port aims to support building against arbitrary DISTVERSION, i.e.
11
# the port aims to support building against arbitrary DISTVERSION, i.e.
12
# ``make DISTVERSION=xxx.yy.zz -DNO_CHECKSUM'' should typically work.
12
# ``make DISTVERSION=xxx.yy.zz -DNO_CHECKSUM'' should typically work.
13
13
14
PORTNAME?=	nvidia-driver
14
PORTNAME?=	nvidia-driver
15
DISTVERSION?=	525.116.03
15
DISTVERSION?=	535.54.03
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?=	0
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}
21
DISTFILES=	${DISTNAME}${EXTRACT_SUFX}
21
DISTFILES=	${DISTNAME}${EXTRACT_SUFX}
22
22
23
MAINTAINER?=	danfe@FreeBSD.org
23
MAINTAINER?=	danfe@FreeBSD.org
24
COMMENT?=	NVidia graphics card binary drivers for hardware OpenGL rendering
24
COMMENT?=	NVidia graphics card binary drivers for hardware OpenGL rendering
25
WWW=		https://www.nvidia.com/object/unix.html
25
WWW=		https://www.nvidia.com/object/unix.html
26
26
27
LICENSE_FILE=	${WRKSRC}/doc/license.txt
27
LICENSE_FILE=	${WRKSRC}/doc/license.txt
28
.include "${.CURDIR}/../nvidia-driver/Makefile.common"
28
.include "${.CURDIR}/../nvidia-driver/Makefile.common"
29
29
30
# Pull GNU sed(1) for "binary" patching of obj/libglvnd/libEGL.so.1 and
30
# Pull GNU sed(1) for "binary" patching of obj/libglvnd/libEGL.so.1 and
31
# obj/libEGL_nvidia.so.0 (see below)
31
# obj/libEGL_nvidia.so.0 (see below)
32
.if ${NVVERSION} >= 410.057
32
.if ${NVVERSION} >= 410.057
33
PATCH_DEPENDS=	gsed:textproc/gsed
33
PATCH_DEPENDS=	gsed:textproc/gsed
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} >= 415.013
37
.if ${NVVERSION} >= 415.013
38
LIB_DEPENDS+=	libnvidia-egl-wayland.so: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
42
.if ${NVVERSION} >= 470.04201
42
.if ${NVVERSION} >= 470.04201
43
USES+=		tar:xz
43
USES+=		tar:xz
44
.endif
44
.endif
45
USE_XORG=	x11 xorg-server xext
45
USE_XORG=	x11 xorg-server xext
46
USE_LDCONFIG=	yes
46
USE_LDCONFIG=	yes
47
47
48
PIE_UNSAFE=	yes
48
PIE_UNSAFE=	yes
49
49
50
EGL_JSON_PATH=		${PREFIX}/share/egl/egl_external_platform.d
50
EGL_JSON_PATH=		${PREFIX}/share/egl/egl_external_platform.d
51
GLVND_JSON_PATH=	${PREFIX}/share/glvnd/egl_vendor.d
51
GLVND_JSON_PATH=	${PREFIX}/share/glvnd/egl_vendor.d
52
VKICD_PATH=		${PREFIX}/share/vulkan/icd.d
52
VKICD_PATH=		${PREFIX}/share/vulkan/icd.d
53
VKLAYERS_PATH=		${PREFIX}/share/vulkan/implicit_layer.d
53
VKLAYERS_PATH=		${PREFIX}/share/vulkan/implicit_layer.d
54
MAKE_ENV=	DEBUG_FLAGS=${DEBUG_FLAGS} \
54
MAKE_ENV=	DEBUG_FLAGS=${DEBUG_FLAGS} \
55
		EGL_GLVND_JSON_PATH=${STAGEDIR}${GLVND_JSON_PATH} \
55
		EGL_GLVND_JSON_PATH=${STAGEDIR}${GLVND_JSON_PATH} \
56
		VKICD_PATH=${STAGEDIR}${VKICD_PATH} \
56
		VKICD_PATH=${STAGEDIR}${VKICD_PATH} \
57
		VKLAYERS_PATH=${STAGEDIR}${VKLAYERS_PATH}
57
		VKLAYERS_PATH=${STAGEDIR}${VKLAYERS_PATH}
58
.if ${NVVERSION} < 495.02905
58
.if ${NVVERSION} < 495.02905
59
MAKE_ENV+=	EGL_WAYLAND_JSON_PATH=${STAGEDIR}${EGL_JSON_PATH}
59
MAKE_ENV+=	EGL_WAYLAND_JSON_PATH=${STAGEDIR}${EGL_JSON_PATH}
60
.else
60
.else
61
MAKE_ENV+=	EGL_EXTERNAL_PLATFORM_JSON_PATH=${STAGEDIR}${EGL_JSON_PATH}
61
MAKE_ENV+=	EGL_EXTERNAL_PLATFORM_JSON_PATH=${STAGEDIR}${EGL_JSON_PATH}
62
.endif
62
.endif
63
SUB_FILES=	pkg-message
63
SUB_FILES=	pkg-message
64
.if !defined(LIBGLDIR)
64
.if !defined(LIBGLDIR)
65
SUB_FILES+=	nvidia.conf
65
SUB_FILES+=	nvidia.conf
66
.endif
66
.endif
67
.if ${NVVERSION} < 410.057
67
.if ${NVVERSION} < 410.057
68
SUB_FILES+=	pkg-deinstall pkg-install
68
SUB_FILES+=	pkg-deinstall pkg-install
69
.endif
69
.endif
70
SUB_PATCHES=	extra-patch-src-Makefile \
70
SUB_PATCHES=	extra-patch-src-Makefile \
71
		extra-patch-src-nv-freebsd.h \
71
		extra-patch-src-nv-freebsd.h
72
		extra-patch-src-nvidia_subr.c
73
.if ${NVVERSION} < 510.03901
72
.if ${NVVERSION} < 510.03901
74
SUB_PATCHES+=	extra-patch-src-nvidia_dev.c \
73
SUB_PATCHES+=	extra-patch-src-nvidia_dev.c \
75
		extra-patch-src-nvidia_pci.c
74
		extra-patch-src-nvidia_pci.c
76
.endif
75
.endif
76
.if ${NVVERSION} < 530.03002
77
SUB_PATCHES+=	extra-patch-src-nvidia_subr.c
78
.endif
77
79
78
DOCSDIR=	${PREFIX}/share/doc/NVIDIA_GLX-1.0
80
DOCSDIR=	${PREFIX}/share/doc/NVIDIA_GLX-1.0
79
MODULESDIR=	lib/xorg/modules
81
MODULESDIR=	lib/xorg/modules
80
EXTENSIONSDIR?=	${MODULESDIR}/extensions/.nvidia
82
EXTENSIONSDIR?=	${MODULESDIR}/extensions/.nvidia
81
PORTDOCS=	*
83
PORTDOCS=	*
82
84
83
.if ${NVVERSION} >= 331.013
85
.if ${NVVERSION} >= 331.013
84
SUB_LIST+=	NVGL=""
86
SUB_LIST+=	NVGL=""
85
.else
87
.else
86
SUB_LIST+=	NVGL="\# "
88
SUB_LIST+=	NVGL="\# "
87
.endif
89
.endif
88
90
89
.if ${NVVERSION} < 355.006
91
.if ${NVVERSION} < 355.006
90
NVSRC=		.
92
NVSRC=		.
91
.else
93
.else
92
NVSRC=		nvidia
94
NVSRC=		nvidia
93
.endif
95
.endif
94
96
95
.if ${NVVERSION} < 358.009
97
.if ${NVVERSION} < 358.009
96
SUB_LIST+=	KLDNAME=nvidia
98
SUB_LIST+=	KLDNAME=nvidia
97
.else
99
.else
98
SUB_LIST+=	KLDNAME=nvidia-modeset
100
SUB_LIST+=	KLDNAME=nvidia-modeset
99
.endif
101
.endif
100
102
101
.if ${NVVERSION} < 460.039
103
.if ${NVVERSION} < 460.039
102
.  if ${NVVERSION} >= 358.009
104
.  if ${NVVERSION} >= 358.009
103
EXTRA_PATCHES+=	${FILESDIR}/extra-patch-src_nvidia-modeset_nvidia-modeset-freebsd.c
105
EXTRA_PATCHES+=	${FILESDIR}/extra-patch-src_nvidia-modeset_nvidia-modeset-freebsd.c
104
.  endif
106
.  endif
105
SUB_PATCHES+=	extra-patch-src-nvidia_ctl.c \
107
SUB_PATCHES+=	extra-patch-src-nvidia_ctl.c \
106
		extra-patch-src-nvidia_linux.c
108
		extra-patch-src-nvidia_linux.c
107
.elif ${NVVERSION} < 510.03901
109
.elif ${NVVERSION} < 510.03901
108
EXTRA_PATCHES+=	${FILESDIR}/460-patch-src-nvidia-nvidia_ctl.c \
110
EXTRA_PATCHES+=	${FILESDIR}/460-patch-src-nvidia-nvidia_ctl.c \
109
		${FILESDIR}/460-patch-src-nvidia-nvidia_linux.c \
111
		${FILESDIR}/460-patch-src-nvidia-nvidia_linux.c \
110
		${FILESDIR}/460-patch-src_nvidia-modeset_nvidia-modeset-freebsd.c
112
		${FILESDIR}/460-patch-src_nvidia-modeset_nvidia-modeset-freebsd.c
111
.endif
113
.endif
112
.if ${NVVERSION} < 470.04201
114
.if ${NVVERSION} < 470.04201
113
SUB_PATCHES+=	extra-patch-src-nv-misc.h
115
SUB_PATCHES+=	extra-patch-src-nv-misc.h
114
.endif
116
.endif
115
117
116
OPTIONS_DEFINE=	ACPI_PM LINUX WBINVD DOCS
118
OPTIONS_DEFINE=	ACPI_PM LINUX WBINVD DOCS
117
OPTIONS_DEFINE_i386=	PAE
119
OPTIONS_DEFINE_i386=	PAE
118
OPTIONS_DEFAULT=	ACPI_PM LINUX
120
OPTIONS_DEFAULT=	ACPI_PM LINUX
119
121
120
ACPI_PM_DESC=		ACPI Power Management support
122
ACPI_PM_DESC=		ACPI Power Management support
121
LINUX_DESC=		Linux compatibility support
123
LINUX_DESC=		Linux compatibility support
122
PAE_DESC=		Physical Address Extensions support
124
PAE_DESC=		Physical Address Extensions support
123
WBINVD_DESC=		Flush CPU caches directly with WBINVD
125
WBINVD_DESC=		Flush CPU caches directly with WBINVD
124
126
125
.if ${NVVERSION} < 310.014
127
.if ${NVVERSION} < 310.014
126
OPTIONS_DEFINE+=	FREEBSD_AGP
128
OPTIONS_DEFINE+=	FREEBSD_AGP
127
FREEBSD_AGP_DESC=	Use FreeBSD AGP GART driver
129
FREEBSD_AGP_DESC=	Use FreeBSD AGP GART driver
128
.endif
130
.endif
129
131
130
PLIST_SUB+=	MODULESDIR=${MODULESDIR}
132
PLIST_SUB+=	MODULESDIR=${MODULESDIR}
131
.if ${NVVERSION} < 410.057
133
.if ${NVVERSION} < 410.057
132
PLIST_SUB+=	EXTENSIONSDIR=${EXTENSIONSDIR}
134
PLIST_SUB+=	EXTENSIONSDIR=${EXTENSIONSDIR}
133
.else
135
.else
134
PLIST_SUB+=	EXTENSIONSDIR="@comment "
136
PLIST_SUB+=	EXTENSIONSDIR="@comment "
135
.endif
137
.endif
136
.if defined(LIBGLDIR)
138
.if defined(LIBGLDIR)
137
PLIST_SUB+=	LIBGLDIR=${LIBGLDIR} LIBGLMAP="@comment "
139
PLIST_SUB+=	LIBGLDIR=${LIBGLDIR} LIBGLMAP="@comment "
138
.else
140
.else
139
PLIST_SUB+=	LIBGLDIR="@comment " LIBGLMAP=""
141
PLIST_SUB+=	LIBGLDIR="@comment " LIBGLMAP=""
140
.endif
142
.endif
141
143
142
# Not part of the pkg-plist because DISTVERSION is not on PLIST_SUB
144
# Not part of the pkg-plist because DISTVERSION is not on PLIST_SUB
143
.if ${NVVERSION} >= 515.04304
145
.if ${NVVERSION} >= 515.04304
144
PLIST_FILES+=	lib/libnvidia-wayland-client.so.${DISTVERSION}
146
PLIST_FILES+=	lib/libnvidia-wayland-client.so.${DISTVERSION}
145
.endif
147
.endif
146
148
147
CONFLICTS_INSTALL+=	nvidia-driver nvidia-driver-*
149
CONFLICTS_INSTALL+=	nvidia-driver nvidia-driver-*
148
.if ${PORTNAME} != nvidia-secondary-driver
150
.if ${PORTNAME} != nvidia-secondary-driver
149
CONFLICTS_INSTALL+=	nvidia-secondary-driver
151
CONFLICTS_INSTALL+=	nvidia-secondary-driver
150
.endif
152
.endif
151
153
152
.include <bsd.port.pre.mk>
154
.include <bsd.port.pre.mk>
153
155
154
pre-patch:
156
pre-patch:
155
.for p in ${SUB_PATCHES}
157
.for p in ${SUB_PATCHES}
156
	@${SED} 's/%%NVSRC%%/${NVSRC}/g' ${PATCHDIR}/${p}.in > ${WRKDIR}/${p}
158
	@${SED} 's/%%NVSRC%%/${NVSRC}/g' ${PATCHDIR}/${p}.in > ${WRKDIR}/${p}
157
.endfor
159
.endfor
158
.for p in ${SUB_PATCHES}
160
.for p in ${SUB_PATCHES}
159
EXTRA_PATCHES+=	${WRKDIR}/${p}
161
EXTRA_PATCHES+=	${WRKDIR}/${p}
160
.endfor
162
.endfor
161
163
162
post-patch: .SILENT
164
post-patch: .SILENT
163
# We should support -CURRENT: kill the check (first #if __FreeBSD_version)
165
# We should support -CURRENT: kill the check (first #if __FreeBSD_version)
164
	linenum=$$(${SED} -ne '/^#if __FreeBSD_version/ { = ; q ; }' \
166
	linenum=$$(${SED} -ne '/^#if __FreeBSD_version/ { = ; q ; }' \
165
		${WRKSRC}/src/${NVSRC}/nv-freebsd.h) ; ${REINPLACE_CMD} \
167
		${WRKSRC}/src/${NVSRC}/nv-freebsd.h) ; ${REINPLACE_CMD} \
166
		-e "$$linenum,+2d" ${WRKSRC}/src/${NVSRC}/nv-freebsd.h
168
		-e "$$linenum,+2d" ${WRKSRC}/src/${NVSRC}/nv-freebsd.h
167
# Adjust Linux headers #include's after FreeBSD src r246085
169
# Adjust Linux headers #include's after FreeBSD src r246085
168
	${REINPLACE_CMD} -E '/#include "machine\/\.\.\/linux(32)?\/linux.h"/ \
170
	${REINPLACE_CMD} -E '/#include "machine\/\.\.\/linux(32)?\/linux.h"/ \
169
		{ x ; s/.*/#include "machine\/..\/..\/compat\/linux\/linux_ioctl.h"/ ; H ; x ; }' \
171
		{ x ; s/.*/#include "machine\/..\/..\/compat\/linux\/linux_ioctl.h"/ ; H ; x ; }' \
170
			${WRKSRC}/src/${NVSRC}/nvidia_linux.c
172
			${WRKSRC}/src/${NVSRC}/nvidia_linux.c
171
# Fix bogus memset() call
173
# Fix bogus memset() call
172
	${REINPLACE_CMD} -e '/memset/s/sizeof(ci/sizeof(*ci/' \
174
	${REINPLACE_CMD} -e '/memset/s/sizeof(ci/sizeof(*ci/' \
173
		${WRKSRC}/src/${NVSRC}/nvidia_subr.c
175
		${WRKSRC}/src/${NVSRC}/nvidia_subr.c
174
# Chase `sys/capability.h' rename to `sys/capsicum.h' in FreeBSD src r263232
176
# Chase `sys/capability.h' rename to `sys/capsicum.h' in FreeBSD src r263232
175
	${REINPLACE_CMD} -e 's:sys/capability\.h:sys/capsicum.h:' \
177
	${REINPLACE_CMD} -e 's:sys/capability\.h:sys/capsicum.h:' \
176
		${WRKSRC}/src/${NVSRC}/nv-freebsd.h
178
		${WRKSRC}/src/${NVSRC}/nv-freebsd.h
177
.if ${NVVERSION} >= 358.009
179
.if ${NVVERSION} >= 358.009
178
	${REINPLACE_CMD} -e 's:sys/capability\.h:sys/capsicum.h:' \
180
	${REINPLACE_CMD} -e 's:sys/capability\.h:sys/capsicum.h:' \
179
		${WRKSRC}/src/nvidia-modeset/nvidia-modeset-freebsd.c
181
		${WRKSRC}/src/nvidia-modeset/nvidia-modeset-freebsd.c
180
.endif
182
.endif
181
# KPI of kmem_alloc_contig(),kmem_free() changed in FreeBSD src r338143,r338318
183
# KPI of kmem_alloc_contig(),kmem_free() changed in FreeBSD src r338143,r338318
184
.if ${NVVERSION} < 530.03002
182
	${REINPLACE_CMD} \
185
	${REINPLACE_CMD} \
183
	    -e 's/kmem_alloc_contig(kmem_arena, /kmem_alloc_contig(/' \
186
	    -e 's/kmem_alloc_contig(kmem_arena, /kmem_alloc_contig(/' \
184
	    -e 's/kmem_free(kmem_arena, /kmem_free(/' \
187
	    -e 's/kmem_free(kmem_arena, /kmem_free(/' \
185
		${WRKSRC}/src/${NVSRC}/nvidia_subr.c
188
		${WRKSRC}/src/${NVSRC}/nvidia_subr.c
189
.endif
186
# Pull the right header after FreeBSD src r347984
190
# Pull the right header after FreeBSD src r347984
187
.if ${OSVERSION} >= 1300029 && ${NVVERSION} >= 358.009
191
.if ${OSVERSION} >= 1300029 && ${NVVERSION} >= 358.009
188
	${REINPLACE_CMD} -e '/^#include/s:lock\.h:mutex.h:' \
192
	${REINPLACE_CMD} -e '/^#include/s:lock\.h:mutex.h:' \
189
		${WRKSRC}/src/nvidia-modeset/nvidia-modeset-freebsd.c
193
		${WRKSRC}/src/nvidia-modeset/nvidia-modeset-freebsd.c
190
.endif
194
.endif
191
# After src df38ada2931f, `sys/module.h' must be included after `sys/param.h'
195
# After src df38ada2931f, `sys/module.h' must be included after `sys/param.h'
192
.if ${NVVERSION} >= 358.009
196
.if ${NVVERSION} >= 358.009
193
	@${REINPLACE_CMD} -e '/^#include <sys\/param\.h>/d; \
197
	@${REINPLACE_CMD} -e '/^#include <sys\/param\.h>/d; \
194
		/^#include <sys\/module\.h>/ { x; \
198
		/^#include <sys\/module\.h>/ { x; \
195
		s:^:#include <sys/param.h>:; G; }' \
199
		s:^:#include <sys/param.h>:; G; }' \
196
		${WRKSRC}/src/nvidia-modeset/nvidia-modeset-freebsd.c
200
		${WRKSRC}/src/nvidia-modeset/nvidia-modeset-freebsd.c
197
.endif
201
.endif
198
# Disable installation of Linux libraries (provided by the corresponding
202
# Disable installation of Linux libraries (provided by the corresponding
199
# `x11/linux-nvidia-libs' port or its slaves)
203
# `x11/linux-nvidia-libs' port or its slaves)
200
	${REINPLACE_CMD} -e 's/exists(\/.*/& \&\& 0/' \
204
	${REINPLACE_CMD} -e 's/exists(\/.*/& \&\& 0/' \
201
		${WRKSRC}/lib/Makefile
205
		${WRKSRC}/lib/Makefile
202
# Do not install VDPAU libraries which are provided by `multimedia/libvdpau'
206
# Do not install VDPAU libraries which are provided by `multimedia/libvdpau'
203
# port for a while now
207
# port for a while now
204
	${REINPLACE_CMD} -e '/libvdpau[[:blank:]_][^n]/d ; \
208
	${REINPLACE_CMD} -e '/libvdpau[[:blank:]_][^n]/d ; \
205
		s/name libvdpau/&_nvidia/' ${WRKSRC}/lib/Makefile
209
		s/name libvdpau/&_nvidia/' ${WRKSRC}/lib/Makefile
206
# Do not build any binaries (native nvidia-settings and nvidia-xconfig are
210
# Do not build any binaries (native nvidia-settings and nvidia-xconfig are
207
# provided by their corresponding ports) and manual pages
211
# provided by their corresponding ports) and manual pages
208
	${REINPLACE_CMD} -E 's/(extension).*/\1/' ${WRKSRC}/x11/Makefile
212
	${REINPLACE_CMD} -E 's/(extension).*/\1/' ${WRKSRC}/x11/Makefile
209
	${REINPLACE_CMD} -e '/bin/d ; /man/d' ${WRKSRC}/x11/Makefile
213
	${REINPLACE_CMD} -e '/bin/d ; /man/d' ${WRKSRC}/x11/Makefile
210
# Also do not install libnvidia-gtk* libraries which are for nvidia-settings
214
# Also do not install libnvidia-gtk* libraries which are for nvidia-settings
211
.if ${NVVERSION} >= 346.016
215
.if ${NVVERSION} >= 346.016
212
	${REINPLACE_CMD} -e '/libnvidia-gtk/d' ${WRKSRC}/lib/Makefile
216
	${REINPLACE_CMD} -e '/libnvidia-gtk/d' ${WRKSRC}/lib/Makefile
213
.endif
217
.endif
214
# Adjust installation path of a conflicting file (shared between
218
# Adjust installation path of a conflicting file (shared between
215
# nvidia-driver and xorg-server) to ease package manager work
219
# nvidia-driver and xorg-server) to ease package manager work
216
.if ${NVVERSION} < 410.057
220
.if ${NVVERSION} < 410.057
217
	${REINPLACE_CMD} -e '/LIBDIR/s:xorg/modules/extensions:&/.nvidia:' \
221
	${REINPLACE_CMD} -e '/LIBDIR/s:xorg/modules/extensions:&/.nvidia:' \
218
		${WRKSRC}/x11/extension/Makefile
222
		${WRKSRC}/x11/extension/Makefile
219
.endif
223
.endif
220
# Do not execute afterinstall target (prevent automatic module registration
224
# Do not execute afterinstall target (prevent automatic module registration
221
# and "smart" installation of conflicting files heuristics)
225
# and "smart" installation of conflicting files heuristics)
222
	${REINPLACE_CMD} -e 's/afterinstall/&_dontexecute/' ${WRKSRC}/Makefile
226
	${REINPLACE_CMD} -e 's/afterinstall/&_dontexecute/' ${WRKSRC}/Makefile
223
	${REINPLACE_CMD} -e 's/beforeinstall/&_dontexecute/' \
227
	${REINPLACE_CMD} -e 's/beforeinstall/&_dontexecute/' \
224
		${WRKSRC}/lib/Makefile ${WRKSRC}/src/${NVSRC}/Makefile
228
		${WRKSRC}/lib/Makefile ${WRKSRC}/src/${NVSRC}/Makefile
225
# /usr/share/nvidia path is hardcoded in libGL and nvidia-settings, but we
229
# /usr/share/nvidia path is hardcoded in libGL and nvidia-settings, but we
226
# won't adhere to this stupidity and install nvidia-application-profiles-*
230
# won't adhere to this stupidity and install nvidia-application-profiles-*
227
# files as part of documentation
231
# files as part of documentation
228
.if ${NVVERSION} >= 410.057
232
.if ${NVVERSION} >= 410.057
229
	${REINPLACE_CMD} -e 's,/usr/share/nvidia,$${DESTDIR}${DOCSDIR},' \
233
	${REINPLACE_CMD} -e 's,/usr/share/nvidia,$${DESTDIR}${DOCSDIR},' \
230
		${WRKSRC}/lib/libGLX_nvidia/Makefile ${WRKSRC}/doc/Makefile
234
		${WRKSRC}/lib/libGLX_nvidia/Makefile ${WRKSRC}/doc/Makefile
231
	${REINPLACE_CMD} -e '/AUXLINK_LINK/s,\$${DESTDIR},,' \
235
	${REINPLACE_CMD} -e '/AUXLINK_LINK/s,\$${DESTDIR},,' \
232
		${WRKSRC}/lib/libGLX_nvidia/Makefile
236
		${WRKSRC}/lib/libGLX_nvidia/Makefile
233
	prefix="${PREFIX}" ; padding=$$(($${#prefix}+3)) ; \
237
	prefix="${PREFIX}" ; padding=$$(($${#prefix}+3)) ; \
234
	gsed ${REINPLACE_ARGS} -E "s,/etc/glvnd/egl_vendor\.d.{$$padding},${GLVND_JSON_PATH}\x00," \
238
	gsed ${REINPLACE_ARGS} -E "s,/etc/glvnd/egl_vendor\.d.{$$padding},${GLVND_JSON_PATH}\x00," \
235
		${WRKSRC}/obj/libglvnd/libEGL.so.1
239
		${WRKSRC}/obj/libglvnd/libEGL.so.1
236
.elif ${NVVERSION} >= 334.016
240
.elif ${NVVERSION} >= 334.016
237
	${REINPLACE_CMD} -e 's,/usr/share/nvidia,$${DESTDIR}${DOCSDIR},' \
241
	${REINPLACE_CMD} -e 's,/usr/share/nvidia,$${DESTDIR}${DOCSDIR},' \
238
		${WRKSRC}/lib/libGL/Makefile ${WRKSRC}/doc/Makefile
242
		${WRKSRC}/lib/libGL/Makefile ${WRKSRC}/doc/Makefile
239
.endif
243
.endif
240
.if ${NVVERSION} >= 415.013
244
.if ${NVVERSION} >= 415.013
241
	prefix="${PREFIX}" ; padding=$$(($${#prefix}+3)) ; \
245
	prefix="${PREFIX}" ; padding=$$(($${#prefix}+3)) ; \
242
	gsed ${REINPLACE_ARGS} -E "s,/etc/egl/egl_external_platform\.d.{$$padding},${EGL_JSON_PATH}\x00," \
246
	gsed ${REINPLACE_ARGS} -E "s,/etc/egl/egl_external_platform\.d.{$$padding},${EGL_JSON_PATH}\x00," \
243
		${WRKSRC}/obj/libEGL_nvidia.so.0
247
		${WRKSRC}/obj/libEGL_nvidia.so.0
244
.endif
248
.endif
245
# Unbreak the build against -Werror,-Wunused-but-set-variable CFLAGS
249
# Unbreak the build against -Werror,-Wunused-but-set-variable CFLAGS
246
.if ${NVVERSION} < 450.51
250
.if ${NVVERSION} < 450.51
247
	${REINPLACE_CMD} -e '/void nvidia_dev_dtor/,+8s,.*status.*,,' \
251
	${REINPLACE_CMD} -e '/void nvidia_dev_dtor/,+8s,.*status.*,,' \
248
		${WRKSRC}/src/${NVSRC}/nvidia_dev.c
252
		${WRKSRC}/src/${NVSRC}/nvidia_dev.c
249
.endif
253
.endif
250
# Move symlinks under PREFIX
254
# Move symlinks under PREFIX
251
.if ${NVVERSION} >= 525.08902
255
.if ${NVVERSION} >= 525.08902
252
	${REINPLACE_CMD} -e '/ln/s/$${LOCALBASE}\/lib/../' \
256
	${REINPLACE_CMD} -e '/ln/s/$${LOCALBASE}\/lib/../' \
253
		-e '/LIBDIR/!s/$${LOCALBASE}/$${DESTDIR}$${PREFIX}/' \
257
		-e '/LIBDIR/!s/$${LOCALBASE}/$${DESTDIR}$${PREFIX}/' \
254
		${WRKSRC}/lib/libnvidia-allocator/Makefile
258
		${WRKSRC}/lib/libnvidia-allocator/Makefile
255
.endif
259
.endif
256
# After src 2a99dd30dfaa, DRIVER_MODULE should not include nvidia_devclass
260
# After src 2a99dd30dfaa, DRIVER_MODULE should not include nvidia_devclass
257
.if ${OSVERSION} >= 1400058
261
.if ${OSVERSION} >= 1400058
258
	${REINPLACE_CMD} -e '/^DRIVER_MODULE/s/, nvidia_devclass//' \
262
	${REINPLACE_CMD} -e '/^DRIVER_MODULE/s/, nvidia_devclass//' \
259
		${WRKSRC}/src/${NVSRC}/nvidia_pci.c
263
		${WRKSRC}/src/${NVSRC}/nvidia_pci.c
260
.endif
264
.endif
261
# Catch up with pmap_unmapdev() and kmem_*() changes in 14-CURRENT
265
# Catch up with pmap_unmapdev() and kmem_*() changes in 14-CURRENT
262
.if ${OSVERSION} >= 1400070
266
.if ${OSVERSION} >= 1400070
267
.  if ${NVVERSION} < 530.03002
263
	${REINPLACE_CMD} -e '/pmap_unmapdev/s,(vm_offset_t),,' \
268
	${REINPLACE_CMD} -e '/pmap_unmapdev/s,(vm_offset_t),,' \
264
		${WRKSRC}/src/${NVSRC}/nvidia_os.c
269
		${WRKSRC}/src/${NVSRC}/nvidia_os.c
265
	${REINPLACE_CMD} -e '/vm_offset_t virtual_address/s,vm_offset_t ,char *,' \
270
	${REINPLACE_CMD} -e '/vm_offset_t virtual_address/s,vm_offset_t ,char *,' \
266
		${WRKSRC}/src/${NVSRC}/nv-freebsd.h
271
		${WRKSRC}/src/${NVSRC}/nv-freebsd.h
267
	${REINPLACE_CMD} -e '/vm_offset_t address;/s,vm_offset_t ,void *,' \
272
	${REINPLACE_CMD} -e '/vm_offset_t address;/s,vm_offset_t ,void *,' \
268
		${WRKSRC}/src/${NVSRC}/nvidia_subr.c
273
		${WRKSRC}/src/${NVSRC}/nvidia_subr.c
274
.  endif
269
.endif
275
.endif
270
# Fix a K&R prototype
276
# Fix a K&R prototype
271
.if ${NVVERSION:R} >= 390
277
.if ${NVVERSION:R} >= 390
272
	${REINPLACE_CMD} -e '/nvlink_allocLock/s,(),(void),' \
278
	${REINPLACE_CMD} -e '/nvlink_allocLock/s,(),(void),' \
273
		${WRKSRC}/src/${NVSRC}/nvlink_freebsd.c
279
		${WRKSRC}/src/${NVSRC}/nvlink_freebsd.c
274
.endif
280
.endif
275
# Finally, process OPTIONS
281
# Finally, process OPTIONS
276
.if ${PORT_OPTIONS:MFREEBSD_AGP}
282
.if ${PORT_OPTIONS:MFREEBSD_AGP}
277
	${REINPLACE_CMD} -E 's/undef (NV_SUPPORT_OS_AGP)/define \1/' \
283
	${REINPLACE_CMD} -E 's/undef (NV_SUPPORT_OS_AGP)/define \1/' \
278
		${WRKSRC}/src/${NVSRC}/nv-freebsd.h
284
		${WRKSRC}/src/${NVSRC}/nv-freebsd.h
279
.endif
285
.endif
280
.if ${PORT_OPTIONS:MACPI_PM}
286
.if ${PORT_OPTIONS:MACPI_PM}
281
	${REINPLACE_CMD} -E 's/undef (NV_SUPPORT_ACPI_PM)/define \1/' \
287
	${REINPLACE_CMD} -E 's/undef (NV_SUPPORT_ACPI_PM)/define \1/' \
282
		${WRKSRC}/src/${NVSRC}/nv-freebsd.h
288
		${WRKSRC}/src/${NVSRC}/nv-freebsd.h
283
.endif
289
.endif
284
.if ! ${PORT_OPTIONS:MLINUX}
290
.if ! ${PORT_OPTIONS:MLINUX}
285
	${REINPLACE_CMD} -E 's/define (NV_SUPPORT_LINUX_COMPAT)/undef \1/' \
291
	${REINPLACE_CMD} -E 's/define (NV_SUPPORT_LINUX_COMPAT)/undef \1/' \
286
		${WRKSRC}/src/${NVSRC}/nv-freebsd.h
292
		${WRKSRC}/src/${NVSRC}/nv-freebsd.h
287
.  if ${NVVERSION} >= 358.009
293
.  if ${NVVERSION} >= 358.009
288
	${REINPLACE_CMD} -E 's/define (NVKMS_SUPPORT_LINUX_COMPAT)/undef \1/' \
294
	${REINPLACE_CMD} -E 's/define (NVKMS_SUPPORT_LINUX_COMPAT)/undef \1/' \
289
		${WRKSRC}/src/nvidia-modeset/nvidia-modeset-freebsd.c
295
		${WRKSRC}/src/nvidia-modeset/nvidia-modeset-freebsd.c
290
.  endif
296
.  endif
291
.endif
297
.endif
292
.if ${PORT_OPTIONS:MPAE}
298
.if ${PORT_OPTIONS:MPAE}
293
	${REINPLACE_CMD} -E 's/undef (NV_SUPPORT_PAE)/define \1/' \
299
	${REINPLACE_CMD} -E 's/undef (NV_SUPPORT_PAE)/define \1/' \
294
		${WRKSRC}/src/${NVSRC}/nv-freebsd.h
300
		${WRKSRC}/src/${NVSRC}/nv-freebsd.h
295
.endif
301
.endif
296
.if ${PORT_OPTIONS:MWBINVD}
302
.if ${PORT_OPTIONS:MWBINVD}
297
	${REINPLACE_CMD} -E 's/undef (NV_USE_WBINVD)/define \1/' \
303
	${REINPLACE_CMD} -E 's/undef (NV_USE_WBINVD)/define \1/' \
298
		${WRKSRC}/src/${NVSRC}/nv-freebsd.h
304
		${WRKSRC}/src/${NVSRC}/nv-freebsd.h
299
.endif
305
.endif
300
# Conditionally install documentation (but you generally want it)
306
# Conditionally install documentation (but you generally want it)
301
.if ! ${PORT_OPTIONS:MDOCS}
307
.if ! ${PORT_OPTIONS:MDOCS}
302
	${REINPLACE_CMD} -E 's/(x11).*/\1/ ; /doc/d' ${WRKSRC}/Makefile
308
	${REINPLACE_CMD} -E 's/(x11).*/\1/ ; /doc/d' ${WRKSRC}/Makefile
303
.endif
309
.endif
304
310
305
pre-install:
311
pre-install:
306
	@${MKDIR} ${STAGEDIR}${PREFIX}/${MODULESDIR}/drivers \
312
	@${MKDIR} ${STAGEDIR}${PREFIX}/${MODULESDIR}/drivers \
307
		${STAGEDIR}${PREFIX}/${MODULESDIR}/extensions
313
		${STAGEDIR}${PREFIX}/${MODULESDIR}/extensions
308
314
309
post-install: .SILENT
315
post-install: .SILENT
310
	${INSTALL_SCRIPT} ${WRKSRC}/obj/nvidia-bug-report.sh \
316
	${INSTALL_SCRIPT} ${WRKSRC}/obj/nvidia-bug-report.sh \
311
		${STAGEDIR}${PREFIX}/bin
317
		${STAGEDIR}${PREFIX}/bin
312
# pkg-plist is already overbloated, so use these hacks instead of PLIST_SUB's
318
# pkg-plist is already overbloated, so use these hacks instead of PLIST_SUB's
313
.if ${NVVERSION:R} < 460
319
.if ${NVVERSION:R} < 460
314
	${REINPLACE_CMD} -e '/libnvidia-glvkspirv\.so/d ; \
320
	${REINPLACE_CMD} -e '/libnvidia-glvkspirv\.so/d ; \
315
		/nvidia_icd\.json/d ; /nvidia_layers\.json/d' ${TMPPLIST}
321
		/nvidia_icd\.json/d ; /nvidia_layers\.json/d' ${TMPPLIST}
316
.endif
322
.endif
317
.if ${NVVERSION} >= 304.128 && ${NVVERSION} < 310.019 || ${NVVERSION} >= 361.016
323
.if ${NVVERSION} >= 304.128 && ${NVVERSION} < 310.019 || ${NVVERSION} >= 361.016
318
	${REINPLACE_CMD} -E '/libvdpau(_trace)?\.so/d' ${TMPPLIST}
324
	${REINPLACE_CMD} -E '/libvdpau(_trace)?\.so/d' ${TMPPLIST}
319
.endif
325
.endif
320
.if ${NVVERSION} >= 310.019
326
.if ${NVVERSION} >= 310.019
321
	${REINPLACE_CMD} -e '/libXvMCNVIDIA/d' ${TMPPLIST}
327
	${REINPLACE_CMD} -e '/libXvMCNVIDIA/d' ${TMPPLIST}
322
.else	# some applications need this symlink (see PR ports/72877)
328
.else	# some applications need this symlink (see PR ports/72877)
323
	${LN} -sf libXvMCNVIDIA.so.1 \
329
	${LN} -sf libXvMCNVIDIA.so.1 \
324
		${STAGEDIR}${PREFIX}/lib/libXvMCNVIDIA_dynamic.so.1
330
		${STAGEDIR}${PREFIX}/lib/libXvMCNVIDIA_dynamic.so.1
325
.endif
331
.endif
326
.if ${NVVERSION} < 331.013 || ${ARCH} == amd64 && ${NVVERSION} < 334.016
332
.if ${NVVERSION} < 331.013 || ${ARCH} == amd64 && ${NVVERSION} < 334.016
327
	${REINPLACE_CMD} -E '/lib(nvidia-)?(EGL|eglcore|GLESv|glsi)/d' \
333
	${REINPLACE_CMD} -E '/lib(nvidia-)?(EGL|eglcore|GLESv|glsi)/d' \
328
		${TMPPLIST}
334
		${TMPPLIST}
329
.endif
335
.endif
330
.if ${NVVERSION} < 352.009
336
.if ${NVVERSION} < 352.009
331
	${REINPLACE_CMD} -E '/(lib)?nvidia-(debugdump|smi|ml)/d' ${TMPPLIST}
337
	${REINPLACE_CMD} -E '/(lib)?nvidia-(debugdump|smi|ml)/d' ${TMPPLIST}
332
.endif
338
.endif
333
.if ${NVVERSION} < 358.009
339
.if ${NVVERSION} < 358.009
334
	${REINPLACE_CMD} -e '/nvidia-modeset\.ko/d' ${TMPPLIST}
340
	${REINPLACE_CMD} -e '/nvidia-modeset\.ko/d' ${TMPPLIST}
335
.endif
341
.endif
336
.if ${NVVERSION} < 410.057
342
.if ${NVVERSION} < 410.057
337
	${REINPLACE_CMD} -E '/lib(EGL|GLESv[12].*)_nvidia/d ; \
343
	${REINPLACE_CMD} -E '/lib(EGL|GLESv[12].*)_nvidia/d ; \
338
		/lib(GLX|GLdispatch|OpenGL)/d ; \
344
		/lib(GLX|GLdispatch|OpenGL)/d ; \
339
		/extensions\/libglxserver_nvidia\.so/d ; \
345
		/extensions\/libglxserver_nvidia\.so/d ; \
340
		/10_nvidia\.json/d' ${TMPPLIST}
346
		/10_nvidia\.json/d' ${TMPPLIST}
341
.else
347
.else
342
	${REINPLACE_CMD} -e '/extensions\/\.nvidia\/libglx/d' ${TMPPLIST}
348
	${REINPLACE_CMD} -e '/extensions\/\.nvidia\/libglx/d' ${TMPPLIST}
343
.endif
349
.endif
344
.if ${NVVERSION} < 415.013
350
.if ${NVVERSION} < 415.013
345
	${REINPLACE_CMD} -e '/libnvidia-egl-wayland\.so/d ; \
351
	${REINPLACE_CMD} -e '/libnvidia-egl-wayland\.so/d ; \
346
		/10_nvidia_wayland\.json/d' ${TMPPLIST}
352
		/10_nvidia_wayland\.json/d' ${TMPPLIST}
347
.endif
353
.endif
348
.if ${NVVERSION} < 440.036
354
.if ${NVVERSION} < 440.036
349
	${REINPLACE_CMD} -e '/lib32\//d' ${TMPPLIST}
355
	${REINPLACE_CMD} -e '/lib32\//d' ${TMPPLIST}
350
.elif ${NVVERSION} < 465.01901
356
.elif ${NVVERSION} < 465.01901
351
	${REINPLACE_CMD} -e '/lib32\/libnvidia-glvkspirv\.so/d' ${TMPPLIST}
357
	${REINPLACE_CMD} -e '/lib32\/libnvidia-glvkspirv\.so/d' ${TMPPLIST}
352
.endif
358
.endif
353
.if ${NVVERSION} < 470.074
359
.if ${NVVERSION} < 470.074
354
	${REINPLACE_CMD} -e '/libnvidia-vulkan-producer\.so/d' ${TMPPLIST}
360
	${REINPLACE_CMD} -e '/libnvidia-vulkan-producer\.so/d' ${TMPPLIST}
355
.endif
361
.endif
356
.if ${NVVERSION} < 495.02905
362
.if ${NVVERSION} < 495.02905
357
	${REINPLACE_CMD} -e '/libnvidia-egl-gbm\.so/d ; \
363
	${REINPLACE_CMD} -e '/libnvidia-egl-gbm\.so/d ; \
358
		/15_nvidia_gbm\.json/d' ${TMPPLIST}
364
		/15_nvidia_gbm\.json/d' ${TMPPLIST}
359
.endif
365
.endif
360
.if ${NVVERSION} < 525.08902
366
.if ${NVVERSION} < 525.08902
361
	${REINPLACE_CMD} -e '/libnvidia-allocator\.so/d ; \
367
	${REINPLACE_CMD} -e '/libnvidia-allocator\.so/d ; \
362
		/nvidia-drm_gbm\.so/d' ${TMPPLIST}
368
		/nvidia-drm_gbm\.so/d' ${TMPPLIST}
363
.endif
369
.endif
364
.if ${NVVERSION} < 410.057
370
.if ${NVVERSION} < 410.057
365
# Rename some libraries and install a libmap file to resolve conflict with
371
# Rename some libraries and install a libmap file to resolve conflict with
366
# Mesa libraries.
372
# Mesa libraries.
367
	${LN} -sf libGL-NVIDIA.so.1 \
373
	${LN} -sf libGL-NVIDIA.so.1 \
368
		${STAGEDIR}${PREFIX}/lib/libGL-NVIDIA.so
374
		${STAGEDIR}${PREFIX}/lib/libGL-NVIDIA.so
369
	${MV} -f ${STAGEDIR}${PREFIX}/lib/libGL.so.1 \
375
	${MV} -f ${STAGEDIR}${PREFIX}/lib/libGL.so.1 \
370
		${STAGEDIR}${PREFIX}/lib/libGL-NVIDIA.so.1
376
		${STAGEDIR}${PREFIX}/lib/libGL-NVIDIA.so.1
371
	${RM} ${STAGEDIR}${PREFIX}/lib/libGL.so
377
	${RM} ${STAGEDIR}${PREFIX}/lib/libGL.so
372
.  if ${NVVERSION} >= 331.013
378
.  if ${NVVERSION} >= 331.013
373
	${LN} -sf libEGL-NVIDIA.so.1 \
379
	${LN} -sf libEGL-NVIDIA.so.1 \
374
		${STAGEDIR}${PREFIX}/lib/libEGL-NVIDIA.so
380
		${STAGEDIR}${PREFIX}/lib/libEGL-NVIDIA.so
375
	${MV} -f ${STAGEDIR}${PREFIX}/lib/libEGL.so.1 \
381
	${MV} -f ${STAGEDIR}${PREFIX}/lib/libEGL.so.1 \
376
		${STAGEDIR}${PREFIX}/lib/libEGL-NVIDIA.so.1
382
		${STAGEDIR}${PREFIX}/lib/libEGL-NVIDIA.so.1
377
	${RM} ${STAGEDIR}${PREFIX}/lib/libEGL.so
383
	${RM} ${STAGEDIR}${PREFIX}/lib/libEGL.so
378
	${RM} ${STAGEDIR}${PREFIX}/lib/libGLESv1_CM.so
384
	${RM} ${STAGEDIR}${PREFIX}/lib/libGLESv1_CM.so
379
	${RM} ${STAGEDIR}${PREFIX}/lib/libGLESv1_CM.so.1
385
	${RM} ${STAGEDIR}${PREFIX}/lib/libGLESv1_CM.so.1
380
	${LN} -sf libGLESv2-NVIDIA.so.2 \
386
	${LN} -sf libGLESv2-NVIDIA.so.2 \
381
		${STAGEDIR}${PREFIX}/lib/libGLESv2-NVIDIA.so
387
		${STAGEDIR}${PREFIX}/lib/libGLESv2-NVIDIA.so
382
	${MV} -f ${STAGEDIR}${PREFIX}/lib/libGLESv2.so.2 \
388
	${MV} -f ${STAGEDIR}${PREFIX}/lib/libGLESv2.so.2 \
383
		${STAGEDIR}${PREFIX}/lib/libGLESv2-NVIDIA.so.2
389
		${STAGEDIR}${PREFIX}/lib/libGLESv2-NVIDIA.so.2
384
	${RM} ${STAGEDIR}${PREFIX}/lib/libGLESv2.so
390
	${RM} ${STAGEDIR}${PREFIX}/lib/libGLESv2.so
385
.  endif
391
.  endif
386
# Configuration of Nvidia as secondary GPU requires preserving libglvnd or mesa
392
# Configuration of Nvidia as secondary GPU requires preserving libglvnd or mesa
387
# libraries as default implementation; a libmap must not override in this case.
393
# libraries as default implementation; a libmap must not override in this case.
388
.  if !defined(LIBGLDIR)
394
.  if !defined(LIBGLDIR)
389
	@${MKDIR} ${STAGEDIR}${PREFIX}/etc/libmap.d/
395
	@${MKDIR} ${STAGEDIR}${PREFIX}/etc/libmap.d/
390
	${INSTALL_DATA} ${WRKDIR}/nvidia.conf \
396
	${INSTALL_DATA} ${WRKDIR}/nvidia.conf \
391
		${STAGEDIR}${PREFIX}/etc/libmap.d/
397
		${STAGEDIR}${PREFIX}/etc/libmap.d/
392
.  else
398
.  else
393
# libgl proxies require a library path containing unrenamed lib*GL*.so
399
# libgl proxies require a library path containing unrenamed lib*GL*.so
394
	${MKDIR} ${STAGEDIR}${PREFIX}/${LIBGLDIR}
400
	${MKDIR} ${STAGEDIR}${PREFIX}/${LIBGLDIR}
395
	${RLN} ${STAGEDIR}${PREFIX}/lib/libGL-NVIDIA.so.1 \
401
	${RLN} ${STAGEDIR}${PREFIX}/lib/libGL-NVIDIA.so.1 \
396
		${STAGEDIR}${PREFIX}/${LIBGLDIR}/libGL.so.1
402
		${STAGEDIR}${PREFIX}/${LIBGLDIR}/libGL.so.1
397
	${RLN} ${STAGEDIR}${PREFIX}/lib/libEGL-NVIDIA.so.1 \
403
	${RLN} ${STAGEDIR}${PREFIX}/lib/libEGL-NVIDIA.so.1 \
398
		${STAGEDIR}${PREFIX}/${LIBGLDIR}/libEGL.so.1
404
		${STAGEDIR}${PREFIX}/${LIBGLDIR}/libEGL.so.1
399
	${RLN} ${STAGEDIR}${PREFIX}/lib/libGLESv2-NVIDIA.so.2 \
405
	${RLN} ${STAGEDIR}${PREFIX}/lib/libGLESv2-NVIDIA.so.2 \
400
		${STAGEDIR}${PREFIX}/${LIBGLDIR}/libGLESv2.so.2
406
		${STAGEDIR}${PREFIX}/${LIBGLDIR}/libGLESv2.so.2
401
.  endif
407
.  endif
402
# Configuration of Nvidia as secondary GPU requires preserving xorg-server's
408
# Configuration of Nvidia as secondary GPU requires preserving xorg-server's
403
# libglx.so and moving Nvidia's glx to where it can be found by a secondary
409
# libglx.so and moving Nvidia's glx to where it can be found by a secondary
404
# Xorg instance.
410
# Xorg instance.
405
# Not needed since 410.057: Nvidia driver finds libglxserver_nvidia.so instead.
411
# Not needed since 410.057: Nvidia driver finds libglxserver_nvidia.so instead.
406
.  if ${EXTENSIONSDIR} != ${MODULESDIR}/extensions/.nvidia
412
.  if ${EXTENSIONSDIR} != ${MODULESDIR}/extensions/.nvidia
407
	${MKDIR} ${STAGEDIR}${PREFIX}/${EXTENSIONSDIR}
413
	${MKDIR} ${STAGEDIR}${PREFIX}/${EXTENSIONSDIR}
408
	${MV} ${STAGEDIR}${PREFIX}/${MODULESDIR}/extensions/.nvidia/* \
414
	${MV} ${STAGEDIR}${PREFIX}/${MODULESDIR}/extensions/.nvidia/* \
409
		${STAGEDIR}${PREFIX}/${EXTENSIONSDIR}/
415
		${STAGEDIR}${PREFIX}/${EXTENSIONSDIR}/
410
.  endif
416
.  endif
411
.else
417
.else
412
	${REINPLACE_CMD} -E '/-NVIDIA/d ; \
418
	${REINPLACE_CMD} -E '/-NVIDIA/d ; \
413
		/lib(Open)?E?GLX?(ESv[12](_CM)?|dispatch)?\.so/d' \
419
		/lib(Open)?E?GLX?(ESv[12](_CM)?|dispatch)?\.so/d' \
414
		${TMPPLIST}
420
		${TMPPLIST}
415
# Override mesa.conf if GLX_EXT_libglvnd is missing
421
# Override mesa.conf if GLX_EXT_libglvnd is missing
416
	@${ECHO_CMD} "libGLX_indirect.so.0 libGLX_nvidia.so.0" \
422
	@${ECHO_CMD} "libGLX_indirect.so.0 libGLX_nvidia.so.0" \
417
		>${STAGEDIR}${PREFIX}/etc/libmap.d/nvidia.conf
423
		>${STAGEDIR}${PREFIX}/etc/libmap.d/nvidia.conf
418
.endif
424
.endif
419
425
420
.include <bsd.port.post.mk>
426
.include <bsd.port.post.mk>
(-)b/x11/nvidia-driver/distinfo (-3 / +3 lines)
Lines 1-17 Link Here
1
TIMESTAMP = 1682616247
1
TIMESTAMP = 1687819912
2
SHA256 (NVIDIA-FreeBSD-x86_64-525.116.03.tar.xz) = 7a4cca406cc58b928c422bd62e1f2d2ab6d82b7ad756ea67a656240ec432a9cd
2
SHA256 (NVIDIA-FreeBSD-x86_64-535.54.03.tar.xz) = 5a4bc850c0edd76f9397722bb06e1d74581c3e096a75e1f094861dc3fc20a1e9
3
SIZE (NVIDIA-FreeBSD-x86_64-525.116.03.tar.xz) = 136885220
3
SIZE (NVIDIA-FreeBSD-x86_64-535.54.03.tar.xz) = 141546052
4
SHA256 (NVIDIA-FreeBSD-x86_64-470.161.03.tar.xz) = 54f87e6cadc4aedebc4f862e3d25657fddb867ddc3fe01ad06c9d54bcfa8d607
4
SHA256 (NVIDIA-FreeBSD-x86_64-470.161.03.tar.xz) = 54f87e6cadc4aedebc4f862e3d25657fddb867ddc3fe01ad06c9d54bcfa8d607
5
SIZE (NVIDIA-FreeBSD-x86_64-470.161.03.tar.xz) = 99719576
5
SIZE (NVIDIA-FreeBSD-x86_64-470.161.03.tar.xz) = 99719576
6
SHA256 (NVIDIA-FreeBSD-x86_64-390.154.tar.gz) = 5994c77c3510a4a89076ecf2bf402f1da635b250cca07655efc913f2a94bee84
6
SHA256 (NVIDIA-FreeBSD-x86_64-390.154.tar.gz) = 5994c77c3510a4a89076ecf2bf402f1da635b250cca07655efc913f2a94bee84
7
SIZE (NVIDIA-FreeBSD-x86_64-390.154.tar.gz) = 65339271
7
SIZE (NVIDIA-FreeBSD-x86_64-390.154.tar.gz) = 65339271
8
SHA256 (NVIDIA-FreeBSD-x86-390.154.tar.gz) = 43fdb7ec369b747a2a6311fca6eca11a9ebd121236c6e59590659625dd799cc6
8
SHA256 (NVIDIA-FreeBSD-x86-390.154.tar.gz) = 43fdb7ec369b747a2a6311fca6eca11a9ebd121236c6e59590659625dd799cc6
9
SIZE (NVIDIA-FreeBSD-x86-390.154.tar.gz) = 65996926
9
SIZE (NVIDIA-FreeBSD-x86-390.154.tar.gz) = 65996926
10
SHA256 (NVIDIA-FreeBSD-x86_64-340.108.tar.gz) = f58fc793995008fd07719e3d001b1ad4b3547cfbc7084aec769098daa02e336f
10
SHA256 (NVIDIA-FreeBSD-x86_64-340.108.tar.gz) = f58fc793995008fd07719e3d001b1ad4b3547cfbc7084aec769098daa02e336f
11
SIZE (NVIDIA-FreeBSD-x86_64-340.108.tar.gz) = 61500286
11
SIZE (NVIDIA-FreeBSD-x86_64-340.108.tar.gz) = 61500286
12
SHA256 (NVIDIA-FreeBSD-x86-340.108.tar.gz) = 87b8523fb29e2bf51c2daf555e6dc46bbc6e5fd76b07a2034d3a5485a7cf99bf
12
SHA256 (NVIDIA-FreeBSD-x86-340.108.tar.gz) = 87b8523fb29e2bf51c2daf555e6dc46bbc6e5fd76b07a2034d3a5485a7cf99bf
13
SIZE (NVIDIA-FreeBSD-x86-340.108.tar.gz) = 60616768
13
SIZE (NVIDIA-FreeBSD-x86-340.108.tar.gz) = 60616768
14
SHA256 (NVIDIA-FreeBSD-x86_64-304.137.tar.gz) = 231693189e1bdf5c1dd02315cde5ef9ed6c0854564314438f2f40f9788a34120
14
SHA256 (NVIDIA-FreeBSD-x86_64-304.137.tar.gz) = 231693189e1bdf5c1dd02315cde5ef9ed6c0854564314438f2f40f9788a34120
15
SIZE (NVIDIA-FreeBSD-x86_64-304.137.tar.gz) = 36474676
15
SIZE (NVIDIA-FreeBSD-x86_64-304.137.tar.gz) = 36474676
16
SHA256 (NVIDIA-FreeBSD-x86-304.137.tar.gz) = 5f874133853eacc5b9a10311cec22d3c4898db7f75b92bb6c12d5be5126516fb
16
SHA256 (NVIDIA-FreeBSD-x86-304.137.tar.gz) = 5f874133853eacc5b9a10311cec22d3c4898db7f75b92bb6c12d5be5126516fb
17
SIZE (NVIDIA-FreeBSD-x86-304.137.tar.gz) = 35399011
17
SIZE (NVIDIA-FreeBSD-x86-304.137.tar.gz) = 35399011

Return to bug 271523