pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

MesaLib-dfbsd: Update wip/MesaLib-dfbsd to 17.0.1



Module Name:	pkgsrc-wip
Committed By:	David Shao <davshao%gmail.com@localhost>
Pushed By:	dshao
Date:		Mon Mar 6 21:01:26 2017 -0800
Changeset:	a1b0f1c2fe89ce02e8ed1f68ddf9e02f102e2e78

Modified Files:
	MesaLib-dfbsd/Makefile
	MesaLib-dfbsd/PLIST
	MesaLib-dfbsd/distinfo
	MesaLib-dfbsd/dri.mk
	MesaLib-dfbsd/options.mk
	MesaLib-dfbsd/patches/patch-src_compiler_glsl_glsl__parser__extras.cpp
	MesaLib-dfbsd/patches/patch-src_egl_drivers_dri2_platform__x11.c
	MesaLib-dfbsd/patches/patch-src_egl_main_eglglobals.c
	MesaLib-dfbsd/patches/patch-src_gallium_auxiliary_util_u__network.c
	MesaLib-dfbsd/patches/patch-src_gallium_drivers_nouveau_nouveau__vp3__video.c
	MesaLib-dfbsd/patches/patch-src_gallium_state__trackers_clover_llvm_invocation.cpp
	MesaLib-dfbsd/patches/patch-src_gallium_state__trackers_clover_llvm_metadata.hpp
	MesaLib-dfbsd/patches/patch-src_gallium_winsys_radeon_drm_radeon__drm__winsys.c
	MesaLib-dfbsd/patches/patch-src_gallium_winsys_svga_drm_vmw__screen__ioctl.c
	MesaLib-dfbsd/patches/patch-src_glsl_ralloc.c
	MesaLib-dfbsd/patches/patch-src_glx_glxclient.h
	MesaLib-dfbsd/patches/patch-src_intel_tools_aubinator.c
	MesaLib-dfbsd/patches/patch-src_mapi_glapi_gen_gl__gentable.py
	MesaLib-dfbsd/patches/patch-src_mesa_drivers_dri_Makefile.in
	MesaLib-dfbsd/patches/patch-src_mesa_drivers_dri_common_Makefile.in
	MesaLib-dfbsd/patches/patch-src_mesa_drivers_dri_i915_intel__screen.c
	MesaLib-dfbsd/patches/patch-src_mesa_drivers_dri_i965_intel__screen.c
	MesaLib-dfbsd/patches/patch-src_mesa_drivers_dri_swrast_swrast.c
	MesaLib-dfbsd/patches/patch-src_mesa_main_context.c
	MesaLib-dfbsd/patches/patch-src_mesa_main_extensions.c
	MesaLib-dfbsd/patches/patch-src_mesa_tnl_t__pipeline.c
	MesaLib-dfbsd/patches/patch-src_mesa_x86_common__x86.c
	MesaLib-dfbsd/patches/patch-src_util_u__atomic.h
	MesaLib-dfbsd/patches/patch-src_util_u__endian.h
Added Files:
	MesaLib-dfbsd/patches/patch-include_c11_threads__posix.h
	MesaLib-dfbsd/patches/patch-src_mapi_glapi_glapi__gentable.c
	MesaLib-dfbsd/patches/patch-src_mesa_x86_assyntax.h
Removed Files:
	MesaLib-dfbsd/patches/patch-configure
	MesaLib-dfbsd/patches/patch-include_GL_glxext.h
	MesaLib-dfbsd/patches/patch-src_gallium_auxiliary_util_u__math.h
	MesaLib-dfbsd/patches/patch-src_gallium_drivers_nouveau_codegen_nv50__ir__peephole.cpp

Log Message:
MesaLib-dfbsd: Update wip/MesaLib-dfbsd to 17.0.1

Changes:
* Bug fix release.  Proper directory on master not yet created.

* Merged patches from FreeBSD ports mesa 13.0.5.

* Added options for vdpau, vaapi, dri3.  Tried to account for
  renamed libraries for vdpau from mesa 11 series.

* Grep-ed every __NetBSD__ in code and inserted matching
  __FreeBSD__ or __DragonFly__ when appropriate.

* configure patches no longer relevant or even applicable.

* Deleted patches for restrict keyword in c++.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=a1b0f1c2fe89ce02e8ed1f68ddf9e02f102e2e78

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 MesaLib-dfbsd/Makefile                             |  6 +-
 MesaLib-dfbsd/PLIST                                | 24 ++++++
 MesaLib-dfbsd/distinfo                             | 63 ++++++++--------
 MesaLib-dfbsd/dri.mk                               |  3 +-
 MesaLib-dfbsd/options.mk                           | 85 ++++++++++++++++++----
 MesaLib-dfbsd/patches/patch-configure              | 17 -----
 MesaLib-dfbsd/patches/patch-include_GL_glxext.h    | 17 -----
 .../patches/patch-include_c11_threads__posix.h     | 16 ++++
 ...atch-src_compiler_glsl_glsl__parser__extras.cpp |  4 +-
 .../patch-src_egl_drivers_dri2_platform__x11.c     |  4 +-
 .../patches/patch-src_egl_main_eglglobals.c        |  2 +-
 .../patch-src_gallium_auxiliary_util_u__math.h     | 31 --------
 .../patch-src_gallium_auxiliary_util_u__network.c  |  2 +-
 ..._drivers_nouveau_codegen_nv50__ir__peephole.cpp | 25 -------
 ...c_gallium_drivers_nouveau_nouveau__vp3__video.c |  4 +-
 ...lium_state__trackers_clover_llvm_invocation.cpp | 34 +++++----
 ...allium_state__trackers_clover_llvm_metadata.hpp |  8 +-
 ...gallium_winsys_radeon_drm_radeon__drm__winsys.c |  4 +-
 ...rc_gallium_winsys_svga_drm_vmw__screen__ioctl.c |  2 +-
 MesaLib-dfbsd/patches/patch-src_glsl_ralloc.c      | 11 ++-
 MesaLib-dfbsd/patches/patch-src_glx_glxclient.h    |  4 +-
 .../patches/patch-src_intel_tools_aubinator.c      |  8 +-
 .../patch-src_mapi_glapi_gen_gl__gentable.py       |  4 +-
 .../patches/patch-src_mapi_glapi_glapi__gentable.c | 15 ++++
 .../patches/patch-src_mesa_drivers_dri_Makefile.in |  4 +-
 .../patch-src_mesa_drivers_dri_common_Makefile.in  |  4 +-
 ...patch-src_mesa_drivers_dri_i915_intel__screen.c |  2 +-
 ...patch-src_mesa_drivers_dri_i965_intel__screen.c |  2 +-
 .../patch-src_mesa_drivers_dri_swrast_swrast.c     |  4 +-
 .../patches/patch-src_mesa_main_context.c          |  8 +-
 .../patches/patch-src_mesa_main_extensions.c       |  6 +-
 .../patches/patch-src_mesa_tnl_t__pipeline.c       | 11 ++-
 .../patches/patch-src_mesa_x86_assyntax.h          | 15 ++++
 .../patches/patch-src_mesa_x86_common__x86.c       |  2 +-
 MesaLib-dfbsd/patches/patch-src_util_u__atomic.h   |  6 +-
 MesaLib-dfbsd/patches/patch-src_util_u__endian.h   |  5 +-
 36 files changed, 254 insertions(+), 208 deletions(-)

diffs:
diff --git a/MesaLib-dfbsd/Makefile b/MesaLib-dfbsd/Makefile
index 20138d1f9a..9c47299b95 100644
--- a/MesaLib-dfbsd/Makefile
+++ b/MesaLib-dfbsd/Makefile
@@ -1,9 +1,11 @@
 # $NetBSD: Makefile,v 1.129 2016/10/20 12:06:06 wiz Exp $
 
-DISTNAME=	mesa-17.0.0
+DISTNAME=	mesa-17.0.1
 PKGNAME=	${DISTNAME:S/mesa/MesaLib/}
 CATEGORIES=	graphics x11
-MASTER_SITES=	ftp://ftp.freedesktop.org/pub/mesa/${PKGVERSION_NOREV}/
+# Waiting for 17.0.1 subdirectory to be created
+# MASTER_SITES=	ftp://ftp.freedesktop.org/pub/mesa/${PKGVERSION_NOREV}/
+MASTER_SITES=	ftp://ftp.freedesktop.org/pub/mesa/
 EXTRACT_SUFX=	.tar.xz
 
 MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
diff --git a/MesaLib-dfbsd/PLIST b/MesaLib-dfbsd/PLIST
index f38e67336a..2751c7d8f5 100644
--- a/MesaLib-dfbsd/PLIST
+++ b/MesaLib-dfbsd/PLIST
@@ -65,3 +65,27 @@ ${PLIST.dri}lib/pkgconfig/glesv2.pc
 ${PLIST.wayland}lib/pkgconfig/wayland-egl.pc
 ${PLIST.xatracker}lib/pkgconfig/xatracker.pc
 share/examples/MesaLib/drirc
