| 1 |
# Copyright 1999-2012 Gentoo Foundation |
| 2 |
# Distributed under the terms of the GNU General Public License v2 |
| 3 |
# $Header: /var/cvsroot/gentoo-x86/net-libs/rb_libtorrent/rb_libtorrent-0.15.5.ebuild,v 1.8 2012/11/03 23:14:08 hwoarang Exp $ |
| 4 |
|
| 5 |
EAPI="2" |
| 6 |
PYTHON_DEPEND="python? 2:2.6" |
| 7 |
PYTHON_USE_WITH="threads" |
| 8 |
PYTHON_USE_WITH_OPT="python" |
| 9 |
|
| 10 |
inherit eutils multilib python versionator |
| 11 |
|
| 12 |
MY_P=${P/rb_/} |
| 13 |
MY_P=${MY_P/torrent/torrent-rasterbar} |
| 14 |
S=${WORKDIR}/${MY_P} |
| 15 |
|
| 16 |
DESCRIPTION="C++ BitTorrent implementation focusing on efficiency and scalability" |
| 17 |
HOMEPAGE="http://www.rasterbar.com/products/libtorrent/" |
| 18 |
SRC_URI="http://libtorrent.googlecode.com/files/${MY_P}.tar.gz" |
| 19 |
|
| 20 |
LICENSE="BSD" |
| 21 |
SLOT="0" |
| 22 |
KEYWORDS="sparc" |
| 23 |
IUSE="debug doc examples python ssl" |
| 24 |
RESTRICT="test" |
| 25 |
|
| 26 |
DEPEND="<dev-libs/boost-1.48[python?] |
| 27 |
>=sys-devel/libtool-2.2 |
| 28 |
sys-libs/zlib |
| 29 |
examples? ( !net-p2p/mldonkey ) |
| 30 |
ssl? ( dev-libs/openssl )" |
| 31 |
|
| 32 |
RDEPEND="${DEPEND}" |
| 33 |
|
| 34 |
src_configure() { |
| 35 |
# use multi-threading versions of boost libs |
| 36 |
local BOOST_LIBS="--with-boost-system=boost_system-mt \ |
| 37 |
--with-boost-filesystem=boost_filesystem-mt \ |
| 38 |
--with-boost-thread=boost_thread-mt \ |
| 39 |
--with-boost-python=boost_python-mt" |
| 40 |
|
| 41 |
local LOGGING |
| 42 |
use debug && LOGGING="--enable-logging=verbose" |
| 43 |
|
| 44 |
econf $(use_enable debug) \ |
| 45 |
$(use_enable test tests) \ |
| 46 |
$(use_enable examples) \ |
| 47 |
$(use_enable python python-binding) \ |
| 48 |
$(use_enable ssl encryption) \ |
| 49 |
--with-zlib=system \ |
| 50 |
${LOGGING} \ |
| 51 |
${BOOST_LIBS} |
| 52 |
} |
| 53 |
|
| 54 |
src_install() { |
| 55 |
emake DESTDIR="${D}" install || die 'emake install failed' |
| 56 |
dodoc ChangeLog AUTHORS NEWS README || die 'dodoc failed' |
| 57 |
if use doc ; then |
| 58 |
dohtml docs/* || die "Could not install HTML documentation" |
| 59 |
fi |
| 60 |
} |