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

EAPI=8

inherit gnome.org meson-multilib vala xdg

DESCRIPTION="GObject-based API for handling resource discovery and announcement over SSDP"
HOMEPAGE="https://wiki.gnome.org/Projects/GUPnP https://gitlab.gnome.org/GNOME/gssdp"

LICENSE="LGPL-2+"
SLOT="1.6/1.6-0" # <API version>-<soname>
KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~loong ~ppc ppc64 ~riscv ~sparc x86"
IUSE="gtk gtk-doc +introspection man +vala"
REQUIRED_USE="
	gtk-doc? ( introspection )
	vala? ( introspection )
"

# has file collision with Slot 0 (/usr/bin/gssdp-device-sniffer), so we remove that from this build
# and depend on the other slot that has the file as well
RDEPEND="
	>=dev-libs/glib-2.70:2[${MULTILIB_USEDEP}]
	>=net-libs/libsoup-2.99.0:3.0[${MULTILIB_USEDEP},introspection?]
	gtk? ( gui-libs/gtk:4 )
	introspection? ( >=dev-libs/gobject-introspection-1.54:= )
	man? ( virtual/pandoc )
	>=net-libs/gssdp-1.4:0
"
DEPEND="${RDEPEND}"
BDEPEND="
	gtk-doc? (
		>=dev-util/gi-docgen-2021.1
		app-text/docbook-xml-dtd:4.1.2
	)
	virtual/pkgconfig
	vala? (
		$(vala_depend)
		net-libs/libsoup:3.0[vala]
	)
"

src_prepare() {
	default
	use vala && vala_setup
}

multilib_src_configure() {
	local emesonargs=(
		# Never use gi-docgen subproject
		--wrap-mode nofallback

		$(meson_native_use_bool gtk-doc gtk_doc)
		$(meson_native_use_bool gtk sniffer)
		$(meson_native_use_bool introspection)
		$(meson_native_use_bool man manpages)
		$(meson_native_use_bool vala vapi)
		-Dexamples=false
	)
	meson_src_configure
}

multilib_src_install_all() {
	if use gtk-doc ; then
		mkdir "${ED}"/usr/share/gtk-doc || die
		mv "${ED}"/usr/share/{doc,gtk-doc}/gssdp-1.6 || die
	fi

	if use gtk; then
		rm "${ED}"/usr/bin/gssdp-device-sniffer || die # because of file collision with slot 0
	fi
}