easyblock = 'ConfigureMake'

name = 'ANTLR'
version = "2.7.7"

homepage = 'http://www.antlr2.org/'
description = """ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
 is a language tool that provides a framework for constructing recognizers,
 compilers, and translators from grammatical descriptions containing
 Java, C#, C++, or Python actions."""

toolchain = {'name': 'foss', 'version': '2017b'}

source_urls = ['http://www.antlr2.org/download/']
sources = [SOURCELOWER_TAR_GZ]
patches = ['%(name)s-%(version)s_includes.patch']
checksums = [
    '853aeb021aef7586bda29e74a6b03006bcb565a755c86b66032d8ec31b67dbb9',  # antlr-2.7.7.tar.gz
    'd167d3248a03301bc93efcb37d5df959aae6794968e42231af0b0dd26d6a2e66',  # ANTLR-2.7.7_includes.patch
]

dependencies = [('Java', '1.8.0_152', '', True)]

configopts = '--disable-examples --disable-csharp --disable-python'

sanity_check_paths = {
    'files': ['bin/antlr', 'bin/antlr-config'],
    'dirs': ['include'],
}

moduleclass = 'tools'