commit:     18aa29a9cc9ee5434c0d9664ba526c74444912d5
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Sat May 14 21:30:27 2022 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sat May 14 21:30:27 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=18aa29a9

sci-libs/sundials: [QA] tc-has-openmp → tc-check-openmp

Signed-off-by: David Seifert <soap <AT> gentoo.org>

 sci-libs/sundials/sundials-5.2.0.ebuild | 12 +++++++-----
 sci-libs/sundials/sundials-5.8.0.ebuild | 12 +++++++-----
 2 files changed, 14 insertions(+), 10 deletions(-)

diff --git a/sci-libs/sundials/sundials-5.2.0.ebuild 
b/sci-libs/sundials/sundials-5.2.0.ebuild
index c99c2b643966..5af24cd4ed75 100644
--- a/sci-libs/sundials/sundials-5.2.0.ebuild
+++ b/sci-libs/sundials/sundials-5.2.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -31,11 +31,13 @@ DEPEND="${RDEPEND}"
 
 PATCHES=( "${FILESDIR}"/${P}-fix-license-install-path.patch )
 
+pkg_pretend() {
+       [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
 pkg_setup() {
-       if [[ ${MERGE_TYPE} != binary ]] && use openmp && [[ $(tc-getCC) == 
*gcc ]] && ! tc-has-openmp; then
-               ewarn "OpenMP is not available in your current selected gcc"
-               die "need openmp capable gcc"
-       fi
+       [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+       use fortran && fortran-2_pkg_setup
 }
 
 src_prepare() {

diff --git a/sci-libs/sundials/sundials-5.8.0.ebuild 
b/sci-libs/sundials/sundials-5.8.0.ebuild
index 623a8cee16ed..517e32342ded 100644
--- a/sci-libs/sundials/sundials-5.8.0.ebuild
+++ b/sci-libs/sundials/sundials-5.8.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -39,11 +39,13 @@ PATCHES=(
                "${FILESDIR}"/${P}-fix-license-install-path.patch
 )
 
+pkg_pretend() {
+       [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
 pkg_setup() {
-       if [[ ${MERGE_TYPE} != binary ]] && use openmp && [[ $(tc-getCC) == 
*gcc ]] && ! tc-has-openmp; then
-               ewarn "OpenMP is not available in your current selected gcc"
-               die "need openmp capable gcc"
-       fi
+       [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+       use fortran && fortran-2_pkg_setup
 }
 
 src_prepare() {

Reply via email to