new file mode 100644
@@ -0,0 +1,28 @@
+wish = find_program('wish', required: get_option('gitk'))
+gitk_enabled = wish.found()
+
+if not gitk_enabled
+ subdir_done()
+endif
+
+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',
+ ],
+ env: script_environment,
+ install: true,
+ install_dir: get_option('bindir'),
+)
+
+if intl.found()
+ subdir('po')
+endif
new file mode 100644
@@ -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,
+)
@@ -1957,6 +1957,7 @@ if get_option('docs') != []
endif
subdir('contrib')
+subdir('gitk-git')
foreach key, value : {
'DIFF': diff.full_path(),
@@ -2010,6 +2011,7 @@ summary({
'curl': curl.found(),
'expat': expat.found(),
'gettext': intl.found(),
+ 'gitk': gitk_enabled,
'gitweb': gitweb_option.allowed(),
'https': https_backend,
'iconv': iconv.found(),
@@ -41,6 +41,8 @@ option('gitweb', type: 'feature', value: 'auto',
description: 'Build Git web interface. Requires Perl.')
option('iconv', type: 'feature', value: 'auto',
description: 'Support reencoding strings with different encodings.')
+option('gitk', type: 'feature', value: 'auto',
+ description: 'Build and install gitk(1), which requires Tcl.')
option('pcre2', type: 'feature', value: 'enabled',
description: 'Support Perl-compatible regular expressions in e.g. git-grep(1).')
option('perl', type: 'feature', value: 'auto',
Wire up the Gitk graphical repository browser in Meson. Signed-off-by: Patrick Steinhardt <ps@pks.im> --- gitk-git/meson.build | 28 ++++++++++++++++++++++++++++ gitk-git/po/meson.build | 19 +++++++++++++++++++ meson.build | 2 ++ meson_options.txt | 2 ++ 4 files changed, 51 insertions(+)