tnet-libs/rb_libtorrent: Add 1.0.9-r1 with libressl support. - parlay - yet another gentoo overlay HTML git clone https://git.parazyd.org/parlay DIR Log DIR Files DIR Refs DIR README --- DIR commit 458c8cc8e20678c3b08a1f3856648dc753038ea1 DIR parent 0f124cc6a142499b63c0572d580438da28d96b79 HTML Author: parazyd <parazyd@dyne.org> Date: Sat, 18 Jun 2016 02:29:39 +0200 net-libs/rb_libtorrent: Add 1.0.9-r1 with libressl support. Diffstat: M README.md | 2 ++ A net-libs/rb_libtorrent/Manifest | 1 + A net-libs/rb_libtorrent/rb_libtorre… | 106 ++++++++++++++++++++++++++++++ 3 files changed, 109 insertions(+), 0 deletions(-) --- DIR diff --git a/README.md b/README.md t@@ -10,6 +10,8 @@ Yet another Gentoo overlay * simplescreenrecorder * net-analyzer * ettercap +* net-libs + * rb_libtorrent * net-wireless * aircrack-ng * pixiewps DIR diff --git a/net-libs/rb_libtorrent/Manifest b/net-libs/rb_libtorrent/Manifest t@@ -0,0 +1 @@ +DIST rb_libtorrent-1.0.9.tar.gz 2977503 SHA256 f4eadcbc779edc590d0162b0188c1b179d2cc72519c3756989ef925e376ddecd SHA512 0980ebb5567310ad6f235899770cfc7a23ef754f5a8513e1baa8bbec139ff26006a6b47a1cca62e45da496b901c6646eee3dd76ab4bb5410ce3fc119e717c072 WHIRLPOOL 7c6862d9d4fbc27d6de04cba8ac605dbffafcf1b26a3519bc94964727416655450b74cb62928f27fa568dcc163c8a599ca78f080a86171b6e1283d9b794924b8 DIR diff --git a/net-libs/rb_libtorrent/rb_libtorrent-1.0.9-r1.ebuild b/net-libs/rb_libtorrent/rb_libtorrent-1.0.9-r1.ebuild t@@ -0,0 +1,106 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +PYTHON_COMPAT=( python2_7 python3_{4,5} ) +PYTHON_REQ_USE="threads" +DISTUTILS_OPTIONAL=true +DISTUTILS_IN_SOURCE_BUILD=true + +inherit autotools distutils-r1 versionator + +MY_PV=$(replace_all_version_separators '_' ) +S=${WORKDIR}/libtorrent-libtorrent-${MY_PV} + +DESCRIPTION="C++ BitTorrent implementation focusing on efficiency and scalability" +HOMEPAGE="http://libtorrent.org" +SRC_URI="https://github.com/arvidn/libtorrent/archive/libtorrent-${MY_PV}.tar.gz -> rb_libtorrent-${PV}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" +IUSE="debug +dht doc examples python +ssl libressl static-libs test" + +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +RDEPEND=" + >=dev-libs/boost-1.53:=[threads] + sys-libs/zlib + virtual/libiconv + examples? ( !net-p2p/mldonkey ) + ssl? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= ) + ) + python? ( + ${PYTHON_DEPS} + dev-libs/boost:=[python,${PYTHON_USEDEP}] + )" +DEPEND="${RDEPEND} + >=sys-devel/libtool-2.2" + +RESTRICT="test" + +src_prepare() { + default + + # make sure lib search dir points to the main `S` dir and not to python copies + sed -i "s|-L[^ ]*/src/\.libs|-L${S}/src/.libs|" \ + -- 'bindings/python/link_flags.in' || die + + # needed or else eautoreconf fails + mkdir build-aux && cp {m4,build-aux}/config.rpath || die + + eautoreconf + + use python && python_copy_sources +} + +src_configure() { + local myeconfargs=( + --disable-silent-rules # bug 441842 + --with-boost-system=mt + --with-libiconv + $(use_enable debug) + $(usex debug "--enable-logging=verbose" "") + $(use_enable dht) + $(use_enable examples) + $(use_enable ssl encryption) + $(use_enable static-libs static) + $(use_enable test tests) + ) + econf "${myeconfargs[@]}" + + python_configure() { + local myeconfargs+=( + --enable-python-binding + --with-boost-python=yes + ) + econf "${myeconfargs[@]}" + } + use python && distutils-r1_src_configure +} + +src_compile() { + default + + python_compile() { + cd "${BUILD_DIR}/../bindings/python" || die + distutils-r1_python_compile + } + use python && distutils-r1_src_compile +} + +src_install() { + use doc && HTML_DOCS+=( "${S}"/docs ) + + default + + python_install() { + cd "${BUILD_DIR}/../bindings/python" || die + distutils-r1_python_install + } + use python && distutils-r1_src_install +}