sys-libs/compiler-rt-sanitizers: Switch live to monorepo
authorMichał Górny <mgorny@gentoo.org>
Fri, 1 Nov 2019 08:34:49 +0000 (09:34 +0100)
committerMichał Górny <mgorny@gentoo.org>
Fri, 1 Nov 2019 13:15:51 +0000 (14:15 +0100)
Signed-off-by: Michał Górny <mgorny@gentoo.org>
sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-10.0.0.9999.ebuild
sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-9.0.1.9999.ebuild

index a2a2f1e49bf974ce2c193795d5383c6989f0906f..0ef9de1da9b2ab253e95b548ae43e42d3a66f3b7 100644 (file)
@@ -14,8 +14,8 @@ inherit check-reqs cmake-utils flag-o-matic git-r3 llvm \
 DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)"
 HOMEPAGE="https://llvm.org/"
 SRC_URI=""
-EGIT_REPO_URI="https://git.llvm.org/git/compiler-rt.git
-       https://github.com/llvm-mirror/compiler-rt.git"
+EGIT_REPO_URI="https://github.com/llvm/llvm-project.git"
+S=${WORKDIR}/${P}/compiler-rt
 
 LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
 SLOT="$(ver_cut 1-3)"
@@ -60,18 +60,10 @@ pkg_setup() {
 }
 
 src_unpack() {
-       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
+       local dirs=( compiler-rt )
+       use test && dirs+=( llvm/lib/Testing/Support llvm/utils/unittest )
        git-r3_fetch
-
-       if use test; then
-               git-r3_checkout https://llvm.org/git/llvm.git \
-                       "${WORKDIR}"/llvm '' utils/unittest
-       fi
-       git-r3_checkout
+       git-r3_checkout '' '' '' "${dirs[@]}"
 }
 
 src_prepare() {
@@ -88,7 +80,7 @@ src_prepare() {
 
 src_configure() {
        # pre-set since we need to pass it to cmake
-       BUILD_DIR=${WORKDIR}/${P}_build
+       BUILD_DIR=${WORKDIR}/${P}/compiler-rt_build
 
        if use clang; then
                local -x CC=${CHOST}-clang
@@ -113,7 +105,7 @@ src_configure() {
        )
        if use test; then
                mycmakeargs+=(
-                       -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
+                       -DLLVM_MAIN_SRC_DIR="${WORKDIR}/${P}/llvm"
                        -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
                        -DLLVM_LIT_ARGS="-vv;-j;${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}"
 
index f147105624d8f036555bf9da22c5d6f484f72b77..ffb67b0bddf61aadbce1bca9fe1330eb3bb90e6d 100644 (file)
@@ -14,9 +14,9 @@ inherit check-reqs cmake-utils flag-o-matic git-r3 llvm \
 DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)"
 HOMEPAGE="https://llvm.org/"
 SRC_URI=""
-EGIT_REPO_URI="https://git.llvm.org/git/compiler-rt.git
-       https://github.com/llvm-mirror/compiler-rt.git"
-EGIT_BRANCH="release_90"
+EGIT_REPO_URI="https://github.com/llvm/llvm-project.git"
+EGIT_BRANCH="release/9.x"
+S=${WORKDIR}/${P}/compiler-rt
 
 LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
 SLOT="$(ver_cut 1-3)"
@@ -61,18 +61,10 @@ pkg_setup() {
 }
 
 src_unpack() {
-       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
+       local dirs=( compiler-rt )
+       use test && dirs+=( llvm/utils/unittest )
        git-r3_fetch
-
-       if use test; then
-               git-r3_checkout https://llvm.org/git/llvm.git \
-                       "${WORKDIR}"/llvm '' utils/unittest
-       fi
-       git-r3_checkout
+       git-r3_checkout '' '' '' "${dirs[@]}"
 }
 
 src_prepare() {
@@ -89,7 +81,7 @@ src_prepare() {
 
 src_configure() {
        # pre-set since we need to pass it to cmake
-       BUILD_DIR=${WORKDIR}/${P}_build
+       BUILD_DIR=${WORKDIR}/${P}/compiler-rt_build
 
        if use clang; then
                local -x CC=${CHOST}-clang
@@ -114,7 +106,7 @@ src_configure() {
        )
        if use test; then
                mycmakeargs+=(
-                       -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
+                       -DLLVM_MAIN_SRC_DIR="${WORKDIR}/${P}/llvm"
                        -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
                        -DLLVM_LIT_ARGS="-vv;-j;${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}"