]>
Commit | Line | Data |
---|---|---|
fe547a32 | 1 | #!/bin/sh |
8f5f6775 | 2 | set -xe |
fe547a32 ER |
3 | |
4 | # import options | |
cd09b941 ER |
5 | # remove everything unless it's remove has been disabled with "0" |
6 | # "v8=0" means "do not remove v8" | |
fe547a32 ER |
7 | eval "$@" |
8 | ||
9 | # drop bundled libs, from gentoo | |
598df428 | 10 | gyp_clean() { |
598df428 ER |
11 | local l lib=$1 |
12 | echo "Removing bundled library $lib ..." | |
13 | l=$(find "$lib" -mindepth 1 ! -iname '*.gyp*' -print -delete | wc -l) | |
14 | if [ $l -eq 0 ]; then | |
fe547a32 ER |
15 | echo >&2 "No files matched when removing bundled library $1" |
16 | exit 1 | |
17 | fi | |
18 | } | |
19 | ||
f888c710 | 20 | # https://code.google.com/p/chromium/wiki/LinuxPackaging |
99f39995 | 21 | # initial list from src/tools/export_tarball/export_tarball.py |
1dd58211 | 22 | # some scanned with find -name tests -o -name test -o -name test_data |
55dddbd9 ER |
23 | # and find -iname *test* |
24 | # also removed non-linux files: find -name win -o -name mac -o name android | |
f888c710 ER |
25 | remove_nonessential_dirs() { |
26 | local dir | |
27 | for dir in \ | |
30ab5de0 | 28 | chrome/common/extensions/docs \ |
55dddbd9 | 29 | breakpad/src/common/android/testing \ |
30ab5de0 ER |
30 | chrome/tools/test/reference_build \ |
31 | courgette/testdata \ | |
32 | data \ | |
33 | native_client/src/trusted/service_runtime/testdata \ | |
55dddbd9 | 34 | native_client/src/trusted/validator/x86/testing \ |
07d26a0d | 35 | native_client_sdk \ |
30ab5de0 ER |
36 | o3d/documentation \ |
37 | o3d/samples \ | |
38 | o3d/tests \ | |
55dddbd9 ER |
39 | third_party/WebKit/LayoutTests \ |
40 | third_party/WebKit/Source/JavaScriptCore/tests \ | |
41 | third_party/WebKit/Source/WebCore/testing_ \ | |
30ab5de0 | 42 | third_party/angle/samples/gles2_book \ |
55dddbd9 | 43 | third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/testing \ |
30ab5de0 | 44 | third_party/hunspell/tests \ |
55dddbd9 | 45 | third_party/hunspell_dictionaries \ |
30ab5de0 | 46 | third_party/lighttpd \ |
55dddbd9 ER |
47 | third_party/protobuf/src/google/protobuf/testing \ |
48 | third_party/re2/re2/testing \ | |
49 | third_party/safe_browsing/testing \ | |
30ab5de0 ER |
50 | third_party/sqlite/test \ |
51 | third_party/vc_80 \ | |
52 | third_party/xdg-utils/tests \ | |
53 | third_party/yasm/source/patched-yasm/modules/arch/x86/tests \ | |
54 | third_party/yasm/source/patched-yasm/modules/dbgfmts/dwarf2/tests \ | |
55 | third_party/yasm/source/patched-yasm/modules/objfmts/bin/tests \ | |
56 | third_party/yasm/source/patched-yasm/modules/objfmts/coff/tests \ | |
57 | third_party/yasm/source/patched-yasm/modules/objfmts/elf/tests \ | |
58 | third_party/yasm/source/patched-yasm/modules/objfmts/macho/tests \ | |
59 | third_party/yasm/source/patched-yasm/modules/objfmts/rdf/tests \ | |
60 | third_party/yasm/source/patched-yasm/modules/objfmts/win32/tests \ | |
61 | third_party/yasm/source/patched-yasm/modules/objfmts/win64/tests \ | |
62 | third_party/yasm/source/patched-yasm/modules/objfmts/xdf/tests \ | |
daa4a66c ER |
63 | \ |
64 | breakpad/src/client/mac/tests \ | |
65 | breakpad/src/client/windows/tests \ | |
66 | breakpad/src/common/linux/tests \ | |
67 | breakpad/src/common/tests \ | |
68 | chrome/browser/resources/tracing/tests \ | |
69 | chrome/browser/ui/tests \ | |
70 | content/test/data/layout_tests/LayoutTests/http/tests \ | |
71 | content/test/data/layout_tests/LayoutTests/http/tests/websocket/tests \ | |
72 | content/test/data/layout_tests/LayoutTests/platform/chromium-win/http/tests \ | |
73 | gpu/command_buffer/tests \ | |
74 | native_client/tests \ | |
75 | native_client/tools/tests \ | |
76 | native_client_sdk/src/build_tools/tests \ | |
77 | ppapi/native_client/tests \ | |
78 | ppapi/tests \ | |
79 | sandbox/tests \ | |
80 | seccompsandbox/tests \ | |
81 | third_party/WebKit/Source/JavaScriptCore/API/tests \ | |
82 | third_party/WebKit/Source/JavaScriptCore/qt/tests \ | |
83 | third_party/WebKit/Source/WebKit/chromium/tests \ | |
84 | third_party/WebKit/Source/WebKit/gtk/tests \ | |
85 | third_party/WebKit/Source/WebKit/qt/tests \ | |
86 | third_party/WebKit/Source/WebKit2/UIProcess/API/gtk/tests \ | |
87 | third_party/WebKit/Source/WebKit2/UIProcess/API/qt/tests \ | |
88 | third_party/angle/tests \ | |
89 | third_party/ffmpeg/tests \ | |
90 | third_party/harfbuzz/tests \ | |
91 | third_party/hyphen/tests \ | |
92 | third_party/mesa/MesaLib/src/gallium/tests \ | |
93 | third_party/mesa/MesaLib/src/gallium/tests/python/tests \ | |
94 | third_party/tcmalloc/chromium/src/tests \ | |
95 | third_party/tcmalloc/vendor/src/tests \ | |
96 | third_party/yasm/source/patched-yasm/libyasm/tests \ | |
97 | third_party/yasm/source/patched-yasm/modules/arch/lc3b/tests \ | |
98 | third_party/yasm/source/patched-yasm/modules/dbgfmts/stabs/tests \ | |
99 | third_party/yasm/source/patched-yasm/modules/parsers/gas/tests \ | |
100 | third_party/yasm/source/patched-yasm/modules/parsers/nasm/tests \ | |
101 | third_party/yasm/source/patched-yasm/modules/parsers/tasm/tests \ | |
102 | third_party/yasm/source/patched-yasm/modules/preprocs/nasm/tests \ | |
103 | third_party/yasm/source/patched-yasm/modules/preprocs/raw/tests \ | |
104 | third_party/yasm/source/patched-yasm/tools/python-yasm/tests \ | |
105 | tools/clang/plugins/tests \ | |
106 | tools/page_cycler/webpagereplay/tests \ | |
107 | tools/perf_expectations/tests \ | |
108 | \ | |
30ab5de0 ER |
109 | v8/test \ |
110 | webkit/data/layout_tests \ | |
111 | webkit/tools/test/reference_build \ | |
99f39995 ER |
112 | \ |
113 | tools/site_compare \ | |
114 | tools/stats_viewer \ | |
115 | tools/symsrc \ | |
116 | tools/valgrind \ | |
c0808220 | 117 | tools/gyp/test \ |
1dd58211 ER |
118 | \ |
119 | ash/test \ | |
120 | base/android/javatests/src/org/chromium/base/test \ | |
121 | base/test \ | |
122 | chrome/browser/chromeos/bluetooth/test \ | |
123 | chrome/browser/component_updater/test \ | |
124 | chrome/browser/printing/cloud_print/test \ | |
125 | chrome/browser/resources/gaia_auth/test \ | |
126 | chrome/browser/sync/test \ | |
127 | chrome/installer/test \ | |
128 | chrome/test/webdriver/test \ | |
129 | chrome/tools/test \ | |
130 | chrome_frame/test \ | |
131 | chrome_frame/tools/test \ | |
07d26a0d | 132 | chrome_frame \ |
1dd58211 ER |
133 | content/browser/worker_host/test \ |
134 | content/public/test \ | |
135 | content/test \ | |
136 | media/test \ | |
137 | media/tools/layout_tests/test_data \ | |
138 | native_client_sdk/src/libraries/c_salt/test \ | |
139 | net/test \ | |
140 | printing/test \ | |
141 | rlz/test \ | |
142 | sandbox/linux/seccomp-legacy/tests \ | |
143 | sandbox/linux/tests \ | |
144 | sandbox/win/tests \ | |
145 | sync/internal_api/public/test \ | |
146 | sync/internal_api/test \ | |
147 | sync/test \ | |
148 | testing/gmock/scripts/test \ | |
149 | testing/gmock/test \ | |
150 | testing/gtest/scripts/test \ | |
151 | testing/gtest/test \ | |
152 | third_party/WebKit/Source/ThirdParty/gtest/scripts/test \ | |
153 | third_party/WebKit/Source/ThirdParty/gtest/test \ | |
154 | third_party/WebKit/Source/ThirdParty/gyp/test \ | |
155 | third_party/WebKit/Source/ThirdParty/qunit/test \ | |
156 | third_party/WebKit/Source/WebCore/bindings/scripts/test \ | |
157 | third_party/WebKit/Source/WebKit/efl/tests \ | |
158 | third_party/WebKit/Source/WebKit2/UIProcess/API/efl/tests \ | |
159 | third_party/WebKit/Tools/Scripts/webkitpy/test \ | |
160 | third_party/cacheinvalidation/files/src/google/cacheinvalidation/test \ | |
161 | third_party/libexif/sources/test \ | |
162 | third_party/libjingle/source/talk/app/webrtc/test \ | |
163 | third_party/libphonenumber/src/resources/test \ | |
164 | third_party/libphonenumber/src/test \ | |
165 | third_party/libsrtp/srtp/crypto/test \ | |
166 | third_party/libsrtp/srtp/test \ | |
167 | third_party/openssl/openssl/crypto/des/t/test \ | |
168 | third_party/openssl/openssl/test \ | |
169 | third_party/ots/test \ | |
170 | third_party/sfntly/cpp/src/test \ | |
171 | third_party/sqlite/src/test \ | |
172 | third_party/talloc/libreplace/test \ | |
173 | third_party/tlslite/test \ | |
174 | third_party/trace-viewer/test_data \ | |
175 | third_party/v8-i18n/tests \ | |
176 | third_party/webdriver/pylib/test \ | |
177 | third_party/webdriver/test_data \ | |
178 | ui/app_list/test \ | |
179 | ui/aura/test \ | |
180 | ui/base/test \ | |
181 | ui/compositor/test \ | |
182 | ui/gfx/test \ | |
183 | ui/test \ | |
184 | ui/views/test \ | |
185 | webkit/plugins/npapi/test \ | |
3333a973 | 186 | \ |
55dddbd9 ER |
187 | base/android \ |
188 | base/mac_ \ | |
189 | base/win_ \ | |
3333a973 ER |
190 | breakpad/src/client/mac \ |
191 | breakpad/src/common/mac \ | |
192 | breakpad/src/tools/mac \ | |
193 | build/mac \ | |
194 | build/win \ | |
55dddbd9 ER |
195 | chrome/android \ |
196 | chrome/app/android \ | |
3333a973 ER |
197 | chrome/app/theme/default_100_percent/mac \ |
198 | chrome/app/theme/default_100_percent/win \ | |
199 | chrome/app/theme/default_200_percent/mac \ | |
200 | chrome/app/theme/default_200_percent/win \ | |
201 | chrome/app/theme/touch_100_percent/win \ | |
202 | chrome/app/theme/touch_140_percent/win \ | |
203 | chrome/app/theme/touch_180_percent/win \ | |
55dddbd9 ER |
204 | chrome/browser/android \ |
205 | chrome/browser/history/android \ | |
3333a973 ER |
206 | chrome/browser/mac \ |
207 | chrome/common/mac \ | |
208 | chrome/installer/mac \ | |
209 | chrome/installer/mac/third_party/xz/config/mac \ | |
210 | chrome/test/logging/win \ | |
211 | chrome/tools/build/mac \ | |
212 | chrome/tools/build/win \ | |
213 | cloud_print/service/win \ | |
214 | cloud_print/virtual_driver/win \ | |
55dddbd9 ER |
215 | content/app/android \ |
216 | content/browser/android \ | |
217 | content/common/android \ | |
218 | content/common/mac_ \ | |
219 | content/public/android \ | |
220 | content/public/browser/android \ | |
221 | content/renderer/android \ | |
222 | content/shell/android \ | |
3333a973 ER |
223 | content/shell/mac \ |
224 | media/audio/mac \ | |
225 | media/audio/win \ | |
226 | media/video/capture/mac \ | |
227 | media/video/capture/win \ | |
228 | native_client/build/mac \ | |
55dddbd9 | 229 | native_client/src/include/win_ \ |
3333a973 ER |
230 | native_client/src/shared/imc/win \ |
231 | native_client/src/shared/platform/win \ | |
232 | native_client/src/trusted/debug_stub/win \ | |
233 | native_client/src/trusted/desc/win \ | |
234 | native_client/src/trusted/nonnacl_util/win \ | |
235 | native_client/src/trusted/platform_qualify/win \ | |
55dddbd9 | 236 | native_client/src/trusted/service_runtime/win_ \ |
3333a973 ER |
237 | native_client_sdk/src/libraries/win \ |
238 | ppapi/native_client/src/trusted/plugin/win \ | |
239 | remoting/host/installer/mac \ | |
240 | remoting/host/mac \ | |
241 | remoting/host/win \ | |
242 | rlz/mac \ | |
243 | rlz/win \ | |
55dddbd9 | 244 | sandbox/win_ \ |
3333a973 ER |
245 | sdch/mac \ |
246 | skia/config/win \ | |
55dddbd9 | 247 | third_party/WebKit/Source/Platform/chromium/public/android \ |
3333a973 ER |
248 | third_party/WebKit/Source/Platform/chromium/public/mac \ |
249 | third_party/WebKit/Source/Platform/chromium/public/win \ | |
250 | third_party/WebKit/Source/WTF/wtf/mac \ | |
251 | third_party/WebKit/Source/WTF/wtf/threads/win \ | |
252 | third_party/WebKit/Source/WTF/wtf/win \ | |
253 | third_party/WebKit/Source/WebCore/WebCore.gyp/mac \ | |
254 | third_party/WebKit/Source/WebCore/accessibility/mac \ | |
255 | third_party/WebKit/Source/WebCore/accessibility/win \ | |
55dddbd9 | 256 | third_party/WebKit/Source/WebCore/editing/android \ |
3333a973 | 257 | third_party/WebKit/Source/WebCore/editing/mac \ |
55dddbd9 | 258 | third_party/WebKit/Source/WebCore/history/android \ |
3333a973 ER |
259 | third_party/WebKit/Source/WebCore/history/mac \ |
260 | third_party/WebKit/Source/WebCore/loader/mac \ | |
261 | third_party/WebKit/Source/WebCore/loader/win \ | |
55dddbd9 | 262 | third_party/WebKit/Source/WebCore/page/android \ |
3333a973 ER |
263 | third_party/WebKit/Source/WebCore/page/mac \ |
264 | third_party/WebKit/Source/WebCore/page/scrolling/mac \ | |
265 | third_party/WebKit/Source/WebCore/page/win \ | |
55dddbd9 | 266 | third_party/WebKit/Source/WebCore/platform/android \ |
3333a973 ER |
267 | third_party/WebKit/Source/WebCore/platform/audio/mac \ |
268 | third_party/WebKit/Source/WebCore/platform/cf/win \ | |
269 | third_party/WebKit/Source/WebCore/platform/graphics/ca/mac \ | |
270 | third_party/WebKit/Source/WebCore/platform/graphics/ca/win \ | |
271 | third_party/WebKit/Source/WebCore/platform/graphics/gpu/mac \ | |
272 | third_party/WebKit/Source/WebCore/platform/graphics/mac \ | |
273 | third_party/WebKit/Source/WebCore/platform/graphics/surfaces/mac \ | |
274 | third_party/WebKit/Source/WebCore/platform/graphics/win \ | |
275 | third_party/WebKit/Source/WebCore/platform/mac \ | |
55dddbd9 | 276 | third_party/WebKit/Source/WebCore/platform/network/android \ |
3333a973 ER |
277 | third_party/WebKit/Source/WebCore/platform/network/mac \ |
278 | third_party/WebKit/Source/WebCore/platform/network/win \ | |
55dddbd9 | 279 | third_party/WebKit/Source/WebCore/platform/text/android \ |
3333a973 ER |
280 | third_party/WebKit/Source/WebCore/platform/text/mac \ |
281 | third_party/WebKit/Source/WebCore/platform/text/win \ | |
282 | third_party/WebKit/Source/WebCore/platform/win \ | |
283 | third_party/WebKit/Source/WebCore/platform/wx/wxcode/mac \ | |
284 | third_party/WebKit/Source/WebCore/platform/wx/wxcode/win \ | |
285 | third_party/WebKit/Source/WebCore/plugins/mac \ | |
286 | third_party/WebKit/Source/WebCore/plugins/win \ | |
55dddbd9 ER |
287 | third_party/WebKit/Source/WebKit/chromium/public/android \ |
288 | third_party/WebKit/Source/WebKit/chromium/public/mac_ \ | |
289 | third_party/WebKit/Source/WebKit/chromium/public/platform/android \ | |
3333a973 ER |
290 | third_party/WebKit/Source/WebKit/chromium/public/platform/mac \ |
291 | third_party/WebKit/Source/WebKit/chromium/public/platform/win \ | |
292 | third_party/WebKit/Source/WebKit/chromium/public/win \ | |
55dddbd9 | 293 | third_party/WebKit/Source/WebKit/chromium/src/android \ |
3333a973 ER |
294 | third_party/WebKit/Source/WebKit/chromium/src/mac \ |
295 | third_party/WebKit/Source/WebKit/chromium/src/win \ | |
296 | third_party/WebKit/Source/WebKit/mac \ | |
297 | third_party/WebKit/Source/WebKit/win \ | |
298 | third_party/WebKit/Source/WebKit2/Platform/CoreIPC/mac \ | |
299 | third_party/WebKit/Source/WebKit2/Platform/CoreIPC/win \ | |
300 | third_party/WebKit/Source/WebKit2/Platform/mac \ | |
301 | third_party/WebKit/Source/WebKit2/Platform/win \ | |
302 | third_party/WebKit/Source/WebKit2/PluginProcess/mac \ | |
303 | third_party/WebKit/Source/WebKit2/Shared/API/c/mac \ | |
304 | third_party/WebKit/Source/WebKit2/Shared/API/c/win \ | |
305 | third_party/WebKit/Source/WebKit2/Shared/Plugins/Netscape/mac \ | |
306 | third_party/WebKit/Source/WebKit2/Shared/Plugins/Netscape/win \ | |
307 | third_party/WebKit/Source/WebKit2/Shared/Plugins/mac \ | |
308 | third_party/WebKit/Source/WebKit2/Shared/cg/win \ | |
309 | third_party/WebKit/Source/WebKit2/Shared/mac \ | |
310 | third_party/WebKit/Source/WebKit2/Shared/win \ | |
311 | third_party/WebKit/Source/WebKit2/UIProcess/API/C/mac \ | |
312 | third_party/WebKit/Source/WebKit2/UIProcess/API/C/win \ | |
313 | third_party/WebKit/Source/WebKit2/UIProcess/API/mac \ | |
314 | third_party/WebKit/Source/WebKit2/UIProcess/Launcher/mac \ | |
315 | third_party/WebKit/Source/WebKit2/UIProcess/Launcher/win \ | |
316 | third_party/WebKit/Source/WebKit2/UIProcess/Plugins/mac \ | |
317 | third_party/WebKit/Source/WebKit2/UIProcess/Plugins/win \ | |
318 | third_party/WebKit/Source/WebKit2/UIProcess/mac \ | |
319 | third_party/WebKit/Source/WebKit2/UIProcess/win \ | |
320 | third_party/WebKit/Source/WebKit2/WebProcess/Authentication/mac \ | |
321 | third_party/WebKit/Source/WebKit2/WebProcess/Cookies/mac \ | |
322 | third_party/WebKit/Source/WebKit2/WebProcess/Downloads/cf/win \ | |
323 | third_party/WebKit/Source/WebKit2/WebProcess/Downloads/mac \ | |
324 | third_party/WebKit/Source/WebKit2/WebProcess/FullScreen/mac \ | |
325 | third_party/WebKit/Source/WebKit2/WebProcess/FullScreen/win \ | |
326 | third_party/WebKit/Source/WebKit2/WebProcess/InjectedBundle/API/c/win \ | |
327 | third_party/WebKit/Source/WebKit2/WebProcess/InjectedBundle/mac \ | |
328 | third_party/WebKit/Source/WebKit2/WebProcess/InjectedBundle/win \ | |
329 | third_party/WebKit/Source/WebKit2/WebProcess/Plugins/Netscape/mac \ | |
330 | third_party/WebKit/Source/WebKit2/WebProcess/Plugins/Netscape/win \ | |
331 | third_party/WebKit/Source/WebKit2/WebProcess/WebCoreSupport/mac \ | |
332 | third_party/WebKit/Source/WebKit2/WebProcess/WebCoreSupport/win \ | |
333 | third_party/WebKit/Source/WebKit2/WebProcess/WebPage/ca/mac \ | |
334 | third_party/WebKit/Source/WebKit2/WebProcess/WebPage/ca/win \ | |
335 | third_party/WebKit/Source/WebKit2/WebProcess/WebPage/mac \ | |
336 | third_party/WebKit/Source/WebKit2/WebProcess/WebPage/win \ | |
337 | third_party/WebKit/Source/WebKit2/WebProcess/mac \ | |
338 | third_party/WebKit/Source/WebKit2/WebProcess/win \ | |
339 | third_party/WebKit/Source/WebKit2/mac \ | |
340 | third_party/WebKit/Source/WebKit2/win \ | |
341 | third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/mac \ | |
342 | third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/win \ | |
343 | third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/mac \ | |
344 | third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/win \ | |
345 | third_party/WebKit/Tools/DumpRenderTree/mac \ | |
346 | third_party/WebKit/Tools/DumpRenderTree/win \ | |
347 | third_party/WebKit/Tools/TestWebKitAPI/Tests/TestWebKitAPI/mac \ | |
348 | third_party/WebKit/Tools/TestWebKitAPI/Tests/WebKit/win \ | |
349 | third_party/WebKit/Tools/TestWebKitAPI/Tests/WebKit2/mac \ | |
350 | third_party/WebKit/Tools/TestWebKitAPI/Tests/WebKit2/win \ | |
351 | third_party/WebKit/Tools/TestWebKitAPI/Tests/mac \ | |
352 | third_party/WebKit/Tools/TestWebKitAPI/mac \ | |
353 | third_party/WebKit/Tools/TestWebKitAPI/win \ | |
55dddbd9 ER |
354 | third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/external/client/android \ |
355 | third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/testing/android \ | |
356 | third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/ticl/android \ | |
357 | third_party/cld/encodings/compact_lang_det/win_ \ | |
3333a973 ER |
358 | third_party/ffmpeg/chromium/binaries/Chromium/win \ |
359 | third_party/ffmpeg/chromium/config/Chrome/mac \ | |
360 | third_party/ffmpeg/chromium/config/Chromium/mac \ | |
361 | third_party/ffmpeg/chromium/include/win \ | |
55dddbd9 | 362 | third_party/icu/android \ |
3333a973 ER |
363 | third_party/leveldatabase/src/port/win \ |
364 | third_party/libjpeg_turbo/mac \ | |
365 | third_party/libjpeg_turbo/win \ | |
55dddbd9 | 366 | third_party/libva/va/android \ |
3333a973 ER |
367 | third_party/libvpx/source/config/mac \ |
368 | third_party/libvpx/source/config/win \ | |
369 | third_party/libxml/mac \ | |
55dddbd9 ER |
370 | third_party/openssl/config/android \ |
371 | third_party/skia/include/utils/android \ | |
3333a973 ER |
372 | third_party/skia/include/utils/mac \ |
373 | third_party/skia/include/utils/win \ | |
55dddbd9 ER |
374 | third_party/skia/include/views/android \ |
375 | third_party/skia/src/gpu/gl/android \ | |
3333a973 ER |
376 | third_party/skia/src/gpu/gl/mac \ |
377 | third_party/skia/src/gpu/gl/win \ | |
378 | third_party/skia/src/utils/mac \ | |
379 | third_party/skia/src/utils/win \ | |
380 | third_party/skia/src/views/mac \ | |
381 | third_party/skia/src/views/win \ | |
382 | third_party/snappy/mac \ | |
55dddbd9 | 383 | third_party/webrtc/modules/audio_device/android \ |
3333a973 ER |
384 | third_party/webrtc/modules/audio_device/main/source/mac \ |
385 | third_party/webrtc/modules/audio_device/main/source/win \ | |
55dddbd9 ER |
386 | third_party/webrtc/modules/audio_device/test/android \ |
387 | third_party/webrtc/modules/audio_processing/test/android \ | |
388 | third_party/webrtc/modules/video_capture/main/source/android \ | |
389 | third_party/webrtc/modules/video_capture/main/test/android \ | |
390 | third_party/webrtc/modules/video_render/main/source/android \ | |
3333a973 | 391 | third_party/webrtc/modules/video_render/main/source/mac \ |
55dddbd9 | 392 | third_party/webrtc/system_wrappers/source/android \ |
3333a973 | 393 | third_party/webrtc/test/testsupport/mac \ |
55dddbd9 ER |
394 | third_party/webrtc/video_engine/test/android \ |
395 | third_party/webrtc/video_engine/test/auto_test/android \ | |
396 | third_party/webrtc/voice_engine/test/android \ | |
397 | third_party/yasm/source/config/android \ | |
3333a973 ER |
398 | third_party/yasm/source/config/mac \ |
399 | third_party/yasm/source/config/win \ | |
400 | tools/mac \ | |
401 | tools/win \ | |
55dddbd9 | 402 | ui/base/win_ \ |
3333a973 ER |
403 | ui/gfx/mac \ |
404 | ui/views/win \ | |
55dddbd9 | 405 | webkit/media/android \ |
3333a973 | 406 | webkit/tools/test_shell/mac \ |
f888c710 ER |
407 | ; do |
408 | rm -vfr "$dir" | |
409 | done | |
410 | } | |
411 | ||
99f39995 ER |
412 | # Strip tarball from some big directories not needed on the linux platform |
413 | strip_dirs() { | |
414 | # prefix with _ those that we can't remove (just yet) because of the gclient | |
415 | # hooks (see build/all.gyp) or of some unneeded deps/includes | |
f888c710 | 416 | |
99f39995 ER |
417 | local dir |
418 | for dir in \ | |
419 | chrome/test/data/safe_browsing/old \ | |
420 | chrome/test/data/firefox2_nss_mac \ | |
421 | chrome/third_party/wtl/ \ | |
422 | gears \ | |
423 | google_update \ | |
df52e8c0 | 424 | gpu/demos \ |
99f39995 ER |
425 | o3d \ |
426 | third_party/boost \ | |
427 | third_party/bsdiff \ | |
428 | third_party/bspatch \ | |
429 | third_party/ffmpeg/binaries \ | |
430 | third_party/fuzzymatch \ | |
431 | third_party/gles_book_examples \ | |
3a0be9f8 | 432 | third_party/gold \ |
99f39995 ER |
433 | third_party/hunspell/dictionaries \ |
434 | third_party/icu/mac \ | |
435 | third_party/lcov \ | |
436 | third_party/lighttpd \ | |
437 | third_party/nspr \ | |
438 | third_party/nss \ | |
439 | third_party/ocmock \ | |
440 | third_party/pthread \ | |
441 | third_party/pyftpdlib \ | |
442 | third_party/simplejson \ | |
443 | third_party/scons \ | |
444 | _third_party/tcmalloc \ | |
445 | tools/symsrc \ | |
446 | tools/site_compare \ | |
447 | tools/stats_viewer \ | |
448 | tools/valgrind \ | |
449 | tools/wine_valgrind \ | |
450 | v8/test/cctest \ | |
451 | webkit/data/layout_tests \ | |
452 | ; do | |
453 | rm -vfr "$dir" | |
454 | done | |
455 | } | |
456 | ||
457 | # parts based on ubuntu debian/rules | |
458 | # http://bazaar.launchpad.net/~chromium-team/chromium-browser/chromium-browser.head/view/head:/debian/rules | |
459 | ||
460 | remove_bin_only() { | |
55dddbd9 | 461 | find -type f \( \ |
99f39995 ER |
462 | -iname \*.exe -o \ |
463 | -iname \*.dll -o \ | |
464 | -iname \*.pdb -o \ | |
465 | -name \*.o -o \ | |
466 | -name \*.a -o \ | |
467 | -name \*.dylib \ | |
468 | \) -exec rm -fv {} \; | |
469 | } | |
470 | ||
471 | # removes dir, if the bcond is not turned off | |
472 | strip_system_dirs() { | |
473 | local dir lib bcond | |
474 | for dir in "$@"; do | |
475 | lib=${dir##*/} | |
476 | bcond=$(eval echo \$$lib) | |
cd09b941 | 477 | [ "${bcond:-1}" = 0 ] && continue |
99f39995 ER |
478 | |
479 | # skip already removed dirs | |
480 | test -d $dir || continue | |
481 | ||
0e308272 | 482 | find $dir -depth -mindepth 1 \! \( -name '*.gyp' -o -name '*.gypi' -o -path $dir/$lib.h \) -print -delete |
99f39995 ER |
483 | done |
484 | } | |
485 | ||
486 | # There are directories we want to strip, but that are unnecessarily required by the build-system | |
6bcdaa63 | 487 | # So we drop everything but the gyp/gypi files |
99f39995 ER |
488 | almost_strip_dirs() { |
489 | local dir | |
490 | for dir in "$@"; do | |
6bcdaa63 | 491 | find $dir -depth -mindepth 1 \! \( -name '*.gyp' -o -name '*.gypi' \) -print -delete || : |
99f39995 ER |
492 | done |
493 | } | |
494 | ||
495 | remove_nonessential_dirs | tee -a REMOVED-nonessential_dirs.txt | |
496 | remove_bin_only | tee -a REMOVED-bin_only.txt | |
497 | ||
498 | strip_dirs | tee -a REMOVED-stripped.txt | |
499 | ||
500 | almost_strip_dirs \ | |
ed4bcb92 | 501 | chrome/test/data \ |
55dddbd9 | 502 | courgette \ |
99f39995 | 503 | third_party/gles2_book \ |
55dddbd9 | 504 | win8 \ |
99f39995 ER |
505 | | tee -a REMOVED-stripped.txt |
506 | ||
30022680 ER |
507 | # move around to keep third_party/libxml/chromium |
508 | mv third_party/libxml/chromium libxml-chromium | |
509 | ||
99f39995 | 510 | strip_system_dirs \ |
31187203 | 511 | native_client/src/third_party_mod/jsoncpp \ |
99f39995 | 512 | third_party/bzip2 \ |
31187203 | 513 | third_party/flac \ |
99f39995 | 514 | third_party/icu \ |
31187203 | 515 | third_party/jsoncpp \ |
99f39995 | 516 | third_party/libevent \ |
07d26a0d | 517 | third_party/libexif \ |
99f39995 | 518 | third_party/libjpeg \ |
07d26a0d | 519 | third_party/libmtp \ |
99f39995 | 520 | third_party/libpng \ |
3ee15dec | 521 | third_party/libsrtp \ |
581aec44 | 522 | third_party/libusb \ |
4b411ffe | 523 | third_party/libvpx \ |
31187203 | 524 | third_party/libwebp \ |
2a97b574 | 525 | third_party/libxml \ |
99f39995 | 526 | third_party/libxslt \ |
07d26a0d | 527 | third_party/opus \ |
ed514974 | 528 | third_party/speex \ |
2a97b574 | 529 | third_party/zlib \ |
99f39995 ER |
530 | v8 \ |
531 | | tee -a REMOVED-stripped.txt | |
598df428 | 532 | |
30022680 ER |
533 | install -d third_party/libxml |
534 | mv libxml-chromium third_party/libxml/chromium | |
535 | ||
4b411ffe ER |
536 | gyp_clean \ |
537 | third_party/yasm \ | |
fe547a32 | 538 | |
00360a4d ER |
539 | # clean third party |
540 | # list based from archlinux PKGBUILD | |
541 | # https://aur.archlinux.org/packages/ch/chromium-dev/PKGBUILD | |
542 | find third_party -type f \! -iname '*.gyp*' \ | |
543 | \! -path 'third_party/angle/*' \ | |
544 | \! -path 'third_party/cacheinvalidation/*' \ | |
545 | \! -path 'third_party/cld/*' \ | |
546 | \! -path 'third_party/cros_system_api/*' \ | |
547 | \! -path 'third_party/ffmpeg/*' \ | |
548 | \! -path 'third_party/flac/flac.h' \ | |
549 | \! -path 'third_party/flot/*' \ | |
550 | \! -path 'third_party/gpsd/*' \ | |
551 | \! -path 'third_party/harfbuzz/*' \ | |
552 | \! -path 'third_party/harfbuzz-ng/*' \ | |
553 | \! -path 'third_party/hunspell/*' \ | |
554 | \! -path 'third_party/hyphen/*' \ | |
555 | \! -path 'third_party/iccjpeg/*' \ | |
556 | \! -path 'third_party/jsoncpp/*' \ | |
557 | \! -path 'third_party/khronos/*' \ | |
558 | \! -path 'third_party/leveldatabase/*' \ | |
559 | \! -path 'third_party/libjingle/*' \ | |
560 | \! -path 'third_party/libphonenumber/*' \ | |
561 | \! -path 'third_party/libpng/*' \ | |
562 | \! -path 'third_party/libsrtp/*' \ | |
563 | \! -path 'third_party/libusb/libusb.h' \ | |
564 | \! -path 'third_party/libva/*' \ | |
565 | \! -path 'third_party/libvpx/libvpx.h' \ | |
566 | \! -path 'third_party/libxml/chromium/*' \ | |
567 | \! -path 'third_party/libXNVCtrl/*' \ | |
568 | \! -path 'third_party/libyuv/*' \ | |
569 | \! -path 'third_party/llvm-build/*' \ | |
570 | \! -path 'third_party/lss/*' \ | |
571 | \! -path 'third_party/mesa/*' \ | |
572 | \! -path 'third_party/modp_b64/*' \ | |
573 | \! -path 'third_party/mongoose/*' \ | |
574 | \! -path 'third_party/mt19937ar/*' \ | |
575 | \! -path 'third_party/npapi/*' \ | |
576 | \! -path 'third_party/openmax/*' \ | |
577 | \! -path 'third_party/opus/*' \ | |
578 | \! -path 'third_party/ots/*' \ | |
579 | \! -path 'third_party/ply/*' \ | |
580 | \! -path 'third_party/protobuf/*' \ | |
581 | \! -path 'third_party/pywebsocket/*' \ | |
582 | \! -path 'third_party/qcms/*' \ | |
583 | \! -path 'third_party/re2/*' \ | |
584 | \! -path 'third_party/scons-2.0.1/*' \ | |
585 | \! -path 'third_party/sfntly/*' \ | |
586 | \! -path 'third_party/skia/*' \ | |
587 | \! -path 'third_party/smhasher/*' \ | |
588 | \! -path 'third_party/speex/speex.h' \ | |
589 | \! -path 'third_party/sqlite/*' \ | |
590 | \! -path 'third_party/tcmalloc/*' \ | |
591 | \! -path 'third_party/tlslite/*' \ | |
592 | \! -path 'third_party/trace-viewer/*' \ | |
593 | \! -path 'third_party/undoview/*' \ | |
594 | \! -path 'third_party/usb_ids/*' \ | |
595 | \! -path 'third_party/v8-i18n/*' \ | |
596 | \! -path 'third_party/v8/*' \ | |
597 | \! -path 'third_party/webdriver/*' \ | |
598 | \! -path 'third_party/webgl_conformance/*' \ | |
599 | \! -path 'third_party/WebKit/*' \ | |
600 | \! -path 'third_party/webrtc/*' \ | |
601 | \! -path 'third_party/widevine/*' \ | |
602 | \! -path 'third_party/adobe/flash/*' \ | |
603 | \! -path 'third_party/zlib/*' \ | |
604 | \! -path 'third_party/libvpx/*' \ | |
605 | -print -delete | tee -a REMOVED-clean.txt | |
606 | ||
607 | rm -vf third_party/expat/files/lib/expat.h | tee -a REMOVED-clean.txt | |
fe547a32 | 608 | |
cd09b941 | 609 | if [ "${v8:-1}" != "0" ]; then |
fe547a32 ER |
610 | # The implementation files include v8 headers with full path, |
611 | # like #include "v8/include/v8.h". Make sure the system headers | |
612 | # will be used. | |
598df428 | 613 | rm -rf v8/include |
fe547a32 ER |
614 | ln -s /usr/include v8/include |
615 | fi | |
616 | ||
cd09b941 | 617 | if [ "${nacl:-1}" != "0" ]; then |
fe547a32 ER |
618 | # NOTE: here is always x86_64 |
619 | rm -rf native_client/toolchain/linux_x86_newlib | |
fe547a32 | 620 | fi |