gentoo-ebuilds/media-libs/vidstab/vidstab-1.1.1_p20240615.ebuild
NHOrus a15140358e
media-libs/vidstab: add 1.1.1_p20240615
Version bump to include long-awaited bugfix
Folded actual seds into the patch that fixes build with CMake4
Also in same patch allowed building with modern C - there's no errors
Removed USE=test and RESTRICT - tests now have no dependency on orc
and should be run with just FEATURE=test

Closes: https://bugs.gentoo.org/951900
Closes: https://bugs.gentoo.org/927886
Signed-off-by: NHOrus <jy6x2b32pie9@yahoo.com>
Closes: https://github.com/gentoo/gentoo/pull/41243
Signed-off-by: Sam James <sam@gentoo.org>
2025-04-12 21:57:46 +01:00

54 lines
1.3 KiB
Bash

# Copyright 2018-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit cmake-multilib toolchain-funcs flag-o-matic
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
COMMIT="8dff7ad3c10ac663745f2263037f6e42b993519c"
SRC_URI="https://github.com/georgmartius/vid.stab/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~x86"
S="${WORKDIR}/vid.stab-${COMMIT}"
fi
LICENSE="GPL-2+"
SLOT="0"
IUSE="openmp cpu_flags_x86_sse2"
PATCHES=( "${FILESDIR}/${P}-cmake4.patch" )
pkg_pretend() {
[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
}
pkg_setup() {
[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
}
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)"
)
append-cflags $(test-flags-CC -fopenmp)
local CMAKE_USE_DIR="${CMAKE_USE_DIR}/tests"
local BUILD_DIR="${BUILD_DIR}/tests"
cmake_src_configure
cmake_build
"${BUILD_DIR}"/tests || die
}