Ticket #57348: mongodb-10.11.patch

File mongodb-10.11.patch, 1.7 KB (added by ryandesign (Ryan Carsten Schmidt), 6 years ago)
  • Portfile

     
    11# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
    22
    33PortSystem          1.0
     4PortGroup           active_variants 1.1
    45PortGroup           compiler_blacklist_versions 1.0
    56PortGroup           conflicts_build 1.0
    67PortGroup           xcodeversion 1.0
     
    5859# TODO: fix me
    5960conflicts_build     libbson mongo-c-driver mongo-cxx-driver
    6061
     62# When targeting Mac OS X 10.7, mongodb needs at least the 10.8 SDK, which is in Xcode 4.4:
    6163# https://jira.mongodb.org/browse/SERVER-20320
    62 minimum_xcodeversions  {11 4.4}
     64minimum_xcodeversions-append {11 4.4}
    6365if {[vercmp ${configure.sdk_version} 10.8] < 0} {
    6466    configure.sdk_version   10.8
    6567}
    6668
     69# When targeting OS X 10.11, mongodb needs at least the 10.12 SDK, which is in Xcode 8:
     70# https://jira.mongodb.org/browse/SERVER-37640
     71minimum_xcodeversions-append {15 8}
     72if {[vercmp ${macosx_deployment_target} 10.11] >= 0 && [vercmp ${configure.sdk_version} 10.12] < 0} {
     73    configure.sdk_version   10.12
     74    # We don't require the ld64 port, but if it is installed, it must defer to
     75    # Xcode to be new enough to understand the newer SDK, otherwise:
     76    # ld: unexpected token: !tapi-tbd-v2 file
     77    # See https://trac.macports.org/ticket/53784
     78    # And require_active_variants doesn't work unless a dependency is declared.
     79    depends_build-append    port:ld64
     80    require_active_variants ld64 ld64_xcode
     81}
     82
    6783configure.cflags    {*}${configure.cc_archflags}
    6884configure.ldflags   {*}${configure.ld_archflags}
    6985