Date: Wed, 14 Jul 1999 04:37:50 +0200 (CEST) From: Marc van Woerkom <van.woerkom@netcologne.de> To: FreeBSD-gnats-submit@FreeBSD.ORG Subject: ports/12661: new port: riva-glx (3d hardware acceleration for RIVA cards) Message-ID: <199907140237.EAA69082@oranje.my.domain>
next in thread | raw e-mail | index | archive | help
>Number: 12661 >Category: ports >Synopsis: new port: riva-glx (3d hardware acceleration for RIVA cards) >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: Fri Jul 16 01:10:00 PDT 1999 >Closed-Date: >Last-Modified: >Originator: Marc van Woerkom >Release: FreeBSD 4.0-CURRENT i386 >Organization: >Environment: System with RIVA 128/128ZX or RIVA TNT/TNT2/.. based graphics card >Description: Easy procedure for long build and install process >How-To-Repeat: >Fix: Based on Jordan Hubbard's article in the July issue of FreeBSD Zine I created a port that will create versions of XFree86 and Mesa Graphics Library that support 3d hardware acceleration for RIVA based cards. The reason is that the process is rather lengthy - check the logs on http://www.netcologne.de/~nc-vanwoma/riva-glx for more information - and that the XFree86 version 4 release might take some time. To use this port, one needs to apply this patch to ports/Mesa3/Makefile Index: Makefile =================================================================== RCS file: /home/ncvs/ports/graphics/Mesa3/Makefile,v retrieving revision 1.32 diff -c -r1.32 Makefile *** Makefile 1999/04/22 00:16:58 1.32 --- Makefile 1998/07/11 19:18:32 *************** *** 15,23 **** MAINTAINER= jseger@FreeBSD.ORG WRKSRC= ${WRKDIR}/Mesa-3.0 - USE_X_PREFIX= yes LIBS= libMesaGL libMesaGLU .include <bsd.port.pre.mk> --- 15,29 ---- MAINTAINER= jseger@FreeBSD.ORG + #BUILD_DEPENDS= x11:${PORTSDIR}/x11/XFree86 + WRKSRC= ${WRKDIR}/Mesa-3.0 + + # Sorry but I need Mesa to just extract and not build XFree86 + # in case of an extract target + #USE_X_PREFIX= yes + PREFIX= ${X11BASE} LIBS= libMesaGL libMesaGLU .include <bsd.port.pre.mk> Finaly here is the shar archive with the port: # 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: # # riva-glx # riva-glx/files # riva-glx/files/md5 # riva-glx/pkg # riva-glx/pkg/COMMENT # riva-glx/pkg/DESCR # riva-glx/pkg/PLIST # riva-glx/pkg/MESSAGE # riva-glx/Makefile # echo c - riva-glx mkdir -p riva-glx > /dev/null 2>&1 echo c - riva-glx/files mkdir -p riva-glx/files > /dev/null 2>&1 echo x - riva-glx/files/md5 sed 's/^X//' >riva-glx/files/md5 << 'END-of-riva-glx/files/md5' XMD5 (riva-glx/riva_glx-0.99.tar.gz) = dbf58e9cd3c3c6a7628bcff0017d140e XMD5 (riva-glx/riva-x-glx.faq) = 303eaf59e45a9453ce48ab1935bb1992 XMD5 (riva-glx/Mesa-3_0.diff) = cf5d38c3f4374d6ed6d035b37848ea5a XMD5 (riva-glx/XFree86-3_3_3_1.diff) = 5de43cb1a71af4c5cf3be0aaf757e479 END-of-riva-glx/files/md5 echo c - riva-glx/pkg mkdir -p riva-glx/pkg > /dev/null 2>&1 echo x - riva-glx/pkg/COMMENT sed 's/^X//' >riva-glx/pkg/COMMENT << 'END-of-riva-glx/pkg/COMMENT' XOpenGL hardware acceleration for RIVA chip based cards END-of-riva-glx/pkg/COMMENT echo x - riva-glx/pkg/DESCR sed 's/^X//' >riva-glx/pkg/DESCR << 'END-of-riva-glx/pkg/DESCR' XOpenGL hardware acceleration for RIVA chip based cards. X XTo bridge the time until the XFree86-4 release, this port will build a XXFree86 3.3.3.1 SVGA driver plus a Mesa 3.0 Graphics Library that make Xuse of the 3d hardware acceleration features of nvidia's RIVA 128/128ZX Xand RIVA TNT/TNT2/VANTAGE based graphics cards. X XWARNING: X XPlease note that this build will take a considerable amount of Xtime as we are rebuilding XFree86 and Mesa! X(AMD K6/300MHz/196MB/SCSI: XFree86 3 hours, Mesa 1/2 hour, glx 10 min) X XYou have to deinstall XFree86-3.3.3.1 and Mesa-3.0 before using this port! X XSee Jordan K Hubbard's article in the July 99 issue of Xhttp://www.freebsdzine.org for more information. X X XWWW: http://www.nvidia.com/Products.nsf/htmlmedia/software_drivers.html X XMarc E E van Woerkom <van.woerkom@netcologne.de> END-of-riva-glx/pkg/DESCR echo x - riva-glx/pkg/PLIST sed 's/^X//' >riva-glx/pkg/PLIST << 'END-of-riva-glx/pkg/PLIST' Xinclude/GL/GLXproto.h Xinclude/GL/gl.h Xinclude/GL/glx.h Xlib/libGL.so.1 Xlib/libGL.a Xlib/modules/glx.so Xlib/libMesaGL.a Xlib/libMesaGL.so.14 Xlib/libMesaGLU.a Xlib/libMesaGLU.so.14 Xlib/libglut.a Xlib/libglut.so.3 Xshare/doc/riva-glx/README Xshare/doc/riva-glx/tested.html Xshare/doc/riva-glx/riva-x-glx.faq Xinclude/GL/dosmesa.h Xinclude/GL/foomesa.h Xinclude/GL/fxmesa.h Xinclude/GL/ggimesa.h Xinclude/GL/gl_mangle.h Xinclude/GL/glu.h Xinclude/GL/glu_mangle.h Xinclude/GL/glut.h Xinclude/GL/glx_mangle.h Xinclude/GL/mglmesa.h Xinclude/GL/osmesa.h Xinclude/GL/osmesa3.h Xinclude/GL/svgamesa.h Xinclude/GL/wmesa.h Xinclude/GL/xmesa.h X@dirrm share/doc/riva-glx END-of-riva-glx/pkg/PLIST echo x - riva-glx/pkg/MESSAGE sed 's/^X//' >riva-glx/pkg/MESSAGE << 'END-of-riva-glx/pkg/MESSAGE' X XImportant Note: X--------------- X XIf you built an SVGA server with 3d hardware acceleration for Xa nvidea card (RIVA128, TNT, TNT2, TNT2 Ultra) Xplease check that X X- you changed the default colour depth to 16 in your /etc/XF86Config X file (keyword: DefaultColorDepth) plus X X- you added to /etc/XF86Config (outside of any other section) the X following 3 lines: X X Section "Module" X Load "glx.so" X EndSection X X- you enabled System V shared memory support in your kernel X X XThings to do: X XTry out ports/x11/xlockmore (xlock -mode cage) as an sample OpenGL application, Xread the article or have a look at the docs in X11/share/doc/riva-glx, esp Xthe FAQ. X END-of-riva-glx/pkg/MESSAGE echo x - riva-glx/Makefile sed 's/^X//' >riva-glx/Makefile << 'END-of-riva-glx/Makefile' X# New ports collection makefile for: riva-glx X# Version required: 0.99 X# Date created: 14 July 1999 X# Whom: Marc E E van Woerkom <van.woerkom@netcologne.de> X# X# $Id:$ X# X XDISTNAME= riva-glx-0.99 XCATEGORIES= graphics X# X# Note: X# X# as of today (19990711) the driver files and patches for RIVA 128 (NV3) X# and RIVA TNT (NV4) series chips differ only in the naming of the X# tarball - the contents are identical! X# Thus we just go for the TNT stuff. X# XMASTER_SITES= ftp://ftp1.detonator.nvidia.com/pub/drivers/english/riva-tnt-tnt2-vanta/linux/ XDISTFILES= riva_glx-0.99.tar.gz \ X riva-x-glx.faq \ X Mesa-3_0.diff \ X XFree86-3_3_3_1.diff X XMAINTAINER= van.woerkom@netcologne.de X X# Note that current Mesa3 does not stop at patch target, X# but will try to build X11! XBUILD_DEPENDS= tclsh:${PORTSDIR}/lang/tcl80 \ X /nonexistent:${PORTSDIR}/x11/XFree86:patch \ X /nonexistent:${PORTSDIR}/graphics/Mesa3:patch X XDIST_SUBDIR= riva-glx X XWRKSRC= ${WRKDIR}/glx-0.99 X XEXTRACT_ONLY= riva_glx-0.99.tar.gz X X# I don't want to build XFree86 too soon, so don't use USE_X_PREFIX X#USE_X_PREFIX= yes XPREFIX= ${X11BASE} X XXFCONFIG= /etc/XF86Config X X.include <bsd.port.pre.mk> X Xpre-patch: X @${ECHO} "=> Patching XFree86-3.3.3.1 for RIVA acceleration .." X cd ${PORTSDIR}/x11/XFree86/work; \ X ${PATCH} -s -f <${DISTDIR}/${DIST_SUBDIR}/XFree86-3_3_3_1.diff X @${ECHO} "=> Patching Mesa-3.0 for RIVA acceleration .." X @${ECHO} "(ignore the rejections - they should happen in comments)" X -cd ${PORTSDIR}/graphics/Mesa3/work/Mesa-3.0; \ X ${PATCH} -s -f <${DISTDIR}/${DIST_SUBDIR}/Mesa-3_0.diff X @${ECHO} "Rejections: " X -cd ${PORTSDIR}/graphics/Mesa3/work/Mesa-3.0/src; \ X ${CAT} *.rej X @${ECHO} "(were these harmless?)" X Xpost-patch: X @${ECHO} "=> Adjusting ${WRKSRC}/Config .." X @cd ${WRKSRC}; \ X ${SED} -e 's;XSERVTOP = .*;XSERVTOP = ${PORTSDIR}/x11/XFree86/work/xc;' \ X -e 's;MESATOP = .*;MESATOP = ${PORTSDIR}/graphics/Mesa3/work/Mesa-3.0;' \ X <Config >Config.new; \ X ${MV} Config.new Config X @${ECHO} "=> Adjusting ${WRKSRC}/libGL/Imakefile .." X @cd ${WRKSRC}/libGL; \ X ${SED} -e 's;tclsh;tclsh8\.0;' <Imakefile >Imakefile.new; \ X ${MV} Imakefile.new Imakefile X @${ECHO} "=> Adjusting ${WRKSRC}/servGL/serverglx/Imakefile .." X @cd ${WRKSRC}/servGL/serverglx; \ X ${SED} -e 's;tclsh;tclsh8\.0;' <Imakefile >Imakefile.new; \ X ${MV} Imakefile.new Imakefile X Xpre-build: X @${ECHO} "=> Building and installing RIVA accelerated XFree86 .." X cd ${PORTSDIR}/x11/XFree86; \ X ${MAKE} all install X @${ECHO} "=> Building and installing RIVA accelerated Mesa .." X cd ${PORTSDIR}/graphics/Mesa3; \ X ${MAKE} all install X @${ECHO} "=> Creating makefiles .." X cd ${WRKSRC}; \ X ${XMKMF}; \ X ${MAKE} Makefile; \ X ${MAKE} Makefiles X Xpost-install: X.if !defined(NOPORTDOCS) X @${ECHO} "=> Installing documentation .." X ${MKDIR} ${PREFIX}/share/doc/riva-glx X ${INSTALL_MAN} ${DISTDIR}/${DIST_SUBDIR}/riva-x-glx.faq ${PREFIX}/share/doc/riva-glx X ${INSTALL_MAN} ${WRKSRC}/README ${PREFIX}/share/doc/riva-glx X ${INSTALL_MAN} ${WRKSRC}/tested.html ${PREFIX}/share/doc/riva-glx X X.endif X @${ECHO} "=> Adjusting links .." X -${MV} ${X11BASE}/lib/libMesaGL.a ${X11BASE}/lib/libMesaGL.a.old X -${MV} ${X11BASE}/lib/libMesaGL.so.14 ${X11BASE}/lib/libMesaGL.so.14.old X -${LN} -s ${X11BASE}/lib/libGL.a ${X11BASE}/lib/libMesaGL.a X -${LN} -s ${X11BASE}/lib/libGL.so.1 ${X11BASE}/lib/libMesaGL.so.14 X @${ECHO} "=> Checking for \"DefaultColorDepth\" in ${XFCONFIG} .." X @${ECHO} "" X @if \ X ${GREP} '^ *DefaultColorDepth *16 *$$' ${XFCONFIG}; \ X then \ X ${ECHO} ""; \ X ${ECHO} "Found something."; \ X else \ X ${ECHO} "Nope, nothing found - please use"; \ X ${ECHO} ""; \ X ${ECHO} " DefaultColorDepth 16"; \ X ${ECHO} ""; \ X ${ECHO} "in your ${XFCONFIG} file!"; \ X fi X @${ECHO} "=> Checking for Section \"Module\" in ${XFCONFIG} .." X @${ECHO} "" X @if \ X ${GREP} -A2 '^ *Section *"Module" *$$' ${XFCONFIG} | \ X ${GREP} -B1 -A1 '^ *Load *"glx\.so" *$$' | \ X ${GREP} -B2 '^ *EndSection *$$' | \ X ${GREP} -A2 '^ *Section *"Module" *$$'; \ X then \ X ${ECHO} ""; \ X ${ECHO} "Looks OK to me."; \ X else \ X ${ECHO} "Nope, not found - please add"; \ X ${ECHO} ""; \ X ${ECHO} " Section \"Module\""; \ X ${ECHO} " Load \"glx.so\""; \ X ${ECHO} " EndSection"; \ X ${ECHO} ""; \ X ${ECHO} "to the end of your ${XFCONFIG} file!"; \ X fi X @${ECHO} "=> Giving last advice .." X @${CAT} ${PKGDIR}/MESSAGE X X.include <bsd.port.post.mk> END-of-riva-glx/Makefile exit Regards, Marc >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?199907140237.EAA69082>