50-libmp3lame.sh 982 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #!/bin/bash
  2. SCRIPT_REPO="https://svn.code.sf.net/p/lame/svn/trunk/lame"
  3. SCRIPT_REV="6531"
  4. ffbuild_enabled() {
  5. return 0
  6. }
  7. ffbuild_dockerdl() {
  8. echo "retry-tool sh -c \"rm -rf lame && svn checkout '${SCRIPT_REPO}@${SCRIPT_REV}' lame\" && cd lame"
  9. }
  10. ffbuild_dockerbuild() {
  11. autoreconf -i
  12. local myconf=(
  13. --prefix="$FFBUILD_PREFIX"
  14. --disable-shared
  15. --enable-static
  16. --enable-nasm
  17. --disable-gtktest
  18. --disable-cpml
  19. --disable-frontend
  20. --disable-decoder
  21. )
  22. if [[ $TARGET == win* || $TARGET == linux* ]]; then
  23. myconf+=(
  24. --host="$FFBUILD_TOOLCHAIN"
  25. )
  26. else
  27. echo "Unknown target"
  28. return -1
  29. fi
  30. export CFLAGS="$CFLAGS -DNDEBUG -Wno-error=incompatible-pointer-types"
  31. ./configure "${myconf[@]}"
  32. make -j$(nproc)
  33. make install
  34. }
  35. ffbuild_configure() {
  36. echo --enable-libmp3lame
  37. }
  38. ffbuild_unconfigure() {
  39. echo --disable-libmp3lame
  40. }