diff -ur /opt/SnowLeopardPorts/x11/mesa/work/mesa-17.1.6/src/glx/apple/Makefile /opt/macports-ports/x11/mesa/work/mesa-18.3.6/src/glx/apple/Makefile
--- /opt/SnowLeopardPorts/x11/mesa/work/mesa-17.1.6/src/glx/apple/Makefile	2021-02-03 12:13:18.000000000 -0800
+++ /opt/macports-ports/x11/mesa/work/mesa-18.3.6/src/glx/apple/Makefile	2021-02-03 12:13:48.000000000 -0800
@@ -91,7 +91,8 @@
 target_triplet = x86_64-apple-darwin10.8.0
 subdir = src/glx/apple
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_gnu_make.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_compile_flag.m4 \
+	$(top_srcdir)/m4/ax_check_gnu_make.m4 \
 	$(top_srcdir)/m4/ax_check_python_mako_module.m4 \
 	$(top_srcdir)/m4/ax_gcc_builtin.m4 \
 	$(top_srcdir)/m4/ax_gcc_func_attribute.m4 \
@@ -197,7 +198,7 @@
 CTAGS = ctags
 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/bin/depcomp TODO
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = ${SHELL} '/opt/local/var/macports/build/_opt_SnowLeopardPorts_x11_mesa/mesa/work/mesa-17.1.6/bin/missing' aclocal-1.16
+ACLOCAL = ${SHELL} '/opt/local/var/macports/build/_opt_macports-ports_x11_mesa/mesa/work/mesa-18.3.6/bin/missing' aclocal-1.16
 AMDGPU_CFLAGS = 
 AMDGPU_LIBS = 
 AMTAR = $${TAR-tar}
@@ -205,37 +206,40 @@
 ANDROID_CFLAGS = 
 ANDROID_LIBS = 
 AR = ar
-AUTOCONF = ${SHELL} '/opt/local/var/macports/build/_opt_SnowLeopardPorts_x11_mesa/mesa/work/mesa-17.1.6/bin/missing' autoconf
-AUTOHEADER = ${SHELL} '/opt/local/var/macports/build/_opt_SnowLeopardPorts_x11_mesa/mesa/work/mesa-17.1.6/bin/missing' autoheader
-AUTOMAKE = ${SHELL} '/opt/local/var/macports/build/_opt_SnowLeopardPorts_x11_mesa/mesa/work/mesa-17.1.6/bin/missing' automake-1.16
+AUTOCONF = ${SHELL} '/opt/local/var/macports/build/_opt_macports-ports_x11_mesa/mesa/work/mesa-18.3.6/bin/missing' autoconf
+AUTOHEADER = ${SHELL} '/opt/local/var/macports/build/_opt_macports-ports_x11_mesa/mesa/work/mesa-18.3.6/bin/missing' autoheader
+AUTOMAKE = ${SHELL} '/opt/local/var/macports/build/_opt_macports-ports_x11_mesa/mesa/work/mesa-18.3.6/bin/missing' automake-1.16
 AWK = gawk
+BACKTRACE_CFLAGS = 
+BACKTRACE_LIBS = 
 BSYMBOLIC = 
 CC = /opt/local/bin/clang-mp-9.0
 CCAS = /opt/local/bin/clang-mp-9.0
 CCASDEPMODE = depmode=gcc3
 CCASFLAGS = -pipe -Os -I/opt/local/include/LegacySupport -arch x86_64
 CCDEPMODE = depmode=gcc3
-CFLAGS = -pipe -Os -I/opt/local/include/LegacySupport -arch x86_64 -Wall -std=c99 -Werror=implicit-function-declaration -Werror=missing-prototypes -fno-math-errno -fno-trapping-math -Qunused-arguments 
+CFLAGS = -pipe -Os -I/opt/local/include/LegacySupport -arch x86_64 -std=c99 -Qunused-arguments 
 CLANG_RESOURCE_DIR = 
 CLOCK_LIB = 
 CLOVER_STD_OVERRIDE = 
 CPP = /opt/local/bin/clang-mp-9.0 -E
 CPPFLAGS = -I/opt/local/include/LegacySupport
 CXX = /opt/local/bin/clang++-mp-9.0
+CXX11_CXXFLAGS = 
 CXXCPP = /opt/local/bin/clang++-mp-9.0 -E
 CXXDEPMODE = depmode=gcc3
-CXXFLAGS = -pipe -Os -stdlib=libc++ -arch x86_64 -Wall -fno-math-errno -fno-trapping-math -Qunused-arguments 
+CXXFLAGS = -pipe -Os -stdlib=libc++ -arch x86_64 -Wall -fno-math-errno -fno-trapping-math -Wno-missing-field-initializers -Qunused-arguments 
 CYGPATH_W = echo
 D3D_DRIVER_INSTALL_DIR = ${exec_prefix}/lib/d3d
