Index: graphics/libGL/Makefile =================================================================== RCS file: /home/ncvs/ports/graphics/libGL/Makefile,v retrieving revision 1.15 diff -u -r1.15 Makefile --- graphics/libGL/Makefile 25 Mar 2010 23:11:21 -0000 1.15 +++ graphics/libGL/Makefile 28 Mar 2010 00:52:19 -0000 @@ -7,6 +7,7 @@ PORTNAME= libGL PORTVERSION= ${MESAVERSION} +PORTREVISION= 1 CATEGORIES= graphics COMMENT= OpenGL library that renders using GLX or DRI @@ -17,10 +18,6 @@ USE_XORG= glproto x11 xext xxf86vm xdamage xfixes dri2proto:both -.ifndef WITHOUT_NOUVEAU -EXTRA_PATCHES+= ${FILESDIR}/mesalib74-configure -.endif - do-install: ${RM} ${WRKSRC}/include/GL/glu*.h cd ${WRKSRC}/src/mesa; ${GMAKE} install-libgl Index: graphics/libGL/bsd.mesalib.mk =================================================================== RCS file: /home/ncvs/ports/graphics/libGL/bsd.mesalib.mk,v retrieving revision 1.16 diff -u -r1.16 bsd.mesalib.mk --- graphics/libGL/bsd.mesalib.mk 7 Feb 2010 11:51:05 -0000 1.16 +++ graphics/libGL/bsd.mesalib.mk 28 Mar 2010 00:52:19 -0000 @@ -25,10 +25,15 @@ MESABASEVERSION= 7.6.1 MESASUBVERSION= PLIST_SUB+= MESALIB76= MESALIB74="@comment " +EXTRA_PATCHES+= ${FILESDIR}/mesalib76-configure \ + ${FILESDIR}/mesalib76-src_mesa_ppc_common_ppc.c +CONFIGURE_ARGS= --disable-gallium .else MESABASEVERSION= 7.4.4 MESASUBVERSION= PLIST_SUB+= MESALIB74= MESALIB76="@comment " +EXTRA_PATCHES+= ${FILESDIR}/mesalib74-configure \ + ${FILESDIR}/mesalib74-src_mesa_ppc_common_ppc.c .endif MASTER_SITES?= ftp://ftp.freedesktop.org/pub/mesa/${MESABASEVERSION}/:mesa,glut,demos @@ -44,14 +49,14 @@ CONFIGURE_ENV= CPPFLAGS=-I${LOCALBASE}/include \ LDFLAGS=-L${LOCALBASE}/lib -CONFIGURE_ARGS= --disable-gallium ALL_TARGET= default #MAKE_ARGS= SHELL=${SH} #CFLAGS+= -DUSE_XSHM -DHZ=100 -#FILESDIR= ${.CURDIR}/../../graphics/libGL/files +FILESDIR= ${.CURDIR}/../../graphics/libGL/files +PATCHDIR= ${.CURDIR}/../../graphics/libGL/files WRKSRC= ${WRKDIR}/Mesa-${MESABASEVERSION} .if !defined(ARCH) Index: graphics/libGL/files/extra-patch-progs-xdemos-glxpixmap.c =================================================================== RCS file: graphics/libGL/files/extra-patch-progs-xdemos-glxpixmap.c diff -N graphics/libGL/files/extra-patch-progs-xdemos-glxpixmap.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ graphics/libGL/files/extra-patch-progs-xdemos-glxpixmap.c 28 Mar 2010 00:52:19 -0000 @@ -0,0 +1,11 @@ +--- progs/xdemos/glxpixmap.c.orig Fri Apr 6 22:29:09 2007 ++++ progs/xdemos/glxpixmap.c Fri Apr 6 22:38:33 2007 +@@ -105,7 +105,7 @@ + * to render correctly. This is because Mesa allows RGB rendering + * into any kind of visual, not just TrueColor or DirectColor. + */ +-#ifdef GLX_MESA_pixmap_colormap ++#if defined(GLX_MESA_pixmap_colormap) && !defined(WITH_NVIDIA_GL) + if (strstr(glXQueryExtensionsString(dpy, 0), "GLX_MESA_pixmap_colormap")) { + /* stand-alone Mesa, specify the colormap */ + glxpm = glXCreateGLXPixmapMESA( dpy, visinfo, pm, attr.colormap ); Index: graphics/libGL/files/extra-patch-progs-xdemos-yuvrect_client.c =================================================================== RCS file: graphics/libGL/files/extra-patch-progs-xdemos-yuvrect_client.c diff -N graphics/libGL/files/extra-patch-progs-xdemos-yuvrect_client.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ graphics/libGL/files/extra-patch-progs-xdemos-yuvrect_client.c 28 Mar 2010 00:52:19 -0000 @@ -0,0 +1,28 @@ +--- progs/xdemos/yuvrect_client.c.orig Fri Apr 6 22:42:30 2007 ++++ progs/xdemos/yuvrect_client.c Fri Apr 6 22:48:05 2007 +@@ -140,7 +140,11 @@ + exit(0); + } + +- glx_memory = glXAllocateMemoryMESA(dpy, screen, ImgWidth * ImgHeight * 2, 0, 0 ,0); ++ #ifdef WITH_NVIDIA_GL ++ glx_memory = glXAllocateMemoryNV(ImgWidth * ImgHeight * 2, 0, 0 ,0); ++ #else ++ glx_memory = glXAllocateMemoryMESA(dpy, screen, ImgWidth * ImgHeight * 2, 0, 0 ,0); ++ #endif + if (!glx_memory) + { + fprintf(stderr,"Failed to allocate MESA memory\n"); +@@ -317,7 +321,11 @@ + glXSwapBuffers(dpy, win); + event_loop(dpy, win); + +- glXFreeMemoryMESA(dpy, DefaultScreen(dpy), glx_memory); ++ #ifdef WITH_NVIDIA_GL ++ glXFreeMemoryNV(glx_memory); ++ #else ++ glXFreeMemoryMESA(dpy, DefaultScreen(dpy), glx_memory); ++ #endif + glXDestroyContext(dpy, ctx); + XDestroyWindow(dpy, win); + XCloseDisplay(dpy); Index: graphics/libGL/files/mesalib74-configure =================================================================== RCS file: /home/ncvs/ports/graphics/libGL/files/mesalib74-configure,v retrieving revision 1.1 diff -u -r1.1 mesalib74-configure --- graphics/libGL/files/mesalib74-configure 7 Feb 2010 11:51:06 -0000 1.1 +++ graphics/libGL/files/mesalib74-configure 28 Mar 2010 00:52:19 -0000 @@ -1,6 +1,15 @@ ---- configure.orig 2009-03-28 00:59:46.000000000 +0000 -+++ configure 2009-04-05 11:53:44.000000000 +0000 -@@ -5739,7 +5739,7 @@ +--- configure.orig 2009-06-19 16:17:08.000000000 -0500 ++++ configure 2010-03-27 10:55:40.000000000 -0500 +@@ -4860,7 +4860,7 @@ + ;; + powerpc) + case "$host_os" in +- linux*) ++ linux* | *freebsd*) + asm_arch=ppc + ;; + esac +@@ -5884,7 +5884,7 @@ ;; *freebsd* | dragonfly*) case "$host_cpu" in @@ -9,3 +18,52 @@ esac ;; esac +@@ -8135,12 +8135,31 @@ + CXXFLAGS="$CXXFLAGS -ansi -pedantic" + fi + +- # ffb and gamma are missing because they have not been converted +- # to use the new interface. +- if test "x$DRI_DIRS" = "xyes"; then +- DRI_DIRS="i810 i915 i965 mach64 mga r128 r200 r300 radeon tdfx \ +- unichrome savage sis swrast" +- fi ++ case "$host_cpu" in ++ x86_64) ++ # ffb, gamma, and sis are missing because they have not be ++ # converted to use the new interface. i810 are missing ++ # because there is no x86-64 system where they could *ever* ++ # be used. ++ if test "x$DRI_DIRS" = "xyes"; then ++ DRI_DIRS="i915 i965 mach64 mga r128 r200 r300 radeon \ ++ savage tdfx unichrome swrast" ++ fi ++ ;; ++ powerpc*) ++ # Build only the drivers for cards that exist on PowerPC. ++ # At some point MGA will be added, but not yet. ++ if test "x$DRI_DIRS" = "xyes"; then ++ DRI_DIRS="mach64 r128 r200 r300 radeon tdfx swrast" ++ fi ++ ;; ++ sparc*) ++ # Build only the drivers for cards that exist on sparc` ++ if test "x$DRI_DIRS" = "xyes"; then ++ DRI_DIRS="mach64 r128 r200 r300 radeon ffb swrast" ++ fi ++ ;; ++ esac + ;; + solaris*) + DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER" +@@ -8153,8 +8172,8 @@ + + # default drivers + if test "x$DRI_DIRS" = "xyes"; then +- DRI_DIRS="i810 i915 i965 mach64 mga r128 r200 r300 radeon s3v \ +- savage sis tdfx trident unichrome ffb swrast" ++ DRI_DIRS="i810 i915 i965 mach64 mga r128 r200 r300 radeon \ ++ savage sis tdfx unichrome ffb swrast" + fi + + DRI_DIRS=`echo "$DRI_DIRS" | $SED 's/ */ /g'` Index: graphics/libGL/files/mesalib74-src_mesa_ppc_common_ppc.c =================================================================== RCS file: graphics/libGL/files/mesalib74-src_mesa_ppc_common_ppc.c diff -N graphics/libGL/files/mesalib74-src_mesa_ppc_common_ppc.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ graphics/libGL/files/mesalib74-src_mesa_ppc_common_ppc.c 28 Mar 2010 00:52:19 -0000 @@ -0,0 +1,45 @@ +--- src/mesa/ppc/common_ppc.c.orig 2009-06-17 12:31:54.000000000 -0500 ++++ src/mesa/ppc/common_ppc.c 2010-03-27 15:52:17.000000000 -0500 +@@ -35,8 +35,12 @@ + #include + + #ifdef USE_PPC_ASM ++#ifdef __FreeBSD__ ++#include ++#else + #include + #endif ++#endif + + #include "common_ppc_features.h" + +@@ -56,6 +60,17 @@ + void _mesa_init_all_ppc_transform_asm( void ) + { + #ifdef USE_PPC_ASM ++#ifdef __FreeBSD__ ++ int cpu_features, error; ++ size_t length; ++ ++ length = sizeof(cpu_features); ++ error = sysctlbyname("hw.cpu_features", &cpu_features, ++ &length, NULL, 0); ++ if (error == 0 && cpu_features != 0) ++ _mesa_ppc_cpu_features |= cpu_features; ++ ++#else + const pid_t my_pid = getpid(); + char file_name[32]; + FILE * f; +@@ -83,9 +98,10 @@ + + fclose( f ); + } ++#endif + + # ifndef USE_VMX_ASM +- _mesa_ppc_cpu_features &= ~PPC_FEATURES_HAS_ALTIVEC; ++ _mesa_ppc_cpu_features &= ~PPC_FEATURE_HAS_ALTIVEC; + # endif + #endif + } Index: graphics/libGL/files/mesalib76-configure =================================================================== RCS file: graphics/libGL/files/mesalib76-configure diff -N graphics/libGL/files/mesalib76-configure --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ graphics/libGL/files/mesalib76-configure 28 Mar 2010 00:52:19 -0000 @@ -0,0 +1,68 @@ +--- configure.orig 2009-12-21 20:31:30.000000000 -0600 ++++ configure 2010-03-27 10:41:52.000000000 -0500 +@@ -4842,14 +4842,14 @@ + ;; + powerpc) + case "$host_os" in +- linux*) ++ linux* | *freebsd*) + asm_arch=ppc + ;; + esac + ;; + sparc*) + case "$host_os" in +- linux*) ++ linux* | *freebsd*) + asm_arch=sparc + ;; + esac +@@ -6946,12 +6946,31 @@ + CXXFLAGS="$CXXFLAGS -ansi -pedantic" + fi + +- # ffb and gamma are missing because they have not been converted +- # to use the new interface. +- if test "x$DRI_DIRS" = "xyes"; then +- DRI_DIRS="i810 i915 i965 mach64 mga r128 r200 r300 r600 radeon tdfx \ +- unichrome savage sis swrast" +- fi ++ case "$host_cpu" in ++ x86_64) ++ # ffb, gamma, and sis are missing because they have not be ++ # converted to use the new interface. i810 are missing ++ # because there is no x86-64 system where they could *ever* ++ # be used. ++ if test "x$DRI_DIRS" = "xyes"; then ++ DRI_DIRS="i915 i965 mach64 mga r128 r200 r300 r600 radeon \ ++ savage tdfx unichrome swrast" ++ fi ++ ;; ++ powerpc*) ++ # Build only the drivers for cards that exist on PowerPC. ++ # At some point MGA will be added, but not yet. ++ if test "x$DRI_DIRS" = "xyes"; then ++ DRI_DIRS="mach64 r128 r200 r300 r600 radeon tdfx swrast" ++ fi ++ ;; ++ sparc*) ++ # Build only the drivers for cards that exist on sparc` ++ if test "x$DRI_DIRS" = "xyes"; then ++ DRI_DIRS="mach64 r128 r200 r300 r600 radeon ffb swrast" ++ fi ++ ;; ++ esac + ;; + gnu*) + DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER" +@@ -6968,8 +6987,8 @@ + + # default drivers + if test "x$DRI_DIRS" = "xyes"; then +- DRI_DIRS="i810 i915 i965 mach64 mga r128 r200 r300 r600 radeon s3v \ +- savage sis tdfx trident unichrome ffb swrast" ++ DRI_DIRS="i810 i915 i965 mach64 mga r128 r200 r300 r600 radeon \ ++ savage sis tdfx unichrome ffb swrast" + fi + + DRI_DIRS=`echo "$DRI_DIRS" | $SED 's/ */ /g'` Index: graphics/libGL/files/mesalib76-src_mesa_ppc_common_ppc.c =================================================================== RCS file: graphics/libGL/files/mesalib76-src_mesa_ppc_common_ppc.c diff -N graphics/libGL/files/mesalib76-src_mesa_ppc_common_ppc.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ graphics/libGL/files/mesalib76-src_mesa_ppc_common_ppc.c 28 Mar 2010 00:52:19 -0000 @@ -0,0 +1,41 @@ +--- src/mesa/ppc/common_ppc.c.orig 2009-06-17 13:35:17.000000000 -0500 ++++ src/mesa/ppc/common_ppc.c 2010-03-27 17:37:12.000000000 -0500 +@@ -35,8 +35,12 @@ + #include + + #ifdef USE_PPC_ASM ++#ifdef __FreeBSD__ ++#include ++#else + #include + #endif ++#endif + + #include "common_ppc_features.h" + +@@ -56,6 +60,17 @@ + void _mesa_init_all_ppc_transform_asm( void ) + { + #ifdef USE_PPC_ASM ++#ifdef __FreeBSD__ ++ int cpu_features, error; ++ size_t length; ++ ++ length = sizeof(cpu_features); ++ error = sysctlbyname("hw.cpu_features", &cpu_features, ++ &length, NULL, 0); ++ if (error == 0 && cpu_features != 0) ++ _mesa_ppc_cpu_features |= cpu_features; ++ ++#else + const pid_t my_pid = getpid(); + char file_name[32]; + FILE * f; +@@ -83,6 +98,7 @@ + + fclose( f ); + } ++#endif + + # ifndef USE_VMX_ASM + _mesa_ppc_cpu_features &= ~PPC_FEATURE_HAS_ALTIVEC; Index: graphics/libGL/files/patch-mach64_context.h =================================================================== RCS file: graphics/libGL/files/patch-mach64_context.h diff -N graphics/libGL/files/patch-mach64_context.h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ graphics/libGL/files/patch-mach64_context.h 28 Mar 2010 00:52:19 -0000 @@ -0,0 +1,27 @@ +--- src/mesa/drivers/dri/mach64/mach64_context.h.orig 2009-01-21 10:55:48.000000000 -0500 ++++ src/mesa/drivers/dri/mach64/mach64_context.h 2009-01-22 13:48:00.000000000 -0500 +@@ -288,17 +288,20 @@ + /* ================================================================ + * Byte ordering + */ +-#if MESA_LITTLE_ENDIAN == 1 ++#if defined(MESA_LITTLE_ENDIAN) && MESA_LITTLE_ENDIAN == 1 + #define LE32_IN( x ) ( *(GLuint *)(x) ) + #define LE32_IN_FLOAT( x ) ( *(GLfloat *)(x) ) + #define LE32_OUT( x, y ) do { *(GLuint *)(x) = (y); } while (0) + #define LE32_OUT_FLOAT( x, y ) do { *(GLfloat *)(x) = (y); } while (0) + #else +-#ifndef __OpenBSD__ +-#include +-#else ++#if defined(__OpenBSD__) + #include + #define bswap_32 bswap32 ++#elif defined(__FreeBSD__) ++#include ++#define bswap_32 bswap32 ++#else ++#include + #endif + + #define LE32_IN( x ) bswap_32( *(GLuint *)(x) ) Index: graphics/libGL/files/patch-sis_context.h =================================================================== RCS file: graphics/libGL/files/patch-sis_context.h diff -N graphics/libGL/files/patch-sis_context.h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ graphics/libGL/files/patch-sis_context.h 28 Mar 2010 00:52:19 -0000 @@ -0,0 +1,24 @@ +--- src/mesa/drivers/dri/sis/sis_context.h.orig 2008-09-22 13:38:53.000000000 +0100 ++++ src/mesa/drivers/dri/sis/sis_context.h 2008-09-22 13:40:51.000000000 +0100 +@@ -401,10 +401,20 @@ + #define MMIO_READ(reg) *(volatile GLint *)(smesa->IOBase + (reg)) + #define MMIO_READf(reg) *(volatile GLfloat *)(smesa->IOBase + (reg)) + +-#if defined(__i386__) || defined(__x86_64__) ++#if defined(__alpha__) ++#define MMIO_WMB() __asm __volatile("wmb" : : : "memory") ++#elif defined(__i386__) || defined(__x86_64__) || defined(__amd64__) + #define MMIO_WMB() __asm __volatile("" : : : "memory") + #elif defined(__ia64__) + #define MMIO_WMB() __asm __volatile("mf" : : : "memory") ++#elif defined(__powerpc__) ++#define MMIO_WMB() __asm __volatile("eieio" : : : "memory") ++#elif defined(__sparc64__) ++/* ++ * #StoreStore probably would be sufficient for this driver at the ++ * time of this writing but we use #Sync for safety. ++ */ ++#define MMIO_WMB() __asm __volatile("membar #Sync" : : : "memory") + #else + #error platform needs WMB + #endif Index: graphics/libGL/files/patch-src_mesa_ppc_common_ppc_features.h =================================================================== RCS file: graphics/libGL/files/patch-src_mesa_ppc_common_ppc_features.h diff -N graphics/libGL/files/patch-src_mesa_ppc_common_ppc_features.h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ graphics/libGL/files/patch-src_mesa_ppc_common_ppc_features.h 28 Mar 2010 00:52:19 -0000 @@ -0,0 +1,14 @@ +--- src/mesa/ppc/common_ppc_features.h.orig 2009-01-22 11:38:35.000000000 -0600 ++++ src/mesa/ppc/common_ppc_features.h 2010-03-27 15:07:27.000000000 -0500 +@@ -33,7 +33,11 @@ + #define COMMON_PPC_FEATURES_H + + #ifdef USE_PPC_ASM ++#ifdef __FreeBSD__ ++#include ++#else + #include ++#endif + + extern unsigned long _mesa_ppc_cpu_features; + Index: graphics/libGLU/Makefile =================================================================== RCS file: /home/ncvs/ports/graphics/libGLU/Makefile,v retrieving revision 1.13 diff -u -r1.13 Makefile --- graphics/libGLU/Makefile 25 Mar 2010 23:11:21 -0000 1.13 +++ graphics/libGLU/Makefile 28 Mar 2010 00:52:20 -0000 @@ -7,6 +7,7 @@ PORTNAME= libGLU PORTVERSION= ${MESAVERSION} +PORTREVISION= 1 CATEGORIES= graphics COMMENT= OpenGL utility library @@ -14,10 +15,6 @@ USE_GL= gl USE_XORG= glproto x11 xext xxf86vm xdamage xfixes dri2proto -.ifndef WITHOUT_NOUVEAU -EXTRA_PATCHES+= ${FILESDIR}/mesalib74-configure -.endif - do-install: cd ${WRKSRC}/src/glu; ${GMAKE} install ${INSTALL_DATA} ${WRKSRC}/include/GL/glu*.h ${PREFIX}/include/GL/ Index: graphics/libGLU/files/mesalib74-configure =================================================================== RCS file: graphics/libGLU/files/mesalib74-configure diff -N graphics/libGLU/files/mesalib74-configure --- graphics/libGLU/files/mesalib74-configure 7 Feb 2010 11:51:06 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,11 +0,0 @@ ---- configure.orig 2009-03-28 00:59:46.000000000 +0000 -+++ configure 2009-04-05 11:53:44.000000000 +0000 -@@ -5739,7 +5739,7 @@ - ;; - *freebsd* | dragonfly*) - case "$host_cpu" in -- i*86|x86_64) default_driver="dri";; -+ i*86|x86_64|powerpc*|sparc*) default_driver="dri";; - esac - ;; - esac Index: graphics/libGLw/Makefile =================================================================== RCS file: /home/ncvs/ports/graphics/libGLw/Makefile,v retrieving revision 1.9 diff -u -r1.9 Makefile --- graphics/libGLw/Makefile 25 Mar 2010 23:11:21 -0000 1.9 +++ graphics/libGLw/Makefile 28 Mar 2010 00:52:20 -0000 @@ -7,6 +7,7 @@ PORTNAME= libGLw PORTVERSION= ${MESAVERSION} +PORTREVISION= 1 CATEGORIES= graphics COMMENT= OpenGL widgets library @@ -17,10 +18,6 @@ USE_GL= gl USE_XORG= glproto xt x11 xext xxf86vm xdamage xfixes dri2proto -.ifndef WITHOUT_NOUVEAU -EXTRA_PATCHES+= ${FILESDIR}/mesalib74-configure -.endif - do-install: cd ${WRKSRC}/src/glw; ${GMAKE} install Index: graphics/libGLw/files/mesalib74-configure =================================================================== RCS file: graphics/libGLw/files/mesalib74-configure diff -N graphics/libGLw/files/mesalib74-configure --- graphics/libGLw/files/mesalib74-configure 7 Feb 2010 11:51:06 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,11 +0,0 @@ ---- configure.orig 2009-03-28 00:59:46.000000000 +0000 -+++ configure 2009-04-05 11:53:44.000000000 +0000 -@@ -5739,7 +5739,7 @@ - ;; - *freebsd* | dragonfly*) - case "$host_cpu" in -- i*86|x86_64) default_driver="dri";; -+ i*86|x86_64|powerpc*|sparc*) default_driver="dri";; - esac - ;; - esac Index: graphics/libglut/Makefile =================================================================== RCS file: /home/ncvs/ports/graphics/libglut/Makefile,v retrieving revision 1.24 diff -u -r1.24 Makefile --- graphics/libglut/Makefile 25 Mar 2010 23:11:22 -0000 1.24 +++ graphics/libglut/Makefile 28 Mar 2010 00:52:20 -0000 @@ -7,6 +7,7 @@ PORTNAME= libglut PORTVERSION= ${MESAVERSION} +PORTREVISION= 1 CATEGORIES= graphics MAINTAINER= x11@FreeBSD.org @@ -15,10 +16,6 @@ USE_GL= glu USE_XORG= glproto x11 xext xxf86vm xdamage xfixes xi xmu dri2proto -.ifndef WITHOUT_NOUVEAU -EXTRA_PATCHES+= ${FILESDIR}/mesalib74-configure -.endif - do-install: cd ${WRKSRC}/src/glut/glx; ${GMAKE} install ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \ Index: graphics/libglut/files/mesalib74-configure =================================================================== RCS file: graphics/libglut/files/mesalib74-configure diff -N graphics/libglut/files/mesalib74-configure --- graphics/libglut/files/mesalib74-configure 7 Feb 2010 11:51:07 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,11 +0,0 @@ ---- configure.orig 2009-03-28 00:59:46.000000000 +0000 -+++ configure 2009-04-05 11:53:44.000000000 +0000 -@@ -5739,7 +5739,7 @@ - ;; - *freebsd* | dragonfly*) - case "$host_cpu" in -- i*86|x86_64) default_driver="dri";; -+ i*86|x86_64|powerpc*|sparc*) default_driver="dri";; - esac - ;; - esac Index: graphics/dri/Makefile =================================================================== RCS file: /home/ncvs/ports/graphics/dri/Makefile,v retrieving revision 1.35 diff -u -r1.35 Makefile --- graphics/dri/Makefile 25 Mar 2010 23:11:21 -0000 1.35 +++ graphics/dri/Makefile 28 Mar 2010 00:52:20 -0000 @@ -8,6 +8,7 @@ PORTNAME= dri PORTVERSION= ${MESAVERSION} PORTEPOCH= 2 +PORTREVISION= 1 CATEGORIES= graphics COMMENT= OpenGL hardware acceleration drivers for the DRI @@ -21,10 +22,6 @@ USE_XORG= glproto x11 xext xxf86vm xdamage xfixes dri2proto -.ifndef WITHOUT_NOUVEAU -EXTRA_PATCHES+= ${FILESDIR}/mesalib74-configure -.endif - do-install: cd ${WRKSRC}/src/mesa; ${GMAKE} install-dri @@ -32,7 +29,23 @@ .include -.if ${ARCH} == "ia64" +.if ${ARCH} == "i386" +PLIST_SUB+= ARCH_AMD64= \ + ARCH_POWERPC= \ + ARCH_SPARC64= +.elif ${ARCH} == "amd64" +PLIST_SUB+= ARCH_AMD64="@comment " \ + ARCH_POWERPC= \ + ARCH_SPARC64= +.elif ${ARCH} == "powerpc" +PLIST_SUB+= ARCH_AMD64= \ + ARCH_POWERPC="@comment " \ + ARCH_SPARC64= +.elif ${ARCH} == "sparc64" +PLIST_SUB+= ARCH_AMD64= \ + ARCH_POWERPC= \ + ARCH_SPARC64="@comment " +.elif ${ARCH} == "ia64" BROKEN= Does not install on ia64 .endif Index: graphics/dri/pkg-plist =================================================================== RCS file: /home/ncvs/ports/graphics/dri/pkg-plist,v retrieving revision 1.12 diff -u -r1.12 pkg-plist --- graphics/dri/pkg-plist 7 Feb 2010 11:51:05 -0000 1.12 +++ graphics/dri/pkg-plist 28 Mar 2010 00:52:20 -0000 @@ -1,19 +1,20 @@ include/GL/internal/dri_interface.h -lib/dri/i810_dri.so -lib/dri/i915_dri.so -lib/dri/i965_dri.so +%%ARCH_AMD64%%%%ARCH_POWERPC%%lib/dri/ffb_dri.so +%%ARCH_AMD64%%%%ARCH_POWERPC%%%%ARCH_SPARC64%%lib/dri/i810_dri.so +%%ARCH_POWERPC%%%%ARCH_SPARC64%%lib/dri/i915_dri.so +%%ARCH_POWERPC%%%%ARCH_SPARC64%%lib/dri/i965_dri.so lib/dri/mach64_dri.so -lib/dri/mga_dri.so +%%ARCH_POWERPC%%%%ARCH_SPARC64%%lib/dri/mga_dri.so lib/dri/r128_dri.so lib/dri/r200_dri.so lib/dri/r300_dri.so %%MESALIB76%%lib/dri/r600_dri.so lib/dri/radeon_dri.so -lib/dri/savage_dri.so -lib/dri/sis_dri.so +%%ARCH_POWERPC%%%%ARCH_SPARC64%%lib/dri/savage_dri.so +%%ARCH_AMD64%%%%ARCH_POWERPC%%%%ARCH_SPARC64%%lib/dri/sis_dri.so lib/dri/swrast_dri.so -lib/dri/tdfx_dri.so -lib/dri/unichrome_dri.so +%%ARCH_SPARC64%%lib/dri/tdfx_dri.so +%%ARCH_POWERPC%%%%ARCH_SPARC64%%lib/dri/unichrome_dri.so libdata/pkgconfig/dri.pc @dirrm lib/dri @dirrmtry include/GL/internal Index: graphics/dri/files/mesalib74-configure =================================================================== RCS file: graphics/dri/files/mesalib74-configure diff -N graphics/dri/files/mesalib74-configure --- graphics/dri/files/mesalib74-configure 7 Feb 2010 11:51:05 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,11 +0,0 @@ ---- configure.orig 2009-03-28 00:59:46.000000000 +0000 -+++ configure 2009-04-05 11:53:44.000000000 +0000 -@@ -5739,7 +5739,7 @@ - ;; - *freebsd* | dragonfly*) - case "$host_cpu" in -- i*86|x86_64) default_driver="dri";; -+ i*86|x86_64|powerpc*|sparc*) default_driver="dri";; - esac - ;; - esac Index: graphics/dri/files/patch-mach64_context.h =================================================================== RCS file: graphics/dri/files/patch-mach64_context.h diff -N graphics/dri/files/patch-mach64_context.h --- graphics/dri/files/patch-mach64_context.h 24 Jan 2009 18:13:00 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,27 +0,0 @@ ---- src/mesa/drivers/dri/mach64/mach64_context.h.orig 2009-01-21 10:55:48.000000000 -0500 -+++ src/mesa/drivers/dri/mach64/mach64_context.h 2009-01-22 13:48:00.000000000 -0500 -@@ -288,17 +288,20 @@ - /* ================================================================ - * Byte ordering - */ --#if MESA_LITTLE_ENDIAN == 1 -+#if defined(MESA_LITTLE_ENDIAN) && MESA_LITTLE_ENDIAN == 1 - #define LE32_IN( x ) ( *(GLuint *)(x) ) - #define LE32_IN_FLOAT( x ) ( *(GLfloat *)(x) ) - #define LE32_OUT( x, y ) do { *(GLuint *)(x) = (y); } while (0) - #define LE32_OUT_FLOAT( x, y ) do { *(GLfloat *)(x) = (y); } while (0) - #else --#ifndef __OpenBSD__ --#include --#else -+#if defined(__OpenBSD__) - #include - #define bswap_32 bswap32 -+#elif defined(__FreeBSD__) -+#include -+#define bswap_32 bswap32 -+#else -+#include - #endif - - #define LE32_IN( x ) bswap_32( *(GLuint *)(x) ) Index: graphics/dri/files/patch-sis_context.h =================================================================== RCS file: graphics/dri/files/patch-sis_context.h diff -N graphics/dri/files/patch-sis_context.h --- graphics/dri/files/patch-sis_context.h 23 Jan 2009 16:27:33 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,24 +0,0 @@ ---- src/mesa/drivers/dri/sis/sis_context.h.orig 2008-09-22 13:38:53.000000000 +0100 -+++ src/mesa/drivers/dri/sis/sis_context.h 2008-09-22 13:40:51.000000000 +0100 -@@ -401,10 +401,20 @@ - #define MMIO_READ(reg) *(volatile GLint *)(smesa->IOBase + (reg)) - #define MMIO_READf(reg) *(volatile GLfloat *)(smesa->IOBase + (reg)) - --#if defined(__i386__) || defined(__x86_64__) -+#if defined(__alpha__) -+#define MMIO_WMB() __asm __volatile("wmb" : : : "memory") -+#elif defined(__i386__) || defined(__x86_64__) || defined(__amd64__) - #define MMIO_WMB() __asm __volatile("" : : : "memory") - #elif defined(__ia64__) - #define MMIO_WMB() __asm __volatile("mf" : : : "memory") -+#elif defined(__powerpc__) -+#define MMIO_WMB() __asm __volatile("eieio" : : : "memory") -+#elif defined(__sparc64__) -+/* -+ * #StoreStore probably would be sufficient for this driver at the -+ * time of this writing but we use #Sync for safety. -+ */ -+#define MMIO_WMB() __asm __volatile("membar #Sync" : : : "memory") - #else - #error platform needs WMB - #endif Index: graphics/mesa-demos/Makefile =================================================================== RCS file: /home/ncvs/ports/graphics/mesa-demos/Makefile,v retrieving revision 1.28 diff -u -r1.28 Makefile --- graphics/mesa-demos/Makefile 12 Mar 2010 08:24:17 -0000 1.28 +++ graphics/mesa-demos/Makefile 28 Mar 2010 00:52:20 -0000 @@ -7,15 +7,19 @@ PORTNAME= demos PORTVERSION= ${MESAVERSION} +PORTREVISION= 1 CATEGORIES= graphics PKGNAMEPREFIX= mesa- -MAINTAINER= ports@FreeBSD.org +MAINTAINER= x11@FreeBSD.org COMMENT= OpenGL demos distributed with Mesa USE_GL= glu glut USE_XORG= glproto x11 xext xxf86vm xdamage xfixes dri2proto +EXTRA_PATCHES+= ${FILESDIR}/extra-patch-progs-xdemos-glxpixmap.c \ + ${FILESDIR}/extra-patch-progs-xdemos-yuvrect_client.c + DATADIR= ${PREFIX}/share/${PKGNAMEPREFIX}${PORTNAME} do-install: Index: graphics/mesa-demos/files/config =================================================================== RCS file: graphics/mesa-demos/files/config diff -N graphics/mesa-demos/files/config --- graphics/mesa-demos/files/config 19 Apr 2008 17:50:27 -0000 1.4 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,30 +0,0 @@ -# Configuration for mesa-demos port for FreeBSD -# Taken from Mesa CVS mesa/Mesa/configs/freebsd Rev 1.2 -# $FreeBSD: ports/graphics/mesa-demos/files/config,v 1.4 2008/04/19 17:50:27 miwi Exp $ -# - -# Set and remember $CFLAGS, $CXXFLAGS, $CC and $CXX before they are -# overriden in default include - -_CC := $(CC) -_CXX := $(CXX) -_CFLAGS := -fPIC -pedantic -I$(LOCALBASE)/include -DUSE_XSHM -DHZ=100 $(CFLAGS) \ - -DPTHREADS $(PTHREAD_CFLAGS) -_CXXFLAGS := -fPIC -pedantic $(CXXFLAGS) - -include $(TOP)/configs/default - -CONFIG_NAME = FreeBSD - -# Now reset compiler and flags -CC = $(_CC) -CXX = $(_CXX) -CFLAGS = $(_CFLAGS) -CXXFLAGS = $(_CXXFLAGS) - -GLUT_CFLAGS = -fexceptions - -LIB_DIR = $(LOCALBASE)/lib - -APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lXext -lXmu -lXi -lX11 -lm $(PTHREAD_LIBS) - Index: graphics/mesa-demos/files/mesalib74-configure =================================================================== RCS file: graphics/mesa-demos/files/mesalib74-configure diff -N graphics/mesa-demos/files/mesalib74-configure --- graphics/mesa-demos/files/mesalib74-configure 7 Feb 2010 11:51:07 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,11 +0,0 @@ ---- configure.orig 2009-03-28 00:59:46.000000000 +0000 -+++ configure 2009-04-05 11:53:44.000000000 +0000 -@@ -5739,7 +5739,7 @@ - ;; - *freebsd* | dragonfly*) - case "$host_cpu" in -- i*86|x86_64) default_driver="dri";; -+ i*86|x86_64|powerpc*|sparc*) default_driver="dri";; - esac - ;; - esac Index: graphics/mesa-demos/files/patch-progs-xdemos-glxpixmap.c =================================================================== RCS file: graphics/mesa-demos/files/patch-progs-xdemos-glxpixmap.c diff -N graphics/mesa-demos/files/patch-progs-xdemos-glxpixmap.c --- graphics/mesa-demos/files/patch-progs-xdemos-glxpixmap.c 19 May 2007 20:09:57 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,11 +0,0 @@ ---- progs/xdemos/glxpixmap.c.orig Fri Apr 6 22:29:09 2007 -+++ progs/xdemos/glxpixmap.c Fri Apr 6 22:38:33 2007 -@@ -105,7 +105,7 @@ - * to render correctly. This is because Mesa allows RGB rendering - * into any kind of visual, not just TrueColor or DirectColor. - */ --#ifdef GLX_MESA_pixmap_colormap -+#if defined(GLX_MESA_pixmap_colormap) && !defined(WITH_NVIDIA_GL) - if (strstr(glXQueryExtensionsString(dpy, 0), "GLX_MESA_pixmap_colormap")) { - /* stand-alone Mesa, specify the colormap */ - glxpm = glXCreateGLXPixmapMESA( dpy, visinfo, pm, attr.colormap ); Index: graphics/mesa-demos/files/patch-progs-xdemos-yuvrect_client.c =================================================================== RCS file: graphics/mesa-demos/files/patch-progs-xdemos-yuvrect_client.c diff -N graphics/mesa-demos/files/patch-progs-xdemos-yuvrect_client.c --- graphics/mesa-demos/files/patch-progs-xdemos-yuvrect_client.c 19 May 2007 20:09:57 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,28 +0,0 @@ ---- progs/xdemos/yuvrect_client.c.orig Fri Apr 6 22:42:30 2007 -+++ progs/xdemos/yuvrect_client.c Fri Apr 6 22:48:05 2007 -@@ -140,7 +140,11 @@ - exit(0); - } - -- glx_memory = glXAllocateMemoryMESA(dpy, screen, ImgWidth * ImgHeight * 2, 0, 0 ,0); -+ #ifdef WITH_NVIDIA_GL -+ glx_memory = glXAllocateMemoryNV(ImgWidth * ImgHeight * 2, 0, 0 ,0); -+ #else -+ glx_memory = glXAllocateMemoryMESA(dpy, screen, ImgWidth * ImgHeight * 2, 0, 0 ,0); -+ #endif - if (!glx_memory) - { - fprintf(stderr,"Failed to allocate MESA memory\n"); -@@ -317,7 +321,11 @@ - glXSwapBuffers(dpy, win); - event_loop(dpy, win); - -- glXFreeMemoryMESA(dpy, DefaultScreen(dpy), glx_memory); -+ #ifdef WITH_NVIDIA_GL -+ glXFreeMemoryNV(glx_memory); -+ #else -+ glXFreeMemoryMESA(dpy, DefaultScreen(dpy), glx_memory); -+ #endif - glXDestroyContext(dpy, ctx); - XDestroyWindow(dpy, win); - XCloseDisplay(dpy);