summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorPatrick Griffis <tingping@tingping.se>2018-07-26 09:53:29 -0400
committerPatrick Griffis <tingping@tingping.se>2018-07-26 09:53:29 -0400
commitcadc51ede9c390820552a597f3415db38f7b7818 (patch)
treed799a5ffadc5a7bf9bc0a9443cb81d0bbb4aa3e9
parent57478b65758e6b697b1d82ce21075e74aa475efc (diff)
build: Add with-appdata option
This is mostly useful to avoid a newer gettext dependency
for translating the appdata file but it is also just useless
data for some distros without any app store.

Closes #2219
-rw-r--r--data/misc/meson.build28
-rw-r--r--meson_options.txt3
2 files changed, 18 insertions, 13 deletions
diff --git a/data/misc/meson.build b/data/misc/meson.build
index 02d6bf25..f7f1c27f 100644
--- a/data/misc/meson.build
+++ b/data/misc/meson.build
@@ -3,19 +3,21 @@ metainfodir = join_paths(get_option('datadir'), 'metainfo')
 desktop_utils = find_program('desktop-file-validate', required: false)
 
 if get_option('with-gtk')
-  hexchat_appdata = i18n.merge_file(
-    input: 'io.github.Hexchat.appdata.xml.in',
-    output: 'io.github.Hexchat.appdata.xml',
-    po_dir: '../../po',
-    install: true,
-    install_dir: metainfodir
-  )
-
-  appstream_util = find_program('appstream-util', required: false)
-  if appstream_util.found()
-    test('Validate io.github.Hexchat.appdata.xml', appstream_util,
-      args: ['validate-relax', hexchat_appdata]
+  if get_option('with-appdata')
+    hexchat_appdata = i18n.merge_file(
+      input: 'io.github.Hexchat.appdata.xml.in',
+      output: 'io.github.Hexchat.appdata.xml',
+      po_dir: '../../po',
+      install: true,
+      install_dir: metainfodir
     )
+
+    appstream_util = find_program('appstream-util', required: false)
+    if appstream_util.found()
+      test('Validate io.github.Hexchat.appdata.xml', appstream_util,
+        args: ['validate-relax', hexchat_appdata]
+      )
+    endif
   endif
 
   desktop_conf = configuration_data()
@@ -68,7 +70,7 @@ if get_option('with-theme-manager')
   )
 endif
 
-if get_option('with-plugin')
+if get_option('with-plugin') and get_option('with-appdata')
   plugin_metainfo = []
 
   # FIXME: These should all get translated somewhere
diff --git a/meson_options.txt b/meson_options.txt
index 23f4fd10..100a5ee7 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -28,6 +28,9 @@ option('with-theme-manager', type: 'boolean', value: false,
 option('dbus-service-use-appid', type: 'boolean', value: false,
   description: 'Rename dbus service to match app-id, required for Flatpak'
 )
+option('with-appdata', type: 'boolean',
+  description: 'Install appdata files for app stores'
+)
 
 # Plugins
 option('with-checksum', type: 'boolean',