[console/zbrown/quick-ci-check] build: bump glib dependency




commit 058a78ad6fc2b3701b0d677b67e673f0caedd530
Author: Zander Brown <zbrown gnome org>
Date:   Sun Aug 14 12:01:25 2022 +0100

    build: bump glib dependency
    
    Fix relevant deprecated API usage/idioms
    
    Move dependency objects to the root file, thus avoiding some subproject
    race-y nonsense
    
    Other assorted cleanups such as resorting the source list
    
    Some people may notice that this commit should have come before
    9db9f38b, and this is why CI is good and cherry-picking is risky.
    Whoops.

 .editorconfig         | 11 ++++++-
 meson.build           | 91 ++++++++++++++++++++++++++++++++-------------------
 src/kgx-application.c |  4 +--
 src/kgx-simple-tab.c  |  2 +-
 src/meson.build       | 60 ++++++++++++++++-----------------
 5 files changed, 97 insertions(+), 71 deletions(-)
---
diff --git a/.editorconfig b/.editorconfig
index 3bc0d4a..d96429f 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -1,3 +1,12 @@
+root = true
+
 [*.{c,h}]
 indent_size = 2
-indent_style = space
\ No newline at end of file
+indent_style = space
+trim_trailing_whitespace = true
+insert_final_newline = true
+
+[meson.build]
+indent_style = space
+trim_trailing_whitespace = true
+insert_final_newline = true
diff --git a/meson.build b/meson.build
index 5486466..be466df 100644
--- a/meson.build
+++ b/meson.build
@@ -1,22 +1,29 @@
-project('gnome-console', 'c', version: '43.beta',
-  meson_version: '>= 0.59.0',
-  default_options: [
-    'werror=true',
-    'buildtype=debugoptimized',
-    'c_std=c17',
-    'vte:c_std=gnu11',
-    'vte:cpp_std=gnu++17',
-    'vte:werror=false',
-    'vte:gir=false',
-    'vte:vapi=false',
-    'vte:gtk3=false',
-    'vte:gtk4=true',
-    'adwaita:werror=false',
-    'adwaita:vapi=false',
-    'adwaita:introspection=disabled',
-    'adwaita:tests=false',
-    'libsass:werror=false',
-  ],
+project('gnome-console', 'c',
+                  version: '43.beta',
+            meson_version: '>= 0.59.0',
+                  license: 'GPL-3.0-or-later',
+          default_options: [
+                             'werror=true',
+                             'buildtype=debugoptimized',
+                             'c_std=c17',
+                             # So, apparently these two don’t currently do
+                             # anything — Yet somehow vte works anyway?
+                             # Mysterious
+                             # https://github.com/mesonbuild/meson/pull/7521
+                             'vte:c_std=gnu11',
+                             'vte:cpp_std=gnu++17',
+                             'vte:werror=false',
+                             'vte:gir=false',
+                             'vte:vapi=false',
+                             'vte:gtk3=false',
+                             'vte:gtk4=true',
+                             'adwaita:werror=false',
+                             'adwaita:vapi=false',
+                             'adwaita:introspection=disabled',
+                             'adwaita:tests=false',
+                             # libsass may be pulled in via adwaita
+                             'libsass:werror=false',
+                           ],
 )
 
 i18n = import('i18n')
@@ -65,18 +72,20 @@ config_h = vcs_tag( input: config_h_in,
                   command: ['git', 'rev-parse', '--short', 'HEAD'],
                  fallback: 'Devel')
 
-gtk_ver = 'GDK_VERSION_4_0'
-glib_ver = 'GLIB_VERSION_2_66'
-add_project_arguments([
+gtk_ver = 'GDK_VERSION_4_6'
+glib_ver = 'GLIB_VERSION_2_72'
+
+kgx_cargs = [
+  '-DG_LOG_DOMAIN="@0@"'.format(log_domain),
+  '-DG_LOG_USE_STRUCTURED',
   '-DGLIB_VERSION_MIN_REQUIRED=@0@'.format(glib_ver),
   '-DGLIB_VERSION_MAX_ALLOWED=@0@'.format(glib_ver),
-  '-DG_LOG_USE_STRUCTURED',
-  '-DG_LOG_DOMAIN="@0@"'.format(log_domain),
-], language: 'c')
+  '-DGDK_VERSION_MIN_REQUIRED=@0@'.format(gtk_ver),
+  '-DGDK_VERSION_MAX_ALLOWED=@0@'.format(gtk_ver)
+]
 
 cc = meson.get_compiler('c')
 
-global_c_args = []
 test_c_args = [
   '-Wdeclaration-after-statement',
   ['-Werror=format-security', '-Werror=format=2'],
@@ -94,19 +103,33 @@ test_c_args = [
   '-Wswitch-enum',
   '-Wunused-function',
 ]
-if get_option('buildtype') != 'plain'
-  test_c_args += '-fstack-protector-strong'
-endif
 
 foreach arg: test_c_args
   if cc.has_multi_arguments(arg)
-    global_c_args += arg
+    kgx_cargs += arg
   endif
 endforeach
-add_project_arguments(
-  global_c_args,
-  language: 'c'
-)
+
+global_cargs = []
+
+if get_option('buildtype') != 'plain'
+  foreach arg: ['-fstack-protector-strong', '-fno-omit-frame-pointer']
+    if cc.has_multi_arguments(arg)
+      global_cargs += arg
+    endif
+  endforeach
+endif
+
+add_project_arguments(global_cargs, language: 'c')
+
+gio_dep = dependency('gio-2.0', version: '>= 2.72')
+gio_unix_dep = dependency('gio-unix-2.0', version: '>= 2.72')
+gtk_dep = dependency('gtk4', version: '>= 4.6')
+adw_dep = dependency('libadwaita-1', version: '>= 1.2.beta')
+vte_dep = dependency('vte-2.91-gtk4', version: '>= 0.69.91')
+gtop_dep = dependency('libgtop-2.0')
+pcre_dep = dependency('libpcre2-8', version: '>= 10.32')
+schemas_dep = dependency('gsettings-desktop-schemas')
 
 subdir('data')
 subdir('src')
diff --git a/src/kgx-application.c b/src/kgx-application.c
index 0b61316..21d67a2 100644
--- a/src/kgx-application.c
+++ b/src/kgx-application.c
@@ -220,8 +220,6 @@ kgx_application_startup (GApplication *app)
   const char *const zoom_out_accels[] = { "<primary>minus", NULL };
   const char *const zoom_normal_accels[] = { "<primary>0", NULL };
 
-  g_set_prgname (g_application_get_application_id (app));
-
   g_resources_register (kgx_get_resource ());
 
   g_type_ensure (KGX_TYPE_TERMINAL);
@@ -475,7 +473,7 @@ kgx_application_handle_local_options (GApplication *app,
   if (g_variant_dict_lookup (options, "about", "b", &about)) {
     if (about) {
       g_autofree char *copyright = g_strdup_printf (_("© %s Zander Brown"),
-                                                    "2019-2021");
+                                                    "2019-2022");
       struct winsize w;
       int padding = 0;
 
diff --git a/src/kgx-simple-tab.c b/src/kgx-simple-tab.c
index db017ea..a62826b 100644
--- a/src/kgx-simple-tab.c
+++ b/src/kgx-simple-tab.c
@@ -160,7 +160,7 @@ wait_cb (GPid     pid,
   g_return_if_fail (KGX_SIMPLE_TAB (data->self));
 
   /* wait_check will set @error if it got a signal/non-zero exit */
-  if (!g_spawn_check_exit_status (status, &error)) {
+  if (!g_spawn_check_wait_status (status, &error)) {
     g_autofree char *message = NULL;
 
     // translators: <b> </b> marks the text as bold, ensure they are
diff --git a/src/meson.build b/src/meson.build
index 1118019..e929310 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -1,46 +1,47 @@
 kgx_sources = [
-  'kgx-application.c',
-  'kgx-application.h',
   'fp-vte-util.c',
   'fp-vte-util.h',
-  'kgx-terminal.c',
-  'kgx-terminal.h',
-  'kgx-tab.c',
-  'kgx-tab.h',
+  'kgx-application.c',
+  'kgx-application.h',
+  'kgx-close-dialog.c',
+  'kgx-close-dialog.h',
+  'kgx-pages.c',
+  'kgx-pages.h',
+  'kgx-process.c',
+  'kgx-process.h',
+  'kgx-proxy-info.c',
+  'kgx-proxy-info.h',
+  'kgx-simple-tab.c',
+  'kgx-simple-tab.h',
   'kgx-tab-button.c',
   'kgx-tab-button.h',
-  'kgx-tab-switcher.c',
-  'kgx-tab-switcher.h',
   'kgx-tab-switcher-row.c',
   'kgx-tab-switcher-row.h',
+  'kgx-tab-switcher.c',
+  'kgx-tab-switcher.h',
+  'kgx-tab.c',
+  'kgx-tab.h',
+  'kgx-terminal.c',
+  'kgx-terminal.h',
   'kgx-theme-switcher.c',
   'kgx-theme-switcher.h',
-  'kgx-simple-tab.c',
-  'kgx-simple-tab.h',
-  'kgx-pages.c',
-  'kgx-pages.h',
-  'kgx-proxy-info.c',
-  'kgx-proxy-info.h',
-  'kgx-close-dialog.c',
-  'kgx-close-dialog.h',
+  'kgx-util.c',
+  'kgx-util.h',
   'kgx-watcher.c',
   'kgx-watcher.h',
   'kgx-window.c',
   'kgx-window.h',
-  'kgx-process.c',
-  'kgx-process.h',
-  'kgx-util.c',
-  'kgx-util.h',
 ]
 
 kgx_deps = [
-  dependency('gio-2.0', version: '>= 2.66'),
-  dependency('gtk4'),
-  dependency('libadwaita-1', version: '>= 1.2.beta'),
-  dependency('vte-2.91-gtk4', version: '>= 0.69.91'),
-  dependency('libgtop-2.0'),
-  dependency('libpcre2-8', version: '>= 10.32'),
-  dependency('gsettings-desktop-schemas'),
+  gio_dep,
+  gio_unix_dep,
+  gtk_dep,
+  adw_dep,
+  vte_dep,
+  gtop_dep,
+  pcre_dep,
+  schemas_dep,
   cc.find_library('m', required: false),
 ]
 
@@ -71,11 +72,6 @@ kgx_enums = gnome.mkenums_simple('kgx-enums',
                                       'kgx-tab.h'
                                     ])
 
-kgx_cargs = [
-  '-DGDK_VERSION_MIN_REQUIRED=@0@'.format(gtk_ver),
-  '-DGDK_VERSION_MAX_ALLOWED=@0@'.format(gtk_ver)
-]
-
 kgx_lib = static_library (bin_name,
                    kgx_sources + kgx_enums,
            c_args: kgx_cargs,


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