[MacPorts] #63139: Prefer MacOSX11.sdk if available else prefer newest MacOSX11.*.sdk

MacPorts noreply at macports.org
Mon Jun 28 08:32:45 UTC 2021


#63139: Prefer MacOSX11.sdk if available else prefer newest MacOSX11.*.sdk
--------------------------+--------------------
  Reporter:  ryandesign   |      Owner:  (none)
      Type:  enhancement  |     Status:  new
  Priority:  Normal       |  Milestone:
 Component:  base         |    Version:  2.7.1
Resolution:               |   Keywords:  bigsur
      Port:               |
--------------------------+--------------------

Comment (by ryandesign):

 Replying to [comment:2 mojca]:
 > Ryan, hasn't this already been addressed?

 Not as far as I can see. The code [browser:macports-
 base/src/port1.0/portconfigure.tcl#L513 currently in base] is:
 {{{
 # find a "close enough" match for the given sdk_version in sdk_path
 proc portconfigure::find_close_sdk {sdk_version sdk_path} {
     # only works right for versions >= 11, which is all we need
     set sdk_major [lindex [split $sdk_version .] 0]
     set sdks [glob -nocomplain -directory $sdk_path
 MacOSX${sdk_major}*.sdk]
     foreach sdk [lsort -command vercmp $sdks] {
         # Sanity check - mostly empty SDK directories are known to exist
         if {[file exists ${sdk}/usr/include/sys/cdefs.h]} {
             return $sdk
         }
     }
     return ""
 }
 }}}
 To me it looks like it sorts all found SDKs in ascending version order
 (e.g. "11" first, if it exists, then "11.0" if it exists, then "11.1" if
 it exists, etc.). I am suggesting that the order in which we check should
 be changed: first the major version (e.g. "11") if it exists, then in
 descending version order (e.g. "11.3", then "11.1", then "11.0").

-- 
Ticket URL: <https://trac.macports.org/ticket/63139#comment:3>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list