git: a529a35a72f1 - main - games/wyrmgus: update 5.3.5 → 5.3.6

From: Dmitry Marakasov <amdmi3_at_FreeBSD.org>
Date: Tue, 30 Aug 2022 18:56:12 UTC
The branch main has been updated by amdmi3:

URL: https://cgit.FreeBSD.org/ports/commit/?id=a529a35a72f1ca20c55781861ac94d1daf8c3938

commit a529a35a72f1ca20c55781861ac94d1daf8c3938
Author:     Dmitry Marakasov <amdmi3@FreeBSD.org>
AuthorDate: 2022-08-30 16:55:49 +0000
Commit:     Dmitry Marakasov <amdmi3@FreeBSD.org>
CommitDate: 2022-08-30 18:55:07 +0000

    games/wyrmgus: update 5.3.5 → 5.3.6
---
 games/wyrmgus/Makefile                             |  3 +-
 games/wyrmgus/distinfo                             |  6 +--
 .../patch-260d0ee71b3e8339d159658bb02c2cb1e4ff8def | 43 ++++++++++++++++++++++
 .../wyrmgus/files/patch-src_stratagus_translator.h | 11 ++++++
 .../files/patch-src_util_container__random_util.h  | 18 ---------
 5 files changed, 58 insertions(+), 23 deletions(-)

diff --git a/games/wyrmgus/Makefile b/games/wyrmgus/Makefile
index 40bfde9b4f01..91f36194b697 100644
--- a/games/wyrmgus/Makefile
+++ b/games/wyrmgus/Makefile
@@ -1,6 +1,5 @@
 PORTNAME=	wyrmgus
-PORTVERSION=	5.3.5
-PORTREVISION=	1
+PORTVERSION=	5.3.6
 DISTVERSIONPREFIX=	v
 CATEGORIES=	games devel
 
diff --git a/games/wyrmgus/distinfo b/games/wyrmgus/distinfo
index 290f5ba61d17..7139080fc94c 100644
--- a/games/wyrmgus/distinfo
+++ b/games/wyrmgus/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1647210067
-SHA256 (Andrettin-Wyrmgus-v5.3.5_GH0.tar.gz) = 5728dc65910052cf41ba7421d5b75dfa0f2744fc301083405646b9ccaa259a64
-SIZE (Andrettin-Wyrmgus-v5.3.5_GH0.tar.gz) = 1632599
+TIMESTAMP = 1660163342
+SHA256 (Andrettin-Wyrmgus-v5.3.6_GH0.tar.gz) = d3678d4a01534f2331da879de3c099d36f89e9bb37baa225b5b170b57c9f97c9
+SIZE (Andrettin-Wyrmgus-v5.3.6_GH0.tar.gz) = 1631729
diff --git a/games/wyrmgus/files/patch-260d0ee71b3e8339d159658bb02c2cb1e4ff8def b/games/wyrmgus/files/patch-260d0ee71b3e8339d159658bb02c2cb1e4ff8def
new file mode 100644
index 000000000000..737cbe86ddc1
--- /dev/null
+++ b/games/wyrmgus/files/patch-260d0ee71b3e8339d159658bb02c2cb1e4ff8def
@@ -0,0 +1,43 @@
+From 260d0ee71b3e8339d159658bb02c2cb1e4ff8def Mon Sep 17 00:00:00 2001
+From: Andrettin <6322423+Andrettin@users.noreply.github.com>
+Date: Tue, 30 Aug 2022 18:31:42 +0200
+Subject: [PATCH] Fixed in-game game loading
+
+---
+ src/game/game.cpp          | 5 +++++
+ src/game/loadgame.cpp      | 2 +-
+ src/stratagus/mainloop.cpp | 5 -----
+ 3 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/src/game/game.cpp b/src/game/game.cpp
+index 27184e5d1..d0adcdacf 100644
+--- src/game/game.cpp
++++ src/game/game.cpp
+@@ -866,6 +866,11 @@ boost::asio::awaitable<void> StartMap(const std::filesystem::path &filepath, con
+ 
+ 		Gui->setTop(oldTop);
+ 		vector::remove(Containers, container);
++
++		if (!load_game_file.empty()) {
++			engine_interface::get()->load_game_deferred(load_game_file);
++			load_game_file.clear();
++		}
+ 	} catch (...) {
+ 		std::throw_with_nested(std::runtime_error("Error running map \"" + path::to_string(filepath) + "\"."));
+ 	}
+diff --git a/src/stratagus/mainloop.cpp b/src/stratagus/mainloop.cpp
+index e356e46c8..0da8a174c 100644
+--- src/stratagus/mainloop.cpp
++++ src/stratagus/mainloop.cpp
+@@ -451,11 +451,6 @@ static boost::asio::awaitable<void> SingleGameLoop()
+ 		DisplayLoop();
+ 		co_await GameLogicLoop();
+ 	}
+-
+-	if (!load_game_file.empty()) {
+-		engine_interface::get()->load_game_deferred(load_game_file);
+-		load_game_file.clear();
+-	}
+ }
+ 
+ /**
diff --git a/games/wyrmgus/files/patch-src_stratagus_translator.h b/games/wyrmgus/files/patch-src_stratagus_translator.h
new file mode 100644
index 000000000000..f6a8458bfa60
--- /dev/null
+++ b/games/wyrmgus/files/patch-src_stratagus_translator.h
@@ -0,0 +1,11 @@
+--- src/stratagus/translator.h.orig	2022-08-08 17:14:50 UTC
++++ src/stratagus/translator.h
+@@ -26,6 +26,8 @@
+ 
+ #pragma once
+ 
++#include <unordered_map>
++
+ #include "util/singleton.h"
+ 
+ #include <QTranslator>
diff --git a/games/wyrmgus/files/patch-src_util_container__random_util.h b/games/wyrmgus/files/patch-src_util_container__random_util.h
deleted file mode 100644
index 7f823767777b..000000000000
--- a/games/wyrmgus/files/patch-src_util_container__random_util.h
+++ /dev/null
@@ -1,18 +0,0 @@
---- src/util/container_random_util.h.orig	2022-03-13 19:52:08 UTC
-+++ src/util/container_random_util.h
-@@ -31,13 +31,13 @@
- namespace wyrmgus::container {
- 
- template <typename T>
--inline const T::value_type &get_random(const T &container)
-+inline const typename T::value_type &get_random(const T &container)
- {
- 	return container[random::get()->generate(container.size())];
- }
- 
- template <typename T>
--inline const T::value_type &get_random_async(const T &container)
-+inline const typename T::value_type &get_random_async(const T &container)
- {
- 	return container[random::get()->generate_async(container.size())];
- }