Skip to content

Commit cf541c3

Browse files
committed
dolphin: fix Qt6 Svg dependency for Ubuntu
Ubuntu seems to have different names for the QtSvg module, so try to install the available package depending on the distro release.
1 parent 083362d commit cf541c3

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

scriptmodules/emulators/dolphin.sh

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ rp_module_flags="!all 64bit"
1919

2020
function _get_commit_dolphin() {
2121
local commit
22-
local has_qt6=$(apt-cache madison qt6-base-private-dev 2>/dev/null | cut -d'|' -f1)
22+
local has_qt6=$(apt-cache -qq madison qt6-base-private-dev | cut -d'|' -f1)
2323
# current HEAD of dolphin doesn't build without a C++20 capable compiler ..
2424
[[ "$__gcc_version" -lt 10 ]] && commit="f59f1a2a"
2525
# .. and without QT6
@@ -36,9 +36,15 @@ function depends_dolphin() {
3636
return 1
3737
fi
3838
# check if qt6 is available, otherwise use qt5
39-
local has_qt6=$(apt-cache madison qt6-base-private-dev 2>/dev/null | cut -d'|' -f1)
39+
local has_qt6=$(apt-cache -qq madison qt6-base-private-dev | cut -d'|' -f1)
4040
if [[ -n "$has_qt6" ]]; then
41-
depends+=(qt6-base-private-dev qt6-svg-dev)
41+
depends+=(qt6-base-private-dev)
42+
# Older Ubuntu versions provide libqt6svg6-dev instead of Debian's qt6-svg-dev
43+
if [[ -n "$__os_ubuntu_ver" ]] && compareVersions "$__os_ubuntu_ver" lt 23.04; then
44+
depends+=(libqt6svg6-dev)
45+
else
46+
depends+=(qt6-svg-dev)
47+
fi
4248
else
4349
depends+=(qtbase5-private-dev)
4450
fi

0 commit comments

Comments
 (0)