Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] [PATCHES] llvm.eclass: More flexible slot testing and fix to /usr/bin PATH prepending
Date: Fri, 30 Jun 2017 21:35:20
Message-Id: 20170630213431.17767-1-mgorny@gentoo.org
1 Hi,
2
3 Here's a quick batch of patches to llvm.eclass that aims to solve two
4 problems.
5
6 The first two patches (and the package example following the patch set)
7 redesign the slot testing mechanism to allow llvm_check_deps() function
8 (alike python_check_deps() in python-any-r1). It can be used to redefine
9 how the eclass checks whether the specific LLVM slot is acceptable.
10
11 For example, if you define:
12
13 llvm_check_deps() { has_version "sys-devel/clang:${LLVM_SLOT}"; }
14
15 then it will only consider the slots which have clang installed. You can
16 also use it to check USE dependencies. This way we can write ebuilds
17 that can handle the case when user has multiple LLVM slots installed
18 in different configurations. This is bug #622782 [1], solved in a bit
19 more generic way.
20
21 The third patch ensures that only /usr/lib/llvm/* paths are prepended to
22 PATH, and not /usr/bin (for slot 0). The latter is unnecessary
23 and breaks other prepends, e.g. distcc/ccache. This is bug #622866 [2].
24
25 Please review. TIA.
26
27 [1]:https://bugs.gentoo.org/show_bug.cgi?id=622782
28 [2]:https://bugs.gentoo.org/show_bug.cgi?id=622866
29
30 --
31 Best regards,
32 Michał Górny

Replies