From: Luka Perkov Date: Thu, 14 Apr 2011 20:49:19 +0000 (+0000) Subject: downgrade libtorrent and rtorrent; rtorrent crashes only solution was to use stable... X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=commitdiff_plain;h=4bd4fc875e6434a1aa782e16bb7a46404d283494 downgrade libtorrent and rtorrent; rtorrent crashes only solution was to use stable and not svn version (8733) SVN-Revision: 26664 --- diff --git a/libs/libtorrent/Makefile b/libs/libtorrent/Makefile index 5bafdcabe9..6a3d783c4b 100644 --- a/libs/libtorrent/Makefile +++ b/libs/libtorrent/Makefile @@ -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)) - diff --git a/libs/libtorrent/patches/100-fix_cross_compile.patch b/libs/libtorrent/patches/100-fix_cross_compile.patch index 8f0fbb912f..0fcae28167 100644 --- a/libs/libtorrent/patches/100-fix_cross_compile.patch +++ b/libs/libtorrent/patches/100-fix_cross_compile.patch @@ -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 + #include + #include +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) + +- AC_RUN_IFELSE( ++ AC_LINK_IFELSE( + [[#include + 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) - pkgconfigdir = $(libdir)/pkgconfig - pkgconfig_DATA = libtorrent.pc +- AC_RUN_IFELSE( ++ AC_LINK_IFELSE( + [[#include + int main() { + char buf[8] = { 0, 0, 0, 0, 1, 0, 0, 0 }; diff --git a/libs/libtorrent/patches/110-fix-no-posix_memalign.patch b/libs/libtorrent/patches/110-fix-no-posix_memalign.patch deleted file mode 100644 index b99a0d14d6..0000000000 --- a/libs/libtorrent/patches/110-fix-no-posix_memalign.patch +++ /dev/null @@ -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::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 -+inline typename cacheline_allocator::pointer cacheline_allocator::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 -+inline void cacheline_allocator::dealloc_size(pointer p, size_type size) { -+#if HAVE_POSIX_MEMALIGN -+ free(p); -+#else -+ free(*(void**)((char*)p + size)); -+#endif -+} -+ - } - - // diff --git a/libs/libtorrent/patches/120-fix-ipv6_socket_datagram.patch b/libs/libtorrent/patches/120-fix-ipv6_socket_datagram.patch index 745f689f83..cf64be7fe2 100644 --- a/libs/libtorrent/patches/120-fix-ipv6_socket_datagram.patch +++ b/libs/libtorrent/patches/120-fix-ipv6_socket_datagram.patch @@ -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) { diff --git a/libs/libtorrent/patches/121-fix-socket_set-template.patch b/libs/libtorrent/patches/121-fix-socket_set-template.patch deleted file mode 100644 index 12ce9b2abb..0000000000 --- a/libs/libtorrent/patches/121-fix-socket_set-template.patch +++ /dev/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 > { -+class SocketSet : private std::vector > { - public: - typedef uint32_t size_type; - -- typedef std::vector > base_type; -- typedef std::vector > Table; -+ typedef std::vector > base_type; -+ typedef std::vector > Table; - - static const size_type npos = static_cast(-1); - diff --git a/libs/libtorrent/patches/122-fix-uintptr_t-use.patch b/libs/libtorrent/patches/122-fix-uintptr_t-use.patch deleted file mode 100644 index 8d2500dd97..0000000000 --- a/libs/libtorrent/patches/122-fix-uintptr_t-use.patch +++ /dev/null @@ -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 - #include -+#include /* for uintptr_t */ - #include - #include - diff --git a/net/rtorrent/Makefile b/net/rtorrent/Makefile index 969b0e99f0..7101e6f4ed 100644 --- a/net/rtorrent/Makefile +++ b/net/rtorrent/Makefile @@ -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 diff --git a/net/rtorrent/patches/100-fix-cross_compile.patch b/net/rtorrent/patches/100-fix-cross_compile.patch new file mode 100644 index 0000000000..b52a952fc8 --- /dev/null +++ b/net/rtorrent/patches/100-fix-cross_compile.patch @@ -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 + 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 + int main() { + char buf[8] = { 0, 0, 0, 0, 1, 0, 0, 0 }; diff --git a/net/rtorrent/patches/100-fix_cross_compile.patch b/net/rtorrent/patches/100-fix_cross_compile.patch deleted file mode 100644 index 2ad192d85b..0000000000 --- a/net/rtorrent/patches/100-fix_cross_compile.patch +++ /dev/null @@ -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 - int main() { backtrace((void**)0, 0); backtrace_symbols((char**)0, 0); return 0;} - ]], diff --git a/net/rtorrent/patches/110-fix-no-posix_memalign.patch b/net/rtorrent/patches/110-fix-no-posix_memalign.patch deleted file mode 100644 index baf34299f9..0000000000 --- a/net/rtorrent/patches/110-fix-no-posix_memalign.patch +++ /dev/null @@ -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 - #include - #include -+#include - #include - - namespace rak { -@@ -74,17 +75,13 @@ - size_type max_size () const throw() { return std::numeric_limits::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 -+inline typename cacheline_allocator::pointer cacheline_allocator::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 -+inline void cacheline_allocator::dealloc_size(pointer p, size_type size) { -+#if HAVE_POSIX_MEMALIGN -+ free(p); -+#else -+ free(*(void**)((char*)p + size)); -+#endif -+} -+ - } - - // diff --git a/net/rtorrent/patches/120-fix-ncurses.patch b/net/rtorrent/patches/120-fix-ncurses.patch index 0994b05db8..e4609279a8 100644 --- a/net/rtorrent/patches/120-fix-ncurses.patch +++ b/net/rtorrent/patches/120-fix-ncurses.patch @@ -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_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); }