Skip to content
This repository has been archived by the owner on Feb 10, 2024. It is now read-only.

Commit

Permalink
build: Add with-appdata option
Browse files Browse the repository at this point in the history
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
  • Loading branch information
TingPing committed Jul 26, 2018
1 parent 57478b6 commit cadc51e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 13 deletions.
28 changes: 15 additions & 13 deletions data/misc/meson.build
Expand Up @@ -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()
Expand Down Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions meson_options.txt
Expand Up @@ -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',
Expand Down

0 comments on commit cadc51e

Please sign in to comment.