Ticket #53194: Portfile.2.diff

File Portfile.2.diff, 1.0 KB (added by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez), 4 years ago)
  • Portfile

    old new  
    431431        }
    432432    }
    433433
     434    variant libstdcxx description {-stdlib=macports-libstdc++ searches for MacPorts libstdc++} {
     435        depends_lib-append port:gcc6
     436
     437        patchfiles-append 9001-macports-libstdcxx.diff
     438
     439        post-patch {
     440            reinplace "s|@@MACPORTS_GCC_INCLUDE_DIR@@|${prefix}/include/gcc6/c++|g" \
     441                ${worksrcpath}/tools/clang/lib/Frontend/InitHeaderSearch.cpp
     442            reinplace "s|@@MACPORTS_HOST_NAME@@|${build_arch}-apple-darwin${os.major}|g" \
     443                ${worksrcpath}/tools/clang/lib/Frontend/InitHeaderSearch.cpp
     444            reinplace "s|@@MACPORTS_libstdc++@@|${prefix}/lib/libgcc/libstdc++.6.dylib|g" \
     445                ${worksrcpath}/tools/clang/lib/Driver/ToolChains.cpp
     446        }
     447    }
     448    default_variants +libstdcxx
     449
    434450    post-patch {
    435451        reinplace "s|@@PREFIX@@|${prefix}|" \
    436452            ${worksrcpath}/tools/clang/lib/Driver/Tools.cpp