This builds with both boost 1.84 and boost 1.87. Merging the patch from https://946488.bugs.gentoo.org/attachment.cgi?id=914160 into what we had wasn't hard but not entirely mechanical, so a runtime check by someone who uses this would be nice.
kea's changelog only mentions a build fix for 1.87 only for the 2.7.x development version, so we'll get to carry patches for a while whether we update or not. Index: Makefile =================================================================== RCS file: /cvs/ports/net/kea/Makefile,v diff -u -p -r1.41 Makefile --- Makefile 17 Dec 2024 07:42:47 -0000 1.41 +++ Makefile 20 Apr 2025 18:08:34 -0000 @@ -2,7 +2,7 @@ COMMENT= high-performance and extensible VERSION= 2.4.1 PORTROACH= limitw:1,even -REVISION= 0 +REVISION= 1 DISTNAME= kea-${VERSION} PKGNAME-main= kea-${VERSION:S/-P/pl/} Index: patches/patch-src_lib_asiolink_io_service_cc =================================================================== RCS file: /cvs/ports/net/kea/patches/patch-src_lib_asiolink_io_service_cc,v diff -u -p -r1.1 patch-src_lib_asiolink_io_service_cc --- patches/patch-src_lib_asiolink_io_service_cc 17 Dec 2024 07:42:47 -0000 1.1 +++ patches/patch-src_lib_asiolink_io_service_cc 20 Apr 2025 17:36:32 -0000 @@ -1,38 +1,106 @@ https://github.com/isc-projects/kea/pull/143 +https://946488.bugs.gentoo.org/attachment.cgi?id=914160 Index: src/lib/asiolink/io_service.cc --- src/lib/asiolink/io_service.cc.orig +++ src/lib/asiolink/io_service.cc -@@ -25,7 +25,7 @@ class IOServiceImpl { (public) +@@ -24,8 +24,7 @@ class IOServiceImpl { (private) + public: /// \brief The constructor IOServiceImpl() : - io_service_(), +- io_service_(), - work_(new boost::asio::io_service::work(io_service_)) { -+ work_(boost::asio::make_work_guard(io_service_)) { ++ io_context_() { }; /// \brief The destructor. -@@ -73,7 +73,7 @@ class IOServiceImpl { (public) +@@ -37,7 +36,7 @@ class IOServiceImpl { (private) + /// This method does not return control to the caller until + /// the \c stop() method is called via some handler. + void run() { +- io_service_.run(); ++ io_context_.run(); + }; + + /// \brief Run the underlying event loop for a single event. +@@ -46,7 +45,7 @@ class IOServiceImpl { (private) + /// first handler has completed. (If no handlers are ready when + /// it is run, it will block until one is.) + void run_one() { +- io_service_.run_one(); ++ io_context_.run_one(); + }; + + /// \brief Run the underlying event loop for a ready events. +@@ -54,32 +53,32 @@ class IOServiceImpl { (private) + /// This method executes handlers for all ready events and returns. + /// It will return immediately if there are no ready events. + void poll() { +- io_service_.poll(); ++ io_context_.poll(); + }; + + /// \brief Stop the underlying event loop. + /// + /// This will return the control to the caller of the \c run() method. + void stop() { +- io_service_.stop(); ++ io_context_.stop(); + } + + /// \brief Indicates if the IOService has been stopped. + /// + /// \return true if the IOService has been stopped, false otherwise. + bool stopped() const { +- return (io_service_.stopped()); ++ return (io_context_.stopped()); + } /// \brief Restarts the IOService in preparation for a subsequent \c run() invocation. void restart() { - io_service_.reset(); -+ io_service_.restart(); ++ io_context_.restart(); } /// \brief Removes IO service work object to let it finish running -@@ -96,12 +96,12 @@ class IOServiceImpl { (public) + /// when all handlers have been invoked. + void stopWork() { +- work_.reset(); ++ io_context_.stop(); + } + + /// \brief Return the native \c io_service object used in this wrapper. +@@ -88,20 +87,19 @@ class IOServiceImpl { (private) + /// that share the same \c io_service with the authoritative server. + /// It will eventually be removed once the wrapper interface is + /// generalized. +- boost::asio::io_service& get_io_service() { +- return (io_service_); ++ boost::asio::io_context& get_io_context() { ++ return (io_context_); + } + + /// \brief Post a callback on the IO service /// /// \param callback The callback to be run on the IO service. void post(const std::function<void ()>& callback) { - io_service_.post(callback); -+ boost::asio::post(io_service_, callback); ++ boost::asio::post(io_context_, callback); } private: - boost::asio::io_service io_service_; +- boost::asio::io_service io_service_; - boost::shared_ptr<boost::asio::io_service::work> work_; -+ boost::asio::executor_work_guard<boost::asio::io_service::executor_type> work_; ++ boost::asio::io_context io_context_; }; IOService::IOService() : io_impl_(new IOServiceImpl()) { +@@ -147,7 +145,7 @@ IOService::stopWork() { + + boost::asio::io_service& + IOService::get_io_service() { +- return (io_impl_->get_io_service()); ++ return (io_impl_->get_io_context()); + } + + void