mirror of
https://gitlab.freedesktop.org/libfprint/fprintd.git
synced 2026-05-05 15:48:08 +02:00
build: Do not use deprecated hacks in newer meson
This commit is contained in:
parent
609a246e97
commit
5f73ca1e3f
3 changed files with 22 additions and 5 deletions
|
|
@ -1,4 +1,10 @@
|
|||
mapfile = files('pam_fprintd.ver')
|
||||
mapfile = files('pam_fprintd.ver')[0]
|
||||
if meson.version().version_compare('>=1.4')
|
||||
mapfile_path = mapfile.full_path()
|
||||
else
|
||||
mapfile_path = meson.project_source_root() / '@0@'.format(mapfile)
|
||||
endif
|
||||
|
||||
pam_modules_dir = get_option('pam_modules_dir')
|
||||
if pam_modules_dir == ''
|
||||
pam_modules_dir = get_option('prefix') / get_option('libdir') / 'security'
|
||||
|
|
@ -24,7 +30,7 @@ pam_fprintd = shared_module('pam_fprintd',
|
|||
has_openpam ? ['-DFPRINTD_PAM_USE_OPENPAM'] : [],
|
||||
],
|
||||
link_args: [
|
||||
'-Wl,--version-script,@0@/@1@'.format(meson.source_root(), mapfile[0]),
|
||||
'-Wl,--version-script,@0@'.format(mapfile_path),
|
||||
'-Wl,--unresolved-symbols=report-all',
|
||||
],
|
||||
link_depends: mapfile,
|
||||
|
|
|
|||
|
|
@ -90,6 +90,13 @@ test_envs = [
|
|||
]
|
||||
|
||||
if address_sanitizer
|
||||
lsan_suppress = files('LSAN-leaks-suppress.txt')[0]
|
||||
if meson.version().version_compare('>=1.4')
|
||||
lsan_suppress = lsan_suppress.full_path()
|
||||
else
|
||||
lsan_suppress = meson.project_source_root() / '@0@'.format(lsan_suppress)
|
||||
endif
|
||||
|
||||
timeout_multiplier = 3
|
||||
test_envs += [
|
||||
'ADDRESS_SANITIZER=true',
|
||||
|
|
@ -100,8 +107,7 @@ if address_sanitizer
|
|||
'LSAN_OPTIONS=@0@'.format(':'.join([
|
||||
'exitcode=0',
|
||||
'strict_string_checks=true',
|
||||
'suppressions=@0@'.format(
|
||||
files(meson.current_source_dir() / 'LSAN-leaks-suppress.txt')[0]),
|
||||
'suppressions=@0@'.format(lsan_suppress),
|
||||
])),
|
||||
]
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -30,7 +30,12 @@ foreach libname: preloaded_libs
|
|||
|
||||
if lib != '' and lib[0] == '/'
|
||||
message('Found library @0@ as @1@'.format(libname, lib))
|
||||
pam_tests_ld_preload += '@0@'.format(files(lib)[0])
|
||||
preload_lib_path = files(lib)[0]
|
||||
if meson.version().version_compare('>=1.4')
|
||||
pam_tests_ld_preload += preload_lib_path.full_path()
|
||||
else
|
||||
pam_tests_ld_preload += '@0@'.format(preload_lib_path)
|
||||
endif
|
||||
else
|
||||
tests = []
|
||||
warning('No library found for ' + libname + ', skipping PAM tests')
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue