# IT4Innovations
# LK 2023

easyblock = 'ConfigureMake'

name = 'BLIS'
version = '0.9.0'

homepage = 'https://github.com/flame/blis/'
description = """BLIS is a portable software framework for instantiating high-performance
BLAS-like dense linear algebra libraries."""

toolchain = {'name': 'GCC', 'version': '12.2.0'}

source_urls = ['https://github.com/flame/blis/archive/']
sources = ['%(version)s.tar.gz']
patches = [
#    '%(name)s-%(version)s_disable_power9_kernels.patch',
    '%(name)s-%(version)s_enable_ppc_autodetect.patch',
]
checksums = [
    '1135f664be7355427b91025075562805cdc6cc730d3173f83533b2c5dcc2f308',  # 0.9.0.tar.gz
    # BLIS-0.9.0_disable_power9_kernels.patch
#    'ed7a326bc5c5c21c42faefbec2fd7be609d1c7236981b466475edace39307279',
    # BLIS-0.9.0_enable_ppc_autodetect.patch
    'f373fb252c0d14036fb631f048091976cceb02abb3e570a97fbaeac2fbb12328',
]
builddependencies = [
    ('Python', '3.10.8', '-bare'),
    ('Perl', '5.36.0'),
]

configopts = '--enable-cblas --enable-threading=openmp --enable-shared CC="$CC" auto'

runtest = 'check'

sanity_check_paths = {
    'files': ['include/blis/cblas.h', 'include/blis/blis.h',
              'lib/libblis.a', 'lib/libblis.%s' % SHLIB_EXT],
    'dirs': [],
}

modextrapaths = {'CPATH': 'include/blis'}

moduleclass = 'numlib'
