summaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authortnn <tnn>2015-09-12 16:50:24 +0000
committertnn <tnn>2015-09-12 16:50:24 +0000
commitce7f121518f407c11576ce9f4c9cfc6a7dd3fb3a (patch)
treeb445c9041e439e42ad79eb56cf4a061783fd9e3d /graphics
parentbfb4c9e8df479917b52be7075f19f18ef54ad7ee (diff)
downloadpkgsrc-ce7f121518f407c11576ce9f4c9cfc6a7dd3fb3a.tar.gz
The LLVM option enables JIT accelerated software rendering and
is also required to support the latest RADEON GPUs, so enable it by default on platforms where such GPUs might be encountered. Also enable thread local storage support in GLX for those platforms. Part of PR pkg/50172.
Diffstat (limited to 'graphics')
-rw-r--r--graphics/MesaLib/Makefile3
-rw-r--r--graphics/MesaLib/options.mk36
2 files changed, 24 insertions, 15 deletions
diff --git a/graphics/MesaLib/Makefile b/graphics/MesaLib/Makefile
index 30cbdec94a8..74673cb353e 100644
--- a/graphics/MesaLib/Makefile
+++ b/graphics/MesaLib/Makefile
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.107 2015/09/11 12:38:27 tnn Exp $
+# $NetBSD: Makefile,v 1.108 2015/09/12 16:50:24 tnn Exp $
DISTNAME= mesa-10.6.7
+PKGREVISION= 1
PKGNAME= ${DISTNAME:S/mesa/MesaLib/}
CATEGORIES= graphics x11
MASTER_SITES= ftp://ftp.freedesktop.org/pub/mesa/${PKGVERSION_NOREV}/
diff --git a/graphics/MesaLib/options.mk b/graphics/MesaLib/options.mk
index 3071cc9132e..74dfaa28bc5 100644
--- a/graphics/MesaLib/options.mk
+++ b/graphics/MesaLib/options.mk
@@ -1,16 +1,21 @@
-# $NetBSD: options.mk,v 1.35 2015/09/11 16:27:30 tnn Exp $
+# $NetBSD: options.mk,v 1.36 2015/09/12 16:50:24 tnn Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.MesaLib
PKG_SUPPORTED_OPTIONS= llvm dri
PKG_SUGGESTED_OPTIONS=
-.if !empty(MACHINE_PLATFORM:MNetBSD-[789].*-*) && ( \
- ${MACHINE_ARCH} == "i386" || \
- ${MACHINE_ARCH} == "x86_64" || \
- ${MACHINE_ARCH} == "sparc64" || \
- ${MACHINE_ARCH} == "powerpc" || \
- !empty(MACHINE_ARCH:M*arm*))
-#PKG_SUGGESTED_OPTIONS+= llvm
+# The LLVM option enables JIT accelerated software rendering and
+# is also required to support the latest RADEON GPUs, so enable it
+# by default on platforms where such GPUs might be encountered.
+.if \
+ !empty(MACHINE_PLATFORM:MNetBSD-[789].*-i386) || \
+ !empty(MACHINE_PLATFORM:MNetBSD-[789].*-x86_64) || \
+ !empty(MACHINE_PLATFORM:MNetBSD-[789].*-sparc64) || \
+ !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+= llvm
.endif
.if (${OPSYS} == "FreeBSD" || ${OPSYS} == "OpenBSD" || \
@@ -31,22 +36,22 @@ PLIST_VARS+= dri swrast_dri i915_dri nouveau_dri i965_dri radeon_dri r200_dri
CONFIGURE_ARGS+= --enable-dri
CONFIGURE_ARGS+= --enable-egl
-# use Thread Local Storage in GLX where it is supported and works
+# Use Thread Local Storage in GLX where it is supported by Mesa and works.
.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)
-# Not yet, needs more testing and xorg-server support.
-#CONFIGURE_ARGS+= --enable-glx-tls
-CONFIGURE_ARGS+= --disable-glx-tls
+ !empty(MACHINE_PLATFORM:MDragonFly-*-x86_64)
+CONFIGURE_ARGS+= --enable-glx-tls
.else
CONFIGURE_ARGS+= --disable-glx-tls
.endif
PLIST.dri= yes
-BUILDLINK_DEPMETHOD.libpciaccess= full
+BUILDLINK_DEPMETHOD.libpciaccess= full
.include "../../sysutils/libpciaccess/buildlink3.mk"
.include "../../graphics/MesaLib/dri.mk"
@@ -140,4 +145,7 @@ CONFIGURE_ARGS+= --disable-dri
CONFIGURE_ARGS+= --disable-dri3
CONFIGURE_ARGS+= --disable-egl
CONFIGURE_ARGS+= --enable-xlib-glx
+.if !empty(PKG_OPTIONS:Mllvm)
+PKG_FAIL_REASON+= "The llvm PKG_OPTION must also be disabled when dri is disabled"
+.endif
.endif