aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2021-01-15 19:49:41 -0300
committerLeo <thinkabit.ukim@gmail.com>2021-01-15 19:49:59 -0300
commit33744f9f7cbe98bd86234eec73e5fba8d6c327d0 (patch)
treedf4f9cd2a2ec02757c4cd55d2356198210b7a30b
parent8691186d47797d10ad79923937d68fa2cb5f37e1 (diff)
downloadaports-33744f9f7cbe98bd86234eec73e5fba8d6c327d0.tar.gz
aports-33744f9f7cbe98bd86234eec73e5fba8d6c327d0.tar.bz2
aports-33744f9f7cbe98bd86234eec73e5fba8d6c327d0.tar.xz
testing/libtorrent-rasterbar: replace volatile source with static one
-rw-r--r--testing/libtorrent-rasterbar/APKBUILD10
-rw-r--r--testing/libtorrent-rasterbar/cxx14.patch74
2 files changed, 80 insertions, 4 deletions
diff --git a/testing/libtorrent-rasterbar/APKBUILD b/testing/libtorrent-rasterbar/APKBUILD
index ab0fc1541b..b4758c3909 100644
--- a/testing/libtorrent-rasterbar/APKBUILD
+++ b/testing/libtorrent-rasterbar/APKBUILD
@@ -6,13 +6,15 @@ pkgrel=1
pkgdesc="Feature complete C++ bittorrent implementation"
options="!check" # Tests hang on all arches
url="https://www.rasterbar.com/products/libtorrent"
-arch="all"
+arch="all !armv7"
license="BSD-3-Clause"
depends_dev="boost-dev openssl-dev python3-dev 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-fix.patch::https://github.com/arvidn/libtorrent/pull/5026.patch"
+source="
+ https://github.com/arvidn/libtorrent/releases/download/libtorrent-$pkgver/libtorrent-rasterbar-$pkgver.tar.gz
+ cxx14.patch
+ "
build() {
local _py3ver=$(python3 -c 'import sys; print("{}{}".format(sys.version_info.major, sys.version_info.minor))')
@@ -47,4 +49,4 @@ _py3() {
}
sha512sums="50f912d85eefa94c560613cf53d9a2cb00bf4ed800f15e7a43dca35dd941a931a681d1d9ac7305cde0b435bdcf7c6e76a71fbb60d95aefbdca6f982d57b3951f libtorrent-rasterbar-1.2.10.tar.gz
-a3126164ec35260f3d388471adee08e19e4e39d189c7bdaba1634f6b86ce13a3b41c9a1f3a2c9a012a03f968942257bc3226983b5260687fbbff80ab324eddfe cxx14-fix.patch"
+a3126164ec35260f3d388471adee08e19e4e39d189c7bdaba1634f6b86ce13a3b41c9a1f3a2c9a012a03f968942257bc3226983b5260687fbbff80ab324eddfe cxx14.patch"
diff --git a/testing/libtorrent-rasterbar/cxx14.patch b/testing/libtorrent-rasterbar/cxx14.patch
new file mode 100644
index 0000000000..49a6633805
--- /dev/null
+++ b/testing/libtorrent-rasterbar/cxx14.patch
@@ -0,0 +1,74 @@
+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}