summaryrefslogtreecommitdiff
path: root/graphics/MesaLib
diff options
context:
space:
mode:
authornia <nia@pkgsrc.org>2020-04-09 16:48:08 +0000
committernia <nia@pkgsrc.org>2020-04-09 16:48:08 +0000
commitfd461c1a01a9ae07ff8493f5de00b993e2f87305 (patch)
tree5ac44aabde10ba4926757bbce4738aaa16b49aea /graphics/MesaLib
parentb7453226b313d3b4d2f8394be9706b0121a34c5b (diff)
downloadpkgsrc-fd461c1a01a9ae07ff8493f5de00b993e2f87305.tar.gz
MesaLib: Make ELF TLS optional.
Diffstat (limited to 'graphics/MesaLib')
-rw-r--r--graphics/MesaLib/Makefile3
-rw-r--r--graphics/MesaLib/options.mk22
2 files changed, 22 insertions, 3 deletions
diff --git a/graphics/MesaLib/Makefile b/graphics/MesaLib/Makefile
index 9f52492c033..b29cb38334d 100644
--- a/graphics/MesaLib/Makefile
+++ b/graphics/MesaLib/Makefile
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.191 2020/04/07 13:20:40 nia Exp $
+# $NetBSD: Makefile,v 1.192 2020/04/09 16:48:08 nia Exp $
DISTNAME= mesa-20.0.4
PKGNAME= ${DISTNAME:S/mesa/MesaLib/}
+PKGREVISION= 1
CATEGORIES= graphics
MASTER_SITES= https://mesa.freedesktop.org/archive/
EXTRACT_SUFX= .tar.xz
diff --git a/graphics/MesaLib/options.mk b/graphics/MesaLib/options.mk
index 9f72502fb1e..b06de55ecc3 100644
--- a/graphics/MesaLib/options.mk
+++ b/graphics/MesaLib/options.mk
@@ -1,10 +1,10 @@
-# $NetBSD: options.mk,v 1.79 2020/01/04 01:53:55 nia Exp $
+# $NetBSD: options.mk,v 1.80 2020/04/09 16:48:08 nia Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.MesaLib
.include "features.mk"
-PKG_SUPPORTED_OPTIONS+= llvm vulkan x11
+PKG_SUPPORTED_OPTIONS+= elf-tls llvm vulkan x11
.if ${MESALIB_SUPPORTS_DRI} == "yes"
PKG_SUPPORTED_OPTIONS+= wayland
@@ -16,6 +16,8 @@ PKG_SUGGESTED_OPTIONS+= wayland
PKG_SUGGESTED_OPTIONS+= x11
+.include "../../mk/bsd.fast.prefs.mk"
+
# The LLVM option enables JIT accelerated software rendering and is also
# required to support the latest RADEON GPUs.
#
@@ -29,6 +31,15 @@ PKG_SUGGESTED_OPTIONS+= x11
PKG_SUGGESTED_OPTIONS+= llvm
.endif
+# ELF TLS is broken in at least the following cases:
+# - NetBSD with SDL2 without X11
+# - Linux with musl libc
+#
+# https://gitlab.freedesktop.org/mesa/mesa/issues/966
+.if ${OPSYS} == "Linux" && !empty(GLIBC_VERSION)
+PKG_SUGGESTED_OPTIONS+= elf-tls
+.endif
+
.include "../../mk/bsd.options.mk"
# Gallium drivers requiring LLVM
@@ -41,6 +52,13 @@ PLIST_VARS+= wayland glx
PLIST_VARS+= vdpau
#
+# ELF TLS support
+#
+.if empty(PKG_OPTIONS:Melf-tls)
+BUILDLINK_TRANSFORM+= rm:-DUSE_ELF_TLS
+.endif
+
+#
# LLVM support
#
.if !empty(PKG_OPTIONS:Mllvm)