Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 May 2017 18:46:53 +0000 (UTC)
From:      Matthew Rezny <rezny@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r440699 - in head: . Mk Mk/Scripts emulators/i386-wine emulators/i386-wine-devel graphics graphics/copperspice graphics/dri graphics/gbm graphics/libEGL graphics/libGL graphics/libglapi...
Message-ID:  <201705121846.v4CIkro3074476@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rezny
Date: Fri May 12 18:46:53 2017
New Revision: 440699
URL: https://svnweb.freebsd.org/changeset/ports/440699

Log:
  Consolidate the Mesa ports, update to 17.0.4, and add Wayland option
  
  * libGL, libEGL, libglesv2, libglapi, and gbm have been moved into mesa-libs,
    graphics/dri has been renamed to mesa-dri, and USE_GL has been adjusted
  * mesa-libs has a new WAYLAND option that enables platform support in libEGL
  * mesa-dri now depends on graphics/s2tc for compressed texture support [1]
  * re-remove obsolete dependency on makedepends [2]
  * correct sed fix backported from 17.1 [3]
  
  PR:		218799 (exp-run), 212762 [1], 218552 [2], 218562 [3]
  Submitted by:	dbn [1], jbeich [2,3]
  Reported by:	afiskon@devzen.ru [1]
  Reviewed by:	kwm, johalun0@gmail.com
  Approved by:	portmgr, swills (mentor)
  Differential Revision:  https://reviews.freebsd.org/D10448

Added:
  head/graphics/mesa-dri/
     - copied from r440698, head/graphics/dri/
  head/graphics/mesa-dri/Makefile.common
     - copied, changed from r440689, head/graphics/libGL/Makefile.common
  head/graphics/mesa-dri/Makefile.targets
     - copied, changed from r440689, head/graphics/libGL/Makefile.targets
  head/graphics/mesa-dri/distinfo
     - copied, changed from r440689, head/graphics/libGL/distinfo
  head/graphics/mesa-dri/files/
     - copied from r440689, head/graphics/libGL/files/
  head/graphics/mesa-libs/
     - copied from r440698, head/graphics/libGL/
Deleted:
  head/graphics/dri/
  head/graphics/gbm/
  head/graphics/libEGL/
  head/graphics/libGL/
  head/graphics/libglapi/
  head/graphics/libglesv2/
  head/graphics/mesa-libs/Makefile.common
  head/graphics/mesa-libs/Makefile.targets
  head/graphics/mesa-libs/distinfo
  head/graphics/mesa-libs/files/
Modified:
  head/MOVED
  head/Mk/Scripts/qa.sh
  head/Mk/bsd.port.mk
  head/Mk/bsd.xorg.mk
  head/emulators/i386-wine-devel/Makefile.i386
  head/emulators/i386-wine/Makefile.i386
  head/graphics/Makefile
  head/graphics/copperspice/Makefile
  head/graphics/libosmesa/Makefile
  head/graphics/mesa-dri/Makefile
  head/graphics/mesa-dri/files/configure.ac
  head/graphics/mesa-dri/files/patch-configure
  head/graphics/mesa-dri/files/patch-src_gallium_state__trackers_clover_llvm_invocation.cpp
  head/graphics/mesa-dri/pkg-descr
  head/graphics/mesa-libs/Makefile
  head/graphics/mesa-libs/pkg-descr
  head/graphics/mesa-libs/pkg-plist
  head/graphics/s2tc/Makefile
  head/graphics/wayland/Makefile
  head/graphics/wayland/distinfo
  head/graphics/wayland/files/patch-Makefile.am
  head/graphics/wayland/files/patch-src_wayland-server.c
  head/graphics/wayland/files/patch-src_wayland-shm.c
  head/graphics/wayland/files/patch-tests_connection-test.c
  head/graphics/wayland/files/patch-tests_event-loop-test.c
  head/graphics/wayland/files/patch-tests_os-wrappers-test.c
  head/graphics/wayland/files/patch-tests_queue-test.c
  head/graphics/wayland/files/patch-tests_test-runner.c
  head/lang/clover/Makefile
  head/lang/clover/pkg-descr
  head/lang/clover/pkg-plist
  head/net/tigervnc-devel/Makefile
  head/net/tigervnc/Makefile
  head/science/iboview/Makefile
  head/x11-toolkits/gtkada3/Makefile
  head/x11/xorg/Makefile

Modified: head/MOVED
==============================================================================
--- head/MOVED	Fri May 12 18:43:37 2017	(r440698)
+++ head/MOVED	Fri May 12 18:46:53 2017	(r440699)
@@ -9378,3 +9378,9 @@ chinese/fortune||2017-05-07|Has expired:
 benchmarks/gobench||2017-05-07|Has expired: Builds each time it runs
 sysutils/grok||2017-05-07|Has expired: Unfetchable for more than six months (google code has gone away)
 audio/xaylet|audio/aylet|2017-05-07|Moved to a single port with GUI option
+graphics/dri|graphics/mesa-dri|2017-05-12|Renamed for clarity and consistency with graphics/mesa-libs
+graphics/gbm|graphics/mesa-libs|2017-05-12|Mesa libraries were merged into one port
+graphics/libglapi|graphics/mesa-libs|2017-05-12|Mesa libraries were merged into one port
+graphics/libglesv2|graphics/mesa-libs|2017-05-12|Mesa libraries were merged into one port
+graphics/libEGL|graphics/mesa-libs|2017-05-12|Mesa libraries were merged into one port
+graphics/libGL|graphics/mesa-libs|2017-05-12|Mesa libraries were merged into one port

