[glib-networking] Meson: Bump version requirement to 0.60.0



commit 28114e7b34e90d1272880b7381079b3fc54c4a13
Author: Xavier Claessens <xavier claessens collabora com>
Date:   Thu Jun 23 12:19:38 2022 -0400

    Meson: Bump version requirement to 0.60.0
    
    Fix all deprecation warnings this causes.

 .gitlab-ci.yml          |  1 +
 meson.build             | 13 ++++---------
 meson_options.txt       |  5 ++++-
 meson_post_install.py   |  9 ---------
 proxy/tests/meson.build |  8 +-------
 tls/tests/meson.build   |  9 ++-------
 6 files changed, 12 insertions(+), 33 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 7d6d62b3..7f3cdc3e 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -54,6 +54,7 @@ fedora-x86_64:
   script:
     - cp .gitlab-ci/lcovrc ~/.lcovrc
     - meson setup --prefix=$HOME/glib-networking-installed
+        --fatal-meson-warnings
         -Db_coverage=true
         -Dgnutls=enabled
         -Dopenssl=enabled
diff --git a/meson.build b/meson.build
index aadb19e7..f8036056 100644
--- a/meson.build
+++ b/meson.build
@@ -2,7 +2,7 @@ project(
   'glib-networking', 'c',
   version: '2.74.beta',
   license: 'LGPL2.1+',
-  meson_version: '>= 0.54.0',
+  meson_version: '>= 0.60.0',
   default_options: ['c_std=gnu99']
 )
 
@@ -62,8 +62,8 @@ if glib_dep.type_name() == 'internal'
   glib_proj = subproject('glib')
   gio_module_dir = glib_proj.get_variable('glib_giomodulesdir')
 else
-  gio_module_dir = gio_dep.get_pkgconfig_variable('giomoduledir',
-                                                  define_variable: ['libdir', join_paths(prefix, libdir)])
+  gio_module_dir = gio_dep.get_variable('giomoduledir',
+                                         pkgconfig_define: ['libdir', join_paths(prefix, libdir)])
 endif
 
 assert(gio_module_dir != '', 'GIO_MODULE_DIR is missing from gio-2.0.pc')
@@ -124,8 +124,6 @@ gnome = import('gnome')
 i18n = import('i18n')
 pkg = import('pkgconfig')
 
-po_dir = join_paths(meson.source_root(), 'po')
-
 top_inc = include_directories('.')
 tls_inc = include_directories('tls')
 
@@ -150,10 +148,7 @@ subdir('proxy')
 subdir('tls')
 
 # Will automatically pick it up from the cross file if defined
-gio_querymodules = find_program('gio-querymodules', required : false)
-if gio_querymodules.found()
-  meson.add_install_script('meson_post_install.py', gio_querymodules.path(), gio_module_dir)
-endif
+gnome.post_install(gio_querymodules: gio_module_dir)
 
 summary({
   'GnuTLS support': giomodules.contains('giognutls'),
diff --git a/meson_options.txt b/meson_options.txt
index 9d5053e1..c566ccd0 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -10,5 +10,8 @@ option('environment_proxy', type: 'feature', value: 'auto', description: 'suppor
 option('libproxy', type: 'feature', value: 'auto', description: 'support for libproxy proxy configration')
 option('gnome_proxy', type: 'feature', value: 'auto', description: 'support for GNOME desktop proxy 
configuration')
 option('installed_tests', type: 'boolean', value: false, description: 'enable installed tests')
-option('static_modules', type: 'boolean', value: false, description: 'build static modules')
 option('debug_logs', type: 'boolean', value: false, description: 'enable debug log messages (slow)')
+
+# Deprecated, use -Ddefault_library=static instead.
+option('static_modules', type: 'boolean', value: false, description: 'build static modules',
+  deprecated: true)
diff --git a/proxy/tests/meson.build b/proxy/tests/meson.build
index 56538b69..6af5ee63 100644
--- a/proxy/tests/meson.build
+++ b/proxy/tests/meson.build
@@ -1,8 +1,3 @@
-cflags = [
-  '-DSRCDIR="@0@"'.format(meson.current_source_dir()),
-  '-DTOP_BUILDDIR="@0@"'.format(meson.build_root())
-]
-
 foreach program: proxy_test_programs
   test_conf = configuration_data()
   test_conf.set('installed_tests_dir', installed_tests_execdir)
@@ -27,7 +22,6 @@ foreach program: proxy_test_programs
     program[0] + '.c',
     include_directories: top_inc,
     dependencies: program[2],
-    c_args: cflags,
     install: enable_installed_tests,
     install_dir: installed_tests_execdir
   )
@@ -35,7 +29,7 @@ foreach program: proxy_test_programs
   envs = [
     'G_TEST_SRCDIR=' + meson.current_source_dir(),
     'G_TEST_BUILDDIR=' + meson.current_build_dir(),
-    'GIO_MODULE_DIR=' + join_paths(meson.build_root(), 'proxy', program[1]),
+    'GIO_MODULE_DIR=' + join_paths(meson.project_build_root(), 'proxy', program[1]),
     'GIO_PROXY_TEST_NAME=' + program[1]
   ]
 
diff --git a/tls/tests/meson.build b/tls/tests/meson.build
index a0ec1645..0dc2571c 100644
--- a/tls/tests/meson.build
+++ b/tls/tests/meson.build
@@ -12,11 +12,6 @@ deps = [
   openssl_dep
 ]
 
-cflags = [
-  '-DSRCDIR="@0@"'.format(meson.current_source_dir()),
-  '-DTOP_BUILDDIR="@0@"'.format(meson.build_root())
-]
-
 envs = [
   'G_TEST_SRCDIR=' + meson.current_source_dir(),
   'G_TEST_BUILDDIR=' + meson.current_build_dir(),
@@ -67,7 +62,7 @@ foreach backend: backends
       )
     endif
 
-    test_cflags = cflags + [
+    test_cflags = [
       '-DBACKEND="@0@"'.format(backend),
       '-DBACKEND_IS_' + backend.to_upper(),
       '-DSIZEOF_TIME_T=@0@'.format(cc.sizeof('time_t', prefix: '#include <time.h>')),
@@ -88,7 +83,7 @@ foreach backend: backends
     )
 
     test_envs = envs + [
-      'GIO_MODULE_DIR=' + join_paths(meson.build_root(), 'tls', backend),
+      'GIO_MODULE_DIR=' + join_paths(meson.project_build_root(), 'tls', backend),
       'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
       'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir())
     ]


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