summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKalin KOZHUHAROV <me.kalin@gmail.com>2019-01-10 11:49:38 +0100
committerCraig Andrews <candrews@gentoo.org>2019-01-10 20:28:03 -0500
commit077738eb8a9905827e615ddb1ac2e788337b1291 (patch)
tree2ab14d8359be13113aeeb2bc96c70b5537c07e97 /media-libs/vidstab
parentapp-office/scribus: 1.5.5_pre20181227 snapshot bump (no keywords) (diff)
downloadgentoo-077738eb8a9905827e615ddb1ac2e788337b1291.tar.gz
gentoo-077738eb8a9905827e615ddb1ac2e788337b1291.tar.bz2
gentoo-077738eb8a9905827e615ddb1ac2e788337b1291.zip
media-libs/vidstab: Video stabilization library
Closes: https://bugs.gentoo.org/517892 Signed-off-by: Kalin KOZHUHAROV <kalin@thinrope.net> Signed-off-by: Craig Andrews <candrews@gentoo.org>
Diffstat (limited to 'media-libs/vidstab')
-rw-r--r--media-libs/vidstab/Manifest1
-rw-r--r--media-libs/vidstab/files/vidstab-1.1.0-tests-should-exit-with-code-0-on-success.patch25
-rw-r--r--media-libs/vidstab/metadata.xml19
-rw-r--r--media-libs/vidstab/vidstab-1.1.0.ebuild56
-rw-r--r--media-libs/vidstab/vidstab-9999.ebuild54
5 files changed, 155 insertions, 0 deletions
diff --git a/media-libs/vidstab/Manifest b/media-libs/vidstab/Manifest
new file mode 100644
index 000000000000..d586baac9173
--- /dev/null
+++ b/media-libs/vidstab/Manifest
@@ -0,0 +1 @@
+DIST vidstab-1.1.0.tar.gz 77736 BLAKE2B 382cec922e9e7d521f49b431a5ddb246e331e186bf11707221a6bae0ce6544278a4c855c35e0346a78e4be105057c01ad7d53671ea22cbd2500aba4640cc96c7 SHA512 e82a4b6dd854b8415952cc0a8bdea06c01ff40a497c8e98177831e29031ec535b9f47cc30d5444c47bfd91871615a1662e3991185e9eb179acf37ea601073cdf
diff --git a/media-libs/vidstab/files/vidstab-1.1.0-tests-should-exit-with-code-0-on-success.patch b/media-libs/vidstab/files/vidstab-1.1.0-tests-should-exit-with-code-0-on-success.patch
new file mode 100644
index 000000000000..1f73c50a49ed
--- /dev/null
+++ b/media-libs/vidstab/files/vidstab-1.1.0-tests-should-exit-with-code-0-on-success.patch
@@ -0,0 +1,25 @@
+https://github.com/georgmartius/vid.stab/pull/69
+
+From dff58ee5a26569a7eeb881d204b428ee5da40746 Mon Sep 17 00:00:00 2001
+From: Craig Andrews <candrews@integralblue.com>
+Date: Thu, 10 Jan 2019 13:47:10 -0500
+Subject: [PATCH] tests should exit with code 0 on success
+
+Exit code 0 indicates success, anything else indicates failure. Therefore, unittest_summary() should return 0 if no tests failed.
+---
+ tests/testframework.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/testframework.c b/tests/testframework.c
+index a38851c..a889560 100644
+--- a/tests/testframework.c
++++ b/tests/testframework.c
+@@ -36,7 +36,7 @@ int unittest_summary(){
+ fprintf(stderr, "UNIT TESTs succeeded:\t %s%i/%i\033[0m\n",
+ units_failed>0 ? "\033[1;31m" : "\033[1;32m",
+ units_success, units_success + units_failed);
+- return units_failed==0;
++ return units_failed!=0;
+
+ }
+
diff --git a/media-libs/vidstab/metadata.xml b/media-libs/vidstab/metadata.xml
new file mode 100644
index 000000000000..da5303a4c0e3
--- /dev/null
+++ b/media-libs/vidstab/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <name>Kalin KOZHUHAROV</name>
+ <email>kalin@thinrope.net</email>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <maintainer type="person">
+ <email>candrews@gentoo.org</email>
+ <name>Craig Andrews</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">georgmartius/vid.stab</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/vidstab/vidstab-1.1.0.ebuild b/media-libs/vidstab/vidstab-1.1.0.ebuild
new file mode 100644
index 000000000000..71caeda13785
--- /dev/null
+++ b/media-libs/vidstab/vidstab-1.1.0.ebuild
@@ -0,0 +1,56 @@
+# Copyright 2018-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake-utils 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-utils_src_configure
+}
+
+src_test() {
+ cd tests || die
+ 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
+}
diff --git a/media-libs/vidstab/vidstab-9999.ebuild b/media-libs/vidstab/vidstab-9999.ebuild
new file mode 100644
index 000000000000..08bf38d39555
--- /dev/null
+++ b/media-libs/vidstab/vidstab-9999.ebuild
@@ -0,0 +1,54 @@
+# Copyright 2018-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake-utils 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"
+
+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-utils_src_configure
+}
+
+src_test() {
+ cd tests || die
+ 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
+}