aboutsummaryrefslogtreecommitdiff
blob: c547043347768c7864162d5f548c21a42ddce9bf (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
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=5

PYTHON_COMPAT=( python2_7 )

inherit cmake-utils eutils python-single-r1

DESCRIPTION="C++/Python interface of FEniCS"
HOMEPAGE="https://launchpad.net/dolfin/"
SRC_URI="http://launchpad.net/${PN}/trunk/${PV}/+download/${P}.tar.gz"

LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="~amd64"
IUSE="cgal cholmod gmp mpi parmetis python scotch umfpack zlib"
# scotch and parmetis require mpi; wait for EAPI 4

REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"

DEPEND="
	dev-libs/boost
	dev-libs/libxml2:2
	sci-libs/armadillo
	sci-mathematics/ufc
	python? (
		${PYTHON_DEPS}
		dev-python/ufl[${PYTHON_USEDEP}]
		dev-python/ffc[${PYTHON_USEDEP}]
		dev-python/fiat[${PYTHON_USEDEP}]
		dev-python/instant[${PYTHON_USEDEP}]
		dev-python/viper[${PYTHON_USEDEP}]
		)"
RDEPEND="${DEPEND}"

pkg_setup() {
	use python && python-single-r1_pkg_setup
}

src_prepare() {
	epatch "${FILESDIR}"/"${P}"-find-armadillo.patch
}

pkg_setup() {
	mycmakeargs="${mycmakeargs}
		$(cmake-utils_use cgal DOLFIN_ENABLE_CGAL)
		$(cmake-utils_use cholmod DOLFIN_ENABLE_CHOLMOD)
		$(cmake-utils_use gmp DOLFIN_ENABLE_GMP)
		$(cmake-utils_use mpi DOLFIN_ENABLE_MPI)
		$(cmake-utils_use parmetis DOLFIN_ENABLE_PARMETIS)
		$(cmake-utils_use python DOLFIN_ENABLE_PYTHON)
		$(cmake-utils_use scotch DOLFIN_ENABLE_SCOTCH)
		$(cmake-utils_use umfpack DOLFIN_ENABLE_UMFPACK)
		$(cmake-utils_use zlib DOLFIN_ENABLE_ZLIB)"
}