From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-957819-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 51DE0139694
	for <garchives@archives.gentoo.org>; Mon, 26 Jun 2017 21:35:23 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 6C2C5E0C3D;
	Mon, 26 Jun 2017 21:35:22 +0000 (UTC)
Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 4409EE0C3D
	for <gentoo-commits@lists.gentoo.org>; Mon, 26 Jun 2017 21:35:22 +0000 (UTC)
Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 355DF33BE1A
	for <gentoo-commits@lists.gentoo.org>; Mon, 26 Jun 2017 21:35:21 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 9EBD4747C
	for <gentoo-commits@lists.gentoo.org>; Mon, 26 Jun 2017 21:35:19 +0000 (UTC)
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" <mgorny@gentoo.org>
Message-ID: <1498512914.2b646d380fc697aeaa6279e22163f7fdb3fea9c2.mgorny@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/libclc/
X-VCS-Repository: repo/gentoo
X-VCS-Files: dev-libs/libclc/libclc-0.2.0_pre20170118.ebuild
X-VCS-Directories: dev-libs/libclc/
X-VCS-Committer: mgorny
X-VCS-Committer-Name: Michał Górny
X-VCS-Revision: 2b646d380fc697aeaa6279e22163f7fdb3fea9c2
X-VCS-Branch: master
Date: Mon, 26 Jun 2017 21:35:19 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Archives-Salt: 031f1128-8038-46eb-83d7-6a83ca9765ef
X-Archives-Hash: 42a1b3e9eb986f8685832f48c0846555

commit:     2b646d380fc697aeaa6279e22163f7fdb3fea9c2
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 26 21:27:57 2017 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Jun 26 21:35:14 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2b646d38

dev-libs/libclc: Fix possible llvm/clang slot mismatch, #615754

Ensure that the LLVM slot with matching clang version is always used.
Otherwise, if you have a newer LLVM slot without clang, and an older
slot with clang, libclc got paths from the newer llvm-config and was
unable to find clang. Now the ebuild finds clang first, and uses
the llvm-config installed alongside it.

 dev-libs/libclc/libclc-0.2.0_pre20170118.ebuild | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/dev-libs/libclc/libclc-0.2.0_pre20170118.ebuild b/dev-libs/libclc/libclc-0.2.0_pre20170118.ebuild
index 7243a9d9279..c0ac06980cb 100644
--- a/dev-libs/libclc/libclc-0.2.0_pre20170118.ebuild
+++ b/dev-libs/libclc/libclc-0.2.0_pre20170118.ebuild
@@ -39,9 +39,13 @@ 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
+
 	./configure.py \
 		--with-cxx-compiler="$(tc-getCXX)" \
-		--with-llvm-config="$(type -P llvm-config)" \
+		--with-llvm-config="${clang_path%/*}/llvm-config" \
 		--prefix="${EPREFIX}/usr" || die
 }