From f8c5ea53301192d22b5befe2e86ffbfdf854e82d Mon Sep 17 00:00:00 2001 From: Nicolas PARLANT Date: Sat, 11 Jul 2026 18:33:38 +0200 Subject: [PATCH] net-p2p/rtorrent: backport fix for riscv Closes: https://bugs.gentoo.org/979046 Signed-off-by: Nicolas PARLANT Part-of: https://codeberg.org/gentoo/gentoo/pulls/1390 Merges: https://codeberg.org/gentoo/gentoo/pulls/1390 Signed-off-by: Sam James --- .../files/rtorrent-0.16.15-fix_riscv.patch | 16 ++++++++++++++++ net-p2p/rtorrent/rtorrent-0.16.15.ebuild | 1 + 2 files changed, 17 insertions(+) create mode 100644 net-p2p/rtorrent/files/rtorrent-0.16.15-fix_riscv.patch diff --git a/net-p2p/rtorrent/files/rtorrent-0.16.15-fix_riscv.patch b/net-p2p/rtorrent/files/rtorrent-0.16.15-fix_riscv.patch new file mode 100644 index 0000000000000..0422f04cfeb7a --- /dev/null +++ b/net-p2p/rtorrent/files/rtorrent-0.16.15-fix_riscv.patch @@ -0,0 +1,16 @@ +PR merged https://github.com/rakshasa/libtorrent/pull/778.patch +see also https://bugs.gentoo.org/979046 +Subject: [PATCH] Add support for RISC-V +--- a/scripts/common.m4 ++++ b/scripts/common.m4 +@@ -118,6 +118,10 @@ AC_DEFUN([TORRENT_CHECK_CACHELINE], [ + AC_MSG_RESULT([linux fallback enterprise 128 bytes]) + AC_DEFINE([LT_SMP_CACHE_BYTES], 128, [Fallback 128-byte alignment for Linux enterprise hardware.]) + ;; ++ riscv32*|riscv64*) ++ AC_MSG_RESULT([linux fallback RISC-V 64 bytes]) ++ AC_DEFINE([LT_SMP_CACHE_BYTES], 64, [Fallback 64-byte alignment for Linux RISC-V hardware.]) ++ ;; + *) + AC_MSG_RESULT([unrecognized CPU arch on Linux header fallback]) + AC_MSG_FAILURE([Unrecognized CPU architecture ($host_cpu) on Linux fallback path. Aborting build.]) diff --git a/net-p2p/rtorrent/rtorrent-0.16.15.ebuild b/net-p2p/rtorrent/rtorrent-0.16.15.ebuild index c80b12c6316e1..83071546070bc 100644 --- a/net-p2p/rtorrent/rtorrent-0.16.15.ebuild +++ b/net-p2p/rtorrent/rtorrent-0.16.15.ebuild @@ -46,6 +46,7 @@ BDEPEND="virtual/pkgconfig" PATCHES=( "${FILESDIR}"/${PN}-0.16.13-cross_checks.patch + "${FILESDIR}"/${P}-fix_riscv.patch #979046 ) DOCS=( doc/rtorrent.rc )