Ticket #51844: qt4-SL-Libcxx-fix.diff

File qt4-SL-Libcxx-fix.diff, 1.0 KB (added by kenneth.f.cunningham@…, 8 years ago)

Fix to build qt4-mac on snowleopard with libcxx installed

  • Portfile

    old new  
    311311    } else {
    312312        set SDK ${developer_dir}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX${sdk_version}.sdk
    313313    }
     314   
     315    # on Snow Leopard with libc++ForOlderSystems installed, SDK must be unset as we only use system libraries
     316    # <https://trac.macports.org/ticket/51844>
     317        platform darwin 10 {
     318                if { ${configure.cxx_stdlib} eq "libc++"} {
     319                set SDK ""
     320        }
     321        }
     322
     323   
     324   
    314325}
    315326
    316327post-patch {
     
    600611        configure.env-append QMAKE_STDLIB="-stdlib=${configure.cxx_stdlib}"
    601612        configure.ldflags-append -stdlib=${configure.cxx_stdlib}
    602613    }
     614
     615# These extra links are required to build on Snow Leopard with libc++ installed, probably because SDK is unset and using system roots
     616# https://trac.macports.org/ticket/51844
     617        platform darwin 10 {
     618                if { ${configure.cxx_stdlib} eq "libc++"} {
     619                configure.ldflags-append    "-lobjc -framework Security"
     620        }
     621        }
     622
    603623}
    604624
    605625post-configure {