dev-qt/qtgraphicaleffects: stable 5.14.2 for ppc, bug #719732
[gentoo.git] / media-tv / v4l-utils / v4l-utils-1.16.3-r1.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5 inherit flag-o-matic udev xdg-utils
6
7 DESCRIPTION="Separate utilities ebuild from upstream v4l-utils package"
8 HOMEPAGE="https://git.linuxtv.org/v4l-utils.git"
9 SRC_URI="https://linuxtv.org/downloads/v4l-utils/${P}.tar.bz2"
10
11 LICENSE="GPL-2+ LGPL-2.1+"
12 SLOT="0"
13 KEYWORDS="amd64 ~arm ~arm64 ~ppc64 ~sparc x86"
14 IUSE="+bpf opengl qt5"
15
16 RDEPEND=">=media-libs/libv4l-${PV}[jpeg]
17         qt5? (
18                 dev-qt/qtcore:5
19                 dev-qt/qtgui:5
20                 opengl? ( dev-qt/qtopengl:5[-gles2(-)] virtual/opengl )
21                 media-libs/alsa-lib
22         )
23         virtual/libudev
24         >=virtual/jpeg-0-r2:0=
25         bpf? ( virtual/libelf:= )
26         !media-tv/v4l2-ctl
27         !<media-tv/ivtv-utils-1.4.0-r2"
28 DEPEND="${RDEPEND}"
29 BDEPEND="
30         bpf? ( sys-devel/clang:*[llvm_targets_BPF] )
31         sys-devel/gettext
32         virtual/pkgconfig"
33
34 src_configure() {
35         if use qt5; then
36                 append-cxxflags -std=c++11
37                 local qt5_paths=( \
38                         MOC="$(pkg-config --variable=host_bins Qt5Core)/moc" \
39                         UIC="$(pkg-config --variable=host_bins Qt5Core)/uic" \
40                         RCC="$(pkg-config --variable=host_bins Qt5Core)/rcc" \
41                 )
42                 if use !opengl; then
43                         sed -e 's/Qt5OpenGL/DiSaBlEd/g' -i configure || die
44                 fi
45         fi
46         # Hard disable the flags that apply only to the libs.
47         econf \
48                 --disable-static \
49                 $(use_enable qt5 qv4l2) \
50                 $(use_enable qt5 qvidcap) \
51                 $(use_enable bpf) \
52                 --with-udevdir="$(get_udevdir)" \
53                 --with-jpeg \
54                 "${qt5_paths[@]}"
55 }
56
57 src_install() {
58         emake -C utils DESTDIR="${D}" install
59         emake -C contrib DESTDIR="${D}" install
60
61         dodoc README
62         newdoc utils/libv4l2util/TODO TODO.libv4l2util
63         newdoc utils/libmedia_dev/README README.libmedia_dev
64         newdoc utils/dvb/README README.dvb
65         newdoc utils/v4l2-compliance/fixme.txt fixme.txt.v4l2-compliance
66 }
67
68 pkg_postinst() { xdg_icon_cache_update; }
69 pkg_postrm() { xdg_icon_cache_update; }