]>
Commit | Line | Data |
---|---|---|
fe547a32 | 1 | #!/bin/sh |
598df428 ER |
2 | set -e |
3 | set -x | |
fe547a32 ER |
4 | |
5 | # import options | |
6 | eval "$@" | |
7 | ||
8 | # drop bundled libs, from gentoo | |
598df428 | 9 | gyp_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 | |
22 | remove_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 | ||
62 | remove_nonessential_dirs | tee REMOVED-nonessential_dirs.txt | |
63 | ||
fe547a32 | 64 | rm -v third_party/expat/files/lib/expat.h |
598df428 ER |
65 | |
66 | gyp_clean third_party/bzip2 | |
67 | gyp_clean third_party/icu | |
68 | gyp_clean third_party/libevent | |
69 | gyp_clean third_party/libjpeg | |
70 | gyp_clean third_party/libpng | |
fe547a32 | 71 | # third_party/libvpx/libvpx.h should be kept |
598df428 ER |
72 | #gyp_clean third_party/libvpx |
73 | gyp_clean third_party/libxml | |
74 | gyp_clean third_party/libxslt | |
75 | gyp_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 | |
79 | if [ $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 |
88 | fi | |
89 | ||
90 | if [ "$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 | |
94 | fi |