repo/gentoo:master commit in: net-p2p/rtorrent/

"Sam James" <[email protected]> Tue, 04 Aug 2026 00:18:05 +0000 (UTC)
Newsgroups gmane.linux.gentoo.cvs
Message-ID <1785802584.1ab41b94671af2cc278422ad0b8477358508b958.sam@gentoo>
commit:     1ab41b94671af2cc278422ad0b8477358508b958
Author:     Nicolas PARLANT <nicolas.parlant <AT> parhuet <DOT> fr>
AuthorDate: Mon Aug  3 05:02:23 2026 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Aug  4 00:16:24 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1ab41b94

net-p2p/rtorrent: add 0.16.19

Signed-off-by: Nicolas PARLANT <nicolas.parlant <AT> parhuet.fr>
Part-of: https://codeberg.org/gentoo/gentoo/pulls/1608
Merges: https://codeberg.org/gentoo/gentoo/pulls/1608
Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-p2p/rtorrent/Manifest                |   1 +
 net-p2p/rtorrent/rtorrent-0.16.19.ebuild | 124 +++++++++++++++++++++++++++++++
 2 files changed, 125 insertions(+)

diff --git a/net-p2p/rtorrent/Manifest b/net-p2p/rtorrent/Manifest
index 6228f1d6aa4d..42727927b54e 100644
--- a/net-p2p/rtorrent/Manifest
+++ b/net-p2p/rtorrent/Manifest
@@ -3,3 +3,4 @@ DIST rtorrent-0.16.11.tar.gz 858663 BLAKE2B f71f65e87c4752f44371b50bbd5862e557ff
 DIST rtorrent-0.16.13.tar.gz 870773 BLAKE2B 1fe4489e7ab76730c156bcad020104084b116749cc1c38e441a06676642c3337814ae03bfb4f3279c7ac881483fbc234e09f9e42ed381772eef888b7bbbed12e SHA512 56f5860e81b148014bdb567a8b0d34979fbbbfed0a6a453e861b8f7444b88af9fd62fc7e90644254b79f73c4c58016c9a57a550596fcb51f4c9e64262610eea0
 DIST rtorrent-0.16.14.tar.gz 868131 BLAKE2B 072382493b8e0e782664f0b47ddaeb5e2314cfe3637e388503709fa8f391dd158f9635f192f8056dbc6d11ce0e580e5469b6bc3e8d6358e43c907e6c4739bcc0 SHA512 27ff4bb7bbba0134fe470a7da437497b6696fb4975745f5438b34278a9d6a2080c2467e070ac74b3610ad6e1ae90e7958aaf83f86eeea1e1526e8cc2d60531d7
 DIST rtorrent-0.16.15.tar.gz 868541 BLAKE2B c72542774f73c6c359f79abf7b6f08fb0ebdbd93140977625505bc5c69305356ead2c34ea6308f702e97b72826f5ba92abe5e8ee91015a392f056f9cc67e003d SHA512 605d53f87ecf8abfc784254ecf7abab93661bc8d5e77395ee2d9322cd7feaeaa7248dca7fd871fe8dd7da3e532210cd54f350ee59edb87369dc8aba045df81a0
+DIST rtorrent-0.16.19.tar.gz 869579 BLAKE2B 30370038de621ac05ecfcaf79951c1727f0a06827377a51772a169148271f502c8680d14ebea191ce4fa794a40cf8c4b4a359790a09e49a54958dc4ea27ddaa5 SHA512 e410ac39871346c319ac9e99f7d80692b6ec73ef2d337b92b6112f63b2543db2ffb42bf3a8434ef1cb5bfc7e47b7d35182d7a9663b0b3ccc6234d3022fd90270

