Ticket #49709: cxx11.diff

File cxx11.diff, 8.8 KB (added by ryandesign (Ryan Carsten Schmidt), 9 years ago)

proposed patch

  • devel/cmake/Portfile

     
    180180}
    181181
    182182variant gui description {Build Qt-based cmake-gui} {
     183    PortGroup cxx11 1.0
    183184    configure.args-append --qt-gui
    184 
    185     # when building the GUI with Qt, CMake uses C++11. So, make sure
    186     # the compiler used is c++11 compliant.
    187    
    188     if {${configure.cxx_stdlib} eq "libstdc++"} {
    189 
    190         # *clang* when using libstdc++ do not seem to support C++11;
    191         # C++11 support seems to need GCC 4.7+ when using libstdc++;
    192         # could use C++0x support on GCC4.[56], but just ignore it since
    193         # there are newer compilers already in place as defaults.
    194 
    195         # Blacklist GCC compilers not supporting C++11 and all CLANG.
    196         # This is probably not necessary, but it's good practice.
    197 
    198         compiler.blacklist-append *clang* {*gcc-3*} {*gcc-4.[0-6]}
    199 
    200         # and whitelist those we do want to use. wish there were a better way.
    201         # these will be used in the order provided.
    202 
    203         compiler.whitelist macports-gcc-4.9 macports-gcc-4.8 macports-gcc-4.7
    204 
    205     } else {
    206 
    207         # using libc++;
    208         # Blacklist Clang not supporting C++11 in some form and all GCC.
    209         # Just use the cxx11 PortGroup for this specific case.
    210 
    211         PortGroup cxx11 1.0
    212 
    213     }
    214185}
    215186
    216187variant qt4 conflicts qt5 requires gui description {Build Qt GUI using Qt4} {
  • science/gnuradio/Portfile

     
    583583
    584584variant cxx11 description "Compile using C++11" {
    585585
    586     # require C++11
    587 
     586    PortGroup cxx11 1.0
    588587    configure.cxxflags-append -std=c++11
    589 
    590     if {${configure.cxx_stdlib} eq "libstdc++"} {
    591 
    592         # *clang* when using libstdc++ do not seem to support C++11;
    593         # C++11 support seems to need GCC 4.7+ when using libstdc++;
    594         # could use C++0x support on GCC4.[56], but just ignore it since
    595         # there are newer compilers already in place as defaults.
    596 
    597         # Blacklist GCC compilers not supporting C++11 and all CLANG.
    598         # This is probably not necessary, but it's good practice.
    599 
    600         compiler.blacklist-append *clang* {*gcc-3*} {*gcc-4.[0-6]}
    601 
    602         # and whitelist those we do want to use. wish there were a better way.
    603         # these will be used in the order provided.
    604 
    605         compiler.whitelist macports-gcc-4.9 macports-gcc-4.8 macports-gcc-4.7
    606 
    607     } else {
    608 
    609         # using libc++;
    610         # Blacklist Clang not supporting C++11 in some form and all GCC.
    611 
    612         compiler.blacklist-append *gcc* {clang < 500}
    613 
    614     }
    615588}
  • science/gr-foo/Portfile

     
    33
    44PortSystem          1.0
    55PortGroup           cmake 1.0
     6PortGroup           cxx11 1.0
    67PortGroup           github 1.0
    78PortGroup           active_variants 1.1
    89
     
    6162    -DPYTHON_LIBRARY=${prefix}/Library/Frameworks/Python.framework/Versions/2.7/Python \
    6263    -DGR_PYTHON_DIR=${frameworks_dir}/Python.framework/Versions/2.7/lib/python2.7/site-packages
    6364
    64 # require c++11
    65 
    6665post-patch {
    6766    reinplace "s/c++0x/c++11/" ${worksrcpath}/CMakeLists.txt
    6867}
    69 
    70 if {${configure.cxx_stdlib} eq "libstdc++"} {
    71 
    72     # *clang* when using libstdc++ do not seem to support C++11;
    73     # C++11 support seems to need GCC 4.7+ when using libstdc++;
    74     # could use C++0x support on GCC4.[56], but just ignore it since
    75     # there are newer compilers already in place as defaults.
    76 
    77     # Blacklist GCC compilers not supporting C++11 and all CLANG.
    78     # This is probably not necessary, but it's good practice.
    79 
    80     compiler.blacklist-append *clang* {*gcc-3*} {*gcc-4.[0-6]}
    81 
    82     # and whitelist those we do want to use. wish there were a better way.
    83     # these will be used in the order provided.
    84 
    85     compiler.whitelist macports-gcc-4.9 macports-gcc-4.8 macports-gcc-4.7
    86 
    87 } else {
    88 
    89     # using libc++;
    90     # Blacklist Clang not supporting C++11 in some form and all GCC.
    91     # Just use the cxx11 PortGroup for this specific case.
    92 
    93     PortGroup cxx11 1.0
    94 
    95 }
  • science/gr-ieee802-11/Portfile

     
    33
    44PortSystem          1.0
    55PortGroup           cmake 1.0
     6PortGroup           cxx11 1.0
    67PortGroup           github 1.0
    78PortGroup           active_variants 1.1
    89
     
    6162    -DPYTHON_LIBRARY=${prefix}/Library/Frameworks/Python.framework/Versions/2.7/Python \
    6263    -DGR_PYTHON_DIR=${frameworks_dir}/Python.framework/Versions/2.7/lib/python2.7/site-packages
    6364
    64 # require c++11
    65 
    6665post-patch {
    6766    reinplace "s/c++0x/c++11/" ${worksrcpath}/CMakeLists.txt
    6867}
    69 
    70 if {${configure.cxx_stdlib} eq "libstdc++"} {
    71 
    72     # *clang* when using libstdc++ do not seem to support C++11;
    73     # C++11 support seems to need GCC 4.7+ when using libstdc++;
    74     # could use C++0x support on GCC4.[56], but just ignore it since
    75     # there are newer compilers already in place as defaults.
    76 
    77     # Blacklist GCC compilers not supporting C++11 and all CLANG.
    78     # This is probably not necessary, but it's good practice.
    79 
    80     compiler.blacklist-append *clang* {*gcc-3*} {*gcc-4.[0-6]}
    81 
    82     # and whitelist those we do want to use. wish there were a better way.
    83     # these will be used in the order provided.
    84 
    85     compiler.whitelist macports-gcc-4.9 macports-gcc-4.8 macports-gcc-4.7
    86 
    87 } else {
    88 
    89     # using libc++;
    90     # Blacklist Clang not supporting C++11 in some form and all GCC.
    91     # Just use the cxx11 PortGroup for this specific case.
    92 
    93     PortGroup cxx11 1.0
    94 
    95 }
  • science/gr-ieee802-15-4/Portfile

     
    33
    44PortSystem          1.0
    55PortGroup           cmake 1.0
     6PortGroup           cxx11 1.0
    67PortGroup           github 1.0
    78PortGroup           active_variants 1.1
    89
     
    6364    -DPYTHON_LIBRARY=${prefix}/Library/Frameworks/Python.framework/Versions/2.7/Python \
    6465    -DGR_PYTHON_DIR=${frameworks_dir}/Python.framework/Versions/2.7/lib/python2.7/site-packages
    6566
    66 # require c++11
    67 
    6867post-patch {
    6968    reinplace "s/c++0x/c++11/" ${worksrcpath}/CMakeLists.txt
    7069}
    71 
    72 if {${configure.cxx_stdlib} eq "libstdc++"} {
    73 
    74     # *clang* when using libstdc++ do not seem to support C++11;
    75     # C++11 support seems to need GCC 4.7+ when using libstdc++;
    76     # could use C++0x support on GCC4.[56], but just ignore it since
    77     # there are newer compilers already in place as defaults.
    78 
    79     # Blacklist GCC compilers not supporting C++11 and all CLANG.
    80     # This is probably not necessary, but it's good practice.
    81 
    82     compiler.blacklist-append *clang* {*gcc-3*} {*gcc-4.[0-6]}
    83 
    84     # and whitelist those we do want to use. wish there were a better way.
    85     # these will be used in the order provided.
    86 
    87     compiler.whitelist macports-gcc-4.9 macports-gcc-4.8 macports-gcc-4.7
    88 
    89 } else {
    90 
    91     # using libc++;
    92     # Blacklist Clang not supporting C++11 in some form and all GCC.
    93     # Just use the cxx11 PortGroup for this specific case.
    94 
    95     PortGroup cxx11 1.0
    96 
    97 }
  • science/volk/Portfile

     
    137137
    138138variant cxx11 description "Compile Volk using C++11 compliance" {
    139139
    140     # require C++11
    141 
     140    PortGroup cxx11 1.0
    142141    configure.cxxflags-append -std=c++11
    143 
    144     if {${configure.cxx_stdlib} eq "libstdc++"} {
    145 
    146         # *clang* when using libstdc++ do not seem to support C++11;
    147         # C++11 support seems to need GCC 4.7+ when using libstdc++;
    148         # could use C++0x support on GCC4.[56], but just ignore it since
    149         # there are newer compilers already in place as defaults.
    150 
    151         # Blacklist GCC compilers not supporting C++11 and all CLANG.
    152         # This is probably not necessary, but it's good practice.
    153 
    154         compiler.blacklist-append *clang* *gcc-3.* {*gcc-4.[0-6]}
    155 
    156         # and whitelist those we do want to use. wish there were a better way.
    157         # these will be used in the order provided.
    158 
    159         compiler.whitelist macports-gcc-4.9 macports-gcc-4.8 macports-gcc-4.7
    160 
    161     } else {
    162 
    163         # using libc++;
    164         # Blacklist Clang not supporting C++11 in some form and all GCC.
    165         # Just use the cxx11 PortGroup for this specific case.
    166 
    167         PortGroup cxx11 1.0
    168 
    169     }
    170142}
    171143
    172144pre-extract {