]> git.pld-linux.org Git - packages/chromium-browser.git/blame - clean-source.sh
use system webp, vpx
[packages/chromium-browser.git] / clean-source.sh
CommitLineData
fe547a32 1#!/bin/sh
8f5f6775 2set -xe
fe547a32 3
0593259b
ER
4export LC_ALL=C
5
fe547a32 6# import options
cd09b941
ER
7# remove everything unless it's remove has been disabled with "0"
8# "v8=0" means "do not remove v8"
fe547a32
ER
9eval "$@"
10
05d9087c 11# Strip tarball from some big directories not needed on the linux platform
f888c710 12# https://code.google.com/p/chromium/wiki/LinuxPackaging
99f39995 13# initial list from src/tools/export_tarball/export_tarball.py
063abe65 14# also removed non-linux files: find -name win -o -name mac -o name android -o name windows
9304218b 15# find -type d -name 'android' -o -name 'chromeos' -o -name 'cros'
07b01cb7 16# find -type d -name *doc*
dda6f58c 17# find -type d -name *example*
894dee72
ER
18# find -type d -name java
19# find -type d -name tools
063abe65 20# find -type d -name samples
05d9087c
ER
21# suffix with _ those that we can't remove (just yet) because of the gclient
22# hooks (see build/all.gyp) or of some unneeded deps/includes
f888c710 23remove_nonessential_dirs() {
0bb93ab2
ER
24 find -type f '(' \
25 -name 'Android.mk' -o \
26 -name '*.vcproj' -o \
27 -name '*.sln' -o \
1e361164 28 -name '*.mm' -o \
0bb93ab2 29 -name '*.m' \
1e361164
ER
30 ')' '!' -type d '(' \
31 '!' -path './remoting/host/continue_window_mac.mm' \
32 '!' -path './remoting/host/disconnect_window_mac.mm' \
33 ')' \
34 -print -delete
0bb93ab2 35
cfaeb929
ER
36 find -regextype posix-extended \
37 -regex '.*_(win|cros|mac)_.*.xtb' \
38 -print -delete
39
f888c710
ER
40 local dir
41 for dir in \
4a275e0e
ER
42 v8/benchmarks \
43 v8/src/arm \
44 v8/src/d8* \
5048b37a 45 third_party/chromite \
18ffc809 46 android_webview \
9304218b
ER
47 ash/resources/default_100_percent/cros_ \
48 ash/resources/default_200_percent/cros_ \
dda6f58c 49 ash/shell/cocoa \
9304218b 50 ash/system/chromeos \
55dddbd9 51 base/android \
9304218b 52 base/chromeos \
e31bf7c6 53 base/ios \
3333a973 54 breakpad/src/client/mac \
9304218b 55 breakpad/src/common/android \
3333a973
ER
56 breakpad/src/common/mac \
57 breakpad/src/tools/mac \
58 build/mac \
7879021e 59 build/win_ \
55dddbd9
ER
60 chrome/android \
61 chrome/app/android \
9304218b
ER
62 chrome/app/resources/terms/chromeos \
63 chrome/app/theme/default_100_percent/cros_ \
7879021e 64 chrome/app/theme/default_100_percent/mac_ \
67e49a2d 65 chrome/app/theme/default_100_percent/win_ \
9304218b 66 chrome/app/theme/default_200_percent/cros_ \
3333a973 67 chrome/app/theme/default_200_percent/mac \
67e49a2d 68 chrome/app/theme/default_200_percent/win_ \
3333a973
ER
69 chrome/app/theme/touch_100_percent/win \
70 chrome/app/theme/touch_140_percent/win \
71 chrome/app/theme/touch_180_percent/win \
55dddbd9 72 chrome/browser/android \
9304218b 73 chrome/browser/chromeos/cros \
e31bf7c6 74 chrome/browser/extensions/docs \
55dddbd9 75 chrome/browser/history/android \
3333a973 76 chrome/browser/mac \
18ffc809 77 chrome/browser/resources/about_welcome_android \
9304218b 78 chrome/browser/resources/chromeos_ \
18ffc809 79 chrome/browser/resources/ntp_android \
9304218b
ER
80 chrome/browser/resources/options/chromeos_ \
81 chrome/browser/resources/shared/css/chromeos \
82 chrome/browser/resources/shared/js/chromeos_ \
71d4aa65 83 chrome/browser/ui/android_ \
dda6f58c 84 chrome/browser/ui/cocoa \
9304218b
ER
85 chrome/browser/ui/webui/chromeos \
86 chrome/browser/ui/webui/ntp/android \
87 chrome/browser/ui/webui/options/chromeos \
54623fc8 88 chrome/common/extensions/docs \
3333a973
ER
89 chrome/common/mac \
90 chrome/installer/mac \
91 chrome/installer/mac/third_party/xz/config/mac \
894dee72 92 chrome/installer/tools \
dda6f58c 93 chrome/third_party/jstemplate/tutorial_examples \
f2f193c6 94 third_party/jstemplate/tutorial_examples \
dda6f58c 95 chrome/third_party/mock4js/examples \
05d9087c 96 chrome/third_party/wtl/ \
9304218b 97 chrome/tools/build/chromeos \
3333a973
ER
98 chrome/tools/build/mac \
99 chrome/tools/build/win \
54623fc8 100 chrome_frame \
3333a973 101 cloud_print/virtual_driver/win \
55dddbd9
ER
102 content/app/android \
103 content/browser/android \
104 content/common/android \
894dee72
ER
105 content/components/navigation_interception/java \
106 content/components/web_contents_delegate_android/java \
55dddbd9
ER
107 content/public/android \
108 content/public/browser/android \
109 content/renderer/android \
110 content/shell/android \
3333a973 111 content/shell/mac \
54623fc8 112 data \
05d9087c
ER
113 gears \
114 google_update \
e31bf7c6 115 gpu/command_buffer/docs \
05d9087c 116 gpu/demos \
9304218b 117 media/audio/android \
e31bf7c6 118 media/audio/ios \
3333a973
ER
119 media/audio/mac \
120 media/audio/win \
894dee72 121 media/tools \
3333a973
ER
122 media/video/capture/mac \
123 media/video/capture/win \
9304218b 124 media/webm/chromeos \
063abe65 125 mesa/MesaLib/src/mesa/drivers/windows \
3333a973 126 native_client/build/mac \
e31bf7c6 127 native_client/documentation \
3333a973
ER
128 native_client/src/shared/imc/win \
129 native_client/src/shared/platform/win \
894dee72 130 native_client/src/tools \
3333a973
ER
131 native_client/src/trusted/debug_stub/win \
132 native_client/src/trusted/desc/win \
133 native_client/src/trusted/nonnacl_util/win \
134 native_client/src/trusted/platform_qualify/win \
894dee72 135 native_client/tools \
18ffc809 136 native_client/tools/trusted_cross_toolchains \
54623fc8 137 native_client_sdk \
3333a973 138 native_client_sdk/src/libraries/win \
9304218b 139 net/android \
894dee72 140 net/tools/testserver \
063abe65 141 npapi/npspy/windows \
05d9087c 142 o3d \
54623fc8
ER
143 o3d/documentation \
144 o3d/samples \
e31bf7c6
ER
145 ppapi/c/documentation \
146 ppapi/cpp/documentation \
894dee72 147 ppapi/native_client/src/tools \
3333a973 148 ppapi/native_client/src/trusted/plugin/win \
894dee72 149 ppapi/native_client/tools \
71d4aa65 150 remoting/host/installer/mac_ \
e15125f5 151 remoting/host/installer/win \
71d4aa65 152 remoting/host/mac_ \
e15125f5 153 remoting/host/setup/win \
71d4aa65 154 remoting/host/win_ \
dda6f58c 155 rlz/examples \
3333a973
ER
156 rlz/mac \
157 rlz/win \
894dee72 158 sandbox/win/tools \
e31bf7c6 159 sdch/ios \
3333a973
ER
160 sdch/mac \
161 skia/config/win \
894dee72 162 sync/tools \
063abe65
ER
163 tcmalloc/chromium/src/windows \
164 tcmalloc/vendor/src/windows \
e31bf7c6 165 third_party/WebKit/Source/JavaScriptCore/docs \
894dee72 166 third_party/WebKit/Source/JavaScriptCore/tools \
55dddbd9 167 third_party/WebKit/Source/Platform/chromium/public/android \
3333a973
ER
168 third_party/WebKit/Source/Platform/chromium/public/mac \
169 third_party/WebKit/Source/Platform/chromium/public/win \
063abe65
ER
170 third_party/WebKit/Source/ThirdParty/gtest/samples \
171 third_party/WebKit/Source/ThirdParty/gyp/samples \
172 third_party/WebKit/Source/ThirdParty/gyp/samples/samples \
894dee72 173 third_party/WebKit/Source/ThirdParty/gyp/tools \
3333a973 174 third_party/WebKit/Source/WTF/wtf/mac \
4a263112 175 third_party/WebKit/Source/WTF/wtf/qt \
3333a973
ER
176 third_party/WebKit/Source/WTF/wtf/threads/win \
177 third_party/WebKit/Source/WTF/wtf/win \
178 third_party/WebKit/Source/WebCore/WebCore.gyp/mac \
179 third_party/WebKit/Source/WebCore/accessibility/mac \
4a263112 180 third_party/WebKit/Source/WebCore/accessibility/qt \
3333a973 181 third_party/WebKit/Source/WebCore/accessibility/win \
4a263112 182 third_party/WebKit/Source/WebCore/bridge/qt \
55dddbd9 183 third_party/WebKit/Source/WebCore/editing/android \
3333a973 184 third_party/WebKit/Source/WebCore/editing/mac \
4a263112 185 third_party/WebKit/Source/WebCore/editing/qt \
55dddbd9 186 third_party/WebKit/Source/WebCore/history/android \
3333a973 187 third_party/WebKit/Source/WebCore/history/mac \
4a263112 188 third_party/WebKit/Source/WebCore/history/qt \
3333a973
ER
189 third_party/WebKit/Source/WebCore/loader/mac \
190 third_party/WebKit/Source/WebCore/loader/win \
55dddbd9 191 third_party/WebKit/Source/WebCore/page/android \
3333a973 192 third_party/WebKit/Source/WebCore/page/mac \
4a263112 193 third_party/WebKit/Source/WebCore/page/qt \
3333a973
ER
194 third_party/WebKit/Source/WebCore/page/scrolling/mac \
195 third_party/WebKit/Source/WebCore/page/win \
55dddbd9 196 third_party/WebKit/Source/WebCore/platform/android \
3333a973 197 third_party/WebKit/Source/WebCore/platform/audio/mac \
4a263112 198 third_party/WebKit/Source/WebCore/platform/audio/qt \
3333a973 199 third_party/WebKit/Source/WebCore/platform/cf/win \
dda6f58c 200 third_party/WebKit/Source/WebCore/platform/cocoa \
3333a973
ER
201 third_party/WebKit/Source/WebCore/platform/graphics/ca/mac \
202 third_party/WebKit/Source/WebCore/platform/graphics/ca/win \
dda6f58c 203 third_party/WebKit/Source/WebCore/platform/graphics/cocoa \
3333a973 204 third_party/WebKit/Source/WebCore/platform/graphics/gpu/mac \
4a263112 205 third_party/WebKit/Source/WebCore/platform/graphics/gpu/qt \
3333a973 206 third_party/WebKit/Source/WebCore/platform/graphics/mac \
4a263112 207 third_party/WebKit/Source/WebCore/platform/graphics/qt \
3333a973 208 third_party/WebKit/Source/WebCore/platform/graphics/surfaces/mac \
4a263112 209 third_party/WebKit/Source/WebCore/platform/graphics/surfaces/qt \
e15125f5 210 third_party/WebKit/Source/WebCore/platform/graphics/surfaces/win \
3333a973 211 third_party/WebKit/Source/WebCore/platform/graphics/win \
e31bf7c6 212 third_party/WebKit/Source/WebCore/platform/ios \
3333a973 213 third_party/WebKit/Source/WebCore/platform/mac \
55dddbd9 214 third_party/WebKit/Source/WebCore/platform/network/android \
3333a973 215 third_party/WebKit/Source/WebCore/platform/network/mac \
4a263112 216 third_party/WebKit/Source/WebCore/platform/network/qt \
3333a973 217 third_party/WebKit/Source/WebCore/platform/network/win \
4a263112 218 third_party/WebKit/Source/WebCore/platform/qt \
55dddbd9 219 third_party/WebKit/Source/WebCore/platform/text/android \
3333a973 220 third_party/WebKit/Source/WebCore/platform/text/mac \
4a263112 221 third_party/WebKit/Source/WebCore/platform/text/qt \
3333a973
ER
222 third_party/WebKit/Source/WebCore/platform/text/win \
223 third_party/WebKit/Source/WebCore/platform/win \
224 third_party/WebKit/Source/WebCore/platform/wx/wxcode/mac \
225 third_party/WebKit/Source/WebCore/platform/wx/wxcode/win \
226 third_party/WebKit/Source/WebCore/plugins/mac \
4a263112 227 third_party/WebKit/Source/WebCore/plugins/qt \
3333a973 228 third_party/WebKit/Source/WebCore/plugins/win \
55dddbd9 229 third_party/WebKit/Source/WebKit/chromium/public/android \
55dddbd9 230 third_party/WebKit/Source/WebKit/chromium/public/platform/android \
3333a973
ER
231 third_party/WebKit/Source/WebKit/chromium/public/platform/mac \
232 third_party/WebKit/Source/WebKit/chromium/public/platform/win \
233 third_party/WebKit/Source/WebKit/chromium/public/win \
55dddbd9 234 third_party/WebKit/Source/WebKit/chromium/src/android \
3333a973
ER
235 third_party/WebKit/Source/WebKit/chromium/src/mac \
236 third_party/WebKit/Source/WebKit/chromium/src/win \
e31bf7c6 237 third_party/WebKit/Source/WebKit/gtk/docs \
3333a973 238 third_party/WebKit/Source/WebKit/mac \
4a263112 239 third_party/WebKit/Source/WebKit/qt \
e31bf7c6 240 third_party/WebKit/Source/WebKit/qt/docs \
dda6f58c 241 third_party/WebKit/Source/WebKit/qt/examples \
3333a973 242 third_party/WebKit/Source/WebKit/win \
063abe65 243 third_party/WebKit/Source/WebKit/wx/bindings/python/samples \
3333a973
ER
244 third_party/WebKit/Source/WebKit2/Platform/CoreIPC/mac \
245 third_party/WebKit/Source/WebKit2/Platform/CoreIPC/win \
246 third_party/WebKit/Source/WebKit2/Platform/mac \
247 third_party/WebKit/Source/WebKit2/Platform/win \
248 third_party/WebKit/Source/WebKit2/PluginProcess/mac \
249 third_party/WebKit/Source/WebKit2/Shared/API/c/mac \
250 third_party/WebKit/Source/WebKit2/Shared/API/c/win \
251 third_party/WebKit/Source/WebKit2/Shared/Plugins/Netscape/mac \
252 third_party/WebKit/Source/WebKit2/Shared/Plugins/Netscape/win \
253 third_party/WebKit/Source/WebKit2/Shared/Plugins/mac \
254 third_party/WebKit/Source/WebKit2/Shared/cg/win \
255 third_party/WebKit/Source/WebKit2/Shared/mac \
256 third_party/WebKit/Source/WebKit2/Shared/win \
257 third_party/WebKit/Source/WebKit2/UIProcess/API/C/mac \
258 third_party/WebKit/Source/WebKit2/UIProcess/API/C/win \
259 third_party/WebKit/Source/WebKit2/UIProcess/API/mac \
260 third_party/WebKit/Source/WebKit2/UIProcess/Launcher/mac \
261 third_party/WebKit/Source/WebKit2/UIProcess/Launcher/win \
262 third_party/WebKit/Source/WebKit2/UIProcess/Plugins/mac \
263 third_party/WebKit/Source/WebKit2/UIProcess/Plugins/win \
264 third_party/WebKit/Source/WebKit2/UIProcess/mac \
265 third_party/WebKit/Source/WebKit2/UIProcess/win \
266 third_party/WebKit/Source/WebKit2/WebProcess/Authentication/mac \
267 third_party/WebKit/Source/WebKit2/WebProcess/Cookies/mac \
268 third_party/WebKit/Source/WebKit2/WebProcess/Downloads/cf/win \
269 third_party/WebKit/Source/WebKit2/WebProcess/Downloads/mac \
270 third_party/WebKit/Source/WebKit2/WebProcess/FullScreen/mac \
271 third_party/WebKit/Source/WebKit2/WebProcess/FullScreen/win \
272 third_party/WebKit/Source/WebKit2/WebProcess/InjectedBundle/API/c/win \
273 third_party/WebKit/Source/WebKit2/WebProcess/InjectedBundle/mac \
274 third_party/WebKit/Source/WebKit2/WebProcess/InjectedBundle/win \
275 third_party/WebKit/Source/WebKit2/WebProcess/Plugins/Netscape/mac \
276 third_party/WebKit/Source/WebKit2/WebProcess/Plugins/Netscape/win \
277 third_party/WebKit/Source/WebKit2/WebProcess/WebCoreSupport/mac \
278 third_party/WebKit/Source/WebKit2/WebProcess/WebCoreSupport/win \
279 third_party/WebKit/Source/WebKit2/WebProcess/WebPage/ca/mac \
280 third_party/WebKit/Source/WebKit2/WebProcess/WebPage/ca/win \
281 third_party/WebKit/Source/WebKit2/WebProcess/WebPage/mac \
282 third_party/WebKit/Source/WebKit2/WebProcess/WebPage/win \
283 third_party/WebKit/Source/WebKit2/WebProcess/mac \
284 third_party/WebKit/Source/WebKit2/WebProcess/win \
285 third_party/WebKit/Source/WebKit2/mac \
286 third_party/WebKit/Source/WebKit2/win \
3333a973 287 third_party/WebKit/Tools/DumpRenderTree/mac \
4a263112 288 third_party/WebKit/Tools/DumpRenderTree/qt \
3333a973 289 third_party/WebKit/Tools/DumpRenderTree/win \
71581184
ER
290 third_party/angle_dx11/extensions \
291 third_party/angle_dx11/samples \
292 third_party/angle_dx11/samples/gles2_book \
05d9087c
ER
293 third_party/boost \
294 third_party/bsdiff \
295 third_party/bspatch \
894dee72
ER
296 third_party/cacheinvalidation/src/example-app-build \
297 third_party/cacheinvalidation/src/java \
55dddbd9 298 third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/external/client/android \
55dddbd9 299 third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/ticl/android \
05d9087c 300 third_party/ffmpeg/binaries \
3333a973
ER
301 third_party/ffmpeg/chromium/binaries/Chromium/win \
302 third_party/ffmpeg/chromium/config/Chrome/mac \
e15125f5 303 third_party/ffmpeg/chromium/config/Chrome/win \
3333a973 304 third_party/ffmpeg/chromium/config/Chromium/mac \
e15125f5 305 third_party/ffmpeg/chromium/config/Chromium/win \
3333a973 306 third_party/ffmpeg/chromium/include/win \
e31bf7c6 307 third_party/ffmpeg/doc \
894dee72 308 third_party/ffmpeg/tools \
05d9087c 309 third_party/fuzzymatch \
8352ba82 310 third_party/gles2_book \
05d9087c
ER
311 third_party/gles_book_examples \
312 third_party/gold \
05d9087c 313 third_party/hunspell/dictionaries \
54623fc8 314 third_party/hunspell_dictionaries \
e31bf7c6 315 third_party/hyphen/doc \
55dddbd9 316 third_party/icu/android \
05d9087c
ER
317 third_party/icu/mac \
318 third_party/lcov \
e31bf7c6 319 third_party/leveldatabase/src/doc \
3333a973 320 third_party/leveldatabase/src/port/win \
dda6f58c 321 third_party/libjingle/source/talk/examples \
3333a973
ER
322 third_party/libjpeg_turbo/mac \
323 third_party/libjpeg_turbo/win \
55dddbd9 324 third_party/libva/va/android \
3333a973
ER
325 third_party/libvpx/source/config/mac \
326 third_party/libvpx/source/config/win \
327 third_party/libxml/mac \
54623fc8 328 third_party/lighttpd \
e31bf7c6 329 third_party/mesa/MesaLib/docs \
e31bf7c6 330 third_party/mesa/MesaLib/src/gallium/docs \
894dee72 331 third_party/npapi/npspy/extern/java \
05d9087c
ER
332 third_party/nspr \
333 third_party/nss \
334 third_party/ocmock \
55dddbd9 335 third_party/openssl/config/android \
894dee72 336 third_party/ots/tools \
05d9087c
ER
337 third_party/pthread \
338 third_party/pyftpdlib \
e31bf7c6 339 third_party/re2/doc \
05d9087c 340 third_party/scons \
894dee72 341 third_party/sfntly/cpp/src/sfntly/tools \
05d9087c 342 third_party/simplejson \
55dddbd9 343 third_party/skia/include/utils/android \
e31bf7c6 344 third_party/skia/include/utils/ios \
3333a973
ER
345 third_party/skia/include/utils/mac \
346 third_party/skia/include/utils/win \
55dddbd9
ER
347 third_party/skia/include/views/android \
348 third_party/skia/src/gpu/gl/android \
3333a973
ER
349 third_party/skia/src/gpu/gl/mac \
350 third_party/skia/src/gpu/gl/win \
e31bf7c6 351 third_party/skia/src/utils/ios \
3333a973
ER
352 third_party/skia/src/utils/mac \
353 third_party/skia/src/utils/win \
e31bf7c6 354 third_party/skia/src/views/ios \
3333a973
ER
355 third_party/skia/src/views/mac \
356 third_party/skia/src/views/win \
357 third_party/snappy/mac \
e31bf7c6
ER
358 third_party/sqlite/src/doc \
359 third_party/tcmalloc/vendor/doc \
dda6f58c
ER
360 third_party/trace-viewer/examples \
361 third_party/trace-viewer/third_party/pywebsocket/src/example \
54623fc8 362 third_party/vc_80 \
e31bf7c6 363 third_party/webdriver/pylib/docs \
55dddbd9 364 third_party/webrtc/modules/audio_device/android \
e31bf7c6 365 third_party/webrtc/modules/audio_device/ios \
3333a973
ER
366 third_party/webrtc/modules/audio_device/main/source/mac \
367 third_party/webrtc/modules/audio_device/main/source/win \
e15125f5 368 third_party/webrtc/modules/audio_device/win \
894dee72 369 third_party/webrtc/modules/video_capture/android/java \
55dddbd9 370 third_party/webrtc/modules/video_capture/main/source/android \
894dee72 371 third_party/webrtc/modules/video_render/android/java \
55dddbd9 372 third_party/webrtc/modules/video_render/main/source/android \
3333a973 373 third_party/webrtc/modules/video_render/main/source/mac \
55dddbd9 374 third_party/webrtc/system_wrappers/source/android \
55dddbd9 375 third_party/yasm/source/config/android \
3333a973
ER
376 third_party/yasm/source/config/mac \
377 third_party/yasm/source/config/win \
9304218b 378 tools/android \
063abe65
ER
379 tools/gyp/samples \
380 tools/gyp/samples/samples \
894dee72 381 tools/gyp/tools \
3333a973 382 tools/mac \
54623fc8 383 tools/site_compare \
05d9087c
ER
384 tools/stats_viewer \
385 tools/symsrc \
05d9087c 386 tools/valgrind \
3333a973 387 tools/win \
05d9087c 388 tools/wine_valgrind \
9304218b 389 ui/android \
dda6f58c 390 ui/base/cocoa \
e15125f5 391 ui/base/ime/win \
9304218b 392 ui/gfx/android \
3333a973 393 ui/gfx/mac \
9304218b
ER
394 ui/resources/default_100_percent/cros_ \
395 ui/resources/default_200_percent/cros_ \
dda6f58c 396 ui/views/examples \
3333a973 397 ui/views/win \
063abe65 398 v8/samples \
9304218b 399 webkit/chromeos \
55dddbd9 400 webkit/media/android \
063abe65
ER
401 webrtc/modules/video_capture/windows \
402 webrtc/modules/video_render/windows \
8352ba82 403 win8 \
f888c710
ER
404 ; do
405 rm -vfr "$dir"
406 done
0bb93ab2
ER
407
408 find $(ls -d \
409 base/mac \
410 base/win \
411 build/android \
665138a3 412 chrome/browser/chromeos_ \
0bb93ab2
ER
413 chrome/browser/component/web_contents_delegate_android \
414 chrome/tools \
e9762a77 415 chromeos_ \
7879021e 416 cloud_print/service/win \
0bb93ab2
ER
417 content/browser/renderer_host/java \
418 content/common/mac \
419 content/renderer/java \
420 gpu/tools \
b79ee8e5 421 media/base/android_ \
0bb93ab2
ER
422 native_client/src/include/win \
423 native_client/src/trusted/service_runtime/win \
71581184 424 net/tools \
0bb93ab2
ER
425 remoting/tools \
426 sandbox/win \
427 third_party/WebKit/Source/WebKit/chromium/public/mac \
428 third_party/WebKit/Tools \
429 third_party/cld/encodings/compact_lang_det/win \
430 third_party/cros_system_api \
431 third_party/mozc/chrome/chromeos \
432 third_party/sfntly/cpp/src/sample \
433 third_party/tcmalloc \
434 third_party/v8-i18n/tools \
435 third_party/webrtc/modules/video_coding/codecs/tools \
436 third_party/webrtc/tools \
437 ui/base/win \
665138a3 438 v8/tools_ \
0bb93ab2
ER
439 webkit/tools \
440 ) '!' -type d '(' \
0bb93ab2 441 '!' -name '*.grd' \
f2f193c6 442 '!' -name '*.gyp*' \
0bb93ab2
ER
443 '!' -path 'base/mac/bundle_locations.h' \
444 '!' -path 'base/mac/crash_logging.h' \
445 '!' -path 'base/win/windows_version.h' \
446 '!' -path 'build/android/cpufeatures.gypi' \
b79ee8e5 447 '!' -path 'chrome/browser/chromeos/attestation/platform_verification_flow.h' \
0bb93ab2 448 '!' -path 'chrome/browser/chromeos/contacts/contact.proto' \
b79ee8e5 449 '!' -path 'chrome/browser/chromeos/extensions/*.h' \
4a275e0e 450 '!' -path 'chrome/browser/chromeos/extensions/echo_private_api.h' \
7879021e 451 '!' -path 'chrome/browser/chromeos/extensions/file_manager/file_browser_handler_api.h' \
b79ee8e5 452 '!' -path 'chrome/browser/chromeos/extensions/file_manager/file_browser_private_api_functions.h' \
4a275e0e
ER
453 '!' -path 'chrome/browser/chromeos/extensions/info_private_api.h' \
454 '!' -path 'chrome/browser/chromeos/extensions/media_player_api.h' \
f2f193c6 455 '!' -path 'chrome/browser/chromeos/extensions/networking_private_api.h' \
b79ee8e5 456 '!' -path 'chrome/browser/chromeos/extensions/wallpaper_api.h' \
4a275e0e 457 '!' -path 'chrome/browser/chromeos/extensions/wallpaper_private_api.h' \
0bb93ab2
ER
458 '!' -path 'chrome/browser/chromeos/settings/cros_settings.h' \
459 '!' -path 'chrome/browser/chromeos/settings/cros_settings_names.h' \
460 '!' -path 'chrome/browser/chromeos/settings/cros_settings_provider.h' \
f2f193c6 461 '!' -path 'chrome/browser/chromeos/settings/device_settings_service.h' \
71d4aa65 462 '!' -path 'chrome/browser/chromeos/system_logs/*.h' \
0bb93ab2
ER
463 '!' -path 'chrome/tools/build/generate_policy_source.py' \
464 '!' -path 'chrome/tools/build/linux/sed.sh' \
465 '!' -path 'chrome/tools/build/make_version_cc.py' \
466 '!' -path 'chrome/tools/build/repack_locales.py' \
467 '!' -path 'chrome/tools/build/version.py' \
71581184 468 '!' -path 'chromeos/chromeos_constants.h' \
0bb93ab2 469 '!' -path 'chromeos/chromeos_export.h' \
4a275e0e 470 '!' -path 'chromeos/chromeos_switches.h' \
f2f193c6 471 '!' -path 'chromeos/dbus/dbus_client_implementation_type.h' \
71d4aa65 472 '!' -path 'chromeos/dbus/dbus_method_call_status.h' \
f2f193c6 473 '!' -path 'chromeos/dbus/session_manager_client.h' \
71d4aa65 474 '!' -path 'chromeos/network/network_state_handler_observer.h' \
0bb93ab2
ER
475 '!' -path 'chromeos/network/onc/onc_constants.h' \
476 '!' -path 'content/browser/renderer_host/java/java_bridge_dispatcher_host_manager.h' \
477 '!' -path 'content/common/mac/attributed_string_coder.h' \
478 '!' -path 'content/common/mac/font_descriptor.h' \
479 '!' -path 'content/renderer/java/java_bridge_dispatcher.h' \
b79ee8e5 480 '!' -path 'media/base/android/demuxer_android.h' \
0bb93ab2
ER
481 '!' -path 'native_client/src/include/win/mman.h' \
482 '!' -path 'native_client/src/trusted/service_runtime/win/debug_exception_handler.h' \
483 '!' -path 'native_client/src/trusted/service_runtime/win/exception_patch/ntdll_patch.h' \
71581184 484 '!' -path 'net/tools/tld_cleanup/*' \
71d4aa65 485 '!' -path 'remoting/tools/build/*' \
0bb93ab2
ER
486 '!' -path 'remoting/tools/verify_resources.py' \
487 '!' -path 'sandbox/win/src/sandbox_types.h' \
488 '!' -path 'third_party/WebKit/Source/WebKit/chromium/public/mac/WebSubstringUtil.h' \
489 '!' -path 'third_party/cld/encodings/compact_lang_det/win/cld_*.cc' \
490 '!' -path 'third_party/cld/encodings/compact_lang_det/win/cld_*.h' \
491 '!' -path 'third_party/cros_system_api/dbus/*.proto' \
492 '!' -path 'third_party/cros_system_api/dbus/service_constants.h' \
493 '!' -path 'third_party/sfntly/cpp/src/sample/chromium/*' \
494 '!' -path 'third_party/tcmalloc/chromium/*' \
495 '!' -path 'third_party/v8-i18n/tools/js2c.py' \
b79ee8e5 496 '!' -path 'third_party/webrtc/tools/tools_unittests.isolate' \
0bb93ab2 497 '!' -path 'ui/base/win/dpi.h' \
b79ee8e5 498 '!' -path 'ui/webui/resources/js/webui_resource_test.js' \
0bb93ab2
ER
499 '!' -path 'v8/tools/js2c.py' \
500 '!' -path 'v8/tools/jsmin.py' \
4a275e0e 501 '!' -path 'webkit/tools/test_shell/*.h' \
0bb93ab2
ER
502 ')' \
503 -print -delete
f888c710
ER
504}
505
8352ba82
ER
506# There are directories we want to strip, but that are unnecessarily required by the build-system
507# So we drop everything but the gyp/gypi files
508almost_strip_dirs() {
509 local dir
510 for dir in \
f2f193c6 511 breakpad_ \
e31bf7c6 512 build/ios \
8352ba82 513 courgette \
18ffc809 514 third_party/cros_dbus_cplusplus \
8352ba82 515 ; do
0bb93ab2 516 find $dir -depth -mindepth 1 '!' '(' -name '*.gyp' -o -name '*.gypi' ')' -print -delete || :
8352ba82 517 done
bcc7de3a
ER
518
519 find tools -type f \
520 '!' -iname '*.gyp*' \
521 '!' -path 'tools/build/*' \
522 '!' -path 'tools/clang/scripts/plugin_flags.sh' \
bdd77e01 523 '!' -path 'tools/compile_test/compile_test.py' \
108c5f7c
ER
524 '!' -path 'tools/generate_library_loader/*' \
525 '!' -path 'tools/generate_shim_headers/generate_shim_headers.py' \
bcc7de3a
ER
526 '!' -path 'tools/generate_stubs/*' \
527 '!' -path 'tools/grit/*' \
528 '!' -path 'tools/gritsettings/*' \
529 '!' -path 'tools/gyp/*' \
71d4aa65 530 '!' -path 'tools/idl_parser/*' \
7879021e 531 '!' -path 'tools/json_comment_eater/json_comment_eater.py' \
bcc7de3a 532 '!' -path 'tools/json_schema_compiler/*' \
108c5f7c 533 '!' -path 'tools/json_to_struct/*' \
f2f193c6 534 '!' -path 'tools/licenses.py' \
bcc7de3a 535 '!' -path 'tools/protoc_wrapper/*' \
f2f193c6 536 '!' -path 'tools/usb_ids/*' \
bcc7de3a
ER
537 '!' -path 'tools/uuidgen.py' \
538 '!' -path 'tools/zip2msi.py' \
539 -print -delete
8352ba82
ER
540}
541
e21194da
ER
542# clean third party
543# list based from archlinux PKGBUILD
544# https://aur.archlinux.org/packages/ch/chromium-dev/PKGBUILD
545clean_third_party() {
063abe65
ER
546 local dir
547 for dir in \
548 third_party/ashmem \
063abe65
ER
549 third_party/eyesfree \
550 third_party/guava \
f2f193c6 551 third_party/iaccessible2 \
063abe65
ER
552 third_party/icon_family \
553 third_party/isimpledom \
063abe65
ER
554 third_party/jsr-305 \
555 third_party/libexif \
556 third_party/mach_override \
f2f193c6
ER
557 third_party/npapi/npspy \
558 third_party/re2/benchlog \
063abe65
ER
559 third_party/sqlite/*.patch \
560 third_party/sqlite/src/*.patch \
f2f193c6 561 third_party/sudden_motion_sensor \
063abe65
ER
562 ; do
563 rm -vfr "$dir"
564 done
565
80b34a6e
ER
566 find third_party -type f \
567 '!' -iname '*.gyp*' \
15f29c79
ER
568 \! -path 'third_party/WebKit/*' \
569 \! -path 'third_party/adobe/flash/*' \
665138a3
ER
570 \! -path 'third_party/angle/include/EGL/*' \
571 \! -path 'third_party/angle/include/GLSLANG/*' \
572 \! -path 'third_party/angle/src/common/*' \
573 \! -path 'third_party/angle/src/compiler/*' \
574 \! -path 'third_party/angle/src/third_party/compiler/*' \
e21194da
ER
575 \! -path 'third_party/cacheinvalidation/*' \
576 \! -path 'third_party/cld/*' \
e9762a77 577 \! -path 'third_party/cld_2/*' \
15f29c79 578 \! -path 'third_party/cros_system_api/*' \
665138a3 579 \! -path 'third_party/ffmpeg/*' \
063abe65 580 \! -path 'third_party/flot/*.js' \
e21194da
ER
581 \! -path 'third_party/hunspell/*' \
582 \! -path 'third_party/hyphen/*' \
583 \! -path 'third_party/iccjpeg/*' \
80b34a6e 584 \! -path 'third_party/jstemplate/*' \
e21194da
ER
585 \! -path 'third_party/khronos/*' \
586 \! -path 'third_party/leveldatabase/*' \
15f29c79 587 \! -path 'third_party/libXNVCtrl/*' \
665138a3 588 \! -path 'third_party/libaddressinput/*' \
e21194da
ER
589 \! -path 'third_party/libjingle/*' \
590 \! -path 'third_party/libphonenumber/*' \
71d4aa65 591 \! -path 'third_party/libusb/*' \
e21194da 592 \! -path 'third_party/libva/*' \
80b34a6e 593 \! -path 'third_party/libvpx/*' \
0767a7a0 594 \! -path 'third_party/libwebp/*' \
e21194da 595 \! -path 'third_party/libxml/chromium/*' \
e21194da 596 \! -path 'third_party/libyuv/*' \
063abe65 597 \! -path 'third_party/lss/*.h' \
71581184
ER
598 \! -path 'third_party/lzma_sdk/*' \
599 \! -path 'third_party/mesa/src/include/GL/gl.h' \
600 \! -path 'third_party/mesa/src/include/GL/glext.h' \
601 \! -path 'third_party/mesa/src/include/GL/glx.h' \
602 \! -path 'third_party/mesa/src/include/GL/glxext.h' \
603 \! -path 'third_party/mesa/src/include/GL/osmesa.h' \
e21194da 604 \! -path 'third_party/modp_b64/*' \
e21194da
ER
605 \! -path 'third_party/mt19937ar/*' \
606 \! -path 'third_party/npapi/*' \
e21194da 607 \! -path 'third_party/ots/*' \
e21194da 608 \! -path 'third_party/protobuf/*' \
e21194da
ER
609 \! -path 'third_party/qcms/*' \
610 \! -path 'third_party/re2/*' \
665138a3 611 \! -path 'third_party/readability/*' \
e21194da
ER
612 \! -path 'third_party/sfntly/*' \
613 \! -path 'third_party/skia/*' \
614 \! -path 'third_party/smhasher/*' \
7879021e 615 \! -path 'third_party/snappy/*' \
94458173
ER
616 \! -path 'third_party/sqlite/amalgamation/*' \
617 \! -path 'third_party/sqlite/sqlite3.h' \
618 \! -path 'third_party/sqlite/src/ext/*' \
e21194da 619 \! -path 'third_party/tcmalloc/*' \
e21194da
ER
620 \! -path 'third_party/trace-viewer/*' \
621 \! -path 'third_party/undoview/*' \
71581184 622 \! -path 'third_party/usrsctp/*' \
e21194da
ER
623 \! -path 'third_party/v8-i18n/*' \
624 \! -path 'third_party/v8/*' \
e21194da
ER
625 \! -path 'third_party/webrtc/*' \
626 \! -path 'third_party/widevine/*' \
80b34a6e 627 \! -path 'third_party/x86inc/*' \
7879021e 628 \! -path 'third_party/zlib/google/*' \
e21194da
ER
629 -print -delete
630
e21194da
ER
631 rm -vf third_party/expat/files/lib/expat.h
632}
633
99f39995
ER
634# parts based on ubuntu debian/rules
635# http://bazaar.launchpad.net/~chromium-team/chromium-browser/chromium-browser.head/view/head:/debian/rules
99f39995 636remove_bin_only() {
55dddbd9 637 find -type f \( \
99f39995 638 -iname \*.exe -o \
894dee72
ER
639 -iname \*.nexe -o \
640 -iname \*.fon -o \
641 -iname \*.ttf -o \
99f39995
ER
642 -iname \*.dll -o \
643 -iname \*.pdb -o \
644 -name \*.o -o \
645 -name \*.a -o \
646 -name \*.dylib \
647 \) -exec rm -fv {} \;
648}
649
650# removes dir, if the bcond is not turned off
651strip_system_dirs() {
517dd8ef
ER
652 local dir lib bcond args
653 # prevent "*" from being expanded in $args
654 set -f
99f39995 655 for dir in "$@"; do
517dd8ef
ER
656 args=${dir#* }
657 test "$args" = "$dir" && args=
658 dir=${dir%% *}
99f39995
ER
659 lib=${dir##*/}
660 bcond=$(eval echo \$$lib)
cd09b941 661 [ "${bcond:-1}" = 0 ] && continue
99f39995
ER
662
663 # skip already removed dirs
664 test -d $dir || continue
665
517dd8ef 666 find $dir -depth -mindepth 1 '!' '(' -name '*.gyp' -o -name '*.gypi' -o -path $dir/$lib.h $args ')' -print -delete || :
99f39995 667 done
517dd8ef 668 set +f
99f39995
ER
669}
670
da3dfa9f 671# remove test data and files
e31bf7c6 672# some scanned with find -name tests -o -name test -o -name test_data -o name testdata
da3dfa9f
ER
673# and find -iname *test*
674remove_tests() {
675 local dir
676
677 # full remove
678 for dir in \
679 ash/test \
b79ee8e5 680 base/test_ \
da3dfa9f
ER
681 breakpad/src/client/windows/tests \
682 breakpad/src/common/linux/tests \
683 breakpad/src/common/tests \
e31bf7c6 684 cc/test \
da3dfa9f
ER
685 chrome/browser/chromeos/bluetooth/test \
686 chrome/browser/component_updater/test \
e31bf7c6 687 chrome/browser/extensions/api/test_ \
da3dfa9f 688 chrome/browser/printing/cloud_print/test \
71581184 689 chrome/browser/resources/gaia_auth/test_ \
da3dfa9f
ER
690 chrome/browser/resources/tracing/tests \
691 chrome/browser/sync/test \
e31bf7c6
ER
692 chrome/browser/ui/cocoa/test \
693 chrome/browser/ui/gtk/test \
da3dfa9f 694 chrome/browser/ui/tests \
e31bf7c6 695 chrome/browser/ui/views/test \
da3dfa9f
ER
696 chrome/installer/test \
697 chrome/test/chromeos \
698 chrome/test/data/firefox2_nss_mac \
699 chrome/test/data/safe_browsing/old \
700 chrome/test/logging/win \
701 chrome/test/pyautolib/chromeos \
702 chrome/test/webdriver/test \
e31bf7c6 703 chrome/test_ \
da3dfa9f
ER
704 chrome/tools/test \
705 chrome_frame/test \
706 chrome_frame/tools/test \
707 content/browser/worker_host/test \
e31bf7c6 708 content/common/gpu/testdata \
da3dfa9f
ER
709 content/public/test \
710 content/test \
711 courgette/testdata \
e31bf7c6
ER
712 device/bluetooth/test \
713 device/test \
da3dfa9f
ER
714 gpu/command_buffer/tests \
715 media/test \
716 media/tools/layout_tests/test_data \
e31bf7c6
ER
717 native_client/buildbot \
718 native_client/src/shared/platform/testdata \
719 native_client/src/trusted/gio/testdata \
720 native_client/src/trusted/interval_multiset/testdata \
da3dfa9f 721 native_client/src/trusted/service_runtime/testdata \
e31bf7c6 722 native_client/src/trusted/validator/x86/decoder/generator/testdata \
da3dfa9f 723 native_client/src/trusted/validator/x86/testing \
e31bf7c6
ER
724 native_client/src/trusted/validator_arm/testdata \
725 native_client/src/trusted/validator_mips/testdata \
726 native_client/src/trusted/validator_x86/testdata \
da3dfa9f 727 native_client/tests \
e31bf7c6 728 native_client/tools/testdata \
da3dfa9f
ER
729 native_client/tools/tests \
730 native_client_sdk/src/build_tools/tests \
731 native_client_sdk/src/libraries/c_salt/test \
732 net/test \
733 o3d/tests \
734 ppapi/native_client/tests \
735 ppapi/tests \
736 printing/test \
737 rlz/test \
738 sandbox/linux/seccomp-legacy/tests \
739 sandbox/linux/tests \
740 sandbox/tests \
741 sandbox/win/tests \
e31bf7c6 742 sdch/open-vcdiff/testdata \
da3dfa9f
ER
743 seccompsandbox/tests \
744 sync/internal_api/public/test \
745 sync/internal_api/test \
746 sync/test \
747 testing/android \
748 testing/gmock/scripts/test \
749 testing/gmock/test \
750 testing/gtest/scripts/test \
751 testing/gtest/test \
752 third_party/WebKit/LayoutTests \
753 third_party/WebKit/Source/JavaScriptCore/API/tests \
754 third_party/WebKit/Source/JavaScriptCore/qt/tests \
755 third_party/WebKit/Source/JavaScriptCore/tests \
756 third_party/WebKit/Source/ThirdParty/gtest/scripts/test \
757 third_party/WebKit/Source/ThirdParty/gtest/test \
758 third_party/WebKit/Source/ThirdParty/gyp/test \
759 third_party/WebKit/Source/ThirdParty/qunit/test \
760 third_party/WebKit/Source/WebCore/bindings/scripts/test \
761 third_party/WebKit/Source/WebCore/testing_ \
762 third_party/WebKit/Source/WebKit/chromium/tests \
763 third_party/WebKit/Source/WebKit/efl/tests \
764 third_party/WebKit/Source/WebKit/gtk/tests \
765 third_party/WebKit/Source/WebKit/qt/tests \
766 third_party/WebKit/Source/WebKit2/UIProcess/API/efl/tests \
767 third_party/WebKit/Source/WebKit2/UIProcess/API/gtk/tests \
768 third_party/WebKit/Source/WebKit2/UIProcess/API/qt/tests \
769 third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/mac \
770 third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/win \
771 third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/mac \
772 third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/win \
773 third_party/WebKit/Tools/Scripts/webkitpy/test \
774 third_party/WebKit/Tools/TestWebKitAPI/Tests/TestWebKitAPI/mac \
775 third_party/WebKit/Tools/TestWebKitAPI/Tests/WebKit/win \
776 third_party/WebKit/Tools/TestWebKitAPI/Tests/WebKit2/mac \
777 third_party/WebKit/Tools/TestWebKitAPI/Tests/WebKit2/win \
778 third_party/WebKit/Tools/TestWebKitAPI/Tests/mac \
779 third_party/WebKit/Tools/TestWebKitAPI/mac \
780 third_party/WebKit/Tools/TestWebKitAPI/win \
71581184 781 third_party/angle_dx11/tests \
da3dfa9f 782 third_party/cacheinvalidation/files/src/google/cacheinvalidation/test \
e31bf7c6 783 third_party/cacheinvalidation/src/google/cacheinvalidation/test \
da3dfa9f
ER
784 third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/testing \
785 third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/testing/android \
786 third_party/ffmpeg/tests \
787 third_party/harfbuzz/tests \
788 third_party/hunspell/tests \
789 third_party/hyphen/tests \
790 third_party/libexif/sources/test \
791 third_party/libjingle/source/talk/app/webrtc/test \
e31bf7c6 792 third_party/libjingle/source/talk/media/testdata \
da3dfa9f
ER
793 third_party/libphonenumber/src/resources/test \
794 third_party/libphonenumber/src/test \
795 third_party/libsrtp/srtp/crypto/test \
796 third_party/libsrtp/srtp/test \
e31bf7c6 797 third_party/libyuv/unit_test/testdata \
da3dfa9f
ER
798 third_party/mesa/MesaLib/src/gallium/tests \
799 third_party/openssl/openssl/crypto/des/t/test \
800 third_party/openssl/openssl/test \
801 third_party/ots/test \
e31bf7c6 802 third_party/protobuf/src/google/protobuf/testdata \
da3dfa9f
ER
803 third_party/protobuf/src/google/protobuf/testing \
804 third_party/re2/re2/testing \
805 third_party/safe_browsing/testing \
806 third_party/sfntly/cpp/src/test \
807 third_party/sqlite/src/test \
808 third_party/sqlite/test \
809 third_party/talloc/libreplace/test \
810 third_party/tcmalloc/chromium/src/tests \
811 third_party/tcmalloc/vendor/src/tests \
812 third_party/tlslite/test \
813 third_party/trace-viewer/test_data \
e31bf7c6
ER
814 third_party/trace-viewer/third_party/pywebsocket/src/test \
815 third_party/trace-viewer/third_party/pywebsocket/src/test/testdata \
da3dfa9f
ER
816 third_party/v8-i18n/tests \
817 third_party/webdriver/pylib/test \
818 third_party/webdriver/test_data \
819 third_party/webrtc/modules/audio_device/test/android \
820 third_party/webrtc/modules/audio_processing/test/android \
e31bf7c6 821 third_party/webrtc/modules/utility/test \
da3dfa9f 822 third_party/webrtc/modules/video_capture/main/test/android \
e31bf7c6 823 third_party/webrtc/system_wrappers/test \
4a275e0e 824 third_party/webrtc/test/manual \
da3dfa9f 825 third_party/webrtc/test/testsupport/mac \
da3dfa9f
ER
826 third_party/webrtc/video_engine/test/auto_test/android \
827 third_party/webrtc/voice_engine/test/android \
828 third_party/xdg-utils/tests \
829 third_party/yasm/source/patched-yasm/libyasm/tests \
830 third_party/yasm/source/patched-yasm/modules/arch/lc3b/tests \
831 third_party/yasm/source/patched-yasm/modules/arch/x86/tests \
832 third_party/yasm/source/patched-yasm/modules/dbgfmts/dwarf2/tests \
833 third_party/yasm/source/patched-yasm/modules/dbgfmts/stabs/tests \
834 third_party/yasm/source/patched-yasm/modules/objfmts/bin/tests \
835 third_party/yasm/source/patched-yasm/modules/objfmts/coff/tests \
836 third_party/yasm/source/patched-yasm/modules/objfmts/elf/tests \
837 third_party/yasm/source/patched-yasm/modules/objfmts/macho/tests \
838 third_party/yasm/source/patched-yasm/modules/objfmts/rdf/tests \
839 third_party/yasm/source/patched-yasm/modules/objfmts/win32/tests \
840 third_party/yasm/source/patched-yasm/modules/objfmts/win64/tests \
841 third_party/yasm/source/patched-yasm/modules/objfmts/xdf/tests \
842 third_party/yasm/source/patched-yasm/modules/parsers/gas/tests \
843 third_party/yasm/source/patched-yasm/modules/parsers/nasm/tests \
844 third_party/yasm/source/patched-yasm/modules/parsers/tasm/tests \
845 third_party/yasm/source/patched-yasm/modules/preprocs/nasm/tests \
846 third_party/yasm/source/patched-yasm/modules/preprocs/raw/tests \
847 third_party/yasm/source/patched-yasm/tools/python-yasm/tests \
848 tools/clang/plugins/tests \
e31bf7c6 849 tools/grit/grit/testdata \
da3dfa9f 850 tools/gyp/test \
e31bf7c6 851 tools/gyp/tools/emacs/testdata \
da3dfa9f
ER
852 tools/page_cycler/webpagereplay/tests \
853 tools/perf_expectations/tests \
e31bf7c6 854 tools/swarm_client/tests \
da3dfa9f
ER
855 ui/app_list/test \
856 ui/aura/test \
857 ui/base/test \
858 ui/compositor/test \
859 ui/gfx/test \
860 ui/test \
861 ui/views/test \
862 v8/test \
e31bf7c6 863 webkit/compositor_bindings/test \
da3dfa9f
ER
864 webkit/data/layout_tests \
865 webkit/plugins/npapi/test \
866 webkit/tools/test/reference_build \
867 webkit/tools/test_shell/mac \
868 ; do
869 rm -vfr "$dir"
870 done
871
872 # partial remove (keep .gyp)
873 for dir in \
e31bf7c6 874 chrome/browser/nacl_host/test \
da3dfa9f 875 chrome/test/data \
e9762a77 876 testing/gtest_ \
1e361164 877 testing/gtest_ios \
e9762a77 878 testing/gmock_ \
e31bf7c6
ER
879 third_party/webrtc/modules/audio_coding/codecs/cng/test \
880 third_party/webrtc/modules/audio_coding/codecs/g711/test \
881 third_party/webrtc/modules/audio_coding/codecs/g722/test \
882 third_party/webrtc/modules/audio_coding/codecs/ilbc/test \
883 third_party/webrtc/modules/audio_coding/codecs/isac/fix/test \
884 third_party/webrtc/modules/audio_coding/codecs/isac/main/test \
885 third_party/webrtc/modules/audio_coding/main/test \
886 third_party/webrtc/modules/audio_coding/neteq/test \
887 third_party/webrtc/modules/audio_conference_mixer/test \
888 third_party/webrtc/modules/audio_device/test \
889 third_party/webrtc/modules/audio_processing/test \
890 third_party/webrtc/modules/rtp_rtcp/test \
891 third_party/webrtc/modules/udp_transport/test \
892 third_party/webrtc/modules/video_capture/main/test \
893 third_party/webrtc/modules/video_coding/codecs/test \
894 third_party/webrtc/modules/video_coding/codecs/vp8/test \
895 third_party/webrtc/modules/video_coding/main/test \
896 third_party/webrtc/modules/video_processing/main/test \
897 third_party/webrtc/modules/video_render/main/test \
b79ee8e5 898 third_party/webrtc/video_engine/test_ \
e31bf7c6
ER
899 third_party/webrtc/voice_engine/test \
900 tools/json_schema_compiler/test \
da3dfa9f 901 ; do
e31bf7c6 902 find $dir -depth -mindepth 1 '!' '(' -name '*.gyp' -o -name '*.gypi' ')' -print -delete || :
da3dfa9f
ER
903 done
904
905 # link headers from system dir. too many files to patch, we don't even build tests
e9762a77
ER
906# install -d testing/gtest/include
907# ln -s /usr/include/gtest testing/gtest/include/gtest
da3dfa9f
ER
908
909 # delete unittest files
dda6f58c
ER
910 find . '(' \
911 -name '*_unittest*.*' \
063abe65
ER
912 -o -name '*_unittest.*' \
913 -o -name '*_unittest' \
914 -o -name 'test_*.*' \
dda6f58c 915 -o -name '*_test.*' \
1e361164 916 -o -path './testing/' \
dda6f58c 917 ')' '!' -name '*.gyp*' \
063abe65
ER
918 '!' -name '*.isolate' \
919 '!' -name '*.grd' \
e9762a77
ER
920 '!' -path './base/test/*' \
921 '!' -path './base/test/launcher/*' \
922 '!' -path './base/test/launcher/test_launcher.*' \
923 '!' -path './base/test/launcher/test_result.*' \
924 '!' -path './cc/debug/*' \
b79ee8e5
ER
925 '!' -path './cc/debug/test_context_provider.h' \
926 '!' -path './cc/debug/test_web_graphics_context_3d.h' \
dda6f58c 927 '!' -path './chrome/browser/diagnostics/diagnostics_test.*' \
063abe65
ER
928 '!' -path './chrome/browser/extensions/api/declarative/test_rules_registry.*' \
929 '!' -path './chrome/browser/extensions/api/test/test_api.*' \
71581184 930 '!' -path './chrome/browser/resources/gaia_auth/manifest_test.json' \
063abe65 931 '!' -path './chrome/browser/resources/net_internals/*' \
7879021e 932 '!' -path './chrome/browser/storage_monitor/test_media_transfer_protocol_manager_linux.*' \
063abe65
ER
933 '!' -path './chrome/browser/ui/webui/test_chrome_web_ui_controller_factory*' \
934 '!' -path './chrome/common/net/test_server_locations.*' \
4a275e0e 935 '!' -path './chrome/renderer/resources/extensions/test_custom_bindings.js' \
063abe65 936 '!' -path './chrome/test/base/test_switches.*' \
dda6f58c 937 '!' -path './chrome/test/perf/browser_perf_test.*' \
063abe65 938 '!' -path './chrome/test/perf/perf_test.*' \
e9762a77 939 '!' -path './media/cast/rtcp/test_rtcp_packet_builder.*' \
063abe65
ER
940 '!' -path './native_client/src/trusted/fault_injection/test_injection.*' \
941 '!' -path './native_client/src/trusted/service_runtime/env_cleanser_test.h' \
942 '!' -path './net/base/test_completion_callback.*' \
943 '!' -path './net/base/test_data_stream.*' \
7879021e 944 '!' -path './net/cert/test_root_certs*' \
3b691646 945 '!' -path './remoting/base/resources_unittest.*' \
e9762a77 946 '!' -path './testing/*' \
b79ee8e5 947 '!' -path './testing/perf/perf_test.*' \
063abe65 948 '!' -path './third_party/skia/src/gpu/gr_unittests.*' \
71d4aa65
ER
949 '!' -path './third_party/trace-viewer/src/base/unittest/test_error.js' \
950 '!' -path './third_party/trace-viewer/src/tracing/test_utils.js' \
bdd77e01 951 '!' -path './tools/compile_test/compile_test.py' \
063abe65 952 '!' -path './ui/compositor/test_web_graphics_context_3d.*' \
b79ee8e5 953 '!' -path './ui/webui/resources/js/webui_resource_test.js' \
71d4aa65 954 '!' -path './webkit/browser/fileapi/*.cc' \
b79ee8e5 955 '!' -path './webkit/browser/fileapi/*.h' \
71581184 956 '!' -path './webkit/common/gpu/test_context_provider_factory.*' \
4a275e0e
ER
957 '!' -path './webkit/gpu/test_context_provider_factory.*' \
958 '!' -path './webkit/support/test_webkit_platform_support.h' \
959 '!' -path './webkit/tools/test_shell/*.h' \
063abe65 960 -print -delete || :
da3dfa9f
ER
961}
962
15bbf7df
ER
963# Remove most bundled libraries. Some are still needed.
964# Sync this with gentoo/chromium-*.ebuild
665138a3 965# NOTE: argument list to script specifies paths to preserve
15bbf7df
ER
966remove_bundled_libraries() {
967 build/linux/unbundle/remove_bundled_libraries.py \
968 third_party/adobe/flash/flapper_version.h \
665138a3 969 third_party/libwebp \
15bbf7df
ER
970 'base/third_party/dmg_fp' \
971 'base/third_party/dynamic_annotations' \
972 'base/third_party/icu' \
973 'base/third_party/nspr' \
974 'base/third_party/symbolize' \
975 'base/third_party/valgrind' \
976 'base/third_party/xdg_mime' \
977 'base/third_party/xdg_user_dirs' \
978 'breakpad/src/third_party/curl' \
979 'chrome/third_party/mozilla_security_manager' \
980 'crypto/third_party/nss' \
981 'net/third_party/mozilla_security_manager' \
982 'net/third_party/nss' \
983 'third_party/WebKit' \
665138a3 984 'third_party/angle' \
15bbf7df
ER
985 'third_party/cacheinvalidation' \
986 'third_party/cld' \
987 'third_party/cros_system_api' \
988 'third_party/ffmpeg' \
989 'third_party/flot' \
990 'third_party/hunspell' \
991 'third_party/iccjpeg' \
992 'third_party/jstemplate' \
993 'third_party/khronos' \
994 'third_party/leveldatabase' \
665138a3 995 'third_party/libaddressinput' \
15bbf7df
ER
996 'third_party/libjingle' \
997 'third_party/libphonenumber' \
998 'third_party/libsrtp' \
999 'third_party/libusb' \
15bbf7df
ER
1000 'third_party/libxml/chromium' \
1001 'third_party/libXNVCtrl' \
1002 'third_party/libyuv' \
1003 'third_party/lss' \
1004 'third_party/lzma_sdk' \
1005 'third_party/mesa' \
1006 'third_party/modp_b64' \
1007 'third_party/mt19937ar' \
1008 'third_party/npapi' \
1009 'third_party/ots' \
665138a3 1010 'third_party/polymer' \
15bbf7df
ER
1011 'third_party/pywebsocket' \
1012 'third_party/qcms' \
665138a3 1013 'third_party/readability' \
15bbf7df
ER
1014 'third_party/sfntly' \
1015 'third_party/skia' \
1016 'third_party/smhasher' \
1017 'third_party/sqlite' \
1018 'third_party/tcmalloc' \
1019 'third_party/tlslite' \
1020 'third_party/trace-viewer' \
1021 'third_party/undoview' \
1022 'third_party/usrsctp' \
1023 'third_party/webdriver' \
1024 'third_party/webrtc' \
1025 'third_party/widevine' \
1026 'third_party/x86inc' \
1027 'third_party/zlib/google' \
1028 'url/third_party/mozilla' \
1029 'v8/src/third_party/valgrind' \
1030 --do-print \
1031 --do-remove
1032}
1033
1034remove_bundled_libraries > REMOVED-bundled_libraries.txt
1035
99f39995 1036strip_system_dirs \
31187203 1037 native_client/src/third_party_mod/jsoncpp \
99f39995 1038 third_party/bzip2 \
665138a3 1039 third_party/ffmpeg_ \
31187203 1040 third_party/flac \
99f39995 1041 third_party/icu \
31187203 1042 third_party/jsoncpp \
42e551c9 1043 third_party/libXNVCtrl \
99f39995 1044 third_party/libevent \
07d26a0d 1045 third_party/libexif \
99f39995 1046 third_party/libjpeg \
07d26a0d 1047 third_party/libmtp \
99f39995 1048 third_party/libpng \
3ee15dec 1049 third_party/libsrtp \
71d4aa65 1050 third_party/libusb_ \
4b411ffe 1051 third_party/libvpx \
665138a3 1052 third_party/libwebp_ \
99f39995 1053 third_party/libxslt \
25d4e23c 1054 third_party/mesa \
07d26a0d 1055 third_party/opus \
75a27c2e 1056 third_party/protobuf \
80b34a6e 1057 third_party/re2 \
7879021e 1058 third_party/snappy \
ed514974 1059 third_party/speex \
5048b37a 1060 third_party/sqlite \
e15125f5 1061 third_party/yasm \
517dd8ef 1062 "third_party/zlib -o -path third_party/zlib/google/*" \
99f39995 1063 v8 \
e31bf7c6 1064> REMOVED-system_dirs.txt
7879021e
ER
1065remove_nonessential_dirs > REMOVED-nonessential_dirs.txt
1066almost_strip_dirs > REMOVED-stripped.txt
1067remove_bin_only > REMOVED-bin_only.txt
1068remove_tests > REMOVED-tests.txt
00360a4d 1069
bebfe676
ER
1070if [ "${sqlite:-1}" = 1 ]; then
1071 # some code does not pass -DUSE_SYSTEM_SQLITE properly
1072 ln -sf /usr/include/sqlite3.h third_party/sqlite/sqlite3.h
1073fi
1074
e31bf7c6 1075clean_third_party > REMOVED-third_party.txt
fe547a32 1076
cd09b941 1077if [ "${v8:-1}" != "0" ]; then
fe547a32
ER
1078 # The implementation files include v8 headers with full path,
1079 # like #include "v8/include/v8.h". Make sure the system headers
1080 # will be used.
598df428 1081 rm -rf v8/include
fe547a32
ER
1082 ln -s /usr/include v8/include
1083fi
1084
cd09b941 1085if [ "${nacl:-1}" != "0" ]; then
fe547a32
ER
1086 # NOTE: here is always x86_64
1087 rm -rf native_client/toolchain/linux_x86_newlib
fe547a32 1088fi
18ffc809 1089
23e8b485
ER
1090if [ "${emptydirs:-0}" != "0" ]; then
1091 # cleanup empty dirs
1092 find -type d '!' -name '.' -print0 | sort -zr | xargs -0 rmdir --ignore-fail-on-non-empty > REMOVED-dirs.txt
1093fi
e31bf7c6
ER
1094
1095# report what's in them
1096for a in REMOVED-*.txt; do
1097 cat $a
1098done
This page took 0.409055 seconds and 4 git commands to generate.