aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
authordan <i@dan.games>2024-09-23 07:04:08 +0800
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2024-09-26 14:21:17 +0900
commit2b6006fc50db85a485d72da4b88d6b3d049ac29a (patch)
tree2f694862efcd1c0156ad43e0ee83dd6981784d0f /gnu/packages/patches
parentad273d44db546b0f25c8a6b45be8557ab27ae22c (diff)
downloadguix-2b6006fc50db85a485d72da4b88d6b3d049ac29a.tar
guix-2b6006fc50db85a485d72da4b88d6b3d049ac29a.tar.gz
gnu: telegram-desktop: Update to 5.5.5.
* gnu/packages/patches/telegram-desktop-allow-disable-libtgvoip.patch: Update patch file to match upstream changes. * gnu/packages/patches/webrtc-for-telegram-desktop-unbundle-libsrtp.patch: Update patch file to match upstream changes. * gnu/packages/patches/telegram-desktop-unbundle-cppgir.patch: New file. * gnu/packages/patches/telegram-desktop-unbundle-gsl.patch: New file. * gnu/local.mk (dist_patch_DATA): Register them. * gnu/packages/telegram.scm: (libyuv-for-telegram-desktop, cmake-helpers-for-telegram-desktop) (codegen-for-telegram-desktop, lib-base-for-telegram-desktop) (lib-crl-for-telegram-desktop, lib-lottie-for-telegram-desktop) (lib-qr-for-telegram-desktop, lib-storage-for-telegram-desktop) (lib-tl-for-telegram-desktop, lib-webrtc-for-telegram-desktop) (tgcalls-for-telegram-desktop, webrtc-for-telegram-desktop): Bump to submodule checkout. (cmake-helpers-for-telegram-desktop)[origin]: Add patches to unbundle gsl and cppgir. (libprisma-for-telegram-desktop): Use %telegram-version. (telegram-desktop): Update to 5.5.5. [:configure-flags]: Add disable jemalloc flag. [#:phases]<unpack-additional-sources>: Add libprisma-for-telegram-desktop. <patch-gir-ignore-paths>: New phase. <use-system-xdg-desktop-portal>: New phase. <patch-libwebview>: New phase. [native-inputs]: Add cpp-ada-url-parser, gobject-introspection and xdg-desktop-portal. [inputs]: Add boost, cppgir-for-telegram-desktop, expected-lite and remove jemalloc. Change-Id: I0ea3ea5a3e416a9d5b2b5b7b55ca1af679bc3d38 Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/telegram-desktop-allow-disable-libtgvoip.patch6
-rw-r--r--gnu/packages/patches/telegram-desktop-unbundle-cppgir.patch95
-rw-r--r--gnu/packages/patches/telegram-desktop-unbundle-gsl.patch31
-rw-r--r--gnu/packages/patches/webrtc-for-telegram-desktop-unbundle-libsrtp.patch7
4 files changed, 131 insertions, 8 deletions
diff --git a/gnu/packages/patches/telegram-desktop-allow-disable-libtgvoip.patch b/gnu/packages/patches/telegram-desktop-allow-disable-libtgvoip.patch
index a603bc9d72..1354a1e9cd 100644
--- a/gnu/packages/patches/telegram-desktop-allow-disable-libtgvoip.patch
+++ b/gnu/packages/patches/telegram-desktop-allow-disable-libtgvoip.patch
@@ -47,10 +47,9 @@ diff --git a/Telegram/SourceFiles/calls/calls_call.cpp b/Telegram/SourceFiles/ca
index 5fe9ac677..bebf48e70 100644
--- a/Telegram/SourceFiles/calls/calls_call.cpp
+++ b/Telegram/SourceFiles/calls/calls_call.cpp
-@@ -39,8 +39,10 @@ class InstanceImpl;
+@@ -39,7 +39,9 @@ class InstanceImpl;
class InstanceV2Impl;
class InstanceV2ReferenceImpl;
- class InstanceV2_4_0_0Impl;
+#ifndef TDESKTOP_DISABLE_LEGACY_TGVOIP
class InstanceImplLegacy;
void SetLegacyGlobalServerConfig(const std::string &serverConfig);
@@ -58,10 +57,9 @@ index 5fe9ac677..bebf48e70 100644
} // namespace tgcalls
namespace Calls {
-@@ -56,7 +58,9 @@ const auto Register = tgcalls::Register<tgcalls::InstanceImpl>();
+@@ -56,6 +58,8 @@ const auto Register = tgcalls::Register<tgcalls::InstanceImpl>();
const auto RegisterV2 = tgcalls::Register<tgcalls::InstanceV2Impl>();
const auto RegV2Ref = tgcalls::Register<tgcalls::InstanceV2ReferenceImpl>();
- const auto RegisterV240 = tgcalls::Register<tgcalls::InstanceV2_4_0_0Impl>();
+#ifndef TDESKTOP_DISABLE_LEGACY_TGVOIP
const auto RegisterLegacy = tgcalls::Register<tgcalls::InstanceImplLegacy>();
+#endif
diff --git a/gnu/packages/patches/telegram-desktop-unbundle-cppgir.patch b/gnu/packages/patches/telegram-desktop-unbundle-cppgir.patch
new file mode 100644
index 0000000000..a24dbe25bb
--- /dev/null
+++ b/gnu/packages/patches/telegram-desktop-unbundle-cppgir.patch
@@ -0,0 +1,95 @@
+From a5c42e07ae223d440ff11347e0cf1fd58fd383df Mon Sep 17 00:00:00 2001
+From: Nicholas Guriev <nicholas@guriev.su>
+Date: Sat, 26 Aug 2023 18:23:53 +0300
+Subject: [PATCH 1/2] Look for system-wide cppgir before fallback to the
+ bundled copy
+
+Closes: #282
+---
+ external/glib/CMakeLists.txt | 4 +++-
+ external/glib/generate_cppgir.cmake | 7 ++++++-
+ 2 files changed, 9 insertions(+), 2 deletions(-)
+
+diff --git a/external/glib/CMakeLists.txt b/external/glib/CMakeLists.txt
+index 3c6fe4be..c862705f 100644
+--- a/external/glib/CMakeLists.txt
++++ b/external/glib/CMakeLists.txt
+@@ -13,9 +13,11 @@ function(add_cppgir) # isolate scope
+ set(BUILD_EXAMPLES OFF)
+ add_subdirectory(cppgir EXCLUDE_FROM_ALL)
+ endfunction()
+-add_cppgir()
+
+ include(generate_cppgir.cmake)
++if (NOT CppGir_FOUND)
++ add_cppgir()
++endif()
+ generate_cppgir(external_glib Gio-2.0)
+
+ find_package(PkgConfig REQUIRED)
+diff --git a/external/glib/generate_cppgir.cmake b/external/glib/generate_cppgir.cmake
+index c15d3f9e..9b0a5ac8 100644
+--- a/external/glib/generate_cppgir.cmake
++++ b/external/glib/generate_cppgir.cmake
+@@ -4,6 +4,8 @@
+ # For license and copyright information please follow this link:
+ # https://github.com/desktop-app/legal/blob/master/LEGAL
+
++find_package(CppGir 2.0)
++
+ function(generate_cppgir target_name gir)
+ set(cppgir_loc ${cmake_helpers_loc}/external/glib/cppgir)
+
+@@ -17,6 +19,9 @@ function(generate_cppgir target_name gir)
+ ${cppgir_loc}/data/cppgir.ignore
+ ${cppgir_loc}/data/cppgir_unix.ignore
+ )
++ if (CppGir_FOUND)
++ set(ignore_files) # rely on default ignore list
++ endif()
+
+ set(gir_path)
+ if (IS_ABSOLUTE "${gir}")
+@@ -33,7 +38,7 @@ function(generate_cppgir target_name gir)
+ --class
+ --class-full
+ --expected
+- --ignore
++ "$<$<BOOL:${ignore_files}>:--ignore>"
+ "$<JOIN:${ignore_files},:>"
+ --output
+ ${gen_dst}
+
+From eed39522952c15f448c54290454806dd011c4996 Mon Sep 17 00:00:00 2001
+From: Nicholas Guriev <nicholas@guriev.su>
+Date: Sat, 26 Aug 2023 18:23:53 +0300
+Subject: [PATCH 2/2] Look for system-wide cppgir before fallback to the
+ bundled copy
+
+Closes: #282
+---
+ external/glib/generate_cppgir.cmake | 11 ++++++-----
+ 1 file changed, 6 insertions(+), 5 deletions(-)
+
+diff --git a/external/glib/generate_cppgir.cmake b/external/glib/generate_cppgir.cmake
+index 9b0a5ac8..2ad82277 100644
+--- a/external/glib/generate_cppgir.cmake
++++ b/external/glib/generate_cppgir.cmake
+@@ -15,11 +15,12 @@ function(generate_cppgir target_name gir)
+
+ set(gen_timestamp ${gen_dst}/${target_name}_cppgir.timestamp)
+
+- set(ignore_files
+- ${cppgir_loc}/data/cppgir.ignore
+- ${cppgir_loc}/data/cppgir_unix.ignore
+- )
+- if (CppGir_FOUND)
++ if (NOT CppGir_FOUND)
++ set(ignore_files
++ ${cppgir_loc}/data/cppgir.ignore
++ ${cppgir_loc}/data/cppgir_unix.ignore
++ )
++ else()
+ set(ignore_files) # rely on default ignore list
+ endif()
+
diff --git a/gnu/packages/patches/telegram-desktop-unbundle-gsl.patch b/gnu/packages/patches/telegram-desktop-unbundle-gsl.patch
new file mode 100644
index 0000000000..f89d326a5c
--- /dev/null
+++ b/gnu/packages/patches/telegram-desktop-unbundle-gsl.patch
@@ -0,0 +1,31 @@
+From a3ac6df0441b4caca28b1df87febc420e18942ce Mon Sep 17 00:00:00 2001
+From: Zephyr Lykos <git@mochaa.ws>
+Date: Mon, 23 Oct 2023 15:55:24 +0800
+Subject: [PATCH] Revert "Force usage of GSL fork because of a libstdc++ bug."
+
+This reverts commit 982546b169df3d479e6511425870327559b38a89.
+<https://github.com/microsoft/GSL/commit/e64c97fc2cfc11992098bb38eda932de275e3f4d>
+---
+ external/gsl/CMakeLists.txt | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/external/gsl/CMakeLists.txt b/external/gsl/CMakeLists.txt
+index 8eaf19c5..344f9488 100644
+--- a/external/gsl/CMakeLists.txt
++++ b/external/gsl/CMakeLists.txt
+@@ -7,7 +7,6 @@
+ add_library(external_gsl INTERFACE IMPORTED GLOBAL)
+ add_library(desktop-app::external_gsl ALIAS external_gsl)
+
+-#[[
+ if (DESKTOP_APP_USE_PACKAGED)
+ if (DESKTOP_APP_USE_PACKAGED_LAZY)
+ find_package(Microsoft.GSL 4.0.0 QUIET)
+@@ -20,7 +19,6 @@ if (DESKTOP_APP_USE_PACKAGED)
+ return()
+ endif()
+ endif()
+-]]
+
+ # https://gitlab.kitware.com/cmake/cmake/-/issues/25222
+ if (NOT EXISTS ${third_party_loc}/GSL/include)
diff --git a/gnu/packages/patches/webrtc-for-telegram-desktop-unbundle-libsrtp.patch b/gnu/packages/patches/webrtc-for-telegram-desktop-unbundle-libsrtp.patch
index 486f0b1aa5..3317d0a9c1 100644
--- a/gnu/packages/patches/webrtc-for-telegram-desktop-unbundle-libsrtp.patch
+++ b/gnu/packages/patches/webrtc-for-telegram-desktop-unbundle-libsrtp.patch
@@ -17,10 +17,9 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt
index af7d24c21..66bec8fdf 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -2647,6 +2647,9 @@ if (TG_OWT_USE_PROTOBUF)
- list(APPEND export_targets proto)
- endif()
-
+@@ -2647,5 +2647,8 @@ if (APPLE)
+ libyuv
+ )
+if (LIBSRTP_FOUND)
+ target_compile_definitions(tg_owt PRIVATE HAVE_LIBSRTP)
+endif()