Files
moonlight-packaging/scripts/build-deps.sh
2026-04-19 21:39:16 +07:00

41 lines
1.5 KiB
Bash
Executable File

set -e
# Build and install our SDL2 build
cd /opt/SDL2
#export CFLAGS="-I/usr/include/freetype2 -O2 -g"
#export LDFLAGS="-L/usr/local/lib"
# Получаем все нужные пути через pkg-config автоматически
# Это добавит и FreeType, и HarfBuzz, и SDL2
export CFLAGS="$(pkg-config --cflags freetype2 harfbuzz sdl2) -O2 -g"
export LDFLAGS="$(pkg-config --libs freetype2 harfbuzz sdl2)"
export CXXFLAGS="-O2 -g"
./configure --enable-static --enable-shared --enable-video-kmsdrm --disable-video-rpi --disable-freetype-builtin --disable-harfbuzz-builtin
make -j8
cat sdl2.pc
make install
export CPPFLAGS="$(pkg-config --cflags freetype2 harfbuzz)"
export LDFLAGS="$(pkg-config --libs-only-L freetype2 harfbuzz)"
export LIBS="$(pkg-config --libs-only-l freetype2 harfbuzz)"
# Build and install SDL_ttf
# Since we'll be linking statically, we need to use Libs.private instead of Libs, but
# there's no way to tell QMake to use the Libs.private section, so we have to replace
# Libs with Libs.private ourselves prior to installation.
cd /opt/SDL_ttf
./autogen.sh
./configure --enable-static --disable-shared --disable-freetype-builtin --disable-harfbuzz-builtin
make -j8
sed -i 's/-lSDL2_ttf/-lSDL2_ttf -lfreetype/g' SDL2_ttf.pc
cat SDL2_ttf.pc
make install
# Build and install libdav1d
cd /opt/dav1d
meson setup build -Ddefault_library=static -Dbuildtype=debugoptimized -Denable_tools=false -Denable_tests=false
ninja -C build
ninja install -C build