Thread (7 messages) flat view 7 messages, 1 author, 10d ago

[Buildroot] [PATCH 5/7] package/libtorrent-rasterbar: bump version to 2.1.1

From: Bernd Kuhls <hidden>
Date: 2026-09-14 19:21:47
Subsystem: the rest · Maintainer: Linus Torvalds

https://github.com/arvidn/libtorrent/blob/v2.1.1/ChangeLog

Switched to sha256 tarball hash provided by upstream.

Updated license hash due to copyright year bumps:
https://github.com/arvidn/libtorrent/commit/d3f7a363c2a413f4b3b4ddfd6cbe5a3208016b1c
https://github.com/arvidn/libtorrent/commit/fb2ab9946a130df7b5ee290ec363aa2214256e00

Added patch 0001 to fix a build error with gcc-9.3.0 detected by the
Gitlab pipelines which would be introduced by this bump.

Raised minimum gcc version to 8 to fix a build error detected by the
Gitlab pipelines which would be introduced by this bump:
/builds/bkuhls/buildroot/br-test-pkg/bootlin-aarch64-glibc-old/build/libtorrent-rasterbar-2.1.1/include/libtorrent/string_view.hpp:13:23:
 fatal error: string_view: No such file or directory

Added dependency to BR2_USE_MMU to fix a build error detected by the
Gitlab pipelines which would be introduced by this bump:
/builds/bkuhls/buildroot/br-test-pkg/bootlin-armv7m-uclibc/build/libtorrent-rasterbar-2.1.1/src/mmap.cpp:283:19:
 error: ‘::madvise’ has not been declared; did you mean ‘advise’?

Switched build system to cmake due to upstream removal of autotools:
https://github.com/arvidn/libtorrent/commit/d7db28663d3b6827c2fa8d5a44fad7c73828108a

Added new configure option webtorrent
https://github.com/arvidn/libtorrent/commit/4ef8be818fea440c921c39e5f90e5818a4749086
to disable the dependency to OpenSSL for libdatachannel:
https://github.com/paullouisageneau/libdatachannel/blob/a02b751917ac8afc8c58dc6f4461d25ff9465d48/CMakeLists.txt#L452
which was added to libtorrent-rasterbar in version 2.1.0:
https://github.com/arvidn/libtorrent/commit/8d7d82b0330f16297b21e77a5d7c355813687e16

Signed-off-by: Bernd Kuhls <redacted>
---
Gitlab pipelines passed for this patch:
https://gitlab.com/bkuhls/buildroot/-/commits/b77a022a44f3d155462477818f183e16f46593cb

 .../0001-fix-more-c-17-that-made-it-in.patch  | 53 +++++++++++++++++++
 package/libtorrent-rasterbar/Config.in        |  8 +--
 .../libtorrent-rasterbar.hash                 |  5 +-
 .../libtorrent-rasterbar.mk                   | 22 +++-----
 4 files changed, 67 insertions(+), 21 deletions(-)
 create mode 100644 package/libtorrent-rasterbar/0001-fix-more-c-17-that-made-it-in.patch
