easyblock = 'EB_GCC'

name = 'GCCcore'
version = '4.9.2'

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': 'dummy', 'version': ''}

mpfr_version = '3.1.2'
gcc_name = 'GCC'

source_urls = [
    'http://ftpmirror.gnu.org/gnu/gcc/gcc-%s' % version,  # GCC auto-resolving HTTP mirror
    'http://ftpmirror.gnu.org/gnu/gmp',  # idem for GMP
    'http://ftpmirror.gnu.org/gnu/mpfr',  # idem for MPFR
    'http://www.multiprecision.org/mpc/download',  # MPC official
]
sources = [
    '%s-%s.tar.bz2' % (gcc_name.lower(), version),
    'gmp-6.0.0a.tar.bz2',
    'mpfr-%s.tar.gz' % mpfr_version,
    'mpc-1.0.2.tar.gz',
]

builddependencies = [
    ('Autotools', '20150215'),
    ('binutils', '2.25'),
]

patches = [('mpfr-%s-allpatches-20141204.patch' % mpfr_version, '../mpfr-%s' % mpfr_version)]

checksums = [
    '4df8ee253b7f3863ad0b86359cd39c43',     # gcc-4.9.2.tar.bz2
    'b7ff2d88cae7f8085bd5006096eed470',     # gmp-6.0.0a.tar.bz2
    '181aa7bb0e452c409f2788a4a7f38476',     # mpfr-3.1.2.tar.gz
    '68fadff3358fb3e7976c7a398a0af4c3',     # mpc-1.0.2.tar.gz
    '58aec98d15982f9744a043d2f1c5af82',     # mpfr-3.1.2-allpatches-20141204.patch
]

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

moduleclass = 'compiler'
