1 |
commit: f6af5d93e2ecbed116c5a9aa35c86261d5ab67b1 |
2 |
Author: Matthias Maier <tamiko <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Sep 1 21:05:06 2016 +0000 |
4 |
Commit: Christoph Junghans <ottxor <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Sep 1 21:07:58 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=f6af5d93 |
7 |
|
8 |
sci-libs/p4est: add openmp and threads use flags |
9 |
|
10 |
Package-Manager: portage-2.2.28 |
11 |
|
12 |
sci-libs/p4est/p4est-9999.ebuild | 17 ++++++++++++++--- |
13 |
1 file changed, 14 insertions(+), 3 deletions(-) |
14 |
|
15 |
diff --git a/sci-libs/p4est/p4est-9999.ebuild b/sci-libs/p4est/p4est-9999.ebuild |
16 |
index 05f4f1b..33c371d 100644 |
17 |
--- a/sci-libs/p4est/p4est-9999.ebuild |
18 |
+++ b/sci-libs/p4est/p4est-9999.ebuild |
19 |
@@ -26,16 +26,17 @@ fi |
20 |
LICENSE="GPL-2+" |
21 |
SLOT="0" |
22 |
|
23 |
-IUSE="debug doc examples mpi romio static-libs +vtk-binary" |
24 |
+# TODO petsc |
25 |
+IUSE="debug doc examples mpi openmp romio static-libs threads +vtk-binary" |
26 |
REQUIRED_USE="romio? ( mpi )" |
27 |
|
28 |
RDEPEND=" |
29 |
- >=sci-libs/libsc-1.0[mpi,romio] |
30 |
+ >=sci-libs/libsc-1.0[mpi=,openmp=,romio=,threads=] |
31 |
dev-lang/lua:* |
32 |
sys-apps/util-linux |
33 |
virtual/blas |
34 |
virtual/lapack |
35 |
- mpi? ( virtual/mpi[romio?] )" |
36 |
+ mpi? ( virtual/mpi[romio=] )" |
37 |
|
38 |
DEPEND=" |
39 |
${RDEPEND} |
40 |
@@ -47,6 +48,13 @@ DOCS=( AUTHORS NEWS README ) |
41 |
AT_M4DIR="${WORKDIR}/${P}/config ${WORKDIR}/${P}/sc/config" |
42 |
AUTOTOOLS_AUTORECONF=true |
43 |
|
44 |
+pkg_pretend() { |
45 |
+ if [[ ${MERGE_TYPE} != "binary" ]] && use openmp; then |
46 |
+ tc-has-openmp || \ |
47 |
+ die "Please select an openmp capable compiler like gcc[openmp]" |
48 |
+ fi |
49 |
+} |
50 |
+ |
51 |
src_prepare() { |
52 |
# Inject libsc to get all parts of the build system... |
53 |
if ! [[ ${PV} = *9999* ]]; then |
54 |
@@ -76,10 +84,13 @@ src_configure() { |
55 |
local myeconfargs=( |
56 |
$(use_enable debug) |
57 |
$(use_enable mpi) |
58 |
+ $(use_enable openmp) |
59 |
$(use_enable romio mpiio) |
60 |
$(use_enable vtk-binary) |
61 |
+ $(use_enable threads pthread) |
62 |
--with-blas="$($(tc-getPKG_CONFIG) --libs blas)" |
63 |
--with-lapack="$($(tc-getPKG_CONFIG) --libs lapack)" |
64 |
+ $(use_with petsc) |
65 |
--with-sc="${EPREFIX}/usr" |
66 |
) |
67 |
autotools-utils_src_configure |