Add preliminary libvpl support

This commit is contained in:
BtbN 2022-08-12 14:29:44 +02:00
parent 11741adccb
commit 3ccb2f20b4
3 changed files with 45 additions and 1 deletions

1
addins/onevpl.sh Normal file
View file

@ -0,0 +1 @@
#!/bin/bash

View file

@ -38,7 +38,7 @@ ffbuild_dockerbuild() {
}
ffbuild_configure() {
echo --enable-libmfx
[[ $ADDINS_STR == *onevpl* ]] || echo --enable-libmfx
}
ffbuild_unconfigure() {

43
scripts.d/50-onevpl.sh Executable file
View file

@ -0,0 +1,43 @@
#!/bin/bash
SCRIPT_REPO="https://github.com/oneapi-src/oneVPL.git"
SCRIPT_COMMIT="2232af4cdb13c0018d965c3b040466ad89b1922b"
ffbuild_enabled() {
[[ $TARGET == *arm64 ]] && return -1
[[ $ADDINS_STR == *4.4* ]] && return -1
[[ $ADDINS_STR == *5.0* ]] && return -1
[[ $ADDINS_STR == *5.1* ]] && return -1
return 0
}
ffbuild_dockerbuild() {
git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" onevpl
cd onevpl
mkdir build && cd build
cmake -GNinja -DCMAKE_TOOLCHAIN_FILE="$FFBUILD_CMAKE_TOOLCHAIN" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$FFBUILD_PREFIX" \
-DBUILD_DISPATCHER=ON -DBUILD_DEV=ON \
-DBUILD_PREVIEW=OFF -DBUILD_TOOLS=OFF -DBUILD_TOOLS_ONEVPL_EXPERIMENTAL=OFF -DINSTALL_EXAMPLE_CODE=OFF \
-DBUILD_SHARED_LIBS=OFF -DBUILD_TESTS=OFF ..
ninja -j$(nproc)
ninja install
rm -rf "$FFBUILD_PREFIX"/{etc,share}
cat /opt/ffbuild/lib/pkgconfig/vpl.pc
}
ffbuild_configure() {
[[ $ADDINS_STR == *onevpl* ]] && echo --enable-libvpl
}
ffbuild_unconfigure() {
[[ $ADDINS_STR == *4.4* ]] && return 0
[[ $ADDINS_STR == *5.0* ]] && return 0
[[ $ADDINS_STR == *5.1* ]] && return 0
echo --disable-libvpl
}