build: Remove deprecated get_pkgconfig_variable()
authorEmmanuele Bassi <ebassi@gnome.org>
Fri, 24 Dec 2021 15:55:26 +0000 (15:55 +0000)
committerEmmanuele Bassi <ebassi@gnome.org>
Fri, 24 Dec 2021 15:55:26 +0000 (15:55 +0000)
Replace it with `get_variable(pkgconfig:...)`.

gtk/meson.build
meson.build
testsuite/introspection/meson.build

index 9ac10400341b7de1fd0fc3fbea5fe7e81c1721a3..91aefe1b1736e74615195e8ab551b0bf56b8df0d 100644 (file)
@@ -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
index 88b439f73f7afe2a967deb692a7e073901105ba2..c957835b39f07497158c835dcdcdd87b47211ae0 100644 (file)
@@ -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')
index 048e47e6eb20494b5ac02b82ec1c611e595c019d..c64a0f54d358f698eeaf8b4bb0ecb326e74bb1e2 100644 (file)
@@ -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,
+)