net-misc/rustdesk: update deps
[gentoo-zh.git] / app-i18n / mozc / files / mozc-2.23.2815.102-system_libraries.patch
blob064b910c70263556dc3e9664d11531918f1f5e68
1 --- /src/gyp/defines.gypi
2 +++ /src/gyp/defines.gypi
3 @@ -71,6 +71,12 @@
4 # use_libibus represents if ibus library is used or not.
5 # This option is only for Linux.
6 'use_libibus%': '0',
8 + # use_libgtest represents if gtest library is used or not.
9 + 'use_libgtest%': '0',
11 + # use_libjsoncpp represents if jsoncpp library is used or not.
12 + 'use_libjsoncpp%': '0',
14 'target_defaults': {
15 'defines': [
16 --- /src/net/jsoncpp.gyp
17 +++ /src/net/jsoncpp.gyp
18 @@ -31,32 +31,57 @@
19 'targets': [
21 'target_name': 'jsoncpp',
22 - 'type': 'static_library',
23 - 'variables': {
24 - 'jsoncpp_root': '<(third_party_dir)/jsoncpp',
25 - 'jsoncpp_srcs': [
26 - '<(jsoncpp_root)/src/lib_json/json_reader.cpp',
27 - '<(jsoncpp_root)/src/lib_json/json_value.cpp',
28 - '<(jsoncpp_root)/src/lib_json/json_writer.cpp',
29 - ],
30 - 'jsoncpp_include_dirs': ['<(jsoncpp_root)/include'],
31 - 'jsoncpp_additional_macros': ['JSON_USE_EXCEPTION=0'],
32 - },
33 - 'defines': [
34 - '<@(jsoncpp_additional_macros)',
35 + 'conditions': [
36 + ['use_libjsoncpp==1', {
37 + 'type': 'none',
38 + 'variables': {
39 + 'jsoncpp_additional_macros': ['JSON_USE_EXCEPTION=0'],
40 + },
41 + 'all_dependent_settings': {
42 + 'defines': [
43 + '<@(jsoncpp_additional_macros)',
44 + ],
45 + 'cflags': [
46 + '<!@(pkg-config --cflags jsoncpp)',
47 + ],
48 + 'link_settings': {
49 + 'libraries': [
50 + '<!@(pkg-config --libs-only-l jsoncpp)',
51 + ],
52 + 'ldflags': [
53 + '<!@(pkg-config --libs-only-L jsoncpp)',
54 + ],
55 + }
56 + },
57 + }, {
58 + 'type': 'static_library',
59 + 'variables': {
60 + 'jsoncpp_root': '<(third_party_dir)/jsoncpp',
61 + 'jsoncpp_srcs': [
62 + '<(jsoncpp_root)/src/lib_json/json_reader.cpp',
63 + '<(jsoncpp_root)/src/lib_json/json_value.cpp',
64 + '<(jsoncpp_root)/src/lib_json/json_writer.cpp',
65 + ],
66 + 'jsoncpp_include_dirs': ['<(jsoncpp_root)/include'],
67 + 'jsoncpp_additional_macros': ['JSON_USE_EXCEPTION=0'],
68 + },
69 + 'defines': [
70 + '<@(jsoncpp_additional_macros)',
71 + ],
72 + 'sources': [
73 + '<@(jsoncpp_srcs)',
74 + 'jsoncpp.h',
75 + ],
76 + 'include_dirs': [
77 + '<@(jsoncpp_include_dirs)',
78 + ],
79 + 'all_dependent_settings': {
80 + 'defines': [
81 + '<@(jsoncpp_additional_macros)',
82 + ],
83 + },
84 + }],
86 - 'sources': [
87 - '<@(jsoncpp_srcs)',
88 - 'jsoncpp.h',
89 - ],
90 - 'include_dirs': [
91 - '<@(jsoncpp_include_dirs)',
92 - ],
93 - 'all_dependent_settings': {
94 - 'defines': [
95 - '<@(jsoncpp_additional_macros)',
96 - ],
97 - },
101 --- /src/net/jsoncpp.h
102 +++ /src/net/jsoncpp.h
103 @@ -35,7 +35,7 @@
104 // Mozc basically disables C++ exception.
105 #define JSON_USE_EXCEPTION 0
106 #endif // !JSON_USE_EXCEPTION
107 -#include "third_party/jsoncpp/include/json/json.h"
108 +#include <json/json.h>
109 #define MOZC_JSONCPP_JSON_H_INCLUDED
110 #endif // !MOZC_JSONCPP_JSON_H_INCLUDED
112 --- /src/testing/testing.gyp
113 +++ /src/testing/testing.gyp
114 @@ -53,66 +53,101 @@
115 'targets': [
117 'target_name': 'testing',
118 - 'type': 'static_library',
119 - 'variables': {
120 - 'gtest_defines': [
121 - 'GTEST_LANG_CXX11=1',
122 - 'GTEST_HAS_TR1_TUPLE=0', # disable tr1 tuple in favor of C++11 tuple.
123 - ],
124 - 'gtest_dir': '<(third_party_dir)/gtest/googletest',
125 - 'gmock_dir': '<(third_party_dir)/gtest/googlemock',
126 - 'conditions': [
127 - ['_toolset=="target" and target_platform=="Android"', {
128 - 'gtest_defines': [
129 - 'GTEST_HAS_RTTI=0', # Android NDKr7 requires this.
130 - 'GTEST_HAS_CLONE=0',
131 - 'GTEST_HAS_GLOBAL_WSTRING=0',
132 - 'GTEST_HAS_POSIX_RE=0',
133 - 'GTEST_HAS_STD_WSTRING=0',
134 - 'GTEST_OS_LINUX=1',
135 - 'GTEST_OS_LINUX_ANDROID=1',
136 - ],
137 - }],
138 - ],
139 - },
140 - 'sources': [
141 - '<(gmock_dir)/src/gmock-cardinalities.cc',
142 - '<(gmock_dir)/src/gmock-internal-utils.cc',
143 - '<(gmock_dir)/src/gmock-matchers.cc',
144 - '<(gmock_dir)/src/gmock-spec-builders.cc',
145 - '<(gmock_dir)/src/gmock.cc',
146 - '<(gtest_dir)/src/gtest-death-test.cc',
147 - '<(gtest_dir)/src/gtest-filepath.cc',
148 - '<(gtest_dir)/src/gtest-port.cc',
149 - '<(gtest_dir)/src/gtest-printers.cc',
150 - '<(gtest_dir)/src/gtest-test-part.cc',
151 - '<(gtest_dir)/src/gtest-typed-test.cc',
152 - '<(gtest_dir)/src/gtest.cc',
153 - ],
154 - 'include_dirs': [
155 - '<(gmock_dir)',
156 - '<(gmock_dir)/include',
157 - '<(gtest_dir)',
158 - '<(gtest_dir)/include',
159 - ],
160 - 'defines': [
161 - '<@(gtest_defines)',
162 - ],
163 - 'all_dependent_settings': {
164 - 'defines': [
165 - '<@(gtest_defines)',
166 - ],
167 - 'include_dirs': [
168 - '<(gmock_dir)/include',
169 - '<(gtest_dir)/include',
170 - ],
171 - },
172 'conditions': [
173 - ['(_toolset=="target" and compiler_target=="clang") or '
174 - '(_toolset=="host" and compiler_host=="clang")', {
175 - 'cflags': [
176 - '-Wno-missing-field-initializers',
177 - '-Wno-unused-private-field',
178 + ['use_libgtest==1', {
179 + 'type': 'none',
180 + 'variables': {
181 + 'gtest_defines': [
182 + 'GTEST_LANG_CXX11=1',
183 + 'GTEST_HAS_TR1_TUPLE=0', # disable tr1 tuple in favor of C++11 tuple.
184 + ],
185 + 'conditions': [
186 + ['_toolset=="target" and target_platform=="Android"', {
187 + 'gtest_defines': [
188 + 'GTEST_HAS_RTTI=0', # Android NDKr7 requires this.
189 + 'GTEST_HAS_CLONE=0',
190 + 'GTEST_HAS_GLOBAL_WSTRING=0',
191 + 'GTEST_HAS_POSIX_RE=0',
192 + 'GTEST_HAS_STD_WSTRING=0',
193 + 'GTEST_OS_LINUX=1',
194 + 'GTEST_OS_LINUX_ANDROID=1',
195 + ],
196 + }],
197 + ],
198 + },
199 + 'all_dependent_settings': {
200 + 'defines': [
201 + '<@(gtest_defines)',
202 + ],
203 + 'link_settings': {
204 + 'libraries': [
205 + '-lgmock -lgtest',
206 + ],
207 + },
208 + },
209 + }, {
210 + 'type': 'static_library',
211 + 'variables': {
212 + 'gtest_defines': [
213 + 'GTEST_LANG_CXX11=1',
214 + 'GTEST_HAS_TR1_TUPLE=0', # disable tr1 tuple in favor of C++11 tuple.
215 + ],
216 + 'gtest_dir': '<(third_party_dir)/gtest/googletest',
217 + 'gmock_dir': '<(third_party_dir)/gtest/googlemock',
218 + 'conditions': [
219 + ['_toolset=="target" and target_platform=="Android"', {
220 + 'gtest_defines': [
221 + 'GTEST_HAS_RTTI=0', # Android NDKr7 requires this.
222 + 'GTEST_HAS_CLONE=0',
223 + 'GTEST_HAS_GLOBAL_WSTRING=0',
224 + 'GTEST_HAS_POSIX_RE=0',
225 + 'GTEST_HAS_STD_WSTRING=0',
226 + 'GTEST_OS_LINUX=1',
227 + 'GTEST_OS_LINUX_ANDROID=1',
228 + ],
229 + }],
230 + ],
231 + },
232 + 'sources': [
233 + '<(gmock_dir)/src/gmock-cardinalities.cc',
234 + '<(gmock_dir)/src/gmock-internal-utils.cc',
235 + '<(gmock_dir)/src/gmock-matchers.cc',
236 + '<(gmock_dir)/src/gmock-spec-builders.cc',
237 + '<(gmock_dir)/src/gmock.cc',
238 + '<(gtest_dir)/src/gtest-death-test.cc',
239 + '<(gtest_dir)/src/gtest-filepath.cc',
240 + '<(gtest_dir)/src/gtest-port.cc',
241 + '<(gtest_dir)/src/gtest-printers.cc',
242 + '<(gtest_dir)/src/gtest-test-part.cc',
243 + '<(gtest_dir)/src/gtest-typed-test.cc',
244 + '<(gtest_dir)/src/gtest.cc',
245 + ],
246 + 'include_dirs': [
247 + '<(gmock_dir)',
248 + '<(gmock_dir)/include',
249 + '<(gtest_dir)',
250 + '<(gtest_dir)/include',
251 + ],
252 + 'defines': [
253 + '<@(gtest_defines)',
254 + ],
255 + 'all_dependent_settings': {
256 + 'defines': [
257 + '<@(gtest_defines)',
258 + ],
259 + 'include_dirs': [
260 + '<(gmock_dir)/include',
261 + '<(gtest_dir)/include',
262 + ],
263 + },
264 + 'conditions': [
265 + ['(_toolset=="target" and compiler_target=="clang") or '
266 + '(_toolset=="host" and compiler_host=="clang")', {
267 + 'cflags': [
268 + '-Wno-missing-field-initializers',
269 + '-Wno-unused-private-field',
270 + ],
271 + }],