+${PLIST.nouveau}${PLIST.vdpau}lib/vdpau/libvdpau_nouveau.so
+${PLIST.nouveau}${PLIST.vdpau}lib/vdpau/libvdpau_nouveau.so.1
+${PLIST.nouveau}${PLIST.vdpau}lib/vdpau/libvdpau_nouveau.so.1.0
+${FREEBSDVDPAU}${PLIST.nouveau}${PLIST.vdpau}lib/vdpau/libvdpau_nouveau.so.1.0.0
+${PLIST.vdpau}lib/vdpau/libvdpau_r300.so
+${PLIST.vdpau}lib/vdpau/libvdpau_r300.so.1
+${PLIST.vdpau}lib/vdpau/libvdpau_r300.so.1.0
+${FREEBSDVDPAU}${PLIST.vdpau}lib/vdpau/libvdpau_r300.so.1.0.0
+${PLIST.vdpau}lib/vdpau/libvdpau_r600.so
+${PLIST.vdpau}lib/vdpau/libvdpau_r600.so.1
+${PLIST.vdpau}lib/vdpau/libvdpau_r600.so.1.0
+${FREEBSDVDPAU}${PLIST.vdpau}lib/vdpau/libvdpau_r600.so.1.0.0
+${PLIST.vdpau}lib/vdpau/libvdpau_radeonsi.so
+${PLIST.vdpau}lib/vdpau/libvdpau_radeonsi.so.1
+${PLIST.vdpau}lib/vdpau/libvdpau_radeonsi.so.1.0
+${FREEBSDVDPAU}${PLIST.vdpau}lib/vdpau/libvdpau_radeonsi.so.1.0.0
+@comment ${PLIST.vdpau}lib/dri/nouveau_drv_video.la
+${PLIST.nouveau}${PLIST.vaapi}lib/dri/nouveau_drv_video.so
+@comment ${PLIST.vdpau}lib/dri/r600_drv_video.la
+${PLIST.vaapi}lib/dri/r600_drv_video.so
+@comment ${PLIST.vdpau}lib/dri/radeonsi_drv_video.la
+${PLIST.vaapi}lib/dri/radeonsi_drv_video.so
+@comment ${PLIST.vaapi}lib/dri/gallium_drv_video.la
+@comment ${PLIST.vaapi}lib/dri/gallium_drv_video.so
diff --git a/MesaLib-dfbsd/distinfo b/MesaLib-dfbsd/distinfo
index 6c736a7829..cb1b046597 100644
--- a/MesaLib-dfbsd/distinfo
+++ b/MesaLib-dfbsd/distinfo
@@ -1,55 +1,54 @@
 $NetBSD: distinfo,v 1.117 2016/05/18 12:55:28 wiz Exp $
 
-SHA1 (mesa-17.0.0.tar.xz) = a3b4f51e8749bab142cbec4591b2136e652b354e
-RMD160 (mesa-17.0.0.tar.xz) = 48f4bc5903c4af2cf9dcce6286e30c44d67e31dd
-SHA512 (mesa-17.0.0.tar.xz) = 880364d63fc252efff27fb324a5a9c037f7197819db0b543f695687849db15deabbb4433d1850d005c2c2436d1c1a01f8533f0d79c71c08aaf79d562b35a753d
-Size (mesa-17.0.0.tar.xz) = 9442580 bytes
-SHA1 (patch-configure) = 8ec2040e8ab6925753ce58a5c7fd9fa25a65f66f
-SHA1 (patch-include_GL_glxext.h) = 830902f2d38a8395cda682c059fc5223e1b0e89e
-SHA1 (patch-src_compiler_glsl_glsl__parser__extras.cpp) = c5046ce848d0b1ea428e29611b6822d4f4ab970d
+SHA1 (mesa-17.0.1.tar.xz) = 7888c44300f25debb71d962a46d568349c3a081c
+RMD160 (mesa-17.0.1.tar.xz) = 0d9fcffaaee82f0f0ef43dc06504d053bfa93d18
+SHA512 (mesa-17.0.1.tar.xz) = f3a807fbf30327a1dccb690e484276ab1b2b1e33b0440884b6476607e08aa3513d5c9d4b6dd345415decb93747d334c70bffe9e49eae787b48ef6c08989aeb7c
+Size (mesa-17.0.1.tar.xz) = 9447712 bytes
+SHA1 (patch-include_c11_threads__posix.h) = 0f80c61a2fcfb2ce039fec6b50f126c3e84c33f9
+SHA1 (patch-src_compiler_glsl_glsl__parser__extras.cpp) = a08fc533940472bfa7634f0a2285e85d42c7a4e2
 SHA1 (patch-src_egl_drivers_dri2_platform__drm.c) = 75144a5c2cbcda3f7ccd708ff2ac03c823c045d7
-SHA1 (patch-src_egl_drivers_dri2_platform__x11.c) = 04b6ef8e755f226fbe3e6f2bea6c9e2a56a783ca
-SHA1 (patch-src_egl_main_eglglobals.c) = 194954826564d1053544a88c771019faf4d07df2
+SHA1 (patch-src_egl_drivers_dri2_platform__x11.c) = 942cfdb72bcb52057dea0a02a8be5629920fd4fb
+SHA1 (patch-src_egl_main_eglglobals.c) = 07a7cc6df618c2e6d74406b794a565bd728a5dd8
 SHA1 (patch-src_gallium_auxiliary_pipe-loader_pipe__loader__drm.c) = fef19b60f00e6450ca48eebd6e3625e177fef689
 SHA1 (patch-src_gallium_auxiliary_util_u__format__tests.c) = 4d5e4677c2825778c43440ab131b8807f6840975
-SHA1 (patch-src_gallium_auxiliary_util_u__math.h) = 812e4a5291aea47e06505f09891e0434c4d9c34d
-SHA1 (patch-src_gallium_auxiliary_util_u__network.c) = 283f505af780071dc9fd7914f8065e3fb7d8a4fd
+SHA1 (patch-src_gallium_auxiliary_util_u__network.c) = b54de38b3663fa820728a6b05f59082bcbd839df
 SHA1 (patch-src_gallium_auxiliary_util_u__network.h) = c6106d67b4fa9db0d790474182d6e0ce0c5da677
-SHA1 (patch-src_gallium_drivers_nouveau_codegen_nv50__ir__peephole.cpp) = 5fc2ef7eafac3006896af96bac8176c79b17cfdc
-SHA1 (patch-src_gallium_drivers_nouveau_nouveau__vp3__video.c) = ae1b6eb4df3e4db0f37e44118cdf69b16f3c471e
+SHA1 (patch-src_gallium_drivers_nouveau_nouveau__vp3__video.c) = 04f95784c3270c9bb7e95377982e217962481525
 SHA1 (patch-src_gallium_drivers_nouveau_nv50_nv84__video.c) = 1b4239fe053523835ecac006894bdb0cde0ee626
-SHA1 (patch-src_gallium_state__trackers_clover_llvm_invocation.cpp) = ab15bae0162ad6d25218d5992de0329a99cafc51
-SHA1 (patch-src_gallium_state__trackers_clover_llvm_metadata.hpp) = 21973190b9b9521c2c4df20a1982ca4da3c8e90b
+SHA1 (patch-src_gallium_state__trackers_clover_llvm_invocation.cpp) = 4e07c31b214183c01a636ada10b5885200bac359
+SHA1 (patch-src_gallium_state__trackers_clover_llvm_metadata.hpp) = 60c137f7d37f7effe8eb4356d0a20db6945e067f
 SHA1 (patch-src_gallium_targets_dri_Makefile.in) = 2306f133b89adf8deddfe0f8085af91768e57975
-SHA1 (patch-src_gallium_winsys_radeon_drm_radeon__drm__winsys.c) = 94e05c38ab2a8d2bcc25dd477cbd1fd5d681182a
-SHA1 (patch-src_gallium_winsys_svga_drm_vmw__screen__ioctl.c) = e4b891e8b4ebe5b8e8c7b8c2c1dbed11b9c417df
-SHA1 (patch-src_glsl_ralloc.c) = 63c8e40b9f74404033c20c5c9a00c5f6d8df6433
+SHA1 (patch-src_gallium_winsys_radeon_drm_radeon__drm__winsys.c) = 967e8b0d6100f4584fea8635168e3eed31b4deb9
+SHA1 (patch-src_gallium_winsys_svga_drm_vmw__screen__ioctl.c) = 4c0c8b511aee89ec390f2d790eb5def29a0743e1
+SHA1 (patch-src_glsl_ralloc.c) = b1463dab0680f53b254f41be358fd58bd5456e59
 SHA1 (patch-src_glx_apple_apple__glapi.c) = df70afc24759978f954ac3a774a14e6518dde97a
-SHA1 (patch-src_glx_glxclient.h) = e15256851559dafb7a86e1eb7e9d6afc86de581b
+SHA1 (patch-src_glx_glxclient.h) = f0358179ae397bc8677597b0ccb9a471f40f15de
 SHA1 (patch-src_glx_glxcurrent.c) = 713f75bcafb186c7123d19a6aae3deaed9d5fa69
-SHA1 (patch-src_intel_tools_aubinator.c) = d4176961b613e86436edec8c3d5aa066279df27d
+SHA1 (patch-src_intel_tools_aubinator.c) = 37a0a2de6de5bc70a2be6f5aa6dd64a16c88e5c0
 SHA1 (patch-src_mapi_entry.c) = b0af9f644ed5be023010b44981827bfce5986d79
 SHA1 (patch-src_mapi_entry__x86-64__tls.h) = b100d1dd432a00fe4df010d488491fb1367fa6d4
 SHA1 (patch-src_mapi_entry__x86__tls.h) = a763f1f1a5e4eb458f7a654266e53e6470d3a882
