meson: adjust rootlibdir default for multiarch

On Debian, libdir is commonly something like 'lib/x86_64-linux-gnu'.

The result of get_option('libdir') is normalized to a prefix-relative
path by meson, so we can just append it to rootprefixdir.

Fixes https://github.com/systemd/systemd/issues/23648.
This commit is contained in:
Mike Gilbert 2022-06-06 20:55:45 -04:00 committed by Zbigniew Jędrzejewski-Szmek
parent 5fb225615b
commit e91119c3a4

View file

@ -144,7 +144,12 @@ rootlibexecdir = rootprefixdir / 'lib/systemd'
rootlibdir = get_option('rootlibdir')
if rootlibdir == ''
rootlibdir = rootprefixdir / libdir.split('/')[-1]
# This will be a relative path if libdir is in prefix.
rootlibdir = get_option('libdir')
endif
if not rootlibdir.startswith('/')
# If we have a relative path, add rootprefixdir to the front.
rootlibdir = rootprefixdir / rootlibdir
endif
rootpkglibdir = rootlibdir / 'systemd'