mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-12 14:16:55 -05:00
2b6006fc50
* 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>
95 lines
3 KiB
Diff
95 lines
3 KiB
Diff
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()
|
|
|