From ec465966bcc783203041de09dce5c315bb0a6f76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A1s=20P=C5=91cze?= Date: Mon, 17 Jan 2022 08:23:55 +0100 Subject: [PATCH] treewide: meson.build: simplify `get_variable()` calls Since 01c6fd0a88ac811cecee711be85d3310bf09be67 the minimum required meson version is 0.59.0, and since meson 0.58.0, `get_variable()` on a dependency object accepts a positional argument. The "type" of variable (internal, pkgconfig, etc.) in that case does not need to be specified explicitly. --- meson.build | 8 ++++---- spa/plugins/audioconvert/meson.build | 4 ++-- spa/tests/meson.build | 2 +- src/daemon/systemd/system/meson.build | 2 +- src/daemon/systemd/user/meson.build | 2 +- src/modules/meson.build | 6 +++--- src/tests/meson.build | 6 +++--- 7 files changed, 15 insertions(+), 15 deletions(-) diff --git a/meson.build b/meson.build index 36dca40e4..174f49664 100644 --- a/meson.build +++ b/meson.build @@ -507,11 +507,11 @@ devenv = environment() builddir = meson.project_build_root() srcdir = meson.project_source_root() -devenv.set('PIPEWIRE_CONFIG_DIR', pipewire_dep.get_variable(internal: 'confdatadir')) -devenv.set('PIPEWIRE_MODULE_DIR', pipewire_dep.get_variable(internal: 'moduledir')) +devenv.set('PIPEWIRE_CONFIG_DIR', pipewire_dep.get_variable('confdatadir')) +devenv.set('PIPEWIRE_MODULE_DIR', pipewire_dep.get_variable('moduledir')) -devenv.set('SPA_PLUGIN_DIR', spa_dep.get_variable(internal: 'plugindir')) -devenv.set('SPA_DATA_DIR', spa_dep.get_variable(internal: 'datadir')) +devenv.set('SPA_PLUGIN_DIR', spa_dep.get_variable('plugindir')) +devenv.set('SPA_DATA_DIR', spa_dep.get_variable('datadir')) devenv.set('GST_PLUGIN_PATH', builddir / 'src'/ 'gst') diff --git a/spa/plugins/audioconvert/meson.build b/spa/plugins/audioconvert/meson.build index 5398f9298..89af12671 100644 --- a/spa/plugins/audioconvert/meson.build +++ b/spa/plugins/audioconvert/meson.build @@ -140,7 +140,7 @@ foreach a : test_apps install : installed_tests_enabled, install_dir : installed_tests_execdir / 'audioconvert'), env : [ - 'SPA_PLUGIN_DIR=@0@'.format(spa_dep.get_variable(internal: 'plugindir')), + 'SPA_PLUGIN_DIR=@0@'.format(spa_dep.get_variable('plugindir')), ]) if installed_tests_enabled @@ -170,7 +170,7 @@ foreach a : benchmark_apps install : installed_tests_enabled, install_dir : installed_tests_execdir / 'audioconvert'), env : [ - 'SPA_PLUGIN_DIR=@0@'.format(spa_dep.get_variable(internal: 'plugindir')), + 'SPA_PLUGIN_DIR=@0@'.format(spa_dep.get_variable('plugindir')), ]) if installed_tests_enabled diff --git a/spa/tests/meson.build b/spa/tests/meson.build index db84241d7..c73c887f4 100644 --- a/spa/tests/meson.build +++ b/spa/tests/meson.build @@ -41,7 +41,7 @@ foreach a : benchmark_apps install_dir : installed_tests_execdir, ), env : [ - 'SPA_PLUGIN_DIR=@0@'.format(spa_dep.get_variable(internal: 'plugindir')), + 'SPA_PLUGIN_DIR=@0@'.format(spa_dep.get_variable('plugindir')), ] ) diff --git a/src/daemon/systemd/system/meson.build b/src/daemon/systemd/system/meson.build index b3e5f1f41..84ca0b068 100644 --- a/src/daemon/systemd/system/meson.build +++ b/src/daemon/systemd/system/meson.build @@ -1,4 +1,4 @@ -systemd_system_services_dir = systemd.get_variable(pkgconfig: 'systemdsystemunitdir', pkgconfig_define : [ 'rootprefix', prefix]) +systemd_system_services_dir = systemd.get_variable('systemdsystemunitdir', pkgconfig_define : [ 'rootprefix', prefix]) if get_option('systemd-system-unit-dir') != '' systemd_system_services_dir = get_option('systemd-system-unit-dir') endif diff --git a/src/daemon/systemd/user/meson.build b/src/daemon/systemd/user/meson.build index a24f9b174..d17f3794f 100644 --- a/src/daemon/systemd/user/meson.build +++ b/src/daemon/systemd/user/meson.build @@ -1,4 +1,4 @@ -systemd_user_services_dir = systemd.get_variable(pkgconfig: 'systemduserunitdir', pkgconfig_define : [ 'prefix', prefix]) +systemd_user_services_dir = systemd.get_variable('systemduserunitdir', pkgconfig_define : [ 'prefix', prefix]) if get_option('systemd-user-unit-dir') != '' systemd_user_services_dir = get_option('systemd-user-unit-dir') endif diff --git a/src/modules/meson.build b/src/modules/meson.build index a2ae53381..fb137c66c 100644 --- a/src/modules/meson.build +++ b/src/modules/meson.build @@ -371,9 +371,9 @@ test('pw-test-protocol-native', install_dir : installed_tests_execdir, ), env : [ - 'SPA_PLUGIN_DIR=@0@'.format(spa_dep.get_variable(internal: 'plugindir')), - 'PIPEWIRE_CONFIG_DIR=@0@'.format(pipewire_dep.get_variable(internal: 'confdatadir')), - 'PIPEWIRE_MODULE_DIR=@0@'.format(pipewire_dep.get_variable(internal: 'moduledir')), + 'SPA_PLUGIN_DIR=@0@'.format(spa_dep.get_variable('plugindir')), + 'PIPEWIRE_CONFIG_DIR=@0@'.format(pipewire_dep.get_variable('confdatadir')), + 'PIPEWIRE_MODULE_DIR=@0@'.format(pipewire_dep.get_variable('moduledir')), ] ) diff --git a/src/tests/meson.build b/src/tests/meson.build index 3e8d05012..3e03a4c75 100644 --- a/src/tests/meson.build +++ b/src/tests/meson.build @@ -13,9 +13,9 @@ foreach a : test_apps install : installed_tests_enabled, install_dir : installed_tests_execdir), env : [ - 'SPA_PLUGIN_DIR=@0@'.format(spa_dep.get_variable(internal: 'plugindir')), - 'PIPEWIRE_CONFIG_DIR=@0@'.format(pipewire_dep.get_variable(internal: 'confdatadir')), - 'PIPEWIRE_MODULE_DIR=@0@'.format(pipewire_dep.get_variable(internal: 'moduledir')), + 'SPA_PLUGIN_DIR=@0@'.format(spa_dep.get_variable('plugindir')), + 'PIPEWIRE_CONFIG_DIR=@0@'.format(pipewire_dep.get_variable('confdatadir')), + 'PIPEWIRE_MODULE_DIR=@0@'.format(pipewire_dep.get_variable('moduledir')), ]) if installed_tests_enabled