rpms/Glide3/FC-4 Glide3-warn.patch, NONE, 1.1 .cvsignore, 1.2, 1.3 Glide3.spec, 1.9, 1.10 sources, 1.2, 1.3 Glide3-64bit.patch, 1.3, NONE Glide3-amd3dnow.patch, 1.2, NONE Glide3-fixes.patch, 1.3, NONE Glide3-gcc4.patch, 1.2, NONE Glide3-lib64.patch, 1.1, NONE Glide3-new-autotools-bugfix.patch, 1.2, NONE Glide3-redhat-cleanup-1.patch, 1.1, NONE

Hans de Goede (jwrdegoede) fedora-extras-commits at redhat.com
Fri Feb 17 09:26:25 UTC 2006


Author: jwrdegoede

Update of /cvs/extras/rpms/Glide3/FC-4
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv21918

Modified Files:
	.cvsignore Glide3.spec sources 
Added Files:
	Glide3-warn.patch 
Removed Files:
	Glide3-64bit.patch Glide3-amd3dnow.patch Glide3-fixes.patch 
	Glide3-gcc4.patch Glide3-lib64.patch 
	Glide3-new-autotools-bugfix.patch 
	Glide3-redhat-cleanup-1.patch 
Log Message:
* Fri Feb 17 2006 Hans de Goede <j.w.r.degoede at hhs.nl> 20050815-1
- Sync FC-4 version with devel-branch, this incorperates the following:
- Work together with upstream to keep Glide alive, use upstream CVS
  glide-devel-branch as a base.
- Intergrate all our patches into upstream CVS glide-devel-branch.
- New upstream branch (re)adds support for Voodoo1 (sst1).
- Make Voodoo2 (cvg) code 64 bit clean (merged upstream).
- Add -soname to linkerflags, so that we report the correct soname,
  otherwise rpm can't properly resolve dependencies because of the
  symlink stuff we do (merged upstream).
- Add a patch which fixes gcc4.1 warnings
- add %{?dist} for consistency with my other packages


Glide3-warn.patch:

--- NEW FILE Glide3-warn.patch ---
diff -ur Glide3.orig/cvg/glide3/src/fxgasm.c Glide3/cvg/glide3/src/fxgasm.c
--- Glide3.orig/cvg/glide3/src/fxgasm.c	2005-08-08 14:27:26.000000000 +0200
+++ Glide3/cvg/glide3/src/fxgasm.c	2006-01-16 16:43:14.000000000 +0100
@@ -210,8 +210,8 @@
     OFFSET (gr, pool.f1,    "pool_f1");
     OFFSET (gr, pool.f255,  "pool_f255");
 
-    OFFSET (gr, pool.ftemp1, "pool_fTemp1");
-    OFFSET (gr, pool.ftemp2, "pool_fTemp2");
+    OFFSET (gr, pool.temp1.f, "pool_fTemp1");
+    OFFSET (gr, pool.temp2.f, "pool_fTemp2");
 
     SIZEOF (gr,"GlideRoot");
     NEWLINE;
Only in Glide3/cvg/glide3/src: fxgasm.c.warn
diff -ur Glide3.orig/cvg/glide3/src/fxglide.h Glide3/cvg/glide3/src/fxglide.h
--- Glide3.orig/cvg/glide3/src/fxglide.h	2005-08-13 23:06:56.000000000 +0200
+++ Glide3/cvg/glide3/src/fxglide.h	2006-01-16 16:43:14.000000000 +0100
@@ -1370,7 +1370,9 @@
     float  fHalf;
     float  f1;
     float  f255;
-    float  ftemp1, ftemp2;       /* temps to convert floats to ints */
+    /* temps to convert floats to ints */
+    union { float f; FxI32 i; FxU32 u; } temp1;
+    union { float f; FxI32 i; FxU32 u; } temp2;
     float  fIntTruncBias;
 
 #if GLIDE_PACKED_RGB
@@ -2702,10 +2704,10 @@
  */
 #if GLIDE_PACKED_RGB
 #define RGBA_COMP(__fpVal, __fpBias, __fpShift, __fpMask) \
