# This file is an EasyBuild reciPY as per https://github.com/easybuilders/easybuild
# Author: Ravi Tripathi
# Email: ravi89@uab.edu

easyblock = 'ConfigureMake'

name = 'ImageMagick'
version = '7.0.7-8'
jasper_ver = '1.900.1'
versionsuffix = '-JasPer-%s' % jasper_ver

homepage = 'http://www.imagemagick.org/'
description = """ImageMagick is a software suite to create, edit, compose, or convert bitmap images"""

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

sources = [SOURCE_TAR_GZ]
source_urls = ['https://www.imagemagick.org/download/releases/']
checksums = ['8dbd544640bc074541f441c911e2b3b9045695083d2ccdc694ec9a62181e5823']

dependencies = [
    ('bzip2', '1.0.6'),
    ('X11', '20170314'),
    ('Ghostscript', '9.21'),
    ('JasPer', jasper_ver),
    ('libjpeg-turbo', '1.5.1'),
    ('LibTIFF', '4.0.7'),
    ('LittleCMS', '2.8'),
]

builddependencies = [
    ('pkg-config', '0.29.1'),
]

configopts = "--with-gslib --with-x"

sanity_check_paths = {
    'files': [],
    'dirs': ['bin', 'etc/%(name)s-%(version_major)s', 'include/%(name)s-%(version_major)s', 'lib', 'share'],
}

modextravars = {'MAGICK_HOME': '%(installdir)s'}

moduleclass = 'vis'
