blob: 658f6700a4285bb30082aa16af657e49e733ffd1 (
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
57
58
59
|
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
PYTHON_COMPAT=( python2_7 )
inherit cmake-utils python-single-r1
DESCRIPTION="Fast symbolic manipulation library, written in C++"
HOMEPAGE="https://github.com/sympy/symengine"
SRC_URI="https://github.com/sympy/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
IUSE="boost openmp python threads"
REQUIRED_USE="
python? ( ${PYTHON_REQUIRED_USE} )
?? ( openmp threads )"
RDEPEND="
dev-libs/jemalloc
boost? ( dev-libs/boost )
python? ( dev-python/numpy[${PYTHON_USEDEP}] )"
DEPEND="${RDEPEND}
python? (
dev-python/cython[${PYTHON_USEDEP}]
dev-python/setuptools[${PYTHON_USEDEP}] )"
CMAKE_BUILD_TYPE=Release
pkg_pretend() {
if use openmp && [[ ${MERGE_TYPE} != binary ]]; then
if [[ $(tc-getCC) == *gcc ]] && ! tc-has-openmp; then
ewarn "OpenMP is not available in your current selected gcc"
die "need openmp capable gcc"
fi
fi
}
src_configure() {
local mycmakeargs=(
-DCMAKE_INSTALL_PREFIX:PATH="${EPREFIX}"/usr
$(cmake-utils_use_with boost)
$(cmake-utils_use_with openmp)
$(cmake-utils_use_with python)
)
if use threads; then
mycmakeargs+=(
-DWITH_TCMALLOC:BOOL=ON
-DWITH_PTHREAD:BOOL=ON
-DWITH_SYMENGINE_THREAD_SAFE:BOOL=ON
)
fi
cmake-utils_src_configure
}
|