Skip to content

Commit

Permalink
net-libs/rb_libtorrent
Browse files Browse the repository at this point in the history
  • Loading branch information
perfect7gentleman committed Sep 12, 2016
1 parent 6afcaf7 commit 1d24a6e
Show file tree
Hide file tree
Showing 2 changed files with 110 additions and 0 deletions.
2 changes: 2 additions & 0 deletions net-libs/rb_libtorrent/Manifest
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
DIST libtorrent-rasterbar-1.1.0.tar.gz 3629123 SHA256 2713df7da4aec5263ac11b6626ea966f368a5a8081103fd8f2f2ed97b5cd731d SHA512 5770e3b243605aabe94951f0d3774a1a928b87690c0ba9f8a093ecf90852cf1c76d29a477ab0efc4a352802ca9b405d5c00a5dcdc8d03c6c1644aabe6ad020df WHIRLPOOL 99970951cea92223a64e3e42c71c187e8d1a8fd48d30df541777f003304661da544f6c3b09d85de785e40c009ea797897497c5230a48f6fa6645b2fbef69afab
DIST libtorrent-rasterbar-1.1.1.tar.gz 3641815 SHA256 f70c82367b0980460ef95aff3e117fd4a174477892d529beec434f74d615b31f SHA512 9d2409ee733f7579df61a63e37092d3c59a386b94031bae6a7ea64ffff617131d2c347ba0825b3d337ce2fedad3b527c8f697e3b49cea643d6543c972a1ebc12 WHIRLPOOL 36c4a007e0bf684e9603cd88b594a8ff91193b7d73447375e5651f945dba713c91daf0c625f90af6bb35c2ab017ca69da50d856ac6ce6be2e13f6d04ee7b2e35
EBUILD rb_libtorrent-1.1.0.ebuild 2348 SHA256 24aa51c0ea22c9a67d26d7327a8d0017597022e938ebb2ede2d8a11ece0009db SHA512 f76b1f9b6591861e29c1ca6fa56eba55b533606b5400c4afd7c756947533cc380fc70ca4b706d529f36e79c8ec1e566b1ef92174cca6b66197cd3a0c1db8938c WHIRLPOOL b921fdca2ad5756371a819e9a1efb06ba20d2a1f01bf2bc9d3a6c67cc727f6c3df9aadd8fdedd3b927f4d25defb79d95b9aa0fec844766dc1a4b44bfce181eae
EBUILD rb_libtorrent-1.1.1.ebuild 2353 SHA256 6538cd8807456683580150527ca428f71b56a38aec8b61cb65770714a37d002e SHA512 73c151101b3ab3e7c04b49c49974e1f07e56c644360ef2503fa69c6f72ae6f48ba4b76bfe0bb7612743b792940d74007a7bb1073b92ea808e2a322ce83df32a3 WHIRLPOOL e7d15a5cc1422b1e705f535a0e87cf6da5680a62a456c5c4f50db8faf1ee758963b0caa33478893dd28b1bb4ac4d416acd942376cc53a9f4a239dd0964ea38a2
MISC metadata.xml 566 SHA256 1021f57ef19e7111be3408d57cfc2520475c530bf92830e49c33260d8b6ce225 SHA512 cbc01c47e6251d6f04522b62f8971c677bacc408cb1cbacc8f1deeb09b2d3eac785463c7da83510c063b2462e62488123f6631916fa5db540caaea9526b88e35 WHIRLPOOL 9726df0828a462b31a36dfbe035ad6bd54b3b0685e0f2f332ee724ff1ce057ecbcab662f46cf27dc3208aca2a90db751f498db3962b7b005d80666cbddb7e8d8
108 changes: 108 additions & 0 deletions net-libs/rb_libtorrent/rb_libtorrent-1.1.1.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
# 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 flag-o-matic versionator

MY_P=libtorrent-rasterbar-${PV} # TODO: rename, bug 576126
MY_PV=$(replace_all_version_separators _)

DESCRIPTION="C++ BitTorrent implementation focusing on efficiency and scalability"
HOMEPAGE="http://libtorrent.org"
SRC_URI="https://github.com/arvidn/libtorrent/releases/download/libtorrent-${MY_PV}/${MY_P}.tar.gz"

LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
IUSE="debug +dht doc examples +geoip libressl python +ssl static-libs test"

REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"

RDEPEND="
dev-libs/boost:=[threads]
virtual/libiconv
examples? ( !net-p2p/mldonkey )
python? (
${PYTHON_DEPS}
dev-libs/boost:=[python,${PYTHON_USEDEP}]
)
ssl? (
!libressl? ( dev-libs/openssl:0= )
libressl? ( dev-libs/libressl:= )
)
"
DEPEND="${RDEPEND}
sys-devel/libtool
"

S=${WORKDIR}/${MY_P}

src_prepare() {
default

# bug 578026
# prepend -L${S}/... to ensure bindings link against the lib we just built
sed -i -e "s|^|-L${S}/src/.libs |" bindings/python/compile_flags.in || die

use python && distutils-r1_src_prepare
}

src_configure() {
append-cflags -std=c11
append-cxxflags -std=c++11

local myeconfargs=(
$(use_enable debug)
$(use_enable debug logging)
$(use_enable debug disk-stats)
$(use_enable dht dht $(usex debug logging yes))
$(use_enable examples)
$(use_enable ssl encryption)
$(use_enable static-libs static)
$(use_enable test tests)
--with-libiconv
)
econf "${myeconfargs[@]}"

if use python; then
myeconfargs+=(
--enable-python-binding
--with-boost-python
)
python_configure() {
econf "${myeconfargs[@]}"
}
distutils-r1_src_configure
fi
}

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

prune_libtool_files
}

0 comments on commit 1d24a6e

Please sign in to comment.