summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net-libs/libtorrent-rasterbar/libtorrent-rasterbar-scm.ebuild106
-rw-r--r--net-libs/libtorrent-rasterbar/metadata.xml16
2 files changed, 122 insertions, 0 deletions
diff --git a/net-libs/libtorrent-rasterbar/libtorrent-rasterbar-scm.ebuild b/net-libs/libtorrent-rasterbar/libtorrent-rasterbar-scm.ebuild
new file mode 100644
index 0000000..8329897
--- /dev/null
+++ b/net-libs/libtorrent-rasterbar/libtorrent-rasterbar-scm.ebuild
@@ -0,0 +1,106 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
+PYTHON_REQ_USE="threads"
+DISTUTILS_OPTIONAL=true
+DISTUTILS_IN_SOURCE_BUILD=true
+
+inherit distutils-r1 flag-o-matic versionator git-r3
+
+#MY_PV=$(replace_all_version_separators _)
+
+DESCRIPTION="C++ BitTorrent implementation focusing on efficiency and scalability"
+HOMEPAGE="http://libtorrent.org"
+SRC_URI=""
+EGIT_REPO_URI="https://github.com/arvidn/libtorrent.git"
+
+LICENSE="BSD"
+SLOT="0/9"
+KEYWORDS=""
+IUSE="debug +dht doc examples 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
+"
+
+src_prepare() {
+ ./autotool.sh
+ 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/link_flags.in || die
+
+ # prepend -I${S}/... to ensure bindings use the right headers
+ sed -i -e "s|^|-I${S}/src/include |" bindings/python/compile_flags.in || die
+
+ use python && distutils-r1_src_prepare
+}
+
+src_configure() {
+ append-cxxflags -std=c++11 # bug 634506
+
+ 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
+ python_configure() {
+ econf "${myeconfargs[@]}" \
+ --enable-python-binding \
+ --with-boost-python="${EPYTHON#python}"
+ }
+ 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
+
+ find "${D}" -name '*.la' -delete || die
+}
diff --git a/net-libs/libtorrent-rasterbar/metadata.xml b/net-libs/libtorrent-rasterbar/metadata.xml
new file mode 100644
index 0000000..7cac58e
--- /dev/null
+++ b/net-libs/libtorrent-rasterbar/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>hwoarang@gentoo.org</email>
+ <name>Markos Chandras</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="google-code">libtorrent</remote-id>
+ <remote-id type="sourceforge">libtorrent</remote-id>
+ <remote-id type="github">arvidn/libtorrent</remote-id>
+ </upstream>
+ <use>
+ <flag name="dht">Enable DHT (distributed hash table) support</flag>
+ </use>
+</pkgmetadata>