commit:     880d56d4087e631f41c177c7ccb77cbfc2af79d2
Author:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
AuthorDate: Thu Sep  1 20:54:42 2016 +0000
Commit:     Christoph Junghans <ottxor <AT> gentoo <DOT> org>
CommitDate: Thu Sep  1 21:06:22 2016 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=880d56d4

sci-libs/libsc: add openmp and threads use flags

Package-Manager: portage-2.2.28

 sci-libs/libsc/libsc-9999.ebuild | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/sci-libs/libsc/libsc-9999.ebuild b/sci-libs/libsc/libsc-9999.ebuild
index 5b659d5..e8a667f 100644
--- a/sci-libs/libsc/libsc-9999.ebuild
+++ b/sci-libs/libsc/libsc-9999.ebuild
@@ -23,7 +23,7 @@ fi
 
 LICENSE="LGPL-2.1+"
 SLOT="0"
-IUSE="debug examples mpi romio static-libs"
+IUSE="debug examples mpi openmp romio static-libs threads"
 
 REQUIRED_USE="romio? ( mpi )"
 
@@ -42,6 +42,13 @@ DOCS=(AUTHORS NEWS README)
 
 AUTOTOOLS_AUTORECONF=true
 
+pkg_pretend() {
+       if [[ ${MERGE_TYPE} != "binary" ]] && use openmp; then
+               tc-has-openmp || \
+                       die "Please select an openmp capable compiler like 
gcc[openmp]"
+       fi
+}
+
 src_prepare() {
        # Inject a version number into the build system
        echo "${PV}" > ${S}/.tarball-version
@@ -53,7 +60,9 @@ src_configure() {
        local myeconfargs=(
                $(use_enable debug)
                $(use_enable mpi)
+               $(use_enable openmp openmp)
                $(use_enable romio mpiio)
+               $(use_enable threads pthread)
                --with-blas="$($(tc-getPKG_CONFIG) --libs blas)"
                --with-lapack="$($(tc-getPKG_CONFIG) --libs lapack)"
        )

Reply via email to