From 4daa3d99047628608e6e0e094b5a78c05e90f120 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Sun, 27 Feb 2022 11:32:46 +0100 Subject: [PATCH] meson: stop using deprecated functions, require meson >= 0.58 * get_pkgconfig_variable() -> get_variable() * prog.path() -> prog.full_path() * meson.build_root() -> meson.global_build_root() --- CHANGELOG.md | 4 ++++ bar/meson.build | 4 ++-- doc/meson.build | 4 ++-- meson.build | 4 ++-- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index db94656..01d9ab8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,10 @@ ### Changed + +* Minimum required meson version is now 0.58. + + ### Deprecated ### Removed ### Fixed diff --git a/bar/meson.build b/bar/meson.build index 90f050b..6ca5ec9 100644 --- a/bar/meson.build +++ b/bar/meson.build @@ -7,11 +7,11 @@ endif if backend_wayland wayland_protocols = dependency('wayland-protocols') - wayland_protocols_datadir = wayland_protocols.get_pkgconfig_variable('pkgdatadir') + wayland_protocols_datadir = wayland_protocols.get_variable('pkgdatadir') wscanner = dependency('wayland-scanner', native: true) wscanner_prog = find_program( - wscanner.get_pkgconfig_variable('wayland_scanner'), native: true) + wscanner.get_variable('wayland_scanner'), native: true) wl_proto_headers = [] wl_proto_src = [] diff --git a/doc/meson.build b/doc/meson.build index 0d7f873..e882f52 100644 --- a/doc/meson.build +++ b/doc/meson.build @@ -1,7 +1,7 @@ sh = find_program('sh', native: true) scdoc = dependency('scdoc', native: true) -scdoc_prog = find_program(scdoc.get_pkgconfig_variable('scdoc'), native: true) +scdoc_prog = find_program(scdoc.get_variable('scdoc'), native: true) foreach man_src : ['yambar.1.scd', 'yambar.5.scd', 'yambar-decorations.5.scd', 'yambar-modules-alsa.5.scd', 'yambar-modules-backlight.5.scd', @@ -25,7 +25,7 @@ foreach man_src : ['yambar.1.scd', 'yambar.5.scd', 'yambar-decorations.5.scd', out, output: out, input: man_src, - command: [sh, '-c', '@0@ < @INPUT@'.format(scdoc_prog.path())], + command: [sh, '-c', '@0@ < @INPUT@'.format(scdoc_prog.full_path())], capture: true, install: true, install_dir: join_paths(get_option('mandir'), 'man@0@'.format(section))) diff --git a/meson.build b/meson.build index b43d3fb..ef28c58 100644 --- a/meson.build +++ b/meson.build @@ -1,7 +1,7 @@ project('yambar', 'c', version: '1.8.0', license: 'MIT', - meson_version: '>=0.53.0', + meson_version: '>=0.58.0', default_options: ['c_std=c18', 'warning_level=1', 'werror=true', @@ -18,7 +18,7 @@ endif # Compute the relative path used by compiler invocations. source_root = meson.current_source_dir().split('/') -build_root = meson.build_root().split('/') +build_root = meson.global_build_root().split('/') relative_dir_parts = [] i = 0 in_prefix = true