File: Fix_kristall_version.patch

package info (click to toggle)
kristall 0.4%2Bdfsg-5
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 33,824 kB
  • sloc: cpp: 11,646; python: 3,658; sh: 74; makefile: 68; awk: 58; xml: 14
file content (28 lines) | stat: -rw-r--r-- 1,129 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
From: Carlos Henrique Lima Melara <charlesmelara@outlook.com>
Subject: fix missing kristall version when not building in git repo
Bug: https://github.com/MasterQ32/kristall/issues/264
Applied-Upstream: 0.5, https://github.com/MasterQ32/kristall/commit/d88dd7bfd107dc8c22ae9b91a3b2a06bc7afe815
Last-Update: 2023-06-11
---
 src/kristall.pro | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/kristall.pro b/src/kristall.pro
index 5f5bb46..646d302 100644
--- a/src/kristall.pro
+++ b/src/kristall.pro
@@ -9,7 +9,13 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets network multimedia multimediawid
 # deprecated API in order to know how to port your code away from it.
 DEFINES += QT_DEPRECATED_WARNINGS
 
-DEFINES += KRISTALL_VERSION="\"$(shell cd $$PWD; git describe --tags)\""
+KRISTALL_VERSION = $$(KRISTALL_VERSION)
+
+isEmpty(KRISTALL_VERSION) {
+    KRISTALL_VERSION = $(shell cd $$PWD; git describe --tags)
+}
+
+DEFINES += KRISTALL_VERSION="\"$$KRISTALL_VERSION\""
 
 # You can also make your code fail to compile if it uses deprecated APIs.
 # In order to do so, uncomment the following line.