<pre style='margin:0'>
Joshua Root (jmroot) pushed a commit to branch master
in repository macports-base.

</pre>
<p><a href="https://github.com/macports/macports-base/commit/8caac195a15c8a01d07cf337439fd68f4370d9ee">https://github.com/macports/macports-base/commit/8caac195a15c8a01d07cf337439fd68f4370d9ee</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 8caac195a15c8a01d07cf337439fd68f4370d9ee
</span>Author: Joshua Root <jmr@macports.org>
AuthorDate: Sat Jul 13 14:08:19 2019 +1000

<span style='display:block; white-space:pre;color:#404040;'>    Allow falling back to "macosx" SDK
</span><span style='display:block; white-space:pre;color:#404040;'>    
</span><span style='display:block; white-space:pre;color:#404040;'>    In the past, we could use the Command Line Tools as effectively an SDK
</span><span style='display:block; white-space:pre;color:#404040;'>    installed in /. That's no longer possible starting with 10.14, so when
</span><span style='display:block; white-space:pre;color:#404040;'>    an Xcode version is released that will run on 10.14 but doesn't come
</span><span style='display:block; white-space:pre;color:#404040;'>    with a 10.14 SDK, we'll break. This works around that, though it comes
</span><span style='display:block; white-space:pre;color:#404040;'>    with its own set of problems.
</span><span style='display:block; white-space:pre;color:#404040;'>    
</span><span style='display:block; white-space:pre;color:#404040;'>    Closes: https://trac.macports.org/ticket/57143
</span>---
 src/port1.0/portconfigure.tcl | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 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 062ab31..4f11fcc 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;'>@@ -488,7 +488,7 @@ proc portconfigure::configure_get_sdkroot {sdk_version} {
</span>         return $sdk
     }
 
<span style='display:block; white-space:pre;background:#ffe0e0;'>-    if {![catch {set sdk [exec xcrun --sdk macosx${sdk_version} --show-sdk-path 2> /dev/null]}]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    if {![catch {exec xcrun --sdk macosx${sdk_version} --show-sdk-path 2> /dev/null} sdk]} {
</span>         return $sdk
     }
 
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -497,14 +497,18 @@ proc portconfigure::configure_get_sdkroot {sdk_version} {
</span>         return $sdk
     }
 
<span style='display:block; white-space:pre;background:#ffe0e0;'>-    # TODO: Support falling back to "macosx" if it is present?
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    # Support falling back to "macosx" if it is present.
</span>     #       This leads to problems when it is newer than the base OS because many OSS assume that
     #       the SDK version matches the deployment target, so they unconditionally try to use
     #       symbols that are only available on newer OS versions..
<span style='display:block; white-space:pre;background:#ffe0e0;'>-    #if {![catch {set sdk [exec xcrun --sdk macosx --show-sdk-path 2> /dev/null]}]} {
</span><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><span style='display:block; white-space:pre;background:#ffe0e0;'>-    #    return $sdk
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-    #}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    # But it's better than not being able to build at all. Recent Xcode released have been able
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    # to run on 10.x but only include an SDK for 10.x+1. Combined with the disappearance of
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    # /usr/include, that means not having this fallback would cause great breakage.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    # See <https://trac.macports.org/ticket/57143>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    if {![catch {exec xcrun --sdk macosx --show-sdk-path 2> /dev/null} sdk]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+        ui_warn "Unable to determine location of the macOS ${sdk_version} SDK.  Using the default macOS SDK."
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+        return $sdk
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    }
</span> 
     ui_error "Unable to determine location of a macOS SDK."
     return -code error "Unable to determine location of a macOS SDK."
</pre><pre style='margin:0'>

</pre>