--- llvm-3.4.ebuild 2014-03-02 18:02:16.000000000 +0100 +++ llvm-3.4.ebuild1 2014-03-02 18:02:16.000000000 +0100 @@ -171,6 +171,10 @@ epatch "${FILESDIR}"/clang-3.4-gentoo-install.patch fi + if [[ ${CHOST} == *-darwin* ]] ; then + epatch "${FILESDIR}"/llvm-3.4-fix_darwin_build.patch + fi + local sub_files=( Makefile.config.in Makefile.rules @@ -210,6 +214,11 @@ $(use_enable libffi) ) + # Setup the search path to include the Prefix includes + if use prefix ; then + conf_flags+=( --with-c-include-dirs=${EPREFIX}/usr/include:/usr/include ) + fi + if use clang; then conf_flags+=( --with-clang-resource-dir=../lib/clang/${PV} ) fi @@ -462,6 +471,10 @@ "${f}" eend $? done + for f in "${ED}"/usr/lib/clang/${libpv}/lib/darwin/libclang_rt.asan_{iossim,osx}_dynamic.dylib ; do + odylib="${f#$ED/}" + install_name_tool -id "${EPREFIX}/${odylib}" "${f}" + done fi }