| 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 source pkg_info | |
| 7 source ../../build_tools/common.sh | |
| 8 | 6 |
| 9 BUILD_ARGS="\ | 7 BUILD_ARGS="\ |
| 10 --build-dir=${NACL_BUILD_SUBDIR} \ | 8 --build-dir=${NACL_BUILD_SUBDIR} \ |
| 11 --stagedir=${NACL_BUILD_SUBDIR} \ | 9 --stagedir=${NACL_BUILD_SUBDIR} \ |
| 12 link=static" | 10 link=static" |
| 13 | 11 |
| 14 # TODO(eugenis): build dynamic libraries, too | 12 # TODO(eugenis): build dynamic libraries, too |
| 15 if [ $NACL_GLIBC = "1" ] ; then | 13 if [ $NACL_GLIBC = "1" ] ; then |
| 16 BUILD_ARGS+=" --without-python --without-signals --without-mpi" | 14 BUILD_ARGS+=" --without-python --without-signals --without-mpi" |
| 17 BUILD_ARGS+=" --without-context --without-coroutine" | 15 BUILD_ARGS+=" --without-context --without-coroutine" |
| 18 else | 16 else |
| 19 BUILD_ARGS+=" --with-date_time --with-program_options" | 17 BUILD_ARGS+=" --with-date_time --with-program_options" |
| 20 fi | 18 fi |
| 21 | 19 |
| 22 ConfigureStep() { | 20 ConfigureStep() { |
| 23 ChangeDir ${NACL_PACKAGES_REPOSITORY}/${PACKAGE_NAME} | 21 ChangeDir ${NACL_PACKAGES_REPOSITORY}/${PACKAGE_NAME} |
| 24 echo "using gcc : 4.4.3 : ${NACLCXX} ;" > tools/build/v2/user-config.jam | 22 echo "using gcc : 4.4.3 : ${NACLCXX} ;" > tools/build/v2/user-config.jam |
| 25 LogExecute ./bootstrap.sh --prefix="${NACLPORTS_PREFIX}" | 23 LogExecute ./bootstrap.sh --prefix="${NACLPORTS_PREFIX}" |
| 26 } | 24 } |
| 27 | 25 |
| 28 BuildStep() { | 26 BuildStep() { |
| 29 Banner "Building ${PACKAGE_NAME}" | 27 Banner "Building ${PACKAGE_NAME}" |
| 30 LogExecute ./b2 stage ${BUILD_ARGS} | 28 LogExecute ./b2 stage ${BUILD_ARGS} |
| 31 } | 29 } |
| 32 | 30 |
| 33 InstallStep() { | 31 InstallStep() { |
| 34 Banner "Installing ${PACKAGE_NAME}" | 32 Banner "Installing ${PACKAGE_NAME}" |
| 35 LogExecute ./b2 install ${BUILD_ARGS} | 33 LogExecute ./b2 install ${BUILD_ARGS} |
| 36 } | 34 } |
| 37 | |
| 38 PackageInstall | |
| 39 exit 0 | |
| OLD | NEW |