distribution/packages/devel/shared-mime-info/patches/shared-mime-info-999.01-disable-spec-generation.patch

58 lines
1.7 KiB
Diff

From baeb49e36bc162bcbd243e733d2a9f1eb9abfefb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ville=20Skytt=C3=A4?= <ville.skytta@iki.fi>
Date: Sun, 24 Jan 2021 11:45:52 +0200
Subject: [PATCH] meson: make xmlto optional, build spec only if found
Refs https://gitlab.freedesktop.org/xdg/shared-mime-info/-/issues/150
---
data/meson.build | 22 ++++++++++++----------
meson.build | 2 +-
2 files changed, 13 insertions(+), 11 deletions(-)
diff --git a/data/meson.build b/data/meson.build
index 263567d..24361c9 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -22,14 +22,16 @@ install_data(
install_dir : get_option('datadir') / 'gettext/its'
)
-custom_target('shared-mime-info-spec-html',
- input : 'shared-mime-info-spec.xml',
- output: 'shared-mime-info-spec-html',
- command: [
- xmlto,
- '-o', '@OUTPUT@',
- 'html-nochunks',
- '@INPUT@',
- ],
- build_by_default: true,
+if xmlto.found()
+ custom_target('shared-mime-info-spec-html',
+ input : 'shared-mime-info-spec.xml',
+ output: 'shared-mime-info-spec-html',
+ command: [
+ xmlto,
+ '-o', '@OUTPUT@',
+ 'html-nochunks',
+ '@INPUT@',
+ ],
+ build_by_default: true,
)
+endif
diff --git a/meson.build b/meson.build
index 9a28573..0d08c8a 100644
--- a/meson.build
+++ b/meson.build
@@ -22,7 +22,7 @@ config.set_quoted('VERSION', meson.project_version())
itstool = find_program('itstool')
xmllint = find_program('xmllint')
-xmlto = find_program('xmlto')
+xmlto = find_program('xmlto', required: false)
###############################################################################
# Find xdgmime
--
GitLab