Update of /cvsroot/fink/dists/10.4/unstable/main/finkinfo/net
In directory vz-cvs-3.sog:/tmp/cvs-serv31853/net
Modified Files:
rtorrent.info
Added Files:
libtorrent15.info libtorrent15.patch rtorrent.patch
Log Message:
friendly takeover, upstream update rtorrent/libtorrent15, also re-ported to
darwin8
--- NEW FILE: libtorrent15.patch ---
--- libtorrent-0.12.9-orig/rak/allocators.h 2011-06-21 22:37:15.000000000
-0700
+++ libtorrent-0.12.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<pointer>(malloc(size));
+#else
+#error "Missing equivalent of posix_memalign()."
+#endif
return ptr;
}
--- libtorrent-0.12.9-orig/src/torrent/thread_base.h 2011-06-21
23:12:25.000000000 -0700
+++ libtorrent-0.12.9/src/torrent/thread_base.h 2011-06-21 23:33:19.000000000
-0700
@@ -37,6 +37,19 @@
#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 <libkern/OSAtomic.h>
+#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)
+#endif
+
#include <pthread.h>
#include <sys/types.h>
#include <torrent/common.h>
--- libtorrent-0.12.9-orig/src/net/socket_set.h 2011-06-26 21:28:11.000000000
-0700
+++ libtorrent-0.12.9/src/net/socket_set.h 2011-06-26 21:28:56.000000000
-0700
@@ -53,12 +53,12 @@
// Propably should rename to EventSet...
-class SocketSet : private std::vector<Event*, rak::cacheline_allocator<> > {
+class SocketSet : private std::vector<Event*, rak::cacheline_allocator<Event*>
> {
public:
typedef uint32_t size_type;
- typedef std::vector<Event*, rak::cacheline_allocator<> > base_type;
- typedef std::vector<size_type, rak::cacheline_allocator<> > Table;
+ typedef std::vector<Event*, rak::cacheline_allocator<Event*> > base_type;
+ typedef std::vector<size_type, rak::cacheline_allocator<size_type> > Table;
static const size_type npos = static_cast<size_type>(-1);
--- libtorrent-0.12.9-orig/src/torrent/utils/extents.h 2011-07-16
17:26:37.000000000 -0700
+++ libtorrent-0.12.9/src/torrent/utils/extents.h 2011-07-17
00:28:48.000000000 -0700
@@ -39,6 +39,19 @@
#include <tr1/array>
+#if (__GNUC__ == 4 && __GNUC_MINOR__ < 1 && __GNUC_PATCHLEVEL__ < 2)
+// apple-gcc-4.0.1 missing definition of std::tr1::array::assign
+namespace std {
+namespace tr1 {
+template<typename _Tp, size_t _Nm>
+void
+array<_Tp,_Nm>::assign(const value_type& v) {
+ std::fill_n(this->begin(), this->size(), v);
+}
+} // end namespace tr1
+} // end namespace std
+#endif
+
namespace torrent {
template <typename Key, typename Tp, unsigned int TableSize, unsigned int
TableBits>
Index: rtorrent.info
===================================================================
RCS file: /cvsroot/fink/dists/10.4/unstable/main/finkinfo/net/rtorrent.info,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- rtorrent.info 1 May 2011 06:44:23 -0000 1.6
+++ rtorrent.info 19 Jul 2011 23:58:04 -0000 1.7
@@ -1,38 +1,42 @@
Package: rtorrent
-Version: 0.8.6
-Revision: 2
+Version: 0.8.9
+Revision: 1
License: GPL
HomePage: http://libtorrent.rakshasa.no
Description: Ncurses ui bittorrent client
-Maintainer: Michal Suchanek <[email protected]>
+Maintainer: David Fang <[email protected]>
Depends: <<
libssh2.1-shlibs,
libsigc++2-shlibs,
libcurl4-shlibs (>= 7.12.0-1),
libncursesw5-shlibs,
- libtorrent12-shlibs (>= 0.12.6-1)
+ 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,
- libtorrent12 (>= 0.12.6-1),
- system-openssl-dev
+ libtorrent15 (>= 0.12.9-1)
<<
+BuildConflicts: openssl-dev, openssl097-dev, openssl098-dev
Source: http://libtorrent.rakshasa.no/downloads/%n-%v.tar.gz
-Source-MD5: b804c45c01c40312926bcea6b55bb084
+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: --disable-dependency-tracking --mandir='${prefix}'/share/man
--enable-ipv6
+ConfigureParams: --mandir='${prefix}'/share/man --enable-ipv6
CompileScript:
@@ -70,4 +74,10 @@
DescPackaging: <<
pkgconfig does not find the system openssl
versioned deps added based on configure[.ac] checks for requirements
+
+Former maintainer: Michal Suchanek <[email protected]>
+<<
+DescPort: <<
+Upstream now requires g++-4.2+, but fangism ported to g++-4.0.1
+for darwin8 support.
<<
--- NEW FILE: libtorrent15.info ---
Package: libtorrent15
Version: 0.12.9
Revision: 1
License: GPL
HomePage: http://libtorrent.rakshasa.no
Description: Bittorrent library
Maintainer: David Fang <[email protected]>
Depends: %n-shlibs (=%v-%r)
BuildDepends: fink (>= 0.24.12), libsigc++2, system-openssl-dev, pkgconfig (>=
0.9-1)
BuildConflicts: openssl-dev, openssl097-dev, openssl098-dev
Conflicts: libtorrent, libtorrent11, libtorrent12
Replaces: libtorrent, libtorrent11, libtorrent12
Source: http://libtorrent.rakshasa.no/downloads/libtorrent-%v.tar.gz
Source-MD5: b128bbd324f03eb42ef5060080f87548
# Source-SHA1: bf7082f98bd6281493cba94a456697fb88c2c21b
PatchFile: %n.patch
PatchFile-MD5: 8465b02c2abf57b7b31cd30d74e25279
#PKG_CONFIG_PATH: %p/lib/system-openssl/lib/pkgconfig
BuildDependsOnly: true
GCC: 4.0
SetCPPFLAGS: -I%p/lib/system-openssl/include
SetLDFLAGS: -L%p/lib/system-openssl/lib
ConfigureParams: --enable-ipv6 --with-kqueue
CompileScript:<<
PKG_CONFIG_PATH=%p/lib/system-openssl/lib/pkgconfig ./configure %c
make
<<
InstallScript:
DocFiles: <<
AUTHORS
COPYING
ChangeLog
NEWS
README
<<
SplitOff: <<
Package: %N-shlibs
Depends: libsigc++2-shlibs
Files: lib/libtorrent.14.dylib
Shlibs: %p/lib/libtorrent.14.dylib 15.0.0 %n (>= 0.12.9-1)
DocFiles: <<
AUTHORS
COPYING
ChangeLog
NEWS
README
<<
<<
DescPackaging: <<
pkgconfig does not find the system openssl
Library version info and name change inconsistently between major versions.
Former maintainer: Michal Suchanek <[email protected]>
<<
DescPort: <<
fangism:
Some C++ related patching was necessary to get the source to compile against
g++-4.0, even though upstream requires g++-4.2 or higher.
Also, some POSIX APIs that were expected for atomic operations were
mapped to darwin8 equivalents.
<<
--- NEW FILE: rtorrent.patch ---
--- 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<pointer>(malloc(size));
+#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 <libkern/OSAtomic.h>
+#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 <pthread.h>
#include <sys/types.h>
#include <torrent/common.h>
--- 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 <rak/priority_queue_default.h>
#include <torrent/torrent.h>
+#include <libkern/OSAtomic.h>
+#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<int32_t*>(itr), NULL,
reinterpret_cast<int32_t>(v));
__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<int32_t*>(&m_safe.scgi),
NULL, reinterpret_cast<int32_t>(scgi)))
return false;
change_xmlrpc_log();
------------------------------------------------------------------------------
Magic Quadrant for Content-Aware Data Loss Prevention
Research study explores the data loss prevention market. Includes in-depth
analysis on the changes within the DLP market, and the criteria used to
evaluate the strengths and weaknesses of these DLP solutions.
http://www.accelacomm.com/jaw/sfnl/114/51385063/
_______________________________________________
Fink-commits mailing list
[email protected]
http://news.gmane.org/gmane.os.apple.fink.cvs