# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
PortGroup compiler_blacklist_versions 1.0
PortGroup active_variants 1.1
PortGroup conflicts_build 1.0
subport libgcc9 { revision 0 }
# an exception in the license allows dependents to not be GPL
license {GPL-3+ Permissive}
description The GNU compiler collection
long_description The GNU compiler collection, including front ends for \
C, C++, Objective-C, Objective-C++ and Fortran.
homepage https://gcc.gnu.org/
master_sites ftp://ftp.funet.fi/pub/mirrors/sources.redhat.com/pub/gcc/releases/gcc-${version}/ \
http://mirror.koddos.net/gcc/releases/gcc-${version}/ \
https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/gcc/gcc-${version}/ \
https://ftp-stud.hs-esslingen.de/pub/Mirrors/ftp.gnu.org/gcc/gcc-${version}/ \
ftp://ftp.gwdg.de/pub/linux/gcc/releases/gcc-${version}/ \
ftp://gcc.ftp.nluug.nl/mirror/languages/gcc/releases/gcc-${version}/ \
ftp://gcc.gnu.org/pub/gcc/releases/gcc-${version}/ \
checksums rmd160 a51d7f812f45980c517c4505e04a217cf319a992 \
sha256 ea6ef08f121239da5695f76c9b33637a118dcf63e24164422231917fa61fb206 \
depends_lib port:cctools \
path:lib/pkgconfig/isl.pc:isl \
depends_run port:gcc_select \
path:lib/libgcc/libgcc_s.1.dylib:libgcc
depends_skip_archcheck-append gcc_select ld64 cctools
license_noconflict gmp mpfr ppl libmpc zlib
set major [lindex [split ${version} .-] 0]
configure.pre_args-append --build=${build_arch}-apple-darwin${os.major}
# Patch for Darwin19/Xcode11 issue, borrowed from Homebrew
# For simplicitly, just apply to both Darwin 18 and 19 (as both could have Xcode11).
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90835
# https://github.com/Homebrew/homebrew-core/blob/master/Formula/gcc.rb