[epiphany] about: Display WebKitGTK revision, if found in pkg-config file



commit d3d501c9680adab86825bcb009feb5ae7347ab51
Author: Philippe Normand <philn igalia com>
Date:   Tue Jun 29 18:01:24 2021 +0100

    about: Display WebKitGTK revision, if found in pkg-config file

 meson.build           | 11 ++++++++++-
 src/window-commands.c |  2 +-
 2 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/meson.build b/meson.build
index 6829efaa7..e747398e3 100644
--- a/meson.build
+++ b/meson.build
@@ -1,7 +1,7 @@
 project('epiphany', 'c',
   license: 'GPL3+',
   version: '40.0',
-  meson_version: '>= 0.47.0',
+  meson_version: '>= 0.51.0',
   default_options: ['c_std=gnu11',
                     'warning_level=2']
 )
@@ -111,6 +111,15 @@ endif
 
 conf.set10('USE_LIBPORTAL', portal_dep.found())
 
+webkit_revision = webkit2gtk_dep.get_variable(pkgconfig : 'revision', default_value : '')
+if webkit_revision == 'tarball'
+  webkit_revision = ''
+else
+  template = ' (@0@)'
+  webkit_revision = template.format(webkit_revision)
+endif
+conf.set_quoted('WEBKIT_REVISION', webkit_revision)
+
 config_h = declare_dependency(
   sources: vcs_tag(
     input: configure_file(
diff --git a/src/window-commands.c b/src/window-commands.c
index 729692305..1b709cddb 100644
--- a/src/window-commands.c
+++ b/src/window-commands.c
@@ -996,7 +996,7 @@ window_cmd_show_about (GSimpleAction *action,
   g_key_file_free (key_file);
 
   comments = g_strdup_printf (_("A simple, clean, beautiful view of the web.\n"
-                                "Powered by WebKitGTK %d.%d.%d"),
+                                "Powered by WebKitGTK %d.%d.%d" WEBKIT_REVISION),
                               webkit_get_major_version (),
                               webkit_get_minor_version (),
                               webkit_get_micro_version ());


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