1 |
commit: 4bbf1ff07337fe4845c69be95b8b7a0b8cd04ab4 |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu May 28 16:29:22 2020 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu May 28 17:09:01 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4bbf1ff0 |
7 |
|
8 |
dev-util/mdds: Add IUSE=openmp |
9 |
|
10 |
Reported-by: Sebastian Hamann <gentoo-bugs <AT> ares-macrotechnology.com> |
11 |
Closes: https://bugs.gentoo.org/725394 |
12 |
Package-Manager: Portage-2.3.100, Repoman-2.3.22 |
13 |
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> |
14 |
|
15 |
dev-util/mdds/mdds-1.6.0.ebuild | 19 ++++++++++++++++--- |
16 |
dev-util/mdds/mdds-9999.ebuild | 16 ++++++++++++++-- |
17 |
2 files changed, 30 insertions(+), 5 deletions(-) |
18 |
|
19 |
diff --git a/dev-util/mdds/mdds-1.6.0.ebuild b/dev-util/mdds/mdds-1.6.0.ebuild |
20 |
index 7fa68c62a5e..a8ee00cd56b 100644 |
21 |
--- a/dev-util/mdds/mdds-1.6.0.ebuild |
22 |
+++ b/dev-util/mdds/mdds-1.6.0.ebuild |
23 |
@@ -16,8 +16,8 @@ DESCRIPTION="A collection of multi-dimensional data structure and indexing algor |
24 |
HOMEPAGE="https://gitlab.com/mdds/mdds" |
25 |
|
26 |
LICENSE="MIT" |
27 |
-SLOT="1/1.5" |
28 |
-IUSE="doc valgrind test" |
29 |
+SLOT="1/1.5" # Check API version on version bumps! |
30 |
+IUSE="doc openmp valgrind test" |
31 |
RESTRICT="!test? ( test )" |
32 |
|
33 |
BDEPEND=" |
34 |
@@ -32,9 +32,16 @@ RDEPEND="${DEPEND}" |
35 |
|
36 |
PATCHES=( "${FILESDIR}/${PN}-1.5.0-buildsystem.patch" ) |
37 |
|
38 |
+pkg_pretend() { |
39 |
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp |
40 |
+} |
41 |
+ |
42 |
+pkg_setup() { |
43 |
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp |
44 |
+} |
45 |
+ |
46 |
src_prepare() { |
47 |
default |
48 |
- |
49 |
eautoreconf |
50 |
} |
51 |
|
52 |
@@ -43,6 +50,12 @@ src_configure() { |
53 |
$(use_enable doc docs) |
54 |
$(use_enable valgrind memory_tests) |
55 |
) |
56 |
+ if use openmp && tc-has-openmp; then |
57 |
+ myeconfargs+=( --enable-openmp ) |
58 |
+ else |
59 |
+ myeconfargs+=( --disable-openmp ) |
60 |
+ fi |
61 |
+ |
62 |
econf "${myeconfargs[@]}" |
63 |
} |
64 |
|
65 |
|
66 |
diff --git a/dev-util/mdds/mdds-9999.ebuild b/dev-util/mdds/mdds-9999.ebuild |
67 |
index 1bede682c2d..64e78d4d68f 100644 |
68 |
--- a/dev-util/mdds/mdds-9999.ebuild |
69 |
+++ b/dev-util/mdds/mdds-9999.ebuild |
70 |
@@ -17,7 +17,7 @@ HOMEPAGE="https://gitlab.com/mdds/mdds" |
71 |
|
72 |
LICENSE="MIT" |
73 |
SLOT="1/${PV%.*}" # Check API version on version bumps! |
74 |
-IUSE="doc valgrind test" |
75 |
+IUSE="doc openmp valgrind test" |
76 |
RESTRICT="!test? ( test )" |
77 |
|
78 |
BDEPEND=" |
79 |
@@ -32,9 +32,16 @@ RDEPEND="${DEPEND}" |
80 |
|
81 |
PATCHES=( "${FILESDIR}/${PN}-1.5.0-buildsystem.patch" ) |
82 |
|
83 |
+pkg_pretend() { |
84 |
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp |
85 |
+} |
86 |
+ |
87 |
+pkg_setup() { |
88 |
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp |
89 |
+} |
90 |
+ |
91 |
src_prepare() { |
92 |
default |
93 |
- |
94 |
eautoreconf |
95 |
} |
96 |
|
97 |
@@ -43,6 +50,11 @@ src_configure() { |
98 |
$(use_enable doc docs) |
99 |
$(use_enable valgrind memory_tests) |
100 |
) |
101 |
+ if use openmp && tc-has-openmp; then |
102 |
+ myeconfargs+=( --enable-openmp ) |
103 |
+ else |
104 |
+ myeconfargs+=( --disable-openmp ) |
105 |
+ fi |
106 |
econf "${myeconfargs[@]}" |
107 |
} |