diff --git a/.github/scripts/Linux/arm/bootstrap.sh b/.github/scripts/Linux/arm/bootstrap.sh index 3aa2003d4..c3bae1b08 100755 --- a/.github/scripts/Linux/arm/bootstrap.sh +++ b/.github/scripts/Linux/arm/bootstrap.sh @@ -6,6 +6,19 @@ ARCH=$1 OLDPWD=$(pwd) CMAKE_FORCE_VER= +raspbian_build_sdl2() { + ( + apt-get -y build-dep libsdl2-dev + apt -y install libgbm-dev + SDL_VER=2.0.10 # 2.0.14 doesn't compile with Rasbpian 10 + curl -k -LO https://www.libsdl.org/release/SDL2-$SDL_VER.tar.gz + tar xaf SDL2-$SDL_VER.tar.gz + cd SDL2-$SDL_VER + ./configure --enable-video-kmsdrm + make -j $(nproc) install + ) +} + if grep -q Raspbian /etc/os-release; then # https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1670905 workaround sed -i s-http://deb.debian.org/debian-http://mirrordirector.raspbian.org/raspbian/- /etc/apt/sources.list apt -y install curl @@ -16,13 +29,14 @@ if grep -q Raspbian /etc/os-release; then # https://bugs.launchpad.net/ubuntu/+s fi apt -y install build-essential git pkg-config autoconf automake libtool -apt -y install portaudio19-dev libsdl2-dev libglib2.0-dev libglew-dev libcurl4-openssl-dev freeglut3-dev libssl-dev libjack-dev libasound2-dev +apt -y install portaudio19-dev libglib2.0-dev libglew-dev libcurl4-openssl-dev freeglut3-dev libssl-dev libjack-dev libasound2-dev # FFmpeg if [ $ARCH = armhf ]; then # Raspbian - build own FFmpeg with OMX camera patch git clone --depth 1 https://github.com/raspberrypi/firmware.git firmware && mv firmware/* / && echo /opt/vc/lib > /etc/ld.so.conf.d/00-vmcs.conf && ldconfig sed -i '/^deb /p;s/deb /deb-src /' /etc/apt/sources.list apt -y update && apt -y build-dep ffmpeg + raspbian_build_sdl2 apt -y remove libavcodec58 && apt -y autoremove git clone --depth 1 https://github.com/FFmpeg/FFmpeg.git && cd FFmpeg git fetch --depth 2 https://github.com/Serveurperso/FFmpeg.git && git cherry-pick FETCH_HEAD @@ -30,7 +44,7 @@ if [ $ARCH = armhf ]; then # Raspbian - build own FFmpeg with OMX camera patch make -j 3 install cd $OLDPWD else - apt -y install libavcodec-dev libavformat-dev libswscale-dev + apt -y install libavcodec-dev libavformat-dev libsdl2-dev libswscale-dev fi # appimagetool