summaryrefslogtreecommitdiff
blob: 99c2cfce7b2b50d28eabd5078579a0ffe0e9ad97 (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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI="5"
GCONF_DEBUG="no"
VALA_MIN_API_VERSION="0.26"

inherit gnome2 vala virtualx
if [[ ${PV} = 9999 ]]; then
	inherit gnome2-live
fi

DESCRIPTION="A cheesy program to take pictures and videos from your webcam"
HOMEPAGE="https://wiki.gnome.org/Apps/Cheese"

LICENSE="GPL-2+"
SLOT="0/7" # subslot = libcheese soname version
IUSE="+introspection test"
if [[ ${PV} = 9999 ]]; then
	IUSE="${IUSE} doc"
	KEYWORDS=""
else
	KEYWORDS="~amd64 ~arm ~ia64 ~ppc ~ppc64 ~x86"
fi

# using clutter-gst-2.0.0 results in GLSL errors; bug #478702
COMMON_DEPEND="
	>=dev-libs/glib-2.39.90:2
	>=x11-libs/gtk+-3.13.4:3[introspection?]
	>=gnome-base/gnome-desktop-2.91.6:3=
	>=media-libs/libcanberra-0.26[gtk3]
	>=media-libs/clutter-1.13.2:1.0[introspection?]
	>=media-libs/clutter-gtk-0.91.8:1.0
	>=media-libs/clutter-gst-2.0.6:2.0
	media-libs/cogl:1.0=[introspection?]

	media-video/gnome-video-effects
	x11-libs/gdk-pixbuf:2[jpeg,introspection?]
	x11-libs/libX11
	x11-libs/libXtst

	media-libs/gstreamer:1.0[introspection?]
	media-libs/gst-plugins-base:1.0[introspection?,ogg,pango,theora,vorbis,X]

	virtual/libgudev:=
	introspection? ( >=dev-libs/gobject-introspection-0.6.7 )
"
RDEPEND="${COMMON_DEPEND}
	media-libs/gst-plugins-bad:1.0
	media-libs/gst-plugins-good:1.0

	media-plugins/gst-plugins-jpeg:1.0
	media-plugins/gst-plugins-v4l2:1.0
	media-plugins/gst-plugins-vpx:1.0
"
DEPEND="${COMMON_DEPEND}
	$(vala_depend)
	app-text/docbook-xml-dtd:4.3
	app-text/yelp-tools
	dev-libs/appstream-glib
	dev-libs/libxml2:2
	dev-util/gdbus-codegen
	>=dev-util/gtk-doc-am-1.14
	>=dev-util/intltool-0.50
	virtual/pkgconfig
	x11-proto/xf86vidmodeproto
	test? ( dev-libs/glib:2[utils] )
"

if [[ ${PV} = 9999 ]]; then
	DEPEND="${DEPEND}
		doc? ( >=dev-util/gtk-doc-1.14 )"
fi

src_prepare() {
	gnome2-live_src_prepare
	vala_src_prepare
}

src_configure() {
	local myconf=""
	[[ ${PV} != 9999 ]] && myconf="ITSTOOL=$(type -P true)"

	gnome2_src_configure \
		GST_INSPECT=$(type -P true) \
		$(use_enable introspection) \
		--disable-lcov \
		--disable-static \
		${myconf}
}

src_compile() {
	# Clutter-related sandbox violations when USE="doc introspection" and
	# FEATURES="-userpriv" (see bug #385917).
	unset DISPLAY
	gnome2_src_compile
}

src_test() {
	Xemake check
}