downgrade libtorrent and rtorrent; rtorrent crashes only solution was to use stable and not svn version (8733)
git-svn-id: svn://svn.openwrt.org/openwrt/packages@26664 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
ffb77e318d
commit
e226e19a3e
@ -8,17 +8,15 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=libtorrent
|
||||
PKG_REV:=1209
|
||||
PKG_VERSION:=0.12.6_r$(PKG_REV)
|
||||
PKG_VERSION:=0.12.6
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||
PKG_SOURCE_URL:=svn://rakshasa.no/libtorrent/trunk/libtorrent
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE_VERSION:=$(PKG_REV)
|
||||
PKG_SOURCE_PROTO:=svn
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=http://libtorrent.rakshasa.no/downloads
|
||||
PKG_MD5SUM:=037499ed708aaf72988cee60e5a8d96b
|
||||
|
||||
PKG_FIXUP:=libtool
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_INSTALL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
@ -33,11 +31,11 @@ define Package/libtorrent
|
||||
endef
|
||||
|
||||
define Package/libtorrent/description
|
||||
LibTorrent is a BitTorrent library written in C++ for *nix, with a focus
|
||||
on high performance and good code. The library differentiates itself from
|
||||
other implementations by transfering directly from file pages to the
|
||||
network stack. On high-bandwidth connections it is able to seed at 3 times
|
||||
the speed of the official client.
|
||||
LibTorrent is a BitTorrent library written in C++ for *nix, with a focus on
|
||||
high performance and good code. The library differentiates itself from other
|
||||
implementations by transfering directly from file pages to the network stack.
|
||||
On high-bandwidth connections it is able to seed at 3 times the speed of the
|
||||
official client.
|
||||
endef
|
||||
|
||||
TARGET_CPPFLAGS += -fno-strict-aliasing -fno-inline
|
||||
@ -51,7 +49,7 @@ CONFIGURE_ARGS+= \
|
||||
--enable-openssl \
|
||||
|
||||
define Build/Configure
|
||||
(cd $(PKG_BUILD_DIR); ./autogen.sh );
|
||||
( cd $(PKG_BUILD_DIR); ./autogen.sh );
|
||||
$(call Build/Configure/Default)
|
||||
endef
|
||||
|
||||
@ -70,4 +68,3 @@ define Package/libtorrent/install
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,libtorrent))
|
||||
|
||||
|
@ -1,28 +1,35 @@
|
||||
Index: libtorrent-0.12.6_r1209/configure.ac
|
||||
Index: libtorrent-0.12.6/scripts/checks.m4
|
||||
===================================================================
|
||||
--- libtorrent-0.12.6_r1209.orig/configure.ac 2011-03-27 12:23:16.000000000 +0200
|
||||
+++ libtorrent-0.12.6_r1209/configure.ac 2011-04-13 16:33:17.487339738 +0200
|
||||
@@ -17,7 +17,6 @@
|
||||
--- libtorrent-0.12.6.orig/scripts/checks.m4
|
||||
+++ libtorrent-0.12.6/scripts/checks.m4
|
||||
@@ -96,7 +96,7 @@ AC_DEFUN([TORRENT_CHECK_KQUEUE], [
|
||||
AC_DEFUN([TORRENT_CHECK_KQUEUE_SOCKET_ONLY], [
|
||||
AC_MSG_CHECKING(whether kqueue supports pipes and ptys)
|
||||
|
||||
AM_INIT_AUTOMAKE
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
-AM_PATH_CPPUNIT(1.9.6)
|
||||
AC_DISABLE_STATIC
|
||||
|
||||
AM_DISABLE_STATIC
|
||||
@@ -118,5 +117,4 @@
|
||||
src/protocol/Makefile
|
||||
src/tracker/Makefile
|
||||
src/utils/Makefile
|
||||
- test/Makefile
|
||||
])
|
||||
Index: libtorrent-0.12.6_r1209/Makefile.am
|
||||
- AC_RUN_IFELSE(
|
||||
+ AC_LINK_IFELSE(
|
||||
[[#include <fcntl.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
Index: libtorrent-0.12.6/scripts/common.m4
|
||||
===================================================================
|
||||
--- libtorrent-0.12.6_r1209.orig/Makefile.am 2010-03-01 20:04:58.000000000 +0100
|
||||
+++ libtorrent-0.12.6_r1209/Makefile.am 2011-04-13 16:33:17.487339738 +0200
|
||||
@@ -1,4 +1,4 @@
|
||||
-SUBDIRS = src test
|
||||
+SUBDIRS = src
|
||||
--- libtorrent-0.12.6.orig/scripts/common.m4
|
||||
+++ libtorrent-0.12.6/scripts/common.m4
|
||||
@@ -184,7 +184,7 @@ AC_DEFUN([TORRENT_CHECK_MADVISE], [
|
||||
AC_DEFUN([TORRENT_CHECK_EXECINFO], [
|
||||
AC_MSG_CHECKING(for execinfo.h)
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = libtorrent.pc
|
||||
- AC_RUN_IFELSE(
|
||||
+ AC_LINK_IFELSE(
|
||||
[[#include <execinfo.h>
|
||||
int main() { backtrace((void**)0, 0); backtrace_symbols((char**)0, 0); return 0;}
|
||||
]],
|
||||
@@ -199,7 +199,7 @@ AC_DEFUN([TORRENT_CHECK_EXECINFO], [
|
||||
AC_DEFUN([TORRENT_CHECK_ALIGNED], [
|
||||
AC_MSG_CHECKING(the byte alignment)
|
||||
|
||||
- AC_RUN_IFELSE(
|
||||
+ AC_LINK_IFELSE(
|
||||
[[#include <inttypes.h>
|
||||
int main() {
|
||||
char buf[8] = { 0, 0, 0, 0, 1, 0, 0, 0 };
|
||||
|
@ -1,62 +0,0 @@
|
||||
Index: libtorrent-0.12.6_r1209/rak/allocators.h
|
||||
===================================================================
|
||||
--- libtorrent-0.12.6_r1209.orig/rak/allocators.h 2010-11-10 12:40:28.000000000 +0100
|
||||
+++ libtorrent-0.12.6_r1209/rak/allocators.h 2011-04-13 16:33:28.179339669 +0200
|
||||
@@ -74,17 +74,13 @@
|
||||
size_type max_size () const throw() { return std::numeric_limits<size_t>::max() / sizeof(T); }
|
||||
|
||||
pointer allocate(size_type num, const_void_pointer hint = 0) { return alloc_size(num*sizeof(T)); }
|
||||
+ void deallocate (pointer p, size_type num) { dealloc_size(p, num*sizeof(T)); }
|
||||
|
||||
- static pointer alloc_size(size_type size) {
|
||||
- pointer ptr = NULL;
|
||||
- int __UNUSED result = posix_memalign((void**)&ptr, LT_SMP_CACHE_BYTES, size);
|
||||
-
|
||||
- return ptr;
|
||||
- }
|
||||
+ static pointer alloc_size(size_type size);
|
||||
+ static void dealloc_size(pointer p, size_type size);
|
||||
|
||||
void construct (pointer p, const T& value) { new((void*)p)T(value); }
|
||||
void destroy (pointer p) { p->~T(); }
|
||||
- void deallocate (pointer p, size_type num) { free((void*)p); }
|
||||
};
|
||||
|
||||
|
||||
@@ -98,6 +94,36 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
+template <class T>
|
||||
+inline typename cacheline_allocator<T>::pointer cacheline_allocator<T>::alloc_size(size_type size) {
|
||||
+ pointer ptr;
|
||||
+
|
||||
+#if HAVE_POSIX_MEMALIGN
|
||||
+ if (posix_memalign((void**)&ptr, LT_SMP_CACHE_BYTES, size))
|
||||
+ return NULL;
|
||||
+#else
|
||||
+ char* org = (char*)malloc(size + sizeof(void*) + LT_SMP_CACHE_BYTES - 1);
|
||||
+ if (org == NULL)
|
||||
+ return NULL;
|
||||
+
|
||||
+ ptr = (pointer)((uintptr_t)(org + LT_SMP_CACHE_BYTES - 1) & ~(LT_SMP_CACHE_BYTES - 1));
|
||||
+
|
||||
+ // store originally allocated pointer for later free() at the end of the allocated data
|
||||
+ *(void**)((char*)ptr + size) = org;
|
||||
+#endif
|
||||
+
|
||||
+ return ptr;
|
||||
+}
|
||||
+
|
||||
+template <class T>
|
||||
+inline void cacheline_allocator<T>::dealloc_size(pointer p, size_type size) {
|
||||
+#if HAVE_POSIX_MEMALIGN
|
||||
+ free(p);
|
||||
+#else
|
||||
+ free(*(void**)((char*)p + size));
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
}
|
||||
|
||||
//
|
@ -1,8 +1,8 @@
|
||||
Index: libtorrent-0.12.6_r1209/src/net/socket_datagram.cc
|
||||
Index: libtorrent-0.12.6/src/net/socket_datagram.cc
|
||||
===================================================================
|
||||
--- libtorrent-0.12.6_r1209.orig/src/net/socket_datagram.cc 2008-07-05 14:13:12.000000000 +0200
|
||||
+++ libtorrent-0.12.6_r1209/src/net/socket_datagram.cc 2011-04-13 16:33:33.266840379 +0200
|
||||
@@ -73,6 +73,23 @@
|
||||
--- libtorrent-0.12.6.orig/src/net/socket_datagram.cc
|
||||
+++ libtorrent-0.12.6/src/net/socket_datagram.cc
|
||||
@@ -73,6 +73,23 @@ SocketDatagram::write_datagram(const voi
|
||||
int r;
|
||||
|
||||
if (sa != NULL) {
|
||||
|
@ -1,20 +0,0 @@
|
||||
Index: libtorrent-0.12.6_r1209/src/net/socket_set.h
|
||||
===================================================================
|
||||
--- libtorrent-0.12.6_r1209.orig/src/net/socket_set.h 2011-02-12 13:20:09.000000000 +0100
|
||||
+++ libtorrent-0.12.6_r1209/src/net/socket_set.h 2011-04-13 16:33:38.567388959 +0200
|
||||
@@ -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);
|
||||
|
@ -1,12 +0,0 @@
|
||||
Index: libtorrent-0.12.6_r1209/rak/allocators.h
|
||||
===================================================================
|
||||
--- libtorrent-0.12.6_r1209.orig/rak/allocators.h 2011-04-13 16:33:28.179339669 +0200
|
||||
+++ libtorrent-0.12.6_r1209/rak/allocators.h 2011-04-13 16:33:48.454840573 +0200
|
||||
@@ -41,6 +41,7 @@
|
||||
|
||||
#include <cstddef>
|
||||
#include <limits>
|
||||
+#include <stdint.h> /* for uintptr_t */
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
|
@ -8,17 +8,15 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=rtorrent
|
||||
PKG_REV:=1209
|
||||
PKG_VERSION:=0.8.6_r$(PKG_REV)
|
||||
PKG_VERSION:=0.8.6
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||
PKG_SOURCE_URL:=svn://rakshasa.no/libtorrent/trunk/rtorrent
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE_VERSION:=$(PKG_REV)
|
||||
PKG_SOURCE_PROTO:=svn
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=http://libtorrent.rakshasa.no/downloads
|
||||
PKG_MD5SUM:=b804c45c01c40312926bcea6b55bb084
|
||||
|
||||
PKG_FIXUP:=libtool
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_INSTALL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
@ -35,9 +33,9 @@ endef
|
||||
|
||||
define Package/rtorrent/description
|
||||
rTorrent is a BitTorrent client for ncurses, using the libtorrent library.
|
||||
The client and library are written in C++ with emphasis on speed and
|
||||
efficiency, while delivering equivalent features to those found in GUI
|
||||
based clients in an ncurses client.
|
||||
The client and library is written in C++ with emphasis on speed and
|
||||
efficiency, while delivering equivalent features to those found in GUI based
|
||||
clients in an ncurses client.
|
||||
endef
|
||||
|
||||
TARGET_CPPFLAGS += -fno-strict-aliasing -fno-inline
|
||||
|
22
net/rtorrent/patches/100-fix-cross_compile.patch
Normal file
22
net/rtorrent/patches/100-fix-cross_compile.patch
Normal file
@ -0,0 +1,22 @@
|
||||
Index: rtorrent-0.8.6/scripts/common.m4
|
||||
===================================================================
|
||||
--- rtorrent-0.8.6.orig/scripts/common.m4
|
||||
+++ rtorrent-0.8.6/scripts/common.m4
|
||||
@@ -184,7 +184,7 @@ AC_DEFUN([TORRENT_CHECK_MADVISE], [
|
||||
AC_DEFUN([TORRENT_CHECK_EXECINFO], [
|
||||
AC_MSG_CHECKING(for execinfo.h)
|
||||
|
||||
- AC_RUN_IFELSE(
|
||||
+ AC_LINK_IFELSE(
|
||||
[[#include <execinfo.h>
|
||||
int main() { backtrace((void**)0, 0); backtrace_symbols((char**)0, 0); return 0;}
|
||||
]],
|
||||
@@ -199,7 +199,7 @@ AC_DEFUN([TORRENT_CHECK_EXECINFO], [
|
||||
AC_DEFUN([TORRENT_CHECK_ALIGNED], [
|
||||
AC_MSG_CHECKING(the byte alignment)
|
||||
|
||||
- AC_RUN_IFELSE(
|
||||
+ AC_LINK_IFELSE(
|
||||
[[#include <inttypes.h>
|
||||
int main() {
|
||||
char buf[8] = { 0, 0, 0, 0, 1, 0, 0, 0 };
|
@ -1,44 +0,0 @@
|
||||
Index: rtorrent-0.8.6_r1209/configure.ac
|
||||
===================================================================
|
||||
--- rtorrent-0.8.6_r1209.orig/configure.ac 2010-10-05 05:36:14.000000000 +0200
|
||||
+++ rtorrent-0.8.6_r1209/configure.ac 2011-04-13 16:29:48.619340344 +0200
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
AM_INIT_AUTOMAKE
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
-AM_PATH_CPPUNIT(1.9.6)
|
||||
|
||||
AC_PROG_CXX
|
||||
AC_PROG_LIBTOOL
|
||||
@@ -64,5 +63,4 @@
|
||||
src/rpc/Makefile
|
||||
src/ui/Makefile
|
||||
src/utils/Makefile
|
||||
- test/Makefile
|
||||
])
|
||||
Index: rtorrent-0.8.6_r1209/Makefile.am
|
||||
===================================================================
|
||||
--- rtorrent-0.8.6_r1209.orig/Makefile.am 2010-03-19 10:33:25.000000000 +0100
|
||||
+++ rtorrent-0.8.6_r1209/Makefile.am 2011-04-13 16:29:48.619340344 +0200
|
||||
@@ -1,7 +1,4 @@
|
||||
-SUBDIRS = \
|
||||
- doc \
|
||||
- src \
|
||||
- test
|
||||
+SUBDIRS = src
|
||||
|
||||
EXTRA_DIST= \
|
||||
autogen.sh \
|
||||
Index: rtorrent-0.8.6_r1209/scripts/common.m4
|
||||
===================================================================
|
||||
--- rtorrent-0.8.6_r1209.orig/scripts/common.m4 2009-12-19 22:36:44.000000000 +0100
|
||||
+++ rtorrent-0.8.6_r1209/scripts/common.m4 2011-04-13 16:29:48.619340344 +0200
|
||||
@@ -209,7 +209,7 @@
|
||||
AC_DEFUN([TORRENT_CHECK_EXECINFO], [
|
||||
AC_MSG_CHECKING(for execinfo.h)
|
||||
|
||||
- AC_RUN_IFELSE(
|
||||
+ AC_LINK_IFELSE(
|
||||
[[#include <execinfo.h>
|
||||
int main() { backtrace((void**)0, 0); backtrace_symbols((char**)0, 0); return 0;}
|
||||
]],
|
@ -1,70 +0,0 @@
|
||||
Index: rtorrent-0.8.6_r1209/rak/allocators.h
|
||||
===================================================================
|
||||
--- rtorrent-0.8.6_r1209.orig/rak/allocators.h 2010-11-10 12:40:28.000000000 +0100
|
||||
+++ rtorrent-0.8.6_r1209/rak/allocators.h 2011-04-13 16:30:02.370840196 +0200
|
||||
@@ -42,6 +42,7 @@
|
||||
#include <cstddef>
|
||||
#include <limits>
|
||||
#include <stdlib.h>
|
||||
+#include <stdint.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
namespace rak {
|
||||
@@ -74,17 +75,13 @@
|
||||
size_type max_size () const throw() { return std::numeric_limits<size_t>::max() / sizeof(T); }
|
||||
|
||||
pointer allocate(size_type num, const_void_pointer hint = 0) { return alloc_size(num*sizeof(T)); }
|
||||
+ void deallocate (pointer p, size_type num) { dealloc_size(p, num*sizeof(T)); }
|
||||
|
||||
- static pointer alloc_size(size_type size) {
|
||||
- pointer ptr = NULL;
|
||||
- int __UNUSED result = posix_memalign((void**)&ptr, LT_SMP_CACHE_BYTES, size);
|
||||
-
|
||||
- return ptr;
|
||||
- }
|
||||
+ static pointer alloc_size(size_type size);
|
||||
+ static void dealloc_size(pointer p, size_type size);
|
||||
|
||||
void construct (pointer p, const T& value) { new((void*)p)T(value); }
|
||||
void destroy (pointer p) { p->~T(); }
|
||||
- void deallocate (pointer p, size_type num) { free((void*)p); }
|
||||
};
|
||||
|
||||
|
||||
@@ -98,6 +95,36 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
+template <class T>
|
||||
+inline typename cacheline_allocator<T>::pointer cacheline_allocator<T>::alloc_size(size_type size) {
|
||||
+ pointer ptr;
|
||||
+
|
||||
+#if HAVE_POSIX_MEMALIGN
|
||||
+ if (posix_memalign((void**)&ptr, LT_SMP_CACHE_BYTES, size))
|
||||
+ return NULL;
|
||||
+#else
|
||||
+ char* org = (char*)malloc(size + sizeof(void*) + LT_SMP_CACHE_BYTES - 1);
|
||||
+ if (org == NULL)
|
||||
+ return NULL;
|
||||
+
|
||||
+ ptr = (pointer)((uintptr_t)(org + LT_SMP_CACHE_BYTES - 1) & ~(LT_SMP_CACHE_BYTES - 1));
|
||||
+
|
||||
+ // store originally allocated pointer for later free() at the end of the allocated data
|
||||
+ *(void**)((char*)ptr + size) = org;
|
||||
+#endif
|
||||
+
|
||||
+ return ptr;
|
||||
+}
|
||||
+
|
||||
+template <class T>
|
||||
+inline void cacheline_allocator<T>::dealloc_size(pointer p, size_type size) {
|
||||
+#if HAVE_POSIX_MEMALIGN
|
||||
+ free(p);
|
||||
+#else
|
||||
+ free(*(void**)((char*)p + size));
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
}
|
||||
|
||||
//
|
@ -1,13 +1,13 @@
|
||||
Index: rtorrent-0.8.6_r1209/src/display/canvas.h
|
||||
Index: rtorrent-0.8.6/src/display/canvas.h
|
||||
===================================================================
|
||||
--- rtorrent-0.8.6_r1209.orig/src/display/canvas.h 2011-04-13 17:29:03.218889497 +0200
|
||||
+++ rtorrent-0.8.6_r1209/src/display/canvas.h 2011-04-13 17:29:22.814923068 +0200
|
||||
@@ -48,7 +48,7 @@
|
||||
--- rtorrent-0.8.6.orig/src/display/canvas.h
|
||||
+++ rtorrent-0.8.6/src/display/canvas.h
|
||||
@@ -48,7 +48,7 @@ class Canvas {
|
||||
public:
|
||||
typedef std::vector<Attributes> attributes_list;
|
||||
|
||||
- Canvas(int x = 0, int y = 0, int width = 0, int height = 0);
|
||||
+ Canvas(int x = 0, int y = 0, int width = 1, int height = 1);
|
||||
- Canvas(int x = 0, int y = 0, int width = 0, int height = 0) :
|
||||
+ Canvas(int x = 0, int y = 0, int width = 1, int height = 1) :
|
||||
m_window(newwin(height, width, y, x)) {}
|
||||
~Canvas() { delwin(m_window); }
|
||||
|
||||
void refresh() { wnoutrefresh(m_window); }
|
||||
|
Loading…
x
Reference in New Issue
Block a user