Skip to content

Commit

Permalink
Perf improvements (#20)
Browse files Browse the repository at this point in the history
* Disabling tests to speed up build

* Disable tests on a few additional libs
  • Loading branch information
barndawgie authored Jul 12, 2024
1 parent daafbe0 commit ba7c979
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions Cross-Compile_FFMPEG.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ libvmaf_release="v3.0.0"
libfreetype2_git="https://gitlab.freedesktop.org/freetype/freetype.git"
libfreetype2_release="VER-2-13-2"
harfbuzz_git="https://github.com/harfbuzz/harfbuzz.git"
harfbuzz_release="8.5.0"
harfbuzz_release="9.0.0"
fribidi_git="https://github.com/fribidi/fribidi.git"
fribidi_release="v1.0.15"
fontconfig_git="https://gitlab.freedesktop.org/fontconfig/fontconfig.git"
Expand Down Expand Up @@ -165,23 +165,24 @@ pushd libs || exit
./autogen.sh
mkdir -p build
cd build || exit
../configure $configure_params
../configure $configure_params --disable-alsatest --disable-esdtest
make install
popd || exit

#openssl
do_git_checkout $openssl_git $openssl_release openssl
pushd openssl || exit
./config --prefix=$prefix --cross-compile-prefix=$host- no-shared no-dso zlib
CC=$host-gcc AR=$host-ar RANLIB=$host-ranlib RC=$host-windres ./Configure --prefix=$prefix -L$library_path -I$include_path no-shared no-dso zlib mingw64
CC=$host-gcc AR=$host-ar RANLIB=$host-ranlib RC=$host-windres ./Configure --prefix=$prefix -L$library_path -I$include_path \
no-shared no-dso zlib mingw64 no-tests
make -j $threads
make install_sw
popd || exit

#libpng: Required for FreeType2
do_git_checkout $libpng_git $libpng_release libpng
pushd libpng || exit
LDFLAGS="-L$library_path" CPPFLAGS="-I$include_path" ./configure $configure_params
LDFLAGS="-L$library_path" CPPFLAGS="-I$include_path" ./configure $configure_params --disable-tests --disable-tools
make -j $threads
make install
popd || exit
Expand Down Expand Up @@ -232,26 +233,22 @@ pushd subs || exit
do_git_checkout $libfreetype2_git $libfreetype2_release freetype2
pushd freetype2 || exit
./autogen.sh
./configure $configure_params --with-zlib=yes --with-png=yes --with-bzip2=yes --with-brotli=no --with-harfbuzz=no
./configure $configure_params \
--with-zlib=yes --with-png=yes --with-bzip2=yes --with-brotli=no --with-harfbuzz=no
make -j $threads
make install
popd || exit

#Harfbuzz: Needed for libass
do_git_checkout $harfbuzz_git $harfbuzz_release harfbuzz
pushd harfbuzz || exit
./autogen.sh $configure_params --with-icu=no --with-glib=no #Still seeing some weird build failures with glib
make -j $threads
make install
meson build $meson_params \
-Dglib=disabled -Dicu=disabled -Dgobject=disabled \
-Dtests=disabled -Ddocs=disabled -Dutilities=disabled
ninja -Cbuild
ninja -Cbuild install
popd || exit

# #Rebuild Freetype2 with HarfBuzz - This seems to work but then seems to break Fontconfig build?
# pushd freetype2
# ./configure $configure_params --with-zlib=yes --with-png=yes --with-bzip2=yes --with-brotli=yes --with-harfbuzz=yes
# make -j $threads
# make install
# popd || exit

#libfribidi: Required for Libass
do_git_checkout $fribidi_git $fribidi_release fribidi
pushd fribidi || exit
Expand Down Expand Up @@ -310,7 +307,8 @@ pushd audio || exit
do_git_checkout $opus_git $opus_release opus
pushd opus || exit
./autogen.sh $configure_params
./configure $configure_params
./configure $configure_params \
--disable-doc --disable-extra-programs
make -j $threads
make install
popd || exit
Expand Down Expand Up @@ -392,6 +390,7 @@ pushd video || exit
cmake -DCMAKE_TOOLCHAIN_FILE="../build/cmake/toolchains/x86_64-mingw-gcc.cmake" \
-DCMAKE_INSTALL_PREFIX=$prefix \
-DENABLE_TESTS=OFF -DENABLE_DOCS=OFF \
-DENABLE_EXAMPLES=OFF -DENABLE_TOOLS=OFF \
..
make -j $threads
make install
Expand All @@ -400,7 +399,8 @@ pushd video || exit
#dav1d: AV1 Decoder
do_git_checkout $dav1d_git $dav1d_version dav1d
pushd dav1d || exit
meson setup build $meson_params
meson setup build $meson_params \
-Denable_tools=false -Denable_tests=false
cd ./build || exit
ninja
ninja install
Expand Down

0 comments on commit ba7c979

Please sign in to comment.