-DEFINES = -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DUSE_SSE41 -DUSE_GCC_ATOMIC_BUILTINS -DNDEBUG -DHAVE_XLOCALE_H -DHAVE_SYS_SYSCTL_H -DHAVE_STRTOF -DHAVE_DLOPEN -DHAVE_POSIX_MEMALIGN -DGLX_USE_APPLEGL -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING -DHAVE_X11_PLATFORM -DBUILDING_MESA
-DEFS = -DPACKAGE_NAME=\"Mesa\" -DPACKAGE_TARNAME=\"mesa\" -DPACKAGE_VERSION=\"17.1.6\" -DPACKAGE_STRING=\"Mesa\ 17.1.6\" -DPACKAGE_BUGREPORT=\"https://bugs.freedesktop.org/enter_bug.cgi\?product=Mesa\" -DPACKAGE_URL=\"\" -DPACKAGE=\"mesa\" -DVERSION=\"17.1.6\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DYYTEXT_POINTER=1 -DHAVE___BUILTIN_BSWAP32=1 -DHAVE___BUILTIN_BSWAP64=1 -DHAVE___BUILTIN_CLZ=1 -DHAVE___BUILTIN_CLZLL=1 -DHAVE___BUILTIN_CTZ=1 -DHAVE___BUILTIN_EXPECT=1 -DHAVE___BUILTIN_FFS=1 -DHAVE___BUILTIN_FFSLL=1 -DHAVE___BUILTIN_POPCOUNT=1 -DHAVE___BUILTIN_POPCOUNTLL=1 -DHAVE___BUILTIN_UNREACHABLE=1 -DHAVE_FUNC_ATTRIBUTE_CONST=1 -DHAVE_FUNC_ATTRIBUTE_FLATTEN=1 -DHAVE_FUNC_ATTRIBUTE_FORMAT=1 -DHAVE_FUNC_ATTRIBUTE_MALLOC=1 -DHAVE_FUNC_ATTRIBUTE_PACKED=1 -DHAVE_FUNC_ATTRIBUTE_PURE=1 -DHAVE_FUNC_ATTRIBUTE_RETURNS_NONNULL=1 -DHAVE_FUNC_ATTRIBUTE_UNUSED=1 -DHAVE_FUNC_ATTRIBUTE_WARN_UNUSED_RESULT=1 -DHAVE_FUNC_ATTRIBUTE_WEAK=1 -DHAVE_DLADDR=1 -DHAVE_PTHREAD_PRIO_INHERIT=1 -DHAVE_PTHREAD=1
+DEFINES = -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DUSE_SSE41 -DUSE_GCC_ATOMIC_BUILTINS -DNDEBUG -DHAVE_XLOCALE_H -DHAVE_SYS_SYSCTL_H -DHAVE_DLFCN_H -DHAVE_STRTOF -DHAVE_POSIX_MEMALIGN -DHAVE_ZLIB -DGLX_USE_APPLEGL -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING -DHAVE_X11_PLATFORM -DBUILDING_MESA
+DEFS = -DPACKAGE_NAME=\"Mesa\" -DPACKAGE_TARNAME=\"mesa\" -DPACKAGE_VERSION=\"18.3.6\" -DPACKAGE_STRING=\"Mesa\ 18.3.6\" -DPACKAGE_BUGREPORT=\"https://bugs.freedesktop.org/enter_bug.cgi\?product=Mesa\" -DPACKAGE_URL=\"\" -DPACKAGE=\"mesa\" -DVERSION=\"18.3.6\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DYYTEXT_POINTER=1 -DHAVE___BUILTIN_BSWAP32=1 -DHAVE___BUILTIN_BSWAP64=1 -DHAVE___BUILTIN_CLZ=1 -DHAVE___BUILTIN_CLZLL=1 -DHAVE___BUILTIN_CTZ=1 -DHAVE___BUILTIN_EXPECT=1 -DHAVE___BUILTIN_FFS=1 -DHAVE___BUILTIN_FFSLL=1 -DHAVE___BUILTIN_POPCOUNT=1 -DHAVE___BUILTIN_POPCOUNTLL=1 -DHAVE___BUILTIN_UNREACHABLE=1 -DHAVE_FUNC_ATTRIBUTE_CONST=1 -DHAVE_FUNC_ATTRIBUTE_FLATTEN=1 -DHAVE_FUNC_ATTRIBUTE_FORMAT=1 -DHAVE_FUNC_ATTRIBUTE_MALLOC=1 -DHAVE_FUNC_ATTRIBUTE_PACKED=1 -DHAVE_FUNC_ATTRIBUTE_PURE=1 -DHAVE_FUNC_ATTRIBUTE_RETURNS_NONNULL=1 -DHAVE_FUNC_ATTRIBUTE_UNUSED=1 -DHAVE_FUNC_ATTRIBUTE_WARN_UNUSED_RESULT=1 -DHAVE_FUNC_ATTRIBUTE_WEAK=1 -DHAVE_FUNC_ATTRIBUTE_NORETURN=1 -DHAVE_DLADDR=1 -DHAVE_PTHREAD_PRIO_INHERIT=1 -DHAVE_PTHREAD=1 -DENABLE_ST_OMX_BELLAGIO=0 -DENABLE_ST_OMX_TIZONIA=0
 DEPDIR = .deps
 DLLTOOL = false
 DLOPEN_LIBS = 
 DRI2PROTO_CFLAGS = 
 DRI2PROTO_LIBS = 
 DRIGL_CFLAGS = 
-DRIGL_LIBS = -L/opt/local/lib -lXext -lXdamage -lXfixes -lX11-xcb -lX11 -lxcb -lxcb-glx -lXxf86vm
+DRIGL_LIBS = -L/opt/local/lib -lXext -lXdamage -lXfixes -lX11-xcb -lX11 -lxcb -lxcb-glx
 DRI_DRIVER_INSTALL_DIR = ${libdir}/dri
 DRI_DRIVER_SEARCH_DIR = ${DRI_DRIVER_INSTALL_DIR}
 DRI_LIB_DEPS =    -L/opt/local/lib -lexpat -lm -lpthread -pthread 
@@ -255,8 +259,6 @@
 EXPAT_CFLAGS = 
 EXPAT_LIBS = -L/opt/local/lib -lexpat
 FGREP = /opt/local/bin/ggrep -F
-FREEDRENO_CFLAGS = 
-FREEDRENO_LIBS = 
 GALLIUM_PIPE_LOADER_DEFINES =  -DHAVE_PIPE_LOADER_DRI
 GBM_PC_LIB_PRIV = 
 GBM_PC_REQ_PRIV = 
@@ -271,12 +273,14 @@
 GLVND_LIBS = 
 GLX_TLS = no
 GL_LIB = GL
