+#
+# _with_3dnow - with 3Dnow! instructions
%define snapdate 20010309
Summary: Glide runtime for 3Dfx Voodoo Banshee and Voodoo3 boards
Summary(pl): Biblioteki Glide dla kart 3Dfx Voodoo Banshee oraz Voodoo3
URL: http://glide.sourceforge.net/
Source0: cvs://anonymous@cvs.glide.sourceforge.net:/cvsroot/glide/glide3x-%{snapdate}.tar.gz
Patch0: glide-ia64.patch
+Patch1: glide-ac-workaround.patch
+Patch2: glide-h3.patch
+Patch3: glide-h5.patch
Vendor: 3dfx Interactive Inc.
Icon: 3dfx.gif
BuildRequires: XFree86-devel
%prep
%setup -q -n glide3x-%{snapdate}
%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
%build
rm -f missing
%configure \
--enable-fx-dri-build \
--enable-fx-glide-hw=h3 \
- --enable-fx-debug=no
+ --enable-fx-debug=no \
+ %{?_with_3dnow:--enable-amd3d}
-%{__make} -f makefile.autoconf all
+%{__make} -f makefile.autoconf all \
+ GLIDE_DEBUG_GCFLAGS="%{rpmcflags} %{!?debug:-fomit-frame-pointer -ffast-math}" \
+ GLIDE_DEBUG_GDEFS="%{!?debug:-DBIG_OPT} %{?debug:-DGDBG_INFO_ON -DGLIDE_DEBUG}"
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT%{_examplesdir}/glide3/tests
+# something is recompiled - use GCFLAGS too
%{__make} -f makefile.autoconf install \
+ GLIDE_DEBUG_GCFLAGS="%{rpmcflags} %{!?debug:-fomit-frame-pointer -ffast-math}" \
+ GLIDE_DEBUG_GDEFS="%{!?debug:-DBIG_OPT} %{?debug:-DGDBG_INFO_ON -DGLIDE_DEBUG}" \
DESTDIR=$RPM_BUILD_ROOT
-ln -s libglide3.so.%{version} $RPM_BUILD_ROOT%{_libdir}/libglide3x_V3.so
-ln -s libglide3.so.%{version} $RPM_BUILD_ROOT%{_libdir}/libglide3x.so
+ln -sf libglide3.so.%{version} $RPM_BUILD_ROOT%{_libdir}/libglide3x_V3.so
+ln -sf libglide3.so.%{version} $RPM_BUILD_ROOT%{_libdir}/libglide3x.so
# Install the examples and their source, no binaries
install h3/glide3/tests/makefile.distrib $RPM_BUILD_ROOT%{_examplesdir}/glide3/tests/makefile
--- /dev/null
+--- glide3x-20010309/configure.in.orig Tue Jul 31 12:09:28 2001
++++ glide3x-20010309/configure.in Tue Jul 31 12:08:38 2001
+@@ -143,7 +143,7 @@
+ [dnl
+ --enable-build-architecture Enable AMD 3DNow instructions [default=current]],
+ [case ${enableval} in
+- i[3456]86|alpha)
++ i[[3456]]86|alpha)
+ FX_GLIDE_BUILD_ARCHITECTURE=${enableval}
+ ;;
+ *)
+@@ -171,7 +171,7 @@
+ GLIDE_SANITY_SIZE=false
+ FX_DLL_BUILD=false
+ FX_GLIDE_HW_CULL=false
+-ARCH=`uname -m | sed "s|[456]86|386|g"`
++ARCH=`uname -m | sed "s|[[456]]86|386|g"`
+ if test "$ARCH" = "i386" ; then
+ FX_GLIDE_CTRISETUP=false
+ else
--- /dev/null
+--- glide3x-20010309/h3/glide3/src/makefile.autoconf.am.orig Tue Jul 31 12:16:45 2001
++++ glide3x-20010309/h3/glide3/src/makefile.autoconf.am Tue Jul 31 12:16:37 2001
+@@ -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,31 +138,30 @@
+ #
+ # Special rules for assembly files.
+ #
+-xdraw2.o : xdraw2.S xdraw2.inc.S fxgasm.h
+- $(CC) $(AFLAGS) -c -o $@ xdraw2.S
++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
+
--- /dev/null
+--- glide3x-20010309/h5/glide3/src/makefile.autoconf.am.orig Tue Oct 31 04:25:45 2000
++++ glide3x-20010309/h5/glide3/src/makefile.autoconf.am Tue Jul 31 12:34:22 2001
+@@ -155,38 +155,32 @@
+ PREPROCESSOR=/lib/cpp -$$ -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
+
+ cpudtect.o cpudtect.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
+
+ #
+@@ -190,7 +190,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
+--- glide3x-20010309/h5/glide3/src/fifo.c.orig Tue Jul 31 12:38:36 2001
++++ glide3x-20010309/h5/glide3/src/fifo.c Tue Jul 31 15:28:31 2001
+@@ -1181,7 +1181,7 @@
+
+
+ long
+-_griHwFifoPtr(FxBool ignored)
++_grHwFifoPtr(FxBool ignored)
+ {
+ long rVal = 0;
+