<pre style='margin:0'>
Joshua Root (jmroot) pushed a commit to branch release-2.6
in repository macports-base.
</pre>
<p><a href="https://github.com/macports/macports-base/commit/eaba3bc6088e1d18f416a930314279dada55f671">https://github.com/macports/macports-base/commit/eaba3bc6088e1d18f416a930314279dada55f671</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit eaba3bc6088e1d18f416a930314279dada55f671
</span>Author: Joshua Root <jmr@macports.org>
AuthorDate: Mon Sep 23 16:31:00 2019 +1000
<span style='display:block; white-space:pre;color:#404040;'> configure_get_sdkroot improvements
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Try a little harder to avoid calling out to xcrun, and silence warnings
</span><span style='display:block; white-space:pre;color:#404040;'> which were being printed repeatedly.
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> (cherry picked from commit 73ee4b496ffb35ae8c57606580c8b2e7cd440b34)
</span>---
src/port1.0/portconfigure.tcl | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/port1.0/portconfigure.tcl b/src/port1.0/portconfigure.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index 5bc2c6e..636a17c 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/port1.0/portconfigure.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/port1.0/portconfigure.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -472,9 +472,9 @@ proc portconfigure::configure_get_sdkroot {sdk_version} {
</span> return {}
}
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ set cltpath /Library/Developer/CommandLineTools
</span> # Check CLT first if Xcode shouldn't be used
if {![tbool use_xcode]} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set cltpath "/Library/Developer/CommandLineTools"
</span> set sdk ${cltpath}/SDKs/MacOSX${sdk_version}.sdk
if {[file exists $sdk]} {
return $sdk
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -483,8 +483,11 @@ proc portconfigure::configure_get_sdkroot {sdk_version} {
</span> return $sdk
}
# Fallback on "macosx"
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ set sdk ${cltpath}/SDKs/MacOSX.sdk
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[file exists $sdk]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return $sdk
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span> if {![catch {exec env DEVELOPER_DIR=${cltpath} xcrun --sdk macosx --show-sdk-path 2> /dev/null} sdk]} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_warn "macOS ${sdk_version} SDK not found, using default macOS SDK found in CommandLineTools."
</span> return $sdk
}
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -509,7 +512,12 @@ proc portconfigure::configure_get_sdkroot {sdk_version} {
</span> return $sdk
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set sdk /Library/Developer/CommandLineTools/SDKs/MacOSX${sdk_version}.sdk
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set sdk ${cltpath}/SDKs/MacOSX${sdk_version}.sdk
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[file exists $sdk]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return $sdk
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set sdk ${sdks_dir}/MacOSX.sdk
</span> if {[file exists $sdk]} {
return $sdk
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -523,7 +531,6 @@ proc portconfigure::configure_get_sdkroot {sdk_version} {
</span> # /usr/include, that means not having this fallback would cause great breakage.
# See <https://trac.macports.org/ticket/57143>
if {![catch {exec xcrun --sdk macosx --show-sdk-path 2> /dev/null} sdk]} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_warn "Unable to determine location of the macOS ${sdk_version} SDK. Using the default macOS SDK."
</span> return $sdk
}
</pre><pre style='margin:0'>
</pre>