diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-08-13 21:50:07 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-08-13 21:50:07 +0300 |
commit | eefb212caca31d46f1d36ce272d4bc6842c039f0 (patch) | |
tree | a7736bff39c0920e0522ce00813602bde4710c22 /packaging/nacl/ports/zlib/build.sh | |
parent | 9406e61b5ee96e25b10fbf915725f69d6f6ceeb8 (diff) | |
download | manaplus-eefb212caca31d46f1d36ce272d4bc6842c039f0.tar.gz manaplus-eefb212caca31d46f1d36ce272d4bc6842c039f0.tar.bz2 manaplus-eefb212caca31d46f1d36ce272d4bc6842c039f0.tar.xz manaplus-eefb212caca31d46f1d36ce272d4bc6842c039f0.zip |
Add chrome ports patches for build manaplus on nacl.
Diffstat (limited to 'packaging/nacl/ports/zlib/build.sh')
-rw-r--r-- | packaging/nacl/ports/zlib/build.sh | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/packaging/nacl/ports/zlib/build.sh b/packaging/nacl/ports/zlib/build.sh new file mode 100644 index 000000000..96c860fd0 --- /dev/null +++ b/packaging/nacl/ports/zlib/build.sh @@ -0,0 +1,76 @@ +#!/bin/bash +# Copyright (c) 2011 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. + +# zlib doesn't support custom build directories so we have +# to build directly in the source dir. +BUILD_DIR=${SRC_DIR} +EXECUTABLES="minigzip${NACL_EXEEXT} example${NACL_EXEEXT}" +if [ "${NACL_SHARED}" = "1" ]; then + EXECUTABLES+=" libz.so.1" +fi + +ConfigureStep() { + LogExecute rm -f libz.* + SetupCrossEnvironment + CHOST=${NACL_CROSS_PREFIX} LogExecute ./configure --prefix=${PREFIX} +} + + +RunMinigzip() { +# export LD_LIBRARY_PATH=. +# if echo "hello world" | ./minigzip | ./minigzip -d; then +# echo ' *** minigzip test OK ***' +# else +# echo ' *** minigzip test FAILED ***' +# exit 1 +# fi +# unset LD_LIBRARY_PATH + return 0 +} + + +RunExample() { + export LD_LIBRARY_PATH=. + # This second test does not yet work on nacl (gzopen fails) + #if ./example; then \ + #echo ' *** zlib test OK ***'; \ + #else \ + #echo ' *** zlib test FAILED ***'; \ + #exit 1 + #fi + unset LD_LIBRARY_PATH +} + + +TestStep() { + if [ "${NACL_LIBC}" = "glibc" ]; then + # Tests do not currently run on GLIBC due to fdopen() not working + # TODO(sbc): Remove this once glibc is fixed: + # https://code.google.com/p/nativeclient/issues/detail?id=3362 + return + fi + + if [ "${NACL_ARCH}" = "pnacl" ]; then + local minigzip_pexe="minigzip${NACL_EXEEXT}" + local example_pexe="example${NACL_EXEEXT}" + local minigzip_script="minigzip" + local example_script="example" + TranslateAndWriteSelLdrScript ${minigzip_pexe} x86-32 \ + minigzip.x86-32.nexe ${minigzip_script} + RunMinigzip + TranslateAndWriteSelLdrScript ${minigzip_pexe} x86-64 \ + minigzip.x86-64.nexe ${minigzip_script} + RunMinigzip + TranslateAndWriteSelLdrScript ${example_pexe} x86-32 \ + example.x86-32.nexe ${example_script} + RunExample + TranslateAndWriteSelLdrScript ${example_pexe} x86-64 \ + example.x86-64.nexe ${example_script} + RunExample + else + RunMinigzip + RunExample + fi +} |