libtorrent: update to 0.15.5
authorRosen Penev <redacted>
Tue, 1 Jul 2025 19:13:33 +0000 (12:13 -0700)
committerTianling Shen <redacted>
Wed, 2 Jul 2025 10:10:20 +0000 (18:10 +0800)
Update patches.

Signed-off-by: Rosen Penev <redacted>
libs/libtorrent/Makefile
libs/libtorrent/patches/0001-pkgconfig-fix-static-linking.patch
libs/libtorrent/patches/010-add-support-for-external-libatomic.patch

index 227fae0c5c9d4956b4cbd8d57d794c69e66e516e..de1fdde8d653317943ee8feda4b2b57565b82861 100644 (file)
@@ -8,13 +8,13 @@
 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
index b08c37991b22a387ffcb5c3c9f67bec323cc2dc6..9e53d72eaf5936d9b8ac048b048140298b2150f1 100644 (file)
@@ -14,12 +14,13 @@ Signed-off-by: Rosen Penev <rosenp@gmail.com>
 
 --- 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}
index c0aac717492104f2c8152181eb498e3cf21aa516..05048d180f492daeffe36f231405aac77c1ba095 100644 (file)
@@ -7,68 +7,22 @@ Needed on some 32-bit platforms where 64-bit atomics are provided by
 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
git clone https://git.99rst.org/PROJECT