Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Dec 2002 15:13:10 +0100 (CET)
From:      Stijn Hoop <stijn@win.tue.nl>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/45988: [NEW PORT]: x11/nvidia-driver
Message-ID:  <200212041413.gB4EDA8Z009674@pcwin002.win.tue.nl>

next in thread | raw e-mail | index | archive | help

>Number:         45988
>Category:       ports
>Synopsis:       [NEW PORT]: x11/nvidia-driver
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Dec 04 06:20:12 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Stijn Hoop
>Release:        FreeBSD 4.7-STABLE i386
>Organization:
>Environment:
System: FreeBSD pcwin002.win.tue.nl 4.7-STABLE FreeBSD 4.7-STABLE #1: Wed Dec 4 10:09:24 CET 2002 stijn@pcwin002.win.tue.nl:/usr/obj/usr/src/sys/PCWIN002 i386

>Description:

A port to install the binary NVIDIA drivers (I like to keep track of what's
installed on my machine by using the port database).

Note that I set MAINTAINER to ports@ because I don't know if I can spend
enough time to maintain this. Someone else is of course free to take and
(hopefully) improve this.

>How-To-Repeat:

N/A

>Fix:

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	nvidia-driver
#	nvidia-driver/Makefile
#	nvidia-driver/distinfo
#	nvidia-driver/pkg-plist
#	nvidia-driver/pkg-comment
#	nvidia-driver/pkg-message
#	nvidia-driver/pkg-descr
#
echo c - nvidia-driver
mkdir -p nvidia-driver > /dev/null 2>&1
echo x - nvidia-driver/Makefile
sed 's/^X//' >nvidia-driver/Makefile << 'END-of-nvidia-driver/Makefile'
X# New ports collection makefile for: nvidia-driver
X# Date created:        4 December 2002
X# Whom:                Stijn Hoop <stijn@win.tue.nl>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	nvidia-driver
XPORTVERSION=	1.0.3203
XCATEGORIES=	x11
XMASTER_SITES=	http://download.nvidia.com/freebsd/1.0-3203/
XDISTNAME=	NVIDIA_FreeBSD-${PORTVERSION:S/0./0-/}
X
XMAINTAINER=	ports@freebsd.org
X
XUSE_X_PREFIX=	yes
XNO_PACKAGE=	should be recompiled for a particular FreeBSD kernel
X
XXSERVVERSION!=	pkg_info -O x11-servers/XFree86-4-Server | grep Server-
XXLIBVERSION!=	pkg_info -O x11/XFree86-4-libraries | grep libraries-
X
XPLIST_SUB=	XSERVVERSION=${XSERVVERSION} XLIBVERSION=${XLIBVERSION} \
X		LINUXBASE=${LINUXBASE}
X
X.if !defined(WITHOUT_LINUX)
XUSE_LINUX=	yes
X.endif
X
X.if defined(WITH_FREEBSD_AGP) || defined(FORCE_AGP_RATE)
XUSE_REINPLACE=	yes
X
Xpost-patch:
X.if defined(WITH_FREEBSD_AGP)
X	@${REINPLACE_CMD} "s/undef USE_OS_AGP_GART/define USE_OS_AGP_GART/" \
X		${WRKSRC}/src/nv-freebsd.h
X.endif
X.if defined(FORCE_AGP_RATE)
X	@${REINPLACE_CMD} "s/4, 0/4, 1/" ${WRKSRC}/src/nvidia_os_registry.c
X.endif
X.endif
X
X.if defined(WITHOUT_LINUX)
Xpre-install:
X	@${MKDIR} ${LINUXBASE}/usr/lib
X.endif
X
Xpost-install:
X.for dev in 0 1 2 3
X	@mknod /dev/nvidia${dev} c 180 ${dev}
X	@${CHMOD} 0666 /dev/nvidia${dev}
X.endfor
X	@mknod /dev/nvidiactl c 180 255
X	@${CHMOD} 0666 /dev/nvidiactl
X	@${CAT} ${PKGMESSAGE}
X
X.include <bsd.port.mk>
END-of-nvidia-driver/Makefile
echo x - nvidia-driver/distinfo
sed 's/^X//' >nvidia-driver/distinfo << 'END-of-nvidia-driver/distinfo'
XMD5 (NVIDIA_FreeBSD-1.0-3203.tar.gz) = b982db9e898a0f3a46c2bf9d15c320d2
END-of-nvidia-driver/distinfo
echo x - nvidia-driver/pkg-plist
sed 's/^X//' >nvidia-driver/pkg-plist << 'END-of-nvidia-driver/pkg-plist'
X@comment I can't add the below files to the package because pkg_delete
X@comment will complain when removing this package:
X@comment     lib/modules/extensions/XXX-libglx.a.%%XLIBVERSION%%
X@comment     lib/modules/extensions/XXX-libGLcore.a.%%XLIBVERSION%%
X@comment     lib/XXX-libGL.a.%%XLIBVERSION%%
X@comment     lib/XXX-libGL.so.1.%%XLIBVERSION%%
X@comment They are however restored when this package is removed:
X@unexec mv -f %D/lib/modules/extensions/XXX-libglx.a.%%%%.%%XSERVVERSION%% %D/lib/modules/extensions/libglx.a
X@unexec mv -f %D/lib/modules/extensions/XXX-libGLcore.a.%%%%.%%XSERVVERSION%% %D/lib/modules/extensions/libGLcore.a
X@unexec mv -f %D/lib/XXX-libGL.a.%%%%.%%XLIBVERSION%% %D/lib/libGL.a
Xlib/libGL.so.1
X@unexec mv -f %D/lib/XXX-libGL.so.1.%%%%.%%XLIBVERSION%% %D/lib/libGL.so.1
X@exec ln -sf %D/lib/libGL.so.1 %D/lib/libGL.so
X@comment no rm -f %D/lib/libGL.so because default XFree needs this also
Xlib/libGLcore.so.1
X@exec ln -sf %D/lib/libGLcore.so.1 %D/lib/libGLcore.so
X@unexec rm -f %D/lib/libGLcore.so
Xlib/libXvMCNVIDIA.so.1
X@exec ln -sf %D/lib/libXvMCNVIDIA.so.1 %D/lib/libXvMCNVIDIA.so
X@unexec rm -f %D/lib/libXvMCNVIDIA.so
Xlib/libXvMCNVIDIA.a
Xlib/modules/drivers/nvidia_drv.o
Xlib/modules/extensions/libglx.so.1
X@exec ln -sf %D/lib/modules/extensions/libglx.so.1 %D/lib/modules/extensions/libglx.so
X@unexec rm -f %D/lib/modules/extensions/libglx.so
Xshare/doc/NVIDIA/README
Xshare/doc/NVIDIA/README.Linux
Xshare/doc/NVIDIA/XF86Config.sample
Xshare/doc/NVIDIA/license.txt
X@cwd /modules
Xnvidia.ko
X@cwd /dev
XMAKEDEV.nvidia
X@exec mknod /dev/nvidia0 c 180 0
X@exec chmod 0666 /dev/nvidia0
X@exec mknod /dev/nvidia1 c 180 1
X@exec chmod 0666 /dev/nvidia1
X@exec mknod /dev/nvidia2 c 180 2
X@exec chmod 0666 /dev/nvidia2
X@exec mknod /dev/nvidia3 c 180 3
X@exec chmod 0666 /dev/nvidia3
X@exec mknod /dev/nvidiactl c 180 255
X@exec chmod 0666 /dev/nvidiactl
X@unexec rm -f /dev/nvidia0
X@unexec rm -f /dev/nvidia1
X@unexec rm -f /dev/nvidia2
X@unexec rm -f /dev/nvidia3
X@unexec rm -f /dev/nvidiactl
X@cwd %%LINUXBASE%%
Xusr/lib/libGL.so.1.0.3203
Xusr/lib/libGLcore.so.1.0.3203
X@exec ln -sf %D/usr/lib/libGL.so.1.0.3203 %D/usr/lib/libGL.so.1
X@exec ln -sf %D/usr/lib/libGLcore.so.1.0.3203 %D/usr/lib/libGLcore.so.1
END-of-nvidia-driver/pkg-plist
echo x - nvidia-driver/pkg-comment
sed 's/^X//' >nvidia-driver/pkg-comment << 'END-of-nvidia-driver/pkg-comment'
XNVidia graphics card binary drivers for hardware OpenGL rendering
END-of-nvidia-driver/pkg-comment
echo x - nvidia-driver/pkg-message
sed 's/^X//' >nvidia-driver/pkg-message << 'END-of-nvidia-driver/pkg-message'
X
X***WARNING***:	THESE ARE BETA QUALITY DRIVERS AND MAY RENDER YOUR SYSTEM
X		UNSTABLE, UNUSABLE OR PRONE TO LOCKUP! INSTALL AT YOUR
X		OWN RISK!
X
XTo use these drivers, make sure that you have loaded the nvidia kernel
Xmodule, by doing
X
X# kldload nvidia
X
XIf you compile this package with USE_FREEBSD_AGP=yes, you must load
Xthe agp.ko kernel module *at boot time* by putting the following
Xline into your /boot/loader.conf:
X
Xagp_load="YES"
X
XOtherwise the nvidia kernel module will not load.
X
XSee ${PREFIX}/share/doc/NVIDIA/README for more information.
X
END-of-nvidia-driver/pkg-message
echo x - nvidia-driver/pkg-descr
sed 's/^X//' >nvidia-driver/pkg-descr << 'END-of-nvidia-driver/pkg-descr'
XThese are the NVidia binary drivers for hardware OpenGL rendering in X, using
Xthe GLX/DRI extensions.
X
X***WARNING***:	THESE ARE BETA QUALITY DRIVERS AND MAY RENDER YOUR SYSTEM
X		UNSTABLE, UNUSABLE OR PRONE TO LOCKUP! INSTALL AT YOUR
X		OWN RISK!
END-of-nvidia-driver/pkg-descr
exit

>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200212041413.gB4EDA8Z009674>