easyblock = 'EB_GCC'

name = 'GCCcore'
version = '8.2.0'

homepage = 'http://gcc.gnu.org/'
description = """The GNU Compiler Collection includes front ends for C, C++, Objective-C, Fortran, Java, and Ada,
 as well as libraries for these languages (libstdc++, libgcj,...)."""

toolchain = {'name': 'system', 'version': ''}

mpfr_version = '4.0.1'

source_urls = [
    'http://ftpmirror.gnu.org/gnu/gcc/gcc-%(version)s',  # GCC auto-resolving HTTP mirror
    'http://ftpmirror.gnu.org/gnu/gmp',  # idem for GMP
    'http://ftpmirror.gnu.org/gnu/mpfr',  # idem for MPFR
    'http://ftpmirror.gnu.org/gnu/mpc',  # idem for MPC
#    'ftp://gcc.gnu.org/pub/gcc/infrastructure/',  # GCC dependencies
    'http://ftp.nluug.nl/languages/gcc/infrastructure/'
    'http://gcc.cybermirror.org/infrastructure/',  # HTTP mirror for GCC dependencies
    'http://isl.gforge.inria.fr/',  # original HTTP source for ISL
]
sources = [
    'gcc-%(version)s.tar.gz',
    'gmp-6.1.2.tar.bz2',
    'mpfr-%s.tar.bz2' % mpfr_version,
    'mpc-1.1.0.tar.gz',
    'isl-0.20.tar.bz2',
]
patches = [
    'GCCcore-6.2.0-fix-find-isl.patch',
    'gcc-8.2.0-isl-0.20-missing-include.patch',
]
checksums = [
    '1b0f36be1045ff58cbb9c83743835367b860810f17f0195a4e093458b372020f',  # gcc-8.2.0.tar.gz
    '5275bb04f4863a13516b2f39392ac5e272f5e1bb8057b18aec1c9b79d73d8fb2',  # gmp-6.1.2.tar.bz2
    'a4d97610ba8579d380b384b225187c250ef88cfe1d5e7226b89519374209b86b',  # mpfr-4.0.1.tar.bz2
    '6985c538143c1208dcb1ac42cedad6ff52e267b47e5f970183a3e75125b43c2e',  # mpc-1.1.0.tar.gz
    'b587e083eb65a8b394e833dea1744f21af3f0e413a448c17536b5549ae42a4c2',  # isl-0.20.tar.bz2
    '5ad909606d17d851c6ad629b4fddb6c1621844218b8d139fed18c502a7696c68',  # GCCcore-6.2.0-fix-find-isl.patch
    '62fa14c3ba2e59cb1d172251cd9d429534394388b10796cf437f65e94ce81c7f',  # gcc-8.2.0-isl-0.20-missing-include.patch
]

builddependencies = [
    ('M4', '1.4.18'),
    ('binutils', '2.31.1'),
]

languages = ['c', 'c++', 'fortran']

withisl = True

moduleclass = 'compiler'
