]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
meson: adjust rootlibdir default for multiarch
authorMike Gilbert <floppym@gentoo.org>
Tue, 7 Jun 2022 00:55:45 +0000 (20:55 -0400)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 7 Jun 2022 10:26:38 +0000 (12:26 +0200)
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.

meson.build

index ce2d9679b4c35fe5267ae26cf3fca3289cd15ff4..2daaf3f4000d5555ab4332b5a18a7059d0774009 100644 (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'