<pre style='margin:0'>
Marcus Calhoun-Lopez (MarcusCalhoun-Lopez) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/f0be41749f30df296f477fcb7cba90f5f4bfd639">https://github.com/macports/macports-ports/commit/f0be41749f30df296f477fcb7cba90f5f4bfd639</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new f0be417 languages PG: remove unnecessary PortGroup
</span>f0be417 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit f0be41749f30df296f477fcb7cba90f5f4bfd639
</span>Author: Marcus Calhoun-Lopez <mcalhoun@macports.org>
AuthorDate: Sun Jan 13 09:12:20 2019 -0700
<span style='display:block; white-space:pre;color:#404040;'> languages PG: remove unnecessary PortGroup
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Objectives merged into core.
</span><span style='display:block; white-space:pre;color:#404040;'> See https://github.com/macports/macports-base/pull/88
</span>---
_resources/port1.0/group/languages-1.0.tcl | 836 -----------------------------
1 file changed, 836 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/_resources/port1.0/group/languages-1.0.tcl b/_resources/port1.0/group/languages-1.0.tcl
</span>deleted file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 5797d28..0000000
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/_resources/port1.0/group/languages-1.0.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1,836 +0,0 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# Usage:
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# PortGroup languages 1.0
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# compiler.c_standard Standard for the C programming language
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# Values: 1989 (Default), 1999, 2011
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# compiler.cxx_standard Standard for the C++ programming language
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# Values: 1998 (Default), 2011, 2014, 2017
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# compiler.require_fortran Is a Fortran compiler required?
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# Values: no (Default), yes
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# compiler.fortran_fallback If Fortran is required and is not provides by compiler,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# list of compilers to use
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# Default value is the Fortran compilers in compiler.fallback
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# compiler.openmp_version Version of OpenMP required (blank for none)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# Values: blank (Default) 2.5, 3.0, 3.1, 4.0, 4.5
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# compiler.mpi MacPorts port that provides MPI
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# Values: blank (Default), mpich, openmpi
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# compiler.thread_local_storage Is thread local storage required?
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# Values: no (Default), yes
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# This PortGroup sets the compiler, compiler dependencies,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# and the C++ standard library switches.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# Ideally the functionality of this PortGroup should be integrated into
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# MacPorts base as a new option.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-options \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- compiler.c_standard \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- compiler.cxx_standard \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- compiler.require_fortran \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- compiler.fortran_fallback \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- compiler.openmp_version \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- compiler.mpi \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- compiler.thread_local_storage
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-default compiler.c_standard 1989
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-default compiler.cxx_standard 1998
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-default compiler.require_fortran no
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-default compiler.fortran_fallback {[portconfigure::get_fortran_fallback]}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-default compiler.openmp_version {}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-default compiler.mpi {}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-default compiler.thread_local_storage no
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# replacement for portconfigure.tcl version
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# change: add new compilers (G95, MPI, OpenMP)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-proc portconfigure::configure_start {args} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- global UI_PREFIX
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_notice "$UI_PREFIX [format [msgcat::mc "Configuring %s"] [option subport]]"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set compiler [option configure.compiler]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set valid_compilers {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- {^apple-gcc-(4\.[02])$} {MacPorts Apple GCC %s}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- {^cc$} {System cc}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- {^clang$} {Xcode Clang}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- {^gcc$} {System GCC}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- {^gcc-(3\.3|4\.[02])$} {Xcode GCC %s}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- {^llvm-gcc-4\.2$} {Xcode LLVM-GCC 4.2}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- {^macports-clang$} {MacPorts Clang (port select)}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- {^macports-clang-(\d+\.\d+)$} {MacPorts Clang %s}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- {^macports-dragonegg-(\d+\.\d+)$} {MacPorts DragonEgg %s}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- {^macports-dragonegg-(\d+\.\d+)-gcc-(\d+\.\d+)$}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- {MacPorts DragonEgg %s with GCC %s}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- {^macports-gcc$} {MacPorts GCC (port select)}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- {^macports-gcc-(\d+(?:\.\d+)?)$} {MacPorts GCC %s}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- {^macports-llvm-gcc-4\.2$} {MacPorts LLVM-GCC 4.2}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- {^macports-g95$} {MacPorts G95}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- {^macports-mpich-default$}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- {MacPorts MPICH Wrapper for MacPorts' Default C/C++ Compiler}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- {^macports-openmpi-default$}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- {MacPorts Open MPI Wrapper for MacPorts' Default C/C++ Compiler}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- {^macports-mpich-clang$}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- {MacPorts MPICH Wrapper for Xcode Clang}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- {^macports-openmpi-clang$}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- {MacPorts Open MPI Wrapper for Xcode Clang}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- {^macports-mpich-clang-(\d+\.\d+)$}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- {MacPorts MPICH Wrapper for Clang %s}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- {^macports-openmpi-clang-(\d+\.\d+)$}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- {MacPorts Open MPI Wrapper for Clang %s}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- {^macports-mpich-gcc-(\d+(?:\.\d+)?)$}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- {MacPorts MPICH Wrapper for GCC %s}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- {^macports-openmpi-gcc-(\d+(?:\.\d+)?)$}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- {MacPorts Open MPI Wrapper for GCC %s}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- foreach {re fmt} $valid_compilers {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[set matches [regexp -inline $re $compiler]] ne ""} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set compiler_name [format $fmt {*}[lrange $matches 1 end]]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- break
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {![info exists compiler_name]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return -code error "Invalid value for configure.compiler: $compiler"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_debug "Preferred compilers: [option compiler.fallback]"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_debug "Using compiler '$compiler_name'"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # Additional ccache directory setup
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- global configure.ccache ccache_dir ccache_size macportsuser
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {${configure.ccache}} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # Create ccache directory with correct permissions with root privileges
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- elevateToRoot "configure ccache"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[catch {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- file mkdir ${ccache_dir}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- file attributes ${ccache_dir} -owner ${macportsuser} -permissions 0755
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } result]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_warn "ccache_dir ${ccache_dir} could not be created; disabling ccache: $result"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set configure.ccache no
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- dropPrivileges
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # Initialize ccache directory with the given maximum size
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {${configure.ccache}} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[catch {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- exec ccache -M ${ccache_size} >/dev/null
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } result]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_warn "ccache_dir ${ccache_dir} could not be initialized; disabling ccache: $result"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set configure.ccache no
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# replacement for portconfigure.tcl version
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# change: replace almost all code with helper procedure get_valid_compilers
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-proc portconfigure::get_compiler_fallback {} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- global \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- default_compilers \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- xcodeversion
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # Check our override
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[info exists default_compilers]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return $default_compilers
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return [portconfigure::get_valid_compilers]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# if full_list is yes, then get all possible compilers that might work on this configuration
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# if full_list is no, reducde the compiler list to the "best" compilers
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-proc portconfigure::get_valid_compilers {{full_list no} {just_fortran no}} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- global \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- xcodeversion \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- compiler.c_standard \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- compiler.cxx_standard \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- compiler.openmp_version \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- os.major \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- cxx_stdlib \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- compiler.thread_local_storage
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # Check for platforms without Xcode
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {$xcodeversion eq "none" || $xcodeversion eq ""} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return {cc}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # https://releases.llvm.org/3.1/docs/ClangReleaseNotes.html#cchanges
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # https://gcc.gnu.org/c99status.html
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # https://gcc.gnu.org/wiki/C11Status
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # 1989 (C89) | - | - | - |
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # 1999 (C99) | - | Xcode 4.2 | GCC 4.5 |
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # 2011 (C11) | Clang 3.1 | Xcode 4.3 | GCC 4.9 |
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # https://clang.llvm.org/cxx_status.html
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # https://gcc.gnu.org/projects/cxx-status.html
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # https://en.cppreference.com/w/cpp/compiler_support
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # 1998 (C++98) | - | - | - |
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # 2011 (C++11) | Clang 3.3 | Xcode 5 | GCC 4.8.1 |
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # 2014 (C++14) | Clang 3.4 | Xcode 5.1 | GCC 5 |
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # 2017 (C++17) | Clang 5 | Xcode ??? | GCC 7 |
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[vercmp ${xcodeversion} 4.2] < 0} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set default_xcode_ok [expr ${compiler.c_standard} <= 1989 && ${compiler.cxx_standard} <= 1998]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } elseif {[vercmp ${xcodeversion} 4.3] < 0} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set default_xcode_ok [expr ${compiler.c_standard} <= 1999 && ${compiler.cxx_standard} <= 1998]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } elseif {[vercmp ${xcodeversion} 5] < 0} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set default_xcode_ok [expr ${compiler.c_standard} <= 2011 && ${compiler.cxx_standard} <= 1998]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } elseif {[vercmp ${xcodeversion} 5.1] < 0} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set default_xcode_ok [expr ${compiler.c_standard} <= 2011 && ${compiler.cxx_standard} <= 2011]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } else {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set default_xcode_ok [expr ${compiler.c_standard} <= 2011 && ${compiler.cxx_standard} <= 2014]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {${cxx_stdlib} eq "libstdc++" && ${os.major} >= 13} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # user has changed the default value of cxx_stdlib
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # for C++11 applications, MacPorts compilers are required
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set default_xcode_ok 0
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {${cxx_stdlib} eq "libc++" && ${os.major} < 11} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # user has changed the default value of cxx_stdlib
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # only Clang compilers use libc++
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set default_xcode_ok 0
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # for 11 <= ${os.major} && ${os.major} < 13,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # user has changed the default value of cxx_stdlib, but Xcode Clang can still use libc++
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # Xcode compilers do not support OpenMP
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {${compiler.openmp_version} ne ""} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set default_xcode_ok 0
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # Xcode compilers do no provide Fortran compilers
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {${just_fortran}} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set default_xcode_ok 0
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # thread-local storage (__thread) only works on Mac OS X Lion and above
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # see https://stackoverflow.com/questions/23791060/c-thread-local-storage-clang-503-0-40-mac-osx/
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # N.B. GCC emulates thread-local storage
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {${compiler.thread_local_storage} && ${os.major} < 11} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set tls_an_issue 1
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } else {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set tls_an_issue 0
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {${tls_an_issue}} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set default_xcode_ok 0
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # https://developer.apple.com/library/content/releasenotes/DeveloperTools/RN-Xcode/Chapters/Introduction.html
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # https://developer.apple.com/library/content/documentation/CompilerTools/Conceptual/LLVMCompilerOverview/index.html
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # Xcode 3.2 relase notes (Link?)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # About Xcode 3.1 Tools (about_xcode_tools_3.1.pdf, Link?)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # About Xcode 3.2 (about_xcode_3.2.pdf, Link?)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # Xcode 5 does not support use of the LLVM-GCC compiler and the GDB debugger.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # From Xcode 4.2, Clang is the default compiler for Mac OS X.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # llvm-gcc4.2 is now the default system compiler in Xcode 4.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # The LLVM compiler is the next-generation compiler, introduced in Xcode 3.2
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # GCC 4.0 has been removed from Xcode 4.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {!${default_xcode_ok}} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set compilers ""
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } else {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # attempt to include all available compilers except gcc-3*
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # attempt to have the default compilers first
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[vercmp ${xcodeversion} 5] >= 0} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set compilers {clang}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } elseif {[vercmp ${xcodeversion} 4.2] >= 0} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {${cxx_stdlib} eq "libstdc++"} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set compilers {clang llvm-gcc-4.2}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } else {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set compilers {clang}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } elseif {[vercmp ${xcodeversion} 4.0] >= 0} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set compilers {llvm-gcc-4.2 clang gcc-4.2}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } else {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # Legacy Cases
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[string match *10.4u* [option configure.sdkroot]]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # from Xcode 3.2 release notes:
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # GCC 4.2 cannot be used with the Mac OS X 10.4u SDK.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # If you want to build targets using the 10.4u SDK on Xcode 3.2, you must set the Compiler Version to GCC 4.0
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set compilers {gcc-4.0}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } else {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[vercmp ${xcodeversion} 3.2] >= 0} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # from about_xcode_3.2.pdf:
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # GCC 4.2 is the primary system compiler for the 10.6 SDK
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set compilers {gcc-4.2 llvm-gcc-4.2 gcc-4.0}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } elseif {[vercmp ${xcodeversion} 3.1] >= 0} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # from about_xcode_tools_3.1.pdf:
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # GCC 4.2 & LLVM GCC 4.2 optional compilers
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # do not assume they exist (???)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set compilers {apple-gcc-4.2 gcc-4.0}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } else {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set compilers {apple-gcc-4.2 gcc-4.0}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # https://openmp.llvm.org
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # https://gcc.gnu.org/wiki/openmp
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # OpenMP Version | Clang Version | GCC Version
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # 2.5 | 3.8 | 4.2
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # 3.0 | 3.8 | 4.4
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # 3.1 | 3.8 | 4.7
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # 4.0 | Partial | 4.9
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # 4.5 | Partial | ???
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set gcc_compilers macports-gcc-7
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {${compiler.cxx_standard} < 2017 || ${just_fortran}} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # allow latest GCC to be blacklisted by ports
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # see https://trac.macports.org/ticket/54215#comment:36
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- lappend gcc_compilers macports-gcc-6
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- lappend gcc_compilers macports-gcc-5
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set clang_compilers ""
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {!${tls_an_issue}} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # does Clang work on all i386 and x86_64 systems?
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # according to https://packages.macports.org/clang-5.0/,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # clang builds back to Mac OS X 10.6
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- lappend clang_compilers macports-clang-5.0
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {${compiler.cxx_standard} < 2017 && [vercmp ${compiler.openmp_version} 4] < 0} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # allow latest Clang to be blacklisted by ports
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- lappend clang_compilers macports-clang-4.0
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {${os.major} < 17} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # The High Sierra SDK requires a toolchain that can apply nullability to uuid_t
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- lappend clang_compilers macports-clang-3.9
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {${os.major} < 16} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # The Sierra SDK requires a toolchain that supports class properties
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[expr [vercmp ${compiler.openmp_version} 0] <= 0]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- lappend clang_compilers macports-clang-3.7
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {${just_fortran}} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- lappend compilers {*}${gcc_compilers}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- lappend compilers macports-g95
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } else {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {${cxx_stdlib} eq "libc++"} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # only Clang compilers recognize libc++
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- lappend compilers {*}${clang_compilers}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } else {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # when building for PowerPC architectures, prefer GCC to Clang
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[option configure.build_arch] eq "ppc" || [option configure.build_arch] eq "ppc64"} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- lappend compilers {*}${gcc_compilers}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- lappend compilers {*}${clang_compilers}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } else {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- lappend compilers {*}${clang_compilers}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- lappend compilers {*}${gcc_compilers}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # generate list of MPI wrappers of current compilers
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set mpi_compilers {}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[option compiler.mpi] ne ""} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set mpis [option compiler.mpi]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } else {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set mpis {mpich openmpi}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- foreach mpi ${mpis} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- foreach c ${compilers} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set parts [split ${c} -]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[lindex ${parts} 0] ne "macports"} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- lappend mpi_compilers macports-${mpi}-default
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } elseif {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- [lindex ${parts} 1] eq "clang"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- &&
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- [vercmp [lindex ${parts} 2] 3.3] >= 0
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- lappend mpi_compilers [lindex ${parts} 0]-${mpi}-[lindex ${parts} 1]-[lindex ${parts} 2]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } elseif {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- [lindex ${parts} 1] eq "gcc"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- &&
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- [vercmp [lindex ${parts} 2] 4.3] >= 0
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- lappend mpi_compilers [lindex ${parts} 0]-${mpi}-[lindex ${parts} 1]-[lindex ${parts} 2]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # if required, replace compiler with equivalent MPI wrapper
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[option compiler.mpi] ne ""} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # only MPI compilers are valid
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set compilers ${mpi_compilers}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } elseif {${full_list}} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # MPI compilers could work, so include them in the full list
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- lappend compilers {*}${mpi_compilers}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {${compilers} eq ""} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_error "Unable to find compatible compiler."
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return -code error "Unable to find compatible compiler."
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return $compilers
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# replacement for portconfigure.tcl version
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# change: add new compilers (G95, MPI, OpenMP)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-proc portconfigure::compiler_port_name {compiler} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set valid_compiler_ports {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- {^apple-gcc-(\d+)\.(\d+)$} {apple-gcc%s%s}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- {^macports-clang-(\d+\.\d+)$} {clang-%s}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- {^macports-dragonegg-(\d+\.\d+)(-gcc-\d+\.\d+)?$} {dragonegg-%s%s}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- {^macports-(llvm-)?gcc-(\d+)(?:\.(\d+))?$} {%sgcc%s%s}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- {^macports-([^-]+)-default$} {%s-default}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- {^macports-([^-]+)-clang$} {%s-clang}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- {^macports-([^-]+)-clang-(\d+)\.(\d+)$} {%s-clang%s%s}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- {^macports-([^-]+)-gcc-(\d+)(?:\.(\d+))?$} {%s-gcc%s%s}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- {^macports-g95$} {g95}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- foreach {re fmt} $valid_compiler_ports {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[set matches [regexp -inline $re $compiler]] ne ""} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return [format $fmt {*}[lrange $matches 1 end]]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return {}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# helper function to get the default value of compiler.fortran_fallback
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-proc portconfigure::get_fortran_fallback {} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set ret {}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- foreach compiler [option compiler.fallback] {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[configure_get_compiler_real fc $compiler] ne ""} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- lappend ret ${compiler}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {${ret} eq {}} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # no Fortran compilers were found in compiler.fallback
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # get list of all possible compilers with Fortran
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return [get_valid_compilers no yes]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return $ret
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# replacement for portconfigure.tcl version
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# change: replace almost all code with helper procedure configure_get_first_compiler
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-proc portconfigure::configure_get_default_compiler {} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[option compiler.whitelist] ne ""} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set search_list [option compiler.whitelist]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } else {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set search_list [option compiler.fallback]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return [portconfigure::configure_get_first_compiler cc ${search_list}]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# find the first working Fortran compiler in compiler.fortran_fallback
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-proc portconfigure::configure_get_first_fortran_compiler {} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return [portconfigure::configure_get_first_compiler fc [option compiler.fortran_fallback]]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# find the first working compiler in the search_list
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-proc portconfigure::configure_get_first_compiler {compilerName search_list} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- foreach compiler $search_list {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set allowed yes
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- foreach pattern [option compiler.blacklist] {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[string match $pattern $compiler]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set allowed no
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- break
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[lsearch [portconfigure::get_valid_compilers yes] ${compiler}] < 0} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # get_valid_compilers does not recognize ${compiler} as a valid compiler
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {${compilerName} eq "fc"} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[lsearch [portconfigure::get_valid_compilers yes yes] ${compiler}] < 0} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # get_valid_compilers recognizes ${compiler} as a valid *Fortran* compiler
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set allowed no
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } else {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set allowed no
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {$allowed &&
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- [configure_get_compiler_real ${compilerName} $compiler] ne "" &&
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ([file executable [configure_get_compiler_real ${compilerName} $compiler]] ||
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- [compiler_is_port $compiler])
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } then {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return $compiler
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_warn "All compilers are either blacklisted or unavailable for ${compilerName}; defaulting to first fallback option"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return [lindex [option compiler.fallback] 0]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# replacemenet for portconfigure.tcl procedure configure_get_compiler
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# change: add new compilers (G95, MPI, OpenMP)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-proc portconfigure::configure_get_compiler_real {type compiler} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- global prefix
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # Tcl 8.4's switch doesn't support -matchvar.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[regexp {^apple-gcc(-4\.[02])$} $compiler -> suffix]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- switch $type {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- cc -
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- objc { return ${prefix}/bin/gcc-apple${suffix} }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- cxx -
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- objcxx {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {$suffix eq "-4.2"} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return ${prefix}/bin/g++-apple${suffix}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- cpp { return ${prefix}/bin/cpp-apple${suffix} }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } elseif {[regexp {^clang$} $compiler]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- switch $type {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- cc -
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- objc { return [find_developer_tool clang] }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- cxx -
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- objcxx {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set clangpp [find_developer_tool clang++]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[file executable $clangpp]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return $clangpp
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return [find_developer_tool llvm-g++-4.2]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } elseif {[regexp {^gcc(-3\.3|-4\.[02])?$} $compiler -> suffix]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- switch $type {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- cc -
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- objc { return [find_developer_tool "gcc${suffix}"] }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- cxx -
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- objcxx { return [find_developer_tool "g++${suffix}"] }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- cpp { return [find_developer_tool "cpp${suffix}"] }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } elseif {[regexp {^llvm-gcc-4\.2$} $compiler]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- switch $type {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- cc -
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- objc { return [find_developer_tool llvm-gcc-4.2] }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- cxx -
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- objcxx { return [find_developer_tool llvm-g++-4.2] }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- cpp { return [find_developer_tool llvm-cpp-4.2] }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } elseif {[regexp {^macports-clang(-\d+\.\d+)?$} $compiler -> suffix]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {$suffix ne ""} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set suffix "-mp${suffix}"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- switch $type {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- cc -
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- objc { return ${prefix}/bin/clang${suffix} }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- cxx -
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- objcxx { return ${prefix}/bin/clang++${suffix} }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- cpp { return ${prefix}/bin/clang-cpp${suffix} }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } elseif {[regexp {^macports-dragonegg(-\d+\.\d+)(?:-gcc(-\d+\.\d+))?$} $compiler \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- -> infix suffix]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {$suffix ne ""} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set suffix "-mp${suffix}"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- switch $type {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- cc -
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- objc { return ${prefix}/bin/dragonegg${infix}-gcc${suffix} }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- cxx -
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- objcxx { return ${prefix}/bin/dragonegg${infix}-g++${suffix} }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- cpp { return ${prefix}/bin/dragonegg${infix}-cpp${suffix} }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- fc -
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- f77 -
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- f90 { return ${prefix}/bin/dragonegg${infix}-gfortran${suffix} }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } elseif {[regexp {^macports-gcc(-\d+(?:\.\d+)?)?$} $compiler -> suffix]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {$suffix ne ""} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set suffix "-mp${suffix}"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- switch $type {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- cc -
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- objc { return ${prefix}/bin/gcc${suffix} }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- cxx -
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- objcxx { return ${prefix}/bin/g++${suffix} }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- cpp { return ${prefix}/bin/cpp${suffix} }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- fc -
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- f77 -
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- f90 { return ${prefix}/bin/gfortran${suffix} }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } elseif {[regexp {^macports-llvm-gcc-4\.2$} $compiler]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- switch $type {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- cc -
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- objc { return ${prefix}/bin/llvm-gcc-4.2 }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- cxx -
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- objcxx { return ${prefix}/bin/llvm-g++-4.2 }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- cpp { return ${prefix}/bin/llvm-cpp-4.2 }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } elseif {[regexp {^macports-g95$} $compiler]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- switch $type {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- fc -
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- f77 -
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- f90 { return ${prefix}/bin/g95 }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } elseif {[regexp {^macports-([^-]+)-clang$} $compiler -> mpi]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- switch $type {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- cc -
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- objc { return ${prefix}/bin/mpicc-${mpi}-clang }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- cxx -
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- objcxx { return ${prefix}/bin/mpicxx-${mpi}-clang }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } elseif {[regexp {^macports-([^-]+)-clang-(\d+\.\d+)$} $compiler -> mpi version]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set suffix [join [split ${version} .] ""]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- switch $type {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- cc -
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- objc { return ${prefix}/bin/mpicc-${mpi}-clang${suffix} }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- cxx -
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- objcxx { return ${prefix}/bin/mpicxx-${mpi}-clang${suffix} }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- cpp { return ${prefix}/bin/clang-cpp-mp-${version} }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } elseif {[regexp {^macports-([^-]+)-gcc-(\d+(?:\.\d+)?)$} $compiler -> mpi version]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set suffix [join [split ${version} .] ""]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- switch $type {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- cc -
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- objc { return ${prefix}/bin/mpicc-${mpi}-gcc${suffix} }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- cxx -
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- objcxx { return ${prefix}/bin/mpicxx-${mpi}-gcc${suffix} }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- cpp { return ${prefix}/bin/cpp-mp-${version} }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- fc -
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- f77 -
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- f90 { return ${prefix}/bin/mpifort-${mpi}-gcc${suffix} }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } elseif {[regexp {^macports-([^-]+)-default$} $compiler -> mpi]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- switch $type {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- cc -
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- objc { return ${prefix}/bin/mpicc-${mpi}-mp }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- cxx -
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- objcxx { return ${prefix}/bin/mpicxx-${mpi}-mp }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # Fallbacks
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- switch $type {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- cc -
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- objc { return [find_developer_tool cc] }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- cxx -
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- objcxx { return [find_developer_tool c++] }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- cpp { return [find_developer_tool cpp] }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return ""
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# extension of portconfigure.tcl version
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# change: replace almost all code with helper procedure configure_get_compiler_real
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# change: if configure_get_compiler_real fails to find a compiler, handle Fortran case differently
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-proc portconfigure::configure_get_compiler {type {compiler {}}} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- global configure.compiler
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {$compiler eq ""} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set compiler ${configure.compiler}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set ret [portconfigure::configure_get_compiler_real ${type} ${compiler}]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {${ret} eq ""} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set is_fortran no
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- foreach tool {f77 f90 fc} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {${type} eq ${tool}} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set is_fortran yes
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {${is_fortran} && [option compiler.require_fortran]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set compiler [portconfigure::configure_get_first_fortran_compiler]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set ret [portconfigure::configure_get_compiler_real ${type} ${compiler}]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return ${ret}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# replacement for portconfigure.tcl version
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# change: replace almost all code with helper procedure add_compiler_port_dependencies
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# change: Fortran compiler dependency is a special case (e.g. clang++ from Xcode and gfortran from MacPorts GCC)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-proc portconfigure::add_automatic_compiler_dependencies {} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- global configure.compiler configure.compiler.add_deps
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {!${configure.compiler.add_deps}} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # The default value requires substitution before use.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set compiler [subst ${configure.compiler}]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[compiler_is_port ${compiler}]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_debug "Chosen compiler ${compiler} is provided by a port, adding dependency"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- portconfigure::add_compiler_port_dependencies ${compiler}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[option compiler.require_fortran] && [portconfigure::configure_get_compiler_real fc ${compiler}] eq ""} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # Fortran is required, but compiler does not provide it
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_debug "Adding Fortran compiler dependency"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set fortran_compiler [portconfigure::configure_get_first_fortran_compiler]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- portconfigure::add_compiler_port_dependencies ${fortran_compiler}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# helper function to add dependencies for a given compiler
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-proc portconfigure::add_compiler_port_dependencies {compiler} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- global os.major
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set compiler_port [portconfigure::compiler_port_name ${compiler}]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[regexp {^apple-gcc-(4\.0)$} $compiler -> gcc_version]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # compiler links against ${prefix}/lib/apple-gcc40/lib/libgcc_s.1.dylib
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_debug "Adding depends_lib port:$compiler_port"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- depends_lib-delete port:$compiler_port
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- depends_lib-append port:$compiler_port
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } elseif {[regexp {^macports-([^-]+)-(default|clang|gcc)(?:-(\d+(?:\.\d+)?))?$} $compiler -> mpi clang_or_gcc version]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # MPI compilers link against MPI libraries
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_debug "Adding depends_lib port:$compiler_port"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {${mpi} eq "openmpi"} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set pkgname ompi.pc
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } else {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set pkgname ${mpi}.pc
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- depends_lib-delete "path:lib/$compiler_port/pgkconfig/${pkgname}:${compiler_port}"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- depends_lib-append "path:lib/$compiler_port/pkgconfig/${pkgname}:${compiler_port}"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } else {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_debug "Adding depends_build port:$compiler_port"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- depends_build-delete port:$compiler_port
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- depends_build-append port:$compiler_port
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # add C++ runtime dependency if necessary
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- [regexp {^macports-gcc-(\d+(?:\.\d+)?)?$} ${compiler} -> gcc_version]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ||
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- [regexp {^macports-dragonegg-(\d+\.\d+)(?:-gcc-(\d+\.\d+))?$} ${compiler} -> llvm_version gcc_version]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[info exists llvm_version] && ${gcc_version} eq ""} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # port dragonegg-3.4 defaults to GCC version 4.6
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set gcc_version 4.6
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # compiler links against libraries in libgcc\d* and/or libgcc-devel
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[vercmp ${gcc_version} 4.6] < 0} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set libgccs "path:lib/libgcc/libgcc_s.1.dylib:libgcc port:libgcc7 port:libgcc6 port:libgcc45"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } elseif {[vercmp ${gcc_version} 7] < 0} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set libgccs "path:lib/libgcc/libgcc_s.1.dylib:libgcc port:libgcc7 port:libgcc6"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } elseif {[vercmp ${gcc_version} 8] < 0} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set libgccs "path:lib/libgcc/libgcc_s.1.dylib:libgcc port:libgcc7"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } else {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set libgccs "path:lib/libgcc/libgcc_s.1.dylib:libgcc"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_debug "Adding depends_build port:$compiler_port"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- depends_build-delete port:$compiler_port
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- depends_build-append port:$compiler_port
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- foreach libgcc_dep $libgccs {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_debug "Adding depends_lib $libgcc_dep"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- depends_lib-delete $libgcc_dep
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- depends_lib-append $libgcc_dep
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } elseif {[regexp {^macports-clang(?:-(\d+\.\d+))$} $compiler -> clang_version]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[option configure.cxx_stdlib] eq "macports-libstdc++"} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # see https://trac.macports.org/ticket/54766
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_debug "Adding depends_lib path:lib/libgcc/libgcc_s.1.dylib:libgcc"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- depends_lib-delete "path:lib/libgcc/libgcc_s.1.dylib:libgcc"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- depends_lib-append "path:lib/libgcc/libgcc_s.1.dylib:libgcc"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } elseif {[option configure.cxx_stdlib] eq "libc++"} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {${os.major} < 11 } {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # libc++ does not exist on these systems
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_debug "Adding depends_lib libcxx"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- depends_lib-delete "port:libcxx"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- depends_lib-append "port:libcxx"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[arch_flag_supported $compiler]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_debug "Adding depends_skip_archcheck $compiler_port"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- depends_skip_archcheck-delete $compiler_port
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- depends_skip_archcheck-append $compiler_port
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# replacement for portconfigure.tcl version
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# change: use macports-libstdc++ for libstdc++ if C++11 is required
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-default configure.cxx_stdlib {[portconfigure::configure_cxx_stdlib]}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# helper function to set configure.cxx_stdlib
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-proc portconfigure::configure_cxx_stdlib {} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- global cxx_stdlib
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[regexp {^clang\+\+-mp-([\d.]+)$} [file tail [option configure.cxx]] -> version]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # MacPorts Clang version 3.9 or above
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set is_macports_clang [expr [vercmp ${version} 3.9] >= 0]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } elseif {[regexp {^mpicxx-[^-]+-clang([\d.]+)$} [file tail [option configure.cxx]] -> version]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # MPI wrapper for MacPorts Clang version 3.9 or above
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set is_macports_clang [expr [vercmp ${version} 39] >= 0]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } else {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set is_macports_clang 0
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {${is_macports_clang} && ${cxx_stdlib} eq "libstdc++" && [option compiler.cxx_standard] >= 2011} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return "macports-libstdc++"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } else {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return ${cxx_stdlib}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# replacement for portconfigure.tcl version
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# change: use compiler.cxx_standard
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-proc portconfigure::should_add_cxx_abi {} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- global os.major cxx_stdlib
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # prior to OS X Mavericks, libstdc++ was the default C++ runtime, so
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # assume MacPorts libstdc++ must be ABI compatible with system libstdc++
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # for OS X Mavericks and above, users must select libstdc++, so
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # assume they want default ABI compatibility
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # see https://gcc.gnu.org/onlinedocs/gcc-5.2.0/libstdc++/manual/manual/using_dual_abi.html
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return [expr {${cxx_stdlib} eq "libstdc++" && [option compiler.cxx_standard] >= 2011 && ${os.major} < 13}]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# replacement for portconfigure.tcl version
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# change: ensure -D_GLIBCXX_USE_CXX11_ABI=0 is added if needed
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-proc portconfigure::stdlib_trace {opt action args} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- foreach flag [lsearch -all -inline [option $opt] -stdlib=*] {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- $opt-delete $flag
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {$action eq "read" && [portconfigure::should_add_stdlib]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- $opt-append -stdlib=[option configure.cxx_stdlib]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- foreach flag [lsearch -all -inline [option $opt] -D_GLIBCXX_USE_CXX11_ABI=0] {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- $opt-delete $flag
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {$action eq "read" && [portconfigure::should_add_cxx_abi]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- $opt-append -D_GLIBCXX_USE_CXX11_ABI=0
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# replacement for portconfigure.tcl version
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# change: add more compilers that support -arch
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-proc portconfigure::arch_flag_supported {compiler} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # GCC prior to 4.7 does not accept -arch flag
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[regexp {^macports(?:-[^-]+)?-gcc-4\.[0-6]} $compiler]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return 0
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } else {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return 1
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# replacement for portutil.tcl version
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# change: test to see if compiler supports universal builds
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-proc universal_setup {args} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[variant_exists universal]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_debug "universal variant already exists, so not adding the default one"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } elseif {[exists universal_variant] && ![option universal_variant]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_debug "universal_variant is false, so not adding the default universal variant"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } elseif {[exists use_xmkmf] && [option use_xmkmf]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_debug "using xmkmf, so not adding the default universal variant"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } elseif {![exists os.universal_supported] || ![option os.universal_supported]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_debug "OS doesn't support universal builds, so not adding the default universal variant"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } elseif {[llength [option supported_archs]] == 1} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_debug "only one arch supported, so not adding the default universal variant"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } elseif {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- [regexp {^macports-gcc-(\d+(?:\.\d+)?)?$} [option configure.compiler] -> gcc_version]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ||
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- [regexp {^macports-dragonegg-(\d+\.\d+)(?:-gcc-(\d+\.\d+))?$} [option configure.compiler] -> llvm_version gcc_version]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_debug "Compiler doesn't support universal builds, so not adding the default universal variant"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } else {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_debug "adding the default universal variant"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- variant universal {}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-}
</span></pre><pre style='margin:0'>
</pre>