mirror of
https://github.com/openwrt/packages.git
synced 2025-12-10 12:41:22 +00:00
libtorrent: update to 0.15.5
Update patches. Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
committed by
Tianling Shen
parent
3fdab16a6e
commit
5a2058525a
@@ -8,13 +8,13 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=libtorrent
|
PKG_NAME:=libtorrent
|
||||||
PKG_VERSION:=0.15.3
|
PKG_VERSION:=0.15.5
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_SOURCE_PROTO:=git
|
PKG_SOURCE_PROTO:=git
|
||||||
PKG_SOURCE_URL:=https://github.com/rakshasa/libtorrent
|
PKG_SOURCE_URL:=https://github.com/rakshasa/libtorrent
|
||||||
PKG_SOURCE_VERSION:=v$(PKG_VERSION)
|
PKG_SOURCE_VERSION:=v$(PKG_VERSION)
|
||||||
PKG_MIRROR_HASH:=186058e4a965457b67d7190c1d35e1acd26d273632ca768f394be6785b433d32
|
PKG_MIRROR_HASH:=f5baa923bf45b84a2d1a8bc279815fc5d4f460e581e2d0e3070b97f134301378
|
||||||
|
|
||||||
PKG_MAINTAINER:=Rosen Penev <rosenp@gmail.com>
|
PKG_MAINTAINER:=Rosen Penev <rosenp@gmail.com>
|
||||||
PKG_LICENSE:=GPL-2.0-or-later
|
PKG_LICENSE:=GPL-2.0-or-later
|
||||||
|
|||||||
@@ -14,12 +14,13 @@ Signed-off-by: Rosen Penev <rosenp@gmail.com>
|
|||||||
|
|
||||||
--- a/libtorrent.pc.in
|
--- a/libtorrent.pc.in
|
||||||
+++ b/libtorrent.pc.in
|
+++ b/libtorrent.pc.in
|
||||||
@@ -6,6 +6,6 @@ includedir=@includedir@
|
@@ -6,7 +6,6 @@ includedir=@includedir@
|
||||||
Name: libtorrent
|
Name: libtorrent
|
||||||
Description: A BitTorrent library
|
Description: A BitTorrent library
|
||||||
Version: @VERSION@
|
Version: @VERSION@
|
||||||
|
-Requires.private: zlib, libcrypto
|
||||||
-Libs: -L${libdir} -ltorrent
|
-Libs: -L${libdir} -ltorrent
|
||||||
-Libs.Private: -lz
|
-Libs.private: @PTHREAD_LIBS@ @ATOMIC_LIBS@
|
||||||
+Requires: zlib, libcrypto
|
+Requires: zlib, libcrypto
|
||||||
+Libs: -L${libdir} -ltorrent @ATOMIC_LIBS@
|
+Libs: -L${libdir} -ltorrent @PTHREAD_LIBS@ @ATOMIC_LIBS@
|
||||||
Cflags: -I${includedir}
|
Cflags: -I${includedir}
|
||||||
|
|||||||
@@ -7,68 +7,22 @@ Needed on some 32-bit platforms where 64-bit atomics are provided by
|
|||||||
libatomic.
|
libatomic.
|
||||||
|
|
||||||
Signed-off-by: Rosen Penev <rosenp@gmail.com>
|
Signed-off-by: Rosen Penev <rosenp@gmail.com>
|
||||||
---
|
----
|
||||||
configure.ac | 3 ++-
|
--- a/scripts/check_atomic.m4
|
||||||
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
|
|
||||||
+++ b/scripts/check_atomic.m4
|
+++ b/scripts/check_atomic.m4
|
||||||
@@ -0,0 +1,38 @@
|
@@ -30,15 +30,7 @@ AC_DEFUN([CHECK_ATOMIC], [
|
||||||
+# Some versions of gcc/libstdc++ require linking with -latomic if
|
AC_LINK_IFELSE([AC_LANG_SOURCE([_CHECK_ATOMIC_testbody])],[
|
||||||
+# using the C++ atomic library.
|
AC_MSG_RESULT([yes])
|
||||||
+
|
],[
|
||||||
+# Copyright (c) 2015-2016 Tim Kosse <tim.kosse@filezilla-project.org>
|
- AC_MSG_RESULT([no])
|
||||||
+
|
ATOMIC_LIBS=-latomic
|
||||||
+# Copying and distribution of this file, with or without modification, are
|
- AC_MSG_CHECKING([whether std::atomic needs -latomic])
|
||||||
+# permitted in any medium without royalty provided the copyright notice
|
- AC_LINK_IFELSE([AC_LANG_SOURCE([_CHECK_ATOMIC_testbody])],[
|
||||||
+# and this notice are preserved. This file is offered as-is, without any
|
- AC_MSG_RESULT([yes])
|
||||||
+# warranty.
|
- ],[
|
||||||
+
|
- AC_MSG_RESULT([no])
|
||||||
+m4_define([_CHECK_ATOMIC_testbody], [[
|
- AC_MSG_FAILURE([cannot figure out how to use std::atomic])
|
||||||
+ #include <atomic>
|
- ])
|
||||||
+ #include <cstdint>
|
])
|
||||||
+
|
|
||||||
+ int main() {
|
AC_LANG_POP
|
||||||
+ 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])
|
|
||||||
+])
|
|
||||||
|
|||||||
Reference in New Issue
Block a user