dev-python/sabyenc: bump 3.3.1
[gentoo.git] / dev-cpp / icnc / icnc-1.0.100.ebuild
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5
6 PYTHON_COMPAT=( python2_7 )
7
8 inherit cmake-utils multilib python-any-r1
9
10 DESCRIPTION="Intel Concurrent Collections for C++ - Parallelism without the Pain"
11 HOMEPAGE="https://software.intel.com/en-us/articles/intel-concurrent-collections-for-cc"
12
13 if [[ $PV = 9999 ]]; then
14         inherit git-r3
15         EGIT_REPO_URI="https://github.com/icnc/icnc.git"
16         KEYWORDS=
17 else
18         SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
19         KEYWORDS="~amd64"
20 fi
21
22 LICENSE="BSD"
23 SLOT="0"
24 IUSE="doc examples mpi test"
25 RESTRICT="test" #currently tests only work if icnc is already installed
26
27 RDEPEND="
28         >=dev-cpp/tbb-4.2
29         sys-libs/glibc
30         mpi? ( virtual/mpi )
31         "
32 DEPEND="
33         ${RDEPEND}
34         doc? ( app-doc/doxygen )
35         test? ( ${PYTHON_DEPS} )
36         "
37
38 src_configure() {
39         local mycmakeargs=(
40                 $(cmake-utils_use mpi BUILD_LIBS_FOR_MPI)
41                 -DLIB=$(get_libdir)
42                 $(cmake-utils_use_find_package doc Doxygen)
43         )
44         cmake-utils_src_configure
45         if use test ; then
46                 mycmakeargs=( -DRUN_DIST=OFF )
47                 CMAKE_USE_DIR="${S}/tests" \
48                         BUILD_DIR="${WORKDIR}/${P}_tests_build" \
49                         cmake-utils_src_configure
50         fi
51 }
52
53 src_compile() {
54         cmake-utils_src_compile
55         use test && BUILD_DIR="${WORKDIR}/${P}_tests_build" cmake-utils_src_compile
56 }
57
58 src_test() {
59         BUILD_DIR="${WORKDIR}/${P}_tests_build" cmake-utils_src_test
60 }
61
62 src_install() {
63         cmake-utils_src_install
64         if use doc ; then
65                 insinto /usr/share/doc/${P}/html
66                 doins -r "${ED}"/usr/doc/api/*
67         fi
68         rm -fr "${ED}"/usr/doc
69         if use examples ; then
70                 insinto /usr/share/${PN}/examples
71                 doins -r "${ED}"/usr/samples/*
72         fi
73         rm -r "${ED}"/usr/samples || die
74         insinto /usr/share/${PN}/
75         doins -r "${ED}"/usr/misc/*
76         rm -r "${ED}"/usr/misc/ || die
77 }