-GL_LIB_DEPS = -L/opt/local/lib -lXext -lXdamage -lXfixes -lX11-xcb -lX11 -lxcb -lxcb-glx -lXxf86vm  -lm -lpthread -pthread 
+GL_LIB_DEPS = -L/opt/local/lib -lXext -lXdamage -lXfixes -lX11-xcb -lX11 -lxcb -lxcb-glx  -lm -lpthread -pthread 
 GL_PC_CFLAGS = 
 GL_PC_LIB_PRIV = -lm -lpthread -pthread 
-GL_PC_REQ_PRIV =  x11 xext xdamage >= 1.1 xfixes x11-xcb xcb xcb-glx >= 1.8.1 xxf86vm
+GL_PC_REQ_PRIV =  x11 xext xdamage >= 1.1 xfixes x11-xcb xcb xcb-glx >= 1.8.1
+GL_PKGCONF_LIB = GL
 GREP = /opt/local/bin/ggrep
-HAVE_XF86VIDMODE = yes
+I915_CFLAGS = 
+I915_LIBS = 
 INDENT = cat
 INDENT_FLAGS = 
 INSTALL = /usr/bin/install -c
@@ -284,14 +288,14 @@
 INSTALL_PROGRAM = ${INSTALL}
 INSTALL_SCRIPT = ${INSTALL}
 INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
-INTEL_CFLAGS = 
-INTEL_LIBS = 
 LD = /opt/local/libexec/llvm-9.0/bin/ld
 LDFLAGS = -L/opt/local/lib -Wl,-headerpad_max_install_names -lMacportsLegacySupport -arch x86_64
+LD_BUILD_ID = 
 LD_NO_UNDEFINED = 
 LEX = flex
 LEXLIB = -lfl
 LEX_OUTPUT_ROOT = lex.yy
+LIBATOMIC_LIBS = 
 LIBCLC_INCLUDEDIR = 
 LIBCLC_LIBEXECDIR = 
 LIBDRM_CFLAGS = 
@@ -317,14 +321,14 @@
 LN_S = ln -s
 LTLIBOBJS = 
 LT_SYS_LIBRARY_PATH = 
-MAKEINFO = ${SHELL} '/opt/local/var/macports/build/_opt_SnowLeopardPorts_x11_mesa/mesa/work/mesa-17.1.6/bin/missing' makeinfo
+MAKEINFO = ${SHELL} '/opt/local/var/macports/build/_opt_macports-ports_x11_mesa/mesa/work/mesa-18.3.6/bin/missing' makeinfo
 MANIFEST_TOOL = :
 MKDIR_P = /opt/local/bin/gmkdir -p
-MSVC2013_COMPAT_CFLAGS = -Werror=pointer-arith -Werror=vla
-MSVC2013_COMPAT_CXXFLAGS = -Werror=pointer-arith -Werror=vla
+MSVC2013_COMPAT_CFLAGS =  -Werror=pointer-arith -Werror=vla
+MSVC2013_COMPAT_CXXFLAGS =  -Werror=pointer-arith -Werror=vla
 NINE_MAJOR = 1
 NINE_MINOR = 0
-NINE_TINY = 0
+NINE_PATCH = 0
 NINE_VERSION = 1.0.0
 NM = /opt/local/bin/nm
 NMEDIT = nmedit
@@ -334,9 +338,12 @@
 NVVIEUX_LIBS = 
 OBJDUMP = false
 OBJEXT = o
-OMX_CFLAGS = 
-OMX_LIBS = 
-OMX_LIB_INSTALL_DIR = 
+OMX_BELLAGIO_CFLAGS = 
+OMX_BELLAGIO_LIBS = 
+OMX_BELLAGIO_LIB_INSTALL_DIR = 
+OMX_TIZONIA_CFLAGS = 
+OMX_TIZONIA_LIBS = 
+OMX_TIZONIA_LIB_INSTALL_DIR = 
 OPENCL_LIBNAME = 
 OPENCL_VERSION = 1
 OSMESA_LIB = OSMesa
@@ -349,10 +356,10 @@
 PACKAGE = mesa
 PACKAGE_BUGREPORT = https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa
 PACKAGE_NAME = Mesa
-PACKAGE_STRING = Mesa 17.1.6
+PACKAGE_STRING = Mesa 18.3.6
 PACKAGE_TARNAME = mesa
 PACKAGE_URL = 
-PACKAGE_VERSION = 17.1.6
+PACKAGE_VERSION = 18.3.6
 PATH_SEPARATOR = :
 PKG_CONFIG = /opt/local/bin/pkg-config
 PKG_CONFIG_LIBDIR = 
@@ -364,11 +371,16 @@
 PTHREAD_CFLAGS = -D_THREAD_SAFE -pthread
 PTHREAD_LIBS = -lpthread -pthread
 PWR8_CFLAGS = 
-PYTHON2 = /opt/local/bin/python2.7
+PYTHON = /opt/local/bin/python3.9
+PYTHON_EXEC_PREFIX = ${exec_prefix}
+PYTHON_PLATFORM = darwin
+PYTHON_PREFIX = ${prefix}
+PYTHON_VERSION = 3.9
 RADEON_CFLAGS = 
 RADEON_LIBS = 
 RANLIB = ranlib
 RM = rm -f
+SCANNER_ARG = 
 SED = /opt/local/bin/gsed
 SELINUX_CFLAGS = 
 SELINUX_LIBS = 
@@ -380,7 +392,10 @@
 STRIP = strip
 SWR_AVX2_CXXFLAGS = 
 SWR_AVX_CXXFLAGS = 