-((_GlideRoot.pool.ftemp1 = (float)((float)(__fpVal) + (float)(__fpBias))), \
+((_GlideRoot.pool.temp1.f = (float)((float)(__fpVal) + (float)(__fpBias))), \
  GR_ASSERT((__fpVal) >= 0.0f), \
  GR_ASSERT((__fpVal) < 256.0f), \
- (((*(const FxU32*)&_GlideRoot.pool.ftemp1) & (__fpMask)) << (__fpShift)))
+ ((_GlideRoot.pool.temp1.u & (__fpMask)) << (__fpShift)))
                                                   
 #define RGBA_COMP_CLAMP(__fpVal, __compToken) \
    RGBA_COMP(__fpVal, kPackBias##__compToken, kPackShift##__compToken, kPackMask##__compToken)
Only in Glide3/cvg/glide3/src: fxglide.h.warn
diff -ur Glide3.orig/cvg/glide3/src/gaa.c Glide3/cvg/glide3/src/gaa.c
--- Glide3.orig/cvg/glide3/src/gaa.c	2005-08-13 23:06:57.000000000 +0200
+++ Glide3/cvg/glide3/src/gaa.c	2006-01-16 16:43:14.000000000 +0100
@@ -273,34 +273,30 @@
 
   GR_BEGIN_NOFIFOCHECK(FN_NAME, 91);
 
-#define  DX _GlideRoot.pool.ftemp1
-#define ADY _GlideRoot.pool.ftemp2
+#define  DX _GlideRoot.pool.temp1
+#define ADY _GlideRoot.pool.temp2
 
   GR_FLUSH_STATE();
 
   {
-    FxI32 i, j;
-    FxU32 dataElem;
-    FxU32 vSize;
+    int i;
+    FxU32 vSize, dataElem;
     
     /*
     ** compute absolute deltas and draw from low Y to high Y
     */
-    ADY = FARRAY(b, 4) - FARRAY(a, 4);
-    i = *(int *)&ADY;
-    if (i < 0) {
+    ADY.f = FARRAY(b, 4) - FARRAY(a, 4);
+    if (ADY.i < 0) {
       const void *tv;
       tv = a; a = b; b = tv;
-      i ^= 0x80000000;            /* ady = -ady; */
-      /* (*(long *)&ADY) = i; */
+      ADY.i ^= 0x80000000;            /* ady = -ady; */
     }
     
-    DX = FARRAY(b, 0) - FARRAY(a, 0);
-    j = *(int *)&DX;
-    j &= 0x7fffffffL;            /* abs(adx) */
+    DX.f = FARRAY(b, 0) - FARRAY(a, 0);
+    DX.i &= 0x7fffffff;            /* abs(adx) */
     
     /* check for zero-length lines */
-    if ((j >= i) && (j == 0))
+    if ((DX.i >= ADY.i) && (DX.i == 0))
       return;
     
     vSize = gc->state.vData.vSize + 8;
@@ -308,7 +304,7 @@
     TRI_STRIP_BEGIN(kSetupCullDisable | kSetupStrip, 4, vSize, 
                     SSTCP_PKT3_BDDDDD | (1<<15));
     /* x major */
-    if (j >= i) {
+    if (DX.i >= ADY.i) {
       TRI_SETF(FARRAY(b, 0));
       dataElem = 0;
       TRI_SETF(FARRAY(b, 4) - _GlideRoot.pool.fHalf);
@@ -1391,35 +1387,31 @@
         dyBC = fb[yindex] - fc[yindex];
         
         /* Stash the area in the float pool for easy access */
-        _GlideRoot.pool.ftemp1 = dxAB * dyBC - dxBC * dyAB;
+        _GlideRoot.pool.temp1.f = dxAB * dyBC - dxBC * dyAB;
         
 #define FloatVal(__f) (((__f) < 786432.875) ? (__f) : ((__f) - 786432.875))
-        {
-          const FxI32 j = *(FxI32*)&_GlideRoot.pool.ftemp1;
-          
-          /* Zero-area triangles are BAD!! */
-          if ((j & 0x7FFFFFFF) == 0) {
-            GDBG_INFO(291, FN_NAME": Culling (%g %g) (%g %g) (%g %g) : (%g : 0x%X : 0x%X)\n",
-                      FloatVal(fa[xindex]), FloatVal(fa[yindex]), 
-                      FloatVal(fb[xindex]), FloatVal(fb[yindex]), 
-                      FloatVal(fc[xindex]), FloatVal(fc[yindex]), 
-                      _GlideRoot.pool.ftemp1, gc->state.cull_mode, culltest);
+        /* Zero-area triangles are BAD!! */
+        if ((_GlideRoot.pool.temp1.i & 0x7FFFFFFF) == 0) {
+          GDBG_INFO(291, FN_NAME": Culling (%g %g) (%g %g) (%g %g) : (%g : 0x%X : 0x%X)\n",
+                    FloatVal(fa[xindex]), FloatVal(fa[yindex]), 
+                    FloatVal(fb[xindex]), FloatVal(fb[yindex]), 
+                    FloatVal(fc[xindex]), FloatVal(fc[yindex]), 
+                    _GlideRoot.pool.temp1.f, gc->state.cull_mode, culltest);
 
-            goto done;
-          }
+          goto done;
+        }
+    
+        /* Backface culling, use sign bit as test */
+        if ((gc->state.cull_mode != GR_CULL_DISABLE) &&
+            ((_GlideRoot.pool.temp1.i ^ (culltest << 31)) >= 0)) {
+      
+          GDBG_INFO(291, FN_NAME": Culling (%g %g) (%g %g) (%g %g) : (%g : 0x%X : 0x%X)\n",
+                    FloatVal(fa[xindex]), FloatVal(fa[yindex]), 
+                    FloatVal(fb[xindex]), FloatVal(fb[yindex]), 
+                    FloatVal(fc[xindex]), FloatVal(fc[yindex]), 
+                    _GlideRoot.pool.temp1.f, gc->state.cull_mode, culltest);
       
-          /* Backface culling, use sign bit as test */
-          if ((gc->state.cull_mode != GR_CULL_DISABLE) &&
-              ((j ^ (culltest << 31)) >= 0)) {
-        
-            GDBG_INFO(291, FN_NAME": Culling (%g %g) (%g %g) (%g %g) : (%g : 0x%X : 0x%X)\n",
-                      FloatVal(fa[xindex]), FloatVal(fa[yindex]), 
-                      FloatVal(fb[xindex]), FloatVal(fb[yindex]), 
-                      FloatVal(fc[xindex]), FloatVal(fc[yindex]), 
-                      _GlideRoot.pool.ftemp1, gc->state.cull_mode, culltest);
-        
-            goto done;
-          }
+          goto done;
         }
       }
     } /* end culling test */
@@ -1718,35 +1710,31 @@
         dyBC = fb[yindex] - fc[yindex];
         
         /* Stash the area in the float pool for easy access */
-        _GlideRoot.pool.ftemp1 = dxAB * dyBC - dxBC * dyAB;
+        _GlideRoot.pool.temp1.f = dxAB * dyBC - dxBC * dyAB;
         
 #define FloatVal(__f) (((__f) < 786432.875) ? (__f) : ((__f) - 786432.875))
-        {
-          const FxI32 j = *(FxI32*)&_GlideRoot.pool.ftemp1;
-          
-          /* Zero-area triangles are BAD!! */
-          if ((j & 0x7FFFFFFF) == 0) {
-            GDBG_INFO(291, FN_NAME": Culling (%g %g) (%g %g) (%g %g) : (%g : 0x%X : 0x%X)\n",
-                      FloatVal(fa[xindex]), FloatVal(fa[yindex]), 
-                      FloatVal(fb[xindex]), FloatVal(fb[yindex]), 
-                      FloatVal(fc[xindex]), FloatVal(fc[yindex]), 
-                      _GlideRoot.pool.ftemp1, gc->state.cull_mode, culltest);
+        /* Zero-area triangles are BAD!! */
+        if ((_GlideRoot.pool.temp1.i & 0x7FFFFFFF) == 0) {
+          GDBG_INFO(291, FN_NAME": Culling (%g %g) (%g %g) (%g %g) : (%g : 0x%X : 0x%X)\n",
+                    FloatVal(fa[xindex]), FloatVal(fa[yindex]), 
+                    FloatVal(fb[xindex]), FloatVal(fb[yindex]), 
+                    FloatVal(fc[xindex]), FloatVal(fc[yindex]), 
+                    _GlideRoot.pool.temp1.f, gc->state.cull_mode, culltest);
 
-            goto done;
-          }
+          goto done;
+        }
+    
+        /* Backface culling, use sign bit as test */
+        if ((gc->state.cull_mode != GR_CULL_DISABLE) &&
+            ((_GlideRoot.pool.temp1.i ^ (culltest << 31)) >= 0)) {
+      
+          GDBG_INFO(291, FN_NAME": Culling (%g %g) (%g %g) (%g %g) : (%g : 0x%X : 0x%X)\n",
+                    FloatVal(fa[xindex]), FloatVal(fa[yindex]), 
+                    FloatVal(fb[xindex]), FloatVal(fb[yindex]), 
+                    FloatVal(fc[xindex]), FloatVal(fc[yindex]), 
+                    _GlideRoot.pool.temp1.f, gc->state.cull_mode, culltest);
       
-          /* Backface culling, use sign bit as test */
[...1725 lines suppressed...]
Only in Glide3/sst1/glide3/src: gstrip.c.warn
diff -ur Glide3.orig/sst1/glide3/src/gxdraw.c Glide3/sst1/glide3/src/gxdraw.c
--- Glide3.orig/sst1/glide3/src/gxdraw.c	2005-06-09 20:32:35.000000000 +0200
+++ Glide3/sst1/glide3/src/gxdraw.c	2006-01-16 16:43:14.000000000 +0100
@@ -159,7 +159,7 @@
   const float *fb = (const float *)vb + xindex;
   const float *fc = (const float *)vc + xindex;
   float ooa, dxAB, dxBC, dyAB, dyBC;
-  int i,j,culltest;
+  int i,culltest;
   union { float f; int i; } ay;
   union { float f; int i; } by;
   union { float f; int i; } cy;
@@ -239,16 +239,15 @@
   dyBC = snap_yb - snap_yc;
   
   /* this is where we store the area */
-  _GlideRoot.pool.ftemp1 = dxAB * dyBC - dxBC * dyAB;
+  _GlideRoot.pool.temp1.1 = dxAB * dyBC - dxBC * dyAB;
   
   /* Zero-area triangles are BAD!! */
-  j = *(long *)&_GlideRoot.pool.ftemp1;
-  if ((j & 0x7FFFFFFF) == 0)
+  if ((_GlideRoot.pool.temp1.i & 0x7FFFFFFF) == 0)
     return 0;
   
   /* Backface culling, use sign bit as test */
   if (gc->state.cull_mode != GR_CULL_DISABLE) {
-    if ((j ^ (culltest<<31)) >= 0) {
+    if ((_GlideRoot.pool.temp1.i ^ (culltest<<31)) >= 0) {
       return -1;
     }
   }
@@ -291,7 +290,7 @@
   SET_GW_CMD(    fifoPtr, 0, gc->hwDep.sst96Dep.gwCommand );
   SET_GW_HEADER( fifoPtr, 1, gc->hwDep.sst96Dep.gwHeaders[0] );
 
-  ooa = _GlideRoot.pool.f1 / _GlideRoot.pool.ftemp1;
+  ooa = _GlideRoot.pool.f1 / _GlideRoot.pool.temp1.f;
   /* GMT: note that we spread out our PCI writes */
   /* write out X & Y for vertex A */
   FSET_GW_ENTRY( fifoPtr, 2, snap_xa );
@@ -353,7 +352,7 @@
 
   /* write triangle command */
 triangle_command:
-  FSET_GW_ENTRY( fifoPtr, 0, _GlideRoot.pool.ftemp1 );
+  FSET_GW_ENTRY( fifoPtr, 0, _GlideRoot.pool.temp1.f );
   fifoPtr+=1;
   
   if (((FxU32)fifoPtr) & 0x7) {
@@ -433,7 +432,7 @@
   const float *fb = (const float *)vb + xindex;
   const float *fc = (const float *)vc + xindex;
   float ooa, dxAB, dxBC, dyAB, dyBC;
-  int i,j,culltest;
+  int i,culltest;
   union { float f; int i; } ay;
   union { float f; int i; } by;
   union { float f; int i; } cy;
@@ -517,16 +516,15 @@
   dyBC = snap_yb - snap_yc;
   
   /* this is where we store the area */
-  _GlideRoot.pool.ftemp1 = dxAB * dyBC - dxBC * dyAB;
+  _GlideRoot.pool.temp1.f = dxAB * dyBC - dxBC * dyAB;
   
   /* Zero-area triangles are BAD!! */
-  j = *(long *)&_GlideRoot.pool.ftemp1;
-  if ((j & 0x7FFFFFFF) == 0)
+  if ((_GlideRoot.pool.temp1.i & 0x7FFFFFFF) == 0)
     return 0;
   
   /* Backface culling, use sign bit as test */
   if (gc->state.cull_mode != GR_CULL_DISABLE) {
-    if ((j ^ (culltest<<31)) >= 0) {
+    if ((_GlideRoot.pool.temp1.i ^ (culltest<<31)) >= 0) {
       return -1;
     }
   }
@@ -535,7 +533,7 @@
 
   GR_SET_EXPECTED_SIZE(_GlideRoot.curTriSize);
   
-  ooa = _GlideRoot.pool.f1 / _GlideRoot.pool.ftemp1;
+  ooa = _GlideRoot.pool.f1 / _GlideRoot.pool.temp1.f;
   /* GMT: note that we spread out our PCI writes */
   /* write out X & Y for vertex A */
   GR_SETF( hw->FvA.x, snap_xa );
@@ -608,7 +606,7 @@
   }
 
   /* Draw the triangle by writing the area to the triangleCMD register */
-  P6FENCE_CMD( GR_SETF( hw->FtriangleCMD, _GlideRoot.pool.ftemp1 ) );
+  P6FENCE_CMD( GR_SETF( hw->FtriangleCMD, _GlideRoot.pool.temp1.f ) );
   _GlideRoot.stats.trisDrawn++;
 
   GR_CHECK_SIZE();
@@ -639,7 +637,7 @@
   const float *fb = (const float *)vb + xindex;
   const float *fc = (const float *)vc + xindex;
   float dxAB, dxBC, dyAB, dyBC;
-  int i,j;
+  int i;
   union { float f; int i; } ay;
   union { float f; int i; } by;
   union { float f; int i; } cy;
@@ -713,12 +711,11 @@
   dyBC = snap_yb - snap_yc;
 
   /* this is where we store the area */
-  _GlideRoot.pool.ftemp1 = dxAB * dyBC - dxBC * dyAB;
+  _GlideRoot.pool.temp1.f = dxAB * dyBC - dxBC * dyAB;
   _GlideRoot.stats.trisProcessed++;
 
   /* Zero-area triangles are BAD!! */
-  j = *(long *)&_GlideRoot.pool.ftemp1;
-  if ((j & 0x7FFFFFFF) == 0) {
+  if ((_GlideRoot.pool.temp1.i & 0x7FFFFFFF) == 0) {
     return 0;
   }
 
@@ -795,7 +792,7 @@
   }
 
 triangle_command:
-  FSET_GW_ENTRY( fifoPtr, 0, _GlideRoot.pool.ftemp1 );
+  FSET_GW_ENTRY( fifoPtr, 0, _GlideRoot.pool.temp1.f );
   fifoPtr += 1;
 
   if (((FxU32)fifoPtr) & 0x7) {
@@ -862,7 +859,7 @@
   const float *fb = (const float *)vb + xindex;
   const float *fc = (const float *)vc + xindex;
   float dxAB, dxBC, dyAB, dyBC;
-  int i,j;
+  int i;
   union { float f; int i; } ay;
   union { float f; int i; } by;
   union { float f; int i; } cy;
@@ -950,12 +947,11 @@
    GR_SETF( hw->FvB.y, snap_yb );
 
   /* this is where we store the area */
-  _GlideRoot.pool.ftemp1 = dxAB * dyBC - dxBC * dyAB;
+  _GlideRoot.pool.temp1.f = dxAB * dyBC - dxBC * dyAB;
   _GlideRoot.stats.trisProcessed++;
 
   /* Zero-area triangles are BAD!! */
-  j = *(long *)&_GlideRoot.pool.ftemp1;
-  if ((j & 0x7FFFFFFF) == 0) {
+  if ((_GlideRoot.pool.temp1.i & 0x7FFFFFFF) == 0) {
     GR_CHECK_SIZE_SLOPPY();
     return 0;
   }
@@ -995,7 +991,7 @@
   }
 
   /* Draw the triangle by writing the area to the triangleCMD register */
-  P6FENCE_CMD( GR_SETF( hw->FtriangleCMD, _GlideRoot.pool.ftemp1 ) );
+  P6FENCE_CMD( GR_SETF( hw->FtriangleCMD, _GlideRoot.pool.temp1.f ) );
   _GlideRoot.stats.trisDrawn++;
 
   GR_CHECK_SIZE();
Only in Glide3/sst1/glide3/src: gxdraw.c.warn
diff -ur Glide3.orig/sst1/incsrc/sst.h Glide3/sst1/incsrc/sst.h
--- Glide3.orig/sst1/incsrc/sst.h	2004-03-02 08:56:00.000000000 +0100
+++ Glide3/sst1/incsrc/sst.h	2006-01-16 16:43:14.000000000 +0100
@@ -1049,7 +1049,14 @@
 #define GET16(s) s
 #define SET(d,s) d = s
 #define SET16(d,s) d = s
-#define SETF(d,s) (*(float *)&(d)) = s
+#define SETF(d,s) *((float *)((void *)(&(d)))) = s
+/*
+do { \
+  union { float f; FxU32 u; } uni; \
+  uni.f = s; \
+  d = uni.u; \
+} while(0)
+*/
 
 // SET macros for FBI
 #define SET_FBI(d,s)    SET (*(&(d)+0x100),s)
Only in Glide3/sst1/incsrc: sst.h.warn
diff -ur Glide3.orig/sst1/init/initvg/sst1init.h Glide3/sst1/init/initvg/sst1init.h
--- Glide3.orig/sst1/init/initvg/sst1init.h	2005-05-25 10:53:23.000000000 +0200
+++ Glide3/sst1/init/initvg/sst1init.h	2006-01-16 16:49:31.000000000 +0100
@@ -105,8 +105,8 @@
 #define IGET(A)    A
 #define ISET(A,D)  A = (D)
 #else
-#define IGET(A)    sst1InitRead32((FxU32 *) &(A))
-#define ISET(A,D)  sst1InitWrite32((FxU32 *) &(A), D)  
+#define IGET(A)    sst1InitRead32((FxU32 *)(void *)&(A))
+#define ISET(A,D)  sst1InitWrite32((FxU32 *)(void *)&(A), D)  
 #endif
 
 /*
Only in Glide3/sst1/init/initvg: sst1init.h~


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/Glide3/FC-4/.cvsignore,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- .cvsignore	28 Apr 2005 18:39:19 -0000	1.2
+++ .cvsignore	17 Feb 2006 09:26:25 -0000	1.3
@@ -1 +1 @@
-Glide3-20010520.tar.bz2
+Glide3-20050815.tar.bz2


Index: Glide3.spec
===================================================================
RCS file: /cvs/extras/rpms/Glide3/FC-4/Glide3.spec,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- Glide3.spec	9 May 2005 18:52:34 -0000	1.9
+++ Glide3.spec	17 Feb 2006 09:26:25 -0000	1.10
@@ -1,8 +1,8 @@
 Name:    Glide3
-Version: 20010520
-Release: 36
+Version: 20050815
+Release: 1%{?dist}
 Summary: Glide3 runtime for the 3Dfx Voodoo family of cards
-# Glide3 is x86/alpha/ia64/x86_64 only, ia64 and x86_64 are untested
+# Glide3 is x86/alpha/ia64/x86_64 only, ia64 is untested
 ExclusiveArch: %{ix86} alpha ia64 x86_64
 
 Group:   User Interface/X Hardware Support
@@ -10,29 +10,29 @@
 URL:     http://glide.sourceforge.net
 
 # Create the Glide3 tarball by using:
-#   cvs -d :pserver:anonymous at cvs.glide.sourceforge.net:/cvsroot/glide co Glide3
+#   cvs -d :pserver:anonymous at cvs.glide.sourceforge.net:/cvsroot/glide \
+#     co -r glide-devel-branch Glide3
 #   pushd Glide3 ; find . -name CVS -type d |xargs rm -rf
 #   find . -name .cvsignore | xargs rm ; popd
 #   tar jcf Glide3-$(date +"%Y%m%d").tar.bz2 Glide3/
 Source0: %{name}-%{version}.tar.bz2
 Source1: glidelink.c
-Patch0:  Glide3-64bit.patch
-Patch1:  Glide3-new-autotools-bugfix.patch
-Patch2:  Glide3-redhat-cleanup-1.patch
-Patch3:  Glide3-fixes.patch
-Patch4:  Glide3-gcc4.patch
-Patch5:  Glide3-amd3dnow.patch
-Patch6:  Glide3-lib64.patch
+Patch0: Glide3-warn.patch
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-BuildRequires: automake14 autoconf xorg-x11-devel
+BuildRequires: libX11-devel xorg-x11-proto-devel 
+# Add these to try the experimental DGA support and add DGA=1 to %{glide_flags}
+# BuildRequires: libXxf86dga-devel libXxf86vm-devel
+%ifarch %{ix86}
+BuildRequires: nasm
+%endif
 
 %description
 Glide3 provides the necessary low-level interface glue between the Mesa
 3D graphics library, and 3Dfx Voodoo series of hardware. This package is
 required by the Xorg tdfx driver in order to provide 3D acceleration
 support for the 3Dfx Voodoo 3 & 5. This package also contains support for
-the Voodoo 2 in order to use the 3Dfx Voodoo 2 you need a special version
-of Mesa or a native Glide3 application.
+the Voodoo 2 & 1 in order to use the 3Dfx Voodoo 2 or 1 you need a special
+version of Mesa or a native Glide3 application.
 
 %package devel
 Summary: Development libraries and headers for Glide3
@@ -46,87 +46,60 @@
 
 %prep
 %setup -q -n Glide3
-%patch0 -p1 -b .64bit
-%patch1 -p1 -b .new-autotools-bugfix
-%patch2 -p1 -b .redhat-cleanup-1
-%patch3 -p1 -b .fix
-%patch4 -p1 -b .gcc4
-%patch5 -p1 -b .amd3dnow
-%ifarch x86_64
-%patch6 -p1 -b .lib64
-%endif
+%patch0 -p1 -z .warn
 
-%build
-aclocal-1.4
-libtoolize --copy --force
-automake-1.4 -a
-autoconf
 
+%build
 %ifarch %{ix86}
-%define configure_flags --enable-fx-debug=no --enable-amd3d
+%define glide_flags USE_X86=1 USE_3DNOW=1 USE_MMX=1 USE_SSE=1 USE_SSE2=1 TEXUS2=1
 %else
-%define configure_flags --enable-fx-debug=no
+%define glide_flags TEXUS2=1
 %endif
 
-mkdir build-5
-cd build-5
-ln -s ../configure configure
-%configure \
-        %{configure_flags} \
-        --enable-fx-glide-hw=h5 \
-        --enable-fx-dri-build
-make -f makefile.autoconf all
-cd ..
-
-mkdir build-3
-cd build-3
-ln -s ../configure configure
-%configure \
-        %{configure_flags} \
-        --enable-fx-glide-hw=h3 \
-        --enable-fx-dri-build
-make -f makefile.autoconf all
-cd ..
+make -f makefile.linux FX_GLIDE_HW=h5 DRI=1 XPATH=/usr/X11R6/%{_lib} \
+  OPTFLAGS="$RPM_OPT_FLAGS -Wno-unused-parameter" %{glide_flags}
+mv h5/lib/libglide3.so libglide3-v5.so
+make -f makefile.linux FX_GLIDE_HW=h5 realclean
+
+make -f makefile.linux FX_GLIDE_HW=h3 DRI=1 XPATH=/usr/X11R6/%{_lib} \
+  OPTFLAGS="$RPM_OPT_FLAGS -Wno-unused-parameter" %{glide_flags}
+mv h3/lib/libglide3.so libglide3-v3.so
+make -f makefile.linux FX_GLIDE_HW=h3 realclean
+
+make -f makefile.linux FX_GLIDE_HW=cvg \
+  OPTFLAGS="$RPM_OPT_FLAGS -Wno-unused-parameter" %{glide_flags}
+mv cvg/lib/libglide3x.so libglide3-v2.so
+make -f makefile.linux FX_GLIDE_HW=cvg realclean
 
-#Sorry, no 64 bit support for Voodoo2 (yet)
+#Sorry, no 64 bit support for Voodoo1 (yet)
 %ifarch %{ix86}
-mkdir build-2
-cd build-2
-ln -s ../configure configure
-%configure \
-        %{configure_flags} \
-        --enable-fx-glide-hw=cvg
-make -f makefile.autoconf all
-cd ..
+make -f makefile.linux FX_GLIDE_HW=sst1 \
+  OPTFLAGS="$RPM_OPT_FLAGS -Wno-unused-parameter" %{glide_flags}
+mv sst1/lib/libglide3x.so libglide3-v1.so
+make -f makefile.linux FX_GLIDE_HW=sst1 realclean
 %endif
 
+
 %install
 rm -rf $RPM_BUILD_ROOT
-cd build-5
-make -f makefile.autoconf install DESTDIR=$RPM_BUILD_ROOT
-
 %define libver 3.10.0
-mkdir -p $RPM_BUILD_ROOT/usr/sbin
 mkdir -p $RPM_BUILD_ROOT/%{_libdir}
-mv $RPM_BUILD_ROOT%{_libdir}/libglide3.so.%{libver} \
-	$RPM_BUILD_ROOT/%{_libdir}/libglide3-v5.so
-install -m 755 ../build-3/h3/glide3/src/.libs/libglide3.so.%{libver} \
-	$RPM_BUILD_ROOT/%{_libdir}/libglide3-v3.so
-%ifarch %{ix86}
-install -m 755 ../build-2/cvg/glide3/src/.libs/libglide3.so.%{libver} \
-	$RPM_BUILD_ROOT/%{_libdir}/libglide3-v2.so
-%endif
+mkdir -p $RPM_BUILD_ROOT/%{_includedir}/glide3
 
-# For ix86 Point to v2 by default else v5, ldconfig doesn't like this?
-%ifarch %{ix86}
+install -m 755 *.so $RPM_BUILD_ROOT/%{_libdir}
+# Point to v2 by default
 ln -snf libglide3-v2.so $RPM_BUILD_ROOT%{_libdir}/libglide3.so.%{libver}
-%else
-ln -snf libglide3-v5.so $RPM_BUILD_ROOT%{_libdir}/libglide3.so.%{libver}
-%endif
 ln -snf libglide3.so.%{libver} $RPM_BUILD_ROOT%{_libdir}/libglide3.so.3
+ln -snf libglide3.so.%{libver} $RPM_BUILD_ROOT%{_libdir}/libglide3.so
 
-# We are not installing these, so lets delete them
-rm -f $RPM_BUILD_ROOT%{_libdir}/libglide3.{a,la}
+install -p -m 644 swlibs/fxmisc/3dfx.h $RPM_BUILD_ROOT/%{_includedir}/glide3
+install -p -m 644 h5/glide3/src/g3ext.h $RPM_BUILD_ROOT/%{_includedir}/glide3
+install -p -m 644 h5/glide3/src/glide.h $RPM_BUILD_ROOT/%{_includedir}/glide3
+install -p -m 644 h5/glide3/src/glidesys.h $RPM_BUILD_ROOT/%{_includedir}/glide3
+install -p -m 644 h5/glide3/src/glideutl.h $RPM_BUILD_ROOT/%{_includedir}/glide3
+install -p -m 644 swlibs/fxmisc/linutil.h $RPM_BUILD_ROOT/%{_includedir}/glide3
+install -p -m 644 h5/incsrc/sst1vid.h $RPM_BUILD_ROOT/%{_includedir}/glide3
+install -p -m 644 swlibs/texus2/lib/texus.h $RPM_BUILD_ROOT/%{_includedir}/glide3
 
 
 %clean
@@ -144,8 +117,9 @@
 %{_libdir}/libglide3.so.3
 %{_libdir}/libglide3.so.%{libver}
 %ifarch %{ix86}
-%{_libdir}/libglide3-v2.so
+%{_libdir}/libglide3-v1.so
 %endif
+%{_libdir}/libglide3-v2.so
 %{_libdir}/libglide3-v3.so
 %{_libdir}/libglide3-v5.so
 
@@ -156,8 +130,20 @@
 %{_libdir}/libglide3.so
 
 
-
 %changelog
+* Fri Feb 17 2006 Hans de Goede <j.w.r.degoede at hhs.nl> 20050815-1
+- Sync FC-4 version with devel-branch, this incorperates the following:
+- Work together with upstream to keep Glide alive, use upstream CVS
+  glide-devel-branch as a base.
+- Intergrate all our patches into upstream CVS glide-devel-branch.
+- New upstream branch (re)adds support for Voodoo1 (sst1).
+- Make Voodoo2 (cvg) code 64 bit clean (merged upstream).
+- Add -soname to linkerflags, so that we report the correct soname,
+  otherwise rpm can't properly resolve dependencies because of the
+  symlink stuff we do (merged upstream).
+- Add a patch which fixes gcc4.1 warnings
+- add %%{?dist} for consistency with my other packages
+
 * Mon May  9 2005 Hans de Goede <j.w.r.degoede at hhs.nl>
 - Change -L/usr/X11R6/lib to -L/usr/X11R6/lib64 when building on
   x86_64 .


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/Glide3/FC-4/sources,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- sources	28 Apr 2005 18:39:19 -0000	1.2
+++ sources	17 Feb 2006 09:26:25 -0000	1.3
@@ -1 +1 @@
-6cd7e5926c2a97bb96add94ca6a54a0c  Glide3-20010520.tar.bz2
+7d180579776f363faeea2bd8b09b5964  Glide3-20050815.tar.bz2


--- Glide3-64bit.patch DELETED ---


--- Glide3-amd3dnow.patch DELETED ---


--- Glide3-fixes.patch DELETED ---


--- Glide3-gcc4.patch DELETED ---


--- Glide3-lib64.patch DELETED ---


--- Glide3-new-autotools-bugfix.patch DELETED ---


--- Glide3-redhat-cleanup-1.patch DELETED ---




More information about the scm-commits mailing list