50-soxr.sh 878 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #!/bin/bash
  2. SCRIPT_REPO="https://git.code.sf.net/p/soxr/code"
  3. SCRIPT_COMMIT="945b592b70470e29f917f4de89b4281fbbd540c0"
  4. ffbuild_enabled() {
  5. return 0
  6. }
  7. ffbuild_dockerbuild() {
  8. mkdir build && cd build
  9. cmake -DCMAKE_TOOLCHAIN_FILE="$FFBUILD_CMAKE_TOOLCHAIN" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$FFBUILD_PREFIX" \
  10. -DWITH_OPENMP="$([[ $TARGET == winarm64 ]] && echo OFF || echo ON)" \
  11. -DBUILD_TESTS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_SHARED_LIBS=OFF \
  12. ..
  13. make -j$(nproc)
  14. make install
  15. if [[ $TARGET != winarm64 ]]; then
  16. echo "Libs.private: -lgomp" >> "$FFBUILD_PREFIX"/lib/pkgconfig/soxr.pc
  17. fi
  18. }
  19. ffbuild_configure() {
  20. echo --enable-libsoxr
  21. }
  22. ffbuild_unconfigure() {
  23. echo --disable-libsoxr
  24. }
  25. ffbuild_ldflags() {
  26. echo -pthread
  27. }
  28. ffbuild_libs() {
  29. [[ $TARGET != winarm64 ]] && echo -lgomp
  30. }