From 162603f403f67d9828cdbb082c3278f4e8cd837f Mon Sep 17 00:00:00 2001 From: Stephen Walker Date: Tue, 16 Feb 2010 03:04:02 +0000 Subject: [PATCH] [packages] libtorrent: update to 0.12.6_r1130 (#6685) SVN-Revision: 19650 --- libs/libtorrent/Makefile | 25 +++++++----------- .../patches/110-fix-no-posix_memalign.diff | 26 ++++++++----------- .../patches/120-fix-ipv6_socket_datagram.diff | 8 +++--- .../patches/121-fix-socket_set-template.diff | 8 +++--- 4 files changed, 27 insertions(+), 40 deletions(-) diff --git a/libs/libtorrent/Makefile b/libs/libtorrent/Makefile index 40b672a3f6..71e345a022 100644 --- a/libs/libtorrent/Makefile +++ b/libs/libtorrent/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2007-2009 OpenWrt.org +# Copyright (C) 2007-2010 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,17 +8,18 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libtorrent - -PKG_REV:=1123 +PKG_REV:=1130 PKG_VERSION:=0.12.6_r$(PKG_REV) PKG_RELEASE:=1 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz + +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_FIXUP = libtool +PKG_FIXUP:=libtool +PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk @@ -31,10 +32,10 @@ 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 + 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 @@ -57,12 +58,6 @@ define Build/Configure $(call Build/Configure/Default) endef -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install -endef - define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include $(CP) $(PKG_INSTALL_DIR)/usr/include/torrent $(1)/usr/include/ diff --git a/libs/libtorrent/patches/110-fix-no-posix_memalign.diff b/libs/libtorrent/patches/110-fix-no-posix_memalign.diff index 582e57f6cd..e86dd01901 100644 --- a/libs/libtorrent/patches/110-fix-no-posix_memalign.diff +++ b/libs/libtorrent/patches/110-fix-no-posix_memalign.diff @@ -1,8 +1,6 @@ -Index: libtorrent/rak/allocators.h -=================================================================== ---- libtorrent/rak/allocators.h (revision 1121) -+++ libtorrent/rak/allocators.h (working copy) -@@ -74,17 +74,13 @@ +--- a/rak/allocators.h ++++ b/rak/allocators.h +@@ -74,17 +74,13 @@ public: 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)); } @@ -11,19 +9,19 @@ Index: libtorrent/rak/allocators.h - 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); -- return ptr; -- } -- 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) { ::operator delete((void*)p); } }; -@@ -98,8 +94,38 @@ +@@ -98,6 +94,36 @@ bool operator!= (const cacheline_allocat return false; } @@ -46,8 +44,8 @@ Index: libtorrent/rak/allocators.h +#endif + + return ptr; - } - ++} ++ +template +inline void cacheline_allocator::dealloc_size(pointer p, size_type size) { +#if HAVE_POSIX_MEMALIGN @@ -57,8 +55,6 @@ Index: libtorrent/rak/allocators.h +#endif +} + -+} -+ - // - // Operator new with custom allocators: + } + // diff --git a/libs/libtorrent/patches/120-fix-ipv6_socket_datagram.diff b/libs/libtorrent/patches/120-fix-ipv6_socket_datagram.diff index d9b8dd0d19..1a4662703f 100644 --- a/libs/libtorrent/patches/120-fix-ipv6_socket_datagram.diff +++ b/libs/libtorrent/patches/120-fix-ipv6_socket_datagram.diff @@ -1,8 +1,6 @@ -Index: libtorrent/src/net/socket_datagram.cc -=================================================================== ---- libtorrent/src/net/socket_datagram.cc (revision 1121) -+++ libtorrent/src/net/socket_datagram.cc (working copy) -@@ -73,6 +73,23 @@ +--- a/src/net/socket_datagram.cc ++++ b/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.diff b/libs/libtorrent/patches/121-fix-socket_set-template.diff index f673f75a4e..8fa83046f1 100644 --- a/libs/libtorrent/patches/121-fix-socket_set-template.diff +++ b/libs/libtorrent/patches/121-fix-socket_set-template.diff @@ -1,8 +1,6 @@ -Index: libtorrent/src/net/socket_set.h -=================================================================== ---- libtorrent/src/net/socket_set.h (revision 1121) -+++ libtorrent/src/net/socket_set.h (working copy) -@@ -53,12 +53,12 @@ +--- a/src/net/socket_set.h ++++ b/src/net/socket_set.h +@@ -53,12 +53,12 @@ namespace torrent { // Propably should rename to EventSet... -- 2.30.2