Date: Sat, 26 Apr 2003 21:00:19 +0200 (CEST) From: Thierry Thomas <thierry@pompo.net> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/51447: x11/nvidia-driver: adding support for 5.0-RELEASE. Message-ID: <20030426190019.1554822BDBA@ws90bj.pompo.net> Resent-Message-ID: <200304261900.h3QJ0TWm071679@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 51447 >Category: ports >Synopsis: x11/nvidia-driver: adding support for 5.0-RELEASE. >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Sat Apr 26 12:00:28 PDT 2003 >Closed-Date: >Last-Modified: >Originator: Thierry Thomas >Release: FreeBSD 5.0-RELEASE-p7 i386 >Organization: Kabbale Eros >Environment: System: FreeBSD ws90bj.pompo.net 5.0-RELEASE-p7 FreeBSD 5.0-RELEASE-p7 #0: Mon Apr 7 18:47:47 CEST 2003 thierry@ws90bj.pompo.net:/usr/obj/usr/src/sys/WS90BJ-030112 i386 >Description: d_mmap_t is defined in <sys/conf.h>. 5.0-RELEASE and -STABLE have the same parameters. Without the following patch, compile aborts. Portrevision 1 of this port is marked IGNORE if ${OSVERSION} > 500000 && ${OSVERSION} < 500105. This patch removes this IGNORE and fixes d_mmap_t. Notice: don't expect any support from me! I could just tell you that it runs on my laptop... >How-To-Repeat: Remove IGORE from Makefile, and `make': /usr/ports/x11/nvidia-driver/work/NVIDIA_FreeBSD-1.0-3203/src/nvidia_dev.c:152: conflicting types for `nvidia_dev_mmap' /usr/ports/x11/nvidia-driver/work/NVIDIA_FreeBSD-1.0-3203/src/nvidia_dev.c:20: previous declaration of `nvidia_dev_mmap' *** Error code 1 >Fix: Please apply this following patch. --- nvidia-driver.diff begins here --- diff -urN x11/nvidia-driver.orig/Makefile x11/nvidia-driver/Makefile --- x11/nvidia-driver.orig/Makefile Wed Mar 26 22:47:44 2003 +++ x11/nvidia-driver/Makefile Sat Apr 26 20:35:49 2003 @@ -7,7 +7,7 @@ PORTNAME= nvidia-driver PORTVERSION= 1.0.3203 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= x11 MASTER_SITES= http://download.nvidia.com/freebsd/1.0-3203/ DISTNAME= NVIDIA_FreeBSD-${PORTVERSION:S/0./0-/} @@ -30,10 +30,6 @@ .endif .include <bsd.port.pre.mk> - -.if ${OSVERSION} > 500000 && ${OSVERSION} < 500105 -IGNORE= "You need a more recent version of -CURRENT for this driver" -.endif .if defined(WITH_FREEBSD_AGP) || defined(FORCE_AGP_RATE) USE_REINPLACE= yes diff -urN x11/nvidia-driver.orig/files/patch-nvidia_ctl.c x11/nvidia-driver/files/patch-nvidia_ctl.c --- x11/nvidia-driver.orig/files/patch-nvidia_ctl.c Thu Mar 6 02:12:23 2003 +++ x11/nvidia-driver/files/patch-nvidia_ctl.c Sat Apr 26 16:39:23 2003 @@ -4,7 +4,7 @@ static d_poll_t nvidia_ctl_poll; static struct cdevsw nvidia_ctl_cdevsw = { -+#if __FreeBSD_version < 500000 ++#if __FreeBSD_version < 500105 /* open */ nvidia_ctl_open, /* close */ nvidia_ctl_close, /* read */ noread, diff -urN x11/nvidia-driver.orig/files/patch-nvidia_dev.c x11/nvidia-driver/files/patch-nvidia_dev.c --- x11/nvidia-driver.orig/files/patch-nvidia_dev.c Thu Mar 6 02:12:23 2003 +++ x11/nvidia-driver/files/patch-nvidia_dev.c Sat Apr 26 16:40:29 2003 @@ -4,7 +4,7 @@ static d_mmap_t nvidia_dev_mmap; static struct cdevsw nvidia_dev_cdevsw = { -+#if __FreeBSD_version < 500000 ++#if __FreeBSD_version < 500105 /* open */ nvidia_dev_open, /* close */ nvidia_dev_close, /* read */ noread, @@ -33,7 +33,7 @@ int nvidia_dev_mmap( dev_t dev, vm_offset_t offset, -+#if __FreeBSD_version >= 500000 ++#if __FreeBSD_version >= 500105 + vm_offset_t *paddr, +#endif int nprot @@ -53,7 +53,7 @@ + status = nvidia_mmap_dev(sc, offset, &phys); nv_unlock_api(nv); -+#if __FreeBSD_version >= 500000 ++#if __FreeBSD_version >= 500105 + *paddr = phys; return status; +#else diff -urN x11/nvidia-driver.orig/files/patch-nvidia_subr.c x11/nvidia-driver/files/patch-nvidia_subr.c --- x11/nvidia-driver.orig/files/patch-nvidia_subr.c Wed Mar 26 22:47:44 2003 +++ x11/nvidia-driver/files/patch-nvidia_subr.c Sat Apr 26 16:40:57 2003 @@ -63,7 +63,7 @@ * will be allocated. */ -+#if __FreeBSD_version < 500000 ++#if __FreeBSD_version < 500105 m = vm_page_grab(object, i, VM_ALLOC_NORMAL); +#else + m = vm_page_grab(object, i, VM_ALLOC_NORMAL | VM_ALLOC_WIRED); @@ -83,7 +83,7 @@ * paging it out while we're still using it. This is necessary to * prevent random crashes. */ -+#if __FreeBSD_version < 500000 ++#if __FreeBSD_version < 500105 vm_page_wire(m); +#endif vm_page_wakeup(m); --- nvidia-driver.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030426190019.1554822BDBA>