Skip to content
Snippets Groups Projects
Commit 831f00d8 authored by Bro Brian's avatar Bro Brian
Browse files

Delete 0002-build-Fix-version-macros.patch

no longer needed
parent fb0976dd
No related branches found
No related tags found
No related merge requests found
Pipeline #53659 failed
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: "Jan Alexander Steffens (heftig)" <heftig@archlinux.org>
Date: Sat, 5 Feb 2022 02:30:52 +0000
Subject: [PATCH] build: Fix version macros
The project version is a string. We need to split it into an array of
version components.
---
libupower-glib/meson.build | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/libupower-glib/meson.build b/libupower-glib/meson.build
index 1bab59b80390..2ff7baf51e85 100644
--- a/libupower-glib/meson.build
+++ b/libupower-glib/meson.build
@@ -1,7 +1,12 @@
+version_arr = meson.project_version().split('.')
+major_version = version_arr[0].to_int()
+minor_version = version_arr[1].to_int()
+micro_version = version_arr[2].to_int()
+
cdata = configuration_data()
-cdata.set('UP_MAJOR_VERSION', meson.project_version()[0])
-cdata.set('UP_MINOR_VERSION', meson.project_version()[1])
-cdata.set('UP_MICRO_VERSION', meson.project_version()[2])
+cdata.set('UP_MAJOR_VERSION', major_version)
+cdata.set('UP_MINOR_VERSION', minor_version)
+cdata.set('UP_MICRO_VERSION', micro_version)
up_version_h = configure_file(
output: 'up-version.h',
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment