aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlayman <layman@localhost>2015-08-24 20:57:42 +0100
committerlayman <layman@localhost>2015-08-29 18:36:10 +0100
commit02ddda07511f808136b170397def65f67e9c6cca (patch)
tree52640766c8fec1e09b7b9e97a93a35f8094d8523 /sci-libs/symengine/symengine-9999.ebuild
parentsci-libs/arrayfire: Partitial fix for bug #463: Use system boost-compute (diff)
downloadsci-02ddda07511f808136b170397def65f67e9c6cca.tar.gz
sci-02ddda07511f808136b170397def65f67e9c6cca.tar.bz2
sci-02ddda07511f808136b170397def65f67e9c6cca.zip
sci-libs/symengine: add sympy-symengine
Package-Manager: portage-2.2.20-prefix
Diffstat (limited to 'sci-libs/symengine/symengine-9999.ebuild')
-rw-r--r--sci-libs/symengine/symengine-9999.ebuild63
1 files changed, 63 insertions, 0 deletions
diff --git a/sci-libs/symengine/symengine-9999.ebuild b/sci-libs/symengine/symengine-9999.ebuild
new file mode 100644
index 000000000..29497165a
--- /dev/null
+++ b/sci-libs/symengine/symengine-9999.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit git-r3 cmake-utils python-single-r1
+
+DESCRIPTION="Fast symbolic manipulation library, written in C++"
+HOMEPAGE="https://github.com/sympy/symengine"
+SRC_URI=""
+EGIT_REPO_URI="https://github.com/sympy/symengine.git"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="boost openmp python threads"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+RDEPEND="
+ dev-libs/jemalloc
+ boost? ( dev-libs/boost )
+ python? ( dev-python/numpy[${PYTHON_USEDEP}] )"
+DEPEND="${RDEPEND}
+ openmp? ( sys-cluster/openmpi )
+ python? (
+ dev-python/cython[${PYTHON_USEDEP}]
+ dev-python/setuptools[${PYTHON_USEDEP}] )"
+
+
+CMAKE_BUILD_TYPE=Release
+
+pkg_pretend() {
+ if [[ ${MERGE_TYPE} != binary ]]; then
+ if use openmp; 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
+ 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
+}