Ticket #53605: gcc6-libcxx.diff

File gcc6-libcxx.diff, 1.4 KB (added by RJVB (René Bertin), 8 years ago)
  • lang/gcc6/Portfile

    old new  
    196196        ln -s libgcc/libstdc++.6.dylib ${destroot}${prefix}/lib/libstdc++.6.dylib
    197197    }
    198198} else {
     199
     200foreach cdv {3.9 4.0} {
     201    set cv [join [split ${cdv} "."] ""]
     202    variant libcxx${cv} description "Build to use libc++ and the corresponding headers from port:clang-${cdv}" {}
     203    if {[variant_isset libcxx${cv}]} {
     204        depends_run-append  port:clang-${cdv}
     205        patchfiles-append   patch-use-libcxx.diff
     206    }
     207}
     208
    199209depends_run-append         port:gcc_select
    200210
    201211post-destroot {
     
    226236            }
    227237        }
    228238    }
     239    foreach cdv {3.9 4.0} {
     240        set cv [join [split ${cdv} "."] ""]
     241        if {[variant_isset libcxx${cv}]} {
     242            # move the stdc++ headers out of the way
     243            xinstall -m 755 -d ${destroot}${prefix}/include/${name}-stdinc
     244            file rename ${destroot}${prefix}/include/${name}/c++ ${destroot}${prefix}/include/${name}-stdinc/c++
     245            # replace with a symlink to the corresponding libc++ headers
     246            ui_msg "ln -s ${prefix}/libexec/llvm-${cdv}/include/c++/v1 ${destroot}${prefix}/include/${name}/c++"
     247            ln -s ${prefix}/libexec/llvm-${cdv}/include/c++/v1 ${destroot}${prefix}/include/${name}/c++
     248        }
     249    }
    229250}
    230251
    231252select.group        gcc