summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPiotr Karbowski <slashbeast@gentoo.org>2023-02-18 21:03:18 +0100
committerPiotr Karbowski <slashbeast@gentoo.org>2023-02-18 21:03:18 +0100
commit359d3d652ccd9d809b07f87222ff47bb322da97e (patch)
treefb940e096698036cd42428e449341dfb318e3f04 /net-libs/libtorrent-rasterbar
parentmedia-video/vidcutter: snapshot version bump with py3.11; EAPI bump; PEP517. (diff)
downloadgentoo-359d3d652ccd9d809b07f87222ff47bb322da97e.tar.gz
gentoo-359d3d652ccd9d809b07f87222ff47bb322da97e.tar.bz2
gentoo-359d3d652ccd9d809b07f87222ff47bb322da97e.zip
net-libs/libtorrent-rasterbar: 1.2.18-r1 bump; EAPI bump; py3.11.
Signed-off-by: Piotr Karbowski <slashbeast@gentoo.org>
Diffstat (limited to 'net-libs/libtorrent-rasterbar')
-rw-r--r--net-libs/libtorrent-rasterbar/libtorrent-rasterbar-1.2.18-r1.ebuild70
1 files changed, 70 insertions, 0 deletions
diff --git a/net-libs/libtorrent-rasterbar/libtorrent-rasterbar-1.2.18-r1.ebuild b/net-libs/libtorrent-rasterbar/libtorrent-rasterbar-1.2.18-r1.ebuild
new file mode 100644
index 000000000000..0da40a43037d
--- /dev/null
+++ b/net-libs/libtorrent-rasterbar/libtorrent-rasterbar-1.2.18-r1.ebuild
@@ -0,0 +1,70 @@
+# Copyright 2021-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..11} )
+
+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/10"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86"
+IUSE="+dht debug python ssl test"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+RESTRICT="!test? ( test )"
+
+DEPEND="
+ dev-libs/boost:=
+ python? (
+ ${PYTHON_DEPS}
+ $(python_gen_cond_dep '
+ dev-libs/boost[python,${PYTHON_USEDEP}]
+ ')
+ )
+ ssl? ( 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=(
+ -DBUILD_SHARED_LIBS=ON
+ -Dbuild_examples=OFF
+ -Ddht=$(usex dht ON OFF)
+ -Dencryption=$(usex ssl 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=(
+ # test_upnp: 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
+ # -j1 for https://bugs.gentoo.org/854603#c1
+ LD_LIBRARY_PATH="${BUILD_DIR}:${LD_LIBRARY_PATH}" cmake_src_test -j1
+}