From 32a143a8d6cef6963e809d0ecf9359dffcf230dd Mon Sep 17 00:00:00 2001 From: Levon Date: Fri, 23 Feb 2024 23:21:45 -0600 Subject: [PATCH] wip --- scripts/build.sh | 12 +++++++++--- scripts/install_deps.sh | 4 ++-- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/scripts/build.sh b/scripts/build.sh index 24aed5d..d870796 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -16,7 +16,7 @@ git clone https://git.ffmpeg.org/ffmpeg.git "$FFMPEG_DIR" --depth 1 git clone https://aomedia.googlesource.com/aom "$AOM_DIR" --depth 1 git clone https://github.com/Netflix/vmaf "$VMAF_DIR" --depth 1 git clone https://code.videolan.org/videolan/dav1d.git "$DAV1D_DIR" --depth 1 -git clone https://gitlab.xiph.org/xiph/opus.git "$OPUS_DIR" --depth 1 +git clone https://github.com/xiph/opus.git "$OPUS_DIR" --depth 1 export ARCH=$(arch) export COMP_FLAGS="" @@ -71,8 +71,12 @@ cd "$VMAF_DIR/libvmaf" || exit git pull python3 -m virtualenv .venv source .venv/bin/activate +rm -rf build +mkdir build +cd build || exit pip install meson -meson setup build --buildtype release -Denable_float=true || exit +meson setup ../ build --buildtype release -Denable_float=true -Db_lto=true \ + --optimization=3 -Dc_args="$COMP_FLAGS" -Dcpp_args="$COMP_FLAGS" || exit ninja -vC build || exit sudo ninja -vC build install || exit @@ -82,7 +86,8 @@ git pull rm -rf build mkdir build cd build || exit -meson setup ../ build --buildtype release || exit +meson setup ../ build --buildtype release -Db_lto=true \ + --optimization=3 -Dc_args="$COMP_FLAGS" -Dcpp_args="$COMP_FLAGS" || exit ninja -vC build || exit sudo ninja -vC build install || exit @@ -90,6 +95,7 @@ sudo ninja -vC build install || exit cd "$OPUS_DIR" || exit git pull ./autogen.sh || exit +export CFLAGS="-O3 -flto $COMP_FLAGS" ./configure || exit make -j "$(nproc)" || exit sudo make install || exit diff --git a/scripts/install_deps.sh b/scripts/install_deps.sh index 9bcbab4..1b4781e 100755 --- a/scripts/install_deps.sh +++ b/scripts/install_deps.sh @@ -7,8 +7,8 @@ sudo "$PKG_MNG" update sudo "$PKG_MNG" install autoconf automake build-essential cmake git-core \ libass-dev libfreetype6-dev libsdl2-dev libtool libva-dev libvdpau-dev \ libvorbis-dev libxcb1-dev libxcb-shm0-dev libxcb-xfixes0-dev pkg-config \ - texinfo wget zlib1g-dev nasm yasm libssl-dev time python3 meson ninja-build\ - doxygen xxd jq lshw gnuplot python3-pip curl clang valgrind ccache -y || exit 1 + texinfo wget zlib1g-dev nasm yasm libssl-dev time python3 meson ninja-build gobjc++ \ + doxygen xxd jq lshw gnuplot python3-pip curl clang valgrind ccache gawk mawk -y || exit 1 curl https://sh.rustup.rs -sSf | sh -s -- -y source "$HOME/.cargo/env"