From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id DB90E158013 for ; Sat, 9 Dec 2023 18:11:09 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 269802BC051; Sat, 9 Dec 2023 18:11:09 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 044A52BC04F for ; Sat, 9 Dec 2023 18:11:09 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 51F60342FB6 for ; Sat, 9 Dec 2023 18:11:08 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 358311495 for ; Sat, 9 Dec 2023 18:11:05 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1702145161.4de5a51b48af8c5de3d3ade1a1adf77c7801c0a7.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-p2p/rtorrent/files/, net-p2p/rtorrent/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-p2p/rtorrent/files/rtorrent-0.9.8-configure-c99.patch net-p2p/rtorrent/rtorrent-0.9.8-r3.ebuild X-VCS-Directories: net-p2p/rtorrent/ net-p2p/rtorrent/files/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 4de5a51b48af8c5de3d3ade1a1adf77c7801c0a7 X-VCS-Branch: master Date: Sat, 9 Dec 2023 18:11:05 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 071ff2f1-15c5-47d3-8359-a85eef655f74 X-Archives-Hash: 883f2b6633aad8bdd2c81ad72025b295 commit: 4de5a51b48af8c5de3d3ade1a1adf77c7801c0a7 Author: Sam James gentoo org> AuthorDate: Sat Dec 9 17:02:21 2023 +0000 Commit: Sam James gentoo org> CommitDate: Sat Dec 9 18:06:01 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4de5a51b net-p2p/rtorrent: fix modern C issue in configure Also, stop calling econf twice. Signed-off-by: Sam James gentoo.org> .../files/rtorrent-0.9.8-configure-c99.patch | 79 ++++++++++++++++++++++ net-p2p/rtorrent/rtorrent-0.9.8-r3.ebuild | 73 ++++++++++++++++++++ 2 files changed, 152 insertions(+) diff --git a/net-p2p/rtorrent/files/rtorrent-0.9.8-configure-c99.patch b/net-p2p/rtorrent/files/rtorrent-0.9.8-configure-c99.patch new file mode 100644 index 000000000000..a2fa67799b8e --- /dev/null +++ b/net-p2p/rtorrent/files/rtorrent-0.9.8-configure-c99.patch @@ -0,0 +1,79 @@ +https://github.com/rakshasa/rtorrent/commit/3f72e2760305936b27904d0080a5fb5600948bd5 + +From 3f72e2760305936b27904d0080a5fb5600948bd5 Mon Sep 17 00:00:00 2001 +From: rakshasa +Date: Sat, 27 Feb 2021 22:13:01 +0900 +Subject: [PATCH] Replaced custom execinfo autoconf test. + +--- a/configure.ac ++++ b/configure.ac +@@ -20,8 +20,6 @@ TORRENT_DISABLE_IPV6 + + AC_SYS_LARGEFILE + +-TORRENT_CHECK_EXECINFO +- + TORRENT_ENABLE_ARCH + TORRENT_WITH_SYSROOT + +@@ -29,6 +27,7 @@ TORRENT_WITHOUT_VARIABLE_FDSET + TORRENT_WITHOUT_STATVFS + TORRENT_WITHOUT_STATFS + ++AX_EXECINFO + AX_PTHREAD([], AC_MSG_ERROR([requires pthread])) + AX_WITH_CURSES + +--- a/scripts/common.m4 ++++ b/scripts/common.m4 +@@ -150,21 +150,6 @@ dnl Need to fix this so that it uses the stuff defined by the system. + ]) + ]) + +-AC_DEFUN([TORRENT_CHECK_EXECINFO], [ +- AC_MSG_CHECKING(for execinfo.h) +- +- AC_COMPILE_IFELSE([AC_LANG_SOURCE([ +- #include +- int main() { backtrace((void**)0, 0); backtrace_symbols((char**)0, 0); return 0;} +- ])], +- [ +- AC_MSG_RESULT(yes) +- AC_DEFINE(USE_EXECINFO, 1, Use execinfo.h) +- ], [ +- AC_MSG_RESULT(no) +- ]) +-]) +- + AC_DEFUN([TORRENT_CHECK_ALIGNED], [ + AC_MSG_CHECKING(the byte alignment) + +--- a/src/main.cc ++++ b/src/main.cc +@@ -53,7 +53,7 @@ + #include + #include + +-#ifdef USE_EXECINFO ++#ifdef HAVE_BACKTRACE + #include + #endif + +@@ -533,7 +533,7 @@ handle_sigbus(int signum, siginfo_t* sa, void* ptr) { + std::stringstream output; + output << "Caught SIGBUS, dumping stack:" << std::endl; + +-#ifdef USE_EXECINFO ++#ifdef HAVE_BACKTRACE + void* stackPtrs[20]; + + // Print the stack and exit. +@@ -604,7 +604,7 @@ do_panic(int signum) { + + output << "Caught " << SignalHandler::as_string(signum) << ", dumping stack:" << std::endl; + +-#ifdef USE_EXECINFO ++#ifdef HAVE_BACKTRACE + void* stackPtrs[20]; + + // Print the stack and exit. diff --git a/net-p2p/rtorrent/rtorrent-0.9.8-r3.ebuild b/net-p2p/rtorrent/rtorrent-0.9.8-r3.ebuild new file mode 100644 index 000000000000..f2faf7732600 --- /dev/null +++ b/net-p2p/rtorrent/rtorrent-0.9.8-r3.ebuild @@ -0,0 +1,73 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools linux-info systemd + +DESCRIPTION="BitTorrent Client using libtorrent" +HOMEPAGE="https://rakshasa.github.io/rtorrent/" +SRC_URI="http://rtorrent.net/downloads/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris" +IUSE="debug selinux test xmlrpc" +RESTRICT="!test? ( test )" + +COMMON_DEPEND="~net-libs/libtorrent-0.13.${PV##*.} + >=net-misc/curl-7.19.1 + sys-libs/ncurses:0= + xmlrpc? ( dev-libs/xmlrpc-c:= )" +RDEPEND="${COMMON_DEPEND} + selinux? ( sec-policy/selinux-rtorrent ) +" +DEPEND="${COMMON_DEPEND} + dev-util/cppunit + virtual/pkgconfig" + +DOCS=( doc/rtorrent.rc ) + +PATCHES=( + "${FILESDIR}/${P}-bgo891995.patch" + "${FILESDIR}/${PN}-0.9.8-configure-c99.patch" +) + +pkg_setup() { + if ! linux_config_exists || ! linux_chkconfig_present IPV6; then + ewarn "rtorrent will not start without IPv6 support in your kernel" + ewarn "without further configuration. Please set bind=0.0.0.0 or" + ewarn "similar in your rtorrent.rc" + ewarn "Upstream bug: https://github.com/rakshasa/rtorrent/issues/732" + fi +} + +src_prepare() { + default + + # 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() { + # configure needs bash or script bombs out on some null shift, bug #291229 + CONFIG_SHELL=${BASH} econf \ + $(use_enable debug) \ + $(use_with xmlrpc xmlrpc-c) +} + +src_install() { + default + doman doc/rtorrent.1 + + newinitd "${FILESDIR}/rtorrent-r1.init" rtorrent + newconfd "${FILESDIR}/rtorrentd.conf" rtorrent + systemd_newunit "${FILESDIR}/rtorrentd_at-r1.service" "rtorrentd@.service" +}