diff --git a/meson.build b/meson.build index 6dce08849..7a68d0b5e 100644 --- a/meson.build +++ b/meson.build @@ -132,20 +132,9 @@ else have_systemd = false endif -if get_option('extensions_tool') - autoar_dep = dependency('gnome-autoar-0') - json_dep = dependency('json-glib-1.0') -endif - -bash_completion = dependency('bash-completion', required: false) - if get_option('man') xsltproc = find_program('xsltproc') - if get_option('extensions_tool') - a2x = find_program('a2x') - endif - subdir('man') endif @@ -254,6 +243,16 @@ libgvc = subproject('gvc', ) libgvc_gir = libgvc.get_variable('libgvc_gir') +if get_option('extensions_tool') + subproject('extensions-tool', + default_options: [ + 'man=@0@'.format(get_option('man')), + 'package_name=@0@'.format(meson.project_name()), + ] + ) +endif + + po_dir = join_paths(meson.current_source_dir(), 'po') subdir('js') diff --git a/po/POTFILES.in b/po/POTFILES.in index 33be57b52..c8d6c03de 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -72,17 +72,6 @@ js/ui/windowAttentionHandler.js js/ui/windowManager.js js/ui/windowMenu.js src/calendar-server/evolution-calendar.desktop.in -src/extensions-tool/command-create.c -src/extensions-tool/command-disable.c -src/extensions-tool/command-enable.c -src/extensions-tool/command-info.c -src/extensions-tool/command-install.c -src/extensions-tool/command-list.c -src/extensions-tool/command-pack.c -src/extensions-tool/command-prefs.c -src/extensions-tool/command-reset.c -src/extensions-tool/command-uninstall.c -src/extensions-tool/main.c src/main.c src/shell-app.c src/shell-app-system.c @@ -90,5 +79,16 @@ src/shell-global.c src/shell-keyring-prompt.c src/shell-polkit-authentication-agent.c src/shell-util.c +subprojects/extensions-tool/src/command-create.c +subprojects/extensions-tool/src/command-disable.c +subprojects/extensions-tool/src/command-enable.c +subprojects/extensions-tool/src/command-info.c +subprojects/extensions-tool/src/command-install.c +subprojects/extensions-tool/src/command-list.c +subprojects/extensions-tool/src/command-pack.c +subprojects/extensions-tool/src/command-prefs.c +subprojects/extensions-tool/src/command-reset.c +subprojects/extensions-tool/src/command-uninstall.c +subprojects/extensions-tool/src/main.c # Please do not remove this file from POTFILES.in. Run "git submodule init && git submodule update" to get it. subprojects/gvc/gvc-mixer-control.c diff --git a/src/meson.build b/src/meson.build index caf8881e3..ed33d107e 100644 --- a/src/meson.build +++ b/src/meson.build @@ -6,10 +6,6 @@ subdir('hotplug-sniffer') subdir('st') subdir('tray') -if get_option('extensions_tool') - subdir('extensions-tool') -endif - script_data = configuration_data() script_data.set('bindir', bindir) script_data.set('datadir', datadir) diff --git a/src/extensions-tool/COPYING b/subprojects/extensions-tool/COPYING similarity index 100% rename from src/extensions-tool/COPYING rename to subprojects/extensions-tool/COPYING diff --git a/src/extensions-tool/completion/bash/gnome-extensions b/subprojects/extensions-tool/completion/bash/gnome-extensions similarity index 100% rename from src/extensions-tool/completion/bash/gnome-extensions rename to subprojects/extensions-tool/completion/bash/gnome-extensions diff --git a/src/extensions-tool/man/gnome-extensions.txt b/subprojects/extensions-tool/man/gnome-extensions.txt similarity index 100% rename from src/extensions-tool/man/gnome-extensions.txt rename to subprojects/extensions-tool/man/gnome-extensions.txt diff --git a/src/extensions-tool/man/meson.build b/subprojects/extensions-tool/man/meson.build similarity index 100% rename from src/extensions-tool/man/meson.build rename to subprojects/extensions-tool/man/meson.build diff --git a/src/extensions-tool/man/stylesheet.xsl b/subprojects/extensions-tool/man/stylesheet.xsl similarity index 100% rename from src/extensions-tool/man/stylesheet.xsl rename to subprojects/extensions-tool/man/stylesheet.xsl diff --git a/subprojects/extensions-tool/meson.build b/subprojects/extensions-tool/meson.build new file mode 100644 index 000000000..426c90188 --- /dev/null +++ b/subprojects/extensions-tool/meson.build @@ -0,0 +1,42 @@ +project('gnome-extensions-tool', 'c', + version: '3.35.1', + meson_version: '>= 0.47.0', + license: 'GPLv2+' +) + +gio_req = '>= 2.56.0' + +gnome = import('gnome') +i18n = import('i18n') + +package_name = get_option('package_name') +prefix = get_option('prefix') + +bindir = join_paths(prefix, get_option('bindir')) +datadir = join_paths(prefix, get_option('datadir')) +mandir = join_paths(prefix, get_option('mandir')) + +localedir = join_paths(datadir, 'locale') + +gio_dep = dependency('gio-2.0', version: gio_req) +gio_unix_dep = dependency('gio-unix-2.0', version: gio_req) +autoar_dep = dependency('gnome-autoar-0') +json_dep = dependency('json-glib-1.0') + +cc = meson.get_compiler('c') + +bash_completion = dependency('bash-completion', required: false) + +subdir('src') + +if bash_completion.found() + install_data('completion/bash/gnome-extensions', + install_dir: bash_completion.get_pkgconfig_variable('completionsdir') + ) +endif + +if get_option('man') + a2x = find_program('a2x') + + subdir('man') +endif diff --git a/subprojects/extensions-tool/meson_options.txt b/subprojects/extensions-tool/meson_options.txt new file mode 100644 index 000000000..2b7aef6b6 --- /dev/null +++ b/subprojects/extensions-tool/meson_options.txt @@ -0,0 +1,11 @@ +option('man', + type: 'boolean', + value: true, + description: 'Generate man pages' +) + +option('package_name', + type: 'string', + value: 'gnome-extensions-tool', + description: 'The gettext domain name' +) diff --git a/src/extensions-tool/command-create.c b/subprojects/extensions-tool/src/command-create.c similarity index 100% rename from src/extensions-tool/command-create.c rename to subprojects/extensions-tool/src/command-create.c diff --git a/src/extensions-tool/command-disable.c b/subprojects/extensions-tool/src/command-disable.c similarity index 100% rename from src/extensions-tool/command-disable.c rename to subprojects/extensions-tool/src/command-disable.c diff --git a/src/extensions-tool/command-enable.c b/subprojects/extensions-tool/src/command-enable.c similarity index 100% rename from src/extensions-tool/command-enable.c rename to subprojects/extensions-tool/src/command-enable.c diff --git a/src/extensions-tool/command-info.c b/subprojects/extensions-tool/src/command-info.c similarity index 100% rename from src/extensions-tool/command-info.c rename to subprojects/extensions-tool/src/command-info.c diff --git a/src/extensions-tool/command-install.c b/subprojects/extensions-tool/src/command-install.c similarity index 100% rename from src/extensions-tool/command-install.c rename to subprojects/extensions-tool/src/command-install.c diff --git a/src/extensions-tool/command-list.c b/subprojects/extensions-tool/src/command-list.c similarity index 100% rename from src/extensions-tool/command-list.c rename to subprojects/extensions-tool/src/command-list.c diff --git a/src/extensions-tool/command-pack.c b/subprojects/extensions-tool/src/command-pack.c similarity index 100% rename from src/extensions-tool/command-pack.c rename to subprojects/extensions-tool/src/command-pack.c diff --git a/src/extensions-tool/command-prefs.c b/subprojects/extensions-tool/src/command-prefs.c similarity index 100% rename from src/extensions-tool/command-prefs.c rename to subprojects/extensions-tool/src/command-prefs.c diff --git a/src/extensions-tool/command-reset.c b/subprojects/extensions-tool/src/command-reset.c similarity index 100% rename from src/extensions-tool/command-reset.c rename to subprojects/extensions-tool/src/command-reset.c diff --git a/src/extensions-tool/command-uninstall.c b/subprojects/extensions-tool/src/command-uninstall.c similarity index 100% rename from src/extensions-tool/command-uninstall.c rename to subprojects/extensions-tool/src/command-uninstall.c diff --git a/src/extensions-tool/commands.h b/subprojects/extensions-tool/src/commands.h similarity index 100% rename from src/extensions-tool/commands.h rename to subprojects/extensions-tool/src/commands.h diff --git a/src/extensions-tool/common.h b/subprojects/extensions-tool/src/common.h similarity index 100% rename from src/extensions-tool/common.h rename to subprojects/extensions-tool/src/common.h diff --git a/src/extensions-tool/gnome-extensions-tool.gresource.xml b/subprojects/extensions-tool/src/gnome-extensions-tool.gresource.xml similarity index 100% rename from src/extensions-tool/gnome-extensions-tool.gresource.xml rename to subprojects/extensions-tool/src/gnome-extensions-tool.gresource.xml diff --git a/src/extensions-tool/main.c b/subprojects/extensions-tool/src/main.c similarity index 100% rename from src/extensions-tool/main.c rename to subprojects/extensions-tool/src/main.c diff --git a/src/extensions-tool/meson.build b/subprojects/extensions-tool/src/meson.build similarity index 74% rename from src/extensions-tool/meson.build rename to subprojects/extensions-tool/src/meson.build index 25d5118ef..77d62b5e9 100644 --- a/src/extensions-tool/meson.build +++ b/subprojects/extensions-tool/src/meson.build @@ -1,5 +1,5 @@ config_h = configuration_data() -config_h.set_quoted('GETTEXT_PACKAGE', meson.project_name()) +config_h.set_quoted('GETTEXT_PACKAGE', package_name) config_h.set_quoted('VERSION', meson.project_version()) config_h.set_quoted('LOCALEDIR', localedir) config_h.set('HAVE_BIND_TEXTDOMAIN_CODESET', cc.has_function('bind_textdomain_codeset')) @@ -32,13 +32,3 @@ executable('gnome-extensions', dependencies: [gio_dep, gio_unix_dep, autoar_dep, json_dep], install: true ) - -if bash_completion.found() - install_data('completion/bash/gnome-extensions', - install_dir: bash_completion.get_pkgconfig_variable('completionsdir') - ) -endif - -if get_option('man') - subdir('man') -endif diff --git a/src/extensions-tool/template/extension.js b/subprojects/extensions-tool/src/template/extension.js similarity index 100% rename from src/extensions-tool/template/extension.js rename to subprojects/extensions-tool/src/template/extension.js diff --git a/src/extensions-tool/template/stylesheet.css b/subprojects/extensions-tool/src/template/stylesheet.css similarity index 100% rename from src/extensions-tool/template/stylesheet.css rename to subprojects/extensions-tool/src/template/stylesheet.css