From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-903925-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 6C4A4138330
	for <garchives@archives.gentoo.org>; Thu, 29 Sep 2016 21:40:15 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id B30B4E081C;
	Thu, 29 Sep 2016 21:40:11 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	(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 98DF5E081C
	for <gentoo-commits@lists.gentoo.org>; Thu, 29 Sep 2016 21:40:11 +0000 (UTC)
Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id E6219340845
	for <gentoo-commits@lists.gentoo.org>; Thu, 29 Sep 2016 21:40:09 +0000 (UTC)
Received: from localhost.localdomain (localhost [127.0.0.1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 8D414248B
	for <gentoo-commits@lists.gentoo.org>; Thu, 29 Sep 2016 21:40:07 +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: <1475185204.de0ea1f1898758a2e5f9973d3c248b800675360c.mgorny@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/libomp/
X-VCS-Repository: repo/gentoo
X-VCS-Files: sys-libs/libomp/libomp-9999.ebuild sys-libs/libomp/metadata.xml
X-VCS-Directories: sys-libs/libomp/
X-VCS-Committer: mgorny
X-VCS-Committer-Name: Michał Górny
X-VCS-Revision: de0ea1f1898758a2e5f9973d3c248b800675360c
X-VCS-Branch: master
Date: Thu, 29 Sep 2016 21:40:07 +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: 79e607ef-1004-4a5e-8e8f-97ef3ec50f82
X-Archives-Hash: 3e87b7b1a2eadddd751a7220bfa47b04

commit:     de0ea1f1898758a2e5f9973d3c248b800675360c
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 29 21:20:05 2016 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Sep 29 21:40:04 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=de0ea1f1

sys-libs/libomp: Add hwloc support

 sys-libs/libomp/libomp-9999.ebuild | 7 +++++--
 sys-libs/libomp/metadata.xml       | 3 +++
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/sys-libs/libomp/libomp-9999.ebuild b/sys-libs/libomp/libomp-9999.ebuild
index 2496f20..c64f840 100644
--- a/sys-libs/libomp/libomp-9999.ebuild
+++ b/sys-libs/libomp/libomp-9999.ebuild
@@ -18,13 +18,15 @@ EGIT_REPO_URI="http://llvm.org/git/openmp.git
 LICENSE="UoI-NCSA"
 SLOT="0"
 KEYWORDS=""
-IUSE="test"
+IUSE="hwloc test"
 
+RDEPEND="hwloc? ( sys-apps/hwloc:0= )"
 # tests:
 # - dev-python/lit provides the test runner
 # - sys-devel/llvm provide test utils (e.g. FileCheck)
 # - sys-devel/clang provides the compiler to run tests
-DEPEND="dev-lang/perl
+DEPEND="${RDEPEND}
+	dev-lang/perl
 	test? (
 		$(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
 		sys-devel/llvm
@@ -43,6 +45,7 @@ multilib_src_configure() {
 	local libdir="$(get_libdir)"
 	local mycmakeargs=(
 		-DLIBOMP_LIBDIR_SUFFIX="${libdir#lib}"
+		-DLIBOMP_USE_HWLOC=$(usex hwloc)
 		# do not install libgomp.so & libiomp5.so aliases
 		-DLIBOMP_INSTALL_ALIASES=OFF
 		# disable unnecessary hack copying stuff back to srcdir

diff --git a/sys-libs/libomp/metadata.xml b/sys-libs/libomp/metadata.xml
index 7e5a689..a6f393e 100644
--- a/sys-libs/libomp/metadata.xml
+++ b/sys-libs/libomp/metadata.xml
@@ -8,5 +8,8 @@
 	<maintainer type="project">
 		<email>llvm@gentoo.org</email>
 	</maintainer>
+	<use>
+		<flag name='hwloc'>Enable CPU affinity support via hwloc</flag>
+	</use>
 	<longdescription>The OpenMP subproject of LLVM is intended to contain all of the components required to build an executing OpenMP program that are outside the compiler itself.</longdescription>
 </pkgmetadata>