From 5e0bf2446beb29978bf3a3dbe138d2e0b8924e5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Fri, 23 Jun 2023 13:26:04 -0400 Subject: [PATCH] meson: Bump requirements to 0.56 and adapt deprecated functions --- doc/meson.build | 2 +- libfprint/meson.build | 4 ++-- meson.build | 2 +- tests/meson.build | 22 +++++++++++----------- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/doc/meson.build b/doc/meson.build index 1a45aad8..77236a06 100644 --- a/doc/meson.build +++ b/doc/meson.build @@ -25,7 +25,7 @@ docpath = join_paths(get_option('datadir'), 'gtk-doc', 'html') gnome.gtkdoc(versioned_libname, main_xml: 'libfprint-docs.xml', - src_dir: join_paths(meson.source_root(), 'libfprint'), + src_dir: join_paths(meson.project_source_root(), 'libfprint'), include_directories: include_directories('../libfprint'), dependencies: libfprint_dep, content_files: content_files, diff --git a/libfprint/meson.build b/libfprint/meson.build index d3c8b034..7e3b771f 100644 --- a/libfprint/meson.build +++ b/libfprint/meson.build @@ -263,7 +263,7 @@ libfprint_drivers = static_library('fprint-drivers', install: false) mapfile = files('libfprint.ver') -vflag = '-Wl,--version-script,@0@/@1@'.format(meson.source_root(), mapfile[0]) +vflag = '-Wl,--version-script,@0@/@1@'.format(meson.project_source_root(), mapfile[0]) libfprint = shared_library(versioned_libname.split('lib')[1], sources: [ @@ -339,7 +339,7 @@ sync_udev_udb = custom_target('sync-udev-hwdb', command: [ 'cp', '-v', udev_hwdb_generator.full_path(), - meson.source_root() / 'data' + meson.project_source_root() / 'data' ] ) diff --git a/meson.build b/meson.build index 848b035c..d667b1af 100644 --- a/meson.build +++ b/meson.build @@ -6,7 +6,7 @@ project('libfprint', [ 'c', 'cpp' ], 'warning_level=1', 'c_std=gnu99', ], - meson_version: '>= 0.49.0') + meson_version: '>= 0.56.0') gnome = import('gnome') diff --git a/tests/meson.build b/tests/meson.build index a8761750..894add64 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -4,9 +4,9 @@ envs.set('G_DEBUG', 'fatal-warnings') envs.set('G_MESSAGES_DEBUG', 'all') # Setup paths -envs.set('MESON_SOURCE_ROOT', meson.source_root()) -envs.set('MESON_BUILD_ROOT', meson.build_root()) -envs.prepend('LD_LIBRARY_PATH', join_paths(meson.build_root(), 'libfprint')) +envs.set('MESON_SOURCE_ROOT', meson.project_source_root()) +envs.set('MESON_BUILD_ROOT', meson.project_build_root()) +envs.prepend('LD_LIBRARY_PATH', meson.project_build_root() / 'libfprint') # Set FP_DEVICE_EMULATION so that drivers can adapt (e.g. to use fixed # random numbers rather than proper ones) @@ -45,15 +45,15 @@ drivers_tests = [ if get_option('introspection') conf = configuration_data() - conf.set('SRCDIR', meson.source_root()) - conf.set('BUILDDIR', meson.build_root()) + conf.set('SRCDIR', meson.project_source_root()) + conf.set('BUILDDIR', meson.project_build_root()) configure_file(configuration: conf, input: 'create-driver-test.py.in', output: 'create-driver-test.py') endif if get_option('introspection') - envs.prepend('GI_TYPELIB_PATH', join_paths(meson.build_root(), 'libfprint')) + envs.prepend('GI_TYPELIB_PATH', meson.project_build_root() / 'libfprint') virtual_devices_tests = [ 'virtual-image', 'virtual-device', @@ -165,7 +165,7 @@ endif unit_tests_deps = { 'fpi-assembling' : [cairo_dep] } test_config = configuration_data() -test_config.set_quoted('SOURCE_ROOT', meson.source_root()) +test_config.set_quoted('SOURCE_ROOT', meson.project_source_root()) test_config_h = configure_file(output: 'test-config.h', configuration: test_config) foreach test_name: unit_tests @@ -218,7 +218,7 @@ test('udev-hwdb', gdb = find_program('gdb', required: false) if gdb.found() libfprint_wrapper = [ - gdb.path(), + gdb.full_path(), '-batch', '-ex', 'run', '--args', @@ -235,12 +235,12 @@ valgrind = find_program('valgrind', required: false) if valgrind.found() glib_share = glib_dep.get_pkgconfig_variable('prefix') / 'share' / glib_dep.name() glib_suppressions = glib_share + '/valgrind/glib.supp' - libfprint_suppressions = '@0@/@1@'.format(meson.source_root(), + libfprint_suppressions = '@0@/@1@'.format(meson.project_source_root(), files('libfprint.supp')[0]) - python_suppressions = '@0@/@1@'.format(meson.source_root(), + python_suppressions = '@0@/@1@'.format(meson.project_source_root(), files('valgrind-python.supp')[0]) libfprint_wrapper = [ - valgrind.path(), + valgrind.full_path(), '--tool=memcheck', '--leak-check=full', '--leak-resolution=high',