summaryrefslogtreecommitdiff
path: root/media-video/guvcview/guvcview-2.0.6-r10.ebuild
blob: 6006b5bc01a41aab791d3a9d15c2c916a846a51a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=6

inherit autotools flag-o-matic qmake-utils toolchain-funcs

MY_P=${PN}-src-${PV}

DESCRIPTION="Simple Qt5 or GTK+3 interface for capturing and viewing video from v4l2 devices"
HOMEPAGE="http://guvcview.sourceforge.net/"
SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"

LICENSE="GPL-3"
SLOT="0"
KEYWORDS="amd64 x86"
IUSE="gsl libav pulseaudio qt5"

RDEPEND="
	>=dev-libs/glib-2.10
	media-libs/libpng:0=
	media-libs/libsdl2
	media-libs/libv4l
	>=media-libs/portaudio-19_pre
	media-video/ffmpeg
	virtual/libusb:1
	virtual/udev
	gsl? ( >=sci-libs/gsl-1.15 )
	!libav? ( >=media-video/ffmpeg-2.8:0= )
	libav? ( media-video/libav:= )
	pulseaudio? ( >=media-sound/pulseaudio-0.9.15 )
	qt5? (
		dev-qt/qtcore:5
		dev-qt/qtgui:5
		dev-qt/qtwidgets:5
	)
	!qt5? ( >=x11-libs/gtk+-3.6:3 )
"
# linux-headers: bug 448260
DEPEND="${RDEPEND}
	dev-util/intltool
	sys-devel/autoconf-archive
	sys-devel/gettext
	>=sys-kernel/linux-headers-3.4-r2
	virtual/os-headers
	virtual/pkgconfig
"

PATCHES=( "${FILESDIR}/${PN}-use-theme-icon.patch" )

S="${WORKDIR}/${MY_P}"

src_prepare() {
	default
	sed -i '/^docdir/,/^$/d' Makefile.am || die
	echo "guvcview/gui_qt5_audioctrls.cpp" >> po/POTFILES.skip || die # bug 630984
	eautoreconf
}

src_configure() {
	export MOC="$(qt5_get_bindir)/moc"
	use qt5 && append-cxxflags -std=c++11
	# 599030
	tc-export CC CXX

	local myeconfargs=(
		--disable-debian-menu
		--disable-static
		$(use_enable gsl)
		$(use_enable pulseaudio pulse)
		$(use_enable qt5)
		$(use_enable !qt5 gtk3)
	)
	econf "${myeconfargs[@]}"
}

src_install() {
	default
	find "${D}" -name '*.la' -delete || die
}