aboutsummaryrefslogtreecommitdiffstats
path: root/net-p2p
diff options
context:
space:
mode:
authoraz <az@FreeBSD.org>2013-08-25 23:17:18 +0800
committeraz <az@FreeBSD.org>2013-08-25 23:17:18 +0800
commit9ccdca80aff697dddebd7567bc6c4bcd46a4451b (patch)
treec7c4b915e80266c672a02e92dc08bef6e87f54aa /net-p2p
parent0e77c8234a311d2c28c80fa6d7aa8667de42eb28 (diff)
downloadfreebsd-ports-gnome-9ccdca80aff697dddebd7567bc6c4bcd46a4451b.tar.gz
freebsd-ports-gnome-9ccdca80aff697dddebd7567bc6c4bcd46a4451b.tar.zst
freebsd-ports-gnome-9ccdca80aff697dddebd7567bc6c4bcd46a4451b.zip
- add patch from net-p2p/libtorrent which can fix High CPU issue
- bump portrevisions PR: ports/181354 Submitted by: Darren <darren780@yahoo.com>
Diffstat (limited to 'net-p2p')
-rw-r--r--net-p2p/libtorrent-devel/Makefile2
-rw-r--r--net-p2p/libtorrent-devel/files/patch-src_torrent_utils_thread__base.cc20
-rw-r--r--net-p2p/rtorrent-devel/Makefile4
3 files changed, 23 insertions, 3 deletions
diff --git a/net-p2p/libtorrent-devel/Makefile b/net-p2p/libtorrent-devel/Makefile
index f5ae3a0973d9..57d9122d54f1 100644
--- a/net-p2p/libtorrent-devel/Makefile
+++ b/net-p2p/libtorrent-devel/Makefile
@@ -3,7 +3,7 @@
PORTNAME= libtorrent-devel
PORTVERSION= 0.13.3
-PORTREVISION= 0
+PORTREVISION= 1
CATEGORIES= net-p2p
MASTER_SITES= http://libtorrent.rakshasa.no/downloads/
DISTNAME= ${PORTNAME:S/-devel//}-${PORTVERSION}
diff --git a/net-p2p/libtorrent-devel/files/patch-src_torrent_utils_thread__base.cc b/net-p2p/libtorrent-devel/files/patch-src_torrent_utils_thread__base.cc
new file mode 100644
index 000000000000..0e63edc3bd07
--- /dev/null
+++ b/net-p2p/libtorrent-devel/files/patch-src_torrent_utils_thread__base.cc
@@ -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);
+ }
+ }
diff --git a/net-p2p/rtorrent-devel/Makefile b/net-p2p/rtorrent-devel/Makefile
index 178d9d1f51ac..a95d3f0c52b6 100644
--- a/net-p2p/rtorrent-devel/Makefile
+++ b/net-p2p/rtorrent-devel/Makefile
@@ -11,8 +11,8 @@ DISTNAME= ${PORTNAME:S/-devel//}-${PORTVERSION}
MAINTAINER= az@FreeBSD.org
COMMENT= BitTorrent Client written in C++ (development version)
-BUILD_DEPENDS= libtorrent-devel=0.13.3:${PORTSDIR}/net-p2p/libtorrent-devel
-RUN_DEPENDS= libtorrent-devel=0.13.3:${PORTSDIR}/net-p2p/libtorrent-devel
+BUILD_DEPENDS= libtorrent-devel=0.13.3_1:${PORTSDIR}/net-p2p/libtorrent-devel
+RUN_DEPENDS= libtorrent-devel=0.13.3_1:${PORTSDIR}/net-p2p/libtorrent-devel
LIB_DEPENDS= curl:${PORTSDIR}/ftp/curl
CONFLICTS= rtorrent-[0-9]*