[PATCH 10/12] meson: wire up Gitk

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Wire up the Gitk graphical repository browser in Meson.

Signed-off-by: Patrick Steinhardt <ps@xxxxxx>
---
 gitk-git/meson.build    | 28 ++++++++++++++++++++++++++++
 gitk-git/po/meson.build | 19 +++++++++++++++++++
 meson.build             |  2 ++
 meson_options.txt       |  2 ++
 4 files changed, 51 insertions(+)

diff --git a/gitk-git/meson.build b/gitk-git/meson.build
new file mode 100644
index 00000000000..7b16cd3c4d3
--- /dev/null
+++ b/gitk-git/meson.build
@@ -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
diff --git a/gitk-git/po/meson.build b/gitk-git/po/meson.build
new file mode 100644
index 00000000000..b1ed0198285
--- /dev/null
+++ b/gitk-git/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,
+)
diff --git a/meson.build b/meson.build
index 20159cef83d..5f2db6b0419 100644
--- a/meson.build
+++ b/meson.build
@@ -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(),
diff --git a/meson_options.txt b/meson_options.txt
index afa908d6c53..4cce8a81154 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -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',

-- 
2.48.1.666.gff9fcf71b7.dirty





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux