From 348a81dea6c39d24148203601cc923781495ba7f Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Fri, 3 Apr 2009 09:16:29 +0000 Subject: [PATCH] [package] update rtorrent to 0.8.4-svn1087 (#4851) SVN-Revision: 15090 --- net/rtorrent/Makefile | 23 ++++++---- net/rtorrent/patches/001-configure.patch | 19 --------- net/rtorrent/patches/800-fix-xmlrpc-utf8.diff | 42 +++++++++++++++++++ 3 files changed, 58 insertions(+), 26 deletions(-) delete mode 100644 net/rtorrent/patches/001-configure.patch create mode 100644 net/rtorrent/patches/800-fix-xmlrpc-utf8.diff diff --git a/net/rtorrent/Makefile b/net/rtorrent/Makefile index 8432d03274..fe44345adb 100644 --- a/net/rtorrent/Makefile +++ b/net/rtorrent/Makefile @@ -9,12 +9,15 @@ 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 @@ -26,7 +29,7 @@ define Package/rtorrent 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 @@ -36,13 +39,19 @@ 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) \ diff --git a/net/rtorrent/patches/001-configure.patch b/net/rtorrent/patches/001-configure.patch deleted file mode 100644 index ca4f9aa798..0000000000 --- a/net/rtorrent/patches/001-configure.patch +++ /dev/null @@ -1,19 +0,0 @@ -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 diff --git a/net/rtorrent/patches/800-fix-xmlrpc-utf8.diff b/net/rtorrent/patches/800-fix-xmlrpc-utf8.diff new file mode 100644 index 0000000000..0dedaa00a2 --- /dev/null +++ b/net/rtorrent/patches/800-fix-xmlrpc-utf8.diff @@ -0,0 +1,42 @@ +# 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); -- 2.30.2