diff options
Diffstat (limited to 'community/libtorrent-rasterbar/APKBUILD')
-rw-r--r-- | community/libtorrent-rasterbar/APKBUILD | 81 |
1 files changed, 46 insertions, 35 deletions
diff --git a/community/libtorrent-rasterbar/APKBUILD b/community/libtorrent-rasterbar/APKBUILD index d670a0695cb..202d8f5530a 100644 --- a/community/libtorrent-rasterbar/APKBUILD +++ b/community/libtorrent-rasterbar/APKBUILD @@ -1,62 +1,73 @@ # Contributor: August Klein <amatcoder@gmail.com> -# Maintainer: August Klein <amatcoder@gmail.com> +# Maintainer: Patrycja Rosa <alpine@ptrcnull.me> pkgname=libtorrent-rasterbar -pkgver=1.2.14 +pkgver=2.0.10 pkgrel=1 pkgdesc="Feature complete C++ bittorrent implementation" url="https://www.rasterbar.com/products/libtorrent" -arch="all !armv7 !aarch64 !x86" # on aarch64 and x86 failed to build +arch="all" license="BSD-3-Clause" -depends_dev="boost-build boost-dev openssl1.1-compat-dev python3-dev py3-setuptools automake autoconf" -makedepends="$depends_dev linux-headers" -subpackages="py3-$pkgname:_py3 $pkgname-static $pkgname-dev" -options="!check" # tests hang -source=" - https://github.com/arvidn/libtorrent/releases/download/v$pkgver/libtorrent-rasterbar-$pkgver.tar.gz - " +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" + +case "$CARCH" in +arm*|x86) + # fail to build on 32-bit + options="$options !check" + ;; +*) + ;; +esac build() { - local _py3ver=$(python3 -c 'import sys; print("{}{}".format(sys.version_info.major, sys.version_info.minor))') - PYTHON=/usr/bin/python3 \ - ./configure \ - --build=$CBUILD \ - --host=$CHOST \ - --prefix=/usr \ - --enable-tests \ - --sysconfdir=/etc \ - --mandir=/usr/share/man \ - --localstatedir=/var \ - --enable-python-binding \ - --with-boost-system=boost_python$_py3ver \ - --with-std=c++14 - make + 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="$(want_check && echo ON || echo OFF)" \ + -Dpython-bindings=ON \ + -Dpython-egg-info=ON + cmake --build build } check() { - make check + # upnp: relies on upnp networking setup + # flags: fails randomly, on 32-bit and aarch64 + # 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" + + # fails on btrfs? + tests_to_skip="$tests_to_skip|test_copy_file" + + # 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() { - make DESTDIR="$pkgdir" install - - cd bindings/python - python3 setup.py install --prefix /usr --root "$pkgdir/python" + DESTDIR=$pkgdir cmake --install build } 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" + pkgdesc="$pkgdesc (python bindings)" - rm -rfv "$pkgdir"/usr/lib/python* - mv "$pkgdir/python" "$subpkgdir" + amove usr/lib/python3* } sha512sums=" -9d23184785597a11f96e9d68ac7bd2ba73a9dbc0568c3fd81ba2f1ef2381f6ee290b48a77f1db6f7ee82aa1f6640a6a54dbfbfa7b236bb3be8a6e083dce6cd69 libtorrent-rasterbar-1.2.14.tar.gz +a6406ccdd1d0c8d42543419a3b9edca880ab85e0849bfba29e3b1bd98f9630244aa3e88110cdf95e476792c9ea87a141fcb16a8c3b3e0c44c0076ebf6f9adbee libtorrent-rasterbar-2.0.10.tar.gz " |