easyblock = 'ConfigureMake'

name = 'GDB'
version = '7.11'
versionsuffix = '-Python-%(pyver)s'

homepage = 'http://www.gnu.org/software/gdb/gdb.html'
description = "The GNU Project Debugger"

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

sources = [SOURCELOWER_TAR_XZ]
source_urls = [GNU_SOURCE]

patches = ['GDB-7.9-missing-makeinfo.patch']

dependencies = [
    ('zlib', '1.2.8'),
    ('libreadline', '6.3'),
    ('ncurses', '6.0'),
    ('expat', '2.1.0'),
    ('Python', '2.7.11'),
]

configopts = '--with-system-zlib --with-python=$EBROOTPYTHON/bin/python --with-expat=$EBROOTEXPAT '
configopts += '--with-system-readline --enable-tui --enable-plugins'

parallel = 1

sanity_check_paths = {
    'files': ['bin/gdb', 'bin/gdbserver'],
    'dirs': [],
}

moduleclass = 'debugger'
