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
This commit is contained in:
Patrick Griffis 2018-07-26 09:53:29 -04:00
parent 57478b6575
commit cadc51ede9
2 changed files with 18 additions and 13 deletions

View File

@ -3,6 +3,7 @@ metainfodir = join_paths(get_option('datadir'), 'metainfo')
desktop_utils = find_program('desktop-file-validate', required: false)
if get_option('with-gtk')
if get_option('with-appdata')
hexchat_appdata = i18n.merge_file(
input: 'io.github.Hexchat.appdata.xml.in',
output: 'io.github.Hexchat.appdata.xml',
@ -17,6 +18,7 @@ if get_option('with-gtk')
args: ['validate-relax', hexchat_appdata]
)
endif
endif
desktop_conf = configuration_data()
if get_option('with-dbus')
@ -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

View File

@ -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',