aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Mk/bsd.port.mk14
-rw-r--r--UPDATING30
-rw-r--r--astro/viking/Makefile1
-rw-r--r--cad/pdnmesh/Makefile2
-rw-r--r--cad/repsnapper/Makefile1
-rw-r--r--deskutils/pinot/Makefile2
-rw-r--r--devel/xorg-macros/Makefile2
-rw-r--r--devel/xorg-macros/distinfo4
-rw-r--r--emulators/catapult/Makefile5
-rw-r--r--emulators/qemu-devel/Makefile5
-rw-r--r--emulators/tme/Makefile5
-rw-r--r--games/klavaro/Makefile1
-rw-r--r--games/sea-defender/Makefile4
-rw-r--r--games/sea-defender/files/extra-snoutlib_gldefs.h11
-rw-r--r--graphics/Makefile2
-rw-r--r--graphics/cairo/Makefile2
-rw-r--r--graphics/dri/Makefile112
-rw-r--r--graphics/dri/pkg-plist19
-rw-r--r--graphics/libEGL/Makefile30
-rw-r--r--graphics/libEGL/pkg-descr3
-rw-r--r--graphics/libEGL/pkg-plist11
-rw-r--r--graphics/libGL/Makefile30
-rw-r--r--graphics/libGL/bsd.mesalib.mk117
-rw-r--r--graphics/libGL/distinfo4
-rw-r--r--graphics/libGL/files-old/patch-configure (renamed from graphics/libGL/files/extra-configure-old)0
-rw-r--r--graphics/libGL/files-old/patch-mach64_context.h (renamed from graphics/libGL/files/extra-mach64_context.h-old)0
-rw-r--r--graphics/libGL/files-old/patch-src__mesa__x86-64__glapi_x86-64.S (renamed from graphics/libGL/files/extra-src__mesa__x86-64__glapi_x86-64.S)0
-rw-r--r--graphics/libGL/files-old/patch-src__mesa__x86-64__xform4.S (renamed from graphics/libGL/files/extra-src__mesa__x86-64__xform4.S)0
-rw-r--r--graphics/libGL/files-old/patch-src__mesa__x86__glapi_x86.S (renamed from graphics/libGL/files/extra-src__mesa__x86__glapi_x86.S)0
-rw-r--r--graphics/libGL/files-old/patch-src__mesa__x86__read_rgba_span_x86.S (renamed from graphics/libGL/files/extra-src__mesa__x86__read_rgba_span_x86.S)0
-rw-r--r--graphics/libGL/files-old/patch-src_glx_x11_XF86dri.c (renamed from graphics/libGL/files/extra-src_glx_x11_XF86dri.c)0
-rw-r--r--graphics/libGL/files-old/patch-src_mesa_Makefile (renamed from graphics/libGL/files/patch-src_mesa_Makefile)6
-rw-r--r--graphics/libGL/files/extra-src__mesa__drivers__dri__nouveau__nouveau_array.c99
-rw-r--r--graphics/libGL/files/extra-src__mesa__drivers__dri__nouveau__nouveau_render_t.c91
-rw-r--r--graphics/libGL/files/extra-src_glx_XF86dri.c38
-rw-r--r--graphics/libGL/files/patch-configure (renamed from graphics/libGL/files/extra-configure)17
-rw-r--r--graphics/libGL/files/patch-src-glsl_ir_constant_expression.cpp (renamed from graphics/libGL/files/extra-src-glsl_ir_constant_expression.cpp)0
-rw-r--r--graphics/libGL/files/patch-src__gallium__include__pipe__p_config.h (renamed from graphics/libGL/files/extra-src__gallium__include__pipe__p_config.h)0
-rw-r--r--graphics/libGL/files/patch-src_egl_main_Makefile.in19
-rw-r--r--graphics/libGL/files/patch-src_gallium_drivers_r300_r300-chipset.c26
-rw-r--r--graphics/libGL/files/patch-src_gallium_drivers_r600_r600-asm.c15
-rw-r--r--graphics/libGL/files/patch-src_gallium_drivers_r600_r600-shader.c15
-rw-r--r--graphics/libGL/files/patch-src_gallium_drivers_r600_r600_state_common.c15
-rw-r--r--graphics/libGL/files/patch-src_gallium_drivers_radeon_radeon-llvm-emit.cpp28
-rw-r--r--graphics/libGL/files/patch-src_gallium_drivers_radeonsi_r600-buffer.c16
-rw-r--r--graphics/libGL/files/patch-src_gallium_winsys_svga_drm_vmw-screen-ioctl.c18
-rw-r--r--graphics/libGL/files/patch-src_glx_Makefile.in59
-rw-r--r--graphics/libGL/files/patch-src_mapi_es2api_Makefile.in20
-rw-r--r--graphics/libGL/files/patch-src_mapi_glapi_gen_gl-gentable.py11
-rw-r--r--graphics/libGL/files/patch-src_mapi_shared-glapi_Makefile.in20
-rw-r--r--graphics/libGL/files/patch-src_mesa_drivers_dri_common_Makefile.in17
-rw-r--r--graphics/libGL/files/patch-src_mesa_drivers_dri_common_xmlpool_Makefile.in11
-rw-r--r--graphics/libGL/files/patch-src_mesa_libdricore_Makefile.in19
-rw-r--r--graphics/libGL/files/patch-src_mesa_main_compiler.h12
-rw-r--r--graphics/libGL/pkg-plist3
-rw-r--r--graphics/libGLw/Makefile2
-rw-r--r--graphics/libdrm/Makefile31
-rw-r--r--graphics/libdrm/pkg-plist13
-rw-r--r--graphics/libglesv2/Makefile29
-rw-r--r--graphics/libglesv2/pkg-descr3
-rw-r--r--graphics/libglesv2/pkg-plist12
-rw-r--r--graphics/libreatlas/Makefile5
-rw-r--r--multimedia/bangarang/files/patch-src_platform_infofetchers_lastfminfofetcher.cpp11
-rw-r--r--multimedia/bangarang/files/patch-src_platform_infofetchers_tmdbinfofetcher.cpp11
-rw-r--r--multimedia/bangarang/files/patch-src_platform_infofetchers_tvdbinfofetcher.cpp11
-rw-r--r--multimedia/freetuxtv/Makefile5
-rw-r--r--multimedia/libva-intel-driver/Makefile2
-rw-r--r--multimedia/libva-vdpau-driver/files/patch-src-utils_glx.h22
-rw-r--r--net/cvsup/Makefile2
-rw-r--r--net/tigervnc/Makefile1
-rw-r--r--print/photoprint/Makefile4
-rw-r--r--sysutils/gtk-imonc/Makefile2
-rw-r--r--sysutils/nitrogen/Makefile2
-rw-r--r--x11-drivers/xf86-input-mouse/files/patch-src-bsd_mouse.c826
-rw-r--r--x11-drivers/xf86-input-mouse/files/patch-src_mouse.c25
-rw-r--r--x11-drivers/xf86-input-synaptics/Makefile2
-rw-r--r--x11-drivers/xf86-video-ati/Makefile17
-rw-r--r--x11-drivers/xf86-video-ati/distinfo2
-rw-r--r--x11-drivers/xf86-video-ati/files/extra-src__radeon_kms.c20
-rw-r--r--x11-drivers/xf86-video-ati/files/patch-src__radeon_dri2.c11
-rw-r--r--x11-drivers/xf86-video-ati/pkg-plist14
-rw-r--r--x11-drivers/xf86-video-fbdev/Makefile2
-rw-r--r--x11-drivers/xf86-video-fbdev/distinfo4
-rw-r--r--x11-drivers/xf86-video-intel/Makefile10
-rw-r--r--x11-drivers/xf86-video-intel/distinfo4
-rw-r--r--x11-drivers/xf86-video-intel/files/extra-clang60
-rw-r--r--x11-drivers/xf86-video-intel/files/extra-i915kms24
-rw-r--r--x11-drivers/xf86-video-intel/files/extra-src_sna_compiler.h18
-rw-r--r--x11-drivers/xf86-video-intel/files/extra-src_sna_kgem.c44
-rw-r--r--x11-drivers/xf86-video-vesa/Makefile2
-rw-r--r--x11-drivers/xf86-video-vesa/distinfo4
-rw-r--r--x11-drivers/xorg-drivers/Makefile2
-rw-r--r--x11-fonts/xfs/Makefile2
-rw-r--r--x11-servers/xephyr/Makefile1
-rw-r--r--x11-servers/xorg-dmx/Makefile1
-rw-r--r--x11-servers/xorg-nestserver/Makefile2
-rw-r--r--x11-servers/xorg-server/Makefile48
-rw-r--r--x11-servers/xorg-server/files/extra-config_devd.c481
-rw-r--r--x11-servers/xorg-server/files/extra-configure11
-rw-r--r--x11-themes/gtk-murrine-engine/Makefile7
-rw-r--r--x11-toolkits/gtkglext/Makefile5
-rw-r--r--x11-toolkits/libXaw/Makefile4
-rw-r--r--x11-toolkits/libXaw/distinfo4
-rw-r--r--x11-toolkits/libXmu/Makefile2
-rw-r--r--x11-toolkits/libXmu/distinfo4
-rw-r--r--x11-wm/awesome/Makefile2
-rw-r--r--x11-wm/jewel/files/patch-Makefile13
-rw-r--r--x11/libSM/Makefile2
-rw-r--r--x11/libSM/distinfo4
-rw-r--r--x11/libX11/Makefile2
-rw-r--r--x11/libX11/distinfo4
-rw-r--r--x11/libX11/pkg-plist8
-rw-r--r--x11/libXpm/Makefile2
-rw-r--r--x11/libXpm/distinfo4
-rw-r--r--x11/libXrandr/Makefile2
-rw-r--r--x11/libXrandr/distinfo4
-rw-r--r--x11/libXv/Makefile2
-rw-r--r--x11/libXv/distinfo4
-rw-r--r--x11/libxcb/Makefile3
-rw-r--r--x11/pixman/Makefile5
-rw-r--r--x11/pixman/distinfo4
-rw-r--r--x11/pixman/pkg-plist2
-rw-r--r--x11/xinput/Makefile2
-rw-r--r--x11/xinput/distinfo4
-rw-r--r--x11/xkeyboard-config/Makefile3
-rw-r--r--x11/xorg-cf-files/Makefile1
-rw-r--r--x11/xtrans/Makefile2
127 files changed, 2332 insertions, 570 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index 992e296f5496..79fd53ec8d3a 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -358,7 +358,7 @@ FreeBSD_MAINTAINER= portmgr@FreeBSD.org
# MAKE_ENV are extended with a DISPLAY variable.
#
# USE_GL - A list of Mesa or GL related dependencies needed by the port.
-# Supported components are: glut, glu, glw, and gl.
+# Supported components are: egl, glesv2, glut, glu, glw, and gl.
# If set to "yes", this is equivalent to "glu". Note that
# glew and glut depend on glu, glw and glu depend on gl.
##
@@ -1892,13 +1892,15 @@ MAKE_ENV+= DISPLAY="localhost:1001"
PKG_IGNORE_DEPENDS?= 'this_port_does_not_exist'
-_GL_gl_LIB_DEPENDS= GL.1:${PORTSDIR}/graphics/libGL
+_GL_glesv2_LIB_DEPENDS= libGLESv2.so:${PORTSDIR}/grahpics/libglesv2
+_GL_egl_LIB_DEPENDS= libEGL.so:${PORTSDIR}/graphics/libEGL
+_GL_gl_LIB_DEPENDS= libGL.so:${PORTSDIR}/graphics/libGL
_GL_gl_USE_XORG= glproto dri2proto
-_GL_glew_LIB_DEPENDS= GLEW.1:${PORTSDIR}/graphics/glew
-_GL_glu_LIB_DEPENDS= GLU.1:${PORTSDIR}/graphics/libGLU
+_GL_glew_LIB_DEPENDS= libGLEW.so:${PORTSDIR}/graphics/glew
+_GL_glu_LIB_DEPENDS= libGLU.so:${PORTSDIR}/graphics/libGLU
_GL_glu_USE_XORG= glproto dri2proto
-_GL_glw_LIB_DEPENDS= GLw.1:${PORTSDIR}/graphics/libGLw
-_GL_glut_LIB_DEPENDS= glut.12:${PORTSDIR}/graphics/freeglut
+_GL_glw_LIB_DEPENDS= libGLw.so:${PORTSDIR}/graphics/libGLw
+_GL_glut_LIB_DEPENDS= libglut.so:${PORTSDIR}/graphics/freeglut
.if defined(USE_GL)
. if ${USE_GL:L} == "yes"
diff --git a/UPDATING b/UPDATING
index 5e9cf463ebb1..333b54b4f6f9 100644
--- a/UPDATING
+++ b/UPDATING
@@ -5,6 +5,34 @@ they are unavoidable.
You should get into the habit of checking this file for changes each time
you update your ports collection, before attempting any port upgrades.
+201309xx:
+ AFFECTS: users of x11/pixman
+ AUTHOR: zeising@FreeBSD.org
+
+ The library version of x11/pixman has changed, and portrevision has
+ been bumped in all dependent ports. If you have external software that
+ depends on pixman, this software needs to be recompiled.
+ To recompile all software dependent on pixman, run:
+
+ # portmaster -r pixman
+ or
+ # portupgrade -rf pixman
+
+201309xx:
+ AFFECTS: users of graphics/libGL, graphics/dri and other MESA ports
+ AUTHOR: zeising@FreeBSD.org
+
+ The graphics/libGL, graphics/dri and related MESA ports have been
+ updated to 9.1 when compiled with WITH_NEW_XORG= set. It is necessary
+ to remove the old versions of both ports before updating.
+
+ # pkg_delete -f libGl-\* dri-\*
+ or
+ # pkg delete -f libGL dri
+ followed by
+ # portmaster -a
+
+=======
20130925
AFFECTS: Users of print/qpdf
AUTHOR: d.y.kazarov@mail.ru
@@ -623,7 +651,7 @@ you update your ports collection, before attempting any port upgrades.
settings in rc.conf prior to restarting postgrey.
20130525:
- AFFECTS: users of x11/xorg and all X.Org ports
+ AFFECTS: users of x11/xorg and all xorg ports
AUTHOR: zeising@FreeBSD.org
X.Org, including libraries and some drivers, was updated. If you are
diff --git a/astro/viking/Makefile b/astro/viking/Makefile
index 1cf0895142b1..777acacdc421 100644
--- a/astro/viking/Makefile
+++ b/astro/viking/Makefile
@@ -3,6 +3,7 @@
PORTNAME= viking
PORTVERSION= 1.4.2
+PORTREVISION= 1
CATEGORIES= astro
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTVERSION}/
diff --git a/cad/pdnmesh/Makefile b/cad/pdnmesh/Makefile
index 86909d611551..be71ef538a57 100644
--- a/cad/pdnmesh/Makefile
+++ b/cad/pdnmesh/Makefile
@@ -3,7 +3,7 @@
PORTNAME= pdnmesh
PORTVERSION= 0.2.2
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= cad
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}-source/${PORTVERSION}
diff --git a/cad/repsnapper/Makefile b/cad/repsnapper/Makefile
index 45ea1aa5a912..00be718042bf 100644
--- a/cad/repsnapper/Makefile
+++ b/cad/repsnapper/Makefile
@@ -3,6 +3,7 @@
PORTNAME= repsnapper
PORTVERSION= 2.2.0b3
+PORTREVISION= 1
CATEGORIES= cad
MASTER_SITES= https://codeload.github.com/timschmidt/repsnapper/tar.gz/
DISTNAME= ${PORTVERSION}
diff --git a/deskutils/pinot/Makefile b/deskutils/pinot/Makefile
index 94c74c76bb54..c7ea7a168056 100644
--- a/deskutils/pinot/Makefile
+++ b/deskutils/pinot/Makefile
@@ -3,7 +3,7 @@
PORTNAME= pinot
PORTVERSION= 1.06
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= deskutils
MASTER_SITES= ${MASTER_SITE_GOOGLE_CODE}
#MASTER_SITES= http://colinf.chez.com/pinot/
diff --git a/devel/xorg-macros/Makefile b/devel/xorg-macros/Makefile
index 15c8dd9762a3..aa54b1b5230a 100644
--- a/devel/xorg-macros/Makefile
+++ b/devel/xorg-macros/Makefile
@@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= xorg-macros
-PORTVERSION= 1.17
+PORTVERSION= 1.17.1
CATEGORIES= devel x11
DISTNAME= util-macros-$(PORTVERSION)
diff --git a/devel/xorg-macros/distinfo b/devel/xorg-macros/distinfo
index b97705c0ca90..203f9f7b9690 100644
--- a/devel/xorg-macros/distinfo
+++ b/devel/xorg-macros/distinfo
@@ -1,2 +1,2 @@
-SHA256 (xorg/util/util-macros-1.17.tar.bz2) = 7d79edde72fc17dcdc56cfbe2f8ff384d1bffd1d8c58c0fd25970f5b2ccb75ed
-SIZE (xorg/util/util-macros-1.17.tar.bz2) = 77029
+SHA256 (xorg/util/util-macros-1.17.1.tar.bz2) = 5e52654f2a0b04223cf28a9d7fd62cf288852e639ac13a75172fd47d0d6ac625
+SIZE (xorg/util/util-macros-1.17.1.tar.bz2) = 79105
diff --git a/emulators/catapult/Makefile b/emulators/catapult/Makefile
index 969b68361e9a..b7b6dab80206 100644
--- a/emulators/catapult/Makefile
+++ b/emulators/catapult/Makefile
@@ -3,7 +3,7 @@
PORTNAME= catapult
PORTVERSION= 0.9.1
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= emulators
MASTER_SITES= SF/openmsx/openmsx/${PORTVERSION}
DISTNAME= openmsx-${PORTNAME}-${PORTVERSION}
@@ -32,8 +32,7 @@ OPTIONS_DEFINE= DEBUG DOCS
USE_GNOME= gdkpixbuf2 glib20 gtk20 libxml2
USE_WX= 2.6+
USE_PYTHON_BUILD=yes
-USE_GMAKE= yes
-USES= gettext iconv
+USES= gettext gmake iconv
USE_XORG= ice pixman sm x11 xau xcb xcomposite xcursor xdamage xdmcp \
xext xfixes xi xinerama xrandr xrender xxf86vm
MAKEFILE= GNUmakefile
diff --git a/emulators/qemu-devel/Makefile b/emulators/qemu-devel/Makefile
index e5bb96255ac8..6934913f6cb9 100644
--- a/emulators/qemu-devel/Makefile
+++ b/emulators/qemu-devel/Makefile
@@ -3,7 +3,7 @@
PORTNAME= qemu
PORTVERSION= 1.6.0
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= emulators
MASTER_SITES= http://wiki.qemu.org/download/:release \
LOCAL/nox:snapshot
@@ -14,13 +14,12 @@ DIST_SUBDIR= qemu/${PORTVERSION}
MAINTAINER= nox@FreeBSD.org
COMMENT= QEMU CPU Emulator - development version
-LIB_DEPENDS= pixman-1:${PORTSDIR}/x11/pixman
-
HAS_CONFIGURE= yes
USE_BZIP2= yes
USES= gmake pkgconfig bison perl5
USE_PERL5= build
USE_PYTHON_BUILD= -2.7
+USE_XORG= pixman
USE_GNOME+= glib20
PATCH_STRIP= -p1
MAKE_ENV+= BSD_MAKE="${MAKE}"
diff --git a/emulators/tme/Makefile b/emulators/tme/Makefile
index e843e0b35144..c84b3f3eef58 100644
--- a/emulators/tme/Makefile
+++ b/emulators/tme/Makefile
@@ -3,7 +3,7 @@
PORTNAME= tme
PORTVERSION= 0.8
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= emulators
MASTER_SITES= http://people.csail.mit.edu/fredette/tme/
@@ -21,9 +21,8 @@ LIB_DEPENDS= pthread-stubs:${PORTSDIR}/devel/libpthread-stubs \
expat:${PORTSDIR}/textproc/expat2 \
fontconfig:${PORTSDIR}/x11-fonts/fontconfig
-USES= pkgconfig gettext iconv perl5
+USES= pkgconfig gettext gmake iconv perl5
USE_GNOME= gdkpixbuf2 gtk20
-USE_GMAKE= yes
USE_AUTOTOOLS= libtool libltdl
CONFIGURE_ENV= ac_cv_have_isinff=no
CONFIGURE_ARGS= --datadir=${WRKDIR}/tmproot --disable-warnings
diff --git a/games/klavaro/Makefile b/games/klavaro/Makefile
index 1236c5467385..3d4327e83175 100644
--- a/games/klavaro/Makefile
+++ b/games/klavaro/Makefile
@@ -3,6 +3,7 @@
PORTNAME= klavaro
PORTVERSION= 1.9.9
+PORTREVISION= 1
CATEGORIES= games
MASTER_SITES= SF/${PORTNAME}/
diff --git a/games/sea-defender/Makefile b/games/sea-defender/Makefile
index ea5a3dc51ca4..bdbee8039952 100644
--- a/games/sea-defender/Makefile
+++ b/games/sea-defender/Makefile
@@ -28,6 +28,10 @@ PORTDOCS= README
NO_STAGE= yes
.include <bsd.port.options.mk>
+.if defined(WITH_NEW_XORG)
+EXTRA_PATCHES+= ${FILESDIR}/extra-snoutlib_gldefs.h
+.endif
+
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/sea ${PREFIX}/libexec/${PORTNAME}
${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME}.sh ${PREFIX}/bin/${PORTNAME}
diff --git a/games/sea-defender/files/extra-snoutlib_gldefs.h b/games/sea-defender/files/extra-snoutlib_gldefs.h
new file mode 100644
index 000000000000..ef24e8028c9e
--- /dev/null
+++ b/games/sea-defender/files/extra-snoutlib_gldefs.h
@@ -0,0 +1,11 @@
+--- snoutlib/gldefs.h.orig 2013-09-28 23:51:46.789551906 +0200
++++ snoutlib/gldefs.h 2013-09-28 23:52:40.941548852 +0200
+@@ -94,7 +94,7 @@
+ typedef GLboolean (GLFUNCDEF PFNGLISPROGRAMPROC) (GLuint);
+ typedef GLboolean (GLFUNCDEF PFNGLISSHADERPROC) (GLuint);
+ typedef void (GLFUNCDEF PFNGLLINKPROGRAMPROC) (GLuint);
+-typedef void (GLFUNCDEF PFNGLSHADERSOURCEPROC) (GLuint, GLsizei, const GLchar* *, const GLint *);
++typedef void (GLFUNCDEF PFNGLSHADERSOURCEPROC) (GLuint, GLsizei, const GLchar* const *, const GLint *);
+ typedef void (GLFUNCDEF PFNGLUSEPROGRAMPROC) (GLuint);
+ typedef void (GLFUNCDEF PFNGLUNIFORM1FPROC) (GLint, GLfloat);
+ typedef void (GLFUNCDEF PFNGLUNIFORM2FPROC) (GLint, GLfloat, GLfloat);
diff --git a/graphics/Makefile b/graphics/Makefile
index bf4dd9b77aff..dde21120b2bd 100644
--- a/graphics/Makefile
+++ b/graphics/Makefile
@@ -484,6 +484,7 @@
SUBDIR += leptonica
SUBDIR += lfview
SUBDIR += lib3ds
+ SUBDIR += libEGL
SUBDIR += libGL
SUBDIR += libGLU
SUBDIR += libGLw
@@ -505,6 +506,7 @@
SUBDIR += libgeotiff
SUBDIR += libgfx
SUBDIR += libggi
+ SUBDIR += libglesv2
SUBDIR += libgltext
SUBDIR += libgnomecanvas
SUBDIR += libgnomecanvas-reference
diff --git a/graphics/cairo/Makefile b/graphics/cairo/Makefile
index 43e6b7a37315..5470183de2bf 100644
--- a/graphics/cairo/Makefile
+++ b/graphics/cairo/Makefile
@@ -4,7 +4,7 @@
PORTNAME= cairo
PORTVERSION= 1.10.2
-PORTREVISION= 5
+PORTREVISION= 6
PORTEPOCH?= 2
CATEGORIES= graphics
MASTER_SITES= http://cairographics.org/releases/
diff --git a/graphics/dri/Makefile b/graphics/dri/Makefile
index 875907c1cc31..c3b67b99447d 100644
--- a/graphics/dri/Makefile
+++ b/graphics/dri/Makefile
@@ -9,72 +9,108 @@ CATEGORIES= graphics
COMMENT= OpenGL hardware acceleration drivers for the DRI
-LIB_DEPENDS= drm:${PORTSDIR}/graphics/libdrm \
- expat:${PORTSDIR}/textproc/expat2
+LIB_DEPENDS= libdrm.so:${PORTSDIR}/graphics/libdrm \
+ libexpat.so:${PORTSDIR}/textproc/expat2
USES= pkgconfig
USE_XORG= glproto x11 xext xxf86vm xdamage xfixes dri2proto
+.include <bsd.port.options.mk>
+
+# gcc from base can't handle some code in mesa 9.1+
+# We only care for 9.x and 8.x, not for old pre-clang default current.
+# This is for 0b0000 binary which gcc 4.3+ understands and is in the i965 driver.
+.if defined(WITH_NEW_XORG)
+. if ${OSVERSION} >= 901000 && ${OSVERSION} < 902502 \
+ && (${ARCH} == i386 || ${ARCH} == amd64)
+CC=clang
+CXX=clang++
+CPP=clang-cpp
+. elif ${OSVERSION} < 901500
+USE_GCC=yes
+. endif
+.endif
+
+.if ${ARCH} == ia64
+#BROKEN= does not install on ia64
+.endif
+
ALL_DRI_DRIVERS=I915 I965 R200 RADEON SWRAST
-.if ! defined(WITH_NEW_XORG)
+.if !defined(WITH_NEW_XORG)
ALL_DRI_DRIVERS+=I810 MACH64 MGA R128 R300 R600 SAVAGE SIS TDFX UNICHROME
.endif
NO_STAGE= yes
.include "${.CURDIR}/../../graphics/libGL/bsd.mesalib.mk"
-OPTIONS_DEFINE_i386= ${ALL_DRI_DRIVERS}
-OPTIONS_DEFINE_amd64= ${OPTIONS_DEFINE_i386}
+PLIST_SUB+= VERSION=${MESADISTVERSION}
-.if defined(WITH_NEW_XORG)
-OPTIONS_DEFINE_powerpc= RADEON SWRAST
-OPTIONS_DEFINE_sparc64= RADEON SWRAST
-.else
-OPTIONS_DEFINE_powerpc= MACH64 RADEON SWRAST TDFX
-OPTIONS_DEFINE_sparc64= MACH64 RADEON SWRAST
+.if ${ARCH} == amd64 || ${ARCH} == i386
+DRI_DRIVERS= ${ALL_DRI_DRIVERS}
.endif
-OPTIONS_DEFAULT=${OPTIONS_DEFINE}
-
-I810_DESC= Include DRI support for Intel i810
-I915_DESC= Include DRI support for Intel i915
-I965_DESC= Include DRI support for Intel i965
-MACH64_DESC= Include DRI support for AMD/ATI Mach64
-MGA_DESC= Include DRI support for Matrox
-R128_DESC= Include DRI support for AMD/ATI R128
-R200_DESC= Include DRI support for AMD/ATI R200
-R300_DESC= Include DRI support for AMD/ATI R300
-R600_DESC= Include DRI support for AMD/ATI R600
-RADEON_DESC= Include DRI support for AMD/ATI RADEON
-SAVAGE_DESC= Include DRI support for S3/Via Savage
-SIS_DESC= Include DRI support for SiS 300 and 6326
-SWRAST_DESC= Include generic software DRI support
-TDFX_DESC= Include DRI support for 3dfx Voodoo
-UNICHROME_DESC= Include DRI support for S3/Via Unichrome
-
-.include <bsd.port.options.mk>
+.if defined(WITH_NEW_XORG)
+. if defined(WITH_GALLIUM) && (${ARCH} == i386 || ${ARCH} == amd64)
+BUILD_DEPENDS+= llvm-config33:${PORTSDIR}/devel/llvm33
+RUN_DEPENDS+= llvm-config33:${PORTSDIR}/devel/llvm33
+CONFIGURE_ENV+= LLVM_CONFIG=${LOCALBASE}/bin/llvm-config33
+
+CONFIGURE_ARGS+=--enable-gallium-llvm --disable-gallium-egl
+
+CONFIGURE_ARGS+=--with-gallium-drivers=r300,r600,radeonsi,svga,swrast
+PLIST_SUB+= GALLIUM=""
+. else
+CONFIGURE_ARGS+=--enable-gallium-llvm=no --without-gallium-drivers
+PLIST_SUB+= GALLIUM="@comment "
+. endif
+. if ${ARCH} == powerpc || ${ARCH} == ia64
+DRI_DRIVERS= RADEON SWRAST
+. endif
+. if ${ARCH} == sparc64
+DRI_DRIVERS= SWRAST
+. endif
+.else # !defined(WITH_NEW_XORG)
+. if ${ARCH} == powerpc
+DRI_DRIVERS= MACH64 RADEON SWRAST TDFX
+. elif ${ARCH} == sparc64
+DRI_DRIVERS= MACH64 RADEON SWRAST
+. endif
+.endif # defined(WITH_NEW_XORG)
-DRI_DRIVERS=
.for _d in ${ALL_DRI_DRIVERS}
-.if ${PORT_OPTIONS:M${_d}}
-DRI_DRIVERS+= ${_d}
+.if ${DRI_DRIVERS:M${_d}}
PLIST_SUB+= ${_d}_DRIVER=""
.else
PLIST_SUB+= ${_d}_DRIVER="@comment "
.endif
.endfor
-.if ${ARCH} == "ia64"
-BROKEN= does not install on ia64
-.endif
-
-.if !(${ARCH} == "amd64" || ${ARCH} == "i386")
+.if !(${ARCH} == amd64 || ${ARCH} == i386)
CONFIGURE_ARGS+=--disable-gallium-intel
.endif
CONFIGURE_ARGS+=--with-dri-drivers="${DRI_DRIVERS:L}"
+.if defined(WITH_NEW_XORG) && !defined(WITH_GALLIUM) \
+ && (${ARCH} == i386 || ${ARCH} == amd64)
+pre-everything::
+ @${ECHO_MSG} ""
+ @${ECHO_MSG} "For r300, r600, radeonsi and swrast gallium based drivers."
+ @${ECHO_MSG} "Please define WITH_GALLIUM in /etc/make.conf"
+ @${ECHO_MSG} "Note that gallium support is highly experimental."
+ @${ECHO_MSG} ""
+.endif
+
do-install:
+.if !defined(WITH_NEW_XORG)
cd ${WRKSRC}/src/mesa; ${GMAKE} install-dri
+.else
+ cd ${WRKSRC}/src/mesa/libdricore; ${GMAKE} install
+ cd ${WRKSRC}/src/mesa/drivers/dri; ${GMAKE} install
+. if defined(WITH_GALLIUM) && (${ARCH} == i386 || ${ARCH} == amd64)
+ cd ${WRKSRC}/src/gallium/drivers/radeon; ${GMAKE} install
+ cd ${WRKSRC}/src/gallium/targets; ${GMAKE} install
+. endif
+.endif
.include <bsd.port.mk>
diff --git a/graphics/dri/pkg-plist b/graphics/dri/pkg-plist
index 43e5ab1a8ade..d80890bb33d4 100644
--- a/graphics/dri/pkg-plist
+++ b/graphics/dri/pkg-plist
@@ -1,19 +1,38 @@
+%%NEW%%%%I965_DRIVER%%etc/drirc
include/GL/internal/dri_interface.h
%%OLD%%%%I810_DRIVER%%lib/dri/i810_dri.so
+%%NEW%%%%I915_DRIVER%%lib/dri/i915_dri.la
%%I915_DRIVER%%lib/dri/i915_dri.so
+%%NEW%%%%I965_DRIVER%%lib/dri/i965_dri.la
%%I965_DRIVER%%lib/dri/i965_dri.so
%%OLD%%%%MACH64_DRIVER%%lib/dri/mach64_dri.so
%%OLD%%%%MGA_DRIVER%%lib/dri/mga_dri.so
%%OLD%%%%R128_DRIVER%%lib/dri/r128_dri.so
+%%NEW%%%%R200_DRIVER%%lib/dri/r200_dri.la
%%R200_DRIVER%%lib/dri/r200_dri.so
%%OLD%%%%R300_DRIVER%%lib/dri/r300_dri.so
+%%NEW%%%%GALLIUM%%lib/dri/r300_dri.la
+%%NEW%%%%GALLIUM%%lib/dri/r300_dri.so
%%OLD%%%%R600_DRIVER%%lib/dri/r600_dri.so
+%%NEW%%%%GALLIUM%%lib/dri/r600_dri.la
+%%NEW%%%%GALLIUM%%lib/dri/r600_dri.so
+%%NEW%%%%RADEON_DRIVER%%lib/dri/radeon_dri.la
%%RADEON_DRIVER%%lib/dri/radeon_dri.so
+%%NEW%%%%GALLIUM%%lib/dri/radeonsi_dri.la
+%%NEW%%%%GALLIUM%%lib/dri/radeonsi_dri.so
%%OLD%%%%SAVAGE_DRIVER%%lib/dri/savage_dri.so
%%OLD%%%%SIS_DRIVER%%lib/dri/sis_dri.so
+%%NEW%%%%SWRAST_DRIVER%%lib/dri/swrast_dri.la
%%SWRAST_DRIVER%%lib/dri/swrast_dri.so
%%OLD%%%%TDFX_DRIVER%%lib/dri/tdfx_dri.so
%%OLD%%%%UNICHROME_DRIVER%%lib/dri/unichrome_dri.so
+%%NEW%%%%GALLIUM%%lib/dri/vmwgfx_dri.la
+%%NEW%%%%GALLIUM%%lib/dri/vmwgfx_dri.so
+%%NEW%%lib/libdricore%%VERSION%%.la
+%%NEW%%lib/libdricore%%VERSION%%.so
+%%NEW%%lib/libdricore%%VERSION%%.so.1
+%%NEW%%%%GALLIUM%%lib/libllvmradeon%%VERSION%%.la
+%%NEW%%%%GALLIUM%%lib/libllvmradeon%%VERSION%%.so
libdata/pkgconfig/dri.pc
@dirrm lib/dri
@dirrmtry include/GL/internal
diff --git a/graphics/libEGL/Makefile b/graphics/libEGL/Makefile
new file mode 100644
index 000000000000..2e023af81038
--- /dev/null
+++ b/graphics/libEGL/Makefile
@@ -0,0 +1,30 @@
+# Created by: kwm@FreeBSD.org
+# $FreeBSD$
+
+PORTNAME= libEGL
+PORTVERSION= ${MESAVERSION}
+CATEGORIES= graphics
+
+COMMENT= OpenEGL library
+
+LIB_DEPENDS+= libpthread-stubs.so:${PORTSDIR}/devel/libpthread-stubs
+
+.if ! defined(WITH_NEW_XORG)
+IGNORE= Please enable WITH_NEW_XORG, libEGL needs libdrm higher then 2.4.24
+.endif
+
+USE_XORG= x11 xau xcb xdmcp
+
+# stuff not needed by libEGL but configure wants it
+USE_XORG+= glproto dri2proto xext xdamage xfixes
+LIB_DEPENDS+= libexpat.so:${PORTSDIR}/textproc/expat2 \
+ libdrm.so:${PORTSDIR}/graphics/libdrm
+
+BUILD_WKRSRC= ${WRKSRC}/src/egl
+INSTALL_WRKSRC= ${WRKSRC}/src/egl
+
+WITH_NEW_XORG= yes
+
+.include <bsd.port.options.mk>
+.include "${.CURDIR}/../../graphics/libGL/bsd.mesalib.mk"
+.include <bsd.port.mk>
diff --git a/graphics/libEGL/pkg-descr b/graphics/libEGL/pkg-descr
new file mode 100644
index 000000000000..f0ed995240bf
--- /dev/null
+++ b/graphics/libEGL/pkg-descr
@@ -0,0 +1,3 @@
+This package contains the EGL utility library.
+
+WWW: http://www.freedesktop.org/Software/xorg
diff --git a/graphics/libEGL/pkg-plist b/graphics/libEGL/pkg-plist
new file mode 100644
index 000000000000..538d2db43ed8
--- /dev/null
+++ b/graphics/libEGL/pkg-plist
@@ -0,0 +1,11 @@
+include/EGL/egl.h
+include/EGL/eglext.h
+include/EGL/eglmesaext.h
+include/EGL/eglplatform.h
+include/KHR/khrplatform.h
+lib/libEGL.la
+lib/libEGL.so
+lib/libEGL.so.1
+libdata/pkgconfig/egl.pc
+@dirrmtry include/KHR
+@dirrmtry include/EGL
diff --git a/graphics/libGL/Makefile b/graphics/libGL/Makefile
index 110fdcfa728b..3d91cddef0b8 100644
--- a/graphics/libGL/Makefile
+++ b/graphics/libGL/Makefile
@@ -3,14 +3,13 @@
PORTNAME= libGL
PORTVERSION= ${MESAVERSION}
-PORTREVISION= 4
+PORTREVISION= ${LIBGLREVISION}
CATEGORIES= graphics
-MAINTAINER= x11@FreeBSD.org
COMMENT= OpenGL library that renders using GLX or DRI
-LIB_DEPENDS+= drm:${PORTSDIR}/graphics/libdrm \
- expat:${PORTSDIR}/textproc/expat2
+LIB_DEPENDS+= libdrm.so:${PORTSDIR}/graphics/libdrm \
+ libexpat.so:${PORTSDIR}/textproc/expat2
USES= pkgconfig
USE_XORG= glproto x11 xext xxf86vm xdamage xfixes dri2proto:both
@@ -18,19 +17,36 @@ USE_XORG= glproto x11 xext xxf86vm xdamage xfixes dri2proto:both
SUB_FILES= pkg-install pkg-deinstall
NO_STAGE= yes
+.include <bsd.port.options.mk>
+
+.if defined(WITH_NEW_XORG)
+LIBGLREVISION= 0
+.else
+LIBGLREVISION= 4
+.endif
+
do-install:
+.if ! defined(WITH_NEW_XORG)
${RM} -f ${WRKSRC}/include/GL/glu*.h
+ @${MKDIR} ${PREFIX}/lib/.libGL
cd ${WRKSRC}/src/mesa; ${GMAKE} install-libgl
+.else
+ cd ${WRKSRC}/src/mesa; ${GMAKE} install-pkgconfigDATA
+ cd ${WRKSRC}/src/glx; ${GMAKE} install
+ ${MKDIR} ${PREFIX}/include/GL
+ cd ${WRKSRC}/include/GL && ${COPYTREE_SHARE} \*.h ${PREFIX}/include/GL/
+ @${MKDIR} ${PREFIX}/lib/.libGL
+ ${INSTALL_LIB} ${WRKSRC}/src/glx/.libs/libGL.so ${PREFIX}/lib/.libGL/
+ ${INSTALL_LIB} ${WRKSRC}/src/glx/.libs/libGL.so.1 ${PREFIX}/lib/.libGL/
+.endif
post-install:
@PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
.include "${.CURDIR}/bsd.mesalib.mk"
-.include <bsd.port.pre.mk>
-
.if !(${ARCH} == "amd64" || ${ARCH} == "i386")
CONFIGURE_ARGS+=--disable-gallium-intel
.endif
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/graphics/libGL/bsd.mesalib.mk b/graphics/libGL/bsd.mesalib.mk
index c79cfdb54dcf..6ae5ab7cd95b 100644
--- a/graphics/libGL/bsd.mesalib.mk
+++ b/graphics/libGL/bsd.mesalib.mk
@@ -1,16 +1,12 @@
-#-*- mode: Fundamental; tab-width: 4; -*-
-# ex:ts=4
-#
-# bsd.mesa.mk - an attempt to refactor MesaLib ports.
-#
-# Created by: Florent Thoumie <flz@FreeBSD.org>
+# bsd.mesalib.mk - shared code between MesaLib ports.
#
# !!! 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
+# - grahpics/libglesv2
# - graphics/dri
#
# $FreeBSD$
@@ -21,7 +17,7 @@ MESAVERSION= ${MESABASEVERSION}${MESASUBVERSION:C/^(.)/.\1/}
MESADISTVERSION=${MESABASEVERSION}${MESASUBVERSION:C/^(.)/-\1/}
.if defined(WITH_NEW_XORG)
-MESABASEVERSION= 8.0.5
+MESABASEVERSION= 9.1.6
# if there is a subversion, include the '-' between 7.11-rc2 for example.
MESASUBVERSION=
PLIST_SUB+= OLD="@comment " NEW=""
@@ -35,64 +31,80 @@ MASTER_SITES= ftp://ftp.freedesktop.org/pub/mesa/${MESABASEVERSION}/
DISTFILES= MesaLib-${MESADISTVERSION}${EXTRACT_SUFX}
MAINTAINER?= x11@FreeBSD.org
-# HACK: added lang/python as build dependency - we need to check, which
-# python versions are cleanly supported by Mesa
BUILD_DEPENDS+= makedepend:${PORTSDIR}/devel/makedepend \
- python:${PORTSDIR}/lang/python \
+ python2:${PORTSDIR}/lang/python2 \
${PYTHON_SITELIBDIR}/libxml2.py:${PORTSDIR}/textproc/py-libxml2
-USES+= bison
-USE_PYTHON_BUILD=yes
+USES= bison gmake pathfix pkgconfig shebangfix
+USE_PYTHON_BUILD=-2.7
USE_BZIP2= yes
-USE_GMAKE= yes
USE_LDCONFIG= yes
GNU_CONFIGURE= yes
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
-CONFIGURE_ARGS+=--enable-gallium-llvm=no --without-gallium-drivers \
- --disable-egl
+
+.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-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_glx_XF86dri.c
+USE_AUTOTOOLS= autoconf:env automake:env libtool:env
+# probably be shared lib, and in it own port.
+CONFIGURE_ARGS+= --enable-shared-glapi=no
+# we need to reapply these patches because we doing wierd stuff with autogen
+REAPPLY_PATCHES= \
+ ${PATCHDIR}/patch-configure \
+ ${PATCHDIR}/patch-src_egl_main_Makefile.in \
+ ${PATCHDIR}/patch-src_glx_Makefile.in \
+ ${PATCHDIR}/patch-src_mapi_es2api_Makefile.in \
+ ${PATCHDIR}/patch-src_mapi_shared-glapi_Makefile.in \
+ ${PATCHDIR}/patch-src_mesa_drivers_dri_common_Makefile.in \
+ ${PATCHDIR}/patch-src_mesa_drivers_dri_common_xmlpool_Makefile.in \
+ ${PATCHDIR}/patch-src_mesa_libdricore_Makefile.in
+
+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
.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 \
- ${PATCHDIR}/extra-src_glx_x11_XF86dri.c
-CONFIGURE_ARGS+=--disable-glut --disable-glw
-.endif
+CONFIGURE_ARGS+=--disable-glut --disable-glw --disable-glu
ALL_TARGET= default
+.endif
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}
-.if !defined(ARCH)
-ARCH!= uname -p
-.endif
-
COMPONENT= ${PORTNAME:L: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:Megl} == ""
+CONFIGURE_ARGS+= --disable-egl
+.else
+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
-CONFIGURE_ARGS+= --with-dri-drivers="i915,i965,r200,radeon,swrast"
+# done in the dri port
.endif
.if !defined(WITH_NEW_XORG)
@@ -106,8 +118,35 @@ CONFIGURE_ARGS+= --enable-xcb
post-patch:
@${REINPLACE_CMD} -e 's|-ffast-math|${FAST_MATH}|' -e 's|x86_64|amd64|' \
${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|[$$](INSTALL_LIB_DIR)/pkgconfig|${PREFIX}/libdata/pkgconfig|' \
${WRKSRC}/src/glu/Makefile \
${WRKSRC}/src/mesa/Makefile \
${WRKSRC}/src/mesa/drivers/dri/Makefile
+.else
+ @${REINPLACE_CMD} -e 's|#!/use/bin/python|#!${LOCALBASE}/bin/python2|g' \
+ ${WRKSRC}/src/mesa/drivers/dri/common/xmlpool/gen_xmlpool.py \
+ ${WRKSRC}/src/glsl/builtins/tools/*.py
+ @${REINPLACE_CMD} -e 's|!/use/bin/python2|!${LOCALBASE}/bin/python2|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
+
+pre-configure:
+# workaround for stupid rerunning configure in do-build step
+# xxx
+.if defined(WITH_NEW_XORG)
+ cd ${WRKSRC} && env NOCONFIGURE=1 sh autogen.sh
+. for file in ${REAPPLY_PATCHES}
+ @cd ${WRKSRC} && ${PATCH} -p0 --quiet < ${file}
+. endfor
+# make sure the pkg-config files are installed in the correct place.
+# this was reverted by running autogen.sh
+ @${FIND} ${WRKSRC} -name Makefile.in -type f | ${XARGS} ${REINPLACE_CMD} -e \
+ 's|[(]libdir[)]/pkgconfig|(prefix)/libdata/pkgconfig|g' ;
+.endif
diff --git a/graphics/libGL/distinfo b/graphics/libGL/distinfo
index 5ee9af26ab05..aa7bb41c5c5d 100644
--- a/graphics/libGL/distinfo
+++ b/graphics/libGL/distinfo
@@ -1,4 +1,4 @@
SHA256 (MesaLib-7.6.1.tar.bz2) = 701f0e4cb85d6298181651b780d1c0a439fadd02aad29ee6623fc05588bb8d44
SIZE (MesaLib-7.6.1.tar.bz2) = 4886995
-SHA256 (MesaLib-8.0.5.tar.bz2) = 511b8da34f8e69ed24caf422964fb7ae747f3b1d8093f6b8aa2602164a475a5e
-SIZE (MesaLib-8.0.5.tar.bz2) = 5734571
+SHA256 (MesaLib-9.1.6.tar.bz2) = e632dff0acafad0a59dc208d16dedb37f7bd58f94c5d58c4b51912e41d005e3d
+SIZE (MesaLib-9.1.6.tar.bz2) = 6134267
diff --git a/graphics/libGL/files/extra-configure-old b/graphics/libGL/files-old/patch-configure
index b2e156de3b6b..b2e156de3b6b 100644
--- a/graphics/libGL/files/extra-configure-old
+++ b/graphics/libGL/files-old/patch-configure
diff --git a/graphics/libGL/files/extra-mach64_context.h-old b/graphics/libGL/files-old/patch-mach64_context.h
index 9e3b38e357cd..9e3b38e357cd 100644
--- a/graphics/libGL/files/extra-mach64_context.h-old
+++ b/graphics/libGL/files-old/patch-mach64_context.h
diff --git a/graphics/libGL/files/extra-src__mesa__x86-64__glapi_x86-64.S b/graphics/libGL/files-old/patch-src__mesa__x86-64__glapi_x86-64.S
index 908a6fe300aa..908a6fe300aa 100644
--- a/graphics/libGL/files/extra-src__mesa__x86-64__glapi_x86-64.S
+++ b/graphics/libGL/files-old/patch-src__mesa__x86-64__glapi_x86-64.S
diff --git a/graphics/libGL/files/extra-src__mesa__x86-64__xform4.S b/graphics/libGL/files-old/patch-src__mesa__x86-64__xform4.S
index 193e6cc30fbe..193e6cc30fbe 100644
--- a/graphics/libGL/files/extra-src__mesa__x86-64__xform4.S
+++ b/graphics/libGL/files-old/patch-src__mesa__x86-64__xform4.S
diff --git a/graphics/libGL/files/extra-src__mesa__x86__glapi_x86.S b/graphics/libGL/files-old/patch-src__mesa__x86__glapi_x86.S
index 71da78c83ffd..71da78c83ffd 100644
--- a/graphics/libGL/files/extra-src__mesa__x86__glapi_x86.S
+++ b/graphics/libGL/files-old/patch-src__mesa__x86__glapi_x86.S
diff --git a/graphics/libGL/files/extra-src__mesa__x86__read_rgba_span_x86.S b/graphics/libGL/files-old/patch-src__mesa__x86__read_rgba_span_x86.S
index 37b08d1cda3c..37b08d1cda3c 100644
--- a/graphics/libGL/files/extra-src__mesa__x86__read_rgba_span_x86.S
+++ b/graphics/libGL/files-old/patch-src__mesa__x86__read_rgba_span_x86.S
diff --git a/graphics/libGL/files/extra-src_glx_x11_XF86dri.c b/graphics/libGL/files-old/patch-src_glx_x11_XF86dri.c
index 1d082b54e21d..1d082b54e21d 100644
--- a/graphics/libGL/files/extra-src_glx_x11_XF86dri.c
+++ b/graphics/libGL/files-old/patch-src_glx_x11_XF86dri.c
diff --git a/graphics/libGL/files/patch-src_mesa_Makefile b/graphics/libGL/files-old/patch-src_mesa_Makefile
index fe2624bae8a7..433f3fbbf182 100644
--- a/graphics/libGL/files/patch-src_mesa_Makefile
+++ b/graphics/libGL/files-old/patch-src_mesa_Makefile
@@ -1,6 +1,6 @@
---- src/mesa/Makefile.orig 2012-04-22 18:34:50.000000000 +0200
-+++ src/mesa/Makefile 2012-04-22 18:35:00.000000000 +0200
-@@ -183,10 +183,10 @@
+--- 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
diff --git a/graphics/libGL/files/extra-src__mesa__drivers__dri__nouveau__nouveau_array.c b/graphics/libGL/files/extra-src__mesa__drivers__dri__nouveau__nouveau_array.c
deleted file mode 100644
index c07a519ef25f..000000000000
--- a/graphics/libGL/files/extra-src__mesa__drivers__dri__nouveau__nouveau_array.c
+++ /dev/null
@@ -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,
diff --git a/graphics/libGL/files/extra-src__mesa__drivers__dri__nouveau__nouveau_render_t.c b/graphics/libGL/files/extra-src__mesa__drivers__dri__nouveau__nouveau_render_t.c
deleted file mode 100644
index 7c29328546ef..000000000000
--- a/graphics/libGL/files/extra-src__mesa__drivers__dri__nouveau__nouveau_render_t.c
+++ /dev/null
@@ -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;
- }
-
- /*
diff --git a/graphics/libGL/files/extra-src_glx_XF86dri.c b/graphics/libGL/files/extra-src_glx_XF86dri.c
deleted file mode 100644
index 42319b8abb6e..000000000000
--- a/graphics/libGL/files/extra-src_glx_XF86dri.c
+++ /dev/null
@@ -1,38 +0,0 @@
---- src/glx/XF86dri.c.orig 2012-10-24 19:03:59.000000000 +0000
-+++ src/glx/XF86dri.c 2013-05-29 10:07:33.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>
-
- static XExtensionInfo _xf86dri_info_data;
- static XExtensionInfo *xf86dri_info = &_xf86dri_info_data;
-@@ -201,7 +202,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();
-@@ -300,9 +305,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();
diff --git a/graphics/libGL/files/extra-configure b/graphics/libGL/files/patch-configure
index d1ae3b75e23d..5f788478fb58 100644
--- a/graphics/libGL/files/extra-configure
+++ b/graphics/libGL/files/patch-configure
@@ -1,7 +1,7 @@
---- configure.orig 2012-07-10 17:30:46.000000000 +0200
-+++ configure 2012-09-01 13:27:22.000000000 +0200
-@@ -9017,9 +9017,34 @@
- DEFINES="$DEFINES -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1"
+--- 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
@@ -38,3 +38,12 @@
;;
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
diff --git a/graphics/libGL/files/extra-src-glsl_ir_constant_expression.cpp b/graphics/libGL/files/patch-src-glsl_ir_constant_expression.cpp
index 8df40432dfc9..8df40432dfc9 100644
--- a/graphics/libGL/files/extra-src-glsl_ir_constant_expression.cpp
+++ b/graphics/libGL/files/patch-src-glsl_ir_constant_expression.cpp
diff --git a/graphics/libGL/files/extra-src__gallium__include__pipe__p_config.h b/graphics/libGL/files/patch-src__gallium__include__pipe__p_config.h
index 41f38a9663bb..41f38a9663bb 100644
--- a/graphics/libGL/files/extra-src__gallium__include__pipe__p_config.h
+++ b/graphics/libGL/files/patch-src__gallium__include__pipe__p_config.h
diff --git a/graphics/libGL/files/patch-src_egl_main_Makefile.in b/graphics/libGL/files/patch-src_egl_main_Makefile.in
new file mode 100644
index 000000000000..7fefe71c41a9
--- /dev/null
+++ b/graphics/libGL/files/patch-src_egl_main_Makefile.in
@@ -0,0 +1,19 @@
+--- src/egl/main/Makefile.in.orig 2013-08-01 23:22:16.000000000 +0200
++++ src/egl/main/Makefile.in 2013-09-01 11:33:47.000000000 +0200
+@@ -990,8 +990,14 @@
+ # a while by putting a link to the driver into /lib of the build tree.
+ all-local: libEGL.la
+ $(MKDIR_P) $(top_builddir)/$(LIB_DIR);
+- ln -f .libs/libEGL.so.1.0.0 $(top_builddir)/$(LIB_DIR)/libEGL.so.1
+- ln -sf libEGL.so.1 $(top_builddir)/$(LIB_DIR)/libEGL.so
++ base=$(basename $<); \
++ dlname=$$(grep dlname= .libs/$< | cut -d "'" -f 2); \
++ ver=$$(grep current= .libs/$< | cut -d "=" -f 2); \
++ ln -f .libs/$$dlname $(top_builddir)/$(LIB_DIR)/$$dlname; \
++ if [ ! -f $(top_builddir)/$(LIB_DIR)/$$base.so.$$ver ]; then \
++ ln -sf $$dlname $(top_builddir)/$(LIB_DIR)/$$base.so.$$ver; \
++ fi; \
++ ln -sf $$base.so.$$ver $(top_builddir)/$(LIB_DIR)/$$base.so
+
+ # Tell versions [3.59,3.63) of GNU make to not export all variables.
+ # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/graphics/libGL/files/patch-src_gallium_drivers_r300_r300-chipset.c b/graphics/libGL/files/patch-src_gallium_drivers_r300_r300-chipset.c
new file mode 100644
index 000000000000..821b07ce8be2
--- /dev/null
+++ b/graphics/libGL/files/patch-src_gallium_drivers_r300_r300-chipset.c
@@ -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;
diff --git a/graphics/libGL/files/patch-src_gallium_drivers_r600_r600-asm.c b/graphics/libGL/files/patch-src_gallium_drivers_r600_r600-asm.c
new file mode 100644
index 000000000000..bdaada3f1fe7
--- /dev/null
+++ b/graphics/libGL/files/patch-src_gallium_drivers_r600_r600-asm.c
@@ -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__)
++#include <sys/endian.h>
++#define bswap_32(x) bswap32((x))
++#endif
+ #include "util/u_memory.h"
+ #include "pipe/p_shader_tokens.h"
+
diff --git a/graphics/libGL/files/patch-src_gallium_drivers_r600_r600-shader.c b/graphics/libGL/files/patch-src_gallium_drivers_r600_r600-shader.c
new file mode 100644
index 000000000000..536529e39704
--- /dev/null
+++ b/graphics/libGL/files/patch-src_gallium_drivers_r600_r600-shader.c
@@ -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__)
++#include <sys/endian.h>
++#define bswap_32(x) bswap32((x))
++#endif
+
+ /* CAYMAN notes
+ Why CAYMAN got loops for lots of instructions is explained here.
diff --git a/graphics/libGL/files/patch-src_gallium_drivers_r600_r600_state_common.c b/graphics/libGL/files/patch-src_gallium_drivers_r600_r600_state_common.c
new file mode 100644
index 000000000000..89b2d7acbf83
--- /dev/null
+++ b/graphics/libGL/files/patch-src_gallium_drivers_r600_r600_state_common.c
@@ -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__)
++#include <sys/endian.h>
++#define bswap_32(x) bswap32((x))
++#endif
+
+ #define R600_PRIM_RECTANGLE_LIST PIPE_PRIM_MAX
+
diff --git a/graphics/libGL/files/patch-src_gallium_drivers_radeon_radeon-llvm-emit.cpp b/graphics/libGL/files/patch-src_gallium_drivers_radeon_radeon-llvm-emit.cpp
new file mode 100644
index 000000000000..ee67776d839e
--- /dev/null
+++ b/graphics/libGL/files/patch-src_gallium_drivers_radeon_radeon-llvm-emit.cpp
@@ -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>
diff --git a/graphics/libGL/files/patch-src_gallium_drivers_radeonsi_r600-buffer.c b/graphics/libGL/files/patch-src_gallium_drivers_radeonsi_r600-buffer.c
new file mode 100644
index 000000000000..4e69603030a2
--- /dev/null
+++ b/graphics/libGL/files/patch-src_gallium_drivers_radeonsi_r600-buffer.c
@@ -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@gmail.com>
+ */
++
++#if defined(__linux__)
+ #include <byteswap.h>
++#elif defined(__FreeBSD__)
++#include <sys/endian.h>
++#define bswap_32(x) bswap32((x))
++#endif
+
+ #include "pipe/p_screen.h"
+ #include "util/u_format.h"
diff --git a/graphics/libGL/files/patch-src_gallium_winsys_svga_drm_vmw-screen-ioctl.c b/graphics/libGL/files/patch-src_gallium_winsys_svga_drm_vmw-screen-ioctl.c
new file mode 100644
index 000000000000..208601de99a0
--- /dev/null
+++ b/graphics/libGL/files/patch-src_gallium_winsys_svga_drm_vmw-screen-ioctl.c
@@ -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)
+ {
diff --git a/graphics/libGL/files/patch-src_glx_Makefile.in b/graphics/libGL/files/patch-src_glx_Makefile.in
new file mode 100644
index 000000000000..ffe97fef8922
--- /dev/null
+++ b/graphics/libGL/files/patch-src_glx_Makefile.in
@@ -0,0 +1,59 @@
+--- src/glx/Makefile.in.orig 2013-07-03 15:13:37.000000000 +0200
++++ src/glx/Makefile.in 2013-07-03 15:19:44.000000000 +0200
+@@ -162,12 +162,12 @@
+ depcomp = $(SHELL) $(top_srcdir)/bin/depcomp
+ am__depfiles_maybe = depfiles
+ am__mv = mv -f
+-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+- $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
++COMPILE = $(CC) $(DEFS) $(AM_CFLAGS) $(DEFAULT_INCLUDES) $(INCLUDES) \
++ $(AM_CPPFLAGS) $(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)
++ $(AM_CFLAGS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
++ $(CPPFLAGS) $(CFLAGS)
+ AM_V_CC = $(am__v_CC_@AM_V@)
+ am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+ am__v_CC_0 = @echo " CC " $@;
+@@ -632,17 +632,17 @@
+ $(am__aclocal_m4_deps):
+ install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+- @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
++ @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)/.libGL" || list=; \
+ list2=; for p in $$list; do \
+ if test -f $$p; then \
+ list2="$$list2 $$p"; \
+ else :; fi; \
+ done; \
+ test -z "$$list2" || { \
+- echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
+- $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
+- echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
+- $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
++ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)/.libGL'"; \
++ $(MKDIR_P) "$(DESTDIR)$(libdir)/.libGL" || exit 1; \
++ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)/.libGL'"; \
++ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)/.libGL"; \
+ }
+
+ uninstall-libLTLIBRARIES:
+@@ -1068,8 +1068,14 @@
+ # a while by putting a link to the driver into /lib of the build tree.
+ all-local: lib@GL_LIB@.la
+ $(MKDIR_P) $(top_builddir)/$(LIB_DIR);
+- ln -f .libs/lib@GL_LIB@.so.1.2.0 $(top_builddir)/$(LIB_DIR)/lib@GL_LIB@.so.1
+- ln -sf lib@GL_LIB@.so.1 $(top_builddir)/$(LIB_DIR)/lib@GL_LIB@.so
++ base=$(basename $<); \
++ dlname=$$(grep dlname= .libs/$< | cut -d "'" -f 2); \
++ ver=$$(grep current= .libs/$< | cut -d "=" -f 2); \
++ ln -f .libs/$$dlname $(top_builddir)/$(LIB_DIR)/$$dlname; \
++ if [ ! -f $(top_builddir)/$(LIB_DIR)/$$base.so.$$ver ]; then \
++ ln -sf $$dlname $(top_builddir)/$(LIB_DIR)/$$base.so.$$ver; \
++ fi; \
++ ln -sf $$base.so.$$ver $(top_builddir)/$(LIB_DIR)/$$base.so
+
+ # Tell versions [3.59,3.63) of GNU make to not export all variables.
+ # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/graphics/libGL/files/patch-src_mapi_es2api_Makefile.in b/graphics/libGL/files/patch-src_mapi_es2api_Makefile.in
new file mode 100644
index 000000000000..1e3229ef40cc
--- /dev/null
+++ b/graphics/libGL/files/patch-src_mapi_es2api_Makefile.in
@@ -0,0 +1,20 @@
+--- src/mapi/es2api/Makefile.in.orig 2013-08-01 23:22:21.000000000 +0200
++++ src/mapi/es2api/Makefile.in 2013-09-01 11:38:01.000000000 +0200
+@@ -958,9 +958,14 @@
+ # a while by putting a link to the driver into /lib of the build tree.
+ all-local: libGLESv2.la
+ $(MKDIR_P) $(top_builddir)/$(LIB_DIR);
+- ln -f .libs/libGLESv2.so $(top_builddir)/$(LIB_DIR)/libGLESv2.so
+- ln -f .libs/libGLESv2.so.2 $(top_builddir)/$(LIB_DIR)/libGLESv2.so.2
+- ln -f .libs/libGLESv2.so.2.0.0 $(top_builddir)/$(LIB_DIR)/libGLESv2.so.2.0.0
++ base=$(basename $<); \
++ dlname=$$(grep dlname= .libs/$< | cut -d "'" -f 2); \
++ ver=$$(grep current= .libs/$< | cut -d "=" -f 2); \
++ ln -f .libs/$$dlname $(top_builddir)/$(LIB_DIR)/$$dlname; \
++ if [ ! -f $(top_builddir)/$(LIB_DIR)/$$base.so.$$ver ]; then \
++ ln -sf $$dlname $(top_builddir)/$(LIB_DIR)/$$base.so.$$ver; \
++ fi; \
++ ln -sf $$base.so.$$ver $(top_builddir)/$(LIB_DIR)/$$base.so
+
+ # Tell versions [3.59,3.63) of GNU make to not export all variables.
+ # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/graphics/libGL/files/patch-src_mapi_glapi_gen_gl-gentable.py b/graphics/libGL/files/patch-src_mapi_glapi_gen_gl-gentable.py
new file mode 100644
index 000000000000..d952bb61cf26
--- /dev/null
+++ b/graphics/libGL/files/patch-src_mapi_glapi_gen_gl-gentable.py
@@ -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
+
diff --git a/graphics/libGL/files/patch-src_mapi_shared-glapi_Makefile.in b/graphics/libGL/files/patch-src_mapi_shared-glapi_Makefile.in
new file mode 100644
index 000000000000..a82a748e7b10
--- /dev/null
+++ b/graphics/libGL/files/patch-src_mapi_shared-glapi_Makefile.in
@@ -0,0 +1,20 @@
+--- src/mapi/shared-glapi/Makefile.in.orig 2013-06-27 00:42:45.000000000 +0200
++++ src/mapi/shared-glapi/Makefile.in 2013-06-27 00:43:25.000000000 +0200
+@@ -889,9 +889,14 @@
+
+ all-local: libglapi.la
+ $(MKDIR_P) $(top_builddir)/$(LIB_DIR)
+- ln -f .libs/libglapi.so.0.0.0 $(top_builddir)/$(LIB_DIR)/libglapi.so.0.0.0
+- ln -sf libglapi.so.0.0.0 $(top_builddir)/$(LIB_DIR)/libglapi.so.0
+- ln -sf libglapi.so.0 $(top_builddir)/$(LIB_DIR)/libglapi.so
++ base=$(basename $<); \
++ dlname=$$(grep dlname= .libs/$< | cut -d "'" -f 2); \
++ ver=$$(grep current= .libs/$< | cut -d "=" -f 2); \
++ ln -f .libs/$$dlname $(top_builddir)/$(LIB_DIR)/$$dlname; \
++ if [ ! -f $(top_builddir)/$(LIB_DIR)/$$base.so.$$ver ]; then \
++ ln -sf $$dlname $(top_builddir)/$(LIB_DIR)/$$base.so.$$ver; \
++ fi; \
++ ln -sf $$base.so.$$ver $(top_builddir)/$(LIB_DIR)/$$base.so
+
+ # Tell versions [3.59,3.63) of GNU make to not export all variables.
+ # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/graphics/libGL/files/patch-src_mesa_drivers_dri_common_Makefile.in b/graphics/libGL/files/patch-src_mesa_drivers_dri_common_Makefile.in
new file mode 100644
index 000000000000..1084e90fd805
--- /dev/null
+++ b/graphics/libGL/files/patch-src_mesa_drivers_dri_common_Makefile.in
@@ -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_@AM_V@)
+ am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+ am__v_CC_0 = @echo " CC " $@;
diff --git a/graphics/libGL/files/patch-src_mesa_drivers_dri_common_xmlpool_Makefile.in b/graphics/libGL/files/patch-src_mesa_drivers_dri_common_xmlpool_Makefile.in
new file mode 100644
index 000000000000..4f2a84b8be96
--- /dev/null
+++ b/graphics/libGL/files/patch-src_mesa_drivers_dri_common_xmlpool_Makefile.in
@@ -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 $@ $?
diff --git a/graphics/libGL/files/patch-src_mesa_libdricore_Makefile.in b/graphics/libGL/files/patch-src_mesa_libdricore_Makefile.in
new file mode 100644
index 000000000000..15b35d1b3eea
--- /dev/null
+++ b/graphics/libGL/files/patch-src_mesa_libdricore_Makefile.in
@@ -0,0 +1,19 @@
+--- src/mesa/libdricore/Makefile.in.orig 2013-06-27 00:21:26.000000000 +0200
++++ src/mesa/libdricore/Makefile.in 2013-06-27 00:28:29.000000000 +0200
+@@ -3950,8 +4000,14 @@
+ # a while by putting a link to the driver into /lib of the build tree.
+ @HAVE_DRI_TRUE@all-local: libdricore@VERSION@.la
+ @HAVE_DRI_TRUE@ $(MKDIR_P) $(top_builddir)/$(LIB_DIR);
+-@HAVE_DRI_TRUE@ ln -f .libs/libdricore@VERSION@.so.1.0.0 $(top_builddir)/$(LIB_DIR)/libdricore@VERSION@.so.1;
+-@HAVE_DRI_TRUE@ ln -sf libdricore@VERSION@.so.1 $(top_builddir)/$(LIB_DIR)/libdricore@VERSION@.so
++@HAVE_DRI_TRUE@ base=$(basename $<); \
++@HAVE_DRI_TRUE@ dlname=$$(grep dlname= .libs/$< | cut -d "'" -f 2); \
++@HAVE_DRI_TRUE@ ver=$$(grep current= .libs/$< | cut -d "=" -f 2); \
++@HAVE_DRI_TRUE@ ln -f .libs/$$dlname $(top_builddir)/$(LIB_DIR)/$$dlname; \
++@HAVE_DRI_TRUE@ if [ ! -f $(top_builddir)/$(LIB_DIR)/$$base.so.$$ver ]; then \
++@HAVE_DRI_TRUE@ ln -sf $$dlname $(top_builddir)/$(LIB_DIR)/$$base.so.$$ver; \
++@HAVE_DRI_TRUE@ fi; \
++@HAVE_DRI_TRUE@ ln -sf $$base.so.$$ver $(top_builddir)/$(LIB_DIR)/$$base.so
+
+ -include $(DEPENDS)
+
diff --git a/graphics/libGL/files/patch-src_mesa_main_compiler.h b/graphics/libGL/files/patch-src_mesa_main_compiler.h
new file mode 100644
index 000000000000..50cf3a8454f6
--- /dev/null
+++ b/graphics/libGL/files/patch-src_mesa_main_compiler.h
@@ -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 )
diff --git a/graphics/libGL/pkg-plist b/graphics/libGL/pkg-plist
index e24cff6cd396..e12392678a75 100644
--- a/graphics/libGL/pkg-plist
+++ b/graphics/libGL/pkg-plist
@@ -11,9 +11,10 @@ include/GL/glxext.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
libdata/pkgconfig/gl.pc
diff --git a/graphics/libGLw/Makefile b/graphics/libGLw/Makefile
index 59265e6d4ca9..95b5dcfa5009 100644
--- a/graphics/libGLw/Makefile
+++ b/graphics/libGLw/Makefile
@@ -12,7 +12,7 @@ MAINTAINER= x11@FreeBSD.org
COMMENT= OpenGL widgets library
USE_BZIP2= yes
-USES= pathfix pkgconfig motif
+USES= motif pathfix pkgconfig
USE_LDCONFIG= yes
USE_GL= gl
USE_XORG= x11 xt xext
diff --git a/graphics/libdrm/Makefile b/graphics/libdrm/Makefile
index 5b51bc62d067..d9aa3c68d292 100644
--- a/graphics/libdrm/Makefile
+++ b/graphics/libdrm/Makefile
@@ -10,8 +10,8 @@ MASTER_SITES= http://dri.freedesktop.org/libdrm/
MAINTAINER= x11@FreeBSD.org
COMMENT= Userspace interface to kernel Direct Rendering Module services
-LIB_DEPENDS= pciaccess:${PORTSDIR}/devel/libpciaccess \
- pthread-stubs:${PORTSDIR}/devel/libpthread-stubs
+LIB_DEPENDS= libpciaccess.so:${PORTSDIR}/devel/libpciaccess \
+ libpthread-stubs.so:${PORTSDIR}/devel/libpthread-stubs
USES= pkgconfig
USE_BZIP2= yes
@@ -19,14 +19,7 @@ GNU_CONFIGURE= yes
USE_LDCONFIG= yes
NO_STAGE= yes
-
-.if defined(WITH_NEW_XORG)
-
-USES+= gmake
-
-OPTIONS_DEFINE= KMS MANPAGES
-OPTIONS_DEFAULT=KMS
-KMS_DESC= Enable KMS support
+OPTIONS_DEFINE= MANPAGES
.if defined(PACKAGE_BUILDING)
OPTIONS_DEFAULT+= MANPAGES
@@ -34,12 +27,18 @@ OPTIONS_DEFAULT+= MANPAGES
.include <bsd.port.options.mk>
-.if ${PORT_OPTIONS:MKMS}
+.if defined(WITH_NEW_XORG)
+
+USES+= gmake
+
+# KMS support in the kernel is only build on these archs, disable others
+.if ${ARCH} == "amd64" || ${ARCH} == "i386"
CONFIGURE_ARGS+=--enable-libkms
EXTRA_PATCHES+= ${FILESDIR}/extra-xf86drmMode.c
-PLIST_SUB+= KMS=""
+PLIST_SUB+= KMS="" NOUVEAU=""
.else
-PLIST_SUB+= KMS="@comment "
+CONFIGURE_ARGS+=--disable-libkms
+PLIST_SUB+= KMS="@comment " NOUVEAU="@comment "
.endif
.if ${PORT_OPTIONS:MMANPAGES}
@@ -70,11 +69,9 @@ CONFIGURE_ARGS+=--disable-vmwgfx
CONFIGURE_ARGS= --enable-nouveau-experimental-api
LIBDRM_VERSION= 2.4.17
LIBDRM_REVISION=1
-PLIST_SUB+= OLD="" NEW="@comment "
+PLIST_SUB+= OLD="" NEW="@comment " NOUVEAU=""
.endif
-.include <bsd.port.pre.mk>
-
.if ${ARCH} == "amd64" || ${ARCH} == "i386" || ${ARCH} == "ia64" || ${ARCH} == "powerpc"
PLIST_SUB+= INTEL_DRIVER=""
PLIST_SUB+= RADEON_DRIVERS=""
@@ -88,4 +85,4 @@ pre-patch:
s,i?86|x86_64),i?86|amd64|x86_64),g' \
${WRKSRC}/configure
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/graphics/libdrm/pkg-plist b/graphics/libdrm/pkg-plist
index b8b6ed53fb45..52b736317e29 100644
--- a/graphics/libdrm/pkg-plist
+++ b/graphics/libdrm/pkg-plist
@@ -22,8 +22,9 @@
%%NEW%%%%INTEL_DRIVER%%include/libdrm/intel_debug.h
%%NEW%%include/libdrm/mach64_drm.h
%%NEW%%include/libdrm/mga_drm.h
-%%NEW%%include/libdrm/nouveau.h
+%%NEW%%%%NOUVEAU%%include/libdrm/nouveau.h
%%NEW%%include/libdrm/nouveau_drm.h
+%%NEW%%include/libdrm/qxl_drm.h
%%NEW%%include/libdrm/r128_drm.h
%%NEW%%%%RADEON_DRIVERS%%include/libdrm/r600_pci_ids.h
%%NEW%%%%RADEON_DRIVERS%%include/libdrm/radeon_bo.h
@@ -54,10 +55,10 @@ lib/libdrm.so.2
%%INTEL_DRIVER%%lib/libdrm_intel.la
%%INTEL_DRIVER%%lib/libdrm_intel.so
%%INTEL_DRIVER%%lib/libdrm_intel.so.1
-lib/libdrm_nouveau.la
-lib/libdrm_nouveau.so
-%%OLD%%lib/libdrm_nouveau.so.1
-%%NEW%%lib/libdrm_nouveau.so.2
+%%NOUVEAU%%lib/libdrm_nouveau.la
+%%NOUVEAU%%lib/libdrm_nouveau.so
+%%OLD%%%%NOUVEAU%%lib/libdrm_nouveau.so.1
+%%NEW%%%%NOUVEAU%%lib/libdrm_nouveau.so.2
%%NEW%%%%RADEON_DRIVERS%%lib/libdrm_radeon.la
%%NEW%%%%RADEON_DRIVERS%%lib/libdrm_radeon.so
%%NEW%%%%RADEON_DRIVERS%%lib/libdrm_radeon.so.1
@@ -66,7 +67,7 @@ lib/libdrm_nouveau.so
%%NEW%%%%KMS%%lib/libkms.so.1
libdata/pkgconfig/libdrm.pc
%%INTEL_DRIVER%%libdata/pkgconfig/libdrm_intel.pc
-libdata/pkgconfig/libdrm_nouveau.pc
+%%NOUVEAU%%libdata/pkgconfig/libdrm_nouveau.pc
%%NEW%%%%RADEON_DRIVERS%%libdata/pkgconfig/libdrm_radeon.pc
%%NEW%%%%KMS%%libdata/pkgconfig/libkms.pc
%%OLD%%@dirrm include/nouveau
diff --git a/graphics/libglesv2/Makefile b/graphics/libglesv2/Makefile
new file mode 100644
index 000000000000..c48744a55079
--- /dev/null
+++ b/graphics/libglesv2/Makefile
@@ -0,0 +1,29 @@
+# Created by: kwm@FreeBSD.org
+# $FreeBSD$
+
+PORTNAME= libglesv2
+PORTVERSION= ${MESAVERSION}
+CATEGORIES= graphics
+
+COMMENT= OpenGL ES v2 library
+
+LIB_DEPENDS+= libdrm.so:${PORTSDIR}/graphics/libdrm \
+ libexpat.so:${PORTSDIR}/textproc/expat2
+
+.if ! defined(WITH_NEW_XORG)
+IGNORE= Please enable WITH_NEW_XORG, libglesv2 needs libdrm higher then 2.4.24
+.endif
+
+# stuff not needed by libEGL but configure wants it
+USE_XORG+= glproto dri2proto xext xdamage xfixes
+
+
+BUILD_WKRSRC= ${WRKSRC}/src/mapi/es2api
+INSTALL_WRKSRC= ${WRKSRC}/src/mapi/es2api
+
+# this library doesn't exist in Mesa 7.6 so use newer
+WITH_NEW_XORG=yes
+
+.include <bsd.port.options.mk>
+.include "${.CURDIR}/../../graphics/libGL/bsd.mesalib.mk"
+.include <bsd.port.mk>
diff --git a/graphics/libglesv2/pkg-descr b/graphics/libglesv2/pkg-descr
new file mode 100644
index 000000000000..b01c5db82929
--- /dev/null
+++ b/graphics/libglesv2/pkg-descr
@@ -0,0 +1,3 @@
+This package contains the GL ES v2 utility library.
+
+WWW: http://www.freedesktop.org/Software/xorg
diff --git a/graphics/libglesv2/pkg-plist b/graphics/libglesv2/pkg-plist
new file mode 100644
index 000000000000..83fc602af5b3
--- /dev/null
+++ b/graphics/libglesv2/pkg-plist
@@ -0,0 +1,12 @@
+include/GLES2/gl2.h
+include/GLES2/gl2ext.h
+include/GLES2/gl2platform.h
+include/GLES3/gl3.h
+include/GLES3/gl3ext.h
+include/GLES3/gl3platform.h
+lib/libGLESv2.la
+lib/libGLESv2.so
+lib/libGLESv2.so.2
+libdata/pkgconfig/glesv2.pc
+@dirrmtry include/GLES3
+@dirrmtry include/GLES2
diff --git a/graphics/libreatlas/Makefile b/graphics/libreatlas/Makefile
index 7a24f8275387..14a1a1c347aa 100644
--- a/graphics/libreatlas/Makefile
+++ b/graphics/libreatlas/Makefile
@@ -3,7 +3,7 @@
PORTNAME= libreatlas
PORTVERSION= 1.0.0a
-PORTREVISION= 4
+PORTREVISION= 5
CATEGORIES= graphics geography
MASTER_SITES= http://www.gaia-gis.it/gaia-sins/
@@ -30,8 +30,7 @@ LIB_DEPENDS= mspack:${PORTSDIR}/archivers/libmspack \
fontconfig:${PORTSDIR}/x11-fonts/fontconfig
GNU_CONFIGURE= yes
-USES= pkgconfig gettext iconv
-USE_GMAKE= yes
+USES= pkgconfig gettext gmake iconv
USE_XORG= ice pixman sm x11 xau xcb xcomposite xcursor xdamage xdmcp xext \
xfixes xi xinerama xrandr xrender xxf86vm
USE_GNOME= atk gdkpixbuf2 glib20 gtk20 pango
diff --git a/multimedia/bangarang/files/patch-src_platform_infofetchers_lastfminfofetcher.cpp b/multimedia/bangarang/files/patch-src_platform_infofetchers_lastfminfofetcher.cpp
new file mode 100644
index 000000000000..e14b8ad2c4ad
--- /dev/null
+++ b/multimedia/bangarang/files/patch-src_platform_infofetchers_lastfminfofetcher.cpp
@@ -0,0 +1,11 @@
+--- src/platform/infofetchers/lastfminfofetcher.cpp.orig 2013-09-29 14:10:24.389000633 +0200
++++ src/platform/infofetchers/lastfminfofetcher.cpp 2013-09-29 14:12:08.529993792 +0200
+@@ -32,6 +32,8 @@
+ #include <QFile>
+ #include <QTextEdit>
+
++#include <unistd.h>
++
+ LastfmInfoFetcher::LastfmInfoFetcher(QObject *parent) :
+ InfoFetcher(parent)
+ {
diff --git a/multimedia/bangarang/files/patch-src_platform_infofetchers_tmdbinfofetcher.cpp b/multimedia/bangarang/files/patch-src_platform_infofetchers_tmdbinfofetcher.cpp
new file mode 100644
index 000000000000..0fc937ed3c95
--- /dev/null
+++ b/multimedia/bangarang/files/patch-src_platform_infofetchers_tmdbinfofetcher.cpp
@@ -0,0 +1,11 @@
+--- src/platform/infofetchers/tmdbinfofetcher.cpp.orig 2013-09-29 14:13:28.088988439 +0200
++++ src/platform/infofetchers/tmdbinfofetcher.cpp 2013-09-29 14:13:39.271987399 +0200
+@@ -30,6 +30,8 @@
+ #include <QDomDocument>
+ #include <QFile>
+
++#include <unistd.h>
++
+ TMDBInfoFetcher::TMDBInfoFetcher(QObject *parent) :
+ InfoFetcher(parent)
+ {
diff --git a/multimedia/bangarang/files/patch-src_platform_infofetchers_tvdbinfofetcher.cpp b/multimedia/bangarang/files/patch-src_platform_infofetchers_tvdbinfofetcher.cpp
new file mode 100644
index 000000000000..850ee9da9430
--- /dev/null
+++ b/multimedia/bangarang/files/patch-src_platform_infofetchers_tvdbinfofetcher.cpp
@@ -0,0 +1,11 @@
+--- src/platform/infofetchers/tvdbinfofetcher.cpp.orig 2013-09-29 14:14:31.975991467 +0200
++++ src/platform/infofetchers/tvdbinfofetcher.cpp 2013-09-29 14:14:47.222983235 +0200
+@@ -30,6 +30,8 @@
+ #include <QDomDocument>
+ #include <QFile>
+
++#include <unistd.h>
++
+ TVDBInfoFetcher::TVDBInfoFetcher(QObject *parent) :
+ InfoFetcher(parent)
+ {
diff --git a/multimedia/freetuxtv/Makefile b/multimedia/freetuxtv/Makefile
index 85c0206f09a2..26bfc15d5cb0 100644
--- a/multimedia/freetuxtv/Makefile
+++ b/multimedia/freetuxtv/Makefile
@@ -3,7 +3,7 @@
PORTNAME= freetuxtv
PORTVERSION= 0.6.5
-PORTREVISION= 4
+PORTREVISION= 5
CATEGORIES= multimedia
MASTER_SITES= GOOGLE_CODE
@@ -26,13 +26,12 @@ LIB_DEPENDS= vlc:${PORTSDIR}/multimedia/vlc \
expat:${PORTSDIR}/textproc/expat2 \
fontconfig:${PORTSDIR}/x11-fonts/fontconfig
-USES= iconv pathfix pkgconfig
+USES= gmake iconv pathfix pkgconfig
USE_GNOME= glib20 gtk20
USE_XORG= pixman x11 xau xcb xcomposite xcursor xdamage xdmcp xext xfixes \
xi xinerama xrandr xrender
GNU_CONFIGURE= yes
CONFIGURE_ARGS+=--with-gtk=2.0
-USE_GMAKE= yes
CFLAGS= -Wno-return-type
INSTALLS_ICONS= yes
diff --git a/multimedia/libva-intel-driver/Makefile b/multimedia/libva-intel-driver/Makefile
index 84421c154a75..5090f8b24548 100644
--- a/multimedia/libva-intel-driver/Makefile
+++ b/multimedia/libva-intel-driver/Makefile
@@ -15,7 +15,7 @@ LICENSE_FILE= ${WRKSRC}/COPYING
LIB_DEPENDS= va:${PORTSDIR}/multimedia/libva
BUILD_DEPENDS= ${LOCALBASE}/include/linux/videodev2.h:${PORTSDIR}/multimedia/v4l_compat
-USE_GMAKE= yes
+USES= gmake pkgconfig
USE_BZIP2= yes
USE_GL= gl
USE_AUTOTOOLS= aclocal autoheader automake autoconf libtoolize
diff --git a/multimedia/libva-vdpau-driver/files/patch-src-utils_glx.h b/multimedia/libva-vdpau-driver/files/patch-src-utils_glx.h
new file mode 100644
index 000000000000..3d9d273e3869
--- /dev/null
+++ b/multimedia/libva-vdpau-driver/files/patch-src-utils_glx.h
@@ -0,0 +1,22 @@
+--- src/utils_glx.h.orig 2013-09-29 15:55:16.128603213 +0200
++++ src/utils_glx.h 2013-09-29 15:55:18.537925849 +0200
+@@ -42,6 +42,19 @@
+ typedef void (*PFNGLVDPAUUNMAPSURFACESNVPROC)(GLsizei numSurface, const GLvdpauSurfaceNV *surfaces);
+ #endif
+
++#if GL_GLEXT_VERSION >= 85
++/*
++ * The following typedef is hidden in at least Mesa 9.1.x, because:
++ * o GL/glext.h was updated to version 85, moving the typedef inside
++ * an #ifndef GL_VERSION_1_3 block.
++ * (Mesa Git: 68060cfb2bbf890a3932c8d25382261a83f393af)
++ * o GL/gl.h defines GL_VERSION_1_3 to 1.
++ *
++ * See: https://gitorious.org/vaapi/gstreamer-vaapi/commit/5db2e93d3c930fd8470cfdcd26f514d1cebc59a0/diffs
++ */
++typedef void (*PFNGLMULTITEXCOORD2FPROC) (GLenum target, GLfloat s, GLfloat t);
++#endif
++
+ /* GLX_EXT_texture_from_pixmap */
+ #if GLX_GLXEXT_VERSION < 18
+ typedef void (*PFNGLXBINDTEXIMAGEEXTPROC)(Display *, GLXDrawable, int, const int *);
diff --git a/net/cvsup/Makefile b/net/cvsup/Makefile
index dec8c2662f4f..4b4fdea72e0f 100644
--- a/net/cvsup/Makefile
+++ b/net/cvsup/Makefile
@@ -3,7 +3,7 @@
PORTNAME= cvsup
PORTVERSION= 16.1h
-PORTREVISION= 4
+PORTREVISION= 5
CATEGORIES= net devel
MASTER_SITES= ${MASTER_SITE_FREEBSD_ORG}
MASTER_SITE_SUBDIR=development/CVSup/snapshots
diff --git a/net/tigervnc/Makefile b/net/tigervnc/Makefile
index f6361d6b9710..8393e0ba40d2 100644
--- a/net/tigervnc/Makefile
+++ b/net/tigervnc/Makefile
@@ -3,6 +3,7 @@
PORTNAME= tigervnc
PORTVERSION= 1.3.0
+PORTREVISION= 1
CATEGORIES= net x11-servers
MASTER_SITES= SF:tigervnc
MASTER_SITE_SUBDIR= ${PORTNAME}/${PORTNAME}/${PORTVERSION}/:tigervnc
diff --git a/print/photoprint/Makefile b/print/photoprint/Makefile
index fe9fed7203ff..8e0cc04cf7fb 100644
--- a/print/photoprint/Makefile
+++ b/print/photoprint/Makefile
@@ -2,6 +2,7 @@
PORTNAME= photoprint
DISTVERSION= 0.4.2-pre2
+PORTREVISION= 1
CATEGORIES= print graphics
MASTER_SITES= http://www.blackfiveimaging.co.uk/photoprint/
@@ -17,7 +18,6 @@ LIB_DEPENDS= libcups.so:${PORTSDIR}/print/cups-client \
liblcms.so:${PORTSDIR}/graphics/lcms \
libnetpbm.so:${PORTSDIR}/graphics/netpbm \
libpcre.so:${PORTSDIR}/devel/pcre \
- libpixman-1.so:${PORTSDIR}/x11/pixman \
libpng15.so:${PORTSDIR}/graphics/png \
libpthread-stubs.so:${PORTSDIR}/devel/libpthread-stubs \
libtiff.so:${PORTSDIR}/graphics/tiff
@@ -25,7 +25,7 @@ LIB_DEPENDS= libcups.so:${PORTSDIR}/print/cups-client \
GNU_CONFIGURE= yes
USES= desktop-file-utils gettext pkgconfig
USE_GNOME= pango
-USE_XORG= x11 xau xcb xcomposite xcursor xdamage xdmcp xext \
+USE_XORG= pixman x11 xau xcb xcomposite xcursor xdamage xdmcp xext \
xfixes xi xinerama xrandr xrender
INSTALLS_ICONS= yes
diff --git a/sysutils/gtk-imonc/Makefile b/sysutils/gtk-imonc/Makefile
index 5e9cf8f73b76..1a2761ca17e6 100644
--- a/sysutils/gtk-imonc/Makefile
+++ b/sysutils/gtk-imonc/Makefile
@@ -3,7 +3,7 @@
PORTNAME= gtk-imonc
PORTVERSION= 0.6.4.1
-PORTREVISION= 12
+PORTREVISION= 13
CATEGORIES= sysutils
MASTER_SITES= http://stefan-strigler.de/download/
diff --git a/sysutils/nitrogen/Makefile b/sysutils/nitrogen/Makefile
index 90d3c0ce174c..61c9f10aac1b 100644
--- a/sysutils/nitrogen/Makefile
+++ b/sysutils/nitrogen/Makefile
@@ -3,7 +3,7 @@
PORTNAME= nitrogen
PORTVERSION= 1.5.2
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= sysutils
MASTER_SITES= http://projects.l3ib.org/nitrogen/files/
diff --git a/x11-drivers/xf86-input-mouse/files/patch-src-bsd_mouse.c b/x11-drivers/xf86-input-mouse/files/patch-src-bsd_mouse.c
index 078d52a28128..1996722fd2eb 100644
--- a/x11-drivers/xf86-input-mouse/files/patch-src-bsd_mouse.c
+++ b/x11-drivers/xf86-input-mouse/files/patch-src-bsd_mouse.c
@@ -1,13 +1,65 @@
---- src/bsd_mouse.c.orig 2012-07-27 08:10:56.000000000 +0200
-+++ src/bsd_mouse.c 2012-07-30 00:49:09.000000000 +0200
-@@ -71,15 +71,20 @@
- static const char *FindDevice(InputInfoPtr, const char *, int);
+--- src/bsd_mouse.c.orig 2012-10-08 03:40:07.000000000 +0200
++++ src/bsd_mouse.c 2013-07-03 01:00:50.897361950 +0200
+@@ -26,6 +26,24 @@
+ * authorization from the copyright holder(s) and author(s).
+ */
- #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
++
++/*
++ * XXX - Should this be autoconf'd instead?
++ */
++#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
++
++#if !defined(USBMOUSE_SUPPORT)
++#define USBMOUSE_SUPPORT
++#endif
++#if !defined(HAS_LIB_USB_HID)
++#define HAS_LIB_USB_HID
++#endif
+#if !defined(XPS2_SUPPORT)
+#define XPS2_SUPPORT
+#endif
- /* These are for FreeBSD and DragonFly */
++
++#endif /* defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) */
++
+ #include <xorg-server.h>
+
+ #include <X11/X.h>
+@@ -33,9 +51,23 @@
+ #include "xf86Priv.h"
+ #include "xf86_OSlib.h"
+ #include "xf86Xinput.h"
++#include <exevents.h>
+ #include "mouse.h"
+ #include "xisb.h"
+ #include "mipointer.h"
++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 3
++#define HAVE_PROPERTIES 1
++#endif
++#ifdef HAVE_PROPERTIES
++#include <X11/Xatom.h>
++#include <xserver-properties.h>
++/* 1.6 has properties, but no labels */
++#ifdef AXIS_LABEL_PROP
++#define HAVE_LABELS
++#else
++#undef HAVE_LABELS
++#endif
++#endif
+ #ifdef WSCONS_SUPPORT
+ #include <dev/wscons/wsconsio.h>
+ #endif
+@@ -47,9 +79,6 @@
+ #endif
+
+ #include <dev/usb/usb.h>
+-#ifdef USB_GET_REPORT_ID
+-#define USB_NEW_HID
+-#endif
+
+ #define HUP_GENERIC_DESKTOP 0x0001
+ #define HUP_BUTTON 0x0009
+@@ -75,11 +104,13 @@
#define DEFAULT_MOUSE_DEV "/dev/mouse"
#define DEFAULT_SYSMOUSE_DEV "/dev/sysmouse"
#define DEFAULT_PS2_DEV "/dev/psm0"
@@ -21,7 +73,7 @@
NULL
};
#elif (defined(__OpenBSD__) || defined(__NetBSD__)) && defined(WSCONS_SUPPORT)
-@@ -100,7 +105,11 @@
+@@ -100,7 +131,11 @@
#if defined(__NetBSD__)
return MSE_SERIAL | MSE_BUS | MSE_PS2 | MSE_AUTO;
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
@@ -34,14 +86,14 @@
#else
return MSE_SERIAL | MSE_BUS | MSE_PS2 | MSE_XPS2 | MSE_AUTO | MSE_MISC;
#endif
-@@ -180,9 +189,30 @@
+@@ -180,9 +215,30 @@
{ MOUSE_PROTO_SYSMOUSE, "SysMouse" }
};
+#ifdef XPS2_SUPPORT
+static struct {
+ int dmodel;
-+ char *name;
++ const char *name;
+} ps2proto[] = {
+ { MOUSE_MODEL_NETSCROLL, "NetScrollPS/2" },
+ { MOUSE_MODEL_NET, "NetMousePS/2" },
@@ -59,13 +111,13 @@
SetupAuto(InputInfoPtr pInfo, int *protoPara)
{
+#ifdef XPS2_SUPPORT
-+ char *dev;
++ const char *dev;
+#endif
+ const char *proto;
int i;
mousehw_t hw;
mousemode_t mode;
-@@ -190,7 +220,13 @@
+@@ -190,7 +246,13 @@
if (pInfo->fd == -1)
return NULL;
@@ -79,7 +131,7 @@
i = 1;
ioctl(pInfo->fd, MOUSE_SETLEVEL, &i);
-@@ -209,9 +245,18 @@
+@@ -209,9 +271,18 @@
protoPara[0] = mode.syncmask[0];
protoPara[1] = mode.syncmask[1];
}
@@ -100,7 +152,7 @@
}
}
}
-@@ -234,41 +279,41 @@
+@@ -234,41 +305,41 @@
(protocol && xf86NameCmp(protocol, "SysMouse") == 0)) {
/*
* As the FreeBSD sysmouse driver defaults to protocol level 0
@@ -159,7 +211,7 @@
}
return FALSE;
}
-@@ -276,17 +321,17 @@
+@@ -276,17 +347,17 @@
static const char *
FindDevice(InputInfoPtr pInfo, const char *protocol, int flags)
{
@@ -181,7 +233,7 @@
#endif
} else {
/*
-@@ -295,28 +340,32 @@
+@@ -295,28 +366,32 @@
* the test for whether /dev/sysmouse is usable can be made.
*/
if (!strcmp(*pdev, DEFAULT_MOUSE_DEV)) {
@@ -227,7 +279,749 @@
break;
}
}
-@@ -764,7 +813,9 @@
+@@ -468,30 +543,78 @@
+
+ #if defined(USBMOUSE_SUPPORT)
+
++#define MAXRIDS 64
++#define MAXACOLS 8
++#define MAXLCOLS 16
+ typedef struct _UsbMseRec {
+ int packetSize;
+- int iid;
+- hid_item_t loc_x; /* x locator item */
+- hid_item_t loc_y; /* y locator item */
+- hid_item_t loc_z; /* z (wheel) locator item */
+- hid_item_t loc_w; /* z (wheel) locator item */
+- hid_item_t loc_btn[MSE_MAXBUTTONS]; /* buttons locator items */
+- unsigned char *buffer;
++ int iid, nrids, nacols, opened;
++ struct {
++ int32_t rid;
++ int size;
++ } rids[MAXRIDS];
++ struct UsbMseAcol {
++ InputInfoPtr pInfo;
++ int nlcols, nbuttons, hasZ, hasW;
++ int xmin, xmax, ymin, ymax, pmin, pmax, px, py;
++ int cxmin, cxmax, cymin, cymax, cpmin, cpmax;
++ struct UsbMseLcol {
++ hid_item_t loc_x; /* x locator item */
++ hid_item_t loc_y; /* y locator item */
++ hid_item_t loc_z; /* z (wheel) locator item */
++ hid_item_t loc_w; /* w (hwheel) locator item */
++ hid_item_t loc_p; /* Tip Pressure */
++ hid_item_t loc_valid; /* Touch Valid */
++ hid_item_t loc_in_range; /* In Range */
++ hid_item_t loc_btn[MSE_MAXBUTTONS]; /* buttons locator items */
++ } lcols[MAXLCOLS];
++ hid_item_t loc_cc; /* contact count */
++ } acols[MAXACOLS];
++ unsigned char *buffer;
+ } UsbMseRec, *UsbMsePtr;
+
++static int *
++usbGetReportSizePtr(UsbMsePtr pUsbMse, int32_t rid)
++{
++ int i;
++
++ for (i = 0; i < pUsbMse->nrids; i++) {
++ if (pUsbMse->rids[i].rid == rid)
++ return (&pUsbMse->rids[i].size);
++ }
++ for (i = 0; i < MAXRIDS; i++) {
++ if (pUsbMse->rids[i].size == 0) {
++ pUsbMse->rids[i].rid = rid;
++ pUsbMse->nrids = max(pUsbMse->nrids, i + 1);
++ return (&pUsbMse->rids[i].size);
++ }
++ }
++ return (NULL);
++}
++
+ static int
+ usbMouseProc(DeviceIntPtr pPointer, int what)
+ {
+ InputInfoPtr pInfo;
+ MouseDevPtr pMse;
+ UsbMsePtr pUsbMse;
++ struct UsbMseAcol *acol;
+ unsigned char map[MSE_MAXBUTTONS + 1];
+- int nbuttons;
++ int nacol, nbuttons;
++#ifdef HAVE_LABELS
++ Atom btn_labels[MSE_MAXBUTTONS] = {0};
++ Atom axes_labels[3] = { 0, 0, 0 };
++#endif
+
+ pInfo = pPointer->public.devicePrivate;
+ pMse = pInfo->private;
+ pMse->device = pPointer;
+ pUsbMse = pMse->mousePriv;
++ for (nacol = 0; nacol < (pUsbMse->nacols - 1); nacol++) {
++ if (pUsbMse->acols[nacol].pInfo == pInfo)
++ break;
++ }
++ acol = &pUsbMse->acols[nacol];
+
+ switch (what) {
+ case DEVICE_INIT:
+@@ -500,38 +623,96 @@
+ for (nbuttons = 0; nbuttons < MSE_MAXBUTTONS; ++nbuttons)
+ map[nbuttons + 1] = nbuttons + 1;
+
+- InitPointerDeviceStruct((DevicePtr)pPointer,
+- map,
+- min(pMse->buttons, MSE_MAXBUTTONS),
+- miPointerGetMotionEvents,
+- pMse->Ctrl,
+- miPointerGetMotionBufferSize());
++#ifdef HAVE_LABELS
++ btn_labels[0] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_LEFT);
++ btn_labels[1] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_MIDDLE);
++ btn_labels[2] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_RIGHT);
++ axes_labels[0] = XIGetKnownProperty((acol->xmin != acol->xmax)
++ ? AXIS_LABEL_PROP_ABS_X : AXIS_LABEL_PROP_REL_X);
++ axes_labels[1] = XIGetKnownProperty((acol->xmin != acol->xmax)
++ ? AXIS_LABEL_PROP_ABS_Y : AXIS_LABEL_PROP_REL_Y);
++ axes_labels[2] = XIGetKnownProperty(AXIS_LABEL_PROP_ABS_PRESSURE);
++#endif
++
++ InitButtonClassDeviceStruct(pPointer, min(pMse->buttons, MSE_MAXBUTTONS),
++#ifdef HAVE_LABELS
++ btn_labels,
++#endif
++ map);
++ InitValuatorClassDeviceStruct(pPointer, (acol->pmin != acol->pmax) ? 3 : 2,
++#ifdef HAVE_LABELS
++ axes_labels,
++#endif
++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 0
++ miPointerGetMotionEvents,
++#elif GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 3
++ GetMotionHistory,
++#endif
++ GetMotionHistorySize(),
++ (acol->xmin != acol->xmax || acol->ymin != acol->ymax) ?
++ Absolute : Relative);
++ InitPtrFeedbackClassDeviceStruct(pPointer, pMse->Ctrl);
+
+ /* X valuator */
+- xf86InitValuatorAxisStruct(pPointer, 0, 0, -1, 1, 0, 1);
++ xf86InitValuatorAxisStruct(pPointer, 0,
++#ifdef HAVE_LABELS
++ axes_labels[0],
++#endif
++ (acol->xmin != acol->xmax) ? acol->xmin : -1,
++ (acol->xmin != acol->xmax) ? acol->xmax : -1,
++ 1, 0, 1
++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12
++ , (acol->xmin != acol->xmax) ? Absolute : Relative
++#endif
++ );
+ xf86InitValuatorDefaults(pPointer, 0);
+ /* Y valuator */
+- xf86InitValuatorAxisStruct(pPointer, 1, 0, -1, 1, 0, 1);
++ xf86InitValuatorAxisStruct(pPointer, 1,
++#ifdef HAVE_LABELS
++ axes_labels[1],
++#endif
++ (acol->ymin != acol->ymax) ? acol->ymin : -1,
++ (acol->ymin != acol->ymax) ? acol->ymax : -1,
++ 1, 0, 1
++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12
++ , (acol->ymin != acol->ymax) ? Absolute : Relative
++#endif
++ );
+ xf86InitValuatorDefaults(pPointer, 1);
++ /* Pressure valuator */
++ if (acol->pmin != acol->pmax) {
++ xf86InitValuatorAxisStruct(pPointer, 2,
++#ifdef HAVE_LABELS
++ axes_labels[2],
++#endif
++ acol->pmin, acol->pmax, 1, 0, 1
++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12
++ , Absolute
++#endif
++ );
++ xf86InitValuatorDefaults(pPointer, 2);
++ }
+ xf86MotionHistoryAllocate(pInfo);
+ break;
+
+ case DEVICE_ON:
+- pInfo->fd = xf86OpenSerial(pInfo->options);
+- if (pInfo->fd == -1)
+- xf86Msg(X_WARNING, "%s: cannot open input device\n", pInfo->name);
+- else {
+- pMse->buffer = XisbNew(pInfo->fd, pUsbMse->packetSize);
+- if (!pMse->buffer) {
+- free(pMse);
+- xf86CloseSerial(pInfo->fd);
+- pInfo->fd = -1;
+- } else {
+- xf86FlushInput(pInfo->fd);
+- if (!xf86InstallSIGIOHandler (pInfo->fd, usbSigioReadInput,
+- pInfo))
+- AddEnabledDevice(pInfo->fd);
+- }
++ if (pUsbMse->opened++ == 0) {
++ pInfo->fd = xf86OpenSerial(pInfo->options);
++ if (pInfo->fd == -1)
++ xf86Msg(X_WARNING, "%s: cannot open input device\n", pInfo->name);
++ else {
++ pMse->buffer = XisbNew(pInfo->fd, pUsbMse->packetSize);
++ if (!pMse->buffer) {
++ free(pMse);
++ xf86CloseSerial(pInfo->fd);
++ pInfo->fd = -1;
++ } else {
++ xf86FlushInput(pInfo->fd);
++ if (!xf86InstallSIGIOHandler (pInfo->fd, usbSigioReadInput,
++ pInfo))
++ AddEnabledDevice(pInfo->fd);
++ }
++ }
+ }
+ pMse->lastButtons = 0;
+ pMse->lastMappedButtons = 0;
+@@ -553,6 +734,7 @@
+ xf86CloseSerial(pInfo->fd);
+ pInfo->fd = -1;
+ }
++ pUsbMse->opened--;
+ pPointer->public.on = FALSE;
+ usleep(300000);
+ break;
+@@ -568,45 +750,154 @@
+ {
+ MouseDevPtr pMse;
+ UsbMsePtr pUsbMse;
+- int buttons = pMse->lastButtons;
+- int dx = 0, dy = 0, dz = 0, dw = 0;
+- int n, c;
++ int buttons, cc;
++ int dx, dy, dz, dw, dp, upd, v, nx, ny, np, in_range;
++ int n, c, rid, *sizep, nacol, nlcol;
+ unsigned char *pBuf;
++ struct UsbMseAcol *acol;
++ struct UsbMseLcol *lcol;
+
+ pMse = pInfo->private;
+ pUsbMse = pMse->mousePriv;
+
+ XisbBlockDuration(pMse->buffer, -1);
++next:
+ pBuf = pUsbMse->buffer;
+ n = 0;
+- while ((c = XisbRead(pMse->buffer)) >= 0 && n < pUsbMse->packetSize) {
++ if (pUsbMse->iid) {
++ rid = XisbRead(pMse->buffer);
++ if (rid < 0)
++ return;
++ pBuf[n++] = (unsigned char)rid;
++ } else
++ rid = 0;
++ sizep = usbGetReportSizePtr(pUsbMse, rid);
++ if (sizep == NULL || *sizep == 0) {
++ xf86Msg(X_WARNING, "%s: unknown report ID %d\n", pInfo->name, rid);
++ goto next;
++ }
++ while (n < *sizep && (c = XisbRead(pMse->buffer)) >= 0) {
+ pBuf[n++] = (unsigned char)c;
+ }
+ if (n == 0)
+ return;
+- if (n != pUsbMse->packetSize) {
++// xf86MsgVerb(X_INFO, 3, "pkt: %d %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x\n",
++// n, pBuf[0], pBuf[1], pBuf[2], pBuf[3], pBuf[4], pBuf[5], pBuf[6], pBuf[7], pBuf[8], pBuf[9]);
++ if (n != *sizep) {
+ LogMessageVerbSigSafe(X_WARNING, -1,
+ "%s: incomplete packet, size %d\n",
+ pInfo->name, n);
+ }
+- /* discard packets with an id that don't match the mouse */
+- /* XXX this is probably not the right thing */
+- if (pUsbMse->iid != 0) {
+- if (*pBuf++ != pUsbMse->iid)
+- return;
+- }
+- dx = hid_get_data(pBuf, &pUsbMse->loc_x);
+- dy = hid_get_data(pBuf, &pUsbMse->loc_y);
+- dz = hid_get_data(pBuf, &pUsbMse->loc_z);
+- dw = hid_get_data(pBuf, &pUsbMse->loc_w);
+-
+- buttons = 0;
+- for (n = 0; n < pMse->buttons; n++) {
+- if (hid_get_data(pBuf, &pUsbMse->loc_btn[n]))
+- buttons |= (1 << UMS_BUT(n));
++ for (nacol = 0; nacol < pUsbMse->nacols; nacol++) {
++ acol = &pUsbMse->acols[nacol];
++ if (acol->pInfo == NULL)
++ continue;
++ nx = ny = np = upd = 0;
++ buttons = cc = 0;
++ dx = dy = dz = dw = dp = 0;
++ for (nlcol = 0; nlcol < pUsbMse->acols[nacol].nlcols; nlcol++) {
++ lcol = &acol->lcols[nlcol];
++
++ if (lcol->loc_valid.usage != 0 && rid == lcol->loc_valid.report_ID &&
++ hid_get_data(pBuf, &lcol->loc_valid) == 0)
++ continue;
++ if (lcol->loc_in_range.usage != 0 && rid == lcol->loc_in_range.report_ID)
++ in_range = hid_get_data(pBuf, &lcol->loc_in_range);
++ else
++ in_range = 1;
++ if (in_range && lcol->loc_x.usage != 0 && rid == lcol->loc_x.report_ID && nx == 0) {
++ v = hid_get_data(pBuf, &lcol->loc_x);
++ if (acol->xmin != acol->xmax) {
++ v = xf86ScaleAxis(v, acol->xmax, acol->xmin,
++ lcol->loc_x.logical_maximum, lcol->loc_x.logical_minimum);
++ if (acol->cxmin != acol->cxmax)
++ v = xf86ScaleAxis(v, acol->xmax, acol->xmin,
++ acol->cxmax, acol->cxmin);
++ }
++ dx += v;
++ nx++;
++ }
++ if (in_range && lcol->loc_y.usage != 0 && rid == lcol->loc_y.report_ID && ny == 0) {
++ v = hid_get_data(pBuf, &lcol->loc_y);
++ if (acol->xmin != acol->xmax) {
++ v = xf86ScaleAxis(v, acol->ymax, acol->ymin,
++ lcol->loc_y.logical_maximum, lcol->loc_y.logical_minimum);
++ if (acol->cymin != acol->cymax)
++ v = xf86ScaleAxis(v, acol->ymax, acol->ymin,
++ acol->cymax, acol->cymin);
++ }
++ dy += v;
++ ny++;
++ }
++ if (lcol->loc_z.usage != 0 && rid == lcol->loc_z.report_ID) {
++ dz -= hid_get_data(pBuf, &lcol->loc_z);
++ upd = 1;
++ }
++ if (lcol->loc_w.usage != 0 && rid == lcol->loc_w.report_ID) {
++ dw += hid_get_data(pBuf, &lcol->loc_w);
++ upd = 1;
++ }
++ if (lcol->loc_p.usage != 0 && rid == lcol->loc_p.report_ID && np == 0) {
++ v = hid_get_data(pBuf, &lcol->loc_p);
++ v = xf86ScaleAxis(v, acol->pmax, acol->pmin,
++ lcol->loc_p.logical_maximum, lcol->loc_p.logical_minimum);
++ if (acol->cpmin != acol->cpmax)
++ v = xf86ScaleAxis(v, acol->pmax, acol->pmin,
++ acol->cpmax, acol->cpmin);
++ dp += v;
++ np++;
++ }
++
++ for (n = 0; n < acol->nbuttons; n++) {
++ if (lcol->loc_btn[n].usage != 0 && rid == lcol->loc_btn[n].report_ID) {
++ if (hid_get_data(pBuf, &lcol->loc_btn[n]))
++ buttons |= (1 << UMS_BUT(n));
++ upd = 1;
++ }
++ }
++ }
++ if (acol->loc_cc.usage != 0 && rid == acol->loc_cc.report_ID)
++ cc = hid_get_data(pBuf, &acol->loc_cc);
++ else
++ cc = (nx || ny) ? 1 : 0;
++ if (cc > 1)
++ buttons = (1 << UMS_BUT(1));
++ if (nx != 0 && acol->xmin != acol->xmax)
++ dx /= nx;
++ if (ny != 0 && acol->ymin != acol->ymax)
++ dy /= ny;
++ if (np != 0 && acol->pmin != acol->pmax)
++ dp /= np;
++// if (upd || nx || ny || np)
++// xf86MsgVerb(X_INFO, 3, "%d cc %d dx %d dy %d dz %d dw %d press %d buttons %02x\n",
++// nacol, cc, dx, dy, dz, dw, dp, buttons);
++ if (nx != 0 || ny != 0) {
++ if (acol->pmin != acol->pmax) {
++ xf86PostMotionEvent(acol->pInfo->dev,
++ /* is_absolute: */ TRUE,
++ /* first_valuator: */ 0,
++ /* num_valuators: */ 3,
++ dx, dy, dp);
++ } else if (acol->xmin != acol->xmax || acol->ymin != acol->ymax) {
++ xf86PostMotionEvent(acol->pInfo->dev,
++ /* is_absolute: */ TRUE,
++ /* first_valuator: */ 0,
++ /* num_valuators: */ 2,
++ dx, dy);
++ }
++ }
++ if (upd || (nx != 0) || (ny != 0)) {
++ ((MouseDevPtr)acol->pInfo->private)->PostEvent(acol->pInfo, buttons,
++ ((acol->xmin != acol->xmax) ? dx - acol->px : dx),
++ ((acol->ymin != acol->ymax) ? dy - acol->py : dy),
++ dz, dw);
++ }
++ if (nx > 0)
++ acol->px = dx;
++ if (ny > 0)
++ acol->py = dy;
+ }
+- pMse->PostEvent(pInfo, buttons, dx, dy, dz, dw);
+- return;
++ goto next;
+ }
+
+ static void
+@@ -615,14 +906,17 @@
+ usbReadInput ((InputInfoPtr) closure);
+ }
+
+-/* This function is called when the protocol is "usb". */
+ static Bool
+-usbPreInit(InputInfoPtr pInfo, const char *protocol, int flags)
++usbInitFirst(InputInfoPtr pInfo)
+ {
+ MouseDevPtr pMse = pInfo->private;
+ UsbMsePtr pUsbMse;
+ report_desc_t reportDesc;
+- int i;
++ hid_data_t d;
++ hid_item_t h;
++ struct UsbMseAcol *acol;
++ struct UsbMseLcol *lcol;
++ int mdepth, rsize, *rsizep, acolused, lcolused, used;
+
+ pUsbMse = malloc(sizeof(UsbMseRec));
+ if (pUsbMse == NULL) {
+@@ -631,12 +925,7 @@
+ return FALSE;
+ }
+
+- pMse->protocol = protocol;
+- xf86Msg(X_CONFIG, "%s: Protocol: %s\n", pInfo->name, protocol);
+-
+- /* Collect the options, and process the common options. */
+- COLLECT_INPUT_OPTIONS(pInfo, NULL);
+- xf86ProcessCommonOptions(pInfo, pInfo->options);
++ bzero(pUsbMse, sizeof(UsbMseRec));
+
+ /* Check if the device can be opened. */
+ pInfo->fd = xf86OpenSerial(pInfo->options);
+@@ -652,19 +941,134 @@
+ }
+ /* Get USB informations */
+ reportDesc = hid_get_report_desc(pInfo->fd);
+- /* Get packet size & iid */
+-#ifdef USB_NEW_HID
+- if (ioctl(pInfo->fd, USB_GET_REPORT_ID, &pUsbMse->iid) == -1) {
+- xf86Msg(X_ERROR, "Error ioctl USB_GET_REPORT_ID on %s : %s\n",
+- pInfo->name, strerror(errno));
+- return FALSE;
+- }
+- pUsbMse->packetSize = hid_report_size(reportDesc, hid_input,
+- pUsbMse->iid);
+-#else
+- pUsbMse->packetSize = hid_report_size(reportDesc, hid_input,
+- &pUsbMse->iid);
+-#endif
++ mdepth = 0;
++ pUsbMse->nacols = 0;
++ acol = &pUsbMse->acols[pUsbMse->nacols];
++ lcol = &acol->lcols[acol->nlcols];
++ acolused = 0;
++ lcolused = 0;
++ d = hid_start_parse(reportDesc, (1 << hid_input) |
++ (1 << hid_collection) | (1 << hid_endcollection), -1);
++ while (hid_get_item(d, &h)) {
++ switch (h.kind) {
++ case hid_collection:
++ if (mdepth != 0)
++ mdepth++;
++ else if (h.collection == 1 &&
++ (h.usage == 0x00010001 || h.usage == 0x00010002 ||
++ (h.usage >= 0x000d0001 && h.usage <= 0x000d000d))) {
++ mdepth++;
++ if (acolused) {
++ if (lcolused) {
++ acol->nlcols++;
++ lcolused = 0;
++ }
++ pUsbMse->nacols++;
++ acolused = 0;
++ acol = &pUsbMse->acols[pUsbMse->nacols];
++ lcol = &acol->lcols[acol->nlcols];
++ }
++ }
++ if (lcolused && (h.collection == 0 ||
++ h.collection == 2 || h.collection == 3)) {
++ acol->nlcols++;
++ lcolused = 0;
++ lcol = &acol->lcols[acol->nlcols];
++ }
++ break;
++ case hid_endcollection:
++ if (mdepth != 0)
++ mdepth--;
++ break;
++ case hid_input:
++ if (h.report_ID != 0)
++ pUsbMse->iid = 1;
++ rsize = pUsbMse->iid +
++ (h.pos + (h.report_size * h.report_count) + 7) / 8;
++ if ((rsizep = usbGetReportSizePtr(pUsbMse, h.report_ID)) != NULL)
++ *rsizep = max(*rsizep, rsize);
++ pUsbMse->packetSize = max(pUsbMse->packetSize, rsize);
++ if (mdepth == 0)
++ break;
++ used = 1;
++ if (h.usage == 0x00010030) { /* X */
++ lcol->loc_x = h;
++ if ((h.flags & 0x04) == 0) {
++ if (acol->xmin == acol->xmax) {
++ acol->xmin = h.logical_minimum;
++ acol->xmax = h.logical_maximum;
++ } else {
++ acol->xmin = min(acol->xmin, h.logical_minimum);
++ acol->xmax = max(acol->xmax, h.logical_maximum);
++ }
++ }
++ } else if (h.usage == 0x00010031) { /* Y */
++ lcol->loc_y = h;
++ if ((h.flags & 0x04) == 0) {
++ if (acol->ymin == acol->ymax) {
++ acol->ymin = h.logical_minimum;
++ acol->ymax = h.logical_maximum;
++ } else {
++ acol->ymin = min(acol->ymin, h.logical_minimum);
++ acol->ymax = max(acol->ymax, h.logical_maximum);
++ }
++ }
++ } else if (h.usage == 0x00010038) { /* Z */
++ lcol->loc_z = h;
++ acol->hasZ = 1;
++ } else if (h.usage == 0x000c0238) { /* W */
++ lcol->loc_w = h;
++ acol->hasW = 1;
++ } else if (h.usage == 0x000d0030) { /* Press */
++ lcol->loc_p = h;
++ if ((h.flags & 0x04) == 0) {
++ if (acol->pmin == acol->pmax) {
++ acol->pmin = h.logical_minimum;
++ acol->pmax = h.logical_maximum;
++ } else {
++ acol->pmin = min(acol->pmin, h.logical_minimum);
++ acol->pmax = max(acol->pmax, h.logical_maximum);
++ }
++ }
++ } else if (h.usage == 0x000d0032) /* In Range */
++ lcol->loc_in_range = h;
++ else if (h.usage == 0x000d0047) /* Valid */
++ lcol->loc_valid = h;
++ else if (h.usage > 0x00090000 &&
++ h.usage <= 0x00090000 + MSE_MAXBUTTONS) { /* Buttons */
++ lcol->loc_btn[(h.usage & 0xffff) - 1] = h;
++ acol->nbuttons = max(acol->nbuttons, h.usage & 0xffff);
++ } else if (h.usage == 0x000d0042) { /* Tip Switch */
++ lcol->loc_btn[0] = h;
++ acol->nbuttons = max(acol->nbuttons, 1);
++ } else if (h.usage == 0x000d0044) { /* Barrel Switch */
++ lcol->loc_btn[1] = h;
++ acol->nbuttons = max(acol->nbuttons, 2);
++ } else if (h.usage == 0x000d0045) { /* Eraser */
++ lcol->loc_btn[3] = h;
++ acol->nbuttons = max(acol->nbuttons, 4);
++ } else if (h.usage == 0x000d0046) { /* Tablet Pick */
++ lcol->loc_btn[2] = h;
++ acol->nbuttons = max(acol->nbuttons, 3);
++ } else if (h.usage == 0x000d0054) /* Contact Count */
++ acol->loc_cc = h;
++ else
++ used = 0;
++ lcolused += used;
++ acolused += used;
++ break;
++ default:
++ break;
++ }
++ }
++ if (lcolused)
++ acol->nlcols++;
++ if (acolused)
++ pUsbMse->nacols++;
++ hid_end_parse(d);
++ xf86Msg(X_DEFAULT, "%s: Found %d usable logical collections\n",
++ pInfo->name, pUsbMse->nacols);
++
+ /* Allocate buffer */
+ if (pUsbMse->packetSize <= 8) {
+ pUsbMse->buffer = pMse->protoBuf;
+@@ -674,56 +1078,129 @@
+ if (pUsbMse->buffer == NULL) {
+ xf86Msg(X_ERROR, "%s: cannot allocate buffer\n", pInfo->name);
+ free(pUsbMse);
+- free(pMse);
+ xf86CloseSerial(pInfo->fd);
+ return FALSE;
+ }
+-#ifdef USB_NEW_HID
+- if (hid_locate(reportDesc, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_X),
+- hid_input, &pUsbMse->loc_x, pUsbMse->iid) < 0) {
+- xf86Msg(X_WARNING, "%s: no x locator\n", pInfo->name);
+- }
+- if (hid_locate(reportDesc, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_Y),
+- hid_input, &pUsbMse->loc_y, pUsbMse->iid) < 0) {
+- xf86Msg(X_WARNING, "%s: no y locator\n", pInfo->name);
+- }
+- if (hid_locate(reportDesc, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_WHEEL),
+- hid_input, &pUsbMse->loc_z, pUsbMse->iid) < 0) {
+- }
+-#else
+- if (hid_locate(reportDesc, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_X),
+- hid_input, &pUsbMse->loc_x) < 0) {
+- xf86Msg(X_WARNING, "%s: no x locator\n", pInfo->name);
+- }
+- if (hid_locate(reportDesc, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_Y),
+- hid_input, &pUsbMse->loc_y) < 0) {
+- xf86Msg(X_WARNING, "%s: no y locator\n", pInfo->name);
+- }
+- if (hid_locate(reportDesc, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_WHEEL),
+- hid_input, &pUsbMse->loc_z) < 0) {
+- }
+-#endif
+- /* Probe for number of buttons */
+- for (i = 1; i <= MSE_MAXBUTTONS; i++) {
+- if (!hid_locate(reportDesc, HID_USAGE2(HUP_BUTTON, i),
+- hid_input, &pUsbMse->loc_btn[i-1]
+-#ifdef USB_NEW_HID
+- , pUsbMse->iid
+-#endif
+- ))
+- break;
+- }
+- pMse->buttons = i-1;
+
+ xf86CloseSerial(pInfo->fd);
+ pInfo->fd = -1;
+
+ /* Private structure */
+ pMse->mousePriv = pUsbMse;
++ return TRUE;
++}
++
++/* This function is called when the protocol is "usb". */
++static Bool
++usbPreInit(InputInfoPtr pInfo, const char *protocol, int flags)
++{
++ InputInfoPtr pMatch;
++ MouseDevPtr pMse = pInfo->private;
++ UsbMsePtr pUsbMse;
++ struct UsbMseAcol *acol;
++ char *str;
++ int i, colopt;
++
++ pMse->protocol = protocol;
++ xf86Msg(X_CONFIG, "%s: Protocol: %s\n", pInfo->name, protocol);
++
++ /* Collect the options, and process the common options. */
++ COLLECT_INPUT_OPTIONS(pInfo, NULL);
++ xf86ProcessCommonOptions(pInfo, pInfo->options);
++
++ /* Check if this HID device is already opened. */
++ for (pMatch = xf86FirstLocalDevice(); pMatch != NULL; pMatch = pMatch->next) {
++ if ((pInfo != pMatch) && strstr(pMatch->drv->driverName, "mouse")) {
++ char *dev1, *dev2;
++
++ dev1 = xf86SetStrOption(pInfo->options, "Device", NULL);
++ dev2 = xf86SetStrOption(pMatch->options, "Device", NULL);
++ if (strcmp(dev1, dev2) == 0) {
++ free(dev1);
++ free(dev2);
++ break;
++ }
++ free(dev1);
++ free(dev2);
++ }
++ }
++ if (pMatch == NULL) {
++ xf86Msg(X_DEFAULT, "%s: Opening new HID device\n", pInfo->name);
++ if (!usbInitFirst(pInfo)) {
++ free(pMse);
++ return FALSE;
++ }
++ } else {
++ pMse->mousePriv = ((MouseDevPtr)pMatch->private)->mousePriv;
++ xf86Msg(X_DEFAULT, "%s: Attaching to already opened HID device\n",
++ pInfo->name);
++ }
++ pUsbMse = pMse->mousePriv;
++
++ /* Attach to collection, respecting "Collection" option. */
++ colopt = xf86SetIntOption(pInfo->options, "Collection", 0);
++ for (i = 0; i < pUsbMse->nacols; i++) {
++ if (pUsbMse->acols[i].pInfo == NULL &&
++ (colopt == 0 || i == colopt - 1)) {
++ pUsbMse->acols[i].pInfo = pInfo;
++ break;
++ }
++ }
++ xf86Msg(colopt == 0 ? X_DEFAULT : X_CONFIG,
++ "%s: Collection: %d\n", pInfo->name,
++ i == pUsbMse->nacols ? colopt : i + 1);
++ if (i == pUsbMse->nacols) {
++ xf86Msg(X_ERROR,
++ "%s: Application collection not found or already handled\n",
++ pInfo->name);
++ free(pMse);
++ return FALSE;
++ }
++
++ acol = &pUsbMse->acols[i];
++ pMse->buttons = acol->nbuttons;
++ if (pMse->buttons == 2)
++ pMse->buttons = 3;
++ if (acol->xmin != acol->xmax || acol->ymin != acol->ymax)
++ pMse->disableXY = TRUE;
++ pMse->hasZ = acol->hasZ;
++ pMse->hasW = acol->hasW;
+
+ /* Process common mouse options (like Emulate3Buttons, etc). */
+ pMse->CommonOptions(pInfo);
+
++ /* Process "Calibration" option. */
++ str = xf86CheckStrOption(pInfo->options, "Calibration", NULL);
++ if (str != NULL && (acol->xmin != acol->xmax || acol->ymin != acol->ymax)) {
++ int j, xmin, xmax, ymin, ymax, pmin, pmax;
++
++ j = sscanf(str, "%d %d %d %d %d %d", &xmin, &xmax, &ymin, &ymax, &pmin, &pmax);
++ if (j == 4) {
++ xf86Msg(X_CONFIG, "%s: Calibration: %d %d %d %d\n",
++ pInfo->name, xmin, xmax, ymin, ymax);
++ acol->cxmin = xmin;
++ acol->cxmax = xmax;
++ acol->cymin = ymin;
++ acol->cymax = ymax;
++ } else if (j == 6) {
++ xf86Msg(X_CONFIG, "%s: Calibration: %d %d %d %d %d %d\n",
++ pInfo->name, xmin, xmax, ymin, ymax, pmin, pmax);
++ acol->cxmin = xmin;
++ acol->cxmax = xmax;
++ acol->cymin = ymin;
++ acol->cymax = ymax;
++ acol->cpmin = pmin;
++ acol->cpmax = pmax;
++ } else
++ xf86Msg(X_WARNING, "%s: Calibration: Invalid arguments\n",
++ pInfo->name);
++ free(str);
++ } else if (acol->xmin != acol->xmax || acol->ymin != acol->ymax) {
++ xf86Msg(X_DEFAULT, "%s: Calibration: %d %d %d %d %d %d\n",
++ pInfo->name, acol->xmin, acol->xmax, acol->ymin, acol->ymax,
++ acol->pmin, acol->pmax);
++ }
++
+ /* Setup the local procs. */
+ pInfo->device_control = usbMouseProc;
+ pInfo->read_input = usbReadInput;
+@@ -766,7 +1243,9 @@
p->CheckProtocol = CheckProtocol;
#if (defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)) && defined(MOUSE_PROTO_SYSMOUSE)
p->SetupAuto = SetupAuto;
diff --git a/x11-drivers/xf86-input-mouse/files/patch-src_mouse.c b/x11-drivers/xf86-input-mouse/files/patch-src_mouse.c
index 2d363d50c7b2..27118de48943 100644
--- a/x11-drivers/xf86-input-mouse/files/patch-src_mouse.c
+++ b/x11-drivers/xf86-input-mouse/files/patch-src_mouse.c
@@ -1,5 +1,5 @@
---- src/mouse.c.orig 2012-07-27 08:10:56.000000000 +0200
-+++ src/mouse.c 2012-07-30 00:31:48.000000000 +0200
+--- src/mouse.c.orig 2012-10-08 03:40:07.000000000 +0200
++++ src/mouse.c 2013-07-03 01:04:45.398343993 +0200
@@ -280,13 +280,39 @@
pMse = pInfo->private;
@@ -135,7 +135,7 @@
protocol = MousePickProtocol(pInfo, device, protocol, &protocolID);
-@@ -2137,7 +2148,7 @@
+@@ -2136,7 +2147,7 @@
if (pMse->emulateWheel) {
/* Emulate wheel button handling */
@@ -144,7 +144,7 @@
wheelButtonMask = 0;
else
wheelButtonMask = 1 << (pMse->wheelButton - 1);
-@@ -2221,6 +2232,9 @@
+@@ -2220,6 +2231,9 @@
}
}
}
@@ -154,7 +154,7 @@
}
/* Absorb the mouse movement while the wheel button is pressed. */
-@@ -2238,7 +2252,7 @@
+@@ -2237,7 +2251,7 @@
if (pMse->emulate3ButtonsSoft && pMse->emulate3Pending && (dx || dy))
buttonTimer(pInfo);
@@ -163,7 +163,20 @@
xf86PostMotionEvent(pInfo->dev, 0, 0, 2, dx, dy);
if (change) {
-@@ -2448,11 +2462,11 @@
+@@ -2349,12 +2363,10 @@
+ int dx, int dy, int dz, int dw)
+ {
+ MouseDevPtr pMse;
+- mousePrivPtr mousepriv;
+ int zbutton = 0, wbutton = 0, zbuttoncount = 0, wbuttoncount = 0;
+ int i, b, buttons = 0;
+
+ pMse = pInfo->private;
+- mousepriv = (mousePrivPtr)pMse->mousePriv;
+
+ if (pMse->protocolID == PROT_MMHIT)
+ b = reverseBits(hitachMap, truebuttons);
+@@ -2447,11 +2459,11 @@
/* Accumulate the scaled dx, dy in the private variables
fracdx,fracdy and return the integer number part */
diff --git a/x11-drivers/xf86-input-synaptics/Makefile b/x11-drivers/xf86-input-synaptics/Makefile
index 882e44bb8b80..9434c1eee5e2 100644
--- a/x11-drivers/xf86-input-synaptics/Makefile
+++ b/x11-drivers/xf86-input-synaptics/Makefile
@@ -17,7 +17,7 @@ NO_STAGE= yes
.include <bsd.port.options.mk>
USES= pathfix
-USE_XORG= x11
+USE_XORG= x11 xtst
XORG_CAT= driver
.if ${PORT_OPTIONS:MHAL}
diff --git a/x11-drivers/xf86-video-ati/Makefile b/x11-drivers/xf86-video-ati/Makefile
index 8c2c583bb91d..d5e31957aa1a 100644
--- a/x11-drivers/xf86-video-ati/Makefile
+++ b/x11-drivers/xf86-video-ati/Makefile
@@ -1,7 +1,7 @@
# $FreeBSD$
PORTNAME= xf86-video-ati
-PORTVERSION= 6.14.6
+PORTVERSION= ${ATI_VERSION}
CATEGORIES= x11-drivers
MAINTAINER= x11@FreeBSD.org
@@ -12,7 +12,18 @@ XORG_CAT= driver
USE_XORG= xf86driproto xineramaproto xf86miscproto glproto
MAN4= ati.4x radeon.4x
+NO_STAGE= yes
+.include <bsd.port.pre.mk>
+
+.if ${OSVERSION} < 1000051
+ATI_VERSION= 6.14.6
CONFIGURE_ARGS+=--disable-kms
+PLIST_SUB+= OLD=""
+.else
+ATI_VERSION= 7.2.0
+CONFIGURE_ARGS+=--disable-udev
+EXTRA_PATCHES+= ${FILESDIR}/extra-src__radeon_kms.c
+PLIST_SUB+= OLD="@comment "
+.endif
-NO_STAGE= yes
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/x11-drivers/xf86-video-ati/distinfo b/x11-drivers/xf86-video-ati/distinfo
index baa6ed57a8e1..08cd56201512 100644
--- a/x11-drivers/xf86-video-ati/distinfo
+++ b/x11-drivers/xf86-video-ati/distinfo
@@ -1,2 +1,4 @@
SHA256 (xorg/driver/xf86-video-ati-6.14.6.tar.bz2) = aa5286b3e4f0187d7df14785c06dd800255d9405205dbf061da5d77df86bec36
SIZE (xorg/driver/xf86-video-ati-6.14.6.tar.bz2) = 1139495
+SHA256 (xorg/driver/xf86-video-ati-7.2.0.tar.bz2) = f30f5efdc8d7d18d06eda7ef2f91a8b7290f1cfbf6ff26362cd47ab8969daec4
+SIZE (xorg/driver/xf86-video-ati-7.2.0.tar.bz2) = 824613
diff --git a/x11-drivers/xf86-video-ati/files/extra-src__radeon_kms.c b/x11-drivers/xf86-video-ati/files/extra-src__radeon_kms.c
new file mode 100644
index 000000000000..c8ed5680a9ef
--- /dev/null
+++ b/x11-drivers/xf86-video-ati/files/extra-src__radeon_kms.c
@@ -0,0 +1,20 @@
+--- src/radeon_kms.c.orig 2013-08-07 10:44:09.000000000 +0200
++++ src/radeon_kms.c 2013-08-31 01:20:44.370468797 +0200
+@@ -270,7 +270,7 @@
+ radeon_dirty_update(ScreenPtr screen)
+ {
+ RegionPtr region;
+- PixmapDirtyUpdatePtr ent;
++ PixmapDirtyUpdatePtr ent = NULL;
+
+ if (xorg_list_is_empty(&screen->pixmap_dirty_list))
+ return;
+@@ -606,7 +606,7 @@
+ dev->domain, dev->bus, dev->dev, dev->func);
+ #endif
+
+- info->dri2.drm_fd = drmOpen("radeon", busid);
++ info->dri2.drm_fd = drmOpen("radeonkms", busid);
+ if (info->dri2.drm_fd == -1) {
+
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
diff --git a/x11-drivers/xf86-video-ati/files/patch-src__radeon_dri2.c b/x11-drivers/xf86-video-ati/files/patch-src__radeon_dri2.c
new file mode 100644
index 000000000000..3de34a1b60ae
--- /dev/null
+++ b/x11-drivers/xf86-video-ati/files/patch-src__radeon_dri2.c
@@ -0,0 +1,11 @@
+--- src/radeon_dri2.c.orig 2013-02-22 19:31:34.000000000 +0000
++++ src/radeon_dri2.c 2013-02-22 19:31:47.000000000 +0000
+@@ -578,7 +578,7 @@
+ radeon_dri2_client_state_changed(CallbackListPtr *ClientStateCallback, pointer data, pointer calldata)
+ {
+ DRI2ClientEventsPtr pClientEventsPriv;
+- DRI2FrameEventPtr ref;
++ DRI2FrameEventPtr ref = NULL;
+ NewClientInfoRec *clientinfo = calldata;
+ ClientPtr pClient = clientinfo->client;
+ pClientEventsPriv = GetDRI2ClientEvents(pClient);
diff --git a/x11-drivers/xf86-video-ati/pkg-plist b/x11-drivers/xf86-video-ati/pkg-plist
index 52b142182bbd..1c0799ff6e61 100644
--- a/x11-drivers/xf86-video-ati/pkg-plist
+++ b/x11-drivers/xf86-video-ati/pkg-plist
@@ -2,13 +2,13 @@ lib/xorg/modules/drivers/ati_drv.la
lib/xorg/modules/drivers/ati_drv.so
lib/xorg/modules/drivers/radeon_drv.la
lib/xorg/modules/drivers/radeon_drv.so
-lib/xorg/modules/multimedia/theatre200_drv.la
-lib/xorg/modules/multimedia/theatre200_drv.so
-lib/xorg/modules/multimedia/theatre_detect_drv.la
-lib/xorg/modules/multimedia/theatre_detect_drv.so
-lib/xorg/modules/multimedia/theatre_drv.la
-lib/xorg/modules/multimedia/theatre_drv.so
+%%OLD%%lib/xorg/modules/multimedia/theatre200_drv.la
+%%OLD%%lib/xorg/modules/multimedia/theatre200_drv.so
+%%OLD%%lib/xorg/modules/multimedia/theatre_detect_drv.la
+%%OLD%%lib/xorg/modules/multimedia/theatre_detect_drv.so
+%%OLD%%lib/xorg/modules/multimedia/theatre_drv.la
+%%OLD%%lib/xorg/modules/multimedia/theatre_drv.so
@dirrmtry lib/xorg/modules/drivers
-@dirrmtry lib/xorg/modules/multimedia
+%%OLD%%@dirrmtry lib/xorg/modules/multimedia
@dirrmtry lib/xorg/modules
@dirrmtry lib/xorg
diff --git a/x11-drivers/xf86-video-fbdev/Makefile b/x11-drivers/xf86-video-fbdev/Makefile
index fee856eee920..3cc799f694ae 100644
--- a/x11-drivers/xf86-video-fbdev/Makefile
+++ b/x11-drivers/xf86-video-fbdev/Makefile
@@ -1,7 +1,7 @@
# $FreeBSD$
PORTNAME= xf86-video-fbdev
-PORTVERSION= 0.4.3
+PORTVERSION= 0.4.4
PORTREVISION= 1
CATEGORIES= x11-drivers
diff --git a/x11-drivers/xf86-video-fbdev/distinfo b/x11-drivers/xf86-video-fbdev/distinfo
index 603c5cede855..cfb76539df1f 100644
--- a/x11-drivers/xf86-video-fbdev/distinfo
+++ b/x11-drivers/xf86-video-fbdev/distinfo
@@ -1,2 +1,2 @@
-SHA256 (xorg/driver/xf86-video-fbdev-0.4.3.tar.bz2) = ff7b037ad110040a4e2db5c84e9741125dbbaf3a08107db47760f3e11f9c4831
-SIZE (xorg/driver/xf86-video-fbdev-0.4.3.tar.bz2) = 289056
+SHA256 (xorg/driver/xf86-video-fbdev-0.4.4.tar.bz2) = 9dd4b326498223abbfdf786089a46ea3db4fa6bbd341308eb48a9e00bc3fd51b
+SIZE (xorg/driver/xf86-video-fbdev-0.4.4.tar.bz2) = 293545
diff --git a/x11-drivers/xf86-video-intel/Makefile b/x11-drivers/xf86-video-intel/Makefile
index e3675aa1d708..f34c93f32e26 100644
--- a/x11-drivers/xf86-video-intel/Makefile
+++ b/x11-drivers/xf86-video-intel/Makefile
@@ -29,20 +29,20 @@ NO_STAGE= yes
.include <bsd.port.options.mk>
.if defined(WITH_NEW_XORG)
-INTEL_VERSION= 2.21.9
+INTEL_VERSION= 2.21.15
INTEL_REVISION= 0
+CONFIGURE_ENV+= xorg_cv_cc_flag__Wno_maybe_uninitialized=no
CONFIGURE_ARGS+= --enable-sna
MAKE_JOBS_UNSAFE=yes
PLIST_SUB+= OLD="@comment "
-EXTRA_PATCHES+= ${PATCHDIR}/extra-clang \
- ${PATCHDIR}/extra-src_sna_compiler.h \
+EXTRA_PATCHES+= ${PATCHDIR}/extra-src__sna__sna_threads.c \
${PATCHDIR}/extra-src_sna_kgem.c \
- ${PATCHDIR}/extra-src__sna__sna_threads.c \
+ ${PATCHDIR}/extra-clang \
${PATCHDIR}/extra-i915kms
LIB_DEPENDS+= xcb-util:${PORTSDIR}/x11/xcb-util
.else
INTEL_VERSION= 2.7.1
-INTEL_REVISION= 4
+INTEL_REVISION= 5
PLIST_SUB+= OLD=""
EXTRA_PATCHES+= ${PATCHDIR}/extra-src_ch7017_ch7017.c \
diff --git a/x11-drivers/xf86-video-intel/distinfo b/x11-drivers/xf86-video-intel/distinfo
index 79dca8e997e0..e1360d7a8ea0 100644
--- a/x11-drivers/xf86-video-intel/distinfo
+++ b/x11-drivers/xf86-video-intel/distinfo
@@ -1,4 +1,4 @@
SHA256 (xorg/driver/xf86-video-intel-2.7.1.tar.bz2) = 255c0d54249cc0132f743254a43c21fac695fab2139c8ed96a07cf3c628e5f42
SIZE (xorg/driver/xf86-video-intel-2.7.1.tar.bz2) = 780625
-SHA256 (xorg/driver/xf86-video-intel-2.21.9.tar.bz2) = 1359cbc9e494a284faa52d1db83e7388cb8ab590b660e29e78e6e7f5ee7ff189
-SIZE (xorg/driver/xf86-video-intel-2.21.9.tar.bz2) = 1735037
+SHA256 (xorg/driver/xf86-video-intel-2.21.15.tar.bz2) = 7d5a140f82a72fd1cbc8a664d66c3d4eca47ee240ca4927b8a98d7af6f65d6fc
+SIZE (xorg/driver/xf86-video-intel-2.21.15.tar.bz2) = 1977431
diff --git a/x11-drivers/xf86-video-intel/files/extra-clang b/x11-drivers/xf86-video-intel/files/extra-clang
index bb499458d41e..924f27d48cef 100644
--- a/x11-drivers/xf86-video-intel/files/extra-clang
+++ b/x11-drivers/xf86-video-intel/files/extra-clang
@@ -1,27 +1,15 @@
---- src/intel_display.c.orig 2012-12-11 20:33:06.000000000 +0100
-+++ src/intel_display.c 2012-12-11 20:33:45.000000000 +0100
-@@ -1691,7 +1691,7 @@
- static drmModeEncoderPtr
- intel_get_kencoder(struct intel_mode *mode, int num)
+--- src/sna/sna_cpu.c.orig 2013-08-14 12:04:40.231041285 +0200
++++ src/sna/sna_cpu.c 2013-08-14 12:05:51.237030719 +0200
+@@ -41,6 +41,7 @@
{
-- struct intel_output *iterator;
-+ struct intel_output *iterator = NULL;
- int id = mode->mode_res->encoders[num];
+ unsigned max = __get_cpuid_max(BASIC_CPUID, NULL);
+ unsigned int eax, ebx, ecx, edx;
++ eax = ebx = ecx = edx = 0;
+ unsigned features = 0;
+ unsigned extra = 0;
- list_for_each_entry(iterator, &mode->outputs, link)
---- src/intel_batchbuffer.c.orig 2012-12-11 20:34:55.000000000 +0100
-+++ src/intel_batchbuffer.c 2012-12-11 20:35:19.000000000 +0100
-@@ -119,7 +119,7 @@
- static void intel_batch_do_flush(ScrnInfoPtr scrn)
- {
- intel_screen_private *intel = intel_get_screen_private(scrn);
-- struct intel_pixmap *priv;
-+ struct intel_pixmap *priv = NULL;
-
- list_for_each_entry(priv, &intel->batch_pixmaps, batch)
- priv->dirty = 0;
---- src/sna/sna_damage.c.orig 2012-12-11 20:41:38.000000000 +0100
-+++ src/sna/sna_damage.c 2012-12-11 20:42:23.000000000 +0100
+--- src/sna/sna_damage.c.orig 2013-08-14 12:06:26.381036854 +0200
++++ src/sna/sna_damage.c 2013-08-14 12:07:23.684023065 +0200
@@ -410,7 +410,7 @@
int n, nboxes;
BoxPtr boxes, free_boxes = NULL;
@@ -31,7 +19,7 @@
assert(damage->mode != DAMAGE_ALL);
assert(damage->dirty);
-@@ -1671,7 +1671,7 @@
+@@ -1709,7 +1709,7 @@
{
int n, nboxes;
BoxPtr boxes;
@@ -40,8 +28,30 @@
RegionCopy(r, &damage->region);
if (!damage->dirty)
---- uxa/uxa-accel.c.orig 2012-12-11 20:50:56.000000000 +0100
-+++ uxa/uxa-accel.c 2012-12-11 20:51:14.000000000 +0100
+--- src/uxa/intel_batchbuffer.c.orig 2013-08-14 12:08:14.323028320 +0200
++++ src/uxa/intel_batchbuffer.c 2013-08-14 12:08:37.202016923 +0200
+@@ -141,7 +141,7 @@
+ static void intel_batch_do_flush(ScrnInfoPtr scrn)
+ {
+ intel_screen_private *intel = intel_get_screen_private(scrn);
+- struct intel_pixmap *priv;
++ struct intel_pixmap *priv = NULL;
+
+ list_for_each_entry(priv, &intel->batch_pixmaps, batch)
+ priv->dirty = 0;
+--- src/uxa/intel_display.c.orig 2013-08-14 12:09:25.802015629 +0200
++++ src/uxa/intel_display.c 2013-08-14 12:09:51.034009844 +0200
+@@ -1753,7 +1753,7 @@
+ static drmModeEncoderPtr
+ intel_get_kencoder(struct intel_mode *mode, int num)
+ {
+- struct intel_output *iterator;
++ struct intel_output *iterator = NULL;
+ int id = mode->mode_res->encoders[num];
+
+ list_for_each_entry(iterator, &mode->outputs, link)
+--- src/uxa/uxa-accel.c.orig 2013-08-14 12:02:11.898048975 +0200
++++ src/uxa/uxa-accel.c 2013-08-14 12:03:39.336042139 +0200
@@ -944,7 +944,7 @@
if (uxa_screen->info->flags & UXA_USE_GLAMOR) {
diff --git a/x11-drivers/xf86-video-intel/files/extra-i915kms b/x11-drivers/xf86-video-intel/files/extra-i915kms
index c900909f7747..b5d43c6deecd 100644
--- a/x11-drivers/xf86-video-intel/files/extra-i915kms
+++ b/x11-drivers/xf86-video-intel/files/extra-i915kms
@@ -1,13 +1,13 @@
---- src/intel_module.c.orig 2012-09-27 23:31:20.000000000 +0300
-+++ src/intel_module.c 2012-11-02 17:32:00.819723398 +0200
-@@ -393,8 +393,8 @@
- dev->domain, dev->bus, dev->dev, dev->func);
+--- src/intel_device.c.orig 2013-06-30 16:03:51.000000000 +0200
++++ src/intel_device.c 2013-07-02 14:08:34.903060688 +0200
+@@ -94,8 +94,8 @@
+ pci->domain, pci->bus, pci->dev, pci->func);
- ret = drmCheckModesettingSupported(id);
-- if (ret) {
-- if (xf86LoadKernelModule("i915"))
-+ if (ret || 1) {
-+ if (xf86LoadKernelModule("i915kms"))
- ret = drmCheckModesettingSupported(id);
- if (ret)
- return FALSE;
+ ret = drmCheckModesettingSupported(id);
+- if (ret) {
+- if (xf86LoadKernelModule("i915"))
++ if (ret || 1) {
++ if (xf86LoadKernelModule("i915kms"))
+ ret = drmCheckModesettingSupported(id);
+ if (ret)
+ return -1;
diff --git a/x11-drivers/xf86-video-intel/files/extra-src_sna_compiler.h b/x11-drivers/xf86-video-intel/files/extra-src_sna_compiler.h
deleted file mode 100644
index 47131740bc6c..000000000000
--- a/x11-drivers/xf86-video-intel/files/extra-src_sna_compiler.h
+++ /dev/null
@@ -1,18 +0,0 @@
---- src/sna/compiler.h.orig 2013-03-12 12:48:29.745101779 +0100
-+++ src/sna/compiler.h 2013-03-12 12:48:52.857102997 +0100
-@@ -37,7 +37,6 @@
- #define must_check __attribute__((warn_unused_result))
- #define constant __attribute__((const))
- #define pure __attribute__((pure))
--#define __packed__ __attribute__((__packed__))
- #define flatten __attribute__((flatten))
- #else
- #define likely(expr) (expr)
-@@ -48,7 +47,6 @@
- #define must_check
- #define constant
- #define pure
--#define __packed__
- #define flatten
- #endif
-
diff --git a/x11-drivers/xf86-video-intel/files/extra-src_sna_kgem.c b/x11-drivers/xf86-video-intel/files/extra-src_sna_kgem.c
index 9771d08562b3..39f3729e83be 100644
--- a/x11-drivers/xf86-video-intel/files/extra-src_sna_kgem.c
+++ b/x11-drivers/xf86-video-intel/files/extra-src_sna_kgem.c
@@ -1,18 +1,14 @@
---- src/sna/kgem.c.orig 2013-03-11 11:19:02.000000000 +0100
-+++ src/sna/kgem.c 2013-03-12 12:56:49.452065668 +0100
-@@ -658,7 +658,11 @@
- if (file) {
- size_t len = 0;
- char *line = NULL;
-+#ifdef __GLIBC__
- while (getline(&line, &len, file) != -1) {
-+#else
-+ while ((line = fgetln(file, &len)) != (char *) NULL) {
-+#endif
- int mb;
- if (sscanf(line, "cache size : %d KB", &mb) == 1) {
- /* Paranoid check against gargantuan caches */
-@@ -1666,7 +1670,8 @@
+--- src/sna/kgem.c.orig 2013-08-04 11:10:59.000000000 +0200
++++ src/sna/kgem.c 2013-08-14 11:59:14.787060294 +0200
+@@ -25,6 +25,7 @@
+ *
+ */
+
++#define _WITH_GETLINE
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+ #endif
+@@ -1890,7 +1891,8 @@
static struct kgem_bo *
search_snoop_cache(struct kgem *kgem, unsigned int num_pages, unsigned flags)
{
@@ -22,7 +18,7 @@
DBG(("%s: num_pages=%d, flags=%x\n", __FUNCTION__, num_pages, flags));
-@@ -1868,7 +1873,8 @@
+@@ -2104,7 +2106,8 @@
static bool kgem_retire__flushing(struct kgem *kgem)
{
@@ -32,7 +28,7 @@
bool retired = false;
list_for_each_entry_safe(bo, next, &kgem->flushing, request) {
-@@ -2073,7 +2079,8 @@
+@@ -2309,7 +2312,8 @@
static void kgem_commit(struct kgem *kgem)
{
struct kgem_request *rq = kgem->next_request;
@@ -42,7 +38,7 @@
list_for_each_entry_safe(bo, next, &rq->buffers, request) {
assert(next->request.prev == &bo->request);
-@@ -2154,7 +2161,8 @@
+@@ -2390,7 +2394,8 @@
static void kgem_finish_buffers(struct kgem *kgem)
{
@@ -51,8 +47,8 @@
+ struct kgem_buffer *next;
list_for_each_entry_safe(bo, next, &kgem->batch_buffers, base.list) {
- DBG(("%s: buffer handle=%d, used=%d, exec?=%d, write=%d, mmapped=%d\n",
-@@ -2963,7 +2971,8 @@
+ DBG(("%s: buffer handle=%d, used=%d, exec?=%d, write=%d, mmapped=%s\n",
+@@ -3252,7 +3257,8 @@
static struct kgem_bo *
search_linear_cache(struct kgem *kgem, unsigned int num_pages, unsigned flags)
{
@@ -62,7 +58,7 @@
bool use_active = (flags & CREATE_INACTIVE) == 0;
struct list *cache;
-@@ -3521,7 +3530,7 @@
+@@ -3855,7 +3861,7 @@
uint32_t flags)
{
struct list *cache;
@@ -71,7 +67,7 @@
uint32_t pitch, tiled_height, size;
uint32_t handle;
int i, bucket, retry;
-@@ -4834,7 +4843,7 @@
+@@ -5302,7 +5308,7 @@
void kgem_clear_dirty(struct kgem *kgem)
{
struct list * const buffers = &kgem->next_request->buffers;
@@ -79,8 +75,8 @@
+ struct kgem_bo *bo = NULL;
list_for_each_entry(bo, buffers, request) {
- if (!bo->dirty)
-@@ -5072,7 +5081,7 @@
+ if (!bo->gpu_dirty)
+@@ -5578,7 +5584,7 @@
uint32_t size, uint32_t flags,
void **ret)
{
diff --git a/x11-drivers/xf86-video-vesa/Makefile b/x11-drivers/xf86-video-vesa/Makefile
index 97ef2045de98..3b80a5c8e154 100644
--- a/x11-drivers/xf86-video-vesa/Makefile
+++ b/x11-drivers/xf86-video-vesa/Makefile
@@ -1,7 +1,7 @@
# $FreeBSD$
PORTNAME= xf86-video-vesa
-PORTVERSION= 2.3.2
+PORTVERSION= 2.3.3
CATEGORIES= x11-drivers
MAINTAINER= x11@FreeBSD.org
diff --git a/x11-drivers/xf86-video-vesa/distinfo b/x11-drivers/xf86-video-vesa/distinfo
index f9dbf13a418e..f973eae2fb52 100644
--- a/x11-drivers/xf86-video-vesa/distinfo
+++ b/x11-drivers/xf86-video-vesa/distinfo
@@ -1,2 +1,2 @@
-SHA256 (xorg/driver/xf86-video-vesa-2.3.2.tar.bz2) = 144a17ffae3c86603ddc4ae33521a52813498ee1f8213faa662dc4a8d6490ee3
-SIZE (xorg/driver/xf86-video-vesa-2.3.2.tar.bz2) = 298186
+SHA256 (xorg/driver/xf86-video-vesa-2.3.3.tar.bz2) = ce8b75e5a40e9dae76f2ac9e2880f7f73a848653ca2eed5880f52dc2c0d3aef8
+SIZE (xorg/driver/xf86-video-vesa-2.3.3.tar.bz2) = 300571
diff --git a/x11-drivers/xorg-drivers/Makefile b/x11-drivers/xorg-drivers/Makefile
index 4f7071eb029d..a8f0921183f4 100644
--- a/x11-drivers/xorg-drivers/Makefile
+++ b/x11-drivers/xorg-drivers/Makefile
@@ -10,7 +10,7 @@ EXTRACT_ONLY= # none
MAINTAINER= x11@FreeBSD.org
COMMENT= X.org drivers meta-port
-.MAKE.FreeBSD_UL= yes
+.MAKE.FreeBSD_UL= yes
VIDEODIR= ${PREFIX}/lib/xorg/modules/drivers
INPUTDIR= ${PREFIX}/lib/xorg/modules/input
diff --git a/x11-fonts/xfs/Makefile b/x11-fonts/xfs/Makefile
index 7811945ffe2a..be18e10df1bb 100644
--- a/x11-fonts/xfs/Makefile
+++ b/x11-fonts/xfs/Makefile
@@ -9,7 +9,7 @@ MAINTAINER= x11@FreeBSD.org
COMMENT= X.Org font server
XORG_CAT= app
-USE_GMAKE= yes
+USES= gmake
USE_XORG= libfs xfont xtrans
USE_RC_SUBR= xfs
CONFIGURE_ARGS= --without-xmlto --without-fop
diff --git a/x11-servers/xephyr/Makefile b/x11-servers/xephyr/Makefile
index de0b7b45c9ba..bab652ef2770 100644
--- a/x11-servers/xephyr/Makefile
+++ b/x11-servers/xephyr/Makefile
@@ -1,7 +1,6 @@
# $FreeBSD$
PORTNAME= xephyr
-PORTREVISION= 0
COMMENT= X server from X.Org based on kdrive
diff --git a/x11-servers/xorg-dmx/Makefile b/x11-servers/xorg-dmx/Makefile
index cdad49e0a13a..1dcd91636225 100644
--- a/x11-servers/xorg-dmx/Makefile
+++ b/x11-servers/xorg-dmx/Makefile
@@ -2,7 +2,6 @@
# $FreeBSD$
PORTNAME= xorg-dmx
-PORTREVISION= 0
COMMENT= Distributed Multihead X from X.Org
diff --git a/x11-servers/xorg-nestserver/Makefile b/x11-servers/xorg-nestserver/Makefile
index aca8c1e6c18f..e8a48159264a 100644
--- a/x11-servers/xorg-nestserver/Makefile
+++ b/x11-servers/xorg-nestserver/Makefile
@@ -24,6 +24,8 @@ PLIST_FILES= bin/Xnest
MAN1= Xnest.1
NO_STAGE= yes
+.include <bsd.port.options.mk>
+
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/hw/xnest/Xnest ${PREFIX}/bin/
.if defined(WITH_NEW_XORG)
diff --git a/x11-servers/xorg-server/Makefile b/x11-servers/xorg-server/Makefile
index 72e4f0ac0960..5415d038c177 100644
--- a/x11-servers/xorg-server/Makefile
+++ b/x11-servers/xorg-server/Makefile
@@ -20,14 +20,28 @@ RUN_DEPENDS= xkeyboard-config>=2.5:${PORTSDIR}/x11/xkeyboard-config \
XORG_CAT= xserver
SLAVE_PORT?= no
+OPTIONS_DEFINE= AIGLX SUID
+OPTIONS_RADIO= CONF
+OPTIONS_RADIO_CONF= HAL DEVD
+AIGLX_DESC= Compile with Accelerated Indirect GLX support
+SUID_DESC= Install the Xorg server with setuid bit set
+HAL_DESC= Compile with HAL config support
+DEVD_DESC= Use devd for autoconfiguration of input devices (experimental)
+OPTIONS_DEFAULT=AIGLX SUID HAL
+
+OPTIONS_EXCLUDE_sparc64= HAL
+
+.include <bsd.port.options.mk>
+
.if defined(WITH_NEW_XORG)
XORG_VERSION= 1.12.4
-XORG_REVISION= 1
+XORG_REVISION= 2
PLIST_SUB+= OLD="@comment " NEW=""
-EXTRA_PATCHES+= ${FILESDIR}/extra-clang
+EXTRA_PATCHES+= ${FILESDIR}/extra-clang \
+ ${FILESDIR}/extra-configure
.else
XORG_VERSION= 1.7.7
-XORG_REVISION= 8
+XORG_REVISION= 9
PLIST_SUB+= OLD="" NEW="@comment "
EXTRA_PATCHES+= ${FILESDIR}/extra-Xext-xace.c \
${FILESDIR}/extra-Xserver-hw-xfree86-os-support-bsd-sparc64_video.c \
@@ -39,10 +53,8 @@ EXTRA_PATCHES+= ${FILESDIR}/extra-Xext-xace.c \
${FILESDIR}/extra-Xserver-hw-xfree86-common-xf86Config.c
.endif
-USES= perl5
-USE_PERL5= build
USE_BZIP2= yes
-USE_GMAKE= yes
+USES= gmake
USE_GL= gl
USE_XORG?= xf86driproto glproto xdmcp x11 xkbfile xxf86misc xxf86vm xaw7 \
xmu xt xpm xext randrproto renderproto fixesproto damageproto \
@@ -54,6 +66,7 @@ USE_XORG?= xf86driproto glproto xdmcp x11 xkbfile xxf86misc xxf86vm xaw7 \
MAKE_JOBS_UNSAFE= yes
USE_OPENSSL= yes
+USE_PERL5_BUILD=yes
CONFIGURE_ARGS?=--disable-dmx --disable-xvfb --disable-xnest \
--without-xmlto --disable-docs --disable-devel-docs \
--localstatedir=/var --without-dtrace --disable-xephyr \
@@ -78,14 +91,6 @@ MAN5+= xorg.conf.d.5
PLIST= ${.CURDIR}/pkg-plist
.endif
-OPTIONS_DEFINE= AIGLX SUID HAL
-AIGLX_DESC= Compile with Accelerated Indirect GLX support
-SUID_DESC= Install the Xorg server with setuid bit set
-HAL_DESC= Compile with HAL config support
-OPTIONS_DEFAULT= AIGLX SUID HAL
-
-OPTIONS_EXCLUDE_sparc64= HAL
-
NO_STAGE= yes
.include <bsd.port.pre.mk>
@@ -103,6 +108,10 @@ CONFIGURE_ARGS+= --enable-config-hal=yes
CONFIGURE_ARGS+= --enable-config-hal=no
.endif
+.if ${PORT_OPTIONS:MDEVD}
+EXTRA_PATCHES+= ${FILESDIR}/extra-config_devd.c
+.endif
+
.if ${PORT_OPTIONS:MAIGLX}
CONFIGURE_ARGS+= --enable-aiglx=yes
.else
@@ -172,6 +181,17 @@ post-patch:
@${REINPLACE_CMD} -e 's|@GLX_TRUE@GLXMODS =|@GLX_BOGUS@GLXMODS =|g' \
-e 's|^LTLIBRARIES = |LTLIBRARIES = libglx.la |g' \
${WRKSRC}/hw/xfree86/dixmods/Makefile.in
+.if ${PORT_OPTIONS:MDEVD}
+ @${ECHO_CMD} -e "\nint config_devd_init(void);\nvoid config_devd_fini(void);" \
+ >> ${WRKSRC}/config/config-backends.h
+.endif
+
+post-configure:
+.if ${PORT_OPTIONS:MDEVD}
+ @${REINPLACE_CMD} -e 's|config\.c|config.c devd.c|g' \
+ -e 's|config\.lo|config.lo devd.lo|g' \
+ ${WRKSRC}/config/Makefile
+.endif
.if ${SLAVE_PORT} == "no"
pre-su-install:
diff --git a/x11-servers/xorg-server/files/extra-config_devd.c b/x11-servers/xorg-server/files/extra-config_devd.c
new file mode 100644
index 000000000000..f6d66a37c862
--- /dev/null
+++ b/x11-servers/xorg-server/files/extra-config_devd.c
@@ -0,0 +1,481 @@
+--- /dev/null 2013-08-03 00:44:23.000000000 +0200
++++ config/devd.c 2013-08-03 00:45:15.162836806 +0200
+@@ -0,0 +1,478 @@
++/*
++ * Copyright © 2012 Baptiste Daroussin
++ *
++ * Permission is hereby granted, free of charge, to any person obtaining a
++ * copy of this software and associated documentation files (the "Software"),
++ * to deal in the Software without restriction, including without limitation
++ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
++ * and/or sell copies of the Software, and to permit persons to whom the
++ * Software is furnished to do so, subject to the following conditions:
++ *
++ * The above copyright notice and this permission notice (including the next
++ * paragraph) shall be included in all copies or substantial portions of the
++ * Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
++ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
++ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
++ * DEALINGS IN THE SOFTWARE.
++ *
++ * Author: Baptiste Daroussin <bapt@FreeBSD.org>
++ */
++
++#ifdef HAVE_DIX_CONFIG_H
++#include <dix-config.h>
++#endif
++
++#include <sys/types.h>
++#include <sys/socket.h>
++#include <sys/sysctl.h>
++#include <sys/un.h>
++
++#include <ctype.h>
++#include <stdlib.h>
++#include <stdio.h>
++#include <stdarg.h>
++#include <stdbool.h>
++#include <unistd.h>
++
++#include "input.h"
++#include "inputstr.h"
++#include "hotplug.h"
++#include "config-backends.h"
++#include "os.h"
++
++#define DEVD_SOCK_PATH "/var/run/devd.pipe"
++
++#define DEVD_EVENT_ADD '+'
++#define DEVD_EVENT_REMOVE '-'
++
++static int sock_devd = -1;
++
++#if XORG_VERSION_CURRENT < 10800000
++enum {
++ ATTR_KEYBOARD,
++ ATTR_POINTER,
++ ATTR_JOYSTICK,
++ ATTR_TOUCHPAD,
++ ATTR_TOUCHSCREEN,
++};
++#endif
++
++struct hw_type {
++ const char *driver;
++ int flag;
++ const char *xdriver;
++};
++
++static struct hw_type hw_types[] = {
++ { "ukbd", ATTR_KEYBOARD, "kdb" },
++ { "atkbd", ATTR_KEYBOARD, "kdb" },
++ { "ums", ATTR_POINTER, "mouse" },
++ { "psm", ATTR_POINTER, "mouse" },
++ { "uhid", ATTR_POINTER, "mouse" },
++ { "joy", ATTR_JOYSTICK, NULL },
++ { "atp", ATTR_TOUCHPAD, NULL },
++ { "uep", ATTR_TOUCHSCREEN, NULL },
++ { NULL, -1, NULL },
++};
++
++#if XORG_VERSION_CURRENT < 10800000
++static void
++add_option(InputOption **options, const char *key, const char *value)
++{
++ if (!value || *value == '\0')
++ return;
++
++ for (; *options; options = &(*options)->next)
++ ;
++ *options = calloc(sizeof(**options), 1);
++ if (!*options) /* Yeesh. */
++ return;
++ (*options)->key = xstrdup(key);
++ (*options)->value = xstrdup(value);
++ (*options)->next = NULL;
++}
++
++static void
++remove_device(DeviceIntPtr dev)
++{
++ /* this only gets called for devices that have already been added */
++ LogMessage(X_INFO, "config/devd: removing device %s\n", dev->name);
++
++ /* Call PIE here so we don't try to dereference a device that's
++ * already been removed. */
++ OsBlockSignals();
++ ProcessInputEvents();
++ DeleteInputDeviceRequest(dev);
++ OsReleaseSignals();
++}
++
++static bool
++device_is_duplicate(char *config_info)
++{
++ DeviceIntPtr dev;
++
++ for (dev = inputInfo.devices; dev; dev = dev->next)
++ if (dev->config_info && (strcmp(dev->config_info, config_info) == 0))
++ return true;
++
++ for (dev = inputInfo.off_devices; dev; dev = dev->next)
++ if (dev->config_info && (strcmp(dev->config_info, config_info) == 0))
++ return true;
++
++ return false;
++}
++
++#endif
++
++static bool
++sysctl_exists(const char *format, ...)
++{
++ va_list args;
++ char *name = NULL;
++ size_t len;
++ int ret;
++
++ if (format == NULL)
++ return false;
++
++ va_start(args, format);
++ vasprintf(&name, format, args);
++ va_end(args);
++
++ ret = sysctlbyname(name, NULL, &len, NULL, 0);
++
++ if (ret == -1)
++ len = 0;
++
++ free(name);
++ return (len > 0);
++}
++
++static char *
++sysctl_get_str(const char *format, ...)
++{
++ va_list args;
++ char *name = NULL;
++ char *dest = NULL;
++ size_t len;
++
++ if (format == NULL)
++ return NULL;
++
++ va_start(args, format);
++ vasprintf(&name, format, args);
++ va_end(args);
++
++ if (sysctlbyname(name, NULL, &len, NULL, 0) == 0) {
++ dest = malloc(len + 1);
++ if (sysctlbyname(name, dest, &len, NULL, 0) == 0)
++ dest[len] = '\0';
++ else {
++ free(dest);
++ dest = NULL;
++ }
++ }
++
++ free(name);
++ return dest;
++}
++
++static void
++device_added(char *line)
++{
++ char *walk;
++ char *path;
++ char *vendor;
++ char *product = NULL;
++ char *config_info = NULL;
++ InputOption *options = NULL;
++#if XORG_VERSION_CURRENT > 10800000
++ InputAttributes attrs = {};
++#else
++ InputOption *tmpo;
++#endif
++ DeviceIntPtr dev = NULL;
++ int i, rc;
++
++ walk = strchr(line, ' ');
++ if (walk != NULL)
++ walk[0] = '\0';
++
++ for (i = 0; hw_types[i].driver != NULL; i++) {
++ if (strncmp(line, hw_types[i].driver,
++ strlen(hw_types[i].driver)) == 0 &&
++ isnumber(*(line + strlen(hw_types[i].driver)))) {
++#if XORG_VERSION_CURRENT > 10800000
++ attrs.flags |= hw_types[i].flag;
++#endif
++ break;
++ }
++ }
++ if (hw_types[i].driver == NULL) {
++ LogMessageVerb(X_INFO, 10, "config/devd: ignoring device %s\n", line);
++ return;
++ }
++
++#if XORG_VERSION_CURRENT < 10800000
++ if (hw_types[i].xdriver == NULL) {
++ LogMessageVerb(X_INFO, 10, "config/devd: ignoring device %s\n", line);
++ return;
++ }
++#endif
++ if (asprintf(&path, "/dev/%s", line) == -1)
++ return;
++
++#if XORG_VERSION_CURRENT < 10800000
++ options = calloc(sizeof(*options), 1);
++ if (!options)
++ return;
++
++ add_option(&options, "_source", "server/devd");
++#else
++ options = input_option_new(NULL, "_source", "server/devd");
++ if (!options)
++ return;
++#endif
++
++ vendor = sysctl_get_str("dev.%s.%s.%%desc", hw_types[i].driver, line + strlen(hw_types[i].driver));
++ if (vendor == NULL) {
++#if XORG_VERSION_CURRENT > 10800000
++ attrs.vendor = strdup("(unnamed)");
++#endif
++ } else {
++ if ((product = strchr(vendor, ' ')) != NULL) {
++ product[0] = '\0';
++ product++;
++ }
++#if XORG_VERSION_CURRENT > 10800000
++ attrs.vendor = strdup(vendor);
++#endif
++ if (product != NULL && (walk = strchr(product, ',')) != NULL)
++ walk[0] = '\0';
++#if XORG_VERSION_CURRENT > 10800000
++ attrs.product = strdup(product != NULL ? product : "(unnamed)");
++ options = input_option_new(options, "name", product != NULL ? product : "(unnamed)");
++#else
++ add_option(&options, "name", product != NULL ? product : "(unnamed)");
++#endif
++ }
++#if XORG_VERSION_CURRENT > 10800000
++ attrs.usb_id = NULL;
++ options = input_option_new(options, "path", path);
++ options = input_option_new(options, "device", path);
++#else
++ add_option(&options, "path", path);
++ add_option(&options, "device", path);
++#endif
++
++#if XORG_VERSION_CURRENT < 10800000
++ add_option(&options, "driver", hw_types[i].xdriver);
++#endif
++
++ if (asprintf(&config_info, "devd:%s", line) == -1) {
++ config_info = NULL;
++ goto unwind;
++ }
++
++ if (device_is_duplicate(config_info)) {
++ LogMessage(X_WARNING, "config/devd: device %s already added. "
++ "Ignoring.\n", product != NULL ? product : "(unnamed)");
++ goto unwind;
++ }
++
++#if XORG_VERSION_CURRENT < 10800000
++ add_option(&options, "config_info", config_info);
++#else
++ options = input_option_new(options, "config_info", config_info);
++#endif
++ LogMessage(X_INFO, "config/devd: Adding input device %s (%s)\n",
++ product != NULL ? product : "(unnamed)", path);
++
++#if XORG_VERSION_CURRENT > 10800000
++ rc = NewInputDeviceRequest(options, &attrs, &dev);
++#else
++ rc = NewInputDeviceRequest(options, &dev);
++#endif
++
++ if (rc != Success)
++ goto unwind;
++
++ unwind:
++ free(config_info);
++#if XORG_VERSION_CURRENT < 10800000
++ while ((tmpo = options)) {
++ options = tmpo->next;
++ free(tmpo->key); /* NULL if dev != NULL */
++ free(tmpo->value); /* NULL if dev != NULL */
++ free(tmpo);
++ }
++#else
++ input_option_free_list(&options);
++#endif
++
++#if XORG_VERSION_CURRENT > 10800000
++ free(attrs.usb_id);
++ free(attrs.product);
++ free(attrs.device);
++ free(attrs.vendor);
++#endif
++
++ return;
++}
++
++static void
++device_removed(char *line)
++{
++ char *walk;
++ char *value;
++#if XORG_VERSION_CURRENT < 10800000
++ DeviceIntPtr dev, next;
++#endif
++
++ walk = strchr(line, ' ');
++ if (walk != NULL)
++ walk[0] = '\0';
++
++ if (asprintf(&value, "devd:%s", line) == -1)
++ return;
++
++#if XORG_VERSION_CURRENT > 10800000
++ remove_devices("dev", value);
++#else
++ for (dev = inputInfo.devices; dev; dev = next) {
++ next = dev->next;
++ if (dev->config_info && strcmp(dev->config_info, value) == 0)
++ remove_device(dev);
++ }
++ for (dev = inputInfo.off_devices; dev; dev = next) {
++ next = dev->next;
++ if (dev->config_info && strcmp(dev->config_info, value) == 0)
++ remove_device(dev);
++ }
++#endif
++
++ free(value);
++}
++
++static ssize_t
++socket_getline(int fd, char **out)
++{
++ char *buf;
++ ssize_t ret, cap, sz = 0;
++ char c;
++
++ cap = 1024;
++ buf = malloc(cap * sizeof(char));
++ if (!buf)
++ return -1;
++
++ for (;;) {
++ ret = read(sock_devd, &c, 1);
++ if (ret < 1) {
++ free(buf);
++ return -1;
++ }
++
++ if (c == '\n')
++ break;
++
++ if (sz + 1 >= cap) {
++ cap *= 2;
++ buf = realloc(buf, cap *sizeof(char));
++ }
++ buf[sz] = c;
++ sz++;
++ }
++
++ buf[sz] = '\0';
++ if (sz > 0)
++ *out = buf;
++ else
++ free(buf);
++
++ return sz; /* number of bytes in the line, not counting the line break*/
++}
++
++static void
++wakeup_handler(pointer data, int err, pointer read_mask)
++{
++ char *line = NULL;
++
++ if (err < 0)
++ return;
++
++ if (FD_ISSET(sock_devd, (fd_set *)read_mask)) {
++ if (socket_getline(sock_devd, &line) < 0)
++ return;
++
++ switch(*line) {
++ case DEVD_EVENT_ADD:
++ device_added(line++);
++ break;
++ case DEVD_EVENT_REMOVE:
++ device_removed(line++);
++ break;
++ default:
++ break;
++ }
++ free(line);
++ }
++}
++
++static void
++block_handler(pointer data, struct timeval **tv, pointer read_mask)
++{
++}
++
++int
++config_devd_init(void)
++{
++ struct sockaddr_un devd;
++ char devicename[1024];
++ int i, j;
++
++ /* first scan the sysctl to determine the hardware if needed */
++
++ for (i = 0; hw_types[i].driver != NULL; i++) {
++ for (j = 0; sysctl_exists("dev.%s.%i.%%desc", hw_types[i].driver, j); j++) {
++ snprintf(devicename, 1024, "%s%i", hw_types[i].driver, j);
++ device_added(devicename);
++ }
++
++ }
++ sock_devd = socket(AF_UNIX, SOCK_STREAM, 0);
++ if (sock_devd < 0) {
++ ErrorF("config/devd: Fail opening stream socket");
++ return 0;
++ }
++
++ devd.sun_family = AF_UNIX;
++ strlcpy(devd.sun_path, DEVD_SOCK_PATH, sizeof(devd.sun_path));
++
++ if (connect(sock_devd, (struct sockaddr *) &devd, sizeof(struct sockaddr_un)) < 0) {
++ close(sock_devd);
++ ErrorF("config/devd: Fail to connect to devd");
++ return 0;
++ }
++
++ RegisterBlockAndWakeupHandlers(block_handler, wakeup_handler, NULL);
++ AddGeneralSocket(sock_devd);
++
++ return 1;
++}
++
++void
++config_devd_fini(void)
++{
++ if (sock_devd < 0)
++ return;
++
++ RemoveGeneralSocket(sock_devd);
++ RemoveBlockAndWakeupHandlers(block_handler, wakeup_handler, NULL);
++ close(sock_devd);
++}
diff --git a/x11-servers/xorg-server/files/extra-configure b/x11-servers/xorg-server/files/extra-configure
new file mode 100644
index 000000000000..cede35be92f3
--- /dev/null
+++ b/x11-servers/xorg-server/files/extra-configure
@@ -0,0 +1,11 @@
+--- configure.orig 2013-09-07 22:11:27.210621324 +0200
++++ configure 2013-09-07 22:11:52.912624338 +0200
+@@ -22839,7 +22839,7 @@
+ }
+ _ACEOF
+ if ac_fn_c_try_compile "$LINENO"; then :
+- ac_cv_tls=$kw
++ ac_cv_tls=$kw; break ;
+ fi
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
diff --git a/x11-themes/gtk-murrine-engine/Makefile b/x11-themes/gtk-murrine-engine/Makefile
index fab76fc12912..ab591d4ac84f 100644
--- a/x11-themes/gtk-murrine-engine/Makefile
+++ b/x11-themes/gtk-murrine-engine/Makefile
@@ -3,6 +3,7 @@
PORTNAME= murrine
PORTVERSION= 0.98.2
+PORTREVISION= 1
CATEGORIES= x11-themes
MASTER_SITES= GNOME
PKGNAMEPREFIX= gtk-
@@ -11,14 +12,12 @@ PKGNAMESUFFIX= -engine
MAINTAINER= pneumann@gmail.com
COMMENT= Murrine GTK+ 2.x cairo based engine
-LIB_DEPENDS= pixman-1:${PORTSDIR}/x11/pixman
-
USE_XZ= yes
-USE_GMAKE= yes
+USE_XORG= pixman
USE_GNOME= gtk20 intltool intlhack
USE_LDCONFIG= yes
GNU_CONFIGURE= yes
-USES= pkgconfig
+USES= gmake pkgconfig
OPTIONS_DEFINE= ANIMATION
ANIMATION_DESC= Animation support
diff --git a/x11-toolkits/gtkglext/Makefile b/x11-toolkits/gtkglext/Makefile
index c71f036b85a3..505c1bbe5963 100644
--- a/x11-toolkits/gtkglext/Makefile
+++ b/x11-toolkits/gtkglext/Makefile
@@ -3,7 +3,7 @@
PORTNAME= gtkglext
PORTVERSION= 1.2.0
-PORTREVISION= 11
+PORTREVISION= 12
CATEGORIES= x11-toolkits
MASTER_SITES= SF
DIST_SUBDIR= gnome2
@@ -25,12 +25,11 @@ LIB_DEPENDS= pthread-stubs:${PORTSDIR}/devel/libpthread-stubs \
OPTIONS_DEFINE= DOCS
USE_BZIP2= yes
-USE_GMAKE= yes
USE_AUTOTOOLS= libtool
USE_XORG= ice pixman sm x11 xau xcb xcomposite xcursor xdamage xdmcp \
xext xfixes xi xinerama xmu xrandr xrender xt xxf86vm
USE_GL= glu
-USES= gettext iconv pathfix pkgconfig
+USES= gettext gmake iconv pathfix pkgconfig
USE_GNOME= gdkpixbuf2 gtk20 pangox-compat
USE_LDCONFIG= yes
diff --git a/x11-toolkits/libXaw/Makefile b/x11-toolkits/libXaw/Makefile
index e8f71bd145f4..da11eaa90722 100644
--- a/x11-toolkits/libXaw/Makefile
+++ b/x11-toolkits/libXaw/Makefile
@@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= libXaw
-PORTVERSION= 1.0.11
+PORTVERSION= 1.0.12
PORTEPOCH= 2
CATEGORIES= x11-toolkits
@@ -11,7 +11,7 @@ COMMENT= X Athena Widgets library
XORG_CAT= lib
USE_XORG= printproto:both x11 xau xext xextproto xmu xp xpm xproto:both xt
-USE_GMAKE= yes
+USES= gmake
CONFIGURE_ARGS+=--without-xmlto
MAN3= Xaw.3
diff --git a/x11-toolkits/libXaw/distinfo b/x11-toolkits/libXaw/distinfo
index e2007b6f2fd5..e2875aaf4834 100644
--- a/x11-toolkits/libXaw/distinfo
+++ b/x11-toolkits/libXaw/distinfo
@@ -1,2 +1,2 @@
-SHA256 (xorg/lib/libXaw-1.0.11.tar.bz2) = 87a874acbb71d1ee59b8047312fc91d89dcb373e2970f121184cdae29a3d9492
-SIZE (xorg/lib/libXaw-1.0.11.tar.bz2) = 649633
+SHA256 (xorg/lib/libXaw-1.0.12.tar.bz2) = 96fc314874fce9979556321d1d6ee00b5baf32fb333b7278853b4983bc3cdbf6
+SIZE (xorg/lib/libXaw-1.0.12.tar.bz2) = 677147
diff --git a/x11-toolkits/libXmu/Makefile b/x11-toolkits/libXmu/Makefile
index 43beb3fbada4..f5eab9c3c5c7 100644
--- a/x11-toolkits/libXmu/Makefile
+++ b/x11-toolkits/libXmu/Makefile
@@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= libXmu
-PORTVERSION= 1.1.1
+PORTVERSION= 1.1.2
PORTEPOCH= 1
CATEGORIES= x11-toolkits
diff --git a/x11-toolkits/libXmu/distinfo b/x11-toolkits/libXmu/distinfo
index d6b1abb646c0..38a7db26176d 100644
--- a/x11-toolkits/libXmu/distinfo
+++ b/x11-toolkits/libXmu/distinfo
@@ -1,2 +1,2 @@
-SHA256 (xorg/lib/libXmu-1.1.1.tar.bz2) = 709081c550cc3a866d7c760a3f97384a1fe16e27fc38fe8169b8db9f33aa7edd
-SIZE (xorg/lib/libXmu-1.1.1.tar.bz2) = 383473
+SHA256 (xorg/lib/libXmu-1.1.2.tar.bz2) = 756edc7c383254eef8b4e1b733c3bf1dc061b523c9f9833ac7058378b8349d0b
+SIZE (xorg/lib/libXmu-1.1.2.tar.bz2) = 396230
diff --git a/x11-wm/awesome/Makefile b/x11-wm/awesome/Makefile
index 9d70efc2981f..c69202d5126a 100644
--- a/x11-wm/awesome/Makefile
+++ b/x11-wm/awesome/Makefile
@@ -3,7 +3,7 @@
PORTNAME= awesome
PORTVERSION= 3.5.1
-PORTREVISION= 2
+PORTREVISION= 3
PORTEPOCH= 1
CATEGORIES= x11-wm
MASTER_SITES= http://awesome.naquadah.org/download/
diff --git a/x11-wm/jewel/files/patch-Makefile b/x11-wm/jewel/files/patch-Makefile
index 474fb98a4afb..27ebe73e9e74 100644
--- a/x11-wm/jewel/files/patch-Makefile
+++ b/x11-wm/jewel/files/patch-Makefile
@@ -1,5 +1,14 @@
---- Makefile.orig 2013-09-26 16:58:49.000000000 +0200
-+++ Makefile 2013-09-26 16:58:55.000000000 +0200
+--- Makefile.orig 2005-01-03 22:54:59.000000000 +0100
++++ Makefile 2013-09-28 12:52:00.901277718 +0200
+@@ -12,7 +12,7 @@
+ CC = g++
+ CFLAGS = -g -O2 -Wall
+
+-export prefix = /usr/X11R6
++export prefix = ${PREFIX}
+ export XROOT = $(prefix)
+ DESTDIR =
+ INCLUDES = -I$(XROOT)/include
@@ -51,7 +51,7 @@
$(CC) $(OBJS) $(LDPATH) $(LIBS) -o $@
diff --git a/x11/libSM/Makefile b/x11/libSM/Makefile
index 90ea1100bfce..e832ad113b03 100644
--- a/x11/libSM/Makefile
+++ b/x11/libSM/Makefile
@@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= libSM
-PORTVERSION= 1.2.1
+PORTVERSION= 1.2.2
PORTEPOCH= 1
CATEGORIES= x11
diff --git a/x11/libSM/distinfo b/x11/libSM/distinfo
index ca43847ca6c3..dafbe43218ea 100644
--- a/x11/libSM/distinfo
+++ b/x11/libSM/distinfo
@@ -1,2 +1,2 @@
-SHA256 (xorg/lib/libSM-1.2.1.tar.bz2) = 93c11d569c64f40723b93b44af1efb474a0cfe92573b0c8c330343cabb897f1d
-SIZE (xorg/lib/libSM-1.2.1.tar.bz2) = 334696
+SHA256 (xorg/lib/libSM-1.2.2.tar.bz2) = 0baca8c9f5d934450a70896c4ad38d06475521255ca63b717a6510fdb6e287bd
+SIZE (xorg/lib/libSM-1.2.2.tar.bz2) = 348908
diff --git a/x11/libX11/Makefile b/x11/libX11/Makefile
index 08cc6bc9f4e0..83c0f97b9b52 100644
--- a/x11/libX11/Makefile
+++ b/x11/libX11/Makefile
@@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= libX11
-PORTVERSION= 1.6.1
+PORTVERSION= 1.6.2
PORTEPOCH= 1
CATEGORIES= x11
diff --git a/x11/libX11/distinfo b/x11/libX11/distinfo
index ee6aec1eb0b8..8a4baadbe9e0 100644
--- a/x11/libX11/distinfo
+++ b/x11/libX11/distinfo
@@ -1,2 +1,2 @@
-SHA256 (xorg/lib/libX11-1.6.1.tar.bz2) = 10a54fc16b58b4f5a5eed4d080c357a82fd2f42d09af625c1f5df50650701892
-SIZE (xorg/lib/libX11-1.6.1.tar.bz2) = 2356196
+SHA256 (xorg/lib/libX11-1.6.2.tar.bz2) = 2aa027e837231d2eeea90f3a4afe19948a6eb4c8b2bec0241eba7dbc8106bd16
+SIZE (xorg/lib/libX11-1.6.2.tar.bz2) = 2339981
diff --git a/x11/libX11/pkg-plist b/x11/libX11/pkg-plist
index 336805d2f18c..ed7f94d58c33 100644
--- a/x11/libX11/pkg-plist
+++ b/x11/libX11/pkg-plist
@@ -103,6 +103,9 @@ lib/X11/locale/ja/XLC_LOCALE
lib/X11/locale/ja_JP.UTF-8/Compose
lib/X11/locale/ja_JP.UTF-8/XI18N_OBJS
lib/X11/locale/ja_JP.UTF-8/XLC_LOCALE
+lib/X11/locale/km_KH.UTF-8/Compose
+lib/X11/locale/km_KH.UTF-8/XI18N_OBJS
+lib/X11/locale/km_KH.UTF-8/XLC_LOCALE
lib/X11/locale/ko/Compose
lib/X11/locale/ko/XI18N_OBJS
lib/X11/locale/ko/XLC_LOCALE
@@ -141,6 +144,9 @@ lib/X11/locale/pt_BR.UTF-8/XLC_LOCALE
lib/X11/locale/ru_RU.UTF-8/Compose
lib/X11/locale/ru_RU.UTF-8/XI18N_OBJS
lib/X11/locale/ru_RU.UTF-8/XLC_LOCALE
+lib/X11/locale/sr_CS.UTF-8/Compose
+lib/X11/locale/sr_CS.UTF-8/XI18N_OBJS
+lib/X11/locale/sr_CS.UTF-8/XLC_LOCALE
lib/X11/locale/tatar-cyr/Compose
lib/X11/locale/tatar-cyr/XI18N_OBJS
lib/X11/locale/tatar-cyr/XLC_LOCALE
@@ -215,6 +221,7 @@ libdata/pkgconfig/x11.pc
@dirrm lib/X11/locale/th_TH.UTF-8
@dirrm lib/X11/locale/th_TH
@dirrm lib/X11/locale/tatar-cyr
+@dirrm lib/X11/locale/sr_CS.UTF-8
@dirrm lib/X11/locale/ru_RU.UTF-8
@dirrm lib/X11/locale/pt_BR.UTF-8
@dirrm lib/X11/locale/nokhchi-1
@@ -227,6 +234,7 @@ libdata/pkgconfig/x11.pc
@dirrm lib/X11/locale/koi8-c
@dirrm lib/X11/locale/ko_KR.UTF-8
@dirrm lib/X11/locale/ko
+@dirrm lib/X11/locale/km_KH.UTF-8
@dirrm lib/X11/locale/ja_JP.UTF-8
@dirrm lib/X11/locale/ja.SJIS
@dirrm lib/X11/locale/ja.JIS
diff --git a/x11/libXpm/Makefile b/x11/libXpm/Makefile
index 73c6c4205b2c..28e9d78b5da5 100644
--- a/x11/libXpm/Makefile
+++ b/x11/libXpm/Makefile
@@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= libXpm
-PORTVERSION= 3.5.10
+PORTVERSION= 3.5.11
CATEGORIES= x11
MAINTAINER= x11@FreeBSD.org
diff --git a/x11/libXpm/distinfo b/x11/libXpm/distinfo
index ee9bb9ea9f1f..f1a7a6b8a8b6 100644
--- a/x11/libXpm/distinfo
+++ b/x11/libXpm/distinfo
@@ -1,2 +1,2 @@
-SHA256 (xorg/lib/libXpm-3.5.10.tar.bz2) = a6db7e234750e7d60330017972e31d8e1f29f0a8c1391e4ac82f6102d919a735
-SIZE (xorg/lib/libXpm-3.5.10.tar.bz2) = 431310
+SHA256 (xorg/lib/libXpm-3.5.11.tar.bz2) = c5bdafa51d1ae30086fac01ab83be8d47fe117b238d3437f8e965434090e041c
+SIZE (xorg/lib/libXpm-3.5.11.tar.bz2) = 443496
diff --git a/x11/libXrandr/Makefile b/x11/libXrandr/Makefile
index 3b61b58e2350..715bf5f5b740 100644
--- a/x11/libXrandr/Makefile
+++ b/x11/libXrandr/Makefile
@@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= libXrandr
-PORTVERSION= 1.4.1
+PORTVERSION= 1.4.2
CATEGORIES= x11
MAINTAINER= x11@FreeBSD.org
diff --git a/x11/libXrandr/distinfo b/x11/libXrandr/distinfo
index e0248d9fd368..3497f67afada 100644
--- a/x11/libXrandr/distinfo
+++ b/x11/libXrandr/distinfo
@@ -1,2 +1,2 @@
-SHA256 (xorg/lib/libXrandr-1.4.1.tar.bz2) = d914a0490fd0a2ea6c3194505b5b28c56e2a277d8f4648b0275ee0ee370fb905
-SIZE (xorg/lib/libXrandr-1.4.1.tar.bz2) = 312857
+SHA256 (xorg/lib/libXrandr-1.4.2.tar.bz2) = caa7b31ac769be51a532343c65376f1d4df3f307afaed58e34fb5e82e8b825ad
+SIZE (xorg/lib/libXrandr-1.4.2.tar.bz2) = 315165
diff --git a/x11/libXv/Makefile b/x11/libXv/Makefile
index 3a6980dcbde0..f1784fdd126a 100644
--- a/x11/libXv/Makefile
+++ b/x11/libXv/Makefile
@@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= libXv
-PORTVERSION= 1.0.9
+PORTVERSION= 1.0.10
PORTEPOCH= 1
CATEGORIES= x11
diff --git a/x11/libXv/distinfo b/x11/libXv/distinfo
index f3acfcbf2ba9..786cd9ff899d 100644
--- a/x11/libXv/distinfo
+++ b/x11/libXv/distinfo
@@ -1,2 +1,2 @@
-SHA256 (xorg/lib/libXv-1.0.9.tar.bz2) = a874dbf864d0271bbe795af67ef5b3f20096c92fc11eacbf0d2af00e32bc5b4b
-SIZE (xorg/lib/libXv-1.0.9.tar.bz2) = 309744
+SHA256 (xorg/lib/libXv-1.0.10.tar.bz2) = 55fe92f8686ce8612e2c1bfaf58c057715534419da700bda8d517b1d97914525
+SIZE (xorg/lib/libXv-1.0.10.tar.bz2) = 300633
diff --git a/x11/libxcb/Makefile b/x11/libxcb/Makefile
index 25b811454ff0..cc0789e5e774 100644
--- a/x11/libxcb/Makefile
+++ b/x11/libxcb/Makefile
@@ -20,9 +20,8 @@ RUN_DEPENDS= ${LOCALBASE}/libdata/pkgconfig/pthread-stubs.pc:${PORTSDIR}/devel/l
CONFIGURE_ARGS+= --disable-build-docs --without-doxygen --enable-xinput
USE_BZIP2= yes
-USES= pathfix pkgconfig
+USES= gmake pathfix pkgconfig
USE_GNOME= libxslt:build
-USE_GMAKE= yes
USE_LDCONFIG= yes
USE_XORG= xau xdmcp
USE_PYTHON_BUILD= 2.5+
diff --git a/x11/pixman/Makefile b/x11/pixman/Makefile
index ee371fd2ed48..3c14f5edf2e9 100644
--- a/x11/pixman/Makefile
+++ b/x11/pixman/Makefile
@@ -1,17 +1,16 @@
# $FreeBSD$
PORTNAME= pixman
-PORTVERSION= 0.30.0
+PORTVERSION= 0.30.2
CATEGORIES= x11
MAINTAINER= x11@FreeBSD.org
COMMENT= Low-level pixel manipulation library
USES= perl5
+USE_PERL5= build
XORG_CAT= lib
USE_AUTOTOOLS= libtool
-USE_PERL5= build
-USE_GNOME= ltverhack:9
CONFIGURE_ARGS= --disable-gtk
OPTIONS_DEFINE= SIMD
diff --git a/x11/pixman/distinfo b/x11/pixman/distinfo
index 0d67d268bd3e..676ffb26f115 100644
--- a/x11/pixman/distinfo
+++ b/x11/pixman/distinfo
@@ -1,2 +1,2 @@
-SHA256 (xorg/lib/pixman-0.30.0.tar.bz2) = 77e756dc7fafdf17f39a4f23bdc8be59f9f6a65c08704f5cac1d8aa87cfaf517
-SIZE (xorg/lib/pixman-0.30.0.tar.bz2) = 681343
+SHA256 (xorg/lib/pixman-0.30.2.tar.bz2) = 4fbb51788fe7cbd8abb5f80aed95ec878704e57a06328f7bebe0306e3822c96c
+SIZE (xorg/lib/pixman-0.30.2.tar.bz2) = 666281
diff --git a/x11/pixman/pkg-plist b/x11/pixman/pkg-plist
index 66d6a4342aee..139159fa07c9 100644
--- a/x11/pixman/pkg-plist
+++ b/x11/pixman/pkg-plist
@@ -3,6 +3,6 @@ include/pixman-1/pixman.h
lib/libpixman-1.a
lib/libpixman-1.la
lib/libpixman-1.so
-lib/libpixman-1.so.9
+lib/libpixman-1.so.30
libdata/pkgconfig/pixman-1.pc
@dirrm include/pixman-1
diff --git a/x11/xinput/Makefile b/x11/xinput/Makefile
index c709181c2a9f..76b5ab893ad7 100644
--- a/x11/xinput/Makefile
+++ b/x11/xinput/Makefile
@@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= xinput
-PORTVERSION= 1.6.0
+PORTVERSION= 1.6.1
CATEGORIES= x11
MAINTAINER= x11@FreeBSD.org
diff --git a/x11/xinput/distinfo b/x11/xinput/distinfo
index 2ed8d9dc2c5b..27cb16975dce 100644
--- a/x11/xinput/distinfo
+++ b/x11/xinput/distinfo
@@ -1,2 +1,2 @@
-SHA256 (xorg/app/xinput-1.6.0.tar.bz2) = 4ab007d952c76665603bcb82ceb15fd3929d10faf0580fc4873ac16f5f63847e
-SIZE (xorg/app/xinput-1.6.0.tar.bz2) = 146209
+SHA256 (xorg/app/xinput-1.6.1.tar.bz2) = b7632d0f228a8a6be93b09857ea413940fcf44091e60f4a0fe9f5fd82efd871f
+SIZE (xorg/app/xinput-1.6.1.tar.bz2) = 152587
diff --git a/x11/xkeyboard-config/Makefile b/x11/xkeyboard-config/Makefile
index 9b3cf994a7c5..69aab9a2bc87 100644
--- a/x11/xkeyboard-config/Makefile
+++ b/x11/xkeyboard-config/Makefile
@@ -14,9 +14,8 @@ BUILD_DEPENDS= xkbcomp:${PORTSDIR}/x11/xkbcomp
XORG_CAT= data
USE_BZIP2= yes
-USE_GMAKE= yes
USE_GNOME= intlhack libxslt:build
-USES= pathfix perl5
+USES= gmake pathfix perl5
USE_PERL5= build
GNU_CONFIGURE= yes
MAKE_JOBS_UNSAFE=yes
diff --git a/x11/xorg-cf-files/Makefile b/x11/xorg-cf-files/Makefile
index 2f00d34cc7b0..bc3218ddb478 100644
--- a/x11/xorg-cf-files/Makefile
+++ b/x11/xorg-cf-files/Makefile
@@ -3,6 +3,7 @@
PORTNAME= xorg-cf-files
PORTVERSION= 1.0.5
+PORTREVISION= 1
CATEGORIES= x11
MAINTAINER= x11@FreeBSD.org
diff --git a/x11/xtrans/Makefile b/x11/xtrans/Makefile
index e1953c67a53f..6a268d80d78d 100644
--- a/x11/xtrans/Makefile
+++ b/x11/xtrans/Makefile
@@ -8,8 +8,6 @@ CATEGORIES= x11
MAINTAINER= x11@FreeBSD.org
COMMENT= Abstract network code for X
-CONFLICTS= libXtrans
-
LICENSE= MIT
XORG_CAT= lib