include $(TOPDIR)/rules.mk
PKG_NAME:=rtorrent
-PKG_VERSION:=0.8.2
-PKG_RELEASE:=1
+PKG_REV:=1087
+PKG_VERSION:=0.8.4_r$(PKG_REV)
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://libtorrent.rakshasa.no/downloads/
-PKG_MD5SUM:=a2456182e1767e5aed7341dbbd058f60
+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_FIXUP = libtool
CATEGORY:=Network
TITLE:=BitTorrent client for ncurses
URL:=http://libtorrent.rakshasa.no/
- DEPENDS:=+libcurl +libtorrent +libncurses +libsigcxx @BROKEN
+ DEPENDS:=+libcurl +libtorrent +libncurses +libsigcxx +xmlrpc-c
endef
define Package/rtorrent/description
based clients in an ncurses client.
endef
+TARGET_CPPFLAGS += \
+ -fno-strict-aliasing -fno-inline \
+
CONFIGURE_ARGS+= \
--enable-shared \
--disable-static \
--disable-debug \
+ --with-xmlrpc-c \
-CONFIGURE_VARS += \
- LIBS="-lm -luClibc++" \
+define Build/Configure
+ (cd $(PKG_BUILD_DIR); ./autogen.sh );
+ $(call Build/Configure/Default)
+endef
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR) \
+++ /dev/null
-Index: rtorrent-0.7.9/configure
-===================================================================
---- rtorrent-0.7.9.orig/configure 2008-04-20 12:43:14.000000000 +0200
-+++ rtorrent-0.7.9/configure 2008-04-20 12:43:14.000000000 +0200
-@@ -20227,11 +20227,11 @@
- echo $ECHO_N "checking for execinfo.h... $ECHO_C" >&6; }
-
- if test "$cross_compiling" = yes; then
-- { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
-+ { { echo "$as_me:$LINENO: warning: cannot run test program while cross compiling
- See \`config.log' for more details." >&5
--echo "$as_me: error: cannot run test program while cross compiling
-+echo "$as_me: warning: cannot run test program while cross compiling
- See \`config.log' for more details." >&2;}
-- { (exit 1); exit 1; }; }
-+ }
- else
- cat >conftest.$ac_ext <<_ACEOF
- #include <execinfo.h>
--- /dev/null
+# 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);