]>
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 | ||
20 | rm -v third_party/expat/files/lib/expat.h | |
598df428 ER |
21 | |
22 | gyp_clean third_party/bzip2 | |
23 | gyp_clean third_party/icu | |
24 | gyp_clean third_party/libevent | |
25 | gyp_clean third_party/libjpeg | |
26 | gyp_clean third_party/libpng | |
fe547a32 | 27 | # third_party/libvpx/libvpx.h should be kept |
598df428 ER |
28 | #gyp_clean third_party/libvpx |
29 | gyp_clean third_party/libxml | |
30 | gyp_clean third_party/libxslt | |
31 | gyp_clean third_party/zlib | |
fe547a32 | 32 | # 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 | 33 | #gyp_clean third_party/yasm |
fe547a32 ER |
34 | |
35 | if [ $v8 = 1 ]; then | |
36 | # Remove bundled v8. | |
598df428 | 37 | gyp_clean v8 |
fe547a32 ER |
38 | |
39 | # The implementation files include v8 headers with full path, | |
40 | # like #include "v8/include/v8.h". Make sure the system headers | |
41 | # will be used. | |
598df428 | 42 | rm -rf v8/include |
fe547a32 ER |
43 | ln -s /usr/include v8/include |
44 | fi | |
45 | ||
46 | if [ "$nacl" = 1 ]; then | |
47 | # NOTE: here is always x86_64 | |
48 | rm -rf native_client/toolchain/linux_x86_newlib | |
49 | ln -s /usr/x86_64-nacl-newlib native_client/toolchain/linux_x86_newlib | |
50 | fi |