From 8a89e22e8ea293cc03e741635d0e75625081ece5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Thu, 5 Mar 2020 14:28:21 +0100 Subject: [PATCH] build: Use fixed gettext domain for non-subproject extension-tool builds Clarify how the option is supposed to be used by - ignoring it for non-subproject builds - enforcing that it is set for subproject builds https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1072 --- subprojects/extensions-tool/meson.build | 9 ++++++++- subprojects/extensions-tool/meson_options.txt | 3 +-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/subprojects/extensions-tool/meson.build b/subprojects/extensions-tool/meson.build index 0cee11234..ffaf49bd3 100644 --- a/subprojects/extensions-tool/meson.build +++ b/subprojects/extensions-tool/meson.build @@ -9,7 +9,14 @@ gio_req = '>= 2.56.0' gnome = import('gnome') i18n = import('i18n') -package_name = get_option('package_name') +if meson.is_subproject() + package_name = get_option('package_name') + assert(package_name != '', + 'package_name must be specified for subproject builds') +else + package_name = meson.project_name() +endif + package_version = meson.project_version() prefix = get_option('prefix') diff --git a/subprojects/extensions-tool/meson_options.txt b/subprojects/extensions-tool/meson_options.txt index d106bf889..9963d8ff7 100644 --- a/subprojects/extensions-tool/meson_options.txt +++ b/subprojects/extensions-tool/meson_options.txt @@ -7,6 +7,5 @@ option('man', option('package_name', type: 'string', - value: 'gnome-extensions-tool', - description: 'The gettext domain name' + description: 'The gettext domain name when used as a subproject' )