File: 03-Avoid-calling-git-command-when-building.patch

package info (click to toggle)
yuview 2.13-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 12,628 kB
  • sloc: cpp: 61,366; python: 788; xml: 54; makefile: 6
file content (52 lines) | stat: -rw-r--r-- 1,358 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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
From: Roger Shimizu <rosh@debian.org>
Date: Sat, 21 May 2022 17:04:05 +0900
Subject: Avoid calling git command when building

---
 YUViewApp/YUViewApp.pro | 3 +--
 YUViewLib/YUViewLib.pro | 4 +---
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/YUViewApp/YUViewApp.pro b/YUViewApp/YUViewApp.pro
index 024fae0..ef869b5 100644
--- a/YUViewApp/YUViewApp.pro
+++ b/YUViewApp/YUViewApp.pro
@@ -58,7 +58,7 @@ macx {
 }
 
 linux {
-    SVNN = $$system("git describe --tags")
+    SVNN = $$(DEB_VERSION_UPSTREAM)
 }
 win32-msvc* {
     message("MSVC Compiler detected.")
@@ -69,7 +69,6 @@ win32 {
     DEFINES += NOMINMAX
 }
 
-LASTHASH = $$system("git rev-parse HEAD")
 isEmpty(LASTHASH) {
     LASTHASH = 0
 }
diff --git a/YUViewLib/YUViewLib.pro b/YUViewLib/YUViewLib.pro
index a0889ca..f6a59e2 100644
--- a/YUViewLib/YUViewLib.pro
+++ b/YUViewLib/YUViewLib.pro
@@ -21,8 +21,7 @@ contains(QT_ARCH, x86_32|i386) {
     warning("You are building for a 32 bit system. This is untested and not supported.")
 }
 
-SVNN = $$system("git describe --tags")
-LASTHASH = $$system("git rev-parse HEAD")
+SVNN = $$(DEB_VERSION_UPSTREAM)
 isEmpty(LASTHASH) {
     LASTHASH = 0
 }
@@ -40,7 +39,6 @@ win32-msvc* {
 }
 win32-g++ | linux | macx {
     HASHSTRING = '\\"$${LASTHASH}\\"'
-    DEFINES += YUVIEW_HASH=\"$${HASHSTRING}\"
 }
 
 VERSTR = '\\"$${SVNN}\\"'