easyblock = 'ConfigureMake'

name = 'XZ'
version = '5.2.3'

homepage = 'http://tukaani.org/xz/'
description = "xz: XZ utilities"

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

sources = [SOURCELOWER_TAR_BZ2]
source_urls = ['http://tukaani.org/xz/']

patches = ['XZ-5.2.2_compat-libs.patch']

# non-toolchain gettext because otherwise there is a circular dependency:
# XZ (presumably its executables) depends on gettext, which depends on
# xmllib2, which depends (optionally) on XZ
builddependencies = [
    ('Autotools', '20150215', '', True),
    ('gettext', '0.19.8', '', True),
]

# may become useful in non-x86 archs
#configopts = ' --disable-assembler '

sanity_check_paths = {
    'files': ["bin/xz", "bin/lzmainfo"],
    'dirs': []
}

moduleclass = 'tools'
