easyblock = 'ConfigureMake'

name = 'Bison'
version = '3.7.6'

homepage = 'https://www.gnu.org/software/bison'
description = """Bison is a general-purpose parser generator that converts an annotated context-free grammar
 into a deterministic LR or generalized LR (GLR) parser employing LALR(1) parser tables."""

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

source_urls = [GNU_SOURCE]
sources = [SOURCELOWER_TAR_GZ]
# checksums = ['1dd952839cf0d5a8178c691eeae40dc48fa50d18dcce648b1ad9ae0195367d13']

builddependencies = [
    ('M4', '1.4.18'),
    # use same binutils version that was used when building GCCcore toolchain
    ('binutils', '2.35', '', True),
]


sanity_check_paths = {
    'files': ['bin/%s' % x for x in ['bison', 'yacc']] + [('lib/liby.a', 'lib64/liby.a')],
    'dirs': [],
}

moduleclass = 'lang'
