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..9757d366fa705714826cc36e2f541fdede917585 |
| --- /dev/null |
| +++ b/ports/tor/build.sh |
| @@ -0,0 +1,48 @@ |
| +# 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}" |
|
Sam Clegg
2015/08/25 18:25:30
Just NACL_CLI_MAIN_LIB
|
| + |
| +EXTRA_CONFIGURE_ARGS=" --disable-tool-name-check --disable-system-torrc \ |
| + --disable-gcc-hardening --disable-unittests" |
| + |
| +ConfigureStep() { |
| + # 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} |
| + cd ${PUBLISH_DIR} |
| + LogExecute python ${NACL_SDK_ROOT}/tools/create_nmf.py \ |
| + _platform_specific/*/tor${NACL_EXEEXT} \ |
|
Sam Clegg
2015/08/25 18:25:30
Indent the continuation 4 spaces
|
| + -s . \ |
| + -o tor.nmf |
|
Sam Clegg
2015/08/25 18:25:30
Looks like these two lines will fit on the precedi
|
| + InstallNaClTerm ${PUBLISH_DIR} |
| + LogExecute cp ${START_DIR}/krotor_16.png ${PUBLISH_DIR} |
| + LogExecute cp ${START_DIR}/krotor_48.png ${PUBLISH_DIR} |
| + LogExecute cp ${START_DIR}/krotor_128.png ${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} |
| +} |