# IT4Innovation
# BS 2024
easyblock = 'CMakeMake'

name = 'poppler'
version = '0.90.1'

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

toolchain = {'name': 'GCCcore', 'version': '10.2.0'}

source_urls = ['https://poppler.freedesktop.org/']
sources = [SOURCELOWER_TAR_XZ]
checksums = ['984d82e72e91418d280885298c8bdc855a2fd92665fd52a1345b27235e0c71c4']

separate_build_dir = True

builddependencies = [
    ('pkgconfig', '1.8.0', '-Python-2.7.18'),
    ('binutils', '2.35'),
    ('CMake', '3.18.4'),
    ('Qt5', '5.14.2'),
    ('cairo', '1.16.0'),
    ('GObject-Introspection', '1.66.1'),   #'-Python-3.7.4'),
    ('libjpeg-turbo', '2.0.5'),
    ('libpng', '1.6.37'),
    ('LibTIFF', '4.1.0'),
    ('NSS', '3.57'),
    ('OpenJPEG', '2.4.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'
