Update of /cvsroot/fink/experimental/fangism/finkinfo
In directory vz-cvs-3.sog:/tmp/cvs-serv13352
Modified Files:
libtorrent15.info libtorrent15.patch
Log Message:
upstream update 0.13.2, patched the hell out to build against older compilers,
same shlib name as previous %v, validated on powerpc-darwin8
Index: libtorrent15.patch
===================================================================
RCS file: /cvsroot/fink/experimental/fangism/finkinfo/libtorrent15.patch,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- libtorrent15.patch 11 Dec 2011 01:28:13 -0000 1.3
+++ libtorrent15.patch 2 Aug 2012 17:51:30 -0000 1.4
@@ -16,11 +16,11 @@
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
+--- libtorrent-0.12.9-orig/src/torrent/common.h 2011-06-21
23:12:25.000000000 -0700
++++ libtorrent-0.12.9/src/torrent/common.h 2011-06-21 23:33:19.000000000
-0700
+@@ -37,6 +37,24 @@
+ #ifndef LIBTORRENT_COMMON_H
+ #define LIBTORRENT_COMMON_H
+#if (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 2))
+#if defined(__APPLE__)
@@ -30,14 +30,38 @@
+
+#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_add_and_fetch(x, y) OSAtomicAdd32Barrier(y, x)
++#define __sync_sub_and_fetch(x, y) OSAtomicAdd32Barrier(-(y), x)
++#define __sync_and_and_fetch(x, y) OSAtomicAnd32Barrier(y, x)
++#define __sync_or_and_fetch(x, y) OSAtomicOr32Barrier(y, 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)
++#define __sync_fetch_and_or(x, y) ( __sync_or_and_fetch(x, y), *x
)
++#define __sync_fetch_and_and(x, y) ( __sync_and_and_fetch(x, y),
*x )
+#endif
+
- #include <pthread.h>
- #include <sys/types.h>
- #include <torrent/common.h>
+ #include <inttypes.h>
+ #include <cstddef.h>
+
+--- libtorrent-0.12.9-orig/src/torrent/utils/thread_base.h 2011-06-21
23:12:25.000000000 -0700
++++ libtorrent-0.12.9/src/torrent/utils/thread_base.h 2011-06-21
23:33:19.000000000 -0700
+@@ -102,7 +102,6 @@
+ virtual const char* name() const = 0;
+
+ Poll* poll() { return m_poll; }
+- signal_type* signal_bitfield() { return &m_signal_bitfield; }
+ pthread_t pthread() { return m_thread; }
+
+ virtual void init_thread() = 0;
+@@ -150,6 +150,8 @@
+
+ slot_void m_slot_do_work;
+ slot_timer m_slot_next_timeout;
++public:
++ signal_type* signal_bitfield() { return &m_signal_bitfield; }
+ };
+
+ inline void
--- 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 @@
@@ -81,11 +105,80 @@
--- libtorrent-0.13.0-orig/src/torrent/utils/log.cc 2011-12-10
17:05:09.000000000 -0800
+++ libtorrent-0.13.0/src/torrent/utils/log.cc 2011-12-10 17:05:16.000000000
-0800
@@ -232,7 +232,7 @@
-
- void
log_cleanup() {
+ pthread_mutex_lock(&log_mutex);
+
- log_groups.assign(log_group());
+ std::fill(log_groups.begin(), log_groups.end(), log_group());
log_outputs.clear();
log_children.clear();
+--- libtorrent-0.13.2-orig/src/torrent/utils/signal_bitfield.cc
2012-07-31 17:33:38.000000000 -0700
++++ libtorrent-0.13.2/src/torrent/utils/signal_bitfield.cc 2012-07-31
17:38:56.000000000 -0700
+@@ -52,7 +52,7 @@
+ throw internal_error("signal_bitfield::add_signal(...): Cannot add empty
slot.");
+
+ unsigned int index = m_size;
+- __sync_add_and_fetch(&m_size, 1);
++ __sync_add_and_fetch((int32_t*)(&m_size), 1);
+
+ m_slots[index] = slot;
+ return index;
+@@ -62,7 +62,7 @@
+ signal_bitfield::work() {
+ bitfield_type bitfield;
+
+- while (!__sync_bool_compare_and_swap(&m_bitfield, (bitfield = m_bitfield),
0))
++ while (!__sync_bool_compare_and_swap((int32_t*)(&m_bitfield), (bitfield =
m_bitfield), 0))
+ ; // Do nothing.
+
+ unsigned int i = 0;
+--- libtorrent-0.13.2-orig/src/torrent/utils/thread_base.cc 2012-07-31
17:46:01.000000000 -0700
++++ libtorrent-0.13.2/src/torrent/utils/thread_base.cc 2012-08-01
13:00:55.000000000 -0700
+@@ -69,7 +69,7 @@
+
+ void
+ thread_base::stop_thread() {
+- __sync_fetch_and_or(&m_flags, flag_do_shutdown);
++ __sync_fetch_and_or((uint32_t*)&m_flags, flag_do_shutdown);
+ interrupt();
+ }
+
+@@ -88,7 +88,7 @@
+
+ void
+ thread_base::interrupt() {
+- __sync_fetch_and_or(&m_flags, flag_no_timeout);
++ __sync_fetch_and_or((uint32_t*)&m_flags, flag_no_timeout);
+
+ while (is_polling() && has_no_timeout()) {
+ pthread_kill(m_thread, SIGUSR1);
+@@ -115,7 +115,7 @@
+ thread->call_events();
+ thread->signal_bitfield()->work();
+
+- __sync_fetch_and_or(&thread->m_flags, flag_polling);
++ __sync_fetch_and_or((uint32_t*)&thread->m_flags, flag_polling);
+
+ // Call again after setting flag_polling to ensure we process
+ // any events set while it was working.
+@@ -143,7 +143,7 @@
+ poll_flags = torrent::Poll::poll_worker_thread;
+
+ thread->m_poll->do_poll(next_timeout, poll_flags);
+- __sync_fetch_and_and(&thread->m_flags, ~(flag_polling |
flag_no_timeout));
++ __sync_fetch_and_and((uint32_t*)&thread->m_flags, ~(flag_polling |
flag_no_timeout));
+ }
+
+ } catch (torrent::shutdown_exception& e) {
+--- libtorrent-0.13.2-orig/src/thread_disk.cc 2012-08-01 13:03:26.000000000
-0700
++++ libtorrent-0.13.2/src/thread_disk.cc 2012-08-01 13:03:45.000000000
-0700
+@@ -64,7 +64,7 @@
+ if ((m_flags & flag_did_shutdown))
+ throw internal_error("Already trigged shutdown.");
+
+- __sync_or_and_fetch(&m_flags, flag_did_shutdown);
++ __sync_or_and_fetch((uint32_t*)&m_flags, flag_did_shutdown);
+ throw shutdown_exception();
+ }
+
Index: libtorrent15.info
===================================================================
RCS file: /cvsroot/fink/experimental/fangism/finkinfo/libtorrent15.info,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- libtorrent15.info 11 Dec 2011 01:28:13 -0000 1.4
+++ libtorrent15.info 2 Aug 2012 17:51:30 -0000 1.5
@@ -1,5 +1,5 @@
-Package: libtorrent15
-Version: 0.13.0
+Package: libtorrent16
+Version: 0.13.2
Revision: 1
License: GPL
HomePage: http://libtorrent.rakshasa.no
@@ -8,16 +8,15 @@
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
+BuildConflicts: openssl097-dev, openssl098-dev
Conflicts: libtorrent, libtorrent11, libtorrent12, libtorrent15
Replaces: libtorrent, libtorrent11, libtorrent12, libtorrent15
Source: http://libtorrent.rakshasa.no/downloads/libtorrent-%v.tar.gz
-Source-MD5: d499178f72010d5067a77f41fa1a1505
-# Source-SHA1: d191fc62bb29c19d19a9cb7315e6f8308588efdb
+Source-MD5: 96c0b81501357df402ab592f59ecaeab
PatchFile: %n.patch
-PatchFile-MD5: cef4e207f4246e1dba2c82797890d335
+PatchFile-MD5: 5dd8d0a0e7f1db0f99311a8bb81070f0
#PKG_CONFIG_PATH: %p/lib/system-openssl/lib/pkgconfig
BuildDependsOnly: true
@@ -77,4 +76,6 @@
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.
+Additional patching needed to C-cast (ewww...) address-of-unsigned to
+pointer-to-signed because of differences in the atomicity API.
<<
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Fink-commits mailing list
[email protected]
http://news.gmane.org/gmane.os.apple.fink.cvs