mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-25 07:08:13 -07:00
net-p2p/rtorrent: add 0.16.13
Sync with live Signed-off-by: Nicolas PARLANT <nicolas.parlant@parhuet.fr> Part-of: https://codeberg.org/gentoo/gentoo/pulls/1075 Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
committed by
Sam James
parent
033bf1bd77
commit
aa174b3bd9
@@ -1,4 +1,5 @@
|
||||
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.13.tar.gz 870773 BLAKE2B 1fe4489e7ab76730c156bcad020104084b116749cc1c38e441a06676642c3337814ae03bfb4f3279c7ac881483fbc234e09f9e42ed381772eef888b7bbbed12e SHA512 56f5860e81b148014bdb567a8b0d34979fbbbfed0a6a453e861b8f7444b88af9fd62fc7e90644254b79f73c4c58016c9a57a550596fcb51f4c9e64262610eea0
|
||||
DIST rtorrent-0.16.8.tar.gz 854737 BLAKE2B 2461c75d0fe0b704eb3cb0b677e55788ca0cfa9eb935db51ea8757c27f2be36f28bc5585a2482b9789a09e5ea2785c4b407318bd30895e2d11a8b08746a69c11 SHA512 f17c0691543d109b619ff8c4251c1c0eefe94df133684b013939e9b8832b2c4d4ca72087ac0127f1668ee5238735b09febe3f2f2b2d41dfb4fef543b786e4deb
|
||||
DIST rtorrent-0.16.9.tar.gz 858107 BLAKE2B 0dafaba7d3a678e5e37cf3d6ff1711d36d63dc0754adcb00c1d748ce64cfffa0a8f8e93ff67a5829578cf5a0bbad67a28da55077df02d1748516527fb4dcc980 SHA512 d6c023d007f163227c76d3aa5b7c2fc7ee704631e00389e3b5e446a660449716642b3129326765f76e418fd6feac1e6d6cb38e22ebb9a17731d3a246660a73ef
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
Fix regression from 0.16.13
|
||||
PR merged https://github.com/rakshasa/rtorrent/pull/1806.patch
|
||||
From 8e52277917c1d84cb7cef46cc7bc5544738b85f9 Mon Sep 17 00:00:00 2001
|
||||
From: Xirvik <community@xirvik.net>
|
||||
Date: Thu, 4 Jun 2026 23:15:50 +0000
|
||||
Subject: [PATCH] fix(rpc): preserve c_str() stability of stored XMLRPC method
|
||||
--- a/src/rpc/xmlrpc.cc
|
||||
+++ b/src/rpc/xmlrpc.cc
|
||||
@@ -1,3 +1,4 @@
|
||||
+#include <deque>
|
||||
#include "config.h"
|
||||
|
||||
#include "xmlrpc.h"
|
||||
@@ -9,7 +10,7 @@
|
||||
|
||||
namespace rpc {
|
||||
|
||||
-std::vector<std::string> XmlRpc::m_command_names;
|
||||
+std::deque<std::string> XmlRpc::m_command_names;
|
||||
|
||||
const char*
|
||||
XmlRpc::store_command_name(const char* name) {
|
||||
--- a/src/rpc/xmlrpc.h
|
||||
+++ b/src/rpc/xmlrpc.h
|
||||
@@ -1,6 +1,7 @@
|
||||
#ifndef RTORRENT_RPC_XMLRPC_H
|
||||
#define RTORRENT_RPC_XMLRPC_H
|
||||
|
||||
+#include <deque>
|
||||
#include <functional>
|
||||
#include <torrent/common.h>
|
||||
#include <torrent/hash_string.h>
|
||||
@@ -61,7 +62,7 @@ class XmlRpc {
|
||||
private:
|
||||
static const char* store_command_name(const char* name);
|
||||
|
||||
- static std::vector<std::string> m_command_names;
|
||||
+ static std::deque<std::string> m_command_names;
|
||||
|
||||
slot_download m_slotFindDownload;
|
||||
slot_file m_slotFindFile;
|
||||
128
net-p2p/rtorrent/rtorrent-0.16.13.ebuild
Normal file
128
net-p2p/rtorrent/rtorrent-0.16.13.ebuild
Normal file
@@ -0,0 +1,128 @@
|
||||
# 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
|
||||
|
||||
# merged in master
|
||||
"${FILESDIR}"/${P}-fix_use_after_free.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"@<nlohmann/json.hpp>@' \
|
||||
-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() {
|
||||
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" "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"
|
||||
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user