[packages/liblinphone] - updated to 5.1.73 (last GPL version) - patches to adapt to belle-sip, bzrtp, lime 5.2.x
qboosh
qboosh at pld-linux.org
Wed Apr 19 20:29:02 CEST 2023
commit 0e66f96e3f0ff506534eb0c9210e7fba7f8f90ab
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Wed Apr 19 20:31:37 2023 +0200
- updated to 5.1.73 (last GPL version)
- patches to adapt to belle-sip, bzrtp, lime 5.2.x
liblinphone-belle-sip.patch | 120 ++++++++++++++++++++++++++++++++++++++++++++
liblinphone-jsoncpp.patch | 56 +++++++++++++++++++++
liblinphone-lime.patch | 46 +++++++++++++++++
liblinphone-link.patch | 27 ++++++++++
liblinphone-static.patch | 14 ++++++
liblinphone.spec | 66 +++++++++++++++---------
6 files changed, 304 insertions(+), 25 deletions(-)
---
diff --git a/liblinphone.spec b/liblinphone.spec
index f765558..28bc081 100644
--- a/liblinphone.spec
+++ b/liblinphone.spec
@@ -9,30 +9,37 @@
Summary: Linphone Internet Phone libraries
Summary(pl.UTF-8): Biblioteki telefonu internetowego Linphone
Name: liblinphone
-Version: 4.5.24
+# note: 5.2.x is AGPL-licensed; see DEVEL-5.2 branch
+Version: 5.1.73
Release: 1
License: GPL v3+ or proprietary
Group: Applications/Communications
#Source0Download: https://gitlab.linphone.org/BC/public/liblinphone/-/tags
Source0: https://gitlab.linphone.org/BC/public/liblinphone/-/archive/%{version}/%{name}-%{version}.tar.bz2
-# Source0-md5: eb36559e436cd785aefec066e65ffc19
+# Source0-md5: 0c34e076a7cf1fcd53f19a17fb5403cb
Patch0: %{name}-c++-static.patch
-URL: http://www.linphone.org/technical-corner/liblinphone
+Patch1: %{name}-static.patch
+Patch2: %{name}-lime.patch
+Patch3: %{name}-jsoncpp.patch
+Patch4: %{name}-link.patch
+Patch5: %{name}-belle-sip.patch
+URL: https://www.linphone.org/technical-corner/liblinphone
# base and tester components
-BuildRequires: bctoolbox-devel >= 0.0.3
+BuildRequires: bctoolbox-devel >= 5.2
BuildRequires: belcard-devel >= 4.5.20-1
-BuildRequires: belle-sip-devel >= 4.5.20-1
-BuildRequires: belr-devel >= 4.5.15-1
-%{?with_zrtp:BuildRequires: bzrtp-devel >= 4.5.15-1}
+BuildRequires: belle-sip-devel >= 5.1
+BuildRequires: belr-devel >= 5.1
+%{?with_zrtp:BuildRequires: bzrtp-devel >= 5.2}
BuildRequires: cmake >= 3.1
BuildRequires: doxygen
+BuildRequires: jsoncpp-devel
BuildRequires: libsoci-devel >= 4.0
BuildRequires: libsoci-sqlite3-devel >= 4.0
BuildRequires: libstdc++-devel >= 6:5
BuildRequires: libxml2-devel >= 2.0
-%{?with_lime:BuildRequires: lime-devel}
-BuildRequires: mediastreamer-devel >= 4.5.22-1
-BuildRequires: ortp-devel >= 4.5.15-1
+%{?with_lime:BuildRequires: lime-devel >= 5.2}
+BuildRequires: mediastreamer-devel >= 5.1.72-2
+BuildRequires: ortp-devel >= 5.1
BuildRequires: pkgconfig
BuildRequires: python3 >= 1:3
# to generate C++ wrappers
@@ -45,12 +52,13 @@ BuildRequires: udev-devel
BuildRequires: xerces-c-devel
BuildRequires: zlib-devel >= 1.2.3
Requires(post,postun): /sbin/ldconfig
-Requires: bctoolbox >= 0.0.3
-Requires: belle-sip >= 4.5
-Requires: belr >= 4.5
-%{?with_zrtp:Requires: bzrtp >= 4.5}
-Requires: mediastreamer >= 4.5
-Requires: ortp >= 4.5
+Requires: bctoolbox >= 5.2
+Requires: belle-sip >= 5.1
+Requires: belr >= 5.1
+%{?with_zrtp:Requires: bzrtp >= 5.2}
+%{?with_lime:Requires: lime >= 5.2}
+Requires: mediastreamer >= 5.1.72-2
+Requires: ortp >= 5.1
Requires: sqlite3 >= 3.7.0
Requires: zlib >= 1.2.3
Obsoletes: linphone-libs < 4
@@ -80,15 +88,16 @@ Summary: Header files for Linphone library
Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Linphone
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
-Requires: bctoolbox-devel >= 0.0.3
-Requires: belle-sip-devel >= 4.5.20-1
-Requires: belr-devel >= 4.5.15-1
-%{?with_zrtp:Requires: bzrtp-devel >= 4.5.15-1}
+Requires: bctoolbox-devel >= 5.2
+Requires: belle-sip-devel >= 5.1
+Requires: belr-devel >= 5.1
+%{?with_zrtp:Requires: bzrtp-devel >= 5.2}
+Requires: jsoncpp-devel
Requires: libstdc++-devel >= 6:5
Requires: libxml2-devel >= 2.0
-%{?with_lime:Requires: lime-devel}
-Requires: mediastreamer-devel >= 4.5.22-1
-Requires: ortp-devel >= 4.5.15-1
+%{?with_lime:Requires: lime-devel >= 5.2}
+Requires: mediastreamer-devel >= 5.1.72-2
+Requires: ortp-devel >= 5.1
Requires: sqlite3-devel >= 3.7.0
Requires: zlib-devel >= 1.2.3
Obsoletes: linphone-devel < 4
@@ -195,6 +204,11 @@ pochodzącego z GNOME.
%prep
%setup -q
%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
+%patch5 -p1
%build
install -d builddir
@@ -224,14 +238,15 @@ rm -rf $RPM_BUILD_ROOT
%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/liblinphone_tester
# packaged as %doc
-%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/liblinphone-4.5.0
+%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/liblinphone-5.1.0
# omitted by cmake install
install -d $RPM_BUILD_ROOT%{_mandir}/{man1,cs/man1}
cp -p share/C/{linphonec,linphonecsh}.1 $RPM_BUILD_ROOT%{_mandir}/man1
cp -p share/cs/linphonec.1 $RPM_BUILD_ROOT%{_mandir}/cs/man1
-# missing in 4.x
+# missing in 4+
+[ ! -d $RPM_BUILD_ROOT%{_pkgconfigdir} ] || exit 1
install -d $RPM_BUILD_ROOT%{_pkgconfigdir}
cat >>$RPM_BUILD_ROOT%{_pkgconfigdir}/linphone.pc <<'EOF'
prefix=%{_prefix}
@@ -279,6 +294,7 @@ rm -rf $RPM_BUILD_ROOT
%attr(755,root,root) %{_bindir}/lp-test-ecc
%attr(755,root,root) %{_libdir}/liblinphone.so.10
%{_datadir}/belr/grammars/cpim_grammar
+%{_datadir}/belr/grammars/ics_grammar
%{_datadir}/belr/grammars/identity_grammar
%{_datadir}/linphone
%{_datadir}/sounds/linphone
diff --git a/liblinphone-belle-sip.patch b/liblinphone-belle-sip.patch
new file mode 100644
index 0000000..f647b85
--- /dev/null
+++ b/liblinphone-belle-sip.patch
@@ -0,0 +1,120 @@
+--- liblinphone-5.1.73/tester/call_secure_tester.c.orig 2022-12-06 10:47:26.000000000 +0100
++++ liblinphone-5.1.73/tester/call_secure_tester.c 2023-04-19 16:22:22.531145554 +0200
+@@ -839,8 +839,8 @@ static bool_t setup_dtls_srtp(LinphoneCo
+ path = bc_tester_file("certificates-pauline");
+ linphone_core_set_user_certificates_path(pauline->lc, path);
+ bc_free(path);
+- belle_sip_mkdir(linphone_core_get_user_certificates_path(marie->lc));
+- belle_sip_mkdir(linphone_core_get_user_certificates_path(pauline->lc));
++ bctbx_mkdir(linphone_core_get_user_certificates_path(marie->lc));
++ bctbx_mkdir(linphone_core_get_user_certificates_path(pauline->lc));
+ return TRUE;
+ }
+
+--- liblinphone-5.1.73/tester/call_single_tester.c.orig 2022-12-06 10:47:26.000000000 +0100
++++ liblinphone-5.1.73/tester/call_single_tester.c 2023-04-19 16:40:52.125654367 +0200
+@@ -3319,8 +3319,8 @@ static void _call_base_with_configfile(L
+ path = bc_tester_file("certificates-pauline");
+ linphone_core_set_user_certificates_path(pauline->lc, path);
+ bc_free(path);
+- belle_sip_mkdir(linphone_core_get_user_certificates_path(marie->lc));
+- belle_sip_mkdir(linphone_core_get_user_certificates_path(pauline->lc));
++ bctbx_mkdir(linphone_core_get_user_certificates_path(marie->lc));
++ bctbx_mkdir(linphone_core_get_user_certificates_path(pauline->lc));
+ }
+
+ if (policy == LinphonePolicyUseIce) {
+--- liblinphone-5.1.73/tester/call_with_rtp_bundle_tester.c.orig 2022-12-06 10:47:26.000000000 +0100
++++ liblinphone-5.1.73/tester/call_with_rtp_bundle_tester.c 2023-04-19 16:41:32.125254370 +0200
+@@ -54,8 +54,8 @@ static bool_t setup_dtls_srtp(LinphoneCo
+ path = bc_tester_file("certificates-pauline");
+ linphone_core_set_user_certificates_path(pauline->lc, path);
+ bc_free(path);
+- belle_sip_mkdir(linphone_core_get_user_certificates_path(marie->lc));
+- belle_sip_mkdir(linphone_core_get_user_certificates_path(pauline->lc));
++ bctbx_mkdir(linphone_core_get_user_certificates_path(marie->lc));
++ bctbx_mkdir(linphone_core_get_user_certificates_path(pauline->lc));
+ return TRUE;
+ }
+
+--- liblinphone-5.1.73/tester/stun_tester.c.orig 2022-12-06 10:47:26.000000000 +0100
++++ liblinphone-5.1.73/tester/stun_tester.c 2023-04-19 16:42:26.544235453 +0200
+@@ -204,8 +204,8 @@ static void ice_turn_call_base(const Cal
+ path = bc_tester_file("certificates-pauline");
+ linphone_core_set_user_certificates_path(pauline->lc, path);
+ bc_free(path);
+- belle_sip_mkdir(linphone_core_get_user_certificates_path(marie->lc));
+- belle_sip_mkdir(linphone_core_get_user_certificates_path(pauline->lc));
++ bctbx_mkdir(linphone_core_get_user_certificates_path(marie->lc));
++ bctbx_mkdir(linphone_core_get_user_certificates_path(pauline->lc));
+ }
+ }
+
+@@ -459,8 +459,8 @@ static void _ice_turn_dtls_call(const Ca
+ path = bc_tester_file("certificates-pauline");
+ linphone_core_set_user_certificates_path(pauline->lc, path);
+ bc_free(path);
+- belle_sip_mkdir(linphone_core_get_user_certificates_path(marie->lc));
+- belle_sip_mkdir(linphone_core_get_user_certificates_path(pauline->lc));
++ bctbx_mkdir(linphone_core_get_user_certificates_path(marie->lc));
++ bctbx_mkdir(linphone_core_get_user_certificates_path(pauline->lc));
+ }
+ }
+
+--- liblinphone-5.1.73/tester/call_video_tester.cpp.orig 2022-12-06 10:47:26.000000000 +0100
++++ liblinphone-5.1.73/tester/call_video_tester.cpp 2023-04-19 16:44:56.913445918 +0200
+@@ -619,8 +619,8 @@ void video_call_base_2(LinphoneCoreManag
+ path = bc_tester_file("certificates-pauline");
+ linphone_core_set_user_certificates_path(caller->lc, path);
+ bc_free(path);
+- belle_sip_mkdir(linphone_core_get_user_certificates_path(callee->lc));
+- belle_sip_mkdir(linphone_core_get_user_certificates_path(caller->lc));
++ bctbx_mkdir(linphone_core_get_user_certificates_path(callee->lc));
++ bctbx_mkdir(linphone_core_get_user_certificates_path(caller->lc));
+ }
+
+ linphone_core_set_media_encryption(callee->lc,mode);
+@@ -742,8 +742,8 @@ void video_call_base_3(LinphoneCoreManag
+ path = bc_tester_file("certificates-pauline");
+ linphone_core_set_user_certificates_path(caller->lc, path);
+ bc_free(path);
+- belle_sip_mkdir(linphone_core_get_user_certificates_path(callee->lc));
+- belle_sip_mkdir(linphone_core_get_user_certificates_path(caller->lc));
++ bctbx_mkdir(linphone_core_get_user_certificates_path(callee->lc));
++ bctbx_mkdir(linphone_core_get_user_certificates_path(caller->lc));
+ }
+
+ linphone_core_set_media_encryption(callee->lc,mode);
+--- liblinphone-5.1.73/tester/call_ice_tester.cpp.orig 2022-12-06 10:47:26.000000000 +0100
++++ liblinphone-5.1.73/tester/call_ice_tester.cpp 2023-04-19 16:52:40.218235966 +0200
+@@ -558,7 +558,7 @@ static void call_paused_resumed_with_ice
+ char *path = bc_tester_file("certificates-marie");
+ linphone_core_set_user_certificates_path(marie->lc, path);
+ bc_free(path);
+- belle_sip_mkdir(linphone_core_get_user_certificates_path(marie->lc));
++ bctbx_mkdir(linphone_core_get_user_certificates_path(marie->lc));
+ }
+ }
+
+@@ -568,7 +568,7 @@ static void call_paused_resumed_with_ice
+ char *path = bc_tester_file("certificates-pauline");
+ linphone_core_set_user_certificates_path(pauline->lc, path);
+ bc_free(path);
+- belle_sip_mkdir(linphone_core_get_user_certificates_path(pauline->lc));
++ bctbx_mkdir(linphone_core_get_user_certificates_path(pauline->lc));
+ }
+ }
+
+--- liblinphone-5.1.73/tester/capability_negotiation_tester.cpp.orig 2022-12-06 10:47:26.000000000 +0100
++++ liblinphone-5.1.73/tester/capability_negotiation_tester.cpp 2023-04-19 17:11:27.896420462 +0200
+@@ -220,8 +220,8 @@ void encrypted_call_with_params_base(Lin
+ path = bc_tester_file("certificates-pauline");
+ linphone_core_set_user_certificates_path(caller->lc, path);
+ bc_free(path);
+- belle_sip_mkdir(linphone_core_get_user_certificates_path(callee->lc));
+- belle_sip_mkdir(linphone_core_get_user_certificates_path(caller->lc));
++ bctbx_mkdir(linphone_core_get_user_certificates_path(callee->lc));
++ bctbx_mkdir(linphone_core_get_user_certificates_path(caller->lc));
+
+ stats caller_stat = caller->stat;
+ stats callee_stat = callee->stat;
diff --git a/liblinphone-jsoncpp.patch b/liblinphone-jsoncpp.patch
new file mode 100644
index 0000000..37ad0c7
--- /dev/null
+++ b/liblinphone-jsoncpp.patch
@@ -0,0 +1,56 @@
+--- liblinphone-5.1.73/src/CMakeLists.txt.orig 2023-04-16 20:23:18.411880391 +0200
++++ liblinphone-5.1.73/src/CMakeLists.txt 2023-04-17 17:01:13.969495158 +0200
+@@ -31,11 +31,7 @@ set(PUBLIC_LINK_LIBS
+ )
+
+ if (ENABLE_FLEXIAPI)
+- if (XCODE)
+- list(APPEND LINK_LIBS jsoncpp_static)
+- else()
+- list(APPEND LINK_LIBS jsoncpp_object)
+- endif()
++ list(APPEND LINK_LIBS jsoncpp_lib)
+ endif()
+
+ #APPLE_LIBS is mandatory for apple compilation
+@@ -618,11 +614,7 @@ if(ENABLE_STATIC)
+ )
+
+ if (ENABLE_FLEXIAPI)
+- if (XCODE)
+- target_link_libraries(linphone-static PRIVATE jsoncpp_static)
+- else()
+- target_link_libraries(linphone-static PRIVATE jsoncpp_object)
+- endif()
++ target_link_libraries(linphone-static PRIVATE jsoncpp_lib)
+ endif()
+
+ if (APPLE)
+@@ -673,11 +665,7 @@ if(ENABLE_SHARED)
+ )
+
+ if (ENABLE_FLEXIAPI)
+- if (XCODE)
+- target_link_libraries(linphone PRIVATE jsoncpp_static)
+- else()
+- target_link_libraries(linphone PRIVATE jsoncpp_object)
+- endif()
++ target_link_libraries(linphone PRIVATE jsoncpp_lib)
+ endif()
+
+ if(APPLE)
+--- liblinphone-5.1.73/tester/CMakeLists.txt.orig 2022-12-06 10:47:26.000000000 +0100
++++ liblinphone-5.1.73/tester/CMakeLists.txt 2023-04-19 16:37:14.557171234 +0200
+@@ -31,11 +31,7 @@ set(OTHER_LIBS_FOR_TESTER
+ )
+
+ if (ENABLE_FLEXIAPI)
+- if (XCODE)
+- list(APPEND OTHER_LIBS_FOR_TESTER jsoncpp_static)
+- else()
+- list(APPEND OTHER_LIBS_FOR_TESTER jsoncpp_object)
+- endif()
++ list(APPEND OTHER_LIBS_FOR_TESTER jsoncpp_lib)
+ endif()
+
+ if(INTL_FOUND)
diff --git a/liblinphone-lime.patch b/liblinphone-lime.patch
new file mode 100644
index 0000000..ce97c69
--- /dev/null
+++ b/liblinphone-lime.patch
@@ -0,0 +1,46 @@
+--- liblinphone-5.1.73/src/chat/encryption/encryption-engine.h.orig 2022-12-06 10:47:26.000000000 +0100
++++ liblinphone-5.1.73/src/chat/encryption/encryption-engine.h 2023-04-16 20:10:46.962618008 +0200
+@@ -117,7 +117,6 @@ public:
+ ) { return nullptr; }
+
+ virtual void cleanDb () {}
+- virtual void update () {}
+ virtual EngineType getEngineType () { return EngineType::Undefined; }
+ virtual AbstractChatRoom::SecurityLevel getSecurityLevel (const std::string &deviceId) const { return AbstractChatRoom::SecurityLevel::ClearText; }
+ virtual std::list<EncryptionParameter> getEncryptionParameters () { return std::list<EncryptionParameter>(); }
+--- liblinphone-5.1.73/src/chat/encryption/lime-x3dh-encryption-engine.h.orig 2022-12-06 10:47:26.000000000 +0100
++++ liblinphone-5.1.73/src/chat/encryption/lime-x3dh-encryption-engine.h 2023-04-16 20:13:13.605156910 +0200
+@@ -150,7 +150,7 @@ public:
+ AbstractChatRoom::SecurityLevel getSecurityLevel (const std::string &deviceId) const override;
+ EncryptionEngine::EngineType getEngineType () override;
+ std::list<EncryptionParameter> getEncryptionParameters () override;
+- void update () override;
++ void update (const std::string &localDeviceId);
+ void cleanDb () override;
+
+ // CoreListener overrides
+--- liblinphone-5.1.73/src/chat/encryption/lime-x3dh-encryption-engine.cpp.orig 2023-04-16 20:22:27.455489779 +0200
++++ liblinphone-5.1.73/src/chat/encryption/lime-x3dh-encryption-engine.cpp 2023-04-16 20:22:29.815476994 +0200
+@@ -501,11 +501,11 @@ ChatMessageModifier::Result LimeX3dhEncr
+ return ChatMessageModifier::Result::Done;
+ }
+
+-void LimeX3dhEncryptionEngine::update () {
++void LimeX3dhEncryptionEngine::update (const std::string &localDeviceId) {
+ lime::limeCallback callback = setLimeCallback("Keys update");
+
+ LinphoneConfig *lpconfig = linphone_core_get_config(getCore()->getCCore());
+- limeManager->update(callback);
++ limeManager->update(localDeviceId, callback);
+ linphone_config_set_int(lpconfig, "lime", "last_update_time", (int)lastLimeUpdate);
+ }
+
+@@ -966,7 +966,7 @@ void LimeX3dhEncryptionEngine::onRegistr
+ // update keys if necessary
+ int limeUpdateThreshold = linphone_config_get_int(lpconfig, "lime", "lime_update_threshold", 86400); // 24 hours = 86400 s
+ if (ms_time(NULL) - lastLimeUpdate > limeUpdateThreshold) {
+- update();
++ update(localDeviceId);
+ lastLimeUpdate = ms_time(NULL);
+ }
+ }
diff --git a/liblinphone-link.patch b/liblinphone-link.patch
new file mode 100644
index 0000000..3ce258a
--- /dev/null
+++ b/liblinphone-link.patch
@@ -0,0 +1,27 @@
+--- liblinphone-5.1.73/CMakeLists.txt.orig 2022-12-06 10:47:26.000000000 +0100
++++ liblinphone-5.1.73/CMakeLists.txt 2023-04-17 21:09:43.248724660 +0200
+@@ -96,10 +96,10 @@ if(CMAKE_BUILD_TYPE STREQUAL "Debug")
+ add_definitions("-DDEBUG")
+ endif()
+
+-if(ENABLE_STATIC)
+- set(LINPHONE_LIBS_FOR_TOOLS linphone-static)
+-else()
++if(ENABLE_SHARED)
+ set(LINPHONE_LIBS_FOR_TOOLS linphone)
++else()
++ set(LINPHONE_LIBS_FOR_TOOLS linphone-static)
+ endif()
+ if(WIN32 AND NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
+ list(APPEND LINPHONE_LIBS_FOR_TOOLS "Ws2_32" "Iphlpapi")
+--- liblinphone-5.1.73/src/CMakeLists.txt.orig 2023-04-17 18:17:25.881393652 +0200
++++ liblinphone-5.1.73/src/CMakeLists.txt 2023-04-17 18:45:03.992410894 +0200
+@@ -24,6 +24,8 @@ set(LINK_LIBS
+ bctoolbox
+ ${BELLESIP_TARGETNAME}
+ belr
++ bzrtp
++ mediastreamer
+ )
+ set(PUBLIC_LINK_LIBS
+ ortp
diff --git a/liblinphone-static.patch b/liblinphone-static.patch
new file mode 100644
index 0000000..a88c45d
--- /dev/null
+++ b/liblinphone-static.patch
@@ -0,0 +1,14 @@
+--- liblinphone-5.1.73/src/CMakeLists.txt.orig 2023-04-13 16:13:26.000000000 +0200
++++ liblinphone-5.1.73/src/CMakeLists.txt 2023-04-16 18:53:47.034312975 +0200
+@@ -617,9 +617,9 @@ if(ENABLE_STATIC)
+
+ if (ENABLE_FLEXIAPI)
+ if (XCODE)
+- target_link_libraries(linphone PRIVATE jsoncpp_static)
++ target_link_libraries(linphone-static PRIVATE jsoncpp_static)
+ else()
+- target_link_libraries(linphone PRIVATE jsoncpp_object)
++ target_link_libraries(linphone-static PRIVATE jsoncpp_object)
+ endif()
+ endif()
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/liblinphone.git/commitdiff/0e66f96e3f0ff506534eb0c9210e7fba7f8f90ab
More information about the pld-cvs-commit
mailing list