summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2017-08-12 23:17:26 +0200
committerMichał Górny <mgorny@gentoo.org>2017-08-12 23:21:31 +0200
commit0dba7297ff8329a32385468d55de263db58aa2fb (patch)
tree218630db4b508e9b0b515f4cc10856f777c13841 /dev-libs/libclc
parentdev-util/creduce: Require an LLVM slot with clang installed (diff)
downloadgentoo-0dba7297ff8329a32385468d55de263db58aa2fb.tar.gz
gentoo-0dba7297ff8329a32385468d55de263db58aa2fb.tar.bz2
gentoo-0dba7297ff8329a32385468d55de263db58aa2fb.zip
dev-libs/libclc: Use llvm.eclass to obtain correct llvm-config path
Use the newly-introduced llvm.eclass API to obtain the correct path for the newest LLVM slot including clang, to fix the issue when first-level 'clang' on PATH comes from a compiler wrapper such as ccache. Bug: https://bugs.gentoo.org/624034
Diffstat (limited to 'dev-libs/libclc')
-rw-r--r--dev-libs/libclc/libclc-0.2.0_pre20170118.ebuild17
1 files changed, 11 insertions, 6 deletions
diff --git a/dev-libs/libclc/libclc-0.2.0_pre20170118.ebuild b/dev-libs/libclc/libclc-0.2.0_pre20170118.ebuild
index c0ac06980cb4..39ad522a7e7f 100644
--- a/dev-libs/libclc/libclc-0.2.0_pre20170118.ebuild
+++ b/dev-libs/libclc/libclc-0.2.0_pre20170118.ebuild
@@ -15,7 +15,7 @@ else
GIT_ECLASS="vcs-snapshot"
fi
-inherit python-any-r1 toolchain-funcs ${GIT_ECLASS}
+inherit llvm python-any-r1 toolchain-funcs ${GIT_ECLASS}
DESCRIPTION="OpenCL C library"
HOMEPAGE="http://libclc.llvm.org/"
@@ -38,14 +38,19 @@ RDEPEND="
DEPEND="${RDEPEND}
${PYTHON_DEPS}"
-src_configure() {
- # we need to find llvm with matching clang version, so look for
- # clang first, and then use llvm-config from the same location
- local clang_path=$(type -P clang) || die
+llvm_check_deps() {
+ has_version "sys-devel/clang:${LLVM_SLOT}"
+}
+pkg_setup() {
+ # we do not need llvm_pkg_setup
+ python-any-r1_pkg_setup
+}
+
+src_configure() {
./configure.py \
--with-cxx-compiler="$(tc-getCXX)" \
- --with-llvm-config="${clang_path%/*}/llvm-config" \
+ --with-llvm-config="$(get_llvm_prefix)/bin/llvm-config" \
--prefix="${EPREFIX}/usr" || die
}