46 lines
1.5 KiB
Diff
46 lines
1.5 KiB
Diff
From 16b46e295b86cbf1beaccf8218cf65ebb4b7a6f1 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
|
|
Date: Wed, 13 Jul 2022 17:33:05 +0200
|
|
Subject: [PATCH] build: Adjust to polkit version changes
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
So far it was `0.x` now it's `y` so don't fail if there's
|
|
no `.` in the version number. Otherwise we fail like
|
|
|
|
src/meson.build:295:0: ERROR: Index 1 out of bounds of array of size 1.
|
|
|
|
Signed-off-by: Guido Günther <guido.gunther@puri.sm>
|
|
Part-of: <https://gitlab.gnome.org/World/Phosh/phosh/-/merge_requests/1105>
|
|
---
|
|
src/meson.build | 12 ++++++++++--
|
|
1 file changed, 10 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/src/meson.build b/src/meson.build
|
|
index 6f00e2d..c41207a 100644
|
|
--- a/src/meson.build
|
|
+++ b/src/meson.build
|
|
@@ -292,9 +292,17 @@ phosh_deps = [
|
|
cc.find_library('rt', required: false),
|
|
]
|
|
|
|
+polkit_version = libpolkit_agent_dep.version().split('.')
|
|
+if polkit_version.length() == 1
|
|
+ polkit_major = polkit_version[0]
|
|
+ polkit_minor = '0'
|
|
+else
|
|
+ polkit_major = polkit_version[0]
|
|
+ polkit_minor = polkit_version[1]
|
|
+endif
|
|
add_project_arguments([
|
|
- '-DPOLKIT_AGENT_MAJOR_VERSION=' + libpolkit_agent_dep.version().split('.')[0],
|
|
- '-DPOLKIT_AGENT_MINOR_VERSION=' + libpolkit_agent_dep.version().split('.')[1]
|
|
+ '-DPOLKIT_AGENT_MAJOR_VERSION=' + polkit_major,
|
|
+ '-DPOLKIT_AGENT_MINOR_VERSION=' + polkit_minor,
|
|
], language: 'c')
|
|
|
|
phosh_inc = include_directories('.')
|
|
--
|
|
2.35.1
|