Skip to content

Commit dcda1df

Browse files
authored
Merge pull request RetroPie#3678 from cmitu/dolphin-build
dolphin: update build requirements
2 parents f687d45 + fc3dbc9 commit dcda1df

File tree

1 file changed

+22
-10
lines changed

1 file changed

+22
-10
lines changed

scriptmodules/emulators/dolphin.sh

+22-10
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,32 @@ rp_module_id="dolphin"
1313
rp_module_desc="Gamecube/Wii emulator Dolphin"
1414
rp_module_help="ROM Extensions: .gcm .iso .wbfs .ciso .gcz .rvz .wad .wbfs\n\nCopy your Gamecube roms to $romdir/gc and Wii roms to $romdir/wii"
1515
rp_module_licence="GPL2 https://raw.githubusercontent.com/dolphin-emu/dolphin/master/COPYING"
16-
rp_module_repo="git https://github.com/dolphin-emu/dolphin.git :_get_branch_dolphin"
16+
rp_module_repo="git https://github.com/dolphin-emu/dolphin.git master :_get_commit_dolphin"
1717
rp_module_section="exp"
1818
rp_module_flags="!all 64bit"
1919

20-
function _get_branch_dolphin() {
21-
local branch="master"
22-
# current HEAD of dolphin doesn't build on Ubuntu 16.04 (with gcc 5.4)
23-
[[ "$__gcc_version" -lt 6 ]] && branch="5.0"
24-
echo "$branch"
20+
function _get_commit_dolphin() {
21+
local commit
22+
# current HEAD of dolphin doesn't build without a C++20 capable compiler
23+
[[ "$__gcc_version" -lt 10 ]] && commit="f59f1a2a"
24+
# support gcc 8.4.0 for Ubuntu 18.04
25+
[[ "$__gcc_version" -lt 9 ]] && commit="1c0ca09e"
26+
echo "$commit"
2527
}
2628

2729
function depends_dolphin() {
28-
local depends=(cmake pkg-config libao-dev libasound2-dev libavcodec-dev libavformat-dev libbluetooth-dev libenet-dev liblzo2-dev libminiupnpc-dev libopenal-dev libpulse-dev libreadline-dev libsfml-dev libsoil-dev libsoundtouch-dev libswscale-dev libusb-1.0-0-dev libxext-dev libxi-dev libxrandr-dev portaudio19-dev zlib1g-dev libudev-dev libevdev-dev libmbedtls-dev libcurl4-openssl-dev libegl1-mesa-dev qtbase5-private-dev)
29-
# current HEAD of dolphin doesn't build gtk2 UI anymore
30-
[[ "$__gcc_version" -lt 6 ]] && depends+=(libgtk2.0-dev libwxbase3.0-dev libwxgtk3.0-dev)
30+
local depends=(cmake gettext pkg-config libao-dev libasound2-dev libavcodec-dev libavformat-dev libbluetooth-dev libenet-dev liblzo2-dev libminiupnpc-dev libopenal-dev libpulse-dev libreadline-dev libsfml-dev libsoil-dev libsoundtouch-dev libswscale-dev libusb-1.0-0-dev libxext-dev libxi-dev libxrandr-dev portaudio19-dev zlib1g-dev libudev-dev libevdev-dev libmbedtls-dev libcurl4-openssl-dev libegl1-mesa-dev liblzma-dev)
31+
if [[ "$__gcc_version" -lt 8 ]]; then
32+
md_ret_errors+=("Sorry, you need an OS with gcc 8 or newer to compile $md_id")
33+
return 1
34+
fi
35+
# check if qt6 is available, otherwise use qt5
36+
local has_qt6=$(apt-cache madison qt6-base-private-dev 2>/dev/null | cut -d'|' -f1)
37+
if [[ -n "$has_qt6" ]]; then
38+
depends+=(qt6-base-private-dev)
39+
else
40+
depends+=(qt5-base-private-dev)
41+
fi
3142
getDepends "${depends[@]}"
3243
}
3344

@@ -38,7 +49,8 @@ function sources_dolphin() {
3849
function build_dolphin() {
3950
mkdir build
4051
cd build
41-
cmake .. -DCMAKE_INSTALL_PREFIX="$md_inst"
52+
# use the bundled 'speexdsp' libs, distro versions before 1.2.1 produce a 'cmake' error
53+
cmake .. -DBUNDLE_SPEEX=ON -DCMAKE_INSTALL_PREFIX="$md_inst"
4254
make clean
4355
make
4456
md_ret_require="$md_build/build/Binaries/dolphin-emu"

0 commit comments

Comments
 (0)