-SHA1 (patch-src_mapi_glapi_gen_gl__gentable.py) = 53026e520a510e54494760a3fa05af6f15dfb9d8
+SHA1 (patch-src_mapi_glapi_gen_gl__gentable.py) = 0b1d4ef3f78a9b3726ef7f9921608a48a5e4ac56
+SHA1 (patch-src_mapi_glapi_glapi__gentable.c) = 7341ef8b8264e5d0f4b6078e4fc7d5ed1d03740c
 SHA1 (patch-src_mapi_table.h) = 272d00c45f742303a5ff84da82c1cd585846d6e1
 SHA1 (patch-src_mapi_u__current.c) = 1731375d82119be326b35d141d7879e083d6d620
 SHA1 (patch-src_mapi_u__current.h) = 214dd29cb0c4fe127eb1157b04b12ddfc455b4b0
-SHA1 (patch-src_mesa_drivers_dri_Makefile.in) = 2fb1471045ae88eaa4fca162bf86330b833167fd
-SHA1 (patch-src_mesa_drivers_dri_common_Makefile.in) = 5e160f7d92c2e9f3fa36e52a082a496af67e634e
+SHA1 (patch-src_mesa_drivers_dri_Makefile.in) = 3fce85c54eece5d68182069a275e66740f458d64
+SHA1 (patch-src_mesa_drivers_dri_common_Makefile.in) = 88f1bb2ac2905a418dc476e1619d2420c421de63
 SHA1 (patch-src_mesa_drivers_dri_common_xmlconfig.c) = ad6f459e6df955c6a06cde7e03de7d0324b0281f
-SHA1 (patch-src_mesa_drivers_dri_i915_intel__screen.c) = 03505d0eb562fe63e50875413cce119980b41b43
+SHA1 (patch-src_mesa_drivers_dri_i915_intel__screen.c) = 5a49fc290aa95f2e817442f02f9f71cca134a5c0
 SHA1 (patch-src_mesa_drivers_dri_i965_brw__context.h) = 0af70340ffe9600932d73ee9b24202dbc3bc1967
-SHA1 (patch-src_mesa_drivers_dri_i965_intel__screen.c) = 1eebb4144c1ddf5f1d0fdde31c168d33e1ad0bee
+SHA1 (patch-src_mesa_drivers_dri_i965_intel__screen.c) = fc921f63684489d002253d898279105ce566e8b3
 SHA1 (patch-src_mesa_drivers_dri_i965_intel__tiled__memcpy.c) = c0d465fb65939ead71c9d02b6f6793824dbf441d
-SHA1 (patch-src_mesa_drivers_dri_swrast_swrast.c) = b8a6cca517e1cccbdb2c59cf67a6d2481cdfebd4
-SHA1 (patch-src_mesa_main_context.c) = 695b0e04cbd08dfed46b4dae5f9602b35e21f5b3
-SHA1 (patch-src_mesa_main_extensions.c) = d650d7ddfe22ddbcd8a4c24b64feb27126521ae0
+SHA1 (patch-src_mesa_drivers_dri_swrast_swrast.c) = e173d4870ea54b920c4683ed15a6259babf988d1
+SHA1 (patch-src_mesa_main_context.c) = c7514c20286eca73ac9e914899752b7d16322957
+SHA1 (patch-src_mesa_main_extensions.c) = f2fef39e0605e28b13fcab505f930b5fcb44b4ce
 SHA1 (patch-src_mesa_main_macros.h) = a73e93653773a2c121aa8e5c14bc558cce63f94a
 SHA1 (patch-src_mesa_main_shader__query.cpp) = 3f9c31645d87855759def11344dee16af23c7be3
-SHA1 (patch-src_mesa_tnl_t__pipeline.c) = afc7d5f27aeadacc7c6a762e5aa892e01a0c1317
-SHA1 (patch-src_mesa_x86_common__x86.c) = bdac91384d67ad0238ecd4cdcf5cfc787952a3d9
+SHA1 (patch-src_mesa_tnl_t__pipeline.c) = 5033aaf34fc8c8cf484280270dfc220c17fc366a
+SHA1 (patch-src_mesa_x86_assyntax.h) = c28c4ed2390118aae7f3bc09d459e51119fc8405
+SHA1 (patch-src_mesa_x86_common__x86.c) = a96746fdade9186804fdfcc24ad3e2da4c63e43e
 SHA1 (patch-src_util_strndup.c) = b8dfae71f1b219e44f884b8fc6f89a86201353c3
 SHA1 (patch-src_util_strndup.h) = a48a0ebefbc79a770db4baa590d3f858bb52cacf
-SHA1 (patch-src_util_u__atomic.h) = 4a567b6fe5bf67fb7f386fa5f37bedb66d593085
-SHA1 (patch-src_util_u__endian.h) = 1ab4cea9eabac5c2d967138f082c57b6c7d524c4
+SHA1 (patch-src_util_u__atomic.h) = beb1df2bb28151bde0405bcae3994107be6813a5
+SHA1 (patch-src_util_u__endian.h) = 64d36c80d34039032239a6740a6a925e075ab72b
diff --git a/MesaLib-dfbsd/dri.mk b/MesaLib-dfbsd/dri.mk
index d0f7b90ce9..55de43b06b 100644
--- a/MesaLib-dfbsd/dri.mk
+++ b/MesaLib-dfbsd/dri.mk
@@ -25,7 +25,8 @@ BUILDLINK_API_DEPENDS.libxcb+=	libxcb>=1.9.3
 .  include "../../x11/dri2proto/buildlink3.mk"
 # XXX these do not have builtin.mk
 .  if ${X11_TYPE} == "modular"
-.    include "../../x11/dri3proto/buildlink3.mk"
+# Change to option to include in options.mk
+# .    include "../../x11/dri3proto/buildlink3.mk"
 .    include "../../x11/libxshmfence/buildlink3.mk"
 .    include "../../x11/presentproto/buildlink3.mk"
 .  endif
diff --git a/MesaLib-dfbsd/options.mk b/MesaLib-dfbsd/options.mk
index 912a1077cc..21945ca3c3 100644
--- a/MesaLib-dfbsd/options.mk
+++ b/MesaLib-dfbsd/options.mk
@@ -2,8 +2,16 @@
 
 PKG_OPTIONS_VAR=		PKG_OPTIONS.MesaLib
 PKG_SUPPORTED_OPTIONS=		llvm dri
-PKG_SUPPORTED_OPTIONS+=		glamor debug xvmc
-PKG_SUGGESTED_OPTIONS=
+PKG_SUPPORTED_OPTIONS+=		glamor xvmc dri3 debug
+PKG_SUPPORTED_OPTIONS+=		vdpau vaapi
+
+PKG_SUGGESTED_OPTIONS+=		vdpau vaapi
+
+PKG_SUGGESTED_OPTIONS+=		dri3
+# dri3 working requires kernel support for dma_buf
+# .if ${OPSYS} == "Linux"
+# PKG_SUGGESTED_OPTIONS+=		dri3
+# .endif
 
 # The LLVM option enables JIT accelerated software rendering and
 # is also required to support the latest RADEON GPUs, so enable it
@@ -23,6 +31,12 @@ PKG_SUGGESTED_OPTIONS+=		llvm
 PKG_SUGGESTED_OPTIONS+=		llvm
 .endif
 
+.if \
+	!empty(MACHINE_PLATFORM:MFreeBSD-1[0-9].*-x86_64) ||	\
+	!empty(MACHINE_PLATFORM:MDragonFly-*-x86_64)
+PKG_SUGGESTED_OPTIONS+=		llvm
+.endif
+
 .if ${OPSYS} == "FreeBSD" || ${OPSYS} == "OpenBSD" ||		\
 	${OPSYS} == "DragonFly" || ${OPSYS} == "Linux" ||	\
 	${OPSYS} == "SunOS" || ${OPSYS} == "NetBSD" ||		\
@@ -30,6 +44,18 @@ PKG_SUGGESTED_OPTIONS+=		llvm
 PKG_SUGGESTED_OPTIONS+=		dri
 .endif
 
+# Use Thread Local Storage in GLX where it is supported by Mesa and works.
+# XXX Fixme
+.if \
+	!empty(MACHINE_PLATFORM:MNetBSD-[789].*-i386) ||	\
+	!empty(MACHINE_PLATFORM:MNetBSD-[789].*-x86_64) ||	\
+	!empty(MACHINE_PLATFORM:MLinux-*-i386) ||		\
+	!empty(MACHINE_PLATFORM:MLinux-*-x86_64) ||		\
+	!empty(MACHINE_PLATFORM:MFreeBSD-1[0-9].*-x86_64) ||	\
+	!empty(MACHINE_PLATFORM:MDragonFly-*-x86_64)
+PKG_SUGGESTED_OPTIONS+=		glamor	
+.endif
+
 .include "../../mk/bsd.options.mk"
 
 # gallium
@@ -38,46 +64,63 @@ PLIST_VARS+=	freedreno ilo i915 i965 nouveau r300 r600 radeonsi	\
 # classic DRI
 PLIST_VARS+=	dri swrast_dri i915_dri nouveau_dri i965_dri radeon_dri r200_dri
 # other features
-PLIST_VARS+=	gbm wayland xatracker osmesa xvmc
+PLIST_VARS+=	gbm wayland xatracker
+PLIST_VARS+=	vaapi vdpau
+PLIST_VARS+=	osmesa xvmc
 
 .if !empty(PKG_OPTIONS:Mdri)
 
 CONFIGURE_ARGS+=	--enable-dri
 CONFIGURE_ARGS+=	--enable-egl
-.if ${OPSYS} != "Darwin"
+
+.if !empty(PKG_OPTIONS:Mdri3)
 CFLAGS+=		-DHAVE_DRI3
 CONFIGURE_ARGS+=	--enable-dri3
