app-metrics/prometheus: add 3.1.0
[gentoo/gentoo.git] / media-plugins / frei0r-plugins / frei0r-plugins-1.7.0-r2.ebuild
bloba6baff9613ffe73e37a257174248a1e6afc6739b
1 # Copyright 1999-2022 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
4 EAPI=8
6 DOCS_BUILDER="doxygen"
7 DOCS_DIR="doc"
8 inherit cmake-multilib docs
10 DESCRIPTION="A minimalistic plugin API for video effects"
11 HOMEPAGE="https://www.dyne.org/software/frei0r/"
12 SRC_URI="https://files.dyne.org/frei0r/releases/${P}.tar.gz"
14 LICENSE="GPL-2"
15 SLOT="0"
16 KEYWORDS="amd64 ~arm arm64 ~hppa ppc ~ppc64 ~riscv x86"
17 IUSE="doc +facedetect +scale0tilt"
19 RDEPEND="x11-libs/cairo[${MULTILIB_USEDEP}]
20         facedetect? ( >=media-libs/opencv-2.3.0:=[contribdnn,features2d,${MULTILIB_USEDEP}] )
21         scale0tilt? ( >=media-libs/gavl-1.2.0[${MULTILIB_USEDEP}] )"
22 DEPEND="${RDEPEND}"
24 DOCS=( AUTHORS.txt ChangeLog.txt README.txt TODO.txt )
25 PATCHES=( "${FILESDIR}/ocv4.patch" )
27 src_prepare() {
28         cmake_src_prepare
30         local f=CMakeLists.txt
32         sed -i \
33                 -e '/set(CMAKE_C_FLAGS/d' \
34                 -e "/LIBDIR.*frei0r-1/s:lib:$(get_libdir):" \
35                 ${f} || die
37         # https://bugs.gentoo.org/418243
38         sed -i \
39                 -e '/set.*CMAKE_C_FLAGS/s:"): ${CMAKE_C_FLAGS}&:' \
40                 src/filter/*/${f} || die
43 src_configure() {
44         local mycmakeargs=(
45                 -DWITHOUT_OPENCV=$(usex !facedetect)
46                 -DWITHOUT_GAVL=$(usex !scale0tilt)
47         )
48         cmake-multilib_src_configure
51 src_compile() {
52         cmake-multilib_src_compile
53         use doc && docs_compile