]> git.pld-linux.org Git - packages/chromium-browser.git/blame - clean-source.sh
- release 2
[packages/chromium-browser.git] / clean-source.sh
CommitLineData
fe547a32 1#!/bin/sh
598df428
ER
2set -e
3set -x
fe547a32
ER
4
5# import options
6eval "$@"
7
8# drop bundled libs, from gentoo
598df428 9gyp_clean() {
fe547a32 10 set +x
598df428
ER
11 local l lib=$1
12 echo "Removing bundled library $lib ..."
13 l=$(find "$lib" -mindepth 1 ! -iname '*.gyp*' -print -delete | wc -l)
14 if [ $l -eq 0 ]; then
fe547a32
ER
15 echo >&2 "No files matched when removing bundled library $1"
16 exit 1
17 fi
18}
19
f888c710
ER
20# https://code.google.com/p/chromium/wiki/LinuxPackaging
21# list from src/tools/export_tarball/export_tarball.py
22remove_nonessential_dirs() {
23 local dir
24 for dir in \
25 chrome/common/extensions/docs \
26 chrome/test/data \
27 chrome/tools/test/reference_build \
28 courgette/testdata \
29 data \
30 native_client/src/trusted/service_runtime/testdata \
31 src/chrome/test/data \
32 o3d/documentation \
33 o3d/samples \
34 o3d/tests \
35 third_party/angle/samples/gles2_book \
36 third_party/hunspell_dictionaries \
37 third_party/hunspell/tests \
38 third_party/lighttpd \
39 third_party/sqlite/test \
40 third_party/vc_80 \
41 third_party/xdg-utils/tests \
42 third_party/yasm/source/patched-yasm/modules/arch/x86/tests \
43 third_party/yasm/source/patched-yasm/modules/dbgfmts/dwarf2/tests \
44 third_party/yasm/source/patched-yasm/modules/objfmts/bin/tests \
45 third_party/yasm/source/patched-yasm/modules/objfmts/coff/tests \
46 third_party/yasm/source/patched-yasm/modules/objfmts/elf/tests \
47 third_party/yasm/source/patched-yasm/modules/objfmts/macho/tests \
48 third_party/yasm/source/patched-yasm/modules/objfmts/rdf/tests \
49 third_party/yasm/source/patched-yasm/modules/objfmts/win32/tests \
50 third_party/yasm/source/patched-yasm/modules/objfmts/win64/tests \
51 third_party/yasm/source/patched-yasm/modules/objfmts/xdf/tests \
52 third_party/WebKit/Source/JavaScriptCore/tests \
53 third_party/WebKit/LayoutTests \
54 v8/test \
55 webkit/data/layout_tests \
56 webkit/tools/test/reference_build \
57 ; do
58 rm -vfr "$dir"
59 done
60}
61
62remove_nonessential_dirs | tee REMOVED-nonessential_dirs.txt
63
fe547a32 64rm -v third_party/expat/files/lib/expat.h
598df428
ER
65
66gyp_clean third_party/bzip2
67gyp_clean third_party/icu
68gyp_clean third_party/libevent
69gyp_clean third_party/libjpeg
70gyp_clean third_party/libpng
fe547a32 71# third_party/libvpx/libvpx.h should be kept
598df428
ER
72#gyp_clean third_party/libvpx
73gyp_clean third_party/libxml
74gyp_clean third_party/libxslt
75gyp_clean third_party/zlib
fe547a32 76# third_party/yasm/source/patched-yasm/modules/arch/x86/gen_x86_insn.py', needed by `out/Release/obj/gen/third_party/yasm/x86insns.c'. Stop.
598df428 77#gyp_clean third_party/yasm
fe547a32
ER
78
79if [ $v8 = 1 ]; then
80 # Remove bundled v8.
598df428 81 gyp_clean v8
fe547a32
ER
82
83 # The implementation files include v8 headers with full path,
84 # like #include "v8/include/v8.h". Make sure the system headers
85 # will be used.
598df428 86 rm -rf v8/include
fe547a32
ER
87 ln -s /usr/include v8/include
88fi
89
90if [ "$nacl" = 1 ]; then
91 # NOTE: here is always x86_64
92 rm -rf native_client/toolchain/linux_x86_newlib
93 ln -s /usr/x86_64-nacl-newlib native_client/toolchain/linux_x86_newlib
94fi
This page took 0.04415 seconds and 4 git commands to generate.