app-metrics/prometheus: add 3.1.0
[gentoo/gentoo.git] / media-plugins / frei0r-plugins / frei0r-plugins-1.8.0.ebuild
blobb2ec555e12559dbdf1cf19347ddaf894d0624ab7
1 # Copyright 1999-2023 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 ~loong 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 )
26 src_prepare() {
27         cmake_src_prepare
29         local f=CMakeLists.txt
31         sed -i \
32                 -e '/set(CMAKE_C_FLAGS/d' \
33                 -e "/LIBDIR.*frei0r-1/s:lib:$(get_libdir):" \
34                 ${f} || die
36         # https://bugs.gentoo.org/418243
37         sed -i \
38                 -e '/set.*CMAKE_C_FLAGS/s:"): ${CMAKE_C_FLAGS}&:' \
39                 src/filter/*/${f} || die
42 src_configure() {
43         local mycmakeargs=(
44                 -DWITHOUT_OPENCV=$(usex !facedetect)
45                 -DWITHOUT_GAVL=$(usex !scale0tilt)
46         )
47         cmake-multilib_src_configure
50 src_compile() {
51         cmake-multilib_src_compile
52         use doc && docs_compile