]>
Commit | Line | Data |
---|---|---|
fe547a32 ER |
1 | #!/bin/sh |
2 | ||
3 | # import options | |
4 | eval "$@" | |
5 | ||
6 | # drop bundled libs, from gentoo | |
7 | remove_bundled_lib() { | |
8 | set +x | |
9 | echo "Removing bundled library $1 ..." | |
10 | local out | |
11 | out=$(find $1 -mindepth 1 ! -iname '*.gyp' -print -delete) | |
12 | if [ -z "$out" ]; then | |
13 | echo >&2 "No files matched when removing bundled library $1" | |
14 | exit 1 | |
15 | fi | |
16 | } | |
17 | ||
18 | rm -v third_party/expat/files/lib/expat.h | |
19 | remove_bundled_lib "third_party/bzip2" | |
20 | remove_bundled_lib "third_party/icu" | |
21 | remove_bundled_lib "third_party/libevent" | |
22 | remove_bundled_lib "third_party/libjpeg" | |
23 | remove_bundled_lib "third_party/libpng" | |
24 | # third_party/libvpx/libvpx.h should be kept | |
25 | #remove_bundled_lib "third_party/libvpx" | |
26 | remove_bundled_lib "third_party/libxml" | |
27 | remove_bundled_lib "third_party/libxslt" | |
28 | remove_bundled_lib "third_party/zlib" | |
29 | # 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. | |
30 | #remove_bundled_lib "third_party/yasm" | |
31 | ||
32 | if [ $v8 = 1 ]; then | |
33 | # Remove bundled v8. | |
34 | find v8 -type f \! -iname '*.gyp*' -delete | |
35 | ||
36 | # The implementation files include v8 headers with full path, | |
37 | # like #include "v8/include/v8.h". Make sure the system headers | |
38 | # will be used. | |
39 | rmdir v8/include | |
40 | ln -s /usr/include v8/include | |
41 | fi | |
42 | ||
43 | if [ "$nacl" = 1 ]; then | |
44 | # NOTE: here is always x86_64 | |
45 | rm -rf native_client/toolchain/linux_x86_newlib | |
46 | ln -s /usr/x86_64-nacl-newlib native_client/toolchain/linux_x86_newlib | |
47 | fi |