[package] update rtorrent to r1093 (#5218)

git-svn-id: svn://svn.openwrt.org/openwrt/packages@16104 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
florian 2009-05-27 12:07:55 +00:00
parent b213d72bc7
commit 57d9f58efe
3 changed files with 11 additions and 135 deletions

View File

@ -4,14 +4,15 @@
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# $Id: Makefile 15090 2009-04-03 09:16:29Z florian $
include $(TOPDIR)/rules.mk
PKG_NAME:=rtorrent
PKG_REV:=1087
PKG_REV:=1093
PKG_VERSION:=0.8.4_r$(PKG_REV)
PKG_RELEASE:=2
PKG_RELEASE:=5
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=svn://rakshasa.no/libtorrent/trunk/rtorrent
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
@ -28,7 +29,7 @@ define Package/rtorrent
CATEGORY:=Network
TITLE:=BitTorrent client for ncurses
URL:=http://libtorrent.rakshasa.no/
DEPENDS:=+libcurl +libtorrent +libncurses +xmlrpc-c
DEPENDS:=+libcurl +libtorrent +libncurses +libsigcxx +xmlrpc-c
endef
define Package/rtorrent/description
@ -38,8 +39,13 @@ define Package/rtorrent/description
based clients in an ncurses client.
endef
TARGET_CPPFLAGS += \
-fno-strict-aliasing -fno-inline \
ifneq ($(CONFIG_GCC_VERSION_3_4)$(CONFIG_GCC_VERSION_4_1),)
TARGET_CPPFLAGS += -fno-strict-aliasing -fno-inline
endif
ifneq ($(CONFIG_GCC_VERSION_4_2)$(CONFIG_GCC_VERSION_4_3),)
TARGET_CPPFLAGS += -fno-inline
endif
CONFIGURE_ARGS+= \
--enable-shared \

View File

@ -1,88 +0,0 @@
diff -urN rtorrent-0.8.4.orig/src/command_download.cc rtorrent-0.8.4/src/command_download.cc
--- rtorrent-0.8.4.orig/src/command_download.cc 2009-05-01 11:44:18.928024917 +0000
+++ rtorrent-0.8.4/src/command_download.cc 2009-05-01 11:52:00.204784723 +0000
@@ -38,6 +38,7 @@
#include <functional>
#include <unistd.h>
+#include <cstdio>
#include <rak/file_stat.h>
#include <rak/error_number.h>
#include <rak/path.h>
diff -urN rtorrent-0.8.4.orig/src/command_events.cc rtorrent-0.8.4/src/command_events.cc
--- rtorrent-0.8.4.orig/src/command_events.cc 2009-05-01 11:44:18.956025193 +0000
+++ rtorrent-0.8.4/src/command_events.cc 2009-05-01 11:52:53.176878174 +0000
@@ -37,6 +37,7 @@
#include "config.h"
#include <functional>
+#include <cstdio>
#include <rak/file_stat.h>
#include <rak/path.h>
#include <rak/string_manip.h>
diff -urN rtorrent-0.8.4.orig/src/command_network.cc rtorrent-0.8.4/src/command_network.cc
--- rtorrent-0.8.4.orig/src/command_network.cc 2009-05-01 11:44:18.954025149 +0000
+++ rtorrent-0.8.4/src/command_network.cc 2009-05-01 11:53:38.894790846 +0000
@@ -37,6 +37,7 @@
#include "config.h"
#include <functional>
+#include <cstdio>
#include <rak/address_info.h>
#include <rak/path.h>
#include <torrent/connection_manager.h>
diff -urN rtorrent-0.8.4.orig/src/display/utils.cc rtorrent-0.8.4/src/display/utils.cc
--- rtorrent-0.8.4.orig/src/display/utils.cc 2009-05-01 11:44:18.958025168 +0000
+++ rtorrent-0.8.4/src/display/utils.cc 2009-05-01 11:46:00.280024662 +0000
@@ -37,6 +37,7 @@
#include "config.h"
#include <cstring>
+#include <cstdio>
#include <sstream>
#include <iomanip>
#include <rak/socket_address.h>
diff -urN rtorrent-0.8.4.orig/src/display/utils.h rtorrent-0.8.4/src/display/utils.h
--- rtorrent-0.8.4.orig/src/display/utils.h 2009-05-01 11:44:18.958025168 +0000
+++ rtorrent-0.8.4/src/display/utils.h 2009-05-01 11:54:46.317784833 +0000
@@ -38,6 +38,7 @@
#define RTORRENT_DISPLAY_UTILS_H
#include <ctime>
+#include <cstdio>
#include <string>
namespace core {
diff -urN rtorrent-0.8.4.orig/src/rpc/parse.cc rtorrent-0.8.4/src/rpc/parse.cc
--- rtorrent-0.8.4.orig/src/rpc/parse.cc 2009-05-01 11:44:18.955025625 +0000
+++ rtorrent-0.8.4/src/rpc/parse.cc 2009-05-01 11:48:42.406775254 +0000
@@ -37,6 +37,7 @@
#include "config.h"
#include <cstring>
+#include <cstdio>
#include <locale>
#include <rak/path.h>
#include <torrent/exceptions.h>
diff -urN rtorrent-0.8.4.orig/src/rpc/scgi_task.cc rtorrent-0.8.4/src/rpc/scgi_task.cc
--- rtorrent-0.8.4.orig/src/rpc/scgi_task.cc 2009-05-01 11:44:18.955025625 +0000
+++ rtorrent-0.8.4/src/rpc/scgi_task.cc 2009-05-01 11:49:52.988070476 +0000
@@ -37,6 +37,7 @@
#include "config.h"
#include <rak/error_number.h>
+#include <cstdio>
#include <sys/types.h>
#include <sys/socket.h>
#include <torrent/exceptions.h>
diff -urN rtorrent-0.8.4.orig/src/utils/lockfile.cc rtorrent-0.8.4/src/utils/lockfile.cc
--- rtorrent-0.8.4.orig/src/utils/lockfile.cc 2009-05-01 11:44:18.956025193 +0000
+++ rtorrent-0.8.4/src/utils/lockfile.cc 2009-05-01 11:50:57.780779606 +0000
@@ -40,6 +40,7 @@
#include <cctype>
#include <cerrno>
#include <cstring>
+#include <cstdio>
#include <sstream>
#include <fcntl.h>
#include <signal.h>

View File

@ -1,42 +0,0 @@
# Fix crashes/errors due to rtorrent attempting to pass non-utf-8 strings to xmlrpc.
# by jdrexler
Index: rtorrent/src/rpc/xmlrpc.cc
===================================================================
--- rtorrent/src/rpc/xmlrpc.cc (revision 1078)
+++ rtorrent/src/rpc/xmlrpc.cc (working copy)
@@ -371,8 +371,34 @@
#endif
case torrent::Object::TYPE_STRING:
- return xmlrpc_string_new(env, object.as_string().c_str());
+ {
+#ifdef XMLRPC_HAVE_I8
+ // The versions that support I8 do implicit utf-8 validation.
+ xmlrpc_value* result = xmlrpc_string_new(env, object.as_string().c_str());
+#else
+ // In older versions, xmlrpc-c doesn't validate the utf-8 encoding itself.
+ xmlrpc_validate_utf8(env, object.as_string().c_str(), object.as_string().length());
+ xmlrpc_value* result = env->fault_occurred ? NULL : xmlrpc_string_new(env, object.as_string().c_str());
+#endif
+
+ if (env->fault_occurred) {
+ xmlrpc_env_clean(env);
+ xmlrpc_env_init(env);
+
+ const std::string& str = object.as_string();
+ char buffer[str.size() + 1];
+ char* dst = buffer;
+ for (std::string::const_iterator itr = str.begin(); itr != str.end(); ++itr)
+ *dst++ = ((*itr < 0x20 && *itr != '\r' && *itr != '\n' && *itr != '\t') || (*itr & 0x80)) ? '?' : *itr;
+ *dst = 0;
+
+ result = xmlrpc_string_new(env, buffer);
+ }
+
+ return result;
+ }
+
case torrent::Object::TYPE_LIST:
{
xmlrpc_value* result = xmlrpc_array_new(env);