%bcond_with glide3_sdk # build glide3x SDK here (normally built from Glide_V5-DRI.spec)
#
%define snapdate 20010309
-%define rel 16
+%define rel 17
Summary: Glide runtime for 3Dfx Voodoo Banshee and Voodoo3 boards
Summary(ko.UTF-8): 3Dfx 부두 벤쉬/3 비디오카드용 Glide 런타임 라이브러리
Summary(pl.UTF-8): Biblioteki Glide dla kart 3Dfx Voodoo Banshee oraz Voodoo3
Patch8: glide-gcc34.patch
Patch9: glide-gcc4.patch
Patch10: glide-no_redefine_macro.patch
+Patch11: glide-format.patch
+Patch12: glide-include.patch
URL: http://glide.sourceforge.net/
BuildRequires: autoconf
BuildRequires: automake
%patch8 -p1
%patch9 -p2
%patch10 -p1
+%patch11 -p1
+%patch12 -p1
%build
%{__libtoolize}
--- /dev/null
+--- glide3x-20010309/swlibs/fxmisc/fximg.c.orig 2013-09-23 20:58:11.901484168 +0200
++++ glide3x-20010309/swlibs/fxmisc/fximg.c 2013-09-23 21:05:44.205839503 +0200
+@@ -1949,8 +1949,8 @@
+ char buf[1024], *p;
+ strcpy(buf,prefix); // copy and replace semicolon
+ if ((p = strchr(buf,';')) != NULL) *p = '\0';
+- fprintf(stderr,buf);
+- fprintf(stderr,"/");
++ fputs(buf,stderr);
++ fputs("/",stderr);
+ }
+ fprintf (stderr,"%s (%ldx%ld) ...", filename, info->any.width,info->any.height);
+ fflush(stderr);
+--- glide3x-20010309/swlibs/newpci/pcilib/fxlinux.c.orig 2013-09-23 21:11:16.631291071 +0200
++++ glide3x-20010309/swlibs/newpci/pcilib/fxlinux.c 2013-09-23 21:15:00.308354535 +0200
+@@ -184,7 +184,7 @@
+ static FxBool
+ pciOutputStringLinux(const char *msg)
+ {
+- printf(msg);
++ fputs(msg,stdout);
+ return FXTRUE;
+ }
+
+--- glide3x-20010309/swlibs/texus2/lib/eigen.c.orig 2000-08-03 02:27:18.000000000 +0200
++++ glide3x-20010309/swlibs/texus2/lib/eigen.c 2013-09-23 21:16:20.665422963 +0200
+@@ -409,7 +409,7 @@
+ int i;
+
+ if (title) {
+- fprintf(stdout, title);
++ fputs(title, stdout);
+ }
+
+ if (input) {
--- /dev/null
+--- glide3x-20010309/swlibs/fxmisc/fxos.c.orig 2013-09-23 21:06:22.480951884 +0200
++++ glide3x-20010309/swlibs/fxmisc/fxos.c 2013-09-23 21:10:39.596235960 +0200
+@@ -43,13 +43,21 @@
+ #include <fxos.h>
+ #endif
+ #if !macintosh
++#if defined ( __sparc__ ) || defined ( __DJGPP__ )
++# include <sys/types.h>
++# include <sys/timeb.h>
++#elif defined ( WIN32 ) || ( __DOS__ )
++# include <time.h>
++#else
++# include <sys/types.h>
++# include <sys/times.h>
++# include <sys/param.h>
++#endif
+ /* return current time in seconds (floating point) */
+ float fxTime(void)
+ {
+ #if defined ( __sparc__ ) || defined ( __DJGPP__ )
+ /* times returns 0 in BSD Unix, so we use ftime instead */
+-# include <sys/types.h>
+-# include <sys/timeb.h>
+ struct timeb tb;
+ static time_t once; // saves first time value
+
+@@ -60,13 +68,9 @@
+
+ #else
+ #if defined ( WIN32 ) || ( __DOS__ )
+-# include <time.h>
+ # define times(a) clock()
+ # define HZ CLOCKS_PER_SEC
+ #else
+-# include <sys/types.h>
+-# include <sys/times.h>
+-# include <sys/param.h>
+ struct tms foo;
+ #endif
+ return times(&foo)/(float)HZ;