Ignore:
Timestamp:
Jun 6, 2014, 2:30:14 PM (6 years ago)
Author:
mojca@…
Message:

root6: fix configure.cxx_stdlib and compiler blacklist (#43917)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/science/root6/Portfile

    r120703 r120764  
    99PortGroup           github 1.0
    1010PortGroup           select 1.0
    11 
    12 # TODO: try to figure out if one could also build root6 on < 10.9
    1311
    1412# Essentially 6.00.00, but with some bug fixes to the build system
     
    3735configure.dir       ${workpath}/build
    3836build.dir           ${configure.dir}
    39 
    40 # (copied from llvm-3.5)
    41 # TODO: Check ${configure.cxx_stdlib} directly once MacPorts 2.3 is released
    42 platform darwin {
    43     # Note that we are forcing this choice.  This means that anything linking
    44     # against llvm-3.5 needs to also be using libc++.  This is possibly
    45     # problematic, but luckily there is just a limited set of such dependents.
    46 
    47     if {[info exists configure.cxx_stdlib]} {
    48         configure.cxx_stdlib libc++
    49     }
    50 
    51     depends_lib-append port:libcxx
    52 }
    53 pre-fetch {
    54     if {(${os.major} < 13 && ! [info exists configure.cxx_stdlib]) ||
    55         (! [file exists /usr/lib/libc++.dylib])} {
    56         ui_error "$name requires a C++11 runtime, which your configuration does not allow"
    57         error "unsupported configuration"
    58     }
    59 }
    6037
    6138post-extract {
     
    8158select.file         ${filespath}/${name}
    8259
    83 # TODO: exact compiler fallback/black list
    8460# Force a compatible compiler
    85 compiler.blacklist-append {clang < 425} macports-clang-2.9
    86 compiler.fallback-append macports-clang-3.5 macports-clang-3.4 macports-clang-3.3
     61# (macports-clang-3.3 works; it's blacklisted only to give the preference to 3.4)
     62compiler.blacklist-append *gcc* {clang < 500} macports-clang-2.9 macports-clang-3.0 macports-clang-3.1 macports-clang-3.2 macports-clang-3.3
     63compiler.fallback-append macports-clang-3.4 macports-clang-3.5
    8764
    8865# port specific location
     
    126103                    -Dgviz=OFF \
    127104                    -Dsoversion=OFF \
    128                     -Dc++11=OFF \
    129                     -Dlibcxx=OFF \
     105                    -Dc++11=ON \
     106                    -Dlibcxx=ON \
    130107                    -Dxrootd=OFF \
    131108                    -Dbuiltin_ftgl=ON \
     
    134111                    -Dmemstat=ON \
    135112                    -Dunuran=ON \
    136                     -Dreflex=ON \
    137113                    -Dtable=ON \
    138114                    -Dgdml=ON \
     
    146122configure.cppflags-delete   -I${prefix}/include
    147123
    148 # TODO: Check ${configure.cxx_stdlib} directly once MacPorts 2.3 is released
    149124platform darwin {
    150     set cxxstdlib {}
    151 
    152     if {[info exists configure.cxx_stdlib] &&
    153         ${configure.cxx_stdlib} ne {} &&
    154         [string match *clang* ${configure.cxx}]} {
    155         set cxxstdlib ${configure.cxx_stdlib}
    156     } elseif {[string match *clang* ${configure.cxx}] && ${os.major} >= 13} {
    157         set cxxstdlib libc++
    158     } else {
    159         set cxxstdlib libstdc++
    160     }
    161 
    162     if {${cxxstdlib} eq "libc++"} {
    163         configure.args-replace -Dc++11=OFF -Dc++11=ON
     125    # Note that we are forcing this choice.  This means that anything linking
     126    # against root6 needs to also be using libc++.  This is possibly
     127    # problematic, but luckily there is just a limited set of such dependents.
     128    # Another problem is that all dependencies might need to be built-in
     129    # to make sure that they all use libc++.
     130    if { ${configure.cxx_stdlib} ne "libc++" } {
     131        configure.cxx_stdlib libc++
     132        depends_lib-append port:libcxx
    164133    }
    165134}
Note: See TracChangeset for help on using the changeset viewer.