diff options
author | Michał Górny <mgorny@gentoo.org> | 2019-11-01 09:34:42 +0100 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2019-11-01 14:15:47 +0100 |
commit | 1fce7cb316fb77e4361a551643af506cedd2536f (patch) | |
tree | 490f07ecc03833464ad84144e7180d5009bd13a1 /sys-devel | |
parent | sys-devel/clang-common: Switch live to monorepo (diff) | |
download | gentoo-1fce7cb316fb77e4361a551643af506cedd2536f.tar.gz gentoo-1fce7cb316fb77e4361a551643af506cedd2536f.tar.bz2 gentoo-1fce7cb316fb77e4361a551643af506cedd2536f.zip |
sys-devel/clang: Switch live to monorepo
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'sys-devel')
-rw-r--r-- | sys-devel/clang/clang-10.0.0.9999.ebuild | 36 | ||||
-rw-r--r-- | 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)")}" ) |