easyblock = 'ConfigureMake'

name = 'libjpeg-turbo'
version = '1.4.2'

homepage = 'http://sourceforge.net/projects/libjpeg-turbo/'
description = """libjpeg-turbo is a fork of the original IJG libjpeg which uses SIMD to accelerate baseline JPEG
compression and decompression. libjpeg is a library that implements JPEG image encoding, decoding and transcoding.
"""

toolchain = {'name': 'intel', 'version': '2017.00'}
toolchainopts = {'pic': True}

source_urls = [SOURCEFORGE_SOURCE]
sources = [SOURCELOWER_TAR_GZ]

dependencies = [
    ('NASM', '2.11.08'),
]

configopts = "--with-jpeg8"
runtest = "test"

sanity_check_paths = {
    'files': ['bin/cjpeg', 'bin/djpeg', 'bin/jpegtran', 'bin/rdjpgcom', 'bin/tjbench', 'bin/wrjpgcom',
              'lib/libjpeg.a', 'lib/libjpeg.%s' % SHLIB_EXT, 'lib/libturbojpeg.a', 'lib/libturbojpeg.%s' % SHLIB_EXT],
    'dirs': ['include', 'share'],
}

moduleclass = 'lib'
