Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/libclc/
Date: Sat, 12 Aug 2017 21:21:39
Message-Id: 1502572891.0dba7297ff8329a32385468d55de263db58aa2fb.mgorny@gentoo
1 commit: 0dba7297ff8329a32385468d55de263db58aa2fb
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sat Aug 12 21:17:26 2017 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sat Aug 12 21:21:31 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0dba7297
7
8 dev-libs/libclc: Use llvm.eclass to obtain correct llvm-config path
9
10 Use the newly-introduced llvm.eclass API to obtain the correct path
11 for the newest LLVM slot including clang, to fix the issue when
12 first-level 'clang' on PATH comes from a compiler wrapper such
13 as ccache.
14
15 Bug: https://bugs.gentoo.org/624034
16
17 dev-libs/libclc/libclc-0.2.0_pre20170118.ebuild | 17 +++++++++++------
18 1 file changed, 11 insertions(+), 6 deletions(-)
19
20 diff --git a/dev-libs/libclc/libclc-0.2.0_pre20170118.ebuild b/dev-libs/libclc/libclc-0.2.0_pre20170118.ebuild
21 index c0ac06980cb..39ad522a7e7 100644
22 --- a/dev-libs/libclc/libclc-0.2.0_pre20170118.ebuild
23 +++ b/dev-libs/libclc/libclc-0.2.0_pre20170118.ebuild
24 @@ -15,7 +15,7 @@ else
25 GIT_ECLASS="vcs-snapshot"
26 fi
27
28 -inherit python-any-r1 toolchain-funcs ${GIT_ECLASS}
29 +inherit llvm python-any-r1 toolchain-funcs ${GIT_ECLASS}
30
31 DESCRIPTION="OpenCL C library"
32 HOMEPAGE="http://libclc.llvm.org/"
33 @@ -38,14 +38,19 @@ RDEPEND="
34 DEPEND="${RDEPEND}
35 ${PYTHON_DEPS}"
36
37 -src_configure() {
38 - # we need to find llvm with matching clang version, so look for
39 - # clang first, and then use llvm-config from the same location
40 - local clang_path=$(type -P clang) || die
41 +llvm_check_deps() {
42 + has_version "sys-devel/clang:${LLVM_SLOT}"
43 +}
44
45 +pkg_setup() {
46 + # we do not need llvm_pkg_setup
47 + python-any-r1_pkg_setup
48 +}
49 +
50 +src_configure() {
51 ./configure.py \
52 --with-cxx-compiler="$(tc-getCXX)" \
53 - --with-llvm-config="${clang_path%/*}/llvm-config" \
54 + --with-llvm-config="$(get_llvm_prefix)/bin/llvm-config" \
55 --prefix="${EPREFIX}/usr" || die
56 }