[gnome-session/benzea/systemd-new-session-config: 2/3] meson: Use systemduserunitdir variable from systemd.pc
- From: Benjamin Berg <bberg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-session/benzea/systemd-new-session-config: 2/3] meson: Use systemduserunitdir variable from systemd.pc
- Date: Tue, 17 Dec 2019 17:32:24 +0000 (UTC)
commit 2fdd20bfb6d821981d53eff53f3ce9f09b5d3449
Author: Benjamin Berg <bberg redhat com>
Date: Wed Dec 11 17:33:41 2019 +0100
meson: Use systemduserunitdir variable from systemd.pc
data/meson.build | 7 -------
meson.build | 5 +++++
2 files changed, 5 insertions(+), 7 deletions(-)
---
diff --git a/data/meson.build b/data/meson.build
index 6bc1ccb4..c8ca1d7f 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -92,13 +92,6 @@ if enable_systemd_session
unit_conf = configuration_data()
unit_conf.set('libexecdir', session_libexecdir)
- # XXX: Once https://github.com/systemd/systemd/issues/9595 is fixed and we can
- # depend on this version, replace with something like:
- # dep_systemd = dependency('systemd', required: true)
- # systemd_userunitdir = dep_systemd.get_pkgconfig_variable('systemduserunitdir')
- # and uncomment systemd_dep below
- systemd_userunitdir = join_paths(session_prefix, 'lib', 'systemd', 'user')
-
systemd_service = ['gnome-session-manager@.service',
'gnome-session-signal-init.service',
'gnome-session-restart-dbus.service',
diff --git a/meson.build b/meson.build
index fc0fa683..e1626650 100644
--- a/meson.build
+++ b/meson.build
@@ -6,6 +6,7 @@ project(
meson_version: '>= 0.43.0'
)
+prefix = get_option('prefix')
session_version = meson.project_version()
version_array = session_version.split('.')
session_major_version = version_array[0].to_int()
@@ -129,6 +130,10 @@ if enable_systemd or enable_consolekit
# Check for systemd
if enable_systemd
+ systemd_dep = dependency('systemd', version: '>= 242', required: true)
+ systemd_userunitdir = systemd_dep.get_pkgconfig_variable('systemduserunitdir',
+ define_variable: ['prefix', prefix])
+
libsystemd_dep = dependency('libsystemd', version: '>= 209', required: false)
session_bin_deps += libsystemd_dep
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]