commit:     8c3e019d3764d6f231f63af05738b7a4bd26771b
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Mon May 16 08:12:12 2022 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Mon May 16 08:12:12 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8c3e019d

media-libs/vidstab: [QA] use tc-check-openmp correctly

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

 media-libs/vidstab/vidstab-1.1.0-r2.ebuild | 12 ++++++++++--
 media-libs/vidstab/vidstab-9999.ebuild     | 12 ++++++++++--
 2 files changed, 20 insertions(+), 4 deletions(-)

diff --git a/media-libs/vidstab/vidstab-1.1.0-r2.ebuild 
b/media-libs/vidstab/vidstab-1.1.0-r2.ebuild
index c4c32a5b0db5..10d1d124b60d 100644
--- a/media-libs/vidstab/vidstab-1.1.0-r2.ebuild
+++ b/media-libs/vidstab/vidstab-1.1.0-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2018-2021 Gentoo Authors
+# Copyright 2018-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -26,6 +26,15 @@ PATCHES=(
        "${FILESDIR}/vidstab-1.1.0-tests-use-sse2-only-if-available.patch"
        
"${FILESDIR}/vidstab-1.1.0-tests-1.1.0-fix-test_motiondetect-without-openmp.patch"
 )
+
+pkg_pretend() {
+       [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+pkg_setup() {
+       [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
 src_prepare() {
        # USE=cpu_flags_x86_sse2 instead
        sed -E 's#include (FindSSE)##' -i CMakeLists.txt || die
@@ -39,7 +48,6 @@ src_prepare() {
 }
 
 src_configure() {
-       use openmp && tc-check-openmp
        local mycmakeargs=(
                -DUSE_OMP="$(usex openmp)"
                -DSSE2_FOUND="$(usex cpu_flags_x86_sse2)"

diff --git a/media-libs/vidstab/vidstab-9999.ebuild 
b/media-libs/vidstab/vidstab-9999.ebuild
index 780a2a4598a4..09028637d1da 100644
--- a/media-libs/vidstab/vidstab-9999.ebuild
+++ b/media-libs/vidstab/vidstab-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2018-2020 Gentoo Authors
+# Copyright 2018-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -21,6 +21,15 @@ fi
 LICENSE="GPL-2+"
 SLOT="0"
 IUSE="openmp cpu_flags_x86_sse2"
+
+pkg_pretend() {
+       [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+pkg_setup() {
+       [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
 src_prepare() {
        # USE=cpu_flags_x86_sse2 instead
        sed -E 's#include (FindSSE)##' -i CMakeLists.txt || die
@@ -34,7 +43,6 @@ src_prepare() {
 }
 
 src_configure() {
-       use openmp && tc-check-openmp
        local mycmakeargs=(
                -DUSE_OMP="$(usex openmp)"
                -DSSE2_FOUND="$(usex cpu_flags_x86_sse2)"

Reply via email to