]> git.pld-linux.org Git - packages/chromium-browser.git/blobdiff - clean-source.sh
update files
[packages/chromium-browser.git] / clean-source.sh
index 917d500a7644219528d439a889f27d01a80a70a0..cb9f8613cc09f6adf64e43c81875e660b68c1823 100755 (executable)
@@ -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
@@ -48,7 +49,7 @@ remove_nonessential_dirs() {
        ash/shell/cocoa \
        ash/system/chromeos_ \
        base/android \
-       base/chromeos \
+       base/chromeos_ \
        base/ios \
        breakpad/src/client/mac \
        breakpad/src/common/android \
@@ -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 \
@@ -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 \
@@ -483,7 +486,7 @@ remove_nonessential_dirs() {
                '!' -path 'chrome/browser/chromeos/settings/device_settings_service.h' \
                '!' -path 'chrome/browser/chromeos/system_logs/*.h' \
                '!' -path 'chrome/tools/build/generate_policy_source.py' \
-               '!' -path 'chrome/tools/build/linux/sed.sh' \
+               '!' -path 'chrome/tools/build/linux/sed.py' \
                '!' -path 'chrome/tools/build/make_version_cc.py' \
                '!' -path 'chrome/tools/build/repack_locales.py' \
                '!' -path 'chrome/tools/build/version.py' \
@@ -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,8 +564,8 @@ 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() {
@@ -592,10 +596,11 @@ clean_third_party() {
                '!' -iname '*.isolate' \
                '!' -path 'third_party/WebKit/*' \
                '!' -path 'third_party/adobe/flash/*' \
+               '!' -path 'third_party/analytics/*' \
                '!' -path 'third_party/angle/enumerate_files.py' \
+               '!' -path 'third_party/angle/include/*.h' \
                '!' -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/*' \
@@ -611,9 +616,11 @@ clean_third_party() {
                '!' -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/*' \
+               '!' -path 'third_party/icu/*' \
                '!' -path 'third_party/icu/icu.isolate' \
                '!' -path 'third_party/jinja2/*' \
                '!' -path 'third_party/jstemplate/*' \
@@ -639,8 +646,10 @@ clean_third_party() {
                '!' -path 'third_party/mesa/src/include/GL/glxext.h' \
                '!' -path 'third_party/mesa/src/include/GL/osmesa.h' \
                '!' -path 'third_party/modp_b64/*' \
+               '!' -path 'third_party/mojo/*' \
                '!' -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/*' \
@@ -661,6 +670,7 @@ clean_third_party() {
                '!' -path 'third_party/trace-viewer/*' \
                '!' -path 'third_party/undoview/*' \
                '!' -path 'third_party/usrsctp/*' \
+               '!' -path 'third_party/web-animations-js/*' \
                '!' -path 'third_party/v8-i18n/*' \
                '!' -path 'third_party/v8/*' \
                '!' -path 'third_party/webrtc/*' \
@@ -673,11 +683,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() {
@@ -694,7 +706,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
@@ -715,7 +728,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*
@@ -729,7 +743,7 @@ remove_tests() {
        breakpad/src/client/windows/tests \
        breakpad/src/common/linux/tests \
        breakpad/src/common/tests \
-       cc/test \
+       cc/test_ \
        chrome/browser/chromeos/bluetooth/test \
        chrome/browser/component_updater/test \
        chrome/browser/extensions/api/test_ \
@@ -848,7 +862,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 \
@@ -1012,6 +1026,8 @@ remove_tests() {
                '!' -path './third_party/trace-viewer/third_party/tvcm/src/tvcm/unittest/test_case.js' \
                '!' -path './third_party/trace-viewer/third_party/tvcm/src/tvcm/unittest/test_error.js' \
                '!' -path './third_party/trace-viewer/third_party/tvcm/src/tvcm/unittest/test_runner.js' \
+               '!' -path './third_party/trace-viewer/third_party/tvcm/third_party/rcssmin/*' \
+               '!' -path './third_party/trace-viewer/third_party/tvcm/third_party/rjsmin/*' \
                '!' -path './third_party/trace-viewer/trace_viewer/tracing/test_utils.js' \
                '!' -path './mojo/embedder/test_embedder.*' \
                '!' -path './ui/base/hit_test.*' \
@@ -1028,7 +1044,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
@@ -1060,6 +1078,7 @@ 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' \
@@ -1068,39 +1087,46 @@ remove_bundled_libraries() {
                '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/dom_distiller_js/dist/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' \
                '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/libvpx/source/libvpx/third_party/x86inc' \
-               'third_party/libwebm' \
                'third_party/libxml/chromium' \
+               'third_party/libXNVCtrl' \
                'third_party/libyuv' \
                'third_party/lss' \
                'third_party/lzma_sdk' \
                '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/pdfium' \
-               'third_party/pdfium/third_party/logging.h' \
-               'third_party/pdfium/third_party/macros.h' \
-               'third_party/pdfium/third_party/numerics' \
-               'third_party/pdfium/third_party/template_util.h' \
+               '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/qcms' \
                'third_party/readability' \
                'third_party/sfntly' \
@@ -1108,28 +1134,40 @@ 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/d3' \
-               'third_party/trace-viewer/third_party/tvcm/third_party/gl-matrix' \
-               'third_party/trace-viewer/third_party/tvcm/third_party/polymer' \
+               'third_party/trace-viewer/third_party/tvcm/third_party/beautifulsoup/polymer_soup.py' \
+               'third_party/trace-viewer/third_party/tvcm/third_party/rcssmin' \
+               'third_party/trace-viewer/third_party/tvcm/third_party/rjsmin' \
                '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' \
-               'v8/third_party/fdlibm' \
                --do-print \
                --do-remove
 }
+# }}}
+
+# clean extra files that are cleaned in tarball provided by google
+clean_src_extra() {
+       rm -rfv \
+               .landmines \
+               chrome/browser/resources/pdf/html_office \
+               third_party/WebKit/ManualTests \
+               third_party/WebKit/PerformanceTests
+}
 
 remove_bundled_libraries > REMOVED-bundled_libraries.txt
 
@@ -1153,7 +1191,7 @@ strip_system_dirs \
        third_party/libxslt \
        third_party/mesa \
        third_party/opus_ \
-       third_party/protobuf_ \
+       third_party/protobuf \
        third_party/re2 \
        third_party/snappy \
        third_party/speex \
@@ -1174,6 +1212,8 @@ fi
 
 clean_third_party > REMOVED-third_party.txt
 
+clean_src_extra > REMOVED-extra.txt
+
 if [ "${v8:-1}" != "0" ]; then
        # The implementation files include v8 headers with full path,
        # like #include "v8/include/v8.h". Make sure the system headers
@@ -1196,3 +1236,5 @@ fi
 for a in REMOVED-*.txt; do
        cat $a
 done
+
+# vim:fdm=marker
This page took 0.0721810000000001 seconds and 4 git commands to generate.