Skip to content
Snippets Groups Projects

mesa +osmesa

Merged Wouter Deconinck requested to merge mesa-with-osmesa into master
All threads resolved!
Files
2
@@ -3,10 +3,10 @@
@@ -3,10 +3,10 @@
#
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
import sys
import sys
 
from spack import *
 
class Mesa(MesonPackage):
class Mesa(MesonPackage):
"""Mesa is an open-source implementation of the OpenGL specification
"""Mesa is an open-source implementation of the OpenGL specification
@@ -19,6 +19,7 @@ class Mesa(MesonPackage):
@@ -19,6 +19,7 @@ class Mesa(MesonPackage):
url = "https://archive.mesa3d.org/mesa-20.2.1.tar.xz"
url = "https://archive.mesa3d.org/mesa-20.2.1.tar.xz"
version('master', tag='master')
version('master', tag='master')
 
version('21.0.3', sha256='565c6f4bd2d5747b919454fc1d439963024fc78ca56fd05158c3b2cde2f6912b')
version('21.0.0', sha256='e6204e98e6a8d77cf9dc5d34f99dd8e3ef7144f3601c808ca0dd26ba522e0d84')
version('21.0.0', sha256='e6204e98e6a8d77cf9dc5d34f99dd8e3ef7144f3601c808ca0dd26ba522e0d84')
version('20.3.4', sha256='dc21a987ec1ff45b278fe4b1419b1719f1968debbb80221480e44180849b4084')
version('20.3.4', sha256='dc21a987ec1ff45b278fe4b1419b1719f1968debbb80221480e44180849b4084')
version('20.2.1', sha256='d1a46d9a3f291bc0e0374600bdcb59844fa3eafaa50398e472a36fc65fd0244a')
version('20.2.1', sha256='d1a46d9a3f291bc0e0374600bdcb59844fa3eafaa50398e472a36fc65fd0244a')
@@ -26,7 +27,6 @@ class Mesa(MesonPackage):
@@ -26,7 +27,6 @@ class Mesa(MesonPackage):
depends_on('meson@0.52:', type='build')
depends_on('meson@0.52:', type='build')
depends_on('pkgconfig', type='build')
depends_on('pkgconfig', type='build')
depends_on('binutils', when=(sys.platform != 'darwin'), type='build')
depends_on('bison', type='build')
depends_on('bison', type='build')
depends_on('cmake', type='build')
depends_on('cmake', type='build')
depends_on('flex', type='build')
depends_on('flex', type='build')
@@ -92,6 +92,9 @@ class Mesa(MesonPackage):
@@ -92,6 +92,9 @@ class Mesa(MesonPackage):
# OpenGL ES requires OpenGL
# OpenGL ES requires OpenGL
conflicts('~opengl +opengles')
conflicts('~opengl +opengles')
 
# requires native to be added to llvm_modules when using gallium swrast
 
patch('https://cgit.freedesktop.org/mesa/mesa/patch/meson.build?id=054dd668a69acc70d47c73abe4646e96a1f23577', sha256='36096a178070e40217945e12d542dfe80016cb897284a01114d616656c577d73', when='@21.0.0:21.0.3')
 
# 'auto' needed when shared llvm is built
# 'auto' needed when shared llvm is built
@when('^llvm~shared_libs')
@when('^llvm~shared_libs')
def patch(self):
def patch(self):
@@ -123,13 +126,17 @@ class Mesa(MesonPackage):
@@ -123,13 +126,17 @@ class Mesa(MesonPackage):
args.append('-Dlibunwind=disabled')
args.append('-Dlibunwind=disabled')
num_frontends = 0
num_frontends = 0
 
 
if spec.satisfies('@:20.3'):
 
osmesa_enable, osmesa_disable = ('gallium', 'none')
 
else:
 
osmesa_enable, osmesa_disable = ('true', 'false')
 
if '+osmesa' in spec:
if '+osmesa' in spec:
num_frontends += 1
num_frontends += 1
args.append('-Dosmesa=gallium')
args.append('-Dosmesa={0}'.format(osmesa_enable))
else:
else:
#S. Joosten --> this line does not work in latest container
args.append('-Dosmesa={0}'.format(osmesa_disable))
#args.append('-Dosmesa=none')
args.append('-Dosmesa=false')
if '+glx' in spec:
if '+glx' in spec:
num_frontends += 1
num_frontends += 1
Loading