+.if ${X11_TYPE} == "modular"
+.include "../../x11/dri3proto/buildlink3.mk"
+.endif
+.else
+CONFIGURE_ARGS+=	--disable-dri3
+.endif
+
+.if ${OPSYS} != "Darwin"
 CONFIGURE_ARGS+=	--enable-gbm
 PLIST.gbm=		yes
 .endif
+
 CONFIGURE_ARGS+=	--enable-texture-float
 CONFIGURE_ARGS+=	--enable-osmesa
 PLIST.osmesa=		yes
 CONFIGURE_ARGS+=	--enable-gles1
 CONFIGURE_ARGS+=	--enable-gles2
 
-# Use Thread Local Storage in GLX where it is supported by Mesa and works.
-# XXX Fixme
-.if \
-	!empty(MACHINE_PLATFORM:MNetBSD-[789].*-i386) ||	\
-	!empty(MACHINE_PLATFORM:MNetBSD-[789].*-x86_64) ||	\
-	!empty(MACHINE_PLATFORM:MLinux-*-i386) ||		\
-	!empty(MACHINE_PLATFORM:MLinux-*-x86_64) ||		\
-	!empty(MACHINE_PLATFORM:MFreeBSD-1[0-9].*-x86_64) ||	\
-	!empty(MACHINE_PLATFORM:MDragonFly-*-x86_64)
-PKG_SUGGESTED_OPTIONS+=		glamor	
+.if !empty(PKG_OPTIONS:Mvdpau)
+.include "../../multimedia/libvdpau/available.mk"
+.if ${VDPAU_AVAILABLE} == "yes"
+PLIST.vdpau=   yes
+.include "../../multimedia/libvdpau/buildlink3.mk"
+.endif
+.endif
+
+.if !empty(PKG_OPTIONS:Mvaapi)
+.include "../../multimedia/libva/available.mk"
+.if ${VAAPI_AVAILABLE} == "yes"
+PLIST.vaapi=   yes
+.include "../../multimedia/libva/buildlink3.mk"
+.endif
 .endif
 
 .if !empty(PKG_OPTIONS:Mglamor)
+
 # Recommended by
 # http://www.freedesktop.org/wiki/Software/Glamor/
-
 CONFIGURE_ARGS+=	--enable-glx-tls
 
 .else
 
 # (EE) Failed to load /usr/pkg/lib/xorg/modules/extensions/libglx.so:
-# /usr/pkg/lib/libGL.so.1: Use of initialized Thread Local Storage with model initial-exec and dlopen is not supported
+# /usr/pkg/lib/libGL.so.1: Use of initialized Thread Local Storage with model
+# initial-exec and dlopen is not supported
 CONFIGURE_ARGS+=	--disable-glx-tls
 
 .endif
@@ -153,6 +196,7 @@ GALLIUM_DRIVERS+=	r600
 FULL_OS_VERSION_CMD=	${UNAME} -r
 FULL_OS_VERSION=	${FULL_OS_VERSION_CMD:sh}
 
+# Base llvm 3.9.x has problems building nouveau support
 .if ${OPSYS} != "FreeBSD" || (empty(FULL_OS_VERSION:M11.0-STABLE) && empty(OS_VERSION:M12.*))
 # nVidia
 PLIST.nouveau=		yes
@@ -167,6 +211,7 @@ DRI_DRIVERS+=		radeon
 PLIST.r200_dri=		yes
 DRI_DRIVERS+=		r200
 
+# Base llvm 3.9.x has problems building nouveau support
 .if ${OPSYS} != "FreeBSD" || (empty(FULL_OS_VERSION:M11.0-STABLE) && empty(OS_VERSION:M12.*))
 # classic DRI nouveau
 PLIST.nouveau_dri=	yes
@@ -233,3 +278,11 @@ CONFIGURE_ARGS+=	--enable-debug
 .include "../../x11/libXvMC/buildlink3.mk"
 PLIST.xvmc=		yes
 .endif
