summaryrefslogtreecommitdiff
blob: 3c38404a7bd9d11b8dd44e30e414457333ad017a (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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

WANT_AUTOMAKE=1.9

inherit toolchain-funcs autotools

my_ver=${PV%%_pre*}
snap_ver=${PV##*_pre}
snap_ver=${snap_ver:6}-${snap_ver:4:2}-${snap_ver:0:4}

DESCRIPTION="Bittorrent client implemented in C++."
HOMEPAGE="http://btg.berlios.de/"
SRC_URI="http://download.berlios.de/btg/${PN}-${snap_ver}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="debug doc ncurses gtk cppunit session-saving"

DEPEND="net-libs/libtorrent_rb
	>=dev-libs/libsigc++-2
	doc? ( app-doc/doxygen )
	ncurses? ( >=sys-libs/ncurses-5 )
	gtk? ( >=dev-cpp/gtkmm-2.4 )
	cppunit? ( dev-util/cppunit )"

RDEPEND="${DEPEND}"

S="${WORKDIR}"/${PN}-${my_ver}

src_unpack() {
	unpack ${A}
	cd "${S}"

	epatch "${FILESDIR}"/${PN}-0.7-as-needed.patch
	eautomake
}

src_compile() {
	./configure \
		$(use_enable debug) \
		$(use_enable ncurses cli) \
		$(use_enable gtk gui) \
		$(use_enable cppunit) \
		$(use_enable session-saving) \
		--with-boost-iostreams=boost_iostreams-mt \
		--with-boost-filesystem=boost_filesystem-mt \
		--with-boost-thread=boost_thread-mt \
		--with-boost-date-time=boost_date_time-mt \
		--with-boost-program_options=boost_program_options-mt

	emake CXX="$(tc-getCXX)" || die
}

src_install() {
	use doc && emake doxygen
	emake DESTDIR="${D}" install || die
	dodoc AUTHORS NEWS README
}