Skip to content

Commit 031510b

Browse files
committed
CI Linux: build fluidsynth alongside with SDL
In U22.04 (current Linux CI image), fluidsynth depends on sdl2, which is undesirable. Actually we need to avoid sdl2 linking altogether. Build from sources alongside with SDL. This makes sense since SDL_mixer used to be build there and fluidsynth is replacing it. + prevent libsdl2-2.0-0 from (accidentally) installing
1 parent 6e8a62b commit 031510b

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

.github/scripts/Linux/download_build_sdl.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,9 @@ cmake --build build -j "$(nproc)"
1717
sudo cmake --install build
1818
cd ..
1919

20+
git clone --recurse-submodules --depth 1\
21+
https://github.com/Fluidsynth/fluidsynth
22+
cmake -S fluidsynth -B fluidsynth/build
23+
cmake --build fluidsynth/build -j "$(nproc)"
24+
sudo cmake --install fluidsynth/build
25+
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/sh -eu
22

3-
cd /var/tmp/sdl/SDL
4-
sudo cmake --install build
5-
cd ../SDL_ttf
6-
sudo cmake --install build
3+
cd /var/tmp/sdl
4+
sudo cmake --install SDL/build
5+
sudo cmake --install SDL_ttf/build
6+
sudo cmake --install fluidsynth/build
77

.github/scripts/Linux/prepare.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ else # one-line-style (old) format
1515
sed -n '/^deb /s/^deb /deb-src /p' /etc/apt/sources.list |
1616
sudo tee /etc/apt/sources.list.d/sources.list
1717
fi
18+
sudo apt-mark hold libsdl2-2.0-0
1819
sudo apt update
1920
sudo apt install appstream `# appstreamcli for mkappimage AppStream validation` \
2021
asciidoc
2122
sudo apt install fonts-dejavu-core
2223
sudo apt --no-install-recommends install nvidia-cuda-toolkit
23-
sudo apt install libfluidsynth-dev
2424
sudo apt install libglew-dev libglfw3-dev
2525
sudo apt install libglm-dev
2626
sudo apt install imagemagick libmagickwand-dev
@@ -36,9 +36,10 @@ get_build_deps_excl() { # $2 - pattern to exclude; separate packates with '\|' (
3636
}
3737

3838
sudo apt build-dep libsdl2
39+
fluidsynth_build_dep=$(get_build_deps_excl libfluidsynth3 libsdl2-dev)
3940
sdl2_ttf_build_dep=$(get_build_deps_excl libsdl2-ttf libsdl2-dev)
4041
# shellcheck disable=SC2086 # intentional
41-
sudo apt install $sdl2_ttf_build_dep
42+
sudo apt install $fluidsynth_build_dep $sdl2_ttf_build_dep
4243

4344
ffmpeg_build_dep=$(get_build_deps_excl ffmpeg 'libsdl')
4445
# shellcheck disable=SC2086 # intentional

0 commit comments

Comments
 (0)