summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Andrews <candrews@gentoo.org>2019-01-14 11:14:57 -0500
committerCraig Andrews <candrews@gentoo.org>2019-01-14 11:15:13 -0500
commit3a19c8172c6e0b736ea746132956aa5dddc18d1b (patch)
tree07a9ec8f58a29da86f6c909bfc87c5aabfd50010
parentvirtual/gnustep-back: 0.27.0 bump (diff)
downloadgentoo-3a19c8172c6e0b736ea746132956aa5dddc18d1b.tar.gz
gentoo-3a19c8172c6e0b736ea746132956aa5dddc18d1b.tar.bz2
gentoo-3a19c8172c6e0b736ea746132956aa5dddc18d1b.zip
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@gentoo.org>
-rw-r--r--media-libs/vidstab/files/vidstab-1.1.0-tests-use-sse2-only-if-available.patch33
-rw-r--r--media-libs/vidstab/vidstab-1.1.0-r1.ebuild9
-rw-r--r--media-libs/vidstab/vidstab-9999.ebuild9
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"