| OLD | NEW |
| 1 #!/bin/bash | 1 #!/bin/bash |
| 2 # Copyright (c) 2012 The Native Client Authors. All rights reserved. | 2 # Copyright (c) 2012 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-openssl-1.0.0e.sh | 7 # nacl-openssl-1.0.0e.sh |
| 8 # | 8 # |
| 9 # usage: nacl-openssl-1.0.0e.sh | 9 # usage: nacl-openssl-1.0.0e.sh |
| 10 # | 10 # |
| 11 # this script downloads, patches, and builds openssl for Native Client | 11 # this script downloads, patches, and builds openssl for Native Client |
| 12 # | 12 # |
| 13 | 13 |
| 14 readonly URL=http://commondatastorage.googleapis.com/nativeclient-mirror/nacl/op
enssl-1.0.0e.tar.gz | 14 readonly URL=http://commondatastorage.googleapis.com/nativeclient-mirror/nacl/op
enssl-1.0.0e.tar.gz |
| 15 #readonly URL=http://www.openssl.org/source/openssl-1.0.0e.tar.gz | 15 #readonly URL=http://www.openssl.org/source/openssl-1.0.0e.tar.gz |
| 16 readonly PATCH_FILE=nacl-openssl-1.0.0e.patch | 16 readonly PATCH_FILE=nacl-openssl-1.0.0e.patch |
| 17 readonly PACKAGE_NAME=openssl-1.0.0e | 17 readonly PACKAGE_NAME=openssl-1.0.0e |
| 18 | 18 |
| 19 source ../../build_tools/common.sh | 19 source ../../build_tools/common.sh |
| 20 | 20 |
| 21 CustomConfigureStep() { | 21 CustomConfigureStep() { |
| 22 Banner "Configuring ${PACKAGE_NAME}" | 22 Banner "Configuring ${PACKAGE_NAME}" |
| 23 local extra_args="" | 23 local extra_args="" |
| 24 if [[ "${NACL_PACKAGES_BITSIZE}" = "pnacl" || | 24 if [[ "${NACL_ARCH}" = "pnacl" || |
| 25 » "${NACL_TOOLCHAIN_ROOT}" == *newlib* ]] ; then | 25 "${NACL_TOOLCHAIN_ROOT}" == *newlib* ]] ; then |
| 26 readonly GLIBC_COMPAT=${NACL_SDK_USR_INCLUDE}/glibc-compat | 26 readonly GLIBC_COMPAT=${NACL_SDK_USR_INCLUDE}/glibc-compat |
| 27 if [[ ! -f ${GLIBC_COMPAT}/netdb.h ]]; then | 27 if [[ ! -f ${GLIBC_COMPAT}/netdb.h ]]; then |
| 28 echo "Please install glibc-compat first" | 28 echo "Please install glibc-compat first" |
| 29 exit 1 | 29 exit 1 |
| 30 fi | 30 fi |
| 31 extra_args+=" no-dso -DOPENSSL_NO_SOCK=1 -I${GLIBC_COMPAT}" | 31 extra_args+=" no-dso -DOPENSSL_NO_SOCK=1 -I${GLIBC_COMPAT}" |
| 32 fi | 32 fi |
| 33 | 33 |
| 34 ChangeDir ${NACL_PACKAGES_REPOSITORY}/${PACKAGE_NAME} | 34 ChangeDir ${NACL_PACKAGES_REPOSITORY}/${PACKAGE_NAME} |
| 35 MACHINE=i686 CC=${NACLCC} AR=${NACLAR} RANLIB=${NACLRANLIB} ./config \ | 35 MACHINE=i686 CC=${NACLCC} AR=${NACLAR} RANLIB=${NACLRANLIB} ./config \ |
| (...skipping 11 matching lines...) Expand all Loading... |
| 47 make clean | 47 make clean |
| 48 make build_libs | 48 make build_libs |
| 49 } | 49 } |
| 50 | 50 |
| 51 CustomPackageInstall() { | 51 CustomPackageInstall() { |
| 52 DefaultPreInstallStep | 52 DefaultPreInstallStep |
| 53 DefaultDownloadStep | 53 DefaultDownloadStep |
| 54 DefaultExtractStep | 54 DefaultExtractStep |
| 55 DefaultPatchStep | 55 DefaultPatchStep |
| 56 CustomConfigureStep | 56 CustomConfigureStep |
| 57 if [[ "${NACL_PACKAGES_BITSIZE}" = "pnacl" || | 57 if [[ "${NACL_ARCH}" = "pnacl" || |
| 58 "${NACL_TOOLCHAIN_ROOT}" == *newlib* ]] ; then | 58 "${NACL_TOOLCHAIN_ROOT}" == *newlib* ]] ; then |
| 59 CustomHackStepForNewlib | 59 CustomHackStepForNewlib |
| 60 fi | 60 fi |
| 61 CustomBuildStep | 61 CustomBuildStep |
| 62 DefaultInstallStep | 62 DefaultInstallStep |
| 63 DefaultCleanUpStep | 63 DefaultCleanUpStep |
| 64 } | 64 } |
| 65 | 65 |
| 66 CustomPackageInstall | 66 CustomPackageInstall |
| 67 exit 0 | 67 exit 0 |
| OLD | NEW |