git: 33c9707d8b57 - main - games/spring: update to 105.0.1
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 25 Feb 2022 19:12:54 UTC
The branch main has been updated by amdmi3:
URL: https://cgit.FreeBSD.org/ports/commit/?id=33c9707d8b57fab77399b00747f04e3478770167
commit 33c9707d8b57fab77399b00747f04e3478770167
Author: Dmitry Marakasov <amdmi3@FreeBSD.org>
AuthorDate: 2021-04-22 12:05:40 +0000
Commit: Dmitry Marakasov <amdmi3@FreeBSD.org>
CommitDate: 2022-02-25 19:12:28 +0000
games/spring: update to 105.0.1
PR: 254732
---
games/spring/Makefile | 118 +++++--------
games/spring/distinfo | 23 ++-
.../patch-AI_Skirmish_CircuitAI_CMakeLists.txt | 11 ++
...h_CircuitAI_src_circuit_module_EconomyManager.h | 13 ++
...sh_CircuitAI_src_circuit_setup_SetupManager.cpp | 22 +++
...rcuitAI_src_circuit_util_math_EncloseCircle.cpp | 21 +++
games/spring/files/patch-boost-1.66 | 184 -------------------
games/spring/files/patch-boost-1.69 | 31 ----
games/spring/files/patch-doc_CMakeLists.txt | 11 ++
.../files/patch-doc_manpages_make__manpages.sh | 8 +
games/spring/files/patch-math | 196 ---------------------
games/spring/files/patch-remove-unused-vars | 156 ----------------
games/spring/files/patch-rts-System-Platform-CpuID | 11 --
.../patch-rts-System-Platform-Linux-CrashHandler | 8 -
games/spring/files/patch-rts-System-Platform-Misc | 9 -
games/spring/files/patch-rts-build-cmake-Util | 32 ----
games/spring/files/patch-rts-build-cmake-UtilJava | 16 --
.../files/patch-rts-lib-headlessStubs-glstub | 13 --
games/spring/files/patch-rts_Game_CMakeLists.txt | 7 +
games/spring/files/patch-rts_Game_GameSetup.cpp | 11 ++
games/spring/files/patch-rts_Lua_LuaMaterial.h | 12 ++
...ch-rts_Rendering_Env_Decals_DecalsDrawerGL4.cpp | 11 ++
.../spring/files/patch-rts_Rendering_LineDrawer.h | 12 ++
games/spring/files/patch-rts_Sim_CMakeLists.txt | 7 +
.../files/patch-rts_Sim_Misc_SimObjectIDPool.cpp | 13 ++
...patch-rts_Sim_Projectiles_ProjectileHandler.cpp | 41 +++++
games/spring/files/patch-rts_System_CMakeLists.txt | 11 ++
games/spring/files/patch-rts_System_GlobalRNG.h | 13 ++
.../files/patch-rts_System_Platform_Linux_Futex.h | 19 ++
...tch-rts_System_Platform_Linux_ThreadSupport.cpp | 19 ++
.../files/patch-rts_System_Platform_Misc.cpp | 21 +++
.../files/patch-rts_System_Sound_OpenAL_Sound.h | 28 ---
.../files/patch-rts_System_SpringHashMap.hpp | 12 ++
.../files/patch-rts_System_SpringHashSet.hpp | 12 ++
.../patch-rts_System_Threading_SpringThreading.h | 20 +++
.../files/patch-rts_build_cmake_UtilVersion.cmake | 60 +++++++
.../files/patch-rts_builds_dedicated_main.cpp | 13 ++
.../patch-tools_mapcompile_src_mapdecompile.cpp | 11 ++
...ools_pr-downloader_src_Downloader_Rapid_Sdp.cpp | 12 ++
...ols_pr-downloader_src_FileSystem_FileSystem.cpp | 12 ++
games/spring/files/patch-use-system-sdl | 93 ----------
games/spring/pkg-plist | 12 +-
42 files changed, 510 insertions(+), 855 deletions(-)
diff --git a/games/spring/Makefile b/games/spring/Makefile
index 38f475c31bd1..bdb8c17f7c19 100644
--- a/games/spring/Makefile
+++ b/games/spring/Makefile
@@ -1,110 +1,86 @@
PORTNAME= spring
-PORTVERSION= 98.0
-PORTREVISION= 21
+PORTVERSION= 105.0.1
CATEGORIES= games
-MASTER_SITES= SF/springrts/springrts/${PORTNAME}-${PORTVERSION} \
- http://springrts.com/dl/
-DISTNAME= ${PORTNAME}_${PORTVERSION}_src
MAINTAINER= amdmi3@FreeBSD.org
COMMENT= Project aiming to create a new and versatile RTS Engine
-LICENSE= GPLv2
-
-BROKEN= fails to build
+LICENSE= GPLv2+ BSD3CLAUSE BSD2CLAUSE
+LICENSE_COMB= multi
+LICENSE_FILE= ${WRKSRC}/LICENSE
LIB_DEPENDS= libfreetype.so:print/freetype2 \
- libboost_thread.so:devel/boost-libs \
libIL.so:graphics/devil \
libogg.so:audio/libogg \
- libvorbis.so:audio/libvorbis
+ libvorbis.so:audio/libvorbis \
+ libminizip.so:archivers/minizip \
+ libfontconfig.so:x11-fonts/fontconfig \
+ libcurl.so:ftp/curl \
+ libunwind.so:devel/libunwind \
+ libjsoncpp.so:devel/jsoncpp
BUILD_DEPENDS= 7z:archivers/p7zip
-# XXX: it should be possible to build it on i386, investigate
-# (currently link fails on undefined reference to __sync_fetch_and_add_8)
+BROKEN_FreeBSD_12= ld: error: undefined symbol: streflop_libm::__inline_isnanf(float)
ONLY_FOR_ARCHS= amd64
ONLY_FOR_ARCHS_REASON= relies on x86 floating-point math and amd64 atomic ops
-USE_SDL= sdl2
+USE_GITHUB= yes
+GH_TUPLE= spring:Python:3bb6837:Python/AI/Interfaces/Python \
+ spring:AAI:a15f45c:AAI/AI/Skirmish/AAI \
+ spring:CircuitAI:91fd31e:CircuitAI/AI/Skirmish/CircuitAI \
+ spring:HughAI:1a11f5a:HughAI/AI/Skirmish/HughAI \
+ spring:KAIK:f6bdd3e:KAIK/AI/Skirmish/KAIK \
+ spring:Shard:75339ae:Shard/AI/Skirmish/Shard \
+ spring:SpringMapConvNG:76429b4:SprintMapConvNG/tools/mapcompile \
+ spring:pr-downloader:67423a3:pr_downloader/tools/pr-downloader \
+ spring:pyunitsync:6e1b3fd:pyunitsync/tools/unitsync/python
+
+USES= cmake compiler:c++11-lib desktop-file-utils gl localbase:ldflags \
+ openal:al pkgconfig sdl shared-mime-info xorg
USE_GL= gl glu glew
+USE_SDL= sdl2
USE_XORG= x11 xcursor
-USE_LDCONFIG= yes
-DOS2UNIX_GLOB= *.h *.hpp *.cpp
-
-USES= cmake:insource compiler:c++11-lib dos2unix gl openal:al sdl \
- tar:lzma xorg
-USES+= desktop-file-utils shared-mime-info
CMAKE_ARGS= -DDATADIR:STRING="share/${PORTNAME}" \
- -DAI_TYPES:STRING="NATIVE" \
-DDOCDIR:STRING="share/doc/${PORTNAME}" \
- -DCREATE_MAN_PAGES:BOOL=false \
- -DUSE_TCMALLOC:BOOL=false \
- -DUSE_LIBSQUISH:BOOL=false \
- -DUNITSYNC_PYTHON_WRAPPER:BOOL=false
+ -DAI_TYPES:STRING="NATIVE" \
+ -DCMAKE_DISABLE_FIND_PACKAGE_Git=TRUE \
+ -Wno-dev
-WRKSRC= ${WRKDIR}/${PORTNAME}_${PORTVERSION}
+MAKE_ENV= PORTVERSION="${PORTVERSION:R}" # build system expects 2 digit version
-# Do not exctract bundled copies of header files for 3rd-party packages:
-EXTRACT_AFTER_ARGS=--no-same-owner --no-same-permissions --exclude ${WRKSRC:T}/include
+.if defined(WITH_SYNC_DEBUG)
+CFLAGS= # empty
+CXXFLAGS= # empty
+CMAKE_ARGS+= -DTRACE_SYNC=true -DSYNCDEBUG=true -DSYNCCHECK=true
+CMAKE_BUILD_TYPE=DEBUG
+.endif
# The check-target fails right now: https://springrts.com/mantis/view.php?id=4736
TEST_TARGET= check
-PORTDOCS= *
PORTDATA= *
-OPTIONS_DEFINE= MANPAGES PR_DOWNLOADER DOCS
-OPTIONS_DEFAULT=MANPAGES PR_DOWNLOADER
+OPTIONS_DEFINE= MANPAGES
+OPTIONS_DEFAULT=MANPAGES
OPTIONS_SUB= yes
-PR_DOWNLOADER_DESC= Map and game downloader
-
-MANPAGES_CMAKE_ON= -DCREATE_MAN_PAGES:BOOL=true -DMANDIR:STRING="man"
-MANPAGES_CMAKE_OFF= -DCREATE_MAN_PAGES:BOOL=false
-MANPAGES_BUILD_DEPENDS= 7z:archivers/p7zip \
- asciidoc:textproc/asciidoc \
+MANPAGES_CMAKE_BOOL= ENABLE_MANPAGES
+MANPAGES_BUILD_DEPENDS= asciidoc:textproc/asciidoc \
xsltproc:textproc/libxslt \
${LOCALBASE}/share/xsl/docbook/manpages/docbook.xsl:textproc/docbook-xsl \
bash:shells/bash
-CXXFLAGS+= -Wno-deprecated # Too much noise
-
-PR_DOWNLOADER_LIB_DEPENDS=libcurl.so:ftp/curl
-
-.include <bsd.port.pre.mk>
-
-.if defined(WITH_SYNC_DEBUG)
-CFLAGS= # empty
-CXXFLAGS= # empty
-CMAKE_ARGS+= -DTRACE_SYNC=true -DSYNCDEBUG=true
-CMAKE_BUILD_TYPE=DEBUG2
-.endif
-
-.if ! ${PORT_OPTIONS:MPR_DOWNLOADER}
-post-extract:
- @${RM} ${WRKSRC}/tools/pr-downloader/CMakeLists.txt
-.endif
post-patch:
- @${REINPLACE_CMD} -e 's|-O2||' ${WRKSRC}/CMakeLists.txt
+.if defined(WITH_OPTIONAL_GS4)
+ # allows minimal runtest with older hardware
+ @${REINPLACE_CMD} -e '/GLEW_ARB_geometry_shader4/ s|CHECK_REQ_EXT|CHECK_OPT_EXT|' ${WRKSRC}/rts/Rendering/GlobalRendering.cpp
+.endif
@${REINPLACE_CMD} -e 's|/etc/\(spring/datadir\)|${PREFIX}/\1|g' \
${WRKSRC}/rts/System/FileSystem/DataDirLocater.cpp
- @${REINPLACE_CMD} -e 's|x1F3F|x0F3F|g' \
- ${WRKSRC}/rts/System/Sync/FPUCheck.cpp
@${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' \
${WRKSRC}/rts/build/cmake/*.cmake
- @${REINPLACE_CMD} -e 's|execinfo|/usr/lib/libexecinfo.so|' \
- ${WRKSRC}/rts/CMakeLists.txt \
- ${WRKSRC}/rts/builds/dedicated/CMakeLists.txt
- @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|' \
- ${WRKSRC}/rts/System/Platform/Misc.cpp
- @${REINPLACE_CMD} -e 's|/bin/bash|${LOCALBASE}&|' \
- ${WRKSRC}/doc/manpages/make_manpages.sh
-.if ! ${PORT_OPTIONS:MMANPAGES}
- @${REINPLACE_CMD} -e '/set(CREATE_MAN_PAGES)/ d' \
- ${WRKSRC}/doc/CMakeLists.txt
-.endif
-
-pre-build:
- cd ${WRKSRC} && ${MAKE_CMD} generateVersionFiles
+ # XXX: recheck if this is still needed
+ @${REINPLACE_CMD} -e 's|x1F3F|x0F3F|g' \
+ ${WRKSRC}/rts/System/Sync/FPUCheck.cpp
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/games/spring/distinfo b/games/spring/distinfo
index ef0c748ac089..90c03ccd98ec 100644
--- a/games/spring/distinfo
+++ b/games/spring/distinfo
@@ -1,2 +1,21 @@
-SHA256 (spring_98.0_src.tar.lzma) = 9137a8a35b42dd622c107c3b26525dc40d8b6e0dca0ce4a87c9fef005328823b
-SIZE (spring_98.0_src.tar.lzma) = 9114659
+TIMESTAMP = 1619038665
+SHA256 (spring-spring-105.0.1_GH0.tar.gz) = 975e74540acd6e2f0a1a4965d222ff79b035e152e35edbab982bee4a76a41b22
+SIZE (spring-spring-105.0.1_GH0.tar.gz) = 10625978
+SHA256 (spring-Python-3bb6837_GH0.tar.gz) = 710bb1a7f4835ab4d55a91b95cc7c5f53cfb8a3e2ba528f46d62df4f5a8d632e
+SIZE (spring-Python-3bb6837_GH0.tar.gz) = 29519
+SHA256 (spring-AAI-a15f45c_GH0.tar.gz) = 2d3b0922969b28596339f651bd208ce26b9220830cc917f70613368a2a4828ee
+SIZE (spring-AAI-a15f45c_GH0.tar.gz) = 137400
+SHA256 (spring-CircuitAI-91fd31e_GH0.tar.gz) = 8d54f79070559cf53bed127421a33ee2d5dc27825364e0ef9008d47e47e91980
+SIZE (spring-CircuitAI-91fd31e_GH0.tar.gz) = 713006
+SHA256 (spring-HughAI-1a11f5a_GH0.tar.gz) = 6caaae79f6435ac74b7f6bd4407f89c5e48f30711932655c9ba64321f8056937
+SIZE (spring-HughAI-1a11f5a_GH0.tar.gz) = 126562
+SHA256 (spring-KAIK-f6bdd3e_GH0.tar.gz) = 20cf1304c94f18f11cc22597e7b88bc57e7125a79541498d9b3b86faa133e63c
+SIZE (spring-KAIK-f6bdd3e_GH0.tar.gz) = 97974
+SHA256 (spring-Shard-75339ae_GH0.tar.gz) = 0dc59dc03cc3d92d30abe8f2570a7aa9ec6f80bbe9e8464baedc8810393e7f32
+SIZE (spring-Shard-75339ae_GH0.tar.gz) = 358911
+SHA256 (spring-SpringMapConvNG-76429b4_GH0.tar.gz) = 920a3cc2420feabdd8c8603b407070dfb6b56a65216f0d2e0796e94afa1cb22f
+SIZE (spring-SpringMapConvNG-76429b4_GH0.tar.gz) = 21488
+SHA256 (spring-pr-downloader-67423a3_GH0.tar.gz) = f12ff0999bac8b0044eb603975b324e2ca0461c6d4c0bb61e2856300ed6edea1
+SIZE (spring-pr-downloader-67423a3_GH0.tar.gz) = 832323
+SHA256 (spring-pyunitsync-6e1b3fd_GH0.tar.gz) = 3d05a88200337bbac3a8d4a8b92eb4660687fa3948a4aeb87fb07a01b057fa1a
+SIZE (spring-pyunitsync-6e1b3fd_GH0.tar.gz) = 131119
diff --git a/games/spring/files/patch-AI_Skirmish_CircuitAI_CMakeLists.txt b/games/spring/files/patch-AI_Skirmish_CircuitAI_CMakeLists.txt
new file mode 100644
index 000000000000..1c3c40b327d4
--- /dev/null
+++ b/games/spring/files/patch-AI_Skirmish_CircuitAI_CMakeLists.txt
@@ -0,0 +1,11 @@
+--- ./AI/Skirmish/CircuitAI/CMakeLists.txt.orig 2021-01-01 16:10:55 UTC
++++ ./AI/Skirmish/CircuitAI/CMakeLists.txt
+@@ -9,7 +9,7 @@ if (WIN32) # spring::condition_variable_any requireme
+ elseif (APPLE)
+ set(additionalSources ${additionalSources} ${CMAKE_SOURCE_DIR}/rts/System/Platform/Mac/Signal.cpp)
+ else ()
+- set(additionalSources ${additionalSources} ${CMAKE_SOURCE_DIR}/rts/System/Platform/Linux/Futex.cpp)
++ #set(additionalSources ${additionalSources} ${CMAKE_SOURCE_DIR}/rts/System/Platform/Linux/Futex.cpp)
+ endif ()
+ set(additionalLibraries ${Cpp_AIWRAPPER_TARGET} CUtils)
+ #set(additionalLibraries ${Cpp_AIWRAPPER_TARGET} CUtils ${SDL2_LIBRARY})
diff --git a/games/spring/files/patch-AI_Skirmish_CircuitAI_src_circuit_module_EconomyManager.h b/games/spring/files/patch-AI_Skirmish_CircuitAI_src_circuit_module_EconomyManager.h
new file mode 100644
index 000000000000..38095c6ee024
--- /dev/null
+++ b/games/spring/files/patch-AI_Skirmish_CircuitAI_src_circuit_module_EconomyManager.h
@@ -0,0 +1,13 @@
+https://github.com/spring/CircuitAI/pull/17/files
+
+--- AI/Skirmish/CircuitAI/src/circuit/module/EconomyManager.h.orig 2021-01-01 16:10:55 UTC
++++ AI/Skirmish/CircuitAI/src/circuit/module/EconomyManager.h
+@@ -164,7 +164,7 @@ class CEconomyManager: public IModule { (private)
+ float pull;
+ int mex;
+ float fraction;
+- inline bool operator< (const SPullMtoS& rhs) { return mex < rhs.mex; }
++ inline bool operator< (const SPullMtoS& rhs) const { return mex < rhs.mex; }
+ inline bool operator() (const SPullMtoS& lhs, const int rhs) { return lhs.mex < rhs; }
+ };
+ std::vector<SPullMtoS> mspInfos;
diff --git a/games/spring/files/patch-AI_Skirmish_CircuitAI_src_circuit_setup_SetupManager.cpp b/games/spring/files/patch-AI_Skirmish_CircuitAI_src_circuit_setup_SetupManager.cpp
new file mode 100644
index 000000000000..9ecc171de28a
--- /dev/null
+++ b/games/spring/files/patch-AI_Skirmish_CircuitAI_src_circuit_setup_SetupManager.cpp
@@ -0,0 +1,22 @@
+--- AI/Skirmish/CircuitAI/src/circuit/setup/SetupManager.cpp.orig 2021-01-01 16:10:55 UTC
++++ AI/Skirmish/CircuitAI/src/circuit/setup/SetupManager.cpp
+@@ -26,6 +26,8 @@
+ #include "Info.h"
+
+ #include <regex>
++#include <algorithm>
++#include <random>
+
+ namespace circuit {
+
+@@ -183,7 +185,9 @@ void CSetupManager::PickStartPos(CCircuitAI* circuit,
+ c.distDivIncome = center.distance(cl.position) / income;
+ validClusters.push_back(std::make_pair(kv.first, c));
+ }
+- std::random_shuffle(validClusters.begin(), validClusters.end());
++ std::random_device rd;
++ std::minstd_rand g(rd());
++ std::shuffle(validClusters.begin(), validClusters.end(), g);
+
+ auto cmp = [](const std::pair<int, SCluster>& a, const std::pair<int, SCluster>& b) {
+ if (a.second.count < b.second.count) {
diff --git a/games/spring/files/patch-AI_Skirmish_CircuitAI_src_circuit_util_math_EncloseCircle.cpp b/games/spring/files/patch-AI_Skirmish_CircuitAI_src_circuit_util_math_EncloseCircle.cpp
new file mode 100644
index 000000000000..0fea91623feb
--- /dev/null
+++ b/games/spring/files/patch-AI_Skirmish_CircuitAI_src_circuit_util_math_EncloseCircle.cpp
@@ -0,0 +1,21 @@
+--- ./AI/Skirmish/CircuitAI/src/circuit/util/math/EncloseCircle.cpp.orig 2021-01-01 16:10:55 UTC
++++ ./AI/Skirmish/CircuitAI/src/circuit/util/math/EncloseCircle.cpp
+@@ -9,6 +9,7 @@
+ #include "util/utils.h"
+
+ #include <algorithm>
++#include <random>
+ #include <assert.h>
+
+ namespace circuit {
+@@ -48,7 +49,9 @@ void CEncloseCircle::MakeCircle(const std::vector<AIFl
+ }
+ // Randomize order
+ // TODO: Read why shuffle??
+- std::random_shuffle(shuffled.begin(), shuffled.end());
++ std::random_device rd;
++ std::minstd_rand g(rd());
++ std::shuffle(shuffled.begin(), shuffled.end(), g);
+
+ // Progressively add points to circle or recompute circle
+ decltype(shuffled)::iterator it = shuffled.begin();
diff --git a/games/spring/files/patch-boost-1.66 b/games/spring/files/patch-boost-1.66
deleted file mode 100644
index 69ac45e63ceb..000000000000
--- a/games/spring/files/patch-boost-1.66
+++ /dev/null
@@ -1,184 +0,0 @@
-https://github.com/spring/spring/commit/a61970779994
-https://github.com/spring/spring/commit/f2f84f38e04a
-https://github.com/spring/spring/commit/318c003c7273
-https://github.com/spring/spring/commit/5048e2a3446c
-
---- rts/Net/AutohostInterface.cpp.orig 2014-10-07 20:09:51 UTC
-+++ rts/Net/AutohostInterface.cpp
-@@ -116,68 +116,60 @@ std::string AutohostInterface::TryBindSocket(
- const std::string& remoteIP, int remotePort,
- const std::string& localIP, int localPort)
- {
-- std::string errorMsg = "";
-+ std::string errorMsg;
-
- ip::address localAddr;
- ip::address remoteAddr;
- boost::system::error_code err;
-+
- try {
- socket.open(ip::udp::v6(), err); // test IP v6 support
-+
- const bool supportsIPv6 = !err;
-
- remoteAddr = netcode::WrapIP(remoteIP, &err);
-- if (err) {
-+
-+ if (err)
- throw std::runtime_error("Failed to parse address " + remoteIP + ": " + err.message());
-- }
-
-- if (!supportsIPv6 && remoteAddr.is_v6()) {
-+ if (!supportsIPv6 && remoteAddr.is_v6())
- throw std::runtime_error("IP v6 not supported, can not use address " + remoteAddr.to_string());
-- }
-
- if (localIP.empty()) {
- // use the "any" address as local "from"
- if (remoteAddr.is_v6()) {
- localAddr = ip::address_v6::any();
- } else {
-- if (supportsIPv6) {
-- socket.close();
-- }
-+ socket.close();
- socket.open(ip::udp::v4());
-+
- localAddr = ip::address_v4::any();
- }
- } else {
- localAddr = netcode::WrapIP(localIP, &err);
-- if (err) {
-+
-+ if (err)
- throw std::runtime_error("Failed to parse local IP " + localIP + ": " + err.message());
-- }
-- if (localAddr.is_v6() != remoteAddr.is_v6()) {
-+
-+ if (localAddr.is_v6() != remoteAddr.is_v6())
- throw std::runtime_error("Local IP " + localAddr.to_string() + " and remote IP " + remoteAddr.to_string() + " are IP v4/v6 mixed");
-- }
- }
-
- socket.bind(ip::udp::endpoint(localAddr, localPort));
--
-- boost::asio::socket_base::non_blocking_io command(true);
-- socket.io_control(command);
--
-- // A similar, slighly less verbose message is already in GameServer
-- //LOG("Connecting (UDP) to IP (v%i) %s Port %i",
-- // (remoteAddr.is_v6() ? 6 : 4), remoteAddr.c_str(), remotePort);
-+ socket.non_blocking(true);
- socket.connect(ip::udp::endpoint(remoteAddr, remotePort));
-- } catch (const std::runtime_error& ex) { // includes also boost::system::system_error, as it inherits from runtime_error
-+ } catch (const std::runtime_error& ex) {
-+ // also includes asio::system_error, inherits from runtime_error
- socket.close();
- errorMsg = ex.what();
-- if (errorMsg.empty()) {
-+
-+ if (errorMsg.empty())
- errorMsg = "Unknown problem";
-- }
- }
-
- return errorMsg;
- }
-
--AutohostInterface::~AutohostInterface()
--{
--}
-
- void AutohostInterface::SendStart()
- {
---- rts/Net/AutohostInterface.h.orig 2014-10-07 20:09:51 UTC
-+++ rts/Net/AutohostInterface.h
-@@ -28,7 +28,7 @@ class AutohostInterface (public)
- */
- AutohostInterface(const std::string& remoteIP, int remotePort,
- const std::string& localIP = "", int localPort = 0);
-- virtual ~AutohostInterface();
-+ virtual ~AutohostInterface() {}
-
- bool IsInitialized() const { return initialized; }
-
---- rts/System/FileSystem/Archives/SevenZipArchive.cpp.orig 2014-10-07 20:09:51 UTC
-+++ rts/System/FileSystem/Archives/SevenZipArchive.cpp
-@@ -3,7 +3,6 @@
- #include "SevenZipArchive.h"
-
- #include <algorithm>
--#include <boost/system/error_code.hpp>
- #include <stdexcept>
- #include <string.h> //memcpy
-
-@@ -86,7 +85,7 @@ IArchive* CSevenZipArchiveFactory::DoCreateArchive(con
- return new CSevenZipArchive(filePath);
- }
-
--const char* CSevenZipArchive::GetErrorStr(int err)
-+static inline const char* GetErrorStr(int err)
- {
- switch(err) {
- case SZ_OK:
-@@ -108,6 +107,27 @@ const char* CSevenZipArchive::GetErrorStr(int err)
- }
-
-
-+static inline std::string GetSystemErrorStr(WRes wres)
-+{
-+#ifdef USE_WINDOWS_FILE
-+ LPSTR messageBuffer = nullptr;
-+ size_t size = FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
-+ NULL, wres, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPSTR)&messageBuffer, 0, NULL);
-+
-+ std::string errorstr(messageBuffer, size);
-+
-+ //Free the buffer.
-+ LocalFree(messageBuffer);
-+#else
-+ std::string errorstr(strerror(wres));
-+#endif
-+
-+ return errorstr;
-+}
-+
-+
-+
-+
- CSevenZipArchive::CSevenZipArchive(const std::string& name):
- CBufferedArchive(name, false),
- blockIndex(0xFFFFFFFF),
-@@ -126,9 +146,8 @@ CSevenZipArchive::CSevenZipArchive(const std::string&
-
- WRes wres = InFile_Open(&archiveStream.file, name.c_str());
- if (wres) {
-- boost::system::error_code e(wres, boost::system::get_system_category());
- LOG_L(L_ERROR, "Error opening \"%s\": %s (%i)",
-- name.c_str(), e.message().c_str(), e.value());
-+ name.c_str(), GetSystemErrorStr(wres).c_str(), (int) wres);
- return;
- }
-
---- rts/System/FileSystem/Archives/SevenZipArchive.h.orig 2014-10-07 20:09:51 UTC
-+++ rts/System/FileSystem/Archives/SevenZipArchive.h
-@@ -95,7 +95,6 @@ class CSevenZipArchive : public CBufferedArchive (priv
- int packedSize;
- };
- int GetFileName(const CSzArEx* db, int i);
-- const char* GetErrorStr(int res);
-
- std::vector<FileData> fileData;
- UInt16 *tempBuf;
---- rts/System/Net/UDPListener.cpp.orig 2014-10-07 20:09:51.000000000 +0000
-+++ rts/System/Net/UDPListener.cpp
-@@ -34,8 +34,7 @@ UDPListener::UDPListener(int port, const std::string&
- const std::string err = TryBindSocket(port, &socket, ip);
-
- if (err.empty()) {
-- boost::asio::socket_base::non_blocking_io socketCommand(true);
-- socket->io_control(socketCommand);
-+ socket->non_blocking(true);
-
- mySocket = socket;
- SetAcceptingConnections(true);
diff --git a/games/spring/files/patch-boost-1.69 b/games/spring/files/patch-boost-1.69
deleted file mode 100644
index 22c97fbf39c3..000000000000
--- a/games/spring/files/patch-boost-1.69
+++ /dev/null
@@ -1,31 +0,0 @@
-https://github.com/spring/spring/commit/a385d9d7715a
-
-CMake Error at /usr/local/share/cmake/Modules/FindBoost.cmake:2049 (message):
- Unable to find the requested Boost libraries.
-
- Boost version: 1.69.0
-
- Boost include path: /usr/local/include
-
- Could not find the following Boost libraries:
-
- boost_signals
-
- Some (but not all) of the required Boost libraries were found. You may
- need to install these additional Boost libraries. Alternatively, set
- BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT
- to the location of Boost.
-Call Stack (most recent call first):
- CMakeLists.txt:245 (FIND_PACKAGE)
-
---- CMakeLists.txt.orig 2014-10-07 20:09:51 UTC
-+++ CMakeLists.txt
-@@ -242,7 +242,7 @@ if (MINGW)
- set(SDL2_INCLUDE_DIR "${MINGWLIBS}/include/SDL2")
- endif (MINGW)
-
--FIND_PACKAGE(Boost 1.47.0 COMPONENTS thread regex program_options system chrono signals filesystem REQUIRED)
-+FIND_PACKAGE(Boost 1.47.0 COMPONENTS thread regex program_options system chrono filesystem REQUIRED)
- FIND_PACKAGE(Boost 1.47.0 COMPONENTS timer)
- INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIR})
-
diff --git a/games/spring/files/patch-doc_CMakeLists.txt b/games/spring/files/patch-doc_CMakeLists.txt
new file mode 100644
index 000000000000..0ba4cf802a1b
--- /dev/null
+++ b/games/spring/files/patch-doc_CMakeLists.txt
@@ -0,0 +1,11 @@
+--- doc/CMakeLists.txt.orig 2020-12-26 12:45:43 UTC
++++ doc/CMakeLists.txt
+@@ -1,6 +1,7 @@
++option(ENABLE_MANPAGES "Enable manpages" FALSE)
+
+ ### make and install the man pages
+-if (UNIX)
++if (UNIX AND ENABLE_MANPAGES)
+ find_package(SevenZip)
+ set(AsciiDoc_FIND_QUIETLY TRUE)
+ find_package(AsciiDoc)
diff --git a/games/spring/files/patch-doc_manpages_make__manpages.sh b/games/spring/files/patch-doc_manpages_make__manpages.sh
new file mode 100644
index 000000000000..4798cb83a812
--- /dev/null
+++ b/games/spring/files/patch-doc_manpages_make__manpages.sh
@@ -0,0 +1,8 @@
+--- doc/manpages/make_manpages.sh.orig 2020-12-26 12:45:43 UTC
++++ doc/manpages/make_manpages.sh
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/usr/bin/env bash
+
+ ORIG_DIR=$(pwd)
+
diff --git a/games/spring/files/patch-math b/games/spring/files/patch-math
deleted file mode 100644
index d9fe161ab81c..000000000000
--- a/games/spring/files/patch-math
+++ /dev/null
@@ -1,196 +0,0 @@
-+++ rts/aGui/GuiElement.h 2015-04-08 15:06:26 -0400
-@@ -4,4 +4,5 @@
- #define GUIELEMENT_H
-
-+#include <cmath>
- #include <list>
- #include <SDL_events.h>
-+++ rts/lib/streflop/SMath.h
-@@ -16,6 +16,8 @@
- #ifndef STREFLOP_MATH_H
- #define STREFLOP_MATH_H
-
-+#include <cmath>
-+
- // just in case, should already be included
- #include "streflop.h"
-
-+++ rts/Sim/Weapons/LaserCannon.cpp 2015-04-07 20:49:52 -0400
-@@ -1,4 +1,6 @@
- /* This file is part of the Spring engine (GPL v2 or later), see LICENSE.html */
-
-+#include <cmath>
-+
- #include "LaserCannon.h"
- #include "WeaponDef.h"
-+++ rts/Sim/Weapons/FlameThrower.cpp 2015-04-07 20:50:46 -0400
-@@ -1,4 +1,6 @@
- /* This file is part of the Spring engine (GPL v2 or later), see LICENSE.html */
-
-+#include <cmath>
-+
- #include "FlameThrower.h"
- #include "WeaponDef.h"
-+++ rts/Sim/Weapons/MissileLauncher.cpp 2015-04-07 20:53:21 -0400
-@@ -1,4 +1,6 @@
- /* This file is part of the Spring engine (GPL v2 or later), see LICENSE.html */
-
-+#include <cmath>
-+
- #include "MissileLauncher.h"
- #include "WeaponDef.h"
-+++ rts/Sim/Weapons/EmgCannon.cpp 2015-04-07 20:57:50 -0400
-@@ -1,4 +1,6 @@
- /* This file is part of the Spring engine (GPL v2 or later), see LICENSE.html */
-
-+#include <cmath>
-+
- #include "EmgCannon.h"
- #include "WeaponDef.h"
-+++ rts/Sim/Units/Groups/GroupHandler.cpp 2015-04-08 16:24:53 -0400
-@@ -2,4 +2,6 @@
-
- #include <boost/cstdint.hpp>
-+
-+#include <cmath>
- #include <SDL_keycode.h>
-
-+++ rts/Sim/Weapons/TorpedoLauncher.cpp 2015-04-08 16:26:07 -0400
-@@ -1,4 +1,6 @@
- /* This file is part of the Spring engine (GPL v2 or later), see LICENSE.html */
-
-+#include <cmath>
-+
- #include "TorpedoLauncher.h"
- #include "WeaponDef.h"
-+++ rts/Game/Camera.cpp 2015-04-08 16:27:30 -0400
-@@ -1,4 +1,5 @@
- /* This file is part of the Spring engine (GPL v2 or later), see LICENSE.html */
-
-+#include <cmath>
- #include <string.h>
-
-+++ rts/Game/InMapDraw.cpp 2015-04-08 16:44:34 -0400
-@@ -1,6 +1,7 @@
- /* This file is part of the Spring engine (GPL v2 or later), see LICENSE.html */
-
--#include "SDL_mouse.h"
--#include "SDL_keyboard.h"
-+#include <cmath>
-+#include <SDL_mouse.h>
-+#include <SDL_keyboard.h>
-
- #include "InMapDraw.h"
-+++ rts/Game/PreGame.cpp 2015-04-08 16:45:50 -0400
-@@ -1,4 +1,5 @@
- /* This file is part of the Spring engine (GPL v2 or later), see LICENSE.html */
-
-+#include <cmath>
- #include <map>
- #include <SDL_keycode.h>
-+++ rts/Game/UI/MiniMap.cpp 2015-04-08 16:47:16 -0400
-@@ -1,4 +1,5 @@
- /* This file is part of the Spring engine (GPL v2 or later), see LICENSE.html */
-
-+#include <cmath>
- #include <SDL_keycode.h>
- #include <SDL_mouse.h>
-+++ rts/Rendering/GL/myGL.cpp 2015-04-08 16:51:02 -0400
-@@ -1,4 +1,5 @@
- /* This file is part of the Spring engine (GPL v2 or later), see LICENSE.html */
-
-+#include <cmath>
- #include <vector>
- #include <string>
-+++ rts/System/Input/Joystick.cpp 2015-04-08 16:54:28 -0400
-@@ -1,4 +1,6 @@
- /* This file is part of the Spring engine (GPL v2 or later), see LICENSE.html */
-
-+#include <cmath>
-+
- #include "InputHandler.h"
- #include "Joystick.h"
-+++ rts/System/SpringApp.cpp 2015-04-08 16:59:02 -0400
-@@ -1,4 +1,6 @@
- /* This file is part of the Spring engine (GPL v2 or later), see LICENSE.html */
-
-+#include <cmath>
-+
- #include "System/Input/InputHandler.h"
-
-+++ rts/Sim/Projectiles/WeaponProjectiles/LargeBeamLaserProjectile.cpp 2015-04-07 20:42:45 -0400
-@@ -10,4 +10,5 @@
- #include "System/myMath.h"
- #include <cstring> //memset
-+#include <cmath> // floor
-
- CR_BIND_DERIVED(CLargeBeamLaserProjectile, CWeaponProjectile, (ProjectileParams()))
---- rts/System/Sync/SyncedFloat3.h 2014-10-07 20:09:51 UTC
-+++ rts/System/Sync/SyncedFloat3.h 2015-04-24 08:44:31 -0400
-@@ -13,4 +13,6 @@
- #include "System/FastMath.h" //SSE (I)SQRT
-
-+#include <math.h>
-+
- /**
- * @brief SyncedFloat3 class
-@@ -614,7 +616,7 @@
-
- void AssertNaNs() const {
-- assert(!math::isnan(x) && !math::isinf(x));
-- assert(!math::isnan(y) && !math::isinf(y));
-- assert(!math::isnan(z) && !math::isinf(z));
-+ assert(!isnanf(x) && !__isinff(x));
-+ assert(!isnanf(y) && !__isinff(y));
-+ assert(!isnanf(z) && !__isinff(z));
- }
-
-+++ rts/Sim/Path/IPathController.cpp 2015-04-08 18:59:04 -0400
-@@ -1,3 +1,5 @@
- /* This file is part of the Spring engine (GPL v2 or later), see LICENSE.html */
-+#include <math.h>
-+
- #include "IPathController.hpp"
- #include "Sim/Units/Unit.h"
-@@ -27,8 +29,8 @@
-
- const float rawSpeedDiff = (targetSpeed * targetSpeedSign) - (currentSpeed * currentSpeedSign);
-- const float absSpeedDiff = math::fabs(rawSpeedDiff);
-+ const float absSpeedDiff = fabsf(rawSpeedDiff);
- // need to clamp, game-supplied values can be much larger than |speedDiff|
-- const float modAccRate = std::min(absSpeedDiff, maxAccRate);
-- const float modDecRate = std::min(absSpeedDiff, maxDecRate);
-+ const float modAccRate = fminf(absSpeedDiff, maxAccRate);
-+ const float modDecRate = fminf(absSpeedDiff, maxDecRate);
-
- const float deltaSpeed = mix(modAccRate, -modDecRate, (rawSpeedDiff < 0.0f));
-@@ -66,6 +68,6 @@
-
- static float TurnAccelerationSign(float turnBrakeDist, short curDeltaHeading, short newDeltaHeading) {
-- const bool b0 = (turnBrakeDist >= std::abs(curDeltaHeading));
-- const bool b1 = (std::abs(newDeltaHeading) <= std::abs(curDeltaHeading));
-+ const bool b0 = (turnBrakeDist >= abs(curDeltaHeading));
-+ const bool b1 = (abs(newDeltaHeading) <= abs(curDeltaHeading));
- const bool b2 = (Sign(curDeltaHeading) != Sign(newDeltaHeading));
-
-@@ -86,5 +88,5 @@
- const short curDeltaHeading = newHeading - short(oldHeading + (*curTurnSpeed) * (maxTurnAccel / maxTurnSpeed));
-
-- const float minTurnAccel = std::min(float(std::abs(curDeltaHeading)), maxTurnAccel);
-+ const float minTurnAccel = fminf(float(abs(curDeltaHeading)), maxTurnAccel);
- const float rawTurnAccel = Clamp(Sign(curDeltaHeading) * maxTurnAccel, -minTurnAccel, minTurnAccel);
- const float newTurnSpeed = Clamp((*curTurnSpeed) + rawTurnAccel * (1 - owner->IsInAir()), -maxTurnSpeed, maxTurnSpeed);
-+++ rts/Sim/Projectiles/Unsynced/BitmapMuzzleFlame.cpp 2015-04-08 20:20:52 -0400
-@@ -1,4 +1,5 @@
- /* This file is part of the Spring engine (GPL v2 or later), see LICENSE.html */
-
-+#include <math.h>
-
- #include "BitmapMuzzleFlame.h"
-@@ -61,5 +62,5 @@
- const float ilength = length * (igrowth + 1.0f);
-
-- const float3 udir = (std::fabs(dir.dot(UpVector)) >= 0.99f)? FwdVector: UpVector;
-+ const float3 udir = (fabsf(dir.dot(UpVector)) >= 0.99f)? FwdVector: UpVector;
- const float3 xdir = (dir.cross(udir)).SafeANormalize();
- const float3 ydir = (dir.cross(xdir)).SafeANormalize();
diff --git a/games/spring/files/patch-remove-unused-vars b/games/spring/files/patch-remove-unused-vars
deleted file mode 100644
index 5a08e042751b..000000000000
--- a/games/spring/files/patch-remove-unused-vars
+++ /dev/null
@@ -1,156 +0,0 @@
-From
-
-https://github.com/spring/KAIK/commit/42fec4393483d9c0dd049ca84bd230988c2fbdb6
-
---- AI/Skirmish/KAIK/CommandTracker.h
-+++ AI/Skirmish/KAIK/CommandTracker.h
-@@ -15,7 +15,7 @@ class CCommandTracker {
- ai(aic),
- maxCmdsPerFrame(0),
- peakCmdFrame(0),
-- avgCmdSize(0.0f),
-+ //avgCmdSize(0.0f),
- totalCmdSize(0),
- totalNumCmds(0) {
- }
-@@ -31,7 +31,7 @@ class CCommandTracker {
- int maxCmdsPerFrame;
- int peakCmdFrame;
-
-- float avgCmdSize;
-+ //float avgCmdSize;
- int totalCmdSize;
- int totalNumCmds;
- };
---- AI/Skirmish/KAIK/KAIK.cpp
-+++ AI/Skirmish/KAIK/KAIK.cpp
-@@ -107,7 +107,6 @@ void CKAIK::UnitFinished(int unitID) {
-
- void CKAIK::UnitDestroyed(int unitID, int attackerUnitID) {
- if (ai->Initialized()) {
-- attackerUnitID = attackerUnitID;
- ai->econTracker->UnitDestroyed(unitID);
-
- if (ai->GetUnit(unitID)->groupID != -1) {
-@@ -151,10 +150,6 @@ void CKAIK::UnitDamaged(int unitID, int attackerID, float damage, float3 dir) {
- if (ai->GetUnit(unitID)->isDead) {
- return;
- }
--
-- attackerID = attackerID;
-- dir = dir;
--
- ai->econTracker->UnitDamaged(unitID, damage);
- }
- }
-@@ -169,25 +164,25 @@ void CKAIK::UnitMoveFailed(int unitID) {
-
- void CKAIK::EnemyEnterLOS(int enemyUnitID) {
- if (ai->Initialized()) {
-- enemyUnitID = enemyUnitID;
-+ //TODO
- }
- }
-
- void CKAIK::EnemyLeaveLOS(int enemyUnitID) {
- if (ai->Initialized()) {
-- enemyUnitID = enemyUnitID;
-+ //TODO
- }
- }
-
- void CKAIK::EnemyEnterRadar(int enemyUnitID) {
- if (ai->Initialized()) {
-- enemyUnitID = enemyUnitID;
-+ //TODO
- }
- }
-
- void CKAIK::EnemyLeaveRadar(int enemyUnitID) {
- if (ai->Initialized()) {
-- enemyUnitID = enemyUnitID;
-+ //TODO
- }
- }
-
-@@ -201,9 +196,6 @@ void CKAIK::EnemyDestroyed(int enemyUnitID, int attackerUnitID) {
- void CKAIK::EnemyDamaged(int enemyUnitID, int attackerUnitID, float damage, float3 dir) {
- if (ai->Initialized()) {
- ai->thm->EnemyDamaged(enemyUnitID, attackerUnitID);
--
-- damage = damage;
-- dir = dir;
- }
- }
-
-@@ -222,7 +214,6 @@ void CKAIK::EnemyFinished(int enemyUnitID) {
-
- void CKAIK::RecvChatMessage(const char* msg, int player) {
- if (ai->Initialized()) {
-- player = player;
-
- if ((msg = strstr(msg, "KAIK::")) == NULL) {
- return;
---- AI/Skirmish/KAIK/MetalMap.cpp
-+++ AI/Skirmish/KAIK/MetalMap.cpp
-@@ -219,8 +219,6 @@ void CMetalMap::GetMetalPoints() {
- }
- }
-
-- // comment out for debug
-- TotalMetal = TotalMetal;
- }
-
- // set that spot's metal making ability (divide by cells to values are small)
---- AI/Skirmish/KAIK/MetalMap.h
-+++ AI/Skirmish/KAIK/MetalMap.h
-@@ -36,7 +36,7 @@ class CMetalMap {
- int TempMetal;
- int coordx;
- int coordy;
-- int Minradius;
-+ //int Minradius;
- int MinMetalForSpot;
- int XtractorRadius; // in metal map units
- int DoubleRadius; // in metal map units
---- AI/Skirmish/KAIK/MicroPather.cpp
-+++ AI/Skirmish/KAIK/MicroPather.cpp
-@@ -60,7 +60,7 @@ using namespace NSMicroPather;
- class OpenQueueBH {
- public:
-
-- OpenQueueBH(AIClasses* ai, PathNode** heapArray): ai(ai), size(0) {
-+ OpenQueueBH(AIClasses* ai, PathNode** heapArray): size(0) {
- this->heapArray = heapArray;
- }
-
-@@ -174,7 +174,6 @@ class OpenQueueBH {
-
- private:
- PathNode** heapArray;
-- AIClasses* ai;
- int size;
- };
-
---- AI/Skirmish/KAIK/Unit.cpp
-+++ AI/Skirmish/KAIK/Unit.cpp
-@@ -93,8 +93,7 @@ bool CUNIT::CanAttack(int otherUnit) const {
- return false;
- }
-
--bool CUNIT::CanAttackMe(int otherUnit) const {
-- otherUnit = otherUnit;
-+bool CUNIT::CanAttackMe(int /*otherUnit*/) const {
- // TODO: the function above, in reverse
- return true;
- }
---- AI/Skirmish/KAIK/UnitHandler.cpp
-+++ AI/Skirmish/KAIK/UnitHandler.cpp
-@@ -117,7 +117,6 @@ void CUnitHandler::IdleUnitUpdate(int frame) {
- }
-
- void CUnitHandler::UnitMoveFailed(int unitID) {
-- unitID = unitID;
- }
-
- // called when unit nanoframe first created
diff --git a/games/spring/files/patch-rts-System-Platform-CpuID b/games/spring/files/patch-rts-System-Platform-CpuID
deleted file mode 100644
index 435bb706d66f..000000000000
--- a/games/spring/files/patch-rts-System-Platform-CpuID
+++ /dev/null
@@ -1,11 +0,0 @@
-Obtained from: http://www.viva64.com/en/b/0293/
-
---- rts/System/Platform/CpuID.cpp 2014-10-07 16:09:51 -0400
-+++ rts/System/Platform/CpuID.cpp 2015-04-07 20:23:18 -0400
-@@ -142,5 +142,5 @@
- ExecCPUID(&eax, &ebx, &ecx, &edx);
-
-- if ((ebx && 0xFFFF) == 0)
-+ if ((ebx & 0xFFFF) == 0)
- return;
-
diff --git a/games/spring/files/patch-rts-System-Platform-Linux-CrashHandler b/games/spring/files/patch-rts-System-Platform-Linux-CrashHandler
deleted file mode 100644
index 3d20dae85a07..000000000000
--- a/games/spring/files/patch-rts-System-Platform-Linux-CrashHandler
+++ /dev/null
@@ -1,8 +0,0 @@
-+++ rts/System/Platform/Linux/CrashHandler.cpp 2015-04-08 20:09:33 -0400
-@@ -344,5 +344,5 @@
- boost::this_thread::sleep(boost::posix_time::seconds(10));
*** 732 LINES SKIPPED ***