build: fix installdeps for new Debian wx packages

Update installdeps for Debian to find the new version wx packages, but
still use the -gtk3 variants on very old versions of Debian.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This commit is contained in:
Rafael Kitover 2023-09-04 20:41:17 +00:00
parent 803ab35269
commit 7a7778c644
No known key found for this signature in database
GPG Key ID: 08AB596679D86240
1 changed files with 16 additions and 8 deletions

View File

@ -335,16 +335,24 @@ debian_installdeps() {
libswresample_dev=$(apt-cache search libswresample-dev | awk '{print $1}') libswresample_dev=$(apt-cache search libswresample-dev | awk '{print $1}')
fi fi
# in newer distros wx_libs=$(apt-cache search 'libwxgtk[0-9]' | sed 's/ - .*//')
wx_lib=$(apt-cache search 'libwxgtk3.0-gtk3(-[^[:space:]]+)?$' | grep -v -- -dev | sed 's/ - .*//')
wx_lib_dev=$(apt-cache search 'libwxgtk3.0-gtk3-dev(-[^[:space:]]+)?$' | sed 's/ - .*//')
if [ -z "$wx_lib" ] || [ -z "$wx_lib_dev" ]; then # Use -gtk3 variant on older distros.
wx_lib=libwxgtk3.0 case "$wx_libs" in
wx_lib_dev=libwxgtk3.0-dev *-gtk3*)
fi new_wx_libs=
for pkg in $wx_libs; do
case "$pkg" in
*-gtk3*)
new_wx_libs="$new_wx_libs $pkg"
;;
esac
done
wx_libs=$new_wx_libs
;;
esac
pkgs="build-essential g++ nasm cmake ccache gettext zlib1g-dev libgl1-mesa-dev libgettextpo-dev libsdl2-dev $sdl_lib libglu1-mesa-dev libglu1-mesa libgles2-mesa-dev libsfml-dev $sfml_libs $glew_lib $wx_lib $wx_lib_dev libgtk2.0-dev libgtk-3-dev ccache zip ninja-build" pkgs="build-essential g++ nasm cmake ccache gettext zlib1g-dev libgl1-mesa-dev libgettextpo-dev libsdl2-dev $sdl_lib libglu1-mesa-dev libglu1-mesa libgles2-mesa-dev libsfml-dev $sfml_libs $glew_lib $wx_libs libgtk2.0-dev libgtk-3-dev ccache zip ninja-build"
[ -n "$ENABLE_OPENAL" ] && pkgs="$pkgs libopenal-dev" [ -n "$ENABLE_OPENAL" ] && pkgs="$pkgs libopenal-dev"
[ -n "$ENABLE_FFMPEG" ] && pkgs="$pkgs libavcodec-dev libavformat-dev libswscale-dev libavutil-dev $libswresample_dev" [ -n "$ENABLE_FFMPEG" ] && pkgs="$pkgs libavcodec-dev libavformat-dev libswscale-dev libavutil-dev $libswresample_dev"