sci-libs/fftw: Use 'tc-check-openmp' for checking OpenMP support
authorDavid Seifert <soap@gentoo.org>
Tue, 22 Nov 2016 19:33:05 +0000 (20:33 +0100)
committerDavid Seifert <soap@gentoo.org>
Tue, 22 Nov 2016 19:33:59 +0000 (20:33 +0100)
Package-Manager: portage-2.3.2

sci-libs/fftw/fftw-2.1.5-r9.ebuild
sci-libs/fftw/fftw-3.3.5-r2.ebuild

index bc142c731eb3eaa7a5a6fc4b6ae47523dce16b29..496c5e5d578e3099f52a1f09ec9b1f9f25f38db4 100644 (file)
@@ -29,18 +29,13 @@ PATCHES=(
        "${FILESDIR}"/${P}-texinfo5.1.patch
 )
 
+pkg_pretend() {
+       [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
 pkg_setup() {
        if [[ ${MERGE_TYPE} != binary ]] && use openmp; then
-               if ! tc-has-openmp; then
-                       ewarn "OpenMP is not available in your current selected compiler"
-
-                       if tc-is-clang; then
-                               ewarn "OpenMP support in sys-devel/clang is provided by sys-libs/libomp,"
-                               ewarn "which you will need to build ${CATEGORY}/${PN} with USE=\"openmp\""
-                       fi
-
-                       die "need openmp capable compiler"
-               fi
+               tc-check-openmp
                FORTRAN_NEED_OPENMP=1
        fi
 
index e577bdcc4b54c3ca577a2a5e9e11d0e0f6d15fce..c9f3b9a5e9c91ea561fa9b7181828ebea23e8376 100644 (file)
@@ -28,18 +28,13 @@ RDEPEND="
 DEPEND="${RDEPEND}
        test? ( dev-lang/perl )"
 
+pkg_pretend() {
+       [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
 pkg_setup() {
        if [[ ${MERGE_TYPE} != binary ]] && use openmp; then
-               if ! tc-has-openmp; then
-                       ewarn "OpenMP is not available in your current selected compiler"
-
-                       if tc-is-clang; then
-                               ewarn "OpenMP support in sys-devel/clang is provided by sys-libs/libomp,"
-                               ewarn "which you will need to build ${CATEGORY}/${PN} with USE=\"openmp\""
-                       fi
-
-                       die "need openmp capable compiler"
-               fi
+               tc-check-openmp
                FORTRAN_NEED_OPENMP=1
        fi