aboutsummaryrefslogtreecommitdiff
path: root/debian/patches/make_documentation_reproducible.patch
blob: 60231c8dcbd7807aa345341199c1078ae7459e3e (plain)
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
53
54
55
56
57
58
59
From: "jumapico@gmail.com" <jumapico@gmail.com>
Date: Mon, 11 Sep 2023 14:00:42 -0600
Subject: Make documentation reproducible

Add LC_ALL=C.UTF-8 to w3m to avoid changes in the output when building the
documentation with different locales.
Updated for meson build system.
---
 doc/guide-meson.build      | 1 +
 meson.build                | 4 +++-
 modules/module-meson.build | 1 +
 3 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/doc/guide-meson.build b/doc/guide-meson.build
index e29d16e..9c40cf0 100644
--- a/doc/guide-meson.build
+++ b/doc/guide-meson.build
@@ -50,6 +50,7 @@ custom_target(
     '@OUTPUT@',
     browser,
   ],
+  env:docs_env, 
   install: true,
   install_dir: docdir,
   install_tag: 'doc',
diff --git a/meson.build b/meson.build
index 2be2128..871f26a 100644
--- a/meson.build
+++ b/meson.build
@@ -473,6 +473,8 @@ endif
 
 feature_docs = get_option('docs')
 enable_docs = not feature_docs.disabled()
+docs_env = environment()
+docs_env.set('LC_ALL', 'C.UTF-8')
 if enable_docs
   prog_xsltproc = find_program(
     'xsltproc',
@@ -489,7 +491,7 @@ if enable_docs
     required: false,
   )
   if prog_w3m.found()
-    browser = [prog_w3m, '-T', 'text/html', '-dump']
+    browser = [ prog_w3m, '-T', 'text/html', '-dump']
   else
     prog_elinks = find_program(
       'elinks',
diff --git a/modules/module-meson.build b/modules/module-meson.build
index acb7087..d55dad2 100644
--- a/modules/module-meson.build
+++ b/modules/module-meson.build
@@ -245,6 +245,7 @@ custom_target(
             '@INPUT@',
             '@OUTPUT@',
             browser],
+  env:docs_env,
   install: true,
   install_dir: docdir / 'modules',
   install_tag: 'doc',