Modified: head/Mk/Scripts/qa.sh
==============================================================================
--- head/Mk/Scripts/qa.sh	Fri May 12 18:43:37 2017	(r440698)
+++ head/Mk/Scripts/qa.sh	Fri May 12 18:46:53 2017	(r440699)
@@ -537,13 +537,13 @@ proxydeps_suggest_uses() {
 	elif echo ${pkg} | grep -E '/sdl2_(gfx|image|mixer|net|ttf)$' > /dev/null; then
 		warn "you need USE_SDL+=$(echo ${pkg} | sed -E 's|.*/sdl2_||')2"
 	# gl-related
-	elif [ ${pkg} = 'graphics/libGL' ]; then
+	elif expr ${lib_file} : "${LOCALBASE}/lib/libGL.so.*$" > /dev/null; then
 		warn "you need USE_GL+=gl"
-	elif [ ${pkg} = 'graphics/gbm' ]; then
+	elif expr ${lib_file} : "${LOCALBASE}/lib/libgbm.so.*$" > /dev/null; then
 		warn "you need USE_GL+=gbm"
-	elif [ ${pkg} = 'graphics/libglesv2' ]; then
+	elif expr ${lib_file} : "${LOCALBASE}/lib/libGLESv2.so.*$" > /dev/null; then
 		warn "you need USE_GL+=glesv2"
-	elif [ ${pkg} = 'graphics/libEGL' ]; then
+	elif expr ${lib_file} : "${LOCALBASE}/lib/libEGL.so.*$" > /dev/null; then
 		warn "you need USE_GL+=egl"
 	elif [ ${pkg} = 'graphics/glew' ]; then
 		warn "you need USE_GL+=glew"

Modified: head/Mk/bsd.port.mk
==============================================================================
--- head/Mk/bsd.port.mk	Fri May 12 18:43:37 2017	(r440698)
+++ head/Mk/bsd.port.mk	Fri May 12 18:46:53 2017	(r440699)
@@ -1763,20 +1763,19 @@ IGNORE=			has USE_LDCONFIG32 set to yes,
 
 PKG_IGNORE_DEPENDS?=		'this_port_does_not_exist'
 
-_GL_gbm_LIB_DEPENDS=		libgbm.so:graphics/gbm
-_GL_glesv2_BUILD_DEPENDS=		libglesv2>0:graphics/libglesv2
-_GL_glesv2_RUN_DEPENDS=		libglesv2>0:graphics/libglesv2
-_GL_egl_BUILD_DEPENDS=		libEGL>0:graphics/libEGL
-_GL_egl_RUN_DEPENDS=		libEGL>0:graphics/libEGL
-_GL_gl_BUILD_DEPENDS=		libGL>0:graphics/libGL
-_GL_gl_RUN_DEPENDS=		libGL>0:graphics/libGL
-_GL_gl_USE_XORG=		glproto dri2proto
+_GL_gbm_LIB_DEPENDS=		libgbm.so:graphics/mesa-libs
+_GL_glesv2_BUILD_DEPENDS=	${LOCALBASE}/lib/libGLESv2.so:graphics/mesa-libs
+_GL_glesv2_RUN_DEPENDS=		${LOCALBASE}/lib/libGLESv2.so:graphics/mesa-libs
+_GL_egl_BUILD_DEPENDS=		${LOCALBASE}/lib/libEGL.so:graphics/mesa-libs
+_GL_egl_RUN_DEPENDS=		${LOCALBASE}/lib/libEGL.so:graphics/mesa-libs
+_GL_gl_BUILD_DEPENDS=		${LOCALBASE}/lib/libGL.so:graphics/mesa-libs
+_GL_gl_RUN_DEPENDS=			${LOCALBASE}/lib/libGL.so:graphics/mesa-libs
+_GL_gl_USE_XORG=			glproto dri2proto dri3proto
 _GL_glew_LIB_DEPENDS=		libGLEW.so:graphics/glew
 _GL_glu_LIB_DEPENDS=		libGLU.so:graphics/libGLU
-_GL_glu_USE_XORG=		glproto dri2proto
+_GL_glu_USE_XORG=			glproto dri2proto dri3proto
 _GL_glw_LIB_DEPENDS=		libGLw.so:graphics/libGLw
 _GL_glut_LIB_DEPENDS=		libglut.so:graphics/freeglut
-
 .if defined(USE_GL)
 . if ${USE_GL:tl} == "yes"
 USE_GL=		glu

Modified: head/Mk/bsd.xorg.mk
==============================================================================
--- head/Mk/bsd.xorg.mk	Fri May 12 18:43:37 2017	(r440698)
+++ head/Mk/bsd.xorg.mk	Fri May 12 18:46:53 2017	(r440699)
@@ -97,7 +97,7 @@ USES+=	pathfix
 CONFIGURE_ARGS+=	--with-xkb-path=${LOCALBASE}/share/X11/xkb \
 					--with-fontrootdir=${LOCALBASE}/share/fonts
 
-LIB_PC_DEPENDS+=	${LOCALBASE}/libdata/pkgconfig/dri.pc:graphics/dri
+LIB_PC_DEPENDS+=	${LOCALBASE}/libdata/pkgconfig/dri.pc:graphics/mesa-dri
 USE_XORG+=	fontutil:build
 . endif
 

Modified: head/emulators/i386-wine-devel/Makefile.i386
==============================================================================
--- head/emulators/i386-wine-devel/Makefile.i386	Fri May 12 18:43:37 2017	(r440698)
+++ head/emulators/i386-wine-devel/Makefile.i386	Fri May 12 18:46:53 2017	(r440699)
@@ -12,7 +12,7 @@ MASTERDIR=	${SLAVEDIR}/../wine-devel
 PKGINSTALL=	${SLAVEDIR}/files/pkg-install
 PKGDEINSTALL=	${PKGINSTALL}
 
-RUN_DEPENDS=	dri>0:graphics/dri
+RUN_DEPENDS=	mesa-dri>0:graphics/mesa-dri
 
 CONFLICTS_INSTALL?=	wine-[0-9]* wine-staging-[0-9]* wine-devel-[0-9]* \
 			i386-wine-[0-9]* i386-wine-staging-[0-9]*

Modified: head/emulators/i386-wine/Makefile.i386
==============================================================================
--- head/emulators/i386-wine/Makefile.i386	Fri May 12 18:43:37 2017	(r440698)
+++ head/emulators/i386-wine/Makefile.i386	Fri May 12 18:46:53 2017	(r440699)
@@ -12,7 +12,7 @@ MASTERDIR=	${SLAVEDIR}/../wine
 PKGINSTALL=	${SLAVEDIR}/files/pkg-install
 PKGDEINSTALL=	${PKGINSTALL}
 
-RUN_DEPENDS=	dri>0:graphics/dri
+RUN_DEPENDS=	mesa-dri>0:graphics/mesa-dri
 
 CONFLICTS_INSTALL?=	wine-[0-9]* wine-staging-[0-9]* wine-devel-[0-9]* \
 			i386-wine-staging-[0-9]* i386-wine-devel-[0-9]*

Modified: head/graphics/Makefile
==============================================================================
--- head/graphics/Makefile	Fri May 12 18:43:37 2017	(r440698)
+++ head/graphics/Makefile	Fri May 12 18:46:53 2017	(r440699)
@@ -148,7 +148,6 @@
     SUBDIR += djview4-qt4
     SUBDIR += djvulibre
     SUBDIR += dmtx-utils
-    SUBDIR += dri
     SUBDIR += driconf
     SUBDIR += dspdfviewer
     SUBDIR += duhdraw
@@ -218,7 +217,6 @@
     SUBDIR += fyre
     SUBDIR += g2
     SUBDIR += gauche-gl
-    SUBDIR += gbm
     SUBDIR += gcolor
     SUBDIR += gcolor2
     SUBDIR += gcolor3
@@ -473,8 +471,6 @@
     SUBDIR += leptonica
     SUBDIR += lfview
     SUBDIR += lib3ds
-    SUBDIR += libEGL
-    SUBDIR += libGL
     SUBDIR += libGLU
     SUBDIR += libGLw
     SUBDIR += libafterimage
@@ -497,8 +493,6 @@
     SUBDIR += libgaiagraphics
     SUBDIR += libgeotiff
     SUBDIR += libgfx
-    SUBDIR += libglapi
-    SUBDIR += libglesv2
     SUBDIR += libgltext
     SUBDIR += libgltf
     SUBDIR += libgnomecanvas
@@ -592,6 +586,8 @@
     SUBDIR += mapyrus
     SUBDIR += megapov
     SUBDIR += mesa-demos
+    SUBDIR += mesa-dri
+    SUBDIR += mesa-libs
     SUBDIR += meshviewer
     SUBDIR += metacam
     SUBDIR += metapixel

Modified: head/graphics/copperspice/Makefile
==============================================================================
--- head/graphics/copperspice/Makefile	Fri May 12 18:43:37 2017	(r440698)
+++ head/graphics/copperspice/Makefile	Fri May 12 18:46:53 2017	(r440699)
@@ -3,7 +3,7 @@
 
 PORTNAME=	copperspice
 PORTVERSION=	1.3.2
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	graphics
 MASTER_SITES=	http://download.copperspice.com/copperspice/source/
 
@@ -17,7 +17,6 @@ LIB_DEPENDS=	libaudio.so:audio/nas \
 		libexpat.so:textproc/expat2 \
 		libffi.so:devel/libffi \
 		libfreetype.so:print/freetype2 \
-		libglapi.so:graphics/libglapi \
 		libgstbase-0.10.so:multimedia/gstreamer \
 		libgstreamer-0.10.so:multimedia/gstreamer \
 		libpcre.so:devel/pcre \

Modified: head/graphics/libosmesa/Makefile
==============================================================================
--- head/graphics/libosmesa/Makefile	Fri May 12 18:43:37 2017	(r440698)
+++ head/graphics/libosmesa/Makefile	Fri May 12 18:46:53 2017	(r440699)
@@ -3,27 +3,32 @@
 
 PORTNAME=	libosmesa
 PORTVERSION=	${MESAVERSION}
-PORTREVISION=	0
 CATEGORIES=	graphics
 
 COMMENT=	Off-Screen Mesa implementation of the OpenGL API
 
 LIB_DEPENDS=	libexpat.so:textproc/expat2 \
-		libglapi.so:graphics/libglapi
+		libglapi.so:graphics/mesa-libs
 
-USE_XORG=	dri2proto dri3proto glproto presentproto x11 xau xcb xdmcp xvmc
-# libosmesa doesn't link agains libGL but osmesa.h needs GL/gl.h
-# and both headers are intalled by libGL ....
-USE_GL=		gl
+USE_XORG=	glproto
 
 .include <bsd.port.options.mk>
+.include "${.CURDIR}/../../graphics/mesa-dri/Makefile.common"
 
-.include "${.CURDIR}/../../graphics/libGL/Makefile.common"
-
-#MESA_BUILD_WRKSRC=	src/util src/glsl src/mesa #/drivers/osmesa
+CONFIGURE_ARGS+=	--disable-dri --disable-egl --disable-gbm \
+			--with-gallium-drivers=swrast
+MESA_BUILD_WRKSRC=	src/util src/compiler src/mapi src/mesa
+
+.if "${MESA_LLVM_VER}" != ""
+CONFGIURE_ARGS+=	--enable-osmesa-gallium
+MESA_BUILD_WRKSRC+=	src/gallium
+MESA_INSTALL_WRKSRC=	src/gallium/state_trackers/osmesa src/gallium/targets/osmesa
+.else
+CONFIGURE_ARGS+=	--enable-osmesa
 MESA_INSTALL_WRKSRC=	src/mesa/drivers/osmesa
+.endif
 
-.include "${.CURDIR}/../../graphics/libGL/Makefile.targets"
+.include "${.CURDIR}/../../graphics/mesa-dri/Makefile.targets"
 
 post-install:
 	@${MKDIR} ${STAGEDIR}${PREFIX}/include/GL

Modified: head/graphics/mesa-dri/Makefile
==============================================================================
--- head/graphics/dri/Makefile	Fri May 12 18:43:37 2017	(r440698)
+++ head/graphics/mesa-dri/Makefile	Fri May 12 18:46:53 2017	(r440699)
@@ -1,22 +1,23 @@
 # Created by: Eric Anholt <anholt@FreeBSD.org>
 # $FreeBSD$
 
-PORTNAME=	dri
+PORTNAME=	mesa-dri
 PORTVERSION=	${MESAVERSION}
-PORTEPOCH=	2
 CATEGORIES=	graphics
 
-COMMENT=	OpenGL hardware acceleration drivers for the DRI
+COMMENT=	OpenGL hardware acceleration drivers for DRI2+
 
 LIB_DEPENDS=	libdrm.so:graphics/libdrm \
 		libexpat.so:textproc/expat2
+RUN_DEPENDS=	${LOCALBASE}/lib/libtxc_dxtn.so:graphics/s2tc
 
 USE_XORG=	dri2proto dri3proto glproto presentproto x11 xdamage xext \
-		xfixes xshmfence xv xvmc xxf86vm 
+		xfixes xshmfence xv xvmc
 
 OPTIONS_DEFINE=	TEXTURE VAAPI VDPAU
 OPTIONS_DEFAULT=TEXTURE
 OPTIONS_SUB=	yes
+PKGHELP=	${.CURDIR}/pkg-help
 
 TEXTURE_DESC=	Enable texture-float support (patent encumbered)
 TEXTURE_CONFIGURE_ENABLE=	texture-float
@@ -28,17 +29,46 @@ VAAPI_USE=		XORG=xcb
 VDPAU_CONFIGURE_ENABLE=	vdpau
 VDPAU_LIB_DEPENDS=	libvdpau.so:multimedia/libvdpau
 
-PKGHELP=	${.CURDIR}/pkg-help
-
 .include <bsd.port.options.mk>
+.include "${.CURDIR}/../../graphics/mesa-dri/Makefile.common"
 
-.include "${.CURDIR}/../../graphics/libGL/Makefile.common"
+ALL_DRI_DRIVERS=	I915 I965 RADEON R200 SWRAST
+ALL_GALLIUM_DRIVERS=	FREEDRENO R300 R600 RADEONSI SVGA SWRAST VC4
 
-#src/mesa/libmesagallium.la
-#MESA_BUILD_WRKSRC=	src/util src/gallium
-#MESA_INSTALL_WRKSRC=	src/gallium
+DRI_DRIVERS=		SWRAST
+GALLIUM_DRIVERS=	SWRAST
+.if ${ARCH} == amd64 || ${ARCH} == i386 \
+ || ${ARCH} == powerpc || ${ARCH} == powerpc64
+DRI_DRIVERS+=		RADEON R200
+GALLIUM_DRIVERS+=	R300 R600 RADEONSI
+.elif ${ARCH} == armv6 || ${ARCH} == aarch64
+GALLIUM_DRIVERS+=	FREEDRENO VC4
+.endif
+.if ${ARCH} == amd64 || ${ARCH} == i386
+DRI_DRIVERS+=		I915 I965
+GALLIUM_DRIVERS+=	SVGA
+.endif
+
+CONFIGURE_ARGS+=	--with-dri-drivers="${DRI_DRIVERS:tl}" \
+			--with-gallium-drivers="${GALLIUM_DRIVERS:tl}"
+
+.for _d in ${ALL_DRI_DRIVERS}
+. if ${DRI_DRIVERS:M${_d}}
+PLIST_SUB+=	${_d}_DRIVER=""
+. else
+PLIST_SUB+=	${_d}_DRIVER="@comment "
+. endif
+.endfor
+
+.for _gd in ${ALL_GALLIUM_DRIVERS}
+. if ${GALLIUM_DRIVERS:M${_gd}}
+PLIST_SUB+=	${_gd}_GDRIVER=""
+. else
+PLIST_SUB+=	${_gd}_GDRIVER="@comment "
+. endif
+.endfor
 
-.include "${.CURDIR}/../../graphics/libGL/Makefile.targets"
+.include "${.CURDIR}/../../graphics/mesa-dri/Makefile.targets"
 
 post-install:
 	@${RM} -r ${STAGEDIR}/etc/OpenCL

Copied and modified: head/graphics/mesa-dri/Makefile.common (from r440689, head/graphics/libGL/Makefile.common)
==============================================================================
--- head/graphics/libGL/Makefile.common	Fri May 12 16:46:48 2017	(r440689, copy source)
+++ head/graphics/mesa-dri/Makefile.common	Fri May 12 18:46:53 2017	(r440699)
@@ -4,13 +4,9 @@
 #
 # Remember to upgrade the following ports everytime you bump MESAVERSION:
 #
-#    - graphics/dri
-#    - graphics/gbm
-#    - graphics/libEGL
-#    - graphics/libGL
-#    - graphics/libglapi
-#    - graphics/libglesv2
 #    - graphics/libosmesa
+#    - graphics/mesa-dri
+#    - graphics/mesa-libs
 #    - lang/clover
 #
 # $FreeBSD$
@@ -18,7 +14,7 @@
 MESAVERSION=	${MESABASEVERSION}${MESASUBVERSION:C/^(.)/.\1/}
 MESADISTVERSION=${MESABASEVERSION}${MESASUBVERSION:C/^(.)/-\1/}
 
-MESABASEVERSION=	17.0.3
+MESABASEVERSION=	17.0.4
 # if there is a subversion, don't include the '-' between 7.11-rc2.
 MESASUBVERSION=
 
@@ -31,8 +27,6 @@ DISTFILES=	mesa-${MESADISTVERSION}${EXTR
 
 MAINTAINER=	x11@FreeBSD.org
 
-BUILD_DEPENDS+=	makedepend:devel/makedepend
-
 USES+=		compiler:c++11-lib bison gettext-tools gmake libtool \
 		localbase pathfix pkgconfig python:2,build shebangfix tar:xz
 USE_LDCONFIG=	yes
@@ -42,18 +36,20 @@ PKGINSTALL=	${.CURDIR}/pkg-install
 PKGDEINSTALL=	${.CURDIR}/pkg-deinstall
 
 # only have one port to check with portscout.
-.if ${PORTNAME} != libGL
+.if ${PORTNAME} != mesa-dri
 PORTSCOUT=	ignore:1
 .endif
 
-python_OLD_CMD=	"/usr/bin/env[[:space:]]python"
-python_CMD=	${LOCALBASE}/bin/python2
+python_OLD_CMD=	/usr/bin/env[[:space:]]python2 /usr/bin/python2 /bin/env[[:space:]]python
 SHEBANG_FILES=	src/gallium/*/*/*.py src/gallium/tools/trace/*.py \
 		src/gallium/drivers/svga/svgadump/svga_dump.py \
-		src/mapi/glapi/gen/*.py
-SHEBANG_FILES+=	src/mapi/mapi_abi.py
+		src/gallium/drivers/freedreno/ir3/ir3_nir_trig.py \
+		src/mapi/glapi/gen/*.py src/mapi/mapi_abi.py \
+		src/mesa/drivers/dri/common/xmlpool/gen_xmlpool.py \
+		src/mesa/main/get_*.py src/util/format_srgb.py \
+		src/amd/*/*.py src/intel/genxml/gen_pack_header.py
 
-MASTERDIR=	${.CURDIR}/../../graphics/libGL
+MASTERDIR=	${.CURDIR}/../../graphics/mesa-dri
 PATCHDIR=	${MASTERDIR}/files
 WRKSRC=		${WRKDIR}/mesa-${MESADISTVERSION}
 DESCR=		${.CURDIR}/pkg-descr
@@ -64,7 +60,17 @@ COMPONENT=	${PORTNAME:tl:C/^lib//:C/mesa
 
 .if (${ARCH} != sparc64 && ${ARCH} != ia64)	# no working LLVM
 MESA_LLVM_VER?=	40
+.endif
+
+.if "${MESA_LLVM_VER}" != ""
+BUILD_DEPENDS+=	llvm${MESA_LLVM_VER}>=3.9.0_4:devel/llvm${MESA_LLVM_VER}
+RUN_DEPENDS+=	llvm${MESA_LLVM_VER}>=3.9.0_4:devel/llvm${MESA_LLVM_VER}
+CONFIGURE_ENV+=	LLVM_CONFIG=${LOCALBASE}/bin/llvm-config${MESA_LLVM_VER}
 LDFLAGS+=	-Wl,-rpath=${LOCALBASE}/llvm${MESA_LLVM_VER}/lib
+# The gallium-llvm switch is the global llvm switch for historical reasons
+CONFIGURE_ARGS+=	--enable-gallium-llvm
+.else
+CONFIGURE_ARGS+=	--disable-gallium-llvm
 .endif
 
 # There are issues that need to be fixed to use TLS model "initial-exec"
@@ -75,99 +81,10 @@ LDFLAGS+=	-Wl,-rpath=${LOCALBASE}/llvm${
 # https://lists.freebsd.org/pipermail/freebsd-arch/2016-February/017699.html
 CONFIGURE_ARGS+=	--disable-glx-tls
 
-# libEGL, dri and clover need gallium enabled.
-# the third option in --with-egl-platforms is wayland.
-.if (${MESA_LLVM_VER} != "")
-CONFIGURE_ARGS+=	--enable-egl --with-egl-platforms=x11,drm
-.else
-CONFIGURE_ARGS+=	--disable-egl
-.endif
-
 # we don't care about GLes v1
-CONFIGURE_ARGS+=	--disable-gles1 --enable-gles2
-
-# Clover (OpenCL).
-.if ${OPSYS} == DragonFly || \
-	(${OPSYS} == FreeBSD && \
-		(${ARCH} == amd64 || ${ARCH} == i386))
-
-BUILD_DEPENDS+=	libclc>=0.2.0.20160915:devel/libclc
-
-# We need the clang port too even if it is not used to compile because
-# Clover needs some of the clang includes to build.
-.if ${COMPONENT:Mdri} != "" || ${COMPONENT:Mclover} != "" || ${COMPONENT:Mosmesa} != ""
-_USES_pre_configure+=	290:clover-pre-configure
-
-# .if !exists() evaluates too early before cairo has a chance to be installed
-clover-pre-configure:
-	@if [ -e ${LOCALBASE}/bin/llvm-config${MESA_LLVM_VER} ] && \
-		! [ -e ${LOCALBASE}/bin/clang${MESA_LLVM_VER} ]; then \
-		${ECHO_MSG} "Your llvm${MESA_LLVM_VER} is not build with clang support, which is required."; \
-		${FALSE}; \
-	fi
-.endif
-
-CONFIGURE_ARGS+=	--enable-opencl --enable-opencl-icd
-.else
-CONFIGURE_ARGS+=	--disable-opencl
-.endif
-
-CONFIGURE_ARGS+=	--enable-osmesa --enable-xvmc
-
-# gallium
-.if (${MESA_LLVM_VER} != "")
-BUILD_DEPENDS+= llvm${MESA_LLVM_VER}>=3.9.0_4:devel/llvm${MESA_LLVM_VER}
-.if ${COMPONENT:Mdri} != "" || ${COMPONENT:Mclover} != "" || ${COMPONENT:Megl} != ""
-RUN_DEPENDS+=   llvm${MESA_LLVM_VER}>=3.9.0_4:devel/llvm${MESA_LLVM_VER}
-.endif
-
-CONFIGURE_ENV+= LLVM_CONFIG=${LOCALBASE}/bin/llvm-config${MESA_LLVM_VER}
-
-CONFIGURE_ARGS+=	--enable-gallium-llvm --enable-llvm-shared-libs
-.else
-CONFIGURE_ARGS+=	--disable-gallium-llvm
-.endif
-
-ALL_DRI_DRIVERS=	I915 I965 RADEON R200 SWRAST
-ALL_GALLIUM_DRIVERS=	R300 R600 RADEONSI SVGA SWRAST
-
-.if ${ARCH} == amd64 || ${ARCH} == i386
-DRI_DRIVERS=		I915 I965 RADEON R200
-GALLIUM_DRIVERS=	R300 R600 RADEONSI SVGA
-.endif
-
-.if ${ARCH} == powerpc || ${ARCH} == powerpc64
-DRI_DRIVERS=		RADEON R200
-GALLIUM_DRIVERS=	R300 R600 RADEONSI
-.endif
-
-# software rendering for all arches
-DRI_DRIVERS+=		SWRAST
-GALLIUM_DRIVERS+=	SWRAST
-
-.for _d in ${ALL_DRI_DRIVERS}
-. if ${DRI_DRIVERS:M${_d}}
-PLIST_SUB+=	${_d}_DRIVER=""
-. else
-PLIST_SUB+=	${_d}_DRIVER="@comment "
-. endif
-.endfor
-
-CONFIGURE_ARGS+=--with-dri-drivers="${DRI_DRIVERS:tl}"
-
-.for _gd in ${ALL_GALLIUM_DRIVERS}
-. if ${GALLIUM_DRIVERS:M${_gd}}
-PLIST_SUB+=	${_gd}_GDRIVER=""
-. else
-PLIST_SUB+=	${_gd}_GDRIVER="@comment "
-. endif
-.endfor
-
-.if (${MESA_LLVM_VER} != "")
-CONFIGURE_ARGS+=--with-gallium-drivers="${GALLIUM_DRIVERS:tl}"
-.endif
+CONFIGURE_ARGS+=	--disable-gles1
 
 .if ${OPSYS} == DragonFly
-LIB_DEPENDS+= libelf.so:devel/libelf
+LIB_DEPENDS+=	libelf.so:devel/libelf
 .endif
 

Copied and modified: head/graphics/mesa-dri/Makefile.targets (from r440689, head/graphics/libGL/Makefile.targets)
==============================================================================
--- head/graphics/libGL/Makefile.targets	Fri May 12 16:46:48 2017	(r440689, copy source)
+++ head/graphics/mesa-dri/Makefile.targets	Fri May 12 18:46:53 2017	(r440699)
@@ -4,8 +4,7 @@
 
 post-patch:
 .if ${OPSYS} == FreeBSD
-	@${REINPLACE_CMD} -e 's|x86_64|amd64|' \
-		${WRKSRC}/configure
+	@${REINPLACE_CMD} -e 's|x86_64|amd64|' ${WRKSRC}/configure
 # Clang 3.4 in 10.x on i386 fails with the following error when using "GCC atomics"
 #
 # glsl/cache.c:613:4: error: cannot compile this atomic library call yet
@@ -15,25 +14,16 @@ post-patch:
 .if ${OSVERSION} < 1100000 && ${ARCH} == "i386"
 	@${REINPLACE_CMD} -e 's|-DUSE_GCC_ATOMIC_BUILTINS||' ${WRKSRC}/configure
 .endif
-.else # ${OPSYS} == DragonFly
-#	Sed on dragonfly doesn't support \< or \>
-	@${REINPLACE_CMD} -e 's|\\>//|[[:>:]]//|' \
-		${WRKSRC}/configure
 .endif # ${OPSYS}
 	@${REINPLACE_CMD} -e 's|/etc/|${PREFIX}/etc/|g' \
 		${WRKSRC}/src/mesa/drivers/dri/common/xmlconfig.c
-	@${REINPLACE_CMD} -e 's|#!/use/bin/python|#!${PYTHON_CMD}|g' \
-		${WRKSRC}/src/mesa/drivers/dri/common/xmlpool/gen_xmlpool.py
-	@${REINPLACE_CMD} -e 's|!/use/bin/python2|!${PYTHON_CMD}|g' \
-		${WRKSRC}/src/mesa/main/get_hash_generator.py \
-		${WRKSRC}/src/mapi/glapi/gen/gl_enums.py \
-		${WRKSRC}/src/mapi/glapi/gen/gl_table.py
 
 pre-build: mesa-pre-build
 
 #custom targets so we can build parts of Mesa
 mesa-pre-build:
 # do propper gmake target.
+	@cd ${WRKSRC}/src && ${MAKE_CMD} git_sha1.h libglsl_util.la
 	@cd ${WRKSRC}/src/mesa/drivers/dri/common/ && ${MAKE_CMD}
 	@cd ${WRKSRC}/src/loader && ${MAKE_CMD}
 # libloader.la

Copied and modified: head/graphics/mesa-dri/distinfo (from r440689, head/graphics/libGL/distinfo)
==============================================================================
--- head/graphics/libGL/distinfo	Fri May 12 16:46:48 2017	(r440689, copy source)
+++ head/graphics/mesa-dri/distinfo	Fri May 12 18:46:53 2017	(r440699)
@@ -1,3 +1,3 @@
-TIMESTAMP = 1491068637
-SHA256 (mesa-17.0.3.tar.xz) = ca646f5075a002d60ef9123c8a4331cede155c01712ef945a65c59a5e69fe7ed
-SIZE (mesa-17.0.3.tar.xz) = 9485792
+TIMESTAMP = 1492459376
+SHA256 (mesa-17.0.4.tar.xz) = 1269dc8545a193932a0779b2db5bce9be4a5f6813b98c38b93b372be8362a346
+SIZE (mesa-17.0.4.tar.xz) = 9454976

Modified: head/graphics/mesa-dri/files/configure.ac
==============================================================================
--- head/graphics/libGL/files/configure.ac	Fri May 12 16:46:48 2017	(r440689)
+++ head/graphics/mesa-dri/files/configure.ac	Fri May 12 18:46:53 2017	(r440699)
@@ -1,9 +1,10 @@
 --- configure.ac.orig	2017-04-01 15:33:36 UTC
 +++ configure.ac
-@@ -943,18 +943,19 @@ llvm_add_target() {
+@@ -942,19 +942,19 @@ llvm_add_target() {
+ # Call this inside ` ` to get the return value.
  # $1 is the llvm-config command with arguments.
  strip_unwanted_llvm_flags() {
-     # Use \> (marks the end of the word)
+-    # Use \> (marks the end of the word)
 -    echo " `$1`" | sed \
 -        -e 's/\s\+-m\S*//g' \
 -        -e 's/\s\+-DNDEBUG\>//g' \
@@ -12,25 +13,27 @@
 -        -e 's/\s\+-W\S*//g' \
 -        -e 's/\s\+-O\S*//g' \
 -        -e 's/\s\+-g\S*//g' \
-+    echo " `$1`" | sed -E \
+-        -e 's/-fno-rtti\>/-Fno-rtti/g' \
+-        -e 's/\s\+-f\S*//g' \
+-        -e 's/-Fno-rtti\>/-fno-rtti/g' \
+-        -e 's/^ //'
++    echo " `$1` " | sed -E \
 +        -e 's/[[[:space:]]]+-m[[^[:space:]]]*//g' \
-+        -e 's/[[[:space:]]]+-DNDEBUG\>//g' \
-+        -e 's/[[[:space:]]]+-D_GNU_SOURCE\>//g' \
-+        -e 's/[[[:space:]]]+-pedantic\>//g' \
++        -e 's/[[[:space:]]]+-DNDEBUG[[[:space:]]]/ /g' \
++        -e 's/[[[:space:]]]+-D_GNU_SOURCE[[[:space:]]]/ /g' \
++        -e 's/[[[:space:]]]+-pedantic[[[:space:]]]/ /g' \
 +        -e 's/[[[:space:]]]+-W[[^[:space:]]]*//g' \
 +        -e 's/[[[:space:]]]+-O[[^[:space:]]]*//g' \
 +        -e 's/[[[:space:]]]+-g[[^[:space:]]]*//g' \
-         -e 's/-fno-rtti\>/-Fno-rtti/g' \
--        -e 's/\s\+-f\S*//g' \
++        -e 's/-fno-rtti[[[:space:]]]/-Fno-rtti /g' \
 +        -e 's/[[[:space:]]]+-f[[^[:space:]]]*//g' \
-         -e 's/-Fno-rtti\>/-fno-rtti/g' \
--        -e 's/^ //'
-+        -e 's/-fno-exceptions\>//g' \
-+        -e 's/^[[[:space:]]]//'
++        -e 's/-Fno-rtti[[[:space:]]]/-fno-rtti /g' \
++        -e 's/^[[[:space:]]]//' \
++        -e 's/[[[:space:]]]$//'
  }
  
  llvm_set_environment_variables() {
-@@ -1121,7 +1122,7 @@ fi
+@@ -1121,7 +1121,7 @@ fi
  AC_SUBST(LIBSENSORS_LIBS)
  
  case "$host_os" in
@@ -39,7 +42,7 @@
      dri3_default=yes
      ;;
  *)
-@@ -1631,7 +1632,7 @@ dnl platform checks. Set DEFINES and LIB
+@@ -1631,7 +1631,7 @@ dnl platform checks. Set DEFINES and LIB
  if test "x$enable_dri" = xyes; then
      # Platform specific settings and drivers to build
      case "$host_os" in
@@ -48,7 +51,7 @@
          if test "x$enable_dri3" = xyes; then
              DEFINES="$DEFINES -DHAVE_DRI3"
          fi
-@@ -2002,9 +2003,18 @@ if test "x$enable_opencl" = xyes; then
+@@ -2002,9 +2002,18 @@ if test "x$enable_opencl" = xyes; then
          AC_MSG_ERROR([cannot enable OpenCL without Gallium])
      fi
  
@@ -67,7 +70,7 @@
  
      if test "x$have_libclc" = xno; then
          AC_MSG_ERROR([pkg-config cannot find libclc.pc which is required to build clover.
-@@ -2061,8 +2071,6 @@ if test "x$enable_opencl" = xyes; then
+@@ -2061,8 +2070,6 @@ if test "x$enable_opencl" = xyes; then
          CLANG_LIBDIR=${LLVM_LIBDIR}
      fi
      CLANG_RESOURCE_DIR=$CLANG_LIBDIR/clang/${LLVM_VERSION}

Modified: head/graphics/mesa-dri/files/patch-configure
==============================================================================
--- head/graphics/libGL/files/patch-configure	Fri May 12 16:46:48 2017	(r440689)
+++ head/graphics/mesa-dri/files/patch-configure	Fri May 12 18:46:53 2017	(r440699)
@@ -1,9 +1,10 @@
 --- configure.orig	2017-04-01 15:33:50 UTC
 +++ configure
-@@ -22351,18 +22351,19 @@ llvm_add_target() {
+@@ -22350,19 +22350,19 @@ llvm_add_target() {
+ # Call this inside ` ` to get the return value.
  # $1 is the llvm-config command with arguments.
  strip_unwanted_llvm_flags() {
-     # Use \> (marks the end of the word)
+-    # Use \> (marks the end of the word)
 -    echo " `$1`" | sed \
 -        -e 's/\s\+-m\S*//g' \
 -        -e 's/\s\+-DNDEBUG\>//g' \
@@ -12,25 +13,27 @@
 -        -e 's/\s\+-W\S*//g' \
 -        -e 's/\s\+-O\S*//g' \
 -        -e 's/\s\+-g\S*//g' \
-+    echo " `$1`" | sed -E \
-+        -e 's/[[[:space:]]]+-m[[^[:space:]]]*//g' \
-+        -e 's/[[[:space:]]]+-DNDEBUG\>//g' \
-+        -e 's/[[[:space:]]]+-D_GNU_SOURCE\>//g' \
-+        -e 's/[[[:space:]]]+-pedantic\>//g' \
-+        -e 's/[[[:space:]]]+-W[[^[:space:]]]*//g' \
-+        -e 's/[[[:space:]]]+-O[[^[:space:]]]*//g' \
-+        -e 's/[[[:space:]]]+-g[[^[:space:]]]*//g' \
-         -e 's/-fno-rtti\>/-Fno-rtti/g' \
+-        -e 's/-fno-rtti\>/-Fno-rtti/g' \
 -        -e 's/\s\+-f\S*//g' \
-+        -e 's/[[[:space:]]]+-f[[^[:space:]]]*//g' \
-         -e 's/-Fno-rtti\>/-fno-rtti/g' \
+-        -e 's/-Fno-rtti\>/-fno-rtti/g' \
 -        -e 's/^ //'
-+        -e 's/-fno-exceptions\>//g' \
-+        -e 's/^[[[:space:]]]//'
++    echo " `$1` " | sed -E \
++        -e 's/[[:space:]]+-m[^[:space:]]*//g' \
++        -e 's/[[:space:]]+-DNDEBUG[[:space:]]/ /g' \
++        -e 's/[[:space:]]+-D_GNU_SOURCE[[:space:]]/ /g' \
++        -e 's/[[:space:]]+-pedantic[[:space:]]/ /g' \
++        -e 's/[[:space:]]+-W[^[:space:]]*//g' \
++        -e 's/[[:space:]]+-O[^[:space:]]*//g' \
++        -e 's/[[:space:]]+-g[^[:space:]]*//g' \
++        -e 's/-fno-rtti[[:space:]]/-Fno-rtti /g' \
++        -e 's/[[:space:]]+-f[^[:space:]]*//g' \
++        -e 's/-Fno-rtti[[:space:]]/-fno-rtti /g' \
++        -e 's/^[[:space:]]//' \
++        -e 's/[[:space:]]$//'
  }
  
  llvm_set_environment_variables() {
-@@ -22560,7 +22561,7 @@ fi
+@@ -22560,7 +22560,7 @@ fi
  
  
  case "$host_os" in
@@ -39,7 +42,7 @@
      dri3_default=yes
      ;;
  *)
-@@ -24099,7 +24100,7 @@ fi
+@@ -24099,7 +24099,7 @@ fi
  if test "x$enable_dri" = xyes; then
      # Platform specific settings and drivers to build
      case "$host_os" in
@@ -48,7 +51,7 @@
          if test "x$enable_dri3" = xyes; then
              DEFINES="$DEFINES -DHAVE_DRI3"
          fi
-@@ -25851,9 +25852,19 @@ if test "x$enable_opencl" = xyes; then
+@@ -25851,9 +25851,19 @@ if test "x$enable_opencl" = xyes; then
          as_fn_error $? "cannot enable OpenCL without Gallium" "$LINENO" 5
      fi
  
@@ -68,7 +71,7 @@
  
      if test "x$have_libclc" = xno; then
          as_fn_error $? "pkg-config cannot find libclc.pc which is required to build clover.
-@@ -25916,9 +25927,6 @@ rm -f core conftest.err conftest.$ac_obj
+@@ -25916,9 +25926,6 @@ rm -f core conftest.err conftest.$ac_obj
          CLANG_LIBDIR=${LLVM_LIBDIR}
      fi
      CLANG_RESOURCE_DIR=$CLANG_LIBDIR/clang/${LLVM_VERSION}

Modified: head/graphics/mesa-dri/files/patch-src_gallium_state__trackers_clover_llvm_invocation.cpp
==============================================================================
--- head/graphics/libGL/files/patch-src_gallium_state__trackers_clover_llvm_invocation.cpp	Fri May 12 16:46:48 2017	(r440689)
+++ head/graphics/mesa-dri/files/patch-src_gallium_state__trackers_clover_llvm_invocation.cpp	Fri May 12 18:46:53 2017	(r440699)
@@ -23,7 +23,7 @@ ic_stringIcNS_11char_traitsIcEENS_9alloc
        // class to recognize it as an OpenCL source file.
 -      const std::vector<const char *> copts =
 -         map(std::mem_fn(&std::string::c_str), opts);
-+      std::vector<const char *> copts;
++      std::vector<const char *> copts(opts.size());
 +      std::transform(opts.begin(), opts.end(), copts.begin(), cstr);
  
        if (!clang::CompilerInvocation::CreateFromArgs(

Modified: head/graphics/mesa-dri/pkg-descr
==============================================================================
--- head/graphics/dri/pkg-descr	Fri May 12 18:43:37 2017	(r440698)
+++ head/graphics/mesa-dri/pkg-descr	Fri May 12 18:46:53 2017	(r440699)
@@ -1,5 +1,7 @@
-This package contains the current stable release of the client drivers for the
-DRI.  With an X Server configured for the DRI they allow direct rendering of
-hardware-accelerated OpenGL.
+This package contains the current stable release of the client drivers for DRI2+
 
-WWW: http://dri.sourceforge.net/
+With a X Server configured for DRI, they allow direct rendering of hardware-
+accelerated OpenGL. This package also includes the software renderer, either
+llvmpipe or classic SWrast.
+
+WWW: http://www.mesa3d.org/

Modified: head/graphics/mesa-libs/Makefile
==============================================================================
--- head/graphics/libGL/Makefile	Fri May 12 18:43:37 2017	(r440698)
+++ head/graphics/mesa-libs/Makefile	Fri May 12 18:46:53 2017	(r440699)
@@ -1,27 +1,64 @@
 # Created by: Eric Anholt <anholt@FreeBSD.org>
 # $FreeBSD$
 
-PORTNAME=	libGL
+PORTNAME=	mesa-libs
 PORTVERSION=	${MESAVERSION}
-PORTREVISION=	0
 CATEGORIES=	graphics
 
-COMMENT=	OpenGL library that renders using GLX or DRI
+COMMENT=	OpenGL libraries that support GLX and EGL clients
 
+BUILD_DEPENDS+=	${LOCALBASE}/libdata/pkgconfig/pthread-stubs.pc:devel/libpthread-stubs
 LIB_DEPENDS+=	libdrm.so:graphics/libdrm \
-		libglapi.so:graphics/libglapi \
 		libexpat.so:textproc/expat2
 
 USE_XORG=	dri2proto dri3proto glproto presentproto x11 xcb xdamage xext \
 		xfixes xshmfence xxf86vm
 
+OPTIONS_DEFINE=	WAYLAND
+OPTIONS_SUB=	yes
+
+WAYLAND_DESC=		Enable support for the Wayland platform in EGL
+WAYLAND_LIB_DEPENDS=	libwayland-client.so:graphics/wayland \
+			libwayland-server.so:graphics/wayland
+
 .include <bsd.port.options.mk>
-.include "${.CURDIR}/Makefile.common"
+.include "${.CURDIR}/../../graphics/mesa-dri/Makefile.common"
+
+CONFIGURE_ARGS+=	--with-dri-drivers=swrast --with-gallium-drivers=swrast
 
-MESA_BUILD_WRKSRC=	src/mapi src/glx
-MESA_INSTALL_WRKSRC=	src/glx
+# libEGL needs gallium enabled which depends on llvm
+.if "${MESA_LLVM_VER}" != ""
+.if ${PORT_OPTIONS:MWAYLAND}
+CONFIGURE_ARGS+=	--with-egl-platforms=x11,drm,wayland
+.else
+CONFIGURE_ARGS+=        --with-egl-platforms=x11,drm
+.endif
+PLIST_SUB+=		EGL=""	
+.else
+CONFIGURE_ARGS+=        --disable-egl
+PLIST_SUB+=		EGL="@comment "
+.if ${PORT_OPTIONS:MWAYLAND}
+IGNORE= WAYLAND is an option for EGL and thus only valid on platforms with LLVM
+.endif
+.endif 
+
+MESA_BUILD_WRKSRC=	src/mapi
+MESA_INSTALL_WRKSRC=	src/mapi
+
+.if ${PORT_OPTIONS:MWAYLAND}
+MESA_BUILD_WRKSRC+=	src/egl/wayland/wayland-drm src/egl/wayland/wayland-egl
+MESA_INSTALL_WRKSRC+=	src/egl/wayland/wayland-egl
+.endif
+
+MESA_BUILD_WRKSRC+=	src/gbm src/glx
+MESA_INSTALL_WRKSRC+=	src/gbm src/glx
+
+.if "${MESA_LLVM_VER}" != ""
+MESA_BUILD_WRKSRC+=	src/egl
+MESA_INSTALL_WRKSRC+=	src/egl
+.endif
 
-.include "${.CURDIR}/Makefile.targets"
+.include "${.CURDIR}/../../graphics/mesa-dri/Makefile.targets"
 
 post-install:
 	@cd ${WRKSRC}/src && ${SETENV} DESTDIR=${STAGEDIR} \

Modified: head/graphics/mesa-libs/pkg-descr
==============================================================================
--- head/graphics/libGL/pkg-descr	Fri May 12 18:43:37 2017	(r440698)
+++ head/graphics/mesa-libs/pkg-descr	Fri May 12 18:46:53 2017	(r440699)
@@ -1,4 +1,5 @@
-This package contains the OpenGL library, which can perform rendering over GLX
-or using the Direct Rendering Infrastructure.
+This package contains the Mesa OpenGL libraries for GLX and EGL clients.
+These include libEGL, libGL, and libglesv2 as well as utlity libraries
+libglapi and gbm.
 
-WWW: http://www.freedesktop.org/Software/xorg
+WWW: http://www.mesa3d.org/

Modified: head/graphics/mesa-libs/pkg-plist
==============================================================================
--- head/graphics/libGL/pkg-plist	Fri May 12 18:43:37 2017	(r440698)
+++ head/graphics/mesa-libs/pkg-plist	Fri May 12 18:46:53 2017	(r440699)
@@ -1,3 +1,8 @@
+%%EGL%%include/EGL/egl.h
+%%EGL%%include/EGL/eglext.h
+%%EGL%%include/EGL/eglextchromium.h
+%%EGL%%include/EGL/eglmesaext.h
+%%EGL%%include/EGL/eglplatform.h
 include/GL/gl.h
 include/GL/gl_mangle.h
 include/GL/glcorearb.h
@@ -5,7 +10,36 @@ include/GL/glext.h
 include/GL/glx.h
 include/GL/glx_mangle.h
 include/GL/glxext.h
+include/GLES2/gl2.h
+include/GLES2/gl2ext.h
+include/GLES2/gl2platform.h
+include/GLES3/gl3.h
+include/GLES3/gl31.h
+include/GLES3/gl32.h
+include/GLES3/gl3ext.h
+include/GLES3/gl3platform.h
+%%EGL%%include/KHR/khrplatform.h
+include/gbm.h
+%%EGL%%lib/libEGL.so
+%%EGL%%lib/libEGL.so.1
+%%EGL%%lib/libEGL.so.1.0.0
 lib/libGL.so
 lib/libGL.so.1
 lib/libGL.so.1.2.0
+lib/libGLESv2.so
+lib/libGLESv2.so.2
+lib/libGLESv2.so.2.0.0
+lib/libgbm.so
+lib/libgbm.so.1
+lib/libgbm.so.1.0.0
+lib/libglapi.so
+lib/libglapi.so.0
+lib/libglapi.so.0.0.0
+%%WAYLAND%%lib/libwayland-egl.so
+%%WAYLAND%%lib/libwayland-egl.so.1
+%%WAYLAND%%lib/libwayland-egl.so.1.0.0
+%%EGL%%libdata/pkgconfig/egl.pc
+libdata/pkgconfig/gbm.pc
 libdata/pkgconfig/gl.pc
+libdata/pkgconfig/glesv2.pc
+%%WAYLAND%%libdata/pkgconfig/wayland-egl.pc

Modified: head/graphics/s2tc/Makefile
==============================================================================
--- head/graphics/s2tc/Makefile	Fri May 12 18:43:37 2017	(r440698)
+++ head/graphics/s2tc/Makefile	Fri May 12 18:46:53 2017	(r440699)
@@ -11,7 +11,7 @@ COMMENT=	Subset of a well-known texture 
 LICENSE=	MIT
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-BUILD_DEPENDS=	libGL>=9.1.7:graphics/libGL
+BUILD_DEPENDS=	mesa-libs>=0:graphics/mesa-libs
 TEST_DEPENDS=	convert:graphics/ImageMagick \
 		nvcompress:graphics/nvidia-texture-tools \
 		wget:ftp/wget

Modified: head/graphics/wayland/Makefile
==============================================================================
--- head/graphics/wayland/Makefile	Fri May 12 18:43:37 2017	(r440698)
+++ head/graphics/wayland/Makefile	Fri May 12 18:46:53 2017	(r440699)
@@ -19,7 +19,7 @@
 # and keep diff with upstream minimal.
 
 PORTNAME=	wayland
-PORTVERSION=	1.12.0
+PORTVERSION=	1.13.0
 CATEGORIES=	graphics wayland
 MASTER_SITES=	http://wayland.freedesktop.org/releases/
 
@@ -29,7 +29,7 @@ COMMENT=	Wayland composite "server"
 LICENSE=	MIT
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-LIB_DEPENDS= libexpat.so:textproc/expat2 \
+LIB_DEPENDS=	libexpat.so:textproc/expat2 \
 		libffi.so:devel/libffi \
 		libepoll-shim.so:devel/libepoll-shim
 

Modified: head/graphics/wayland/distinfo
==============================================================================
--- head/graphics/wayland/distinfo	Fri May 12 18:43:37 2017	(r440698)
+++ head/graphics/wayland/distinfo	Fri May 12 18:46:53 2017	(r440699)
@@ -1,3 +1,3 @@
-TIMESTAMP = 1481659324
-SHA256 (wayland-1.12.0.tar.xz) = d6b4135cba0188abcb7275513c72dede751d6194f6edc5b82183a3ba8b821ab1
-SIZE (wayland-1.12.0.tar.xz) = 379520
+TIMESTAMP = 1493984926
+SHA256 (wayland-1.13.0.tar.xz) = 69b052c031a61e89af7cc8780893d0da1e301492352aa449dee9345043e6fe51
+SIZE (wayland-1.13.0.tar.xz) = 414508

Modified: head/graphics/wayland/files/patch-Makefile.am
==============================================================================
--- head/graphics/wayland/files/patch-Makefile.am	Fri May 12 18:43:37 2017	(r440698)
+++ head/graphics/wayland/files/patch-Makefile.am	Fri May 12 18:46:53 2017	(r440699)
@@ -1,4 +1,4 @@
---- Makefile.am.orig	2016-02-29 23:30:58 UTC
+--- Makefile.am.orig	2017-05-05 11:54:01 UTC
 +++ Makefile.am
 @@ -73,7 +73,7 @@ nodist_include_HEADERS =			\
  	protocol/wayland-client-protocol.h
@@ -18,7 +18,7 @@
  libwayland_client_la_LDFLAGS = -version-info 3:0:3
  libwayland_client_la_SOURCES =			\
  	src/wayland-client.c
-@@ -186,7 +186,7 @@ libtest_runner_la_LIBADD =			\
+@@ -198,7 +198,7 @@ libtest_runner_la_LIBADD =			\
  	libwayland-util.la			\
  	libwayland-client.la			\
  	libwayland-server.la			\

Modified: head/graphics/wayland/files/patch-src_wayland-server.c
==============================================================================
--- head/graphics/wayland/files/patch-src_wayland-server.c	Fri May 12 18:43:37 2017	(r440698)
+++ head/graphics/wayland/files/patch-src_wayland-server.c	Fri May 12 18:46:53 2017	(r440699)
@@ -1,5 +1,5 @@
---- src/wayland-server.c.orig	2016-09-20 17:33:11.000000000 +0000
-+++ src/wayland-server.c	2016-12-13 20:07:06.878000000 +0000
+--- src/wayland-server.c.orig	2017-02-07 22:59:06 UTC
++++ src/wayland-server.c
 @@ -25,6 +25,8 @@
  
  #define _GNU_SOURCE
@@ -21,10 +21,10 @@
  #include "wayland-util.h"
  #include "wayland-private.h"
  #include "wayland-server.h"
-@@ -79,7 +86,13 @@
+@@ -79,7 +86,13 @@ struct wl_client {
  	struct wl_list link;
  	struct wl_map objects;
- 	struct wl_signal destroy_signal;
+ 	struct wl_priv_signal destroy_signal;
 +#ifdef HAVE_SYS_UCRED_H
 +	/* FreeBSD */
 +	struct xucred xucred;
@@ -33,9 +33,9 @@
  	struct ucred ucred;
 +#endif
  	int error;
- 	struct wl_signal resource_created_signal;
+ 	struct wl_priv_signal resource_created_signal;
  };
-@@ -466,10 +479,20 @@
+@@ -503,10 +516,20 @@ wl_client_create(struct wl_display *disp
  	if (!client->source)
  		goto err_client;
  
@@ -56,7 +56,7 @@
  
  	client->connection = wl_connection_create(fd);
  	if (client->connection == NULL)
-@@ -523,12 +546,23 @@
+@@ -560,12 +583,23 @@ WL_EXPORT void
  wl_client_get_credentials(struct wl_client *client,
  			  pid_t *pid, uid_t *uid, gid_t *gid)
  {

Modified: head/graphics/wayland/files/patch-src_wayland-shm.c
==============================================================================
--- head/graphics/wayland/files/patch-src_wayland-shm.c	Fri May 12 18:43:37 2017	(r440698)
+++ head/graphics/wayland/files/patch-src_wayland-shm.c	Fri May 12 18:46:53 2017	(r440699)
@@ -1,4 +1,4 @@
---- src/wayland-shm.c.orig	2016-03-09 00:55:02 UTC
+--- src/wayland-shm.c.orig	2016-11-18 00:32:40 UTC
 +++ src/wayland-shm.c
 @@ -30,6 +30,8 @@
  
@@ -9,7 +9,7 @@
  #include <stdbool.h>
  #include <stdio.h>
  #include <stdlib.h>
-@@ -57,6 +59,9 @@ struct wl_shm_pool {
+@@ -59,6 +61,9 @@ struct wl_shm_pool {
  	char *data;
  	int32_t size;
  	int32_t new_size;
@@ -19,7 +19,7 @@
  };
  
  struct wl_shm_buffer {
-@@ -74,15 +79,24 @@ struct wl_shm_sigbus_data {
+@@ -76,15 +81,24 @@ struct wl_shm_sigbus_data {
  	int fallback_mapping_used;
  };
  
@@ -45,7 +45,7 @@
  	if (data == MAP_FAILED) {
  		wl_resource_post_error(pool->resource,
  				       WL_SHM_ERROR_INVALID_FD,
-@@ -108,6 +122,10 @@ shm_pool_unref(struct wl_shm_pool *pool,
+@@ -110,6 +124,10 @@ shm_pool_unref(struct wl_shm_pool *pool,
  	if (pool->internal_refcount + pool->external_refcount)
  		return;
  
@@ -56,7 +56,7 @@
  	munmap(pool->data, pool->size);
  	free(pool);
  }
-@@ -221,6 +239,73 @@ shm_pool_destroy(struct wl_client *clien
+@@ -223,6 +241,73 @@ shm_pool_destroy(struct wl_client *clien
  	wl_resource_destroy(resource);
  }
  
@@ -130,7 +130,7 @@
  static void
  shm_pool_resize(struct wl_client *client, struct wl_resource *resource,
  		int32_t size)
-@@ -282,7 +367,14 @@ shm_create_pool(struct wl_client *client
+@@ -284,7 +369,14 @@ shm_create_pool(struct wl_client *client
  				       "failed mmap fd %d", fd);
  		goto err_free;
  	}

Modified: head/graphics/wayland/files/patch-tests_connection-test.c
==============================================================================
--- head/graphics/wayland/files/patch-tests_connection-test.c	Fri May 12 18:43:37 2017	(r440698)

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201705121846.v4CIkro3074476>