FFmpeg-Builds/scripts.d/50-vulkan/60-libplacebo.sh

66 lines
1.5 KiB
Bash
Raw Normal View History

2021-11-12 19:46:07 +00:00
#!/bin/bash
2022-07-12 15:54:12 +00:00
SCRIPT_REPO="https://code.videolan.org/videolan/libplacebo.git"
2023-05-29 12:10:36 +00:00
SCRIPT_COMMIT="3e25675dc10d98ac67d1ca2af9f07b79c543dc77"
2021-11-12 19:46:07 +00:00
ffbuild_enabled() {
[[ $ADDINS_STR == *4.4* ]] && return -1
[[ $ADDINS_STR == *5.0* ]] && return -1
[[ $ADDINS_STR == *5.1* ]] && return -1
[[ $ADDINS_STR == *6.0* ]] && return -1
2021-11-12 19:46:07 +00:00
return 0
}
ffbuild_dockerbuild() {
2022-07-12 15:54:12 +00:00
git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" placebo
2021-11-12 19:46:07 +00:00
cd placebo
2022-08-04 18:25:22 +00:00
git submodule update --init --recursive
2021-11-12 19:46:07 +00:00
mkdir build && cd build
local myconf=(
--prefix="$FFBUILD_PREFIX"
--buildtype=release
--default-library=static
-Dvulkan=enabled
2022-10-05 23:11:36 +00:00
-Dvk-proc-addr=disabled
2021-11-12 19:46:07 +00:00
-Dvulkan-registry="$FFBUILD_PREFIX"/share/vulkan/registry/vk.xml
2021-12-05 19:30:30 +00:00
-Dshaderc=enabled
-Dglslang=disabled
2021-11-12 19:46:07 +00:00
-Ddemos=false
-Dtests=false
-Dbench=false
-Dfuzz=false
)
if [[ $TARGET == win* ]]; then
myconf+=(
-Dd3d11=enabled
)
fi
if [[ $TARGET == win* || $TARGET == linux* ]]; then
myconf+=(
--cross-file=/cross.meson
)
else
echo "Unknown target"
return -1
fi
meson "${myconf[@]}" ..
ninja -j$(nproc)
ninja install
echo "Libs.private: -lstdc++" >> "$FFBUILD_PREFIX"/lib/pkgconfig/libplacebo.pc
}
ffbuild_configure() {
echo --enable-libplacebo
}
ffbuild_unconfigure() {
[[ $ADDINS_STR == *4.4* ]] && return 0
echo --disable-libplacebo
}