50-libaribcaption.sh 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #!/bin/bash
  2. SCRIPT_REPO="https://github.com/xqq/libaribcaption.git"
  3. SCRIPT_COMMIT="41a014d245adf66f425a8317a031477dd1f80c67"
  4. ffbuild_enabled() {
  5. [[ $ADDINS_STR == *4.4* ]] && return -1
  6. [[ $ADDINS_STR == *5.0* ]] && return -1
  7. [[ $ADDINS_STR == *5.1* ]] && return -1
  8. [[ $ADDINS_STR == *6.0* ]] && return -1
  9. return 0
  10. }
  11. ffbuild_dockerbuild() {
  12. mkdir build
  13. cd build
  14. cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE="$FFBUILD_CMAKE_TOOLCHAIN" -DCMAKE_INSTALL_PREFIX="$FFBUILD_PREFIX" \
  15. -DARIBCC_SHARED_LIBRARY=OFF -DARIBCC_BUILD_TESTS=OFF -DBUILD_SHARED_LIBS=OFF \
  16. -DARIBCC_USE_FREETYPE=ON -DARIBCC_USE_EMBEDDED_FREETYPE=OFF \
  17. ..
  18. ninja -j$(nproc)
  19. ninja install
  20. echo "Libs.private: -lstdc++" >> "$FFBUILD_PREFIX"/lib/pkgconfig/libaribcaption.pc
  21. }
  22. ffbuild_configure() {
  23. echo --enable-libaribcaption
  24. }
  25. ffbuild_unconfigure() {
  26. [[ $ADDINS_STR == *4.4* ]] && return 0
  27. [[ $ADDINS_STR == *5.0* ]] && return 0
  28. [[ $ADDINS_STR == *5.1* ]] && return 0
  29. [[ $ADDINS_STR == *6.0* ]] && return 0
  30. echo --disable-libaribcaption
  31. }