diff --git a/scripts/build.sh b/scripts/build.sh index 46ff90c..15a0746 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -9,12 +9,6 @@ usage() { echo -e "\tO n: build at optimization n (1, 2, 3)" } -update_git() { - git config pull.rebase false - git stash && git stash drop - git pull -} - GREP_FILTER="av1" OPTS='hporO:' NUM_OPTS=$(echo -n $OPTS | wc -m) @@ -65,6 +59,17 @@ while getopts "$OPTS" flag; do esac done +update_git() { + # don't stash this actual repo + CURRENT_REPO="$(basename "$(git rev-parse --show-toplevel)")" + if [[ "$CURRENT_REPO" == "ffmpeg-av1-builder" ]]; then + exit 1 + fi + git config pull.rebase false + git stash && git stash drop + git pull +} + # set default optimization level if [[ -z $OPT_LVL ]]; then OPT_LVL=3 @@ -93,15 +98,6 @@ VPX_DIR="$BASE_DIR/vpx" # save options use echo "$@" > "$BASE_DIR/.last_opts" -# clone -git clone --depth 1 https://gitlab.com/AOMediaCodec/SVT-AV1.git "$SVT_DIR" -git clone --depth 1 https://github.com/xiph/rav1e "$RAV1E_DIR" -git clone --depth 1 https://aomedia.googlesource.com/aom "$AOM_DIR" -git clone --depth 1 https://github.com/Netflix/vmaf "$VMAF_DIR" -git clone --depth 1 https://code.videolan.org/videolan/dav1d.git "$DAV1D_DIR" -git clone --depth 1 https://github.com/xiph/opus.git "$OPUS_DIR" -git clone --depth 1 https://git.ffmpeg.org/ffmpeg.git "$FFMPEG_DIR" - export ARCH=$(uname -m) export COMP_FLAGS="" if [[ "$ARCH" == "x86_64" ]] @@ -116,6 +112,15 @@ echo "COMP_FLAGS: $COMP_FLAGS" # for ccache export PATH="/usr/lib/ccache/:$PATH" +# clone +git clone --depth 1 https://gitlab.com/AOMediaCodec/SVT-AV1.git "$SVT_DIR" +git clone --depth 1 https://github.com/xiph/rav1e "$RAV1E_DIR" +git clone --depth 1 https://aomedia.googlesource.com/aom "$AOM_DIR" +git clone --depth 1 https://github.com/Netflix/vmaf "$VMAF_DIR" +git clone --depth 1 https://code.videolan.org/videolan/dav1d.git "$DAV1D_DIR" +git clone --depth 1 https://github.com/xiph/opus.git "$OPUS_DIR" +git clone --depth 1 https://git.ffmpeg.org/ffmpeg.git "$FFMPEG_DIR" + # rockchip ffmpeg libs FFMPEG_ROCKCHIP="" # IS_ROCKCHIP=$(uname -r | grep "rockchip" > /dev/null && echo "yes" || echo "no") @@ -296,8 +301,9 @@ if [[ "$BUILD_OTHERS" == "true" ]]; then # build x265 cd "$X265_DIR" || exit + test -d ".no_git" && mv .no_git .git test -d ".git" && git stash && git stash drop - test -d ".git" && config pull.rebase false + test -d ".git" && git config pull.rebase false test -d ".git" && git pull # x265 is dumb and only generates pkgconfig # if git is not there ("release") diff --git a/scripts/install_deps.sh b/scripts/install_deps.sh index 0e87940..e064489 100755 --- a/scripts/install_deps.sh +++ b/scripts/install_deps.sh @@ -7,7 +7,7 @@ COMMON_DEP_NAMES="autoconf automake cmake libtool pkg-config bc texinfo \ APT_DEP_NAMES="build-essential git-core g++-12 libass-dev libfreetype6-dev \ libsdl2-dev libva-dev libvdpau-dev gcc-12 libvorbis-dev libxcb1-dev \ libxcb-shm0-dev libxcb-xfixes0-dev zlib1g-dev libssl-dev ninja-build \ - gobjc++ python3-pip mawk libnuma-dev mediainfo mkvtoolnix" + gobjc++ python3-pip mawk libnuma-dev mediainfo mkvtoolnix libgtest-dev" PACMAN_DEP_NAMES="base-devel ninja python-pip"