Package: sunpinyin / 3.0.0~rc1+ds1-3

backport/0004-Make-the-.pc-output-reproducible.patch Patch series | download
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: Chris Lamb <chris@chris-lamb.co.uk>
Date: Wed, 12 Apr 2017 19:50:27 +0100
Subject: Make the .pc output reproducible

Whilst working on the Reproducible Builds effort [0], we noticed
that sunpinyin could not be built reproducibly due to iterating over
the filesystem in a non-deterministic ordering

 [0] https://reproducible-builds.org/

Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
---
 SConstruct | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/SConstruct b/SConstruct
index a78c7d9..133e393 100644
--- a/SConstruct
+++ b/SConstruct
@@ -429,7 +429,7 @@ env.Substfile('sunpinyin-2.0.pc.in', SUBST_DICT={
     '@VERSION@': version,
     '@CFLAGS@': reduce(lambda a, b: a + ' ' + b,
                        map(lambda x: '-I$${includedir}' + x[3:],
-                           allinc())),
+                           sorted(allinc()))),
 })
 
 libname_default = '%ssunpinyin%s' % (env.subst('${SHLIBPREFIX}'),