# JH 2020

easyblock = 'ConfigureMake'

name = 'XZ'
version = '5.2.5'

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

toolchain = {'name': 'GCCcore', 'version': '9.3.0'}

source_urls = ['https://src.fedoraproject.org/repo/pkgs/R/xz-5.2.5.tar.bz2/sha512/89e25ddf72427ee9608cbf2e9dbc24d592cb67a27f44ccf7d47e4d9405774444e9cfcd02ac4bcb92064860371ed31d3cfbecd5fe063f296ead607714c0a664a1/']
sources = ["xz-5.2.5.tar.bz2"]
patches = ['XZ-5.2.2_compat-libs.patch']
checksums = [
    '5117f930900b341493827d63aa910ff5e011e0b994197c3b71c08a20228a42df',  # xz-5.2.5.tar.bz2
    '578da3ea2ddb551972891a60fe31478b16a516d6ea8b6aa3af89e1d558adb703',  # XZ-5.2.2_compat-libs.patch
]

builddependencies = [
    # use gettext built with system toolchain as build dep to avoid cyclic dependency (XZ -> gettext -> libxml2 -> XZ)
    ('gettext', '0.20.1', '', True),
    ('binutils', '2.34'),
]

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

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

moduleclass = 'tools'
