1SUMMARY = "A Gtk client and libraries for SPICE remote desktop servers."
2HOMEPAGE = "https://spice-space.org"
3LICENSE = "LGPL-2.1-only & BSD-3-Clause & GPL-2.0-only"
4LIC_FILES_CHKSUM = " \
5	file://COPYING;md5=4fbd65380cdd255951079008b364516c \
6	file://subprojects/spice-common/COPYING;md5=4b54a1fd55a448865a0b32d41598759d \
7	file://subprojects/keycodemapdb/LICENSE.BSD;md5=5ae30ba4123bc4f2fa49aa0b0dce887b \
8	file://subprojects/keycodemapdb/LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \
9"
10
11SRCREV = "f04479c16f0969fb394ebe74b6eff74e560a42f0"
12
13SRC_URI = "gitsm://gitlab.freedesktop.org/spice/spice-gtk.git;protocol=https;branch=master"
14
15S = "${WORKDIR}/git"
16
17DEPENDS = " \
18	${@bb.utils.filter('DISTRO_FEATURES', 'polkit', d)} \
19	${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland wayland-native wayland-protocols', '', d)} \
20	acl \
21	cyrus-sasl \
22	gstreamer1.0 \
23	gstreamer1.0-plugins-base \
24	gstreamer1.0-vaapi \
25	gtk+3 \
26	jpeg \
27	json-glib \
28	libcap-ng \
29	libepoxy \
30	libopus \
31	libusb1 \
32	lz4 \
33	pixman \
34	python3-pyparsing-native \
35	python3-six-native \
36	spice-protocol \
37	usbredir \
38	usbutils \
39	zlib \
40"
41DEPENDS:append:libc-musl = " libucontext"
42
43RDEPENDS:${PN} = "python3-pyparsing python3-six hwdata"
44
45inherit meson pkgconfig vala gobject-introspection features_check gtk-doc
46
47REQUIRED_DISTRO_FEATURES = "opengl"
48
49GIR_MESON_ENABLE_FLAG = 'enabled'
50GIR_MESON_DISABLE_FLAG = 'disabled'
51GTKDOC_MESON_OPTION = 'gtk_doc'
52GTKDOC_MESON_ENABLE_FLAG = 'enabled'
53GTKDOC_MESON_DISABLE_FLAG = 'disabled'
54
55do_configure:prepend() {
56	echo ${PV} > ${S}/.tarball-version
57}
58
59PACKAGECONFIG ??= "${@bb.utils.contains('GI_DATA_ENABLED', 'True', 'vapi', '', d)} smartcard"
60PACKAGECONFIG[vapi] = "-Dvapi=enabled,-Dvapi=disabled"
61PACKAGECONFIG[smartcard] = "-Dsmartcard=enabled,-Dsmartcard=disabled,libcacard"
62PACKAGECONFIG[webdav] = "-Dwebdav=enabled,-Dwebdav=disabled,phodav libsoup"
63
64EXTRA_OEMESON = "-Dpie=true -Dusb-ids-path=${datadir}/hwdata/usb.ids "
65EXTRA_OEMESON:append:libc-musl = " -Dcoroutine=libucontext"
66
67LDFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld', ' -Wl,--undefined-version', '', d)}"
68
69FILES:${PN} += "${datadir}"
70