PYTHON_COMPAT=( python{3_5,3_6,3_7} )
-inherit bash-completion-r1 linux-info meson multilib-minimal ninja-utils pam python-any-r1 systemd toolchain-funcs udev
+inherit bash-completion-r1 linux-info meson multilib-minimal ninja-utils pam python-any-r1 systemd toolchain-funcs udev usr-ldscript
DESCRIPTION="System and service manager for Linux"
HOMEPAGE="https://www.freedesktop.org/wiki/Software/systemd"
LICENSE="GPL-2 LGPL-2.1 MIT public-domain"
SLOT="0/2"
-IUSE="acl apparmor audit build cgroup-hybrid cryptsetup curl dns-over-tls elfutils +gcrypt gnuefi http idn importd +kmod +lz4 lzma nat pam pcre policykit qrcode +resolvconf +seccomp selinux split-usr +sysv-utils test vanilla xkb"
+IUSE="acl apparmor audit build cgroup-hybrid cryptsetup curl dns-over-tls elfutils +gcrypt gnuefi http idn importd +kmod +lz4 lzma nat pam pcre policykit qrcode +resolvconf +seccomp selinux split-usr static-libs +sysv-utils test vanilla xkb"
REQUIRED_USE="importd? ( curl gcrypt lzma )"
RESTRICT="!test? ( test )"
-Dtimesyncd=$(meson_multilib)
-Dtmpfiles=$(meson_multilib)
-Dvconsole=$(meson_multilib)
+
+ # static-libs
+ -Dstatic-libsystemd=$(usex static-libs true false)
+ -Dstatic-libudev=$(usex static-libs true false)
)
+ if multilib_is_native_abi; then
+ myconf+=( -Drootlibdir="${EPREFIX}$(usex split-usr '' /usr)/$(get_libdir)" )
+ else
+ myconf+=( -Drootlibdir="${EPREFIX}/usr/$(get_libdir)" )
+ fi
+
meson_src_configure "${myconf[@]}"
}
# Avoid breaking boot/reboot
dosym ../../../lib/systemd/systemd /usr/lib/systemd/systemd
dosym ../../../lib/systemd/systemd-shutdown /usr/lib/systemd/systemd-shutdown
+
+ if use static-libs; then
+ mv "${ED}/$(get_libdir)"/lib{systemd,udev}.a "${ED}/usr/$(get_libdir)/" || die
+ gen_usr_ldscript lib{systemd,udev}.so
+ fi
fi
}