[MacPorts] #54446: nghttp2 @1.24.0 does not build on PPC Leopard, Mac OS X 10.5.8, with configure.cxx_stdlib = macports-libstdc++ and macports-gcc-6 because "'AI_NUMERICSERV' was not declared in this scope"

MacPorts noreply at macports.org
Sun Jul 9 21:21:30 UTC 2017


#54446: nghttp2 @1.24.0 does not build on PPC Leopard, Mac OS X 10.5.8, with
configure.cxx_stdlib = macports-libstdc++ and macports-gcc-6 because
"'AI_NUMERICSERV' was not declared in this scope"
------------------------+-------------------------
  Reporter:  ballapete  |      Owner:  Schamschula
      Type:  defect     |     Status:  assigned
  Priority:  Normal     |  Milestone:
 Component:  ports      |    Version:  2.4.1
Resolution:             |   Keywords:  leopard
      Port:  nghttp2    |
------------------------+-------------------------

Comment (by ballapete):

 The folloging patch makes `nghttp2` build on PPC Snow Leopard:

 {{{
 --- src/shrpx_config.cc~        2017-07-02 10:46:31.000000000 +0200
 +++ src/shrpx_config.cc 2017-07-09 22:29:41.000000000 +0200
 @@ -43,6 +43,21 @@
  #endif // HAVE_UNISTD_H
  #include <dirent.h>

 +#ifdef __APPLE__                                                // this
 block only for Macs
 +# ifndef __MAC_OS_X_VERSION_MIN_REQUIRED                        // are
 AvailabilityMacros.h or Availability.h not yet included?
 +#  if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1050     // then
 for Leopard and later…
 +#   include <Availability.h>                                    //
 …either include this…
 +#  else
 +#   include <AvailabilityMacros.h>                              // …or
 include that
 +#  endif
 +# endif
 +# if __MAC_OS_X_VERSION_MIN_REQUIRED < 1060                     // and
 for some OS versions do this…
 +#  ifndef AI_NUMERICSERV
 +#   define AI_NUMERICSERV 0
 +#  endif
 +# endif                                                         // finish
 OS version discrimination
 +#endif                                                          // finish
 Apple case
 +
  #include <cstring>
  #include <cerrno>
  #include <limits>
 }}}


 Portfile needs a line

 {{{
 patchfiles-append   src-shrpx_config.diff
 }}}

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


More information about the macports-tickets mailing list