git: 0f57a0feb817 - main - games/vcmi: the port had been updated to version 1.1.1
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 01 Mar 2023 12:16:46 UTC
The branch main has been updated by danfe: URL: https://cgit.FreeBSD.org/ports/commit/?id=0f57a0feb817e543debe018615c2678f375c541d commit 0f57a0feb817e543debe018615c2678f375c541d Author: Alexey Dokuchaev <danfe@FreeBSD.org> AuthorDate: 2023-03-01 12:15:40 +0000 Commit: Alexey Dokuchaev <danfe@FreeBSD.org> CommitDate: 2023-03-01 12:15:40 +0000 games/vcmi: the port had been updated to version 1.1.1 Rather than hardcoding socket buffer size to 4MB, set it based on the ``kern.ipc.maxsockbuf'' sysctl value*. Reported by: portscout *) https://bugs.vcmi.eu/view.php?id=3027 --- games/vcmi/Makefile | 4 ++-- games/vcmi/distinfo | 6 ++--- .../vcmi/files/patch-lib_serializer_Connection.cpp | 26 ++++++++++++++++++++++ 3 files changed, 31 insertions(+), 5 deletions(-) diff --git a/games/vcmi/Makefile b/games/vcmi/Makefile index 1c083d5a6a09..78b98d9ae40f 100644 --- a/games/vcmi/Makefile +++ b/games/vcmi/Makefile @@ -1,5 +1,5 @@ PORTNAME= vcmi -PORTVERSION= 1.1.0 +PORTVERSION= 1.1.1 CATEGORIES= games MAINTAINER= danfe@FreeBSD.org @@ -36,7 +36,7 @@ QT_USE= QT=buildtools:build,qmake:build,core,gui,network,widgets QT_CMAKE_OFF= -DENABLE_LAUNCHER:BOOL=OFF -DENABLE_EDITOR:BOOL=OFF post-configure: - ${SED} -e 's,@GIT_SHA1@,5278271,' ${WRKSRC}/Version.cpp.in \ + ${SED} -e 's,@GIT_SHA1@,b429f0b,' ${WRKSRC}/Version.cpp.in \ > ${BUILD_WRKSRC}/Version.cpp post-install-DOCS-on: diff --git a/games/vcmi/distinfo b/games/vcmi/distinfo index dea8d6a9dc6d..375d1249de6a 100644 --- a/games/vcmi/distinfo +++ b/games/vcmi/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1671792720 -SHA256 (vcmi-vcmi-1.1.0_GH0.tar.gz) = 39db3ac7a2d1e386be1982957c0746e4e47f0d6a57268a57e65df9c95c967474 -SIZE (vcmi-vcmi-1.1.0_GH0.tar.gz) = 6412813 +TIMESTAMP = 1675416308 +SHA256 (vcmi-vcmi-1.1.1_GH0.tar.gz) = 41cf343e45a3c1f4ddf95e97697c25e68e40b93f681c0b9d631b3c9d1608a49b +SIZE (vcmi-vcmi-1.1.1_GH0.tar.gz) = 6412309 diff --git a/games/vcmi/files/patch-lib_serializer_Connection.cpp b/games/vcmi/files/patch-lib_serializer_Connection.cpp new file mode 100644 index 000000000000..8d7f2389e1a3 --- /dev/null +++ b/games/vcmi/files/patch-lib_serializer_Connection.cpp @@ -0,0 +1,26 @@ +--- lib/serializer/Connection.cpp.orig 2023-02-03 09:25:08 UTC ++++ lib/serializer/Connection.cpp +@@ -15,6 +15,7 @@ + #include "../CGameState.h" + + #include <boost/asio.hpp> ++#include <sys/sysctl.h> + + VCMI_LIB_NAMESPACE_BEGIN + +@@ -46,8 +47,13 @@ void CConnection::init() + socket->set_option(boost::asio::ip::tcp::no_delay(true)); + try + { +- socket->set_option(boost::asio::socket_base::send_buffer_size(4194304)); +- socket->set_option(boost::asio::socket_base::receive_buffer_size(4194304)); ++ unsigned long sb_max, sb_max_adj; ++ size_t len = sizeof(sb_max); ++ (void)sysctlbyname("kern.ipc.maxsockbuf", &sb_max, &len, NULL, 0); ++ sb_max_adj = sb_max * MCLBYTES / (MSIZE + MCLBYTES); ++ ++ socket->set_option(boost::asio::socket_base::send_buffer_size(sb_max_adj)); ++ socket->set_option(boost::asio::socket_base::receive_buffer_size(sb_max_adj)); + } + catch (const boost::system::system_error & e) + {