Skip to content

Instantly share code, notes, and snippets.

@Flamefire
Created March 21, 2020 17:06
Show Gist options
  • Save Flamefire/6730d3b40d75dabf47d9df3a3ca515f3 to your computer and use it in GitHub Desktop.
Save Flamefire/6730d3b40d75dabf47d9df3a3ca515f3 to your computer and use it in GitHub Desktop.
easyblock = 'MesonNinja'
name = 'Mesa'
version = '19.1.7'
homepage = 'https://www.mesa3d.org/'
description = """Mesa is an open-source implementation of the OpenGL specification -
a system for rendering interactive 3D graphics."""
toolchain = {'name': 'GCCcore', 'version': '8.3.0'}
# Intel's SWR generates AVX instructions even on CPUs without support for it (ignoring march=native).
# In that case it is necessary to explicitly set the march of your CPU, for instance for an AMD Opteron 6100
# toolchainopts = {'optarch': 'march=barcelona'}
source_urls = [
'https://mesa.freedesktop.org/archive/',
'https://mesa.freedesktop.org/archive/%(version)s',
'ftp://ftp.freedesktop.org/pub/mesa/%(version)s',
'ftp://ftp.freedesktop.org/pub/mesa/older-versions/%(version_major)s.x/%(version)s',
'ftp://ftp.freedesktop.org/pub/mesa/older-versions/%(version_major)s.x',
]
sources = [SOURCELOWER_TAR_XZ]
patches = ['Mesa-19.2.1-meson-avoid-march.patch',]
checksums = ['e287920fdb38712a9fed448dc90b3ca95048c7face5db52e58361f8b6e0f3cd5']
builddependencies = [
('binutils', '2.32'),
('Meson', '0.51.2', '-Python-3.7.4'),
('Ninja', '1.9.0'),
('flex', '2.6.4'),
('Bison', '3.3.2'),
('pkg-config', '0.29.2'),
('Mako', '1.1.0'),
('libxml2', '2.9.9'),
('expat', '2.2.7'),
('gettext', '0.20.1'),
]
dependencies = [
('zlib', '1.2.11'),
('nettle', '3.5.1'),
('libdrm', '2.4.99'),
('LLVM', '9.0.0'),
('X11', '20190717'),
('libunwind', '1.3.1'),
]
configopts = " -Dplatforms=x11 -Dosmesa=gallium -Ddri3=false -Ddri-drivers='' -Dvulkan-drivers=''"
configopts += " -Dgbm=false -Dglx-direct=false -Dgallium-drivers='swrast,swr' -Dswr-arches=avx,avx2,skx,knl -Degl=false"
configopts += " -Dllvm=true -Dshared-llvm=true"
configopts += " -Dlibunwind=true -Dglx=gallium-xlib"
# also install header files located include/GL/internal/
# we can't enable both DRI and Gallium drivers, but we can provide the DRI header file (GL/internal/dri_interface.h)
postinstallcmds = ["cp -a %(builddir)s/mesa-%(version)s/include/GL/internal %(installdir)s/include/GL/"]
sanity_check_paths = {
'files': ['lib/libGL.%s' % SHLIB_EXT, 'lib/libOSMesa.%s' % SHLIB_EXT,
'lib/libGLESv1_CM.%s' % SHLIB_EXT, 'lib/libGLESv2.%s' % SHLIB_EXT,
'include/GL/glext.h', 'include/GL/gl_mangle.h',
'include/GL/glx.h', 'include/GL/osmesa.h',
'include/GL/gl.h', 'include/GL/glxext.h',
'include/GL/glx_mangle.h', 'include/GLES/gl.h',
'include/GLES2/gl2.h', 'include/GLES3/gl3.h'],
'dirs': ['include/GL/internal'],
}
moduleclass = 'vis'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment