Blob Blame History Raw
From dbde51b7e3c0d85b7e5c9669b8c9b88735bbc979 Mon Sep 17 00:00:00 2001
From: Aleksei Bavshin <alebastr89@gmail.com>
Date: Sun, 16 Jan 2022 11:09:00 -0800
Subject: [PATCH 1/2] Revert "build: fix building with basu"

This reverts commit 6bb3e7ee0570b768032bcaa501cc812b77ce53e6.
---
 meson.build | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

diff --git a/meson.build b/meson.build
index 49ae4b7a..ebf6e76e 100644
--- a/meson.build
+++ b/meson.build
@@ -92,22 +92,15 @@ if get_option('sd-bus-provider') == 'auto'
 	if not get_option('tray').disabled()
 		assert(get_option('auto_features').auto(), 'sd-bus-provider must not be set to auto since auto_features != auto')
 	endif
-	sdbus = dependency(['libsystemd', 'libelogind'],
-		required: false,
+	sdbus = dependency(['libsystemd', 'libelogind', 'basu'],
+		required: get_option('tray'),
 		version: '>=239',
 	)
-	if not sdbus.found()
-		sdbus = dependency('basu', required: false)
-	endif
 else
 	sdbus = dependency(get_option('sd-bus-provider'), required: get_option('tray'))
 endif
 
-tray_deps_found = sdbus.found()
-if get_option('tray').enabled() and not tray_deps_found
-	error('Building with -Dtray=enabled, but sd-bus has not been not found')
-endif
-have_tray = (not get_option('tray').disabled()) and tray_deps_found
+have_tray = sdbus.found()
 
 conf_data = configuration_data()
 
-- 
2.34.1


From 1090f85659f2eea69ed72764e1c78647b5c30225 Mon Sep 17 00:00:00 2001
From: Aleksei Bavshin <alebastr89@gmail.com>
Date: Sun, 16 Jan 2022 11:09:31 -0800
Subject: [PATCH 2/2] Revert "build: use list for sdbus dep"

This reverts commit 02b412a3d4e930237a1d16554af6e1e7d1855c89.
---
 meson.build | 23 +++++++++++++++++++----
 1 file changed, 19 insertions(+), 4 deletions(-)

diff --git a/meson.build b/meson.build
index ebf6e76e..8dc9120b 100644
--- a/meson.build
+++ b/meson.build
@@ -3,7 +3,7 @@ project(
 	'c',
 	version: '1.7-rc3',
 	license: 'MIT',
-	meson_version: '>=0.60.0',
+	meson_version: '>=0.59.0',
 	default_options: [
 		'c_std=c11',
 		'warning_level=2',
@@ -92,15 +92,30 @@ if get_option('sd-bus-provider') == 'auto'
 	if not get_option('tray').disabled()
 		assert(get_option('auto_features').auto(), 'sd-bus-provider must not be set to auto since auto_features != auto')
 	endif
-	sdbus = dependency(['libsystemd', 'libelogind', 'basu'],
-		required: get_option('tray'),
+	sdbus = dependency('libsystemd',
+		required: false,
 		version: '>=239',
+		not_found_message: 'libsystemd not found, trying libelogind',
 	)
+	if not sdbus.found()
+		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
 
-have_tray = sdbus.found()
+tray_deps_found = sdbus.found()
+if get_option('tray').enabled() and not tray_deps_found
+	error('Building with -Dtray=enabled, but sd-bus has not been not found')
+endif
+have_tray = (not get_option('tray').disabled()) and tray_deps_found
 
 conf_data = configuration_data()
 
-- 
2.34.1