Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 541958
Collapse All | Expand All

(-)rb_libtorrent-0.16.17-r1.ebuild (-39 / +43 lines)
Lines 1-13 Link Here
1
# Copyright 1999-2014 Gentoo Foundation
1
# Copyright 1999-2015 Gentoo Foundation
2
# Distributed under the terms of the GNU General Public License v2
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.16.17-r1.ebuild,v 1.1 2014/11/15 08:33:02 hwoarang Exp $
3
# $Header: /var/cvsroot/gentoo-x86/net-libs/rb_libtorrent/rb_libtorrent-0.16.17-r1.ebuild,v 1.1 2014/11/15 08:33:02 hwoarang Exp $
4
4
5
EAPI="5"
5
EAPI=5
6
PYTHON_DEPEND="python? 2:2.7"
6
PYTHON_COMPAT=( python{2_7,3_3,3_4} )
7
PYTHON_USE_WITH="threads"
7
PYTHON_REQ_USE="threads"
8
PYTHON_USE_WITH_OPT="python"
9
8
10
inherit multilib python versionator
9
inherit multilib python-r1 versionator
11
10
12
MY_P=${P/rb_/}
11
MY_P=${P/rb_/}
13
MY_P=${MY_P/torrent/torrent-rasterbar}
12
MY_P=${MY_P/torrent/torrent-rasterbar}
Lines 23-75 Link Here
23
IUSE="debug doc examples python ssl static-libs test"
22
IUSE="debug doc examples python ssl static-libs test"
24
RESTRICT="test"
23
RESTRICT="test"
25
24
26
DEPEND=">=dev-libs/boost-1.48:=[python?,threads(+)]
25
DEPEND=">=dev-libs/boost-1.48:=[threads]
27
	>=sys-devel/libtool-2.2
26
	>=sys-devel/libtool-2.2
28
	sys-libs/zlib
27
	sys-libs/zlib
29
	examples? ( !net-p2p/mldonkey )
28
	examples? ( !net-p2p/mldonkey )
30
	ssl? ( dev-libs/openssl )"
29
	ssl? ( dev-libs/openssl )
30
	python? (
31
		${PYTHON_DEPS}
32
		dev-libs/boost[python,${PYTHON_USEDEP}]
33
	)"
31
RDEPEND="${DEPEND}"
34
RDEPEND="${DEPEND}"
32
35
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
33
pkg_setup() {
34
	if use python; then
35
		python_set_active_version 2
36
		python_pkg_setup
37
	fi
38
}
39
36
40
src_prepare() {
37
src_prepare() {
41
	use python && python_convert_shebangs -r 2 .
38
	use python && python_copy_sources
42
}
39
}
43
40
44
src_configure() {
41
src_configure() {
45
	local myconf
42
	local myconf=(
46
43
		--disable-silent-rules # bug 441842
47
	# bug 441842
44
		$(use_enable debug)
48
	myconf="--disable-silent-rules"
45
		$(use_enable test tests)
49
46
		$(use_enable examples)
50
	# use multi-threading versions of boost libs
47
		$(use_enable ssl encryption)
51
	if has_version '>=dev-libs/boost-1.52.0-r1'; then
48
		$(use_enable static-libs static)
52
		myconf+=" --with-boost-python=boost_python-${PYTHON_ABI}"
49
		--with-boost-libdir=/usr/$(get_libdir)
53
	else
50
	)
54
		myconf+=" --with-boost-system=boost_system-mt \
51
55
			--with-boost-python=boost_python-${PYTHON_ABI}-mt"
52
	use debug && myconf+=( --enable-logging=verbose )
56
	fi
53
54
        econf "${myconf[@]}" --disable-python-binding
55
56
        if use python; then
57
                python_configure() {
58
                        run_in_build_dir econf "${myconf[@]}" --enable-python-binding --with-boost-python=boost_python-${EPYTHON#python}
59
                }
57
60
58
	local LOGGING
61
                python_foreach_impl python_configure
59
	use debug && myconf+=" --enable-logging=verbose"
62
        fi
60
61
	econf $(use_enable debug) \
62
		$(use_enable test tests) \
63
		$(use_enable examples) \
64
		$(use_enable python python-binding) \
65
		$(use_enable ssl encryption) \
66
		$(use_enable static-libs static) \
67
		--with-boost-libdir=/usr/$(get_libdir) \
68
		${myconf}
69
}
63
}
70
64
71
src_install() {
65
src_install() {
72
	emake DESTDIR="${D}" install
66
	emake DESTDIR="${D}" install
67
68
	if use python; then
69
		python_install() {
70
			emake -C "${BUILD_DIR}"/bindings/python \
71
				DESTDIR="${D}" install
72
		}
73
74
		python_foreach_impl python_install
75
	fi
76
73
	use static-libs || find "${D}" -name '*.la' -exec rm -f {} +
77
	use static-libs || find "${D}" -name '*.la' -exec rm -f {} +
74
	dodoc ChangeLog AUTHORS NEWS README
78
	dodoc ChangeLog AUTHORS NEWS README
75
	if use doc; then
79
	if use doc; then

Return to bug 541958