Chromium Code Reviews| Index: ports/tor/build.sh |
| diff --git a/ports/tor/build.sh b/ports/tor/build.sh |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..9a17ddc3a74337e7f7316c7c25d828a8cc4e7d33 |
| --- /dev/null |
| +++ b/ports/tor/build.sh |
| @@ -0,0 +1,49 @@ |
| +# Copyright 2015 The Native Client Authors. All rights reserved. |
| +# Use of this source code is governed by a BSD-style license that can be |
| +# found in the LICENSE file. |
| + |
| +NACLPORTS_CPPFLAGS+=" -Dmain=nacl_main" |
| +export LIBS="${NACL_CLI_MAIN_LIB} \ |
| +-lppapi_simple -lnacl_io -lppapi -l${NACL_CXX_LIB}" |
|
binji
2015/08/24 22:28:01
nit: indent continued line by 4 spaces
here and e
deepankar-tyagi
2015/08/25 18:14:44
Done.
|
| + |
| +EXTRA_CONFIGURE_ARGS=" --disable-tool-name-check --disable-system-torrc \ |
| +--disable-gcc-hardening --disable-unittests" |
| + |
| +ConfigureStep() { |
| + |
|
binji
2015/08/24 22:28:01
nit: remove extra line
deepankar-tyagi
2015/08/25 18:14:44
Done.
|
| + # TODO(dt) fix the problem in (explicit) static linking of openssl |
| + # and libevent when TOOLCHAIN=glibc |
| + if [ "${NACL_LIBC}" = "newlib" ]; then |
| + EXTRA_CONFIGURE_ARGS+=" --enable-static-tor \ |
| + --enable-static-libevent --with-libevent-dir=${NACL_PREFIX} \ |
| + --enable-static-openssl --with-openssl-dir=${NACL_PREFIX} \ |
| + --enable-static-zlib --with-zlib-dir=${NACL_PREFIX}" |
| + NACLPORTS_CPPFLAGS+=" -I${NACLPORTS_INCLUDE}/glibc-compat" |
| + export LIBS+=" -lglibc-compat" |
| + fi |
| + |
| + # building with NDEBUG not allowed |
| + NACLPORTS_CFLAGS="${NACLPORTS_CFLAGS/-DNDEBUG/}" |
| + DefaultConfigureStep |
| +} |
| + |
| +PublishStep() { |
| + MakeDir ${PUBLISH_DIR} |
| + local platform_dir="${PUBLISH_DIR}/_platform_specific/${NACL_ARCH}" |
| + MakeDir ${platform_dir} |
| + local exe=${PUBLISH_DIR}/_platform_specific/${NACL_ARCH}/tor${NACL_EXEEXT} |
| + LogExecute cp ${BUILD_DIR}/src/or/tor${NACL_EXEEXT} ${exe} |
| +# LogExecute "${NACLSTRIP}" "${exe}" |
|
binji
2015/08/24 22:28:01
remove
deepankar-tyagi
2015/08/25 18:14:44
Done.
|
| + cd ${PUBLISH_DIR} |
| + LogExecute python ${NACL_SDK_ROOT}/tools/create_nmf.py \ |
| + _platform_specific/*/tor${NACL_EXEEXT} \ |
| + -s . \ |
| + -o tor.nmf |
| +# LogExecute python ${TOOLS_DIR}/create_term.py tor.nmf |
|
binji
2015/08/24 22:28:01
remove
deepankar-tyagi
2015/08/25 18:14:44
Done.
|
| + InstallNaClTerm ${PUBLISH_DIR} |
| + GenerateManifest ${START_DIR}/manifest.json ${PUBLISH_DIR} |
| + LogExecute cp ${START_DIR}/background.js ${PUBLISH_DIR} |
| + LogExecute cp ${START_DIR}/tor.js ${PUBLISH_DIR} |
| + LogExecute cp ${START_DIR}/index.html ${PUBLISH_DIR} |
| + LogExecute cp ${START_DIR}/torrc ${PUBLISH_DIR} |
| +} |