diff --git a/package/libtorrent-rasterbar/0001-fix-more-c-17-that-made-it-in.patch b/package/libtorrent-rasterbar/0001-fix-more-c-17-that-made-it-in.patch
new file mode 100644
index 0000000000..afce75b9ff
--- /dev/null
+++ b/package/libtorrent-rasterbar/0001-fix-more-c-17-that-made-it-in.patch
@@ -0,0 +1,53 @@
+From 2638789b7048e17aba7cc8674305f36bd349c795 Mon Sep 17 00:00:00 2001
+From: Bernd Kuhls <bernd@kuhls.net>
+Date: Mon, 14 Sep 2026 17:31:24 +0200
+Subject: [PATCH] fix more c++17 that made it in
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Patch was inspired by https://github.com/arvidn/libtorrent/pull/4805
+and fixes a build error with gcc-9.3.0
+
+buildroot/output/build/libtorrent-rasterbar-2.1.1/src/torrent_info.cpp:855:16:
+ error: function ‘libtorrent::torrent_info& libtorrent::torrent_info::operator=(libtorrent::torrent_info&&)’
+ defaulted on its redeclaration with an exception-specification that
+ differs from the implicit exception-specification ‘’
+
+Upstream: https://github.com/arvidn/libtorrent/pull/8869
+
+Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
+---
+ include/libtorrent/torrent_info.hpp | 2 +-
+ src/torrent_info.cpp                | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/include/libtorrent/torrent_info.hpp b/include/libtorrent/torrent_info.hpp
+index 8843179a2..add61c2d7 100644
+--- a/include/libtorrent/torrent_info.hpp
++++ b/include/libtorrent/torrent_info.hpp
+@@ -213,7 +213,7 @@ TORRENT_VERSION_NAMESPACE_4
+ 
+ 		// hidden
+ 		torrent_info& operator=(torrent_info const&) = delete;
+-		torrent_info& operator=(torrent_info&&) noexcept;
++		torrent_info& operator=(torrent_info&&);
+ 
+ 		// The file_storage object contains the information on how to map the
+ 		// pieces to files. It is separated from the torrent_info object as the
+diff --git a/src/torrent_info.cpp b/src/torrent_info.cpp
+index 0a4b90b04..6fe584c39 100644
+--- a/src/torrent_info.cpp
++++ b/src/torrent_info.cpp
+@@ -856,7 +856,7 @@ namespace {
+ TORRENT_VERSION_NAMESPACE_4
+ 
+ 	torrent_info::torrent_info(torrent_info const&) = default;
+-	torrent_info& torrent_info::operator=(torrent_info&&) noexcept = default;
++	torrent_info& torrent_info::operator=(torrent_info&&) = default;
+ 
+ #if TORRENT_ABI_VERSION < 4
+ 	void torrent_info::remap_files(file_storage const& f)
+-- 
+2.47.3
+
diff --git a/package/libtorrent-rasterbar/Config.in b/package/libtorrent-rasterbar/Config.in
index 459edc1be5..d78f9ac206 100644
--- a/package/libtorrent-rasterbar/Config.in
+++ b/package/libtorrent-rasterbar/Config.in
@@ -1,8 +1,9 @@
-comment "libtorrent-rasterbar needs a toolchain w/ C++, threads, wchar, gcc >= 4.9"
+comment "libtorrent-rasterbar needs a toolchain w/ C++, threads, wchar, gcc >= 8"
 	depends on BR2_TOOLCHAIN_SUPPORTS_VARIADIC_MI_THUNK
 	depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735
+	depends on BR2_USE_MMU
 	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || \
-		!BR2_USE_WCHAR || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
+		!BR2_USE_WCHAR || !BR2_TOOLCHAIN_GCC_AT_LEAST_8
 
 comment "libtorrent-rasterbar needs exception_ptr"
 	depends on BR2_TOOLCHAIN_SUPPORTS_VARIADIC_MI_THUNK
@@ -11,9 +12,10 @@ comment "libtorrent-rasterbar needs exception_ptr"
 config BR2_PACKAGE_LIBTORRENT_RASTERBAR
 	bool "libtorrent-rasterbar"
 	depends on BR2_INSTALL_LIBSTDCPP # boost
-	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C++11
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_8 # string_view
 	depends on BR2_TOOLCHAIN_HAS_THREADS # boost
 	depends on BR2_TOOLCHAIN_SUPPORTS_VARIADIC_MI_THUNK
+	depends on BR2_USE_MMU # madvise()
 	depends on BR2_USE_WCHAR # boost
 	depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # exception_ptr
 	select BR2_PACKAGE_BOOST
diff --git a/package/libtorrent-rasterbar/libtorrent-rasterbar.hash b/package/libtorrent-rasterbar/libtorrent-rasterbar.hash
index 6b6175d9de..19f11665e6 100644
--- a/package/libtorrent-rasterbar/libtorrent-rasterbar.hash
+++ b/package/libtorrent-rasterbar/libtorrent-rasterbar.hash
@@ -1,3 +1,4 @@
+# From https://github.com/arvidn/libtorrent/releases/tag/v2.1.1
+sha256  0f163516ecef2e3331500266751de3098835a3c3ae0c2290448046c632bc0e93  libtorrent-rasterbar-2.1.1.tar.gz
 # Locally calculated
-sha256  ccbf8e8c21dc81635de95166b498922b4725f9725a23b2cfe2a6b2fead6fb9fc  libtorrent-rasterbar-1.2.20.tar.gz
-sha256  f3a5dd1558cce616b12edad521427ec8976ce2bb0af33f7f359cfa648bf55ad8  COPYING
+sha256  f4b492afbde73d2f4e051050a619622876a13b77e7b8b6ea3ec2868a6929b31b  COPYING
diff --git a/package/libtorrent-rasterbar/libtorrent-rasterbar.mk b/package/libtorrent-rasterbar/libtorrent-rasterbar.mk
index 2cc24c487a..d71907b1be 100644
--- a/package/libtorrent-rasterbar/libtorrent-rasterbar.mk
+++ b/package/libtorrent-rasterbar/libtorrent-rasterbar.mk
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-LIBTORRENT_RASTERBAR_VERSION = 1.2.20
+LIBTORRENT_RASTERBAR_VERSION = 2.1.1
 LIBTORRENT_RASTERBAR_SITE = \
 	https://github.com/arvidn/libtorrent/releases/download/v$(LIBTORRENT_RASTERBAR_VERSION)
 LIBTORRENT_RASTERBAR_LICENSE = BSD-3-Clause
@@ -13,10 +13,7 @@ LIBTORRENT_RASTERBAR_CPE_ID_VENDOR = libtorrent
 LIBTORRENT_RASTERBAR_CPE_ID_PRODUCT = libtorrent
 LIBTORRENT_RASTERBAR_DEPENDENCIES = host-pkgconf boost
 LIBTORRENT_RASTERBAR_INSTALL_STAGING = YES
-LIBTORRENT_RASTERBAR_CONF_OPTS = \
-	--with-boost-libdir=$(STAGING_DIR)/usr/lib \
-	--disable-invariant-checks
-LIBTORRENT_RASTERBAR_CXXFLAGS = $(TARGET_CXXFLAGS) -std=c++11
+LIBTORRENT_RASTERBAR_CXXFLAGS = $(TARGET_CXXFLAGS)
 
 # Internal error, aborting at dwarf2cfi.c:2802 in connect_traces
 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58864
@@ -28,20 +25,13 @@ ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180),y)
 LIBTORRENT_RASTERBAR_CXXFLAGS += -O0
 endif
 
