Ticket #43917: root6-libc++.diff

File root6-libc++.diff, 2.6 KB (added by cjones051073 (Chris Jones), 10 years ago)
  • dports/science/root6/Portfile

     
    3737configure.dir       ${workpath}/build
    3838build.dir           ${configure.dir}
    3939
    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 }
    5340pre-fetch {
    5441    if {(${os.major} < 13 && ! [info exists configure.cxx_stdlib]) ||
    5542        (! [file exists /usr/lib/libc++.dylib])} {
     
    125112                    -Dbonjour=OFF \
    126113                    -Dgviz=OFF \
    127114                    -Dsoversion=OFF \
    128                     -Dc++11=OFF \
    129                     -Dlibcxx=OFF \
     115                    -Dc++11=ON \
     116                    -Dlibcxx=ON \
    130117                    -Dxrootd=OFF \
    131118                    -Dbuiltin_ftgl=ON \
    132119                    -Dmathmore=ON \
     
    133120                    -Dgenvector=ON \
    134121                    -Dmemstat=ON \
    135122                    -Dunuran=ON \
    136                     -Dreflex=ON \
    137123                    -Dtable=ON \
    138124                    -Dgdml=ON \
    139125                    -DPNG_LIBRARY=${prefix}/lib/libpng.dylib \
     
    145131configure.args-append       -DCMAKE_INCLUDE_PATH=${prefix}/include
    146132configure.cppflags-delete   -I${prefix}/include
    147133
    148 # TODO: Check ${configure.cxx_stdlib} directly once MacPorts 2.3 is released
    149134platform 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++
     135    if { ${configure.cxx_stdlib} ne "libc++" } {
     136        if { [info exists configure.cxx_stdlib] } {
     137            configure.cxx_stdlib libc++
     138            depends_lib-append port:libcxx
     139        } else {
     140            configure.args-replace -Dc++11=ON -Dc++11=OFF
     141            configure.args-replace -Dlibcxx=ON -Dlibcxx=OFF
     142        }
    160143    }
    161 
    162     if {${cxxstdlib} eq "libc++"} {
    163         configure.args-replace -Dc++11=OFF -Dc++11=ON
    164     }
    165144}
    166145
    167146post-destroot {