1 |
commit: 1fce7cb316fb77e4361a551643af506cedd2536f |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Nov 1 08:34:42 2019 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Nov 1 13:15:47 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1fce7cb3 |
7 |
|
8 |
sys-devel/clang: Switch live to monorepo |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
sys-devel/clang/clang-10.0.0.9999.ebuild | 36 ++++++++++-------------------- |
13 |
sys-devel/clang/clang-9.0.1.9999.ebuild | 38 +++++++++++--------------------- |
14 |
2 files changed, 25 insertions(+), 49 deletions(-) |
15 |
|
16 |
diff --git a/sys-devel/clang/clang-10.0.0.9999.ebuild b/sys-devel/clang/clang-10.0.0.9999.ebuild |
17 |
index aa2c3a2ba5d..7213d45d161 100644 |
18 |
--- a/sys-devel/clang/clang-10.0.0.9999.ebuild |
19 |
+++ b/sys-devel/clang/clang-10.0.0.9999.ebuild |
20 |
@@ -14,11 +14,9 @@ inherit cmake-utils git-r3 llvm multilib-minimal multiprocessing \ |
21 |
DESCRIPTION="C language family frontend for LLVM" |
22 |
HOMEPAGE="https://llvm.org/" |
23 |
SRC_URI="" |
24 |
+EGIT_REPO_URI="https://github.com/llvm/llvm-project.git" |
25 |
# We need extra level of indirection for CLANG_RESOURCE_DIR |
26 |
-S=${WORKDIR}/x/y/${P} |
27 |
- |
28 |
-EGIT_REPO_URI="https://git.llvm.org/git/clang.git |
29 |
- https://github.com/llvm-mirror/clang.git" |
30 |
+S=${WORKDIR}/x/${P}/clang |
31 |
|
32 |
# Keep in sync with sys-devel/llvm |
33 |
ALL_LLVM_EXPERIMENTAL_TARGETS=( ARC AVR ) |
34 |
@@ -82,26 +80,16 @@ pkg_setup() { |
35 |
|
36 |
src_unpack() { |
37 |
# create extra parent dir for CLANG_RESOURCE_DIR |
38 |
- mkdir -p x/y || die |
39 |
- cd x/y || die |
40 |
- |
41 |
- git-r3_fetch "https://git.llvm.org/git/clang-tools-extra.git |
42 |
- https://github.com/llvm-mirror/clang-tools-extra.git" |
43 |
- if use test; then |
44 |
- # needed for patched gtest |
45 |
- git-r3_fetch "https://git.llvm.org/git/llvm.git |
46 |
- https://github.com/llvm-mirror/llvm.git" |
47 |
- fi |
48 |
- git-r3_fetch |
49 |
+ mkdir -p x || die |
50 |
|
51 |
- git-r3_checkout https://llvm.org/git/clang-tools-extra.git \ |
52 |
- "${S}"/tools/extra |
53 |
- if use test; then |
54 |
- git-r3_checkout https://llvm.org/git/llvm.git \ |
55 |
- "${WORKDIR}"/llvm '' \ |
56 |
- lib/Testing/Support utils/{lit,llvm-lit,unittest} |
57 |
- fi |
58 |
- git-r3_checkout "${EGIT_REPO_URI}" "${S}" |
59 |
+ local dirs=( clang clang-tools-extra ) |
60 |
+ use test && dirs+=( |
61 |
+ llvm/lib/Testing/Support llvm/utils/{lit,llvm-lit,unittest} |
62 |
+ ) |
63 |
+ git-r3_fetch |
64 |
+ git-r3_checkout "${EGIT_REPO_URI}" "${WORKDIR}/x/${P}" '' "${dirs[@]}" |
65 |
+ mv "${WORKDIR}/x/${P}/clang-tools-extra" \ |
66 |
+ "${WORKDIR}/x/${P}/clang/tools/extra" || die |
67 |
} |
68 |
|
69 |
check_distribution_components() { |
70 |
@@ -258,7 +246,7 @@ multilib_src_configure() { |
71 |
-DCLANG_ENABLE_STATIC_ANALYZER=$(usex static-analyzer) |
72 |
) |
73 |
use test && mycmakeargs+=( |
74 |
- -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm" |
75 |
+ -DLLVM_MAIN_SRC_DIR="${WORKDIR}/x/${P}/llvm" |
76 |
-DLLVM_LIT_ARGS="-vv;-j;${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}" |
77 |
) |
78 |
|
79 |
|
80 |
diff --git a/sys-devel/clang/clang-9.0.1.9999.ebuild b/sys-devel/clang/clang-9.0.1.9999.ebuild |
81 |
index 848de712e24..788ba009941 100644 |
82 |
--- a/sys-devel/clang/clang-9.0.1.9999.ebuild |
83 |
+++ b/sys-devel/clang/clang-9.0.1.9999.ebuild |
84 |
@@ -14,12 +14,10 @@ inherit cmake-utils git-r3 llvm multilib-minimal multiprocessing \ |
85 |
DESCRIPTION="C language family frontend for LLVM" |
86 |
HOMEPAGE="https://llvm.org/" |
87 |
SRC_URI="" |
88 |
+EGIT_REPO_URI="https://github.com/llvm/llvm-project.git" |
89 |
+EGIT_BRANCH="release/9.x" |
90 |
# We need extra level of indirection for CLANG_RESOURCE_DIR |
91 |
-S=${WORKDIR}/x/y/${P} |
92 |
- |
93 |
-EGIT_REPO_URI="https://git.llvm.org/git/clang.git |
94 |
- https://github.com/llvm-mirror/clang.git" |
95 |
-EGIT_BRANCH="release_90" |
96 |
+S=${WORKDIR}/x/${P}/clang |
97 |
|
98 |
# Keep in sync with sys-devel/llvm |
99 |
ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430 |
100 |
@@ -90,26 +88,16 @@ pkg_setup() { |
101 |
|
102 |
src_unpack() { |
103 |
# create extra parent dir for CLANG_RESOURCE_DIR |
104 |
- mkdir -p x/y || die |
105 |
- cd x/y || die |
106 |
- |
107 |
- git-r3_fetch "https://git.llvm.org/git/clang-tools-extra.git |
108 |
- https://github.com/llvm-mirror/clang-tools-extra.git" |
109 |
- if use test; then |
110 |
- # needed for patched gtest |
111 |
- git-r3_fetch "https://git.llvm.org/git/llvm.git |
112 |
- https://github.com/llvm-mirror/llvm.git" |
113 |
- fi |
114 |
- git-r3_fetch |
115 |
+ mkdir -p x || die |
116 |
|
117 |
- git-r3_checkout https://llvm.org/git/clang-tools-extra.git \ |
118 |
- "${S}"/tools/extra |
119 |
- if use test; then |
120 |
- git-r3_checkout https://llvm.org/git/llvm.git \ |
121 |
- "${WORKDIR}"/llvm '' \ |
122 |
- lib/Testing/Support utils/{lit,llvm-lit,unittest} |
123 |
- fi |
124 |
- git-r3_checkout "${EGIT_REPO_URI}" "${S}" |
125 |
+ local dirs=( clang clang-tools-extra ) |
126 |
+ use test && dirs+=( |
127 |
+ llvm/lib/Testing/Support llvm/utils/{lit,llvm-lit,unittest} |
128 |
+ ) |
129 |
+ git-r3_fetch |
130 |
+ git-r3_checkout "${EGIT_REPO_URI}" "${WORKDIR}/x/${P}" '' "${dirs[@]}" |
131 |
+ mv "${WORKDIR}/x/${P}/clang-tools-extra" \ |
132 |
+ "${WORKDIR}/x/${P}/clang/tools/extra" || die |
133 |
} |
134 |
|
135 |
multilib_src_configure() { |
136 |
@@ -143,7 +131,7 @@ multilib_src_configure() { |
137 |
-DCLANG_ENABLE_STATIC_ANALYZER=$(usex static-analyzer) |
138 |
) |
139 |
use test && mycmakeargs+=( |
140 |
- -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm" |
141 |
+ -DLLVM_MAIN_SRC_DIR="${WORKDIR}/x/${P}/llvm" |
142 |
-DLLVM_LIT_ARGS="-vv;-j;${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}" |
143 |
) |