-SWR_CXX11_CXXFLAGS = 
+SWR_KNL_CXXFLAGS = 
+SWR_SKX_CXXFLAGS = 
+V3D_SIMULATOR_CFLAGS = 
+V3D_SIMULATOR_LIBS = 
 VALGRIND_CFLAGS = 
 VALGRIND_LIBS = 
 VA_CFLAGS = 
@@ -395,30 +410,42 @@
 VDPAU_LIB_INSTALL_DIR = ${libdir}/vdpau
 VDPAU_MAJOR = 1
 VDPAU_MINOR = 0
-VERSION = 17.1.6
+VERSION = 18.3.6
 VISIBILITY_CFLAGS = -fvisibility=hidden
 VISIBILITY_CXXFLAGS = -fvisibility=hidden
 VL_CFLAGS = 
 VL_LIBS = 
 VULKAN_ICD_INSTALL_DIR = ${datarootdir}/vulkan/icd.d
-WAYLAND_CFLAGS = 
-WAYLAND_LIBS = 
-WAYLAND_SCANNER = :
+WAYLAND_CLIENT_CFLAGS = 
+WAYLAND_CLIENT_LIBS = 
+WAYLAND_EGL_CFLAGS = 
+WAYLAND_EGL_LIBS = 
+WAYLAND_PROTOCOLS_CFLAGS = 
+WAYLAND_PROTOCOLS_DATADIR = 
+WAYLAND_PROTOCOLS_LIBS = 
+WAYLAND_SCANNER = 
 WAYLAND_SCANNER_CFLAGS = 
 WAYLAND_SCANNER_LIBS = 
+WAYLAND_SERVER_CFLAGS = 
+WAYLAND_SERVER_LIBS = 
+WNO_OVERRIDE_INIT =  -Wno-override-init -Wno-initializer-overrides
 X11_INCLUDES =  
 XA_MAJOR = 2
-XA_MINOR = 3
-XA_TINY = 0
-XA_VERSION = 2.3.0
+XA_MINOR = 4
+XA_PATCH = 0
+XA_VERSION = 2.4.0
 XCB_DRI2_CFLAGS = 
 XCB_DRI2_LIBS = -L/opt/local/lib -lX11-xcb -lX11 -lxcb -lxcb-dri2 -lxcb-xfixes
 XCB_DRI3_CFLAGS = 
 XCB_DRI3_LIBS = 
-XF86VIDMODE_CFLAGS = 
-XF86VIDMODE_LIBS = -L/opt/local/lib -lXxf86vm
+XCB_DRI3_MODIFIERS_CFLAGS = 
+XCB_DRI3_MODIFIERS_LIBS = 
+XCB_RANDR_CFLAGS = 
+XCB_RANDR_LIBS = 
 XLIBGL_CFLAGS = 
 XLIBGL_LIBS = 
+XLIB_RANDR_CFLAGS = 
+XLIB_RANDR_LIBS = 
 XVMC_CFLAGS = 
 XVMC_LIBS = 
 XVMC_LIB_INSTALL_DIR = ${libdir}
@@ -428,10 +455,10 @@
 YFLAGS = 
 ZLIB_CFLAGS = 
 ZLIB_LIBS = -L/opt/local/lib -lz
-abs_builddir = /opt/local/var/macports/build/_opt_SnowLeopardPorts_x11_mesa/mesa/work/mesa-17.1.6/src/glx/apple
-abs_srcdir = /opt/local/var/macports/build/_opt_SnowLeopardPorts_x11_mesa/mesa/work/mesa-17.1.6/src/glx/apple
-abs_top_builddir = /opt/local/var/macports/build/_opt_SnowLeopardPorts_x11_mesa/mesa/work/mesa-17.1.6
-abs_top_srcdir = /opt/local/var/macports/build/_opt_SnowLeopardPorts_x11_mesa/mesa/work/mesa-17.1.6
+abs_builddir = /opt/local/var/macports/build/_opt_macports-ports_x11_mesa/mesa/work/mesa-18.3.6/src/glx/apple
+abs_srcdir = /opt/local/var/macports/build/_opt_macports-ports_x11_mesa/mesa/work/mesa-18.3.6/src/glx/apple
+abs_top_builddir = /opt/local/var/macports/build/_opt_macports-ports_x11_mesa/mesa/work/mesa-18.3.6
+abs_top_srcdir = /opt/local/var/macports/build/_opt_macports-ports_x11_mesa/mesa/work/mesa-18.3.6
 ac_ct_AR = ar
 ac_ct_CC = /opt/local/bin/clang-mp-9.0
 ac_ct_CXX = 
@@ -464,7 +491,7 @@
 ifGNUmake = 
 includedir = ${prefix}/include
 infodir = ${datarootdir}/info
-install_sh = ${SHELL} /opt/local/var/macports/build/_opt_SnowLeopardPorts_x11_mesa/mesa/work/mesa-17.1.6/bin/install-sh
+install_sh = ${SHELL} /opt/local/var/macports/build/_opt_macports-ports_x11_mesa/mesa/work/mesa-18.3.6/bin/install-sh
 libdir = ${exec_prefix}/lib
 libexecdir = ${exec_prefix}/libexec
 localedir = ${datarootdir}/locale
@@ -473,9 +500,13 @@
 mkdir_p = $(MKDIR_P)
 oldincludedir = /usr/include
 pdfdir = ${docdir}
+pkgpyexecdir = ${pyexecdir}/mesa
+pkgpythondir = ${pythondir}/mesa
 prefix = /opt/local
 program_transform_name = s,x,x,
 psdir = ${docdir}
+pyexecdir = ${exec_prefix}/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages
+pythondir = ${prefix}/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages
 sbindir = ${exec_prefix}/sbin
 sharedstatedir = ${prefix}/com
 srcdir = .
@@ -488,7 +519,10 @@
 top_build_prefix = ../../../
 top_builddir = ../../..
 top_srcdir = ../../..
