aboutsummaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authormiwi <miwi@FreeBSD.org>2012-04-22 01:03:32 +0800
committermiwi <miwi@FreeBSD.org>2012-04-22 01:03:32 +0800
commit8610de7ebcb688f7c822933cf96ecea22af9d9ac (patch)
tree58b95feaf2cd439308ad5db219bea76198f6e316 /graphics
parent074f8111429b0ad96ac33c0e038ffb0e7ed50b11 (diff)
downloadfreebsd-ports-gnome-8610de7ebcb688f7c822933cf96ecea22af9d9ac.tar.gz
freebsd-ports-gnome-8610de7ebcb688f7c822933cf96ecea22af9d9ac.tar.zst
freebsd-ports-gnome-8610de7ebcb688f7c822933cf96ecea22af9d9ac.zip
- Please welcome Xorg 7.5.2
The Xorg Team is pleased to announce the next round of Xorg updates. The team created a new flag called WITH_NEW_XORG that users can include in /etc/make.conf. This was created for the intel KMS work being done althouthough It probably works for other chips. Unfortunately, the intel KMS driver will only work on FreeBSD 9(RELENG|STABLE) or 10/HEAD users. Older version of FreeBSD will not be supported. Intel users will need to patch their source manually with Konstantin?s KMS kernel patch to get the newer chips to work. Please carefully read UPDATING entry. Changes: - libdrm 2.4.31 (including KMS support) - mesa 7.11.2 - xorg-server 1.10.6 - a lot of new Graphic Drivers. I would like to thank: Koop Mast Eitan Adler Niclas Zeising and all helpers and testers from x11@.
Diffstat (limited to 'graphics')
-rw-r--r--graphics/dri/Makefile8
-rw-r--r--graphics/dri/distinfo4
-rw-r--r--graphics/dri/pkg-plist3
-rw-r--r--graphics/libGL/Makefile1
-rw-r--r--graphics/libGL/bsd.mesalib.mk69
-rw-r--r--graphics/libGL/distinfo4
-rw-r--r--graphics/libGL/files/extra-mach64_context.h (renamed from graphics/dri/files/patch-mach64_context.h)20
-rw-r--r--graphics/libGL/files/extra-sis_context.h (renamed from graphics/dri/files/patch-sis_context.h)10
-rw-r--r--graphics/libGL/files/extra-src-glsl_ir_constant_expression.cpp14
-rw-r--r--graphics/libGL/files/extra-src__mesa__x86-64__glapi_x86-64.S (renamed from graphics/libGL/files/patch-src__mesa__x86-64__glapi_x86-64.S)0
-rw-r--r--graphics/libGL/files/extra-src__mesa__x86-64__xform4.S (renamed from graphics/libGL/files/patch-src__mesa__x86-64__xform4.S)0
-rw-r--r--graphics/libGL/files/extra-src__mesa__x86__glapi_x86.S (renamed from graphics/libGL/files/patch-src__mesa__x86__glapi_x86.S)0
-rw-r--r--graphics/libGL/files/extra-src__mesa__x86__read_rgba_span_x86.S (renamed from graphics/libGL/files/patch-src__mesa__x86__read_rgba_span_x86.S)0
-rw-r--r--graphics/libGL/files/mesalib74-configure11
-rw-r--r--graphics/libGL/pkg-plist10
-rw-r--r--graphics/libGLU/Makefile1
-rw-r--r--graphics/libGLU/distinfo4
-rw-r--r--graphics/libGLw/Makefile3
-rw-r--r--graphics/libGLw/distinfo4
-rw-r--r--graphics/libdrm/Makefile41
-rw-r--r--graphics/libdrm/distinfo4
-rw-r--r--graphics/libdrm/files/extra-xf86drmMode.c29
-rw-r--r--graphics/libdrm/pkg-plist93
-rw-r--r--graphics/libglut/Makefile4
-rw-r--r--graphics/libglut/distinfo8
-rw-r--r--graphics/mesa-demos/Makefile48
-rw-r--r--graphics/mesa-demos/distinfo4
-rw-r--r--graphics/mesa-demos/files/config30
-rw-r--r--graphics/mesa-demos/files/patch-src__mesa__x86-64__glapi_x86-64.S12
-rw-r--r--graphics/mesa-demos/files/patch-src__mesa__x86-64__xform4.S74
-rw-r--r--graphics/mesa-demos/files/patch-src__mesa__x86__glapi_x86.S11
-rw-r--r--graphics/mesa-demos/files/patch-src__mesa__x86__read_rgba_span_x86.S11
-rw-r--r--graphics/mesa-demos/pkg-plist17
33 files changed, 353 insertions, 199 deletions
diff --git a/graphics/dri/Makefile b/graphics/dri/Makefile
index 6678c0ab875d..922c37e5f3ab 100644
--- a/graphics/dri/Makefile
+++ b/graphics/dri/Makefile
@@ -14,17 +14,9 @@ COMMENT= OpenGL hardware acceleration drivers for the DRI
LIB_DEPENDS= drm:${PORTSDIR}/graphics/libdrm \
expat.6:${PORTSDIR}/textproc/expat2
-BUILD_DEPENDS= makedepend:${PORTSDIR}/devel/makedepend
-
-CONFLICTS= dri-6.2.2005* dri-6.5.2006*
-MAKE_JOBS_UNSAFE= yes
USE_XORG= glproto x11 xext xxf86vm xdamage xfixes dri2proto
-EXTRA_PATCHES+= ${FILESDIR}/patch-mach64_context.h \
- ${FILESDIR}/patch-sis_context.h
-
-
do-install:
cd ${WRKSRC}/src/mesa; ${GMAKE} install-dri
diff --git a/graphics/dri/distinfo b/graphics/dri/distinfo
index 18c51665b5c4..106ab0bf5805 100644
--- a/graphics/dri/distinfo
+++ b/graphics/dri/distinfo
@@ -1,4 +1,4 @@
-SHA256 (MesaLib-7.4.4.tar.bz2) = eaf73d7a3a2dc959ddc0753abaa18160c64bec00b35bf4a0c96040b2072918ec
-SIZE (MesaLib-7.4.4.tar.bz2) = 3375615
SHA256 (MesaLib-7.6.1.tar.bz2) = 701f0e4cb85d6298181651b780d1c0a439fadd02aad29ee6623fc05588bb8d44
SIZE (MesaLib-7.6.1.tar.bz2) = 4886995
+SHA256 (MesaLib-7.11.2.tar.bz2) = 57746aa8c60bc6f5596ec6c6c7274de40fa12edce5ec33fe899e704fa00b5357
+SIZE (MesaLib-7.11.2.tar.bz2) = 6257280
diff --git a/graphics/dri/pkg-plist b/graphics/dri/pkg-plist
index 8a12d059e36b..00253838e40b 100644
--- a/graphics/dri/pkg-plist
+++ b/graphics/dri/pkg-plist
@@ -4,10 +4,11 @@ lib/dri/i915_dri.so
lib/dri/i965_dri.so
lib/dri/mach64_dri.so
lib/dri/mga_dri.so
+%%NEW%%lib/dri/nouveau_vieux_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/r600_dri.so
lib/dri/radeon_dri.so
lib/dri/savage_dri.so
lib/dri/sis_dri.so
diff --git a/graphics/libGL/Makefile b/graphics/libGL/Makefile
index 02c3a88ee543..f3f054a1a859 100644
--- a/graphics/libGL/Makefile
+++ b/graphics/libGL/Makefile
@@ -11,7 +11,6 @@ CATEGORIES= graphics
COMMENT= OpenGL library that renders using GLX or DRI
-BUILD_DEPENDS+= makedepend:${PORTSDIR}/devel/makedepend
LIB_DEPENDS+= drm:${PORTSDIR}/graphics/libdrm \
expat.6:${PORTSDIR}/textproc/expat2
diff --git a/graphics/libGL/bsd.mesalib.mk b/graphics/libGL/bsd.mesalib.mk
index 92419cfde5f8..c01d7f4752d5 100644
--- a/graphics/libGL/bsd.mesalib.mk
+++ b/graphics/libGL/bsd.mesalib.mk
@@ -21,50 +21,57 @@
MESAVERSION= ${MESABASEVERSION}${MESASUBVERSION:C/^(.)/.\1/}
MESADISTVERSION=${MESABASEVERSION}${MESASUBVERSION:C/^(.)/-\1/}
-.ifdef WITHOUT_NOUVEAU
-MESABASEVERSION= 7.6.1
-MESASUBVERSION=
-PLIST_SUB+= MESALIB76= MESALIB74="@comment "
+.if defined(WITH_NEW_XORG)
+MESABASEVERSION= 7.11.2
+# if there is a subversion, include the '-' between 7.11-rc2 for example.
+MESASUBVERSION=
+PLIST_SUB+= OLD="@comment " NEW=""
.else
-MESABASEVERSION= 7.4.4
-MESASUBVERSION=
-PLIST_SUB+= MESALIB74= MESALIB76="@comment "
-EXTRA_PATCHES+= ${PATCHDIR}/mesalib74-configure
+MESABASEVERSION= 7.6.1
+MESASUBVERSION=
+PLIST_SUB+= OLD="" NEW="@comment "
.endif
-MASTER_SITES?= ftp://ftp.freedesktop.org/pub/mesa/${MESABASEVERSION}/:mesa,glut,demos
-MASTER_SITE_SUBDIR= mesa3d
-DISTFILES= MesaLib-${MESADISTVERSION}${EXTRACT_SUFX}:mesa
+MASTER_SITES= ftp://ftp.freedesktop.org/pub/mesa/${MESABASEVERSION}/:mesa,glut
+DISTFILES= MesaLib-${MESADISTVERSION}${EXTRACT_SUFX}:mesa
MAINTAINER?= x11@FreeBSD.org
-USE_BZIP2= yes
-USE_GMAKE= yes
+BUILD_DEPENDS+= makedepend:${PORTSDIR}/devel/makedepend \
+ ${PYTHON_SITELIBDIR}/libxml2.py:${PORTSDIR}/textproc/py-libxml2
+
+USE_BISON= build
+USE_PYTHON_BUILD=yes
+USE_BZIP2= yes
+USE_GMAKE= yes
USE_LDCONFIG= yes
GNU_CONFIGURE= yes
MAKE_JOBS_SAFE= yes
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
-CONFIGURE_ARGS= --disable-gallium
+CONFIGURE_ARGS+=--enable-gallium-llvm=no --without-gallium-drivers \
+ --disable-egl
-ALL_TARGET= default
+.if defined(WITH_NEW_XORG)
+EXTRA_PATCHES+= ${PATCHDIR}/extra-mach64_context.h \
+ ${PATCHDIR}/extra-sis_context.h \
+ ${PATCHDIR}/extra-src-glsl_ir_constant_expression.cpp
+.else
+EXTRA_PATCHES+= ${PATCHDIR}/extra-src__mesa__x86-64__glapi_x86-64.S \
+ ${PATCHDIR}/extra-src__mesa__x86-64__xform4.S \
+ ${PATCHDIR}/extra-src__mesa__x86__glapi_x86.S \
+ ${PATCHDIR}/extra-src__mesa__x86__read_rgba_span_x86.S
+.endif
-#MAKE_ARGS= SHELL=${SH}
-#CFLAGS+= -DUSE_XSHM -DHZ=100
+ALL_TARGET= default
PATCHDIR= ${.CURDIR}/../../graphics/libGL/files
-WRKSRC= ${WRKDIR}/Mesa-${MESABASEVERSION}
+WRKSRC= ${WRKDIR}/Mesa-${MESABASEVERSION}${MESASUBVERSION}
.if !defined(ARCH)
ARCH!= uname -p
.endif
-.if ${ARCH} == alpha
-FAST_MATH=
-.else
-FAST_MATH= -ffast-math
-.endif
-
COMPONENT= ${PORTNAME:L:C/^lib//:C/mesa-//}
.if ${COMPONENT:Mglut} == ""
@@ -83,13 +90,6 @@ CONFIGURE_ARGS+= --disable-glw
CONFIGURE_ARGS+= --enable-motif
.endif
-.if ${COMPONENT:Mdemos} == ""
-CONFIGURE_ARGS+= --with-demos=no
-.else
-DISTFILES+= MesaDemos-${MESADISTVERSION}${EXTRACT_SUFX}:demos
-CONFIGURE_ARGS+= --with-demos=demos,xdemos
-.endif
-
.if ${COMPONENT:Mdri} == ""
CONFIGURE_ARGS+= --with-dri-drivers=no
.endif
@@ -112,10 +112,3 @@ post-patch:
@${REINPLACE_CMD} -e 's|[$$](INSTALL_LIB_DIR)/pkgconfig|${PREFIX}/libdata/pkgconfig|' \
${WRKSRC}/src/glut/glx/Makefile
.endif
-.if ${COMPONENT:Mdemos} != ""
- @${REINPLACE_CMD} -e 's|../images/|${DATADIR}/images/|g' \
- -e 's|geartrain.dat|${DATADIR}/data/geartrain.dat|g' \
- -e 's|terrain.dat|${DATADIR}/data/terrain.dat|g' \
- -e 's|isosurf.dat|${DATADIR}/data/isosurf.dat|g' \
- ${WRKSRC}/progs/demos/*.c ${WRKSRC}/progs/xdemos/*.c
-.endif
diff --git a/graphics/libGL/distinfo b/graphics/libGL/distinfo
index 18c51665b5c4..106ab0bf5805 100644
--- a/graphics/libGL/distinfo
+++ b/graphics/libGL/distinfo
@@ -1,4 +1,4 @@
-SHA256 (MesaLib-7.4.4.tar.bz2) = eaf73d7a3a2dc959ddc0753abaa18160c64bec00b35bf4a0c96040b2072918ec
-SIZE (MesaLib-7.4.4.tar.bz2) = 3375615
SHA256 (MesaLib-7.6.1.tar.bz2) = 701f0e4cb85d6298181651b780d1c0a439fadd02aad29ee6623fc05588bb8d44
SIZE (MesaLib-7.6.1.tar.bz2) = 4886995
+SHA256 (MesaLib-7.11.2.tar.bz2) = 57746aa8c60bc6f5596ec6c6c7274de40fa12edce5ec33fe899e704fa00b5357
+SIZE (MesaLib-7.11.2.tar.bz2) = 6257280
diff --git a/graphics/dri/files/patch-mach64_context.h b/graphics/libGL/files/extra-mach64_context.h
index 90fe99b3f1c7..f844599bfa68 100644
--- a/graphics/dri/files/patch-mach64_context.h
+++ b/graphics/libGL/files/extra-mach64_context.h
@@ -1,6 +1,6 @@
---- 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 @@
+--- src/mesa/drivers/dri/mach64/mach64_context.h.orig 2011-05-13 01:47:18.000000000 +0200
++++ src/mesa/drivers/dri/mach64/mach64_context.h 2011-07-27 09:59:53.000000000 +0200
+@@ -289,7 +289,7 @@
/* ================================================================
* Byte ordering
*/
@@ -9,19 +9,13 @@
#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 <byteswap.h>
--#else
-+#if defined(__OpenBSD__)
+@@ -298,6 +298,9 @@
+ #if defined(__OpenBSD__) || defined(__NetBSD__)
#include <machine/endian.h>
#define bswap_32 bswap32
+#elif defined(__FreeBSD__)
+#include <sys/endian.h>
+#define bswap_32 bswap32
-+#else
-+#include <byteswap.h>
+ #else
+ #include <byteswap.h>
#endif
-
- #define LE32_IN( x ) bswap_32( *(GLuint *)(x) )
diff --git a/graphics/dri/files/patch-sis_context.h b/graphics/libGL/files/extra-sis_context.h
index 3152e2db0f7d..0e16f51c0a10 100644
--- a/graphics/dri/files/patch-sis_context.h
+++ b/graphics/libGL/files/extra-sis_context.h
@@ -1,13 +1,11 @@
---- 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 @@
+--- src/mesa/drivers/dri/sis/sis_context.h.orig 2010-12-14 22:43:15.000000000 +0100
++++ src/mesa/drivers/dri/sis/sis_context.h 2011-07-27 09:58:22.000000000 +0200
+@@ -400,10 +400,18 @@
#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__)
++#if defined(__i386__) || defined(__x86_64__) || defined(__amd64__)
#define MMIO_WMB() __asm __volatile("" : : : "memory")
#elif defined(__ia64__)
#define MMIO_WMB() __asm __volatile("mf" : : : "memory")
diff --git a/graphics/libGL/files/extra-src-glsl_ir_constant_expression.cpp b/graphics/libGL/files/extra-src-glsl_ir_constant_expression.cpp
new file mode 100644
index 000000000000..8df40432dfc9
--- /dev/null
+++ b/graphics/libGL/files/extra-src-glsl_ir_constant_expression.cpp
@@ -0,0 +1,14 @@
+--- src/glsl/ir_constant_expression.cpp.orig 2011-07-23 15:08:44.000000000 +0200
++++ src/glsl/ir_constant_expression.cpp 2011-07-23 15:09:03.000000000 +0200
+@@ -39,6 +39,11 @@
+ #include "ir_visitor.h"
+ #include "glsl_types.h"
+
++#include <sys/param.h>
++#if __FreeBSD_version <= 704100 || (__FreeBSD_version >= 800000 && __FreeBSD_version < 802502) || (__FreeBSD_version >= 900000 && __FreeBSD_version < 900027)
++#define log2(x) (log(x) / log(2))
++#endif
++
+ static float
+ dot(ir_constant *op0, ir_constant *op1)
+ {
diff --git a/graphics/libGL/files/patch-src__mesa__x86-64__glapi_x86-64.S b/graphics/libGL/files/extra-src__mesa__x86-64__glapi_x86-64.S
index 908a6fe300aa..908a6fe300aa 100644
--- a/graphics/libGL/files/patch-src__mesa__x86-64__glapi_x86-64.S
+++ b/graphics/libGL/files/extra-src__mesa__x86-64__glapi_x86-64.S
diff --git a/graphics/libGL/files/patch-src__mesa__x86-64__xform4.S b/graphics/libGL/files/extra-src__mesa__x86-64__xform4.S
index 193e6cc30fbe..193e6cc30fbe 100644
--- a/graphics/libGL/files/patch-src__mesa__x86-64__xform4.S
+++ b/graphics/libGL/files/extra-src__mesa__x86-64__xform4.S
diff --git a/graphics/libGL/files/patch-src__mesa__x86__glapi_x86.S b/graphics/libGL/files/extra-src__mesa__x86__glapi_x86.S
index 71da78c83ffd..71da78c83ffd 100644
--- a/graphics/libGL/files/patch-src__mesa__x86__glapi_x86.S
+++ b/graphics/libGL/files/extra-src__mesa__x86__glapi_x86.S
diff --git a/graphics/libGL/files/patch-src__mesa__x86__read_rgba_span_x86.S b/graphics/libGL/files/extra-src__mesa__x86__read_rgba_span_x86.S
index 37b08d1cda3c..37b08d1cda3c 100644
--- a/graphics/libGL/files/patch-src__mesa__x86__read_rgba_span_x86.S
+++ b/graphics/libGL/files/extra-src__mesa__x86__read_rgba_span_x86.S
diff --git a/graphics/libGL/files/mesalib74-configure b/graphics/libGL/files/mesalib74-configure
deleted file mode 100644
index af45b71f21c3..000000000000
--- a/graphics/libGL/files/mesalib74-configure
+++ /dev/null
@@ -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
diff --git a/graphics/libGL/pkg-plist b/graphics/libGL/pkg-plist
index b07eac0fa6cd..4125f7491219 100644
--- a/graphics/libGL/pkg-plist
+++ b/graphics/libGL/pkg-plist
@@ -1,5 +1,5 @@
-include/GL/dmesa.h
-include/GL/ggimesa.h
+%%OLD%%include/GL/dmesa.h
+%%OLD%%include/GL/ggimesa.h
include/GL/gl.h
include/GL/gl_mangle.h
include/GL/glext.h
@@ -8,11 +8,11 @@ include/GL/glx.h
include/GL/glx_mangle.h
include/GL/glxext.h
include/GL/mesa_wgl.h
-include/GL/mglmesa.h
+%%OLD%%include/GL/mglmesa.h
include/GL/osmesa.h
-include/GL/svgamesa.h
+%%OLD%%include/GL/svgamesa.h
include/GL/vms_x_fix.h
-%%MESALIB76%%include/GL/wglext.h
+include/GL/wglext.h
include/GL/wmesa.h
lib/libGL.so
lib/libGL.so.1
diff --git a/graphics/libGLU/Makefile b/graphics/libGLU/Makefile
index b39ab7574fe5..0a199266ade3 100644
--- a/graphics/libGLU/Makefile
+++ b/graphics/libGLU/Makefile
@@ -15,6 +15,7 @@ USE_GL= gl
USE_XORG= glproto x11 xext xxf86vm xdamage xfixes dri2proto
do-install:
+ @${MKDIR} ${PREFIX}/include/GL/
cd ${WRKSRC}/src/glu; ${GMAKE} install
${INSTALL_DATA} ${WRKSRC}/include/GL/glu*.h ${PREFIX}/include/GL/
cd ${WRKSRC}/src/glu; ${GMAKE} install
diff --git a/graphics/libGLU/distinfo b/graphics/libGLU/distinfo
index 18c51665b5c4..106ab0bf5805 100644
--- a/graphics/libGLU/distinfo
+++ b/graphics/libGLU/distinfo
@@ -1,4 +1,4 @@
-SHA256 (MesaLib-7.4.4.tar.bz2) = eaf73d7a3a2dc959ddc0753abaa18160c64bec00b35bf4a0c96040b2072918ec
-SIZE (MesaLib-7.4.4.tar.bz2) = 3375615
SHA256 (MesaLib-7.6.1.tar.bz2) = 701f0e4cb85d6298181651b780d1c0a439fadd02aad29ee6623fc05588bb8d44
SIZE (MesaLib-7.6.1.tar.bz2) = 4886995
+SHA256 (MesaLib-7.11.2.tar.bz2) = 57746aa8c60bc6f5596ec6c6c7274de40fa12edce5ec33fe899e704fa00b5357
+SIZE (MesaLib-7.11.2.tar.bz2) = 6257280
diff --git a/graphics/libGLw/Makefile b/graphics/libGLw/Makefile
index f0501392fa9d..4c9f14d0481f 100644
--- a/graphics/libGLw/Makefile
+++ b/graphics/libGLw/Makefile
@@ -7,13 +7,10 @@
PORTNAME= libGLw
PORTVERSION= ${MESAVERSION}
-PORTREVISION= 1
CATEGORIES= graphics
COMMENT= OpenGL widgets library
-BUILD_DEPENDS+= makedepend:${PORTSDIR}/devel/makedepend
-
USE_GL= gl
USE_MOTIF= yes
USE_XORG= glproto xt x11 xext xxf86vm xdamage xfixes dri2proto
diff --git a/graphics/libGLw/distinfo b/graphics/libGLw/distinfo
index 18c51665b5c4..106ab0bf5805 100644
--- a/graphics/libGLw/distinfo
+++ b/graphics/libGLw/distinfo
@@ -1,4 +1,4 @@
-SHA256 (MesaLib-7.4.4.tar.bz2) = eaf73d7a3a2dc959ddc0753abaa18160c64bec00b35bf4a0c96040b2072918ec
-SIZE (MesaLib-7.4.4.tar.bz2) = 3375615
SHA256 (MesaLib-7.6.1.tar.bz2) = 701f0e4cb85d6298181651b780d1c0a439fadd02aad29ee6623fc05588bb8d44
SIZE (MesaLib-7.6.1.tar.bz2) = 4886995
+SHA256 (MesaLib-7.11.2.tar.bz2) = 57746aa8c60bc6f5596ec6c6c7274de40fa12edce5ec33fe899e704fa00b5357
+SIZE (MesaLib-7.11.2.tar.bz2) = 6257280
diff --git a/graphics/libdrm/Makefile b/graphics/libdrm/Makefile
index 823d49d21513..4a0b85f9f601 100644
--- a/graphics/libdrm/Makefile
+++ b/graphics/libdrm/Makefile
@@ -7,7 +7,7 @@
PORTNAME= libdrm
PORTVERSION= ${LIBDRM_VERSION}
-PORTREVISION= 1
+PORTREVISION= ${LIBDRM_REVISION}
CATEGORIES= graphics x11
MASTER_SITES= http://dri.freedesktop.org/libdrm/
@@ -15,29 +15,44 @@ MAINTAINER= x11@FreeBSD.org
COMMENT= Userspace interface to kernel Direct Rendering Module services
BUILD_DEPENDS+= ${LOCALBASE}/libdata/pkgconfig/pthread-stubs.pc:${PORTSDIR}/devel/libpthread-stubs
+LIB_DEPENDS= pciaccess.0:${PORTSDIR}/devel/libpciaccess \
+ pthread-stubs.0:${PORTSDIR}/devel/libpthread-stubs
RUN_DEPENDS+= ${LOCALBASE}/libdata/pkgconfig/pthread-stubs.pc:${PORTSDIR}/devel/libpthread-stubs
USE_BZIP2= yes
GNU_CONFIGURE= yes
USE_LDCONFIG= yes
+CONFIGURE_ARGS= --enable-nouveau-experimental-api
+
MAKE_JOBS_SAFE= yes
-.include <bsd.port.pre.mk>
+.if defined(WITH_NEW_XORG)
-.if defined(WITHOUT_NOUVEAU)
-LIBDRM_VERSION= 2.4.17
-CONFIGURE_ARGS= --disable-nouveau-experimental-api \
- --disable-radeon-experimental-api
-PLIST_SUB+= NEW= OLD="@comment "
+OPTIONS= KMS "Enable KMS support (very experimental)" off
+
+.include <bsd.port.options.mk>
+
+.if defined(WITH_KMS)
+CONFIGURE_ARGS+=--enable-libkms
+EXTRA_PATCHES+= ${FILESDIR}/extra-xf86drmMode.c
+PLIST_SUB+= KMS=""
.else
-LIBDRM_VERSION= 2.4.12
-CONFIGURE_ARGS= --enable-nouveau-experimental-api
-PLIST_SUB+= OLD= NEW="@comment "
+PLIST_SUB+= KMS="@comment "
+.endif
+
+LIBDRM_VERSION= 2.4.31
+LIBDRM_REVISION=1
+PLIST_SUB+= OLD="@comment " NEW=""
+.else
+LIBDRM_VERSION= 2.4.17
+LIBDRM_REVISION=0
+PLIST_SUB+= OLD="" NEW="@comment "
.endif
pre-patch:
- @${REINPLACE_CMD} 's|{libdir}/pkgconfig|{prefix}/libdata/pkgconfig|g' \
- ${WRKSRC}/configure
+ @${REINPLACE_CMD} 's|{libdir}/pkgconfig|{prefix}/libdata/pkgconfig|g; \
+ 12661s/x86_/amd/g' \
+ ${WRKSRC}/configure
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/graphics/libdrm/distinfo b/graphics/libdrm/distinfo
index 27276eacad60..df36a538eeed 100644
--- a/graphics/libdrm/distinfo
+++ b/graphics/libdrm/distinfo
@@ -1,4 +1,4 @@
-SHA256 (libdrm-2.4.12.tar.bz2) = 89e3b16aff13c5219d13b08f9143793f74777b752d87c760ec6e52fb8676bd31
-SIZE (libdrm-2.4.12.tar.bz2) = 414175
SHA256 (libdrm-2.4.17.tar.bz2) = b8a4e7c610b0e970546d791c06e28882857a49d34698633a89292d7ae142316a
SIZE (libdrm-2.4.17.tar.bz2) = 408882
+SHA256 (libdrm-2.4.31.tar.bz2) = 8fc7e0e5b2f9bf493447a4ef7adc49174a700824457774cb53c1b8f2da866af4
+SIZE (libdrm-2.4.31.tar.bz2) = 475677
diff --git a/graphics/libdrm/files/extra-xf86drmMode.c b/graphics/libdrm/files/extra-xf86drmMode.c
new file mode 100644
index 000000000000..d91a92300735
--- /dev/null
+++ b/graphics/libdrm/files/extra-xf86drmMode.c
@@ -0,0 +1,29 @@
+--- xf86drmMode.c.orig 2010-09-08 14:23:39.000000000 +0200
++++ xf86drmMode.c 2011-07-18 18:59:11.000000000 +0200
+@@ -54,7 +54,7 @@
+
+ static inline DRM_IOCTL(int fd, int cmd, void *arg)
+ {
+- int ret = drmIoctl(fd, cmd, arg);
++ int ret = drmIoctl(fd, (unsigned)cmd, arg);
+ return ret < 0 ? -errno : ret;
+ }
+
+@@ -659,7 +659,7 @@
+ */
+ int drmCheckModesettingSupported(const char *busid)
+ {
+-#ifdef __linux__
++#if defined (__linux__)
+ char pci_dev_dir[1024];
+ int domain, bus, dev, func;
+ DIR *sysdir;
+@@ -709,6 +709,8 @@
+ closedir(sysdir);
+ if (found)
+ return 0;
++#elif defined(__FreeBSD__)
++ return 0;
+ #endif
+ return -ENOSYS;
+
diff --git a/graphics/libdrm/pkg-plist b/graphics/libdrm/pkg-plist
index fbbc18607eca..5cef834e71f0 100644
--- a/graphics/libdrm/pkg-plist
+++ b/graphics/libdrm/pkg-plist
@@ -1,28 +1,53 @@
-include/drm/drm.h
-include/drm/drm_mode.h
-include/drm/drm_sarea.h
-include/drm/i915_drm.h
-include/drm/mach64_drm.h
-include/drm/mga_drm.h
-include/drm/nouveau_drm.h
+%%OLD%%include/drm/drm.h
+%%OLD%%include/drm/drm_mode.h
+%%OLD%%include/drm/drm_sarea.h
+%%OLD%%include/drm/i915_drm.h
+%%OLD%%include/drm/mach64_drm.h
+%%OLD%%include/drm/mga_drm.h
+%%OLD%%include/drm/nouveau_drm.h
%%OLD%%include/drm/nouveau_drmif.h
-include/drm/r128_drm.h
-%%OLD%%include/drm/r300_reg.h
-include/drm/radeon_drm.h
-include/drm/savage_drm.h
-include/drm/sis_drm.h
-%%OLD%%include/drm/via_3d_reg.h
-include/drm/via_drm.h
-%%OLD%%include/drm/xgi_drm.h
-include/intel_bufmgr.h
-%%OLD%%include/nouveau/nouveau_bo.h
-%%OLD%%include/nouveau/nouveau_channel.h
+%%OLD%%include/drm/r128_drm.h
+%%OLD%%include/drm/radeon_drm.h
+%%OLD%%include/drm/savage_drm.h
+%%OLD%%include/drm/sis_drm.h
+%%OLD%%include/drm/via_drm.h
+%%OLD%%include/intel_bufmgr.h
+%%NEW%%include/libdrm/drm.h
+%%NEW%%include/libdrm/drm_fourcc.h
+%%NEW%%include/libdrm/drm_mode.h
+%%NEW%%include/libdrm/drm_sarea.h
+%%NEW%%include/libdrm/i915_drm.h
+%%NEW%%include/libdrm/intel_bufmgr.h
+%%NEW%%include/libdrm/intel_debug.h
+%%NEW%%include/libdrm/mach64_drm.h
+%%NEW%%include/libdrm/mga_drm.h
+%%NEW%%include/libdrm/nouveau_drm.h
+%%NEW%%include/libdrm/nouveau_drmif.h
+%%NEW%%include/libdrm/r128_drm.h
+%%NEW%%include/libdrm/r600_pci_ids.h
+%%NEW%%include/libdrm/radeon_bo.h
+%%NEW%%include/libdrm/radeon_bo_gem.h
+%%NEW%%include/libdrm/radeon_bo_int.h
+%%NEW%%include/libdrm/radeon_cs.h
+%%NEW%%include/libdrm/radeon_cs_gem.h
+%%NEW%%include/libdrm/radeon_cs_int.h
+%%NEW%%include/libdrm/radeon_drm.h
+%%NEW%%include/libdrm/radeon_surface.h
+%%NEW%%include/libdrm/savage_drm.h
+%%NEW%%include/libdrm/sis_drm.h
+%%NEW%%include/libdrm/via_drm.h
+%%NEW%%%%KMS%%include/libkms/libkms.h
+include/nouveau/nouveau_bo.h
+include/nouveau/nouveau_channel.h
%%OLD%%include/nouveau/nouveau_class.h
-%%OLD%%include/nouveau/nouveau_device.h
-%%OLD%%include/nouveau/nouveau_grobj.h
-%%OLD%%include/nouveau/nouveau_notifier.h
-%%OLD%%include/nouveau/nouveau_pushbuf.h
-%%OLD%%include/nouveau/nouveau_resource.h
+include/nouveau/nouveau_device.h
+include/nouveau/nouveau_grobj.h
+include/nouveau/nouveau_notifier.h
+include/nouveau/nouveau_pushbuf.h
+%%NEW%%include/nouveau/nouveau_reloc.h
+include/nouveau/nouveau_resource.h
+%%NEW%%include/nouveau/nv04_pushbuf.h
+%%NEW%%include/nouveau/nvc0_pushbuf.h
include/xf86drm.h
include/xf86drmMode.h
lib/libdrm.la
@@ -31,11 +56,21 @@ lib/libdrm.so.2
lib/libdrm_intel.la
lib/libdrm_intel.so
lib/libdrm_intel.so.1
-%%OLD%%lib/libdrm_nouveau.la
-%%OLD%%lib/libdrm_nouveau.so
-%%OLD%%lib/libdrm_nouveau.so.1
+lib/libdrm_nouveau.la
+lib/libdrm_nouveau.so
+lib/libdrm_nouveau.so.1
+%%NEW%%lib/libdrm_radeon.la
+%%NEW%%lib/libdrm_radeon.so
+%%NEW%%lib/libdrm_radeon.so.1
+%%NEW%%%%KMS%%lib/libkms.la
+%%NEW%%%%KMS%%lib/libkms.so
+%%NEW%%%%KMS%%lib/libkms.so.1
libdata/pkgconfig/libdrm.pc
libdata/pkgconfig/libdrm_intel.pc
-%%OLD%%libdata/pkgconfig/libdrm_nouveau.pc
-@dirrm include/drm
-%%OLD%%@dirrm include/nouveau
+libdata/pkgconfig/libdrm_nouveau.pc
+%%NEW%%libdata/pkgconfig/libdrm_radeon.pc
+%%NEW%%%%KMS%%libdata/pkgconfig/libkms.pc
+@dirrm include/nouveau
+%%NEW%%%%KMS%%@dirrm include/libkms
+%%NEW%%@dirrm include/libdrm
+%%OLD%%@dirrm include/drm
diff --git a/graphics/libglut/Makefile b/graphics/libglut/Makefile
index 372b6e65ddd7..1d55cf44ab4b 100644
--- a/graphics/libglut/Makefile
+++ b/graphics/libglut/Makefile
@@ -12,14 +12,12 @@ CATEGORIES= graphics
MAINTAINER= x11@FreeBSD.org
COMMENT= OpenGL utility toolkit
-CONFLICTS= freeglut-[0-9]*
-
USE_GL= glu
USE_XORG= glproto x11 xext xxf86vm xdamage xfixes xi xmu dri2proto
do-install:
cd ${WRKSRC}/src/glut/glx; ${GMAKE} install
- ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \
+ ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \
${WRKSRC}/include/GL/glutf90.h \
${PREFIX}/include/GL
diff --git a/graphics/libglut/distinfo b/graphics/libglut/distinfo
index 5f61c6018253..6726d9c68d98 100644
--- a/graphics/libglut/distinfo
+++ b/graphics/libglut/distinfo
@@ -1,8 +1,8 @@
-SHA256 (MesaLib-7.4.4.tar.bz2) = eaf73d7a3a2dc959ddc0753abaa18160c64bec00b35bf4a0c96040b2072918ec
-SIZE (MesaLib-7.4.4.tar.bz2) = 3375615
-SHA256 (MesaGLUT-7.4.4.tar.bz2) = 66c9486d73061ffd8d17a05b6e62851fec575867a99ad8cfc6137c2c16848c2e
-SIZE (MesaGLUT-7.4.4.tar.bz2) = 328900
SHA256 (MesaLib-7.6.1.tar.bz2) = 701f0e4cb85d6298181651b780d1c0a439fadd02aad29ee6623fc05588bb8d44
SIZE (MesaLib-7.6.1.tar.bz2) = 4886995
SHA256 (MesaGLUT-7.6.1.tar.bz2) = c828f572a4e5c521e87ef265c5d2f1f02ba99ea2307e6323aa8165b152e4eb9d
SIZE (MesaGLUT-7.6.1.tar.bz2) = 321756
+SHA256 (MesaLib-7.11.2.tar.bz2) = 57746aa8c60bc6f5596ec6c6c7274de40fa12edce5ec33fe899e704fa00b5357
+SIZE (MesaLib-7.11.2.tar.bz2) = 6257280
+SHA256 (MesaGLUT-7.11.2.tar.bz2) = 46b9fd1c261cbbd090a71ae1db328c37d2ff5118b83c38b8ebc8f150484e94f7
+SIZE (MesaGLUT-7.11.2.tar.bz2) = 201575
diff --git a/graphics/mesa-demos/Makefile b/graphics/mesa-demos/Makefile
index f950531a3f72..1bceb961108a 100644
--- a/graphics/mesa-demos/Makefile
+++ b/graphics/mesa-demos/Makefile
@@ -5,25 +5,54 @@
# $FreeBSD$
#
-PORTNAME= demos
-PORTVERSION= ${MESAVERSION}
+PORTNAME= mesa-demos
+PORTVERSION= 7.6.1
CATEGORIES= graphics
-MASTER_SITES= CRITICAL/mesa3d:mesa,glut,demos
-PKGNAMEPREFIX= mesa-
+MASTER_SITES= ftp://ftp.freedesktop.org/pub/mesa/${PORTVERSION}/
+DISTFILES= MesaLib-${PORTVERSION}${EXTRACT_SUFX} \
+ MesaDemos-${PORTVERSION}${EXTRACT_SUFX}
MAINTAINER= x11@FreeBSD.org
COMMENT= OpenGL demos distributed with Mesa
+USE_BZIP2= yes
+USE_GMAKE= yes
+USE_LDCONFIG= yes
+GNU_CONFIGURE= yes
+MAKE_JOBS_SAFE= yes
USE_GL= glu glut
USE_XORG= glproto x11 xext xxf86vm xdamage xfixes dri2proto
+CPPFLAGS+= -I${LOCALBASE}/include ${PTHREAD_CFLAGS}
+CONFIGURE_ENV= LDFLAGS="-L${LOCALBASE}/lib ${PTHREAD_LIBS}"
+CONFIGURE_ARGS= --disable-gallium --with-demos=demos,xdemos
+
+#ALL_TARGET= yes
+
+WRKSRC= ${WRKDIR}/Mesa-${PORTVERSION}/
DATADIR= ${PREFIX}/share/${PKGNAMEPREFIX}${PORTNAME}
OPTIONS= NVIDIA_GL "Use NVIDIA's libraries" off
-EXTRA_PATCHES+= ${FILESDIR}/patch-progs-xdemos-glxpixmap.c \
- ${FILESDIR}/patch-progs-xdemos-yuvrect_client.c
+.if defined(WITHOUT_XCB)
+CONFIGURE_ARGS+= --disable-xcb
+.else
+CONFIGURE_ARGS+= --enable-xcb
+.endif
+post-patch:
+ @${REINPLACE_CMD} -e 's|-ffast-math|${FAST_MATH}|' -e 's|x86_64|amd64|' \
+ ${WRKSRC}/configure
+ @${REINPLACE_CMD} -e 's|[$$](INSTALL_LIB_DIR)/pkgconfig|${PREFIX}/libdata/pkgconfig|' \
+ ${WRKSRC}/src/glu/Makefile \
+ ${WRKSRC}/src/glw/Makefile \
+ ${WRKSRC}/src/mesa/Makefile \
+ ${WRKSRC}/src/mesa/drivers/dri/Makefile
+ @${REINPLACE_CMD} -e 's|../images/|${DATADIR}/images/|g' \
+ -e 's|geartrain.dat|${DATADIR}/data/geartrain.dat|g' \
+ -e 's|terrain.dat|${DATADIR}/data/terrain.dat|g' \
+ -e 's|isosurf.dat|${DATADIR}/data/isosurf.dat|g' \
+ ${WRKSRC}/progs/demos/*.c ${WRKSRC}/progs/xdemos/*.c
do-install:
@for i in demos xdemos; do \
@@ -45,13 +74,14 @@ do-install:
${INSTALL_DATA} $$i ${DATADIR}/data; \
done
-.include "${.CURDIR}/../../graphics/libGL/bsd.mesalib.mk"
.include <bsd.port.pre.mk>
-CPPFLAGS+= ${PTHREAD_CFLAGS} -I${LOCALBASE}/include
-LDFLAGS+= ${PTHREAD_LIBS} -L${LOCALBASE}/lib
.if defined(WITH_NVIDIA_GL)
CFLAGS+= -DWITH_NVIDIA_GL=1
.endif
+.if !defined(ARCH)
+ARCH!= uname -p
+.endif
+
.include <bsd.port.post.mk>
diff --git a/graphics/mesa-demos/distinfo b/graphics/mesa-demos/distinfo
index 379a40cf7bcd..738047a00e75 100644
--- a/graphics/mesa-demos/distinfo
+++ b/graphics/mesa-demos/distinfo
@@ -1,7 +1,3 @@
-SHA256 (MesaLib-7.4.4.tar.bz2) = eaf73d7a3a2dc959ddc0753abaa18160c64bec00b35bf4a0c96040b2072918ec
-SIZE (MesaLib-7.4.4.tar.bz2) = 3375615
-SHA256 (MesaDemos-7.4.4.tar.bz2) = 2b055f1b364795caec122092dedca9ac3ecce4fcf61947f52a286a681e9d1111
-SIZE (MesaDemos-7.4.4.tar.bz2) = 1367659
SHA256 (MesaLib-7.6.1.tar.bz2) = 701f0e4cb85d6298181651b780d1c0a439fadd02aad29ee6623fc05588bb8d44
SIZE (MesaLib-7.6.1.tar.bz2) = 4886995
SHA256 (MesaDemos-7.6.1.tar.bz2) = d2368fc86d032dc6478df70f99b114abdf6c0c1da57bf1d3927ab179876f9c4b
diff --git a/graphics/mesa-demos/files/config b/graphics/mesa-demos/files/config
deleted file mode 100644
index a46afa0e1d7c..000000000000
--- a/graphics/mesa-demos/files/config
+++ /dev/null
@@ -1,30 +0,0 @@
-# Configuration for mesa-demos port for FreeBSD
-# Taken from Mesa CVS mesa/Mesa/configs/freebsd Rev 1.2
-# $FreeBSD$
-#
-
-# 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)
-
diff --git a/graphics/mesa-demos/files/patch-src__mesa__x86-64__glapi_x86-64.S b/graphics/mesa-demos/files/patch-src__mesa__x86-64__glapi_x86-64.S
new file mode 100644
index 000000000000..908a6fe300aa
--- /dev/null
+++ b/graphics/mesa-demos/files/patch-src__mesa__x86-64__glapi_x86-64.S
@@ -0,0 +1,12 @@
+--- ./src/mesa/x86-64/glapi_x86-64.S.orig 2009-03-13 04:28:49.000000000 +0100
++++ ./src/mesa/x86-64/glapi_x86-64.S 2011-01-28 18:12:18.000000000 +0100
+@@ -73,7 +73,8 @@ _x86_64_get_dispatch:
+
+ .p2align 4,,15
+ _x86_64_get_dispatch:
+- movq _gl_DispatchTSD(%rip), %rdi
++ movq _gl_DispatchTSD@GOTPCREL(%rip), %rax
++ movl (%rax), %edi
+ jmp pthread_getspecific@PLT
+
+ #elif defined(THREADS)
diff --git a/graphics/mesa-demos/files/patch-src__mesa__x86-64__xform4.S b/graphics/mesa-demos/files/patch-src__mesa__x86-64__xform4.S
new file mode 100644
index 000000000000..193e6cc30fbe
--- /dev/null
+++ b/graphics/mesa-demos/files/patch-src__mesa__x86-64__xform4.S
@@ -0,0 +1,74 @@
+--- src/mesa/x86-64/xform4.S.orig 2009-01-22 18:38:35.000000000 +0100
++++ src/mesa/x86-64/xform4.S 2011-05-09 21:26:00.000000000 +0200
+@@ -53,7 +53,7 @@ _mesa_x86_64_transform_points4_general:
+ * rdx = source
+ */
+ movl V4F_COUNT(%rdx), %ecx /* count */
+- movzx V4F_STRIDE(%rdx), %eax /* stride */
++ movzbl V4F_STRIDE(%rdx), %eax /* stride */
+
+ movl %ecx, V4F_COUNT(%rdi) /* set dest count */
+ movl $4, V4F_SIZE(%rdi) /* set dest size */
+@@ -116,7 +116,7 @@ p4_constants:
+ .byte 0x00, 0x00, 0x00, 0x00
+ .byte 0x00, 0x00, 0x00, 0x00
+ .byte 0x00, 0x00, 0x00, 0x00
+-.float 0f+1.0
++.float 1.0
+
+ .text
+ .align 16
+@@ -135,7 +135,7 @@ _mesa_x86_64_transform_points4_3d:
+ movaps 16(%rax), %xmm10
+
+ movl V4F_COUNT(%rdx), %ecx /* count */
+- movzx V4F_STRIDE(%rdx), %eax /* stride */
++ movzbl V4F_STRIDE(%rdx), %eax /* stride */
+
+ movl %ecx, V4F_COUNT(%rdi) /* set dest count */
+ movl $4, V4F_SIZE(%rdi) /* set dest size */
+@@ -195,7 +195,7 @@ p4_3d_done:
+ _mesa_x86_64_transform_points4_identity:
+
+ movl V4F_COUNT(%rdx), %ecx /* count */
+- movzx V4F_STRIDE(%rdx), %eax /* stride */
++ movzbl V4F_STRIDE(%rdx), %eax /* stride */
+
+ movl %ecx, V4F_COUNT(%rdi) /* set dest count */
+ movl $4, V4F_SIZE(%rdi) /* set dest size */
+@@ -223,7 +223,7 @@ p4_identity_done:
+ _mesa_3dnow_transform_points4_3d_no_rot:
+
+ movl V4F_COUNT(%rdx), %ecx /* count */
+- movzx V4F_STRIDE(%rdx), %eax /* stride */
++ movzbl V4F_STRIDE(%rdx), %eax /* stride */
+
+ movl %ecx, V4F_COUNT(%rdi) /* set dest count */
+ movl $4, V4F_SIZE(%rdi) /* set dest size */
+@@ -287,7 +287,7 @@ p4_3d_no_rot_done:
+ _mesa_3dnow_transform_points4_perspective:
+
+ movl V4F_COUNT(%rdx), %ecx /* count */
+- movzx V4F_STRIDE(%rdx), %eax /* stride */
++ movzbl V4F_STRIDE(%rdx), %eax /* stride */
+
+ movl %ecx, V4F_COUNT(%rdi) /* set dest count */
+ movl $4, V4F_SIZE(%rdi) /* set dest size */
+@@ -353,7 +353,7 @@ p4_perspective_done:
+ _mesa_3dnow_transform_points4_2d_no_rot:
+
+ movl V4F_COUNT(%rdx), %ecx /* count */
+- movzx V4F_STRIDE(%rdx), %eax /* stride */
++ movzbl V4F_STRIDE(%rdx), %eax /* stride */
+
+ movl %ecx, V4F_COUNT(%rdi) /* set dest count */
+ movl $4, V4F_SIZE(%rdi) /* set dest size */
+@@ -408,7 +408,7 @@ p4_2d_no_rot_done:
+ _mesa_3dnow_transform_points4_2d:
+
+ movl V4F_COUNT(%rdx), %ecx /* count */
+- movzx V4F_STRIDE(%rdx), %eax /* stride */
++ movzbl V4F_STRIDE(%rdx), %eax /* stride */
+
+ movl %ecx, V4F_COUNT(%rdi) /* set dest count */
+ movl $4, V4F_SIZE(%rdi) /* set dest size */
diff --git a/graphics/mesa-demos/files/patch-src__mesa__x86__glapi_x86.S b/graphics/mesa-demos/files/patch-src__mesa__x86__glapi_x86.S
new file mode 100644
index 000000000000..71da78c83ffd
--- /dev/null
+++ b/graphics/mesa-demos/files/patch-src__mesa__x86__glapi_x86.S
@@ -0,0 +1,11 @@
+--- ./src/mesa/x86/glapi_x86.S.orig 2009-03-13 04:28:49.000000000 +0100
++++ ./src/mesa/x86/glapi_x86.S 2011-01-28 18:11:56.000000000 +0100
+@@ -47,7 +47,7 @@
+ #define GL_OFFSET(x) CODEPTR(REGOFF(4 * x, EAX))
+
+ #if defined(GNU_ASSEMBLER) && !defined(__DJGPP__) && !defined(__MINGW32__)
+-#define GLOBL_FN(x) GLOBL x ; .type x, function
++#define GLOBL_FN(x) GLOBL x ; .type x, @function
+ #else
+ #define GLOBL_FN(x) GLOBL x
+ #endif
diff --git a/graphics/mesa-demos/files/patch-src__mesa__x86__read_rgba_span_x86.S b/graphics/mesa-demos/files/patch-src__mesa__x86__read_rgba_span_x86.S
new file mode 100644
index 000000000000..37b08d1cda3c
--- /dev/null
+++ b/graphics/mesa-demos/files/patch-src__mesa__x86__read_rgba_span_x86.S
@@ -0,0 +1,11 @@
+--- ./src/mesa/x86/read_rgba_span_x86.S.orig 2008-08-25 16:46:47.000000000 +0200
++++ ./src/mesa/x86/read_rgba_span_x86.S 2011-01-28 18:10:06.000000000 +0100
+@@ -648,7 +648,7 @@ _generic_read_RGBA_span_RGB565_MMX:
+ testl $0x01, %ecx
+ je .L01
+
+- movzxw (%eax), %ecx
++ movzwl (%eax), %ecx
+ movd %ecx, %mm4
+
+ pshufw $0x00, %mm4, %mm0
diff --git a/graphics/mesa-demos/pkg-plist b/graphics/mesa-demos/pkg-plist
index f72940389afe..e4cbf2e03458 100644
--- a/graphics/mesa-demos/pkg-plist
+++ b/graphics/mesa-demos/pkg-plist
@@ -6,11 +6,11 @@ bin/clearspd
bin/copypix
bin/corender
bin/cubemap
-%%MESALIB76%%bin/dinoshade
+bin/dinoshade
bin/drawpix
bin/engine
bin/fbo_firecube
-%%MESALIB76%%bin/fbotexture
+bin/fbotexture
bin/fire
bin/fogcoord
bin/fplight
@@ -21,11 +21,9 @@ bin/gears
bin/geartrain
bin/glinfo
bin/gloss
-%%MESALIB74%%bin/glslnoise
bin/glsync
bin/gltestperf
bin/glthreads
-%%MESALIB74%%bin/glutfx
bin/glxcontexts
bin/glxdemo
bin/glxgears
@@ -43,14 +41,14 @@ bin/lodbias
bin/manywin
bin/morph3d
bin/multiarb
-%%MESALIB76%%bin/multictx
+bin/multictx
bin/offset
bin/overlay
bin/paltex
bin/pbdemo
bin/pbinfo
bin/pointblast
-%%MESALIB76%%bin/projtex
+bin/projtex
bin/rain
bin/ray
bin/readpix
@@ -58,21 +56,18 @@ bin/reflect
bin/renormal
bin/shadowtex
bin/sharedtex
-%%MESALIB76%%bin/sharedtex_mt
+bin/sharedtex_mt
bin/singlebuffer
bin/spectex
bin/spriteblast
bin/stex3d
-%%MESALIB74%%bin/streaming_rect
bin/teapot
bin/terrain
bin/tessdemo
bin/texcyl
-%%MESALIB74%%bin/texdown
bin/texenv
-%%MESALIB74%%bin/texobj
bin/texture_from_pixmap
-%%MESALIB76%%bin/textures
+bin/textures
bin/trispd
bin/tunnel
bin/tunnel2