pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
prusaslicer: Fix build with pkgsrc-2025Q1
Module Name: pkgsrc-wip
Committed By: Paul Ripke <stix%stix.id.au@localhost>
Pushed By: stix
Date: Sun Apr 6 13:34:04 2025 +1000
Changeset: 5cb83a28694a695fe2dacfebac8b6c3096982b31
Modified Files:
prusaslicer/Makefile
prusaslicer/distinfo
prusaslicer/patches/patch-src_libslic3r_GCodeSender.cpp
prusaslicer/patches/patch-src_slic3r_Utils_Serial.cpp
Added Files:
prusaslicer/patches/patch-src_libslic3r_GCodeSender.hpp
prusaslicer/patches/patch-src_slic3r_GUI_FirmwareDialog.cpp
prusaslicer/patches/patch-src_slic3r_Utils_Bonjour.cpp
prusaslicer/patches/patch-src_slic3r_Utils_Bonjour.hpp
prusaslicer/patches/patch-src_slic3r_Utils_Serial.hpp
prusaslicer/patches/patch-src_slic3r_Utils_TCPConsole.cpp
Log Message:
prusaslicer: Fix build with pkgsrc-2025Q1
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=5cb83a28694a695fe2dacfebac8b6c3096982b31
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
prusaslicer/Makefile | 9 +-
prusaslicer/distinfo | 10 +-
.../patches/patch-src_libslic3r_GCodeSender.cpp | 18 +-
.../patches/patch-src_libslic3r_GCodeSender.hpp | 16 ++
.../patch-src_slic3r_GUI_FirmwareDialog.cpp | 16 ++
.../patches/patch-src_slic3r_Utils_Bonjour.cpp | 182 +++++++++++++++++++++
.../patches/patch-src_slic3r_Utils_Bonjour.hpp | 74 +++++++++
.../patches/patch-src_slic3r_Utils_Serial.cpp | 55 ++++++-
.../patches/patch-src_slic3r_Utils_Serial.hpp | 18 ++
.../patches/patch-src_slic3r_Utils_TCPConsole.cpp | 24 +++
10 files changed, 413 insertions(+), 9 deletions(-)
diffs:
diff --git a/prusaslicer/Makefile b/prusaslicer/Makefile
index 3bcc8ec4fe..50a3860735 100644
--- a/prusaslicer/Makefile
+++ b/prusaslicer/Makefile
@@ -26,6 +26,11 @@ ICON_THEMES= yes
BUILDLINK_TRANSFORM.NetBSD+= rm:-ldl
BUILDLINK_TRANSFORM.NetBSD+= l:libexpat:expat
+BUILDLINK_TRANSFORM+= rm:-lTKXDESTEP
+BUILDLINK_TRANSFORM+= rm:-lTKSTEP
+BUILDLINK_TRANSFORM+= rm:-lTKSTEP209
+BUILDLINK_TRANSFORM+= rm:-lTKSTEPAttr
+BUILDLINK_TRANSFORM+= rm:-lTKSTEPBase
.include "../../mk/bsd.prefs.mk"
.include "options.mk"
@@ -36,6 +41,7 @@ CMAKE_CONFIGURE_ARGS+= -DSLIC3R_PCH:BOOL=FALSE
.include "../../archivers/brotli/buildlink3.mk"
.include "../../comms/libhidapi/buildlink3.mk"
.include "../../databases/shared-mime-info/buildlink3.mk"
+.include "../../devel/asio/buildlink3.mk"
.include "../../devel/at-spi2-core/buildlink3.mk"
.include "../../devel/boost-headers/buildlink3.mk"
.include "../../devel/boost-libs/buildlink3.mk"
@@ -50,6 +56,7 @@ CMAKE_CONFIGURE_ARGS+= -DSLIC3R_PCH:BOOL=FALSE
.include "../../devel/zlib/buildlink3.mk"
.include "../../fonts/fontconfig/buildlink3.mk"
.include "../../graphics/cairo/buildlink3.mk"
+.include "../../graphics/freeimage/buildlink3.mk"
.include "../../graphics/freetype2/buildlink3.mk"
.include "../../graphics/glew/buildlink3.mk"
.include "../../graphics/graphite2/buildlink3.mk"
@@ -72,7 +79,7 @@ CMAKE_CONFIGURE_ARGS+= -DSLIC3R_PCH:BOOL=FALSE
.include "../../wip/libbgcode/buildlink3.mk"
.include "../../wip/nanosvg/buildlink3.mk"
.include "../../wip/nlopt/buildlink3.mk"
-.include "../../wip/occt/buildlink3.mk"
+.include "../../cad/occt/buildlink3.mk"
.include "../../wip/openvdb/buildlink3.mk"
.include "../../www/curl/buildlink3.mk"
.include "../../www/webkit-gtk/buildlink3.mk"
diff --git a/prusaslicer/distinfo b/prusaslicer/distinfo
index 3f6c1d8140..7f8a3c6e1d 100644
--- a/prusaslicer/distinfo
+++ b/prusaslicer/distinfo
@@ -12,7 +12,8 @@ SHA1 (patch-bundled__deps_localesutils_LocalesUtils.hpp) = 9c6228e2db7bf4aedb29d
SHA1 (patch-cmake_modules_FindOpenVDB.cmake) = 4f2afc423a70fe60617b33ff7f26859b39775faa
SHA1 (patch-src_libseqarrange_CMakeLists.txt) = ece7856a15a6e24c5a918ced85d7379558e89d47
SHA1 (patch-src_libslic3r_CutSurface.cpp) = a6a702e0fe32bc9b37136299e14c715f62943ab7
-SHA1 (patch-src_libslic3r_GCodeSender.cpp) = bd69c52e92ff85dba7f357eab62788a8e67a440e
+SHA1 (patch-src_libslic3r_GCodeSender.cpp) = de2e506662aae4383f1230409e6d5efac1cfae3a
+SHA1 (patch-src_libslic3r_GCodeSender.hpp) = e069f3c596e102e5f3f1339f29cd1d12a7c82dfb
SHA1 (patch-src_libslic3r_Platform.cpp) = 3066585efc98ba4963e41bda5952df38a7b095a0
SHA1 (patch-src_libslic3r_Platform.hpp) = 5626058616d04396bff6c8550951d04fe03249e4
SHA1 (patch-src_libslic3r_SupportSpotsGenerator.cpp) = b1080470f18e873ad7b39a5e56b4aabd8be87011
@@ -27,6 +28,7 @@ SHA1 (patch-src_slic3r_GUI_DesktopIntegrationDialog.hpp) = c8760f69fac22d1a4cf8c
SHA1 (patch-src_slic3r_GUI_EditGCodeDialog.cpp) = 4a66003e5eb8f78961560cdf5f4805e7f6b10e0f
SHA1 (patch-src_slic3r_GUI_ExtraRenderers.cpp) = ac803510123ff016b8fa6f22d491c898166e0929
SHA1 (patch-src_slic3r_GUI_Field.cpp) = a0901064c68aa5e6c2396ccec36018e45f92fbcb
+SHA1 (patch-src_slic3r_GUI_FirmwareDialog.cpp) = bf86d0f4e4aed49c4ffd0ecd49ec57fbe4884afa
SHA1 (patch-src_slic3r_GUI_GLCanvas3D.cpp) = 11e42a87d7124ac92027af9e385533f0455d788b
SHA1 (patch-src_slic3r_GUI_GUI.cpp) = ab8bb26e14f17eed20587693ac1ef568b8cd8cd5
SHA1 (patch-src_slic3r_GUI_GUI.hpp) = 52442f3881564cfe7c31ff51d63c96129f162aed
@@ -58,8 +60,12 @@ SHA1 (patch-src_slic3r_GUI_UserAccountCommunication.cpp) = 1467c25ad13aae19bf6e1
SHA1 (patch-src_slic3r_GUI_WipeTowerDialog.cpp) = fc6fd1bfee7001c268bf50209bcfd1cb96f6a9ad
SHA1 (patch-src_slic3r_GUI_wxExtensions.cpp) = d6e807f3dd1f18fa9c703798067fa1e808112891
SHA1 (patch-src_slic3r_GUI_wxExtensions.hpp) = 356da6dbd7ca7f60fa8a73c51533a1c1ad1530c1
+SHA1 (patch-src_slic3r_Utils_Bonjour.cpp) = 0c1d80f258ff00bf44df658682a2ef62b3414aba
+SHA1 (patch-src_slic3r_Utils_Bonjour.hpp) = 698bfb239d07da387846c64f42e671d1df71e36f
SHA1 (patch-src_slic3r_Utils_FontConfigHelp.hpp) = 807c71e904bb5b5c882bc6a72161a5276d1ab4d3
-SHA1 (patch-src_slic3r_Utils_Serial.cpp) = 77dbb4e3526e932c04b8020b6f808278d1319bdb
+SHA1 (patch-src_slic3r_Utils_Serial.cpp) = 797684a2f75e99fe9de32ab89fc45afd67945f8e
+SHA1 (patch-src_slic3r_Utils_Serial.hpp) = 3ca6e1c4a1466535435a63865a69d97f95323bec
+SHA1 (patch-src_slic3r_Utils_TCPConsole.cpp) = 2ff717204f0a229b1c36d42b3a01cfdb96a531cc
SHA1 (patch-src_slic3r_Utils_WifiScanner.cpp) = a7c8d6dfb43ddaca651df13b487b43dd51b32719
SHA1 (patch-src_slic3r_Utils_WxFontUtils.cpp) = 75d657b3c8af52eee7aa130a895760c4203fef78
SHA1 (patch-tests_CMakeLists.txt) = 654e13b89f1c3575dcd4f9ff0e3cf2fb353c3944
diff --git a/prusaslicer/patches/patch-src_libslic3r_GCodeSender.cpp b/prusaslicer/patches/patch-src_libslic3r_GCodeSender.cpp
index faeee34e51..f6231dab72 100644
--- a/prusaslicer/patches/patch-src_libslic3r_GCodeSender.cpp
+++ b/prusaslicer/patches/patch-src_libslic3r_GCodeSender.cpp
@@ -2,9 +2,12 @@ $NetBSD$
Treat NetBSD the same as OpenBSD.
---- src/libslic3r/GCodeSender.cpp.orig 2022-03-10 10:35:03.000000000 +0000
+Fix boost 1.87 compatibility.
+https://github.com/prusa3d/PrusaSlicer/issues/13799
+
+--- src/libslic3r/GCodeSender.cpp.orig 2025-03-10 13:20:54.000000000 +0000
+++ src/libslic3r/GCodeSender.cpp
-@@ -8,7 +8,7 @@
+@@ -14,7 +14,7 @@
#include <boost/date_time/posix_time/posix_time.hpp>
#include <boost/lexical_cast.hpp>
@@ -13,7 +16,16 @@ Treat NetBSD the same as OpenBSD.
#include <termios.h>
#endif
#ifdef __APPLE__
-@@ -146,7 +146,7 @@ GCodeSender::set_baud_rate(unsigned int
+@@ -113,7 +113,7 @@ GCodeSender::connect(std::string devname
+ this->io.post(boost::bind(&GCodeSender::do_read, this));
+
+ // start reading in the background thread
+- boost::thread t(boost::bind(&boost::asio::io_service::run, &this->io));
++ boost::thread t(boost::bind(&boost::asio::io_context::run, &this->io));
+ this->background_thread.swap(t);
+
+ // always send a M105 to check for connection because firmware might be silent on connect
+@@ -152,7 +152,7 @@ GCodeSender::set_baud_rate(unsigned int
if (ioctl(handle, TCSETS2, &ios))
printf("Error in TCSETS2: %s\n", strerror(errno));
diff --git a/prusaslicer/patches/patch-src_libslic3r_GCodeSender.hpp b/prusaslicer/patches/patch-src_libslic3r_GCodeSender.hpp
new file mode 100644
index 0000000000..3fcea4c79c
--- /dev/null
+++ b/prusaslicer/patches/patch-src_libslic3r_GCodeSender.hpp
@@ -0,0 +1,16 @@
+$NetBSD$
+
+Fix boost 1.87 compatibility.
+https://github.com/prusa3d/PrusaSlicer/issues/13799
+
+--- src/libslic3r/GCodeSender.hpp.orig 2025-04-06 03:04:34.934454695 +0000
++++ src/libslic3r/GCodeSender.hpp
+@@ -40,7 +40,7 @@ class GCodeSender : private boost::nonco
+ void reset();
+
+ private:
+- asio::io_service io;
++ asio::io_context io;
+ asio::serial_port serial;
+ boost::thread background_thread;
+ boost::asio::streambuf read_buffer, write_buffer;
diff --git a/prusaslicer/patches/patch-src_slic3r_GUI_FirmwareDialog.cpp b/prusaslicer/patches/patch-src_slic3r_GUI_FirmwareDialog.cpp
new file mode 100644
index 0000000000..2d35e926ac
--- /dev/null
+++ b/prusaslicer/patches/patch-src_slic3r_GUI_FirmwareDialog.cpp
@@ -0,0 +1,16 @@
+$NetBSD$
+
+Fix boost 1.87 compatibility.
+https://github.com/prusa3d/PrusaSlicer/issues/13799
+
+--- src/slic3r/GUI/FirmwareDialog.cpp.orig 2025-04-06 03:05:16.783171575 +0000
++++ src/slic3r/GUI/FirmwareDialog.cpp
+@@ -429,7 +429,7 @@ void FirmwareDialog::priv::avr109_wait_f
+
+ void FirmwareDialog::priv::avr109_reboot(const SerialPortInfo &port)
+ {
+- asio::io_service io;
++ asio::io_context io;
+ Serial serial(io, port.port, 1200);
+ std::this_thread::sleep_for(std::chrono::milliseconds(50));
+ }
diff --git a/prusaslicer/patches/patch-src_slic3r_Utils_Bonjour.cpp b/prusaslicer/patches/patch-src_slic3r_Utils_Bonjour.cpp
new file mode 100644
index 0000000000..13aa8614e6
--- /dev/null
+++ b/prusaslicer/patches/patch-src_slic3r_Utils_Bonjour.cpp
@@ -0,0 +1,182 @@
+$NetBSD$
+
+Fix boost 1.87 compatibility.
+https://github.com/prusa3d/PrusaSlicer/issues/13799
+
+--- src/slic3r/Utils/Bonjour.cpp.orig 2025-04-06 03:06:15.057212033 +0000
++++ src/slic3r/Utils/Bonjour.cpp
+@@ -624,11 +624,11 @@ UdpSession::UdpSession(Bonjour::ReplyFn
+ buffer.resize(DnsMessage::MAX_SIZE);
+ }
+
+-UdpSocket::UdpSocket( Bonjour::ReplyFn replyfn, const asio::ip::address& multicast_address, const asio::ip::address& interface_address, std::shared_ptr< boost::asio::io_service > io_service)
++UdpSocket::UdpSocket( Bonjour::ReplyFn replyfn, const asio::ip::address& multicast_address, const asio::ip::address& interface_address, std::shared_ptr< boost::asio::io_context > io_context)
+ : replyfn(replyfn)
+ , multicast_address(multicast_address)
+- , socket(*io_service)
+- , io_service(io_service)
++ , socket(*io_context)
++ , io_context(io_context)
+ {
+ try {
+ // open socket
+@@ -658,11 +658,11 @@ UdpSocket::UdpSocket( Bonjour::ReplyFn r
+ }
+
+
+-UdpSocket::UdpSocket( Bonjour::ReplyFn replyfn, const asio::ip::address& multicast_address, std::shared_ptr< boost::asio::io_service > io_service)
++UdpSocket::UdpSocket( Bonjour::ReplyFn replyfn, const asio::ip::address& multicast_address, std::shared_ptr< boost::asio::io_context > io_context)
+ : replyfn(replyfn)
+ , multicast_address(multicast_address)
+- , socket(*io_service)
+- , io_service(io_service)
++ , socket(*io_context)
++ , io_context(io_context)
+ {
+ try {
+ // open socket
+@@ -714,7 +714,7 @@ void UdpSocket::receive_handler(SharedSe
+ // let io_service to handle the datagram on session
+ // from boost documentation io_service::post:
+ // The io_service guarantees that the handler will only be called in a thread in which the run(), run_one(), poll() or poll_one() member functions is currently being invoked.
+- io_service->post(boost::bind(&UdpSession::handle_receive, session, error, bytes));
++ io_context->post(boost::bind(&UdpSession::handle_receive, session, error, bytes));
+ // immediately accept new datagrams
+ async_receive();
+ }
+@@ -871,13 +871,13 @@ void Bonjour::priv::lookup_perform()
+ {
+ service_dn = (boost::format("_%1%._%2%.local") % service % protocol).str();
+
+- std::shared_ptr< boost::asio::io_service > io_service(new boost::asio::io_service);
++ std::shared_ptr< boost::asio::io_context > io_context(new boost::asio::io_context);
+
+ std::vector<LookupSocket*> sockets;
+
+ // resolve intefaces - from PR#6646
+ std::vector<boost::asio::ip::address> interfaces;
+- asio::ip::udp::resolver resolver(*io_service);
++ asio::ip::udp::resolver resolver(*io_context);
+ boost::system::error_code ec;
+ // ipv4 interfaces
+ auto results = resolver.resolve(udp::v4(), asio::ip::host_name(), "", ec);
+@@ -890,12 +890,12 @@ void Bonjour::priv::lookup_perform()
+ // create ipv4 socket for each interface
+ // each will send to querry to for both ipv4 and ipv6
+ for (const auto& intrfc : interfaces)
+- sockets.emplace_back(new LookupSocket(txt_keys, service, service_dn, protocol, replyfn, BonjourRequest::MCAST_IP4, intrfc, io_service));
++ sockets.emplace_back(new LookupSocket(txt_keys, service, service_dn, protocol, replyfn, BonjourRequest::MCAST_IP4, intrfc, io_context));
+ } else {
+ BOOST_LOG_TRIVIAL(info) << "Failed to resolve ipv4 interfaces: " << ec.message();
+ }
+ if (sockets.empty())
+- sockets.emplace_back(new LookupSocket(txt_keys, service, service_dn, protocol, replyfn, BonjourRequest::MCAST_IP4, io_service));
++ sockets.emplace_back(new LookupSocket(txt_keys, service, service_dn, protocol, replyfn, BonjourRequest::MCAST_IP4, io_context));
+ // ipv6 interfaces
+ interfaces.clear();
+ //udp::resolver::query query(host, PORT, boost::asio::ip::resolver_query_base::numeric_service);
+@@ -910,9 +910,9 @@ void Bonjour::priv::lookup_perform()
+ // create ipv6 socket for each interface
+ // each will send to querry to for both ipv4 and ipv6
+ for (const auto& intrfc : interfaces)
+- sockets.emplace_back(new LookupSocket(txt_keys, service, service_dn, protocol, replyfn, BonjourRequest::MCAST_IP6, intrfc, io_service));
++ sockets.emplace_back(new LookupSocket(txt_keys, service, service_dn, protocol, replyfn, BonjourRequest::MCAST_IP6, intrfc, io_context));
+ if (interfaces.empty())
+- sockets.emplace_back(new LookupSocket(txt_keys, service, service_dn, protocol, replyfn, BonjourRequest::MCAST_IP6, io_service));
++ sockets.emplace_back(new LookupSocket(txt_keys, service, service_dn, protocol, replyfn, BonjourRequest::MCAST_IP6, io_context));
+ } else {
+ BOOST_LOG_TRIVIAL(info)<< "Failed to resolve ipv6 interfaces: " << ec.message();
+ }
+@@ -923,13 +923,13 @@ void Bonjour::priv::lookup_perform()
+ socket->send();
+
+ // timer settings
+- asio::deadline_timer timer(*io_service);
++ asio::deadline_timer timer(*io_context);
+ retries--;
+ std::function<void(const error_code&)> timer_handler = [&](const error_code& error) {
+ // end
+ if (retries == 0 || error) {
+ // is this correct ending?
+- io_service->stop();
++ io_context->stop();
+ if (completefn) {
+ completefn();
+ }
+@@ -947,7 +947,7 @@ void Bonjour::priv::lookup_perform()
+ timer.expires_from_now(boost::posix_time::seconds(timeout));
+ timer.async_wait(timer_handler);
+ // start io_service, it will run until it has something to do - so in this case until stop is called in timer
+- io_service->run();
++ io_context->run();
+ }
+ catch (std::exception& e) {
+ BOOST_LOG_TRIVIAL(error) << e.what();
+@@ -966,12 +966,12 @@ void Bonjour::priv::resolve_perform()
+ rpls.push_back(reply);
+ };
+
+- std::shared_ptr< boost::asio::io_service > io_service(new boost::asio::io_service);
++ std::shared_ptr< boost::asio::io_context > io_context(new boost::asio::io_context);
+ std::vector<ResolveSocket*> sockets;
+
+ // resolve interfaces - from PR#6646
+ std::vector<boost::asio::ip::address> interfaces;
+- asio::ip::udp::resolver resolver(*io_service);
++ asio::ip::udp::resolver resolver(*io_context);
+ boost::system::error_code ec;
+ // ipv4 interfaces
+ auto results = resolver.resolve(udp::v4(), asio::ip::host_name(), "", ec);
+@@ -984,12 +984,12 @@ void Bonjour::priv::resolve_perform()
+ // create ipv4 socket for each interface
+ // each will send to querry to for both ipv4 and ipv6
+ for (const auto& intrfc : interfaces)
+- sockets.emplace_back(new ResolveSocket(hostname, reply_callback, BonjourRequest::MCAST_IP4, intrfc, io_service));
++ sockets.emplace_back(new ResolveSocket(hostname, reply_callback, BonjourRequest::MCAST_IP4, intrfc, io_context));
+ } else {
+ BOOST_LOG_TRIVIAL(info) << "Failed to resolve ipv4 interfaces: " << ec.message();
+ }
+ if (sockets.empty())
+- sockets.emplace_back(new ResolveSocket(hostname, reply_callback, BonjourRequest::MCAST_IP4, io_service));
++ sockets.emplace_back(new ResolveSocket(hostname, reply_callback, BonjourRequest::MCAST_IP4, io_context));
+
+ // ipv6 interfaces
+ interfaces.clear();
+@@ -1003,9 +1003,9 @@ void Bonjour::priv::resolve_perform()
+ // create ipv6 socket for each interface
+ // each will send to querry to for both ipv4 and ipv6
+ for (const auto& intrfc : interfaces)
+- sockets.emplace_back(new ResolveSocket(hostname, reply_callback, BonjourRequest::MCAST_IP6, intrfc, io_service));
++ sockets.emplace_back(new ResolveSocket(hostname, reply_callback, BonjourRequest::MCAST_IP6, intrfc, io_context));
+ if (interfaces.empty())
+- sockets.emplace_back(new ResolveSocket(hostname, reply_callback, BonjourRequest::MCAST_IP6, io_service));
++ sockets.emplace_back(new ResolveSocket(hostname, reply_callback, BonjourRequest::MCAST_IP6, io_context));
+ } else {
+ BOOST_LOG_TRIVIAL(info) << "Failed to resolve ipv6 interfaces: " << ec.message();
+ }
+@@ -1016,14 +1016,14 @@ void Bonjour::priv::resolve_perform()
+ socket->send();
+
+ // timer settings
+- asio::deadline_timer timer(*io_service);
++ asio::deadline_timer timer(*io_context);
+ retries--;
+ std::function<void(const error_code&)> timer_handler = [&](const error_code& error) {
+ int replies_count = replies.size();
+ // end
+ if (retries == 0 || error || replies_count > 0) {
+ // is this correct ending?
+- io_service->stop();
++ io_context->stop();
+ if (replies_count > 0 && resolvefn) {
+ resolvefn(replies);
+ }
+@@ -1041,7 +1041,7 @@ void Bonjour::priv::resolve_perform()
+ timer.expires_from_now(boost::posix_time::seconds(timeout));
+ timer.async_wait(timer_handler);
+ // start io_service, it will run until it has something to do - so in this case until stop is called in timer
+- io_service->run();
++ io_context->run();
+ }
+ catch (std::exception& e) {
+ BOOST_LOG_TRIVIAL(error) << e.what();
diff --git a/prusaslicer/patches/patch-src_slic3r_Utils_Bonjour.hpp b/prusaslicer/patches/patch-src_slic3r_Utils_Bonjour.hpp
new file mode 100644
index 0000000000..c298131bde
--- /dev/null
+++ b/prusaslicer/patches/patch-src_slic3r_Utils_Bonjour.hpp
@@ -0,0 +1,74 @@
+$NetBSD$
+
+Fix boost 1.87 compatibility.
+https://github.com/prusa3d/PrusaSlicer/issues/13799
+
+--- src/slic3r/Utils/Bonjour.hpp.orig 2025-04-06 03:09:43.494517035 +0000
++++ src/slic3r/Utils/Bonjour.hpp
+@@ -155,11 +155,11 @@ public:
+ UdpSocket(Bonjour::ReplyFn replyfn
+ , const boost::asio::ip::address& multicast_address
+ , const boost::asio::ip::address& interface_address
+- , std::shared_ptr< boost::asio::io_service > io_service);
++ , std::shared_ptr< boost::asio::io_context > io_context);
+
+ UdpSocket(Bonjour::ReplyFn replyfn
+ , const boost::asio::ip::address& multicast_address
+- , std::shared_ptr< boost::asio::io_service > io_service);
++ , std::shared_ptr< boost::asio::io_context > io_context);
+
+ void send();
+ void async_receive();
+@@ -172,7 +172,7 @@ protected:
+ boost::asio::ip::address multicast_address;
+ boost::asio::ip::udp::socket socket;
+ boost::asio::ip::udp::endpoint mcast_endpoint;
+- std::shared_ptr< boost::asio::io_service > io_service;
++ std::shared_ptr< boost::asio::io_context > io_context;
+ std::vector<BonjourRequest> requests;
+ };
+
+@@ -186,8 +186,8 @@ public:
+ , Bonjour::ReplyFn replyfn
+ , const boost::asio::ip::address& multicast_address
+ , const boost::asio::ip::address& interface_address
+- , std::shared_ptr< boost::asio::io_service > io_service)
+- : UdpSocket(replyfn, multicast_address, interface_address, io_service)
++ , std::shared_ptr< boost::asio::io_context > io_context)
++ : UdpSocket(replyfn, multicast_address, interface_address, io_context)
+ , txt_keys(txt_keys)
+ , service(service)
+ , service_dn(service_dn)
+@@ -203,8 +203,8 @@ public:
+ , std::string protocol
+ , Bonjour::ReplyFn replyfn
+ , const boost::asio::ip::address& multicast_address
+- , std::shared_ptr< boost::asio::io_service > io_service)
+- : UdpSocket(replyfn, multicast_address, io_service)
++ , std::shared_ptr< boost::asio::io_context > io_context)
++ : UdpSocket(replyfn, multicast_address, io_context)
+ , txt_keys(txt_keys)
+ , service(service)
+ , service_dn(service_dn)
+@@ -241,8 +241,8 @@ public:
+ , Bonjour::ReplyFn replyfn
+ , const boost::asio::ip::address& multicast_address
+ , const boost::asio::ip::address& interface_address
+- , std::shared_ptr< boost::asio::io_service > io_service)
+- : UdpSocket(replyfn, multicast_address, interface_address, io_service)
++ , std::shared_ptr< boost::asio::io_context > io_context)
++ : UdpSocket(replyfn, multicast_address, interface_address, io_context)
+ , hostname(hostname)
+
+ {
+@@ -253,8 +253,8 @@ public:
+ ResolveSocket(const std::string& hostname
+ , Bonjour::ReplyFn replyfn
+ , const boost::asio::ip::address& multicast_address
+- , std::shared_ptr< boost::asio::io_service > io_service)
+- : UdpSocket(replyfn, multicast_address, io_service)
++ , std::shared_ptr< boost::asio::io_context > io_context)
++ : UdpSocket(replyfn, multicast_address, io_context)
+ , hostname(hostname)
+
+ {
diff --git a/prusaslicer/patches/patch-src_slic3r_Utils_Serial.cpp b/prusaslicer/patches/patch-src_slic3r_Utils_Serial.cpp
index 07470f42cb..b91620204f 100644
--- a/prusaslicer/patches/patch-src_slic3r_Utils_Serial.cpp
+++ b/prusaslicer/patches/patch-src_slic3r_Utils_Serial.cpp
@@ -2,9 +2,9 @@ $NetBSD$
Treat NetBSD the same as OpenBSD.
---- src/slic3r/Utils/Serial.cpp.orig 2022-03-10 10:35:03.000000000 +0000
+--- src/slic3r/Utils/Serial.cpp.orig 2025-03-10 13:20:54.000000000 +0000
+++ src/slic3r/Utils/Serial.cpp
-@@ -49,7 +49,7 @@
+@@ -53,7 +53,7 @@
#include <sys/select.h>
#endif
@@ -13,7 +13,24 @@ Treat NetBSD the same as OpenBSD.
#include <termios.h>
#elif defined __linux__
#include <fcntl.h>
-@@ -342,7 +342,7 @@ void Serial::set_baud_rate(unsigned baud
+@@ -282,12 +282,12 @@ std::vector<std::string> scan_serial_por
+ namespace asio = boost::asio;
+ using boost::system::error_code;
+
+-Serial::Serial(asio::io_service& io_service) :
+- asio::serial_port(io_service)
++Serial::Serial(asio::io_context& io_context) :
++ asio::serial_port(io_context)
+ {}
+
+-Serial::Serial(asio::io_service& io_service, const std::string &name, unsigned baud_rate) :
+- asio::serial_port(io_service, name)
++Serial::Serial(asio::io_context& io_context, const std::string &name, unsigned baud_rate) :
++ asio::serial_port(io_context, name)
+ {
+ set_baud_rate(baud_rate);
+ }
+@@ -346,7 +346,7 @@ void Serial::set_baud_rate(unsigned baud
ios.c_cc[VTIME] = 1;
handle_errno(::ioctl(handle, TCSETS2, &ios));
@@ -22,3 +39,35 @@ Treat NetBSD the same as OpenBSD.
struct termios ios;
handle_errno(::tcgetattr(handle, &ios));
handle_errno(::cfsetspeed(&ios, baud_rate));
+@@ -390,19 +390,19 @@ void Serial::reset_line_num()
+
+ bool Serial::read_line(unsigned timeout, std::string &line, error_code &ec)
+ {
+- auto& io_service =
++ auto& io_context =
+ #if BOOST_VERSION >= 107000
+ //FIXME this is most certainly wrong!
+ (boost::asio::io_context&)this->get_executor().context();
+ #else
+ this->get_io_service();
+ #endif
+- asio::deadline_timer timer(io_service);
++ asio::deadline_timer timer(io_context);
+ char c = 0;
+ bool fail = false;
+
+ while (true) {
+- io_service.reset();
++ io_context.reset();
+
+ asio::async_read(*this, boost::asio::buffer(&c, 1), [&](const error_code &read_ec, size_t size) {
+ if (ec || size == 0) {
+@@ -423,7 +423,7 @@ bool Serial::read_line(unsigned timeout,
+ });
+ }
+
+- io_service.run();
++ io_context.run();
+
+ if (fail) {
+ return false;
diff --git a/prusaslicer/patches/patch-src_slic3r_Utils_Serial.hpp b/prusaslicer/patches/patch-src_slic3r_Utils_Serial.hpp
new file mode 100644
index 0000000000..2abf1b1a5d
--- /dev/null
+++ b/prusaslicer/patches/patch-src_slic3r_Utils_Serial.hpp
@@ -0,0 +1,18 @@
+$NetBSD$
+
+Fix boost 1.87 compatibility.
+https://github.com/prusa3d/PrusaSlicer/issues/13799
+
+--- src/slic3r/Utils/Serial.hpp.orig 2025-04-06 03:12:04.097988431 +0000
++++ src/slic3r/Utils/Serial.hpp
+@@ -43,8 +43,8 @@ extern std::vector<SerialPortInfo> scan
+ class Serial : public boost::asio::serial_port
+ {
+ public:
+- Serial(boost::asio::io_service &io_service);
+- Serial(boost::asio::io_service &io_service, const std::string &name, unsigned baud_rate);
++ Serial(boost::asio::io_context &io_context);
++ Serial(boost::asio::io_context &io_context, const std::string &name, unsigned baud_rate);
+ Serial(const Serial &) = delete;
+ Serial &operator=(const Serial &) = delete;
+ ~Serial();
diff --git a/prusaslicer/patches/patch-src_slic3r_Utils_TCPConsole.cpp b/prusaslicer/patches/patch-src_slic3r_Utils_TCPConsole.cpp
new file mode 100644
index 0000000000..feb8a74109
--- /dev/null
+++ b/prusaslicer/patches/patch-src_slic3r_Utils_TCPConsole.cpp
@@ -0,0 +1,24 @@
+$NetBSD$
+
+Fix boost 1.87 compatibility.
+https://github.com/prusa3d/PrusaSlicer/issues/13799
+
+--- src/slic3r/Utils/TCPConsole.cpp.orig 2025-04-06 03:25:22.230721404 +0000
++++ src/slic3r/Utils/TCPConsole.cpp
+@@ -4,6 +4,7 @@
+ ///|/ PrusaSlicer is released under the terms of the AGPLv3 or higher
+ ///|/
+ #include <boost/asio/buffer.hpp>
++#include <boost/asio/connect.hpp>
+ #include <boost/asio/io_context.hpp>
+ #include <boost/asio/ip/tcp.hpp>
+ #include <boost/asio/read_until.hpp>
+@@ -161,7 +162,7 @@ bool TCPConsole::run_queue()
+
+ auto endpoints = m_resolver.resolve(m_host_name, m_port_name);
+
+- m_socket.async_connect(endpoints->endpoint(),
++ boost::asio::async_connect(m_socket, endpoints,
+ boost::bind(&TCPConsole::handle_connect, this, boost::placeholders::_1)
+ );
+
Home |
Main Index |
Thread Index |
Old Index