50-opencore-amr.sh 865 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #!/bin/bash
  2. SCRIPT_REPO="https://git.code.sf.net/p/opencore-amr/code"
  3. SCRIPT_COMMIT="7dba8c32238418ce0b316a852b2224df586ca896"
  4. ffbuild_enabled() {
  5. return 0
  6. }
  7. ffbuild_dockerbuild() {
  8. autoreconf -i
  9. local myconf=(
  10. --prefix="$FFBUILD_PREFIX"
  11. --disable-shared
  12. --enable-static
  13. --with-pic
  14. --enable-amrnb-encoder
  15. --enable-amrnb-decoder
  16. --disable-examples
  17. )
  18. if [[ $TARGET == win* || $TARGET == linux* ]]; then
  19. myconf+=(
  20. --host="$FFBUILD_TOOLCHAIN"
  21. )
  22. else
  23. echo "Unknown target"
  24. return -1
  25. fi
  26. ./configure "${myconf[@]}"
  27. make -j$(nproc)
  28. make install
  29. }
  30. ffbuild_configure() {
  31. echo --enable-libopencore-amrnb --enable-libopencore-amrwb
  32. }
  33. ffbuild_unconfigure() {
  34. echo --disable-libopencore-amrnb --disable-libopencore-amrwb
  35. }