summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-07-25 05:09:40 +0100
committerSam James <sam@gentoo.org>2022-07-25 05:09:40 +0100
commit0c5ed11543045c439d0db61b76868cba1b04cddd (patch)
tree5f15c8b5a48a2772ff2f5f037de80af5ad417fc0 /net-libs/libtorrent-rasterbar/libtorrent-rasterbar-2.0.7.ebuild
parentsys-process/parallel: add 20220722 (diff)
downloadgentoo-0c5ed11543045c439d0db61b76868cba1b04cddd.tar.gz
gentoo-0c5ed11543045c439d0db61b76868cba1b04cddd.tar.bz2
gentoo-0c5ed11543045c439d0db61b76868cba1b04cddd.zip
net-libs/libtorrent-rasterbar: add 2.0.7
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-libs/libtorrent-rasterbar/libtorrent-rasterbar-2.0.7.ebuild')
-rw-r--r--net-libs/libtorrent-rasterbar/libtorrent-rasterbar-2.0.7.ebuild74
1 files changed, 74 insertions, 0 deletions
diff --git a/net-libs/libtorrent-rasterbar/libtorrent-rasterbar-2.0.7.ebuild b/net-libs/libtorrent-rasterbar/libtorrent-rasterbar-2.0.7.ebuild
new file mode 100644
index 000000000000..1e94d55e8111
--- /dev/null
+++ b/net-libs/libtorrent-rasterbar/libtorrent-rasterbar-2.0.7.ebuild
@@ -0,0 +1,74 @@
+# Copyright 2021-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..10} )
+
+inherit cmake python-single-r1
+
+DESCRIPTION="C++ BitTorrent implementation focusing on efficiency and scalability"
+HOMEPAGE="https://libtorrent.org/ https://github.com/arvidn/libtorrent"
+SRC_URI="https://github.com/arvidn/libtorrent/releases/download/v${PV}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0/2.0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="+dht debug gnutls python ssl test"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+RESTRICT="!test? ( test )"
+
+DEPEND="
+ dev-libs/boost:=[threads(+)]
+ python? (
+ ${PYTHON_DEPS}
+ $(python_gen_cond_dep '
+ dev-libs/boost[python,${PYTHON_USEDEP}]
+ ')
+ )
+ ssl? (
+ gnutls? ( net-libs/gnutls:= )
+ !gnutls? ( dev-libs/openssl:= )
+ )
+"
+RDEPEND="${DEPEND}"
+BDEPEND="python? (
+ $(python_gen_cond_dep '
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ ')
+ )"
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DCMAKE_CXX_STANDARD=17
+ -DBUILD_SHARED_LIBS=ON
+ -Dbuild_examples=OFF
+ -Ddht=$(usex dht ON OFF)
+ -Dencryption=$(usex ssl ON OFF)
+ -Dgnutls=$(usex gnutls ON OFF)
+ -Dlogging=$(usex debug ON OFF)
+ -Dpython-bindings=$(usex python ON OFF)
+ -Dbuild_tests=$(usex test ON OFF)
+ )
+
+ # We need to drop the . from the Python version to satisfy Boost's
+ # FindBoost.cmake module, bug #793038.
+ use python && mycmakeargs+=( -Dboost-python-module-name="${EPYTHON/./}" )
+
+ cmake_src_configure
+}
+
+src_test() {
+ local myctestargs=(
+ # Needs running UPnP server
+ -E "test_upnp"
+ )
+
+ # Checked out Fedora's test workarounds for inspiration
+ # https://src.fedoraproject.org/rpms/rb_libtorrent/blob/rawhide/f/rb_libtorrent.spec#_120
+ LD_LIBRARY_PATH="${BUILD_DIR}:${LD_LIBRARY_PATH}" cmake_src_test
+}