llvm.eclass: Do not prepend /usr/bin to PATH, #622866
authorMichał Górny <mgorny@gentoo.org>
Fri, 30 Jun 2017 21:27:39 +0000 (23:27 +0200)
committerMichał Górny <mgorny@gentoo.org>
Sat, 12 Aug 2017 21:21:30 +0000 (23:21 +0200)
eclass/llvm.eclass

index fc09a7d9598d7debcb3c59626064259458ea15a5..d9518fe6226668e33474008ff16e4321c6000c62 100644 (file)
@@ -159,7 +159,13 @@ llvm_pkg_setup() {
        debug-print-function ${FUNCNAME} "${@}"
 
        if [[ ${MERGE_TYPE} != binary ]]; then
-               export PATH=$(get_llvm_prefix ${LLVM_MAX_SLOT})/bin:${PATH}
+               local llvm_prefix=$(get_llvm_prefix "${LLVM_MAX_SLOT}")
+
+               # do not prepend /usr/bin, it's not necessary and breaks other
+               # prepends, https://bugs.gentoo.org/622866
+               if [[ ${llvm_prefix} != ${EPREFIX}/usr ]]; then
+                       export PATH=${llvm_prefix}/bin:${PATH}
+               fi
        fi
 }