From f3282ef0a9cd452852a6b8a06adb654c62be9270 Mon Sep 17 00:00:00 2001 From: Rafael Kitover Date: Tue, 12 Nov 2019 18:45:43 +0000 Subject: [PATCH] installdeps: debian: detect gtk3 version of wxgtk Detect and prefer the -gtk3 variants of the libwxgtk3.0 packages on distros like kali-rolling. Tested to work on newest kali-rolling and trusty. Fix #564. Signed-off-by: Rafael Kitover --- installdeps | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/installdeps b/installdeps index 72b0fe48..5cb6a5f5 100755 --- a/installdeps +++ b/installdeps @@ -305,7 +305,16 @@ debian_installdeps() { # not present in trusty libswresample_dev=$(apt-cache search libswresample-dev | awk '{print $1}') - check sudo apt-get -qy install build-essential g++ nasm cmake ccache gettext zlib1g-dev libgl1-mesa-dev libavcodec-dev libavformat-dev libswscale-dev libavutil-dev $libswresample_dev libgettextpo-dev libpng-dev libsdl2-dev libsdl2-2.0 libglu1-mesa-dev libglu1-mesa libgles2-mesa-dev libsfml-dev $sfml_libs $glew_lib libopenal-dev libwxgtk3.0-dev libwxgtk3.0 libgtk2.0-dev libgtk-3-dev ccache zip + # in newer distros + 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 + wx_lib=libwxgtk3.0 + wx_lib_dev=libwxgtk3.0-dev + fi + + check sudo apt-get -qy install build-essential g++ nasm cmake ccache gettext zlib1g-dev libgl1-mesa-dev libavcodec-dev libavformat-dev libswscale-dev libavutil-dev $libswresample_dev libgettextpo-dev libpng-dev libsdl2-dev libsdl2-2.0 libglu1-mesa-dev libglu1-mesa libgles2-mesa-dev libsfml-dev $sfml_libs $glew_lib libopenal-dev $wx_lib $wx_lib_dev libgtk2.0-dev libgtk-3-dev ccache zip else case "$target" in mingw-w64-i686)