aboutsummaryrefslogtreecommitdiff
blob: e46a51d2a88236253c579226792765b225b948b4 (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
104
105
106
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8
VALA_USE_DEPEND="vapigen"

inherit vala meson gnome2-utils optfeature virtualx xdg

MY_PN="${PN#gnome-}"
LCU_COMMIT="619dd91561ad470db3d0e0e263ebc35d787afd2e"
DESCRIPTION="Phone dialer and call handler"
HOMEPAGE="https://gitlab.gnome.org/GNOME/calls"
GITLAB="https://gitlab.gnome.org"
SRC_URI="
	${GITLAB}/GNOME/${MY_PN}/-/archive/v${PV}/${MY_PN}-v${PV}.tar.bz2
	${GITLAB}/World/Phosh/libcall-ui/-/archive/${LCU_COMMIT}/libcall-ui-${LCU_COMMIT}.tar.bz2
"
S="${WORKDIR}/${MY_PN}-v${PV}"

LICENSE="CC-BY-SA-4.0 GPL-3+ LGPL-2+ LGPL-2.1+"
SLOT="0"
KEYWORDS="~amd64 ~arm64"
IUSE="gtk-doc man"

COMMON_DEPEND="
	app-crypt/libsecret[introspection(+),vala(+)]
	dev-libs/feedbackd[introspection(+),vala(+)]
	dev-libs/folks:=
	dev-libs/glib:2
	dev-libs/gom[introspection(+)]
	dev-libs/libgee:0.8=[introspection(+)]
	dev-libs/libpeas
	gnome-extra/evolution-data-server:=[vala(+)]
	>=gui-libs/libhandy-1.0.0:1[introspection(+),vala(+)]
	media-libs/gstreamer:1.0[introspection(+)]
	>=media-sound/callaudiod-0.0.5
	net-libs/sofia-sip
	>=net-misc/modemmanager-1.12.0:=[introspection(+)]
	x11-libs/gtk+:3
"
DEPEND="${COMMON_DEPEND}
	test? ( media-plugins/gst-plugins-srtp:1.0 )
"
RDEPEND="${COMMON_DEPEND}
	virtual/secret-service
"
BDEPEND="
	$(vala_depend)
	dev-libs/gobject-introspection
	dev-libs/protobuf
	dev-util/wayland-scanner
	gtk-doc? ( dev-util/gtk-doc )
	man? ( dev-python/docutils )
"

src_unpack() {
	default

	rm -r "${S}"/subprojects/libcall-ui || die
	mv "${WORKDIR}"/libcall-ui-${LCU_COMMIT} "${S}"/subprojects/libcall-ui || die
}

src_prepare() {
	default
	vala_setup
}

src_configure() {
	local emesonargs=(
		$(meson_use gtk-doc gtk_doc)
		$(meson_use man manpages)
		$(meson_use test tests)
	)
	meson_src_configure
}

src_test() {
	local tests=(
		calls:util
		calls:settings
		calls:origin
		calls:provider
		calls:call
		calls:plugins
		calls:contacts
		calls:ui-call
		calls:manager
		calls:ringer
		calls:media
		calls:srtp
		calls:sdp-crypto
	)
	virtx meson_src_test "${tests[@]}"
}

pkg_postinst() {
	xdg_pkg_postinst
	gnome2_schemas_update

	optfeature "SRTP support" media-plugins/gst-plugins-srtp
}

pkg_postrm() {
	xdg_pkg_postrm
	gnome2_schemas_update
}