# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="8"
inherit cmake git-r3
DESCRIPTION="A minimalistic plugin API for video effects"
HOMEPAGE="https://dyne.org/software/frei0r/"
EGIT_REPO_URI="https://github.com/dyne/frei0r.git"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS=""
IUSE="doc"
RDEPEND="x11-libs/cairo
>=media-libs/opencv-2.3.0
>=media-libs/gavl-1.2.0"
DEPEND="${RDEPEND}
virtual/pkgconfig
doc? ( app-text/doxygen )"
DOCS=( AUTHORS ChangeLog README.md TODO )
src_prepare() {
default
local f=CMakeLists.txt
sed -i \
-e '/set(CMAKE_C_FLAGS/d' \
-e "/LIBDIR.*frei0r-1/s:lib:$(get_libdir):" \
${f} || die
# http://bugs.gentoo.org/418243
sed -i \
-e '/set.*CMAKE_C_FLAGS/s:"): ${CMAKE_C_FLAGS}&:' \
src/filter/*/${f} || die
cmake_src_prepare
}
src_configure() {
local mycmakeargs=(
-DWITHOUT_GAVL=OFF
-DWITHOUT_OPENCV=ON
)
cmake_src_configure
}
src_compile() {
cmake_src_compile
if use doc; then
pushd doc
doxygen || die
popd
fi
}
src_install() {
cmake_src_install
if use doc; then
docinto html
dodoc -r doc/html/.
fi
}