init-android-libsoxr.sh 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. #! /usr/bin/env bash
  2. #
  3. # Copyright (C) 2013-2015 Bilibili
  4. # Copyright (C) 2013-2015 Zhang Rui <bbcallen@gmail.com>
  5. #
  6. # Licensed under the Apache License, Version 2.0 (the "License");
  7. # you may not use this file except in compliance with the License.
  8. # You may obtain a copy of the License at
  9. #
  10. # http://www.apache.org/licenses/LICENSE-2.0
  11. #
  12. # Unless required by applicable law or agreed to in writing, software
  13. # distributed under the License is distributed on an "AS IS" BASIS,
  14. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. # See the License for the specific language governing permissions and
  16. # limitations under the License.
  17. #
  18. IJK_LIBSOXR_UPSTREAM=http://git.code.sf.net/p/soxr/code
  19. IJK_LIBSOXR_FORK=http://git.code.sf.net/p/soxr/code
  20. IJK_LIBSOXR_COMMIT=0.1.2
  21. IJK_LIBSOXR_COMMIT_64=master
  22. IJK_LIBSOXR_LOCAL_REPO=extra/soxr
  23. set -e
  24. TOOLS=tools
  25. echo "== pull soxr base =="
  26. sh $TOOLS/pull-repo-base.sh $IJK_LIBSOXR_UPSTREAM $IJK_LIBSOXR_LOCAL_REPO
  27. function pull_fork()
  28. {
  29. echo "== pull soxr fork $1 =="
  30. sh $TOOLS/pull-repo-ref.sh $IJK_LIBSOXR_FORK android/contrib/libsoxr-$1 ${IJK_LIBSOXR_LOCAL_REPO}
  31. cp extra/android-cmake/android.toolchain.cmake android/contrib/libsoxr-$1
  32. cd android/contrib/libsoxr-$1
  33. case "$1" in
  34. arm64|x86_64)
  35. git checkout ${IJK_LIBSOXR_COMMIT_64} -B ijkplayer
  36. ;;
  37. *)
  38. git checkout ${IJK_LIBSOXR_COMMIT} -B ijkplayer
  39. ;;
  40. esac
  41. cd -
  42. }
  43. function pull_android_toolchain_cmake()
  44. {
  45. ANDROID_TOOLCHAIN_CMAKE_UPSTREAM=https://github.com/taka-no-me/android-cmake.git
  46. echo "== pull android toolchain cmake from $ANDROID_TOOLCHAIN_CMAKE_UPSTREAM =="
  47. sh $TOOLS/pull-repo-base.sh $ANDROID_TOOLCHAIN_CMAKE_UPSTREAM extra/android-cmake
  48. }
  49. pull_android_toolchain_cmake
  50. pull_fork "armv5"
  51. pull_fork "armv7a"
  52. pull_fork "arm64"
  53. pull_fork "x86"
  54. pull_fork "x86_64"