aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2020-12-02 23:48:11 +0100
committerBrian Ashworth <bosrsf04@gmail.com>2020-12-09 17:39:20 -0500
commita52176f83035e98dd5487e3373ee2c52c8890c8d (patch)
treecb669041ca63b772bd09f89dabf27d26afd1f07a
parentfdbe98512a71524091375290ca2c1c9450e4db84 (diff)
build: add basu as sd-bus provider
-rw-r--r--include/swaybar/tray/tray.h2
-rw-r--r--meson.build5
-rw-r--r--meson_options.txt2
3 files changed, 8 insertions, 1 deletions
diff --git a/include/swaybar/tray/tray.h b/include/swaybar/tray/tray.h
index b5df0025..a64cd9c8 100644
--- a/include/swaybar/tray/tray.h
+++ b/include/swaybar/tray/tray.h
@@ -6,6 +6,8 @@
#include <systemd/sd-bus.h>
#elif HAVE_LIBELOGIND
#include <elogind/sd-bus.h>
+#elif HAVE_BASU
+#include <basu/sd-bus.h>
#endif
#include <cairo.h>
#include <stdint.h>
diff --git a/meson.build b/meson.build
index 9842d78a..38a55678 100644
--- a/meson.build
+++ b/meson.build
@@ -104,8 +104,12 @@ if get_option('sd-bus-provider') == 'auto'
sdbus = dependency('libelogind',
required: false,
version: '>=239',
+ not_found_message: 'libelogind not found, trying basu',
)
endif
+ if not sdbus.found()
+ sdbus = dependency('basu', required: false)
+ endif
else
sdbus = dependency(get_option('sd-bus-provider'), required: get_option('tray'))
endif
@@ -122,6 +126,7 @@ conf_data.set10('HAVE_XWAYLAND', have_xwayland)
conf_data.set10('HAVE_GDK_PIXBUF', gdk_pixbuf.found())
conf_data.set10('HAVE_LIBSYSTEMD', sdbus.found() and sdbus.name() == 'libsystemd')
conf_data.set10('HAVE_LIBELOGIND', sdbus.found() and sdbus.name() == 'libelogind')
+conf_data.set10('HAVE_BASU', sdbus.found() and sdbus.name() == 'basu')
conf_data.set10('HAVE_TRAY', have_tray)
scdoc = dependency('scdoc', version: '>=1.9.2', native: true, required: get_option('man-pages'))
diff --git a/meson_options.txt b/meson_options.txt
index 66c6d268..e36900b6 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -6,4 +6,4 @@ option('xwayland', type: 'feature', value: 'auto', description: 'Enable support
option('tray', type: 'feature', value: 'auto', description: 'Enable support for swaybar tray')
option('gdk-pixbuf', type: 'feature', value: 'auto', description: 'Enable support for more image formats in swaybg')
option('man-pages', type: 'feature', value: 'auto', description: 'Generate and install man pages')
-option('sd-bus-provider', type: 'combo', choices: ['auto', 'libsystemd', 'libelogind'], value: 'auto', description: 'Provider of the sd-bus library')
+option('sd-bus-provider', type: 'combo', choices: ['auto', 'libsystemd', 'libelogind', 'basu'], value: 'auto', description: 'Provider of the sd-bus library')