From 1fce7cb316fb77e4361a551643af506cedd2536f Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Fri, 1 Nov 2019 09:34:42 +0100 Subject: sys-devel/clang: Switch live to monorepo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michał Górny --- sys-devel/clang/clang-10.0.0.9999.ebuild | 36 ++++++++++-------------------- sys-devel/clang/clang-9.0.1.9999.ebuild | 38 +++++++++++--------------------- 2 files changed, 25 insertions(+), 49 deletions(-) diff --git a/sys-devel/clang/clang-10.0.0.9999.ebuild b/sys-devel/clang/clang-10.0.0.9999.ebuild index aa2c3a2ba5d8..7213d45d1617 100644 --- a/sys-devel/clang/clang-10.0.0.9999.ebuild +++ b/sys-devel/clang/clang-10.0.0.9999.ebuild @@ -14,11 +14,9 @@ inherit cmake-utils git-r3 llvm multilib-minimal multiprocessing \ DESCRIPTION="C language family frontend for LLVM" HOMEPAGE="https://llvm.org/" SRC_URI="" +EGIT_REPO_URI="https://github.com/llvm/llvm-project.git" # We need extra level of indirection for CLANG_RESOURCE_DIR -S=${WORKDIR}/x/y/${P} - -EGIT_REPO_URI="https://git.llvm.org/git/clang.git - https://github.com/llvm-mirror/clang.git" +S=${WORKDIR}/x/${P}/clang # Keep in sync with sys-devel/llvm ALL_LLVM_EXPERIMENTAL_TARGETS=( ARC AVR ) @@ -82,26 +80,16 @@ pkg_setup() { src_unpack() { # create extra parent dir for CLANG_RESOURCE_DIR - 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" - 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" - fi - git-r3_fetch + mkdir -p x || die - git-r3_checkout https://llvm.org/git/clang-tools-extra.git \ - "${S}"/tools/extra - if use test; then - git-r3_checkout https://llvm.org/git/llvm.git \ - "${WORKDIR}"/llvm '' \ - lib/Testing/Support utils/{lit,llvm-lit,unittest} - fi - git-r3_checkout "${EGIT_REPO_URI}" "${S}" + local dirs=( clang clang-tools-extra ) + use test && dirs+=( + llvm/lib/Testing/Support llvm/utils/{lit,llvm-lit,unittest} + ) + git-r3_fetch + git-r3_checkout "${EGIT_REPO_URI}" "${WORKDIR}/x/${P}" '' "${dirs[@]}" + mv "${WORKDIR}/x/${P}/clang-tools-extra" \ + "${WORKDIR}/x/${P}/clang/tools/extra" || die } check_distribution_components() { @@ -258,7 +246,7 @@ multilib_src_configure() { -DCLANG_ENABLE_STATIC_ANALYZER=$(usex static-analyzer) ) use test && mycmakeargs+=( - -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm" + -DLLVM_MAIN_SRC_DIR="${WORKDIR}/x/${P}/llvm" -DLLVM_LIT_ARGS="-vv;-j;${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}" ) diff --git a/sys-devel/clang/clang-9.0.1.9999.ebuild b/sys-devel/clang/clang-9.0.1.9999.ebuild index 848de712e241..788ba009941a 100644 --- a/sys-devel/clang/clang-9.0.1.9999.ebuild +++ b/sys-devel/clang/clang-9.0.1.9999.ebuild @@ -14,12 +14,10 @@ inherit cmake-utils git-r3 llvm multilib-minimal multiprocessing \ DESCRIPTION="C language family frontend for LLVM" HOMEPAGE="https://llvm.org/" SRC_URI="" +EGIT_REPO_URI="https://github.com/llvm/llvm-project.git" +EGIT_BRANCH="release/9.x" # We need extra level of indirection for CLANG_RESOURCE_DIR -S=${WORKDIR}/x/y/${P} - -EGIT_REPO_URI="https://git.llvm.org/git/clang.git - https://github.com/llvm-mirror/clang.git" -EGIT_BRANCH="release_90" +S=${WORKDIR}/x/${P}/clang # Keep in sync with sys-devel/llvm ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430 @@ -90,26 +88,16 @@ pkg_setup() { src_unpack() { # create extra parent dir for CLANG_RESOURCE_DIR - 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" - 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" - fi - git-r3_fetch + mkdir -p x || die - git-r3_checkout https://llvm.org/git/clang-tools-extra.git \ - "${S}"/tools/extra - if use test; then - git-r3_checkout https://llvm.org/git/llvm.git \ - "${WORKDIR}"/llvm '' \ - lib/Testing/Support utils/{lit,llvm-lit,unittest} - fi - git-r3_checkout "${EGIT_REPO_URI}" "${S}" + local dirs=( clang clang-tools-extra ) + use test && dirs+=( + llvm/lib/Testing/Support llvm/utils/{lit,llvm-lit,unittest} + ) + git-r3_fetch + git-r3_checkout "${EGIT_REPO_URI}" "${WORKDIR}/x/${P}" '' "${dirs[@]}" + mv "${WORKDIR}/x/${P}/clang-tools-extra" \ + "${WORKDIR}/x/${P}/clang/tools/extra" || die } multilib_src_configure() { @@ -143,7 +131,7 @@ multilib_src_configure() { -DCLANG_ENABLE_STATIC_ANALYZER=$(usex static-analyzer) ) use test && mycmakeargs+=( - -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm" + -DLLVM_MAIN_SRC_DIR="${WORKDIR}/x/${P}/llvm" -DLLVM_LIT_ARGS="-vv;-j;${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}" ) -- cgit v1.2.3-65-gdbad