Home page: http://libtorrent.rakshasa.no/ LibTorrent is a BitTorrent library written in C++ for *nix. It is designed to avoid redundant copying and storing of data that other clients and libraries suffer from. Licensed under the GPL. Basic features have been implemented and a ncurses client is included. Sloppy and biased test runs have shown that transfering a 200 MB file with libTorrent uses 1/4 of the CPU time that the offical BitTorrent client requires. Reproducible: Always Steps to Reproduce:
Created attachment 37598 [details] libtorrent-0.3.1.ebuild This is my ebuild for libtorrent-0.3.1.
A few things: DEPEND on libsigc++ should be: >=dev-libs/libsigc++-2 What are you trying to do in src_unpack()? Do you have a client.patch somewhere? The ncurses client should be optional and only installed if the user has USE="ncurses" enabled (I assume that's what "emake -C client || die" does). I also cannot get this package to build with gcc-3.4 (I may try 3.3.3 later if I have time): g++ -DHAVE_CONFIG_H -I. -I. -I.. -O3 -g -Wall -DDEBUG -I/usr/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include -MT peer_connection.lo -MD -MP -MF .deps/peer_connection.Tpo -c peer_connection.cc -fPIC -DPIC -o .libs/peer_connection.o peer_connection.cc: In member function `virtual void torrent::PeerConnection::except()': peer_connection.cc:474: error: `errno' undeclared (first use this function) peer_connection.cc:474: error: (Each undeclared identifier is reported only once for each function it appears in.) make[2]: *** [peer_connection.lo] Error 1
Created attachment 37620 [details, diff] libtorrent-0.3.1-client.patch I have patch to client/Makefile that makes it possible the compilation of the rtorrent client. Without the patch it does not compile because it assumes that the header files and libraries are already installed. I have forgot to attach it previously. Here it is. The symbolic link created in src_unpack() also has to do with the compilation of the rtorrent client.
Created attachment 37621 [details] libtorrent-0.3.1.ebuild This new ebuild corrects the dependency on libsigc++ and makes support for ncurses (that is, the rtorrent client, which is a ncurses application) optional, based on the ncurses use flag.
Unfortunately I do not have gcc-3.4 installed for testing with it. Compilation is successfull with gcc-3.3.4.
I do not have much time to hack away on this program, but to fix the first error, in torrent/peer_connection.cc, you must: #include <cerrno> but after doing that, you get more wonderful compilation errors: g++ -DHAVE_CONFIG_H -I. -I. -I.. -O3 -g -Wall -DDEBUG -I/usr/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include -MT peer_connection_extra.lo -MD -MP -MF .deps/peer_connection_extra.Tpo -c peer_connection_extra.cc -fPIC -DPIC -o .libs/peer_connection_extra.o In file included from ../algo/container.h:4, from ../algo/algo.h:23, from peer_connection_extra.cc:5: ../algo/container_impl.h: In member function `bool algo::ContainsCond<Target, Cond>::operator()(Arg1&)': ../algo/container_impl.h:40: error: `find_if' is not a member of `std' ../algo/container_impl.h: In member function `bool algo::ContainedIn<Container,Element>::operator()(Arg1&)': ../algo/container_impl.h:54: error: `find' is not a member of `std' make[2]: *** [peer_connection_extra.lo] Error 1
<A HREF="http://libtorrent.rakshasa.no/libtorrent-0.3.2.tar.gz">http://libtorrent.rakshasa.no/libtorrent-0.3.2.tar.gz</A> I fixed the bugs mentioned here (I think). It seems gcc 3.4.0 requires functions used to be defined if they are used in templates. I haven't tested it though. Also there is now a client/Makefile2 that will let you build the client without installing the library. If there are any more problems, just poke me.
g++ -Wall -O3 -g `pkg-config --cflags sigc++-2.0` -I. -c rtorrent.cc rtorrent.cc: In function `int main(int, char**)': rtorrent.cc:170: error: `errno' undeclared (first use this function) rtorrent.cc:170: error: (Each undeclared identifier is reported only once for each function it appears in.) rtorrent.cc:170: error: `EINTR' undeclared (first use this function) make: *** [rtorrent.o] Error 1 You just need to include cerrno in rtorrent.cc and then it works fine on gcc-3.4*: --- rtorrent.cc.old 2004-08-18 13:00:42.692968144 -0500 +++ rtorrent.cc 2004-08-18 13:00:48.763045352 -0500 @@ -1,3 +1,4 @@ +#include <cerrno> #include <iostream> #include <fstream> #include <signal.h> Anyways, libtorrent-0.3.2 is now in portage with the above patch. Thanks Jose and Rakshasa :)
http://libtorrent.rakshasa.no/libtorrent-0.3.2.tar.gz is now updated with the fix to rtorrent.cc. (Didn't bother bumping the version number)
there, that works :) it's now updated in portage and the new tarball is propogating to our mirrors
Just a small bug in libtorrent-0.3.2.ebuild. Its third line reads # $Header $ Maybe it should be # $Header: $ so that it gets the header information in CVS.
oo, nice catch; don't tell the QA team or they'll serve my head on a stick to a few Alabama-haters on IRC. Oh, it's fixed in portage btw, thanks :)