summaryrefslogtreecommitdiff
blob: ea48d52effb92889374f40512878df05a82353c5 (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
103
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit gnome.org gnome2-utils meson vala virtualx xdg

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

LICENSE="GPL-2+"
SLOT="0/8" # subslot = libcheese soname version
KEYWORDS="amd64 ~arm arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc x86"
IUSE="gtk-doc +introspection test"
RESTRICT="!test? ( test )"

DEPEND="
	>=media-libs/clutter-1.13.2:1.0[introspection?]
	media-libs/clutter-gst:3.0
	>=media-libs/clutter-gtk-0.91.8:1.0
	x11-libs/gdk-pixbuf:2[jpeg,introspection?]
	>=dev-libs/glib-2.39.90:2
	>=gnome-base/gnome-desktop-2.91.6:3=
	>=media-libs/gstreamer-1.4:1.0[introspection?]
	>=media-libs/gst-plugins-base-1.4:1.0[ogg,pango,theora,vorbis]
	>=media-libs/gst-plugins-bad-1.4:1.0
	>=x11-libs/gtk+-3.13.4:3
	|| (
		media-libs/libcanberra-gtk3
		>=media-libs/libcanberra-0.26[gtk3(-)]
	)
	x11-libs/libX11
	sys-apps/dbus
	media-video/gnome-video-effects
	introspection? ( >=dev-libs/gobject-introspection-1.56:= )

	media-libs/cogl:1.0=[introspection?]

"
RDEPEND="${DEPEND}
	>=media-libs/gst-plugins-good-1.4:1.0

	>=media-plugins/gst-plugins-jpeg-1.4:1.0
	|| (
		>=media-plugins/gst-plugins-v4l2-1.4:1.0
		media-video/pipewire[gstreamer,v4l]
	)
	>=media-plugins/gst-plugins-vpx-1.4:1.0
"

BDEPEND="
	gtk-doc? ( dev-util/gtk-doc )
	dev-libs/libxslt
	app-text/docbook-xml-dtd:4.3
	dev-util/itstool
	dev-libs/appstream-glib
	dev-libs/libxml2:2
	dev-util/glib-utils
	>=sys-devel/gettext-0.19.8
	virtual/pkgconfig
	x11-base/xorg-proto
	test? ( x11-libs/libXtst )
	$(vala_depend)
"

PATCHES=(
	"${FILESDIR}"/${PN}-43.0-buildfix.patch
)

src_prepare() {
	default
	vala_setup
	xdg_environment_reset
}

src_configure() {
	local emesonargs=(
		$(meson_use gtk-doc gtk_doc)
		$(meson_use introspection)
		$(meson_use test tests)
		-Dman=true
	)

	meson_src_configure

	# Hack: version.xml is not generated if gtk-doc is not enabled
	echo ${PV} > docs/reference/version.xml
}

src_test() {
	gnome2_environment_reset # Avoid dconf that looks at XDG_DATA_DIRS, which can sandbox fail if flatpak is installed
	virtx meson_src_test
}

pkg_postinst() {
	xdg_pkg_postinst
	gnome2_schemas_update
}

pkg_postrm() {
	xdg_pkg_postrm
	gnome2_schemas_update
}