trivial: update variable reading to the method in meson 0.56 or later

This commit is contained in:
Mario Limonciello 2022-02-21 15:50:31 -06:00 committed by Mario Limonciello
parent 6896e0ab52
commit 8281e17a4b
3 changed files with 14 additions and 14 deletions

View File

@ -1,6 +1,6 @@
if bashcomp.found() if bashcomp.found()
completions_dir = bashcomp.get_pkgconfig_variable('completionsdir', completions_dir = bashcomp.get_variable(pkgconfig : 'completionsdir',
define_variable: bashcomp.version().version_compare('>= 2.10') ? ['datadir', datadir] : ['prefix', prefix], pkgconfig_define: bashcomp.version().version_compare('>= 2.10') ? ['datadir', datadir] : ['prefix', prefix],
) )
install_data(['fwupdtool'], install_data(['fwupdtool'],

View File

@ -1,7 +1,7 @@
# only install files that are going to be used # only install files that are going to be used
if libjcat.type_name() != 'internal' and libjcat.version().version_compare('>= 0.1.9') if libjcat.type_name() != 'internal' and libjcat.version().version_compare('>= 0.1.9')
supported_gpg = libjcat.get_pkgconfig_variable('supported_gpg') supported_gpg = libjcat.get_variable(pkgconfig : 'supported_gpg')
supported_pkcs7 = libjcat.get_pkgconfig_variable('supported_pkcs7') supported_pkcs7 = libjcat.get_variable(pkgconfig : 'supported_pkcs7')
else else
supported_gpg = '1' supported_gpg = '1'
supported_pkcs7 = '1' supported_pkcs7 = '1'

View File

@ -243,7 +243,7 @@ if polkit.found()
if polkit.version().version_compare('>= 0.114') if polkit.version().version_compare('>= 0.114')
conf.set('HAVE_POLKIT_0_114', '1') conf.set('HAVE_POLKIT_0_114', '1')
endif endif
conf.set_quoted ('POLKIT_ACTIONDIR', polkit.get_pkgconfig_variable('actiondir')) conf.set_quoted ('POLKIT_ACTIONDIR', polkit.get_variable(pkgconfig : 'actiondir'))
endif endif
if build_daemon if build_daemon
if not polkit.found() if not polkit.found()
@ -252,7 +252,7 @@ if build_daemon
udevdir = get_option('udevdir') udevdir = get_option('udevdir')
if udevdir == '' and host_machine.system() == 'linux' if udevdir == '' and host_machine.system() == 'linux'
udev = dependency('udev') udev = dependency('udev')
udevdir = udev.get_pkgconfig_variable('udevdir') udevdir = udev.get_variable(pkgconfig : 'udevdir')
endif endif
endif endif
libm = cc.find_library('m', required: false) libm = cc.find_library('m', required: false)
@ -451,19 +451,19 @@ if libsystemd.found()
conf.set('HAVE_LOGIND' , '1') conf.set('HAVE_LOGIND' , '1')
systemd_root_prefix = get_option('systemd_root_prefix') systemd_root_prefix = get_option('systemd_root_prefix')
if systemd_root_prefix == '' if systemd_root_prefix == ''
systemdunitdir = systemd.get_pkgconfig_variable('systemdsystemunitdir') systemdunitdir = systemd.get_variable(pkgconfig : 'systemdsystemunitdir')
systemdsystempresetdir = systemd.get_pkgconfig_variable('systemdsystempresetdir') systemdsystempresetdir = systemd.get_variable(pkgconfig : 'systemdsystempresetdir')
systemd_shutdown_dir = systemd.get_pkgconfig_variable('systemdshutdowndir') systemd_shutdown_dir = systemd.get_variable(pkgconfig : 'systemdshutdowndir')
systemd_modules_load_dir = systemd.get_pkgconfig_variable('modulesloaddir') systemd_modules_load_dir = systemd.get_variable(pkgconfig : 'modulesloaddir')
else else
systemdunitdir = systemd.get_pkgconfig_variable('systemdsystemunitdir', define_variable: ['rootprefix', systemd_root_prefix]) systemdunitdir = systemd.get_variable(pkgconfig : 'systemdsystemunitdir', define_variable: ['rootprefix', systemd_root_prefix])
systemdsystempresetdir = systemd.get_pkgconfig_variable('systemdsystempresetdir', define_variable: ['rootprefix', systemd_root_prefix]) systemdsystempresetdir = systemd.get_variable(pkgconfig : 'systemdsystempresetdir', define_variable: ['rootprefix', systemd_root_prefix])
systemd_root_prefix_varname = 'root_prefix' systemd_root_prefix_varname = 'root_prefix'
if systemd.version().version_compare('< 246') if systemd.version().version_compare('< 246')
systemd_root_prefix_varname = 'rootprefix' systemd_root_prefix_varname = 'rootprefix'
endif endif
systemd_shutdown_dir = systemd.get_pkgconfig_variable('systemdshutdowndir', define_variable: [systemd_root_prefix_varname, systemd_root_prefix]) systemd_shutdown_dir = systemd.get_variable(pkgconfig : 'systemdshutdowndir', define_variable: [systemd_root_prefix_varname, systemd_root_prefix])
systemd_modules_load_dir = systemd.get_pkgconfig_variable('modulesloaddir', define_variable: [systemd_root_prefix_varname, systemd_root_prefix]) systemd_modules_load_dir = systemd.get_variable(pkgconfig : 'modulesloaddir', define_variable: [systemd_root_prefix_varname, systemd_root_prefix])
endif endif
endif endif