-EXTRA_DIST = RELEASE_NOTES
+EXTRA_DIST = \
+	RELEASE_NOTES \
+	meson.build
+
 noinst_LTLIBRARIES = libappleglx.la
 AM_CFLAGS = \
 	-I$(top_srcdir)/src \
@@ -500,7 +534,6 @@
 	-I$(top_builddir)/src/mapi/glapi \
 	-I$(top_srcdir)/src/mapi/glapi \
 	$(VISIBILITY_CFLAGS) \
-	$(SHARED_GLAPI_CFLAGS) \
 	$(DEFINES) \
 	$(X11_INCLUDES)
 
diff -ur /opt/SnowLeopardPorts/x11/mesa/work/mesa-17.1.6/src/glx/apple/Makefile.am /opt/macports-ports/x11/mesa/work/mesa-18.3.6/src/glx/apple/Makefile.am
--- /opt/SnowLeopardPorts/x11/mesa/work/mesa-17.1.6/src/glx/apple/Makefile.am	2017-08-07 05:04:30.000000000 -0700
+++ /opt/macports-ports/x11/mesa/work/mesa-18.3.6/src/glx/apple/Makefile.am	2019-04-05 03:53:23.000000000 -0700
@@ -1,4 +1,6 @@
-EXTRA_DIST = RELEASE_NOTES
+EXTRA_DIST = \
+	RELEASE_NOTES \
+	meson.build
 
 noinst_LTLIBRARIES = libappleglx.la
 
@@ -12,7 +14,6 @@
 	-I$(top_builddir)/src/mapi/glapi \
 	-I$(top_srcdir)/src/mapi/glapi \
 	$(VISIBILITY_CFLAGS) \
-	$(SHARED_GLAPI_CFLAGS) \
 	$(DEFINES) \
 	$(X11_INCLUDES)
 
diff -ur /opt/SnowLeopardPorts/x11/mesa/work/mesa-17.1.6/src/glx/apple/Makefile.in /opt/macports-ports/x11/mesa/work/mesa-18.3.6/src/glx/apple/Makefile.in
--- /opt/SnowLeopardPorts/x11/mesa/work/mesa-17.1.6/src/glx/apple/Makefile.in	2021-02-03 12:12:39.000000000 -0800
+++ /opt/macports-ports/x11/mesa/work/mesa-18.3.6/src/glx/apple/Makefile.in	2021-02-03 12:12:59.000000000 -0800
@@ -91,7 +91,8 @@
 target_triplet = @target@
 subdir = src/glx/apple
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_gnu_make.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_compile_flag.m4 \
+	$(top_srcdir)/m4/ax_check_gnu_make.m4 \
 	$(top_srcdir)/m4/ax_check_python_mako_module.m4 \
 	$(top_srcdir)/m4/ax_gcc_builtin.m4 \
 	$(top_srcdir)/m4/ax_gcc_func_attribute.m4 \
@@ -209,6 +210,8 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
+BACKTRACE_CFLAGS = @BACKTRACE_CFLAGS@
+BACKTRACE_LIBS = @BACKTRACE_LIBS@
 BSYMBOLIC = @BSYMBOLIC@
 CC = @CC@
 CCAS = @CCAS@
@@ -222,6 +225,7 @@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
 CXX = @CXX@
+CXX11_CXXFLAGS = @CXX11_CXXFLAGS@
 CXXCPP = @CXXCPP@
 CXXDEPMODE = @CXXDEPMODE@
 CXXFLAGS = @CXXFLAGS@
@@ -255,8 +259,6 @@
 EXPAT_CFLAGS = @EXPAT_CFLAGS@
 EXPAT_LIBS = @EXPAT_LIBS@
 FGREP = @FGREP@
-FREEDRENO_CFLAGS = @FREEDRENO_CFLAGS@
-FREEDRENO_LIBS = @FREEDRENO_LIBS@
 GALLIUM_PIPE_LOADER_DEFINES = @GALLIUM_PIPE_LOADER_DEFINES@
 GBM_PC_LIB_PRIV = @GBM_PC_LIB_PRIV@
 GBM_PC_REQ_PRIV = @GBM_PC_REQ_PRIV@
@@ -275,8 +277,10 @@
 GL_PC_CFLAGS = @GL_PC_CFLAGS@
 GL_PC_LIB_PRIV = @GL_PC_LIB_PRIV@
 GL_PC_REQ_PRIV = @GL_PC_REQ_PRIV@
+GL_PKGCONF_LIB = @GL_PKGCONF_LIB@
 GREP = @GREP@
-HAVE_XF86VIDMODE = @HAVE_XF86VIDMODE@
+I915_CFLAGS = @I915_CFLAGS@
+I915_LIBS = @I915_LIBS@
 INDENT = @INDENT@
 INDENT_FLAGS = @INDENT_FLAGS@
 INSTALL = @INSTALL@
@@ -284,14 +288,14 @@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INTEL_CFLAGS = @INTEL_CFLAGS@
-INTEL_LIBS = @INTEL_LIBS@
 LD = @LD@
 LDFLAGS = @LDFLAGS@
+LD_BUILD_ID = @LD_BUILD_ID@
 LD_NO_UNDEFINED = @LD_NO_UNDEFINED@
 LEX = @LEX@
 LEXLIB = @LEXLIB@
 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBATOMIC_LIBS = @LIBATOMIC_LIBS@
 LIBCLC_INCLUDEDIR = @LIBCLC_INCLUDEDIR@
 LIBCLC_LIBEXECDIR = @LIBCLC_LIBEXECDIR@
 LIBDRM_CFLAGS = @LIBDRM_CFLAGS@
