[Midnightbsd-cvs] mports [17033] trunk/graphics/libGL: patch libGL for mesa update
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Sat Sep 13 20:46:11 EDT 2014
Revision: 17033
http://svnweb.midnightbsd.org/mports/?rev=17033
Author: laffer1
Date: 2014-09-13 20:46:10 -0400 (Sat, 13 Sep 2014)
Log Message:
-----------
patch libGL for mesa update
Modified Paths:
--------------
trunk/graphics/libGL/Makefile
trunk/graphics/libGL/bsd.mesalib.mk
trunk/graphics/libGL/distinfo
trunk/graphics/libGL/pkg-plist
Added Paths:
-----------
trunk/graphics/libGL/files/patch-Makefile.in
trunk/graphics/libGL/files/patch-configure
trunk/graphics/libGL/files/patch-src-glsl_ir_constant_expression.cpp
trunk/graphics/libGL/files/patch-src__gallium__include__pipe__p_config.h
trunk/graphics/libGL/files/patch-src_gallium_drivers_r300_r300-chipset.c
trunk/graphics/libGL/files/patch-src_gallium_drivers_r600_r600-asm.c
trunk/graphics/libGL/files/patch-src_gallium_drivers_r600_r600-shader.c
trunk/graphics/libGL/files/patch-src_gallium_drivers_r600_r600_state_common.c
trunk/graphics/libGL/files/patch-src_gallium_drivers_radeon_radeon-llvm-emit.cpp
trunk/graphics/libGL/files/patch-src_gallium_drivers_radeonsi_r600-buffer.c
trunk/graphics/libGL/files/patch-src_gallium_winsys_svga_drm_vmw-screen-ioctl.c
trunk/graphics/libGL/files/patch-src_mapi_glapi_gen_gl-gentable.py
trunk/graphics/libGL/files/patch-src_mesa_drivers_dri_common_Makefile.in
trunk/graphics/libGL/files/patch-src_mesa_drivers_dri_common_xmlpool_Makefile.in
trunk/graphics/libGL/files/patch-src_mesa_main_compiler.h
trunk/graphics/libGL/files/patch-src_mesa_main_imports.c
trunk/graphics/libGL/files-old/
trunk/graphics/libGL/files-old/patch-bin__mklib
trunk/graphics/libGL/files-old/patch-configure
trunk/graphics/libGL/files-old/patch-mach64_context.h
trunk/graphics/libGL/files-old/patch-src__mesa__x86-64__glapi_x86-64.S
trunk/graphics/libGL/files-old/patch-src__mesa__x86-64__xform4.S
trunk/graphics/libGL/files-old/patch-src__mesa__x86__glapi_x86.S
trunk/graphics/libGL/files-old/patch-src__mesa__x86__read_rgba_span_x86.S
trunk/graphics/libGL/files-old/patch-src_glx_x11_XF86dri.c
trunk/graphics/libGL/files-old/patch-src_mesa_Makefile
Removed Paths:
-------------
trunk/graphics/libGL/files/extra-configure
trunk/graphics/libGL/files/extra-configure-old
trunk/graphics/libGL/files/extra-mach64_context.h
trunk/graphics/libGL/files/extra-mach64_context.h-old
trunk/graphics/libGL/files/extra-sis_context.h
trunk/graphics/libGL/files/extra-src-glsl_ir_constant_expression.cpp
trunk/graphics/libGL/files/extra-src__gallium__include__pipe__p_config.h
trunk/graphics/libGL/files/extra-src__mesa__drivers__dri__nouveau__nouveau_array.c
trunk/graphics/libGL/files/extra-src__mesa__drivers__dri__nouveau__nouveau_render_t.c
trunk/graphics/libGL/files/extra-src__mesa__drivers__dri__radeon__radeon_span.c
trunk/graphics/libGL/files/extra-src__mesa__x86-64__glapi_x86-64.S
trunk/graphics/libGL/files/extra-src__mesa__x86-64__xform4.S
trunk/graphics/libGL/files/extra-src__mesa__x86__glapi_x86.S
trunk/graphics/libGL/files/extra-src__mesa__x86__read_rgba_span_x86.S
Modified: trunk/graphics/libGL/Makefile
===================================================================
--- trunk/graphics/libGL/Makefile 2014-09-14 00:30:05 UTC (rev 17032)
+++ trunk/graphics/libGL/Makefile 2014-09-14 00:46:10 UTC (rev 17033)
@@ -2,29 +2,47 @@
PORTNAME= libGL
PORTVERSION= ${MESAVERSION}
+PORTREVISION= ${LIBGLREVISION}
CATEGORIES= graphics
COMMENT= OpenGL library that renders using GLX or DRI
+
LICENSE= mit
-LIB_DEPENDS+= drm:${PORTSDIR}/graphics/libdrm \
- expat.6:${PORTSDIR}/textproc/expat2
+LIB_DEPENDS+= libdrm.so:${PORTSDIR}/graphics/libdrm \
+ libexpat.so:${PORTSDIR}/textproc/expat2
-USE_PKGCONFIG= build
+USES= pkgconfig
USE_XORG= glproto x11 xext xxf86vm xdamage xfixes dri2proto:both
SUB_FILES= pkg-install pkg-deinstall
-do-install:
- ${RM} -f ${WRKSRC}/include/GL/glu*.h
- cd ${WRKSRC}/src/mesa; ${GMAKE} ${FAKE_MAKEARGS} install-libgl
+.include <bsd.mport.options.mk>
+.if defined(WITH_NEW_XORG)
+LIBGLREVISION= 2
+LIB_DEPENDS+= libglapi.so:${PORTSDIR}/graphics/libglapi
+.else
+LIBGLREVISION= 5
+.endif
+
.include "${.CURDIR}/bsd.mesalib.mk"
-.include <bsd.port.pre.mk>
-
-.if ${ARCH} != "amd64" || ${ARCH} != "i386"
+.if !(${ARCH} == "amd64" || ${ARCH} == "i386")
CONFIGURE_ARGS+=--disable-gallium-intel
.endif
-.include <bsd.port.post.mk>
+post-install:
+ ${RM} -f ${STAGEDIR}${PREFIX}/libdata/pkgconfig/dri.pc
+ ${RM} -rf ${STAGEDIR}${PREFIX}/include/GL/internal
+.if defined(WITH_NEW_XORG)
+ @${MKDIR} ${STAGEDIR}${PREFIX}/lib/.libGL
+ @${MV} ${STAGEDIR}${PREFIX}/lib/libGL* \
+ ${STAGEDIR}${PREFIX}/lib/.libGL/
+ ${RM} ${STAGEDIR}${PREFIX}/lib/libglapi*
+.else
+ ${RM} ${STAGEDIR}${PREFIX}/include/GL/glu.h
+ ${RM} ${STAGEDIR}${PREFIX}/include/GL/glu_mangle.h
+.endif
+
+.include <bsd.port.mk>
Modified: trunk/graphics/libGL/bsd.mesalib.mk
===================================================================
--- trunk/graphics/libGL/bsd.mesalib.mk 2014-09-14 00:30:05 UTC (rev 17032)
+++ trunk/graphics/libGL/bsd.mesalib.mk 2014-09-14 00:46:10 UTC (rev 17033)
@@ -1,26 +1,21 @@
-#-*- mode: Fundamental; tab-width: 4; -*-
-# ex:ts=4
+# bsd.mesalib.mk - shared code between MesaLib ports.
#
-# bsd.mesa.mk - an attempt to refactor MesaLib ports.
-#
-# Created by: Florent Thoumie <flz at FreeBSD.org>
-#
# !!! Here be dragons !!! (they seem to be everywhere these days)
#
# Remember to upgrade the following ports everytime you bump MESAVERSION:
#
+# - graphics/libEGL
# - graphics/libGL
-# - graphics/libGLU
-# - graphics/libGLw
+# - grahpics/libglesv2
# - graphics/dri
#
-# $MidnightBSD: mports/graphics/libGL/bsd.mesalib.mk,v 1.10 2010/05/30 22:45:18 laffer1 Exp $
+# $FreeBSD: head/graphics/libGL/bsd.mesalib.mk 358152 2014-06-17 17:23:07Z jkim $
MESAVERSION= ${MESABASEVERSION}${MESASUBVERSION:C/^(.)/.\1/}
MESADISTVERSION=${MESABASEVERSION}${MESASUBVERSION:C/^(.)/-\1/}
.if defined(WITH_NEW_XORG)
-MESABASEVERSION= 7.11.2
+MESABASEVERSION= 9.1.7
# if there is a subversion, include the '-' between 7.11-rc2 for example.
MESASUBVERSION=
PLIST_SUB+= OLD="@comment " NEW=""
@@ -30,90 +25,105 @@
PLIST_SUB+= OLD="" NEW="@comment "
.endif
-MASTER_SITES= ftp://ftp.freedesktop.org/pub/mesa/${MESABASEVERSION}/:mesa,glut
-DISTFILES= MesaLib-${MESADISTVERSION}${EXTRACT_SUFX}:mesa
-MAINTAINER?= ports at MidnightBSD.org
+MASTER_SITES= ftp://ftp.freedesktop.org/pub/mesa/older-versions/${MESABASEVERSION:R:R}.x/${MESABASEVERSION}/
+DISTFILES= MesaLib-${MESADISTVERSION}${EXTRACT_SUFX}
+MAINTAINER= x11 at FreeBSD.org
BUILD_DEPENDS+= makedepend:${PORTSDIR}/devel/makedepend \
+ python2:${PORTSDIR}/lang/python2 \
${PYTHON_SITELIBDIR}/libxml2.py:${PORTSDIR}/textproc/py-libxml2
-USE_BISON= build
-USE_PYTHON_BUILD=yes
-USES+= gmake tar:bzip2
+USES+= bison gmake pathfix pkgconfig shebangfix tar:bzip2
+USE_PYTHON_BUILD=2
USE_LDCONFIG= yes
GNU_CONFIGURE= yes
-MAKE_JOBS_UNSAFE= yes
-CPPFLAGS+= -I${LOCALBASE}/include
-LDFLAGS+= -L${LOCALBASE}/lib
-CONFIGURE_ARGS+=--enable-gallium-llvm=no --without-gallium-drivers \
- --disable-egl --disable-glut
+CPPFLAGS+= -isystem${LOCALBASE}/include
+LDFLAGS+= -Wl,-Y${LOCALBASE}/lib
+.if ${OSVERSION} < 1000033
+BUILD_DEPENDS+= ${LOCALBASE}/bin/flex:${PORTSDIR}/textproc/flex
+CONFIGURE_ENV+=ac_cv_prog_LEX=${LOCALBASE}/bin/flex
+.endif
+
.if defined(WITH_NEW_XORG)
-EXTRA_PATCHES+= ${PATCHDIR}/extra-configure \
- ${PATCHDIR}/extra-mach64_context.h \
- ${PATCHDIR}/extra-sis_context.h \
- ${PATCHDIR}/extra-src-glsl_ir_constant_expression.cpp \
- ${PATCHDIR}/extra-src__gallium__include__pipe__p_config.h \
- ${PATCHDIR}/extra-src__mesa__drivers__dri__nouveau__nouveau_array.c \
- ${PATCHDIR}/extra-src__mesa__drivers__dri__nouveau__nouveau_render_t.c \
- ${PATCHDIR}/extra-src__mesa__drivers__dri__radeon__radeon_span.c
+INSTALL_TARGET= install-strip
+USES+= libtool:keepla
+
+python_OLD_CMD= "/usr/bin/env[[:space:]]python"
+python_CMD= ${LOCALBASE}/bin/python2
+SHEBANG_FILES= src/gallium/*/*/*.py src/gallium/tools/trace/*.py \
+ src/gallium/drivers/svga/svgadump/svga_dump.py \
+ src/glsl/tests/compare_ir src/mapi/glapi/gen/*.py \
+ src/mapi/mapi/mapi_abi.py
+
+# i386 triggers clang bug 19778. This happens with clang 3.4.1 and older.
+. if ${ARCH} == i386
+USE_GCC=yes
+. endif
.else
-EXTRA_PATCHES+= ${PATCHDIR}/extra-configure-old \
- ${PATCHDIR}/extra-mach64_context.h-old \
- ${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
+CONFIGURE_ARGS+=--disable-glut --disable-glw --disable-glu
ALL_TARGET= default
+.endif
-PATCHDIR= ${.CURDIR}/../../graphics/libGL/files
-WRKSRC= ${WRKDIR}/Mesa-${MESABASEVERSION}${MESASUBVERSION}
-
-.if !defined(ARCH)
-ARCH!= uname -p
+MASTERDIR= ${.CURDIR}/../../graphics/libGL
+.if defined(WITH_NEW_XORG)
+PATCHDIR= ${MASTERDIR}/files
+.else
+PATCHDIR= ${MASTERDIR}/files-old
.endif
+DESCR= ${.CURDIR}/pkg-descr
+PLIST= ${.CURDIR}/pkg-plist
+WRKSRC= ${WRKDIR}/Mesa-${MESADISTVERSION}
-COMPONENT= ${PORTNAME:L:C/^lib//:C/mesa-//}
+COMPONENT= ${PORTNAME:tl:C/^lib//:C/mesa-//}
-.if ${COMPONENT:Mglu} == ""
-CONFIGURE_ARGS+= --disable-glu
+.if ${COMPONENT:Mglesv2} == ""
+CONFIGURE_ARGS+= --disable-gles2
+.else
+CONFIGURE_ARGS+= --enable-gles2
.endif
-.if ${COMPONENT:Mglw} == ""
-CONFIGURE_ARGS+= --disable-glw
+.if ${COMPONENT:Megl} == ""
+CONFIGURE_ARGS+= --disable-egl
.else
-CONFIGURE_ARGS+= --enable-motif
+CONFIGURE_ARGS+= --enable-egl
.endif
.if ${COMPONENT:Mdri} == ""
-CONFIGURE_ARGS+= --with-dri-drivers=no
+CONFIGURE_ARGS+=--with-dri-drivers=no
+CONFIGURE_ARGS+=--enable-gallium-llvm=no --without-gallium-drivers
+.else
+# done in the dri port
.endif
+.if !defined(WITH_NEW_XORG)
.if defined(WITHOUT_XCB)
CONFIGURE_ARGS+= --disable-xcb
.else
CONFIGURE_ARGS+= --enable-xcb
.endif
+.endif
post-patch:
@${REINPLACE_CMD} -e 's|-ffast-math|${FAST_MATH}|' -e 's|x86_64|amd64|' \
- -e 's|-lpthread|${PTHREAD_LIBS}|g' ${WRKSRC}/configure
+ ${WRKSRC}/configure
+ @${REINPLACE_CMD} -e 's|/etc/|${PREFIX}/etc/|g' \
+ ${WRKSRC}/src/mesa/drivers/dri/common/xmlconfig.c
+.if !defined(WITH_NEW_XORG)
+ @${REINPLACE_CMD} -e 's|python|${PYTHON_CMD}|' \
+ ${WRKSRC}/src/gallium/auxiliary/util/Makefile
@${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
-.if defined(WITH_NEW_XORG)
-# replace hardlinks with patched radeon_span.c
-.for i in r200 r300 r600
- @${CP} -fp ${WRKSRC}/src/mesa/drivers/dri/radeon/radeon_span.c \
- ${WRKSRC}/src/mesa/drivers/dri/${i}/
-.endfor
+.else
+ @${REINPLACE_CMD} -e 's|#!/usr/bin/python|#!${PYTHON_CMD}|g' \
+ ${WRKSRC}/src/mesa/drivers/dri/common/xmlpool/gen_xmlpool.py \
+ ${WRKSRC}/src/glsl/builtins/tools/*.py
+ @${REINPLACE_CMD} -e 's|!/usr/bin/python2|!${PYTHON_CMD}|g' \
+ ${WRKSRC}/src/mesa/main/get_hash_generator.py \
+ ${WRKSRC}/src/mapi/glapi/gen/gl_enums.py \
+ ${WRKSRC}/src/mapi/glapi/gen/gl_table.py
.endif
-.if ${COMPONENT:Mglut} != ""
- @${REINPLACE_CMD} -e 's|[$$](INSTALL_LIB_DIR)/pkgconfig|${PREFIX}/libdata/pkgconfig|' \
- ${WRKSRC}/src/glut/glx/Makefile
-.endif
Modified: trunk/graphics/libGL/distinfo
===================================================================
--- trunk/graphics/libGL/distinfo 2014-09-14 00:30:05 UTC (rev 17032)
+++ trunk/graphics/libGL/distinfo 2014-09-14 00:46:10 UTC (rev 17033)
@@ -1,4 +1,4 @@
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
+SHA256 (MesaLib-9.1.7.tar.bz2) = 30e6b878b457c716221a9730b179b2846c38cfd5aa1b02d54aff685f50b844a0
+SIZE (MesaLib-9.1.7.tar.bz2) = 6134393
Deleted: trunk/graphics/libGL/files/extra-configure
===================================================================
--- trunk/graphics/libGL/files/extra-configure 2014-09-14 00:30:05 UTC (rev 17032)
+++ trunk/graphics/libGL/files/extra-configure 2014-09-14 00:46:10 UTC (rev 17033)
@@ -1,42 +0,0 @@
---- configure.orig 2011-11-17 19:46:34.000000000 +0000
-+++ configure 2012-06-28 12:53:09.000000000 +0000
-@@ -7817,10 +7817,35 @@
- DEFINES="$DEFINES -DGLX_DIRECT_RENDERING"
- fi
-
-- if test "x$DRI_DIRS" = "xyes"; then
-- DRI_DIRS="i810 i915 i965 mach64 mga nouveau r128 r200 r300 r600 \
-- radeon tdfx unichrome savage sis swrast"
-- fi
-+ case "$host_cpu" in
-+ x86_64)
-+ # i810 is missing because there is no x86-64 system where it
-+ # could *ever* be used.
-+ if test "x$DRI_DIRS" = "xyes"; then
-+ DRI_DIRS="i915 i965 mach64 mga nouveau r128 r200 r300 r600 \
-+ radeon savage tdfx unichrome sis swrast"
-+ fi
-+ ;;
-+ i*86)
-+ if test "x$DRI_DIRS" = "xyes"; then
-+ DRI_DIRS="i810 i915 i965 mach64 mga nouveau r128 r200 r300 \
-+ r600 radeon savage tdfx unichrome sis 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 swrast"
-+ fi
-+ ;;
-+ esac
- ;;
- gnu*)
- DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER"
Deleted: trunk/graphics/libGL/files/extra-configure-old
===================================================================
--- trunk/graphics/libGL/files/extra-configure-old 2014-09-14 00:30:05 UTC (rev 17032)
+++ trunk/graphics/libGL/files/extra-configure-old 2014-09-14 00:46:10 UTC (rev 17033)
@@ -1,43 +0,0 @@
---- configure.orig 2009-12-22 03:31:30.000000000 +0100
-+++ configure 2012-06-27 19:49:26.000000000 +0200
-@@ -6946,12 +6946,35 @@
- 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 \
-+ case "$host_cpu" in
-+ x86_64)
-+ # i810 is missing because there is no x86-64 system where it
-+ # could *ever* be used.
-+ if test "x$DRI_DIRS" = "xyes"; then
-+ DRI_DIRS="i915 i965 mach64 mga r128 r200 r300 r600 radeon tdfx \
- unichrome savage sis swrast"
-- fi
-+ fi
-+ ;;
-+ i*86)
-+ 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
-+ ;;
-+ 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 swrast"
-+ fi
-+ ;;
-+ esac
- ;;
- gnu*)
- DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER"
Deleted: trunk/graphics/libGL/files/extra-mach64_context.h
===================================================================
--- trunk/graphics/libGL/files/extra-mach64_context.h 2014-09-14 00:30:05 UTC (rev 17032)
+++ trunk/graphics/libGL/files/extra-mach64_context.h 2014-09-14 00:46:10 UTC (rev 17033)
@@ -1,21 +0,0 @@
---- 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
- */
--#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)
-@@ -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>
- #endif
Deleted: trunk/graphics/libGL/files/extra-mach64_context.h-old
===================================================================
--- trunk/graphics/libGL/files/extra-mach64_context.h-old 2014-09-14 00:30:05 UTC (rev 17032)
+++ trunk/graphics/libGL/files/extra-mach64_context.h-old 2014-09-14 00:46:10 UTC (rev 17033)
@@ -1,20 +0,0 @@
---- src/mesa/drivers/dri/mach64/mach64_context.h.orig 2012-06-27 19:59:32.000000000 +0200
-+++ src/mesa/drivers/dri/mach64/mach64_context.h 2012-06-27 20:08:30.000000000 +0200
-@@ -294,11 +294,14 @@
- #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__)
- #include <machine/endian.h>
- #define bswap_32 bswap32
-+#elif defined(__FreeBSD__)
-+#include <sys/endian.h>
-+#define bswap_32 bswap32
-+#else
-+#include <byteswap.h>
- #endif
-
- #define LE32_IN( x ) bswap_32( *(GLuint *)(x) )
Deleted: trunk/graphics/libGL/files/extra-sis_context.h
===================================================================
--- trunk/graphics/libGL/files/extra-sis_context.h 2014-09-14 00:30:05 UTC (rev 17032)
+++ trunk/graphics/libGL/files/extra-sis_context.h 2014-09-14 00:46:10 UTC (rev 17033)
@@ -1,22 +0,0 @@
---- 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(__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
Deleted: trunk/graphics/libGL/files/extra-src-glsl_ir_constant_expression.cpp
===================================================================
--- trunk/graphics/libGL/files/extra-src-glsl_ir_constant_expression.cpp 2014-09-14 00:30:05 UTC (rev 17032)
+++ trunk/graphics/libGL/files/extra-src-glsl_ir_constant_expression.cpp 2014-09-14 00:46:10 UTC (rev 17033)
@@ -1,14 +0,0 @@
---- 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)
- {
Deleted: trunk/graphics/libGL/files/extra-src__gallium__include__pipe__p_config.h
===================================================================
--- trunk/graphics/libGL/files/extra-src__gallium__include__pipe__p_config.h 2014-09-14 00:30:05 UTC (rev 17032)
+++ trunk/graphics/libGL/files/extra-src__gallium__include__pipe__p_config.h 2014-09-14 00:46:10 UTC (rev 17033)
@@ -1,25 +0,0 @@
---- src/gallium/include/pipe/p_config.h.orig 2011-10-15 02:43:58.000000000 +0200
-+++ src/gallium/include/pipe/p_config.h 2012-06-28 21:27:06.000000000 +0200
-@@ -106,6 +106,13 @@
- #endif
- #endif
-
-+#if defined(__sparc__) || defined(__sparc64__)
-+#define PIPE_ARCH_SPARC
-+#if defined(__sparc64__)
-+#define PIPE_ARCH_SPARC_64
-+#endif
-+#endif
-+
-
- /*
- * Endian detection.
-@@ -133,7 +140,7 @@
-
- #if defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64)
- #define PIPE_ARCH_LITTLE_ENDIAN
--#elif defined(PIPE_ARCH_PPC) || defined(PIPE_ARCH_PPC_64)
-+#elif defined(PIPE_ARCH_PPC) || defined(PIPE_ARCH_PPC_64) || defined(PIPE_ARCH_SPARC) || defined(PIPE_ARCH_SPARC_64)
- #define PIPE_ARCH_BIG_ENDIAN
- #endif
-
Deleted: trunk/graphics/libGL/files/extra-src__mesa__drivers__dri__nouveau__nouveau_array.c
===================================================================
--- trunk/graphics/libGL/files/extra-src__mesa__drivers__dri__nouveau__nouveau_array.c 2014-09-14 00:30:05 UTC (rev 17032)
+++ trunk/graphics/libGL/files/extra-src__mesa__drivers__dri__nouveau__nouveau_array.c 2014-09-14 00:46:10 UTC (rev 17033)
@@ -1,99 +0,0 @@
---- src/mesa/drivers/dri/nouveau/nouveau_array.c.orig 2011-01-06 01:19:15.000000000 +0100
-+++ src/mesa/drivers/dri/nouveau/nouveau_array.c 2012-04-28 18:27:06.000000000 +0200
-@@ -29,54 +29,71 @@
- #include "nouveau_array.h"
- #include "nouveau_bufferobj.h"
-
-+#define EXTRACT(in_t, out_t) extract_func_##in_t##_to_##out_t
-+
-+#define EXTRACT_FUNC(in_t, out_t, k) \
-+static out_t EXTRACT(in_t, out_t) \
-+(struct nouveau_array *a, int i, int j) { \
-+ in_t x = ((in_t *)(a->buf + i * a->stride))[j]; \
-+ \
-+ return (out_t)x / (k); \
-+}
-+
-+EXTRACT_FUNC(GLchar, unsigned, 1);
-+EXTRACT_FUNC(GLchar, float, SCHAR_MAX);
-+EXTRACT_FUNC(GLubyte, unsigned, 1);
-+EXTRACT_FUNC(GLubyte, float, UCHAR_MAX);
-+EXTRACT_FUNC(GLshort, unsigned, 1);
-+EXTRACT_FUNC(GLshort, float, SHRT_MAX);
-+EXTRACT_FUNC(GLushort, unsigned, 1);
-+EXTRACT_FUNC(GLushort, float, USHRT_MAX);
-+EXTRACT_FUNC(GLint, unsigned, 1);
-+EXTRACT_FUNC(GLint, float, INT_MAX);
-+EXTRACT_FUNC(GLuint, unsigned, 1);
-+EXTRACT_FUNC(GLuint, float, UINT_MAX);
-+EXTRACT_FUNC(GLfloat, unsigned, 1.0 / UINT_MAX);
-+EXTRACT_FUNC(GLfloat, float, 1);
-+
-+#undef EXTRACT_FUNC
-+
- static void
- get_array_extract(struct nouveau_array *a, extract_u_t *extract_u,
- extract_f_t *extract_f)
- {
--#define EXTRACT(in_t, out_t, k) \
-- ({ \
-- auto out_t f(struct nouveau_array *, int, int); \
-- out_t f(struct nouveau_array *a, int i, int j) { \
-- in_t x = ((in_t *)(a->buf + i * a->stride))[j]; \
-- \
-- return (out_t)x / (k); \
-- }; \
-- f; \
-- });
--
- switch (a->type) {
- case GL_BYTE:
-- *extract_u = EXTRACT(char, unsigned, 1);
-- *extract_f = EXTRACT(char, float, SCHAR_MAX);
-+ *extract_u = EXTRACT(GLchar, unsigned);
-+ *extract_f = EXTRACT(GLchar, float);
- break;
- case GL_UNSIGNED_BYTE:
-- *extract_u = EXTRACT(unsigned char, unsigned, 1);
-- *extract_f = EXTRACT(unsigned char, float, UCHAR_MAX);
-+ *extract_u = EXTRACT(GLubyte, unsigned);
-+ *extract_f = EXTRACT(GLubyte, float);
- break;
- case GL_SHORT:
-- *extract_u = EXTRACT(short, unsigned, 1);
-- *extract_f = EXTRACT(short, float, SHRT_MAX);
-+ *extract_u = EXTRACT(GLshort, unsigned);
-+ *extract_f = EXTRACT(GLshort, float);
- break;
- case GL_UNSIGNED_SHORT:
-- *extract_u = EXTRACT(unsigned short, unsigned, 1);
-- *extract_f = EXTRACT(unsigned short, float, USHRT_MAX);
-+ *extract_u = EXTRACT(GLushort, unsigned);
-+ *extract_f = EXTRACT(GLushort, float);
- break;
- case GL_INT:
-- *extract_u = EXTRACT(int, unsigned, 1);
-- *extract_f = EXTRACT(int, float, INT_MAX);
-+ *extract_u = EXTRACT(GLint, unsigned);
-+ *extract_f = EXTRACT(GLint, float);
- break;
- case GL_UNSIGNED_INT:
-- *extract_u = EXTRACT(unsigned int, unsigned, 1);
-- *extract_f = EXTRACT(unsigned int, float, UINT_MAX);
-+ *extract_u = EXTRACT(GLuint, unsigned);
-+ *extract_f = EXTRACT(GLuint, float);
- break;
- case GL_FLOAT:
-- *extract_u = EXTRACT(float, unsigned, 1.0 / UINT_MAX);
-- *extract_f = EXTRACT(float, float, 1);
-+ *extract_u = EXTRACT(GLfloat, unsigned);
-+ *extract_f = EXTRACT(GLfloat, float);
- break;
- default:
- assert(0);
- }
- }
-+#undef EXTRACT
-
- void
- nouveau_init_array(struct nouveau_array *a, int attr, int stride,
Deleted: trunk/graphics/libGL/files/extra-src__mesa__drivers__dri__nouveau__nouveau_render_t.c
===================================================================
--- trunk/graphics/libGL/files/extra-src__mesa__drivers__dri__nouveau__nouveau_render_t.c 2014-09-14 00:30:05 UTC (rev 17032)
+++ trunk/graphics/libGL/files/extra-src__mesa__drivers__dri__nouveau__nouveau_render_t.c 2014-09-14 00:46:10 UTC (rev 17033)
@@ -1,91 +0,0 @@
---- src/mesa/drivers/dri/nouveau/nouveau_render_t.c.orig 2011-01-06 01:19:34.000000000 +0100
-+++ src/mesa/drivers/dri/nouveau/nouveau_render_t.c 2012-04-28 18:27:06.000000000 +0200
-@@ -97,52 +97,49 @@
- } \
- } while (0)
-
--/*
-- * Select an appropriate dispatch function for the given index buffer.
-- */
--static dispatch_t
--get_array_dispatch(struct nouveau_array *a)
-+static void
-+dispatch_l(struct gl_context *ctx, unsigned int start, int delta,
-+ unsigned int n)
- {
-- if (!a->fields) {
-- auto void f(struct gl_context *, unsigned int, int, unsigned int);
--
-- void f(struct gl_context *ctx, unsigned int start, int delta,
-- unsigned int n) {
-- struct nouveau_channel *chan = context_chan(ctx);
-- RENDER_LOCALS(ctx);
-+ struct nouveau_channel *chan = context_chan(ctx);
-+ RENDER_LOCALS(ctx);
-
-- EMIT_VBO(L, ctx, start, delta, n);
-- };
--
-- return f;
--
-- } else if (a->type == GL_UNSIGNED_INT) {
-- auto void f(struct gl_context *, unsigned int, int, unsigned int);
--
-- void f(struct gl_context *ctx, unsigned int start, int delta,
-- unsigned int n) {
-- struct nouveau_channel *chan = context_chan(ctx);
-- RENDER_LOCALS(ctx);
-+ EMIT_VBO(L, ctx, start, delta, n);
-+}
-
-- EMIT_VBO(I32, ctx, start, delta, n);
-- };
-+static void
-+dispatch_i32(struct gl_context *ctx, unsigned int start, int delta,
-+ unsigned int n)
-+{
-+ struct nouveau_channel *chan = context_chan(ctx);
-+ RENDER_LOCALS(ctx);
-
-- return f;
-+ EMIT_VBO(I32, ctx, start, delta, n);
-+}
-
-- } else {
-- auto void f(struct gl_context *, unsigned int, int, unsigned int);
-+static void
-+dispatch_i16(struct gl_context *ctx, unsigned int start, int delta,
-+ unsigned int n)
-+{
-+ struct nouveau_channel *chan = context_chan(ctx);
-+ RENDER_LOCALS(ctx);
-
-- void f(struct gl_context *ctx, unsigned int start, int delta,
-- unsigned int n) {
-- struct nouveau_channel *chan = context_chan(ctx);
-- RENDER_LOCALS(ctx);
--
-- EMIT_VBO(I32, ctx, start, delta, n & 1);
-- EMIT_VBO(I16, ctx, start, delta, n & ~1);
-- };
-+ EMIT_VBO(I32, ctx, start, delta, n & 1);
-+ EMIT_VBO(I16, ctx, start, delta, n & ~1);
-+}
-
-- return f;
-- }
-+/*
-+ * Select an appropriate dispatch function for the given index buffer.
-+ */
-+static dispatch_t
-+get_array_dispatch(struct nouveau_array *a)
-+{
-+ if (!a->fields)
-+ return dispatch_l;
-+ else if (a->type == GL_UNSIGNED_INT)
-+ return dispatch_i32;
-+ else
-+ return dispatch_i16;
- }
-
- /*
Deleted: trunk/graphics/libGL/files/extra-src__mesa__drivers__dri__radeon__radeon_span.c
===================================================================
--- trunk/graphics/libGL/files/extra-src__mesa__drivers__dri__radeon__radeon_span.c 2014-09-14 00:30:05 UTC (rev 17032)
+++ trunk/graphics/libGL/files/extra-src__mesa__drivers__dri__radeon__radeon_span.c 2014-09-14 00:46:10 UTC (rev 17033)
@@ -1,15 +0,0 @@
---- src/mesa/drivers/dri/radeon/radeon_span.c.orig 2011-07-09 03:37:10.000000000 +0200
-+++ src/mesa/drivers/dri/radeon/radeon_span.c 2012-06-28 21:44:07.000000000 +0200
-@@ -55,7 +55,11 @@
- #include <byteswap.h>
- #define CPU_TO_LE16( x ) bswap_16( x )
- #define LE16_TO_CPU( x ) bswap_16( x )
--#endif /* __linux__ */
-+#elif defined(__FreeBSD__)
-+#include <sys/endian.h>
-+#define CPU_TO_LE16( x ) bswap16( x )
-+#define LE16_TO_CPU( x ) bswap16( x )
-+#endif
- #else
- #define CPU_TO_LE16( x ) ( x )
- #define LE16_TO_CPU( x ) ( x )
Deleted: trunk/graphics/libGL/files/extra-src__mesa__x86-64__glapi_x86-64.S
===================================================================
--- trunk/graphics/libGL/files/extra-src__mesa__x86-64__glapi_x86-64.S 2014-09-14 00:30:05 UTC (rev 17032)
+++ trunk/graphics/libGL/files/extra-src__mesa__x86-64__glapi_x86-64.S 2014-09-14 00:46:10 UTC (rev 17033)
@@ -1,12 +0,0 @@
---- ./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 at GOTPCREL(%rip), %rax
-+ movl (%rax), %edi
- jmp pthread_getspecific at PLT
-
- #elif defined(THREADS)
Deleted: trunk/graphics/libGL/files/extra-src__mesa__x86-64__xform4.S
===================================================================
--- trunk/graphics/libGL/files/extra-src__mesa__x86-64__xform4.S 2014-09-14 00:30:05 UTC (rev 17032)
+++ trunk/graphics/libGL/files/extra-src__mesa__x86-64__xform4.S 2014-09-14 00:46:10 UTC (rev 17033)
@@ -1,74 +0,0 @@
---- 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 */
Deleted: trunk/graphics/libGL/files/extra-src__mesa__x86__glapi_x86.S
===================================================================
--- trunk/graphics/libGL/files/extra-src__mesa__x86__glapi_x86.S 2014-09-14 00:30:05 UTC (rev 17032)
+++ trunk/graphics/libGL/files/extra-src__mesa__x86__glapi_x86.S 2014-09-14 00:46:10 UTC (rev 17033)
@@ -1,11 +0,0 @@
---- ./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
Deleted: trunk/graphics/libGL/files/extra-src__mesa__x86__read_rgba_span_x86.S
===================================================================
--- trunk/graphics/libGL/files/extra-src__mesa__x86__read_rgba_span_x86.S 2014-09-14 00:30:05 UTC (rev 17032)
+++ trunk/graphics/libGL/files/extra-src__mesa__x86__read_rgba_span_x86.S 2014-09-14 00:46:10 UTC (rev 17033)
@@ -1,11 +0,0 @@
---- ./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
Added: trunk/graphics/libGL/files/patch-Makefile.in
===================================================================
--- trunk/graphics/libGL/files/patch-Makefile.in (rev 0)
+++ trunk/graphics/libGL/files/patch-Makefile.in 2014-09-14 00:46:10 UTC (rev 17033)
@@ -0,0 +1,13 @@
+--- Makefile.in.orig 2014-05-11 21:01:42.000000000 +0200
++++ Makefile.in 2014-05-11 21:02:12.000000000 +0200
+@@ -87,9 +87,7 @@
+ $(top_srcdir)/m4/ax_prog_flex.m4 \
+ $(top_srcdir)/m4/ax_pthread.m4 \
+ $(top_srcdir)/m4/ax_python_module.m4 \
+- $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
+- $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+- $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
++ $(top_srcdir)/configure.ac
+ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
Added: trunk/graphics/libGL/files/patch-configure
===================================================================
--- trunk/graphics/libGL/files/patch-configure (rev 0)
+++ trunk/graphics/libGL/files/patch-configure 2014-09-14 00:46:10 UTC (rev 17033)
@@ -0,0 +1,49 @@
+--- configure.orig 2013-08-01 23:22:15.000000000 +0200
++++ configure 2013-08-19 20:05:02.000000000 +0200
+@@ -21046,9 +21046,34 @@
+ DEFINES="$DEFINES -DHAVE_PTHREAD -DUSE_EXTERNAL_DXTN_LIB=1"
+ DEFINES="$DEFINES -DIN_DRI_DRIVER -DHAVE_ALIAS"
+
+- if test "x$DRI_DIRS" = "xyes"; then
+- DRI_DIRS="i915 i965 nouveau r200 radeon swrast"
+- fi
++ case "$host_cpu" in
++ x86_64|ia64)
++ # i810 is missing because there is no x86-64 system where it
++ # could *ever* be used.
++ if test "x$DRI_DIRS" = "xyes"; then
++ DRI_DIRS="i915 i965 nouveau r200 radeon swrast"
++ fi
++ ;;
++ i*86)
++ if test "x$DRI_DIRS" = "xyes"; then
++ DRI_DIRS="i915 i965 nouveau r200 radeon 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="r200 radeon swrast"
++ fi
++ ;;
++ sparc*)
++ # Build only the drivers for cards that exist on SPARC.
++ if test "x$DRI_DIRS" = "xyes"; then
++ DRI_DIRS="r200 radeon swrast"
++ fi
++ ;;
++ esac
++
+ ;;
+ gnu*)
+ DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER"
+@@ -23396,7 +23421,7 @@
+ radeon_llvm_check() {
+ LLVM_REQUIRED_VERSION_MAJOR="3"
+ LLVM_REQUIRED_VERSION_MINOR="2"
+- if test "$LLVM_VERSION_INT" -ne "${LLVM_REQUIRED_VERSION_MAJOR}0${LLVM_REQUIRED_VERSION_MINOR}"; then
++ if test "$LLVM_VERSION_INT" -lt "${LLVM_REQUIRED_VERSION_MAJOR}0${LLVM_REQUIRED_VERSION_MINOR}"; then
+ as_fn_error $? "LLVM $LLVM_REQUIRED_VERSION_MAJOR.$LLVM_REQUIRED_VERSION_MINOR with R600 target enabled is required.
+ To use the r600/radeonsi LLVM backend, you need to fetch the LLVM source from:
+ git://people.freedesktop.org/~tstellar/llvm master
Added: trunk/graphics/libGL/files/patch-src-glsl_ir_constant_expression.cpp
===================================================================
--- trunk/graphics/libGL/files/patch-src-glsl_ir_constant_expression.cpp (rev 0)
+++ trunk/graphics/libGL/files/patch-src-glsl_ir_constant_expression.cpp 2014-09-14 00:46:10 UTC (rev 17033)
@@ -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)
+ {
Added: trunk/graphics/libGL/files/patch-src__gallium__include__pipe__p_config.h
===================================================================
--- trunk/graphics/libGL/files/patch-src__gallium__include__pipe__p_config.h (rev 0)
+++ trunk/graphics/libGL/files/patch-src__gallium__include__pipe__p_config.h 2014-09-14 00:46:10 UTC (rev 17033)
@@ -0,0 +1,25 @@
+--- src/gallium/include/pipe/p_config.h.orig 2011-10-15 02:43:58.000000000 +0200
++++ src/gallium/include/pipe/p_config.h 2012-06-28 21:27:06.000000000 +0200
+@@ -106,6 +106,13 @@
+ #endif
+ #endif
+
++#if defined(__sparc__) || defined(__sparc64__)
++#define PIPE_ARCH_SPARC
++#if defined(__sparc64__)
++#define PIPE_ARCH_SPARC_64
++#endif
++#endif
++
+
+ /*
+ * Endian detection.
+@@ -133,7 +140,7 @@
+
+ #if defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64)
+ #define PIPE_ARCH_LITTLE_ENDIAN
+-#elif defined(PIPE_ARCH_PPC) || defined(PIPE_ARCH_PPC_64)
++#elif defined(PIPE_ARCH_PPC) || defined(PIPE_ARCH_PPC_64) || defined(PIPE_ARCH_SPARC) || defined(PIPE_ARCH_SPARC_64)
+ #define PIPE_ARCH_BIG_ENDIAN
+ #endif
+
Added: trunk/graphics/libGL/files/patch-src_gallium_drivers_r300_r300-chipset.c
===================================================================
--- trunk/graphics/libGL/files/patch-src_gallium_drivers_r300_r300-chipset.c (rev 0)
+++ trunk/graphics/libGL/files/patch-src_gallium_drivers_r300_r300-chipset.c 2014-09-14 00:46:10 UTC (rev 17033)
@@ -0,0 +1,26 @@
+diff --git a/src/gallium/drivers/r300/r300_chipset.c b/src/gallium/drivers/r300/r300_chipset.c
+index 11061ed..daf990e 100644
+--- src/gallium/drivers/r300/r300_chipset.c
++++ src/gallium/drivers/r300/r300_chipset.c
+@@ -48,6 +48,21 @@ static void r300_apply_hyperz_blacklist(struct r300_capabilities* caps)
+ };
+ int i;
+
++#if defined(__DragonFly__) || \
++ defined(__FreeBSD__) || \
++ defined(__NetBSD__) || \
++ defined(__OpenBSD__)
++ const char *progname, *program_invocation_short_name;
++
++ progname = getprogname();
++ program_invocation_short_name = strrchr(progname, '/');
++ if (program_invocation_short_name) {
++ program_invocation_short_name++;
++ } else {
++ program_invocation_short_name = progname;
++ }
++#endif
++
+ for (i = 0; i < Elements(list); i++) {
+ if (strcmp(list[i], program_invocation_short_name) == 0) {
+ caps->zmask_ram = 0;
Added: trunk/graphics/libGL/files/patch-src_gallium_drivers_r600_r600-asm.c
===================================================================
--- trunk/graphics/libGL/files/patch-src_gallium_drivers_r600_r600-asm.c (rev 0)
+++ trunk/graphics/libGL/files/patch-src_gallium_drivers_r600_r600-asm.c 2014-09-14 00:46:10 UTC (rev 17033)
@@ -0,0 +1,15 @@
+--- src/gallium/drivers/r600/r600_asm.c.orig 2013-03-20 00:28:25.000000000 +0100
++++ src/gallium/drivers/r600/r600_asm.c 2013-06-26 23:29:14.000000000 +0200
+@@ -27,7 +27,12 @@
+ #include "r600d.h"
+
+ #include <errno.h>
++#if defined(__linux__)
+ #include <byteswap.h>
++#elif defined(__FreeBSD__) || defined(__DragonFly__)
++#include <sys/endian.h>
++#define bswap_32(x) bswap32((x))
++#endif
+ #include "util/u_memory.h"
+ #include "pipe/p_shader_tokens.h"
+
Added: trunk/graphics/libGL/files/patch-src_gallium_drivers_r600_r600-shader.c
===================================================================
--- trunk/graphics/libGL/files/patch-src_gallium_drivers_r600_r600-shader.c (rev 0)
+++ trunk/graphics/libGL/files/patch-src_gallium_drivers_r600_r600-shader.c 2014-09-14 00:46:10 UTC (rev 17033)
@@ -0,0 +1,15 @@
+--- src/gallium/drivers/r600/r600_shader.c.orig 2013-05-16 19:38:54.000000000 +0200
++++ src/gallium/drivers/r600/r600_shader.c 2013-06-26 23:26:02.000000000 +0200
+@@ -35,7 +35,12 @@
+ #include "util/u_memory.h"
+ #include <stdio.h>
+ #include <errno.h>
++#if defined(__linux__)
+ #include <byteswap.h>
++#elif defined(__FreeBSD__) || defined(__DragonFly__)
++#include <sys/endian.h>
++#define bswap_32(x) bswap32((x))
++#endif
+
+ /* CAYMAN notes
+ Why CAYMAN got loops for lots of instructions is explained here.
Added: trunk/graphics/libGL/files/patch-src_gallium_drivers_r600_r600_state_common.c
===================================================================
--- trunk/graphics/libGL/files/patch-src_gallium_drivers_r600_r600_state_common.c (rev 0)
+++ trunk/graphics/libGL/files/patch-src_gallium_drivers_r600_r600_state_common.c 2014-09-14 00:46:10 UTC (rev 17033)
@@ -0,0 +1,15 @@
+--- src/gallium/drivers/r600/r600_state_common.c.orig 2013-03-06 00:25:39.000000000 +0100
++++ src/gallium/drivers/r600/r600_state_common.c 2013-06-26 23:26:02.000000000 +0200
+@@ -33,7 +33,12 @@
+ #include "util/u_memory.h"
+ #include "util/u_upload_mgr.h"
+ #include "tgsi/tgsi_parse.h"
++#if defined(__linux__)
+ #include <byteswap.h>
++#elif defined(__FreeBSD__) || defined(__DragonFly__)
++#include <sys/endian.h>
++#define bswap_32(x) bswap32((x))
++#endif
+
+ #define R600_PRIM_RECTANGLE_LIST PIPE_PRIM_MAX
+
Added: trunk/graphics/libGL/files/patch-src_gallium_drivers_radeon_radeon-llvm-emit.cpp
===================================================================
--- trunk/graphics/libGL/files/patch-src_gallium_drivers_radeon_radeon-llvm-emit.cpp (rev 0)
+++ trunk/graphics/libGL/files/patch-src_gallium_drivers_radeon_radeon-llvm-emit.cpp 2014-09-14 00:46:10 UTC (rev 17033)
@@ -0,0 +1,28 @@
+--- src/gallium/drivers/radeon/radeon_llvm_emit.cpp.orig 2013-08-19 21:23:06.000000000 +0200
++++ src/gallium/drivers/radeon/radeon_llvm_emit.cpp 2013-08-19 21:30:58.000000000 +0200
+@@ -25,13 +25,13 @@
+ */
+ #include "radeon_llvm_emit.h"
+
+-#include <llvm/LLVMContext.h>
+-#include <llvm/Module.h>
++#include <llvm/IR/LLVMContext.h>
++#include <llvm/IR/Module.h>
+ #include <llvm/PassManager.h>
+ #include <llvm/ADT/Triple.h>
+ #include <llvm/Support/FormattedStream.h>
+ #include <llvm/Support/Host.h>
+-#include <llvm/Support/IRReader.h>
++#include <llvm/IRReader/IRReader.h>
+ #include <llvm/Support/SourceMgr.h>
+ #include <llvm/Support/TargetRegistry.h>
+ #include <llvm/Support/TargetSelect.h>
+@@ -39,7 +39,7 @@
+ #include <llvm/Target/TargetMachine.h>
+ #include <llvm/Transforms/Scalar.h>
+ #include <llvm-c/Target.h>
+-#include <llvm/DataLayout.h>
++#include <llvm/IR/DataLayout.h>
+
+ #include <iostream>
+ #include <stdlib.h>
Added: trunk/graphics/libGL/files/patch-src_gallium_drivers_radeonsi_r600-buffer.c
===================================================================
--- trunk/graphics/libGL/files/patch-src_gallium_drivers_radeonsi_r600-buffer.c (rev 0)
+++ trunk/graphics/libGL/files/patch-src_gallium_drivers_radeonsi_r600-buffer.c 2014-09-14 00:46:10 UTC (rev 17033)
@@ -0,0 +1,16 @@
+--- src/gallium/drivers/radeonsi/r600_buffer.c.orig 2013-08-01 00:56:45.000000000 +0200
++++ src/gallium/drivers/radeonsi/r600_buffer.c 2013-08-19 21:36:02.000000000 +0200
+@@ -24,7 +24,13 @@
+ * Jerome Glisse
+ * Corbin Simpson <MostAwesomeDude at gmail.com>
+ */
++
++#if defined(__linux__)
+ #include <byteswap.h>
++#elif defined(__FreeBSD__) || defined(__DragonFly__)
++#include <sys/endian.h>
++#define bswap_32(x) bswap32((x))
++#endif
+
+ #include "pipe/p_screen.h"
+ #include "util/u_format.h"
Added: trunk/graphics/libGL/files/patch-src_gallium_winsys_svga_drm_vmw-screen-ioctl.c
===================================================================
--- trunk/graphics/libGL/files/patch-src_gallium_winsys_svga_drm_vmw-screen-ioctl.c (rev 0)
+++ trunk/graphics/libGL/files/patch-src_gallium_winsys_svga_drm_vmw-screen-ioctl.c 2014-09-14 00:46:10 UTC (rev 17033)
@@ -0,0 +1,18 @@
+diff --git a/src/gallium/winsys/svga/drm/vmw_screen_ioctl.c b/src/gallium/winsys/svga/drm/vmw_screen_ioctl.c
+index 36888dc..62a6e6a 100644
+--- src/gallium/winsys/svga/drm/vmw_screen_ioctl.c
++++ src/gallium/winsys/svga/drm/vmw_screen_ioctl.c
+@@ -66,6 +66,13 @@ struct vmw_region
+ */
+ #define SVGA3D_SURFACE_HINT_SCANOUT (1 << 9)
+
++#if defined(__DragonFly__) || \
++ defined(__FreeBSD__) || \
++ defined(__NetBSD__) || \
++ defined(__OpenBSD__)
++#define ERESTART EINTR
++#endif
++
+ uint32
+ vmw_ioctl_context_create(struct vmw_winsys_screen *vws)
+ {
Added: trunk/graphics/libGL/files/patch-src_mapi_glapi_gen_gl-gentable.py
===================================================================
--- trunk/graphics/libGL/files/patch-src_mapi_glapi_gen_gl-gentable.py (rev 0)
+++ trunk/graphics/libGL/files/patch-src_mapi_glapi_gen_gl-gentable.py 2014-09-14 00:46:10 UTC (rev 17033)
@@ -0,0 +1,11 @@
+--- src/mapi/glapi/gen/gl_gentable.py.orig 2013-07-17 15:41:13.000000000 +0200
++++ src/mapi/glapi/gen/gl_gentable.py 2013-07-17 15:41:55.000000000 +0200
+@@ -42,7 +42,7 @@
+ #endif
+
+ #if (defined(GLXEXT) && defined(HAVE_BACKTRACE)) \\
+- || (!defined(GLXEXT) && defined(DEBUG) && !defined(_WIN32_WCE) && !defined(__CYGWIN__))
++ || (!defined(GLXEXT) && defined(DEBUG) && !defined(_WIN32_WCE) && !defined(__CYGWIN__) && !defined(__OpenBSD__) && !defined(__FreeBSD__))
+ #define USE_BACKTRACE
+ #endif
+
Added: trunk/graphics/libGL/files/patch-src_mesa_drivers_dri_common_Makefile.in
===================================================================
--- trunk/graphics/libGL/files/patch-src_mesa_drivers_dri_common_Makefile.in (rev 0)
+++ trunk/graphics/libGL/files/patch-src_mesa_drivers_dri_common_Makefile.in 2014-09-14 00:46:10 UTC (rev 17033)
@@ -0,0 +1,17 @@
+--- src/mesa/drivers/dri/common/Makefile.in.orig 2013-04-20 14:50:15.000000000 +0000
++++ src/mesa/drivers/dri/common/Makefile.in 2013-04-20 15:02:05.000000000 +0000
+@@ -123,11 +123,11 @@
+ am__depfiles_maybe = depfiles
+ am__mv = mv -f
+ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+- $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
++ $(AM_CFLAGS) $(CPPFLAGS) $(CFLAGS)
+ LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+- $(AM_CFLAGS) $(CFLAGS)
++ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(AM_CFLAGS) $(CPPFLAGS) \
++ $(CFLAGS)
+ AM_V_CC = $(am__v_CC_ at AM_V@)
+ am__v_CC_ = $(am__v_CC_ at AM_DEFAULT_V@)
+ am__v_CC_0 = @echo " CC " $@;
Added: trunk/graphics/libGL/files/patch-src_mesa_drivers_dri_common_xmlpool_Makefile.in
===================================================================
--- trunk/graphics/libGL/files/patch-src_mesa_drivers_dri_common_xmlpool_Makefile.in (rev 0)
+++ trunk/graphics/libGL/files/patch-src_mesa_drivers_dri_common_xmlpool_Makefile.in 2014-09-14 00:46:10 UTC (rev 17033)
@@ -0,0 +1,11 @@
+--- src/mesa/drivers/dri/common/xmlpool/Makefile.in.orig 2013-07-02 22:42:09.000000000 +0200
++++ src/mesa/drivers/dri/common/xmlpool/Makefile.in 2013-07-02 22:53:30.000000000 +0200
+@@ -639,7 +639,7 @@
+ # Update .mo files from the corresponding .po files.
+ %/LC_MESSAGES/options.mo: %.po
+ @mo="$@"; \
+- lang=$${mo%%/*}; \
++ lang=$*; \
+ echo "Updating ($$lang) $@ from $?."; \
+ mkdir -p $$lang/LC_MESSAGES; \
+ msgfmt -o $@ $?
Added: trunk/graphics/libGL/files/patch-src_mesa_main_compiler.h
===================================================================
--- trunk/graphics/libGL/files/patch-src_mesa_main_compiler.h (rev 0)
+++ trunk/graphics/libGL/files/patch-src_mesa_main_compiler.h 2014-09-14 00:46:10 UTC (rev 17033)
@@ -0,0 +1,12 @@
+--- src/mesa/main/compiler.h.orig 2013-04-06 04:01:09.000000000 +0200
++++ src/mesa/main/compiler.h 2013-06-26 23:26:02.000000000 +0200
+@@ -171,6 +171,9 @@
+ #if defined(__linux__)
+ #include <byteswap.h>
+ #define CPU_TO_LE32( x ) bswap_32( x )
++#elif defined(__FreeBSD__)
++#include <sys/endian.h>
++#define CPU_TO_LE32( x ) bswap32( x )
+ #elif defined(__APPLE__)
+ #include <CoreFoundation/CFByteOrder.h>
+ #define CPU_TO_LE32( x ) CFSwapInt32HostToLittle( x )
Added: trunk/graphics/libGL/files/patch-src_mesa_main_imports.c
===================================================================
--- trunk/graphics/libGL/files/patch-src_mesa_main_imports.c (rev 0)
+++ trunk/graphics/libGL/files/patch-src_mesa_main_imports.c 2014-09-14 00:46:10 UTC (rev 17033)
@@ -0,0 +1,10 @@
+--- src/mesa/main/imports.c.orig 2013-10-05 03:59:22.000000000 +0000
++++ src/mesa/main/imports.c
+@@ -566,6 +566,7 @@ float
+ _mesa_strtof( const char *s, char **end )
+ {
+ #if defined(_GNU_SOURCE) && !defined(__CYGWIN__) && !defined(__FreeBSD__) && \
++ !defined(__DragonFly__) && \
+ !defined(ANDROID) && !defined(__HAIKU__) && !defined(__UCLIBC__)
+ static locale_t loc = NULL;
+ if (!loc) {
Added: trunk/graphics/libGL/files-old/patch-bin__mklib
===================================================================
--- trunk/graphics/libGL/files-old/patch-bin__mklib (rev 0)
+++ trunk/graphics/libGL/files-old/patch-bin__mklib 2014-09-14 00:46:10 UTC (rev 17033)
@@ -0,0 +1,11 @@
+--- ./bin/mklib.orig Mon Oct 1 03:11:55 2007
++++ ./bin/mklib Mon Oct 1 03:12:02 2007
+@@ -356,7 +356,7 @@
+ fi
+ ;;
+
+- 'FreeBSD')
++ 'FreeBSD' | 'MidnightBSD')
+ # we assume gcc
+
+ if [ "x$LINK" = "x" ] ; then
Added: trunk/graphics/libGL/files-old/patch-configure
===================================================================
--- trunk/graphics/libGL/files-old/patch-configure (rev 0)
+++ trunk/graphics/libGL/files-old/patch-configure 2014-09-14 00:46:10 UTC (rev 17033)
@@ -0,0 +1,52 @@
+--- configure.orig 2013-12-12 18:52:32.304356162 +0000
++++ configure 2013-12-12 19:50:44.434111814 +0000
+@@ -5393,7 +5393,7 @@
+ ;;
+ *freebsd* | dragonfly*)
+ case "$host_cpu" in
+- i*86|x86_64|powerpc*|sparc*) default_driver="dri";;
++ i*86|x86_64|ia64|powerpc*|sparc*) default_driver="dri";;
+ esac
+ ;;
+ esac
+@@ -6946,12 +6946,35 @@
+ 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 \
++ case "$host_cpu" in
++ x86_64|ia64)
++ # i810 is missing because there is no x86-64 system where it
++ # could *ever* be used.
++ if test "x$DRI_DIRS" = "xyes"; then
++ DRI_DIRS="i915 i965 mach64 mga r128 r200 r300 r600 radeon tdfx \
+ unichrome savage sis swrast"
+- fi
++ fi
++ ;;
++ i*86)
++ 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
++ ;;
++ 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 swrast"
++ fi
++ ;;
++ esac
+ ;;
+ gnu*)
+ DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER"
Added: trunk/graphics/libGL/files-old/patch-mach64_context.h
===================================================================
--- trunk/graphics/libGL/files-old/patch-mach64_context.h (rev 0)
+++ trunk/graphics/libGL/files-old/patch-mach64_context.h 2014-09-14 00:46:10 UTC (rev 17033)
@@ -0,0 +1,20 @@
+--- src/mesa/drivers/dri/mach64/mach64_context.h.orig 2012-06-27 19:59:32.000000000 +0200
++++ src/mesa/drivers/dri/mach64/mach64_context.h 2012-06-27 20:08:30.000000000 +0200
+@@ -294,11 +294,14 @@
+ #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__)
+ #include <machine/endian.h>
+ #define bswap_32 bswap32
++#elif defined(__FreeBSD__)
++#include <sys/endian.h>
++#define bswap_32 bswap32
++#else
++#include <byteswap.h>
+ #endif
+
+ #define LE32_IN( x ) bswap_32( *(GLuint *)(x) )
Added: trunk/graphics/libGL/files-old/patch-src__mesa__x86-64__glapi_x86-64.S
===================================================================
--- trunk/graphics/libGL/files-old/patch-src__mesa__x86-64__glapi_x86-64.S (rev 0)
+++ trunk/graphics/libGL/files-old/patch-src__mesa__x86-64__glapi_x86-64.S 2014-09-14 00:46:10 UTC (rev 17033)
@@ -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 at GOTPCREL(%rip), %rax
++ movl (%rax), %edi
+ jmp pthread_getspecific at PLT
+
+ #elif defined(THREADS)
Added: trunk/graphics/libGL/files-old/patch-src__mesa__x86-64__xform4.S
===================================================================
--- trunk/graphics/libGL/files-old/patch-src__mesa__x86-64__xform4.S (rev 0)
+++ trunk/graphics/libGL/files-old/patch-src__mesa__x86-64__xform4.S 2014-09-14 00:46:10 UTC (rev 17033)
@@ -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 */
Added: trunk/graphics/libGL/files-old/patch-src__mesa__x86__glapi_x86.S
===================================================================
--- trunk/graphics/libGL/files-old/patch-src__mesa__x86__glapi_x86.S (rev 0)
+++ trunk/graphics/libGL/files-old/patch-src__mesa__x86__glapi_x86.S 2014-09-14 00:46:10 UTC (rev 17033)
@@ -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
Added: trunk/graphics/libGL/files-old/patch-src__mesa__x86__read_rgba_span_x86.S
===================================================================
--- trunk/graphics/libGL/files-old/patch-src__mesa__x86__read_rgba_span_x86.S (rev 0)
+++ trunk/graphics/libGL/files-old/patch-src__mesa__x86__read_rgba_span_x86.S 2014-09-14 00:46:10 UTC (rev 17033)
@@ -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
Added: trunk/graphics/libGL/files-old/patch-src_glx_x11_XF86dri.c
===================================================================
--- trunk/graphics/libGL/files-old/patch-src_glx_x11_XF86dri.c (rev 0)
+++ trunk/graphics/libGL/files-old/patch-src_glx_x11_XF86dri.c 2014-09-14 00:46:10 UTC (rev 17033)
@@ -0,0 +1,38 @@
+--- src/glx/x11/XF86dri.c.orig 2009-06-17 18:35:16.000000000 +0000
++++ src/glx/x11/XF86dri.c 2013-05-29 10:09:37.000000000 +0000
+@@ -43,6 +43,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ #include <X11/extensions/Xext.h>
+ #include <X11/extensions/extutil.h>
+ #include "xf86dristr.h"
++#include <limits.h>
+
+
+ #if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303
+@@ -212,7 +213,11 @@ XF86DRIOpenConnection(Display * dpy, int
+ }
+
+ if (rep.length) {
+- if (!(*busIdString = (char *) Xcalloc(rep.busIdStringLength + 1, 1))) {
++ if (rep.busIdStringLength < INT_MAX)
++ *busIdString = Xcalloc(rep.busIdStringLength + 1, 1);
++ else
++ *busIdString = NULL;
++ if (*busIdString == NULL) {
+ _XEatData(dpy, ((rep.busIdStringLength + 3) & ~3));
+ UnlockDisplay(dpy);
+ SyncHandle();
+@@ -311,9 +316,11 @@ XF86DRIGetClientDriverName(Display * dpy
+ *ddxDriverPatchVersion = rep.ddxDriverPatchVersion;
+
+ if (rep.length) {
+- if (!
+- (*clientDriverName =
+- (char *) Xcalloc(rep.clientDriverNameLength + 1, 1))) {
++ if (rep.clientDriverNameLength < INT_MAX)
++ *clientDriverName = Xcalloc(rep.clientDriverNameLength + 1, 1);
++ else
++ *clientDriverName = NULL;
++ if (*clientDriverName == NULL) {
+ _XEatData(dpy, ((rep.clientDriverNameLength + 3) & ~3));
+ UnlockDisplay(dpy);
+ SyncHandle();
Added: trunk/graphics/libGL/files-old/patch-src_mesa_Makefile
===================================================================
--- trunk/graphics/libGL/files-old/patch-src_mesa_Makefile (rev 0)
+++ trunk/graphics/libGL/files-old/patch-src_mesa_Makefile 2014-09-14 00:46:10 UTC (rev 17033)
@@ -0,0 +1,15 @@
+--- src/mesa/Makefile.orig 2009-12-22 03:31:19.000000000 +0100
++++ src/mesa/Makefile 2013-08-19 23:19:42.000000000 +0200
+@@ -127,10 +127,10 @@
+ $(DESTDIR)$(INSTALL_INC_DIR)/GL
+
+ install-libgl: default gl.pc install-headers
+- $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)
++ $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)/.libGL
+ $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
+ $(MINSTALL) $(TOP)/$(LIB_DIR)/$(GL_LIB_GLOB) \
+- $(DESTDIR)$(INSTALL_LIB_DIR)
++ $(DESTDIR)$(INSTALL_LIB_DIR)/.libGL
+ $(INSTALL) -m 644 gl.pc $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
+
+ install-osmesa: default osmesa.pc
Modified: trunk/graphics/libGL/pkg-plist
===================================================================
--- trunk/graphics/libGL/pkg-plist 2014-09-14 00:30:05 UTC (rev 17032)
+++ trunk/graphics/libGL/pkg-plist 2014-09-14 00:46:10 UTC (rev 17033)
@@ -3,19 +3,21 @@
include/GL/gl.h
include/GL/gl_mangle.h
include/GL/glext.h
-include/GL/glfbdev.h
+%%OLD%%include/GL/glfbdev.h
include/GL/glx.h
include/GL/glx_mangle.h
include/GL/glxext.h
-include/GL/mesa_wgl.h
+%%OLD%%include/GL/mesa_wgl.h
%%OLD%%include/GL/mglmesa.h
include/GL/osmesa.h
%%OLD%%include/GL/svgamesa.h
-include/GL/vms_x_fix.h
+%%OLD%%include/GL/vms_x_fix.h
include/GL/wglext.h
include/GL/wmesa.h
+%%NEW%%lib/.libGL/libGL.la
lib/.libGL/libGL.so
lib/.libGL/libGL.so.1
+%%NEW%%lib/.libGL/libGL.so.1.2.0
libdata/pkgconfig/gl.pc
@dirrm lib/.libGL
@dirrmtry include/GL
More information about the Midnightbsd-cvs
mailing list