# IT4Innovations 2019

easyblock = 'CMakeMake'

name = 'OpenImageIO'
version = '2.0.12'

homepage = 'https://openimageio.org/'
description = """OpenImageIO is a library for reading and writing images, and a bunch of related classes, utilities,
 and applications."""

toolchain = {'name': 'gompi', 'version': '2019a'}

source_urls = ['https://github.com/OpenImageIO/oiio/archive/']
sources = ['Release-%(version)s.tar.gz']
checksums = ['930a142c9cabbbc3b249577083c97e9f0407cc8cbf933144f3a3ed0f3ec9cfe0']

dependencies = [
    ('Boost', '1.70.0'),
    ('libjpeg-turbo', '2.0.2', '', True),
    ('libpng', '1.6.34', '', True),
    ('LibTIFF', '4.0.7', '', True),
    ('OpenEXR', '2.3.0'),
    ('freetype', '2.9.1', '', True),
    ('zlib', '1.2.11', '', True),
]
builddependencies = [('CMake', '3.16.0', '-rc3', True)]

separate_build_dir = True

configopts = '-DSTOP_ON_WARNING=OFF -DUSE_PYTHON=OFF'

sanity_check_paths = {
    'files': ['bin/oiiotool', 'lib/libOpenImageIO.%s' % SHLIB_EXT, 'lib/libOpenImageIO_Util.%s' % SHLIB_EXT],
    'dirs': ['include/OpenImageIO', 'share'],
}

moduleclass = 'lib'