| 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 # nacl-x264-snapshot-20091023-2245.sh | 6 # nacl-x264-snapshot-20091023-2245.sh |
| 7 # | 7 # |
| 8 # usage: nacl-x264-snapshot-20091023-2245.sh | 8 # usage: nacl-x264-snapshot-20091023-2245.sh |
| 9 # | 9 # |
| 10 # this script downloads, patches, and builds x264 for Native Client | 10 # this script downloads, patches, and builds x264 for Native Client |
| 11 # | 11 # |
| 12 | 12 |
| 13 source pkg_info | 13 source pkg_info |
| 14 source ../../build_tools/common.sh | 14 source ../../build_tools/common.sh |
| 15 | 15 |
| 16 | 16 |
| 17 CustomConfigureStep() { | 17 CustomConfigureStep() { |
| 18 Banner "Configuring ${PACKAGE_NAME}" | 18 Banner "Configuring ${PACKAGE_NAME}" |
| 19 # export the nacl tools | 19 # export the nacl tools |
| 20 export CC=${NACLCC} | 20 export CC=${NACLCC} |
| 21 export CXX=${NACLCXX} | 21 export CXX=${NACLCXX} |
| 22 export AR=${NACLAR} | 22 export AR=${NACLAR} |
| 23 export RANLIB=${NACLRANLIB} | 23 export RANLIB=${NACLRANLIB} |
| 24 export PKG_CONFIG_PATH=${NACL_SDK_USR_LIB}/pkgconfig | 24 export PKG_CONFIG_PATH=${NACLPORTS_LIBDIR}/pkgconfig |
| 25 export PKG_CONFIG_LIBDIR=${NACL_SDK_USR_LIB} | 25 export PKG_CONFIG_LIBDIR=${NACLPORTS_LIBDIR} |
| 26 export PATH=${NACL_BIN_PATH}:${PATH}; | 26 export PATH=${NACL_BIN_PATH}:${PATH}; |
| 27 ChangeDir ${NACL_PACKAGES_REPOSITORY}/${PACKAGE_NAME} | 27 ChangeDir ${NACL_PACKAGES_REPOSITORY}/${PACKAGE_NAME} |
| 28 | 28 |
| 29 local naclhost | 29 local naclhost |
| 30 if [ "${NACL_ARCH}" = pnacl ]; then | 30 if [ "${NACL_ARCH}" = pnacl ]; then |
| 31 naclhost=pnacl | 31 naclhost=pnacl |
| 32 else | 32 else |
| 33 naclhost=x86-nacl-linux | 33 naclhost=x86-nacl-linux |
| 34 fi | 34 fi |
| 35 | 35 |
| 36 echo " ./configure \ | 36 echo " ./configure \ |
| 37 --cross-prefix=${NACL_CROSS_PREFIX} \ | 37 --cross-prefix=${NACL_CROSS_PREFIX} \ |
| 38 --disable-asm \ | 38 --disable-asm \ |
| 39 --disable-pthread \ | 39 --disable-pthread \ |
| 40 --prefix=${NACL_SDK_USR} \ | 40 --prefix=${NACLPORTS_PREFIX} \ |
| 41 --exec-prefix=${NACL_SDK_USR} \ | 41 --exec-prefix=${NACLPORTS_PREFIX} \ |
| 42 --libdir=${NACL_SDK_USR_LIB} \ | 42 --libdir=${NACLPORTS_LIBDIR} \ |
| 43 --extra-ldflags='-lnosys -lm' \ | 43 --extra-ldflags='-lnosys -lm' \ |
| 44 --host=${naclhost}" | 44 --host=${naclhost}" |
| 45 | 45 |
| 46 ./configure \ | 46 ./configure \ |
| 47 --cross-prefix=${NACL_CROSS_PREFIX} \ | 47 --cross-prefix=${NACL_CROSS_PREFIX} \ |
| 48 --disable-asm \ | 48 --disable-asm \ |
| 49 --disable-pthread \ | 49 --disable-pthread \ |
| 50 --prefix=${NACL_SDK_USR} \ | 50 --prefix=${NACLPORTS_PREFIX} \ |
| 51 --exec-prefix=${NACL_SDK_USR} \ | 51 --exec-prefix=${NACLPORTS_PREFIX} \ |
| 52 --libdir=${NACL_SDK_USR_LIB} \ | 52 --libdir=${NACLPORTS_LIBDIR} \ |
| 53 --extra-ldflags="-lnosys -lm" \ | 53 --extra-ldflags="-lnosys -lm" \ |
| 54 --host=${naclhost} | 54 --host=${naclhost} |
| 55 } | 55 } |
| 56 | 56 |
| 57 | 57 |
| 58 CustomPackageInstall() { | 58 CustomPackageInstall() { |
| 59 DefaultPreInstallStep | 59 DefaultPreInstallStep |
| 60 DefaultDownloadBzipStep | 60 DefaultDownloadBzipStep |
| 61 DefaultExtractBzipStep | 61 DefaultExtractBzipStep |
| 62 DefaultPatchStep | 62 DefaultPatchStep |
| 63 CustomConfigureStep | 63 CustomConfigureStep |
| 64 DefaultBuildStep | 64 DefaultBuildStep |
| 65 DefaultInstallStep | 65 DefaultInstallStep |
| 66 DefaultCleanUpStep | 66 DefaultCleanUpStep |
| 67 } | 67 } |
| 68 | 68 |
| 69 | 69 |
| 70 CustomPackageInstall | 70 CustomPackageInstall |
| 71 exit 0 | 71 exit 0 |
| OLD | NEW |