diff options
Diffstat (limited to 'net-p2p/rtorrent')
-rw-r--r-- | net-p2p/rtorrent/ChangeLog | 8 | ||||
-rw-r--r-- | net-p2p/rtorrent/Manifest | 5 | ||||
-rw-r--r-- | net-p2p/rtorrent/files/rtorrent-0.8.6-canvas-fix.patch | 321 | ||||
-rw-r--r-- | net-p2p/rtorrent/rtorrent-0.8.6.ebuild | 10 |
4 files changed, 338 insertions, 6 deletions
diff --git a/net-p2p/rtorrent/ChangeLog b/net-p2p/rtorrent/ChangeLog index 3185cdea7c6f..ec4db6c0ffef 100644 --- a/net-p2p/rtorrent/ChangeLog +++ b/net-p2p/rtorrent/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for net-p2p/rtorrent -# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-p2p/rtorrent/ChangeLog,v 1.146 2009/12/28 20:35:30 armin76 Exp $ +# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/net-p2p/rtorrent/ChangeLog,v 1.147 2010/01/21 11:19:34 cla Exp $ + + 21 Jan 2010; Dawid Węgliński <cla@gentoo.org> rtorrent-0.8.6.ebuild, + +files/rtorrent-0.8.6-canvas-fix.patch: + Add canvas colour patch. Bug #295373. 28 Dec 2009; Raúl Porcel <armin76@gentoo.org> rtorrent-0.8.5.ebuild, rtorrent-0.8.6.ebuild: diff --git a/net-p2p/rtorrent/Manifest b/net-p2p/rtorrent/Manifest index fe293a93215e..1621a9734a4d 100644 --- a/net-p2p/rtorrent/Manifest +++ b/net-p2p/rtorrent/Manifest @@ -1,9 +1,10 @@ AUX rtorrent-0.8.2-gcc34.patch 659 RMD160 c89a0c7b2acb6db4ce19fbb7a75f1da65638cd2b SHA1 d1afe3ca20a9b9b60056b7941ae7f81dcee558a0 SHA256 a89b48546be2c0728129feff223ed4e03a7c40bbc37e9bead9c13cf20c5cd00d +AUX rtorrent-0.8.6-canvas-fix.patch 11607 RMD160 01f3be5ecf0769a44e31f9852eb3da5454e85c75 SHA1 4d60d95845df05c9864ca50d3f84726d2b93ab14 SHA256 a843dcd8c3b7fe0179c24d53cb485d2f11156a189e58911bbd14e5e30db71925 AUX rtorrentd.conf 13 RMD160 aafd4d8440f40ae380b482876968f80267dff3bd SHA1 8b50885e27a2ff85cd28fccb56c11ead26d0ba49 SHA256 6725e7a3ed74f1432bd6b317f2aec7f9609bc20dd81dbbfcc632342c9f99177b AUX rtorrentd.init 672 RMD160 a39dd240678ba95329b542762265730351cb5ea5 SHA1 55d2cefcca466052143d475590e8bb46d0ef3563 SHA256 8f807eba0033cfa436d0c7a2493268902c5b5cfa49366cc67f3f5f50125a5d44 DIST rtorrent-0.8.5.tar.gz 512889 RMD160 ebf5bc3a39ec8b9905513a706a480452498ca991 SHA1 ebab4af5c3c5f31803e0880fadd303ecbc6adba8 SHA256 0ec6991772e9318fa5e687b5c2c8b5e0166d8def8d729373e8ae20b815984665 DIST rtorrent-0.8.6.tar.gz 521045 RMD160 3d5109d4ee26c663b376e0b9f610ab6055c57ba9 SHA1 ffce3959ba91738bb444d689db3db1e2375b14ce SHA256 8c96c68e1524162abd1fc4b612d0c3d924fccc25159c0b3f208e69281f0b32db EBUILD rtorrent-0.8.5.ebuild 2000 RMD160 0c6823b9621504141aa3f59f20944f3e47d10e1c SHA1 a7a67e6efbdd3af293278deb1f3d66df82386774 SHA256 39ba63825c2982b48bcfdb6ed4b2364e38118e8d38d204df1c5fdabc6006ca69 -EBUILD rtorrent-0.8.6.ebuild 1185 RMD160 68dd188be90fae1010dca19a09e411e72baf0d36 SHA1 ab48ad7a66ecb2a9bcf7fee8ef0fd8713ebe0344 SHA256 436fae8dcfa77dd624cda032f6f06317b93f94eb5524709a345042dabed6038d -MISC ChangeLog 21395 RMD160 5b81d32f14124b12897d68789839245a2eaa1eae SHA1 8709121719dda2b1207be0ad9fd3288b6e2c7189 SHA256 b0d75b618dffc89fe0d7ac1855f0a5baa69e72214b07b846064386b87ef1c262 +EBUILD rtorrent-0.8.6.ebuild 1260 RMD160 1d11acf95e73102ffaa158211d447750572b3dda SHA1 9d407e75bb2af04f96e9a27240436af6fb723b5c SHA256 bec7c3c93a1764903200e13fa0e77377af870da05acb6e8856ce9702877fd1b9 +MISC ChangeLog 21547 RMD160 5ceb6996eafce8874a1ad75d2f6e8aab64568ef3 SHA1 b2155b57993f5e1791477f9d602caf42b27719f8 SHA256 0d8180de7c856e161b12836d43163f6285769ab804d7d12b2a67cf059c53e263 MISC metadata.xml 465 RMD160 7f1afd6825ace948ec63ca61165832254c847d61 SHA1 4b7538af584fb7dcde67618055c6784e987f0b76 SHA256 811745be874d4cdf5ea99ef6df868d20269c2a8985d2b086be20d9f14479ce19 diff --git a/net-p2p/rtorrent/files/rtorrent-0.8.6-canvas-fix.patch b/net-p2p/rtorrent/files/rtorrent-0.8.6-canvas-fix.patch new file mode 100644 index 000000000000..02b8a186d9a6 --- /dev/null +++ b/net-p2p/rtorrent/files/rtorrent-0.8.6-canvas-fix.patch @@ -0,0 +1,321 @@ +diff -crB /home/regj/misc/rtorrent-color-orig/src/rtorrent-0.8.6/src/command_network.cc ./src/command_network.cc +*** /home/regj/misc/rtorrent-color-orig/src/rtorrent-0.8.6/src/command_network.cc 2009-11-12 09:19:40.000000000 +0100 +--- ./src/command_network.cc 2009-12-17 19:27:05.783955715 +0100 +*************** +*** 495,498 **** +--- 495,502 ---- + // Not really network stuff: + ADD_VARIABLE_BOOL ("handshake_log", false); + ADD_VARIABLE_STRING("log.tracker", ""); ++ ADD_COMMAND_VALUE_TRI("done_fg_color", rak::make_mem_fun(control->ui(), &ui::Root::set_done_fg_color), rak::make_mem_fun(control->ui(), &ui::Root::get_done_fg_color)); ++ ADD_COMMAND_VALUE_TRI("done_bg_color", rak::make_mem_fun(control->ui(), &ui::Root::set_done_bg_color), rak::make_mem_fun(control->ui(), &ui::Root::get_done_bg_color)); ++ ADD_COMMAND_VALUE_TRI("active_fg_color", rak::make_mem_fun(control->ui(), &ui::Root::set_active_fg_color), rak::make_mem_fun(control->ui(), &ui::Root::get_active_fg_color)); ++ ADD_COMMAND_VALUE_TRI("active_bg_color", rak::make_mem_fun(control->ui(), &ui::Root::set_active_bg_color), rak::make_mem_fun(control->ui(), &ui::Root::get_active_bg_color)); + } +diff -crB /home/regj/misc/rtorrent-color-orig/src/rtorrent-0.8.6/src/display/canvas.cc ./src/display/canvas.cc +*** /home/regj/misc/rtorrent-color-orig/src/rtorrent-0.8.6/src/display/canvas.cc 2009-11-12 09:03:47.000000000 +0100 +--- ./src/display/canvas.cc 2009-12-17 19:27:05.783955715 +0100 +*************** +*** 92,97 **** +--- 92,101 ---- + m_isInitialized = true; + + initscr(); ++ start_color(); ++ use_default_colors(); ++ init_pair(2, -1, -1); ++ init_pair(1, -1, -1); + raw(); + noecho(); + nodelay(stdscr, TRUE); +Only in ./src/display: canvas.cc.orig +diff -crB /home/regj/misc/rtorrent-color-orig/src/rtorrent-0.8.6/src/display/window_download_list.cc ./src/display/window_download_list.cc +*** /home/regj/misc/rtorrent-color-orig/src/rtorrent-0.8.6/src/display/window_download_list.cc 2009-11-12 09:03:47.000000000 +0100 +--- ./src/display/window_download_list.cc 2009-12-17 19:27:05.783955715 +0100 +*************** +*** 37,42 **** +--- 37,43 ---- + #include "config.h" + + #include <rak/algorithm.h> ++ #include <torrent/rate.h> + + #include "core/download.h" + #include "core/view.h" +*************** +*** 96,107 **** + char* position; + char* last = buffer + m_canvas->width() - 2 + 1; + + position = print_download_title(buffer, last, *range.first); +! m_canvas->print(0, pos++, "%c %s", range.first == m_view->focus() ? '*' : ' ', buffer); + + position = print_download_info(buffer, last, *range.first); + m_canvas->print(0, pos++, "%c %s", range.first == m_view->focus() ? '*' : ' ', buffer); + + position = print_download_status(buffer, last, *range.first); + m_canvas->print(0, pos++, "%c %s", range.first == m_view->focus() ? '*' : ' ', buffer); + +--- 97,126 ---- + char* position; + char* last = buffer + m_canvas->width() - 2 + 1; + ++ if( pos >= m_canvas->height() ) break; + position = print_download_title(buffer, last, *range.first); +! m_canvas->print(0, pos, "%c %s", range.first == m_view->focus() ? '*' : ' ', buffer); +! if( (*range.first)->is_done() ) { +! if( (*range.first)->download()->up_rate()->rate() != 0 ) { +! m_canvas->set_attr(0, pos, m_canvas->width()-1, A_BOLD, 2); +! } else { +! m_canvas->set_attr(0, pos, m_canvas->width()-1, A_NORMAL, 2); +! } +! } else if( (*range.first)->download()->is_active() ) { +! if( (*range.first)->download()->down_rate()->rate() != 0 ) { +! m_canvas->set_attr(0, pos, m_canvas->width()-1, A_BOLD, 1); +! } else { +! m_canvas->set_attr(0, pos, m_canvas->width()-1, A_NORMAL, 1); +! } +! } +! pos++; + ++ if( pos >= m_canvas->height() ) break; ++ + position = print_download_info(buffer, last, *range.first); + m_canvas->print(0, pos++, "%c %s", range.first == m_view->focus() ? '*' : ' ', buffer); + ++ if( pos >= m_canvas->height() ) break; + position = print_download_status(buffer, last, *range.first); + m_canvas->print(0, pos++, "%c %s", range.first == m_view->focus() ? '*' : ' ', buffer); + +*************** +*** 109,112 **** +--- 128,167 ---- + } + } + ++ void ++ WindowDownloadList::set_done_fg_color(int64_t color) { ++ short fg, bg; ++ pair_content(2, &fg, &bg); ++ if( color < 0 ) color = -1; ++ color = color % 8; ++ init_pair(2, (short)color, bg); ++ } ++ ++ void ++ WindowDownloadList::set_done_bg_color(int64_t color) { ++ short fg, bg; ++ pair_content(2, &fg, &bg); ++ if( color < 0 ) color = -1; ++ color = color % 8; ++ init_pair(2, fg, (short)color); ++ } ++ ++ void ++ WindowDownloadList::set_active_fg_color(int64_t color) { ++ short fg, bg; ++ pair_content(1, &fg, &bg); ++ if( color < 0 ) color = -1; ++ color = color % 8; ++ init_pair(1, (short)color, bg); ++ } ++ ++ void ++ WindowDownloadList::set_active_bg_color(int64_t color) { ++ short fg, bg; ++ pair_content(1, &fg, &bg); ++ if( color < 0 ) color = -1; ++ color = color % 8; ++ init_pair(1, fg, (short)color); ++ } ++ + } +diff -crB /home/regj/misc/rtorrent-color-orig/src/rtorrent-0.8.6/src/display/window_download_list.h ./src/display/window_download_list.h +*** /home/regj/misc/rtorrent-color-orig/src/rtorrent-0.8.6/src/display/window_download_list.h 2009-11-12 09:03:47.000000000 +0100 +--- ./src/display/window_download_list.h 2009-12-17 19:27:05.783955715 +0100 +*************** +*** 59,64 **** +--- 59,68 ---- + virtual void redraw(); + + void set_view(core::View* l); ++ void set_done_fg_color(int64_t color); ++ void set_done_bg_color(int64_t color); ++ void set_active_fg_color(int64_t color); ++ void set_active_bg_color(int64_t color); + + private: + core::View* m_view; +diff -crB /home/regj/misc/rtorrent-color-orig/src/rtorrent-0.8.6/src/ui/download_list.cc ./src/ui/download_list.cc +*** /home/regj/misc/rtorrent-color-orig/src/rtorrent-0.8.6/src/ui/download_list.cc 2009-11-12 09:03:48.000000000 +0100 +--- ./src/ui/download_list.cc 2009-12-17 19:27:05.783955715 +0100 +*************** +*** 137,142 **** +--- 137,147 ---- + current_view()->next_focus(); + } + ++ display::WindowDownloadList* ++ DownloadList::current_window_list() { ++ return dynamic_cast<ElementDownloadList*>(m_uiArray[DISPLAY_DOWNLOAD_LIST])->window(); ++ } ++ + void + DownloadList::activate_display(Display displayType) { + if (!is_active()) +Only in ./src/ui: download_list.cc.orig +diff -crB /home/regj/misc/rtorrent-color-orig/src/rtorrent-0.8.6/src/ui/download_list.h ./src/ui/download_list.h +*** /home/regj/misc/rtorrent-color-orig/src/rtorrent-0.8.6/src/ui/download_list.h 2009-11-12 09:03:48.000000000 +0100 +--- ./src/ui/download_list.h 2009-12-17 19:27:05.783955715 +0100 +*************** +*** 101,106 **** +--- 101,107 ---- + void activate_display(Display d); + + core::View* current_view(); ++ display::WindowDownloadList* current_window_list(); + void set_current_view(const std::string& name); + + void slot_open_uri(SlotOpenUri s) { m_slotOpenUri = s; } +diff -crB /home/regj/misc/rtorrent-color-orig/src/rtorrent-0.8.6/src/ui/element_download_list.h ./src/ui/element_download_list.h +*** /home/regj/misc/rtorrent-color-orig/src/rtorrent-0.8.6/src/ui/element_download_list.h 2009-11-12 09:03:48.000000000 +0100 +--- ./src/ui/element_download_list.h 2009-12-17 19:27:05.783955715 +0100 +*************** +*** 60,65 **** +--- 60,66 ---- + void disable(); + + core::View* view() { return m_view; } ++ WDownloadList* window() { return m_window; } + void set_view(core::View* l); + + void receive_command(const char* cmd); +Only in ./src/ui: element_download_list.h.orig +diff -crB /home/regj/misc/rtorrent-color-orig/src/rtorrent-0.8.6/src/ui/root.cc ./src/ui/root.cc +*** /home/regj/misc/rtorrent-color-orig/src/rtorrent-0.8.6/src/ui/root.cc 2009-11-12 09:03:48.000000000 +0100 +--- ./src/ui/root.cc 2009-12-17 19:27:05.783955715 +0100 +*************** +*** 44,49 **** +--- 44,50 ---- + + #include "core/manager.h" + #include "display/frame.h" ++ #include "display/window_download_list.h" + #include "display/window_http_queue.h" + #include "display/window_title.h" + #include "display/window_input.h" +*************** +*** 65,71 **** + m_windowTitle(NULL), + m_windowHttpQueue(NULL), + m_windowInput(NULL), +! m_windowStatusbar(NULL) { + } + + void +--- 66,76 ---- + m_windowTitle(NULL), + m_windowHttpQueue(NULL), + m_windowInput(NULL), +! m_windowStatusbar(NULL), +! done_fg_color(-1), +! done_bg_color(-1), +! active_fg_color(-1), +! active_bg_color(-1) { + } + + void +*************** +*** 97,102 **** +--- 102,111 ---- + setup_keys(); + + m_downloadList->activate(rootFrame->frame(1)); ++ m_downloadList->current_window_list()->set_done_fg_color(done_fg_color); ++ m_downloadList->current_window_list()->set_done_bg_color(done_bg_color); ++ m_downloadList->current_window_list()->set_active_fg_color(active_fg_color); ++ m_downloadList->current_window_list()->set_active_bg_color(active_bg_color); + } + + void +*************** +*** 219,224 **** +--- 228,273 ---- + torrent::set_max_unchoked(maxUnchoked); + } + ++ int ++ Root::get_done_fg_color() { ++ return done_fg_color; ++ } ++ ++ void ++ Root::set_done_fg_color(int64_t color) { ++ done_fg_color = color; ++ } ++ ++ int ++ Root::get_done_bg_color() { ++ return done_bg_color; ++ } ++ ++ void ++ Root::set_done_bg_color(int64_t color) { ++ done_bg_color = color; ++ } ++ ++ int ++ Root::get_active_fg_color() { ++ return active_fg_color; ++ } ++ ++ void ++ Root::set_active_fg_color(int64_t color) { ++ active_fg_color = color; ++ } ++ ++ int ++ Root::get_active_bg_color() { ++ return active_bg_color; ++ } ++ ++ void ++ Root::set_active_bg_color(int64_t color) { ++ active_bg_color = color; ++ } ++ + void + Root::adjust_down_throttle(int throttle) { + set_down_throttle(std::max<int>(torrent::down_throttle_global()->max_rate() / 1024 + throttle, 0)); +Only in ./src/ui: root.cc.orig +diff -crB /home/regj/misc/rtorrent-color-orig/src/rtorrent-0.8.6/src/ui/root.h ./src/ui/root.h +*** /home/regj/misc/rtorrent-color-orig/src/rtorrent-0.8.6/src/ui/root.h 2009-11-12 09:03:48.000000000 +0100 +--- ./src/ui/root.h 2009-12-17 19:27:05.783955715 +0100 +*************** +*** 82,87 **** +--- 82,95 ---- + // Rename to raw or something, make base function. + void set_down_throttle_i64(int64_t throttle) { set_down_throttle(throttle >> 10); } + void set_up_throttle_i64(int64_t throttle) { set_up_throttle(throttle >> 10); } ++ int get_done_fg_color(); ++ void set_done_fg_color(int64_t color); ++ int get_done_bg_color(); ++ void set_done_bg_color(int64_t color); ++ int get_active_fg_color(); ++ void set_active_fg_color(int64_t color); ++ int get_active_bg_color(); ++ void set_active_bg_color(int64_t color); + + void adjust_down_throttle(int throttle); + void adjust_up_throttle(int throttle); +*************** +*** 105,110 **** +--- 113,122 ---- + WStatusbar* m_windowStatusbar; + + input::Bindings m_bindings; ++ int64_t done_fg_color; ++ int64_t done_bg_color; ++ int64_t active_fg_color; ++ int64_t active_bg_color; + }; diff --git a/net-p2p/rtorrent/rtorrent-0.8.6.ebuild b/net-p2p/rtorrent/rtorrent-0.8.6.ebuild index 784e5771c887..3f17d2d1ed1e 100644 --- a/net-p2p/rtorrent/rtorrent-0.8.6.ebuild +++ b/net-p2p/rtorrent/rtorrent-0.8.6.ebuild @@ -1,9 +1,11 @@ -# Copyright 1999-2009 Gentoo Foundation +# Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-p2p/rtorrent/rtorrent-0.8.6.ebuild,v 1.2 2009/12/28 20:35:30 armin76 Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-p2p/rtorrent/rtorrent-0.8.6.ebuild,v 1.3 2010/01/21 11:19:34 cla Exp $ EAPI=2 +inherit eutils + DESCRIPTION="BitTorrent Client using libtorrent" HOMEPAGE="http://libtorrent.rakshasa.no/" SRC_URI="http://libtorrent.rakshasa.no/downloads/${P}.tar.gz" @@ -23,6 +25,10 @@ RDEPEND="${COMMON_DEPEND} DEPEND="${COMMON_DEPEND} dev-util/pkgconfig" +src_prepare() { + epatch "${FILESDIR}"/${P}-canvas-fix.patch +} + src_configure() { econf \ --disable-dependency-tracking \ |