summaryrefslogtreecommitdiff
blob: 66873c4e959ca277329477a9f22e959f48d873a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

WANT_AUTOCONF="latest"
WANT_AUTOMAKE="latest"
inherit eutils autotools

MY_P="${P/rb_/}"
S="${WORKDIR}/${MY_P}"

DESCRIPTION="BitTorrent library written in C++ for *nix."
HOMEPAGE="http://www.rasterbar.com/products/libtorrent/"
SRC_URI="mirror://sourceforge/libtorrent/${MY_P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="debug"

DEPEND="dev-libs/boost
	!net-libs/libtorrent"
RDEPEND="${DEPEND}"

src_compile() {
	# If threads were used to build boost, the library files will have a suffix.
	if built_with_use "dev-libs/boost" threads || use built_with_use "dev-libs/boost" threads-only ; then
		BOOST_LIBS="--with-boost-date-time=mt --with-boost-filesystem=mt --with-boost-thread=mt --with-boost-regex=mt --with-boost-program_options=mt"
	else
		die "rb_libtorrent needs dev-libs/boost built with threads USE flag"
	fi

	econf $(use_enable debug) ${BOOST_LIBS} || die "econf failed"
	emake || die "emake failed"
}

src_install() {
	emake DESTDIR="${D}" install || die "emake install failed"
	dodoc ChangeLog AUTHORS NEWS README
}