@@ -324,7 +328,7 @@
 MSVC2013_COMPAT_CXXFLAGS = @MSVC2013_COMPAT_CXXFLAGS@
 NINE_MAJOR = @NINE_MAJOR@
 NINE_MINOR = @NINE_MINOR@
-NINE_TINY = @NINE_TINY@
+NINE_PATCH = @NINE_PATCH@
 NINE_VERSION = @NINE_VERSION@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -334,9 +338,12 @@
 NVVIEUX_LIBS = @NVVIEUX_LIBS@
 OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
-OMX_CFLAGS = @OMX_CFLAGS@
-OMX_LIBS = @OMX_LIBS@
-OMX_LIB_INSTALL_DIR = @OMX_LIB_INSTALL_DIR@
+OMX_BELLAGIO_CFLAGS = @OMX_BELLAGIO_CFLAGS@
+OMX_BELLAGIO_LIBS = @OMX_BELLAGIO_LIBS@
+OMX_BELLAGIO_LIB_INSTALL_DIR = @OMX_BELLAGIO_LIB_INSTALL_DIR@
+OMX_TIZONIA_CFLAGS = @OMX_TIZONIA_CFLAGS@
+OMX_TIZONIA_LIBS = @OMX_TIZONIA_LIBS@
+OMX_TIZONIA_LIB_INSTALL_DIR = @OMX_TIZONIA_LIB_INSTALL_DIR@
 OPENCL_LIBNAME = @OPENCL_LIBNAME@
 OPENCL_VERSION = @OPENCL_VERSION@
 OSMESA_LIB = @OSMESA_LIB@
@@ -364,11 +371,16 @@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
 PWR8_CFLAGS = @PWR8_CFLAGS@
-PYTHON2 = @PYTHON2@
+PYTHON = @PYTHON@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
 RADEON_CFLAGS = @RADEON_CFLAGS@
 RADEON_LIBS = @RADEON_LIBS@
 RANLIB = @RANLIB@
 RM = @RM@
+SCANNER_ARG = @SCANNER_ARG@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
 SELINUX_LIBS = @SELINUX_LIBS@
@@ -380,7 +392,10 @@
 STRIP = @STRIP@
 SWR_AVX2_CXXFLAGS = @SWR_AVX2_CXXFLAGS@
 SWR_AVX_CXXFLAGS = @SWR_AVX_CXXFLAGS@
-SWR_CXX11_CXXFLAGS = @SWR_CXX11_CXXFLAGS@
+SWR_KNL_CXXFLAGS = @SWR_KNL_CXXFLAGS@
+SWR_SKX_CXXFLAGS = @SWR_SKX_CXXFLAGS@
+V3D_SIMULATOR_CFLAGS = @V3D_SIMULATOR_CFLAGS@
+V3D_SIMULATOR_LIBS = @V3D_SIMULATOR_LIBS@
 VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
 VALGRIND_LIBS = @VALGRIND_LIBS@
 VA_CFLAGS = @VA_CFLAGS@
@@ -401,24 +416,36 @@
 VL_CFLAGS = @VL_CFLAGS@
 VL_LIBS = @VL_LIBS@
 VULKAN_ICD_INSTALL_DIR = @VULKAN_ICD_INSTALL_DIR@
-WAYLAND_CFLAGS = @WAYLAND_CFLAGS@
-WAYLAND_LIBS = @WAYLAND_LIBS@
+WAYLAND_CLIENT_CFLAGS = @WAYLAND_CLIENT_CFLAGS@
+WAYLAND_CLIENT_LIBS = @WAYLAND_CLIENT_LIBS@
+WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@
+WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@
+WAYLAND_PROTOCOLS_CFLAGS = @WAYLAND_PROTOCOLS_CFLAGS@
+WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
+WAYLAND_PROTOCOLS_LIBS = @WAYLAND_PROTOCOLS_LIBS@
 WAYLAND_SCANNER = @WAYLAND_SCANNER@
 WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
 WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
+WAYLAND_SERVER_CFLAGS = @WAYLAND_SERVER_CFLAGS@
+WAYLAND_SERVER_LIBS = @WAYLAND_SERVER_LIBS@
+WNO_OVERRIDE_INIT = @WNO_OVERRIDE_INIT@
 X11_INCLUDES = @X11_INCLUDES@
 XA_MAJOR = @XA_MAJOR@
 XA_MINOR = @XA_MINOR@
-XA_TINY = @XA_TINY@
+XA_PATCH = @XA_PATCH@
 XA_VERSION = @XA_VERSION@
 XCB_DRI2_CFLAGS = @XCB_DRI2_CFLAGS@
 XCB_DRI2_LIBS = @XCB_DRI2_LIBS@
 XCB_DRI3_CFLAGS = @XCB_DRI3_CFLAGS@
 XCB_DRI3_LIBS = @XCB_DRI3_LIBS@
-XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@
-XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@
+XCB_DRI3_MODIFIERS_CFLAGS = @XCB_DRI3_MODIFIERS_CFLAGS@
+XCB_DRI3_MODIFIERS_LIBS = @XCB_DRI3_MODIFIERS_LIBS@
+XCB_RANDR_CFLAGS = @XCB_RANDR_CFLAGS@
+XCB_RANDR_LIBS = @XCB_RANDR_LIBS@
 XLIBGL_CFLAGS = @XLIBGL_CFLAGS@
 XLIBGL_LIBS = @XLIBGL_LIBS@
+XLIB_RANDR_CFLAGS = @XLIB_RANDR_CFLAGS@
+XLIB_RANDR_LIBS = @XLIB_RANDR_LIBS@
 XVMC_CFLAGS = @XVMC_CFLAGS@
 XVMC_LIBS = @XVMC_LIBS@
 XVMC_LIB_INSTALL_DIR = @XVMC_LIB_INSTALL_DIR@
@@ -473,9 +500,13 @@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
 pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -488,7 +519,10 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
