# IT4Innovations 
# LK 2021

easyblock = 'ConfigureMake'

name = 'glibc'
version = '2.29'

homepage = '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 = ['f3eeb8d57e25ca9fc13c2af3dae97754f9f643bc69229546828e3a240e2af04b']

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 -w" ' # --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'
