View | Details | Raw Unified | Return to bug 192617 | Differences between
and this patch

Collapse All | Expand All

(-)Makefile (-4 / +28 lines)
Lines 82-88 Link Here
82
EXTRA_PATCHES+=	${FILESDIR}/extra-patch-src_nvidia-modeset_nvidia-modeset-freebsd.c
82
EXTRA_PATCHES+=	${FILESDIR}/extra-patch-src_nvidia-modeset_nvidia-modeset-freebsd.c
83
.endif
83
.endif
84
84
85
OPTIONS_DEFINE=	ACPI_PM LINUX WBINVD DOCS
85
OPTIONS_DEFINE=	ACPI_PM LINUX WBINVD DOCS OPTIMUS
86
OPTIONS_DEFINE_i386=	PAE
86
OPTIONS_DEFINE_i386=	PAE
87
OPTIONS_DEFAULT=	LINUX
87
OPTIONS_DEFAULT=	LINUX
88
88
Lines 90-95 Link Here
90
LINUX_DESC=		Linux compatibility support
90
LINUX_DESC=		Linux compatibility support
91
PAE_DESC=		Physical Address Extensions support
91
PAE_DESC=		Physical Address Extensions support
92
WBINVD_DESC=		Flush CPU caches directly with WBINVD
92
WBINVD_DESC=		Flush CPU caches directly with WBINVD
93
OPTIMUS_DESC=		Optimus support
93
94
94
.if ${NVVERSION} < 310.014
95
.if ${NVVERSION} < 310.014
95
OPTIONS_DEFINE+=	FREEBSD_AGP
96
OPTIONS_DEFINE+=	FREEBSD_AGP
Lines 112-117 Link Here
112
MAKE_ENV+=	WITHOUT_LINUX=yes
113
MAKE_ENV+=	WITHOUT_LINUX=yes
113
.endif
114
.endif
114
115
116
.if ${PORT_OPTIONS:MOPTIMUS}
117
PLIST_SUB+=	NONOPT="@comment "
118
PLIST_SUB+=	OPTIMUS=""
119
.else
120
PLIST_SUB+=	NONOPT=""
121
PLIST_SUB+=	OPTIMUS="@comment "
122
.endif
123
115
post-patch: .SILENT
124
post-patch: .SILENT
116
# KPI of kmem_alloc_contig(),kmem_free() changed in FreeBSD src r338143,r338318
125
# KPI of kmem_alloc_contig(),kmem_free() changed in FreeBSD src r338143,r338318
117
.if ${OSVERSION} >= 1200079
126
.if ${OSVERSION} >= 1200079
Lines 151-158 Link Here
151
.endif
160
.endif
152
# Adjust installation path of a conflicting file (shared between
161
# Adjust installation path of a conflicting file (shared between
153
# nvidia-driver and xorg-server) to ease package manager work
162
# nvidia-driver and xorg-server) to ease package manager work
163
.if ${PORT_OPTIONS:MOPTIMUS}
164
	${REINPLACE_CMD} -e '/LIBDIR/s:xorg/modules/extensions:&/.nvidia_optimus:' \
165
		${WRKSRC}/x11/extension/Makefile
166
.else
154
	${REINPLACE_CMD} -e '/LIBDIR/s:xorg/modules/extensions:&/.nvidia:' \
167
	${REINPLACE_CMD} -e '/LIBDIR/s:xorg/modules/extensions:&/.nvidia:' \
155
		${WRKSRC}/x11/extension/Makefile
168
		${WRKSRC}/x11/extension/Makefile
169
.endif
156
# Do not execute afterinstall target (prevent automatic module registration
170
# Do not execute afterinstall target (prevent automatic module registration
157
# and "smart" installation of conflicting files heuristics)
171
# and "smart" installation of conflicting files heuristics)
158
	${REINPLACE_CMD} -e 's/afterinstall/&_dontexecute/' ${WRKSRC}/Makefile
172
	${REINPLACE_CMD} -e 's/afterinstall/&_dontexecute/' ${WRKSRC}/Makefile
Lines 236-258 Link Here
236
		/libEGL_nvidia\.so\.${PORTVERSION}/d' ${TMPPLIST}
250
		/libEGL_nvidia\.so\.${PORTVERSION}/d' ${TMPPLIST}
237
.endif
251
.endif
238
# rename libGL.so, libEGL.so and libGLESv2.so
252
# rename libGL.so, libEGL.so and libGLESv2.so
239
	${MV} -f ${STAGEDIR}${PREFIX}/lib/libGL.so \
253
# and do correct symlink
254
	${RM} ${STAGEDIR}${PREFIX}/lib/libGL.so
255
	${LN} -sf libGL-NVIDIA.so.1 \
240
		${STAGEDIR}${PREFIX}/lib/libGL-NVIDIA.so
256
		${STAGEDIR}${PREFIX}/lib/libGL-NVIDIA.so
241
	${MV} -f ${STAGEDIR}${PREFIX}/lib/libGL.so.1 \
257
	${MV} -f ${STAGEDIR}${PREFIX}/lib/libGL.so.1 \
242
		${STAGEDIR}${PREFIX}/lib/libGL-NVIDIA.so.1
258
		${STAGEDIR}${PREFIX}/lib/libGL-NVIDIA.so.1
