--- /dev/null
+From 23f54c2a1e8718e836224d68dafded091604a677 Mon Sep 17 00:00:00 2001
+From: Mart Raudsepp <leio@gentoo.org>
+Date: Thu, 20 Feb 2020 12:15:33 +0200
+Subject: [PATCH] build: Always build gupnp-binding-tool manpage
+
+manpage generation shouldn't be dependent on gtk_doc option
+---
+ doc/meson.build | 2 ++
+ meson.build | 5 +----
+ 2 files changed, 3 insertions(+), 4 deletions(-)
+
+diff --git a/doc/meson.build b/doc/meson.build
+index 478650b..b71b657 100644
+--- a/doc/meson.build
++++ b/doc/meson.build
+@@ -4,6 +4,7 @@ version_xml = configure_file(input: 'version.xml.in',
+ output: 'version.xml', configuration:
+ entities)
+
++if get_option('gtk_doc')
+ gnome.gtkdoc('gupnp',
+ main_xml : 'gupnp-docs.xml',
+ src_dir : [join_paths(meson.source_root(), 'libgupnp'),
+@@ -26,6 +27,7 @@ gnome.gtkdoc('gupnp',
+ 'gupnp-types-private.h'
+ ],
+ install : true)
++endif
+
+ xsltproc = find_program('xsltproc', required: false)
+ if xsltproc.found()
+diff --git a/meson.build b/meson.build
+index e0dce33..eb3c82d 100644
+--- a/meson.build
++++ b/meson.build
+@@ -31,15 +31,12 @@ dependencies = [
+ subdir('libgupnp')
+ subdir('tests')
+ subdir('tools')
++subdir('doc')
+
+ if get_option('vapi') and get_option('introspection')
+ subdir('vala')
+ endif
+
+-if get_option('gtk_doc')
+- subdir('doc')
+-endif
+-
+ if get_option('examples')
+ subdir('examples')
+ endif
+--
+2.20.1
+
--- /dev/null
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+VALA_USE_DEPEND="vapigen"
+PYTHON_COMPAT=( python3_{6,7,8} )
+PYTHON_REQ_USE="xml"
+
+inherit gnome.org meson multilib-minimal python-single-r1 vala xdg
+
+DESCRIPTION="An object-oriented framework for creating UPnP devs and control points"
+HOMEPAGE="https://wiki.gnome.org/Projects/GUPnP"
+
+LICENSE="LGPL-2+ GPL-2+" # gupnp-binding-tool is GPL-2+
+SLOT="0/1.2-0" # <API version>-<soname>
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+
+IUSE="connman gtk-doc +introspection kernel_linux networkmanager vala"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}
+ ?? ( connman networkmanager )
+"
+
+# prefix: uuid dependency can be adapted to non-linux platforms
+RDEPEND="${PYTHON_DEPS}
+ >=dev-libs/glib-2.58:2[${MULTILIB_USEDEP}]
+ >=net-libs/gssdp-1.1.3:0=[introspection?,${MULTILIB_USEDEP}]
+ >=net-libs/libsoup-2.48.0:2.4[introspection?,${MULTILIB_USEDEP}]
+ >=dev-libs/libxml2-2.9.1-r4[${MULTILIB_USEDEP}]
+ >=sys-apps/util-linux-2.24.1-r3[${MULTILIB_USEDEP}]
+ introspection? ( >=dev-libs/gobject-introspection-1.54:= )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ dev-util/glib-utils
+ gtk-doc? ( >=dev-util/gtk-doc-1.14
+ app-text/docbook-xml-dtd:4.1.2
+ app-text/docbook-xml-dtd:4.2 )
+ dev-libs/libxslt
+ app-text/docbook-xsl-stylesheets
+ >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]
+ !connman? ( !networkmanager? ( kernel_linux? ( sys-kernel/linux-headers ) ) )
+ vala? ( $(vala_depend)
+ net-libs/gssdp:0[vala]
+ net-libs/libsoup:2.4[vala]
+ )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PV}-build-manpage.patch # https://gitlab.gnome.org/GNOME/gupnp/merge_requests/5
+)
+
+src_prepare() {
+ use introspection && vala_src_prepare
+ xdg_src_prepare
+}
+
+multilib_src_configure() {
+ local backend=system
+ use kernel_linux && backend=linux
+ use connman && backend=connman
+ use networkmanager && backend=network-manager
+
+ local emesonargs=(
+ -Dcontext_manager=${backend}
+ -Dintrospection=$(multilib_native_usex introspection true false)
+ -Dvapi=$(multilib_native_usex vala true false)
+ -Dgtk_doc=$(multilib_native_usex gtk-doc true false)
+ -Dexamples=false
+ )
+ meson_src_configure
+}
+
+multilib_src_compile() {
+ meson_src_compile
+}
+
+multilib_src_test() {
+ meson_src_test
+}
+
+multilib_src_install() {
+ meson_src_install
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ python_fix_shebang "${ED}"/usr/bin/gupnp-binding-tool-1.2
+}