# IT4Innovations
# LK 2021

easyblock = 'Tarball'

name = 'texlive'
version = '20210325'


homepage = 'https://tug.org'
description = """TeX is a typesetting language. Instead of visually formatting your text, you enter your manuscript
 text intertwined with TeX commands in a plain text file. You then run TeX to produce formatted output, such as a
 PDF file. Thus, in contrast to standard word processors, your document is a separate file that does not pretend to
 be a representation of the final typeset output, and so can be easily edited and manipulated."""

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

source_urls = ['https://pi.kwarc.info/historic/systems/texlive/2021/']
sources = [
    {
        'download_filename': 'install-tl-unx.tar.gz',
        'filename': 'install-tl-unx-%(version)s.tar.gz',
    }
]
checksums = ['cba7ed246143e79864b991a9f88c2475']

dependencies = [
    ('X11', '20201008'),
    ('libpng', '1.6.37'),
    ('libGLU', '9.0.1'),
    ('Perl', '5.32.0'),
    ('HarfBuzz', '2.6.7'),
    ('poppler', '21.06.1'),
    ('cairo', '1.16.0'),
    ('fontconfig', '2.13.92'),
    ('zlib', '1.2.11'),
    ('graphite2', '1.3.14'),
]

postinstallcmds = [
    'echo "TEXDIR         %(installdir)s/" > %(installdir)s/texlive.profile && '
    'echo "TEXMFLOCAL     %(installdir)s/texmf-local" >> %(installdir)s/texlive.profile && '
    'echo "TEXMFSYSCONFIG %(installdir)s/texmf-config" >> %(installdir)s/texlive.profile && '
    'echo "TEXMFSYSVAR    %(installdir)s/texmf-var" >> %(installdir)s/texlive.profile && '
    '%(builddir)s/install-tl-%(version)s/install-tl -profile %(installdir)s/texlive.profile'
]

modextrapaths = {
    'PATH': 'install/bin/x86_64-linux',
    'INFOPATH': 'install/texmf-dist/doc/info',
    'MANPATH': 'install/texmf-dist/doc/man',
}
modextravars = {
    'TEXMFHOME': '%(installdir)s/install/texmf-dist'
}

sanity_check_paths = {
    'files': ['install/bin/x86_64-linux/tex', 'install/bin/x86_64-linux/latex'],
    'dirs': ['install/bin/x86_64-linux', 'install/texmf-dist'],
}

moduleclass = 'devel'
