summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Andrews <candrews@gentoo.org>2019-01-11 11:08:44 -0500
committerCraig Andrews <candrews@gentoo.org>2019-01-11 11:14:54 -0500
commit08db7b7e1b39d43d2e71f65009313dab8788a89b (patch)
treefcccd4fc725026f25d3c9e923504584d50ee3dfc /media-libs/vidstab/vidstab-1.1.0-r1.ebuild
parentprofiles: Mask package USE that depend on PHP 7.0 (diff)
downloadgentoo-08db7b7e1b39d43d2e71f65009313dab8788a89b.tar.gz
gentoo-08db7b7e1b39d43d2e71f65009313dab8788a89b.tar.bz2
gentoo-08db7b7e1b39d43d2e71f65009313dab8788a89b.zip
media-libs/vidstab: multilib support
Package-Manager: Portage-2.3.54, Repoman-2.3.12 Signed-off-by: Craig Andrews <candrews@gentoo.org>
Diffstat (limited to 'media-libs/vidstab/vidstab-1.1.0-r1.ebuild')
-rw-r--r--media-libs/vidstab/vidstab-1.1.0-r1.ebuild57
1 files changed, 57 insertions, 0 deletions
diff --git a/media-libs/vidstab/vidstab-1.1.0-r1.ebuild b/media-libs/vidstab/vidstab-1.1.0-r1.ebuild
new file mode 100644
index 00000000000..31b7ac65819
--- /dev/null
+++ b/media-libs/vidstab/vidstab-1.1.0-r1.ebuild
@@ -0,0 +1,57 @@
+# Copyright 2018-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+: ${CMAKE_MAKEFILE_GENERATOR:=ninja}
+
+inherit cmake-multilib toolchain-funcs
+
+DESCRIPTION="Video stabilization library"
+HOMEPAGE="http://public.hronopik.de/vid.stab/"
+
+if [[ ${PV} == *9999 ]] ; then
+ EGIT_REPO_URI="https://github.com/georgmartius/vid.stab.git"
+ inherit git-r3
+else
+ SRC_URI="https://github.com/georgmartius/vid.stab/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+ S="${WORKDIR}/vid.stab-${PV}"
+fi
+
+LICENSE="GPL-2+"
+SLOT="0"
+IUSE="openmp cpu_flags_x86_sse2"
+PATCHES=(
+ "${FILESDIR}/vidstab-1.1.0-tests-should-exit-with-code-0-on-success.patch"
+)
+src_prepare() {
+ # USE=cpu_flags_x86_sse2 instead
+ sed -E 's#include (FindSSE)##' -i CMakeLists.txt
+ # 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}
+ done
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ use openmp && tc-check-openmp
+ local mycmakeargs=(
+ -DUSE_OMP="$(usex openmp)"
+ -DSSE2_FOUND="$(usex cpu_flags_x86_sse2)"
+ )
+ cmake-multilib_src_configure
+}
+
+multilib_src_test() {
+ local mycmakeargs=(
+ -DUSE_OMP="$(usex openmp)"
+ )
+ local CMAKE_USE_DIR="${CMAKE_USE_DIR}/tests"
+ local BUILD_DIR="${BUILD_DIR}/tests"
+ cmake-utils_src_configure
+ cmake-utils_src_make
+ "${BUILD_DIR}"/tests || die
+}