From e4c39ed00ffc8686d2bdc90f231d96389ac3b68b Mon Sep 17 00:00:00 2001 From: Nicolas PARLANT Date: Sat, 2 May 2026 02:59:38 +0200 Subject: [PATCH] net-p2p/rtorrent: add 0.16.11 add virtual/zlib for gzip support in scgi cppunit is used for headers to build test, so DEPEND Signed-off-by: Nicolas PARLANT Part-of: https://codeberg.org/gentoo/gentoo/pulls/797 Merges: https://codeberg.org/gentoo/gentoo/pulls/797 Signed-off-by: Sam James --- net-p2p/rtorrent/Manifest | 1 + net-p2p/rtorrent/rtorrent-0.16.11.ebuild | 117 +++++++++++++++++++++++ 2 files changed, 118 insertions(+) create mode 100644 net-p2p/rtorrent/rtorrent-0.16.11.ebuild diff --git a/net-p2p/rtorrent/Manifest b/net-p2p/rtorrent/Manifest index 3a3d79110e834..9dc8ef1059fb2 100644 --- a/net-p2p/rtorrent/Manifest +++ b/net-p2p/rtorrent/Manifest @@ -1,3 +1,4 @@ DIST rtorrent-0.15.7.tar.gz 866976 BLAKE2B e826f55b7411d0f11278a64b1851d4b5ff479b6872e513466d484000032a22d56025d4b04246ecd31b3229d71c0cb9738ac8bb76ed41865ef67dc27e4fe15b6c SHA512 99d8e276fb4044b123a5d8f147f8de521d228087ea13ce702cb8d601a14ce6b69cfbeb9a3d6ff394d49a5b0ae0a597c2dbafa687b550835ba5372e094c6b8ce6 +DIST rtorrent-0.16.11.tar.gz 858663 BLAKE2B f71f65e87c4752f44371b50bbd5862e557ffe6583096b15119037551b43d2ebfa94d3af430d07f3a46f455d6e4f2376dc2730883b1f0d75f230b7d4fe7ab4da7 SHA512 e156bdf923b8a07755aa061459042c1ed2970d64adca8e177125e7b1c2329edaeb4a8f134ec278d5a83ae844c514ca6a124645f6df01876640a67a273906b5f8 DIST rtorrent-0.16.8.tar.gz 854737 BLAKE2B 2461c75d0fe0b704eb3cb0b677e55788ca0cfa9eb935db51ea8757c27f2be36f28bc5585a2482b9789a09e5ea2785c4b407318bd30895e2d11a8b08746a69c11 SHA512 f17c0691543d109b619ff8c4251c1c0eefe94df133684b013939e9b8832b2c4d4ca72087ac0127f1668ee5238735b09febe3f2f2b2d41dfb4fef543b786e4deb DIST rtorrent-0.16.9.tar.gz 858107 BLAKE2B 0dafaba7d3a678e5e37cf3d6ff1711d36d63dc0754adcb00c1d748ce64cfffa0a8f8e93ff67a5829578cf5a0bbad67a28da55077df02d1748516527fb4dcc980 SHA512 d6c023d007f163227c76d3aa5b7c2fc7ee704631e00389e3b5e446a660449716642b3129326765f76e418fd6feac1e6d6cb38e22ebb9a17731d3a246660a73ef diff --git a/net-p2p/rtorrent/rtorrent-0.16.11.ebuild b/net-p2p/rtorrent/rtorrent-0.16.11.ebuild new file mode 100644 index 0000000000000..326e81ffedae4 --- /dev/null +++ b/net-p2p/rtorrent/rtorrent-0.16.11.ebuild @@ -0,0 +1,117 @@ +# 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 ~sparc ~x86 ~x64-macos ~x64-solaris" +fi + +LICENSE="GPL-2" +SLOT="0" +IUSE="debug lua selinux systemd test tinyxml2 xmlrpc" +RESTRICT="!test? ( test )" +REQUIRED_USE=" + lua? ( ${LUA_REQUIRED_USE} ) + tinyxml2? ( !xmlrpc ) +" + +COMMON_DEPEND=" + ~net-libs/libtorrent-${PV} + sys-libs/ncurses:0= + virtual/zlib:= + lua? ( ${LUA_DEPS} ) + 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.9-cross_checks.patch +) + +DOCS=( doc/rtorrent.rc ) + +pkg_setup() { + use lua && lua-single_pkg_setup +} + +src_prepare() { + default + + # use system-json + rm -r src/rpc/nlohmann || die + sed -e 's@"rpc/nlohmann/json.h"@@' \ + -i src/rpc/jsonrpc.cc || die + + # https://github.com/rakshasa/rtorrent/issues/332 + cp "${FILESDIR}"/rtorrent.1 "${S}"/doc/ || die + + if [[ ${CHOST} != *-darwin* ]]; then + # syslibroot is only for macos, change to sysroot for others + sed -i 's/Wl,-syslibroot,/Wl,--sysroot,/' "${S}/scripts/common.m4" || die + fi + + eautoreconf +} + +src_configure() { + local myeconfargs=( + $(use_enable debug) + $(use_with lua) + $(use_with systemd) + $(usev xmlrpc --with-xmlrpc-c=$(tc-getPKG_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" "rtorrentd@.service" +} + +pkg_postinst() { + einfo "This release could introduce new 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" +}