From 53115abf3594375ac8091cf3c699d1c756aa380b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Tue, 13 Feb 2024 18:43:38 +0100 Subject: [PATCH] build: Bump meson requirement to 0.58 It's still quite old, but provides some features we may want to use in future, so let's use a newer version since we're about to release a new major version of p-p-d too. --- check-news.sh | 4 ++-- data/meson.build | 2 +- docs/meson.build | 4 ++-- meson.build | 8 ++++---- src/meson.build | 2 +- tests/meson.build | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/check-news.sh b/check-news.sh index aa6638c..cd6f819 100644 --- a/check-news.sh +++ b/check-news.sh @@ -24,13 +24,13 @@ # # Checks NEWS for the version number: # meson.add_dist_script( -# find_program('check-news.sh').path(), +# find_program('check-news.sh').full_path(), # '@0@'.format(meson.project_version()) # ) # # Checks NEWS and data/foo.appdata.xml for the version number: # meson.add_dist_script( -# find_program('check-news.sh').path(), +# find_program('check-news.sh').full_path(), # '@0@'.format(meson.project_version()), # 'NEWS', # 'data/foo.appdata.xml' diff --git a/data/meson.build b/data/meson.build index 3d1b466..d5081bf 100644 --- a/data/meson.build +++ b/data/meson.build @@ -26,7 +26,7 @@ if xmllint.found() xmllint, args: [ '--noout', - meson.source_root() / 'data' / polkit_policy, + meson.project_source_root() / 'data' / polkit_policy, ]) endif diff --git a/docs/meson.build b/docs/meson.build index 43c22e3..1531d0c 100644 --- a/docs/meson.build +++ b/docs/meson.build @@ -37,8 +37,8 @@ gnome.gtkdoc( dependencies: libpower_profiles_daemon_dep, gobject_typesfile: [join_paths(meson.current_source_dir(), 'power-profiles-daemon.types')], src_dir: [ - meson.source_root() /'src', - meson.build_root() / 'src', + meson.project_source_root() /'src', + meson.project_build_root() / 'src', ], ignore_headers: private_headers, ) diff --git a/meson.build b/meson.build index e0d96d7..95c24f8 100644 --- a/meson.build +++ b/meson.build @@ -6,7 +6,7 @@ project('power-profiles-daemon', [ 'c' ], 'warning_level=1', 'c_std=c99', ], - meson_version: '>= 0.54.0') + meson_version: '>= 0.58.0') cc = meson.get_compiler('c') @@ -34,13 +34,13 @@ dbusservicedir = get_option('datadir') / 'dbus-1' / 'system-services' systemd_system_unit_dir = get_option('systemdsystemunitdir') if systemd_system_unit_dir == 'auto' systemd_dep = dependency('systemd') - systemd_system_unit_dir = systemd_dep.get_pkgconfig_variable('systemdsystemunitdir') + systemd_system_unit_dir = systemd_dep.get_variable('systemdsystemunitdir') endif gio_dep = dependency('gio-2.0') gudev_dep = dependency('gudev-1.0', version: '>= 234') upower_dep = dependency('upower-glib') polkit_gobject_dep = dependency('polkit-gobject-1', version: '>= 0.91') -polkit_policy_directory = polkit_gobject_dep.get_pkgconfig_variable('policydir') +polkit_policy_directory = polkit_gobject_dep.get_variable('policydir') gnome = import('gnome') @@ -98,6 +98,6 @@ if get_option('tests') endif meson.add_dist_script( - find_program('check-news.sh').path(), + find_program('check-news.sh').full_path(), '@0@'.format(meson.project_version()) ) diff --git a/src/meson.build b/src/meson.build index 7ddef18..f58a94e 100644 --- a/src/meson.build +++ b/src/meson.build @@ -67,7 +67,7 @@ py_installation = python.find_installation('python3', required: true) ppd_conf = configuration_data() ppd_conf.set('VERSION', meson.project_version()) -ppd_conf.set('PYTHON3', py_installation.path()) +ppd_conf.set('PYTHON3', py_installation.full_path()) script = configure_file( input: 'powerprofilesctl.in', diff --git a/tests/meson.build b/tests/meson.build index e12db08..bd01b71 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -1,6 +1,6 @@ envs = environment() -envs.set ('top_builddir', meson.build_root()) -envs.set ('top_srcdir', meson.source_root()) +envs.set ('top_builddir', meson.project_build_root()) +envs.set ('top_srcdir', meson.project_source_root()) unittest_inspector = find_program('unittest_inspector.py') integration_tests = files('integration_test.py')