easyblock = 'ConfigureMake'

name = 'xorg-server'
version = '1.19.3'

homepage = "http://www.x.org/wiki/"
description = "The Xorg Server is the core of the X Window system."

toolchain = {'name': 'intel', 'version': '2017a'}

sources = [SOURCE_TAR_GZ]
source_urls = ['https://www.x.org/archive/individual/xserver/']

#preconfigopts = 'export XSERVERCFLAGS_CFLAGS=" " && export XSERVERCFLAGS_LIBS=$EBROOTX11/lib &&'

# --with-xkb-path=%(installdir)s/share/X11/xkb
configopts = '--disable-glamor --enable-suid-wrapper --disable-systemd-logind --enable-builtin-fonts --with-xkb-path=/apps/all/XKeyboardConfig/2.21/share/X11/xkb/'

# builddependencies = [
#   ('pkg-config', '0.29.2', '', True),
#]

dependencies = [
    ('Mesa', '17.0.2'),
    #    ('X11', '20170314', '', True),
    ('nettle', '3.3'),
    ('XKeyboardConfig', '2.21', '', True)
]

sanity_check_paths = {
    'files': ['bin/Xorg', 'bin/Xvfb', 'bin/Xnest'],
    'dirs': ['bin', 'lib', 'include'],
}

moduleclass = 'vis'
