[packages/bctoolbox] - updated to 5.4.17
qboosh
qboosh at pld-linux.org
Sun May 18 18:04:12 CEST 2025
commit 8bd58317e60df24f8eb71f84b4580d8b36bda206
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sun May 18 17:38:35 2025 +0200
- updated to 5.4.17
bctoolbox-mbedtls.patch | 39 +++++++++++++++++++++++++++++++++++++++
bctoolbox.spec | 12 +++++-------
2 files changed, 44 insertions(+), 7 deletions(-)
---
diff --git a/bctoolbox.spec b/bctoolbox.spec
index dedfdd5..4317dbd 100644
--- a/bctoolbox.spec
+++ b/bctoolbox.spec
@@ -3,22 +3,19 @@
%bcond_without dtls_srtp # DTLS SRTP support
%bcond_without static_libs # static libraries
-%if %{with dtls_srtp}
-%define mbedtls_ver 2.26.0-1
-%else
-%define mbedtls_ver 2
-%endif
+%define mbedtls_ver 3
Summary: Utility library for software from Belledonne Communications
Summary(pl.UTF-8): Biblioteka narzędziowa dla oprogramowania firmy Belledonne Communications
Name: bctoolbox
-Version: 5.3.104
+Version: 5.4.17
Release: 1
License: GPL v3+
Group: Libraries
#Source0Download: https://gitlab.linphone.org/BC/public/bctoolbox/tags
Source0: https://gitlab.linphone.org/BC/public/bctoolbox/-/archive/%{version}/%{name}-%{version}.tar.bz2
-# Source0-md5: 9e73f6c6303c285d49d0d08e18ce9a62
+# Source0-md5: c5bf3fdbbe08df0c1e28f0a927d96fff
Patch0: %{name}-decaf-shared.patch
+Patch1: %{name}-mbedtls.patch
URL: https://linphone.org/
BuildRequires: bcunit-devel >= 5.3.0
BuildRequires: cmake >= 3.22
@@ -67,6 +64,7 @@ Statyczne biblioteki bctoolbox.
%prep
%setup -q
%patch -P 0 -p1
+%patch -P 1 -p1
%build
%if %{with static_libs}
diff --git a/bctoolbox-mbedtls.patch b/bctoolbox-mbedtls.patch
new file mode 100644
index 0000000..b3b1537
--- /dev/null
+++ b/bctoolbox-mbedtls.patch
@@ -0,0 +1,39 @@
+--- bctoolbox-5.4.17/src/crypto/mbedtls.cc.orig 2025-05-15 21:28:34.000000000 +0200
++++ bctoolbox-5.4.17/src/crypto/mbedtls.cc 2025-05-18 14:15:09.222213149 +0200
+@@ -38,6 +38,7 @@
+ namespace bctoolbox {
+
+ namespace {
++#ifdef MBEDTLS_THREADING_ALT
+ // This is also defined in mbedtls source code by a custom modification
+ using mbedtls_threading_mutex_t = void *;
+
+@@ -71,6 +72,7 @@ int threading_mutex_unlock_cpp(mbedtls_t
+ static_cast<std::mutex *>(*mutex)->unlock();
+ return 0;
+ }
++#endif
+
+ class mbedtlsStaticContexts {
+ public:
+@@ -80,8 +82,10 @@ public:
+
+ std::unique_ptr<RNG> sRNG;
+ mbedtlsStaticContexts() {
++#ifdef MBEDTLS_THREADING_ALT
+ mbedtls_threading_set_alt(threading_mutex_init_cpp, threading_mutex_free_cpp, threading_mutex_lock_cpp,
+ threading_mutex_unlock_cpp);
++#endif
+ if (psa_crypto_init() != PSA_SUCCESS) {
+ bctbx_error("MbedTLS PSA init fail");
+ }
+@@ -92,7 +96,9 @@ public:
+ // before destroying mbedtls internal context, destroy the static RNG
+ sRNG = nullptr;
+ mbedtls_psa_crypto_free();
++#ifdef MBEDTLS_THREADING_ALT
+ mbedtls_threading_free_alt();
++#endif
+ }
+ };
+ static const auto mbedtlsStaticContextsInstance = std::make_unique<mbedtlsStaticContexts>();
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/bctoolbox.git/commitdiff/8bd58317e60df24f8eb71f84b4580d8b36bda206
More information about the pld-cvs-commit
mailing list