-EXTRA_DIST = RELEASE_NOTES
+EXTRA_DIST = \
+	RELEASE_NOTES \
+	meson.build
+
 noinst_LTLIBRARIES = libappleglx.la
 AM_CFLAGS = \
 	-I$(top_srcdir)/src \
@@ -500,7 +534,6 @@
 	-I$(top_builddir)/src/mapi/glapi \
 	-I$(top_srcdir)/src/mapi/glapi \
 	$(VISIBILITY_CFLAGS) \
-	$(SHARED_GLAPI_CFLAGS) \
 	$(DEFINES) \
 	$(X11_INCLUDES)
 
diff -ur /opt/SnowLeopardPorts/x11/mesa/work/mesa-17.1.6/src/glx/apple/apple_glapi.c /opt/macports-ports/x11/mesa/work/mesa-18.3.6/src/glx/apple/apple_glapi.c
--- /opt/SnowLeopardPorts/x11/mesa/work/mesa-17.1.6/src/glx/apple/apple_glapi.c	2021-02-03 12:12:01.000000000 -0800
+++ /opt/macports-ports/x11/mesa/work/mesa-18.3.6/src/glx/apple/apple_glapi.c	2021-02-03 12:12:17.000000000 -0800
@@ -42,7 +42,6 @@
 #include "main/remap.h"
 #include "glapi.h"
 #include "glapitable.h"
-#include "main/dispatch.h"
 
 #include "apple_glx.h"
 #include "apple_xgl_api.h"
@@ -64,12 +63,11 @@
     assert(__applegl_api);
     memcpy(__applegl_api, __ogl_framework_api, sizeof(struct _glapi_table));
 
