1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-03 01:23:49 +00:00

Update net-p2p/rtorrent to 0.9.2.

This commit is contained in:
Florent Thoumie 2012-07-05 08:40:32 +00:00
parent 54df4cd304
commit a2a0aa88af
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=300508
3 changed files with 6 additions and 43 deletions

View File

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

View File

@ -1,2 +1,2 @@
SHA256 (rtorrent-0.8.9.tar.gz) = cca70eb36a0c176bbd6fdb3afe2bc9f163fa4c9377fc33bc29689dec60cf6d84
SIZE (rtorrent-0.8.9.tar.gz) = 570904
SHA256 (rtorrent-0.9.2.tar.gz) = 5c8f8c780bee376afce3c1cde2f5ecb928f40bac23b2b8171deed5cf3c888c3d
SIZE (rtorrent-0.9.2.tar.gz) = 591837

View File

@ -1,37 +0,0 @@
--- src/thread_base.cc.orig 2011-04-05 11:26:11.000000000 +0100
+++ src/thread_base.cc 2011-06-09 18:59:41.375670521 +0100
@@ -44,4 +44,5 @@
#include <iostream>
#include <signal.h>
+#include <unistd.h>
#include <rak/error_number.h>
#include <torrent/exceptions.h>
@@ -61,7 +61,7 @@
static const unsigned int max_size = 32;
- thread_queue_hack() { std::memset(this, 0, sizeof(thread_queue_hack)); }
+ thread_queue_hack() : m_lock(0) { std::memset(this, 0, sizeof(thread_queue_hack)); }
void lock() { while (!__sync_bool_compare_and_swap(&m_lock, 0, 1)) usleep(0); }
void unlock() { __sync_bool_compare_and_swap(&m_lock, 1, 0); }
@@ -202,9 +203,14 @@
void
ThreadBase::interrupt_main_polling() {
- do {
+ int sleep_length = 0;
+
+ while (ThreadBase::is_main_polling()) {
+ pthread_kill(main_thread->m_thread, SIGUSR1);
+
if (!ThreadBase::is_main_polling())
return;
-
- pthread_kill(main_thread->m_thread, SIGUSR1);
- } while (1);
-}
+
+ usleep(sleep_length);
+ sleep_length = std::min(sleep_length + 50, 1000);
+ }
+}