summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2022-05-14 23:56:44 +0200
committerSam James <sam@gentoo.org>2022-05-15 01:18:12 +0000
commit9a75190cb8ceebb36554b6d974787afcc54dabca (patch)
tree811c6f53daff4c42744b6a4979e1d7ed32305a39 /sci-libs/superlu_mt
parentx11-libs/pixman: [QA] tc-has-openmp → tc-check-openmp (diff)
downloadgentoo-9a75190cb8ceebb36554b6d974787afcc54dabca.tar.gz
gentoo-9a75190cb8ceebb36554b6d974787afcc54dabca.tar.bz2
gentoo-9a75190cb8ceebb36554b6d974787afcc54dabca.zip
sci-libs/superlu_mt: [QA] tc-has-openmp → tc-check-openmp
Signed-off-by: David Seifert <soap@gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/25488 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sci-libs/superlu_mt')
-rw-r--r--sci-libs/superlu_mt/superlu_mt-3.1-r1.ebuild24
1 files changed, 13 insertions, 11 deletions
diff --git a/sci-libs/superlu_mt/superlu_mt-3.1-r1.ebuild b/sci-libs/superlu_mt/superlu_mt-3.1-r1.ebuild
index ec84973ee7d0..adfa9a6f3431 100644
--- a/sci-libs/superlu_mt/superlu_mt-3.1-r1.ebuild
+++ b/sci-libs/superlu_mt/superlu_mt-3.1-r1.ebuild
@@ -31,18 +31,12 @@ PATCHES=(
"${FILESDIR}"/${PN}-3.1-fix-predefs.patch
)
+pkg_pretend() {
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && ! use threads && tc-check-openmp
+}
+
pkg_setup() {
- if use openmp && ! use threads; then
- if [[ "$(tc-getCC)" == *gcc ]] && ! tc-has-openmp; then
- ewarn "OpenMP is not available in your current selected gcc"
- die "need openmp capable gcc"
- fi
- CTHREADS="-D__OPENMP"
- [[ "$(tc-getCC)" == *gcc ]] && LDTHREADS="-fopenmp"
- else
- CTHREADS="-D__PTHREAD"
- LDTHREADS="-pthread"
- fi
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && ! use threads && tc-check-openmp
}
src_prepare() {
@@ -68,6 +62,14 @@ src_prepare() {
-e '/:.*$(SUPERLULIB)/s|../lib/$(SUPERLULIB)||g' \
-e 's|../lib/$(SUPERLULIB)|-lsuperlu_mt|g' \
-i EXAMPLE/Makefile || die
+
+ if use openmp && ! use threads; then
+ CTHREADS="-D__OPENMP"
+ LDTHREADS="-fopenmp"
+ else
+ CTHREADS="-D__PTHREAD"
+ LDTHREADS="-pthread"
+ fi
}
src_compile() {