diff --git a/games/wyrmgus/Makefile b/games/wyrmgus/Makefile index 40bfde9b4f01..91f36194b697 100644 --- a/games/wyrmgus/Makefile +++ b/games/wyrmgus/Makefile @@ -1,51 +1,50 @@ PORTNAME= wyrmgus -PORTVERSION= 5.3.5 -PORTREVISION= 1 +PORTVERSION= 5.3.6 DISTVERSIONPREFIX= v CATEGORIES= games devel MAINTAINER= amdmi3@FreeBSD.org COMMENT= Modified Stratagus engine for Wyrmsun LICENSE= GPLv2+ LICENSE_FILE= ${WRKSRC}/COPYING LIB_DEPENDS= libtolua++-${LUA_VER}.so:lang/tolua++ BUILD_DEPENDS= ${LOCALBASE}/include/boost/tokenizer.hpp:devel/boost-libs # recheck with boost >= 1.73 BROKEN_FreeBSD_14= does not build because boost asio is not compatible with c++20 USE_GITHUB= yes GH_ACCOUNT= Andrettin GH_PROJECT= Wyrmgus USES= cmake compiler:c++17-lang lua:51 pkgconfig sdl sqlite qt:5 xorg USE_QT= core gui widgets multimedia location \ quickcontrols quickcontrols2 graphicaleffects \ qmake_build buildtools_build USE_XORG= x11 USE_SDL= sdl2 mixer2 CMAKE_ARGS= -DGAMEDIR:STRING="bin" \ -DTOLUA++_APP:STRING="tolua++-${LUA_VER}" \ -DTOLUA++_INCLUDE_DIR:STRING="${LUA_INCDIR}" \ -DTOLUA++_LIBRARY:STRING="${LUA_LIBDIR}/libtolua++.so" \ -DENABLE_USEGAMEDIR:BOOL=OFF PORTDOCS= * PLIST_FILES= bin/${PORTNAME} \ share/pixmaps/wyrmsun.ico OPTIONS_DEFINE= OPENGL DOCS OPTIONS_DEFAULT=OPENGL OPENGL_USES= gl OPENGL_USE= GL=gl,glu OPENGL_CMAKE_ON= -DWITH_RENDERER="OpenGL" OPENGL_CMAKE_OFF= -DWITH_RENDERER="NativeSDL" post-install: ${INSTALL_DATA} ${WRKSRC}/src/win32/wyrmsun.ico ${STAGEDIR}${PREFIX}/share/pixmaps/ .include 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 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 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 ++ + #include "util/singleton.h" + + #include 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 --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 --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())]; - }