diff --git a/net-p2p/rtorrent/rtorrent-0.16.19.ebuild b/net-p2p/rtorrent/rtorrent-0.16.19.ebuild
new file mode 100644
index 000000000000..a272b1c1c306
--- /dev/null
+++ b/net-p2p/rtorrent/rtorrent-0.16.19.ebuild
@@ -0,0 +1,124 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# require 64-bit integer
+LUA_COMPAT=( lua5-{3,4} )
+
+inherit autotools lua-single systemd toolchain-funcs
+
+DESCRIPTION="BitTorrent Client using libtorrent"
+HOMEPAGE="https://rtorrent.net"
+if [[ ${PV} == *9999 ]] ; then
+	inherit git-r3
+	EGIT_REPO_URI="https://github.com/rakshasa/${PN}.git"
+else
+	SRC_URI="https://github.com/rakshasa/rtorrent/releases/download/v${PV}/${P}.tar.gz"
+	KEYWORDS="~amd64 ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~sparc ~x86 ~x64-macos ~x64-solaris"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="debug lua +ncurses selinux systemd test tinyxml2 xmlrpc"
+RESTRICT="!test? ( test )"
+REQUIRED_USE="
+	lua? ( ${LUA_REQUIRED_USE} )
+	tinyxml2? ( !xmlrpc )
+"
+
+COMMON_DEPEND="
+	~net-libs/libtorrent-${PV}
+	virtual/zlib:=
+	lua? ( ${LUA_DEPS} )
+	ncurses? ( sys-libs/ncurses:0= )
+	systemd? ( sys-apps/systemd:= )
+	xmlrpc? ( dev-libs/xmlrpc-c:=[libxml2] )
+"
+DEPEND="${COMMON_DEPEND}
+	dev-cpp/nlohmann_json
+	test? ( dev-util/cppunit )
+"
+RDEPEND="${COMMON_DEPEND}
+	selinux? ( sec-policy/selinux-rtorrent )
+"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-0.16.13-cross_checks.patch
+)
+
+DOCS=( doc/rtorrent.rc )
+
+pkg_setup() {
+	use lua && lua-single_pkg_setup
+}
+
+src_prepare() {
+	if use elibc_musl; then
+		QA_CONFIG_IMPL_DECL_SKIP=( posix_spawn_file_actions_addclosefrom_np )
+	fi
+
+	default
+
+	# use system-json
+	rm -r src/rpc/nlohmann || die
+	sed -e 's@"rpc/nlohmann/json.h"@<nlohmann/json.hpp>@' \
+		-i src/rpc/jsonrpc.cc || die
+
+	# https://github.com/rakshasa/rtorrent/issues/332
+	cp "${FILESDIR}"/rtorrent.1 "${S}"/doc/ || die
+
+	eautoreconf
+}
+
+src_configure() {
+	tc-export PKG_CONFIG
+	local myeconfargs=(
+		$(use_enable debug)
+		$(use_with lua)
+		$(usev !ncurses --without-ncurses)
+		$(use_with systemd)
+		$(usev xmlrpc --with-xmlrpc-c="${PKG_CONFIG}")
+		$(usev tinyxml2 --with-xmlrpc-tinyxml2)
+	)
+
+	use lua && myeconfargs+=(
+		LUA_INCLUDE="$(lua_get_CFLAGS)"
+		LUA_LIB="$(lua_get_LIBS)"
+		LUA_VERSION="${ELUA/lua/}"
+	)
+
+	econf "${myeconfargs[@]}"
+}
+
+src_install() {
+	default
+	doman doc/rtorrent.1
+
+	# lua file is installed then in the proper directory
+	rm "${ED}"/usr/share/rtorrent/lua/rtorrent.lua || die
+	if use lua; then
+		insinto $(lua_get_lmod_dir)
+		doins lua/${PN}.lua
+	fi
+
+	newinitd "${FILESDIR}/rtorrent-r1.init" rtorrent
+	newconfd "${FILESDIR}/rtorrentd.conf" rtorrent
+	systemd_newunit "${FILESDIR}/rtorrentd_at-r1.service" "[email protected]"
+}
+
+pkg_postinst() {
+	einfo "This release could deprecate or introduce commands to configure RTorrent."
+	einfo "Please read the release notes before restarting:"
+	einfo "https://github.com/rakshasa/rtorrent/releases"
+	einfo ""
+	einfo "For configuration assistance, see:"
+	einfo "https://github.com/rakshasa/rtorrent/wiki"
+
+	if ! use ncurses; then
+		einfo "${PN} was installed without ncurses support."
+		einfo "It can only be launched using:"
+		einfo "rtorrent -o system.daemon.set=true"
+	fi
+}