diff options
| author | Patrick Steinhardt <ps@pks.im> | 2025-02-19 13:42:50 +0100 |
|---|---|---|
| committer | Patrick Steinhardt <ps@pks.im> | 2025-02-20 08:52:15 +0100 |
| commit | b4c06f7c4d6c87091f138877b702489755fd59ef (patch) | |
| tree | db565a7257603a2baed481d7e3b68439c7dcfc9d | |
| parent | gitk: extract script to build executable (diff) | |
| download | git-b4c06f7c4d6c87091f138877b702489755fd59ef.tar.gz git-b4c06f7c4d6c87091f138877b702489755fd59ef.zip | |
gitk: introduce support for the Meson build system
Upstream Git has introduced support for the Meson build system.
Introduce support for Meson into gitk, as well, so that Git can easily
build its vendored copy of Gitk via a `subproject()` directive. The
instructions can be set up as follows:
$ meson setup build
$ meson compile -C build
$ meson install -C build
Specific options, like for example where Gitk shall be installed to, can
be specified at setup time via `-D`. Available options can be discovered
by running `meson configure` either in the source or build directory.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
| -rw-r--r-- | meson.build | 30 | ||||
| -rw-r--r-- | po/meson.build | 19 |
2 files changed, 49 insertions, 0 deletions
diff --git a/meson.build b/meson.build new file mode 100644 index 0000000000..ca3c0cec58 --- /dev/null +++ b/meson.build @@ -0,0 +1,30 @@ +project('gitk') + +shell = find_program('sh') +wish = find_program('wish') + +# Verify that dependencies of "generate-tcl.sh" are satisfied. +foreach dependency : [ 'chmod', 'mv', 'sed' ] + find_program(dependency) +endforeach + +custom_target( + command: [ + shell, + meson.current_source_dir() / 'generate-tcl.sh', + wish.full_path(), + '@INPUT@', + '@OUTPUT@', + ], + input: 'gitk', + output: 'gitk', + depend_files: [ + 'generate-tcl.sh', + ], + install: true, + install_dir: get_option('bindir'), +) + +if find_program('msgfmt').found() + subdir('po') +endif diff --git a/po/meson.build b/po/meson.build new file mode 100644 index 0000000000..b1ed019828 --- /dev/null +++ b/po/meson.build @@ -0,0 +1,19 @@ +import('i18n').gettext('gitk', + languages: [ + 'bg', + 'ca', + 'de', + 'es', + 'fr', + 'hu', + 'it', + 'ja', + 'pt_br', + 'pt_pt', + 'ru', + 'sv', + 'vi', + 'zh_cn', + ], + install: true, +) |
