void-packages/srcpkgs/libportal/patches/optional_docs.patch

36 lines
1.0 KiB
Diff

From b7157e5d0c80981c74acfc7258683e84969649b0 Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Wed, 18 Mar 2020 16:11:41 +0100
Subject: [PATCH] build: Make docs building optional
---
meson.build | 4 +++-
meson_options.txt | 3 ++-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/meson.build b/meson.build
index 3ca0fb3..49fa112 100644
--- meson.build
+++ meson.build
@@ -25,7 +25,9 @@ top_inc = include_directories('.')
libportal_inc = include_directories('libportal')
subdir('libportal')
-subdir('doc')
+if get_option('gtk_doc')
+ subdir('doc')
+endif
if get_option('build-portal-test')
subdir('portal-test')
endif
diff --git a/meson_options.txt b/meson_options.txt
index f138e4f..8501dc9 100644
--- meson_options.txt
+++ meson_options.txt
@@ -1,3 +1,4 @@
option('build-portal-test', type: 'boolean', value: false,
description : 'Build the portal-test application')
-
+option('gtk_doc', type: 'boolean', value: true,
+ description : 'Build API reference with gtk-doc')