aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorosa <osa@FreeBSD.org>2004-08-17 19:54:09 +0800
committerosa <osa@FreeBSD.org>2004-08-17 19:54:09 +0800
commitfe4e9180de2c0858284cbe9c9449153feb123929 (patch)
tree2ffc735d2e8e27255b830ffe88634f12f1a057a8
parent5eb3fc278f016c751417de16e196af63fb9e39e0 (diff)
downloadfreebsd-ports-gnome-fe4e9180de2c0858284cbe9c9449153feb123929.tar.gz
freebsd-ports-gnome-fe4e9180de2c0858284cbe9c9449153feb123929.tar.zst
freebsd-ports-gnome-fe4e9180de2c0858284cbe9c9449153feb123929.zip
Update nVidia binary drivers to most recent released version, 6113.
Features: * Support for the latest NVIDIA GPUs including GeForce 6800 Series * Improved interaction with -CURRENT's new threading libraries. It also brings some more general fixes to the port: * Utilizes PORTDOCS * New knobs added * pkg-plist fixed Special note for -CURRENT users: nVidia driver now depends on mem.ko kernel module. Submitted by: Alexey Dokuchaev <danfe@regency.nsu.ru> (maintainer) PR: 70561
-rw-r--r--x11/nvidia-driver/Makefile57
-rw-r--r--x11/nvidia-driver/distinfo4
-rw-r--r--x11/nvidia-driver/files/patch-module::Makefile13
-rw-r--r--x11/nvidia-driver/files/patch-src::nvidia_ctl.c15
-rw-r--r--x11/nvidia-driver/files/patch-src::nvidia_dev.c15
-rw-r--r--x11/nvidia-driver/files/patch-src::nvidia_pci.c31
-rw-r--r--x11/nvidia-driver/pkg-message24
-rw-r--r--x11/nvidia-driver/pkg-plist38
8 files changed, 85 insertions, 112 deletions
diff --git a/x11/nvidia-driver/Makefile b/x11/nvidia-driver/Makefile
index 5b65c3fb08c9..dd4a21049c95 100644
--- a/x11/nvidia-driver/Makefile
+++ b/x11/nvidia-driver/Makefile
@@ -7,7 +7,6 @@
PORTNAME= nvidia-driver
PORTVERSION= 1.0.${NVVERSION}
-PORTREVISION?= 2
CATEGORIES= x11
MASTER_SITES= http://download.nvidia.com/freebsd/1.0-${NVVERSION}/ \
ftp://download.nvidia.com/freebsd/1.0-${NVVERSION}/ \
@@ -22,7 +21,7 @@ USE_X_PREFIX= yes
NO_PACKAGE= should be recompiled for a particular FreeBSD kernel
INSTALLS_SHLIB= yes
-NVVERSION= 4365
+NVVERSION= 6113
.include <bsd.port.pre.mk>
@@ -36,10 +35,13 @@ PLIST_SUB= XSERVVERSION=${XSERVVERSION} XLIBVERSION=${XLIBVERSION} \
.if !defined(WITHOUT_LINUX)
USE_LINUX= yes
+PLIST_SUB+= LINUX=""
+.else
+PLIST_SUB+= LINUX="@comment "
.endif
-.if ${OSVERSION} < 470000
-IGNORE= "requires FreeBSD -STABLE, version 4.7-RELEASE or later"
+.if ${OSVERSION} < 490000 || (${OSVERSION} >= 500000 && ${OSVERSION} < 502001)
+IGNORE= "supports FreeBSD -STABLE (4.9 or later), or FreeBSD -CURRENT (5.2.1 or later)"
.endif
.if ${OSVERSION} < 500000
@@ -52,53 +54,46 @@ pre-everything::
.if !defined(WITH_FREEBSD_AGP)
@${ECHO_MSG} "Define WITH_FREEBSD_AGP to use FreeBSD AGP GART driver"
.endif
-.if !defined(FORCE_AGP_RATE)
- @${ECHO_MSG} "Define FORCE_AGP_RATE to limit the driver to lower speeds"
+.if !defined(WITH_VM86_INT10CALL)
+ @${ECHO_MSG} "Define WITH_VM86_INT10CALL to use VM86 interface for INT10 calls (video BIOS)"
+.endif
+.if !defined(WITH_ACPI)
+ @${ECHO_MSG} "Define WITH_ACPI to enable support for ACPI Power Management (5.X only!)"
.endif
-.if !defined(WITH_NVIDIA_HACKS)
- @${ECHO_MSG} "Define WITH_NVIDIA_HACKS to enable work-arounds to override basic AGP setup"
+.if !defined(WITHOUT_LINUX)
+ @${ECHO_MSG} "Define WITHOUT_LINUX to build without support for Linux compatibility"
.endif
-.if defined(WITH_FREEBSD_AGP) || defined(FORCE_AGP_RATE) || defined(WITH_NVIDIA_HACKS) || ${OSVERSION} > 501106
+.if defined(WITH_FREEBSD_AGP) || defined(WITH_VM86_INT10CALL) || defined(WITH_ACPI) || defined(WITHOUT_LINUX)
USE_REINPLACE= yes
post-patch:
. if defined(WITH_FREEBSD_AGP)
- @${REINPLACE_CMD} 's/undef USE_OS_AGP_GART/define USE_OS_AGP_GART/' \
+ @${REINPLACE_CMD} 's/undef NV_SUPPORT_OS_AGP/define NV_SUPPORT_OS_AGP/' \
${WRKSRC}/src/nv-freebsd.h
. endif
-. if defined(FORCE_AGP_RATE)
- @${REINPLACE_CMD} 's/NVreg_ReqAGPRate,[[:blank:]]*0/NVreg_ReqAGPRate, 1/' \
- ${WRKSRC}/src/nvidia_os_registry.c
-. endif
-. if defined(WITH_NVIDIA_HACKS)
- @${REINPLACE_CMD} 's/NVreg_UpdateKernelAGP,[[:blank:]]*1/NVreg_UpdateKernelAGP, 0/' \
- ${WRKSRC}/src/nvidia_os_registry.c
+. if defined(WITH_VM86_INT10CALL)
+ @${REINPLACE_CMD} 's/undef NV_USE_OS_VM86_INT10CALL/define NV_USE_OS_VM86_INT10CALL/' \
+ ${WRKSRC}/src/nv-freebsd.h
. endif
-. if ${OSVERSION} > 501106
- @${REINPLACE_CMD} 's/PCIR_HEADERTYPE/PCIR_HDRTYPE/' ${WRKSRC}/src/nvidia_sysctl.c
+. if defined(WITH_ACPI)
+ @${REINPLACE_CMD} 's/undef NV_SUPPORT_ACPI_PM/define NV_SUPPORT_ACPI_PM/' \
+ ${WRKSRC}/src/nv-freebsd.h
. endif
-. if ${OSVERSION} > 502115
-. for f in nv-freebsd.h nvidia_ctl.c nvidia_dev.c nvidia_subr.c
- @${REINPLACE_CMD} 's/dev_t/struct cdev \*/g' ${WRKSRC}/src/${f}
-. endfor
+. if defined(WITHOUT_LINUX)
+ @${REINPLACE_CMD} 's/define NV_SUPPORT_LINUX_COMPAT/undef NV_SUPPORT_LINUX_COMPAT/' \
+ ${WRKSRC}/src/nv-freebsd.h
. endif
.endif
-pre-install:
-.if defined(WITHOUT_LINUX)
- @${MKDIR} ${LINUXBASE}/usr/lib
-.endif
- -@(kldstat -n linux || kldload linux)
-
post-install:
.if ${OSVERSION} < 500000
.for dev in 0 1 2 3
- @rm -f /dev/nvidia${dev}
+ @${RM} -f /dev/nvidia${dev}
@mknod /dev/nvidia${dev} c 180 ${dev}
@${CHMOD} 0666 /dev/nvidia${dev}
.endfor
- @rm -f /dev/nvidiactl
+ @${RM} -f /dev/nvidiactl
@mknod /dev/nvidiactl c 180 255
@${CHMOD} 0666 /dev/nvidiactl
.endif
diff --git a/x11/nvidia-driver/distinfo b/x11/nvidia-driver/distinfo
index 2729f73c1042..32087daaee45 100644
--- a/x11/nvidia-driver/distinfo
+++ b/x11/nvidia-driver/distinfo
@@ -1,2 +1,2 @@
-MD5 (NVIDIA-FreeBSD-x86-1.0-4365.tar.gz) = e14d9f2668746ee4d8b47e1c9dbc78af
-SIZE (NVIDIA-FreeBSD-x86-1.0-4365.tar.gz) = 4522076
+MD5 (NVIDIA-FreeBSD-x86-1.0-6113.tar.gz) = 1dab16b9ebf3ab4253811b6ba29fc701
+SIZE (NVIDIA-FreeBSD-x86-1.0-6113.tar.gz) = 6215565
diff --git a/x11/nvidia-driver/files/patch-module::Makefile b/x11/nvidia-driver/files/patch-module::Makefile
deleted file mode 100644
index f0c53fb8a471..000000000000
--- a/x11/nvidia-driver/files/patch-module::Makefile
+++ /dev/null
@@ -1,13 +0,0 @@
---- module/Makefile.orig Wed May 28 23:51:52 2003
-+++ module/Makefile Sun Jan 25 11:47:48 2004
-@@ -14,6 +14,10 @@
- BUILD_DONE= ${.CURDIR}/.build_done
- CLEANFILES+= ${BUILD_DONE}
-
-+.if ${OSVERSION} > 500011
-+KMODDIR?= /boot/modules
-+.endif
-+
- #
- # To enable debugging see nvidia_debug.h
- # uncomment the following line and change the 'debug'
diff --git a/x11/nvidia-driver/files/patch-src::nvidia_ctl.c b/x11/nvidia-driver/files/patch-src::nvidia_ctl.c
deleted file mode 100644
index cf40047c6a03..000000000000
--- a/x11/nvidia-driver/files/patch-src::nvidia_ctl.c
+++ /dev/null
@@ -1,15 +0,0 @@
---- src/nvidia_ctl.c.old Sun Feb 22 13:05:46 2004
-+++ src/nvidia_ctl.c Sun Feb 22 13:07:25 2004
-@@ -43,7 +43,12 @@
- .d_ioctl = nvidia_ctl_ioctl,
- .d_poll = nvidia_ctl_poll,
- .d_name = "nvidiactl",
-+#if __FreeBSD_version < 502103
- .d_maj = CDEV_MAJOR,
- .d_flags = D_TRACKCLOSE
-+#else
-+ .d_version = D_VERSION,
-+ .d_flags = D_NEEDGIANT|D_TRACKCLOSE
-+#endif
- #endif
- };
diff --git a/x11/nvidia-driver/files/patch-src::nvidia_dev.c b/x11/nvidia-driver/files/patch-src::nvidia_dev.c
deleted file mode 100644
index 0c02c4f8af43..000000000000
--- a/x11/nvidia-driver/files/patch-src::nvidia_dev.c
+++ /dev/null
@@ -1,15 +0,0 @@
---- src/nvidia_dev.c.old Wed May 28 12:51:52 2003
-+++ src/nvidia_dev.c Sun Feb 22 13:36:25 2004
-@@ -45,7 +45,12 @@
- .d_poll = nvidia_dev_poll,
- .d_mmap = nvidia_dev_mmap,
- .d_name = "nvidia",
-+#if __FreeBSD_version < 502103
- .d_maj = CDEV_MAJOR,
- .d_flags = D_MEM|D_TRACKCLOSE
-+#else
-+ .d_version = D_VERSION,
-+ .d_flags = D_MEM|D_TRACKCLOSE|D_NEEDGIANT
-+#endif
- #endif
- };
diff --git a/x11/nvidia-driver/files/patch-src::nvidia_pci.c b/x11/nvidia-driver/files/patch-src::nvidia_pci.c
index b2e92abdf256..082db9f51d82 100644
--- a/x11/nvidia-driver/files/patch-src::nvidia_pci.c
+++ b/x11/nvidia-driver/files/patch-src::nvidia_pci.c
@@ -1,21 +1,12 @@
---- src/nvidia_pci.c.orig Thu May 29 02:51:52 2003
-+++ src/nvidia_pci.c Fri Oct 3 01:19:55 2003
-@@ -33,6 +33,18 @@
- if (vendor != NVIDIA_VENDORID || device < 0x0020)
- return ENXIO;
+--- src/nvidia_pci.c.orig Mon Aug 16 17:40:56 2004
++++ src/nvidia_pci.c Mon Aug 16 17:41:20 2004
+@@ -218,6 +218,9 @@
+ };
-+ /* Exclude nForce MCP devices from detection */
-+ if (device >= 0x01A4 && device <= 0x01ef)
-+ return ENXIO;
-+
-+ /* Exclude nForce2 MCP2 devices from detection */
-+ if (device >= 0x0060 && device <= 0x006e)
-+ return ENXIO;
-+
-+ /* Exclude nForce3 MCP3 devices from detection */
-+ if (device >= 0x00d4 && device <= 0x00da)
-+ return ENXIO;
-+
- if (rm_get_device_name(device, NV_DEVICE_NAME_LENGTH, name)
- != RM_OK) {
- strcpy(name, "Unknown");
+ DRIVER_MODULE(nvidia, pci, nvidia_pci_driver, nvidia_devclass, nvidia_modevent, 0);
++#if __FreeBSD_version > 502126
++MODULE_DEPEND(nvidia, mem, 1, 1, 1);
++#endif
+
+ #ifdef NV_SUPPORT_OS_AGP
+ MODULE_DEPEND(nvidia, agp, 1, 1, 1);
diff --git a/x11/nvidia-driver/pkg-message b/x11/nvidia-driver/pkg-message
index dafe93281811..0f3dfbdb6468 100644
--- a/x11/nvidia-driver/pkg-message
+++ b/x11/nvidia-driver/pkg-message
@@ -1,16 +1,26 @@
+
To use these drivers, make sure that you have loaded the nvidia kernel
module, by doing
# kldload nvidia
-If you compile this package with WITH_FREEBSD_AGP=yes, you must load
-the agp.ko kernel module *at boot time* by putting the following
-line into your /boot/loader.conf:
+or adding
+
+ nvidia_load="YES"
+
+to your /boot/loader.conf (normally done automatically when installing
+the port).
- agp_load="YES"
+If you build this port with WITH_FREEBSD_AGP=yes, make sure you have
+agp.ko kernel module compiled and installed, since nvidia.ko will
+depend on it, or have your kernel compiled with "device agp". Other-
+wise the nvidia kernel module will not load. Also, care to specify
+correct ``Option "NvAGP"'' in ``Device'' section of your X11 configu-
+ration file.
-or have your kernel compiled with "device agp".
+When building with Linux compatibility (WITH_LINUX=yes), make sure
+linux.ko is available as well (or have it compiled in kernel).
-Otherwise the nvidia kernel module will not load.
+Note that this driver does not support PAE-enabled kernels.
-See ${PREFIX}/share/doc/NVIDIA/README for more information.
+See ${PREFIX}/share/doc/NVIDIA_GLX-1.0/README for more information.
diff --git a/x11/nvidia-driver/pkg-plist b/x11/nvidia-driver/pkg-plist
index 693bf7b1f96c..07b6c6b0b3ad 100644
--- a/x11/nvidia-driver/pkg-plist
+++ b/x11/nvidia-driver/pkg-plist
@@ -18,18 +18,33 @@ lib/libGLcore.so.1
lib/libXvMCNVIDIA.so.1
@exec ln -sf %D/lib/libXvMCNVIDIA.so.1 %D/lib/libXvMCNVIDIA.so
@unexec rm -f %D/lib/libXvMCNVIDIA.so
+lib/libnvidia-tls.so.1
+@exec ln -sf %D/lib/libnvidia-tls.so.1 %D/lib/libnvidia-tls.so
+@unexec rm -f %D/lib/libnvidia-tls.so
lib/libXvMCNVIDIA.a
lib/modules/drivers/nvidia_drv.o
lib/modules/extensions/libglx.so.1
@exec ln -sf %D/lib/modules/extensions/libglx.so.1 %D/lib/modules/extensions/libglx.so
@unexec rm -f %D/lib/modules/extensions/libglx.so
-share/doc/NVIDIA/README
-share/doc/NVIDIA/README.Linux
-share/doc/NVIDIA/XF86Config.sample
-share/doc/NVIDIA/license.txt
+%%PORTDOCS%%share/doc/NVIDIA_GLX-1.0/README
+%%PORTDOCS%%share/doc/NVIDIA_GLX-1.0/README.Linux
+%%PORTDOCS%%share/doc/NVIDIA_GLX-1.0/XF86Config.sample
+%%PORTDOCS%%share/doc/NVIDIA_GLX-1.0/license.txt
+%%PORTDOCS%%share/doc/NVIDIA_GLX-1.0/gl.h
+%%PORTDOCS%%share/doc/NVIDIA_GLX-1.0/glx.h
+%%PORTDOCS%%share/doc/NVIDIA_GLX-1.0/glext.h
+%%PORTDOCS%%share/doc/NVIDIA_GLX-1.0/glxtokens.h
+%%PORTDOCS%%share/doc/NVIDIA_GLX-1.0/agp.ko-hints.diff
+%%PORTDOCS%%share/doc/NVIDIA_GLX-1.0/machdep.c.diff
+%%PORTDOCS%%share/doc/NVIDIA_GLX-1.0/vm_map.c_4.10.diff
+%%PORTDOCS%%share/doc/NVIDIA_GLX-1.0/device_pager.c_4.10.diff
+%%PORTDOCS%%share/doc/NVIDIA_GLX-1.0/vm_object.c_5.2.diff
+%%PORTDOCS%%share/doc/NVIDIA_GLX-1.0/device_pager.c_5.2.diff
+%%PORTDOCS%%@dirrm share/doc/NVIDIA_GLX-1.0
%%FREEBSD4%%@cwd /modules
%%FREEBSD5%%@cwd /boot/modules
nvidia.ko
+%%FREEBSD5%%@unexec kldxref %D
%%FREEBSD4%%@cwd /dev
%%FREEBSD4%%MAKEDEV.nvidia
%%FREEBSD4%%@exec mknod /dev/nvidia0 c 180 0
@@ -47,8 +62,13 @@ nvidia.ko
%%FREEBSD4%%@unexec rm -f /dev/nvidia2
%%FREEBSD4%%@unexec rm -f /dev/nvidia3
%%FREEBSD4%%@unexec rm -f /dev/nvidiactl
-@cwd %%LINUXBASE%%
-usr/lib/libGL.so.1.0.%%NVVERSION%%
-usr/lib/libGLcore.so.1.0.%%NVVERSION%%
-@exec ln -sf %D/usr/lib/libGL.so.1.0.%%NVVERSION%% %D/usr/lib/libGL.so.1
-@exec ln -sf %D/usr/lib/libGLcore.so.1.0.%%NVVERSION%% %D/usr/lib/libGLcore.so.1
+%%LINUX%%@cwd %%LINUXBASE%%
+%%LINUX%%usr/lib/libGL.so.1.0.%%NVVERSION%%
+%%LINUX%%usr/lib/libGLcore.so.1.0.%%NVVERSION%%
+%%LINUX%%usr/lib/libnvidia-tls.so.1.0.%%NVVERSION%%
+%%LINUX%%@exec ln -sf %D/usr/lib/libGL.so.1.0.%%NVVERSION%% %D/usr/lib/libGL.so.1
+%%LINUX%%@exec ln -sf %D/usr/lib/libGLcore.so.1.0.%%NVVERSION%% %D/usr/lib/libGLcore.so.1
+%%LINUX%%@exec ln -sf %D/usr/lib/libnvidia-tls.so.1.0.%%NVVERSION%% %D/usr/lib/liblibnvidia-tls.so.1
+%%LINUX%%@unexec rm -f %D/usr/lib/libGL.so.1
+%%LINUX%%@unexec rm -f %D/usr/lib/libGLcore.so.1
+%%LINUX%%@unexec rm -f %D/usr/lib/liblibnvidia-tls.so.1