diff options
author | anholt <anholt@FreeBSD.org> | 2002-06-07 14:12:02 +0800 |
---|---|---|
committer | anholt <anholt@FreeBSD.org> | 2002-06-07 14:12:02 +0800 |
commit | b61082dbc4a141dc12b61b9d99e4b842087e0e89 (patch) | |
tree | 48a87a3342f52f08eae29bebb278231024b14240 /graphics/glide3 | |
parent | 9db9ea0a546619fa91cc316668fade65a21d4e46 (diff) | |
download | freebsd-ports-gnome-b61082dbc4a141dc12b61b9d99e4b842087e0e89.tar.gz freebsd-ports-gnome-b61082dbc4a141dc12b61b9d99e4b842087e0e89.tar.zst freebsd-ports-gnome-b61082dbc4a141dc12b61b9d99e4b842087e0e89.zip |
Take maintainership of glide3, update to a more recent CVS snapshot,
fix automake troubles, include patches for several bugs.
Reviewed by: des
Approved by: portmgr
Diffstat (limited to 'graphics/glide3')
24 files changed, 762 insertions, 75 deletions
diff --git a/graphics/glide3/Makefile b/graphics/glide3/Makefile index 00d06e749f65..d4123d5210a2 100644 --- a/graphics/glide3/Makefile +++ b/graphics/glide3/Makefile @@ -1,46 +1,47 @@ -# New ports collection makefile for: Glide +# New ports collection makefile for: glide3 # Date created: 31 Mar 2001 # Whom: Nick Sayer <nsayer@freebsd.org> # # $FreeBSD$ # -PORTNAME= Glide3-64Bit -PORTVERSION= 20010331 +PORTNAME= glide3 +PORTVERSION= 20020113 CATEGORIES= graphics -MASTER_SITES= http://www.teleport.com/~anholt/devel/dri/ \ - ${MASTER_SITE_LOCAL} -MASTER_SITE_SUBDIR= nsayer -DISTFILES= ${PORTNAME}-20010331.tgz \ - ${PORTNAME:S/G/g/}-2001-01-06.tar.gz -EXTRACT_ONLY= ${PORTNAME}-20010331.tgz - -PATCH_SITES= http://www.teleport.com/~anholt/devel/dri/ -PATCHFILES= ${PORTNAME:S/G/g/}-2001-01-06.diff - -MAINTAINER= ports@FreeBSD.org - -BROKEN= "Does not build" - -WRKSRC= ${WRKDIR}/Glide3 -USE_X_PREFIX= yes -INSTALLS_SHLIB= yes -USE_LIBTOOL= yes -USE_AUTOMAKE_VER= 15 -MAKEFILE= makefile.autoconf -USE_GMAKE= yes +MASTER_SITES= http://gladstone.uoregon.edu/~eanholt/dri/ +.ifdef WITH_VOODOO3 +PKGNAMESUFFIX= -v3 +.else +PKGNAMESUFFIX= -v5 +.endif +DISTNAME= Glide3-FreeBSD-${PORTVERSION} +EXTRACT_SUFX= .tar.bz2 +#The distfile is CVS Glide3-FreeBSD branch with */glide3/tests/* removed + +MAINTAINER= eanholt@gladstone.uoregon.edu + +USE_BZIP2= yes +WRKSRC= ${WRKDIR}/Glide3 +USE_X_PREFIX= yes +XFREE86_VERSION= 4 +INSTALLS_SHLIB= yes +USE_LIBTOOL= yes +USE_AUTOMAKE_VER= 14 +AUTOMAKE_ARGS= -a +USE_GMAKE= yes +MAKEFILE= makefile.autoconf + +#Glide3 DOES NOT work with CFLAGS greater than -O2 +CFLAGS+= -O .ifdef WITH_VOODOO3 CONFIGURE_ARGS+= --enable-fx-glide-hw=h3 -.elifdef WITH_VOODOO2 -CONFIGURE_ARGS+= --enable-fx-glide-hw=cvg +.else +pre-everything:: + @${ECHO_MSG} "Use make -DWITH_VOODOO3 if you have a Voodoo3 or Banshee card" .endif post-extract: - ( cd ${WRKSRC}; ${TAR} xfpz \ - ${DISTDIR}/${PORTNAME:S/G/g/}-2001-01-06.tar.gz ) - -post-patch: - ( cd ${WRKSRC} ; aclocal ) + cd $(WRKSRC) && ${ACLOCAL} -I ${LOCALBASE}/share/aclocal .include <bsd.port.mk> diff --git a/graphics/glide3/distinfo b/graphics/glide3/distinfo index ff8208f03b28..70e1a2e4129a 100644 --- a/graphics/glide3/distinfo +++ b/graphics/glide3/distinfo @@ -1,3 +1 @@ -MD5 (Glide3-64Bit-20010331.tgz) = 19137a3d6ee854bcbcba1fc1bd9c0594 -MD5 (glide3-64Bit-2001-01-06.tar.gz) = dd5ecfb28962b99948b6d323cdb37d7a -MD5 (glide3-64Bit-2001-01-06.diff) = 3b102d9d7c030fe7beeb5defa19b85a1 +MD5 (Glide3-FreeBSD-20020113.tar.bz2) = 99edbbbc47bc53e4309f1d903f352db8 diff --git a/graphics/glide3/files/patch-config-include b/graphics/glide3/files/patch-config-include deleted file mode 100644 index d00b5045a795..000000000000 --- a/graphics/glide3/files/patch-config-include +++ /dev/null @@ -1,30 +0,0 @@ ---- cvg/glide3/src/glidesys.h.orig Sat Mar 31 19:31:07 2001 -+++ cvg/glide3/src/glidesys.h Sat Mar 31 19:24:43 2001 -@@ -49,6 +49,7 @@ - * - * 5 5/21/97 6:05a Peter - */ -+#include "config.h" - #ifndef __GLIDESYS_H__ - #define __GLIDESYS_H__ - ---- h3/glide3/src/glidesys.h.orig Sat Mar 31 19:31:09 2001 -+++ h3/glide3/src/glidesys.h Sat Mar 31 19:24:51 2001 -@@ -56,6 +56,7 @@ - * - * 5 5/21/97 6:05a Peter - */ -+#include "config.h" - #ifndef __GLIDESYS_H__ - #define __GLIDESYS_H__ - ---- h5/glide3/src/glidesys.h.orig Sat Mar 31 19:31:11 2001 -+++ h5/glide3/src/glidesys.h Sat Mar 31 19:24:58 2001 -@@ -55,6 +55,7 @@ - * - * 5 5/21/97 6:05a Peter - */ -+#include "config.h" - #ifndef __GLIDESYS_H__ - #define __GLIDESYS_H__ - diff --git a/graphics/glide3/files/patch-configure_in b/graphics/glide3/files/patch-configure_in new file mode 100644 index 000000000000..3145e4a05d10 --- /dev/null +++ b/graphics/glide3/files/patch-configure_in @@ -0,0 +1,25 @@ +--- configure.in.orig Thu May 31 12:05:51 2001 ++++ configure.in Fri May 10 19:45:32 2002 +@@ -25,6 +25,10 @@ + AM_INIT_AUTOMAKE(glide, 3.0) + AM_CONFIG_HEADER(swlibs/include/config.h) + AC_PREFIX_DEFAULT([/usr]) ++ ++AC_PATH_X ++AC_SUBST(x_includes) ++ + includedir='${prefix}/include/glide3' + # + # Variables local to the build. +@@ -168,6 +172,11 @@ + ;; + esac],[FX_GLIDE_BUILD_ARCHITECTURE=`uname -m`]) + AC_SUBST(FX_GLIDE_BUILD_ARCHITECTURE) ++ ++# Appease automake1.5 about assembly targets ++ASFLAGS= ++AC_SUBST(ASFLAGS) ++ + # + # Various tests needed at points in the build + # First, we set defaults. diff --git a/graphics/glide3/files/patch-h3-fxglide_h b/graphics/glide3/files/patch-h3-fxglide_h new file mode 100644 index 000000000000..1a55276f044f --- /dev/null +++ b/graphics/glide3/files/patch-h3-fxglide_h @@ -0,0 +1,16 @@ +diff -ru ../Glide3.orig/h3/glide3/src/fxglide.h ./h3/glide3/src/fxglide.h +--- ../Glide3.orig/h3/glide3/src/fxglide.h Thu May 31 12:05:52 2001 ++++ ./h3/glide3/src/fxglide.h Sun Jan 13 15:35:42 2002 +@@ -2133,7 +2133,11 @@ + #if defined(GLIDE_SANITY_ASSERT) + #define GR_ASSERT(exp) ((void)((!(exp)) ? (_grAssert(#exp, __FILE__, __LINE__),0) : 0xFFFFFFFF)) + #else +-#define GR_ASSERT(exp) ((void)(0 && ((FxU32)(exp)))) ++# ifdef __GNUC__ ++# define GR_ASSERT(exp) ((void) 0) ++# else ++# define GR_ASSERT(exp) ((void)(0 && ((FxU32)(exp)))) ++# endif + #endif + + #define INTERNAL_CHECK(__name, __cond, __msg, __fatalP) \ diff --git a/graphics/glide3/files/patch-h3-gglide_c_dri b/graphics/glide3/files/patch-h3-gglide_c_dri new file mode 100644 index 000000000000..6eb669df7a65 --- /dev/null +++ b/graphics/glide3/files/patch-h3-gglide_c_dri @@ -0,0 +1,110 @@ +diff -ru ../Glide3.orig/h3/glide3/src/gglide.c.dri ./h3/glide3/src/gglide.c.dri +--- ../Glide3.orig/h3/glide3/src/gglide.c.dri Fri Nov 24 10:38:46 2000 ++++ ./h3/glide3/src/gglide.c.dri Sun Jan 13 17:32:04 2002 +@@ -448,7 +448,7 @@ + #include "fxcmd.h" + #include "fxinline.h" + +-#ifdef __linux__ ++#ifdef DRI_BUILD + #include <lindri.h> + #endif + +@@ -483,12 +483,12 @@ + + alphamode = gc->state.shadow.alphaMode; + if (alpha_sf != GR_BLEND_ONE && alpha_sf != GR_BLEND_ZERO) { +- GR_CHECK_W(myName, 1, "unsupported alpha source blend function"); ++ /*GR_CHECK_W(myName, 1, "unsupported alpha source blend function");*/ + alpha_sf = GR_BLEND_ONE; + } + + if (alpha_df != GR_BLEND_ONE && alpha_df != GR_BLEND_ZERO) { +- GR_CHECK_W(myName, 1, "unsupported alpha destination blend function"); ++ /*GR_CHECK_W(myName, 1, "unsupported alpha destination blend function");*/ + alpha_df = GR_BLEND_ZERO; + } + +@@ -917,7 +917,7 @@ + + REG_GROUP_BEGIN(BROADCAST_ID, colBufferAddr, 2, 0x3); + REG_GROUP_SET(hw, colBufferAddr,gc->buffers[gc->grColBuf]); +-#ifdef __linux__ ++#ifdef DRI_BUILD + REG_GROUP_SET(hw, colBufferStride, (!gc->curBuffer)? driInfo.stride : + gc->state.shadow.auxBufferStride); + #else +@@ -951,7 +951,7 @@ + REG_GROUP_BEGIN(BROADCAST_ID, colBufferAddr, 2, 0x3); + REG_GROUP_SET(hw, colBufferAddr, gc->buffers[gc->windowed ? 0 : gc->curBuffer]); + +-#ifdef __linux__ ++#ifdef DRI_BUILD + REG_GROUP_SET(hw, colBufferStride, (!gc->curBuffer) ? driInfo.stride : + gc->state.shadow.colBufferStride); + #else +@@ -1923,7 +1923,7 @@ + ** grStippleMode + */ + +-#ifdef __linux__ ++#ifdef DRI_BUILD + GR_STATE_ENTRY(grStippleMode, void, (GrStippleMode_t mode)) + { + #define FN_NAME "_grStippleMode" +@@ -1957,7 +1957,7 @@ + #endif /* !GLIDE3 */ + #undef FN_NAME + } /* grStippleMode */ +-#endif /* __linux__ */ ++#endif /* DRI_BUILD */ + + /*--------------------------------------------------------------------------- + ** grDitherMode +@@ -2325,7 +2325,7 @@ + ** and the only drawbuffer modes supported by the fbzMode register are 0 + ** (back) and 1 (front) + */ +-#ifndef __linux__ ++#ifndef DRI_BUILD + GR_STATE_ENTRY(grRenderBuffer, void, (GrBuffer_t buffer)) + { + #define FN_NAME "_grRenderBuffer" +@@ -2352,7 +2352,7 @@ + GR_END(); + #undef FN_NAME + } /* grRenderBuffer */ +-#else /* __linux__ */ ++#else /* DRI_BUILD */ + GR_STATE_ENTRY(grRenderBuffer, void, (GrBuffer_t buffer)) + { + #define FN_NAME "_grRenderBuffer" +diff -ru ../Glide3.orig/h3/glide3/src/glfb.c.dri ./h3/glide3/src/glfb.c.dri +--- ../Glide3.orig/h3/glide3/src/glfb.c.dri Wed Aug 30 01:47:03 2000 ++++ ./h3/glide3/src/glfb.c.dri Sun Jan 13 17:35:08 2002 +@@ -217,7 +217,7 @@ + #include "fxglide.h" + #include "fxcmd.h" + +-#ifdef __linux__ ++#ifdef DRI_BUILD + #include <lindri.h> + #endif + +@@ -456,7 +456,7 @@ + } + + if (rv) { +-#ifdef __linux__ ++#ifdef DRI_BUILD + if (!colBufferIndex) + info->strideInBytes = driInfo.stride; + else +@@ -487,7 +487,7 @@ + GR_CHECK_SIZE(); + + info->lfbPtr = (void *)gc->lfb_ptr; +-#ifdef __linux__ ++#ifdef DRI_BUILD + info->strideInBytes = 0x1000; + #endif diff --git a/graphics/glide3/files/patch-h3-glide_h b/graphics/glide3/files/patch-h3-glide_h new file mode 100644 index 000000000000..8fc5ee8cbc10 --- /dev/null +++ b/graphics/glide3/files/patch-h3-glide_h @@ -0,0 +1,40 @@ +diff -ru ../Glide3.orig/h3/glide3/src/glide.h ./h3/glide3/src/glide.h +--- ../Glide3.orig/h3/glide3/src/glide.h Thu May 31 12:05:52 2001 ++++ ./h3/glide3/src/glide.h Sun Jan 13 14:46:12 2002 +@@ -52,9 +52,7 @@ + typedef FxU32 GrColor_t; + typedef FxU8 GrAlpha_t; + typedef FxU32 GrMipMapId_t; +-#if defined(DRI_BUILD) + typedef FxU32 GrStipplePattern_t; +-#endif + typedef FxU8 GrFog_t; + typedef AnyPtr GrContext_t; + typedef int (FX_CALL *GrProc)(); +@@ -253,12 +251,10 @@ + #define GR_DITHER_2x2 0x1 + #define GR_DITHER_4x4 0x2 + +-#if defined(DRI_BUILD) + typedef FxI32 GrStippleMode_t; + #define GR_STIPPLE_DISABLE 0x0 + #define GR_STIPPLE_PATTERN 0x1 + #define GR_STIPPLE_ROTATE 0x2 +-#endif /* DRI_BUILD */ + + typedef FxI32 GrFogMode_t; + #define GR_FOG_DISABLE 0x0 +@@ -709,13 +705,11 @@ + FX_ENTRY void FX_CALL + grDitherMode( GrDitherMode_t mode ); + +-#if defined(DRI_BUILD) + FX_ENTRY void FX_CALL + grStippleMode( GrStippleMode_t mode ); + + FX_ENTRY void FX_CALL + grStipplePattern( GrStipplePattern_t mode ); +-#endif /* DRI_BUILD */ + + FX_ENTRY void FX_CALL + grFogColorValue( GrColor_t fogcolor ); diff --git a/graphics/glide3/files/patch-h3-gsst_c_dri b/graphics/glide3/files/patch-h3-gsst_c_dri new file mode 100644 index 000000000000..696a68e942dc --- /dev/null +++ b/graphics/glide3/files/patch-h3-gsst_c_dri @@ -0,0 +1,138 @@ +diff -ru ../Glide3.orig/h3/glide3/src/gsst.c.dri ./h3/glide3/src/gsst.c.dri +--- ../Glide3.orig/h3/glide3/src/gsst.c.dri Wed Aug 30 01:47:03 2000 ++++ ./h3/glide3/src/gsst.c.dri Sun Jan 13 17:33:57 2002 +@@ -534,7 +534,7 @@ + #include <windows.h> + #endif + +-#ifdef __linux__ ++#ifdef DRI_BUILD + #include <lindri.h> + #endif + +@@ -746,7 +746,7 @@ + GDBG_INFO(95, FN_NAME"(0x%X)\n", gc); + + /* Setup the indices of the logical buffers */ +-#ifdef __linux__ ++#ifdef DRI_BUILD + gc->curBuffer = (gc->grColBuf > 1) ? 1 : 0; + gc->frontBuffer = 0; + #else +@@ -939,7 +939,7 @@ + struct cmdTransportInfo *gcFifo = 0; + GrContext_t retVal = 0; + +-#ifndef __linux__ ++#ifndef DRI_BUILD + if (!hWnd) + GrErrorCallback("grSstWinOpen: need to use a valid window handle", + FXTRUE); +@@ -977,7 +977,7 @@ + ? GR_RESOLUTION_640x480 + : resolution; + +-#ifdef __linux__ ++#ifdef DRI_BUILD + gc->state.screen_width = driInfo.screenWidth; + gc->state.screen_height = driInfo.screenHeight; + #else +@@ -1059,7 +1059,7 @@ + gc->hwInitP = FXTRUE; + } + +-#ifdef __linux__ ++#ifdef DRI_BUILD + vInfo->xRes = driInfo.w; + vInfo->yRes = driInfo.h; + #else +@@ -1118,7 +1118,7 @@ + /* This actually gets taken in hwcInitVideo */ + gc->contextP = FXTRUE; + +-#ifndef __linux__ ++#ifndef DRI_BUILD + /* CSR - Set up flag for display driver to tell us that context was lost */ + if ( !gc->open ) /* If we already have a context open, then lets not + re-initialize the pointers */ +@@ -1400,7 +1400,7 @@ + gcFifo->fifoPtr = gcFifo->fifoStart; + gcFifo->fifoRead = HW_FIFO_PTR( FXTRUE ); + +-#ifndef __linux__ ++#ifndef DRI_BUILD + if ( (void*)gcFifo->fifoPtr != (void*)gcFifo->fifoRead ) { + #ifdef GLIDE_INIT_HWC + hwcRestoreVideo( bInfo ); +@@ -1442,7 +1442,7 @@ + gcFifo->fifoSize, + gcFifo->fifoPtr ); + +-#ifdef __linux__ ++#ifdef DRI_BUILD + _grImportFifo((AnyPtr)*driInfo.fifoPtr, (AnyPtr)*driInfo.fifoRead); + #endif + +@@ -1496,7 +1496,7 @@ + REG_GROUP_BEGIN(BROADCAST_ID, colBufferAddr, 4, 0xf); + { + REG_GROUP_SET(hw, colBufferAddr, gc->state.shadow.colBufferAddr); +-#ifdef __linux__ ++#ifdef DRI_BUILD + REG_GROUP_SET(hw, colBufferStride, (!gc->curBuffer) ? driInfo.stride : + gc->state.shadow.colBufferStride); + #else +@@ -1510,7 +1510,7 @@ + + GDBG_INFO( gc->myLevel, " Setting all Glide state\n" ); + assertDefaultState(); +-#ifdef __linux__ ++#ifdef DRI_BUILD + if (nColBuffers>1) + grRenderBuffer(GR_BUFFER_BACKBUFFER); + else +@@ -1578,7 +1578,7 @@ + GrGC* gc = (GrGC*)context; + GDBG_INFO(80, FN_NAME"(0x%X)\n", context); + +-#ifndef __linux__ ++#ifndef DRI_BUILD + if (gc->lostContext) { + if (*gc->lostContext) + return 0; +@@ -1626,7 +1626,7 @@ + * safe everywhere. + */ + GDBG_INFO(gc->myLevel, " Restore Video"); +-#ifndef __linux__ ++#ifndef DRI_BUILD + if (!*gc->lostContext) + #endif + hwcRestoreVideo(gc->bInfo); +@@ -1657,7 +1657,7 @@ + } + _GlideRoot.windowsInit--; + +-#ifndef __linux__ ++#ifndef DRI_BUILD + if ( gc->bInfo->osNT ) + hwcUnmapMemory(); + else +@@ -1731,7 +1731,7 @@ + GR_ASSERT((gc >= _GlideRoot.GCs) && + (gc <= _GlideRoot.GCs + MAX_NUM_SST)); + +-#if defined( GLIDE_INIT_HWC ) && !defined(__linux__) ++#if defined( GLIDE_INIT_HWC ) && !defined(DRI_BUILD) + gc->contextP = hwcQueryContext(gc->bInfo); + #else + gc->contextP = 1; +@@ -1882,7 +1882,7 @@ + + grFlush(); + if ( gc->windowed ) { +-#if defined( GLIDE_INIT_HWC ) && !defined( __linux__ ) ++#if defined( GLIDE_INIT_HWC ) && !defined( DRI_BUILD ) + struct cmdTransportInfo* + gcFifo = &gc->cmdTransportInfo; + diff --git a/graphics/glide3/files/patch-h3-minihwc-makefile b/graphics/glide3/files/patch-h3-minihwc-makefile new file mode 100644 index 000000000000..4d04b2e64d4c --- /dev/null +++ b/graphics/glide3/files/patch-h3-minihwc-makefile @@ -0,0 +1,12 @@ +diff -ru ../Glide3.orig/h3/minihwc/makefile.autoconf.am ./h3/minihwc/makefile.autoconf.am +--- ../Glide3.orig/h3/minihwc/makefile.autoconf.am Wed Jul 26 19:39:18 2000 ++++ ./h3/minihwc/makefile.autoconf.am Sun Jan 13 16:19:03 2002 +@@ -23,6 +23,8 @@ + # + # First, the variable defs. + # ++LCFLAGS = -I@x_includes@ ++ + if GLIDE_DEBUG + GLIDE_DEBUG_VDEFS = -DGDBG_INFO_ON + endif diff --git a/graphics/glide3/files/patch-h3-src-makefile b/graphics/glide3/files/patch-h3-src-makefile new file mode 100644 index 000000000000..ddfb8ef632ba --- /dev/null +++ b/graphics/glide3/files/patch-h3-src-makefile @@ -0,0 +1,70 @@ +--- h3/glide3/src/makefile.autoconf.am.orig Fri Oct 27 04:20:00 2000 ++++ h3/glide3/src/makefile.autoconf.am Fri May 10 19:53:18 2002 +@@ -101,7 +101,7 @@ + endif + + if GL_AMD3D +-GL_AMD3D_SRC = xtexdl_3dnow.S xdraw2_3dnow.S xdraw3_3dnow.S ++GL_AMD3D_SRC = xtexdl_3dnow.S xdraw2_3dnow.S xdraw3_3dnow.S xdraw2_def.S xdraw3_def.S + endif + + VDEFS = $(FX_CHRIS_DENIS_ANTHONY_HACK_VDEFS) \ +@@ -138,41 +138,40 @@ + # + # Special rules for assembly files. + # +-PREPROCESSOR=/lib/cpp -$$ -I. +-xdraw2.o : xdraw2.S xdraw2.inc.S fxgasm.h +- $(CC) $(AFLAGS) -c -o $@ xdraw2.S ++PREPROCESSOR=/usr/libexec/cpp0 -$$ -I. ++xdraw2.lo : xdraw2.S xdraw2.inc.S fxgasm.h ++ libtool --mode=compile $(CC) $(AFLAGS) -c -o $@ xdraw2.S + +-xdraw3.o : xdraw3.S fxgasm.h +- $(CC) $(AFLAGS) -c -o $@ xdraw3.S ++xdraw3.lo : xdraw3.S fxgasm.h ++ libtool --mode=compile $(CC) $(AFLAGS) -c -o $@ xdraw3.S + + # 3DNow!(tm) dependencies + # XXX_def.obj targets are the default targets + + if GL_AMD3D +-else +-xdraw2_def.o: xdraw2.S xdraw2.inc.S fxgasm.h +- $(CC) $(AFLAGS) -c -o $@ xdraw2.S ++xdraw2_def.lo: xdraw2.S xdraw2.inc.S fxgasm.h ++ libtool --mode=compile $(CC) $(AFLAGS) -c -o $@ xdraw2.S + +-xdraw2_3dnow.o: xdraw2.S xdraw2.inc.S fxgasm.h +- $(CC) $(AFLAGS) -DGL_AMD3D -DUSE_PACKET_FIFO=1 -c -o $@ xdraw2.S ++xdraw2_3dnow.lo: xdraw2.S xdraw2.inc.S fxgasm.h ++ libtool --mode=compile $(CC) $(AFLAGS) -DGL_AMD3D -DUSE_PACKET_FIFO=1 -c -o $@ xdraw2.S + +-xdraw3_def.o: xdraw3.S fxgasm.h +- $(CC) $(AFLAGS) -c -o $@ xdraw3.S ++xdraw3_def.lo: xdraw3.S fxgasm.h ++ libtool --mode=compile $(CC) $(AFLAGS) -c -o $@ xdraw3.S + +-xdraw3_3dnow.o: xdraw3.S fxgasm.h +- $(CC) $(AFLAGS) -DGL_AMD3D -DUSE_PACKET_FIFO=1 -c -o $@ xdraw3.S ++xdraw3_3dnow.lo: xdraw3.S fxgasm.h ++ libtool --mode=compile $(CC) $(AFLAGS) -DGL_AMD3D -DUSE_PACKET_FIFO=1 -c -o $@ xdraw3.S + +-xtexdl_3dnow.o: xtexdl.S fxgasm.h +- $(CC) $(AFLAGS) -DGL_AMD3D -DUSE_PACKET_FIFO=1 -c -o $@ xtexdl.S ++xtexdl_3dnow.lo: xtexdl.S fxgasm.h ++ libtool --mode=compile $(CC) $(AFLAGS) -DGL_AMD3D -DUSE_PACKET_FIFO=1 -c -o $@ xtexdl.S + + endif + + if FX_GLIDE_C_CPU_DETECT + CPUSOURCES = cpudtect.c + else +-CPUSOURCES = cpudtect.S ++CPUSOURCES = cpudtect_asm.S + +-cpudtect.o cpudtect.lo: cpudtect.S ++cpudtect_asm.o cpudtect_asm.lo: cpudtect.S + $(PREPROCESSOR) -DUSE_PACKET_FIFO=1 $< > $*.tmp.s + $(CC) $(AFLAGS) -c -o $*.o $*.tmp.s + $(CP) $*.o $*.lo diff --git a/graphics/glide3/files/patch-h3-xdraw_inc_S b/graphics/glide3/files/patch-h3-xdraw_inc_S new file mode 100644 index 000000000000..d07de188ee00 --- /dev/null +++ b/graphics/glide3/files/patch-h3-xdraw_inc_S @@ -0,0 +1,12 @@ +diff -ru ../Glide3.orig/h3/glide3/src/xdraw2.inc.S ./h3/glide3/src/xdraw2.inc.S +--- ../Glide3.orig/h3/glide3/src/xdraw2.inc.S Tue Nov 14 06:11:19 2000 ++++ ./h3/glide3/src/xdraw2.inc.S Sun Jan 13 14:57:41 2002 +@@ -249,7 +249,7 @@ + push %edi /* save caller's register variable */ + push %esi /* save caller's register variable */ + +- mov %edx , gc /* gc in edx from caller */ ++ mov _gc-8(%esp) , gc /* gc on stack (NOT!!! in edx) from caller */ + push %ebx /* save caller's register variable */ + + push %ebp /* save frame pointer */ diff --git a/graphics/glide3/files/patch-h5-fxglide_h b/graphics/glide3/files/patch-h5-fxglide_h new file mode 100644 index 000000000000..a56accb7f4e6 --- /dev/null +++ b/graphics/glide3/files/patch-h5-fxglide_h @@ -0,0 +1,16 @@ +diff -ru ../Glide3.orig/h5/glide3/src/fxglide.h ./h5/glide3/src/fxglide.h +--- ../Glide3.orig/h5/glide3/src/fxglide.h Thu May 31 12:05:52 2001 ++++ ./h5/glide3/src/fxglide.h Sun Jan 13 15:35:48 2002 +@@ -2992,7 +2992,11 @@ + #if defined(GLIDE_SANITY_ASSERT) + #define GR_ASSERT(exp) ((void)((!(exp)) ? (_grAssert(#exp, __FILE__, __LINE__),0) : 0xFFFFFFFF)) + #else +-#define GR_ASSERT(exp) ((void)(0 && ((FxU32)(exp)))) ++# ifdef __GNUC__ ++# define GR_ASSERT(exp) ((void) 0) ++# else ++# define GR_ASSERT(exp) ((void)(0 && ((FxU32)(exp)))) ++# endif + #endif + + #define INTERNAL_CHECK(__name, __cond, __msg, __fatalP) \ diff --git a/graphics/glide3/files/patch-h5-gdebug_c b/graphics/glide3/files/patch-h5-gdebug_c new file mode 100644 index 000000000000..fb60a9bd4f7e --- /dev/null +++ b/graphics/glide3/files/patch-h5-gdebug_c @@ -0,0 +1,21 @@ +diff -ru ../Glide3.orig/h5/minihwc/gdebug.c ./h5/minihwc/gdebug.c +--- ../Glide3.orig/h5/minihwc/gdebug.c Sat Nov 18 08:00:35 2000 ++++ ./h5/minihwc/gdebug.c Sun Jan 13 17:36:02 2002 +@@ -86,7 +86,7 @@ + * and one for the dynamic dfn. For linux they are different. + * For Windows they are the same. + */ +-#ifdef __linux__ ++#if defined(__linux__) || defined(__FreeBSD__) + #define INITIAL_STATIC_GDBG_MSGFILE NULL + #define INITIAL_GDBG_MSGFILE stderr + #else +@@ -189,7 +189,7 @@ + SIOUXSettings.asktosaveonclose = false; + #endif + +-#ifdef __linux__ ++#if defined(__linux__) || defined(__FreeBSD__) + gdbg_msgfile = INITIAL_GDBG_MSGFILE; + #endif + diff --git a/graphics/glide3/files/patch-h5-gdebug_h b/graphics/glide3/files/patch-h5-gdebug_h new file mode 100644 index 000000000000..db7e55f6c35d --- /dev/null +++ b/graphics/glide3/files/patch-h5-gdebug_h @@ -0,0 +1,25 @@ +diff -ru ../Glide3.orig/h5/incsrc/gdebug.h ./h5/incsrc/gdebug.h +--- ../Glide3.orig/h5/incsrc/gdebug.h Sat Nov 18 08:00:33 2000 ++++ ./h5/incsrc/gdebug.h Sun Jan 13 16:20:49 2002 +@@ -67,12 +67,21 @@ + #pragma disable_message (111, 201, 302) + #endif /* defined(__WATCOMC__) || defined(__WATCOM_CPLUSPLUS__) */ + ++#ifdef __GNUC__ ++# define GDBG_INFO(x...) ++# define GDBG_INFO_MORE(x...) ++# define GDBG_PRINTF(x...) ++ ++# define GDBG_ERROR_SET_CALLBACK(x...) ++# define GDBG_ERROR_CLEAR_CALLBACK(x...) ++#else + #define GDBG_INFO 0 && (unsigned long) + #define GDBG_INFO_MORE 0 && (unsigned long) + #define GDBG_PRINTF 0 && (unsigned long) + + #define GDBG_ERROR_SET_CALLBACK 0 && (unsigned long) + #define GDBG_ERROR_CLEAR_CALLBACK 0 && (unsigned long) ++#endif + + #define GDBG_GET_DEBUGLEVEL(x) 0 + #define GDBG_SET_DEBUGLEVEL(a,b) diff --git a/graphics/glide3/files/patch-h5-glfb_c b/graphics/glide3/files/patch-h5-glfb_c new file mode 100644 index 000000000000..b39d81d56ed2 --- /dev/null +++ b/graphics/glide3/files/patch-h5-glfb_c @@ -0,0 +1,11 @@ +--- h5/glide3/src/glfb.c.orig Fri May 10 17:43:21 2002 ++++ h5/glide3/src/glfb.c Fri May 10 17:43:36 2002 +@@ -700,7 +700,7 @@ + } + #endif + else { +-#ifdef defined(DRI_BUILD) ++#if defined(DRI_BUILD) + /* + * For Linux, we just return the correct address and + * stride. diff --git a/graphics/glide3/files/patch-h5-glide_h b/graphics/glide3/files/patch-h5-glide_h new file mode 100644 index 000000000000..0cb23c16bdc5 --- /dev/null +++ b/graphics/glide3/files/patch-h5-glide_h @@ -0,0 +1,40 @@ +diff -ru ../Glide3.orig/h5/glide3/src/glide.h ./h5/glide3/src/glide.h +--- ../Glide3.orig/h5/glide3/src/glide.h Thu May 31 12:05:52 2001 ++++ ./h5/glide3/src/glide.h Sun Jan 13 14:44:34 2002 +@@ -53,9 +53,7 @@ + typedef FxU32 GrColor_t; + typedef FxU8 GrAlpha_t; + typedef FxU32 GrMipMapId_t; +-#ifdef DRI_BUILD + typedef FxU32 GrStipplePattern_t; +-#endif /* DRI_BUILD */ + typedef FxU8 GrFog_t; + typedef AnyPtr GrContext_t; + typedef int (FX_CALL *GrProc)(); +@@ -244,12 +242,10 @@ + #define GR_DITHER_2x2 0x1 + #define GR_DITHER_4x4 0x2 + +-#ifdef DRI_BUILD + typedef FxI32 GrStippleMode_t; + #define GR_STIPPLE_DISABLE 0x0 + #define GR_STIPPLE_PATTERN 0x1 + #define GR_STIPPLE_ROTATE 0x2 +-#endif /* DRI_BUILD */ + + typedef FxI32 GrFogMode_t; + #define GR_FOG_DISABLE 0x0 +@@ -745,13 +741,11 @@ + FX_ENTRY void FX_CALL + grDepthRange( FxFloat n, FxFloat f ); + +-#ifdef DRI_BUILD + FX_ENTRY void FX_CALL + grStippleMode( GrStippleMode_t mode ); + + FX_ENTRY void FX_CALL + grStipplePattern( GrStipplePattern_t mode ); +-#endif /* DRI_BUILD */ + + FX_ENTRY void FX_CALL + grViewport( FxI32 x, FxI32 y, FxI32 width, FxI32 height ); diff --git a/graphics/glide3/files/patch-h5-minihwc-makefile b/graphics/glide3/files/patch-h5-minihwc-makefile new file mode 100644 index 000000000000..b4dfa3501058 --- /dev/null +++ b/graphics/glide3/files/patch-h5-minihwc-makefile @@ -0,0 +1,12 @@ +diff -ru ../Glide3.orig/h5/minihwc/makefile.autoconf.am ./h5/minihwc/makefile.autoconf.am +--- ../Glide3.orig/h5/minihwc/makefile.autoconf.am Wed Jul 26 19:39:18 2000 ++++ ./h5/minihwc/makefile.autoconf.am Sun Jan 13 16:40:05 2002 +@@ -23,6 +23,8 @@ + # + # First, the variable defs. + # ++LCFLAGS = -I@x_includes@ ++ + if GLIDE_DEBUG + GLIDE_DEBUG_VDEFS=-DGDBG_INFO_ON + endif diff --git a/graphics/glide3/files/patch-h5-src-makefile b/graphics/glide3/files/patch-h5-src-makefile new file mode 100644 index 000000000000..29e4c66344a5 --- /dev/null +++ b/graphics/glide3/files/patch-h5-src-makefile @@ -0,0 +1,67 @@ +--- h5/glide3/src/makefile.autoconf.am.orig Sat Nov 18 08:00:26 2000 ++++ h5/glide3/src/makefile.autoconf.am Fri May 10 20:10:23 2002 +@@ -152,46 +152,40 @@ + # + # Special rules for assembly files. + # +-PREPROCESSOR=/lib/cpp -$$ -I. ++PREPROCESSOR=/usr/libexec/cpp0 -$$ -I. + xdraw2_def.o xdraw2_def.lo: xdraw2.s xdraw2.inc.s fxgasm.h + $(PREPROCESSOR) $< > $*.tmp.s +- $(CC) $(AFLAGS) -c -o $*.o $*.tmp.s +- $(CP) $*.o $*.lo ++ libtool --mode=compile $(CC) $(AFLAGS) -c -o $*.o $*.tmp.s + $(RM) -f $*.tmp.s + + xdraw2_3dnow.o xdraw2_3dnow.lo: xdraw2.s xdraw2.inc.s fxgasm.h + $(PREPROCESSOR) -DGL_AMD3D -DUSE_PACKET_FIFO=1 $< > $*.tmp.s +- $(CC) $(AFLAGS) -c -o $*.o $*.tmp.s +- $(CP) $*.o $*.lo ++ libtool --mode=compile $(CC) $(AFLAGS) -c -o $*.o $*.tmp.s + $(RM) -f $*.tmp.s + + xdraw3_def.o xdraw3_def.lo: xdraw3.s fxgasm.h + $(PREPROCESSOR) $< > $*.tmp.s +- $(CC) $(AFLAGS) -c -o $*.o $*.tmp.s +- $(CP) $*.o $*.lo ++ libtool --mode=compile $(CC) $(AFLAGS) -c -o $*.o $*.tmp.s + $(RM) -f $*.tmp.s + + xdraw3_3dnow.o xdraw3_3dnow.lo: xdraw3.s fxgasm.h + $(PREPROCESSOR) -DGL_AMD3D -DUSE_PACKET_FIFO=1 $< > $*.tmp.s +- $(CC) $(AFLAGS) -c -o $*.o $*.tmp.s +- $(CP) $*.o $*.lo ++ libtool --mode=compile $(CC) $(AFLAGS) -c -o $*.o $*.tmp.s + $(RM) -f $*.tmp.s + + xtexdl_3dnow.o xtexdl_3dnow.lo: xtexdl.s fxgasm.h + $(PREPROCESSOR) -DGL_AMD3D -DUSE_PACKET_FIFO=1 $< > $*.tmp.s +- $(CC) $(AFLAGS) -c -o $*.o $*.tmp.s +- $(CP) $*.o $*.lo ++ libtool --mode=compile $(CC) $(AFLAGS) -c -o $*.o $*.tmp.s + $(RM) -f $*.tmp.s + + if FX_GLIDE_C_CPU_DETECT + CPUSOURCES = cpudtect.c + else +-CPUSOURCES = cpudtect.s ++CPUSOURCES = cpudtect_asm.s + +-cpudtect.o cpudtect.lo: cpudtect.s ++cpudtect_asm.o cpudtect_asm.lo: cpudtect.s + $(PREPROCESSOR) -DUSE_PACKET_FIFO=1 $< > $*.tmp.s +- $(CC) $(AFLAGS) -c -o $*.o $*.tmp.s +- $(CP) $*.o $*.lo ++ libtool --mode=compile $(CC) $(AFLAGS) -c -o $*.o $*.tmp.s + $(RM) -f $*.tmp.s + endif + +@@ -202,7 +196,7 @@ + FX_GLIDE_CTRISETUP_SRC = gxdraw.c + else + if GL_AMD3D +-FX_GLIDE_CTRISETUP_SRC = xdraw2_3dnow.s xdraw3_3dnow.s ++FX_GLIDE_CTRISETUP_SRC = xdraw2_3dnow.s xdraw3_3dnow.s xtexdl_3dnow.s xdraw2_def.s xdraw3_def.s + else + FX_GLIDE_CTRISETUP_SRC = xdraw2_def.s xdraw3_def.s + endif diff --git a/graphics/glide3/files/patch-h5-xdraw2_inc_s b/graphics/glide3/files/patch-h5-xdraw2_inc_s new file mode 100644 index 000000000000..3589ef4a6bdb --- /dev/null +++ b/graphics/glide3/files/patch-h5-xdraw2_inc_s @@ -0,0 +1,12 @@ +diff -ru ../Glide3.orig/h5/glide3/src/xdraw2.inc.s ./h5/glide3/src/xdraw2.inc.s +--- ../Glide3.orig/h5/glide3/src/xdraw2.inc.s Sat Nov 18 08:00:27 2000 ++++ ./h5/glide3/src/xdraw2.inc.s Sun Jan 13 15:00:14 2002 +@@ -288,7 +288,7 @@ + push %edi /* save caller's register variable */ + push %esi /* save caller's register variable */ + +- mov %edx , gc /* gc in edx from caller */ ++ mov _gc-8(%esp) , gc /* gc on stack (NOT!!! in edx) from caller */ + push %ebx /* save caller's register variable */ + + push %ebp /* save frame pointer */ diff --git a/graphics/glide3/files/patch-make-3dfx_linux_mak b/graphics/glide3/files/patch-make-3dfx_linux_mak new file mode 100644 index 000000000000..4370982bf09b --- /dev/null +++ b/graphics/glide3/files/patch-make-3dfx_linux_mak @@ -0,0 +1,32 @@ +diff -ru ../Glide3.orig/swlibs/include/make/3dfx.linux.mak ./swlibs/include/make/3dfx.linux.mak +--- ../Glide3.orig/swlibs/include/make/3dfx.linux.mak Wed Jul 12 14:35:28 2000 ++++ ./swlibs/include/make/3dfx.linux.mak Sun Jan 13 16:14:11 2002 +@@ -82,15 +82,11 @@ + GCPTS := $(GCOPTS) -fPIC -DPIC + endif + +-# +-# BIG_OPT Indicates O3(?) or better is being used. It changes the +-# assembly language in grDrawTriangle. Larger optimization removes +-# an extra push in the calling sequence. +-# +-CNODEBUG = -O6 -m486 -fomit-frame-pointer -funroll-loops \ +- -fexpensive-optimizations -ffast-math -DBIG_OPT ++# Set CNODEBUG and CDEBUG to nothing to respect CFLAGS ++ ++CNODEBUG = ++CDEBUG = + +-CDEBUG = -g -O + GLDOPTS = -L$(BUILD_ROOT_SWLIBS)/lib -L/usr/lib + # Profiling + #CDEBUG = -pg -g -O +@@ -115,7 +111,7 @@ + LCFLAGS = $(LCINCS) $(LCDEFS) $(LCOPTS) + VCFLAGS = $(VCINCS) $(VCDEFS) $(VCOPTS) + +-CFLAGS = $(CDEBUG) $(GCFLAGS) $(LCFLAGS) $(VCFLAGS) ++CFLAGS += $(CDEBUG) $(GCFLAGS) $(LCFLAGS) $(VCFLAGS) + + #-------------------------------------------------------------------------- + # build up global linker flags (LDFLAGS) and libraries (LDLIBS) diff --git a/graphics/glide3/files/patch-make-3dfx_mak b/graphics/glide3/files/patch-make-3dfx_mak new file mode 100644 index 000000000000..9f1758498f15 --- /dev/null +++ b/graphics/glide3/files/patch-make-3dfx_mak @@ -0,0 +1,32 @@ +diff -ru ../Glide3.orig/swlibs/include/make/3dfx.mak ./swlibs/include/make/3dfx.mak +--- ../Glide3.orig/swlibs/include/make/3dfx.mak Sat Nov 18 08:00:37 2000 ++++ ./swlibs/include/make/3dfx.mak Sun Jan 13 16:13:53 2002 +@@ -133,15 +133,11 @@ + ifeq "$(OS)" "FreeBSD" + GCINCS = -I. -I$(BUILD_ROOT_SWLIBS)/include -I$(BUILD_ROOT_HW)/include -I/usr/X11R6/include + GCOPTS = -Wall +-# +-# BIG_OPT Indicates O3(?) or better is being used. It changes the +-# assembly language in grDrawTriangle. Larger optimization removes +-# an extra push in the calling sequence. +-# +-CNODEBUG = -O6 -m486 -fomit-frame-pointer -funroll-loops \ +- -fexpensive-optimizations -ffast-math -DBIG_OPT + +-CDEBUG = -g -O ++# Set CNODEBUG and CDEBUG to nothing to respect CFLAGS ++ ++CNODEBUG = ++CDEBUG = + # Profiling + #CDEBUG = -pg -g -O + #GCDEFS = +@@ -166,7 +162,7 @@ + LCFLAGS = $(LCINCS) $(LCDEFS) $(LCOPTS) + VCFLAGS = $(VCINCS) $(VCDEFS) $(VCOPTS) + +-CFLAGS = $(CDEBUG) $(GCFLAGS) $(LCFLAGS) $(VCFLAGS) ++CFLAGS += $(CDEBUG) $(GCFLAGS) $(LCFLAGS) $(VCFLAGS) + + #-------------------------------------------------------------------------- + # build up global linker flags (LDFLAGS) and libraries (LDLIBS) diff --git a/graphics/glide3/files/patch-make-makefile b/graphics/glide3/files/patch-make-makefile new file mode 100644 index 000000000000..26a9492f710f --- /dev/null +++ b/graphics/glide3/files/patch-make-makefile @@ -0,0 +1,33 @@ +diff -ru ../Glide3.orig/swlibs/include/make/makefile.autoconf.bottom ./swlibs/include/make/makefile.autoconf.bottom +--- ../Glide3.orig/swlibs/include/make/makefile.autoconf.bottom Thu May 31 12:05:53 2001 ++++ ./swlibs/include/make/makefile.autoconf.bottom Sun Jan 13 16:13:13 2002 +@@ -32,7 +32,7 @@ + CPPFLAGS = $(GCPPFLAGS) $(LCPPFLAGS) $(VCPPFLAGS) + DEFS = $(GDEFS) $(LDEFS) $(VDEFS) + INCLUDES = $(GINCLUDES) $(LINCLUDES) $(VINCLUDES) +-CFLAGS = $(GCFLAGS) $(LCFLAGS) $(VCFLAGS) ++CFLAGS += $(GCFLAGS) $(LCFLAGS) $(VCFLAGS) + + AFLAGS = $(GAFLAGS) $(LAFLAGS) $(VAFLAGS) + ADEFS = $(GADEFS) $(LADEFS) $(VADEFS) +@@ -48,7 +48,7 @@ + # Global CFLAGS + # + ifeq ("@GLIDE_DEBUG@","true") +-GLIDE_DEBUG_GCFLAGS = -g -O ++GLIDE_DEBUG_GCFLAGS = -g + GLIDE_DEBUG_GDEFS = -DGDBG_INFO_ON -DGLIDE_DEBUG + else + ifeq ("@FX_GLIDE_BUILD_ARCHITECTURE@","alpha") +@@ -61,9 +61,8 @@ + GLIDE_DEBUG_GDEFS = -fomit-frame-pointer \ + -fexpensive-optimizations -ffast-math -DBIG_OPT + else +-GLIDE_DEBUG_GCFLAGS = -O2 +-GLIDE_DEBUG_GDEFS = -fomit-frame-pointer -funroll-loops \ +- -fexpensive-optimizations -ffast-math -DBIG_OPT ++GLIDE_DEBUG_GCFLAGS = ++GLIDE_DEBUG_GDEFS = + endif + endif + endif diff --git a/graphics/glide3/pkg-comment b/graphics/glide3/pkg-comment index 214148e29e5c..25954ca506ad 100644 --- a/graphics/glide3/pkg-comment +++ b/graphics/glide3/pkg-comment @@ -1 +1 @@ -3dfx 3d graphics library +Library to support 3dfx Voodoo3/4/5/Banshee with the DRI diff --git a/graphics/glide3/pkg-descr b/graphics/glide3/pkg-descr index 97f0cb2ebf43..ca36402f129c 100644 --- a/graphics/glide3/pkg-descr +++ b/graphics/glide3/pkg-descr @@ -1,11 +1,5 @@ -This library is necessary in order to build XFree86's 3dfx DRI/DRM shim -(lib/modules/dri/tdfx_dri.so). It probably has other uses as well. :-) +This library is used by the 3dfx DRI module (lib/modules/dri/tdfx_dri.so) to +provide 3d hardware accelerated OpenGL for 3dfx Voodoo3/4/5/Banshee cards. +This does not support applications requiring the Glide library. -The main distfile is unofficial. It was created by simply checking out -from CVS and tarring up the result on the date indicated in the filename. -This was done simply to make the port easier to deal with. - -You will need to make sure to get the configure options right for the hardware -you will be using. This is left as an exercise to the reader. :-) - -WWW: http://www.teleport.com/~anholt/devel/dri/ +WWW: http://gladstone.uoregon.edu/~eanholt/dri/ |