-LIBTORRENT_RASTERBAR_CONF_OPTS += CXXFLAGS="$(LIBTORRENT_RASTERBAR_CXXFLAGS)"
-
-ifeq ($(BR2_ENABLE_LOCALE)$(BR2_PACKAGE_LIBICONV),y)
-LIBTORRENT_RASTERBAR_DEPENDENCIES += $(if $(BR2_PACKAGE_LIBICONV),libiconv)
-LIBTORRENT_RASTERBAR_CONF_OPTS += --with-libiconv
-else
-LIBTORRENT_RASTERBAR_CONF_OPTS += --without-libiconv
-endif
+LIBTORRENT_RASTERBAR_CONF_OPTS += -DCMAKE_CXX_FLAGS="$(LIBTORRENT_RASTERBAR_CXXFLAGS)"
 
 ifeq ($(BR2_PACKAGE_OPENSSL),y)
 LIBTORRENT_RASTERBAR_DEPENDENCIES += openssl
-LIBTORRENT_RASTERBAR_CONF_OPTS += --enable-encryption
+LIBTORRENT_RASTERBAR_CONF_OPTS += -Dencryption=ON -Dwebtorrent=ON
 else
-LIBTORRENT_RASTERBAR_CONF_OPTS += --disable-encryption
+LIBTORRENT_RASTERBAR_CONF_OPTS += -Dencryption=OFF -Dwebtorrent=OFF
 endif
 
-$(eval $(autotools-package))
+$(eval $(cmake-package))
-- 
2.47.3

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help