File: 0030-wscript.patch

package info (click to toggle)
ardour 1%3A8.12.0%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 147,336 kB
  • sloc: cpp: 645,609; ansic: 515,891; xml: 123,665; python: 35,344; javascript: 15,340; sh: 4,983; asm: 1,800; perl: 958; php: 785; makefile: 298; objc: 28
file content (45 lines) | stat: -rw-r--r-- 1,431 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
From: =?utf-8?q?IOhannes_m_zm=C3=B6lnig?= <umlaeute@debian.org>
Date: Sat, 30 May 2020 10:16:59 +0200
Subject: Always rely on the version from debian changelog

Forwarded: Not-Needed
Last-Update: 2020-05-27

We generate libs/ardour/revision.cc in debian/rules.
Adapt the wscript to parse our custom format. To avoid
confusion with any existing .git directory on a packager's
machine, disable the git version check and pretend it's a
tarball.
---
 wscript | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--- ardour.orig/wscript
+++ ardour/wscript
@@ -237,7 +237,7 @@
         return 'sequoia'
 
 
-def set_version (from_file = False):
+def set_version (from_file = True):
     def sanitize(s):
         # round-trip to remove anything in the string that is not encodable in
         # ASCII, yet still keep a real (utf8-encoded internally) string.
@@ -278,7 +278,7 @@
 
     parts = sanitize(rev).split ('.', 1)
     MAJOR = parts[0]
-    other = parts[1].split('-', 1)
+    other = parts[1].split('.', 1)
     MINOR = other[0]
     if len(other) > 1:
         MICRO = other[1].rsplit('-',1)[0].replace('-','.')
@@ -298,7 +298,7 @@
 def create_stored_revision():
     set_version ()
     rev = ""
-    if os.path.exists('.git'):
+    if False or os.path.exists('.git'):
         rev, rev_date = fetch_git_revision_date()
         print("Git version: " + rev + "\n")
     elif os.path.exists('libs/ardour/revision.cc'):