diff --git a/net-p2p/rtorrent/Makefile b/net-p2p/rtorrent/Makefile index ccd3fb17f69e..7f7b357d03b4 100644 --- a/net-p2p/rtorrent/Makefile +++ b/net-p2p/rtorrent/Makefile @@ -1,49 +1,47 @@ PORTNAME= rtorrent DISTVERSION= 0.16.17 CATEGORIES= net-p2p MASTER_SITES= https://github.com/rakshasa/rtorrent/releases/download/v${DISTVERSION}/ MAINTAINER= eduardo@FreeBSD.org COMMENT= BitTorrent Client written in C++ WWW= https://github.com/rakshasa/rtorrent LICENSE= GPLv2 GPLv3 LICENSE_COMB= dual LICENSE_FILE_GPLv2= ${WRKSRC}/COPYING -BROKEN_i386= error: static assertion failed; see also: https://github.com/rakshasa/rtorrent/issues/1859 - LIB_DEPENDS= libtorrent.so:net-p2p/libtorrent TEST_DEPENDS= cppunit>0:devel/cppunit USES= compiler:c++17-lang ncurses pkgconfig USE_RC_SUBR= rtorrent GNU_CONFIGURE= yes CONFIGURE_ARGS= --disable-debug \ --with-xmlrpc-tinyxml2 TEST_ARGS= CPPUNIT_LIBS="-L${LOCALBASE}/lib -lcppunit" TEST_TARGET= check SUB_FILES= pkg-message USERS= rtorrent GROUPS= rtorrent PLIST_FILES= bin/rtorrent \ "@sample ${ETCDIR}/rtorrent.conf.sample" \ ${DATADIR}/lua/rtorrent.lua PORTDOCS= README.md OPTIONS_DEFINE= DOCS post-install: ${MKDIR} ${STAGEDIR}${ETCDIR} ${INSTALL_DATA} ${WRKSRC}/doc/rtorrent.rc \ ${STAGEDIR}${ETCDIR}/rtorrent.conf.sample post-install-DOCS-on: @${MKDIR} ${STAGEDIR}${DOCSDIR}/ ${INSTALL_DATA} ${WRKSRC}/${PORTDOCS} ${STAGEDIR}${DOCSDIR}/ .include diff --git a/net-p2p/rtorrent/files/patch-Fix-i386 b/net-p2p/rtorrent/files/patch-Fix-i386 new file mode 100644 index 000000000000..b230f2c24582 --- /dev/null +++ b/net-p2p/rtorrent/files/patch-Fix-i386 @@ -0,0 +1,76 @@ +From 959448acdab8e84cc70f5a50c62dab73dd8dc07d Mon Sep 17 00:00:00 2001 +From: Jari Sundell +Date: Wed, 8 Jul 2026 10:15:56 +0200 +Subject: [PATCH] Fixed command_base t_pod align static asserts. + +--- + src/rpc/command.h | 31 +++++++++++++++---------------- + 1 file changed, 15 insertions(+), 16 deletions(-) + +diff --git src/rpc/command.h src/rpc/command.h +index a4aa6acb4..4c9a652e1 100644 +--- src/rpc/command.h ++++ src/rpc/command.h +@@ -55,12 +55,11 @@ struct rt_triple : private std::pair { + base_type(src.first, src.second), third(src.third) {} + }; + +-typedef rt_triple target_type; +- + class command_base; + +-typedef const torrent::Object (*command_base_call_type)(command_base*, target_type, const torrent::Object&); +-typedef std::function base_function; ++using target_type = rt_triple; ++using base_function = std::function; ++using command_base_call_type = const torrent::Object (command_base*, target_type, const torrent::Object&); + + template struct command_base_is_valid {}; + template struct command_base_is_type {}; +@@ -84,17 +83,18 @@ class command_base { + + typedef const torrent::Object (*download_pair_slot) (command_base*, core::Download*, core::Download*, const torrent::Object&); + +- static const int target_generic = 0; +- static const int target_any = 1; +- static const int target_download = 2; +- static const int target_peer = 3; +- static const int target_tracker = 4; +- static const int target_file = 5; +- static const int target_file_itr = 6; ++ static constexpr int target_generic = 0; ++ static constexpr int target_any = 1; ++ static constexpr int target_download = 2; ++ static constexpr int target_peer = 3; ++ static constexpr int target_tracker = 4; ++ static constexpr int target_file = 5; ++ static constexpr int target_file_itr = 6; ++ static constexpr int target_download_pair = 7; + +- static const int target_download_pair = 7; ++ static constexpr unsigned int max_arguments = 10; + +- static const unsigned int max_arguments = 10; ++ static constexpr std::size_t optimal_alignment = std::max(alignof(std::max_align_t), alignof(base_function)); + + struct stack_type { + torrent::Object* begin() { return reinterpret_cast(buffer); } +@@ -169,8 +169,7 @@ class command_base { + template + void set_function(T s, [[maybe_unused]] int value = command_base_is_valid::value) { + static_assert(sizeof(T) <= sizeof(t_pod), "t_pod storage overflow"); +- static_assert(alignof(std::max_align_t) % alignof(T) == 0, "t_pod alignment insufficient for type"); +- static_assert(alignof(std::max_align_t) >= alignof(T), "t_pod structural capacity mismatch"); ++ static_assert(optimal_alignment >= alignof(T), "t_pod alignment insufficient for type"); + + if (m_dest_helper) + m_dest_helper(t_pod); +@@ -200,7 +199,7 @@ class command_base { + using copy_fn_t = void (*)(void* dest, const void* src); + using dest_fn_t = void (*)(void* ptr); + +- alignas(std::max_align_t) char t_pod[sizeof(base_function)]; ++ alignas(optimal_alignment) char t_pod[sizeof(base_function)]; + + copy_fn_t m_copy_helper; + dest_fn_t m_dest_helper;