<div dir="ltr">The code isn't actually mine... I simply took the code from other Portfiles, e.g. the <a href="https://github.com/macports/macports-ports/blob/master/_resources/port1.0/group/wxWidgets-1.0.tcl#L206-L208">wxWidgets 1.0 PortGroup</a>, <a href="https://github.com/macports/macports-ports/blob/master/aqua/phantomjs-qt/Portfile#L375-L384">phantomjs-qt</a>, <a href="https://github.com/macports/macports-ports/blob/master/aqua/qt5/Portfile#L1123-L1132">qt5</a>, <a href="https://github.com/macports/macports-ports/blob/master/aqua/qt6/Portfile#L664-L669">qt6</a>, etc. Although admittedly, the code in those Portfiles are slightly more generalized than mine, since I'm only interested in the specific case of the macOS 10.12 SDK on macOS 10.11.<div><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>-- </div><div>Jason Liu</div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Dec 1, 2021 at 12:50 PM Chris Jones <<a href="mailto:jonesc@hep.phy.cam.ac.uk">jonesc@hep.phy.cam.ac.uk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><br>
you are making a number of assumptions in the code below on where things <br>
are installed, that I don't think are universally valid. I think it <br>
would be better to use the macPort utilities to query the SDK version <br>
and/or Xcode version instead.<br>
<br>
Chris<br>
<br>
On 01/12/2021 5:14 pm, Jason Liu wrote:<br>
> A very similar situation occurs on macOS 10.11: It's fairly common to <br>
> install Xcode 8.2.1 on macOS 10.11, and Xcode 8.2.1 comes with the macOS <br>
> 10.12 SDK. So, in my upcoming fixes that allows godot to compile on <br>
> older macOSes, I have the following check:<br>
> <br>
> if {${os.platform} eq "darwin" && ${os.major} <= 15} {<br>
>      <code for some other stuff><br>
>      set sdks_dir ${developer_dir}/Platforms/MacOSX.platform/Developer/SDKs<br>
>      set add_appkit_wrapper yes<br>
>      if {![catch {file lstat $sdks_dir/MacOSX10.12.sdk finfo}]} {<br>
>          set add_appkit_wrapper no<br>
>      }<br>
> }<br>
> <br>
> Thus, if the Portfile detects the situation of the macOS 10.12 SDK being <br>
> installed on macOS 10.11, then it won't add my AppKit compatibility <br>
> wrapper file.<br>
> <br>
> I suspect a similar technique might need to be put in place to account <br>
> for Xcode 11 vs 12 being installed on macOS 10.15.<br>
> <br>
> -- <br>
> Jason  Liu<br>
> <br>
> <br>
> On Wed, Dec 1, 2021 at 10:32 AM Chris Jones <<a href="mailto:jonesc@hep.phy.cam.ac.uk" target="_blank">jonesc@hep.phy.cam.ac.uk</a> <br>
> <mailto:<a href="mailto:jonesc@hep.phy.cam.ac.uk" target="_blank">jonesc@hep.phy.cam.ac.uk</a>>> wrote:<br>
> <br>
>     Hi,<br>
> <br>
>     On 01/12/2021 3:18 pm, Christopher Nielsen wrote:<br>
>      > Just encountered an interesting situation, where a Swift-based<br>
>     port builds successfully via 10.15 CI, but fails on our buildbot.<br>
>      ><br>
>      > This appears to be related to Xcode versions: Presently our 10.15<br>
>     buildbot has Xcode 11.7, whereas 10.15 CI has Xcode 12.4.<br>
>      ><br>
>      > This brings up two questions:<br>
>      > * Would it be feasible to update our 10.15 buildbot to a newer<br>
>     Xcode release? Or are there certain ports/situations that<br>
>     necessitate remaining with 11.7?<br>
>      > * Do we have control over the Xcode version used for GitHub CI,<br>
>     or is 12.4 the only option?<br>
>      ><br>
>      > Ideally both should utilize the same Xcode 12 release,<br>
>     specifically one that still ships with the 10.15 SDK. So the choices<br>
>     would be 12.0, 12.0.1, and 12.1.<br>
>      ><br>
>      > Thoughts?<br>
>      ><br>
> <br>
>     MacPorts cannot mandate what Xcode a user has installed. Both Xcode 11<br>
>     and 12 are valid options to have on macOS10.15 (and, I might be wrong<br>
>     here, but from memory Ryan specifically keeps the builder on Xcode<br>
>     11 to<br>
>     avoid issues with Xcode 12 also shipping the macOS11 SDK).<br>
> <br>
>     So basically the port needs to handle both, in whatever way is<br>
>     appropriate. I guess this is the new mint port<br>
> <br>
> <br>
>     <a href="https://github.com/macports/macports-ports/commit/cfc6d01aa685a5a9cc30264bc2a7e9d1badf587e" rel="noreferrer" target="_blank">https://github.com/macports/macports-ports/commit/cfc6d01aa685a5a9cc30264bc2a7e9d1badf587e</a><br>
>     <<a href="https://github.com/macports/macports-ports/commit/cfc6d01aa685a5a9cc30264bc2a7e9d1badf587e" rel="noreferrer" target="_blank">https://github.com/macports/macports-ports/commit/cfc6d01aa685a5a9cc30264bc2a7e9d1badf587e</a>><br>
> <br>
>     I see there is a check in there on the Darwin version. It sounds this<br>
>     this should be changed to a test specifically on the Xcode(CLT)<br>
>     versions<br>
>     installed, if the requirement is really Xcode 12 and above, and not<br>
>     really the Darwin version.<br>
> <br>
>     Chris<br>
> <br>
</blockquote></div>