dev-qt/qtgraphicaleffects: stable 5.14.2 for ppc, bug #719732
[gentoo.git] / media-tv / v4l-utils / v4l-utils-1.16.3.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="~alpha ~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86"
14 IUSE="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         virtual/libelf:=
26         !media-tv/v4l2-ctl
27         !<media-tv/ivtv-utils-1.4.0-r2"
28 DEPEND="${RDEPEND}"
29 BDEPEND="
30         sys-devel/gettext
31         virtual/pkgconfig"
32
33 src_configure() {
34         if use qt5; then
35                 append-cxxflags -std=c++11
36                 local qt5_paths=( \
37                         MOC="$(pkg-config --variable=host_bins Qt5Core)/moc" \
38                         UIC="$(pkg-config --variable=host_bins Qt5Core)/uic" \
39                         RCC="$(pkg-config --variable=host_bins Qt5Core)/rcc" \
40                 )
41                 if use !opengl; then
42                         sed -e 's/Qt5OpenGL/DiSaBlEd/g' -i configure || die
43                 fi
44         fi
45         # Hard disable the flags that apply only to the libs.
46         econf \
47                 --disable-static \
48                 $(use_enable qt5 qv4l2) \
49                 $(use_enable qt5 qvidcap) \
50                 --with-udevdir="$(get_udevdir)" \
51                 --with-jpeg \
52                 "${qt5_paths[@]}"
53 }
54
55 src_install() {
56         emake -C utils DESTDIR="${D}" install
57         emake -C contrib DESTDIR="${D}" install
58
59         dodoc README
60         newdoc utils/libv4l2util/TODO TODO.libv4l2util
61         newdoc utils/libmedia_dev/README README.libmedia_dev
62         newdoc utils/dvb/README README.dvb
63         newdoc utils/v4l2-compliance/fixme.txt fixme.txt.v4l2-compliance
64 }
65
66 pkg_postinst() { xdg_icon_cache_update; }
67 pkg_postrm() { xdg_icon_cache_update; }