Package: thunderbird / 1:60.8.0-1~deb9u1

debian-hacks/Build-against-system-libjsoncpp.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
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
From: Mike Hommey <mh@glandium.org>
Date: Tue, 9 May 2017 10:41:13 +0200
Subject: Build against system libjsoncpp

---
 config/system-headers.mozbuild                    |  1 +
 toolkit/components/jsoncpp/src/lib_json/moz.build | 46 +----------------------
 toolkit/crashreporter/minidump-analyzer/moz.build |  2 +-
 3 files changed, 3 insertions(+), 46 deletions(-)

diff --git a/config/system-headers.mozbuild b/config/system-headers.mozbuild
index 0872969..ac7c268 100644
--- a/config/system-headers.mozbuild
+++ b/config/system-headers.mozbuild
@@ -363,6 +363,7 @@ system_headers = [
     'jar-ds.h',
     'jarfile.h',
     'jar.h',
+    'json/json.h',
     'JavaControl.h',
     'JavaEmbedding/JavaControl.h',
     'JavaVM/jni.h',
diff --git a/toolkit/components/jsoncpp/src/lib_json/moz.build b/toolkit/components/jsoncpp/src/lib_json/moz.build
index 6920229..5e20a3d 100644
--- a/toolkit/components/jsoncpp/src/lib_json/moz.build
+++ b/toolkit/components/jsoncpp/src/lib_json/moz.build
@@ -4,50 +4,6 @@
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-UNIFIED_SOURCES += [
-    'json_reader.cpp',
-    'json_value.cpp',
-    'json_writer.cpp'
-]
-
-LOCAL_INCLUDES += [
-    '/toolkit/components/jsoncpp/include',
-]
-
-# This code is only used in the stand-alone minidump analyzer executable so
-# enabling exceptions should be fine.
-if CONFIG['CC_TYPE'] == 'clang-cl':
-    CXXFLAGS += [
-        '-Xclang',
-        '-fcxx-exceptions',
-    ]
-elif CONFIG['CC_TYPE'] not in ('msvc', 'clang-cl'):
-    CXXFLAGS += [
-        '-fexceptions',
-    ]
-
-# Required to build with exceptions enabled
-DisableStlWrapping()
-
 Library('jsoncpp')
 
-# Suppress warnings in third-party code.
-if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
-    CXXFLAGS += [
-        '-wd4005', # macro redefinition
-    ]
-elif CONFIG['CC_TYPE'] in ('clang', 'gcc'):
-    CXXFLAGS += [
-        '-Wno-unused-local-typedefs',
-        '-Wno-shadow',
-    ]
-
-if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'):
-    CXXFLAGS += [
-        '-Wno-c++11-narrowing',
-    ]
-
-if CONFIG['CC_TYPE'] in ('clang', 'clang-cl', 'gcc'):
-    CXXFLAGS += [
-        '-Wno-implicit-fallthrough',
-    ]
+OS_LIBS += ['jsoncpp']
diff --git a/toolkit/crashreporter/minidump-analyzer/moz.build b/toolkit/crashreporter/minidump-analyzer/moz.build
index 70f3b25..923b48b 100644
--- a/toolkit/crashreporter/minidump-analyzer/moz.build
+++ b/toolkit/crashreporter/minidump-analyzer/moz.build
@@ -52,7 +52,7 @@ USE_LIBS += [
 ]
 
 LOCAL_INCLUDES += [
-    '/toolkit/components/jsoncpp/include',
+    '%/usr/include/jsoncpp',
 ]
 
 if CONFIG['OS_TARGET'] != 'WINNT':