Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 8 Dec 2024 15:32:11 GMT
From:      Alexey Dokuchaev <danfe@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 8ceb12848eb0 - main - games/vcmi: try to unbreak the port's build against new Boost
Message-ID:  <202412081532.4B8FWBwU061201@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by danfe:

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

commit 8ceb12848eb008962a5ed999c0e04d00fe6a011e
Author:     Alexey Dokuchaev <danfe@FreeBSD.org>
AuthorDate: 2024-12-08 15:30:52 +0000
Commit:     Alexey Dokuchaev <danfe@FreeBSD.org>
CommitDate: 2024-12-08 15:30:52 +0000

    games/vcmi: try to unbreak the port's build against new Boost
    
    Obtained from:  Arch Linux (AUR) and upstream GitHub
---
 games/vcmi/Makefile                            |  2 --
 games/vcmi/files/patch-client_ServerRunner.cpp | 33 ++++++++++++++++++++++++++
 games/vcmi/files/patch-client_ServerRunner.h   | 20 ++++++++++++++++
 3 files changed, 53 insertions(+), 2 deletions(-)

diff --git a/games/vcmi/Makefile b/games/vcmi/Makefile
index 39d236795744..8dc6ac1ef785 100644
--- a/games/vcmi/Makefile
+++ b/games/vcmi/Makefile
@@ -9,8 +9,6 @@ WWW=		https://vcmi.eu/
 
 LICENSE=	GPLv2+
 
-BROKEN=		fails to build with boost-1.86+
-
 LIB_DEPENDS=	libavcodec.so:multimedia/ffmpeg \
 		libboost_atomic.so:devel/boost-libs \
 		libfuzzylite.so:devel/fuzzylite \
diff --git a/games/vcmi/files/patch-client_ServerRunner.cpp b/games/vcmi/files/patch-client_ServerRunner.cpp
new file mode 100644
index 000000000000..984ed888de64
--- /dev/null
+++ b/games/vcmi/files/patch-client_ServerRunner.cpp
@@ -0,0 +1,33 @@
+--- client/ServerRunner.cpp.orig	2024-08-25 21:27:47 UTC
++++ client/ServerRunner.cpp
+@@ -9,16 +9,17 @@
+  */
+ #include "StdInc.h"
+ 
++#ifndef VCMI_MOBILE
++#include <boost/process/v1/child.hpp>
++#include <boost/process/v1/io.hpp>
++#endif
++
+ #include "ServerRunner.h"
+ 
+ #include "../lib/VCMIDirs.h"
+ #include "../lib/CThreadHelper.h"
+ #include "../server/CVCMIServer.h"
+ 
+-#ifndef VCMI_MOBILE
+-#include <boost/process/child.hpp>
+-#include <boost/process/io.hpp>
+-#endif
+ 
+ ServerThreadRunner::ServerThreadRunner() = default;
+ ServerThreadRunner::~ServerThreadRunner() = default;
+@@ -84,7 +85,7 @@ void ServerProcessRunner::start(uint16_t port, bool co
+ 		args.push_back("--lobby");
+ 
+ 	std::error_code ec;
+-	child = std::make_unique<boost::process::child>(serverPath, args, ec, boost::process::std_out > logPath);
++	child = std::make_unique<boost::process::v1::child>(serverPath, args, ec, boost::process::v1::std_out > logPath);
+ 
+ 	if (ec)
+ 		throw std::runtime_error("Failed to start server! Reason: " + ec.message());
diff --git a/games/vcmi/files/patch-client_ServerRunner.h b/games/vcmi/files/patch-client_ServerRunner.h
new file mode 100644
index 000000000000..feec7e0f48df
--- /dev/null
+++ b/games/vcmi/files/patch-client_ServerRunner.h
@@ -0,0 +1,20 @@
+--- client/ServerRunner.h.orig	2024-08-25 21:27:47 UTC
++++ client/ServerRunner.h
+@@ -45,7 +45,7 @@ class ServerThreadRunner : public IServerRunner, boost
+ 
+ #ifndef VCMI_MOBILE
+ 
+-namespace boost::process {
++namespace boost::process::v1 {
+ class child;
+ }
+ 
+@@ -53,7 +53,7 @@ class child;
+ /// Available only on desktop systems where process management is allowed
+ class ServerProcessRunner : public IServerRunner, boost::noncopyable
+ {
+-	std::unique_ptr<boost::process::child> child;
++	std::unique_ptr<boost::process::v1::child> child;
+ 
+ public:
+ 	void start(uint16_t port, bool connectToLobby, std::shared_ptr<StartInfo> startingInfo) override;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202412081532.4B8FWBwU061201>