# JH 2020

easyblock = 'ConfigureMake'

name = 'libglvnd'
version = '1.2.0'

homepage = 'https://github.com/NVIDIA/libglvnd'
description = "libglvnd is a vendor-neutral dispatch layer for arbitrating OpenGL API calls between multiple vendors."

toolchain = SYSTEM

source_urls = ['https://github.com/NVIDIA/libglvnd/releases/download/v%(version)s/']
sources = ['libglvnd-%(version)s.tar.gz']
checksums = ['2dacbcfa47b7ffb722cbddc0a4f1bc3ecd71d2d7bb461bceb8e396dc6b81dc6d']

#builddependencies = [('binutils', '2.32')]

dependencies = [('X11', '20190717')]

# Let EGL find system-installed vendor files in /etc/glvnd/egl_vendor.d etc.
allow_prepend_abs_path = True
modextrapaths = {"__EGL_VENDOR_LIBRARY_DIRS": "/etc/glvnd/egl_vendor.d:/usr/share/glvnd/egl_vendor.d"}

sanity_check_paths = {
    'files': ['lib/lib%s.%s' % (x, SHLIB_EXT) for x in ['EGL', 'GL', 'GLX', 'OpenGL']],
    'dirs': ['include/%s' % x for x in ['EGL', 'GL', 'GLES', 'GLES2', 'GLES3', 'glvnd', 'KHR']] + ['lib/pkgconfig'],
}

moduleclass = 'lib'
