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 )