mirror of
https://github.com/jellyfin/jellyfin-ffmpeg.git
synced 2026-09-02 21:03:08 +03:00
73 lines
1.6 KiB
Bash
Executable File
73 lines
1.6 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
SCRIPT_REPO="https://code.videolan.org/videolan/libplacebo.git"
|
|
SCRIPT_COMMIT="cee9b076f2c63104ccfd497fa79c39a867293ec4"
|
|
|
|
ffbuild_enabled() {
|
|
[[ $TARGET == mac* ]] && return -1
|
|
return 0
|
|
}
|
|
|
|
ffbuild_dockerstage() {
|
|
to_df "RUN --mount=src=${SELF},dst=/stage.sh --mount=src=patches/libplacebo,dst=/patches run_stage /stage.sh"
|
|
}
|
|
|
|
ffbuild_dockerbuild() {
|
|
git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" placebo
|
|
cd placebo
|
|
git submodule update --init --recursive
|
|
|
|
for patch in /patches/*.patch; do
|
|
echo "Applying $patch"
|
|
patch -p1 < "$patch"
|
|
done
|
|
|
|
sed -i 's/DPL_EXPORT/DPL_STATIC/' src/meson.build
|
|
|
|
mkdir build && cd build
|
|
|
|
local myconf=(
|
|
--prefix="$FFBUILD_PREFIX"
|
|
--buildtype=release
|
|
--default-library=static
|
|
-Dvulkan=enabled
|
|
-Dvk-proc-addr=enabled
|
|
-Dvulkan-registry="$FFBUILD_PREFIX"/share/vulkan/registry/vk.xml
|
|
-Dshaderc=enabled
|
|
-Dglslang=disabled
|
|
-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() {
|
|
echo --disable-libplacebo
|
|
}
|