| 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-openal-soft-1.13.sh | 7 # nacl-openal-soft-1.13.sh |
| 8 # | 8 # |
| 9 # usage: nacl-openal-soft-1.13.sh | 9 # usage: nacl-openal-soft-1.13.sh |
| 10 # | 10 # |
| 11 # this script downloads, patches, and builds OpenAL for Native Client | 11 # this script downloads, patches, and builds OpenAL for Native Client |
| 12 # | 12 # |
| 13 | 13 |
| 14 readonly URL=http://commondatastorage.googleapis.com/nativeclient-mirror/nacl/op
enal-soft-1.13.tar.bz2 | 14 readonly URL=http://commondatastorage.googleapis.com/nativeclient-mirror/nacl/op
enal-soft-1.13.tar.bz2 |
| 15 #readonly URL=http://kcat.strangesoft.net/openal-releases/openal-soft-1.13.tar.b
z2 | 15 #readonly URL=http://kcat.strangesoft.net/openal-releases/openal-soft-1.13.tar.b
z2 |
| 16 readonly PATCH_FILE=nacl-openal-soft-1.13.patch | 16 readonly PATCH_FILE=nacl-openal-soft-1.13.patch |
| 17 readonly PACKAGE_NAME=openal-soft-1.13 | 17 readonly PACKAGE_NAME=openal-soft-1.13 |
| 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 | 23 |
| 24 # Defaults to dynamic lib, but newlib can only link statically. | 24 # Defaults to dynamic lib, but newlib can only link statically. |
| 25 LIB_ARG= | 25 LIB_ARG= |
| 26 if [[ ${NACL_GLIBC} == 0 ]]; then | 26 if [[ ${NACL_GLIBC} = 0 ]]; then |
| 27 LIB_ARG="-DLIBTYPE=STATIC" | 27 LIB_ARG="-DLIBTYPE=STATIC" |
| 28 fi | 28 fi |
| 29 | 29 |
| 30 ChangeDir ${NACL_PACKAGES_REPOSITORY}/${PACKAGE_NAME}/build | 30 ChangeDir ${NACL_PACKAGES_REPOSITORY}/${PACKAGE_NAME}/build |
| 31 cmake .. -DCMAKE_TOOLCHAIN_FILE=../XCompile-nacl.txt \ | 31 cmake .. -DCMAKE_TOOLCHAIN_FILE=../XCompile-nacl.txt \ |
| 32 -DNACLCC=${NACLCC} \ | 32 -DNACLCC=${NACLCC} \ |
| 33 -DNACLCXX=${NACLCXX} \ | 33 -DNACLCXX=${NACLCXX} \ |
| 34 -DNACLAR=${NACLAR} \ | 34 -DNACLAR=${NACLAR} \ |
| 35 -DNACL_CROSS_PREFIX=${NACL_CROSS_PREFIX} \ | 35 -DNACL_CROSS_PREFIX=${NACL_CROSS_PREFIX} \ |
| 36 -DCMAKE_INSTALL_PREFIX=${NACL_SDK_USR} \ | 36 -DCMAKE_INSTALL_PREFIX=${NACL_SDK_USR} \ |
| 37 ${LIB_ARG} | 37 ${LIB_ARG} |
| 38 | 38 |
| 39 } | 39 } |
| 40 | 40 |
| 41 CustomPackageInstall() { | 41 CustomPackageInstall() { |
| 42 DefaultPreInstallStep | 42 DefaultPreInstallStep |
| 43 DefaultDownloadBzipStep | 43 DefaultDownloadBzipStep |
| 44 DefaultExtractBzipStep | 44 DefaultExtractBzipStep |
| 45 DefaultPatchStep | 45 DefaultPatchStep |
| 46 CustomConfigureStep | 46 CustomConfigureStep |
| 47 DefaultBuildStep | 47 DefaultBuildStep |
| 48 DefaultInstallStep | 48 DefaultInstallStep |
| 49 DefaultCleanUpStep | 49 DefaultCleanUpStep |
| 50 } | 50 } |
| 51 | 51 |
| 52 CustomPackageInstall | 52 CustomPackageInstall |
| 53 exit 0 | 53 exit 0 |
| 54 | 54 |
| OLD | NEW |