# easybuild easyconfig
#
# John Dey jfdey@fredhutch.org
# Fred Hutchinson Cancer Research Center Seattle WA USA

easyblock = 'CMakeMake'

name = 'poppler'
version = '0.70.1'

homepage = 'https://poppler.freedesktop.org/'
description = """Poppler is a PDF rendering library based on the xpdf-3.0 code
 base."""

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

source_urls = ['https://poppler.freedesktop.org/']
sources = [SOURCELOWER_TAR_XZ]
checksums = ['66972047d9ef8162cc8c389d7e7698291dfc9f2b3e4ea9a9f08ae604107451bd']

separate_build_dir = True

builddependencies = [
    ('pkgconfig', '1.3.1', '-Python-2.7.15'),
    ('binutils', '2.30'),
    ('CMake', '3.11.4'),
    ('Qt5', '5.10.1'),
    ('cairo', '1.14.12'),
    ('GObject-Introspection', '1.54.1', '-Python-2.7.15'),
    ('libjpeg-turbo', '2.0.0'),
    ('libpng', '1.6.34'),
    ('LibTIFF', '4.0.9'),
    ('NSS', '3.39'),
    ('OpenJPEG', '2.3.0'),
]

local_bin_files = ['pdfdetach', 'pdffonts', 'pdfimages', 'pdfinfo', 'pdfseparate',
                   'pdftocairo', 'pdftohtml', 'pdftoppm', 'pdftops', 'pdftotext',
                   'pdfunite']

sanity_check_paths = {
    'files': ['bin/%s' % x for x in local_bin_files] +
             ['lib/libpoppler.%s' % SHLIB_EXT,
              'lib/libpoppler-cpp.%s' % SHLIB_EXT,
              'lib/libpoppler-glib.%s' % SHLIB_EXT,
              'include/poppler/glib/poppler.h'],
    'dirs': ['bin',
             'include',
             'include/poppler/glib',
             ]
}

moduleclass = 'vis'
