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()
This commit is contained in:
Daniel Eklöf 2022-02-27 11:32:46 +01:00
parent ffccabbb13
commit 4daa3d9904
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
4 changed files with 10 additions and 6 deletions

View file

@ -23,6 +23,10 @@
### Changed ### Changed
* Minimum required meson version is now 0.58.
### Deprecated ### Deprecated
### Removed ### Removed
### Fixed ### Fixed

View file

@ -7,11 +7,11 @@ endif
if backend_wayland if backend_wayland
wayland_protocols = dependency('wayland-protocols') 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 = dependency('wayland-scanner', native: true)
wscanner_prog = find_program( wscanner_prog = find_program(
wscanner.get_pkgconfig_variable('wayland_scanner'), native: true) wscanner.get_variable('wayland_scanner'), native: true)
wl_proto_headers = [] wl_proto_headers = []
wl_proto_src = [] wl_proto_src = []

View file

@ -1,7 +1,7 @@
sh = find_program('sh', native: true) sh = find_program('sh', native: true)
scdoc = dependency('scdoc', 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', foreach man_src : ['yambar.1.scd', 'yambar.5.scd', 'yambar-decorations.5.scd',
'yambar-modules-alsa.5.scd', 'yambar-modules-backlight.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, out,
output: out, output: out,
input: man_src, input: man_src,
command: [sh, '-c', '@0@ < @INPUT@'.format(scdoc_prog.path())], command: [sh, '-c', '@0@ < @INPUT@'.format(scdoc_prog.full_path())],
capture: true, capture: true,
install: true, install: true,
install_dir: join_paths(get_option('mandir'), 'man@0@'.format(section))) install_dir: join_paths(get_option('mandir'), 'man@0@'.format(section)))

View file

@ -1,7 +1,7 @@
project('yambar', 'c', project('yambar', 'c',
version: '1.8.0', version: '1.8.0',
license: 'MIT', license: 'MIT',
meson_version: '>=0.53.0', meson_version: '>=0.58.0',
default_options: ['c_std=c18', default_options: ['c_std=c18',
'warning_level=1', 'warning_level=1',
'werror=true', 'werror=true',
@ -18,7 +18,7 @@ endif
# Compute the relative path used by compiler invocations. # Compute the relative path used by compiler invocations.
source_root = meson.current_source_dir().split('/') source_root = meson.current_source_dir().split('/')
build_root = meson.build_root().split('/') build_root = meson.global_build_root().split('/')
relative_dir_parts = [] relative_dir_parts = []
i = 0 i = 0
in_prefix = true in_prefix = true