<pre style='margin:0'>
Clemens Lang (neverpanic) pushed a commit to branch master
in repository macports-base.
</pre>
<p><a href="https://github.com/macports/macports-base/commit/25b1209ef33307aa2eec3e32143f0399cad187f8">https://github.com/macports/macports-base/commit/25b1209ef33307aa2eec3e32143f0399cad187f8</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 25b1209ef33307aa2eec3e32143f0399cad187f8
</span>Author: Satryaji Aulia <satraul@macports.org>
AuthorDate: Fri Jul 19 13:58:48 2019 +0700
<span style='display:block; white-space:pre;color:#404040;'> portconfigure: Prioritize returning CLT SDK if Xcode not needed
</span>---
src/port1.0/portconfigure.tcl | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
<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 56a9eae..4803a2f 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;'>@@ -455,7 +455,7 @@ proc portconfigure::configure_get_ld_archflags {} {
</span> }
proc portconfigure::configure_get_sdkroot {sdk_version} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global developer_dir macosx_version xcodeversion os.arch os.platform
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global developer_dir macosx_version xcodeversion os.arch os.platform use_xcode
</span>
# This is only relevant for macOS
if {${os.platform} ne "darwin"} {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -472,6 +472,23 @@ proc portconfigure::configure_get_sdkroot {sdk_version} {
</span> return {}
}
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Check CLT first if Xcode shouldn't be used
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![tbool use_xcode]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set cltpath "/Library/Developer/CommandLineTools"
</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;'>+ if {![catch {exec env DEVELOPER_DIR=${cltpath} xcrun --sdk macosx${sdk_version} --show-sdk-path 2> /dev/null} 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;'>+ # Fallback on "macosx"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![catch {exec env DEVELOPER_DIR=${cltpath} xcrun --sdk macosx --show-sdk-path 2> /dev/null} sdk]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_warn "macOS ${sdk_version} SDK not found, using default macOS SDK found in CommandLineTools."
</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;'>+
</span> if {[vercmp $xcodeversion 4.3] < 0} {
set sdks_dir ${developer_dir}/SDKs
} else {
</pre><pre style='margin:0'>
</pre>