aboutsummaryrefslogtreecommitdiff
path: root/graphics/libGL
diff options
context:
space:
mode:
authorMatthew Rezny <rezny@FreeBSD.org>2017-04-10 19:14:48 +0000
committerMatthew Rezny <rezny@FreeBSD.org>2017-04-10 19:14:48 +0000
commitef2181dc7a44343ee2bb560b4fc3eb401b9b6888 (patch)
treec58d60ac157f983864bcb88e541f28d5db467e82 /graphics/libGL
parente7b02d5219e2ab259688f37d20c82943431bce21 (diff)
downloadports-ef2181dc7a44343ee2bb560b4fc3eb401b9b6888.tar.gz
ports-ef2181dc7a44343ee2bb560b4fc3eb401b9b6888.zip
Notes
Diffstat (limited to 'graphics/libGL')
-rw-r--r--graphics/libGL/Makefile.common39
-rw-r--r--graphics/libGL/Makefile.targets4
-rw-r--r--graphics/libGL/distinfo6
-rw-r--r--graphics/libGL/files/configure.ac105
-rw-r--r--graphics/libGL/files/patch-configure82
-rw-r--r--graphics/libGL/files/patch-include_GL_internal_dri__interface.h (renamed from graphics/libGL/files/patch-include__GL__internal__dri_interface.h)0
-rw-r--r--graphics/libGL/files/patch-src_egl_drivers_dri2_platform__x11.c16
-rw-r--r--graphics/libGL/files/patch-src_gallium_auxiliary_pipe-loader_pipe__loader__drm.c (renamed from graphics/libGL/files/patch-src__gallium__auxiliary__pipe-loader__pipe_loader_drm.c)10
-rw-r--r--graphics/libGL/files/patch-src_gallium_include_pipe_p__config.h (renamed from graphics/libGL/files/patch-src__gallium__include__pipe__p_config.h)0
-rw-r--r--graphics/libGL/files/patch-src_gallium_state__trackers_clover_llvm_invocation.cpp4
-rw-r--r--graphics/libGL/files/patch-src_gallium_state__trackers_clover_util_range.hpp (renamed from graphics/libGL/files/patch-src__gallium__state_trackers__clover__util__range.hpp)0
-rw-r--r--graphics/libGL/files/patch-src_gallium_winsys_svga_drm_vmw__screen__ioctl.c (renamed from graphics/libGL/files/patch-src__gallium__winsys__svga__drm__vmw_screen_ioctl.c)0
-rw-r--r--graphics/libGL/files/patch-src_glx_glxext.c16
-rw-r--r--graphics/libGL/files/patch-src_intel_tools_aubinator.c6
-rw-r--r--graphics/libGL/files/patch-src_mapi_glapi_gen_gl__gentable.py (renamed from graphics/libGL/files/patch-src__mapi__glapi__gen__gl_gentable.py)0
-rw-r--r--graphics/libGL/files/patch-src_mesa_main_compiler.h (renamed from graphics/libGL/files/patch-src__mesa__main__compiler.h)0
-rw-r--r--graphics/libGL/files/patch-src_util_ralloc.c6
17 files changed, 165 insertions, 129 deletions
diff --git a/graphics/libGL/Makefile.common b/graphics/libGL/Makefile.common
index 0d54cf97e115..13a6d361f8db 100644
--- a/graphics/libGL/Makefile.common
+++ b/graphics/libGL/Makefile.common
@@ -18,7 +18,7 @@
MESAVERSION= ${MESABASEVERSION}${MESASUBVERSION:C/^(.)/.\1/}
MESADISTVERSION=${MESABASEVERSION}${MESASUBVERSION:C/^(.)/-\1/}
-MESABASEVERSION= 13.0.6
+MESABASEVERSION= 17.0.3
# if there is a subversion, don't include the '-' between 7.11-rc2.
MESASUBVERSION=
@@ -53,24 +53,20 @@ SHEBANG_FILES= src/gallium/*/*/*.py src/gallium/tools/trace/*.py \
src/mapi/glapi/gen/*.py
SHEBANG_FILES+= src/mapi/mapi_abi.py
-MASTERDIR= ${.CURDIR}/../../graphics/libGL
-PATCHDIR= ${MASTERDIR}/files
-WRKSRC= ${WRKDIR}/mesa-${MESADISTVERSION}
-DESCR= ${.CURDIR}/pkg-descr
-PLIST= ${.CURDIR}/pkg-plist
-INSTALL_TARGET= install-strip
+MASTERDIR= ${.CURDIR}/../../graphics/libGL
+PATCHDIR= ${MASTERDIR}/files
+WRKSRC= ${WRKDIR}/mesa-${MESADISTVERSION}
+DESCR= ${.CURDIR}/pkg-descr
+PLIST= ${.CURDIR}/pkg-plist
+INSTALL_TARGET= install-strip
-COMPONENT= ${PORTNAME:tl:C/^lib//:C/mesa-//}
+COMPONENT= ${PORTNAME:tl:C/^lib//:C/mesa-//}
.if (${ARCH} != sparc64 && ${ARCH} != ia64) # no working LLVM
-MESA_LLVM_VER?= 39
+MESA_LLVM_VER?= 40
LDFLAGS+= -Wl,-rpath=${LOCALBASE}/llvm${MESA_LLVM_VER}/lib
.endif
-CONFIGURE_ARGS+= --with-sha1=libcrypto
-
-CONFIGURE_ARGS+= --enable-gbm
-
# There are issues that need to be fixed to use TLS model "initial-exec"
# So stick with "global-dynamic"'s model for now. kan@ is working on a
# patch for rtld. We might want to backport global-dynamic or
@@ -132,23 +128,6 @@ CONFIGURE_ARGS+= --enable-gallium-llvm --enable-llvm-shared-libs
CONFIGURE_ARGS+= --disable-gallium-llvm
.endif
-.if ${PORT_OPTIONS:MTEXTURE}
-CONFIGURE_ARGS+=--enable-texture-float
-.endif
-
-# only support on DragonFly. FreeBSD's drm doesn't support it.
-.if ${OPSYS} == DragonFly && ${COMPONENT:Mdri} != ""
-CONFIGURE_ARGS+=--enable-vdpau
-LIB_DEPENDS+= libvdpau.so:multimedia/libvdpau
-PLIST_SUB+= VDPAU=""
-.else
-CONFIGURE_ARGS+=--disable-vdpau
-PLIST_SUB+= VDPAU="@comment "
-.endif
-
-# VAAPI support?
-CONFIGURE_ARGS+=--disable-va
-
ALL_DRI_DRIVERS= I915 I965 RADEON R200 SWRAST
ALL_GALLIUM_DRIVERS= R300 R600 RADEONSI SVGA SWRAST
diff --git a/graphics/libGL/Makefile.targets b/graphics/libGL/Makefile.targets
index 16d2576de188..71629e2b156b 100644
--- a/graphics/libGL/Makefile.targets
+++ b/graphics/libGL/Makefile.targets
@@ -4,7 +4,7 @@
post-patch:
.if ${OPSYS} == FreeBSD
- @${REINPLACE_CMD} -e 's|x86_64|amd64|' -e 's|\\S\*//|[:space:]* //|' \
+ @${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"
#
@@ -17,7 +17,7 @@ post-patch:
.endif
.else # ${OPSYS} == DragonFly
# Sed on dragonfly doesn't support \< or \>
- @${REINPLACE_CMD} -e 's|\\>//|[[:>:]]//|' -e 's|\\S\*//|[:space:]* //|' \
+ @${REINPLACE_CMD} -e 's|\\>//|[[:>:]]//|' \
${WRKSRC}/configure
.endif # ${OPSYS}
@${REINPLACE_CMD} -e 's|/etc/|${PREFIX}/etc/|g' \
diff --git a/graphics/libGL/distinfo b/graphics/libGL/distinfo
index 12db05cdad4f..e8cc973ab76a 100644
--- a/graphics/libGL/distinfo
+++ b/graphics/libGL/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1490202594
-SHA256 (mesa-13.0.6.tar.xz) = 29ef104a7fc082d352b1599bd6cb1d040be424ccd22f5e0eb7ee9b0e9acd3597
-SIZE (mesa-13.0.6.tar.xz) = 9179236
+TIMESTAMP = 1491068637
+SHA256 (mesa-17.0.3.tar.xz) = ca646f5075a002d60ef9123c8a4331cede155c01712ef945a65c59a5e69fe7ed
+SIZE (mesa-17.0.3.tar.xz) = 9485792
diff --git a/graphics/libGL/files/configure.ac b/graphics/libGL/files/configure.ac
index 9d63949fd973..f5bd08bdf3f9 100644
--- a/graphics/libGL/files/configure.ac
+++ b/graphics/libGL/files/configure.ac
@@ -1,35 +1,54 @@
---- configure.ac.orig 2016-06-21 14:31:09.000000000 +0200
-+++ configure.ac 2016-07-08 13:05:53.236433000 +0200
-@@ -871,7 +872,7 @@
- [enable_dri=yes])
+--- configure.ac.orig 2017-04-01 15:33:36 UTC
++++ configure.ac
+@@ -943,18 +943,19 @@ llvm_add_target() {
+ # $1 is the llvm-config command with arguments.
+ strip_unwanted_llvm_flags() {
+ # Use \> (marks the end of the word)
+- echo " `$1`" | sed \
+- -e 's/\s\+-m\S*//g' \
+- -e 's/\s\+-DNDEBUG\>//g' \
+- -e 's/\s\+-D_GNU_SOURCE\>//g' \
+- -e 's/\s\+-pedantic\>//g' \
+- -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/\s\+-f\S*//g' \
++ -e 's/[[[:space:]]]+-f[[^[:space:]]]*//g' \
+ -e 's/-Fno-rtti\>/-fno-rtti/g' \
+- -e 's/^ //'
++ -e 's/-fno-exceptions\>//g' \
++ -e 's/^[[[:space:]]]//'
+ }
+
+ llvm_set_environment_variables() {
+@@ -1121,7 +1122,7 @@ fi
+ AC_SUBST(LIBSENSORS_LIBS)
case "$host_os" in
-linux*)
-+linux*|freebsd*)
++linux* | freebsd*)
dri3_default=yes
;;
*)
-@@ -1540,6 +1548,19 @@
- ;;
- gnu*)
- DEFINES="$DEFINES -DHAVE_ALIAS"
-+dnl not sure about dri3 support, just enable it for now.
-+ if test "x$enable_dri3" = xyes; then
-+ DEFINES="$DEFINES -DHAVE_DRI3"
-+ fi
-+
-+ case "$host_cpu" in
-+ powerpc* | sparc*)
-+ # Build only the drivers for cards that exist on PowerPC/sparc
-+ if test "x$with_dri_drivers" = "xyes"; then
-+ with_dri_drivers="r200 radeon swrast"
-+ fi
-+ ;;
-+ esac
- ;;
- cygwin*)
- if test "x$with_dri_drivers" = "xyes"; then
-@@ -1921,9 +1948,19 @@
+@@ -1631,7 +1632,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
+- linux*)
++ linux* | freebsd*)
+ if test "x$enable_dri3" = xyes; then
+ DEFINES="$DEFINES -DHAVE_DRI3"
+ fi
+@@ -2002,9 +2003,18 @@ if test "x$enable_opencl" = xyes; then
AC_MSG_ERROR([cannot enable OpenCL without Gallium])
fi
@@ -44,30 +63,16 @@
if test $GCC_VERSION_MAJOR -lt 4 -o $GCC_VERSION_MAJOR -eq 4 -a $GCC_VERSION_MINOR -lt 7; then
AC_MSG_ERROR([gcc >= 4.7 is required to build clover])
fi
-+# end of clang test.
-+ fi
++ fi # end of clang test
if test "x$have_libclc" = xno; then
AC_MSG_ERROR([pkg-config cannot find libclc.pc which is required to build clover.
-@@ -2102,9 +2139,9 @@
- 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=[[:graph:]]* //g' \
-+ -e 's/-mtune=[[:graph:]]* //g' \
-+ -e 's/-mcpu=[[:graph:]]* //g' \
- -e 's/-DNDEBUG\>//g' \
- -e 's/-D_GNU_SOURCE\>//g' \
- -e 's/-pedantic\>//g' \
-@@ -2196,8 +2233,6 @@
- CLANG_LIBDIR=${LLVM_LIBDIR}
- fi
- CLANG_RESOURCE_DIR=$CLANG_LIBDIR/clang/${LLVM_VERSION}
-- AS_IF([test ! -f "$CLANG_RESOURCE_DIR/include/stddef.h"],
-- [AC_MSG_ERROR([Could not find clang internal header stddef.h in $CLANG_RESOURCE_DIR Use --with-clang-libdir to specify the correct path to the clang libraries.])])
- fi
- else
- MESA_LLVM=0
+@@ -2061,8 +2071,6 @@ if test "x$enable_opencl" = xyes; then
+ CLANG_LIBDIR=${LLVM_LIBDIR}
+ fi
+ CLANG_RESOURCE_DIR=$CLANG_LIBDIR/clang/${LLVM_VERSION}
+- AS_IF([test ! -f "$CLANG_RESOURCE_DIR/include/stddef.h"],
+- [AC_MSG_ERROR([Could not find clang internal header stddef.h in $CLANG_RESOURCE_DIR Use --with-clang-libdir to specify the correct path to the clang libraries.])])
+ fi
+ AM_CONDITIONAL(HAVE_CLOVER, test "x$enable_opencl" = xyes)
+ AM_CONDITIONAL(HAVE_CLOVER_ICD, test "x$enable_opencl_icd" = xyes)
diff --git a/graphics/libGL/files/patch-configure b/graphics/libGL/files/patch-configure
index fd206903ecdf..5216c37796bd 100644
--- a/graphics/libGL/files/patch-configure
+++ b/graphics/libGL/files/patch-configure
@@ -1,34 +1,54 @@
---- configure.orig 2017-01-05 15:52:21 UTC
+--- configure.orig 2017-04-01 15:33:50 UTC
+++ configure
-@@ -21955,7 +21955,7 @@ fi
+@@ -22351,18 +22351,19 @@ llvm_add_target() {
+ # $1 is the llvm-config command with arguments.
+ strip_unwanted_llvm_flags() {
+ # Use \> (marks the end of the word)
+- echo " `$1`" | sed \
+- -e 's/\s\+-m\S*//g' \
+- -e 's/\s\+-DNDEBUG\>//g' \
+- -e 's/\s\+-D_GNU_SOURCE\>//g' \
+- -e 's/\s\+-pedantic\>//g' \
+- -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/\s\+-f\S*//g' \
++ -e 's/[[[:space:]]]+-f[[^[:space:]]]*//g' \
+ -e 's/-Fno-rtti\>/-fno-rtti/g' \
+- -e 's/^ //'
++ -e 's/-fno-exceptions\>//g' \
++ -e 's/^[[[:space:]]]//'
+ }
+
+ llvm_set_environment_variables() {
+@@ -22560,7 +22561,7 @@ fi
case "$host_os" in
-linux*)
-+linux*|freebsd*)
++linux* | freebsd*)
dri3_default=yes
;;
*)
-@@ -23968,6 +23968,18 @@ if test "x$enable_dri" = xyes; then
- ;;
- *freebsd* | dragonfly* | *netbsd* | openbsd*)
- DEFINES="$DEFINES -DHAVE_ALIAS"
-+ if test "x$enable_dri3" = xyes; then
-+ DEFINES="$DEFINES -DHAVE_DRI3"
-+ fi
-+
-+ case "$host_cpu" in
-+ powerpc* | sparc*)
-+ # Build only the drivers for cards that exist on PowerPC/sparc
-+ if test "x$with_dri_drivers" = "xyes"; then
-+ with_dri_drivers="r200 radeon swrast"
-+ fi
-+ ;;
-+ esac
- ;;
- gnu*)
- DEFINES="$DEFINES -DHAVE_ALIAS"
-@@ -25849,9 +25861,19 @@ if test "x$enable_opencl" = xyes; then
+@@ -24099,7 +24100,7 @@ fi
+ if test "x$enable_dri" = xyes; then
+ # Platform specific settings and drivers to build
+ case "$host_os" in
+- linux*)
++ linux* | freebsd*)
+ if test "x$enable_dri3" = xyes; then
+ DEFINES="$DEFINES -DHAVE_DRI3"
+ fi
+@@ -25851,9 +25852,19 @@ if test "x$enable_opencl" = xyes; then
as_fn_error $? "cannot enable OpenCL without Gallium" "$LINENO" 5
fi
@@ -48,13 +68,13 @@
if test "x$have_libclc" = xno; then
as_fn_error $? "pkg-config cannot find libclc.pc which is required to build clover.
-@@ -26670,9 +26692,6 @@ fi
- CLANG_LIBDIR=${LLVM_LIBDIR}
- fi
- CLANG_RESOURCE_DIR=$CLANG_LIBDIR/clang/${LLVM_VERSION}
-- if test ! -f "$CLANG_RESOURCE_DIR/include/stddef.h"; then :
+@@ -25916,9 +25927,6 @@ rm -f core conftest.err conftest.$ac_obj
+ CLANG_LIBDIR=${LLVM_LIBDIR}
+ fi
+ CLANG_RESOURCE_DIR=$CLANG_LIBDIR/clang/${LLVM_VERSION}
+- if test ! -f "$CLANG_RESOURCE_DIR/include/stddef.h"; then :
- as_fn_error $? "Could not find clang internal header stddef.h in $CLANG_RESOURCE_DIR Use --with-clang-libdir to specify the correct path to the clang libraries." "$LINENO" 5
-fi
- fi
- else
- MESA_LLVM=0
+ fi
+ if test "x$enable_opencl" = xyes; then
+ HAVE_CLOVER_TRUE=
diff --git a/graphics/libGL/files/patch-include__GL__internal__dri_interface.h b/graphics/libGL/files/patch-include_GL_internal_dri__interface.h
index 292d66dd6d2b..292d66dd6d2b 100644
--- a/graphics/libGL/files/patch-include__GL__internal__dri_interface.h
+++ b/graphics/libGL/files/patch-include_GL_internal_dri__interface.h
diff --git a/graphics/libGL/files/patch-src_egl_drivers_dri2_platform__x11.c b/graphics/libGL/files/patch-src_egl_drivers_dri2_platform__x11.c
new file mode 100644
index 000000000000..40c8de0d4a1c
--- /dev/null
+++ b/graphics/libGL/files/patch-src_egl_drivers_dri2_platform__x11.c
@@ -0,0 +1,16 @@
+# work-around for https://bugs.freedesktop.org/show_bug.cgi?id=100627
+#
+--- src/egl/drivers/dri2/platform_x11.c.orig 2017-04-01 15:33:36 UTC
++++ src/egl/drivers/dri2/platform_x11.c
+@@ -1507,7 +1507,11 @@
+
+ if (!getenv("LIBGL_ALWAYS_SOFTWARE")) {
+ #ifdef HAVE_DRI3
++#if (defined(__FreeBSD__) || defined(__FreeBSD_kernel__)) && !defined (__DRM_NEXT__)
++ if (getenv("LIBGL_DRI3_ENABLE") && !getenv("LIBGL_DRI3_DISABLE"))
++#else
+ if (!getenv("LIBGL_DRI3_DISABLE"))
++#endif
+ initialized = dri2_initialize_x11_dri3(drv, disp);
+ #endif
+
diff --git a/graphics/libGL/files/patch-src__gallium__auxiliary__pipe-loader__pipe_loader_drm.c b/graphics/libGL/files/patch-src_gallium_auxiliary_pipe-loader_pipe__loader__drm.c
index 421091200061..c1e855d7105b 100644
--- a/graphics/libGL/files/patch-src__gallium__auxiliary__pipe-loader__pipe_loader_drm.c
+++ b/graphics/libGL/files/patch-src_gallium_auxiliary_pipe-loader_pipe__loader__drm.c
@@ -25,9 +25,9 @@ Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
---- src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c.orig 2016-11-10 22:05:17 UTC
+--- src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c.orig 2017-04-01 15:33:37 UTC
+++ src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c
-@@ -215,6 +215,14 @@ pipe_loader_drm_probe_fd(struct pipe_loa
+@@ -225,6 +225,14 @@ pipe_loader_drm_probe_fd(struct pipe_loa
}
static int
@@ -42,7 +42,7 @@ Reviewed-by: Francisco Jerez <currojerez@riseup.net>
open_drm_render_node_minor(int minor)
{
char path[PATH_MAX];
-@@ -226,8 +234,15 @@ open_drm_render_node_minor(int minor)
+@@ -236,8 +244,15 @@ open_drm_render_node_minor(int minor)
int
pipe_loader_drm_probe(struct pipe_loader_device **devs, int ndev)
{
@@ -59,7 +59,7 @@ Reviewed-by: Francisco Jerez <currojerez@riseup.net>
for (i = DRM_RENDER_NODE_MIN_MINOR, j = 0;
i <= DRM_RENDER_NODE_MAX_MINOR; i++) {
struct pipe_loader_device *dev;
-@@ -241,6 +256,9 @@ pipe_loader_drm_probe(struct pipe_loader
+@@ -251,6 +266,9 @@ pipe_loader_drm_probe(struct pipe_loader
continue;
}
@@ -69,7 +69,7 @@ Reviewed-by: Francisco Jerez <currojerez@riseup.net>
if (j < ndev) {
devs[j] = dev;
} else {
-@@ -250,6 +268,46 @@ pipe_loader_drm_probe(struct pipe_loader
+@@ -260,6 +278,46 @@ pipe_loader_drm_probe(struct pipe_loader
j++;
}
diff --git a/graphics/libGL/files/patch-src__gallium__include__pipe__p_config.h b/graphics/libGL/files/patch-src_gallium_include_pipe_p__config.h
index 57053969e8c3..57053969e8c3 100644
--- a/graphics/libGL/files/patch-src__gallium__include__pipe__p_config.h
+++ b/graphics/libGL/files/patch-src_gallium_include_pipe_p__config.h
diff --git a/graphics/libGL/files/patch-src_gallium_state__trackers_clover_llvm_invocation.cpp b/graphics/libGL/files/patch-src_gallium_state__trackers_clover_llvm_invocation.cpp
index 846c265ea3c6..02b4071cae21 100644
--- a/graphics/libGL/files/patch-src_gallium_state__trackers_clover_llvm_invocation.cpp
+++ b/graphics/libGL/files/patch-src_gallium_state__trackers_clover_llvm_invocation.cpp
@@ -6,7 +6,7 @@
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 2016-11-28 15:34:30 UTC
+--- src/gallium/state_trackers/clover/llvm/invocation.cpp.orig 2017-04-01 15:33:37 UTC
+++ src/gallium/state_trackers/clover/llvm/invocation.cpp
@@ -93,6 +93,8 @@ namespace {
return ctx;
@@ -17,7 +17,7 @@ ic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5c_strEv' can not be used when
std::unique_ptr<clang::CompilerInstance>
create_compiler_instance(const target &target,
const std::vector<std::string> &opts,
-@@ -104,8 +106,8 @@ namespace {
+@@ -105,8 +107,8 @@ 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.
diff --git a/graphics/libGL/files/patch-src__gallium__state_trackers__clover__util__range.hpp b/graphics/libGL/files/patch-src_gallium_state__trackers_clover_util_range.hpp
index f54ab0601e9e..f54ab0601e9e 100644
--- a/graphics/libGL/files/patch-src__gallium__state_trackers__clover__util__range.hpp
+++ b/graphics/libGL/files/patch-src_gallium_state__trackers_clover_util_range.hpp
diff --git a/graphics/libGL/files/patch-src__gallium__winsys__svga__drm__vmw_screen_ioctl.c b/graphics/libGL/files/patch-src_gallium_winsys_svga_drm_vmw__screen__ioctl.c
index bc41ac9d4955..bc41ac9d4955 100644
--- a/graphics/libGL/files/patch-src__gallium__winsys__svga__drm__vmw_screen_ioctl.c
+++ b/graphics/libGL/files/patch-src_gallium_winsys_svga_drm_vmw__screen__ioctl.c
diff --git a/graphics/libGL/files/patch-src_glx_glxext.c b/graphics/libGL/files/patch-src_glx_glxext.c
new file mode 100644
index 000000000000..5ce6507416f0
--- /dev/null
+++ b/graphics/libGL/files/patch-src_glx_glxext.c
@@ -0,0 +1,16 @@
+# work-around for https://bugs.freedesktop.org/show_bug.cgi?id=100627
+#
+--- src/glx/glxext.c.orig 2017-04-01 15:33:37 UTC
++++ src/glx/glxext.c
+@@ -906,7 +906,11 @@ __glXInitialize(Display * dpy)
+ #if defined(GLX_USE_DRM)
+ if (glx_direct && glx_accel) {
+ #if defined(HAVE_DRI3)
++#if (defined(__FreeBSD__) || defined(__FreeBSD_kernel__)) && !defined (__DRM_NEXT__)
++ if (getenv("LIBGL_DRI3_ENABLE") && !getenv("LIBGL_DRI3_DISABLE"))
++#else
+ if (!getenv("LIBGL_DRI3_DISABLE"))
++#endif
+ dpyPriv->dri3Display = dri3_create_display(dpy);
+ #endif /* HAVE_DRI3 */
+ dpyPriv->dri2Display = dri2CreateDisplay(dpy);
diff --git a/graphics/libGL/files/patch-src_intel_tools_aubinator.c b/graphics/libGL/files/patch-src_intel_tools_aubinator.c
index 758f44f5949e..206487393420 100644
--- a/graphics/libGL/files/patch-src_intel_tools_aubinator.c
+++ b/graphics/libGL/files/patch-src_intel_tools_aubinator.c
@@ -1,11 +1,11 @@
# 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 2016-11-28 15:34:30 UTC
+--- src/intel/tools/aubinator.c.orig 2017-04-01 15:33:37 UTC
+++ src/intel/tools/aubinator.c
-@@ -1226,7 +1226,7 @@ int main(int argc, char *argv[])
+@@ -1299,7 +1299,7 @@ int main(int argc, char *argv[])
/* mmap a terabyte for our gtt space. */
- gtt_size = 1ul << 40;
+ gtt_size = 1ull << 40;
gtt = mmap(NULL, gtt_size, PROT_READ | PROT_WRITE,
- MAP_PRIVATE | MAP_ANONYMOUS | MAP_NORESERVE, -1, 0);
+ MAP_PRIVATE | MAP_ANONYMOUS | MAP_NOSYNC | MAP_NOCORE, -1, 0);
diff --git a/graphics/libGL/files/patch-src__mapi__glapi__gen__gl_gentable.py b/graphics/libGL/files/patch-src_mapi_glapi_gen_gl__gentable.py
index efbd90d3fc89..efbd90d3fc89 100644
--- a/graphics/libGL/files/patch-src__mapi__glapi__gen__gl_gentable.py
+++ b/graphics/libGL/files/patch-src_mapi_glapi_gen_gl__gentable.py
diff --git a/graphics/libGL/files/patch-src__mesa__main__compiler.h b/graphics/libGL/files/patch-src_mesa_main_compiler.h
index ecbf16bcd2b1..ecbf16bcd2b1 100644
--- a/graphics/libGL/files/patch-src__mesa__main__compiler.h
+++ b/graphics/libGL/files/patch-src_mesa_main_compiler.h
diff --git a/graphics/libGL/files/patch-src_util_ralloc.c b/graphics/libGL/files/patch-src_util_ralloc.c
index d99e08d101dd..2c3841d38903 100644
--- a/graphics/libGL/files/patch-src_util_ralloc.c
+++ b/graphics/libGL/files/patch-src_util_ralloc.c
@@ -1,6 +1,6 @@
---- src/util/ralloc.c.orig 2016-11-28 15:34:30 UTC
+--- src/util/ralloc.c.orig 2017-04-01 15:33:37 UTC
+++ src/util/ralloc.c
-@@ -315,6 +315,7 @@ ralloc_parent(const void *ptr)
+@@ -338,6 +338,7 @@ ralloc_parent(const void *ptr)
static void *autofree_context = NULL;
@@ -8,7 +8,7 @@
static void
autofree(void)
{
-@@ -326,7 +327,6 @@ ralloc_autofree_context(void)
+@@ -349,7 +350,6 @@ ralloc_autofree_context(void)
{
if (unlikely(autofree_context == NULL)) {
autofree_context = ralloc_context(NULL);