Reduce duplicated code and build SDL_ttf

This commit is contained in:
Cameron Gutman
2020-02-11 21:01:38 -08:00
parent 0ccf234904
commit 8664097039
8 changed files with 38 additions and 21 deletions

View File

@@ -26,15 +26,26 @@ else
exit 1
fi
# Remove the existing SDL2 library (but not SDL_ttf)
find /usr/include/SDL2 -type f -not -name 'SDL_ttf.h' -delete
rm -fv /usr/lib/*-linux-*/libSDL2-*
rm -fv /usr/lib/*-linux-*/libSDL2.*
rm -fv /usr/lib/*-linux-*/pkgconfig/sdl2.pc
# Build and install our SDL2 build
# 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/SDL2
./configure --enable-static --disable-shared --enable-video-kmsdrm
make -j$(nproc)
sed -i '/^Libs:/d' sdl2.pc
sed -i 's/Libs.private:/Libs:/g' sdl2.pc
cat sdl2.pc
make install
# Build and install SDL_ttf
# For similar reasons to SDL2 above, we have to patch the pkgconfig file in order to
# link with a static library.
cd /opt/SDL_ttf
./configure --enable-static --disable-shared
make -j$(nproc)
sed -i 's/-lSDL2_ttf/-lSDL2_ttf -lfreetype/g' SDL2_ttf.pc
cat SDL2_ttf.pc
make install
cd /opt/FFmpeg

5
scripts/install-base-deps.sh Executable file
View File

@@ -0,0 +1,5 @@
set -e
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get install -y g++ make devscripts fakeroot debhelper git nasm libgbm-dev libdrm-dev libfreetype6-dev libasound2-dev libdbus-1-dev libegl1-mesa-dev libgl1-mesa-dev libgles2-mesa-dev libglu1-mesa-dev libibus-1.0-dev libpulse-dev libudev-dev libx11-dev libxcursor-dev libxext-dev libxi-dev libxinerama-dev libxkbcommon-dev libxrandr-dev libxss-dev libxt-dev libxv-dev libxxf86vm-dev
apt-get install -y --no-install-recommends libssl-dev qtbase5-dev qtquickcontrols2-5-dev qtdeclarative5-dev libqt5svg5-dev libopus-dev