-    SET_ReadPixels(__applegl_api, __applegl_glReadPixels);
-    SET_CopyPixels(__applegl_api, __applegl_glCopyPixels);
-    SET_CopyColorTable(__applegl_api, __applegl_glCopyColorTable);
-    SET_DrawBuffer(__applegl_api, __applegl_glDrawBuffer);
-    SET_DrawBuffers(__applegl_api, __applegl_glDrawBuffers);
-    SET_Viewport(__applegl_api, __applegl_glViewport);
+    _glapi_table_patch(__applegl_api, "ReadPixels", __applegl_glReadPixels);
+    _glapi_table_patch(__applegl_api, "CopyPixels", __applegl_glCopyPixels);
+    _glapi_table_patch(__applegl_api, "CopyColorTable", __applegl_glCopyColorTable);
+    _glapi_table_patch(__applegl_api, "DrawBuffers", __applegl_glDrawBuffer);
+    _glapi_table_patch(__applegl_api, "Viewport", __applegl_glViewport);
 }
 
 void apple_glapi_set_dispatch(void) {
diff -ur /opt/SnowLeopardPorts/x11/mesa/work/mesa-17.1.6/src/glx/apple/apple_glx_context.c /opt/macports-ports/x11/mesa/work/mesa-18.3.6/src/glx/apple/apple_glx_context.c
--- /opt/SnowLeopardPorts/x11/mesa/work/mesa-17.1.6/src/glx/apple/apple_glx_context.c	2017-08-07 05:04:30.000000000 -0700
+++ /opt/macports-ports/x11/mesa/work/mesa-18.3.6/src/glx/apple/apple_glx_context.c	2019-04-05 03:53:23.000000000 -0700
@@ -55,6 +55,8 @@
 #include "apple_cgl.h"
 #include "apple_glx_drawable.h"
 
+#include "util/debug.h"
+
 static pthread_mutex_t context_lock = PTHREAD_MUTEX_INITIALIZER;
 
 /*
@@ -181,7 +183,7 @@
          *x11errorptr = false;
       }
 
-      if (getenv("LIBGL_DIAGNOSTIC"))
+      if (env_var_as_boolean("LIBGL_DIAGNOSTIC", false))
          fprintf(stderr, "error: %s\n", apple_cgl.error_string(error));
 
       return true;
diff -ur /opt/SnowLeopardPorts/x11/mesa/work/mesa-17.1.6/src/glx/apple/apple_glx_log.c /opt/macports-ports/x11/mesa/work/mesa-18.3.6/src/glx/apple/apple_glx_log.c
--- /opt/SnowLeopardPorts/x11/mesa/work/mesa-17.1.6/src/glx/apple/apple_glx_log.c	2017-08-07 05:04:30.000000000 -0700
+++ /opt/macports-ports/x11/mesa/work/mesa-18.3.6/src/glx/apple/apple_glx_log.c	2019-04-05 03:53:23.000000000 -0700
@@ -36,12 +36,13 @@
 #include <inttypes.h>
 #include <pthread.h>
 #include "apple_glx_log.h"
+#include "util/debug.h"
 
 static bool diagnostic = false;
 static aslclient aslc;
 
 void apple_glx_log_init(void) {
-    if (getenv("LIBGL_DIAGNOSTIC")) {
+    if (env_var_as_boolean("LIBGL_DIAGNOSTIC", false)) {
         diagnostic = true;
     }
 
@@ -96,6 +97,7 @@
         fprintf(stderr, "%-9s %24s:%-4d %s(%"PRIu64"): ",
                 _asl_level_string(level), file, line, function, thread);
         vfprintf(stderr, fmt, args2);
+        va_end(args2);
     }
 
     msg = asl_new(ASL_TYPE_MSG);
diff -ur /opt/SnowLeopardPorts/x11/mesa/work/mesa-17.1.6/src/glx/apple/apple_glx_pbuffer.c /opt/macports-ports/x11/mesa/work/mesa-18.3.6/src/glx/apple/apple_glx_pbuffer.c
--- /opt/SnowLeopardPorts/x11/mesa/work/mesa-17.1.6/src/glx/apple/apple_glx_pbuffer.c	2017-08-07 05:04:30.000000000 -0700
+++ /opt/macports-ports/x11/mesa/work/mesa-18.3.6/src/glx/apple/apple_glx_pbuffer.c	2019-04-05 03:53:23.000000000 -0700
@@ -40,12 +40,14 @@
 #include "apple_glx_context.h"
 #include "apple_glx_drawable.h"
 
+#include <stdbool.h>
 #include <stdlib.h>
 #include <pthread.h>
 #include <assert.h>
 #include "apple_glx.h"
 #include "glxconfig.h"
 #include "apple_cgl.h"
+#include "util/debug.h"
 
 /* mesa defines in glew.h, Apple in glext.h.
  * Due to namespace nightmares, just do it here.
@@ -208,7 +210,7 @@
 
       err = apple_cgl.choose_pixel_format(attr, &pfobj, &vsref);
       if (kCGLNoError != err) {
-         if (getenv("LIBGL_DIAGNOSTIC")) {
+         if (env_var_as_boolean("LIBGL_DIAGNOSTIC", false)) {
             printf("choose_pixel_format error in %s: %s\n", __func__,
                    apple_cgl.error_string(err));
          }
@@ -220,7 +222,7 @@
       err = apple_cgl.create_context(pfobj, NULL, &newcontext);
 
       if (kCGLNoError != err) {
-         if (getenv("LIBGL_DIAGNOSTIC")) {
+         if (env_var_as_boolean("LIBGL_DIAGNOSTIC", false)) {
             printf("create_context error in %s: %s\n", __func__,
                    apple_cgl.error_string(err));
          }
diff -ur /opt/SnowLeopardPorts/x11/mesa/work/mesa-17.1.6/src/glx/apple/apple_visual.c /opt/macports-ports/x11/mesa/work/mesa-18.3.6/src/glx/apple/apple_visual.c
--- /opt/SnowLeopardPorts/x11/mesa/work/mesa-17.1.6/src/glx/apple/apple_visual.c	2017-08-07 05:04:30.000000000 -0700
+++ /opt/macports-ports/x11/mesa/work/mesa-18.3.6/src/glx/apple/apple_visual.c	2019-04-05 03:53:23.000000000 -0700
@@ -32,6 +32,7 @@
 #include <stdlib.h>
 #include <assert.h>
 #include <GL/gl.h>
+#include <util/debug.h>
 
 /* <rdar://problem/6953344> */
 #define glTexImage1D glTexImage1D_OSX
@@ -82,7 +83,7 @@
    int numattr = 0;
    GLint vsref = 0;
    CGLError error = 0;
-   bool use_core_profile = getenv("LIBGL_PROFILE_CORE");
+   bool use_core_profile = env_var_as_boolean("LIBGL_PROFILE_CORE", false);
 
    if (offscreen) {
       apple_glx_diagnostic
@@ -90,13 +91,13 @@
 
       attr[numattr++] = kCGLPFAOffScreen;
    }
-   else if (getenv("LIBGL_ALWAYS_SOFTWARE") != NULL) {
+   else if (env_var_as_boolean("LIBGL_ALWAYS_SOFTWARE", false)) {
       apple_glx_diagnostic
          ("Software rendering requested.  Using kCGLRendererGenericFloatID.\n");
       attr[numattr++] = kCGLPFARendererID;
       attr[numattr++] = kCGLRendererGenericFloatID;
    }
-   else if (getenv("LIBGL_ALLOW_SOFTWARE") != NULL) {
+   else if (env_var_as_boolean("LIBGL_ALLOW_SOFTWARE", false)) {
       apple_glx_diagnostic
          ("Software rendering is not being excluded.  Not using kCGLPFAAccelerated.\n");
    }
@@ -190,7 +191,7 @@
 
    if (!*pfobj) {
       snprintf(__crashreporter_info_buff__, sizeof(__crashreporter_info_buff__),
-               "No matching pixelformats found, perhaps try using LIBGL_ALLOW_SOFTWARE\n");
+               "No matching pixelformats found, perhaps try setting LIBGL_ALLOW_SOFTWARE=true\n");
       fprintf(stderr, "%s", __crashreporter_info_buff__);
       abort();
    }
diff -ur /opt/SnowLeopardPorts/x11/mesa/work/mesa-17.1.6/src/glx/apple/glx_empty.c /opt/macports-ports/x11/mesa/work/mesa-18.3.6/src/glx/apple/glx_empty.c
--- /opt/SnowLeopardPorts/x11/mesa/work/mesa-17.1.6/src/glx/apple/glx_empty.c	2017-08-07 05:04:30.000000000 -0700
+++ /opt/macports-ports/x11/mesa/work/mesa-18.3.6/src/glx/apple/glx_empty.c	2019-04-05 03:53:23.000000000 -0700
@@ -50,39 +50,6 @@
 
 
 /*
-** GLX_SGIX_swap_group
-*/
-void
-glXJoinSwapGroupSGIX(Display * dpy, GLXDrawable drawable, GLXDrawable member)
-{
-   (void) dpy;
-   (void) drawable;
-   (void) member;
-}
-
-
-/*
-** GLX_SGIX_swap_barrier
-*/
-void
-glXBindSwapBarrierSGIX(Display * dpy, GLXDrawable drawable, int barrier)
-{
-   (void) dpy;
-   (void) drawable;
-   (void) barrier;
-}
-
-Bool
-glXQueryMaxSwapBarriersSGIX(Display * dpy, int screen, int *max)
-{
-   (void) dpy;
-   (void) screen;
-   (void) max;
-   return False;
-}
-
-
-/*
 ** GLX_OML_sync_control
 */
 Bool
Only in /opt/macports-ports/x11/mesa/work/mesa-18.3.6/src/glx/apple: meson.build
