include $(TOPDIR)/rules.mk
PKG_NAME:=libtorrent
-PKG_VERSION:=0.15.3
+PKG_VERSION:=0.15.5
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/rakshasa/libtorrent
PKG_SOURCE_VERSION:=v$(PKG_VERSION)
-PKG_MIRROR_HASH:=186058e4a965457b67d7190c1d35e1acd26d273632ca768f394be6785b433d32
+PKG_MIRROR_HASH:=f5baa923bf45b84a2d1a8bc279815fc5d4f460e581e2d0e3070b97f134301378
PKG_MAINTAINER:=Rosen Penev <rosenp@gmail.com>
PKG_LICENSE:=GPL-2.0-or-later
--- a/libtorrent.pc.in
+++ b/libtorrent.pc.in
-@@ -6,6 +6,6 @@ includedir=@includedir@
+@@ -6,7 +6,6 @@ includedir=@includedir@
Name: libtorrent
Description: A BitTorrent library
Version: @VERSION@
+-Requires.private: zlib, libcrypto
-Libs: -L${libdir} -ltorrent
--Libs.Private: -lz
+-Libs.private: @PTHREAD_LIBS@ @ATOMIC_LIBS@
+Requires: zlib, libcrypto
-+Libs: -L${libdir} -ltorrent @ATOMIC_LIBS@
++Libs: -L${libdir} -ltorrent @PTHREAD_LIBS@ @ATOMIC_LIBS@
Cflags: -I${includedir}
libatomic.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
----
- configure.ac | 3 ++-
- scripts/check_atomic.m4 | 46 +++++++++++++++++++++++++++++++++++++++++
- 2 files changed, 49 insertions(+), 1 deletion(-)
- create mode 100644 scripts/check_atomic.m4
-
---- a/configure.ac
-+++ b/configure.ac
-@@ -79,13 +79,14 @@ AC_ARG_ENABLE(execinfo,
- ])
-
- AX_PTHREAD
-+CHECK_ATOMIC
-
- PKG_CHECK_MODULES([CPPUNIT], [cppunit],, [no_cppunit="yes"])
- PKG_CHECK_MODULES([ZLIB], [zlib])
-
- CFLAGS="$PTHREAD_CFLAGS $ZLIB_CFLAGS $CFLAGS"
- CXXFLAGS="$PTHREAD_CFLAGS $ZLIB_CFLAGS $CXXFLAGS"
--LIBS="$PTHREAD_LIBS $ZLIB_LIBS $LIBS"
-+LIBS="$ATOMIC_LIBS $PTHREAD_LIBS $ZLIB_LIBS $LIBS"
-
- TORRENT_CHECK_OPENSSL
-
---- /dev/null
+----
+--- a/scripts/check_atomic.m4
+++ b/scripts/check_atomic.m4
-@@ -0,0 +1,38 @@
-+# Some versions of gcc/libstdc++ require linking with -latomic if
-+# using the C++ atomic library.
-+
-+# Copyright (c) 2015-2016 Tim Kosse <tim.kosse@filezilla-project.org>
-+
-+# Copying and distribution of this file, with or without modification, are
-+# permitted in any medium without royalty provided the copyright notice
-+# and this notice are preserved. This file is offered as-is, without any
-+# warranty.
-+
-+m4_define([_CHECK_ATOMIC_testbody], [[
-+ #include <atomic>
-+ #include <cstdint>
-+
-+ int main() {
-+ std::atomic<int64_t> a{};
-+
-+ int64_t v = 5;
-+ int64_t r = a.fetch_add(v);
-+ return static_cast<int>(r);
-+ }
-+]])
-+
-+AC_DEFUN([CHECK_ATOMIC], [
-+
-+ AC_LANG_PUSH(C++)
-+
-+ AC_MSG_CHECKING([whether std::atomic can be used without link library])
-+
-+ AC_LINK_IFELSE([AC_LANG_SOURCE([_CHECK_ATOMIC_testbody])],[
-+ AC_MSG_RESULT([yes])
-+ ],[
-+ ATOMIC_LIBS=-latomic
-+ ])
-+
-+ AC_LANG_POP
-+ AC_SUBST([ATOMIC_LIBS])
-+])
+@@ -30,15 +30,7 @@ AC_DEFUN([CHECK_ATOMIC], [
+ AC_LINK_IFELSE([AC_LANG_SOURCE([_CHECK_ATOMIC_testbody])],[
+ AC_MSG_RESULT([yes])
+ ],[
+- AC_MSG_RESULT([no])
+ ATOMIC_LIBS=-latomic
+- AC_MSG_CHECKING([whether std::atomic needs -latomic])
+- AC_LINK_IFELSE([AC_LANG_SOURCE([_CHECK_ATOMIC_testbody])],[
+- AC_MSG_RESULT([yes])
+- ],[
+- AC_MSG_RESULT([no])
+- AC_MSG_FAILURE([cannot figure out how to use std::atomic])
+- ])
+ ])
+
+ AC_LANG_POP