1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-31 05:41:08 +00:00

- fix bug causing CPU load on FreeBSD.

- bump portrevisions.

PR:		ports/170766
Submitted by: 	Yamagi Burmeister <yamagi@yamagi.org>
Approved by:	maintainer (timeout > 2 weeks)

Feature safe: yes
This commit is contained in:
Andrej Zverev 2012-10-15 12:41:26 +00:00
parent c36cb48b31
commit 4b911a7e05
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=305913
3 changed files with 24 additions and 3 deletions

View File

@ -2,6 +2,7 @@
PORTNAME?= libtorrent
PORTVERSION?= 0.13.2
PORTREVISION= 1
CATEGORIES= net-p2p
MASTER_SITES= http://libtorrent.rakshasa.no/downloads/ \
${MASTER_SITE_LOCAL}

View File

@ -0,0 +1,20 @@
--- src/torrent/utils/thread_base.cc.orig
+++ src/torrent/utils/thread_base.cc
@@ -88,6 +88,8 @@ thread_base::stop_thread_wait() {
void
thread_base::interrupt() {
+ int sleep_length = 0;
+
__sync_fetch_and_or(&m_flags, flag_no_timeout);
while (is_polling() && has_no_timeout()) {
@@ -96,7 +98,8 @@ thread_base::interrupt() {
if (!(is_polling() && has_no_timeout()))
return;
- usleep(0);
+ usleep(sleep_length);
+ sleep_length = std::min(sleep_length + 50, 1000);
}
}

View File

@ -2,7 +2,7 @@
PORTNAME?= rtorrent
PORTVERSION?= 0.9.2
PORTREVISION?= 0
PORTREVISION?= 1
CATEGORIES= net-p2p
MASTER_SITES= http://libtorrent.rakshasa.no/downloads/ \
${MASTER_SITE_LOCAL}
@ -11,8 +11,8 @@ MASTER_SITE_SUBDIR= flz/rtorrent/
MAINTAINER?= flz@FreeBSD.org
COMMENT?= BitTorrent Client written in C++
BUILD_DEPENDS?= libtorrent=0.13.2:${PORTSDIR}/net-p2p/libtorrent
RUN_DEPENDS?= libtorrent=0.13.2:${PORTSDIR}/net-p2p/libtorrent
BUILD_DEPENDS?= libtorrent=0.13.2_1:${PORTSDIR}/net-p2p/libtorrent
RUN_DEPENDS?= libtorrent=0.13.2_1:${PORTSDIR}/net-p2p/libtorrent
LIB_DEPENDS?= curl.6:${PORTSDIR}/ftp/curl
CONFLICTS?= rtorrent-devel-[0-9]*