pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
widelands: Switch from boost/asio to asio.
Module Name: pkgsrc-wip
Committed By: Paul Ripke <stix%stix.id.au@localhost>
Pushed By: stix
Date: Sun Jul 28 23:42:19 2024 +1000
Changeset: b5804235eab730b5cdd3962c08df677b978af238
Modified Files:
widelands/Makefile
widelands/distinfo
Removed Files:
widelands/patches/patch-src_network_bufferedconnection.cc
widelands/patches/patch-src_network_nethost.cc
widelands/patches/patch-src_network_network.cc
widelands/patches/patch-src_network_network.h
widelands/patches/patch-src_network_network__lan__promotion.cc
Log Message:
widelands: Switch from boost/asio to asio.
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=b5804235eab730b5cdd3962c08df677b978af238
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
widelands/Makefile | 3 +-
widelands/distinfo | 5 --
.../patch-src_network_bufferedconnection.cc | 54 ----------------------
widelands/patches/patch-src_network_nethost.cc | 15 ------
widelands/patches/patch-src_network_network.cc | 15 ------
widelands/patches/patch-src_network_network.h | 24 ----------
.../patch-src_network_network__lan__promotion.cc | 51 --------------------
7 files changed, 1 insertion(+), 166 deletions(-)
diffs:
diff --git a/widelands/Makefile b/widelands/Makefile
index 04184265d8..1d7fd1b4e7 100644
--- a/widelands/Makefile
+++ b/widelands/Makefile
@@ -59,8 +59,7 @@ post-install:
.include "../../archivers/minizip/buildlink3.mk"
.include "../../audio/SDL2_mixer/buildlink3.mk"
.include "../../devel/SDL2/buildlink3.mk"
-.include "../../devel/boost-headers/buildlink3.mk"
-.include "../../devel/boost-libs/buildlink3.mk"
+.include "../../devel/asio/buildlink3.mk"
.include "../../devel/cmake/build.mk"
.include "../../devel/zlib/buildlink3.mk"
.include "../../fonts/SDL2_ttf/buildlink3.mk"
diff --git a/widelands/distinfo b/widelands/distinfo
index 398b8cb69a..6f85bb9129 100644
--- a/widelands/distinfo
+++ b/widelands/distinfo
@@ -8,9 +8,4 @@ SHA1 (patch-src_CMakeLists.txt) = f833ae4b06e81cc7a147e1e5a03c02fad92370c1
SHA1 (patch-src_base_i18n.cc) = 785cdfaca59f929de14dde96386f9e9cfca27e21
SHA1 (patch-src_base_i18n.h) = 687296e3e654e3ed09e648a83571e282ed251bfb
SHA1 (patch-src_graphic_text_textstream.cc) = 5ea49e63daf5b573d0257f53730d4e547c0b7fe4
-SHA1 (patch-src_network_bufferedconnection.cc) = b0d33bd578b408e969d5ebc591489825d9744a6c
-SHA1 (patch-src_network_nethost.cc) = b35e2b1d9b776ec5a9113ecf1031627b0933b712
-SHA1 (patch-src_network_network.cc) = 3f2b24533e3657103c6c05d2a425fb7850e35f4f
-SHA1 (patch-src_network_network.h) = 1f4ce455e2de0e91e9760e13df8fbba68a58ab20
-SHA1 (patch-src_network_network__lan__promotion.cc) = 5cea8998d422c3645e032d212847b40c121a21ec
SHA1 (patch-xdg_CMakeLists.txt) = ce08eacbfbf9d32b6c72e411538adb0472d58851
diff --git a/widelands/patches/patch-src_network_bufferedconnection.cc b/widelands/patches/patch-src_network_bufferedconnection.cc
deleted file mode 100644
index 0974ff9858..0000000000
--- a/widelands/patches/patch-src_network_bufferedconnection.cc
+++ /dev/null
@@ -1,54 +0,0 @@
-$NetBSD$
-
-Use boost error_code instead of std::error_code.
-
---- src/network/bufferedconnection.cc.orig 2024-04-01 05:38:03.875284374 +0000
-+++ src/network/bufferedconnection.cc
-@@ -132,7 +132,7 @@ bool BufferedConnection::is_connected()
- }
-
- void BufferedConnection::close() {
-- std::error_code ec;
-+ boost::system::error_code ec;
- asio::ip::tcp::endpoint remote = socket_.remote_endpoint(ec);
- if (!ec) {
- verb_log_info("[BufferedConnection] Closing network socket connected to %s:%i.",
-@@ -249,9 +249,9 @@ void BufferedConnection::start_sending()
- asio::async_write(
- socket_, asio::buffer(nonempty_queue->front()),
- #ifndef NDEBUG
-- [this, nonempty_queue](std::error_code ec, std::size_t length) {
-+ [this, nonempty_queue](boost::system::error_code ec, std::size_t length) {
- #else
-- [this, nonempty_queue](std::error_code ec, std::size_t /*length*/) {
-+ [this, nonempty_queue](boost::system::error_code ec, std::size_t /*length*/) {
- #endif
- std::unique_lock<std::mutex> lock2(mutex_send_);
- currently_sending_ = false;
-@@ -285,7 +285,7 @@ void BufferedConnection::start_receiving
-
- socket_.async_read_some(
- asio::buffer(asio_receive_buffer_, kNetworkBufferSize),
-- [this](std::error_code ec, std::size_t length) {
-+ [this](boost::system::error_code ec, std::size_t length) {
- if (!ec) {
- assert(length > 0);
- assert(length <= kNetworkBufferSize);
-@@ -319,7 +319,7 @@ void BufferedConnection::reduce_send_buf
- // Reduce the size of the send buffer. This will result in (slightly) slower
- // file transfers but keeps the program responsive (e.g., chat messages are
- // displayed) while transmitting files
-- std::error_code ec;
-+ boost::system::error_code ec;
- asio::socket_base::send_buffer_size send_buffer_size;
- socket.get_option(send_buffer_size, ec);
- if (!ec && send_buffer_size.value() > 20 * static_cast<int>(kNetworkBufferSize)) {
-@@ -340,7 +340,7 @@ BufferedConnection::BufferedConnection(c
-
- verb_log_info("[BufferedConnection] Trying to connect to %s:%u ... ",
- host.ip.to_string().c_str(), host.port);
-- std::error_code ec;
-+ boost::system::error_code ec;
- socket_.connect(destination, ec);
- if (!ec && is_connected()) {
- verb_log_info("success.\n");
diff --git a/widelands/patches/patch-src_network_nethost.cc b/widelands/patches/patch-src_network_nethost.cc
deleted file mode 100644
index ca7eae74a1..0000000000
--- a/widelands/patches/patch-src_network_nethost.cc
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD$
-
-Use boost error_code instead of std::error_code.
-
---- src/network/nethost.cc.orig 2024-04-01 05:54:57.282840757 +0000
-+++ src/network/nethost.cc
-@@ -83,7 +83,7 @@ void NetHost::stop_listening() {
- assert(!asio_thread_.joinable());
-
- static const auto do_stop = [](asio::ip::tcp::acceptor& acceptor) {
-- std::error_code ec;
-+ boost::system::error_code ec;
- if (acceptor.is_open()) {
- verb_log_info("[NetHost] Closing a listening IPv%d socket.", get_ip_version(acceptor));
- acceptor.close(ec);
diff --git a/widelands/patches/patch-src_network_network.cc b/widelands/patches/patch-src_network_network.cc
deleted file mode 100644
index 2a3e366da4..0000000000
--- a/widelands/patches/patch-src_network_network.cc
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD$
-
-Use boost error_code instead of std::error_code.
-
---- src/network/network.cc.orig 2024-04-01 05:56:26.201386553 +0000
-+++ src/network/network.cc
-@@ -63,7 +63,7 @@ bool NetAddress::resolve_to_v6(NetAddres
- }
-
- bool NetAddress::parse_ip(NetAddress* addr, const std::string& ip, uint16_t port) {
-- std::error_code ec;
-+ boost::system::error_code ec;
- asio::ip::address new_addr = asio::ip::address::from_string(ip, ec);
- if (ec) {
- return false;
diff --git a/widelands/patches/patch-src_network_network.h b/widelands/patches/patch-src_network_network.h
deleted file mode 100644
index 8f2a884358..0000000000
--- a/widelands/patches/patch-src_network_network.h
+++ /dev/null
@@ -1,24 +0,0 @@
-$NetBSD$
-
-Fix building against boost.
-
---- src/network/network.h.orig 2024-04-01 04:20:25.359497690 +0000
-+++ src/network/network.h
-@@ -21,7 +21,7 @@
-
- #include <functional>
-
--#include <asio.hpp>
-+#include <boost/asio.hpp>
-
- #include "base/string.h"
- #include "base/wexception.h"
-@@ -32,6 +32,8 @@
-
- constexpr size_t kNetworkBufferSize = 512;
-
-+using namespace boost;
-+
- /**
- * Simple structure to hold the IP address and port of a server.
- * This structure must not contain a hostname but only IP addresses.
diff --git a/widelands/patches/patch-src_network_network__lan__promotion.cc b/widelands/patches/patch-src_network_network__lan__promotion.cc
deleted file mode 100644
index b1360c71a9..0000000000
--- a/widelands/patches/patch-src_network_network__lan__promotion.cc
+++ /dev/null
@@ -1,51 +0,0 @@
-$NetBSD$
-
-Use boost error_code instead of std::error_code.
-
---- src/network/network_lan_promotion.cc.orig 2024-04-01 05:51:09.592667624 +0000
-+++ src/network/network_lan_promotion.cc
-@@ -156,7 +156,7 @@ LanBase::~LanBase() {
-
- bool LanBase::is_available() {
- const auto do_is_available = [this](asio::ip::udp::socket& socket) -> bool {
-- std::error_code ec;
-+ boost::system::error_code ec;
- bool available = (socket.is_open() && socket.available(ec) > 0);
- if (ec) {
- log_err("[LAN] Error when checking whether data is available on IPv%d socket, closing it: "
-@@ -212,7 +212,7 @@ size_t LanBase::receive(void* const buf,
- }
-
- bool LanBase::send(void const* const buf, size_t const len, const NetAddress& addr) {
-- std::error_code ec;
-+ boost::system::error_code ec;
- assert(addr.is_valid());
- // If this assert failed, then there is some bug in the code. NetAddress should only be filled
- // with valid IP addresses (e.g. no hostnames)
-@@ -249,7 +249,7 @@ bool LanBase::broadcast(void const* cons
- const auto do_broadcast = [this, buf, len, port](
- asio::ip::udp::socket& socket, const std::string& address) -> bool {
- if (socket.is_open()) {
-- std::error_code ec;
-+ boost::system::error_code ec;
- asio::ip::udp::endpoint destination(asio::ip::address::from_string(address), port);
- socket.send_to(asio::buffer(buf, len), destination, 0, ec);
- if (!ec) {
-@@ -308,7 +308,7 @@ void LanBase::start_socket(asio::ip::udp
- return;
- }
-
-- std::error_code ec;
-+ boost::system::error_code ec;
- // Try to open the socket
- socket->open(version, ec);
- if (ec) {
-@@ -363,7 +363,7 @@ void LanBase::report_network_error() {
- }
-
- void LanBase::close_socket(asio::ip::udp::socket* socket) {
-- std::error_code ec;
-+ boost::system::error_code ec;
- if (socket->is_open()) {
- const asio::ip::udp::endpoint& endpoint = socket->local_endpoint(ec);
- if (!ec) {
Home |
Main Index |
Thread Index |
Old Index