Ticket #49299: akonadi_use_c++11.diff

File akonadi_use_c++11.diff, 1.6 KB (added by michaelld (Michael Dickens), 9 years ago)
  • Portfile

     
    2626                    port:boost \
    2727                    port:shared-mime-info
    2828
    29 #Older compilers cannot handle c++0x instructions contained in akonadi
    30 compiler.blacklist  gcc-4.2 llvm-gcc-4.2 apple-gcc-4.2
    31 compiler.blacklist-append   {clang < 500}
     29# require c++11
    3230
     31post-patch {
     32    reinplace "s/c++0x/c++11/" ${worksrcpath}/CMakeLists.txt
     33}
     34
     35if {${configure.cxx_stdlib} eq "libstdc++"} {
     36
     37    # *clang* when using libstdc++ do not seem to support C++11;
     38    # C++11 support seems to need GCC 4.7+ when using libstdc++;
     39    # could use C++0x support on GCC4.[56], but just ignore it since
     40    # there are newer compilers already in place as defaults.
     41
     42    # Blacklist GCC compilers not supporting C++11 and all CLANG.
     43    # This is probably not necessary, but it's good practice.
     44
     45    compiler.blacklist-append *clang* {*gcc-3*} {*gcc-4.[0-6]}
     46
     47    # and whitelist GCC compilers that support C++11. wish there were
     48    # a better way.  these will be used in the order provided.
     49
     50    compiler.whitelist macports-gcc-5 macports-gcc-4.9 macports-gcc-4.8 macports-gcc-4.7
     51
     52} else {
     53
     54    # using libc++;
     55    # Blacklist Clang not supporting C++11 in some form and all GCC.
     56    # Just use the cxx11 PortGroup for this specific case.
     57
     58    PortGroup cxx11 1.0
     59
     60}
     61
    3362configure.args-append  -DPOSTGRES_PATH=Off
    3463# mute akonadiserver which is usually overly chatty:
    3564configure.cflags-append     -DQT_NO_DEBUG_OUTPUT