From 5cddb1987c1d3af8cb9b281ce53559b0ba8ea494 Mon Sep 17 00:00:00 2001 From: Levon Date: Wed, 10 Apr 2024 19:23:03 -0500 Subject: [PATCH] success build --- .gitignore | 2 +- scripts/build.sh | 20 ++++++++++++++------ scripts/install_deps.sh | 2 +- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index cb94f99..5c75519 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,6 @@ graphs rkmpp rkrga x264 -x265 +x265* vpx diff --git a/scripts/build.sh b/scripts/build.sh index 63b967a..49e4992 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -23,7 +23,7 @@ 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" git clone --depth 1 https://code.videolan.org/videolan/x264.git "$X264_DIR" -git clone --depth 1 https://github.com/videolan/x265.git "$X265_DIR" +git clone --depth 1 https://bitbucket.org/multicoreware/x265_git.git "$X265_DIR" git clone --depth 1 https://chromium.googlesource.com/webm/libvpx.git "$VPX_DIR" export ARCH=$(uname -m) @@ -183,16 +183,25 @@ sudo make install || exit # build x265 cd "$X265_DIR" || exit -git stash && git stash drop -git pull +test -d ".git" && git stash && git stash drop +test -d ".git" && git pull +# x265 is dumb and only generates pkgconfig +# if git is not there ("release") +mv .git .no_git rm -rf build.user mkdir build.user cd build.user || exit cmake ../source -DCMAKE_BUILD_TYPE=Release -DNATIVE_BUILD=ON \ + -G "Unix Makefiles" -DHIGH_BIT_DEPTH=ON \ + -DENABLE_HDR10_PLUS=ON \ + -DEXPORT_C_API=ON -DENABLE_SHARED=ON \ -DCMAKE_C_FLAGS="-flto -O${OPT_LVL} $COMP_FLAGS" \ -DCMAKE_CXX_FLAGS="-flto -O${OPT_LVL} $COMP_FLAGS" || exit make -j "$(nproc)" || exit sudo make install || exit +cd "$X265_DIR" || exit +# revert git +mv .no_git .git # build vpx cd "$VPX_DIR" || exit @@ -210,15 +219,14 @@ sudo make install || exit # ldconfig for shared libs sudo mkdir /etc/ld.so.conf.d/ -echo "/usr/local/lib" | sudo tee /etc/ld.so.conf.d/ffmpeg.conf || exit 1 +echo -e "/usr/local/lib\n/usr/local/lib/x86_64-linux-gnu" | sudo tee /etc/ld.so.conf.d/ffmpeg.conf || exit 1 sudo ldconfig # build ffmpeg cd "$FFMPEG_DIR/" || exit git stash && git stash drop git pull -export PKG_CONFIG_PATH+=":/usr/local/lib/pkgconfig" -make clean +export PKG_CONFIG_PATH+=":$(pkg-config --variable pc_path pkg-config)" ./configure --enable-libsvtav1 --enable-librav1e \ --enable-libaom --enable-libvmaf \ --enable-libdav1d --enable-libopus \ diff --git a/scripts/install_deps.sh b/scripts/install_deps.sh index fa9268d..63fe334 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" + gobjc++ python3-pip mawk libnuma-dev" PACMAN_DEP_NAMES="base-devel ninja python-pip"