<pre style='margin:0'>
Chris Jones (cjones051073) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/d487caef8c98ddcc1eedf9347a376b0c9ab9aa5f">https://github.com/macports/macports-ports/commit/d487caef8c98ddcc1eedf9347a376b0c9ab9aa5f</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit d487caef8c98ddcc1eedf9347a376b0c9ab9aa5f
</span>Author: Chris Jones <jonesc@macports.org>
AuthorDate: Wed May 8 10:37:14 2019 +0100
<span style='display:block; white-space:pre;color:#404040;'> gcc9: Add test to see if cctools active llvm variant check succeeded.
</span>---
lang/gcc9/Portfile | 11 +++++++++++
1 file changed, 11 insertions(+)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/gcc9/Portfile b/lang/gcc9/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index f6ebbab..4883344 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/lang/gcc9/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/gcc9/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -107,13 +107,23 @@ if { ${os.major} > 10 } {
</span> if {![catch {set installed [lindex [registry_active cctools] 0]}]} {
# cctools already installed, so figure out from registry what variant to use
# list here must have all possible variants from cctools in it
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ set llvm_variant_found "no"
</span> foreach {llvm_v llvm_v_nodot} {3.4 34 3.7 37 3.9 39 4.0 40 5.0 50 6.0 60 7.0 70 8.0 80 devel dev} {
if {[active_variants cctools llvm${llvm_v_nodot} ""]} {
depends_build-append port:clang-${llvm_v}
configure.compiler macports-clang-${llvm_v}
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ set llvm_variant_found "yes"
</span> break
}
}
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ # If we failed to find the active variant, error out as it could mean
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # above variant list is out of date.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if { ${llvm_variant_found} eq "no" } {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_error "Failed to determine active llvm variant for cctools. Please check variant list."
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return -code error "configuration error"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_debug "${subport}: cctools has llvm variant ${llvm_v} active"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span> } else {
# cctools is not yet installed, so have to play 'guess the default variant' :(
# Logic here needs to match that used in cctools port.
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -126,6 +136,7 @@ if { ${os.major} > 10 } {
</span> }
depends_build-append port:clang-${llvm_v}
configure.compiler macports-clang-${llvm_v}
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_debug "${subport}: cctools not active. Will assume default llvm variant is ${llvm_v}"
</span> }
}
</pre><pre style='margin:0'>
</pre>