summaryrefslogtreecommitdiff
blob: 91b8d05c2885a24348b11e9f400c9dfdc39cb3c8 (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
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=6

PYTHON_COMPAT=( python{2_7,3_4,3_5} )
inherit cmake-utils python-single-r1

DESCRIPTION="Boost.Python interface for NumPy"
HOMEPAGE="https://github.com/ndarray/Boost.NumPy"
if [ ${PV} == 9999 ]; then
	inherit git-r3
	EGIT_REPO_URI="git://github.com/ndarray/Boost.NumPy.git \
		https://github.com/ndarray/Boost.NumPy.git"
else
	SRC_URI="https://dev.gentoo.org/~heroxbd/${P}.tar.xz"
fi

LICENSE="Boost-1.0"
SLOT=0
KEYWORDS=""

IUSE="doc examples"

CDEPEND="dev-python/numpy[${PYTHON_USEDEP}]
	dev-libs/boost[python,${PYTHON_USEDEP}]"
DEPEND="${CDEPEND}"
RDEPEND="${CDEPEND}"

src_prepare() {
	# Make sure that new Python ABI names are searched too
	sed -i \
		-e 's/PythonLibsNew/PythonLibs/' \
		-e 's/python3/python/' \
		CMakeLists.txt || die

	cmake-utils_src_prepare
}

src_install() {
	cmake-utils_src_install

	use doc && dodoc -r libs/numpy/doc/*
	use examples && dodoc -r libs/numpy/example
}