summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStanislav Ochotnicky <sochotnicky@gentoo.org>2011-04-18 20:03:52 +0000
committerStanislav Ochotnicky <sochotnicky@gentoo.org>2011-04-18 20:03:52 +0000
commitdd4f24b8ea0c74c6d1542543fb9493ef183c8890 (patch)
tree149de93fa3b54e48c6ee967c7124ade8211f86b0 /net-p2p/rtorrent
parentJust overwrite the previous value of QT_PLUGIN_PATH, qt-4.7.2 does not even s... (diff)
downloadhistorical-dd4f24b8ea0c74c6d1542543fb9493ef183c8890.tar.gz
historical-dd4f24b8ea0c74c6d1542543fb9493ef183c8890.tar.bz2
historical-dd4f24b8ea0c74c6d1542543fb9493ef183c8890.zip
Added optional support for color torrent listing
Package-Manager: portage-2.1.9.42/cvs/Linux x86_64
Diffstat (limited to 'net-p2p/rtorrent')
-rw-r--r--net-p2p/rtorrent/ChangeLog9
-rw-r--r--net-p2p/rtorrent/Manifest33
-rw-r--r--net-p2p/rtorrent/files/rtorrent-0.8.7-canvas-fix.patch301
-rw-r--r--net-p2p/rtorrent/metadata.xml1
-rw-r--r--net-p2p/rtorrent/rtorrent-0.8.7-r2.ebuild (renamed from net-p2p/rtorrent/rtorrent-0.8.7-r1.ebuild)26
5 files changed, 342 insertions, 28 deletions
diff --git a/net-p2p/rtorrent/ChangeLog b/net-p2p/rtorrent/ChangeLog
index 8948af64f35b..8301816196df 100644
--- a/net-p2p/rtorrent/ChangeLog
+++ b/net-p2p/rtorrent/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for net-p2p/rtorrent
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-p2p/rtorrent/ChangeLog,v 1.159 2011/04/11 21:24:18 sochotnicky Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-p2p/rtorrent/ChangeLog,v 1.160 2011/04/18 20:03:52 sochotnicky Exp $
+
+*rtorrent-0.8.7-r2 (18 Apr 2011)
+
+ 18 Apr 2011; Stanislav Ochotnicky <sochotnicky@gentoo.org>
+ -rtorrent-0.8.7-r1.ebuild, +rtorrent-0.8.7-r2.ebuild,
+ +files/rtorrent-0.8.7-canvas-fix.patch, metadata.xml:
+ Added optional support for color torrent listing
*rtorrent-0.8.7-r1 (11 Apr 2011)
*rtorrent-0.8.6-r3 (11 Apr 2011)
diff --git a/net-p2p/rtorrent/Manifest b/net-p2p/rtorrent/Manifest
index 242e50244eb9..7d9cbdca89eb 100644
--- a/net-p2p/rtorrent/Manifest
+++ b/net-p2p/rtorrent/Manifest
@@ -4,29 +4,30 @@ Hash: SHA256
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 rtorrent-0.8.6-ncurses.patch 572 RMD160 c0e390c444e50d69d8dbe4727c76b5962651a570 SHA1 2267dce2ddfb1ea865ba50c95e4a5beaf24da533 SHA256 4bcc6f33fad67d14f44cfdc63409fc94ef917dc120c46e60ce175d36af3fcb02
+AUX rtorrent-0.8.7-canvas-fix.patch 10095 RMD160 67315e412a1d071c32366ff0920ae2fe69ac4c6f SHA1 ead1c7099cd42fc48b3194c3e53a9b2d4e2d4311 SHA256 a40a88d17e3090d3a7244ae701b049687b3646f8cbecfe40a1456306b6b56fd7
AUX rtorrentd.conf 13 RMD160 aafd4d8440f40ae380b482876968f80267dff3bd SHA1 8b50885e27a2ff85cd28fccb56c11ead26d0ba49 SHA256 6725e7a3ed74f1432bd6b317f2aec7f9609bc20dd81dbbfcc632342c9f99177b
AUX rtorrentd.init 738 RMD160 ad8f44fedbc50436916cdf4d8f4dd0c7a455c8d3 SHA1 406561f68aa5c488e025aa174a82aa19534ef0cd SHA256 68d6db59c00226ffd7c155b4613ab67b71c41f02164e69d5a55fa3bdbf43ced3
DIST rtorrent-0.8.6.tar.gz 521045 RMD160 3d5109d4ee26c663b376e0b9f610ab6055c57ba9 SHA1 ffce3959ba91738bb444d689db3db1e2375b14ce SHA256 8c96c68e1524162abd1fc4b612d0c3d924fccc25159c0b3f208e69281f0b32db
DIST rtorrent-0.8.7.tar.gz 547435 RMD160 52564096341088087c7a316c8e7637df77b672b6 SHA1 691c95e948d02927edc05321e52cd1c63513fabc SHA256 1fd0c9b2b3fe81b035209417c4dd4514473411f16b15ffe7fefe87eaff1a58d2
EBUILD rtorrent-0.8.6-r1.ebuild 1596 RMD160 c4558712e434a91bd49bb99049badd7e8c1e975f SHA1 e2c47673cea00308d5dc63dcce21dfa4229ff8f3 SHA256 1c177f4f112c0e21611f404f1c15d98ec1be13f92fdc0e54bb587bd3c9677ce5
EBUILD rtorrent-0.8.6-r3.ebuild 1666 RMD160 15d70858c72a7660aef38e5d04bab2b72a6d0f6c SHA1 59a4fbf99f0a2f44f39dd64393c34fd9a968be12 SHA256 1a893a7fe86b45ad6c59732cdb753d97e4c35ca19d9f2d21c2175ce99709cd72
-EBUILD rtorrent-0.8.7-r1.ebuild 1674 RMD160 48ff251d4307dcbc22e3d4f623be690869026587 SHA1 ef5356a35da35d4476f90d1b9ee56d4e478b2032 SHA256 3193e4f8abb9ab84ff4d6e29087cf03386f97fc3ba2cc9fae8294c76216cc78f
-MISC ChangeLog 23327 RMD160 aef4e746a43eead1eba6877b0dad7a526d6d0275 SHA1 424430e006f5f0414aa83bad9a92b4a221320c1c SHA256 9a58469bd962d1655c9c1e24dcb4b550a18452b37e55ef3bdc3daae0aa178e19
-MISC metadata.xml 392 RMD160 45e0a49396ec9062dec01e806cafeee78ed65b5f SHA1 772978675923bad143b16b772257ea5fb868bf56 SHA256 fd16df5847e039632256655ff60ce329cbdd92b87f3397b8810e1665480c62a2
+EBUILD rtorrent-0.8.7-r2.ebuild 1768 RMD160 285d2748b9141bbd5d947dfcf6422a721473c5c2 SHA1 2914979049c4113b19210e85c7736a7c712399e4 SHA256 4aae850c8389d74c8838e4f6cfe140e2a03b509db877cf90e3e0d95362aba896
+MISC ChangeLog 23586 RMD160 c425d99673441e1410c5ab2db9dfd231702398f4 SHA1 ee16325ad101f6bb8c336e72940e71ebc6f45e4c SHA256 d5f93cb31a52ba76889918e52fb42f37ca9d3cbc7fd69d2b8dff798b915956ea
+MISC metadata.xml 461 RMD160 20828b74a80b51c1df06f6dba3aa63fbe7eec437 SHA1 7d50936803d36c9e88d2030bcf6647d4cede9d09 SHA256 db7942b39f614d72ff07b2ca64acbddd975cc016761d0037eb9edf786a4b295d
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)
-iQIcBAEBCAAGBQJNo3GQAAoJELy9dS57CHJB//QP/A4qDMjpwv2uop2dDgajJ2TP
-zjSIRUUwDwFbZlCxGaEoxQW97Desaqi/A3TQ55tPPrXLfbvJ5CKFR47vN5TdOnmf
-sNwQabzNRuvC55eb5Yi8m1m9qobe5EM4oqR7MFvdx5rKVTBvNf0UF+O8M0+7DbsW
-e2ginhOj95OWs+ns8XnWTVokjukfHfcLcMo3b/XlqcHXA+OO4QmL85BgiVi7y4UM
-pZPedoDgzHcAhvxK0oXBolGyB6uQk4LRnHeUeno7Q68Ji5GueR7kICEjjy23A/yG
-hzUJNUVhUz6MN+JakqPVkQZNL1EVlfl4G8H420YlqdUgcW6zMc+5KGtAqLWIbgUp
-SVWUEh4DfkDrfR2AizCx5LBRfLpIgf7A7sRiCNcSXvu4yx8yfDhNiWjKBTqBQe+C
-WbJZq9iji8igra0Vmq+iwBXtdIGacGLlwnyVvkaHbozdnTZiGVK0WEEJF0VfMY7Q
-3wydBisdDwF8rcrNS+TD7MV+YcTLGWzgUH8lNgNHXAeiVuCi5YIjpQNLy1pjLl5r
-1oaT2V0qX78MUYuqH5IME6xMTc0LU6vV/FwmIZ8Yk/usiZXuUfIYKGZibB9D5w1E
-nYZD1AmH6o9JVXKIThKjOU2mFkH49iLhGXk3H5xyDQt/TOgqdcMmBPDzTUp7l3ME
-o+b43HhLGkpx2r2SMjg0
-=2kne
+iQIcBAEBCAAGBQJNrJlcAAoJELy9dS57CHJBsRMQALqr6Mxxu27CYx9v/CKxEf+Z
+KlNtSfoHy2WYFDIpRTGtloHf9IY10Uy0EmdUTgR+Qn/4DhAEA0mTu7e+x2TgWqci
+xkFpPTJoZRUwb5locNwrkJDxdWIvV+omqtWbtvlXUojy7dzGKFWJp5IgeOCdTOLi
+kNsHH8Dx422cbq1WHO8ndkvEd0RMMOqhaXh/571n1qiwHPkHSzIuFsAb+erBhiD5
+dZuWlvZ8Yoo0DGiQBYFNS18EVJRXhpsjtiJTu0000iG+Maq1KxFzVDiFC2zkxm3X
+NeHikLZ5pMNI4R3RBoaArKsQzJCoNk04G3NBROnS1KjpeHQ7Zxb4oQZSHQ/6G9Ua
+j5LUsE/WWOsmQrHGl2ooLQ+ecOTwdZdLLK30RdaZ3xof6Hb81zbJ5y7GFut3PuOD
+8ou9reBzYNyGjJyHewwif0TnGiofyRxvISdjXEf89rNhFprRX+YXGnVPnJMyO4XB
+zJPmo9t1aoeLMiKR8VyJQenJ1O9LNpAZkGm/1at9Mtqfkaj7X+vnMusXsMwaNYDj
+K3952k1BaDStMI+Y0xIX2RLP5WKS3+R0o7GClaSr9CPhGpEcexYJ/F8sYjwIRbs/
+H2A5WKsErMrmZmT0HeqHSd3mfAYktklc60Spag/qoh658FMYOnde0ChvC9B0UsEB
+kqLUJIP6EXJo9Scu3tcR
+=Qank
-----END PGP SIGNATURE-----
diff --git a/net-p2p/rtorrent/files/rtorrent-0.8.7-canvas-fix.patch b/net-p2p/rtorrent/files/rtorrent-0.8.7-canvas-fix.patch
new file mode 100644
index 000000000000..9fa32a4417ab
--- /dev/null
+++ b/net-p2p/rtorrent/files/rtorrent-0.8.7-canvas-fix.patch
@@ -0,0 +1,301 @@
+Index: rtorrent/src/display/window_download_list.h
+===================================================================
+--- rtorrent/src/display/window_download_list.h (revision 1163)
++++ rtorrent/src/display/window_download_list.h (working copy)
+@@ -59,6 +59,10 @@
+ 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;
+Index: rtorrent/src/display/canvas.cc
+===================================================================
+--- rtorrent/src/display/canvas.cc (revision 1163)
++++ rtorrent/src/display/canvas.cc (working copy)
+@@ -92,6 +92,10 @@
+ m_isInitialized = true;
+
+ initscr();
++ start_color();
++ use_default_colors();
++ init_pair(2, -1, -1);
++ init_pair(1, -1, -1);
+ raw();
+ noecho();
+ nodelay(stdscr, TRUE);
+Index: rtorrent/src/display/window_download_list.cc
+===================================================================
+--- rtorrent/src/display/window_download_list.cc (revision 1163)
++++ rtorrent/src/display/window_download_list.cc (working copy)
+@@ -37,6 +37,7 @@
+ #include "config.h"
+
+ #include <rak/algorithm.h>
++#include <torrent/rate.h>
+
+ #include "core/download.h"
+ #include "core/view.h"
+@@ -96,12 +97,30 @@
+ 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);
++ m_canvas->print(0, pos, "%c %s", range.first == m_view->focus() ? '*' : ' ', buffer);
++ if( (*range.first)->is_done() ) {
++ if( (*range.first)->info()->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)->info()->is_active() ) {
++ if( (*range.first)->info()->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,4 +128,41 @@
+ }
+ }
+
++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);
++}
++
++}
++
+Index: rtorrent/src/command_network.cc
+===================================================================
+--- rtorrent/src/command_network.cc (revision 1163)
++++ rtorrent/src/command_network.cc (working copy)
+@@ -506,4 +506,15 @@
+ CMD2_ANY ("dht.statistics", std::tr1::bind(&core::DhtManager::dht_statistics, control->dht_manager()));
+ CMD2_ANY ("dht.throttle.name", std::tr1::bind(&core::DhtManager::throttle_name, control->dht_manager()));
+ CMD2_ANY_STRING_V("dht.throttle.name.set", std::tr1::bind(&core::DhtManager::set_throttle_name, control->dht_manager(), std::tr1::placeholders::_2));
++
++
++ CMD2_ANY ("set_done_fg_color", std::tr1::bind(&ui::Root::get_done_fg_color, control->ui()));
++ CMD2_ANY_VALUE_V ("done_fg_color", std::tr1::bind(&ui::Root::set_done_fg_color, control->ui(), std::tr1::placeholders::_2));
++ CMD2_ANY ("set_done_bg_color", std::tr1::bind(&ui::Root::get_done_bg_color, control->ui()));
++ CMD2_ANY_VALUE_V ("done_bg_color", std::tr1::bind(&ui::Root::set_done_bg_color, control->ui(), std::tr1::placeholders::_2));
++ CMD2_ANY ("set_active_fg_color", std::tr1::bind(&ui::Root::get_active_fg_color, control->ui()));
++ CMD2_ANY_VALUE_V ("active_fg_color", std::tr1::bind(&ui::Root::set_active_fg_color, control->ui(), std::tr1::placeholders::_2));
++ CMD2_ANY ("set_active_bg_color", std::tr1::bind(&ui::Root::get_active_bg_color, control->ui()));
++ CMD2_ANY_VALUE_V ("active_bg_color", std::tr1::bind(&ui::Root::set_active_bg_color, control->ui(), std::tr1::placeholders::_2));
++
+ }
+Index: rtorrent/src/ui/download_list.cc
+===================================================================
+--- rtorrent/src/ui/download_list.cc (revision 1163)
++++ rtorrent/src/ui/download_list.cc (working copy)
+@@ -137,6 +137,11 @@
+ 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())
+Index: rtorrent/src/ui/download_list.h
+===================================================================
+--- rtorrent/src/ui/download_list.h (revision 1163)
++++ rtorrent/src/ui/download_list.h (working copy)
+@@ -101,6 +101,7 @@
+ 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; }
+Index: rtorrent/src/ui/element_download_list.h
+===================================================================
+--- rtorrent/src/ui/element_download_list.h (revision 1163)
++++ rtorrent/src/ui/element_download_list.h (working copy)
+@@ -60,6 +60,7 @@
+ 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);
+Index: rtorrent/src/ui/root.cc
+===================================================================
+--- rtorrent/src/ui/root.cc (revision 1163)
++++ rtorrent/src/ui/root.cc (working copy)
+@@ -44,6 +44,7 @@
+
+ #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,7 +66,11 @@
+ m_windowTitle(NULL),
+ m_windowHttpQueue(NULL),
+ m_windowInput(NULL),
+- m_windowStatusbar(NULL) {
++ m_windowStatusbar(NULL),
++ done_fg_color(-1),
++ done_bg_color(-1),
++ active_fg_color(-1),
++ active_bg_color(-1) {
+ }
+
+ void
+@@ -97,6 +102,10 @@
+ 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,7 +228,47 @@
+ 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));
+ }
+Index: rtorrent/src/ui/root.h
+===================================================================
+--- rtorrent/src/ui/root.h (revision 1163)
++++ rtorrent/src/ui/root.h (working copy)
+@@ -82,7 +82,16 @@
+ // 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);
+
+@@ -93,6 +102,11 @@
+
+ input::TextInput* current_input();
+
++ int64_t done_fg_color;
++ int64_t done_bg_color;
++ int64_t active_fg_color;
++ int64_t active_bg_color;
++
+ private:
+ void setup_keys();
+
+@@ -105,6 +119,7 @@
+ WStatusbar* m_windowStatusbar;
+
+ input::Bindings m_bindings;
++
+ };
+
+ }
diff --git a/net-p2p/rtorrent/metadata.xml b/net-p2p/rtorrent/metadata.xml
index 7a0964ccbd38..dd9423df796b 100644
--- a/net-p2p/rtorrent/metadata.xml
+++ b/net-p2p/rtorrent/metadata.xml
@@ -9,6 +9,7 @@
<flag name='daemon'>Uses <pkg>app-misc/screen</pkg> to daemonize this
application
</flag>
+ <flag name='color'>Add custom color support for torrent list</flag>
</use>
</pkgmetadata>
diff --git a/net-p2p/rtorrent/rtorrent-0.8.7-r1.ebuild b/net-p2p/rtorrent/rtorrent-0.8.7-r2.ebuild
index 46de76cce941..f11c51190115 100644
--- a/net-p2p/rtorrent/rtorrent-0.8.7-r1.ebuild
+++ b/net-p2p/rtorrent/rtorrent-0.8.7-r2.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-p2p/rtorrent/rtorrent-0.8.7-r1.ebuild,v 1.1 2011/04/11 21:24:18 sochotnicky Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-p2p/rtorrent/rtorrent-0.8.7-r2.ebuild,v 1.1 2011/04/18 20:03:52 sochotnicky Exp $
EAPI=2
@@ -13,7 +13,7 @@ SRC_URI="http://libtorrent.rakshasa.no/downloads/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
-IUSE="daemon debug ipv6 xmlrpc"
+IUSE="color daemon debug ipv6 xmlrpc"
COMMON_DEPEND=">=net-libs/libtorrent-0.12.${PV##*.}
>=dev-libs/libsigc++-2.2.2:2
@@ -23,11 +23,14 @@ COMMON_DEPEND=">=net-libs/libtorrent-0.12.${PV##*.}
RDEPEND="${COMMON_DEPEND}
daemon? ( app-misc/screen )"
DEPEND="${COMMON_DEPEND}
+ test? ( dev-util/cppunit )
dev-util/pkgconfig"
src_prepare() {
# bug #358271
epatch "${FILESDIR}"/${PN}-0.8.6-ncurses.patch
+
+ use color && EPATCH_OPTS="-p1" epatch "${FILESDIR}"/${P}-canvas-fix.patch
}
src_configure() {
@@ -48,12 +51,13 @@ src_install() {
fi
}
-# Need to fix patch to get that again
-#pkg_postinst() {
-# elog "rtorrent colors patch"
-# elog "Set colors using the options below in .rtorrent.rc:"
-# elog "Options: done_fg_color, done_bg_color, active_fg_color, active_bg_color"
-# elog "Colors: 0 = black, 1 = red, 2 = green, 3 = yellow, 4 = blue,"
-# elog "5 = magenta, 6 = cyan and 7 = white"
-# elog "Example: done_fg_color = 1"
-#}
+pkg_postinst() {
+ if use color; then
+ elog "rtorrent colors patch"
+ elog "Set colors using the options below in .rtorrent.rc:"
+ elog "Options: done_fg_color, done_bg_color, active_fg_color, active_bg_color"
+ elog "Colors: 0 = black, 1 = red, 2 = green, 3 = yellow, 4 = blue,"
+ elog "5 = magenta, 6 = cyan and 7 = white"
+ elog "Example: done_fg_color = 1"
+ fi
+}