summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Andrews <candrews@gentoo.org>2023-03-10 08:46:34 -0500
committerCraig Andrews <candrews@gentoo.org>2023-03-10 08:46:34 -0500
commita7cc208b77b6887fd7502822b9f413598a7da59d (patch)
tree1afd29218d29501d70b4ea18f3f403eb7db7589e /media-libs/vidstab
parentsci-libs/proj: drop leftover unconditional BUILD_BENCHMARKS (diff)
downloadgentoo-a7cc208b77b6887fd7502822b9f413598a7da59d.tar.gz
gentoo-a7cc208b77b6887fd7502822b9f413598a7da59d.tar.bz2
gentoo-a7cc208b77b6887fd7502822b9f413598a7da59d.zip
media-libs/vidstab: add 1.1.1
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/vidstab-1.1.1.ebuild62
2 files changed, 63 insertions, 0 deletions
diff --git a/media-libs/vidstab/Manifest b/media-libs/vidstab/Manifest
index d586baac9173..d37af8ce52f7 100644
--- a/media-libs/vidstab/Manifest
+++ b/media-libs/vidstab/Manifest
@@ -1 +1,2 @@
DIST vidstab-1.1.0.tar.gz 77736 BLAKE2B 382cec922e9e7d521f49b431a5ddb246e331e186bf11707221a6bae0ce6544278a4c855c35e0346a78e4be105057c01ad7d53671ea22cbd2500aba4640cc96c7 SHA512 e82a4b6dd854b8415952cc0a8bdea06c01ff40a497c8e98177831e29031ec535b9f47cc30d5444c47bfd91871615a1662e3991185e9eb179acf37ea601073cdf
+DIST vidstab-1.1.1.tar.gz 80717 BLAKE2B e2ce03d24358404c617816466ad3fd715999ef4d391617e9cec7923353ba2ce4ac3b3eedce67f3fadf3bd6fdfb2e4516a5b95c3fca9f613e367b1490ec78ae0a SHA512 b27ac95ab5302e9500af5a52cb09f557b9dacbdc4dc57a9781e2f9ae65a6ffea396f9819bca1f6a103f9d1896bf3061f1cb647166b14b8de8e89a1b15f010e5c
diff --git a/media-libs/vidstab/vidstab-1.1.1.ebuild b/media-libs/vidstab/vidstab-1.1.1.ebuild
new file mode 100644
index 000000000000..277ef59b6bbc
--- /dev/null
+++ b/media-libs/vidstab/vidstab-1.1.1.ebuild
@@ -0,0 +1,62 @@
+# Copyright 2018-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+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="~alpha ~amd64 ~arm ~arm64 ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
+ S="${WORKDIR}/vid.stab-${PV}"
+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
+ 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} || die
+ sed -E 's#(add_definitions.* )-O3 #\1#' -i ${FILE_TO_PATCH} || die
+ done
+ cmake_src_prepare
+}
+
+src_configure() {
+ 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)"
+ -DSSE2_FOUND="$(usex cpu_flags_x86_sse2)"
+ )
+ local CMAKE_USE_DIR="${CMAKE_USE_DIR}/tests"
+ local BUILD_DIR="${BUILD_DIR}/tests"
+ cmake_src_configure
+ cmake_build
+ "${BUILD_DIR}"/tests || die
+}