+
+
+# FreeBSD does not generate library names mylib.so.x.y
+.if ${OPSYS} == "FreeBSD"
+PLIST_SUBST+=	FREEBSDVDPAU="@comment "
+.else
+PLIST_SUBST+=	FREEBSDVDPAU=""
+.endif
diff --git a/MesaLib-dfbsd/patches/patch-configure b/MesaLib-dfbsd/patches/patch-configure
deleted file mode 100644
index bc633995d6..0000000000
--- a/MesaLib-dfbsd/patches/patch-configure
+++ /dev/null
@@ -1,17 +0,0 @@
-$NetBSD$
-
---- configure.orig	2017-01-25 13:26:43.000000000 +0000
-+++ configure
-@@ -22308,9 +22308,9 @@ llvm_add_target() {
- strip_unwanted_llvm_flags() {
-     # Use \> (marks the end of the word)
-     echo `$1` | sed \
--        -e 's/-march=\S*//g' \
--        -e 's/-mtune=\S*//g' \
--        -e 's/-mcpu=\S*//g' \
-+	-e 's/-march=[-a-zA-Z0-9]*//g' \
-+	-e 's/-mtune=[-a-zA-Z0-9]*//g' \
-+	-e 's/-mcpu=[-a-zA-Z0-9]*//g' \
-         -e 's/-DNDEBUG\>//g' \
-         -e 's/-D_GNU_SOURCE\>//g' \
-         -e 's/-pedantic\>//g' \
diff --git a/MesaLib-dfbsd/patches/patch-include_GL_glxext.h b/MesaLib-dfbsd/patches/patch-include_GL_glxext.h
deleted file mode 100644
index 876b16d2ce..0000000000
--- a/MesaLib-dfbsd/patches/patch-include_GL_glxext.h
+++ /dev/null
@@ -1,17 +0,0 @@
-$NetBSD: patch-include_GL_glxext.h,v 1.1 2015/04/25 11:19:18 tnn Exp $
-
-Make sure the GLsizeiptr and GLintptr types are defined
-
---- include/GL/glxext.h.orig	2014-10-03 03:59:50.000000000 +0000
-+++ include/GL/glxext.h
-@@ -477,6 +477,10 @@ Bool glXSet3DfxModeMESA (int mode);
- 
- #ifndef GLX_NV_copy_buffer
- #define GLX_NV_copy_buffer 1
-+#ifndef GL_VERSION_1_5
-+typedef ptrdiff_t GLsizeiptr;
-+typedef ptrdiff_t GLintptr;
-+#endif
- typedef void ( *PFNGLXCOPYBUFFERSUBDATANVPROC) (Display *dpy, GLXContext readCtx, GLXContext writeCtx, GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
- typedef void ( *PFNGLXNAMEDCOPYBUFFERSUBDATANVPROC) (Display *dpy, GLXContext readCtx, GLXContext writeCtx, GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
- #ifdef GLX_GLXEXT_PROTOTYPES
diff --git a/MesaLib-dfbsd/patches/patch-include_c11_threads__posix.h b/MesaLib-dfbsd/patches/patch-include_c11_threads__posix.h
new file mode 100644
index 0000000000..d48726fe1a
--- /dev/null
+++ b/MesaLib-dfbsd/patches/patch-include_c11_threads__posix.h
@@ -0,0 +1,16 @@
+$NetBSD$
+
+OpenBSD, FreeBSD, and DragonFly all have pthread_mutex_timedlock
+in their manpages.
+
+--- include/c11/threads_posix.h.orig	2017-02-13 11:55:49.000000000 +0000
++++ include/c11/threads_posix.h
+@@ -43,7 +43,7 @@ Configuration macro:
+     Use pthread_mutex_timedlock() for `mtx_timedlock()'
+     Otherwise use mtx_trylock() + *busy loop* emulation.
+ */
+-#if !defined(__CYGWIN__) && !defined(__APPLE__) && !defined(__NetBSD__)
++#if !defined(__CYGWIN__) && !defined(__APPLE__) && !defined(__NetBSD__) && !defined(__OpenBSD__) && !defined(__FreeBSD__) && !defined(__DragonFly__)
+ #define EMULATED_THREADS_USE_NATIVE_TIMEDLOCK
+ #endif
+ 
diff --git a/MesaLib-dfbsd/patches/patch-src_compiler_glsl_glsl__parser__extras.cpp b/MesaLib-dfbsd/patches/patch-src_compiler_glsl_glsl__parser__extras.cpp
index d912e19e49..575e2cbcbb 100644
--- a/MesaLib-dfbsd/patches/patch-src_compiler_glsl_glsl__parser__extras.cpp
+++ b/MesaLib-dfbsd/patches/patch-src_compiler_glsl_glsl__parser__extras.cpp
@@ -2,9 +2,9 @@ $NetBSD: patch-src_compiler_glsl_glsl__parser__extras.cpp,v 1.1 2016/04/17 00:03
 
 atexit() is not a good idea in a library; use destructor attribute.
 
---- src/compiler/glsl/glsl_parser_extras.cpp.orig	2016-04-04 10:24:28.000000000 +0000
+--- src/compiler/glsl/glsl_parser_extras.cpp.orig	2017-02-13 11:55:49.000000000 +0000
 +++ src/compiler/glsl/glsl_parser_extras.cpp
-@@ -1938,7 +1938,7 @@ extern "C" {
+@@ -2147,7 +2147,7 @@ extern "C" {
   * programs would be invalid.  So this should happen at approximately
   * program exit.
   */
diff --git a/MesaLib-dfbsd/patches/patch-src_egl_drivers_dri2_platform__x11.c b/MesaLib-dfbsd/patches/patch-src_egl_drivers_dri2_platform__x11.c
index bc387318d8..5e848b5acb 100644
--- a/MesaLib-dfbsd/patches/patch-src_egl_drivers_dri2_platform__x11.c
+++ b/MesaLib-dfbsd/patches/patch-src_egl_drivers_dri2_platform__x11.c
@@ -2,9 +2,9 @@ $NetBSD: patch-src_egl_drivers_dri2_platform__x11.c,v 1.2 2016/05/18 12:55:28 wi
 
 Provide compat strndup for older Darwin.
 
---- src/egl/drivers/dri2/platform_x11.c.orig	2016-05-05 12:59:22.000000000 +0000
+--- src/egl/drivers/dri2/platform_x11.c.orig	2017-02-13 11:55:49.000000000 +0000
 +++ src/egl/drivers/dri2/platform_x11.c
-@@ -591,6 +591,23 @@ dri2_x11_local_authenticate(struct dri2_
+@@ -603,6 +603,23 @@ dri2_x11_local_authenticate(struct dri2_
     return EGL_TRUE;
  }
  
diff --git a/MesaLib-dfbsd/patches/patch-src_egl_main_eglglobals.c b/MesaLib-dfbsd/patches/patch-src_egl_main_eglglobals.c
index 9286f9a501..21537d98bd 100644
--- a/MesaLib-dfbsd/patches/patch-src_egl_main_eglglobals.c
+++ b/MesaLib-dfbsd/patches/patch-src_egl_main_eglglobals.c
@@ -2,7 +2,7 @@ $NetBSD$
 
 atexit() is not a good idea in shared libraries.
 
---- src/egl/main/eglglobals.c.orig	2016-11-10 22:05:17.000000000 +0000
+--- src/egl/main/eglglobals.c.orig	2017-02-13 11:55:49.000000000 +0000
 +++ src/egl/main/eglglobals.c
 @@ -72,11 +72,16 @@ struct _egl_global _eglGlobal =
     _EGL_DEBUG_BIT_CRITICAL | _EGL_DEBUG_BIT_ERROR, /* debugTypesEnabled */
diff --git a/MesaLib-dfbsd/patches/patch-src_gallium_auxiliary_util_u__math.h b/MesaLib-dfbsd/patches/patch-src_gallium_auxiliary_util_u__math.h
deleted file mode 100644
index 0c8b6f74fb..0000000000
--- a/MesaLib-dfbsd/patches/patch-src_gallium_auxiliary_util_u__math.h
+++ /dev/null
@@ -1,31 +0,0 @@
-$NetBSD: patch-src_gallium_auxiliary_util_u__math.h,v 1.4 2015/09/26 08:45:02 tnn Exp $
-
-The C99 "restrict" keyword is not valid in C++, but most compilers will
-understand __restrict.
-
---- src/gallium/auxiliary/util/u_math.h.orig	2015-09-11 17:41:47.000000000 +0000
-+++ src/gallium/auxiliary/util/u_math.h
-@@ -709,6 +712,11 @@ util_bswap16(uint16_t n)
-           (n << 8);
- }
- 
-+#if defined(__cplusplus) && !defined(restrict)
-+#define undef_restrict
-+#define restrict __restrict
-+#endif
-+
- static inline void*
- util_memcpy_cpu_to_le32(void * restrict dest, const void * restrict src, size_t n)
- {
-@@ -727,6 +735,11 @@ util_memcpy_cpu_to_le32(void * restrict 
- #endif
- }
- 
-+#if defined(undef_restrict)
-+#undef undef_restrict
-+#undef restrict
-+#endif
-+
- /**
-  * Clamp X to [MIN, MAX].
-  * This is a macro to allow float, int, uint, etc. types.
diff --git a/MesaLib-dfbsd/patches/patch-src_gallium_auxiliary_util_u__network.c b/MesaLib-dfbsd/patches/patch-src_gallium_auxiliary_util_u__network.c
index de17091454..5fa205fc26 100644
--- a/MesaLib-dfbsd/patches/patch-src_gallium_auxiliary_util_u__network.c
+++ b/MesaLib-dfbsd/patches/patch-src_gallium_auxiliary_util_u__network.c
@@ -2,7 +2,7 @@ $NetBSD: patch-src_gallium_auxiliary_util_u__network.c,v 1.1 2015/04/25 11:19:18
 
 BSD has sockets, silence warning about missing implementation.
 
---- src/gallium/auxiliary/util/u_network.c.orig	2014-09-12 21:30:32.000000000 +0000
+--- src/gallium/auxiliary/util/u_network.c.orig	2017-02-13 11:55:49.000000000 +0000
 +++ src/gallium/auxiliary/util/u_network.c
 @@ -7,7 +7,7 @@
  #  include <winsock2.h>
diff --git a/MesaLib-dfbsd/patches/patch-src_gallium_drivers_nouveau_codegen_nv50__ir__peephole.cpp b/MesaLib-dfbsd/patches/patch-src_gallium_drivers_nouveau_codegen_nv50__ir__peephole.cpp
deleted file mode 100644
index 4a2b50df74..0000000000
--- a/MesaLib-dfbsd/patches/patch-src_gallium_drivers_nouveau_codegen_nv50__ir__peephole.cpp
+++ /dev/null
@@ -1,25 +0,0 @@
-$NetBSD: patch-src_gallium_drivers_nouveau_codegen_nv50__ir__peephole.cpp,v 1.1 2015/04/25 11:19:18 tnn Exp $
-
-The C99 "restrict" keyword is not valid in C++, but most compilers will
-understand __restrict.
-
---- src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp.orig	2015-03-28 18:20:39.000000000 +0000
-+++ src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp
-@@ -1530,7 +1530,7 @@ private:
- 
-    bool replaceLdFromLd(Instruction *ld, Record *ldRec);
-    bool replaceLdFromSt(Instruction *ld, Record *stRec);
--   bool replaceStFromSt(Instruction *restrict st, Record *stRec);
-+   bool replaceStFromSt(Instruction *__restrict st, Record *stRec);
- 
-    void addRecord(Instruction *ldst);
-    void purgeRecords(Instruction *const st, DataFile);
-@@ -1817,7 +1817,7 @@ MemoryOpt::replaceLdFromLd(Instruction *
- }
- 
- bool
--MemoryOpt::replaceStFromSt(Instruction *restrict st, Record *rec)
-+MemoryOpt::replaceStFromSt(Instruction *__restrict st, Record *rec)
- {
-    const Instruction *const ri = rec->insn;
-    Value *extra[3];
diff --git a/MesaLib-dfbsd/patches/patch-src_gallium_drivers_nouveau_nouveau__vp3__video.c b/MesaLib-dfbsd/patches/patch-src_gallium_drivers_nouveau_nouveau__vp3__video.c
index 89b3d08b57..c5d0c3d842 100644
--- a/MesaLib-dfbsd/patches/patch-src_gallium_drivers_nouveau_nouveau__vp3__video.c
+++ b/MesaLib-dfbsd/patches/patch-src_gallium_drivers_nouveau_nouveau__vp3__video.c
@@ -2,9 +2,9 @@ $NetBSD: patch-src_gallium_drivers_nouveau_nouveau__vp3__video.c,v 1.1 2015/04/2
 
 Fix build on platforms without close-on-exec.
 
---- src/gallium/drivers/nouveau/nouveau_vp3_video.c.orig	2014-09-12 21:30:32.000000000 +0000
+--- src/gallium/drivers/nouveau/nouveau_vp3_video.c.orig	2017-02-13 11:55:49.000000000 +0000
 +++ src/gallium/drivers/nouveau/nouveau_vp3_video.c
-@@ -292,7 +292,11 @@ nouveau_vp3_load_firmware(struct nouveau
+@@ -294,7 +294,11 @@ nouveau_vp3_load_firmware(struct nouveau
     if (nouveau_bo_map(dec->fw_bo, NOUVEAU_BO_WR, dec->client))
        return 1;
  
diff --git a/MesaLib-dfbsd/patches/patch-src_gallium_state__trackers_clover_llvm_invocation.cpp b/MesaLib-dfbsd/patches/patch-src_gallium_state__trackers_clover_llvm_invocation.cpp
index f8c8d37b38..68b68f79c1 100644
--- a/MesaLib-dfbsd/patches/patch-src_gallium_state__trackers_clover_llvm_invocation.cpp
+++ b/MesaLib-dfbsd/patches/patch-src_gallium_state__trackers_clover_llvm_invocation.cpp
@@ -1,33 +1,37 @@
 $NetBSD$
 
-From freebsd-base-ports
-https://github.com/FreeBSDDesktop/freebsd-ports-graphics/tree/xserver-mesa-next-udev
+From FreeBSD ports for graphics/libGL mesa 13.0.5
 
---- src/gallium/state_trackers/clover/llvm/invocation.cpp.orig	2017-02-06 13:49:09.000000000 +0000
+# fix errors like the following
+#
+# llvm/invocation.cpp:(.text+0x1275): undefined reference to `std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::c_str()
+ const'
+# /usr/bin/ld: ../../../../src/gallium/state_trackers/clover/.libs/libclover.a(libclllvm_la-invocation.o): relocation R_X86_64_PC32 against `_ZNKSt3__112bas
+ic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5c_strEv' can not be used when making a shared object; recompile with -fPIC
+# /usr/bin/ld: final link failed: Bad value
+#
+
+--- src/gallium/state_trackers/clover/llvm/invocation.cpp.orig	2017-02-13 11:55:49.000000000 +0000
 +++ src/gallium/state_trackers/clover/llvm/invocation.cpp
-@@ -85,6 +85,14 @@ namespace {
-       }
+@@ -93,6 +93,10 @@ namespace {
+       return ctx;
     }
  
 +#if defined(__FreeBSD__)
-+   char* convert(const std::string&s){
-+      char *pc = new char[s.size()+1];
-+      std::strcpy(pc, s.c_str());
-+      return pc;
-+   }
++   const char* cstr(const std::string& str) { return str.c_str(); }
 +#endif
 +
-    std::unique_ptr<LLVMContext>
-    create_context(std::string &r_log) {
-       init_targets();
-@@ -105,8 +113,14 @@ namespace {
+    std::unique_ptr<clang::CompilerInstance>
+    create_compiler_instance(const target &target,
+                             const std::vector<std::string> &opts,
+@@ -105,8 +109,14 @@ namespace {
        // Parse the compiler options.  A file name should be present at the end
        // and must have the .cl extension in order for the CompilerInvocation
        // class to recognize it as an OpenCL source file.
 +
 +#if defined(__FreeBSD__)
 +      std::vector<const char *> copts;
-+      std::transform(opts.begin(), opts.end(), std::back_inserter(copts), convert);
++      std::transform(opts.begin(), opts.end(), copts.begin(), cstr);
 +#else
        const std::vector<const char *> copts =
           map(std::mem_fn(&std::string::c_str), opts);
diff --git a/MesaLib-dfbsd/patches/patch-src_gallium_state__trackers_clover_llvm_metadata.hpp b/MesaLib-dfbsd/patches/patch-src_gallium_state__trackers_clover_llvm_metadata.hpp
index 08594f6a57..8c649afb8d 100644
--- a/MesaLib-dfbsd/patches/patch-src_gallium_state__trackers_clover_llvm_metadata.hpp
+++ b/MesaLib-dfbsd/patches/patch-src_gallium_state__trackers_clover_llvm_metadata.hpp
@@ -1,9 +1,11 @@
 $NetBSD$
 
-From freebsd-base-ports
-https://github.com/FreeBSDDesktop/freebsd-ports-graphics/tree/xserver-mesa-next-udev
+From FreeBSD ports graphics/libGL mesa 13.0.5
 
---- src/gallium/state_trackers/clover/llvm/metadata.hpp.orig	2016-11-10 22:05:17.000000000 +0000
+# Fix error: no matching constructor for initialization of 'std::vector<const ::llvm::MDNode *>' 
+#
+
+--- src/gallium/state_trackers/clover/llvm/metadata.hpp.orig	2017-02-13 11:55:49.000000000 +0000
 +++ src/gallium/state_trackers/clover/llvm/metadata.hpp
 @@ -42,7 +42,11 @@ namespace clover {
           get_kernel_nodes(const ::llvm::Module &mod) {
diff --git a/MesaLib-dfbsd/patches/patch-src_gallium_winsys_radeon_drm_radeon__drm__winsys.c b/MesaLib-dfbsd/patches/patch-src_gallium_winsys_radeon_drm_radeon__drm__winsys.c
index e14f4dd7c0..5843681912 100644
--- a/MesaLib-dfbsd/patches/patch-src_gallium_winsys_radeon_drm_radeon__drm__winsys.c
+++ b/MesaLib-dfbsd/patches/patch-src_gallium_winsys_radeon_drm_radeon__drm__winsys.c
@@ -3,9 +3,9 @@ $NetBSD$
 Don't create pipe thread on NetBSD. It triggers some kernel bug.
 kern/49838.
 
---- src/gallium/winsys/radeon/drm/radeon_drm_winsys.c.orig	2016-11-10 22:05:17.000000000 +0000
+--- src/gallium/winsys/radeon/drm/radeon_drm_winsys.c.orig	2017-02-13 11:55:49.000000000 +0000
 +++ src/gallium/winsys/radeon/drm/radeon_drm_winsys.c
-@@ -819,8 +819,10 @@ radeon_drm_winsys_create(int fd, radeon_
+@@ -821,8 +821,10 @@ radeon_drm_winsys_create(int fd, radeon_
      /* TTM aligns the BO size to the CPU page size */
      ws->info.gart_page_size = sysconf(_SC_PAGESIZE);
  
diff --git a/MesaLib-dfbsd/patches/patch-src_gallium_winsys_svga_drm_vmw__screen__ioctl.c b/MesaLib-dfbsd/patches/patch-src_gallium_winsys_svga_drm_vmw__screen__ioctl.c
index 93b1be2f1a..33ac3a3547 100644
--- a/MesaLib-dfbsd/patches/patch-src_gallium_winsys_svga_drm_vmw__screen__ioctl.c
+++ b/MesaLib-dfbsd/patches/patch-src_gallium_winsys_svga_drm_vmw__screen__ioctl.c
@@ -2,7 +2,7 @@ $NetBSD: patch-src_gallium_winsys_svga_drm_vmw__screen__ioctl.c,v 1.3 2015/05/15
 
 Make sure ERESTART gets defined.
 
---- src/gallium/winsys/svga/drm/vmw_screen_ioctl.c.orig	2015-04-24 21:09:35.000000000 +0000
+--- src/gallium/winsys/svga/drm/vmw_screen_ioctl.c.orig	2017-02-13 11:55:49.000000000 +0000
 +++ src/gallium/winsys/svga/drm/vmw_screen_ioctl.c
 @@ -48,6 +48,25 @@
  
diff --git a/MesaLib-dfbsd/patches/patch-src_glsl_ralloc.c b/MesaLib-dfbsd/patches/patch-src_glsl_ralloc.c
index f0e3ba6314..4a632b185b 100644
--- a/MesaLib-dfbsd/patches/patch-src_glsl_ralloc.c
+++ b/MesaLib-dfbsd/patches/patch-src_glsl_ralloc.c
@@ -1,11 +1,14 @@
 $NetBSD: patch-src_glsl_ralloc.c,v 1.4 2016/02/23 11:16:55 jperkin Exp $
 
+FreeBSD reported atexit bug for 10.6:
+https://bugs.freedesktop.org/show_bug.cgi?id=91869
+
 * Fix exit time segfault of qt5 application with modular xorg
 * Provide compat strnlen for older Darwin.
 
---- src/util/ralloc.c.orig	2016-01-29 12:21:30.000000000 +0000
+--- src/util/ralloc.c.orig	2017-02-13 11:55:50.000000000 +0000
 +++ src/util/ralloc.c
-@@ -312,7 +312,7 @@ ralloc_parent(const void *ptr)
+@@ -325,7 +325,7 @@ ralloc_parent(const void *ptr)
  
  static void *autofree_context = NULL;
  
@@ -14,7 +17,7 @@ $NetBSD: patch-src_glsl_ralloc.c,v 1.4 2016/02/23 11:16:55 jperkin Exp $
  autofree(void)
  {
     ralloc_free(autofree_context);
-@@ -323,7 +323,6 @@ ralloc_autofree_context(void)
+@@ -336,7 +336,6 @@ ralloc_autofree_context(void)
  {
     if (unlikely(autofree_context == NULL)) {
        autofree_context = ralloc_context(NULL);
@@ -22,7 +25,7 @@ $NetBSD: patch-src_glsl_ralloc.c,v 1.4 2016/02/23 11:16:55 jperkin Exp $
     }
     return autofree_context;
  }
-@@ -360,7 +359,14 @@ ralloc_strndup(const void *ctx, const ch
+@@ -373,7 +372,14 @@ ralloc_strndup(const void *ctx, const ch
     if (unlikely(str == NULL))
        return NULL;
  
diff --git a/MesaLib-dfbsd/patches/patch-src_glx_glxclient.h b/MesaLib-dfbsd/patches/patch-src_glx_glxclient.h
index 60ecfcf73d..990d527b0d 100644
--- a/MesaLib-dfbsd/patches/patch-src_glx_glxclient.h
+++ b/MesaLib-dfbsd/patches/patch-src_glx_glxclient.h
@@ -3,9 +3,9 @@ $NetBSD: patch-src_glx_glxclient.h,v 1.1 2015/09/11 16:27:30 tnn Exp $
 NetBSD only supports zero-initialized initial-exec tls variables in conjuction
 with dlopen(3) at the moment.
 
---- src/glx/glxclient.h.orig	2015-09-02 17:06:23.000000000 +0000
+--- src/glx/glxclient.h.orig	2017-02-13 11:55:49.000000000 +0000
 +++ src/glx/glxclient.h
-@@ -635,7 +635,11 @@ extern void __glXSetCurrentContext(struc
+@@ -661,7 +661,11 @@ extern void __glXSetCurrentContext(struc
  extern __thread void *__glX_tls_Context
     __attribute__ ((tls_model("initial-exec")));
  
diff --git a/MesaLib-dfbsd/patches/patch-src_intel_tools_aubinator.c b/MesaLib-dfbsd/patches/patch-src_intel_tools_aubinator.c
index d5213ac112..d7a2480d6b 100644
--- a/MesaLib-dfbsd/patches/patch-src_intel_tools_aubinator.c
+++ b/MesaLib-dfbsd/patches/patch-src_intel_tools_aubinator.c
@@ -1,11 +1,11 @@
 $NetBSD$
 
-From freebsd-base-ports
-https://github.com/FreeBSDDesktop/freebsd-ports-graphics/tree/xserver-mesa-next-udev
+From FreeBSD ports graphics/libGL mesa 13.0.5
 
-Not sure if these mmap() flags are right ...
+# We don't have MAP_NORESERVE so use MAP_NOSYNC | MAP_NOCORE and
+# hope for the best (this alloc is too big but it's only a test)
 
---- src/intel/tools/aubinator.c.orig	2017-01-25 13:26:34.000000000 +0000
+--- src/intel/tools/aubinator.c.orig	2017-02-13 11:55:49.000000000 +0000
 +++ src/intel/tools/aubinator.c
 @@ -1298,8 +1298,14 @@ int main(int argc, char *argv[])
  
diff --git a/MesaLib-dfbsd/patches/patch-src_mapi_glapi_gen_gl__gentable.py b/MesaLib-dfbsd/patches/patch-src_mapi_glapi_gen_gl__gentable.py
index 4c9561c75d..84c66e6089 100644
--- a/MesaLib-dfbsd/patches/patch-src_mapi_glapi_gen_gl__gentable.py
+++ b/MesaLib-dfbsd/patches/patch-src_mapi_glapi_gen_gl__gentable.py
@@ -2,9 +2,9 @@ $NetBSD: patch-src_mapi_glapi_gen_gl__gentable.py,v 1.1 2015/09/11 00:03:36 tnn
 
 FreeBSD support.
 
---- src/mapi/glapi/gen/gl_gentable.py.orig	2015-07-29 21:28:50.156039000 +0000
+--- src/mapi/glapi/gen/gl_gentable.py.orig	2017-02-13 11:55:49.000000000 +0000
 +++ src/mapi/glapi/gen/gl_gentable.py
-@@ -42,7 +42,7 @@ header = """/* GLXEXT is the define used
+@@ -44,7 +44,7 @@ header = """/* GLXEXT is the define used
  #endif
  
  #if (defined(GLXEXT) && defined(HAVE_BACKTRACE)) \\
diff --git a/MesaLib-dfbsd/patches/patch-src_mapi_glapi_glapi__gentable.c b/MesaLib-dfbsd/patches/patch-src_mapi_glapi_glapi__gentable.c
new file mode 100644
index 0000000000..0838124e27
--- /dev/null
+++ b/MesaLib-dfbsd/patches/patch-src_mapi_glapi_glapi__gentable.c
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Why shouldn't FreeBSD define USE_BACKTRACE as well.
+
+--- src/mapi/glapi/glapi_gentable.c.orig	2017-02-13 11:56:32.000000000 +0000
++++ src/mapi/glapi/glapi_gentable.c
+@@ -36,7 +36,7 @@
+ #endif
+ 
+ #if (defined(GLXEXT) && defined(HAVE_BACKTRACE)) \
+-	|| (!defined(GLXEXT) && defined(DEBUG) && !defined(__CYGWIN__) && !defined(__MINGW32__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__))
++	|| (!defined(GLXEXT) && defined(DEBUG) && !defined(__CYGWIN__) && !defined(__MINGW32__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__FreeBSD__) && !defined(__DragonFly__))
+ #define USE_BACKTRACE
+ #endif
+ 
diff --git a/MesaLib-dfbsd/patches/patch-src_mesa_drivers_dri_Makefile.in b/MesaLib-dfbsd/patches/patch-src_mesa_drivers_dri_Makefile.in
index 663a1d7d4c..2e50bf1d46 100644
--- a/MesaLib-dfbsd/patches/patch-src_mesa_drivers_dri_Makefile.in
+++ b/MesaLib-dfbsd/patches/patch-src_mesa_drivers_dri_Makefile.in
@@ -3,9 +3,9 @@ $NetBSD$
 DRI drivers need explicit linkage to glapi. FDO bug 57702. We only need to do
 this for the "mega" drivers since that's where final linking takes place.
 
---- src/mesa/drivers/dri/Makefile.in.orig	2016-11-14 11:29:32.000000000 +0000
+--- src/mesa/drivers/dri/Makefile.in.orig	2017-02-13 11:56:03.000000000 +0000
 +++ src/mesa/drivers/dri/Makefile.in
-@@ -614,6 +614,7 @@ mesa_dri_drivers_la_LIBADD = \
+@@ -609,6 +609,7 @@ mesa_dri_drivers_la_LIBADD = \
          $(SHARED_GLAPI_LIB) \
          $(MEGADRIVERS_DEPS) \
          $(DRI_LIB_DEPS) \
diff --git a/MesaLib-dfbsd/patches/patch-src_mesa_drivers_dri_common_Makefile.in b/MesaLib-dfbsd/patches/patch-src_mesa_drivers_dri_common_Makefile.in
index 20e3007da3..20343a6f75 100644
--- a/MesaLib-dfbsd/patches/patch-src_mesa_drivers_dri_common_Makefile.in
+++ b/MesaLib-dfbsd/patches/patch-src_mesa_drivers_dri_common_Makefile.in
@@ -2,9 +2,9 @@ $NetBSD: patch-src_mesa_drivers_dri_common_Makefile.in,v 1.1 2015/04/25 11:19:18
 
 Don't install the sysconf directory for now.
 
---- src/mesa/drivers/dri/common/Makefile.in.orig	2015-02-28 00:06:10.000000000 +0000
+--- src/mesa/drivers/dri/common/Makefile.in.orig	2017-02-13 11:56:03.000000000 +0000
 +++ src/mesa/drivers/dri/common/Makefile.in
-@@ -710,6 +710,9 @@ mostlyclean-libtool:
+@@ -733,6 +733,9 @@ mostlyclean-libtool:
  clean-libtool:
  	-rm -rf .libs _libs
  install-sysconfDATA: $(sysconf_DATA)
diff --git a/MesaLib-dfbsd/patches/patch-src_mesa_drivers_dri_i915_intel__screen.c b/MesaLib-dfbsd/patches/patch-src_mesa_drivers_dri_i915_intel__screen.c
index 3cb8653363..a1e1a226a7 100644
--- a/MesaLib-dfbsd/patches/patch-src_mesa_drivers_dri_i915_intel__screen.c
+++ b/MesaLib-dfbsd/patches/patch-src_mesa_drivers_dri_i915_intel__screen.c
@@ -6,7 +6,7 @@ to a two argument ALIGN.
 
 Fix build on older NetBSD w/o _SC_PHYS_PAGES.
 
---- src/mesa/drivers/dri/i915/intel_screen.c.orig	2017-01-25 13:26:34.000000000 +0000
+--- src/mesa/drivers/dri/i915/intel_screen.c.orig	2017-02-13 11:55:49.000000000 +0000
 +++ src/mesa/drivers/dri/i915/intel_screen.c
 @@ -28,6 +28,11 @@
  #include <errno.h>
diff --git a/MesaLib-dfbsd/patches/patch-src_mesa_drivers_dri_i965_intel__screen.c b/MesaLib-dfbsd/patches/patch-src_mesa_drivers_dri_i965_intel__screen.c
index c4b773ff75..980846b17a 100644
--- a/MesaLib-dfbsd/patches/patch-src_mesa_drivers_dri_i965_intel__screen.c
+++ b/MesaLib-dfbsd/patches/patch-src_mesa_drivers_dri_i965_intel__screen.c
@@ -6,7 +6,7 @@ to a two argument ALIGN.
 
 Fix build on older NetBSD w/o _SC_PHYS_PAGES.
 
---- src/mesa/drivers/dri/i965/intel_screen.c.orig	2017-02-06 13:49:09.000000000 +0000
+--- src/mesa/drivers/dri/i965/intel_screen.c.orig	2017-02-13 11:55:49.000000000 +0000
 +++ src/mesa/drivers/dri/i965/intel_screen.c
 @@ -26,6 +26,11 @@
  #include <errno.h>
diff --git a/MesaLib-dfbsd/patches/patch-src_mesa_drivers_dri_swrast_swrast.c b/MesaLib-dfbsd/patches/patch-src_mesa_drivers_dri_swrast_swrast.c
index 6d7a514d42..84eda7e33c 100644
--- a/MesaLib-dfbsd/patches/patch-src_mesa_drivers_dri_swrast_swrast.c
+++ b/MesaLib-dfbsd/patches/patch-src_mesa_drivers_dri_swrast_swrast.c
@@ -2,9 +2,9 @@ $NetBSD: patch-src_mesa_drivers_dri_swrast_swrast.c,v 1.2 2015/06/07 15:48:12 tn
 
 Fix build on older NetBSD w/o _SC_PHYS_PAGES.
 
---- src/mesa/drivers/dri/swrast/swrast.c.orig	2015-06-07 10:06:53.000000000 +0000
+--- src/mesa/drivers/dri/swrast/swrast.c.orig	2017-02-13 11:55:49.000000000 +0000
 +++ src/mesa/drivers/dri/swrast/swrast.c
-@@ -150,6 +150,12 @@ swrast_query_renderer_integer(__DRIscree
+@@ -151,6 +151,12 @@ swrast_query_renderer_integer(__DRIscree
          size_t len = sizeof(system_memory_bytes);
          if (sysctl(mib, 2, &system_memory_bytes, &len, NULL, 0) != 0)
              return -1;
diff --git a/MesaLib-dfbsd/patches/patch-src_mesa_main_context.c b/MesaLib-dfbsd/patches/patch-src_mesa_main_context.c
index 486ba22b74..28c4735c7e 100644
--- a/MesaLib-dfbsd/patches/patch-src_mesa_main_context.c
+++ b/MesaLib-dfbsd/patches/patch-src_mesa_main_context.c
@@ -2,9 +2,9 @@ $NetBSD: patch-src_mesa_main_context.c,v 1.3 2015/09/26 08:45:02 tnn Exp $
 
 * Fix exit time segfault of qt5 application with modular xorg
 
---- src/mesa/main/context.c.orig	2015-09-11 17:41:47.000000000 +0000
+--- src/mesa/main/context.c.orig	2017-02-13 11:55:49.000000000 +0000
 +++ src/mesa/main/context.c
-@@ -350,11 +350,14 @@ mtx_t OneTimeLock = _MTX_INITIALIZER_NP;
+@@ -348,11 +348,14 @@ mtx_t OneTimeLock = _MTX_INITIALIZER_NP;
   * Calls all the various one-time-fini functions in Mesa
   */
  
@@ -22,7 +22,7 @@ $NetBSD: patch-src_mesa_main_context.c,v 1.3 2015/09/26 08:45:02 tnn Exp $
  }
  
  /**
-@@ -369,7 +372,6 @@ one_time_fini(void)
+@@ -367,7 +370,6 @@ one_time_fini(void)
  static void
  one_time_init( struct gl_context *ctx )
  {
@@ -30,7 +30,7 @@ $NetBSD: patch-src_mesa_main_context.c,v 1.3 2015/09/26 08:45:02 tnn Exp $
  
     mtx_lock(&OneTimeLock);
  
-@@ -394,8 +396,6 @@ one_time_init( struct gl_context *ctx )
+@@ -392,8 +394,6 @@ one_time_init( struct gl_context *ctx )
           _mesa_ubyte_to_float_color_tab[i] = (float) i / 255.0F;
        }
  
diff --git a/MesaLib-dfbsd/patches/patch-src_mesa_main_extensions.c b/MesaLib-dfbsd/patches/patch-src_mesa_main_extensions.c
index 395d96d7b0..00e5cd0ed7 100644
--- a/MesaLib-dfbsd/patches/patch-src_mesa_main_extensions.c
+++ b/MesaLib-dfbsd/patches/patch-src_mesa_main_extensions.c
@@ -2,9 +2,9 @@ $NetBSD: patch-src_mesa_main_extensions.c,v 1.1 2016/01/27 07:39:54 wiz Exp $
 
 atexit() is not a good idea in shared libraries.
 
---- src/mesa/main/extensions.c.orig	2016-01-07 16:17:53.000000000 +0000
+--- src/mesa/main/extensions.c.orig	2017-02-13 11:55:49.000000000 +0000
 +++ src/mesa/main/extensions.c
-@@ -256,7 +256,7 @@ get_extension_override( struct gl_contex
+@@ -237,7 +237,7 @@ get_extension_override( struct gl_contex
   * These strings are allocated early during the first context creation by
   * _mesa_one_time_init_extension_overrides.
   */
@@ -13,7 +13,7 @@ atexit() is not a good idea in shared libraries.
  free_unknown_extensions_strings(void)
  {
     free(extra_extensions);
-@@ -277,7 +277,7 @@ _mesa_one_time_init_extension_overrides(
+@@ -258,7 +258,7 @@ _mesa_one_time_init_extension_overrides(
     int len;
     size_t offset;
  
diff --git a/MesaLib-dfbsd/patches/patch-src_mesa_tnl_t__pipeline.c b/MesaLib-dfbsd/patches/patch-src_mesa_tnl_t__pipeline.c
index a089340ba7..86cb8730d1 100644
--- a/MesaLib-dfbsd/patches/patch-src_mesa_tnl_t__pipeline.c
+++ b/MesaLib-dfbsd/patches/patch-src_mesa_tnl_t__pipeline.c
@@ -2,16 +2,19 @@ $NetBSD: patch-src_mesa_tnl_t__pipeline.c,v 1.1 2015/09/11 00:03:36 tnn Exp $
 
 i386 FPU control word defaults.
 
---- src/mesa/tnl/t_pipeline.c.orig	2015-09-09 17:55:36.000000000 +0000
+0x127f is the value of FreeBSD fpu.h __INITIAL_FPUCW_I386__
+
+--- src/mesa/tnl/t_pipeline.c.orig	2017-02-13 11:55:50.000000000 +0000
 +++ src/mesa/tnl/t_pipeline.c
-@@ -132,7 +132,13 @@ static GLuint check_output_changes( stru
+@@ -132,7 +132,14 @@ static GLuint check_output_changes( stru
  /* Hardware default: All exceptions masked, extended double precision,
   * round to nearest (IEEE compliant):
   */
 +#if defined(__NetBSD__)
 +#define DEFAULT_X86_FPU	0x127f  /* __NetBSD_NPXCW__ */
-+#elif defined(__FreeBSD__)
-+#define DEFAULT_X86_FPU	0x1272  /* __FreeBSD_NPXCW__ */
++#elif defined(__FreeBSD__) || defined(__DragonFly__)
++/* __INITIAL_FPUCW_I386__ from FreeBSD fpu.h */
++#define DEFAULT_X86_FPU	0x127f
 +#else
  #define DEFAULT_X86_FPU		0x037f
 +#endif
diff --git a/MesaLib-dfbsd/patches/patch-src_mesa_x86_assyntax.h b/MesaLib-dfbsd/patches/patch-src_mesa_x86_assyntax.h
new file mode 100644
index 0000000000..14d1866884
--- /dev/null
+++ b/MesaLib-dfbsd/patches/patch-src_mesa_x86_assyntax.h
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Why not add DragonFly to OSes here.
+
+--- src/mesa/x86/assyntax.h.orig	2017-02-13 11:55:50.000000000 +0000
++++ src/mesa/x86/assyntax.h
+@@ -977,7 +977,7 @@
+ 
+ #if defined(Lynx) || (defined(SYSV) || defined(SVR4)) \
+  || (defined(__linux__) || defined(__OS2ELF__)) && defined(__ELF__) \
+- || (defined(__FreeBSD__) && __FreeBSD__ >= 3) \
++ || (defined(__FreeBSD__) && __FreeBSD__ >= 3) || defined(__DragonFly__) \
+  || (defined(__NetBSD__) && defined(__ELF__))
+ #define GLNAME(a)	a
+ #else
diff --git a/MesaLib-dfbsd/patches/patch-src_mesa_x86_common__x86.c b/MesaLib-dfbsd/patches/patch-src_mesa_x86_common__x86.c
index 49217fd3b9..4a882807e0 100644
--- a/MesaLib-dfbsd/patches/patch-src_mesa_x86_common__x86.c
+++ b/MesaLib-dfbsd/patches/patch-src_mesa_x86_common__x86.c
@@ -2,7 +2,7 @@ $NetBSD: patch-src_mesa_x86_common__x86.c,v 1.2 2015/09/11 00:03:36 tnn Exp $
 
 DragonFly support.
 
---- src/mesa/x86/common_x86.c.orig	2015-07-14 18:10:47.000000000 +0000
+--- src/mesa/x86/common_x86.c.orig	2017-02-13 11:55:50.000000000 +0000
 +++ src/mesa/x86/common_x86.c
 @@ -38,7 +38,7 @@
  #if defined(USE_SSE_ASM) && defined(__linux__)
diff --git a/MesaLib-dfbsd/patches/patch-src_util_u__atomic.h b/MesaLib-dfbsd/patches/patch-src_util_u__atomic.h
index 2b71ffd9db..7d61840a6b 100644
--- a/MesaLib-dfbsd/patches/patch-src_util_u__atomic.h
+++ b/MesaLib-dfbsd/patches/patch-src_util_u__atomic.h
@@ -2,9 +2,9 @@ $NetBSD: patch-src_util_u__atomic.h,v 1.1 2015/04/25 11:19:18 tnn Exp $
 
 Fix SunOS atomic macros.
 
---- src/util/u_atomic.h.orig	2015-03-28 18:20:39.000000000 +0000
+--- src/util/u_atomic.h.orig	2017-02-13 11:55:50.000000000 +0000
 +++ src/util/u_atomic.h
-@@ -175,7 +175,7 @@ char _InterlockedCompareExchange8(char v
+@@ -177,7 +177,7 @@
     sizeof(*v) == sizeof(uint16_t) ? atomic_inc_16((uint16_t *)(v)) : \
     sizeof(*v) == sizeof(uint32_t) ? atomic_inc_32((uint32_t *)(v)) : \
     sizeof(*v) == sizeof(uint64_t) ? atomic_inc_64((uint64_t *)(v)) : \
@@ -13,7 +13,7 @@ Fix SunOS atomic macros.
  
  #define p_atomic_inc_return(v) ((__typeof(*v)) \
     sizeof(*v) == sizeof(uint8_t)  ? atomic_inc_8_nv ((uint8_t  *)(v)) : \
-@@ -184,12 +184,12 @@ char _InterlockedCompareExchange8(char v
+@@ -186,12 +186,12 @@
     sizeof(*v) == sizeof(uint64_t) ? atomic_inc_64_nv((uint64_t *)(v)) : \
                                      (assert(!"should not get here"), 0))
  
diff --git a/MesaLib-dfbsd/patches/patch-src_util_u__endian.h b/MesaLib-dfbsd/patches/patch-src_util_u__endian.h
index f85c3060fd..8710ccade1 100644
--- a/MesaLib-dfbsd/patches/patch-src_util_u__endian.h
+++ b/MesaLib-dfbsd/patches/patch-src_util_u__endian.h
@@ -1,9 +1,8 @@
 $NetBSD$
 
-From freebsd-base-ports
-https://github.com/FreeBSDDesktop/freebsd-ports-graphics/tree/xserver-mesa-next-udev
+From FreeBSD ports graphics/libGL mesa 13.0.5.
 
---- src/util/u_endian.h.orig	2016-11-10 22:05:17.000000000 +0000
+--- src/util/u_endian.h.orig	2017-02-13 11:55:50.000000000 +0000
 +++ src/util/u_endian.h
 @@ -54,7 +54,7 @@
  # define PIPE_ARCH_BIG_ENDIAN


Home | Main Index | Thread Index | Old Index