Skip to content
Snippets Groups Projects
Commit 5e8e1d0d authored by Wolf's avatar Wolf Committed by Leo
Browse files

testing/libtorrent-rasterbar: upgrade to 1.2.14

Since tests do not seem to hang any longer, there we re-enabled.

Due to changes in upstream's build of python binding, just copied over
python extension was not picked up by the interpret, so they are now
installed using setup.py instead of relying on make install.
parent 1d66ec3a
No related branches found
No related tags found
1 merge request!23022testing/libtorrent-rasterbar: upgrade to 1.2.14
Pipeline #87369 canceled
# Contributor: August Klein <amatcoder@gmail.com>
# Maintainer: August Klein <amatcoder@gmail.com>
pkgname=libtorrent-rasterbar
pkgver=1.2.10
pkgrel=3
pkgver=1.2.14
pkgrel=0
pkgdesc="Feature complete C++ bittorrent implementation"
options="!check" # Tests hang on all arches
url="https://www.rasterbar.com/products/libtorrent"
arch="all !armv7"
license="BSD-3-Clause"
depends_dev="boost-dev openssl-dev python3-dev automake autoconf"
depends_dev="boost-build boost-dev openssl-dev python3-dev py3-setuptools automake autoconf"
makedepends="$depends_dev linux-headers"
subpackages="py3-$pkgname:_py3 $pkgname-static $pkgname-dev"
source="
https://github.com/arvidn/libtorrent/releases/download/libtorrent-$pkgver/libtorrent-rasterbar-$pkgver.tar.gz
cxx14.patch
https://github.com/arvidn/libtorrent/releases/download/v$pkgver/libtorrent-rasterbar-$pkgver.tar.gz
"
build() {
......@@ -39,14 +37,25 @@ check() {
package() {
make DESTDIR="$pkgdir" install
cd bindings/python
python3 setup.py install --prefix /usr --root "$pkgdir/python"
}
dev() {
default_dev
mkdir -p "$subpkgdir/usr/share"
mv "$pkgdir/usr/share/cmake" "$subpkgdir/usr/share"
}
_py3() {
pkgdesc="Python3 bindings for $pkgname"
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/share/cmake/Modules "$pkgdir"/usr/lib/cmake/
mv "$pkgdir"/usr/lib/python* "$subpkgdir"/usr/lib/
rm -rfv "$pkgdir"/usr/lib/python*
mv "$pkgdir/python" "$subpkgdir"
}
sha512sums="50f912d85eefa94c560613cf53d9a2cb00bf4ed800f15e7a43dca35dd941a931a681d1d9ac7305cde0b435bdcf7c6e76a71fbb60d95aefbdca6f982d57b3951f libtorrent-rasterbar-1.2.10.tar.gz
a3126164ec35260f3d388471adee08e19e4e39d189c7bdaba1634f6b86ce13a3b41c9a1f3a2c9a012a03f968942257bc3226983b5260687fbbff80ab324eddfe cxx14.patch"
sha512sums="
9d23184785597a11f96e9d68ac7bd2ba73a9dbc0568c3fd81ba2f1ef2381f6ee290b48a77f1db6f7ee82aa1f6640a6a54dbfbfa7b236bb3be8a6e083dce6cd69 libtorrent-rasterbar-1.2.14.tar.gz
"
From 3276484d3310e69d032602634afbc1b126112d2d Mon Sep 17 00:00:00 2001
From: Nam Nguyen <namn@berkeley.edu>
Date: Thu, 14 Jan 2021 21:27:14 +0000
Subject: [PATCH] add --with-cxx-standard=14 configure switch C++ standard is
specified by 11, 14 or 17. Either AX_CXX_COMPILE_STDCXX_11 or
AX_CXX_COMPILE_STDCXX are called appropriately.
---
configure.ac | 45 ++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 44 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 0b9b0c446b..3fa925b1fa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -144,7 +144,49 @@ AS_ECHO "Checking for boost libraries:"
AX_BOOST_BASE([1.58])
-AX_CXX_COMPILE_STDCXX_11([noext], [mandatory])
+AC_ARG_WITH(
+ [cxx-standard],
+ [AS_HELP_STRING(
+ [--with-cxx-standard[=ARG]],
+ [specify C++ standard (e.g., 11, 14 or 17) [default=11]])],
+ [[ARG_CXX_STANDARD=$withval]],
+ [[ARG_CXX_STANDARD=default]]
+)
+
+AC_MSG_CHECKING([which c++ standard to use])
+if test "x${ARG_CXX_STANDARD}" = "x17" ; then
+ AX_CXX_COMPILE_STDCXX(17, [noext], [mandatory])
+elif test "x${ARG_CXX_STANDARD}" = "x14" ; then
+ AX_CXX_COMPILE_STDCXX(14, [noext], [mandatory])
+elif test "x${ARG_CXX_STANDARD}" = "x11" ; then
+ AX_CXX_COMPILE_STDCXX_11([noext], [mandatory])
+elif test "x${ARG_CXX_STANDARD}" != "xdefault" -a "${ARG_CXX_STANDARD}" -lt "11" ; then
+ dnl force 11 if user specified out of bounds, regardless of compiler default
+ ARG_CXX_STANDARD="11"
+ AX_CXX_COMPILE_STDCXX_11([noext], [mandatory])
+elif test "x${ARG_CXX_STANDARD}" != "xdefault" -a "${ARG_CXX_STANDARD}" -gt "17" ; then
+ dnl force 11 if user specified out of bounds, regardless of compiler default
+ ARG_CXX_STANDARD="11"
+ AX_CXX_COMPILE_STDCXX_11([noext], [mandatory])
+else
+ dnl nothing specified so use compiler default
+
+ echo '#include <iostream>' > cpp_standard.cpp
+ echo 'using std::cout; using std::endl; int main() { switch (__cplusplus) { case 201103L: cout << 11 << endl; break; case 201402L: cout << 14 << endl; break; case 201703L: cout << 17 << endl; break; default: cout << 1 << endl; } }' >> cpp_standard.cpp
+ ${CXX} cpp_standard.cpp -o cpp_standard
+ DEFAULT_CXX_STANDARD=`./cpp_standard`
+ echo $DEFAULT_CXX_STANDARD
+ if test "x${DEFAULT_CXX_STANDARD}" = "x17" ; then
+ ARG_CXX_STANDARD="17"
+ AX_CXX_COMPILE_STDCXX(17, [noext], [mandatory])
+ elif test "x${DEFAULT_CXX_STANDARD}" = "x14" ; then
+ ARG_CXX_STANDARD="14"
+ AX_CXX_COMPILE_STDCXX(14, [noext], [mandatory])
+ else
+ ARG_CXX_STANDARD="11"
+ AX_CXX_COMPILE_STDCXX_11([noext], [mandatory])
+ fi
+fi
AX_BOOST_SYSTEM()
AS_IF([test -z "$BOOST_SYSTEM_LIB"],
@@ -590,6 +632,7 @@ Build options:
debug build: ${ARG_ENABLE_DEBUG:-no}
invariant checks: ${ARG_ENABLE_INVARIANT:-no}
logging support: ${ARG_ENABLE_LOGGING:-yes}
+ cxx standard: ${ARG_CXX_STANDARD:-default}
Features:
encryption support: ${ARG_ENABLE_ENCRYPTION:-yes}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment