aboutsummaryrefslogtreecommitdiffstats
path: root/x11-servers
diff options
context:
space:
mode:
authordanfe <danfe@FreeBSD.org>2007-07-01 04:38:21 +0800
committerdanfe <danfe@FreeBSD.org>2007-07-01 04:38:21 +0800
commit4aec882196558e08a52fb6007936807c0b1854cf (patch)
tree9c4d711c3e39f5f055946b59baedefdb07428fc4 /x11-servers
parenteef3081148f8690f7f50214101fde94389ac6220 (diff)
downloadfreebsd-ports-gnome-4aec882196558e08a52fb6007936807c0b1854cf.tar.gz
freebsd-ports-gnome-4aec882196558e08a52fb6007936807c0b1854cf.tar.zst
freebsd-ports-gnome-4aec882196558e08a52fb6007936807c0b1854cf.zip
- Fix the build with recent GCC [1]
- Pet portlint(1) - Clean up Makefile Reported by: pointyhat (logs) [1]
Diffstat (limited to 'x11-servers')
-rw-r--r--x11-servers/driglide/Makefile28
-rw-r--r--x11-servers/driglide/files/patch-h5_glide3_src_glfb.c73
-rw-r--r--x11-servers/driglide/files/patch-swlibs_fxmisc_fxos.c44
3 files changed, 135 insertions, 10 deletions
diff --git a/x11-servers/driglide/Makefile b/x11-servers/driglide/Makefile
index a56537c835a9..c01d8dc398fa 100644
--- a/x11-servers/driglide/Makefile
+++ b/x11-servers/driglide/Makefile
@@ -15,26 +15,34 @@ MASTER_SITE_SUBDIR= anholt/driglide/
MAINTAINER= ports@FreeBSD.org
COMMENT= Libraries to support 3dfx Voodoo3/4/5/Banshee with the DRI
-USE_BZIP2= yes
-USE_X_PREFIX= yes
+USE_BZIP2= yes
USE_LDCONFIG= yes
USE_AUTOTOOLS= automake:14 autoconf:253 libtool:15
-AUTOMAKE_ARGS= -a
-USE_GMAKE= yes
-MAKE_ARGS= PREPROCESSOR=/usr/bin/cpp
+AUTOMAKE_ARGS= -a
+USE_GMAKE= yes
+MAKE_ARGS= PREPROCESSOR=/usr/bin/cpp
# Not yet ported to Alpha.
-ONLY_FOR_ARCHS= i386
+ONLY_FOR_ARCHS= i386
# Glide DOES NOT work with CFLAGS greater than -O2
CFLAGS+= -O
post-patch:
- @${REINPLACE_CMD} -e 's|/usr/X11R6|${X11BASE}|g' ${WRKSRC}/configure.in
- @${REINPLACE_CMD} -e 's|/usr/X11R6|${X11BASE}|g' ${WRKSRC}/h3/glide3/src/Makefile.am
- @${REINPLACE_CMD} -e 's|/usr/X11R6|${X11BASE}|g' ${WRKSRC}/h5/glide3/src/Makefile.am
+ @${REINPLACE_CMD} -e 's|/usr/X11R6|${X11BASE}|g' \
+ ${WRKSRC}/configure.in \
+ ${WRKSRC}/h3/glide3/src/Makefile.am \
+ ${WRKSRC}/h5/glide3/src/Makefile.am
+ @${REINPLACE_CMD} -e \
+ 's|(float \*)pointers +=|pointers += sizeof(float *) *|' \
+ ${WRKSRC}/h3/glide3/src/gaa.c \
+ ${WRKSRC}/h3/glide3/src/gdraw.c \
+ ${WRKSRC}/h3/glide3/src/distrip.c \
+ ${WRKSRC}/h5/glide3/src/gaa.c \
+ ${WRKSRC}/h5/glide3/src/gdraw.c \
+ ${WRKSRC}/h5/glide3/src/distrip.c
pre-configure:
- @cd $(WRKSRC) && ${ACLOCAL} -I ${LOCALBASE}/share/aclocal
+ @cd ${WRKSRC} && ${ACLOCAL} -I ${LOCALBASE}/share/aclocal
@${REINPLACE_CMD} -e '/^_LT_AC_SHELL_INIT/d' ${WRKSRC}/aclocal.m4
.include <bsd.port.mk>
diff --git a/x11-servers/driglide/files/patch-h5_glide3_src_glfb.c b/x11-servers/driglide/files/patch-h5_glide3_src_glfb.c
new file mode 100644
index 000000000000..e8cb294eba57
--- /dev/null
+++ b/x11-servers/driglide/files/patch-h5_glide3_src_glfb.c
@@ -0,0 +1,73 @@
+--- h5/glide3/src/glfb.c.orig Thu Jan 16 01:23:50 2003
++++ h5/glide3/src/glfb.c Sun Jul 1 03:06:16 2007
+@@ -1014,17 +1014,28 @@
+ FXFALSE,
+ &info))
+ {
+- FxU32 *src,*dst;
++ union {
++ FxU32 *src;
++ FxU16 *src16;
++ FxU8 *src8;
++ } s;
++
++ union {
++ FxU32 *dst;
++ FxU16 *dst16;
++ FxU8 *dst8;
++ } d;
++
+ FxI32 length,scanline;
+ FxU32 src_adjust,dst_adjust,tmp;
+
+- src=(FxU32 *) (((char*)info.lfbPtr)+
++ s.src=(FxU32 *) (((char*)info.lfbPtr)+
+ (src_y*info.strideInBytes) + (src_x * bpp));
+- dst=dst_data;
++ d.dst=dst_data;
+ scanline=src_height;
+
+ /* set length - alignment fix*/
+- tmp=(((AnyPtr)src)&2);
++ tmp=(((AnyPtr)s.src)&2);
+ length=src_width * bpp - tmp;
+ src_adjust=info.strideInBytes - tmp;
+ dst_adjust=dst_stride - tmp;
+@@ -1035,8 +1046,8 @@
+ while(src_height--)
+ {
+ /* adjust starting alignment */
+- if (((AnyPtr)src)&3)
+- *((FxU16 *)dst)++=*((FxU16 *)src)++;
++ if (((AnyPtr)s.src)&3)
++ *d.dst16++ = *s.src16++;
+
+ /* read in dwords of pixels */
+ if(length)
+@@ -1047,16 +1058,21 @@
+ /* copies aligned dwords */
+ do
+ {
+- *((FxU32 *)(((AnyPtr)dst) + byte_index))=*((FxU32 *)(((AnyPtr)src) + byte_index));
++ FxU32 *dst = (FxU32 *)(((AnyPtr)dst) + byte_index);
++ FxU32 *src = (FxU32 *)(((AnyPtr)src) + byte_index);
++ *dst = *src;
+ }while((byte_index+=4)<aligned);
+
+ /* handle backend misalignment */
+- if (byte_index!=(FxU32)length)
+- *((FxU16 *)(((AnyPtr)dst) + byte_index))=*((FxU16 *)(((AnyPtr)src) + byte_index));
++ if (byte_index!=(FxU32)length) {
++ FxU16 *dst = (FxU16 *)(((AnyPtr)dst) + byte_index);
++ FxU16 *src = (FxU16 *)(((AnyPtr)src) + byte_index);
++ *dst = *src;
++ }
+ }
+ /* adjust for next line */
+- ((FxU8 *)src)+=src_adjust;
+- ((FxU8 *)dst)+=dst_adjust;
++ s.src8+=src_adjust;
++ d.dst8+=dst_adjust;
+ }
+ rv=FXTRUE;
+ /* unlock buffer */
diff --git a/x11-servers/driglide/files/patch-swlibs_fxmisc_fxos.c b/x11-servers/driglide/files/patch-swlibs_fxmisc_fxos.c
new file mode 100644
index 000000000000..4e46358970f9
--- /dev/null
+++ b/x11-servers/driglide/files/patch-swlibs_fxmisc_fxos.c
@@ -0,0 +1,44 @@
+--- swlibs/fxmisc/fxos.c.orig Wed Jan 15 10:01:58 2003
++++ swlibs/fxmisc/fxos.c Sun Jul 1 01:56:10 2007
+@@ -27,13 +27,22 @@
+
+ #include <fxos.h>
+
+-/* 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>
++#elif defined(__FreeBSD__)
++# include <sys/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__ )
+ struct timeb tb;
+ static time_t once; // saves first time value
+
+@@ -43,15 +52,11 @@
+ return (tb.time - once) + tb.millitm * .001;
+
+ #elif defined(__FreeBSD__)
+-#include <sys/time.h>
+ struct timeval t;
+ struct timezone tz;
+ gettimeofday(&t, &tz);
+ return ((float)t.tv_sec + ((float)t.tv_usec)/1000000.0);
+ #else
+-# include <sys/types.h>
+-# include <sys/times.h>
+-# include <sys/param.h>
+ struct tms foo;
+ return times(&foo)/(float)HZ;
+ #endif