sys-power/upower: Fix build with USE=-doc

Closes: https://bugs.gentoo.org/835696
Signed-off-by: Matt Turner <mattst88@gentoo.org>
This commit is contained in:
Matt Turner
2022-03-20 15:37:23 -07:00
parent 0f32de6855
commit f105cddfad
2 changed files with 64 additions and 0 deletions

View File

@@ -0,0 +1,60 @@
https://gitlab.freedesktop.org/upower/upower/-/merge_requests/123
From 1003d5c2a69e6c28dcf68adf10181b5180b5defa Mon Sep 17 00:00:00 2001
From: Matt Turner <mattst88@gmail.com>
Date: Sun, 20 Mar 2022 15:32:55 -0700
Subject: [PATCH] meson: Don't search for gtk-doc if disabled
---
doc/meson.build | 38 ++++++++++++++++++++------------------
1 file changed, 20 insertions(+), 18 deletions(-)
diff --git a/doc/meson.build b/doc/meson.build
index dc93a16..5fc253c 100644
--- a/doc/meson.build
+++ b/doc/meson.build
@@ -27,21 +27,23 @@ version_xml = configure_file(
input: 'version.xml.in',
configuration: cdata)
-gnome.gtkdoc('UPower',
- main_xml: 'upower-docs.xml',
- src_dir: meson.source_root() / 'libupower-glib',
- dependencies: [ libupower_glib_dep ],
- scan_args: ['--rebuild-types', '--rebuild-sections'],
- content_files: [
- version_xml,
- ifaces_refs,
- 'man/UPower.xml',
- 'man/upowerd.xml',
- 'man/upower.xml',
- '../COPYING',
- ],
- ignore_headers: [
- 'config.h',
- ],
- install: get_option('gtk-doc')
-)
+if get_option('gtk-doc')
+ gnome.gtkdoc('UPower',
+ main_xml: 'upower-docs.xml',
+ src_dir: meson.source_root() / 'libupower-glib',
+ dependencies: [ libupower_glib_dep ],
+ scan_args: ['--rebuild-types', '--rebuild-sections'],
+ content_files: [
+ version_xml,
+ ifaces_refs,
+ 'man/UPower.xml',
+ 'man/upowerd.xml',
+ 'man/upower.xml',
+ '../COPYING',
+ ],
+ ignore_headers: [
+ 'config.h',
+ ],
+ install: true
+ )
+endif
--
2.34.1

View File

@@ -44,6 +44,10 @@ S="${WORKDIR}/${PN}-v${PV}"
QA_MULTILIB_PATHS="usr/lib/${PN}/.*"
PATCHES=(
"${FILESDIR}"/${P}-meson-Don-t-search-for-gtk-doc-if-disabled.patch
)
src_prepare() {
default
xdg_environment_reset