X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=clean-source.sh;h=af0a743e70ee37e7ffce9205fb3ee2c5939bf77c;hb=8f2c07aef874df43cc5d9c3fdb6293e5739cfc9c;hp=b2dd11a37bf009d5f4a5703e40c9d94852fa56cb;hpb=70c1936409d4ad5c31a2addfe4defe616510c940;p=packages%2Fchromium-browser.git diff --git a/clean-source.sh b/clean-source.sh index b2dd11a..af0a743 100755 --- a/clean-source.sh +++ b/clean-source.sh @@ -8,6 +8,7 @@ export LC_ALL=C # "v8=0" means "do not remove v8" eval "$@" +# {{{ remove nonessential dirs # Strip tarball from some big directories not needed on the linux platform # https://code.google.com/p/chromium/wiki/LinuxPackaging # initial list from src/tools/export_tarball/export_tarball.py @@ -46,7 +47,7 @@ remove_nonessential_dirs() { ash/resources/default_100_percent/cros_ \ ash/resources/default_200_percent/cros_ \ ash/shell/cocoa \ - ash/system/chromeos \ + ash/system/chromeos_ \ base/android \ base/chromeos \ base/ios \ @@ -72,7 +73,7 @@ remove_nonessential_dirs() { chrome/browser/chromeos/cros \ chrome/browser/extensions/docs \ chrome/browser/history/android \ - chrome/browser/mac \ + chrome/browser/mac_ \ chrome/browser/resources/about_welcome_android \ chrome/browser/resources/chromeos_ \ chrome/browser/resources/ntp_android \ @@ -85,7 +86,7 @@ remove_nonessential_dirs() { chrome/browser/ui/webui/ntp/android \ chrome/browser/ui/webui/options/chromeos \ chrome/common/extensions/docs \ - chrome/common/mac \ + chrome/common/mac_ \ chrome/installer/mac \ chrome/installer/mac/third_party/xz/config/mac \ chrome/installer/tools \ @@ -131,6 +132,7 @@ remove_nonessential_dirs() { native_client/src/trusted/desc/win \ native_client/src/trusted/nonnacl_util/win \ native_client/src/trusted/platform_qualify/win \ + native_client/toolchain \ native_client/tools \ native_client/tools/trusted_cross_toolchains \ native_client_sdk \ @@ -158,7 +160,7 @@ remove_nonessential_dirs() { sdch/ios \ sdch/mac \ skia/config/win \ - sync/tools \ + sync/tools_ \ tcmalloc/chromium/src/windows \ tcmalloc/vendor/src/windows \ third_party/WebKit/Source/JavaScriptCore/docs \ @@ -307,19 +309,19 @@ remove_nonessential_dirs() { third_party/ffmpeg/chromium/config/Chromium/win \ third_party/ffmpeg/chromium/config/ChromiumOS/linux/arm \ third_party/ffmpeg/chromium/include/win \ - third_party/ffmpeg/doc \ + third_party/ffmpeg/doc_ \ third_party/ffmpeg/libavcodec/alpha \ third_party/ffmpeg/libavcodec/arm \ third_party/ffmpeg/libavcodec/avr32 \ third_party/ffmpeg/libavcodec/bfin \ - third_party/ffmpeg/libavcodec/mips \ + third_party/ffmpeg/libavcodec/mips_ \ third_party/ffmpeg/libavcodec/ppc \ third_party/ffmpeg/libavcodec/sh4 \ third_party/ffmpeg/libavcodec/sparc \ third_party/ffmpeg/libavresample/arm \ third_party/ffmpeg/libavutil/avr32 \ third_party/ffmpeg/libavutil/bfin \ - third_party/ffmpeg/libavutil/mips \ + third_party/ffmpeg/libavutil/mips_ \ third_party/ffmpeg/libavutil/ppc \ third_party/ffmpeg/libavutil/sh4 \ third_party/ffmpeg/libswresample/arm \ @@ -353,6 +355,7 @@ remove_nonessential_dirs() { third_party/nspr \ third_party/nss \ third_party/ocmock \ + third_party/openssl \ third_party/openssl/config/android \ third_party/ots/tools \ third_party/pthread \ @@ -524,7 +527,8 @@ remove_nonessential_dirs() { ')' \ -print -delete } - +# }}} +# {{{ almost_strip_dirs # There are directories we want to strip, but that are unnecessarily required by the build-system # So we drop everything but the gyp/gypi files almost_strip_dirs() { @@ -560,11 +564,14 @@ almost_strip_dirs() { '!' -path 'tools/zip2msi.py' \ -print -delete } - -# clean third party +# }}} +# {{{ clean third party # list based from archlinux PKGBUILD # https://aur.archlinux.org/packages/ch/chromium-dev/PKGBUILD clean_third_party() { + + # NOTE: don't forget to sync remove_bundled_libraries() { + local dir for dir in \ third_party/ashmem \ @@ -592,6 +599,7 @@ clean_third_party() { '!' -path 'third_party/angle/enumerate_files.py' \ '!' -path 'third_party/angle/include/EGL/*' \ '!' -path 'third_party/angle/include/GLSLANG/*' \ + '!' -path 'third_party/angle/include/*.h' \ '!' -path 'third_party/angle/src/*' \ '!' -path 'third_party/angle/src/common/*' \ '!' -path 'third_party/angle/src/compiler/*' \ @@ -602,9 +610,12 @@ clean_third_party() { '!' -path 'third_party/cld/*' \ '!' -path 'third_party/cld_2/*' \ '!' -path 'third_party/cros_system_api/*' \ + '!' -path 'third_party/cython/python_flags.py' \ '!' -path 'third_party/dom_distiller_js/*' \ '!' -path 'third_party/ffmpeg/*' \ + '!' -path 'third_party/fips181/*' \ '!' -path 'third_party/flot/*.js' \ + '!' -path 'third_party/google_input_tools/*' \ '!' -path 'third_party/hunspell/*' \ '!' -path 'third_party/hyphen/*' \ '!' -path 'third_party/iccjpeg/*' \ @@ -635,9 +646,12 @@ clean_third_party() { '!' -path 'third_party/modp_b64/*' \ '!' -path 'third_party/mt19937ar/*' \ '!' -path 'third_party/npapi/*' \ + '!' -path 'third_party/openmax_dl/*' \ '!' -path 'third_party/ots/*' \ + '!' -path 'third_party/pdfium/*' \ '!' -path 'third_party/ply/*' \ '!' -path 'third_party/polymer/*' \ + '!' -path 'third_party/polymer_legacy/*' \ '!' -path 'third_party/protobuf/*' \ '!' -path 'third_party/qcms/*' \ '!' -path 'third_party/re2/*' \ @@ -665,11 +679,13 @@ clean_third_party() { '!' -path 'third_party/libvpx/*' \ '!' -path 'third_party/markupsafe/*' \ '!' -path 'third_party/opus/*' \ + '!' -path 'third_party/libudev/*' \ -print -delete rm -vf third_party/expat/files/lib/expat.h } - +# }}} +# {{{ remove_bin_only # parts based on ubuntu debian/rules # http://bazaar.launchpad.net/~chromium-team/chromium-browser/chromium-browser.head/view/head:/debian/rules remove_bin_only() { @@ -686,7 +702,8 @@ remove_bin_only() { -name \*.dylib \ \) -exec rm -fv {} \; } - +# }}} +# {{{ strip_system_dirs # removes dir, if the bcond is not turned off strip_system_dirs() { local dir lib bcond args @@ -707,7 +724,8 @@ strip_system_dirs() { done set +f } - +# }}} +# {{{ remove_tests # remove test data and files # some scanned with find -name tests -o -name test -o -name test_data -o name testdata # and find -iname *test* @@ -823,7 +841,7 @@ remove_tests() { third_party/cacheinvalidation/src/google/cacheinvalidation/test \ third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/testing \ third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/testing/android \ - third_party/ffmpeg/tests \ + third_party/ffmpeg/tests_ \ third_party/harfbuzz/tests \ third_party/hunspell/tests \ third_party/hyphen/tests \ @@ -840,7 +858,7 @@ remove_tests() { third_party/openssl/openssl/test \ third_party/ots/test \ third_party/protobuf/src/google/protobuf/testdata \ - third_party/protobuf/src/google/protobuf/testing \ + third_party/protobuf/src/google/protobuf/testing_ \ third_party/re2/re2/testing \ third_party/safe_browsing/testing \ third_party/sfntly/cpp/src/test \ @@ -947,6 +965,9 @@ remove_tests() { # install -d testing/gtest/include # ln -s /usr/include/gtest testing/gtest/include/gtest + # fast exit. as this requires fine-tuning + return + echo '> delete unittest files' find . '(' \ -name '*_unittest*.*' -o \ @@ -970,6 +991,9 @@ remove_tests() { '!' -path './chrome/browser/extensions/api/declarative/test_rules_registry.*' \ '!' -path './chrome/browser/extensions/api/test/test_api.*' \ '!' -path './chrome/browser/resources/gaia_auth/manifest_test.json' \ + '!' -path './extensions/renderer/resources/test_custom_bindings.js' \ + '!' -path './sync/internal_api/attachments/attachment_service_proxy_for_test.cc' \ + '!' -path './net/base/registry_controlled_domains/effective_tld_names_unittest1.gperf' \ '!' -path './chrome/browser/resources/net_internals/*' \ '!' -path './chrome/browser/storage_monitor/test_media_transfer_protocol_manager_linux.*' \ '!' -path './chrome/browser/ui/webui/test_chrome_web_ui_controller_factory*' \ @@ -1014,7 +1038,9 @@ remove_tests() { ')' \ -print -delete || : } +# }}} +# {{{ remove_bundled_libraries # Remove most bundled libraries. Some are still needed. # Sync this with gentoo/chromium-*.ebuild # NOTE: argument list to script specifies paths to preserve @@ -1028,6 +1054,8 @@ remove_bundled_libraries() { third_party/adobe/flash/flapper_version.h \ third_party/jinja2 \ third_party/markupsafe/ \ + third_party/ply \ + third_party/fips181 \ 'base/third_party/dmg_fp' \ 'base/third_party/dynamic_annotations' \ 'base/third_party/icu' \ @@ -1044,44 +1072,54 @@ remove_bundled_libraries() { 'net/third_party/mozilla_security_manager' \ 'net/third_party/nss' \ 'third_party/WebKit' \ + 'third_party/analytics' \ 'third_party/angle' \ + 'third_party/angle/src/third_party/compiler' \ 'third_party/brotli' \ 'third_party/cacheinvalidation' \ - 'third_party/cld' \ + 'third_party/cld_2' \ 'third_party/cros_system_api' \ + 'third_party/cython/python_flags.py' \ 'third_party/dom_distiller_js' \ + 'third_party/dom_distiller_js/package/proto_gen/third_party/dom_distiller_js' \ 'third_party/ffmpeg' \ + 'third_party/fips181' \ 'third_party/flot' \ + 'third_party/google_input_tools' \ + 'third_party/google_input_tools/third_party/closure_library' \ + 'third_party/google_input_tools/third_party/closure_library/third_party/closure' \ 'third_party/hunspell' \ 'third_party/iccjpeg' \ - 'third_party/icu/icu.isolate' \ - 'third_party/jinja2' \ 'third_party/jstemplate' \ 'third_party/khronos' \ 'third_party/leveldatabase' \ - 'third_party/libXNVCtrl' \ 'third_party/libaddressinput' \ 'third_party/libjingle' \ 'third_party/libphonenumber' \ 'third_party/libsrtp' \ + 'third_party/libudev' \ 'third_party/libusb' \ 'third_party/libvpx' \ - 'third_party/libwebm' \ + 'third_party/libvpx/source/libvpx/third_party/x86inc' \ 'third_party/libxml/chromium' \ + 'third_party/libXNVCtrl' \ 'third_party/libyuv' \ 'third_party/lss' \ 'third_party/lzma_sdk' \ - 'third_party/markupsafe' \ 'third_party/mesa' \ 'third_party/modp_b64' \ + 'third_party/mojo' \ 'third_party/mt19937ar' \ 'third_party/npapi' \ + 'third_party/openmax_dl' \ 'third_party/opus' \ 'third_party/ots' \ - 'third_party/ply' \ + 'third_party/pdfium' \ + 'third_party/pdfium/third_party/base' \ + 'third_party/pdfium/third_party/bigint' \ + 'third_party/pdfium/third_party/freetype' \ 'third_party/polymer' \ 'third_party/protobuf' \ - 'third_party/pywebsocket' \ 'third_party/qcms' \ 'third_party/readability' \ 'third_party/sfntly' \ @@ -1089,21 +1127,29 @@ remove_bundled_libraries() { 'third_party/smhasher' \ 'third_party/sqlite' \ 'third_party/tcmalloc' \ - 'third_party/tlslite' \ 'third_party/trace-viewer' \ + 'third_party/trace-viewer/third_party/components/polymer' \ + 'third_party/trace-viewer/third_party/d3' \ + 'third_party/trace-viewer/third_party/gl-matrix' \ + 'third_party/trace-viewer/third_party/jszip' \ + 'third_party/trace-viewer/third_party/tvcm' \ + 'third_party/trace-viewer/third_party/tvcm/third_party/beautifulsoup/polymer_soup.py' \ 'third_party/undoview' \ 'third_party/usrsctp' \ + 'third_party/web-animations-js' \ 'third_party/webdriver' \ 'third_party/webrtc' \ 'third_party/widevine' \ 'third_party/x86inc' \ 'third_party/zlib/google' \ - 'third_party/zlib' \ 'url/third_party/mozilla' \ + 'v8/src/third_party/fdlibm' \ + 'v8/src/third_party/kernel' \ 'v8/src/third_party/valgrind' \ --do-print \ --do-remove } +# }}} remove_bundled_libraries > REMOVED-bundled_libraries.txt @@ -1170,3 +1216,5 @@ fi for a in REMOVED-*.txt; do cat $a done + +# vim:fdm=marker