--- a/sys-devel/clang/clang-9999.ebuild +++ b/sys-devel/clang/clang-9999.ebuild @@ -17,6 +17,10 @@ SRC_URI="" EGIT_REPO_URI="https://git.llvm.org/git/clang.git https://github.com/llvm-mirror/clang.git" +clang_tools_extra_EGIT_REPO_URI="https://git.llvm.org/git/clang-tools-extra.git + https://github.com/llvm-mirror/clang-tools-extra.git" +llvm_EGIT_REPO_URI="https://git.llvm.org/git/llvm.git + https://github.com/llvm-mirror/llvm.git" # Keep in sync with sys-devel/llvm ALL_LLVM_EXPERIMENTAL_TARGETS=( AVR Nios2 RISCV WebAssembly ) @@ -86,23 +90,31 @@ mkdir -p x/y || die cd x/y || die - git-r3_fetch "https://git.llvm.org/git/clang-tools-extra.git - https://github.com/llvm-mirror/clang-tools-extra.git" + local livevar clang_tools_extra_REPO_URI clang_REPO_URI llvm_REPO_URI + + livevar=clang_tools_extra_LIVE_REPO + clang_tools_extra_REPO_URI=${!livevar-${clang_tools_extra_EGIT_REPO_URI}} + livevar=clang_LIVE_REPO + clang_REPO_URI=${!livevar-${EGIT_REPO_URI}} + livevar=llvm_LIVE_REPO + llvm_REPO_URI=${!livevar-${llvm_EGIT_REPO_URI}} + + git-r3_fetch "${clang_tools_extra_REPO_URI}" if use test; then # needed for patched gtest - git-r3_fetch "https://git.llvm.org/git/llvm.git - https://github.com/llvm-mirror/llvm.git" + git-r3_fetch "${llvm_REPO_URI}" fi - git-r3_fetch + git-r3_fetch "${clang_REPO_URI}" - git-r3_checkout https://llvm.org/git/clang-tools-extra.git \ + git-r3_checkout "${clang_tools_extra_REPO_URI}" \ "${S}"/tools/extra if use test; then - git-r3_checkout https://llvm.org/git/llvm.git \ + git-r3_checkout "${llvm_REPO_URI}" \ "${WORKDIR}"/llvm '' \ lib/Testing/Support utils/{lit,llvm-lit,unittest} fi - git-r3_checkout "${EGIT_REPO_URI}" "${S}" + + git-r3_checkout "${clang_REPO_URI}" "${S}" } multilib_src_configure() {