diff --git a/net/kea/Makefile b/net/kea/Makefile index c55d9e15bef8..153b710bae17 100644 --- a/net/kea/Makefile +++ b/net/kea/Makefile @@ -1,62 +1,60 @@ PORTNAME= kea DISTVERSION= 2.6.1 PORTREVISION= 2 CATEGORIES= net MASTER_SITES= ISC/kea/${DISTVERSION} MAINTAINER= apevnev@me.com COMMENT= Alternative DHCP implementation by ISC WWW= https://kea.isc.org/ LICENSE= MPL20 LICENSE_FILE= ${WRKSRC}/COPYING -BROKEN= fails to build with Boost>=1.87 - LIB_DEPENDS= libboost_system.so:devel/boost-libs \ liblog4cplus.so:devel/log4cplus USES= autoreconf compiler:c++11-lang cpe iconv libtool pathfix ssl CPE_VENDOR= isc CPE_VERSION= ${DISTVERSION:C/-.*//} .if ${DISTVERSION:M*-*} CPE_UPDATE= ${DISTVERSION:C/.*-//:tl} .endif USE_LDCONFIG= yes USE_RC_SUBR= ${PORTNAME} GNU_CONFIGURE= yes CONFIGURE_ARGS= --with-boost-include=${LOCALBASE}/include \ --with-boost-lib-dir=${LOCALBASE}/lib \ --with-log4cplus=${LOCALBASE} \ --with-openssl=${OPENSSLBASE} \ --without-werror INSTALL_TARGET= install-strip TEST_TARGET= check PORTDOCS= AUTHORS CONTRIBUTING.md COPYING ChangeLog README SECURITY.md \ code_of_conduct.md examples platforms.rst OPTIONS_DEFINE= DOCS MYSQL PGSQL SHELL OPTIONS_SUB= yes SHELL_DESC= Install kea-shell(8) (Python) MYSQL_USES= mysql MYSQL_CONFIGURE_ON= --with-mysql=${LOCALBASE}/bin/mysql_config MYSQL_CONFIGURE_OFF= --without-mysql MYSQL_SUB_LIST= REQ_MYSQL=mysql MYSQL_SUB_LIST_OFF= REQ_MYSQL="" PGSQL_USES= pgsql PGSQL_CONFIGURE_ON= --with-pgsql=${LOCALBASE}/bin/pg_config PGSQL_CONFIGURE_OFF= --without-pgsql PGSQL_SUB_LIST= REQ_PGSQL=postgresql PGSQL_SUB_LIST_OFF= REQ_PGSQL="" PGSQL_VARS= WANT_PGSQL=client SHELL_USES= python SHELL_CONFIGURE_ON= --enable-shell .include diff --git a/net/kea/files/patch-src_lib_asiolink_io__address.cc b/net/kea/files/patch-src_lib_asiolink_io__address.cc new file mode 100644 index 000000000000..a61e7460eebd --- /dev/null +++ b/net/kea/files/patch-src_lib_asiolink_io__address.cc @@ -0,0 +1,20 @@ +--- src/lib/asiolink/io_address.cc.orig 2024-07-25 08:50:58 UTC ++++ src/lib/asiolink/io_address.cc +@@ -37,7 +37,7 @@ IOAddress::IOAddress(const std::string& address_str) { + // because we'd like to throw our own exception on failure. + IOAddress::IOAddress(const std::string& address_str) { + boost::system::error_code err; +- asio_address_ = ip::address::from_string(address_str, err); ++ asio_address_ = ip::make_address(address_str, err); + if (err) { + isc_throw(IOError, "Failed to convert string to address '" + << address_str << "': " << err.message()); +@@ -116,7 +116,7 @@ IOAddress::toUint32() const { + uint32_t + IOAddress::toUint32() const { + if (asio_address_.is_v4()) { +- return (asio_address_.to_v4().to_ulong()); ++ return (asio_address_.to_v4().to_uint()); + } else { + isc_throw(BadValue, "Can't convert " << toText() + << " address to IPv4."); diff --git a/net/kea/files/patch-src_lib_asiolink_io__service.cc b/net/kea/files/patch-src_lib_asiolink_io__service.cc new file mode 100644 index 000000000000..21e451eb0648 --- /dev/null +++ b/net/kea/files/patch-src_lib_asiolink_io__service.cc @@ -0,0 +1,35 @@ +--- src/lib/asiolink/io_service.cc.orig 2024-07-25 08:50:58 UTC ++++ src/lib/asiolink/io_service.cc +@@ -30,7 +30,7 @@ class IOServiceImpl { (public) + /// @brief The constructor. + IOServiceImpl() : + io_service_(), +- work_(new boost::asio::io_service::work(io_service_)) { ++ work_(boost::asio::make_work_guard(io_service_)) { + }; + + /// @brief The destructor. +@@ -92,7 +92,7 @@ class IOServiceImpl { (public) + + /// @brief Restarts the IOService in preparation for a subsequent @ref run() invocation. + void restart() { +- io_service_.reset(); ++ io_service_.restart(); + } + + /// @brief Removes IO service work object to let it finish running +@@ -115,12 +115,12 @@ class IOServiceImpl { (public) + /// + /// @param callback The callback to be run on the IO service. + void post(const std::function& callback) { +- io_service_.post(callback); ++ boost::asio::post(io_service_, callback); + } + + private: + boost::asio::io_service io_service_; +- boost::shared_ptr work_; ++ boost::asio::executor_work_guard work_; + }; + + IOService::IOService() : io_impl_(new IOServiceImpl()) { diff --git a/net/kea/files/patch-src_lib_asiolink_tcp__endpoint.h b/net/kea/files/patch-src_lib_asiolink_tcp__endpoint.h new file mode 100644 index 000000000000..c2c0d7d80442 --- /dev/null +++ b/net/kea/files/patch-src_lib_asiolink_tcp__endpoint.h @@ -0,0 +1,11 @@ +--- src/lib/asiolink/tcp_endpoint.h.orig 2024-07-25 08:50:58 UTC ++++ src/lib/asiolink/tcp_endpoint.h +@@ -42,7 +42,7 @@ class TCPEndpoint : public IOEndpoint { (public) + /// \param port The TCP port number of the endpoint. + TCPEndpoint(const IOAddress& address, const unsigned short port) : + asio_endpoint_placeholder_( +- new boost::asio::ip::tcp::endpoint(boost::asio::ip::address::from_string(address.toText()), ++ new boost::asio::ip::tcp::endpoint(boost::asio::ip::make_address(address.toText()), + port)), + asio_endpoint_(*asio_endpoint_placeholder_) + {} diff --git a/net/kea/files/patch-src_lib_asiolink_udp__endpoint.h b/net/kea/files/patch-src_lib_asiolink_udp__endpoint.h new file mode 100644 index 000000000000..c528b76f5ce1 --- /dev/null +++ b/net/kea/files/patch-src_lib_asiolink_udp__endpoint.h @@ -0,0 +1,11 @@ +--- src/lib/asiolink/udp_endpoint.h.orig 2024-07-25 08:50:58 UTC ++++ src/lib/asiolink/udp_endpoint.h +@@ -42,7 +42,7 @@ class UDPEndpoint : public IOEndpoint { (public) + /// \param port The UDP port number of the endpoint. + UDPEndpoint(const IOAddress& address, const unsigned short port) : + asio_endpoint_placeholder_( +- new boost::asio::ip::udp::endpoint(boost::asio::ip::address::from_string(address.toText()), ++ new boost::asio::ip::udp::endpoint(boost::asio::ip::make_address(address.toText()), + port)), + asio_endpoint_(*asio_endpoint_placeholder_) + {} diff --git a/net/kea/files/patch-src_lib_asiolink_unix__domain__socket.cc b/net/kea/files/patch-src_lib_asiolink_unix__domain__socket.cc new file mode 100644 index 000000000000..b540cacb5890 --- /dev/null +++ b/net/kea/files/patch-src_lib_asiolink_unix__domain__socket.cc @@ -0,0 +1,74 @@ +--- src/lib/asiolink/unix_domain_socket.cc.orig 2024-07-25 08:50:58 UTC ++++ src/lib/asiolink/unix_domain_socket.cc +@@ -83,7 +83,7 @@ class UnixDomainSocketImpl : public boost::enable_shar + /// @param buffer Buffers holding the data to be sent. + /// @param handler User supplied callback to be invoked when data have + /// been sent or sending error is signalled. +- void doSend(const boost::asio::const_buffers_1& buffer, ++ void doSend(const boost::asio::const_buffer& buffer, + const UnixDomainSocket::Handler& handler); + + +@@ -103,7 +103,7 @@ class UnixDomainSocketImpl : public boost::enable_shar + /// @param ec Error code returned as a result of sending the data. + /// @param length Length of the data sent. + void sendHandler(const UnixDomainSocket::Handler& remote_handler, +- const boost::asio::const_buffers_1& buffer, ++ const boost::asio::const_buffer& buffer, + const boost::system::error_code& ec, + size_t length); + +@@ -127,7 +127,7 @@ class UnixDomainSocketImpl : public boost::enable_shar + /// @param buffer A buffer into which the data should be received. + /// @param handler User supplied callback invoked when data have been + /// received on an error is signalled. +- void doReceive(const boost::asio::mutable_buffers_1& buffer, ++ void doReceive(const boost::asio::mutable_buffer& buffer, + const UnixDomainSocket::Handler& handler); + + /// @brief Local handler invoked as a result of asynchronous receive. +@@ -146,7 +146,7 @@ class UnixDomainSocketImpl : public boost::enable_shar + /// @param ec Error code returned as a result of asynchronous receive. + /// @param length Size of the received data. + void receiveHandler(const UnixDomainSocket::Handler& remote_handler, +- const boost::asio::mutable_buffers_1& buffer, ++ const boost::asio::mutable_buffer& buffer, + const boost::system::error_code& ec, + size_t length); + +@@ -197,7 +197,7 @@ void + } + + void +-UnixDomainSocketImpl::doSend(const boost::asio::const_buffers_1& buffer, ++UnixDomainSocketImpl::doSend(const boost::asio::const_buffer& buffer, + const UnixDomainSocket::Handler& handler) { + auto local_handler = std::bind(&UnixDomainSocketImpl::sendHandler, + shared_from_this(), +@@ -207,7 +207,7 @@ UnixDomainSocketImpl::sendHandler(const UnixDomainSock + + void + UnixDomainSocketImpl::sendHandler(const UnixDomainSocket::Handler& remote_handler, +- const boost::asio::const_buffers_1& buffer, ++ const boost::asio::const_buffer& buffer, + const boost::system::error_code& ec, + size_t length) { + // The asynchronous send may return EWOULDBLOCK or EAGAIN on some +@@ -230,7 +230,7 @@ void + } + + void +-UnixDomainSocketImpl::doReceive(const boost::asio::mutable_buffers_1& buffer, ++UnixDomainSocketImpl::doReceive(const boost::asio::mutable_buffer& buffer, + const UnixDomainSocket::Handler& handler) { + auto local_handler = std::bind(&UnixDomainSocketImpl::receiveHandler, + shared_from_this(), +@@ -240,7 +240,7 @@ UnixDomainSocketImpl::receiveHandler(const UnixDomainS + + void + UnixDomainSocketImpl::receiveHandler(const UnixDomainSocket::Handler& remote_handler, +- const boost::asio::mutable_buffers_1& buffer, ++ const boost::asio::mutable_buffer& buffer, + const boost::system::error_code& ec, + size_t length) { + // The asynchronous receive may return EWOULDBLOCK or EAGAIN on some diff --git a/net/kea/files/patch-src_lib_dhcp_iface__mgr.cc b/net/kea/files/patch-src_lib_dhcp_iface__mgr.cc new file mode 100644 index 000000000000..e0347d0cb59e --- /dev/null +++ b/net/kea/files/patch-src_lib_dhcp_iface__mgr.cc @@ -0,0 +1,11 @@ +--- src/lib/dhcp/iface_mgr.cc.orig 2024-07-25 08:50:58 UTC ++++ src/lib/dhcp/iface_mgr.cc +@@ -1034,7 +1034,7 @@ IfaceMgr::getLocalAddress(const IOAddress& remote_addr + } + + // Create socket that will be used to connect to remote endpoint. +- boost::asio::io_service io_service; ++ boost::asio::io_context io_service; + boost::asio::ip::udp::socket sock(io_service); + + boost::system::error_code err_code;