summaryrefslogtreecommitdiffstats
path: root/source/l/polkit/polkit-124-systemd-fixup.patch
blob: a4dd7eafcf929d78261da877fd15406ada686402 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
https://bugs.gentoo.org/922458
https://github.com/polkit-org/polkit/pull/417/files#r1458416421
--- a/meson.build
+++ b/meson.build
@@ -212,14 +212,17 @@ if enable_logind
   config_h.set10('HAVE_' + func.to_upper(), cc.has_function(func, dependencies: logind_dep))
 
   # systemd unit / service files
-  systemd_dep = dependency('systemd', not_found_message: 'systemd required but not found, please provide a valid systemd user unit dir or disable it')
   systemd_systemdsystemunitdir = get_option('systemdsystemunitdir')
-  if systemd_systemdsystemunitdir == '' and session_tracking == 'libsystemd-login'
-    # FIXME: systemd.pc file does not use variables with relative paths, so `define_variable` cannot be used
-    systemd_systemdsystemunitdir = systemd_dep.get_pkgconfig_variable('systemdsystemunitdir')
-  endif
+  if session_tracking == 'libsystemd-login'
+    systemd_dep = dependency('systemd', not_found_message: 'systemd required but not found, please provide a valid systemd user unit dir or disable it')
 
-  systemd_sysusers_dir = systemd_dep.get_pkgconfig_variable('sysusers_dir', default: '/usr/lib/sysusers.d')
+    if systemd_systemdsystemunitdir == ''
+      # FIXME: systemd.pc file does not use variables with relative paths, so `define_variable` cannot be used
+      systemd_systemdsystemunitdir = systemd_dep.get_pkgconfig_variable('systemdsystemunitdir')
+    endif
+
+    systemd_sysusers_dir = systemd_dep.get_pkgconfig_variable('sysusers_dir', default: '/usr/lib/sysusers.d')
+  endif
 endif
 config_h.set('HAVE_LIBSYSTEMD', enable_logind)