[gnome-shell/wip/jtojnar/bash-completion-prefix] build: Obtain systemduserunitdir from pkg-config



commit 29c59aecdb8861821dd2ba1d672da2f44194df44
Author: Jan Tojnar <jtojnar gmail com>
Date:   Fri Apr 10 13:43:25 2020 +0200

    build: Obtain systemduserunitdir from pkg-config
    
    Previously, this prevented local installation because systemd did not
    make the variable's prefix overridable
    
    https://github.com/systemd/systemd/issues/9595
    
    but since it has been fixed in systemd 242, we can finally use that.
    
    ---
    
    https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/1194

 meson.build | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)
---
diff --git a/meson.build b/meson.build
index b5a4d1c000..2423626d4a 100644
--- a/meson.build
+++ b/meson.build
@@ -63,12 +63,11 @@ portaldir = join_paths(datadir, 'xdg-desktop-portal', 'portals')
 schemadir = join_paths(datadir, 'glib-2.0', 'schemas')
 servicedir = join_paths(datadir, 'dbus-1', 'services')
 
-# XXX: Once https://github.com/systemd/systemd/issues/9595 is fixed and we can
-# depend on this version, replace with something like:
-# systemduserunitdir = systemd_dep.get_pkgconfig_variable('systemduserunitdir',
-#                                                         define_variable: ['prefix', prefix])
-# and uncomment systemd_dep below
-systemduserunitdir = join_paths(prefix, 'lib', 'systemd', 'user')
+if get_option('systemd')
+  systemd_dep = dependency('systemd')
+  systemduserunitdir = systemd_dep.get_pkgconfig_variable('systemduserunitdir',
+                                                          define_variable: ['prefix', prefix])
+endif
 
 keybindings_dep = dependency('gnome-keybindings', required: false)
 if keybindings_dep.found()
@@ -122,8 +121,6 @@ endif
 
 if get_option('systemd')
   libsystemd_dep = dependency('libsystemd')
-  # XXX: see systemduserunitdir
-  # systemd_dep = dependency('systemd')
   have_systemd = true
 else
   libsystemd_dep = []


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]