[gtk/ebassi/build-fixes: 3/3] build: Remove deprecated get_pkgconfig_variable()




commit a70988ecd5c06de71e2cc8e5f3029763f12d8667
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Fri Dec 24 15:55:26 2021 +0000

    build: Remove deprecated get_pkgconfig_variable()
    
    Replace it with `get_variable(pkgconfig:...)`.

 gtk/meson.build                     |  2 +-
 meson.build                         |  8 ++++----
 testsuite/introspection/meson.build | 14 ++++++++------
 3 files changed, 13 insertions(+), 11 deletions(-)
---
diff --git a/gtk/meson.build b/gtk/meson.build
index 9ac1040034..91aefe1b17 100644
--- a/gtk/meson.build
+++ b/gtk/meson.build
@@ -1101,7 +1101,7 @@ if harfbuzz_dep.found() and pangoft_dep.found()
 endif
 
 if x11_enabled
-  x11_data_prefix = dependency('x11').get_pkgconfig_variable('prefix')
+  x11_data_prefix = dependency('x11').get_variable(pkgconfig: 'prefix')
 
   gtk_cargs += [ '-DX11_DATA_PREFIX="@0@"'.format(x11_data_prefix), ]
   gtk_sources += gtk_x11_sources
diff --git a/meson.build b/meson.build
index 88b439f73f..c957835b39 100644
--- a/meson.build
+++ b/meson.build
@@ -456,7 +456,7 @@ colord_dep = dependency('colord', version: '>= 0.1.9', required: get_option('col
 cdata.set('HAVE_COLORD', colord_dep.found())
 
 if iso_codes_dep.found()
-  cdata.set_quoted('ISO_CODES_PREFIX', iso_codes_dep.get_pkgconfig_variable('prefix'))
+  cdata.set_quoted('ISO_CODES_PREFIX', iso_codes_dep.get_variable(pkgconfig: 'prefix'))
 else
   cdata.set_quoted('ISO_CODES_PREFIX', '/usr')
 endif
@@ -515,7 +515,7 @@ if wayland_enabled
   if not wlprotocolsdep.found()
     wlproto_dir = subproject('wayland-protocols').get_variable('wayland_protocols_srcdir')
   else
-    wlproto_dir = wlprotocolsdep.get_pkgconfig_variable('pkgdatadir')
+    wlproto_dir = wlprotocolsdep.get_variable(pkgconfig: 'pkgdatadir')
   endif
 
   wayland_pkgs = [
@@ -709,8 +709,8 @@ endif
 
 graphene_dep_type = graphene_dep.type_name()
 if graphene_dep_type == 'pkgconfig'
-  graphene_has_sse2 = graphene_dep.get_pkgconfig_variable('graphene_has_sse2') == '1'
-  graphene_has_gcc = graphene_dep.get_pkgconfig_variable('graphene_has_gcc') == '1'
+  graphene_has_sse2 = graphene_dep.get_variable(pkgconfig: 'graphene_has_sse2') == '1'
+  graphene_has_gcc = graphene_dep.get_variable(pkgconfig: 'graphene_has_gcc') == '1'
 else
   graphene_simd = subproject('graphene').get_variable('graphene_simd')
   graphene_has_sse2 = graphene_simd.contains('sse2')
diff --git a/testsuite/introspection/meson.build b/testsuite/introspection/meson.build
index 048e47e6eb..c64a0f54d3 100644
--- a/testsuite/introspection/meson.build
+++ b/testsuite/introspection/meson.build
@@ -2,11 +2,13 @@ py = import('python').find_installation('python3', modules: ['gi'])
 
 env = environment()
 env.prepend('GI_TYPELIB_PATH',
-    join_paths(project_build_root, 'gtk'),
-    gi_dep.get_pkgconfig_variable('typelibdir'))
-env.prepend('LD_PRELOAD', join_paths(project_build_root, 'gtk', 'libgtk-4.so'))
+  project_build_root / 'gtk',
+  gi_dep.get_variable(pkgconfig: 'typelibdir'),
+)
+env.prepend('LD_PRELOAD', project_build_root / 'gtk' / 'libgtk-4.so')
 
 test('api',
-     find_program('api.py', dirs: meson.current_source_dir()),
-     suite: ['introspection'],
-     env: env)
+  find_program('api.py', dirs: meson.current_source_dir()),
+  suite: ['introspection'],
+  env: env,
+)


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