Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 60674 - Request for new ebuild: net-libs/libtorrent-0.3.1
Summary: Request for new ebuild: net-libs/libtorrent-0.3.1
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo net-p2p team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-08-17 07:54 UTC by José Romildo Malaquias
Modified: 2004-08-18 14:08 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
libtorrent-0.3.1.ebuild (libtorrent-0.3.1.ebuild,752 bytes, text/plain)
2004-08-17 07:57 UTC, José Romildo Malaquias
Details
libtorrent-0.3.1-client.patch (libtorrent-0.3.1-client.patch,663 bytes, patch)
2004-08-17 12:23 UTC, José Romildo Malaquias
Details | Diff
libtorrent-0.3.1.ebuild (libtorrent-0.3.1.ebuild,849 bytes, text/plain)
2004-08-17 12:45 UTC, José Romildo Malaquias
Details

Note You need to log in before you can comment on or make changes to this bug.
Description José Romildo Malaquias 2004-08-17 07:54:43 UTC
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:
Comment 1 José Romildo Malaquias 2004-08-17 07:57:36 UTC
Created attachment 37598 [details]
libtorrent-0.3.1.ebuild

This is my ebuild for libtorrent-0.3.1.
Comment 2 Jon Hood (RETIRED) gentoo-dev 2004-08-17 11:27:13 UTC
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
Comment 3 José Romildo Malaquias 2004-08-17 12:23:36 UTC
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.
Comment 4 José Romildo Malaquias 2004-08-17 12:45:33 UTC
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.
Comment 5 José Romildo Malaquias 2004-08-17 12:47:41 UTC
Unfortunately I do not have gcc-3.4 installed for testing with it. Compilation is  successfull with gcc-3.3.4.
Comment 6 Jon Hood (RETIRED) gentoo-dev 2004-08-17 16:03:46 UTC
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
Comment 7 Rakshasa 2004-08-18 09:05:59 UTC
<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.
Comment 8 Jon Hood (RETIRED) gentoo-dev 2004-08-18 11:12:07 UTC
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 :)
Comment 9 Rakshasa 2004-08-18 11:56:22 UTC
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)
Comment 10 Jon Hood (RETIRED) gentoo-dev 2004-08-18 12:14:21 UTC
there, that works :) it's now updated in portage and the new tarball is propogating to our mirrors
Comment 11 José Romildo Malaquias 2004-08-18 13:28:23 UTC
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.
Comment 12 Jon Hood (RETIRED) gentoo-dev 2004-08-18 14:08:55 UTC
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 :)