| 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-zlib-1.2.3.sh | 7 # nacl-zlib-1.2.3.sh |
| 8 # | 8 # |
| 9 # usage: nacl-zlib-1.2.3.sh | 9 # usage: nacl-zlib-1.2.3.sh |
| 10 # | 10 # |
| 11 # this script downloads, patches, and builds zlib for Native Client | 11 # this script downloads, patches, and builds zlib for Native Client |
| 12 # | 12 # |
| 13 | 13 |
| 14 readonly URL=http://commondatastorage.googleapis.com/nativeclient-mirror/nacl/zl
ib-1.2.3.tar.gz | 14 readonly URL=http://commondatastorage.googleapis.com/nativeclient-mirror/nacl/zl
ib-1.2.3.tar.gz |
| 15 #readonly URL=http://www.zlib.net/zlib-1.2.3.tar.gz | 15 #readonly URL=http://www.zlib.net/zlib-1.2.3.tar.gz |
| 16 readonly PATCH_FILE= | 16 readonly PATCH_FILE= |
| 17 readonly PACKAGE_NAME=zlib-1.2.3 | 17 readonly PACKAGE_NAME=zlib-1.2.3 |
| 18 | 18 |
| 19 source ../../build_tools/common.sh | 19 source ../../build_tools/common.sh |
| 20 | 20 |
| 21 | 21 |
| 22 CustomConfigureStep() { | 22 CustomConfigureStep() { |
| 23 Banner "Configuring ${PACKAGE_NAME}" | 23 Banner "Configuring ${PACKAGE_NAME}" |
| 24 ChangeDir ${NACL_PACKAGES_REPOSITORY}/${PACKAGE_NAME} | 24 ChangeDir ${NACL_PACKAGES_REPOSITORY}/${PACKAGE_NAME} |
| 25 # TODO: side-by-side install | 25 # TODO: side-by-side install |
| 26 CC=${NACLCC} AR="${NACLAR} -r" RANLIB=${NACLRANLIB} CFLAGS="-Dunlink=puts" ./c
onfigure\ | 26 CC=${NACLCC} AR="${NACLAR} -r" RANLIB=${NACLRANLIB} CFLAGS="-Dunlink=puts" ./c
onfigure\ |
| 27 --prefix=${NACL_SDK_USR} | 27 --prefix=${NACLPORTS_PREFIX} |
| 28 } | 28 } |
| 29 | 29 |
| 30 | 30 |
| 31 CustomPackageInstall() { | 31 CustomPackageInstall() { |
| 32 DefaultPreInstallStep | 32 DefaultPreInstallStep |
| 33 DefaultDownloadStep | 33 DefaultDownloadStep |
| 34 DefaultExtractStep | 34 DefaultExtractStep |
| 35 # zlib doesn't need patching, so no patch step | 35 # zlib doesn't need patching, so no patch step |
| 36 CustomConfigureStep | 36 CustomConfigureStep |
| 37 DefaultBuildStep | 37 DefaultBuildStep |
| 38 DefaultInstallStep | 38 DefaultInstallStep |
| 39 DefaultCleanUpStep | 39 DefaultCleanUpStep |
| 40 } | 40 } |
| 41 | 41 |
| 42 | 42 |
| 43 CustomPackageInstall | 43 CustomPackageInstall |
| 44 exit 0 | 44 exit 0 |
| OLD | NEW |