60-libplacebo.sh 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. #!/bin/bash
  2. SCRIPT_REPO="https://code.videolan.org/videolan/libplacebo.git"
  3. SCRIPT_COMMIT="118d8106640796d3f2ceb55f8634a32a58a47aa2"
  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_dockerdl() {
  12. default_dl .
  13. echo "git submodule update --init --recursive"
  14. }
  15. ffbuild_dockerbuild() {
  16. sed -i 's/DPL_EXPORT/DPL_STATIC/' src/meson.build
  17. mkdir build && cd build
  18. local myconf=(
  19. --prefix="$FFBUILD_PREFIX"
  20. --buildtype=release
  21. --default-library=static
  22. -Dvulkan=enabled
  23. -Dvk-proc-addr=disabled
  24. -Dvulkan-registry="$FFBUILD_PREFIX"/share/vulkan/registry/vk.xml
  25. -Dshaderc=enabled
  26. -Dglslang=disabled
  27. -Ddemos=false
  28. -Dtests=false
  29. -Dbench=false
  30. -Dfuzz=false
  31. )
  32. if [[ $TARGET == win* ]]; then
  33. myconf+=(
  34. -Dd3d11=enabled
  35. )
  36. fi
  37. if [[ $TARGET == win* || $TARGET == linux* ]]; then
  38. myconf+=(
  39. --cross-file=/cross.meson
  40. )
  41. else
  42. echo "Unknown target"
  43. return -1
  44. fi
  45. meson "${myconf[@]}" ..
  46. ninja -j$(nproc)
  47. ninja install
  48. echo "Libs.private: -lstdc++" >> "$FFBUILD_PREFIX"/lib/pkgconfig/libplacebo.pc
  49. }
  50. ffbuild_configure() {
  51. echo --enable-libplacebo
  52. }
  53. ffbuild_unconfigure() {
  54. [[ $ADDINS_STR == *4.4* ]] && return 0
  55. echo --disable-libplacebo
  56. }