app-admin/awscli: Bump to 1.37.9
[gentoo/gentoo.git] / media-libs / vidstab / vidstab-1.1.1.ebuild
blob80230f6a176807feac2272a020eaecfac95d6810
1 # Copyright 2018-2024 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
4 EAPI=8
6 inherit cmake-multilib toolchain-funcs flag-o-matic
8 DESCRIPTION="Video stabilization library"
9 HOMEPAGE="http://public.hronopik.de/vid.stab/"
11 if [[ ${PV} == *9999* ]] ; then
12         EGIT_REPO_URI="https://github.com/georgmartius/vid.stab.git"
13         inherit git-r3
14 else
15         SRC_URI="https://github.com/georgmartius/vid.stab/archive/v${PV}.tar.gz -> ${P}.tar.gz"
16         KEYWORDS="~alpha amd64 arm arm64 ~loong ppc ppc64 ~riscv ~sparc x86"
17         S="${WORKDIR}/vid.stab-${PV}"
20 LICENSE="GPL-2+"
21 SLOT="0"
22 IUSE="openmp cpu_flags_x86_sse2"
24 pkg_pretend() {
25         [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
28 pkg_setup() {
29         [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
32 src_prepare() {
33         # USE=cpu_flags_x86_sse2 instead
34         sed -E 's#include (FindSSE)##' -i CMakeLists.txt || die
35         sed -E 's#include (FindSSE)##' -i tests/CMakeLists.txt || die
36         # strip some CFLAGS
37         for FILE_TO_PATCH in {,transcode/,tests/}CMakeLists.txt; do
38                 sed -E 's#(add_definitions.* )-g #\1#' -i ${FILE_TO_PATCH} || die
39                 sed -E 's#(add_definitions.* )-O3 #\1#' -i ${FILE_TO_PATCH} || die
40         done
41         cmake_src_prepare
44 src_configure() {
45         local mycmakeargs=(
46                 -DUSE_OMP="$(usex openmp)"
47                 -DSSE2_FOUND="$(usex cpu_flags_x86_sse2)"
48         )
49         cmake-multilib_src_configure
52 multilib_src_test() {
53         local mycmakeargs=(
54                 -DUSE_OMP="$(usex openmp)"
55                 -DSSE2_FOUND="$(usex cpu_flags_x86_sse2)"
56         )
57         append-cflags $(test-flags-CC -fopenmp)
58         local CMAKE_USE_DIR="${CMAKE_USE_DIR}/tests"
59         local BUILD_DIR="${BUILD_DIR}/tests"
60         cmake_src_configure
61         cmake_build
62         "${BUILD_DIR}"/tests || die