1 |
commit: 880d56d4087e631f41c177c7ccb77cbfc2af79d2 |
2 |
Author: Matthias Maier <tamiko <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Sep 1 20:54:42 2016 +0000 |
4 |
Commit: Christoph Junghans <ottxor <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Sep 1 21:06:22 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=880d56d4 |
7 |
|
8 |
sci-libs/libsc: add openmp and threads use flags |
9 |
|
10 |
Package-Manager: portage-2.2.28 |
11 |
|
12 |
sci-libs/libsc/libsc-9999.ebuild | 11 ++++++++++- |
13 |
1 file changed, 10 insertions(+), 1 deletion(-) |
14 |
|
15 |
diff --git a/sci-libs/libsc/libsc-9999.ebuild b/sci-libs/libsc/libsc-9999.ebuild |
16 |
index 5b659d5..e8a667f 100644 |
17 |
--- a/sci-libs/libsc/libsc-9999.ebuild |
18 |
+++ b/sci-libs/libsc/libsc-9999.ebuild |
19 |
@@ -23,7 +23,7 @@ fi |
20 |
|
21 |
LICENSE="LGPL-2.1+" |
22 |
SLOT="0" |
23 |
-IUSE="debug examples mpi romio static-libs" |
24 |
+IUSE="debug examples mpi openmp romio static-libs threads" |
25 |
|
26 |
REQUIRED_USE="romio? ( mpi )" |
27 |
|
28 |
@@ -42,6 +42,13 @@ DOCS=(AUTHORS NEWS README) |
29 |
|
30 |
AUTOTOOLS_AUTORECONF=true |
31 |
|
32 |
+pkg_pretend() { |
33 |
+ if [[ ${MERGE_TYPE} != "binary" ]] && use openmp; then |
34 |
+ tc-has-openmp || \ |
35 |
+ die "Please select an openmp capable compiler like gcc[openmp]" |
36 |
+ fi |
37 |
+} |
38 |
+ |
39 |
src_prepare() { |
40 |
# Inject a version number into the build system |
41 |
echo "${PV}" > ${S}/.tarball-version |
42 |
@@ -53,7 +60,9 @@ src_configure() { |
43 |
local myeconfargs=( |
44 |
$(use_enable debug) |
45 |
$(use_enable mpi) |
46 |
+ $(use_enable openmp openmp) |
47 |
$(use_enable romio mpiio) |
48 |
+ $(use_enable threads pthread) |
49 |
--with-blas="$($(tc-getPKG_CONFIG) --libs blas)" |
50 |
--with-lapack="$($(tc-getPKG_CONFIG) --libs lapack)" |
51 |
) |