243
.if ${NVVERSION} >= 331.013
259
.if ${NVVERSION} >= 331.013
244
	${MV} -f ${STAGEDIR}${PREFIX}/lib/libEGL.so \
260
	${RM} ${STAGEDIR}${PREFIX}/lib/libEGL.so
261
	${LN} -sf libEGL-NVIDIA.so.1 \
245
		${STAGEDIR}${PREFIX}/lib/libEGL-NVIDIA.so
262
		${STAGEDIR}${PREFIX}/lib/libEGL-NVIDIA.so
246
	${MV} -f ${STAGEDIR}${PREFIX}/lib/libEGL.so.1 \
263
	${MV} -f ${STAGEDIR}${PREFIX}/lib/libEGL.so.1 \
247
		${STAGEDIR}${PREFIX}/lib/libEGL-NVIDIA.so.1
264
		${STAGEDIR}${PREFIX}/lib/libEGL-NVIDIA.so.1
248
	${MV} -f ${STAGEDIR}${PREFIX}/lib/libGLESv2.so \
265
	${RM} ${STAGEDIR}${PREFIX}/lib/libGLESv2.so
266
	${LN} -sf libGLESv2-NVIDIA.so.2 \
249
		${STAGEDIR}${PREFIX}/lib/libGLESv2-NVIDIA.so
267
		${STAGEDIR}${PREFIX}/lib/libGLESv2-NVIDIA.so
250
	${MV} -f ${STAGEDIR}${PREFIX}/lib/libGLESv2.so.2 \
268
	${MV} -f ${STAGEDIR}${PREFIX}/lib/libGLESv2.so.2 \
251
		${STAGEDIR}${PREFIX}/lib/libGLESv2-NVIDIA.so.2
269
		${STAGEDIR}${PREFIX}/lib/libGLESv2-NVIDIA.so.2
252
.endif
270
.endif
253
	@${MKDIR} ${STAGEDIR}${PREFIX}/etc/libmap.d/
271
	@${MKDIR} ${STAGEDIR}${PREFIX}/etc/libmap.d/
272
.if ${PORT_OPTIONS:MOPTIMUS}
273
	@${MKDIR} ${STAGEDIR}${PREFIX}/etc/libmap.d/.nvidia
254
	${INSTALL_DATA} ${WRKDIR}/nvidia.conf \
274
	${INSTALL_DATA} ${WRKDIR}/nvidia.conf \
275
		${STAGEDIR}${PREFIX}/etc/libmap.d/.nvidia/
276
.else
277
	${INSTALL_DATA} ${WRKDIR}/nvidia.conf \
255
		${STAGEDIR}${PREFIX}/etc/libmap.d/
278
		${STAGEDIR}${PREFIX}/etc/libmap.d/
279
.endif
256
280
257
# Target below can be used instead of standard `makesum' to correctly
281
# Target below can be used instead of standard `makesum' to correctly
258
# update distinfo (i.e., keeping other driver version entries intact)
282
# update distinfo (i.e., keeping other driver version entries intact)
(-)pkg-plist (-3 / +6 lines)
Lines 1-7 Link Here
1
bin/nvidia-bug-report.sh
1
bin/nvidia-bug-report.sh
2
bin/nvidia-debugdump
2
bin/nvidia-debugdump
3
bin/nvidia-smi
3
bin/nvidia-smi
4
etc/libmap.d/nvidia.conf
4
%%NONOPT%%etc/libmap.d/nvidia.conf
5
%%OPTIMUS%%etc/libmap.d/.nvidia/nvidia.conf
5
lib/libGL-NVIDIA.so
6
lib/libGL-NVIDIA.so
6
lib/libGL-NVIDIA.so.1
7
lib/libGL-NVIDIA.so.1
7
lib/libEGL-NVIDIA.so
8
lib/libEGL-NVIDIA.so
Lines 30-37 Link Here
30
lib/vdpau/libvdpau_nvidia.so.1
31
lib/vdpau/libvdpau_nvidia.so.1
31
man/man1/nvidia-smi.1.gz
32
man/man1/nvidia-smi.1.gz
32
%%MODULESDIR%%/drivers/nvidia_drv.so
33
%%MODULESDIR%%/drivers/nvidia_drv.so
33
%%MODULESDIR%%/extensions/.nvidia/libglx.so
34
%%NONOPT%%%%MODULESDIR%%/extensions/.nvidia/libglx.so
34
%%MODULESDIR%%/extensions/.nvidia/libglx.so.1
35
%%NONOPT%%%%MODULESDIR%%/extensions/.nvidia/libglx.so.1
36
%%OPTIMUS%%%%MODULESDIR%%/extensions/.nvidia_optimus/libglx.so
37
%%OPTIMUS%%%%MODULESDIR%%/extensions/.nvidia_optimus/libglx.so.1
35
/%%KMODDIR%%/nvidia.ko
38
/%%KMODDIR%%/nvidia.ko
36
/%%KMODDIR%%/nvidia-modeset.ko
39
/%%KMODDIR%%/nvidia-modeset.ko
37
%%LINUX%%%%LINUXBASE%%/usr/lib/libEGL.so.%%SHLIB_VERSION%%
40
%%LINUX%%%%LINUXBASE%%/usr/lib/libEGL.so.%%SHLIB_VERSION%%

Return to bug 192617