File: 0100-build-reproducible.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 (32 lines) | stat: -rw-r--r-- 1,011 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
From: Chris Lamb <lamby@debian.org>
Date: Sat, 30 May 2020 10:16:59 +0200
Subject: make build reproducible

Forwarded: Paul Davis <paul@linuxaudiosystems.com>
Last-Update: 2018-02-28
---
 wscript | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

--- ardour.orig/wscript
+++ ardour/wscript
@@ -1550,10 +1550,18 @@
 const char* const ardour_config_info = "\\n\\
 ''')
 
+    config_substitutes = [('"', '\\"')]
+    if 'SOURCE_DATE_EPOCH' in os.environ:
+        # attempting to do a reproducible build
+        config_substitutes += [(os.getcwd(), '<<ARDOURSRCDIR>>')]
+
     def write_config_text(title, val):
         autowaf.display_msg(conf, title, val)
         config_text.write(title + ': ')
-        config_text.write(str(val).replace ('"', '\\"'))
+        val = str(val)
+        for a, b in config_substitutes:
+            val = val.replace(a, b)
+        config_text.write(val)
         config_text.write("\\n\\\n")
 
     write_config_text('Build documentation',   conf.env['DOCS'])