| 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 source pkg_info | 14 source pkg_info |
| 15 source ../../build_tools/common.sh | 15 source ../../build_tools/common.sh |
| 16 | 16 |
| 17 CustomConfigureStep() { | 17 CustomConfigureStep() { |
| 18 Banner "Configuring ${PACKAGE_NAME}" | 18 Banner "Configuring ${PACKAGE_NAME}" |
| 19 local extra_args="" | 19 local extra_args="" |
| 20 if [[ "${NACL_ARCH}" = "pnacl" || | 20 if [[ "${NACL_ARCH}" = "pnacl" || |
| 21 "${NACL_TOOLCHAIN_ROOT}" == *newlib* ]] ; then | 21 "${NACL_TOOLCHAIN_ROOT}" == *newlib* ]] ; then |
| 22 readonly GLIBC_COMPAT=${NACL_SDK_USR_INCLUDE}/glibc-compat | 22 readonly GLIBC_COMPAT=${NACLPORTS_INCLUDE}/glibc-compat |
| 23 if [[ ! -f ${GLIBC_COMPAT}/netdb.h ]]; then | 23 if [[ ! -f ${GLIBC_COMPAT}/netdb.h ]]; then |
| 24 echo "Please install glibc-compat first" | 24 echo "Please install glibc-compat first" |
| 25 exit 1 | 25 exit 1 |
| 26 fi | 26 fi |
| 27 extra_args+=" no-dso -DOPENSSL_NO_SOCK=1 -I${GLIBC_COMPAT}" | 27 extra_args+=" no-dso -DOPENSSL_NO_SOCK=1 -I${GLIBC_COMPAT}" |
| 28 fi | 28 fi |
| 29 | 29 |
| 30 ChangeDir ${NACL_PACKAGES_REPOSITORY}/${PACKAGE_NAME} | 30 ChangeDir ${NACL_PACKAGES_REPOSITORY}/${PACKAGE_NAME} |
| 31 MACHINE=i686 CC=${NACLCC} AR=${NACLAR} RANLIB=${NACLRANLIB} ./config \ | 31 MACHINE=i686 CC=${NACLCC} AR=${NACLAR} RANLIB=${NACLRANLIB} ./config \ |
| 32 --prefix=${NACL_SDK_USR} no-asm no-hw no-krb5 ${extra_args} -D_GNU_SOURCE | 32 --prefix=${NACLPORTS_PREFIX} no-asm no-hw no-krb5 ${extra_args} -D_GNU_SOUR
CE |
| 33 } | 33 } |
| 34 | 34 |
| 35 CustomHackStepForNewlib() { | 35 CustomHackStepForNewlib() { |
| 36 # These two makefiles build binaries which we do not care about, | 36 # These two makefiles build binaries which we do not care about, |
| 37 # and they depend on -ldl, so cannot be built with newlib. | 37 # and they depend on -ldl, so cannot be built with newlib. |
| 38 echo "all clean install: " > apps/Makefile | 38 echo "all clean install: " > apps/Makefile |
| 39 echo "all clean install: " > test/Makefile | 39 echo "all clean install: " > test/Makefile |
| 40 } | 40 } |
| 41 | 41 |
| 42 CustomBuildStep() { | 42 CustomBuildStep() { |
| (...skipping 11 matching lines...) Expand all Loading... |
| 54 "${NACL_TOOLCHAIN_ROOT}" == *newlib* ]] ; then | 54 "${NACL_TOOLCHAIN_ROOT}" == *newlib* ]] ; then |
| 55 CustomHackStepForNewlib | 55 CustomHackStepForNewlib |
| 56 fi | 56 fi |
| 57 CustomBuildStep | 57 CustomBuildStep |
| 58 DefaultInstallStep | 58 DefaultInstallStep |
| 59 DefaultCleanUpStep | 59 DefaultCleanUpStep |
| 60 } | 60 } |
| 61 | 61 |
| 62 CustomPackageInstall | 62 CustomPackageInstall |
| 63 exit 0 | 63 exit 0 |
| OLD | NEW |