From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: net-p2p/rtorrent/files/, net-p2p/rtorrent/
Date: Sat, 9 Dec 2023 18:11:05 +0000 (UTC) [thread overview]
Message-ID: <1702145161.4de5a51b48af8c5de3d3ade1a1adf77c7801c0a7.sam@gentoo> (raw)
commit: 4de5a51b48af8c5de3d3ade1a1adf77c7801c0a7
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 9 17:02:21 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> 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 <sam <AT> 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 <sundell.software@gmail.com>
+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 <execinfo.h>
+- 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 <rak/functional.h>
+ #include <rak/error_number.h>
+
+-#ifdef USE_EXECINFO
++#ifdef HAVE_BACKTRACE
+ #include <execinfo.h>
+ #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"
+}
next reply other threads:[~2023-12-09 18:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-09 18:11 Sam James [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-03-10 3:06 [gentoo-commits] repo/gentoo:master commit in: net-p2p/rtorrent/files/, net-p2p/rtorrent/ Sam James
2024-11-09 1:53 Jason Zaman
2023-03-04 7:18 Sam James
2018-08-10 9:02 Jason Zaman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1702145161.4de5a51b48af8c5de3d3ade1a1adf77c7801c0a7.sam@gentoo \
--to=sam@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox