OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 # Copyright (c) 2011 The Native Client Authors. All rights reserved. | 2 # Copyright (c) 2011 The Native Client Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 # | 5 # |
6 | 6 |
7 # nacl-gc6.8.sh | 7 # nacl-gc6.8.sh |
8 # | 8 # |
9 # usage: nacl-gc6.8.sh | 9 # usage: nacl-gc6.8.sh |
10 # | 10 # |
11 # this script downloads, patches, and builds libgc for Native Client | 11 # this script downloads, patches, and builds libgc for Native Client |
12 # | 12 # |
13 | 13 |
14 readonly URL=http://commondatastorage.googleapis.com/nativeclient-mirror/nacl/gc
6.8.tar.gz | 14 readonly URL=http://commondatastorage.googleapis.com/nativeclient-mirror/nacl/gc
6.8.tar.gz |
15 #readonly URL=http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/gc6.8.tar.g
z | 15 #readonly URL=http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/gc6.8.tar.g
z |
16 readonly PATCH_FILE=nacl-gc6.8.patch | 16 readonly PATCH_FILE=nacl-gc6.8.patch |
17 readonly PACKAGE_NAME=gc6.8 | 17 readonly PACKAGE_NAME=gc6.8 |
18 | 18 |
19 source ../../build_tools/common.sh | 19 source ../../build_tools/common.sh |
20 | 20 |
21 CustomConfigureStep() { | 21 CustomConfigureStep() { |
22 Banner "Configuring ${PACKAGE_NAME}" | 22 Banner "Configuring ${PACKAGE_NAME}" |
23 # export the nacl tools | 23 # export the nacl tools |
24 export CC=${NACLCC} | 24 export CC=${NACLCC} |
25 export CXX=${NACLCXX} | 25 export CXX=${NACLCXX} |
26 export AR=${NACLAR} | 26 export AR=${NACLAR} |
27 export RANLIB=${NACLRANLIB} | 27 export RANLIB=${NACLRANLIB} |
28 export PKG_CONFIG_PATH=${NACL_SDK_USR_LIB}/pkgconfig | 28 export PKG_CONFIG_PATH=${NACLPORTS_LIBDIR}/pkgconfig |
29 export PKG_CONFIG_LIBDIR=${NACL_SDK_USR_LIB} | 29 export PKG_CONFIG_LIBDIR=${NACLPORTS_LIBDIR} |
30 export PATH=${NACL_BIN_PATH}:${PATH}; | 30 export PATH=${NACL_BIN_PATH}:${PATH}; |
31 ChangeDir ${NACL_PACKAGES_REPOSITORY}/${PACKAGE_NAME} | 31 ChangeDir ${NACL_PACKAGES_REPOSITORY}/${PACKAGE_NAME} |
32 Remove ${PACKAGE_NAME}-build | 32 Remove ${PACKAGE_NAME}-build |
33 MakeDir ${PACKAGE_NAME}-build | 33 MakeDir ${PACKAGE_NAME}-build |
34 cd ${PACKAGE_NAME}-build | 34 cd ${PACKAGE_NAME}-build |
35 ../configure \ | 35 ../configure \ |
36 --host=nacl \ | 36 --host=nacl \ |
37 --disable-shared \ | 37 --disable-shared \ |
38 --prefix=${NACL_SDK_USR} \ | 38 --prefix=${NACLPORTS_PREFIX} \ |
39 --exec-prefix=${NACL_SDK_USR} \ | 39 --exec-prefix=${NACLPORTS_PREFIX} \ |
40 --libdir=${NACL_SDK_USR_LIB} \ | 40 --libdir=${NACLPORTS_LIBDIR} \ |
41 --oldincludedir=${NACL_SDK_USR_INCLUDE} \ | 41 --oldincludedir=${NACLPORTS_INCLUDE} \ |
42 --with-http=off \ | 42 --with-http=off \ |
43 --with-html=off \ | 43 --with-html=off \ |
44 --with-ftp=off \ | 44 --with-ftp=off \ |
45 --enable-threads=pthreads \ | 45 --enable-threads=pthreads \ |
46 --${NACL_OPTION}-mmx \ | 46 --${NACL_OPTION}-mmx \ |
47 --${NACL_OPTION}-sse \ | 47 --${NACL_OPTION}-sse \ |
48 --${NACL_OPTION}-sse2 \ | 48 --${NACL_OPTION}-sse2 \ |
49 --${NACL_OPTION}-asm \ | 49 --${NACL_OPTION}-asm \ |
50 --with-x=no | 50 --with-x=no |
51 } | 51 } |
52 | 52 |
53 CustomPackageInstall() { | 53 CustomPackageInstall() { |
54 DefaultPreInstallStep | 54 DefaultPreInstallStep |
55 DefaultDownloadStep | 55 DefaultDownloadStep |
56 DefaultExtractStep | 56 DefaultExtractStep |
57 DefaultPatchStep | 57 DefaultPatchStep |
58 CustomConfigureStep | 58 CustomConfigureStep |
59 DefaultBuildStep | 59 DefaultBuildStep |
60 DefaultInstallStep | 60 DefaultInstallStep |
61 DefaultCleanUpStep | 61 DefaultCleanUpStep |
62 } | 62 } |
63 | 63 |
64 CustomPackageInstall | 64 CustomPackageInstall |
65 | 65 |
66 exit 0 | 66 exit 0 |
67 | 67 |
OLD | NEW |