From 3207e35eff860ff3ef63de251e690bf605c47448 Mon Sep 17 00:00:00 2001 From: orbea Date: Sat, 24 Oct 2020 10:00:37 -0700 Subject: games/solarus: Add patch. Signed-off-by: orbea Signed-off-by: Willy Sudiarto Raharjo --- games/solarus/README | 6 +++--- games/solarus/fullscreen.patch | 30 ++++++++++++++++++++++++++++++ games/solarus/solarus.SlackBuild | 15 ++++++++++----- 3 files changed, 43 insertions(+), 8 deletions(-) create mode 100644 games/solarus/fullscreen.patch (limited to 'games') diff --git a/games/solarus/README b/games/solarus/README index f54102fae4..8e3dd64aef 100644 --- a/games/solarus/README +++ b/games/solarus/README @@ -1,8 +1,8 @@ Solarus is a free and open-source game engine, licensed under GPL v3. It is written from scratch in C++ and uses SDL2 (it's not an emulator). -Development began in 2006. The goal of the engine is to allow people to -create their own Action-RPG games (also called Zelda-like games). It is -totally independent from Nintendo. +Development began in 2006. The goal of the engine is to allow people +to create their own Action-RPG games (also called Zelda-like games). It +is totally independent from Nintendo. Solarus will require game data like zsdx. diff --git a/games/solarus/fullscreen.patch b/games/solarus/fullscreen.patch new file mode 100644 index 0000000000..efc4d6a4c9 --- /dev/null +++ b/games/solarus/fullscreen.patch @@ -0,0 +1,30 @@ +From cf67a03567030893993dc2d75a2a515cada371a4 Mon Sep 17 00:00:00 2001 +From: orbea +Date: Fri, 23 Oct 2020 09:50:33 -0700 +Subject: [PATCH] Workaround SDL_WINDOW_FULLSCREEN_DESKTOP issues. + +With some window managers the fullscreen for solarus will be +lost when changing workspaces. + +Setting SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS=0 in the environment +works around this issue, but its more convenient doing it +directly in solarus. +--- + src/graphics/Video.cpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/graphics/Video.cpp b/src/graphics/Video.cpp +index b88cdc884..dd41bf20c 100644 +--- a/src/graphics/Video.cpp ++++ b/src/graphics/Video.cpp +@@ -674,6 +674,7 @@ void set_default_video_mode() { + Debug::check_assertion(context.default_video_mode != nullptr, + "Default video mode was not initialized"); + ++ SDL_SetHint(SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS, "0"); + set_fullscreen(false); + set_video_mode(*context.default_video_mode); + } +-- +GitLab + diff --git a/games/solarus/solarus.SlackBuild b/games/solarus/solarus.SlackBuild index 4a6847bc47..a46b54ddf3 100644 --- a/games/solarus/solarus.SlackBuild +++ b/games/solarus/solarus.SlackBuild @@ -24,7 +24,7 @@ PRGNAM=solarus VERSION=${VERSION:-1.6.4} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then @@ -69,16 +69,20 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -# cmake: Fix compatiblity with cmake-3.5.2. -# https://gitlab.com/solarus-games/solarus/-/merge_requests/1353 -patch -p1 < $CWD/cmake.patch - if pkg-config --exists Qt5Core; then GUI=ON else GUI=OFF fi +# cmake: Fix compatiblity with cmake-3.5.2. +# https://gitlab.com/solarus-games/solarus/-/merge_requests/1353 +patch -p1 < $CWD/cmake.patch + +# Workaround SDL_WINDOW_FULLSCREEN_DESKTOP issues. +# https://gitlab.com/solarus-games/solarus/-/merge_requests/1355 +patch -p1 -i $CWD/fullscreen.patch + mkdir -p build cd build cmake \ @@ -90,6 +94,7 @@ cd build -DSOLARUS_LIBRARY_INSTALL_DESTINATION:PATH=lib${LIBDIRSUFFIX} \ -DSOLARUS_DEFAULT_QUEST=/usr/share/games/$PRGNAM/zsdx \ -DSOLARUS_GUI=$GUI \ + -DCMAKE_SKIP_RPATH=TRUE \ -DCMAKE_BUILD_TYPE=Release .. make make install DESTDIR=$PKG -- cgit v1.2.3