1 |
commit: 5f1ecd4057c3a95c74b4a6729abf207246f1ffd7 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Apr 22 11:13:02 2021 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Apr 22 11:21:38 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5f1ecd40 |
7 |
|
8 |
sys-devel/clang: Switch to patchsets |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
sys-devel/clang/Manifest | 6 +- |
13 |
sys-devel/clang/clang-10.0.1.ebuild | 10 +- |
14 |
sys-devel/clang/clang-11.0.0.ebuild | 7 +- |
15 |
sys-devel/clang/clang-11.0.1.ebuild | 5 +- |
16 |
sys-devel/clang/clang-11.1.0.ebuild | 5 +- |
17 |
sys-devel/clang/clang-12.0.0-r1.ebuild | 6 +- |
18 |
sys-devel/clang/clang-12.0.0.9999.ebuild | 5 +- |
19 |
sys-devel/clang/clang-13.0.0.9999.ebuild | 5 +- |
20 |
...-linking-c-index-test-to-duplicate-librar.patch | 29 --- |
21 |
sys-devel/clang/files/12.0.0/readd-reporter.patch | 200 --------------------- |
22 |
sys-devel/clang/files/9999/prefix-dirs.patch | 72 -------- |
23 |
11 files changed, 14 insertions(+), 336 deletions(-) |
24 |
|
25 |
diff --git a/sys-devel/clang/Manifest b/sys-devel/clang/Manifest |
26 |
index e71645f0183..57eb19d6fa7 100644 |
27 |
--- a/sys-devel/clang/Manifest |
28 |
+++ b/sys-devel/clang/Manifest |
29 |
@@ -1,9 +1,13 @@ |
30 |
-DIST 10.0.1-0003-clang-tools-extra-Prevent-linking-to-duplicate-.a-li.patch 23184 BLAKE2B 42bfc9401bceea6627703f7611aafe4708e4e745e47e8caa01fb8c7126524ef65e4c135cfd0541bc663bfc52fa8c47342f7f8de462abe283ec353b068d2e3532 SHA512 9561c9ab6dc62257b7626f7898afa667401522817ec57137641f8687549b0b8e531659a5afd5226dd7619126cc67f68235f628cbe639345277415343c4ca3650 |
31 |
DIST llvm-10.0.1-manpages.tar.bz2 180157 BLAKE2B ddf5951c8f5a2a8a80726fd713e6c818c852851a2261e904b484afdb67ac55f2ce10976ca2ca5d81fe2bf4806a72cc7b59f4068741306491a4f39065ca8fb56e SHA512 d3c2470dbd0f3143d64b380f7534ebcacdcf4bc4f140a6014283150007fe615ebd86247cf13b2432165a681614849e8eaab69a8d077f7a51e4e040e28ed33ebc |
32 |
DIST llvm-11.0.0-manpages.tar.bz2 179592 BLAKE2B d03dff5e7426f4c648d6112dee0fa7a91edf41584290c94c3f738fc65fa82fc6ef47b49c245fb0e741bdf267fc64534311194c476ece4b447649ba2250e61430 SHA512 1cf598f50c99a85a35b03398e4768cd1eafec9d602f788d401120adb91b3b59965216ed7102da26b7c2af7e1bbca4bca8f1d43bb687fcd8ed418e2f7076bdce4 |
33 |
DIST llvm-11.0.1-manpages.tar.bz2 180888 BLAKE2B 9d70e83704d77aa5007cc8eb8e667fbb1f4dd3a8df607d0bbf4f3f5049ac04263e6e01bf8da0d212f456a49c90b853485746af68f0a1e2b5f3b704914bd45aaf SHA512 c67df394dd1a94ae632ce55ff1b1aa4cc4aa8b59b17521cd91932c1b44efe90f29e84233a0ebe882d39f54a5b28edf4ef40769e7ecc1a5f1021d64c5f99e33ad |
34 |
DIST llvm-11.1.0-manpages.tar.bz2 191571 BLAKE2B d6f8e1390dd3e6e8bbcd66c0079ef89f2ff3479743499c36ab32f8bc8281631a96113df9a87f6284058365950f4df3c75dacfcc11920fc5ea7ef0233ba842b77 SHA512 2543e519f51cc7ecb51a732c658ec5d35c5225e30a677f24ead75e81fb1ab793a030e79f21d0b702a2cf6ab6da1a2cba839b49a98e1b0a36384e98076ed5c4b1 |
35 |
DIST llvm-12.0.0-manpages.tar.bz2 191228 BLAKE2B 60cc736de2512b9368d55cc8c73e8b537c0fb8f0cb923b0c5c9e5866785013df93efc6cb448c91b7635e856a8d663278a3ba40620a2e4c05c006b6fc5b482b4e SHA512 4a4f55da8da0cb7d4d9281b13168864a3c0b10000b3e750b22b93d9b4f68a2d9a2e1da10c94d27081a0bce9694fa55a9d5e723676f9066393dc8001382d1d6da |
36 |
+DIST llvm-gentoo-patchset-10.0.1-1.tar.xz 8320 BLAKE2B 1b7ea7669586e08fece0efcf02b392feed4b7f3e6e9cdd10ab7dcc30082cae5bb1daa6d3314a7b0329c4d70f3c736d0c57ed408c838601dc737d558d2a0a0f26 SHA512 75898a8d719657177bbf587d848be8e53135c09e50603660c19edab00f80b6c2f29e7b6fda2bef381b38df6e24a690d694029a38c525763408322573275fc9f0 |
37 |
+DIST llvm-gentoo-patchset-11.0.0-1.tar.xz 6100 BLAKE2B 6f8fc9b7daa703f04b1283caaeb3665d4bec56ff80b1c5db35917c578fdd92617222bd2d2b83020144b8abdeaa261142b68aa3dee24350133f6721e41a167b78 SHA512 debdd92e6aa3133f474dfbd79f267e76d9d979e4e5d464c8d4343c6e6816b46376ca8080a9ee916152861907af9d0645ce71cf3582ef3dc31ec4ca3410fde9f6 |
38 |
+DIST llvm-gentoo-patchset-11.1.0-1.tar.xz 4032 BLAKE2B e69138a422e315b31a3d9c11faa4ae1ddf1bf9092cee2db0de4d2adef81fd802973488293aab48b764402b51996893b17ca03249ef4620848a576d1f6cdb9698 SHA512 e1c5504dab6c5db9fdf4addfeb12316f22d0258717ba551a9b7b3ba37919491fb6011ac5cca1e793b7509d5c1c186bc6bc4213f7d6155d190612492b216f979b |
39 |
+DIST llvm-gentoo-patchset-12.0.0-1.tar.xz 6364 BLAKE2B bcf96dad8300cdc3e1f416cb90935ae3b1359efc5687118b5a9bbee25de7087a266250f50c6f2abd18f4efeeec19354f59513c8fdd1d61c2cfc8cc2f0115e514 SHA512 76201e169f71a8d568365ffeafcfd37138e74b0536826f47eb6ce89c2280586f10426917e851f99bfb20477cd828cc40daa8cb7a62959981620fbd81e1b22ee1 |
40 |
+DIST llvm-gentoo-patchset-9999-1.tar.xz 4032 BLAKE2B b9413484dafed8ae0c68c2c164b45fd07bb8d5d0898f03abe118fd2120ffcb1fb6c949de9649a97c2e8105f24b9d131a725c67c0a502ca4d4d192c1a0d65f49d SHA512 e64449eeaf756c5bd945109937b84ba4bd8a015222bd792d39cf3947871e87571a4ca57814790e51544cb05ad4c2d1f044e818e4caaac7c2e2a02cb1aa290fcc |
41 |
DIST llvmorg-10.0.1.tar.gz 120880730 BLAKE2B 30f19f56c4d1f6abcda5fec76256219d1e3c8a6ff1a1f152f94bfe362c07884339fe571ff7fe903ed3b3deb150b2fa868c387887a0dea2930dc08b81db71a5b1 SHA512 48078fff9293a87f1a973f3348f79506f04c3da774295f5eb67d74dd2d1aa94f0973f8ced3f4ab9e8339902071f82c603b43d5608ad7227046c4da769c5d2151 |
42 |
DIST llvmorg-11.0.0.tar.gz 122743665 BLAKE2B 3f95570240789fd68ddb747df817f5c6cdc9da40911bbe9ee3531c15ada9165e5002b1c2f778cf8735858485ea05a8754e3d3a5f4b15bdd6cb33d64a14692984 SHA512 b6d38871ccce0e086e27d35e42887618d68e57d8274735c59e3eabc42dee352412489296293f8d5169fe0044936345915ee7da61ebdc64ec10f7737f6ecd90f2 |
43 |
DIST llvmorg-11.0.1.tar.gz 122790338 BLAKE2B 0130996b4a8c4d9f757136fd7fb318068c9bfdc565060dec0d4336480c4ab66c4ae3185a7fdb05f13cf9ee8fd4123b09df938881b75d6e5d3689595114b7e32a SHA512 f5e6ef0b3111aae08a89cd01adb2ff4abfa9ef779c68b9190421d0447efd25c2cc00e5aae9f4764805f5fa31434866043d1510ae7389817e28ae53a5442e2fdf |
44 |
|
45 |
diff --git a/sys-devel/clang/clang-10.0.1.ebuild b/sys-devel/clang/clang-10.0.1.ebuild |
46 |
index a3627a96203..216a296796e 100644 |
47 |
--- a/sys-devel/clang/clang-10.0.1.ebuild |
48 |
+++ b/sys-devel/clang/clang-10.0.1.ebuild |
49 |
@@ -1,4 +1,4 @@ |
50 |
-# Copyright 1999-2020 Gentoo Authors |
51 |
+# Copyright 1999-2021 Gentoo Authors |
52 |
# Distributed under the terms of the GNU General Public License v2 |
53 |
|
54 |
EAPI=7 |
55 |
@@ -9,13 +9,13 @@ inherit cmake llvm llvm.org multilib-minimal pax-utils \ |
56 |
|
57 |
DESCRIPTION="C language family frontend for LLVM" |
58 |
HOMEPAGE="https://llvm.org/" |
59 |
-SRC_URI+=" https://dev.gentoo.org/~juippis/distfiles/tmp/10.0.1-0003-clang-tools-extra-Prevent-linking-to-duplicate-.a-li.patch" |
60 |
LLVM_COMPONENTS=( clang clang-tools-extra ) |
61 |
LLVM_MANPAGES=pregenerated |
62 |
LLVM_TEST_COMPONENTS=( |
63 |
llvm/lib/Testing/Support |
64 |
llvm/utils/{lit,llvm-lit,unittest} |
65 |
) |
66 |
+LLVM_PATCHSET=10.0.1-1 |
67 |
llvm.org_set_globals |
68 |
|
69 |
# Keep in sync with sys-devel/llvm |
70 |
@@ -74,12 +74,6 @@ PDEPEND=" |
71 |
# Therefore: use sys-devel/clang[${MULTILIB_USEDEP}] only if you need |
72 |
# multilib clang* libraries (not runtime, not wrappers). |
73 |
|
74 |
-PATCHES=( |
75 |
- # fix simultaneous linking to .a and dylib |
76 |
- "${DISTDIR}"/10.0.1-0003-clang-tools-extra-Prevent-linking-to-duplicate-.a-li.patch |
77 |
- "${FILESDIR}"/10.0.1/0004-clang-Avoid-linking-c-index-test-to-duplicate-librar.patch |
78 |
-) |
79 |
- |
80 |
pkg_setup() { |
81 |
LLVM_MAX_SLOT=${SLOT} llvm_pkg_setup |
82 |
python-single-r1_pkg_setup |
83 |
|
84 |
diff --git a/sys-devel/clang/clang-11.0.0.ebuild b/sys-devel/clang/clang-11.0.0.ebuild |
85 |
index 6a99b268fe0..ef1644eb8bc 100644 |
86 |
--- a/sys-devel/clang/clang-11.0.0.ebuild |
87 |
+++ b/sys-devel/clang/clang-11.0.0.ebuild |
88 |
@@ -1,4 +1,4 @@ |
89 |
-# Copyright 1999-2020 Gentoo Authors |
90 |
+# Copyright 1999-2021 Gentoo Authors |
91 |
# Distributed under the terms of the GNU General Public License v2 |
92 |
|
93 |
EAPI=7 |
94 |
@@ -16,6 +16,7 @@ LLVM_TEST_COMPONENTS=( |
95 |
llvm/utils/{lit,llvm-lit,unittest} |
96 |
llvm/utils/{UpdateTestChecks,update_cc_test_checks.py} |
97 |
) |
98 |
+LLVM_PATCHSET=11.0.0-1 |
99 |
llvm.org_set_globals |
100 |
|
101 |
# Keep in sync with sys-devel/llvm |
102 |
@@ -75,10 +76,6 @@ PDEPEND=" |
103 |
# Therefore: use sys-devel/clang[${MULTILIB_USEDEP}] only if you need |
104 |
# multilib clang* libraries (not runtime, not wrappers). |
105 |
|
106 |
-PATCHES=( |
107 |
- "${FILESDIR}"/9999/prefix-dirs.patch |
108 |
-) |
109 |
- |
110 |
pkg_setup() { |
111 |
LLVM_MAX_SLOT=${SLOT} llvm_pkg_setup |
112 |
python-single-r1_pkg_setup |
113 |
|
114 |
diff --git a/sys-devel/clang/clang-11.0.1.ebuild b/sys-devel/clang/clang-11.0.1.ebuild |
115 |
index 08342b7bd68..abcafbb6651 100644 |
116 |
--- a/sys-devel/clang/clang-11.0.1.ebuild |
117 |
+++ b/sys-devel/clang/clang-11.0.1.ebuild |
118 |
@@ -63,6 +63,7 @@ LLVM_TEST_COMPONENTS=( |
119 |
llvm/utils/{lit,llvm-lit,unittest} |
120 |
llvm/utils/{UpdateTestChecks,update_cc_test_checks.py} |
121 |
) |
122 |
+LLVM_PATCHSET=11.1.0-1 |
123 |
llvm.org_set_globals |
124 |
|
125 |
# Multilib notes: |
126 |
@@ -76,10 +77,6 @@ llvm.org_set_globals |
127 |
# Therefore: use sys-devel/clang[${MULTILIB_USEDEP}] only if you need |
128 |
# multilib clang* libraries (not runtime, not wrappers). |
129 |
|
130 |
-PATCHES=( |
131 |
- "${FILESDIR}"/9999/prefix-dirs.patch |
132 |
-) |
133 |
- |
134 |
pkg_setup() { |
135 |
LLVM_MAX_SLOT=${SLOT} llvm_pkg_setup |
136 |
python-single-r1_pkg_setup |
137 |
|
138 |
diff --git a/sys-devel/clang/clang-11.1.0.ebuild b/sys-devel/clang/clang-11.1.0.ebuild |
139 |
index 1d53c32e7a4..ba76e14ffdb 100644 |
140 |
--- a/sys-devel/clang/clang-11.1.0.ebuild |
141 |
+++ b/sys-devel/clang/clang-11.1.0.ebuild |
142 |
@@ -63,6 +63,7 @@ LLVM_TEST_COMPONENTS=( |
143 |
llvm/utils/{lit,llvm-lit,unittest} |
144 |
llvm/utils/{UpdateTestChecks,update_cc_test_checks.py} |
145 |
) |
146 |
+LLVM_PATCHSET=11.1.0-1 |
147 |
llvm.org_set_globals |
148 |
|
149 |
# Multilib notes: |
150 |
@@ -76,10 +77,6 @@ llvm.org_set_globals |
151 |
# Therefore: use sys-devel/clang[${MULTILIB_USEDEP}] only if you need |
152 |
# multilib clang* libraries (not runtime, not wrappers). |
153 |
|
154 |
-PATCHES=( |
155 |
- "${FILESDIR}"/9999/prefix-dirs.patch |
156 |
-) |
157 |
- |
158 |
pkg_setup() { |
159 |
LLVM_MAX_SLOT=${SLOT%/*} llvm_pkg_setup |
160 |
python-single-r1_pkg_setup |
161 |
|
162 |
diff --git a/sys-devel/clang/clang-12.0.0-r1.ebuild b/sys-devel/clang/clang-12.0.0-r1.ebuild |
163 |
index 100f9a26b26..c6dfa3e4fb4 100644 |
164 |
--- a/sys-devel/clang/clang-12.0.0-r1.ebuild |
165 |
+++ b/sys-devel/clang/clang-12.0.0-r1.ebuild |
166 |
@@ -63,6 +63,7 @@ LLVM_TEST_COMPONENTS=( |
167 |
llvm/utils/{lit,llvm-lit,unittest} |
168 |
llvm/utils/{UpdateTestChecks,update_cc_test_checks.py} |
169 |
) |
170 |
+LLVM_PATCHSET=12.0.0-1 |
171 |
llvm.org_set_globals |
172 |
|
173 |
# Multilib notes: |
174 |
@@ -76,11 +77,6 @@ llvm.org_set_globals |
175 |
# Therefore: use sys-devel/clang[${MULTILIB_USEDEP}] only if you need |
176 |
# multilib clang* libraries (not runtime, not wrappers). |
177 |
|
178 |
-PATCHES=( |
179 |
- "${FILESDIR}"/12.0.0/readd-reporter.patch |
180 |
- "${FILESDIR}"/9999/prefix-dirs.patch |
181 |
-) |
182 |
- |
183 |
pkg_setup() { |
184 |
LLVM_MAX_SLOT=${SLOT} llvm_pkg_setup |
185 |
python-single-r1_pkg_setup |
186 |
|
187 |
diff --git a/sys-devel/clang/clang-12.0.0.9999.ebuild b/sys-devel/clang/clang-12.0.0.9999.ebuild |
188 |
index bd58b0be005..74d03d6bde4 100644 |
189 |
--- a/sys-devel/clang/clang-12.0.0.9999.ebuild |
190 |
+++ b/sys-devel/clang/clang-12.0.0.9999.ebuild |
191 |
@@ -63,6 +63,7 @@ LLVM_TEST_COMPONENTS=( |
192 |
llvm/utils/{lit,llvm-lit,unittest} |
193 |
llvm/utils/{UpdateTestChecks,update_cc_test_checks.py} |
194 |
) |
195 |
+LLVM_PATCHSET=9999-1 |
196 |
llvm.org_set_globals |
197 |
|
198 |
# Multilib notes: |
199 |
@@ -76,10 +77,6 @@ llvm.org_set_globals |
200 |
# Therefore: use sys-devel/clang[${MULTILIB_USEDEP}] only if you need |
201 |
# multilib clang* libraries (not runtime, not wrappers). |
202 |
|
203 |
-PATCHES=( |
204 |
- "${FILESDIR}"/9999/prefix-dirs.patch |
205 |
-) |
206 |
- |
207 |
pkg_setup() { |
208 |
LLVM_MAX_SLOT=${SLOT} llvm_pkg_setup |
209 |
python-single-r1_pkg_setup |
210 |
|
211 |
diff --git a/sys-devel/clang/clang-13.0.0.9999.ebuild b/sys-devel/clang/clang-13.0.0.9999.ebuild |
212 |
index bd58b0be005..74d03d6bde4 100644 |
213 |
--- a/sys-devel/clang/clang-13.0.0.9999.ebuild |
214 |
+++ b/sys-devel/clang/clang-13.0.0.9999.ebuild |
215 |
@@ -63,6 +63,7 @@ LLVM_TEST_COMPONENTS=( |
216 |
llvm/utils/{lit,llvm-lit,unittest} |
217 |
llvm/utils/{UpdateTestChecks,update_cc_test_checks.py} |
218 |
) |
219 |
+LLVM_PATCHSET=9999-1 |
220 |
llvm.org_set_globals |
221 |
|
222 |
# Multilib notes: |
223 |
@@ -76,10 +77,6 @@ llvm.org_set_globals |
224 |
# Therefore: use sys-devel/clang[${MULTILIB_USEDEP}] only if you need |
225 |
# multilib clang* libraries (not runtime, not wrappers). |
226 |
|
227 |
-PATCHES=( |
228 |
- "${FILESDIR}"/9999/prefix-dirs.patch |
229 |
-) |
230 |
- |
231 |
pkg_setup() { |
232 |
LLVM_MAX_SLOT=${SLOT} llvm_pkg_setup |
233 |
python-single-r1_pkg_setup |
234 |
|
235 |
diff --git a/sys-devel/clang/files/10.0.1/0004-clang-Avoid-linking-c-index-test-to-duplicate-librar.patch b/sys-devel/clang/files/10.0.1/0004-clang-Avoid-linking-c-index-test-to-duplicate-librar.patch |
236 |
deleted file mode 100644 |
237 |
index 74b569ca411..00000000000 |
238 |
--- a/sys-devel/clang/files/10.0.1/0004-clang-Avoid-linking-c-index-test-to-duplicate-librar.patch |
239 |
+++ /dev/null |
240 |
@@ -1,29 +0,0 @@ |
241 |
-From e0df57328dd084d38ea4aac0cfb129fc320eae3f Mon Sep 17 00:00:00 2001 |
242 |
-From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@g.o> |
243 |
-Date: Fri, 19 Jun 2020 17:00:12 +0200 |
244 |
-Subject: [PATCH 4/4] [clang] Avoid linking c-index-test to duplicate libraries |
245 |
- |
246 |
-Use clang_target_link_libraries() to link libraries included |
247 |
-in clang-cpp.so to avoid simultaneously linking to it and to split |
248 |
-static libraries. This prevents units from being included twice. |
249 |
---- |
250 |
- clang/tools/c-index-test/CMakeLists.txt | 3 +++ |
251 |
- 1 file changed, 3 insertions(+) |
252 |
- |
253 |
-diff --git a/clang/tools/c-index-test/CMakeLists.txt b/clang/tools/c-index-test/CMakeLists.txt |
254 |
-index ceef4b08637..d83d1091936 100644 |
255 |
---- a/clang/tools/c-index-test/CMakeLists.txt |
256 |
-+++ b/clang/tools/c-index-test/CMakeLists.txt |
257 |
-@@ -25,6 +25,9 @@ else() |
258 |
- target_link_libraries(c-index-test |
259 |
- PRIVATE |
260 |
- libclang |
261 |
-+ ) |
262 |
-+ clang_target_link_libraries(c-index-test |
263 |
-+ PRIVATE |
264 |
- clangAST |
265 |
- clangBasic |
266 |
- clangCodeGen |
267 |
--- |
268 |
-2.27.0 |
269 |
- |
270 |
|
271 |
diff --git a/sys-devel/clang/files/12.0.0/readd-reporter.patch b/sys-devel/clang/files/12.0.0/readd-reporter.patch |
272 |
deleted file mode 100644 |
273 |
index 5f3f1646943..00000000000 |
274 |
--- a/sys-devel/clang/files/12.0.0/readd-reporter.patch |
275 |
+++ /dev/null |
276 |
@@ -1,200 +0,0 @@ |
277 |
-diff --git a/clang/tools/scan-view/CMakeLists.txt b/clang/tools/scan-view/CMakeLists.txt |
278 |
---- a/clang/tools/scan-view/CMakeLists.txt |
279 |
-+++ b/clang/tools/scan-view/CMakeLists.txt |
280 |
-@@ -5,6 +5,7 @@ |
281 |
- |
282 |
- set(ShareFiles |
283 |
- ScanView.py |
284 |
-+ Reporter.py |
285 |
- startfile.py |
286 |
- bugcatcher.ico) |
287 |
- |
288 |
-diff --git a/clang/tools/scan-view/share/Reporter.py b/clang/tools/scan-view/share/Reporter.py |
289 |
-new file mode 100644 |
290 |
---- /dev/null |
291 |
-+++ b/clang/tools/scan-view/share/Reporter.py |
292 |
-@@ -0,0 +1,183 @@ |
293 |
-+#!/usr/bin/env python |
294 |
-+# -*- coding: utf-8 -*- |
295 |
-+ |
296 |
-+"""Methods for reporting bugs.""" |
297 |
-+ |
298 |
-+import subprocess, sys, os |
299 |
-+ |
300 |
-+__all__ = ['ReportFailure', 'BugReport', 'getReporters'] |
301 |
-+ |
302 |
-+# |
303 |
-+ |
304 |
-+class ReportFailure(Exception): |
305 |
-+ """Generic exception for failures in bug reporting.""" |
306 |
-+ def __init__(self, value): |
307 |
-+ self.value = value |
308 |
-+ |
309 |
-+# Collect information about a bug. |
310 |
-+ |
311 |
-+class BugReport(object): |
312 |
-+ def __init__(self, title, description, files): |
313 |
-+ self.title = title |
314 |
-+ self.description = description |
315 |
-+ self.files = files |
316 |
-+ |
317 |
-+# Reporter interfaces. |
318 |
-+ |
319 |
-+import os |
320 |
-+ |
321 |
-+import email, mimetypes, smtplib |
322 |
-+from email import encoders |
323 |
-+from email.message import Message |
324 |
-+from email.mime.base import MIMEBase |
325 |
-+from email.mime.multipart import MIMEMultipart |
326 |
-+from email.mime.text import MIMEText |
327 |
-+ |
328 |
-+#===------------------------------------------------------------------------===# |
329 |
-+# ReporterParameter |
330 |
-+#===------------------------------------------------------------------------===# |
331 |
-+ |
332 |
-+class ReporterParameter(object): |
333 |
-+ def __init__(self, n): |
334 |
-+ self.name = n |
335 |
-+ def getName(self): |
336 |
-+ return self.name |
337 |
-+ def getValue(self,r,bugtype,getConfigOption): |
338 |
-+ return getConfigOption(r.getName(),self.getName()) |
339 |
-+ def saveConfigValue(self): |
340 |
-+ return True |
341 |
-+ |
342 |
-+class TextParameter (ReporterParameter): |
343 |
-+ def getHTML(self,r,bugtype,getConfigOption): |
344 |
-+ return """\ |
345 |
-+<tr> |
346 |
-+<td class="form_clabel">%s:</td> |
347 |
-+<td class="form_value"><input type="text" name="%s_%s" value="%s"></td> |
348 |
-+</tr>"""%(self.getName(),r.getName(),self.getName(),self.getValue(r,bugtype,getConfigOption)) |
349 |
-+ |
350 |
-+class SelectionParameter (ReporterParameter): |
351 |
-+ def __init__(self, n, values): |
352 |
-+ ReporterParameter.__init__(self,n) |
353 |
-+ self.values = values |
354 |
-+ |
355 |
-+ def getHTML(self,r,bugtype,getConfigOption): |
356 |
-+ default = self.getValue(r,bugtype,getConfigOption) |
357 |
-+ return """\ |
358 |
-+<tr> |
359 |
-+<td class="form_clabel">%s:</td><td class="form_value"><select name="%s_%s"> |
360 |
-+%s |
361 |
-+</select></td>"""%(self.getName(),r.getName(),self.getName(),'\n'.join(["""\ |
362 |
-+<option value="%s"%s>%s</option>"""%(o[0], |
363 |
-+ o[0] == default and ' selected="selected"' or '', |
364 |
-+ o[1]) for o in self.values])) |
365 |
-+ |
366 |
-+#===------------------------------------------------------------------------===# |
367 |
-+# Reporters |
368 |
-+#===------------------------------------------------------------------------===# |
369 |
-+ |
370 |
-+class EmailReporter(object): |
371 |
-+ def getName(self): |
372 |
-+ return 'Email' |
373 |
-+ |
374 |
-+ def getParameters(self): |
375 |
-+ return [TextParameter(x) for x in ['To', 'From', 'SMTP Server', 'SMTP Port']] |
376 |
-+ |
377 |
-+ # Lifted from python email module examples. |
378 |
-+ def attachFile(self, outer, path): |
379 |
-+ # Guess the content type based on the file's extension. Encoding |
380 |
-+ # will be ignored, although we should check for simple things like |
381 |
-+ # gzip'd or compressed files. |
382 |
-+ ctype, encoding = mimetypes.guess_type(path) |
383 |
-+ if ctype is None or encoding is not None: |
384 |
-+ # No guess could be made, or the file is encoded (compressed), so |
385 |
-+ # use a generic bag-of-bits type. |
386 |
-+ ctype = 'application/octet-stream' |
387 |
-+ maintype, subtype = ctype.split('/', 1) |
388 |
-+ if maintype == 'text': |
389 |
-+ fp = open(path) |
390 |
-+ # Note: we should handle calculating the charset |
391 |
-+ msg = MIMEText(fp.read(), _subtype=subtype) |
392 |
-+ fp.close() |
393 |
-+ else: |
394 |
-+ fp = open(path, 'rb') |
395 |
-+ msg = MIMEBase(maintype, subtype) |
396 |
-+ msg.set_payload(fp.read()) |
397 |
-+ fp.close() |
398 |
-+ # Encode the payload using Base64 |
399 |
-+ encoders.encode_base64(msg) |
400 |
-+ # Set the filename parameter |
401 |
-+ msg.add_header('Content-Disposition', 'attachment', filename=os.path.basename(path)) |
402 |
-+ outer.attach(msg) |
403 |
-+ |
404 |
-+ def fileReport(self, report, parameters): |
405 |
-+ mainMsg = """\ |
406 |
-+BUG REPORT |
407 |
-+--- |
408 |
-+Title: %s |
409 |
-+Description: %s |
410 |
-+"""%(report.title, report.description) |
411 |
-+ |
412 |
-+ if not parameters.get('To'): |
413 |
-+ raise ReportFailure('No "To" address specified.') |
414 |
-+ if not parameters.get('From'): |
415 |
-+ raise ReportFailure('No "From" address specified.') |
416 |
-+ |
417 |
-+ msg = MIMEMultipart() |
418 |
-+ msg['Subject'] = 'BUG REPORT: %s'%(report.title) |
419 |
-+ # FIXME: Get config parameters |
420 |
-+ msg['To'] = parameters.get('To') |
421 |
-+ msg['From'] = parameters.get('From') |
422 |
-+ msg.preamble = mainMsg |
423 |
-+ |
424 |
-+ msg.attach(MIMEText(mainMsg, _subtype='text/plain')) |
425 |
-+ for file in report.files: |
426 |
-+ self.attachFile(msg, file) |
427 |
-+ |
428 |
-+ try: |
429 |
-+ s = smtplib.SMTP(host=parameters.get('SMTP Server'), |
430 |
-+ port=parameters.get('SMTP Port')) |
431 |
-+ s.sendmail(msg['From'], msg['To'], msg.as_string()) |
432 |
-+ s.close() |
433 |
-+ except: |
434 |
-+ raise ReportFailure('Unable to send message via SMTP.') |
435 |
-+ |
436 |
-+ return "Message sent!" |
437 |
-+ |
438 |
-+class BugzillaReporter(object): |
439 |
-+ def getName(self): |
440 |
-+ return 'Bugzilla' |
441 |
-+ |
442 |
-+ def getParameters(self): |
443 |
-+ return [TextParameter(x) for x in ['URL','Product']] |
444 |
-+ |
445 |
-+ def fileReport(self, report, parameters): |
446 |
-+ raise NotImplementedError |
447 |
-+ |
448 |
-+ |
449 |
-+class RadarClassificationParameter(SelectionParameter): |
450 |
-+ def __init__(self): |
451 |
-+ SelectionParameter.__init__(self,"Classification", |
452 |
-+ [['1', 'Security'], ['2', 'Crash/Hang/Data Loss'], |
453 |
-+ ['3', 'Performance'], ['4', 'UI/Usability'], |
454 |
-+ ['6', 'Serious Bug'], ['7', 'Other']]) |
455 |
-+ |
456 |
-+ def saveConfigValue(self): |
457 |
-+ return False |
458 |
-+ |
459 |
-+ def getValue(self,r,bugtype,getConfigOption): |
460 |
-+ if bugtype.find("leak") != -1: |
461 |
-+ return '3' |
462 |
-+ elif bugtype.find("dereference") != -1: |
463 |
-+ return '2' |
464 |
-+ elif bugtype.find("missing ivar release") != -1: |
465 |
-+ return '3' |
466 |
-+ else: |
467 |
-+ return '7' |
468 |
-+ |
469 |
-+### |
470 |
-+ |
471 |
-+def getReporters(): |
472 |
-+ reporters = [] |
473 |
-+ reporters.append(EmailReporter()) |
474 |
-+ return reporters |
475 |
-+ |
476 |
- |
477 |
|
478 |
diff --git a/sys-devel/clang/files/9999/prefix-dirs.patch b/sys-devel/clang/files/9999/prefix-dirs.patch |
479 |
deleted file mode 100644 |
480 |
index d8d79b8fb51..00000000000 |
481 |
--- a/sys-devel/clang/files/9999/prefix-dirs.patch |
482 |
+++ /dev/null |
483 |
@@ -1,72 +0,0 @@ |
484 |
-This mirrors cmake-*-prefix-dirs.patch |
485 |
- |
486 |
-It add EPREFIX to search paths for c/cxx headers. |
487 |
-It also adds EPREFIX/MacOSX.sdk to search paths for c and Frameworks. |
488 |
-Assumes that c++ lib and headers will be installed in the prefix. |
489 |
- |
490 |
-Also, a couple of args are populated by inspecting the SDK, |
491 |
-so, default to EPREFIX/MacOSX.sdk when the sysroot is not specified. |
492 |
-(This does NOT set sysroot). |
493 |
- |
494 |
---- a/clang/lib/Frontend/InitHeaderSearch.cpp 2020-11-30 12:53:42.000000000 -0600 |
495 |
-+++ b/clang/lib/Frontend/InitHeaderSearch.cpp 2020-11-30 13:57:52.000000000 -0600 |
496 |
-@@ -445,6 +445,9 @@ |
497 |
- // All header search logic is handled in the Driver for Darwin. |
498 |
- if (triple.isOSDarwin()) { |
499 |
- if (HSOpts.UseStandardSystemIncludes) { |
500 |
-+ // Add Gentoo Prefix framework dirs first |
501 |
-+ AddPath("@GENTOO_PORTAGE_EPREFIX@/MacOSX.sdk/System/Library/Frameworks", System, true); |
502 |
-+ AddPath("@GENTOO_PORTAGE_EPREFIX@/MacOSX.sdk/Library/Frameworks", System, true); |
503 |
- // Add the default framework include paths on Darwin. |
504 |
- AddPath("/System/Library/Frameworks", System, true); |
505 |
- AddPath("/Library/Frameworks", System, true); |
506 |
---- a/clang/lib/Driver/ToolChains/Darwin.cpp 2020-10-07 05:10:48.000000000 -0500 |
507 |
-+++ b/clang/lib/Driver/ToolChains/Darwin.cpp 2020-11-30 12:57:15.000000000 -0600 |
508 |
-@@ -1737,9 +1737,9 @@ |
509 |
- const ArgList &Args, |
510 |
- const Driver &TheDriver) { |
511 |
- const Arg *A = Args.getLastArg(options::OPT_isysroot); |
512 |
-- if (!A) |
513 |
-- return None; |
514 |
-- StringRef isysroot = A->getValue(); |
515 |
-+ //if (!A) |
516 |
-+ // return None; |
517 |
-+ StringRef isysroot = A ? A->getValue() : "@GENTOO_PORTAGE_EPREFIX@/MacOSX.sdk"; |
518 |
- auto SDKInfoOrErr = driver::parseDarwinSDKInfo(VFS, isysroot); |
519 |
- if (!SDKInfoOrErr) { |
520 |
- llvm::consumeError(SDKInfoOrErr.takeError()); |
521 |
-@@ -1921,13 +1921,14 @@ |
522 |
- return DriverArgs.getLastArgValue(options::OPT_isysroot); |
523 |
- if (!getDriver().SysRoot.empty()) |
524 |
- return getDriver().SysRoot; |
525 |
-- return "/"; |
526 |
-+ return "@GENTOO_PORTAGE_EPREFIX@/"; |
527 |
- } |
528 |
- |
529 |
- void DarwinClang::AddClangSystemIncludeArgs(const llvm::opt::ArgList &DriverArgs, |
530 |
- llvm::opt::ArgStringList &CC1Args) const { |
531 |
- const Driver &D = getDriver(); |
532 |
- |
533 |
-+ // Sysroot is effectively Gentoo EPREFIX when -isysroot/-sysroot is not defined |
534 |
- llvm::StringRef Sysroot = GetHeaderSysroot(DriverArgs); |
535 |
- |
536 |
- bool NoStdInc = DriverArgs.hasArg(options::OPT_nostdinc); |
537 |
-@@ -1969,6 +1970,10 @@ |
538 |
- SmallString<128> P(Sysroot); |
539 |
- llvm::sys::path::append(P, "usr", "include"); |
540 |
- addExternCSystemInclude(DriverArgs, CC1Args, P.str()); |
541 |
-+ // And add <sysroot>/MacOSX.sdk/usr/include. |
542 |
-+ SmallString<128> Psdk(Sysroot); |
543 |
-+ llvm::sys::path::append(Psdk, "MacOSX.sdk", "usr", "include"); |
544 |
-+ addExternCSystemInclude(DriverArgs, CC1Args, Psdk.str()); |
545 |
- } |
546 |
- } |
547 |
- |
548 |
-@@ -2017,6 +2022,7 @@ |
549 |
- DriverArgs.hasArg(options::OPT_nostdincxx)) |
550 |
- return; |
551 |
- |
552 |
-+ // Sysroot is effectively Gentoo EPREFIX when -isysroot/-sysroot is not defined |
553 |
- llvm::StringRef Sysroot = GetHeaderSysroot(DriverArgs); |
554 |
- |
555 |
- switch (GetCXXStdlibType(DriverArgs)) { |