]> gitweb.michael.orlitzky.com - mjo-overlay.git/blob - net-libs/rb_libtorrent/rb_libtorrent-9999.ebuild
Update the copyright year in skel.ebuild.
[mjo-overlay.git] / net-libs / rb_libtorrent / rb_libtorrent-9999.ebuild
1 # Copyright 1999-2011 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.6.ebuild,v 1.5 2011/05/26 21:21:00 maekke Exp $
4
5 EAPI="2"
6 PYTHON_DEPEND="python? 2:2.6"
7 PYTHON_USE_WITH="threads"
8
9 inherit eutils versionator python subversion
10
11 MY_P=${P/rb_/}
12 MY_P=${MY_P/torrent/torrent-rasterbar}
13 S=${WORKDIR}/${MY_P}
14
15 DESCRIPTION="C++ BitTorrent implementation focusing on efficiency and scalability"
16 HOMEPAGE="http://www.rasterbar.com/products/libtorrent/"
17 ESVN_REPO_URI="https://libtorrent.svn.sourceforge.net/svnroot/libtorrent/trunk"
18
19 LICENSE="BSD"
20 SLOT="0"
21 KEYWORDS="~amd64 ~x86"
22 IUSE="debug doc examples python ssl"
23 RESTRICT="test"
24
25 DEPEND=">=dev-libs/boost-1.36[python?]
26 >=sys-devel/libtool-2.2
27 sys-libs/zlib
28 examples? ( !net-p2p/mldonkey )
29 ssl? ( dev-libs/openssl )"
30
31 RDEPEND="${DEPEND}"
32
33 pkg_setup() {
34 use python && python_set_active_version 2
35 }
36
37 src_prepare() {
38 use python && python_convert_shebangs -r 2 .
39 }
40
41 src_configure() {
42 ./autotool.sh
43
44 # use multi-threading versions of boost libs
45 local BOOST_LIBS="--with-boost-system=boost_system-mt \
46 --with-boost-filesystem=boost_filesystem-mt \
47 --with-boost-thread=boost_thread-mt \
48 --with-boost-python=boost_python-mt"
49 # detect boost version and location, bug 295474
50 BOOST_PKG="$(best_version ">=dev-libs/boost-1.34.1")"
51 BOOST_VER="$(get_version_component_range 1-2 "${BOOST_PKG/*boost-/}")"
52 BOOST_VER="$(replace_all_version_separators _ "${BOOST_VER}")"
53 BOOST_INC="/usr/include/boost-${BOOST_VER}"
54 BOOST_LIB="/usr/$(get_libdir)/boost-${BOOST_VER}"
55
56 local LOGGING
57 use debug && LOGGING="--enable-logging=verbose"
58
59 econf $(use_enable debug) \
60 $(use_enable test tests) \
61 $(use_enable examples) \
62 $(use_enable python python-binding) \
63 $(use_enable ssl encryption) \
64 --with-zlib=system \
65 ${LOGGING} \
66 --with-boost=${BOOST_INC} \
67 --with-boost-libdir=${BOOST_LIB} \
68 ${BOOST_LIBS}
69 }
70
71 src_install() {
72 emake DESTDIR="${D}" install || die 'emake install failed'
73 dodoc ChangeLog AUTHORS NEWS README || die 'dodoc failed'
74 if use doc ; then
75 dohtml docs/* || die "Could not install HTML documentation"
76 fi
77 }