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