# IT4Innovations 
# LK 2021

easyblock = 'ConfigureMake'

name = 'glibc'
version = '2.30'

homepags = 'https://www.gnu.org/software/libc/'
description = """The GNU C Library project provides the core libraries for the GNU system and GNU/Linux systems,
 as well as many other systems that use Linux as the kernel."""

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

source_urls = ['https://ftp.gnu.org/gnu/glibc/']
sources = ['glibc-%(version)s.tar.xz']
checksums = ['e2c4114e569afbe7edbc29131a43be833850ab9a459d81beb2588016d2bbb8af']

builddependencies = [
    ('binutils', '2.35'),
    ('make', '4.2.1'),
    ('texinfo', '6.7'),
    ('Bison', '3.7.1'),
    ('Python', '3.8.6'),
]

preconfigopts = 'mkdir obj && cd obj && CC="$CC -fuse-ld=bfd --disable-werror" '
configure_cmd_prefix = '../'
prebuildopts = "cd obj && "
preinstallopts = prebuildopts

sanity_check_paths = {
    'files': ['bin/ldd', 'lib/libc.a', 'lib/libc.%s' % SHLIB_EXT],
    'dirs': ['etc', 'libexec', 'include', 'sbin', 'share'],
}

moduleclass = 'lib'