]> git.pld-linux.org Git - packages/chromium-browser.git/blame - clean-source.sh
- move source cleanup to external script, so it can be reused when creating
[packages/chromium-browser.git] / clean-source.sh
CommitLineData
fe547a32
ER
1#!/bin/sh
2
3# import options
4eval "$@"
5
6# drop bundled libs, from gentoo
7remove_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
18rm -v third_party/expat/files/lib/expat.h
19remove_bundled_lib "third_party/bzip2"
20remove_bundled_lib "third_party/icu"
21remove_bundled_lib "third_party/libevent"
22remove_bundled_lib "third_party/libjpeg"
23remove_bundled_lib "third_party/libpng"
24# third_party/libvpx/libvpx.h should be kept
25#remove_bundled_lib "third_party/libvpx"
26remove_bundled_lib "third_party/libxml"
27remove_bundled_lib "third_party/libxslt"
28remove_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
32if [ $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
41fi
42
43if [ "$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
47fi
This page took 0.027939 seconds and 4 git commands to generate.