[MacPorts] #52210: libsdl2 can build on 10.6, but instructions a bit vague

MacPorts noreply at macports.org
Thu Nov 3 04:28:09 CET 2016


#52210: libsdl2 can build on 10.6, but instructions a bit vague
-------------------------------------+--------------------
  Reporter:  kenneth.f.cunningham@…  |      Owner:  jmroot
      Type:  defect                  |     Status:  new
  Priority:  Low                     |  Milestone:
 Component:  ports                   |    Version:
Resolution:                          |   Keywords:
      Port:  libsdl2                 |
-------------------------------------+--------------------

Comment (by jeremyhu):

 include/SDL_syswm.h:230 does
 {{{
 #if defined(__OBJC__) && defined(__has_feature) && __has_feature(objc_arc)
 }}}

 That's clearly a bug in libsdl that has nothing to do with the 10.7 SDK.
 They need to check if __has_feature is defined *BEFORE* using it, not in
 the same line.  This should be:

 {{{
 #if defined(__OBJC__) && defined(__has_feature)
 # if  __has_feature(objc_arc)
 # endif
 #endif
 }}}

 ---

 Your NSAppKitVersionNumber10_6 fix looks good.  It can also be defined
 locally if it isn't available.  Upstream should probably do:

 {{{
 #ifndef NSAppKitVersionNumber10_6
 #define NSAppKitVersionNumber10_6 1038
 #endif
 }}}

 I suggest just we just do:

 {{{
 platform darwin {
     if {${os.major} < 11} {
         configure.cppflags-append -DNSAppKitVersionNumber10_6=1038
     }
 }
 }}}

 ---

 For the IOPMAssertionCreateWithDescription issue, you can do:
 {{{
 #if __MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
 #if __MAC_OS_X_VERSION_MIN_REQUIRED < 1070
   if (& IOPMAssertionCreateWithDescription)
 #endif
     IOPMAssertionCreateWithDescription(...);
 #endif
 }}}

 ---

 Your `-convertRectToScreen` fix looks good.

 ---

 I'll check the others later.

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



More information about the macports-tickets mailing list