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-ffmpeg-0.5.sh | 6 # nacl-ffmpeg-0.5.sh |
7 # | 7 # |
8 # usage: nacl-ffmpeg-0.5.sh | 8 # usage: nacl-ffmpeg-0.5.sh |
9 # | 9 # |
10 # this script downloads, patches, and builds ffmpeg for Native Client | 10 # this script downloads, patches, and builds ffmpeg for Native Client |
11 # | 11 # |
12 | 12 |
13 readonly URL=http://commondatastorage.googleapis.com/nativeclient-mirror/nacl/ff
mpeg-0.5.tar.bz2 | 13 readonly URL=http://commondatastorage.googleapis.com/nativeclient-mirror/nacl/ff
mpeg-0.5.tar.bz2 |
14 #readonly URL=http://ffmpeg.org/releases/ffmpeg-0.5.tar.bz2 | 14 #readonly URL=http://ffmpeg.org/releases/ffmpeg-0.5.tar.bz2 |
15 readonly PATCH_FILE=nacl-ffmpeg-0.5.patch | 15 readonly PATCH_FILE=nacl-ffmpeg-0.5.patch |
16 readonly PACKAGE_NAME=ffmpeg-0.5 | 16 readonly PACKAGE_NAME=ffmpeg-0.5 |
17 | 17 |
18 source ../../build_tools/common.sh | 18 source ../../build_tools/common.sh |
19 | 19 |
20 | 20 |
21 CustomConfigureStep() { | 21 CustomConfigureStep() { |
22 export PKG_CONFIG_PATH=${NACL_SDK_USR_LIB}/pkgconfig | 22 export PKG_CONFIG_PATH=${NACL_SDK_USR_LIB}/pkgconfig |
23 export PKG_CONFIG_LIBDIR=${NACL_SDK_USR_LIB} | 23 export PKG_CONFIG_LIBDIR=${NACL_SDK_USR_LIB} |
24 export PATH=${NACL_BIN_PATH}:${PATH}; | 24 export PATH=${NACL_BIN_PATH}:${PATH}; |
25 MakeDir ${NACL_PACKAGES_REPOSITORY}/${PACKAGE_NAME}/${PACKAGE_NAME}-build | 25 MakeDir ${NACL_PACKAGES_REPOSITORY}/${PACKAGE_NAME}/${PACKAGE_NAME}-build |
26 ChangeDir ${NACL_PACKAGES_REPOSITORY}/${PACKAGE_NAME}/${PACKAGE_NAME}-build | 26 ChangeDir ${NACL_PACKAGES_REPOSITORY}/${PACKAGE_NAME}/${PACKAGE_NAME}-build |
27 local extra_args="" | 27 local extra_args="" |
28 if [ "${NACL_PACKAGES_BITSIZE}" == pnacl ]; then | 28 if [ "${NACL_ARCH}" = pnacl ]; then |
29 extra_args="--cc=pnacl-clang --arch=pnacl" | 29 extra_args="--cc=pnacl-clang --arch=pnacl" |
30 fi | 30 fi |
31 ../configure \ | 31 ../configure \ |
32 --cross-prefix=${NACL_CROSS_PREFIX}- \ | 32 --cross-prefix=${NACL_CROSS_PREFIX}- \ |
33 ${extra_args} \ | 33 ${extra_args} \ |
34 --target-os=linux \ | 34 --target-os=linux \ |
35 --enable-gpl \ | 35 --enable-gpl \ |
36 --enable-static \ | 36 --enable-static \ |
37 --enable-cross-compile \ | 37 --enable-cross-compile \ |
38 --disable-shared \ | 38 --disable-shared \ |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 DefaultPatchStep | 76 DefaultPatchStep |
77 CustomConfigureStep | 77 CustomConfigureStep |
78 CustomPostConfigureStep | 78 CustomPostConfigureStep |
79 CustomBuildAndInstallStep | 79 CustomBuildAndInstallStep |
80 DefaultCleanUpStep | 80 DefaultCleanUpStep |
81 } | 81 } |
82 | 82 |
83 | 83 |
84 CustomPackageInstall | 84 CustomPackageInstall |
85 exit 0 | 85 exit 0 |
OLD | NEW |