The attached patch fixes net/libtorrent-rasterbar -current building on
Loongson. The patch contains two parts:
* Missing include of <cstdarg>. This is already applied upstream and
should ship with next point release.
(https://github.com/arvidn/libtorrent/pull/2965)
* Require "-std=c++0x" when building against boost 1.66+ due to new
interfaces in boost::asio.
diff --git a/net/libtorrent-rasterbar/Makefile
b/net/libtorrent-rasterbar/Makefile
index 594a530c97c..d19b28ba9d8 100644
--- a/net/libtorrent-rasterbar/Makefile
+++ b/net/libtorrent-rasterbar/Makefile
@@ -3,6 +3,7 @@
COMMENT = C++ library implementing a BitTorrent client
MODPY_EGG_VERSION = 1.1.7
+REVISION = 0
DISTNAME = libtorrent-rasterbar-${MODPY_EGG_VERSION}
SHARED_LIBS += torrent-rasterbar 1.0 # 9.0.0
@@ -36,7 +37,10 @@ CONFIGURE_ARGS = --enable-python-binding \
--with-libiconv
CONFIGURE_ENV += CPPFLAGS="-Wno-deprecated-declarations \
-Wno-macro-redefined \
- -pthread"
+ -pthread" \
+ PYTHON_CXXFLAGS="${PYTHON_CXXFLAGS} -std=gnu++14"
+MAKE_ENV = CC=${CC} CXX=${CXX}
+CXXFLAGS += -std=gnu++14
.ifdef DEBUG
CONFIGURE_ARGS += --enable-debug
diff --git
a/net/libtorrent-rasterbar/patches/patch-include_libtorrent_aux__session_interface_hpp
b/net/libtorrent-rasterbar/patches/patch-include_libtorrent_aux__session_interface_hpp
new file mode 100644
index 00000000000..8627fddabc0
--- /dev/null
+++
b/net/libtorrent-rasterbar/patches/patch-include_libtorrent_aux__session_interface_hpp
@@ -0,0 +1,14 @@
+$OpenBSD$
+https://github.com/arvidn/libtorrent/pull/2965
+
+--- include/libtorrent/aux_/session_interface.hpp.orig
++++ include/libtorrent/aux_/session_interface.hpp
+@@ -52,6 +52,7 @@ POSSIBILITY OF SUCH DAMAGE.
+
+ #ifndef TORRENT_DISABLE_LOGGING
+ #include <boost/shared_ptr.hpp>
++#include <cstdarg> // for va_list
+ #endif
+
+ #ifdef TORRENT_USE_OPENSSL
+
diff --git a/net/libtorrent-rasterbar/patches/patch-src_disk_io_thread_cpp
b/net/libtorrent-rasterbar/patches/patch-src_disk_io_thread_cpp
new file mode 100644
index 00000000000..602071af876
--- /dev/null
+++ b/net/libtorrent-rasterbar/patches/patch-src_disk_io_thread_cpp
@@ -0,0 +1,13 @@
+$OpenBSD$
+https://github.com/arvidn/libtorrent/pull/2965
+
+--- src/disk_io_thread.cpp.orig
++++ src/disk_io_thread.cpp
+@@ -62,6 +62,7 @@ POSSIBILITY OF SUCH DAMAGE.
+ #if __cplusplus >= 201103L || defined __clang__
+
+ #if DEBUG_DISK_THREAD
++#include <cstdarg> // for va_list
+ #define DLOG(...) debug_log(__VA_ARGS__)
+ #else
+ #define DLOG(...) do {} while(false)
diff --git a/net/libtorrent-rasterbar/patches/patch-src_session_impl_cpp
b/net/libtorrent-rasterbar/patches/patch-src_session_impl_cpp
new file mode 100644
index 00000000000..f595740b7a1
--- /dev/null
+++ b/net/libtorrent-rasterbar/patches/patch-src_session_impl_cpp
@@ -0,0 +1,14 @@
+$OpenBSD$
+https://github.com/arvidn/libtorrent/pull/2965
+
+--- src/session_impl.cpp.orig
++++ src/session_impl.cpp
+@@ -107,6 +107,8 @@ POSSIBILITY OF SUCH DAMAGE.
+ // for logging stat layout
+ #include "libtorrent/stat.hpp"
+
++#include <cstdarg> // for va_list
++
+ // for logging the size of DHT structures
+ #ifndef TORRENT_DISABLE_DHT
+ #include <libtorrent/kademlia/find_data.hpp>