1 |
Signed-off-by: Michał Górny <mgorny@g.o> |
2 |
--- |
3 |
eclass/llvm.eclass | 18 +++++------------- |
4 |
1 file changed, 5 insertions(+), 13 deletions(-) |
5 |
|
6 |
diff --git a/eclass/llvm.eclass b/eclass/llvm.eclass |
7 |
index a2da231b035a..4f968dc39f87 100644 |
8 |
--- a/eclass/llvm.eclass |
9 |
+++ b/eclass/llvm.eclass |
10 |
@@ -71,6 +71,10 @@ EXPORT_FUNCTIONS pkg_setup |
11 |
|
12 |
if [[ ! ${_LLVM_ECLASS} ]]; then |
13 |
|
14 |
+# make sure that the versions installing straight into /usr/bin |
15 |
+# are uninstalled |
16 |
+DEPEND="!!sys-devel/llvm:0" |
17 |
+ |
18 |
# @ECLASS-VARIABLE: LLVM_MAX_SLOT |
19 |
# @DEFAULT_UNSET |
20 |
# @DESCRIPTION: |
21 |
@@ -173,13 +177,6 @@ get_llvm_prefix() { |
22 |
die "${FUNCNAME}: invalid max_slot=${max_slot}" |
23 |
fi |
24 |
|
25 |
- # fallback to :0 |
26 |
- # assume it's always <= 4 (the lower max_slot allowed) |
27 |
- if has_version ${hv_switch} "sys-devel/llvm:0"; then |
28 |
- echo "${prefix}/usr" |
29 |
- return |
30 |
- fi |
31 |
- |
32 |
die "No LLVM slot${1:+ <= ${1}} found installed!" |
33 |
} |
34 |
|
35 |
@@ -202,12 +199,7 @@ llvm_pkg_setup() { |
36 |
|
37 |
if [[ ${MERGE_TYPE} != binary ]]; then |
38 |
local llvm_prefix=$(get_llvm_prefix "${LLVM_MAX_SLOT}") |
39 |
- |
40 |
- # do not prepend /usr/bin, it's not necessary and breaks other |
41 |
- # prepends, https://bugs.gentoo.org/622866 |
42 |
- if [[ ${llvm_prefix} != ${EPREFIX}/usr ]]; then |
43 |
- export PATH=${llvm_prefix}/bin:${PATH} |
44 |
- fi |
45 |
+ export PATH=${llvm_prefix}/bin:${PATH} |
46 |
fi |
47 |
} |
48 |
|
49 |
-- |
50 |
2.26.2 |