summaryrefslogtreecommitdiff
path: root/net-p2p/rtorrent
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /net-p2p/rtorrent
reinit the tree, so we can have metadata
Diffstat (limited to 'net-p2p/rtorrent')
-rw-r--r--net-p2p/rtorrent/Manifest13
-rw-r--r--net-p2p/rtorrent/files/rtorrent-0.9.1-ncurses.patch10
-rw-r--r--net-p2p/rtorrent/files/rtorrent-0.9.4-tinfo.patch37
-rw-r--r--net-p2p/rtorrent/files/rtorrent-0.9.6-cppunit-pkgconfig.patch28
-rw-r--r--net-p2p/rtorrent/files/rtorrent.1560
-rw-r--r--net-p2p/rtorrent/files/rtorrentd.conf1
-rw-r--r--net-p2p/rtorrent/files/rtorrentd.init32
-rw-r--r--net-p2p/rtorrent/files/rtorrentd_at.service15
-rw-r--r--net-p2p/rtorrent/metadata.xml20
-rw-r--r--net-p2p/rtorrent/rtorrent-0.9.6-r1.ebuild63
-rw-r--r--net-p2p/rtorrent/rtorrent-0.9.6.ebuild62
11 files changed, 841 insertions, 0 deletions
diff --git a/net-p2p/rtorrent/Manifest b/net-p2p/rtorrent/Manifest
new file mode 100644
index 000000000000..eb1db8798260
--- /dev/null
+++ b/net-p2p/rtorrent/Manifest
@@ -0,0 +1,13 @@
+AUX rtorrent-0.9.1-ncurses.patch 416 SHA256 043f85f5e77de132f5a8aeccc894f11fad961f237a5c092dd38e163620f6e40e SHA512 bc36d56880fbfb99d6e5cb19688d733d79a89c8aec88913f5962ea72503e4103b34eb2a67be76bbe80c35beda972f6fc5dbf1947f89624bf5e117774688e7cf8 WHIRLPOOL 211bff140ee9094fde6b9f21a0a853c26d79f79a9727203ee7d96b010795620d5d7eb01d683cfceee0a31c5d0c0701a85054b259f7c21c35ebac0ccd9de4fe53
+AUX rtorrent-0.9.4-tinfo.patch 1137 SHA256 8c12b5715baec6afc362fa82743b3660ce1ab92edd1bc47048e4af3478f63318 SHA512 5f571daa1bdaa8823bbbf52c66df3ff88be487e3fdaa8ea4f45c26b13336995a4a81a712766a8181bc85746e458652bb11c4dcc28d76da3137025e52e614c179 WHIRLPOOL d44ec1195fb41e43683313083d1f90276f080515cb2e0be68d132a2c1874326b5db23e8dbc0c5063f5a19ecafbb42ea0f09fa551850346e37ab5bf63038bd0a6
+AUX rtorrent-0.9.6-cppunit-pkgconfig.patch 857 SHA256 110dfab5a48adc16f0fa5104a6911332dddf1fdee5784f03c57debfdb5435e4d SHA512 94cf317ef2ec8dae361fa82df156bee153f58c927bdc4f203c5318ba839f8a7024021a4d2e90771b067f313c8ff524659b41aaa386b1a2341561f196c97fc03f WHIRLPOOL ba1861da398803e93518d4b1a02f978df7d67ddf3281310ffd9e98dabf58855c6b19f9ddb7a6c98d60253e9e9faaa1fc5f2fa06a21e9d62ae840de22641106b4
+AUX rtorrent.1 18204 SHA256 bac10215777c9a22826f56f6218b21734306e30e179deeab47164a845b01dae9 SHA512 f2d3fb87fd7c321822ce9e61cc334682f9692e3f86b42cb3d7d5826dec53d56e631e20455e0ea1e53448c11386988a6e7a70a91ed2923f90852956ad3fdafcfe WHIRLPOOL 6e98f2ce7660cf00fd8a7fb8d9cfcb2f44867a18d3376c6434aef0cf61703c5939743f7194ee76de3bb7b1dccf5fd8a4461047f96c210c5b13afee58048ee76e
+AUX rtorrentd.conf 13 SHA256 6725e7a3ed74f1432bd6b317f2aec7f9609bc20dd81dbbfcc632342c9f99177b SHA512 f241452b812a1837660f9ad52881feacc02825e82ea7ac19acc662b4219dd58997ea908275b8c9ee78ed791babf79c1a91069dc6d5b5fb3c461e3026cdeab73f WHIRLPOOL 11f799ee54cc3f4ae535fca30d4f41748149c6869a2217f7c67e03ffab87792e5d5679d6fcc69697b8ffab60690e7187262e57bc68afea0a3244a24095db2235
+AUX rtorrentd.init 702 SHA256 0c5999447341924265eb520ae378b5871949dbf19c70699fbbd34c2c78d18475 SHA512 6ac954e78dfa29a56ccfb53f666a96b7e93ec919b613f609ce16e312d44ab7c3adb849af826695494a92f882fb051f3e7c8a97d1b283ea9ac8673333ef8f8ab6 WHIRLPOOL 41e118f3a2825752f37af32807f4c32c79d4ac4631ceca8afa61798d104e6036aeb631e8ba7842523b4546a5ac41d61cf8b391e2db5bc0e76ba15ae532ac3982
+AUX rtorrentd_at.service 308 SHA256 f3de3506146e3dac6698028378d51a9f62a2fa8957173b250bf607bc6ceb57e8 SHA512 cc707500af2dbb0cc0c8297512807f9312445cf70de00bcf2f7267388834f1d0454eaaa9a8b52387e5f84288400286414225c55af0f560f61a8d0858971a8615 WHIRLPOOL 8060403740dec4d92c8527c1b5b5d5902fbcdb43f20d2639e3fc644bc7bbd73c890c76d1f85c3bec9ab9e8a7d5fe74e779b8bdaaa3f8a52c234e8ce4de417778
+DIST rtorrent-0.9.6.tar.gz 610845 SHA256 1e69c24f1f26f8f07d58d673480dc392bfc4317818c1115265b08a7813ff5b0e SHA512 704f7b79d5bc78b817da21a6886662a5a97fde210a110c50f708bdc18e1dcf3ef5c5f4e2740261d41221cfc69c19926bf34e10057adf10601da9e6e06b2cef75 WHIRLPOOL df5878014087d894e9796508627ec508ff5d042c78cc09e8d9ae57a7f9556bb549f9900e3995a7296420438ca0edda245907f8ae0c71d5a0ae28c3af7a6f992e
+EBUILD rtorrent-0.9.6-r1.ebuild 1666 SHA256 ef7875bc1d8c5dc34bf52c3294729030ba394664f31259a33536996cb5b392b9 SHA512 424d4be8a4e1fdda05649911df8c2f6334ac746b28124b42de2aa08ed5c0195927683fea477dc265a6098180ad0df032a5a5a05e797656cc00e195ad4fc30607 WHIRLPOOL 7849ea0aa4e083646e02eeb75dfbcd1574a7e0a0176bedf6639c225c104bf7c630a73fa28d849af6e2fd6ea8db280e13d98010ef124e4ee46160afb0e471f096
+EBUILD rtorrent-0.9.6.ebuild 1607 SHA256 65df8be3e41caa2916f752792b10c9e9cbe138a4ada3a31d8b65566339fcea43 SHA512 8fe7ab26bd876073b09ae926e979a32d926374a411a70753b7133731f5a381ec2577df095689fa9fc7d759792e62dae7734324e24446b3c01f4f97322f17f04b WHIRLPOOL a34343707fbf59286e33d087b23b4452106cab797a8c2371ea9c3e15de5a93a10537b7a983941db9c09c054b6e46c29c065c3840985fa723d9b2e204fa11c8b7
+MISC ChangeLog 4603 SHA256 4f54e944391ea3138ded299645d00aec5e37d4ac53d000259c72b7a66fd15e04 SHA512 7468aca2ff09fe11064213d6fd25b2946b2dcdf7fcad7cbcaa23ecbcdd2e670d83aceb80e48dcec0bfbf9c904cce3f58f88c4632a4e09458b67760927acb035c WHIRLPOOL c90988ac796a33ee5e35a81172fa8cddc1614fd2a89401c9b594dddb81efa0c75ab6919d8f8682fe6ffa531c6b98a057d1e3a9ed7644f8a3d9bb75f3e5964e7b
+MISC ChangeLog-2015 30299 SHA256 56a50fc40703456a109c21b62c768a999c8baf18684ff35658fda55e08cc2790 SHA512 661d2db8b47ec1f7463e62e412f2a9d67b01536d4401eafa77521af7805c4d3caf61249de9cee8585d0555c32dc65dd8a21127eeef8251caef3f93b8c5199785 WHIRLPOOL d6e32052df092c0ba95955c7f07f7bfb4fd39d5fbad593949c0ca69d9aa85cf676ec728c5d4745b0443fb799b1bcb2743fcda2cfc574603856f4e0b864fb8e27
+MISC metadata.xml 565 SHA256 cc54c7299c8cc77dbef242d12ff9a8bdb43d1305d05c93758f923864d99a13d6 SHA512 7ab72e3c6f7fdf9113f1888000f4779986d1f154c226dc1053fb681484214297ebed1c1d6413e0c7bf24a1701036c90e619ffdae9edbb30152fc8c43eeb41b6a WHIRLPOOL 48ccdd5eccaf1c95937618be063e42d2d116df3a54c40c534b90774534bdabb0aaa8fd97e6dc2beeb820c732d9439305cd86d9105ba90a14b5cf92e6ce3dd31a
diff --git a/net-p2p/rtorrent/files/rtorrent-0.9.1-ncurses.patch b/net-p2p/rtorrent/files/rtorrent-0.9.1-ncurses.patch
new file mode 100644
index 000000000000..260cd9a38425
--- /dev/null
+++ b/net-p2p/rtorrent/files/rtorrent-0.9.1-ncurses.patch
@@ -0,0 +1,10 @@
+--- src/display/canvas.h
++++ src/display/canvas.h
+@@ -48,5 +48,5 @@ class Canvas {
+ public:
+ typedef std::vector<Attributes> attributes_list;
+
+- Canvas(int x = 0, int y = 0, int width = 0, int height = 0);
++ Canvas(int x = 0, int y = 0, int width = 1, int height = 1);
+ ~Canvas() { delwin(m_window); }
+ void refresh() { wnoutrefresh(m_window); }
diff --git a/net-p2p/rtorrent/files/rtorrent-0.9.4-tinfo.patch b/net-p2p/rtorrent/files/rtorrent-0.9.4-tinfo.patch
new file mode 100644
index 000000000000..21ee708782b3
--- /dev/null
+++ b/net-p2p/rtorrent/files/rtorrent-0.9.4-tinfo.patch
@@ -0,0 +1,37 @@
+bug 462788
+
+ configure.ac | 18 ++++++++++++------
+ 1 file changed, 12 insertions(+), 6 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 430c15d..50ce687 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -31,15 +31,21 @@ TORRENT_WITHOUT_STATVFS()
+ TORRENT_WITHOUT_STATFS()
+
+ AX_PTHREAD([], AC_MSG_ERROR([requires pthread]))
+-AX_WITH_CURSES()
+-
+-if test "x$ax_cv_ncursesw" != xyes && test "x$ax_cv_ncurses" != xyes; then
+- AC_MSG_ERROR([requires either NcursesW or Ncurses library])
+-fi
++PKG_CHECK_MODULES([CURSES],[ncursesw],[
++ AC_DEFINE(HAVE_NCURSESW_CURSES_H, 1)
++ ],
++ [PKG_CHECK_MODULES([CURSES],[ncurses],[
++ AC_DEFINE(HAVE_NCURSES_H, 1)
++ ],
++ [AX_WITH_CURSES()
++ if test "x$ax_cv_ncursesw" != xyes && test "x$ax_cv_ncurses" != xyes; then
++ AC_MSG_ERROR([requires either NcursesW or Ncurses library])
++ fi])
++ ])
+
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS $CURSES_CFLAGS"
+ CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS $CURSES_CFLAGS"
+-LIBS="$PTHREAD_LIBS $CURSES_LIB $LIBS"
++LIBS="$PTHREAD_LIBS $CURSES_LIB $CURSES_LIBS $LIBS"
+
+ PKG_CHECK_MODULES([libcurl], libcurl >= 7.15.4,
+ CXXFLAGS="$CXXFLAGS $libcurl_CFLAGS";
diff --git a/net-p2p/rtorrent/files/rtorrent-0.9.6-cppunit-pkgconfig.patch b/net-p2p/rtorrent/files/rtorrent-0.9.6-cppunit-pkgconfig.patch
new file mode 100644
index 000000000000..753f4cb8a7f3
--- /dev/null
+++ b/net-p2p/rtorrent/files/rtorrent-0.9.6-cppunit-pkgconfig.patch
@@ -0,0 +1,28 @@
+https://bugs.gentoo.org/620908
+
+diff -ur a/configure.ac b/configure.ac
+--- a/configure.ac 2017-08-17 08:52:49.596897308 -0500
++++ b/configure.ac 2017-08-17 08:54:57.171515415 -0500
+@@ -4,7 +4,6 @@
+
+ AM_INIT_AUTOMAKE
+ AC_CONFIG_HEADERS(config.h)
+-AM_PATH_CPPUNIT(1.9.6)
+
+ AC_PROG_CXX
+ AC_PROG_LIBTOOL
+@@ -43,9 +42,11 @@
+ fi])
+ ])
+
+-CFLAGS="$CFLAGS $PTHREAD_CFLAGS $CURSES_CFLAGS"
+-CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS $CURSES_CFLAGS"
+-LIBS="$PTHREAD_LIBS $CURSES_LIB $CURSES_LIBS $LIBS"
++PKG_CHECK_MODULES([CPPUNIT], [cppunit],, [no_cppunit="yes"])
++
++CFLAGS="$CFLAGS $PTHREAD_CFLAGS $CPPUNIT_CFLAGS $CURSES_CFLAGS"
++CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS $CPPUNIT_CFLAGS $CURSES_CFLAGS"
++LIBS="$PTHREAD_LIBS $CURSES_LIB $CURSES_LIBS $CPPUNIT_LIBS $LIBS"
+
+ PKG_CHECK_MODULES([libcurl], libcurl >= 7.15.4,
+ CXXFLAGS="$CXXFLAGS $libcurl_CFLAGS";
diff --git a/net-p2p/rtorrent/files/rtorrent.1 b/net-p2p/rtorrent/files/rtorrent.1
new file mode 100644
index 000000000000..9ad120816c12
--- /dev/null
+++ b/net-p2p/rtorrent/files/rtorrent.1
@@ -0,0 +1,560 @@
+.\" This manpage has been automatically generated by docbook2man
+.\" from a DocBook document. This tool can be found at:
+.\" <http://shell.ipoline.com/~elmert/comp/docbook2X/>
+.\" Please send any bug reports, improvements, comments, patches,
+.\" etc. to Steve Cheng <steve@ggi-project.org>.
+.TH "RTORRENT" "1" "14 May 2009" "BitTorrent client for ncurses" ""
+
+.SH NAME
+rtorrent \- a BitTorrent client for ncurses
+.SH SYNOPSIS
+
+\fBrtorrent\fR [ \fB-h\fR ] [ \fB-n\fR ] [ \fB-o key1=opt1,...\fR ] [ \fB-O key=opt\fR ] [ \fBURL | FILE\fR\fI ...\fR ]
+
+.SH "DESCRIPTION"
+.PP
+\fBrtorrent\fR is a BitTorrent client for ncurses, using
+the \fBlibtorrent\fR library. The client and library is
+written in C++ with emphasis on speed and efficiency, while delivering
+equivalent features to those found in GUI based clients in an ncurses
+client.
+.PP
+Most of the options below have their own default unit in addition to
+supporting B, K, M and G suffixes.
+.SH "KEYBOARD CONTROL"
+.PP
+.SS "GLOBAL KEYS"
+.TP
+\fB^q\fR
+Initiate shutdown, press again to force the shutdown and
+skip sending the stop signal to trackers.
+.TP
+\fBup | down | left | right arrow keys\fR
+.TP
+\fB^P | ^N | ^B | ^F\fR
+Select entries or change windows. The right arrow key or ^F is often
+used for viewing details about the selected entry, while the left
+arrow key or ^B often returns to the previous screen.
+.TP
+\fBa | s | d\fR
+Increase the upload throttle by 1/5/50 KB.
+.TP
+\fBA | S | D\fR
+Increase the download throttle by 1/5/50 KB.
+.TP
+\fBz | x | c\fR
+Decrease the upload throttle by 1/5/50 KB.
+.TP
+\fBZ | X | C\fR
+Decrease the download throttle by 1/5/50 KB.
+.SS "MAIN VIEW KEYS"
+.TP
+\fB->\fR
+View download.
+.TP
+\fB1 - 7\fR
+Change view.
+.TP
+\fB^S\fR
+Start download.
+.TP
+\fB^D\fR
+Stop an active download, or remove a stopped download.
+.TP
+\fB^K\fR
+Close a torrent and its files.
+.TP
+\fB^E\fR
+Set the 'create/resize queued' flags on all files in a torrent. This
+is necessary if the underlying files in a torrent have been deleted or
+truncated, and thus rtorrent must recreate them.
+.TP
+\fB^R\fR
+Initiate hash check of torrent.
+.TP
+\fB^O\fR
+Change the destination directory of the download. The torrent must be
+closed.
+.TP
+\fB^X\fR
+Call commands or change settings.
+.TP
+\fB^B\fR
+Set download to perform initial seeding. Only use when
+you are the first and only seeder so far for the download.
+.TP
+\fB+ | -\fR
+Change the priority of the download.
+.TP
+\fBbackspace\fR
+Add torrent using a URL or file path. Use
+\fBtab\fR to view directory content and do
+auto-complete.
+.TP
+\fBl\fR
+View log. Exit by pressing the space-bar.
+.TP
+\fBU\fR
+Delete the file the torrent is tied to, and clear the association.
+.TP
+\fBI\fR
+Toggle whether torrent ignores ratio settings.
+.SS "DOWNLOAD VIEW KEYS"
+.TP
+\fB->\fR
+View torrent file list. Use the space-bar to change the file priority
+and \fB*\fR to change the priority of all
+files. Use \fB/\fR to collapse the directories. OUTDATED
+.TP
+\fB1 | 2\fR
+Adjust max uploads.
+.TP
+\fB3 | 4\fR
+Adjust min peers.
+.TP
+\fB5 | 6\fR
+Adjust max peers.
+.TP
+\fBu\fR
+Display transfering blocks.
+.TP
+\fBi\fR
+Display chunk rarity.
+.TP
+\fBo\fR
+Display the tracker list. Cycle the trackers in a group with the
+space-bar.
+.TP
+\fBp\fR
+View peer and torrent information.
+.TP
+\fBt | T\fR
+Initiate tracker request. Use capital T to force the request, ignoring
+the "min interval" set by the tracker.
+.TP
+\fBk\fR
+Disconnect peer.
+.TP
+\fB*\fR
+Choke/Snub peer.
+.SH "OPTIONS"
+.TP
+\fB-b \fIa.b.c.d\fB\fR
+Bind listening socket and outgoing connections to this network
+interface address.
+.TP
+\fB-d \fIdirectory\fB\fR
+Set the default download directory. Defaults to "./".
+.TP
+\fB-h\fR
+Display help and exit.
+.TP
+\fB-i \fIa.b.c.d\fB\fR
+Set the address reported to the tracker.
+.TP
+\fB-n\fR
+Don't load ~/.rtorrent.rc on startup.
+.TP
+\fB-o key1=opt1,...\fR
+.TP
+\fB-O key=opt\fR
+Set any number of options, see the SETTINGS section. The options given
+here override the resource files. Use capital \fB-O\fR
+to allow comma in the option.
+.TP
+\fB-p \fIa-b\fB\fR
+Try to open a listening port in the range \fBa\fR up to
+and including \fBb\fR\&.
+.TP
+\fB-s \fIdirectory\fB\fR
+Session management will be enabled and the torrent files for all open
+downloads will be stored in this directory. Only one instance of
+rtorrent should be used with each session directory, though at the
+moment no locking is done. An empty string will disable the session
+directory.
+.SH "GENERAL SETTINGS"
+.PP
+.TP
+\fBbind = \fIa.b.c.d\fB\fR
+Bind listening socket and outgoing connections to this network
+interface address.
+.TP
+\fBip = \fIa.b.c.d\fB\fR
+.TP
+\fBip = \fIhostname\fB\fR
+Set the address reported to the tracker.
+.TP
+\fBport_range = \fIa-b\fB\fR
+Try to open a listening port in the range \fBa\fR up to
+and including \fBb\fR\&.
+.TP
+\fBport_random = \fIyes | no\fB\fR
+Open the listening port at a random position in the port range.
+.TP
+\fBcheck_hash = \fIyes | no\fB\fR
+Perform hash check on torrents that have finished downloading.
+.TP
+\fBdirectory = \fIdirectory\fB\fR
+Set the default download directory. Defaults to "./".
+.TP
+\fBsession = \fIdirectory\fB\fR
+Session management will be enabled and the torrent files for all open
+downloads will be stored in this directory. Only one instance of
+rtorrent can be used per session directory. An empty string will
+disable the session directory.
+.TP
+\fBhttp_proxy = \fIurl\fB\fR
+Use a http proxy. Use an empty string to disable.
+.TP
+\fBencoding_list = \fIencoding\fB\fR
+Add a preferred filename encoding to the list. The encodings are
+attempted in the order they are inserted, if none match the torrent
+default is used.
+.TP
+\fBencryption = \fIoption\fB,\fI\&...\fB\fR
+Set how rtorrent should deal with encrypted Bittorrent connections. By
+default, encryption is disabled, equivalent to specifying the option
+\fBnone\fR\&. Alternatively, any number of the following
+options may be specified:
+
+\fBallow_incoming\fR (allow incoming encrypted connections),
+\fBtry_outgoing\fR (use encryption for outgoing connections),
+\fBrequire\fR (disable unencrypted handshakes),
+\fBrequire_RC4\fR (also disable plaintext transmission after the
+initial encrypted handshake),
+\fBenable_retry\fR (if the initial outgoing connection fails, retry
+with encryption turned on if it was off or off if it was on),
+\fBprefer_plaintext\fR (choose plaintext when peer offers a choice
+between plaintext transmission and RC4 encryption, otherwise RC4 will be used).
+.TP
+\fBpeer_exchange = \fIyes | no\fB\fR
+Enable/disable peer exchange for torrents that aren't marked private. Disabled by default.
+.TP
+\fBschedule = \fIid\fB,\fIstart\fB,\fIinterval\fB,\fIcommand\fB\fR
+Call \fBcommand\fR every \fBinterval\fR
+seconds, starting from \fBstart\fR\&. An
+\fBinterval\fR of zero calls the task once, while a
+\fBstart\fR of zero calls it immediately. Currently
+\fBcommand\fR is forwarded to the option handler.
+\fBstart\fR and \fBinterval\fR may
+optionally use a time format, \fBdd:hh:mm:ss\fR\&. F.ex to
+start a task every day at \fB18:00\fR, use
+\fB18:00:00,24:00:00\fR\&.
+.TP
+\fBschedule_remove = \fIid\fB\fR
+Delete \fBid\fR from the scheduler.
+.TP
+\fBstart_tied =\fR
+Start torrents that are tied to filenames that have been re-added.
+.TP
+\fBstop_untied =\fR
+.TP
+\fBclose_untied =\fR
+.TP
+\fBremove_untied =\fR
+Stop, close or remove the torrents that are tied to filenames that
+have been deleted. Clear the association with the 'U' key.
+.TP
+\fBclose_low_diskspace = \fIspace\fB\fR
+Close any active torrents on filesystems with less than
+\fBspace\fR diskspace left. Use with
+the \fBschedule\fR option. A default scheduled event
+with id \fBlow_diskspace\fR is set to 500Mb.
+.TP
+\fBload = \fIfile\fB\fR
+.TP
+\fBload_verbose = \fIfile\fB\fR
+.TP
+\fBload_start = \fIfile\fB\fR
+.TP
+\fBload_start_verbose = \fIfile\fB\fR
+Load and possibly start a file, or possibly multiple files by using the
+wild-card "*". This is meant for use with
+\fBschedule\fR, though ensure that the
+\fBstart\fR is non-zero. The loaded file will be tied
+to the filename provided.
+.TP
+\fBimport = \fIfile\fB\fR
+.TP
+\fBtry_import = \fIfile\fB\fR
+Load a resource file. \fBtry_import\fR does not throw
+torrent::input_error exception on bad input.
+.TP
+\fBstop_on_ratio = \fImin_ratio\fB\fR
+.TP
+\fBstop_on_ratio = \fImin_ratio\fB,\fImin_upload\fB\fR
+.TP
+\fBstop_on_ratio = \fImin_ratio\fB,\fImin_upload\fB,\fImax_ratio\fB\fR
+Stop torrents when they reach the given upload ratio
+\fBmin_ratio\fR in percent. If the optional
+\fBmin_upload\fR is given, require a total
+upload amount of this many bytes as well. If the optional
+\fBmax_ratio\fR is given, stop the torrent
+when reaching this ratio regardless of the total upload
+amount. Exclude certain torrent by pressing
+\fBShift+I\fR in the downlist list.
+Use with the \fBschedule\fR option.
+.TP
+\fBon_insert = \fIid\fB,\fIcommand\fB\fR
+.TP
+\fBon_erase = \fIid\fB,\fIcommand\fB\fR
+.TP
+\fBon_open = \fIid\fB,\fIcommand\fB\fR
+.TP
+\fBon_close = \fIid\fB,\fIcommand\fB\fR
+.TP
+\fBon_start = \fIid\fB,\fIcommand\fB\fR
+.TP
+\fBon_stop = \fIid\fB,\fIcommand\fB\fR
+.TP
+\fBon_hash_queued = \fIid\fB,\fIcommand\fB\fR
+.TP
+\fBon_hash_removed = \fIid\fB,\fIcommand\fB\fR
+.TP
+\fBon_hash_done = \fIid\fB,\fIcommand\fB\fR
+.TP
+\fBon_finished = \fIid\fB,\fIcommand\fB\fR
+Call a command on a download when its state changes. Only a subset of
+commands are available.
+.SH "THROTTLE SETTINGS"
+.TP
+\fBupload_rate = \fIKB\fB\fR
+.TP
+\fBdownload_rate = \fIKB\fB\fR
+Set the maximum global uploand and download rates.
+.TP
+\fBmin_peers = \fIvalue\fB\fR
+.TP
+\fBmax_peers = \fIvalue\fB\fR
+Set the minimum and maximum number of peers to allow in each download.
+.TP
+\fBmin_peers_seed = \fIvalue\fB\fR
+.TP
+\fBmax_peers_seed = \fIvalue\fB\fR
+Set the minimum nad maximum number of peers to allow while seeding, or
+-1 (default) to use max_peers.
+.TP
+\fBmax_uploads = \fIvalue\fB\fR
+Set the maximum number of simultaneous uploads per download.
+.TP
+\fBmax_uploads_div = \fIvalue\fB\fR
+.TP
+\fBmax_downloads_div = \fIvalue\fB\fR
+Change the divider used to calculate the max upload and download slots
+to use when the throttle is changed. Disable by
+setting \fB0\fR\&.
+.TP
+\fBmax_uploads_global = \fIvalue\fB\fR
+.TP
+\fBmax_downloads_global = \fIvalue\fB\fR
+Max upload and download slots allowed. Disable by
+setting \fB0\fR\&.
+.TP
+\fBthrottle_up = \fIname\fB, \fIupload_rate\fB\fR
+.TP
+\fBthrottle_down = \fIname\fB, \fIdownload_rate\fB\fR
+Define secondary throttle and/or set the given upload or download rate. Attach to a download with the d.set_throttle_name=name command
+or switch throttles with Ctrl-T. Download must be stopped when changing throttles. Note that secondary throttles only work if the
+global upload/download is throttled. Setting a download to use the \fBNULL\fR throttle makes the download unthrottled
+even when there is a global throttle. Note that this special case bypasses the global throttle entirely, and as such its rate and
+transfer amounts are not included in the global statistics.
+.TP
+\fBthrottle_ip = \fIname\fB, \fIhost\fB\fR
+.TP
+\fBthrottle_ip = \fIname\fB, \fInetwork/prefix\fB\fR
+.TP
+\fBthrottle_ip = \fIname\fB, \fIstart\fB, \fIend\fB\fR
+Use the given secondary throttle for a host, CIDR network or IP range. All peers with a matching IP will use this throttle instead
+of the global throttle or a custom download throttle. The name may be \fBNULL\fR to make these peers unthrottled, with
+the same caveats as explained above.
+.SH "TRACKER RELATED SETTINGS"
+.PP
+Tracker related settings.
+.TP
+\fBenable_trackers = \fIyes\fB\fR
+Set to \fBno\fR to disable all tracker requests. Useful
+for disabling rtorrent with the \fBschedule\fR command.
+.TP
+\fBtracker_dump = \fIfilename\fB\fR
+Dump tracker requests to \fBfilename\fR, disable by
+supplying an empty string. Only torrents loaded while
+\fBtracker_dump\fR contains a non-empty string will be
+logged at the moment, although disabling it will work as expected.
+.TP
+\fBtracker_numwant = \fInumber\fB\fR
+Set the numwant field sent to the tracker, which indicates how many
+peers we want. A negative value disables this feature.
+.TP
+\fBuse_udp_trackers = \fIyes\fB\fR
+Use UDP trackers. Disable if you are behind a firewall, etc, that does
+not allow connections to UDP trackers.
+.TP
+\fBdht = \fIdisabled|off|auto|on\fB\fR
+Support for querying the distributed hash table (DHT) to find peers for trackerless
+torrents or when all trackers are down. Set to \fBdisable\fR to completely
+disable DHT, \fBoff\fR (default) to enable DHT but to not start the
+DHT server, \fBauto\fR to automatically start and stop the DHT server
+as needed or \fBon\fR for permanently keeping the DHT server running.
+When set to automatic, the DHT server will start up when the first non-private torrent
+is started, and will stop 15-30 minutes after the last non-private torrent is
+stopped (or when rTorrent quits). For DHT to work, a session directory must be set (for
+saving the DHT cache).
+.TP
+\fBdht_port = \fInumber\fB\fR
+Set the UDP listen port for DHT. Defaults to 6881.
+.TP
+\fBdht_add_node = \fIhost[:port]\fB\fR
+Not intended for use in the configuration file but as one-time option in the
+client or on the command line to bootstrap an empty DHT node table. Contacts
+the given node and attempts to bootstrap from it if it replies.
+The port is optional, with port 6881 being used by default.
+.TP
+\fBhttp_capath = \fIpath\fB\fR
+.TP
+\fBhttp_cacert = \fIfilename\fB\fR
+Set the certificates to use in http requests. See Curl's
+CURLOPT_CAPATH and CURLOPT_CAINFO options for further information.
+.SH "USER-INTERFACE SETTINGS"
+.PP
+Display related settings.
+.TP
+\fBview_add = \fIname\fB\fR
+Create a new view.
+.TP
+\fBview_sort = \fIname\fB\fR
+.TP
+\fBview_sort = \fIname\fB,\fIseconds\fB\fR
+Sort a view according the the criteria set by
+\fBview_sort_current\fR\&. If the optional argument is
+supplied, the view is not sorted if a change happened during the last
+\fBseconds\fR\&. This command is meant to be used with
+\fBschedule\fR\&.
+.TP
+\fBview_sort_new = \fIname\fB,\fI\&...\fB\fR
+.TP
+\fBview_sort_current = \fIname\fB,\fI\&...\fB\fR
+Set the sorting criteria for when new elements inserted or
+\fBview_sort\fR is called. The list can contain any
+number of criteria, including zero, from the following:
+
+\fBname\fR, \fBname_reverse\fR,
+\fBstopped\fR, \fBstarted\fR,
+\fBcomplete\fR, \fBincomplete\fR,
+\fBstate_changed\fR,
+\fBstate_changed_reverse\fR
+.TP
+\fBkey_layout = \fIqwerty|azerty|qwertz|dvorak\fB\fR
+Change the key-bindings.
+.SH "FILE-SYSTEM SETTINGS"
+.PP
+File-system related settings.
+.TP
+\fBmax_file_size = \fIsize\fB\fR
+Set the maximum size a file can have. Disable by
+passing \fB-1\fR\&.
+.TP
+\fBsplit_file_size = \fIsize\fB\fR
+Split files in a torrent larger than \fBsize\fR into
+seperate files. Disable by passing \fB-1\fR\&.
+.TP
+\fBsplit_suffix = \fIstring\fB\fR
+Set the suffix used on split files. Defaults
+to \fB\&.part\fR\&.
+.SH "DOWNLOAD SETTINGS"
+.PP
+Settings that require a download as a target, the options need to be
+called through f.ex \fBon_finished\fR\&.
+.TP
+\fBcreate_link = \fItype\fB,\fIpath\fB,\fIsuffix\fB\fR
+.TP
+\fBdelete_link = \fItype\fB,\fIpath\fB,\fIsuffix\fB\fR
+Create or delete a symbolic link. The link path is the concatenation
+of \fBpath\fR, the result of
+the \fBtype\fR on the download,
+and \fBsuffix\fR\&.
+
+Available types are; \fBbase_path\fR uses the base path
+of the download, \fBbase_filename\fR uses the base
+filename of the download, \fBtied\fR uses the path of
+the file the download is tied to, see \fBstart_tied\fR\&.
+.SH "ADVANCED SETTINGS"
+.PP
+This list contains settings users shouldn't need to touch, some may
+even cause crashes or similar if incorrectly set.
+.TP
+\fBhash_read_ahead = \fIMB\fB\fR
+Configure how far ahead we ask the kernel to read when doing hash
+checking. The hash checker uses madvise(..., MADV_WILLNEED) for the
+requests.
+.TP
+\fBhash_interval = \fIms\fB\fR
+Interval between attempts to check the hash when the chunk is not in
+memory, in milliseconds.
+.TP
+\fBhash_max_tries = \fItries\fB\fR
+Number of attempts to check the hash while using the mincore status,
+before forcing. Overworked systems might need lower values to get a
+decent hash checking rate.
+.TP
+\fBsafe_sync = \fIyes|no\fB\fR
+Always use MS_SYNC rather than MS_ASYNC when syncing chunks. This may
+be nessesary in case of filesystem bugs like NFS in linux ~2.6.13.
+.TP
+\fBmax_open_files = \fIvalue\fB\fR
+Number of files to simultaneously keep open. LibTorrent dynamically
+opens and closes files as necessary when mapping files to
+memory. Default is based on sysconf(_SC_OPEN_MAX).
+You probably only think you know what this option does, so don't touch
+it.
+.TP
+\fBmax_open_sockets = \fIvalue\fB\fR
+Number of network sockets to simultaneously keep open. This value is
+set to a reasonable value based on \fBsysconf(_SC_OPEN_MAX)\fR\&.
+.TP
+\fBmax_open_http = \fIvalue\fB\fR
+Number of sockets to simultaneously keep open. This value is set
+to \fB32\fR by default.
+.TP
+\fBmax_memory_usage = \fIbytes\fB\fR
+Set the max amount of memory space used to mapping file chunks. This
+may also be set using \fBulimit -m\fR where 3/4 will be
+allocated to file chunks.
+.TP
+\fBsend_buffer_size = \fIvalue\fB\fR
+.TP
+\fBreceive_buffer_size = \fIvalue\fB\fR
+Adjust the send and receive buffer size for socket.
+.TP
+\fBumask = \fI0022\fB\fR
+Set the umask for this process, which is applied to all files created
+by the program.
+.TP
+\fBcwd = \fIdirectory\fB\fR
+Changes the working directory of the process using
+\fBchdir\fR\&.
+.TP
+\fBsession_on_completion = \fIyes\fB\fR
+Controls if the session torrent is saved when a torrent finishes. By
+default on.
+.TP
+\fBsession_lock = \fIyes\fB\fR
+Controls if a lock file is created in the session directory on startup.
+.TP
+\fBsession_save = \fR
+Save the session files for all downloads.
+.TP
+\fBtos = \fIdefault|lowdelay|throughput|reliability|mincost\fB\fR
+.TP
+\fBtos = \fIhex\fB\fR
+Change the TOS of peer connections, by default set to
+\fBthroughput\fR\&. If the option is set to
+\fBdefault\fR then the system default TOS is used. A
+hex value may be used for non-standard settings.
+.TP
+\fBhandshake_log = \fIyes\fB\fR
+Enable logging of the peer handshake. This generates a large number of
+log messages, but may be useful to debug connection problems.
+.SH "AUTHORS"
+.PP
+
+Jari "Rakshasa" Sundell <jaris@ifi.uio.no>
diff --git a/net-p2p/rtorrent/files/rtorrentd.conf b/net-p2p/rtorrent/files/rtorrentd.conf
new file mode 100644
index 000000000000..5ff2328b2544
--- /dev/null
+++ b/net-p2p/rtorrent/files/rtorrentd.conf
@@ -0,0 +1 @@
+USER="$USER"
diff --git a/net-p2p/rtorrent/files/rtorrentd.init b/net-p2p/rtorrent/files/rtorrentd.init
new file mode 100644
index 000000000000..9672759a7bf4
--- /dev/null
+++ b/net-p2p/rtorrent/files/rtorrentd.init
@@ -0,0 +1,32 @@
+#!/sbin/openrc-run
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ use net ypbind nis
+ after slapd mysqld postgresql
+}
+
+start() {
+ PWHOME="$(getent passwd $USER | awk -F: '{ print $6 }')"
+
+ ebegin "Starting rtorrent"
+ env TERM="xterm" \
+ start-stop-daemon \
+ --start \
+ --make-pidfile \
+ --pidfile /var/run/rtorrentd.pid \
+ --background \
+ --user $USER \
+ --env HOME="${PWHOME:-/home/$USER}" \
+ --name rtorrent \
+ --exec /usr/bin/screen -- -D -m -S rtorrentd /usr/bin/rtorrent
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping rtorrent"
+ start-stop-daemon --stop --signal 15 \
+ --pidfile /var/run/rtorrentd.pid
+ eend $?
+}
diff --git a/net-p2p/rtorrent/files/rtorrentd_at.service b/net-p2p/rtorrent/files/rtorrentd_at.service
new file mode 100644
index 000000000000..991ba930c7f8
--- /dev/null
+++ b/net-p2p/rtorrent/files/rtorrentd_at.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=rTorrent
+Requires=network.target local-fs.target
+
+[Service]
+Type=forking
+RemainAfterExit=yes
+KillMode=none
+User=%I
+ExecStart=/usr/bin/screen -d -m -S rtorrentd /usr/bin/rtorrent
+ExecStop=/usr/bin/screen -S rtorrentd -X quit
+WorkingDirectory=/home/%I/
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-p2p/rtorrent/metadata.xml b/net-p2p/rtorrent/metadata.xml
new file mode 100644
index 000000000000..4038cab8495c
--- /dev/null
+++ b/net-p2p/rtorrent/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>perfinion@gentoo.org</email>
+ <name>Jason Zaman</name>
+ </maintainer>
+
+ <longdescription lang="en">
+ Console BitTorrent client using ncurses based on libtorrent written in C++.
+ </longdescription>
+
+ <use>
+ <flag name="daemon">Uses <pkg>app-misc/screen</pkg> to daemonize this application</flag>
+ </use>
+
+ <upstream>
+ <remote-id type="github">rakshasa/rtorrent</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-p2p/rtorrent/rtorrent-0.9.6-r1.ebuild b/net-p2p/rtorrent/rtorrent-0.9.6-r1.ebuild
new file mode 100644
index 000000000000..483629ab5db4
--- /dev/null
+++ b/net-p2p/rtorrent/rtorrent-0.9.6-r1.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools eutils systemd
+
+DESCRIPTION="BitTorrent Client using libtorrent"
+HOMEPAGE="https://rakshasa.github.io/rtorrent/"
+SRC_URI="http://rtorrent.net/downloads/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris"
+IUSE="daemon debug ipv6 selinux test xmlrpc"
+
+COMMON_DEPEND="~net-libs/libtorrent-0.13.${PV##*.}
+ >=dev-libs/libsigc++-2.2.2:2
+ >=net-misc/curl-7.19.1
+ sys-libs/ncurses:0=
+ xmlrpc? ( dev-libs/xmlrpc-c )"
+RDEPEND="${COMMON_DEPEND}
+ daemon? ( app-misc/screen )
+ selinux? ( sec-policy/selinux-rtorrent )
+"
+DEPEND="${COMMON_DEPEND}
+ dev-util/cppunit
+ virtual/pkgconfig"
+
+DOCS=( doc/rtorrent.rc )
+
+src_prepare() {
+ # bug #358271
+ epatch \
+ "${FILESDIR}"/${PN}-0.9.1-ncurses.patch \
+ "${FILESDIR}"/${PN}-0.9.4-tinfo.patch \
+ "${FILESDIR}"/${PN}-0.9.6-cppunit-pkgconfig.patch
+
+ # https://github.com/rakshasa/rtorrent/issues/332
+ cp "${FILESDIR}"/rtorrent.1 "${S}"/doc/ || die
+
+ eautoreconf
+}
+
+src_configure() {
+ # configure needs bash or script bombs out on some null shift, bug #291229
+ CONFIG_SHELL=${BASH} econf \
+ --disable-dependency-tracking \
+ $(use_enable debug) \
+ $(use_enable ipv6) \
+ $(use_with xmlrpc xmlrpc-c)
+}
+
+src_install() {
+ default
+ doman doc/rtorrent.1
+
+ if use daemon; then
+ newinitd "${FILESDIR}/rtorrentd.init" rtorrentd
+ newconfd "${FILESDIR}/rtorrentd.conf" rtorrentd
+ systemd_newunit "${FILESDIR}/rtorrentd_at.service" "rtorrentd@.service"
+ fi
+}
diff --git a/net-p2p/rtorrent/rtorrent-0.9.6.ebuild b/net-p2p/rtorrent/rtorrent-0.9.6.ebuild
new file mode 100644
index 000000000000..6de316711cbf
--- /dev/null
+++ b/net-p2p/rtorrent/rtorrent-0.9.6.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools eutils systemd
+
+DESCRIPTION="BitTorrent Client using libtorrent"
+HOMEPAGE="https://rakshasa.github.io/rtorrent/"
+SRC_URI="http://rtorrent.net/downloads/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm hppa ~ia64 ppc ppc64 ~sparc x86 ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris"
+IUSE="daemon debug ipv6 selinux test xmlrpc"
+
+COMMON_DEPEND="~net-libs/libtorrent-0.13.${PV##*.}
+ >=dev-libs/libsigc++-2.2.2:2
+ >=net-misc/curl-7.19.1
+ sys-libs/ncurses:0=
+ xmlrpc? ( dev-libs/xmlrpc-c )"
+RDEPEND="${COMMON_DEPEND}
+ daemon? ( app-misc/screen )
+ selinux? ( sec-policy/selinux-rtorrent )
+"
+DEPEND="${COMMON_DEPEND}
+ dev-util/cppunit
+ virtual/pkgconfig"
+
+DOCS=( doc/rtorrent.rc )
+
+src_prepare() {
+ # bug #358271
+ epatch \
+ "${FILESDIR}"/${PN}-0.9.1-ncurses.patch \
+ "${FILESDIR}"/${PN}-0.9.4-tinfo.patch
+
+ # https://github.com/rakshasa/rtorrent/issues/332
+ cp "${FILESDIR}"/rtorrent.1 "${S}"/doc/ || die
+
+ eautoreconf
+}
+
+src_configure() {
+ # configure needs bash or script bombs out on some null shift, bug #291229
+ CONFIG_SHELL=${BASH} econf \
+ --disable-dependency-tracking \
+ $(use_enable debug) \
+ $(use_enable ipv6) \
+ $(use_with xmlrpc xmlrpc-c)
+}
+
+src_install() {
+ default
+ doman doc/rtorrent.1
+
+ if use daemon; then
+ newinitd "${FILESDIR}/rtorrentd.init" rtorrentd
+ newconfd "${FILESDIR}/rtorrentd.conf" rtorrentd
+ systemd_newunit "${FILESDIR}/rtorrentd_at.service" "rtorrentd@.service"
+ fi
+}