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