summaryrefslogtreecommitdiff
path: root/gnu/packages/patches/telegram-desktop-unbundle-cppgir.patch
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/patches/telegram-desktop-unbundle-cppgir.patch')
-rw-r--r--gnu/packages/patches/telegram-desktop-unbundle-cppgir.patch105
1 files changed, 46 insertions, 59 deletions
diff --git a/gnu/packages/patches/telegram-desktop-unbundle-cppgir.patch b/gnu/packages/patches/telegram-desktop-unbundle-cppgir.patch
index a24dbe25bb..33edfaf193 100644
--- a/gnu/packages/patches/telegram-desktop-unbundle-cppgir.patch
+++ b/gnu/packages/patches/telegram-desktop-unbundle-cppgir.patch
@@ -1,34 +1,41 @@
-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
+Upstream-status: https://github.com/desktop-app/cmake_helpers/pull/305
+
+From fa47432aeccb2cf657a79f8e1a3af1ef0663b4c6 Mon Sep 17 00:00:00 2001
+From: dan <i@dan.games>
+Date: Sun, 12 Oct 2025 18:45:40 +0800
+Subject: [PATCH] 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(-)
+ external/glib/CMakeLists.txt | 7 ++++---
+ external/glib/generate_cppgir.cmake | 16 +++++++++++-----
+ 2 files changed, 15 insertions(+), 8 deletions(-)
diff --git a/external/glib/CMakeLists.txt b/external/glib/CMakeLists.txt
-index 3c6fe4be..c862705f 100644
+index 9b80f23..1a2e9b7 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()
+@@ -21,14 +21,15 @@ INTERFACE
+ GLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_56
+ )
- include(generate_cppgir.cmake)
+-block()
++include(generate_cppgir.cmake)
++
+if (NOT CppGir_FOUND)
-+ add_cppgir()
+ set(BUILD_TESTING OFF)
+ set(BUILD_DOC OFF)
+ set(BUILD_EXAMPLES OFF)
+ add_subdirectory(cppgir EXCLUDE_FROM_ALL)
+-endblock()
+endif()
- generate_cppgir(external_glib Gio-2.0)
- find_package(PkgConfig REQUIRED)
+-include(generate_cppgir.cmake)
+
+ if (DESKTOP_APP_GLIB2_gio-unix-2.0_VERSION VERSION_GREATER_EQUAL 2.86)
+ generate_cppgir(external_glib GioUnix-2.0)
diff --git a/external/glib/generate_cppgir.cmake b/external/glib/generate_cppgir.cmake
-index c15d3f9e..9b0a5ac8 100644
+index c4475c6..012fd52 100644
--- a/external/glib/generate_cppgir.cmake
+++ b/external/glib/generate_cppgir.cmake
@@ -4,6 +4,8 @@
@@ -40,42 +47,7 @@ index c15d3f9e..9b0a5ac8 100644
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)
+@@ -13,10 +15,14 @@ function(generate_cppgir target_name gir)
set(gen_timestamp ${gen_dst}/${target_name}_cppgir.timestamp)
@@ -83,13 +55,28 @@ index 9b0a5ac8..2ad82277 100644
- ${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()
++ set(ignare_files) # rely on default ignore list
++ endif()
+ add_custom_command(
+ OUTPUT
+@@ -28,7 +34,7 @@ function(generate_cppgir target_name gir)
+ --class
+ --class-full
+ --expected
+- --ignore
++ "$<$<BOOL:${ignore_files}>:--ignore>"
+ "$<JOIN:${ignore_files},:>"
+ --output
+ ${gen_dst}
+
+base-commit: c7e0493dea2b870fb1b8e26604201fdb9e8c1ee5
+--
+2.49.0
+