Lines 1-7
Link Here
|
1 |
# Created by: Stijn Hoop <stijn@win.tue.nl> |
1 |
# Created by: Stijn Hoop <stijn@win.tue.nl> |
2 |
# $FreeBSD: head/x11/nvidia-driver/Makefile 367888 2014-09-10 20:50:31Z gerald $ |
2 |
# $FreeBSD: head/x11/nvidia-driver/Makefile 367888 2014-09-10 20:50:31Z gerald $ |
3 |
|
3 |
|
4 |
PORTNAME= nvidia-driver |
4 |
PORTNAME?= nvidia-driver |
5 |
DISTVERSION?= 331.67 |
5 |
DISTVERSION?= 331.67 |
6 |
# Always try to set PORTREVISION as it can be overridden by the slave ports |
6 |
# Always try to set PORTREVISION as it can be overridden by the slave ports |
7 |
PORTREVISION?= 1 |
7 |
PORTREVISION?= 1 |
Lines 31-37
Link Here
|
31 |
# hack below to universally set NVIDIA_ROOT. Also provide X11BASE value |
31 |
# hack below to universally set NVIDIA_ROOT. Also provide X11BASE value |
32 |
# since it is still used by legacy drivers. |
32 |
# since it is still used by legacy drivers. |
33 |
MAKE_ENV= NVIDIA_ROOT=${WRKSRC} X11BASE=${LOCALBASE} |
33 |
MAKE_ENV= NVIDIA_ROOT=${WRKSRC} X11BASE=${LOCALBASE} |
34 |
SUB_FILES= pkg-deinstall pkg-install pkg-message |
34 |
SUB_FILES= pkg-message |
35 |
DOCSDIR= ${PREFIX}/share/doc/NVIDIA_GLX-1.0 |
35 |
DOCSDIR= ${PREFIX}/share/doc/NVIDIA_GLX-1.0 |
36 |
MODULESDIR= lib/xorg/modules |
36 |
MODULESDIR= lib/xorg/modules |
37 |
PORTDOCS= * |
37 |
PORTDOCS= * |
Lines 76-86
Link Here
|
76 |
EXTRA_PATCHES+= ${FILESDIR}/security-patch-CVE-2012-4225 |
76 |
EXTRA_PATCHES+= ${FILESDIR}/security-patch-CVE-2012-4225 |
77 |
.endif |
77 |
.endif |
78 |
|
78 |
|
79 |
OPTIONS_DEFINE= ACPI_PM LINUX DOCS |
79 |
OPTIONS_DEFINE= ACPI_PM LINUX DOCS OPTIMUS |
80 |
OPTIONS_DEFAULT= LINUX |
80 |
OPTIONS_DEFAULT?= LINUX |
81 |
|
81 |
|
82 |
ACPI_PM_DESC= ACPI Power Management support |
82 |
ACPI_PM_DESC= ACPI Power Management support |
83 |
LINUX_DESC= Linux compatibility support |
83 |
LINUX_DESC= Linux compatibility support |
|
|
84 |
OPTIMUS_DESC= For use with nVIDIA Optimus |
84 |
|
85 |
|
85 |
.if ${NVVERSION} < 3101400 |
86 |
.if ${NVVERSION} < 3101400 |
86 |
OPTIONS_DEFINE+= FREEBSD_AGP |
87 |
OPTIONS_DEFINE+= FREEBSD_AGP |
Lines 108-114
Link Here
|
108 |
.endif |
109 |
.endif |
109 |
|
110 |
|
110 |
.if ${PORT_OPTIONS:MLINUX} |
111 |
.if ${PORT_OPTIONS:MLINUX} |
|
|
112 |
.if !${PORT_OPTIONS:MOPTIMUS} |
111 |
CONFLICTS= linux[-_]dri-[0-9]* linux-f10-dri-[0-9]* |
113 |
CONFLICTS= linux[-_]dri-[0-9]* linux-f10-dri-[0-9]* |
|
|
114 |
.endif |
112 |
USE_LINUX= yes |
115 |
USE_LINUX= yes |
113 |
PLIST_SUB+= LINUX="" |
116 |
PLIST_SUB+= LINUX="" |
114 |
.else |
117 |
.else |
Lines 117-122
Link Here
|
117 |
MAKE_ENV+= WITHOUT_LINUX=yes |
120 |
MAKE_ENV+= WITHOUT_LINUX=yes |
118 |
.endif |
121 |
.endif |
119 |
|
122 |
|
|
|
123 |
.if ${PORT_OPTIONS:MOPTIMUS} |
124 |
PLIST_SUB+= NONOPT="@comment " |
125 |
PLIST_SUB+= OPTIMUS="" |
126 |
.else |
127 |
SUB_FILES+= pkg-install pkg-deinstall |
128 |
PLIST_SUB+= NONOPT="" |
129 |
PLIST_SUB+= OPTIMUS="@comment " |
130 |
.endif |
131 |
|
120 |
.if ${NVVERSION} < 1952200 |
132 |
.if ${NVVERSION} < 1952200 |
121 |
# ABI version is hardcoded inside the binary, so specify it explicitly here |
133 |
# ABI version is hardcoded inside the binary, so specify it explicitly here |
122 |
LIB_DEPENDS= libm.so.3:${PORTSDIR}/misc/compat5x |
134 |
LIB_DEPENDS= libm.so.3:${PORTSDIR}/misc/compat5x |
Lines 231-240
Link Here
|
231 |
.endif |
243 |
.endif |
232 |
# Adjust installation paths of some conflicting files (shared also between |
244 |
# Adjust installation paths of some conflicting files (shared also between |
233 |
# libGL and xorg-server) to ease package manager work, esp. with pkgng |
245 |
# libGL and xorg-server) to ease package manager work, esp. with pkgng |
|
|
246 |
.if ${PORT_OPTIONS:MOPTIMUS} |
247 |
${REINPLACE_CMD} -e '/LIBDIR/s:xorg/modules/extensions:&/.nvidia_optimus:' \ |
248 |
${WRKSRC}/x11/extension/Makefile |
249 |
${REINPLACE_CMD} -e '/LIBDIR/s:lib:&/.nvidia_optimus:' \ |
250 |
${WRKSRC}/lib/libGL/Makefile |
251 |
${REINPLACE_CMD} -e '/LIBDIR/s:lib:&/.nvidia_optimus:' \ |
252 |
${WRKSRC}/lib/compat/libGL/Makefile |
253 |
.else |
234 |
${REINPLACE_CMD} -e '/LIBDIR/s:xorg/modules/extensions:&/.nvidia:' \ |
254 |
${REINPLACE_CMD} -e '/LIBDIR/s:xorg/modules/extensions:&/.nvidia:' \ |
235 |
${WRKSRC}/x11/extension/Makefile |
255 |
${WRKSRC}/x11/extension/Makefile |
236 |
${REINPLACE_CMD} -e '/LIBDIR/s:lib:&/.nvidia:' \ |
256 |
${REINPLACE_CMD} -e '/LIBDIR/s:lib:&/.nvidia:' \ |
237 |
${WRKSRC}/lib/libGL/Makefile |
257 |
${WRKSRC}/lib/libGL/Makefile |
|
|
258 |
.endif |
238 |
# Do not execute afterinstall target (prevent automatic module registration |
259 |
# Do not execute afterinstall target (prevent automatic module registration |
239 |
# and "smart" installation of conflicting files heuristics) |
260 |
# and "smart" installation of conflicting files heuristics) |
240 |
${REINPLACE_CMD} -e 's/afterinstall/&_dontexecute/' ${WRKSRC}/Makefile |
261 |
${REINPLACE_CMD} -e 's/afterinstall/&_dontexecute/' ${WRKSRC}/Makefile |