the Fink project is an effort to port
popular Unix programs to Mac OS X
Package: rtorrent
Version: 0.8.9
Revision: 1
License: GPL
HomePage: http://libtorrent.rakshasa.no
Description: Ncurses ui bittorrent client
Maintainer: David Fang
Depends: <<
libssh2.1-shlibs,
libsigc++2-shlibs,
libcurl4-shlibs (>= 7.12.0-1),
libncursesw5-shlibs,
libtorrent15-shlibs (>= 0.12.9-1)
<<
BuildDepends: <<
fink (>= 0.24.12),
libssh2.1,
libsigc++2,
libcurl4 (>= 7.12.0-1),
pkgconfig (>= 0.9-1),
libncursesw5,
libtorrent15 (>= 0.12.9-1)
<<
BuildConflicts: openssl-dev, openssl097-dev, openssl098-dev
Source: http://libtorrent.rakshasa.no/downloads/%n-%v.tar.gz
Source-MD5: 629247636cb1210663b52dadbd040a6c
# Source-SHA1: ffce3959ba91738bb444d689db3db1e2375b14ce
PatchFile: %n.patch
PatchFile-MD5: 4de151654f2bb16a9be2bb027b4a93ec
GCC: 4.0
SetCPPFLAGS: -I%p/lib/system-openssl/include
SetLDFLAGS: -L%p/lib/system-openssl/lib
ConfigureParams: --mandir='${prefix}'/share/man --enable-ipv6
CompileScript:
InstallScript:
DocFiles: <<
AUTHORS
COPYING
ChangeLog
NEWS
README
TODO
<<
DescDetail: <<
Built to make torrent transfer fast.
This version also supports DHT. You have to turn it on in your configuration if
you want to use it.
Uses mmap to acces the data as fast as possible. Beware cheesy filesystem
implementations (such as NFS or AFS). There is a configuration option that
should work around these deficiencies.
!!BEWARE!! There is incompatibility in session directory format and
configuration file format. If rtorrent does not find files for existing
torrents opened by older rtorrent or your automation commands stopped working
this is the reason.
Due to HFS limitation and lack of file rename feature in rtorrent it is not
possible to save torrents with broken (improperly encoded) filenames.
<<
DescPackaging: <<
pkgconfig does not find the system openssl
versioned deps added based on configure[.ac] checks for requirements
Former maintainer: Michal Suchanek
<<
DescPort: <<
Upstream now requires g++-4.2+, but fangism ported to g++-4.0.1
for darwin8 support.
<<
--- rtorrent-0.8.9-orig/rak/allocators.h 2011-06-21 22:37:15.000000000 -0700
+++ rtorrent-0.8.9/rak/allocators.h 2011-06-21 22:42:44.000000000 -0700
@@ -77,8 +77,15 @@
static pointer alloc_size(size_type size) {
pointer ptr = NULL;
+#ifdef HAVE_POSIX_MEMALIGN
int __UNUSED result = posix_memalign((void**)&ptr, LT_SMP_CACHE_BYTES, size);
+#elif defined(__APPLE__)
+ // apple-darwin's malloc is already Altivec-aligned (16B)
+ ptr = static_cast
+#else
+#error "Missing equivalent of posix_memalign()."
+#endif
return ptr;
}
--- rtorrent-0.8.9-orig/src/thread_base.h 2011-06-21 23:12:25.000000000 -0700
+++ rtorrent-0.8.9/src/thread_base.h 2011-06-21 23:33:19.000000000 -0700
@@ -37,6 +37,20 @@
#ifndef LIBTORRENT_THREAD_BASE_H
#define LIBTORRENT_THREAD_BASE_H
+#if (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 2))
+#if defined(__APPLE__)
+#define USE_DARWIN_ATOMICS
+#endif
+#endif
+
+#ifdef USE_DARWIN_ATOMICS
+#include
+#define __sync_add_and_fetch(x, y) OSAtomicIncrement32Barrier(x)
+#define __sync_sub_and_fetch(x, y) OSAtomicDecrement32Barrier(x)
+#define __sync_lock_test_and_set(x, y) OSAtomicTestAndSetBarrier(y, x)
+#define __sync_bool_compare_and_swap(x, y, z) OSAtomicCompareAndSwap32Barrier(y, z, x)
+#endif
+
#include
#include
#include
--- rtorrent-0.8.9-orig/src/control.h 2011-06-27 11:08:48.000000000 -0700
+++ rtorrent-0.8.9/src/control.h 2011-06-27 11:10:06.000000000 -0700
@@ -43,6 +43,9 @@
#include
#include
+#include
+#define __sync_synchronize OSMemoryBarrier
+
namespace ui {
class Root;
}
--- rtorrent-0.8.9-orig/src/rpc/command_impl.h 2011-06-27 12:20:31.000000000 -0700
+++ rtorrent-0.8.9/src/rpc/command_impl.h 2011-06-27 12:23:22.000000000 -0700
@@ -92,7 +92,8 @@
inline torrent::Object*
command_base::push_stack(const torrent::Object::list_type& args, stack_type* stack) {
- return push_stack(args.data(), args.data() + args.size(), stack);
+ // vector<>::data() was introduced by ISO C++ DR 464
+ return push_stack(&args.front(), &args.front() + args.size(), stack);
}
inline void
--- rtorrent-0.8.9-orig/src/rpc/object_storage.h 2011-06-27 12:33:21.000000000 -0700
+++ rtorrent-0.8.9/src/rpc/object_storage.h 2011-06-27 12:33:38.000000000 -0700
@@ -78,7 +78,7 @@
using base_type::end;
using base_type::size;
using base_type::empty;
- using base_type::key_eq;
+ using base_type::key_equal;
using base_type::bucket;
using base_type::bucket_count;
using base_type::max_bucket_count;
--- rtorrent-0.8.9-orig/src/thread_base.cc 2011-07-16 16:41:13.000000000 -0700
+++ rtorrent-0.8.9/src/thread_base.cc 2011-07-16 16:45:34.000000000 -0700
@@ -79,7 +79,7 @@
if (itr == max_capacity())
throw torrent::internal_error("Overflowed thread_queue.");
- __sync_bool_compare_and_swap(itr, NULL, v);
+ __sync_bool_compare_and_swap(reinterpret_cast
__sync_bool_compare_and_swap(&m_lock, 1, 0);
}
--- rtorrent-0.8.9-orig/src/thread_worker.cc 2011-07-16 16:45:44.000000000 -0700
+++ rtorrent-0.8.9/src/thread_worker.cc 2011-07-16 16:46:43.000000000 -0700
@@ -69,7 +69,7 @@
bool
ThreadWorker::set_scgi(rpc::SCgi* scgi) {
- if (!__sync_bool_compare_and_swap(&m_safe.scgi, NULL, scgi))
+ if (!__sync_bool_compare_and_swap(reinterpret_cast
return false;
change_xmlrpc_log();