5 # remove everything unless it's remove has been disabled with "0"
6 # "v8=0" means "do not remove v8"
9 # Strip tarball from some big directories not needed on the linux platform
10 # https://code.google.com/p/chromium/wiki/LinuxPackaging
11 # initial list from src/tools/export_tarball/export_tarball.py
12 # some scanned with find -name tests -o -name test -o -name test_data
13 # and find -iname *test*
14 # also removed non-linux files: find -name win -o -name mac -o name android
15 # find -type d -name 'android' -o -name 'chromeos' -o -name 'cros'
16 # suffix with _ those that we can't remove (just yet) because of the gclient
17 # hooks (see build/all.gyp) or of some unneeded deps/includes
18 remove_nonessential_dirs() {
22 ash/resources/default_100_percent/cros_ \
23 ash/resources/default_200_percent/cros_ \
27 base/android/javatests/src/org/chromium/base/test \
32 breakpad/src/client/mac \
33 breakpad/src/client/mac/tests \
34 breakpad/src/client/windows/tests \
35 breakpad/src/common/android \
36 breakpad/src/common/android/testing \
37 breakpad/src/common/linux/tests \
38 breakpad/src/common/mac \
39 breakpad/src/common/tests \
40 breakpad/src/tools/mac \
46 chrome/app/resources/terms/chromeos \
47 chrome/app/theme/default_100_percent/cros_ \
48 chrome/app/theme/default_100_percent/mac \
49 chrome/app/theme/default_100_percent/win \
50 chrome/app/theme/default_200_percent/cros_ \
51 chrome/app/theme/default_200_percent/mac \
52 chrome/app/theme/default_200_percent/win \
53 chrome/app/theme/touch_100_percent/win \
54 chrome/app/theme/touch_140_percent/win \
55 chrome/app/theme/touch_180_percent/win \
56 chrome/browser/android \
57 chrome/browser/chromeos/bluetooth/test \
58 chrome/browser/chromeos/cros \
59 chrome/browser/chromeos_ \
60 chrome/browser/component/web_contents_delegate_android_ \
61 chrome/browser/component_updater/test \
62 chrome/browser/history/android \
64 chrome/browser/printing/cloud_print/test \
65 chrome/browser/resources/about_welcome_android \
66 chrome/browser/resources/chromeos_ \
67 chrome/browser/resources/gaia_auth/test \
68 chrome/browser/resources/ntp_android \
69 chrome/browser/resources/options/chromeos_ \
70 chrome/browser/resources/shared/css/chromeos \
71 chrome/browser/resources/shared/js/chromeos_ \
72 chrome/browser/resources/tracing/tests \
73 chrome/browser/sync/test \
74 chrome/browser/ui/android \
75 chrome/browser/ui/tests \
76 chrome/browser/ui/webui/chromeos \
77 chrome/browser/ui/webui/ntp/android \
78 chrome/browser/ui/webui/options/chromeos \
79 chrome/common/extensions/docs \
81 chrome/installer/mac \
82 chrome/installer/mac/third_party/xz/config/mac \
83 chrome/installer/test \
84 chrome/test/chromeos \
85 chrome/test/data/firefox2_nss_mac \
86 chrome/test/data/safe_browsing/old \
87 chrome/test/logging/win \
88 chrome/test/pyautolib/chromeos \
89 chrome/test/webdriver/test \
90 chrome/third_party/wtl/ \
91 chrome/tools/build/chromeos \
92 chrome/tools/build/mac \
93 chrome/tools/build/win \
95 chrome/tools/test/reference_build \
98 chrome_frame/tools/test \
100 cloud_print/service/win \
101 cloud_print/virtual_driver/win \
102 content/app/android \
103 content/browser/android \
104 content/browser/worker_host/test \
105 content/common/android \
106 content/common/mac_ \
107 content/public/android \
108 content/public/browser/android \
109 content/public/test \
110 content/renderer/android \
111 content/shell/android \
114 content/test/data/layout_tests/LayoutTests/http/tests \
115 content/test/data/layout_tests/LayoutTests/http/tests/websocket/tests \
116 content/test/data/layout_tests/LayoutTests/platform/chromium-win/http/tests \
121 gpu/command_buffer/tests \
123 media/audio/android \
128 media/tools/layout_tests/test_data \
129 media/video/capture/mac \
130 media/video/capture/win \
131 media/webm/chromeos \
132 native_client/build/mac \
133 native_client/src/include/win_ \
134 native_client/src/shared/imc/win \
135 native_client/src/shared/platform/win \
136 native_client/src/trusted/debug_stub/win \
137 native_client/src/trusted/desc/win \
138 native_client/src/trusted/nonnacl_util/win \
139 native_client/src/trusted/platform_qualify/win \
140 native_client/src/trusted/service_runtime/testdata \
141 native_client/src/trusted/service_runtime/win_ \
142 native_client/src/trusted/validator/x86/testing \
143 native_client/tests \
144 native_client/tools/tests \
145 native_client/tools/trusted_cross_toolchains \
147 native_client_sdk/src/build_tools/tests \
148 native_client_sdk/src/libraries/c_salt/test \
149 native_client_sdk/src/libraries/win \
156 ppapi/native_client/src/trusted/plugin/win \
157 ppapi/native_client/tests \
160 remoting/host/installer/mac \
161 remoting/host/installer/win \
163 remoting/host/setup/win \
168 sandbox/linux/seccomp-legacy/tests \
169 sandbox/linux/tests \
174 seccompsandbox/tests \
176 sync/internal_api/public/test \
177 sync/internal_api/test \
181 testing/gmock/scripts/test \
183 testing/gtest/scripts/test \
185 third_party/WebKit/LayoutTests \
186 third_party/WebKit/Source/JavaScriptCore/API/tests \
187 third_party/WebKit/Source/JavaScriptCore/qt/tests \
188 third_party/WebKit/Source/JavaScriptCore/tests \
189 third_party/WebKit/Source/Platform/chromium/public/android \
190 third_party/WebKit/Source/Platform/chromium/public/mac \
191 third_party/WebKit/Source/Platform/chromium/public/win \
192 third_party/WebKit/Source/ThirdParty/gtest/scripts/test \
193 third_party/WebKit/Source/ThirdParty/gtest/test \
194 third_party/WebKit/Source/ThirdParty/gyp/test \
195 third_party/WebKit/Source/ThirdParty/qunit/test \
196 third_party/WebKit/Source/WTF/wtf/mac \
197 third_party/WebKit/Source/WTF/wtf/threads/win \
198 third_party/WebKit/Source/WTF/wtf/win \
199 third_party/WebKit/Source/WebCore/WebCore.gyp/mac \
200 third_party/WebKit/Source/WebCore/accessibility/mac \
201 third_party/WebKit/Source/WebCore/accessibility/win \
202 third_party/WebKit/Source/WebCore/bindings/scripts/test \
203 third_party/WebKit/Source/WebCore/editing/android \
204 third_party/WebKit/Source/WebCore/editing/mac \
205 third_party/WebKit/Source/WebCore/history/android \
206 third_party/WebKit/Source/WebCore/history/mac \
207 third_party/WebKit/Source/WebCore/loader/mac \
208 third_party/WebKit/Source/WebCore/loader/win \
209 third_party/WebKit/Source/WebCore/page/android \
210 third_party/WebKit/Source/WebCore/page/mac \
211 third_party/WebKit/Source/WebCore/page/scrolling/mac \
212 third_party/WebKit/Source/WebCore/page/win \
213 third_party/WebKit/Source/WebCore/platform/android \
214 third_party/WebKit/Source/WebCore/platform/audio/mac \
215 third_party/WebKit/Source/WebCore/platform/cf/win \
216 third_party/WebKit/Source/WebCore/platform/graphics/ca/mac \
217 third_party/WebKit/Source/WebCore/platform/graphics/ca/win \
218 third_party/WebKit/Source/WebCore/platform/graphics/gpu/mac \
219 third_party/WebKit/Source/WebCore/platform/graphics/mac \
220 third_party/WebKit/Source/WebCore/platform/graphics/surfaces/mac \
221 third_party/WebKit/Source/WebCore/platform/graphics/surfaces/win \
222 third_party/WebKit/Source/WebCore/platform/graphics/win \
223 third_party/WebKit/Source/WebCore/platform/mac \
224 third_party/WebKit/Source/WebCore/platform/network/android \
225 third_party/WebKit/Source/WebCore/platform/network/mac \
226 third_party/WebKit/Source/WebCore/platform/network/win \
227 third_party/WebKit/Source/WebCore/platform/text/android \
228 third_party/WebKit/Source/WebCore/platform/text/mac \
229 third_party/WebKit/Source/WebCore/platform/text/win \
230 third_party/WebKit/Source/WebCore/platform/win \
231 third_party/WebKit/Source/WebCore/platform/wx/wxcode/mac \
232 third_party/WebKit/Source/WebCore/platform/wx/wxcode/win \
233 third_party/WebKit/Source/WebCore/plugins/mac \
234 third_party/WebKit/Source/WebCore/plugins/win \
235 third_party/WebKit/Source/WebCore/testing_ \
236 third_party/WebKit/Source/WebKit/chromium/public/android \
237 third_party/WebKit/Source/WebKit/chromium/public/mac_ \
238 third_party/WebKit/Source/WebKit/chromium/public/platform/android \
239 third_party/WebKit/Source/WebKit/chromium/public/platform/mac \
240 third_party/WebKit/Source/WebKit/chromium/public/platform/win \
241 third_party/WebKit/Source/WebKit/chromium/public/win \
242 third_party/WebKit/Source/WebKit/chromium/src/android \
243 third_party/WebKit/Source/WebKit/chromium/src/mac \
244 third_party/WebKit/Source/WebKit/chromium/src/win \
245 third_party/WebKit/Source/WebKit/chromium/tests \
246 third_party/WebKit/Source/WebKit/efl/tests \
247 third_party/WebKit/Source/WebKit/gtk/tests \
248 third_party/WebKit/Source/WebKit/mac \
249 third_party/WebKit/Source/WebKit/qt/tests \
250 third_party/WebKit/Source/WebKit/win \
251 third_party/WebKit/Source/WebKit2/Platform/CoreIPC/mac \
252 third_party/WebKit/Source/WebKit2/Platform/CoreIPC/win \
253 third_party/WebKit/Source/WebKit2/Platform/mac \
254 third_party/WebKit/Source/WebKit2/Platform/win \
255 third_party/WebKit/Source/WebKit2/PluginProcess/mac \
256 third_party/WebKit/Source/WebKit2/Shared/API/c/mac \
257 third_party/WebKit/Source/WebKit2/Shared/API/c/win \
258 third_party/WebKit/Source/WebKit2/Shared/Plugins/Netscape/mac \
259 third_party/WebKit/Source/WebKit2/Shared/Plugins/Netscape/win \
260 third_party/WebKit/Source/WebKit2/Shared/Plugins/mac \
261 third_party/WebKit/Source/WebKit2/Shared/cg/win \
262 third_party/WebKit/Source/WebKit2/Shared/mac \
263 third_party/WebKit/Source/WebKit2/Shared/win \
264 third_party/WebKit/Source/WebKit2/UIProcess/API/C/mac \
265 third_party/WebKit/Source/WebKit2/UIProcess/API/C/win \
266 third_party/WebKit/Source/WebKit2/UIProcess/API/efl/tests \
267 third_party/WebKit/Source/WebKit2/UIProcess/API/gtk/tests \
268 third_party/WebKit/Source/WebKit2/UIProcess/API/mac \
269 third_party/WebKit/Source/WebKit2/UIProcess/API/qt/tests \
270 third_party/WebKit/Source/WebKit2/UIProcess/Launcher/mac \
271 third_party/WebKit/Source/WebKit2/UIProcess/Launcher/win \
272 third_party/WebKit/Source/WebKit2/UIProcess/Plugins/mac \
273 third_party/WebKit/Source/WebKit2/UIProcess/Plugins/win \
274 third_party/WebKit/Source/WebKit2/UIProcess/mac \
275 third_party/WebKit/Source/WebKit2/UIProcess/win \
276 third_party/WebKit/Source/WebKit2/WebProcess/Authentication/mac \
277 third_party/WebKit/Source/WebKit2/WebProcess/Cookies/mac \
278 third_party/WebKit/Source/WebKit2/WebProcess/Downloads/cf/win \
279 third_party/WebKit/Source/WebKit2/WebProcess/Downloads/mac \
280 third_party/WebKit/Source/WebKit2/WebProcess/FullScreen/mac \
281 third_party/WebKit/Source/WebKit2/WebProcess/FullScreen/win \
282 third_party/WebKit/Source/WebKit2/WebProcess/InjectedBundle/API/c/win \
283 third_party/WebKit/Source/WebKit2/WebProcess/InjectedBundle/mac \
284 third_party/WebKit/Source/WebKit2/WebProcess/InjectedBundle/win \
285 third_party/WebKit/Source/WebKit2/WebProcess/Plugins/Netscape/mac \
286 third_party/WebKit/Source/WebKit2/WebProcess/Plugins/Netscape/win \
287 third_party/WebKit/Source/WebKit2/WebProcess/WebCoreSupport/mac \
288 third_party/WebKit/Source/WebKit2/WebProcess/WebCoreSupport/win \
289 third_party/WebKit/Source/WebKit2/WebProcess/WebPage/ca/mac \
290 third_party/WebKit/Source/WebKit2/WebProcess/WebPage/ca/win \
291 third_party/WebKit/Source/WebKit2/WebProcess/WebPage/mac \
292 third_party/WebKit/Source/WebKit2/WebProcess/WebPage/win \
293 third_party/WebKit/Source/WebKit2/WebProcess/mac \
294 third_party/WebKit/Source/WebKit2/WebProcess/win \
295 third_party/WebKit/Source/WebKit2/mac \
296 third_party/WebKit/Source/WebKit2/win \
297 third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/mac \
298 third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/win \
299 third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/mac \
300 third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/win \
301 third_party/WebKit/Tools/DumpRenderTree/mac \
302 third_party/WebKit/Tools/DumpRenderTree/win \
303 third_party/WebKit/Tools/Scripts/webkitpy/test \
304 third_party/WebKit/Tools/TestWebKitAPI/Tests/TestWebKitAPI/mac \
305 third_party/WebKit/Tools/TestWebKitAPI/Tests/WebKit/win \
306 third_party/WebKit/Tools/TestWebKitAPI/Tests/WebKit2/mac \
307 third_party/WebKit/Tools/TestWebKitAPI/Tests/WebKit2/win \
308 third_party/WebKit/Tools/TestWebKitAPI/Tests/mac \
309 third_party/WebKit/Tools/TestWebKitAPI/mac \
310 third_party/WebKit/Tools/TestWebKitAPI/win \
311 third_party/angle/samples/gles2_book \
312 third_party/angle/tests \
315 third_party/bspatch \
316 third_party/cacheinvalidation/files/src/google/cacheinvalidation/test \
317 third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/external/client/android \
318 third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/testing \
319 third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/testing/android \
320 third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/ticl/android \
321 third_party/cld/encodings/compact_lang_det/win_ \
322 third_party/cros_system_api_ \
323 third_party/ffmpeg/binaries \
324 third_party/ffmpeg/chromium/binaries/Chromium/win \
325 third_party/ffmpeg/chromium/config/Chrome/mac \
326 third_party/ffmpeg/chromium/config/Chrome/win \
327 third_party/ffmpeg/chromium/config/Chromium/mac \
328 third_party/ffmpeg/chromium/config/Chromium/win \
329 third_party/ffmpeg/chromium/include/win \
330 third_party/ffmpeg/tests \
331 third_party/fuzzymatch \
332 third_party/gles2_book \
333 third_party/gles_book_examples \
335 third_party/harfbuzz/tests \
336 third_party/hunspell/dictionaries \
337 third_party/hunspell/tests \
338 third_party/hunspell_dictionaries \
339 third_party/hyphen/tests \
340 third_party/icu/android \
341 third_party/icu/mac \
343 third_party/leveldatabase/src/port/win \
344 third_party/libexif/sources/test \
345 third_party/libjingle/source/talk/app/webrtc/test \
346 third_party/libjpeg_turbo/mac \
347 third_party/libjpeg_turbo/win \
348 third_party/libphonenumber/src/resources/test \
349 third_party/libphonenumber/src/test \
350 third_party/libsrtp/srtp/crypto/test \
351 third_party/libsrtp/srtp/test \
352 third_party/libva/va/android \
353 third_party/libvpx/source/config/mac \
354 third_party/libvpx/source/config/win \
355 third_party/libxml/mac \
356 third_party/lighttpd \
357 third_party/mesa/MesaLib/src/gallium/tests \
358 third_party/mesa/MesaLib/src/gallium/tests/python/tests \
359 third_party/mozc/chrome/chromeos_ \
363 third_party/openssl/config/android \
364 third_party/openssl/openssl/crypto/des/t/test \
365 third_party/openssl/openssl/test \
366 third_party/ots/test \
367 third_party/protobuf/src/google/protobuf/testing \
368 third_party/pthread \
369 third_party/pyftpdlib \
370 third_party/re2/re2/testing \
371 third_party/safe_browsing/testing \
373 third_party/sfntly/cpp/src/test \
374 third_party/simplejson \
375 third_party/skia/include/utils/android \
376 third_party/skia/include/utils/mac \
377 third_party/skia/include/utils/win \
378 third_party/skia/include/views/android \
379 third_party/skia/src/gpu/gl/android \
380 third_party/skia/src/gpu/gl/mac \
381 third_party/skia/src/gpu/gl/win \
382 third_party/skia/src/utils/mac \
383 third_party/skia/src/utils/win \
384 third_party/skia/src/views/mac \
385 third_party/skia/src/views/win \
386 third_party/snappy/mac \
387 third_party/sqlite/src/test \
388 third_party/sqlite/test \
389 third_party/talloc/libreplace/test \
390 third_party/tcmalloc/chromium/src/tests \
391 third_party/tcmalloc/vendor/src/tests \
392 third_party/tcmalloc_ \
393 third_party/tlslite/test \
394 third_party/trace-viewer/test_data \
395 third_party/v8-i18n/tests \
397 third_party/webdriver/pylib/test \
398 third_party/webdriver/test_data \
399 third_party/webrtc/modules/audio_device/android \
400 third_party/webrtc/modules/audio_device/main/source/mac \
401 third_party/webrtc/modules/audio_device/main/source/win \
402 third_party/webrtc/modules/audio_device/test/android \
403 third_party/webrtc/modules/audio_device/win \
404 third_party/webrtc/modules/audio_processing/test/android \
405 third_party/webrtc/modules/video_capture/main/source/android \
406 third_party/webrtc/modules/video_capture/main/test/android \
407 third_party/webrtc/modules/video_render/main/source/android \
408 third_party/webrtc/modules/video_render/main/source/mac \
409 third_party/webrtc/system_wrappers/source/android \
410 third_party/webrtc/test/testsupport/mac \
411 third_party/webrtc/video_engine/test/android \
412 third_party/webrtc/video_engine/test/auto_test/android \
413 third_party/webrtc/voice_engine/test/android \
414 third_party/xdg-utils/tests \
415 third_party/yasm/source/config/android \
416 third_party/yasm/source/config/mac \
417 third_party/yasm/source/config/win \
418 third_party/yasm/source/patched-yasm/libyasm/tests \
419 third_party/yasm/source/patched-yasm/modules/arch/lc3b/tests \
420 third_party/yasm/source/patched-yasm/modules/arch/x86/tests \
421 third_party/yasm/source/patched-yasm/modules/dbgfmts/dwarf2/tests \
422 third_party/yasm/source/patched-yasm/modules/dbgfmts/stabs/tests \
423 third_party/yasm/source/patched-yasm/modules/objfmts/bin/tests \
424 third_party/yasm/source/patched-yasm/modules/objfmts/coff/tests \
425 third_party/yasm/source/patched-yasm/modules/objfmts/elf/tests \
426 third_party/yasm/source/patched-yasm/modules/objfmts/macho/tests \
427 third_party/yasm/source/patched-yasm/modules/objfmts/rdf/tests \
428 third_party/yasm/source/patched-yasm/modules/objfmts/win32/tests \
429 third_party/yasm/source/patched-yasm/modules/objfmts/win64/tests \
430 third_party/yasm/source/patched-yasm/modules/objfmts/xdf/tests \
431 third_party/yasm/source/patched-yasm/modules/parsers/gas/tests \
432 third_party/yasm/source/patched-yasm/modules/parsers/nasm/tests \
433 third_party/yasm/source/patched-yasm/modules/parsers/tasm/tests \
434 third_party/yasm/source/patched-yasm/modules/preprocs/nasm/tests \
435 third_party/yasm/source/patched-yasm/modules/preprocs/raw/tests \
436 third_party/yasm/source/patched-yasm/tools/python-yasm/tests \
438 tools/clang/plugins/tests \
441 tools/page_cycler/webpagereplay/tests \
442 tools/perf_expectations/tests \
448 tools/wine_valgrind \
459 ui/resources/default_100_percent/cros_ \
460 ui/resources/default_200_percent/cros_ \
467 webkit/data/layout_tests \
468 webkit/media/android \
469 webkit/plugins/npapi/test \
470 webkit/tools/test/reference_build \
471 webkit/tools/test_shell/mac \
478 # There are directories we want to strip, but that are unnecessarily required by the build-system
479 # So we drop everything but the gyp/gypi files
480 almost_strip_dirs() {
486 third_party/cros_dbus_cplusplus \
488 find $dir -depth -mindepth 1 \! \( -name '*.gyp' -o -name '*.gypi' \) -print -delete || :
492 '!' -iname '*.gyp*' \
493 '!' -path 'tools/build/*' \
494 '!' -path 'tools/clang/scripts/plugin_flags.sh' \
495 '!' -path 'tools/generate_stubs/*' \
496 '!' -path 'tools/grit/*' \
497 '!' -path 'tools/gritsettings/*' \
498 '!' -path 'tools/gyp/*' \
499 '!' -path 'tools/json_comment_eater.py' \
500 '!' -path 'tools/json_schema_compiler/*' \
501 '!' -path 'tools/protoc_wrapper/*' \
502 '!' -path 'tools/uuidgen.py' \
503 '!' -path 'tools/zip2msi.py' \
506 # clear testing, referred in too many files to patch
507 install -d testing/gtest/include/gtest
508 echo '' > testing/gtest/include/gtest/gtest.h
512 # list based from archlinux PKGBUILD
513 # https://aur.archlinux.org/packages/ch/chromium-dev/PKGBUILD
514 clean_third_party() {
515 find third_party -type f \! -iname '*.gyp*' \
516 \! -path 'third_party/angle/*' \
517 \! -path 'third_party/cacheinvalidation/*' \
518 \! -path 'third_party/cld/*' \
519 \! -path 'third_party/cros_system_api/*' \
520 \! -path 'third_party/ffmpeg/*' \
521 \! -path 'third_party/flac/flac.h' \
522 \! -path 'third_party/flot/*' \
523 \! -path 'third_party/gpsd/*' \
524 \! -path 'third_party/harfbuzz/*' \
525 \! -path 'third_party/harfbuzz-ng/*' \
526 \! -path 'third_party/hunspell/*' \
527 \! -path 'third_party/hyphen/*' \
528 \! -path 'third_party/iccjpeg/*' \
529 \! -path 'third_party/jsoncpp/*' \
530 \! -path 'third_party/khronos/*' \
531 \! -path 'third_party/leveldatabase/*' \
532 \! -path 'third_party/libjingle/*' \
533 \! -path 'third_party/libphonenumber/*' \
534 \! -path 'third_party/libpng/*' \
535 \! -path 'third_party/libsrtp/*' \
536 \! -path 'third_party/libusb/libusb.h' \
537 \! -path 'third_party/libva/*' \
538 \! -path 'third_party/libvpx/libvpx.h' \
539 \! -path 'third_party/libxml/chromium/*' \
540 \! -path 'third_party/libXNVCtrl/*' \
541 \! -path 'third_party/libyuv/*' \
542 \! -path 'third_party/llvm-build/*' \
543 \! -path 'third_party/lss/*' \
544 \! -path 'third_party/mesa/*' \
545 \! -path 'third_party/modp_b64/*' \
546 \! -path 'third_party/mongoose/*' \
547 \! -path 'third_party/mt19937ar/*' \
548 \! -path 'third_party/npapi/*' \
549 \! -path 'third_party/openmax/*' \
550 \! -path 'third_party/opus/*' \
551 \! -path 'third_party/ots/*' \
552 \! -path 'third_party/ply/*' \
553 \! -path 'third_party/protobuf/*' \
554 \! -path 'third_party/pywebsocket/*' \
555 \! -path 'third_party/qcms/*' \
556 \! -path 'third_party/re2/*' \
557 \! -path 'third_party/scons-2.0.1/*' \
558 \! -path 'third_party/sfntly/*' \
559 \! -path 'third_party/skia/*' \
560 \! -path 'third_party/smhasher/*' \
561 \! -path 'third_party/speex/speex.h' \
562 \! -path 'third_party/sqlite/*' \
563 \! -path 'third_party/tcmalloc/*' \
564 \! -path 'third_party/tlslite/*' \
565 \! -path 'third_party/trace-viewer/*' \
566 \! -path 'third_party/undoview/*' \
567 \! -path 'third_party/usb_ids/*' \
568 \! -path 'third_party/v8-i18n/*' \
569 \! -path 'third_party/v8/*' \
570 \! -path 'third_party/webdriver/*' \
571 \! -path 'third_party/WebKit/*' \
572 \! -path 'third_party/webrtc/*' \
573 \! -path 'third_party/widevine/*' \
575 \! -path 'third_party/adobe/flash/*' \
576 \! -path 'third_party/zlib/*' \
577 \! -path 'third_party/libvpx/*' \
580 rm -vf third_party/expat/files/lib/expat.h
583 # parts based on ubuntu debian/rules
584 # http://bazaar.launchpad.net/~chromium-team/chromium-browser/chromium-browser.head/view/head:/debian/rules
593 \) -exec rm -fv {} \;
596 # removes dir, if the bcond is not turned off
597 strip_system_dirs() {
601 bcond=$(eval echo \$$lib)
602 [ "${bcond:-1}" = 0 ] && continue
604 # skip already removed dirs
605 test -d $dir || continue
607 find $dir -depth -mindepth 1 \! \( -name '*.gyp' -o -name '*.gypi' -o -path $dir/$lib.h \) -print -delete
611 remove_nonessential_dirs | tee -a REMOVED-nonessential_dirs.txt
612 almost_strip_dirs | tee -a REMOVED-stripped.txt
613 remove_bin_only | tee -a REMOVED-bin_only.txt
616 native_client/src/third_party_mod/jsoncpp \
620 third_party/jsoncpp \
621 third_party/libevent \
622 third_party/libexif \
623 third_party/libjpeg \
626 third_party/libsrtp \
629 third_party/libwebp \
630 third_party/libxml_ \
631 third_party/libxslt \
637 | tee -a REMOVED-system_dirs.txt
639 clean_third_party | tee -a REMOVED-third_party.txt
641 if [ "${v8:-1}" != "0" ]; then
642 # The implementation files include v8 headers with full path,
643 # like #include "v8/include/v8.h". Make sure the system headers
646 ln -s /usr/include v8/include
649 if [ "${nacl:-1}" != "0" ]; then
650 # NOTE: here is always x86_64
651 rm -rf native_client/toolchain/linux_x86_newlib
655 find -type d -print0 | sort -zr | xargs -0 rmdir -v 2>/dev/null | tee -a REMOVED-dirs.txt