45-pulseaudio.sh 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. #!/bin/bash
  2. SCRIPT_REPO="https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git"
  3. SCRIPT_COMMIT="3e2bb8a1ece02ae4e2c217273c9c0929cb9f5cae"
  4. ffbuild_enabled() {
  5. [[ $TARGET == linux* ]] || return 1
  6. return 0
  7. }
  8. ffbuild_dockerdl() {
  9. echo "git clone --filter=blob:none \"$SCRIPT_REPO\" . && git checkout \"$SCRIPT_COMMIT\""
  10. }
  11. ffbuild_dockerbuild() {
  12. # Kill build of utils and their sndfile dep
  13. echo > src/utils/meson.build
  14. echo > src/pulsecore/sndfile-util.c
  15. echo > src/pulsecore/sndfile-util.h
  16. sed -ri -e 's/(sndfile_dep = .*)\)/\1, required : false)/' meson.build
  17. sed -ri -e 's/shared_library/library/g' src/meson.build src/pulse/meson.build
  18. mkdir build && cd build
  19. local myconf=(
  20. --prefix="$FFBUILD_PREFIX"
  21. --buildtype=release
  22. --default-library=static
  23. -Ddaemon=false
  24. -Dclient=true
  25. -Ddoxygen=false
  26. -Dgcov=false
  27. -Dman=false
  28. -Dtests=false
  29. -Dipv6=true
  30. -Dopenssl=enabled
  31. )
  32. if [[ $TARGET == linux* ]]; then
  33. myconf+=(
  34. --cross-file=/cross.meson
  35. )
  36. else
  37. echo "Unknown target"
  38. return -1
  39. fi
  40. meson "${myconf[@]}" ..
  41. ninja -j"$(nproc)"
  42. ninja install
  43. rm -r "$FFBUILD_PREFIX"/share
  44. echo "Libs.private: -ldl -lrt" >> "$FFBUILD_PREFIX"/lib/pkgconfig/libpulse.pc
  45. echo "Libs.private: -ldl -lrt" >> "$FFBUILD_PREFIX"/lib/pkgconfig/libpulse-simple.pc
  46. }
  47. ffbuild_configure() {
  48. echo --enable-libpulse
  49. }
  50. ffbuild_unconfigure() {
  51. echo --disable-libpulse
  52. }