aboutsummaryrefslogtreecommitdiff
blob: 68a3a292765e7cb28ef19236583faf10635d3280 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=5

inherit cmake-utils multilib

DESCRIPTION="Intel Concurrent Collections for C++ - Parallelism without the Pain"
HOMEPAGE="https://software.intel.com/en-us/articles/intel-concurrent-collections-for-cc"

if [[ $PV = 9999 ]]; then
	inherit git-r3
	EGIT_REPO_URI="https://github.com/icnc/icnc.git"
	KEYWORDS=
else
	SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
	KEYWORDS="~amd64"
fi

LICENSE="BSD"
SLOT="0"
IUSE="doc examples mpi"

DEPEND="
	>=dev-cpp/tbb-4.2
	sys-libs/glibc
	mpi? ( virtual/mpi )
	"
RDEPEND="${DEPEND}"

src_configure() {
	local mycmakeargs=(
		$(cmake-utils_use mpi BUILD_LIBS_FOR_MPI)
		-DLIB=$(get_libdir)
	)
	cmake-utils_src_configure
}

src_install() {
	cmake-utils_src_install
	if use doc ; then
		insinto /usr/share/doc/${P}/html
		doins -r "${ED}"/usr/doc/api/*
	fi
	rm -r "${ED}"/usr/doc/api || die
	rmdir "${ED}"/usr/doc || die
	if use examples ; then
		insinto /usr/share/${PN}/examples
		doins -r "${ED}"/usr/samples/*
	fi
	rm -r "${ED}"/usr/samples || die
	insinto /usr/share/${PN}/
	doins -r "${ED}"/usr/misc/*
	rm -r "${ED}"/usr/misc/ || die
}