50-libaribb24.sh 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #!/bin/bash
  2. SCRIPT_REPO="https://github.com/nkoriyama/aribb24.git"
  3. SCRIPT_COMMIT="5e9be272f96e00f15a2f3c5f8ba7e124862aec38"
  4. ffbuild_enabled() {
  5. return 0
  6. }
  7. ffbuild_dockerstage() {
  8. to_df "RUN --mount=src=${SELF},dst=/stage.sh --mount=src=${SELFCACHE},dst=/cache.tar.xz --mount=src=patches/aribb24,dst=/patches run_stage /stage.sh"
  9. }
  10. ffbuild_dockerbuild() {
  11. for patch in /patches/*.patch; do
  12. echo "Applying $patch"
  13. git am < "$patch"
  14. done
  15. # Library switched to LGPL on master, but didn't bump version since.
  16. # FFmpeg checks for >1.0.3 to allow LGPL builds.
  17. sed -i 's/1.0.3/1.0.4/' configure.ac
  18. autoreconf -i
  19. local myconf=(
  20. --prefix="$FFBUILD_PREFIX"
  21. --disable-shared
  22. --enable-static
  23. --with-pic
  24. )
  25. if [[ $TARGET == win* || $TARGET == linux* ]]; then
  26. myconf+=(
  27. --host="$FFBUILD_TOOLCHAIN"
  28. )
  29. else
  30. echo "Unknown target"
  31. return -1
  32. fi
  33. ./configure "${myconf[@]}"
  34. make -j$(nproc)
  35. make install
  36. }
  37. ffbuild_configure() {
  38. echo --enable-libaribb24
  39. }
  40. ffbuild_unconfigure() {
  41. echo --disable-libaribb24
  42. }