diff options
author | Peter Alfredsen <loki_val@gentoo.org> | 2008-08-07 22:00:08 +0000 |
---|---|---|
committer | Peter Alfredsen <loki_val@gentoo.org> | 2008-08-07 22:00:08 +0000 |
commit | 09827da667bfa002ebcd0280d75c69f54e455cce (patch) | |
tree | 2d30694a684f8c64316b3b284b6d60ecdba2ab6b /net-p2p/rtorrent | |
parent | amd64/x86 stable, bug #233569 (diff) | |
download | historical-09827da667bfa002ebcd0280d75c69f54e455cce.tar.gz historical-09827da667bfa002ebcd0280d75c69f54e455cce.tar.bz2 historical-09827da667bfa002ebcd0280d75c69f54e455cce.zip |
Add new revision with fix for upstream ticket 1416 and quick autoconf fix to avoid segfault when execinfo.h exists, by Josef Drexler. Remove enable-aligned from rtorrent ebuild, since that is only used by libtorrent ebuild. Add ewarn w.r.t. bug #212299.
Package-Manager: portage-2.2_rc6/cvs/Linux 2.6.25.8 i686
Diffstat (limited to 'net-p2p/rtorrent')
-rw-r--r-- | net-p2p/rtorrent/ChangeLog | 13 | ||||
-rw-r--r-- | net-p2p/rtorrent/Manifest | 7 | ||||
-rw-r--r-- | net-p2p/rtorrent/files/rtorrent-0.8.2-fix-configure-execinfo.patch | 14 | ||||
-rw-r--r-- | net-p2p/rtorrent/files/rtorrent-0.8.2-fix_utf8_filenames.patch | 238 | ||||
-rw-r--r-- | net-p2p/rtorrent/rtorrent-0.8.2-r3.ebuild | 10 | ||||
-rw-r--r-- | net-p2p/rtorrent/rtorrent-0.8.2-r4.ebuild | 69 |
6 files changed, 346 insertions, 5 deletions
diff --git a/net-p2p/rtorrent/ChangeLog b/net-p2p/rtorrent/ChangeLog index ff94251c9780..aa6ea3a31c4d 100644 --- a/net-p2p/rtorrent/ChangeLog +++ b/net-p2p/rtorrent/ChangeLog @@ -1,6 +1,17 @@ # ChangeLog for net-p2p/rtorrent # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-p2p/rtorrent/ChangeLog,v 1.115 2008/08/02 21:36:22 corsair Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-p2p/rtorrent/ChangeLog,v 1.116 2008/08/07 22:00:07 loki_val Exp $ + +*rtorrent-0.8.2-r4 (07 Aug 2008) + + 07 Aug 2008; Peter Alfredsen <loki_val@gentoo.org> + +files/rtorrent-0.8.2-fix-configure-execinfo.patch, + +files/rtorrent-0.8.2-fix_utf8_filenames.patch, rtorrent-0.8.2-r3.ebuild, + +rtorrent-0.8.2-r4.ebuild: + Add new revision with fix for upstream ticket 1416 and quick autoconf fix + to avoid segfault when execinfo.h exists, by Josef Drexler. Remove + enable-aligned from rtorrent ebuild, since that is only used by libtorrent + ebuild. Add ewarn w.r.t. bug #212299. 02 Aug 2008; Markus Rothe <corsair@gentoo.org> rtorrent-0.8.2-r3.ebuild: Stable on ppc64; bug #233122 diff --git a/net-p2p/rtorrent/Manifest b/net-p2p/rtorrent/Manifest index d433c8aae3ec..a849e0d8eb29 100644 --- a/net-p2p/rtorrent/Manifest +++ b/net-p2p/rtorrent/Manifest @@ -1,11 +1,14 @@ AUX rtorrent-0.8.0+gcc-4.3.patch 1902 RMD160 36665695d0bfe42d3e90ebb2c803291cab28bd8c SHA1 aad5dec2a373b81bb0a72872c83c243dc1b680b3 SHA256 876478262f4d60263bb29f4ba1059570363b92615dac96093a49c966d166cb94 +AUX rtorrent-0.8.2-fix-configure-execinfo.patch 505 RMD160 4c6d475f02ceb90fde5aa57cb5c661c15340f45e SHA1 8d1865c2d6588571a027955895cbc16837b53531 SHA256 76b9f89404a140bbe54ef49becc8b6eb4e1c6b8b8c95eded31320ac78173b191 AUX rtorrent-0.8.2-fix_conn_type_seed.patch 872 RMD160 6d459a60e57702d83801c03a756db2adebbc25f3 SHA1 640231a849def797f07278aa1fc71a6f1164044d SHA256 0974025e834799c0d145673d14df4aa7cb1d7421f1a194304ca728d21abedd5b AUX rtorrent-0.8.2-fix_load_cache.patch 580 RMD160 a9c9804e37f4e242a68b60fa01eed52e981a6a2c SHA1 e3301560b70be479bbacb3f27e3d992d60dc8bb4 SHA256 7f7dac70d8e5f04248108f558959b49361d9f3598250fec2eadcf45cf0bce49b AUX rtorrent-0.8.2-fix_start_stop_filter.patch 701 RMD160 6b109e050cc1e66d2d9874bce0fdf599188978c9 SHA1 3289506a9c76d080edbeb3ef1a42694a64da6c4d SHA256 d422c5d9a82a0d799f3b949e4b0d2fd293d98baab1fb293642544895ece75926 +AUX rtorrent-0.8.2-fix_utf8_filenames.patch 8196 RMD160 80af83b87f3794a3e6d9c1216df3559c38f12df0 SHA1 d1e4615aaefab05731010dc05167e912974581bc SHA256 84df9c827d63b81387e7720bbc9436765a940c18f972e655ecc8bc562039c532 AUX rtorrent-0.8.2-gcc34.patch 659 RMD160 c89a0c7b2acb6db4ce19fbb7a75f1da65638cd2b SHA1 d1afe3ca20a9b9b60056b7941ae7f81dcee558a0 SHA256 a89b48546be2c0728129feff223ed4e03a7c40bbc37e9bead9c13cf20c5cd00d DIST rtorrent-0.7.9.tar.gz 489174 RMD160 8cfee138c0142ad22830b3d518e198f163063a84 SHA1 0b53bd3b2c15f93352607ab3685916fe27033450 SHA256 f06f72b1fec94177147b1db0aab15be4f62d1b0354811a67ae74e0cd1e50a119 DIST rtorrent-0.8.2.tar.gz 506015 RMD160 e86b0082d1788e4e7cd8fcf631f7f857d642c799 SHA1 891093c5d600c2e3853eadbbec369a12dfe6ec11 SHA256 76135a63869e43fa0392829bb45d94c0aa55e94350dddc272685ccfac1bbb2ed EBUILD rtorrent-0.7.9.ebuild 1321 RMD160 05dae6bd7b6c85a3a10f227db1461dd1fce65e46 SHA1 eeb3d6cca988d634a1db59d80271707c6630721b SHA256 1ea31a9d4ebb2a54ee6a287120d40415216d0703abf047013e17cf62f7bbdedc -EBUILD rtorrent-0.8.2-r3.ebuild 1633 RMD160 c32067694248f1dfaf56930ae96828c353ec38ed SHA1 8628b84b66de9218f774c924e16304c9a5e3aba6 SHA256 6303918bde5f5adb63cdc186fc2f8df22cb32efae57f70a8fa39acfc8e655836 -MISC ChangeLog 16366 RMD160 527a5cf4f0be7a8b5e2506835a5bf0cd1bd0ba15 SHA1 c40bf862b7b00f6729a4438870bee998d4679ebb SHA256 f597fbd889099cf729f484deda030424b42af105a94c20b889e919fe12dab590 +EBUILD rtorrent-0.8.2-r3.ebuild 1945 RMD160 e48fc25efaa90009e281bcddd605b42aea366781 SHA1 595f0aacc020f57c718393cc1e9d7a459b976971 SHA256 02c800e4bb1fd7009b1e15e917a4422345d9e3fb8f25e10ed82c504b2ce9ac01 +EBUILD rtorrent-0.8.2-r4.ebuild 2080 RMD160 fe2c3227e1d5094b607d4148ffd1b5bfa2e8d33f SHA1 25d68feb5509563e7a0b2546fc0721c76af87866 SHA256 7b389671eb2563e27b83569ac240ac6219d2dcc3597c16ef351451d01ebe45dd +MISC ChangeLog 16876 RMD160 db8df7e938c61200f0692b2e38792911b5f3b631 SHA1 bf71956e55338a627de480afaaa57fe415c30032 SHA256 f49ceb927c35b5561572ffc13559dbcbe948801b2c6682fa59a1d917fb10af47 MISC metadata.xml 592 RMD160 e65e635c888aaa1932efb1d3684643f814f92710 SHA1 189fe22f0af84cc26784ee5b0e3390eac001d9df SHA256 d0659456da6746a9a6f0c7a10f5fad958d2c0bcf56750d18c26e3cfad5dd6560 diff --git a/net-p2p/rtorrent/files/rtorrent-0.8.2-fix-configure-execinfo.patch b/net-p2p/rtorrent/files/rtorrent-0.8.2-fix-configure-execinfo.patch new file mode 100644 index 000000000000..4df674759d02 --- /dev/null +++ b/net-p2p/rtorrent/files/rtorrent-0.8.2-fix-configure-execinfo.patch @@ -0,0 +1,14 @@ +# Fixes a segfault when configure finds execinfo.h +Index: rtorrent/scripts/common.m4 +=================================================================== +--- rtorrent/scripts/common.m4 (revision 1062) ++++ rtorrent/scripts/common.m4 (working copy) +@@ -183,7 +183,7 @@ + AC_DEFUN([TORRENT_CHECK_EXECINFO], [ + AC_MSG_CHECKING(for execinfo.h) + +- AC_RUN_IFELSE( ++ AC_LINK_IFELSE( + [[#include <execinfo.h> + int main() { backtrace((void**)0, 0); backtrace_symbols((char**)0, 0); return 0;} + ]], diff --git a/net-p2p/rtorrent/files/rtorrent-0.8.2-fix_utf8_filenames.patch b/net-p2p/rtorrent/files/rtorrent-0.8.2-fix_utf8_filenames.patch new file mode 100644 index 000000000000..bf73527c79ed --- /dev/null +++ b/net-p2p/rtorrent/files/rtorrent-0.8.2-fix_utf8_filenames.patch @@ -0,0 +1,238 @@ +# Fix display of multi-byte characters with attributes +# (i.e. utf-8 filenames in the file list), and make the +# list aware of characters occupying two screen positions. +Index: rtorrent/src/display/window_file_list.cc +=================================================================== +--- rtorrent/src/display/window_file_list.cc (revision 1063) ++++ rtorrent/src/display/window_file_list.cc (working copy) +@@ -57,22 +57,61 @@ + m_element(element) { + } + +-/* ++// Convert std::string to std::wstring of given width (in screen positions), ++// taking into account that some characters may be occupying two screen positions. + std::wstring +-hack_wstring(const std::string& src) { +- size_t length = ::mbstowcs(NULL, src.c_str(), src.size()); ++wstring_width(const std::string& i_str, int width) { ++ wchar_t result[width + 1]; ++ size_t length = std::mbstowcs(result, i_str.c_str(), width); + +- if (length == (size_t)-1) +- return std::wstring(L"<invalid>"); ++ // If not valid UTF-8 encoding, at least copy the printable characters. ++ if (length == (size_t)-1) { ++ wchar_t* out = result; + +- std::wstring dest; +- dest.resize(length); +- +- ::mbstowcs(&*dest.begin(), src.c_str(), src.size()); ++ for (std::string::const_iterator itr = i_str.begin(); itr != i_str.end(); ++itr) ++ if (!std::isprint(*itr, std::locale::classic())) ++ *out++ = '?'; ++ else ++ *out++ = *itr; + +- return dest; ++ *out = 0; ++ } ++ ++ int swidth = wcswidth(result, width); ++ ++ // Limit to width if it's too wide already. ++ if (swidth == -1 || swidth > width) { ++ length = swidth = 0; ++ ++ while (result[length]) { ++ int next = ::wcwidth(result[length]); ++ ++ // Unprintable character? ++ if (next == -1) { ++ result[length] = '?'; ++ next = 1; ++ } ++ ++ if (swidth + next > width) { ++ result[length] = 0; ++ break; ++ } ++ ++ length++; ++ swidth += next; ++ } ++ } ++ ++ // Pad with spaces to given width. ++ while (swidth < width && length <= (unsigned int)width) { ++ result[length++] = ' '; ++ swidth++; ++ } ++ ++ result[length] = 0; ++ ++ return result; + } +-*/ + + void + WindowFileList::redraw() { +@@ -115,6 +154,8 @@ + } + + unsigned int pos = 0; ++ int filenameWidth = m_canvas->width() - 16; ++ + m_canvas->print(0, pos++, "Cmp Pri Size Filename"); + + while (pos != m_canvas->height()) { +@@ -123,20 +164,19 @@ + if (itr == iterator(fl->end())) + break; + ++ m_canvas->set_default_attributes(itr == m_element->selected() ? is_focused() ? A_REVERSE : A_BOLD : A_NORMAL); ++ + if (itr.is_empty()) { +- m_canvas->print(16, pos, "EMPTY"); ++ m_canvas->print(0, pos, "%*c%-*s", 16, ' ', filenameWidth, "EMPTY"); + + } else if (itr.is_entering()) { +- m_canvas->print(16 + itr.depth(), pos, "\\ %s", +- itr.depth() < (*itr)->path()->size() ? (*itr)->path()->at(itr.depth()).c_str() : "UNKNOWN"); ++ m_canvas->print(0, pos, "%*c %ls", 16 + itr.depth(), '\\', ++ itr.depth() < (*itr)->path()->size() ? wstring_width((*itr)->path()->at(itr.depth()), filenameWidth - itr.depth() - 1).c_str() : L"UNKNOWN"); + + } else if (itr.is_leaving()) { +- m_canvas->print(16 + itr.depth() - 1, pos, "/"); ++ m_canvas->print(0, pos, "%*c %-*s", 16 + (itr.depth() - 1), '/', filenameWidth - (itr.depth() - 1), ""); + + } else if (itr.is_file()) { +- char buffer[std::max<unsigned int>(m_canvas->width() + 1, 256)]; +- Canvas::attributes_list attributes; +- + torrent::File* e = *itr; + + const char* priority; +@@ -148,34 +188,27 @@ + default: priority = "BUG"; break; + }; + +- sprintf(buffer, "%3d %s ", done_percentage(e), priority); ++ m_canvas->print(0, pos, "%3d %s ", done_percentage(e), priority); + + int64_t val = e->size_bytes(); + +- if (val < (int64_t(1000) << 20)) +- sprintf(buffer + 8, "%5.1f M", (double)val / (int64_t(1) << 20)); ++ if (val < (int64_t(1000) << 10)) ++ m_canvas->print(8, pos, "%5.1f K", (double)val / (int64_t(1) << 10)); ++ else if (val < (int64_t(1000) << 20)) ++ m_canvas->print(8, pos, "%5.1f M", (double)val / (int64_t(1) << 20)); + else if (val < (int64_t(1000) << 30)) +- sprintf(buffer + 8, "%5.1f G", (double)val / (int64_t(1) << 30)); ++ m_canvas->print(8, pos, "%5.1f G", (double)val / (int64_t(1) << 30)); + else +- sprintf(buffer + 8, "%5.1f T", (double)val / (int64_t(1) << 40)); ++ m_canvas->print(8, pos, "%5.1f T", (double)val / (int64_t(1) << 40)); + +- std::fill_n(buffer + 15, 64, ' '); ++ m_canvas->print(15, pos, "%*c %ls", 1 + itr.depth(), '|', ++ itr.depth() < (*itr)->path()->size() ? wstring_width((*itr)->path()->at(itr.depth()), filenameWidth - itr.depth() - 1).c_str() : L"UNKNOWN"); + +- int first = 16 + std::min<unsigned int>(itr.depth(), 8); +- int last = std::max<unsigned int>(m_canvas->width() + 1, 16 + 12); +- +- snprintf(buffer + first, last - first, "| %s", +- itr.depth() < (*itr)->path()->size() ? (*itr)->path()->at(itr.depth()).c_str() : "UNKNOWN"); +- +- m_canvas->print_attributes(0, pos, buffer, buffer + std::strlen(buffer), &attributes); +- + } else { + m_canvas->print(0, pos, "BORK BORK"); + } ++ m_canvas->set_default_attributes(A_NORMAL); + +- if (itr == m_element->selected()) +- m_canvas->set_attr(0, pos, m_canvas->width(), is_focused() ? A_REVERSE : A_BOLD, COLOR_PAIR(0)); +- + pos++; + first = (first + 1) % (m_canvas->height() - 1); + } +Index: rtorrent/src/display/canvas.cc +=================================================================== +--- rtorrent/src/display/canvas.cc (revision 1063) ++++ rtorrent/src/display/canvas.cc (working copy) +@@ -57,17 +57,31 @@ + Canvas::print_attributes(unsigned int x, unsigned int y, const char* first, const char* last, const attributes_list* attributes) { + move(x, y); + ++ attr_t org_attr; ++ short org_pair; ++ wattr_get(m_window, &org_attr, &org_pair, NULL); ++ + attributes_list::const_iterator attrItr = attributes->begin(); +- Attributes current = Attributes(first, Attributes::a_normal, Attributes::color_default); ++ wattr_set(m_window, Attributes::a_normal, Attributes::color_default, NULL); + + while (first != last) { +- if (attrItr != attributes->end() && first >= attrItr->position()) +- current = *attrItr++; ++ const char* next = last; + +- waddch(m_window, *first++ | current.attributes()); ++ if (attrItr != attributes->end()) { ++ next = attrItr->position(); ++ ++ if (first >= next) { ++ wattr_set(m_window, attrItr->attributes(), attrItr->colors(), NULL); ++ ++attrItr; ++ } ++ } ++ ++ print("%.*s", next - first, first); ++ first = next; + } + + // Reset the color. ++ wattr_set(m_window, org_attr, org_pair, NULL); + } + + void +Index: rtorrent/src/display/canvas.h +=================================================================== +--- rtorrent/src/display/canvas.h (revision 1063) ++++ rtorrent/src/display/canvas.h (working copy) +@@ -86,6 +86,7 @@ + // since the string shall always be a C string choosen at + // compiletime. Might cause extra copying of the string? + ++ void print(const char* str, ...); + void print(unsigned int x, unsigned int y, const char* str, ...); + + void print_attributes(unsigned int x, unsigned int y, const char* first, const char* last, const attributes_list* attributes); +@@ -95,6 +96,8 @@ + + void set_attr(unsigned int x, unsigned int y, unsigned int n, int attr, int color) { mvwchgat(m_window, y, x, n, attr, color, NULL); } + ++ void set_default_attributes(int attr) { wattrset(m_window, attr); } ++ + // Initialize stdscr. + static void initialize(); + static void cleanup(); +@@ -116,6 +119,15 @@ + }; + + inline void ++Canvas::print(const char* str, ...) { ++ va_list arglist; ++ ++ va_start(arglist, str); ++ vw_printw(m_window, const_cast<char*>(str), arglist); ++ va_end(arglist); ++} ++ ++inline void + Canvas::print(unsigned int x, unsigned int y, const char* str, ...) { + va_list arglist; + diff --git a/net-p2p/rtorrent/rtorrent-0.8.2-r3.ebuild b/net-p2p/rtorrent/rtorrent-0.8.2-r3.ebuild index 1d031cabbc8d..162ffcf94d72 100644 --- a/net-p2p/rtorrent/rtorrent-0.8.2-r3.ebuild +++ b/net-p2p/rtorrent/rtorrent-0.8.2-r3.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-p2p/rtorrent/rtorrent-0.8.2-r3.ebuild,v 1.6 2008/08/02 21:36:22 corsair Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-p2p/rtorrent/rtorrent-0.8.2-r3.ebuild,v 1.7 2008/08/07 22:00:07 loki_val Exp $ inherit eutils toolchain-funcs flag-o-matic @@ -42,7 +42,6 @@ src_compile() { $(use_enable ipv6) \ $(use_with xmlrpc xmlrpc-c) \ --disable-dependency-tracking \ - --enable-aligned \ || die "econf failed" emake || die "emake failed" @@ -58,3 +57,10 @@ src_install() { emake DESTDIR="${D}" install || die "make install failed" dodoc AUTHORS README TODO doc/rtorrent.rc } + +pkg_postinst() { + ewarn "If you're upgrading from rtorrent <0.8.0, you will have to delete your" + ewarn "session directory or run the fixSession080-c.py script from this address:" + ewarn "http://rssdler.googlecode.com/files/fixSession080-c.py" + ewarn "See http://libtorrent.rakshasa.no/wiki/LibTorrentKnownIssues for more info." +} diff --git a/net-p2p/rtorrent/rtorrent-0.8.2-r4.ebuild b/net-p2p/rtorrent/rtorrent-0.8.2-r4.ebuild new file mode 100644 index 000000000000..a5966b5e09aa --- /dev/null +++ b/net-p2p/rtorrent/rtorrent-0.8.2-r4.ebuild @@ -0,0 +1,69 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-p2p/rtorrent/rtorrent-0.8.2-r4.ebuild,v 1.1 2008/08/07 22:00:07 loki_val Exp $ + +inherit eutils autotools toolchain-funcs flag-o-matic + +DESCRIPTION="BitTorrent Client using libtorrent" +HOMEPAGE="http://libtorrent.rakshasa.no/" +SRC_URI="http://libtorrent.rakshasa.no/downloads/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" +IUSE="debug ipv6 xmlrpc" + +DEPEND=">=net-libs/libtorrent-0.12.${PV##*.} + >=dev-libs/libsigc++-2 + >=net-misc/curl-7.18 + sys-libs/ncurses + xmlrpc? ( dev-libs/xmlrpc-c )" + +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${FILESDIR}"/${PN}-0.8.0+gcc-4.3.patch + epatch "${FILESDIR}"/${P}-fix_start_stop_filter.patch + epatch "${FILESDIR}"/${P}-fix_conn_type_seed.patch + epatch "${FILESDIR}"/${P}-fix_load_cache.patch + epatch "${FILESDIR}"/${P}-fix_utf8_filenames.patch + epatch "${FILESDIR}"/${P}-fix-configure-execinfo.patch + epatch "${FILESDIR}"/${P}-gcc34.patch + eautoreconf +} + +src_compile() { + replace-flags -Os -O2 + append-flags -fno-strict-aliasing + + if [[ $(tc-arch) = "x86" ]]; then + filter-flags -fomit-frame-pointer -fforce-addr + fi + + econf \ + $(use_enable debug) \ + $(use_enable ipv6) \ + $(use_with xmlrpc xmlrpc-c) \ + --disable-dependency-tracking \ + || die "econf failed" + + emake || die "emake failed" +} + +pkg_postinst() { + elog "rtorrent now supports a configuration file." + elog "A sample configuration file for rtorrent can be found" + elog "in ${ROOT}usr/share/doc/${PF}/rtorrent.rc.gz." +} + +src_install() { + emake DESTDIR="${D}" install || die "make install failed" + dodoc AUTHORS README TODO doc/rtorrent.rc +} + +pkg_postinst() { + ewarn "If you're upgrading from rtorrent <0.8.0, you will have to delete your" + ewarn "session directory or run the fixSession080-c.py script from this address:" + ewarn "http://rssdler.googlecode.com/files/fixSession080-c.py" + ewarn "See http://libtorrent.rakshasa.no/wiki/LibTorrentKnownIssues for more info." +} |