-
Notifications
You must be signed in to change notification settings - Fork 0
/
libchromiumcontent_111.diff
275 lines (260 loc) · 12.8 KB
/
libchromiumcontent_111.diff
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
diff --git a/chromiumcontent/BUILD.gn b/chromiumcontent/BUILD.gn
index cfd5c26..9a5ebe2 100644
--- a/chromiumcontent/BUILD.gn
+++ b/chromiumcontent/BUILD.gn
@@ -33,7 +33,7 @@ group("targets") {
"//ui/views/controls/webview",
]
- if (is_linux) {
+ if (is_linux||is_bsd) {
deps += [ "//chrome/browser/ui/libgtkui:libgtk3ui" ]
}
@@ -53,7 +53,7 @@ group("targets") {
":webrtc_common",
]
- if (is_linux) {
+ if (is_linux||is_bsd) {
deps += [ ":libgtkui" ]
}
@@ -150,7 +150,7 @@ if (is_electron_build && is_component_build) {
deps = [ "//third_party/webrtc:webrtc_common" ]
}
- if (is_linux) {
+ if (is_linux||is_bsd) {
# The original libgtkui target is a shared library, so we must list
# the object files instead of just depending on it.
static_library("libgtkui") {
@@ -374,7 +374,7 @@ config("build_time_executable") {
# libraries in the executable's directory, so ICU cannot be found. So let's
# make sure rpath is set here.
# See '//build/config/gcc/BUILD.gn' for details on the rpath setting.
- if (is_electron_build && is_linux && !is_component_build) {
+ if (is_electron_build && (is_linux||is_bsd) && !is_component_build) {
configs += [ "//build/config/gcc:rpath_for_built_shared_libraries" ]
}
}
diff --git a/chromiumcontent/args/static_library.gn b/chromiumcontent/args/static_library.gn
index 9b4e826..1a90d8e 100644
--- a/chromiumcontent/args/static_library.gn
+++ b/chromiumcontent/args/static_library.gn
@@ -56,3 +56,31 @@ if (target_cpu == "mips64el") {
use_sysroot = false
}
}
+
+if (target_os == "bsd") {
+ clang_use_chrome_plugins=false
+ enable_nacl=false
+ enable_one_click_signin=true
+ enable_remoting=false
+ enable_webrtc=false
+ fieldtrial_testing_like_official_build=true
+ is_clang=true
+ toolkit_views=true
+ use_gtk3=true
+ use_lld=true
+ use_sysroot=false
+ use_system_libjpeg=true
+ use_system_sqlite=false
+ ffmpeg_branding="Chrome"
+ proprietary_codecs=true
+ enable_hevc_demuxing=true
+ use_gconf=true
+ use_kerberos=true
+ use_alsa=true
+ use_pulseaudio=false
+ use_sndio=false
+ is_debug=false
+ symbol_level=0
+ remove_webcore_debug_symbols=true
+ extra_cxxflags="-Wno-deprecated-register -I/usr/local/include"
+}
--- a/chromiumcontent/args/shared_library.gn 2018-01-17 11:07:10.779008000 +0400
+++ b/chromiumcontent/args/shared_library.gn 2018-01-17 11:43:34.704604000 +0400
@@ -50,3 +50,31 @@
use_sysroot = false
}
}
+
+if (target_os == "bsd") {
+ clang_use_chrome_plugins=false
+ enable_nacl=false
+ enable_one_click_signin=true
+ enable_remoting=false
+ enable_webrtc=false
+ fieldtrial_testing_like_official_build=true
+ is_clang=true
+ toolkit_views=true
+ use_gtk3=true
+ use_lld=true
+ use_sysroot=false
+ use_system_libjpeg=true
+ use_system_sqlite=false
+ ffmpeg_branding="Chrome"
+ proprietary_codecs=true
+ enable_hevc_demuxing=true
+ use_gconf=true
+ use_kerberos=true
+ use_alsa=true
+ use_pulseaudio=false
+ use_sndio=false
+ is_debug=false
+ symbol_level=0
+ remove_webcore_debug_symbols=true
+ extra_cxxflags="-Wno-deprecated-register -I/usr/local/include"
+}
--- a/chromiumcontent/args/ffmpeg.gn 2018-01-17 11:07:10.778900000 +0400
+++ b/chromiumcontent/args/ffmpeg.gn 2018-01-17 11:43:30.425067000 +0400
@@ -43,3 +43,31 @@
use_sysroot = false
}
}
+
+if (target_os == "bsd") {
+ clang_use_chrome_plugins=false
+ enable_nacl=false
+ enable_one_click_signin=true
+ enable_remoting=false
+ enable_webrtc=false
+ fieldtrial_testing_like_official_build=true
+ is_clang=true
+ toolkit_views=true
+ use_gtk3=true
+ use_lld=true
+ use_sysroot=false
+ use_system_libjpeg=true
+ use_system_sqlite=false
+ ffmpeg_branding="Chrome"
+ proprietary_codecs=true
+ enable_hevc_demuxing=true
+ use_gconf=true
+ use_kerberos=true
+ use_alsa=true
+ use_pulseaudio=false
+ use_sndio=false
+ is_debug=false
+ symbol_level=0
+ remove_webcore_debug_symbols=true
+ extra_cxxflags="-Wno-deprecated-register -I/usr/local/include"
+}
diff --git a/script/build b/script/build
index 2d568dd..3bc7ba7 100755
--- a/script/build
+++ b/script/build
@@ -23,15 +23,16 @@ if sys.platform == 'win32':
NINJA = '{0}.exe'.format(NINJA)
elif IS_MIPS64EL_HOST:
NINJA = os.path.join(VENDOR_DIR, 'depot_tools', 'ninja-build')
-
+elif sys.platform.startswith('freebsd'):
+ NINJA = 'ninja'
def main():
args = parse_args()
target_arch = args.target_arch
env = os.environ.copy()
- env['PATH'] = os.pathsep.join([os.path.join(VENDOR_DIR, 'depot_tools'),
- env['PATH']])
+ #env['PATH'] = os.pathsep.join([os.path.join(VENDOR_DIR, 'depot_tools'),
+ # env['PATH']])
if sys.platform in ['win32', 'cygwin']:
env['DEPOT_TOOLS_WIN_TOOLCHAIN'] = '0'
elif target_arch == 'arm64':
diff --git a/script/create-dist b/script/create-dist
index 58161ec..0f12ab2 100755
--- a/script/create-dist
+++ b/script/create-dist
@@ -39,7 +39,9 @@
NINJA = '{0}.exe'.format(NINJA)
elif IS_MIPS64EL_HOST:
NINJA = os.path.join(VENDOR_DIR, 'depot_tools', 'ninja-build')
-
+elif sys.platform.startswith('freebsd'):
+ NINJA = 'ninja'
+
COPY_PY = os.path.join(TOOLS_DIR, 'copy.py')
LICENSES_PY = os.path.join(TOOLS_DIR, 'licenses.py')
@@ -47,6 +49,9 @@
'cygwin': 'win32',
'darwin': 'darwin',
'linux2': 'linux',
+ 'freebsd10': 'linux',
+ 'freebsd11': 'linux',
+ 'freebsd12': 'linux',
'win32': 'win32',
}[sys.platform]
@@ -749,6 +752,8 @@
print 'Packing static_library builds...'
p = os.path.join(SOURCE_ROOT, 'libchromiumcontent-static.tar.bz2')
make_archive(MAIN_DIR, ['static_library'], [], p)
+ p = os.path.join(SOURCE_ROOT, 'libchromiumcontent.tar.bz2')
+ make_archive(MAIN_DIR, ['src', 'ffmpeg'], ['LICENSES.chromium.html'], p)
if component == 'native_mksnapshot':
print 'Packing native mksnapshot...'
p = os.path.join(SOURCE_ROOT, 'native-mksnapshot.tar.bz2')
diff --git a/script/update b/script/update
index b05b4b0..10c066b 100755
--- a/script/update
+++ b/script/update
@@ -85,8 +85,8 @@
return ((apply_patches(target_arch) if args.apply_patches else 0) or
copy_chromiumcontent_files() or
- update_clang() or
- setup_mips64el_toolchain(target_arch) or
+ #update_clang() or
+ #setup_mips64el_toolchain(target_arch) or
run_gn(target_arch))
@@ -291,6 +291,9 @@
"cygwin": "win",
"darwin": "mac",
"linux2": "linux",
+ "freebsd10": "bsd",
+ "freebsd11": "bsd",
+ "freebsd12": "bsd",
"win32": "win",
}.get(sys.platform)
--- a/chromiumcontent/args/native_mksnapshot.gn 2018-06-02 17:53:07.857192000 +0400
+++ b/chromiumcontent/args/native_mksnapshot.gn 2018-06-02 17:54:07.169391000 +0400
@@ -12,3 +12,31 @@
if (target_cpu == "arm64") {
v8_snapshot_toolchain="//build/toolchain/linux:clang_arm64"
}
+
+if (target_os == "bsd") {
+ clang_use_chrome_plugins=false
+ enable_nacl=false
+ enable_one_click_signin=true
+ enable_remoting=false
+ enable_webrtc=false
+ fieldtrial_testing_like_official_build=true
+ is_clang=true
+ toolkit_views=true
+ use_gtk3=true
+ use_lld=true
+ use_sysroot=false
+ use_system_libjpeg=true
+ use_system_sqlite=false
+ ffmpeg_branding="Chrome"
+ proprietary_codecs=true
+ enable_hevc_demuxing=true
+ use_gconf=true
+ use_kerberos=true
+ use_alsa=true
+ use_pulseaudio=false
+ use_sndio=false
+ is_debug=false
+ symbol_level=0
+ remove_webcore_debug_symbols=true
+ extra_cxxflags="-Wno-deprecated-register -I/usr/local/include"
+}
--- a/script/lib/gn.py 2018-06-02 17:30:18.079173000 +0400
+++ b/script/lib/gn.py 2018-06-02 17:30:31.910252000 +0400
@@ -13,7 +13,9 @@
relative_path = ['buildtools', 'linux64', 'gn']
elif platform == 'darwin':
relative_path = ['buildtools', 'mac', 'gn']
-
+ elif sys.platform.startswith('freebsd'):
+ relative_path = ['out', 'Release', 'gn']
+
assert relative_path is not None, "Platform '{}' is not supported".format(platform)
absolute_path = os.path.join(chromium_root_dir, *relative_path)