dovi/hdr tool are not working right now

This commit is contained in:
2025-02-21 12:08:16 -06:00
parent 20179c8f53
commit 4ce5ccb4c4
2 changed files with 26 additions and 8 deletions

View File

@@ -143,6 +143,14 @@ set_commit_status() {
grep -q "$(good_commit_output)" "$GOOD_COMMIT_BUILDS" || good_commit_output >> "$GOOD_COMMIT_BUILDS"
}
check_edition2024() {
if grep -q "edition2024" Cargo.toml ; then
echo "edition2024 already enabled"
return 0
fi
echo -e 'cargo-features = ["edition2024"]\n\n'"$(cat Cargo.toml)" > Cargo.toml || return 1
return 0
}
GIT_DEPTH='5'
check_for_rebuild() {
@@ -290,6 +298,7 @@ build_dovi() {
git clone --depth "$GIT_DEPTH" https://github.com/quietvoid/dovi_tool "$DOVI_DIR"
cd "$DOVI_DIR" || return 1
check_for_rebuild && return 0
check_edition2024
source "$HOME/.cargo/env" # for good measure
cargo clean
RUSTFLAGS="-C target-cpu=native" ccache cargo build --release
@@ -297,6 +306,7 @@ build_dovi() {
# build libdovi
cd dolby_vision || return 1
check_edition2024
RUSTFLAGS="-C target-cpu=native" ccache cargo cbuild --release
sudo -E bash -lc "cargo cinstall --prefix=${PREFIX} --release" || return 1
set_commit_status
@@ -307,6 +317,7 @@ build_hdr10plus() {
git clone --depth "$GIT_DEPTH" https://github.com/quietvoid/hdr10plus_tool "$HDR10_DIR"
cd "$HDR10_DIR" || return 1
check_for_rebuild && return 0
check_edition2024
source "$HOME/.cargo/env" # for good measure
cargo clean
RUSTFLAGS="-C target-cpu=native" ccache cargo build --release
@@ -314,6 +325,7 @@ build_hdr10plus() {
# build libhdr10plus
cd hdr10plus || return 1
check_edition2024
RUSTFLAGS="-C target-cpu=native" ccache cargo cbuild --release
sudo -E bash -lc "cargo cinstall --prefix=${PREFIX} --release" || return 1
set_commit_status
@@ -350,8 +362,8 @@ build_svt_av1_psy() {
-DENABLE_AVX512=ON \
-DBUILD_TESTING=OFF \
-DCOVERAGE=OFF \
-DLIBDOVI_FOUND=1 \
-DLIBHDR10PLUS_RS_FOUND=1 \
-DLIBDOVI_FOUND=0 \
-DLIBHDR10PLUS_RS_FOUND=0 \
-DCMAKE_INSTALL_RPATH="${PREFIX}/lib" \
-DCMAKE_C_FLAGS="-O${OPT_LVL} ${COMP_FLAGS}" \
-DCMAKE_CXX_FLAGS="-O${OPT_LVL} ${COMP_FLAGS}" \

View File

@@ -15,14 +15,14 @@ PACMAN_DEP_NAMES="base-devel ninja python-pip"
BREW_DEP_NAMES="pkgconf mkvtoolnix"
install_deps() {
if command -v nala ; then
if command -v nala > /dev/null ; then
echo "Installing with nala"
sudo nala update
sudo nala install -y $COMMON_DEP_NAMES \
$COMMON_DEP_NAMES_LINUX \
$APT_DEP_NAMES && return 0
fi
if command -v apt ; then
if command -v apt > /dev/null ; then
echo "Installing with apt"
sudo apt-get update
sudo apt-get install -y $COMMON_DEP_NAMES \
@@ -30,14 +30,14 @@ install_deps() {
$APT_DEP_NAMES || exit 1
return 0
fi
if command -v pacman ; then
if command -v pacman > /dev/null ; then
echo "Installing with pacman"
sudo pacman -S $COMMON_DEP_NAMES \
sudo pacman --needed -S $COMMON_DEP_NAMES \
$COMMON_DEP_NAMES_LINUX \
$PACMAN_DEP_NAMES --noconfirm || exit 1
return 0
fi
if command -v brew ; then
if command -v brew > /dev/null ; then
echo "Installing with brew"
brew install $COMMON_DEP_NAMES \
$BREW_DEP_NAMES || exit 1
@@ -48,7 +48,13 @@ install_deps() {
install_deps
if ! command -v rustup > /dev/null ; then
echo "Installing rustup"
curl https://sh.rustup.rs -sSf | sh -s -- -y
fi
rustup default nightly
rustup update nightly
source "$HOME/.cargo/env"
cargo install cargo-c || exit 1