aboutsummaryrefslogtreecommitdiffstats
path: root/community/libtorrent-rasterbar/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community/libtorrent-rasterbar/APKBUILD')
-rw-r--r--community/libtorrent-rasterbar/APKBUILD74
1 files changed, 35 insertions, 39 deletions
diff --git a/community/libtorrent-rasterbar/APKBUILD b/community/libtorrent-rasterbar/APKBUILD
index 65ea5f675cf..255ff87eb6d 100644
--- a/community/libtorrent-rasterbar/APKBUILD
+++ b/community/libtorrent-rasterbar/APKBUILD
@@ -1,50 +1,55 @@
# Contributor: August Klein <amatcoder@gmail.com>
-# Maintainer: August Klein <amatcoder@gmail.com>
+# Maintainer: Patrycja Rosa <alpine@ptrcnull.me>
pkgname=libtorrent-rasterbar
-pkgver=2.0.4
-pkgrel=1
+pkgver=2.0.10
+pkgrel=2
pkgdesc="Feature complete C++ bittorrent implementation"
url="https://www.rasterbar.com/products/libtorrent"
-arch="all !armhf" # too many test failures
+arch="all"
license="BSD-3-Clause"
-depends_dev="boost-dev openssl-dev"
-makedepends="$depends_dev cmake linux-headers python3-dev py3-setuptools"
+depends_dev="boost-dev openssl-dev>3"
+makedepends="$depends_dev cmake linux-headers python3-dev py3-setuptools samurai"
subpackages="py3-$pkgname:_py3 $pkgname-dev"
-source="
- https://github.com/arvidn/libtorrent/releases/download/v$pkgver/libtorrent-rasterbar-$pkgver.tar.gz
- boost-1.77-fix.patch
- fix-python-symbols.patch "
+source="https://github.com/arvidn/libtorrent/releases/download/v$pkgver/libtorrent-rasterbar-$pkgver.tar.gz"
+
+case "$CARCH" in
+arm*|x86)
+ # fail to build on 32-bit
+ options="$options !check"
+ ;;
+*)
+ ;;
+esac
build() {
- # disable assertions without release build type
- export CXXFLAGS="$CXXFLAGS -DNDEBUG"
- cmake -B build \
+ CXXFLAGS="$CXXFLAGS -O2 -DNDEBUG -flto=auto" \
+ cmake -B build -G Ninja \
-DCMAKE_BUILD_TYPE=None \
-DCMAKE_CXX_STANDARD=17 \
-DCMAKE_INSTALL_PREFIX=/usr \
- -Dbuild_tests=ON \
+ -Dbuild_tests="$(want_check && echo ON || echo OFF)" \
-Dpython-bindings=ON \
-Dpython-egg-info=ON
-
cmake --build build
}
check() {
- # ssl: expired cert
# upnp: relies on upnp networking setup
# flags: fails randomly, on 32-bit and aarch64
- local tests_to_skip="test_ssl|test_upnp|test_flags"
+ # remove_torrent: random failures when running multiple tests at once
+ # privacy: flaky on port allocation
+ local tests_to_skip="test_upnp|test_flags|test_remove_torrent|test_privacy"
+
+ # broken
+ tests_to_skip="$tests_to_skip|test_create_torrent"
- case "$CARCH" in
- x86)
- # url_seed: unknown failures
- # session_params: fails on builders only for x86
- tests_to_skip="$tests_to_skip|test_url_seed|test_session_params"
- ;;
- esac
+ # fails on btrfs?
+ tests_to_skip="$tests_to_skip|test_copy_file"
- export CTEST_PARALLEL_LEVEL=$JOBS # TODO: !122
- ctest --output-on-failure --test-dir build/test --exclude-regex "$tests_to_skip"
+ # flaky
+ tests_to_skip="$tests_to_skip|test_web_seed|test_url_seed|test_transfer|test_ssl"
+
+ ctest -j4 --output-on-failure --test-dir build --exclude-regex "$tests_to_skip"
}
package() {
@@ -54,24 +59,15 @@ package() {
dev() {
default_dev
- mkdir -p "$subpkgdir/usr/share"
- mv "$pkgdir/usr/share/cmake" "$subpkgdir/usr/share"
+ amove usr/share/cmake
}
_py3() {
- pkgdesc="Python3 bindings for $pkgname"
- local _py3ver=$(python3 -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")')
-
- # the python bindings are a single .so under python site-packages
- amove "usr/lib/python$_py3ver"
+ pkgdesc="$pkgdesc (python bindings)"
- # fix version string
- sed -i "s/^Version:.*/Version: $pkgver/" \
- "$subpkgdir/usr/lib/python$_py3ver/site-packages/libtorrent.egg-info/PKG-INFO"
+ amove usr/lib/python3*
}
sha512sums="
-66ce3c3369b1d2a83654727c23022d38b070b8bc3ad83b1001e2cfad945acbaa4d61990094bc758886967cd305ca2213b60b1b0523b5106c42d4701d8cff8db1 libtorrent-rasterbar-2.0.4.tar.gz
-57b8e3fed9c7e32ab777351f04810658f9802937b3760044e6f8e335665c30a7e5ffc1e5b9e0cbf32a006afd1c06768f9ac6b225527db8f19b17a9373e220186 boost-1.77-fix.patch
-3078f9dcbecba2e4e5dfdc204cf47436e786940243524810f5338352fc3ca021bd055f4d3d60cb564a0968562894dd574c0702b9e906a7e029e4f91faaf56498 fix-python-symbols.patch
+a6406ccdd1d0c8d42543419a3b9edca880ab85e0849bfba29e3b1bd98f9630244aa3e88110cdf95e476792c9ea87a141fcb16a8c3b3e0c44c0076ebf6f9adbee libtorrent-rasterbar-2.0.10.tar.gz
"