From: "Craig Andrews" <candrews@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/vidstab/files/, media-libs/vidstab/
Date: Mon, 14 Jan 2019 16:15:22 +0000 (UTC) [thread overview]
Message-ID: <1547482513.3a19c8172c6e0b736ea746132956aa5dddc18d1b.candrews@gentoo> (raw)
commit: 3a19c8172c6e0b736ea746132956aa5dddc18d1b
Author: Craig Andrews <candrews <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 14 16:14:57 2019 +0000
Commit: Craig Andrews <candrews <AT> gentoo <DOT> org>
CommitDate: Mon Jan 14 16:15:13 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3a19c817
media-libs/vidstab: For tests, use sse2 only if it is available
Reported upstream at https://github.com/georgmartius/vid.stab/pull/70
Closes: https://bugs.gentoo.org/675318
Package-Manager: Portage-2.3.55, Repoman-2.3.12
Signed-off-by: Craig Andrews <candrews <AT> gentoo.org>
...ab-1.1.0-tests-use-sse2-only-if-available.patch | 33 ++++++++++++++++++++++
media-libs/vidstab/vidstab-1.1.0-r1.ebuild | 9 ++++--
media-libs/vidstab/vidstab-9999.ebuild | 9 +++---
3 files changed, 44 insertions(+), 7 deletions(-)
diff --git a/media-libs/vidstab/files/vidstab-1.1.0-tests-use-sse2-only-if-available.patch b/media-libs/vidstab/files/vidstab-1.1.0-tests-use-sse2-only-if-available.patch
new file mode 100644
index 00000000000..fc7deca503e
--- /dev/null
+++ b/media-libs/vidstab/files/vidstab-1.1.0-tests-use-sse2-only-if-available.patch
@@ -0,0 +1,33 @@
+From 80932fbd1e77d397a7b503697c78fd888ede396a Mon Sep 17 00:00:00 2001
+From: Craig Andrews <candrews@integralblue.com>
+Date: Mon, 14 Jan 2019 11:08:30 -0500
+Subject: [PATCH] In tests, use sse2 only if it is available
+
+Use FindSSE and SSE2_FOUND in the same way as done in the main CMakeLists.txt in commit 0f41dfb89ba3fa7d20f45cbeb02cc1ff37c89c27
+---
+ tests/CMakeLists.txt | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
+index 9597141..6812916 100644
+--- a/tests/CMakeLists.txt
++++ b/tests/CMakeLists.txt
+@@ -7,6 +7,8 @@ project (vid.stab)
+
+ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/../CMakeModules/")
+
++include (FindSSE)
++
+ option(USE_OMP "use parallelization use OMP" ON)
+
+ # Default to debug builds if no explicit build type specified.
+@@ -23,7 +25,9 @@ else()
+ add_definitions( -DDISABLE_ORC)
+ endif()
+
++if(SSE2_FOUND)
+ add_definitions( -DUSE_SSE2 -msse2 -ffast-math -fno-show-column ) # -DUSE_SSE2_ASM
++endif()
+
+ if(USE_OMP)
+ add_definitions(-fopenmp -DUSE_OMP)
diff --git a/media-libs/vidstab/vidstab-1.1.0-r1.ebuild b/media-libs/vidstab/vidstab-1.1.0-r1.ebuild
index 31b7ac65819..a6e5eadfa24 100644
--- a/media-libs/vidstab/vidstab-1.1.0-r1.ebuild
+++ b/media-libs/vidstab/vidstab-1.1.0-r1.ebuild
@@ -24,14 +24,16 @@ SLOT="0"
IUSE="openmp cpu_flags_x86_sse2"
PATCHES=(
"${FILESDIR}/vidstab-1.1.0-tests-should-exit-with-code-0-on-success.patch"
+ "${FILESDIR}/vidstab-1.1.0-tests-use-sse2-only-if-available.patch"
)
src_prepare() {
# USE=cpu_flags_x86_sse2 instead
- sed -E 's#include (FindSSE)##' -i CMakeLists.txt
+ sed -E 's#include (FindSSE)##' -i CMakeLists.txt || die
+ sed -E 's#include (FindSSE)##' -i tests/CMakeLists.txt || die
# strip some CFLAGS
for FILE_TO_PATCH in {,transcode/,tests/}CMakeLists.txt; do
- sed -E 's#(add_definitions.* )-g #\1#' -i ${FILE_TO_PATCH}
- sed -E 's#(add_definitions.* )-O3 #\1#' -i ${FILE_TO_PATCH}
+ sed -E 's#(add_definitions.* )-g #\1#' -i ${FILE_TO_PATCH} || die
+ sed -E 's#(add_definitions.* )-O3 #\1#' -i ${FILE_TO_PATCH} || die
done
cmake-utils_src_prepare
}
@@ -48,6 +50,7 @@ src_configure() {
multilib_src_test() {
local mycmakeargs=(
-DUSE_OMP="$(usex openmp)"
+ -DSSE2_FOUND="$(usex cpu_flags_x86_sse2)"
)
local CMAKE_USE_DIR="${CMAKE_USE_DIR}/tests"
local BUILD_DIR="${BUILD_DIR}/tests"
diff --git a/media-libs/vidstab/vidstab-9999.ebuild b/media-libs/vidstab/vidstab-9999.ebuild
index c694caee1d9..447fa855686 100644
--- a/media-libs/vidstab/vidstab-9999.ebuild
+++ b/media-libs/vidstab/vidstab-9999.ebuild
@@ -22,14 +22,14 @@ fi
LICENSE="GPL-2+"
SLOT="0"
IUSE="openmp cpu_flags_x86_sse2"
-
src_prepare() {
# USE=cpu_flags_x86_sse2 instead
- sed -E 's#include (FindSSE)##' -i CMakeLists.txt
+ sed -E 's#include (FindSSE)##' -i CMakeLists.txt || die
+ sed -E 's#include (FindSSE)##' -i tests/CMakeLists.txt || die
# strip some CFLAGS
for FILE_TO_PATCH in {,transcode/,tests/}CMakeLists.txt; do
- sed -E 's#(add_definitions.* )-g #\1#' -i ${FILE_TO_PATCH}
- sed -E 's#(add_definitions.* )-O3 #\1#' -i ${FILE_TO_PATCH}
+ sed -E 's#(add_definitions.* )-g #\1#' -i ${FILE_TO_PATCH} || die
+ sed -E 's#(add_definitions.* )-O3 #\1#' -i ${FILE_TO_PATCH} || die
done
cmake-utils_src_prepare
}
@@ -46,6 +46,7 @@ src_configure() {
multilib_src_test() {
local mycmakeargs=(
-DUSE_OMP="$(usex openmp)"
+ -DSSE2_FOUND="$(usex cpu_flags_x86_sse2)"
)
local CMAKE_USE_DIR="${CMAKE_USE_DIR}/tests"
local BUILD_DIR="${BUILD_DIR}/tests"
next reply other threads:[~2019-01-14 16:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-14 16:15 Craig Andrews [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-04-10 18:36 [gentoo-commits] repo/gentoo:master commit in: media-libs/vidstab/files/, media-libs/vidstab/ Andreas Sturmlechner
2019-01-11 1:28 Craig Andrews
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1547482513.3a19c8172c6e0b736ea746132956aa5dddc18d1b.candrews@gentoo \
--to=candrews@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox