all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
blob a24dbe25bbba4ff9b1498268b6107515ff191cf0 3024 bytes (raw)
name: gnu/packages/patches/telegram-desktop-unbundle-cppgir.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
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()
 

debug log:

solving a24dbe25bb ...
found a24dbe25bb in https://yhetil.org/guix/482b63aa82c0b054d34ab8e1da27a4c5421616d7.1719897489.git.i@dan.games/ ||
	https://yhetil.org/guix/055c995fc8635cfec0b73238e4632df1188c21dd.1719926171.git.i@dan.games/ ||
	https://yhetil.org/guix/f0e40bc49ca14764ce20fbc9f0b4c59307e5d484.1720972086.git.i@dan.games/ ||
	https://yhetil.org/guix/af9e08cdbed9ad3c2e6c4833afb9eed3e53d5cbd.1720364199.git.i@dan.games/ ||
	https://yhetil.org/guix/97beab597e192df73feba1ec6eda4d112b3864bf.1720012870.git.i@dan.games/

applying [1/1] https://yhetil.org/guix/482b63aa82c0b054d34ab8e1da27a4c5421616d7.1719897489.git.i@dan.games/
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

1:28: trailing whitespace.
 
1:34: trailing whitespace.
 
1:43: trailing whitespace.
 
1:48: trailing whitespace.
 
1:56: trailing whitespace.
 
Checking patch gnu/packages/patches/telegram-desktop-unbundle-cppgir.patch...
Applied patch gnu/packages/patches/telegram-desktop-unbundle-cppgir.patch cleanly.
warning: squelched 4 whitespace errors
warning: 9 lines add whitespace errors.

skipping https://yhetil.org/guix/055c995fc8635cfec0b73238e4632df1188c21dd.1719926171.git.i@dan.games/ for a24dbe25bb
skipping https://yhetil.org/guix/f0e40bc49ca14764ce20fbc9f0b4c59307e5d484.1720972086.git.i@dan.games/ for a24dbe25bb
skipping https://yhetil.org/guix/af9e08cdbed9ad3c2e6c4833afb9eed3e53d5cbd.1720364199.git.i@dan.games/ for a24dbe25bb
skipping https://yhetil.org/guix/97beab597e192df73feba1ec6eda4d112b3864bf.1720012870.git.i@dan.games/ for a24dbe25bb
index at:
100644 a24dbe25bbba4ff9b1498268b6107515ff191cf0	gnu/packages/patches/telegram-desktop-unbundle-cppgir.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.