aports/testing/gnome-user-share/optional-systemd.patch
2024-10-18 17:48:29 +00:00

38 lines
1.3 KiB
Diff

Patch-Source: https://gitlab.gnome.org/GNOME/gnome-user-share/-/merge_requests/28
---
From bcc7c178f8e84ed073e16db5af8b8f4643d599e1 Mon Sep 17 00:00:00 2001
From: fossdd <fossdd@pwned.life>
Date: Thu, 17 Oct 2024 23:18:21 +0200
Subject: [PATCH] build: treat systemd-devel as a optional build dependency
Some systems (Alpine/postmarketOS) don't use systemd and only provide a
alternative init manager, like OpenRC. With this change, also these
systems can package and use gnome-user-share.
---
meson.build | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/meson.build b/meson.build
index 7f3b4a1..4d79081 100644
--- a/meson.build
+++ b/meson.build
@@ -85,9 +85,14 @@ gio_schemasdir = gio_dep.get_variable(
)
# systemd user unit directory
+systemd_dep = dependency('systemd', required : false)
systemd_systemduserunitdir = get_option('systemduserunitdir')
if systemd_systemduserunitdir == ''
- systemd_systemduserunitdir = dependency('systemd').get_variable(pkgconfig: 'systemduserunitdir')
+ if systemd_dep.found()
+ systemd_systemduserunitdir = systemd_dep.get_variable(pkgconfig: 'systemduserunitdir')
+ else
+ systemd_systemduserunitdir = user_share_prefix / user_share_libdir / 'systemd' / 'user'
+ endif
endif
httpd = find_program(get_option('httpd'), required: false)
--
GitLab