unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#71897] [PATCH 1/2] gnu: Add cppgir.
@ 2024-07-02  5:18 dan
  2024-07-02  5:26 ` [bug#71897] [PATCH 2/2] gnu: telegram-desktop: Update to 5.1.7 dan
                   ` (11 more replies)
  0 siblings, 12 replies; 98+ messages in thread
From: dan @ 2024-07-02  5:18 UTC (permalink / raw)
  To: 71897; +Cc: Liliana Marie Prikler, Maxim Cournoyer, Vivien Kraus

* gnu/packages/glib.scm: Import (gnu packages pretty-print).
  (cppgir): New variable.

Change-Id: Ifaf3af1642bb8cb4750ee4f679967fb57c9cc7e2
---
 gnu/packages/glib.scm | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index b11046f05d..10d39e4fe2 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -20,6 +20,7 @@
 ;;; Copyright © 2022 Petr Hodina <phodina@protonmail.com>
 ;;; Copyright © 2023 Saku Laesvuori <saku@laesvuori.fi>
 ;;; Copyright © 2024 Zheng Junjie <873216071@qq.com>
+;;; Copyright © 2024 dan <i@dan.games>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -71,6 +72,7 @@ (define-module (gnu packages glib)
   #:use-module (gnu packages perl-check)
   #:use-module (gnu packages popt)
   #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages pretty-print)
   #:use-module (gnu packages python)
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages sqlite)
@@ -1594,3 +1596,31 @@ (define-public libdex
 Dex also provides Fibers which allow writing synchronous looking code in C
 that uses asynchronous and future-based APIs.")
     (license license:lgpl2.1+)))
+
+(define-public cppgir
+  (let ((commit "9c4f5820d94d62ab451501f016bfea97156518f4")
+        (revision "0"))
+    (package
+      (name "cppgir")
+      (version (git-version "2.0" revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri
+                 (git-reference
+                  (url "https://gitlab.com/mnauw/cppgir")
+                  (commit commit)))
+                (sha256
+                 (base32 "1fa9nf4yljfarihaqj5kd98yysrky7q316mh6l5b1rq39ga15k9b"))))
+      (build-system cmake-build-system)
+      (arguments
+       (list
+        #:configure-flags #~(list "-DINTERNAL_EXPECTED=OFF")))
+      (inputs (list boost fmt expected-lite))
+      (home-page "https://gitlab.com/mnauw/cppgir")
+      (synopsis "A GObject-Introspection C++ binding wrapper generator")
+      (description "it processes .gir files derived from GObject-Introspection
+annotations into a set of C++ files defining suitable namespaces, classes and
+other types that together from a C++ binding. In this way, the plain C
+libraries and objects become available as native objects along with (RAII)
+managed resource handling.")
+      (license license:expat))))

base-commit: 0f51ddd8dba6b69115d07f4a77ba70abb6521293
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH 2/2] gnu: telegram-desktop: Update to 5.1.7.
  2024-07-02  5:18 [bug#71897] [PATCH 1/2] gnu: Add cppgir dan
@ 2024-07-02  5:26 ` dan
  2024-07-02 11:09 ` [bug#71897] [PATCH 1/2] gnu: Add cppgir Maxim Cournoyer
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 98+ messages in thread
From: dan @ 2024-07-02  5:26 UTC (permalink / raw)
  To: 71897; +Cc: dan

* 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: Import (gnu packages boost).
(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)[patches]: Add patches to unbundle gsl and
cppgir.
(libprisma-for-telegram-desktop, xdg-desktop-portal-for-telegram-desktop): New
variables.
(telegram-desktop): Update to 5.1.7.
[phases]<unpack-additional-sources>: Add libprisma-for-telegram-desktop and
xdg-desktop-portal-for-telegram-desktop.
<patch-gir-ignore-paths>: New phase.
[inputs]: Add boost, cppgir, expected-lite and gobject-introspection.

Change-Id: I75441a6284e3755f510a7d3ba5746bfbb8acbb91
---
 gnu/local.mk                                  |   2 +
 .../telegram-desktop-unbundle-cppgir.patch    |  95 ++++++++++++++++
 .../telegram-desktop-unbundle-gsl.patch       |  31 ++++++
 gnu/packages/telegram.scm                     | 105 ++++++++++++------
 4 files changed, 202 insertions(+), 31 deletions(-)
 create mode 100644 gnu/packages/patches/telegram-desktop-unbundle-cppgir.patch
 create mode 100644 gnu/packages/patches/telegram-desktop-unbundle-gsl.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index cf6b1d61b3..ddce260961 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2135,6 +2135,8 @@ dist_patch_DATA =						\
   %D%/packages/patches/texinfo-headings-single.patch		\
   %D%/packages/patches/texinfo-5-perl-compat.patch		\
   %D%/packages/patches/telegram-desktop-allow-disable-libtgvoip.patch   \
+  %D%/packages/patches/telegram-desktop-unbundle-cppgir.patch   \
+  %D%/packages/patches/telegram-desktop-unbundle-gsl.patch      \
   %D%/packages/patches/telegram-purple-adjust-test.patch	\
   %D%/packages/patches/teuchos-remove-duplicate-using.patch	\
   %D%/packages/patches/texi2html-document-encoding.patch	\
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/telegram.scm b/gnu/packages/telegram.scm
index 358374a5bb..4138dc3779 100644
--- a/gnu/packages/telegram.scm
+++ b/gnu/packages/telegram.scm
@@ -28,6 +28,7 @@ (define-module (gnu packages telegram)
   #:use-module (gnu packages assembly)
   #:use-module (gnu packages audio)
   #:use-module (gnu packages autotools)
+  #:use-module (gnu packages boost)
   #:use-module (gnu packages check)
   #:use-module (gnu packages cmake)
   #:use-module (gnu packages compression)
@@ -82,11 +83,11 @@ (define-module (gnu packages telegram)
   #:use-module (guix build-system python)
   #:use-module (guix build-system qt))
 
-(define %telegram-version "4.8.1")
+(define %telegram-version "5.1.7")
 
 (define libyuv-for-telegram-desktop
-  (let ((commit "77c2121f7e6b8e694d6e908bbbe9be24214097da")
-        (revision "2439"))
+  (let ((commit "04821d1e7d60845525e8db55c7bcd41ef5be9406")
+        (revision "2440"))
     (origin
       (method git-fetch)
       (uri (git-reference
@@ -97,67 +98,72 @@ (define libyuv-for-telegram-desktop
                   (git-version "0" revision commit)))
       (sha256
        (base32
-        "1b4k8yskr9ffl5k8s9i0af1gn1pavsfixla26vh8bij69rdr7f9c")))))
+        "1fsvc0f8mckrdzys8lnlnbw6676mjamm6p3ghr2h9liqfa83s6wg")))))
 
 (define cmake-helpers-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/cmake_helpers.git")
-          (commit "6ab5543b3dd1e40979d258e46d03376931b6c37b")))
+          (commit "a7527c0e6eba1c71cd0dfd7bd8de9c1e68cb529f")))
     (file-name
      (git-file-name "cmake-helpers-for-telegram-desktop" %telegram-version))
+    (patches
+     ;; https://github.com/desktop-app/cmake_helpers/pull/320
+     ;; https://github.com/desktop-app/cmake_helpers/pull/305
+     (search-patches "telegram-desktop-unbundle-gsl.patch"
+                     "telegram-desktop-unbundle-cppgir.patch"))
     (sha256
      (base32
-      "0y96mvzs113zh8bdw1h3i6l0pgwg93rigrday8kfdg4magz686k6"))))
+      "176saaaiww9ivmqdi50by7vgq5j7jhqpyzp74lpy1xg83am4malf"))))
 
 (define codegen-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/codegen.git")
-          (commit "1a969faa0afb29d53af03e530775eccdfb8433f1")))
+          (commit "0af136124083369073b8fdaf45f0816fd2b10bad")))
     (file-name
      (git-file-name "codegen-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "1xmw8dfm51p5g20rlmzqnr72a14ngyxwq09an8clf1v5s6mmwvak"))))
+      "057bwn9smrgnyfb1vraf50ihbkhjc4d72msl7vnbqc4h5sg8dav9"))))
 
 (define lib-base-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_base.git")
-          (commit "fd9adb30ee906ea02c125eaa58fcfae773fdc677")))
+          (commit "4d56f8b4bba52b46844f46fafa5f9b6b2704429e")))
     (file-name
      (git-file-name "lib-base-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "1m760mcfvgzia53nrs6wvjn353jvzlzln7c9fkx2dhpkigiynz83"))))
+      "1xc6www5bgbl94wp2fg0gxcmv1b2j0z1pyxhmmhp06jvfqx6anqy"))))
 
 (define lib-crl-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_crl.git")
-          (commit "3d7e1e1f1321c3defd21c01882d674e485ecd8df")))
+          (commit "078006d29af0002e6cd8c61a405cdeaf65b37142")))
     (file-name
      (git-file-name "lib-crl-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "06mzafnjpfr5ih297dh7bxm6bgpg0wy0gv2r2732n5szyrg9sdl6"))))
+      "18n88ghj3akpkxvllrh1rs19vd0d3xw87hd67qphr30b6ggqs9fd"))))
 
 (define lib-lottie-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_lottie.git")
-          (commit "3e9c2f1026e4b5aa3202fca4cc67ece36c7cebb2")))
+          (commit "1a700e5a0d7c3e2f617530354ff2a47c5c72bb4a")))
     (file-name
      (git-file-name "lib-lottie-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "0l57ibfij9xm4ww4s9cc63q1x8xzpc6ablwaji1krrn3xxksqdd4"))))
+      "18w35sz6k3wcv07v0szx3avpfdl0rjby6yqm1fzmx7fqw2jn6wpl"))))
 
 (define lib-qr-for-telegram-desktop
   (origin
@@ -188,24 +194,24 @@ (define lib-spellcheck-for-telegram-desktop
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_spellcheck.git")
-          (commit "ae89fefd239ecc47d4dab7ba29f9e230376a57d3")))
+          (commit "9b52030bfcd7e90e3e550231a3783ad1982fda78")))
     (file-name
      (git-file-name "lib-spellcheck-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "147xbbcza5q4wcdipk5jplajzkc48971kg2s7qv5jlz33sxkw1lq"))))
+      "0s9fjxpxxvj1xgzg3sfw6079blgmdvbb5cy6wb921sqaqwf52j6x"))))
 
 (define lib-storage-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_storage.git")
-          (commit "839609369d04615475cb1518636de3619106a917")))
+          (commit "0971b69ca90f1697ef81276d9820dcd6d26de4ac")))
     (file-name
      (git-file-name "lib-storage-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "1l26h2fmqp9dcpr6pfvdd5sjb68j7yh0ms2lnr8na7jf5xqmkwwm"))))
+      "0ihbh1ajns0sf42h9992hnawwjr1n439sgb0g4zirn2bj5i1zbdv"))))
 
 (define lib-tl-for-telegram-desktop
   (origin
@@ -224,52 +230,52 @@ (define lib-ui-for-telegram-desktop
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_ui.git")
-          (commit "37531086ec21a8569deddedb11b402f8a3157b90")))
+          (commit "e9fb40c0d3ef6f05bfef0f4395c8b2d81bc9823a")))
     (file-name
      (git-file-name "lib-ui-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "0l4baalwdiwcwzn3wgrbyiaryi70lswillbpkzcjpavaa2pjg6b0"))))
+      "1if01nrxy785130cgbqjl8c99yylzsd4q7vv2x0px2nm56vy67lf"))))
 
 (define lib-webrtc-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_webrtc.git")
-          (commit "b68a95ad4d1ae9a1827671100a7fd76cbe448c3f")))
+          (commit "f701713cd798bd7d5f69d318fdefb125d101aa76")))
     (file-name
      (git-file-name "lib-webrtc-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "1c8jwdnn26n13yp0rp0l71q6xlxa6wp3cspbm3pnghw964jwgp3z"))))
+      "1hki5lc2jrack0r7wyixfh3c08jnmnw3pfrggrznvj4kq490z1b4"))))
 
 (define lib-webview-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_webview.git")
-          (commit "f632fc84cbc62ae8abbbd05f81d472757a337c11")))
+          (commit "659b9181240aae16c05ef8ab7e6c4dd527afcf8a")))
     (file-name
      (git-file-name "lib-webview-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "0idsfkxq7l9kgyrhifys5l4jkhvbyxkgkp0qdq9218h7g0ldw84i"))))
+      "1hg8jnpkszf3rrbnkqq9xc3n743602vkjp4kj8rccw7syjmgvrf1"))))
 
 (define tgcalls-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/TelegramMessenger/tgcalls.git")
-          (commit "2e2797648aac2588e7fe479c2e8b4455ec65c5e6")))
+          (commit "b9fa8b84d8abe741183f157218ac038c596a54a5")))
     (file-name
      (git-file-name "tgcalls-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "193m2gkvipijqbfd6a8mhg9nd63wlnshzgspk3pip57vk21l709z"))))
+      "1swni7xw5l0q376b6rnf9h93arzjqm9rkv7g6hz67742lf9a0x9z"))))
 
 (define-public webrtc-for-telegram-desktop
-  (let ((commit "0532942ac6176a66ef184fb728a4cbb02958fc0b")
-        (revision "389"))
+  (let ((commit "c9cc4390ab951f2cbc103ff783a11f398b27660b")
+        (revision "399"))
     (hidden-package
      (package
        (name "webrtc-for-telegram-desktop")
@@ -285,7 +291,7 @@ (define-public webrtc-for-telegram-desktop
           (file-name
            (git-file-name name version))
           (sha256
-           (base32 "0fary99yl1ddk5zjpfy0pyb5brd268j41plcnvv9qjyf0wj9hf2k"))
+           (base32 "0x2hjliiapb9kacbg8fwkz7g09c9k8dc77xxycjh5kmm1fc2i6dd"))
           (patches
            (search-patches
             ;; https://github.com/desktop-app/tg_owt/pull/123
@@ -400,6 +406,32 @@ (define cld3-for-telegram-desktop
     (base32
      "0ayrrhfdwrf4260h9fsirkhhfrcvc3qqnh6h9wj3ixij2lq0wwqb"))))
 
+(define libprisma-for-telegram-desktop
+  (origin
+   (method git-fetch)
+   (uri (git-reference
+         (url "https://github.com/desktop-app/libprisma")
+         (commit "23b0d70f9709da9b38561d5706891a134d18df76")))
+   (file-name
+    (git-file-name "libprisma-for-telegram-desktop" %telegram-version))
+   (sha256
+    (base32
+     "0fg4x4ikj7f3706bmfvkwq4smxc98qr3cgpm25w48n4ys6wfgadg"))))
+
+;; telegram-desktop requires xdg-desktop-portal 1.18 to build, which isn't
+;; available in Guix yet.
+(define xdg-desktop-portal-for-telegram-desktop
+  (origin
+    (method git-fetch)
+    (uri (git-reference
+          (url "https://github.com/flatpak/xdg-desktop-portal.git")
+          (commit "fa8d41a2f9a5d30a1e41568b6fb53b046dce14dc")))
+    (file-name
+     (git-file-name "xdg-desktop-portal-for-telegram-desktop" %telegram-version))
+    (sha256
+     (base32
+      "1hgbpr5x20g63gklrkx2rrarpfsxfy2cpcs3sy2f7z39nlm4ipix"))))
+
 (define-public telegram-desktop
   (package
     (name "telegram-desktop")
@@ -415,7 +447,7 @@ (define-public telegram-desktop
        (file-name
         (git-file-name name version))
        (sha256
-        (base32 "0g47ffamh1csp79yzkv28v3qjkhjacj0c7pjf53n1ks80j5hc2j0"))
+        (base32 "17cbx727m46v1w6lh2mh6vj5zkn9914lhn9p3bkp516v2zfisn40"))
        (patches
         (search-patches
          ;; https://github.com/telegramdesktop/tdesktop/pull/24126
@@ -481,7 +513,14 @@ (define-public telegram-desktop
                       ("Telegram/lib_webrtc" #$lib-webrtc-for-telegram-desktop)
                       ("Telegram/lib_webview" #$lib-webview-for-telegram-desktop)
                       ("Telegram/ThirdParty/cld3" #$cld3-for-telegram-desktop)
-                      ("Telegram/ThirdParty/tgcalls" #$tgcalls-for-telegram-desktop)))))
+                      ("Telegram/ThirdParty/libprisma" #$libprisma-for-telegram-desktop)
+                      ("Telegram/ThirdParty/tgcalls" #$tgcalls-for-telegram-desktop)
+                      ("Telegram/ThirdParty/xdg-desktop-portal" #$xdg-desktop-portal-for-telegram-desktop)))))
+               (add-after 'unpack-additional-sources 'patch-gir-ignore-paths
+                 (lambda _
+                   (substitute* "cmake/external/glib/generate_cppgir.cmake"
+                     (("\\$\\{cmake_helpers_loc\\}/external/glib/cppgir/data")
+                      (string-append #$(this-package-input "cppgir") "/share/cppgir")))))
                (add-after 'install 'glib-or-gtk-compile-schemas
                  (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-compile-schemas))
                (add-after 'glib-or-gtk-compile-schemas 'glib-or-gtk-wrap
@@ -494,13 +533,17 @@ (define-public telegram-desktop
     (inputs
      (list abseil-cpp-cxxstd17
            alsa-lib
+           boost
            c++-gsl
            crc32c
+           cppgir
+           expected-lite
            fcitx-qt5
            fcitx5-qt
            ffmpeg
            glib
            glibmm-2.76
+           gobject-introspection
            gtk+
            hime
            hunspell
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH 1/2] gnu: Add cppgir.
  2024-07-02  5:18 [bug#71897] [PATCH 1/2] gnu: Add cppgir dan
  2024-07-02  5:26 ` [bug#71897] [PATCH 2/2] gnu: telegram-desktop: Update to 5.1.7 dan
@ 2024-07-02 11:09 ` Maxim Cournoyer
  2024-07-02 13:17 ` [bug#71897] [PATCH 1/3] " dan
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 98+ messages in thread
From: Maxim Cournoyer @ 2024-07-02 11:09 UTC (permalink / raw)
  To: dan; +Cc: Vivien Kraus, Liliana Marie Prikler, 71897

Hi Dan,

dan <i@dan.games> writes:

> * gnu/packages/glib.scm: Import (gnu packages pretty-print).
>   (cppgir): New variable.
>
> Change-Id: Ifaf3af1642bb8cb4750ee4f679967fb57c9cc7e2
> ---
>  gnu/packages/glib.scm | 30 ++++++++++++++++++++++++++++++
>  1 file changed, 30 insertions(+)
>
> diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
> index b11046f05d..10d39e4fe2 100644
> --- a/gnu/packages/glib.scm
> +++ b/gnu/packages/glib.scm
> @@ -20,6 +20,7 @@
>  ;;; Copyright © 2022 Petr Hodina <phodina@protonmail.com>
>  ;;; Copyright © 2023 Saku Laesvuori <saku@laesvuori.fi>
>  ;;; Copyright © 2024 Zheng Junjie <873216071@qq.com>
> +;;; Copyright © 2024 dan <i@dan.games>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -71,6 +72,7 @@ (define-module (gnu packages glib)
>    #:use-module (gnu packages perl-check)
>    #:use-module (gnu packages popt)
>    #:use-module (gnu packages pkg-config)
> +  #:use-module (gnu packages pretty-print)
>    #:use-module (gnu packages python)
>    #:use-module (gnu packages python-xyz)
>    #:use-module (gnu packages sqlite)
> @@ -1594,3 +1596,31 @@ (define-public libdex
>  Dex also provides Fibers which allow writing synchronous looking code in C
>  that uses asynchronous and future-based APIs.")
>      (license license:lgpl2.1+)))
> +
> +(define-public cppgir
> +  (let ((commit "9c4f5820d94d62ab451501f016bfea97156518f4")
> +        (revision "0"))

When not using a release (tag or archive), a comment is nice to have,
e.g. "No proper release; use the latest available tag."

> +    (package
> +      (name "cppgir")
> +      (version (git-version "2.0" revision commit))
> +      (source (origin
> +                (method git-fetch)
> +                (uri
> +                 (git-reference
> +                  (url "https://gitlab.com/mnauw/cppgir")
> +                  (commit commit)))
> +                (sha256
> +                 (base32 "1fa9nf4yljfarihaqj5kd98yysrky7q316mh6l5b1rq39ga15k9b"))))
> +      (build-system cmake-build-system)
> +      (arguments
> +       (list
> +        #:configure-flags #~(list "-DINTERNAL_EXPECTED=OFF")))
> +      (inputs (list boost fmt expected-lite))
> +      (home-page "https://gitlab.com/mnauw/cppgir")
> +      (synopsis "A GObject-Introspection C++ binding wrapper generator")
> +      (description "it processes .gir files derived from GObject-Introspection
> +annotations into a set of C++ files defining suitable namespaces, classes and
> +other types that together from a C++ binding. In this way, the plain C
                             ^ form ?
                             
> +libraries and objects become available as native objects along with (RAII)

use @acronym for RAII, defining what it means.

> +managed resource handling.")
> +      (license license:expat))))

The description that should start with proper punctuation (a capital
letter), and the use of two spaces for separating sentences (a
Texinfo/Guile convention).  I believe 'guix lint' should warn about the
later at least.  Could you send a v2 including these mostly cosmetic
changes?

-- 
Thanks,
Maxim




^ permalink raw reply	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH 1/3] gnu: Add cppgir.
  2024-07-02  5:18 [bug#71897] [PATCH 1/2] gnu: Add cppgir dan
  2024-07-02  5:26 ` [bug#71897] [PATCH 2/2] gnu: telegram-desktop: Update to 5.1.7 dan
  2024-07-02 11:09 ` [bug#71897] [PATCH 1/2] gnu: Add cppgir Maxim Cournoyer
@ 2024-07-02 13:17 ` dan
  2024-07-02 13:17   ` [bug#71897] [PATCH 2/3] gnu: xdg-desktop-portal: Update to 1.18.4 dan
                     ` (2 more replies)
  2024-07-03 13:22 ` [bug#71897] [PATCH v3 1/2] gnu: xdg-desktop-portal: Update to 1.18.4 dan
                   ` (8 subsequent siblings)
  11 siblings, 3 replies; 98+ messages in thread
From: dan @ 2024-07-02 13:17 UTC (permalink / raw)
  To: 71897; +Cc: dan, Maxim Cournoyer, Liliana Marie Prikler, Vivien Kraus

* gnu/packages/glib.scm: (cppgir): New variable.

Change-Id: Ifaf3af1642bb8cb4750ee4f679967fb57c9cc7e2
---
 gnu/packages/glib.scm | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index b11046f05d..77279e6ad0 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -20,6 +20,7 @@
 ;;; Copyright © 2022 Petr Hodina <phodina@protonmail.com>
 ;;; Copyright © 2023 Saku Laesvuori <saku@laesvuori.fi>
 ;;; Copyright © 2024 Zheng Junjie <873216071@qq.com>
+;;; Copyright © 2024 dan <i@dan.games>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -71,6 +72,7 @@ (define-module (gnu packages glib)
   #:use-module (gnu packages perl-check)
   #:use-module (gnu packages popt)
   #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages pretty-print)
   #:use-module (gnu packages python)
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages sqlite)
@@ -1594,3 +1596,35 @@ (define-public libdex
 Dex also provides Fibers which allow writing synchronous looking code in C
 that uses asynchronous and future-based APIs.")
     (license license:lgpl2.1+)))
+
+;; This package is added as a dependency of telegram-desktop.  The 2.0 version
+;; failed to compile, so we use the commit specified in telegram-desktop.
+(define-public cppgir
+  (let ((commit "9c4f5820d94d62ab451501f016bfea97156518f4")
+        (revision "0"))
+    (package
+      (name "cppgir")
+      (version (git-version "2.0" revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri
+                 (git-reference
+                  (url "https://gitlab.com/mnauw/cppgir")
+                  (commit commit)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32 "1fa9nf4yljfarihaqj5kd98yysrky7q316mh6l5b1rq39ga15k9b"))))
+      (build-system cmake-build-system)
+      (arguments
+       (list
+        #:configure-flags #~(list "-DINTERNAL_EXPECTED=OFF")))
+      (inputs (list boost fmt expected-lite))
+      (home-page "https://gitlab.com/mnauw/cppgir")
+      (synopsis "GObject introspection C++ binding wrapper generator")
+      (description "cppgir processes .gir files derived from GObject
+introspection annotations into a set of C++ files defining suitable
+namespaces, classes and other types that together form a C++ binding.  In this
+way, the plain C libraries and objects become available as native objects
+along with @acronym{RAII, Resource Acquisition Is Initialization} managed
+resource handling.")
+      (license license:expat))))

base-commit: 4b3a553ca5ba5ac190739309eb5f7aa8170cf2a8
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH 2/3] gnu: xdg-desktop-portal: Update to 1.18.4.
  2024-07-02 13:17 ` [bug#71897] [PATCH 1/3] " dan
@ 2024-07-02 13:17   ` dan
  2024-07-02 13:17   ` [bug#71897] [PATCH 3/3] gnu: telegram-desktop: Update to 5.2.1 dan
  2024-07-02 16:58   ` [bug#71897] [PATCH 1/3] gnu: Add cppgir Liliana Marie Prikler
  2 siblings, 0 replies; 98+ messages in thread
From: dan @ 2024-07-02 13:17 UTC (permalink / raw)
  To: 71897; +Cc: dan, Maxim Cournoyer

* gnu/packages/patches/xdg-desktop-portal-disable-portal-tests.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/freedesktop.scm (xdg-desktop-portal): Update to 1.18.4.
[patches]: Disable portal tests.
[native-inputs]: Remove autoconf, automake, libtool and which.  Add python,
python-dbusmock, python-pytest and python-pytest-xdist.
[inputs]: Add bubblewrap.
[phases]<#:configureflags>: Update flags to meson options.

Change-Id: Ic9876565e9119443fedd082273be4f372ebce1d4
---
 gnu/local.mk                                  |  1 +
 gnu/packages/freedesktop.scm                  | 25 +++++----
 ...-desktop-portal-disable-portal-tests.patch | 56 +++++++++++++++++++
 3 files changed, 72 insertions(+), 10 deletions(-)
 create mode 100644 gnu/packages/patches/xdg-desktop-portal-disable-portal-tests.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index cf6b1d61b3..973c4a5dad 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2240,6 +2240,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/wordnet-CVE-2008-3908-pt2.patch			\
   %D%/packages/patches/wpa-supplicant-dbus-group-policy.patch		\
   %D%/packages/patches/x265-arm-flags.patch			\
+  %D%/packages/patches/xdg-desktop-portal-disable-portal-tests.patch\
   %D%/packages/patches/xdg-desktop-portal-wlr-harcoded-length.patch\
   %D%/packages/patches/xen-docs-use-predictable-ordering.patch	\
   %D%/packages/patches/xen-remove-config.gz-timestamp.patch	\
diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index 6941450436..2015ee46f8 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -38,6 +38,7 @@
 ;;; Copyright © 2022 Samuel Culpepper <sculpepper@newstore.com>
 ;;; Copyright © 2024 aurtzy <aurtzy@gmail.com>
 ;;; Copyright © 2024 Dariqq <dariqq@posteo.net>
+;;; Copyright © 2024 dan <i@dan.games>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -133,6 +134,7 @@ (define-module (gnu packages freedesktop)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages valgrind)
   #:use-module (gnu packages video)
+  #:use-module (gnu packages virtualization)
   #:use-module (gnu packages w3m)
   #:use-module (gnu packages web)
   #:use-module (gnu packages xdisorg)
@@ -2989,7 +2991,7 @@ (define-public libportal
 (define-public xdg-desktop-portal
   (package
     (name "xdg-desktop-portal")
-    (version "1.16.0")
+    (version "1.18.4")
     (source
      (origin
        (method url-fetch)
@@ -2998,18 +3000,21 @@ (define-public xdg-desktop-portal
              version "/xdg-desktop-portal-" version ".tar.xz"))
        (sha256
         (base32
-         "06cczlh39kc41rvav06v37sad827y61rffy3v29i918ibj8sahav"))))
-    (build-system gnu-build-system)
+         "0r8y8qmzcfj7b7brqcxr9lg8pavfds815ffvj0kqc378fhgaln5q"))
+       ;; disable portal tests since they try to use fuse
+       (patches (search-patches "xdg-desktop-portal-disable-portal-tests.patch"))))
+    (build-system meson-build-system)
     (native-inputs
      `(("pkg-config" ,pkg-config)
-       ("autoconf" ,autoconf)
-       ("automake" ,automake)
-       ("libtool" ,libtool)
        ("glib:bin" ,glib "bin")
-       ("which" ,which)
-       ("gettext" ,gettext-minimal)))
+       ("gettext" ,gettext-minimal)
+       ("python" ,python)
+       ("python-dbusmock" ,python-dbusmock)
+       ("python-pytest" ,python-pytest)
+       ("python-pytest-xdist" ,python-pytest-xdist)))
     (inputs
-     `(("gdk-pixbuf" ,gdk-pixbuf)
+     `(("bubblewrap" ,bubblewrap)
+       ("gdk-pixbuf" ,gdk-pixbuf)
        ("glib" ,glib)
        ("flatpak" ,flatpak)
        ("fontconfig" ,fontconfig)
@@ -3021,7 +3026,7 @@ (define-public xdg-desktop-portal
        ("fuse" ,fuse)))
     (arguments
      `(#:configure-flags
-       (list "--with-systemd=no")
+       (list "-Dsystemd=disabled")
        #:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'po-chmod
diff --git a/gnu/packages/patches/xdg-desktop-portal-disable-portal-tests.patch b/gnu/packages/patches/xdg-desktop-portal-disable-portal-tests.patch
new file mode 100644
index 0000000000..5e13493613
--- /dev/null
+++ b/gnu/packages/patches/xdg-desktop-portal-disable-portal-tests.patch
@@ -0,0 +1,56 @@
+From b7750fa99c31c5f28ac2053fa154bef4038b5cc0 Mon Sep 17 00:00:00 2001
+From: dan <i@dan.games>
+Date: Tue, 2 Jul 2024 19:37:38 +0800
+Subject: [PATCH] tests: remove portal tests.
+
+---
+ tests/meson.build | 24 ------------------------
+ 1 file changed, 24 deletions(-)
+
+diff --git a/tests/meson.build b/tests/meson.build
+index a2dafee..bcd87be 100644
+--- a/tests/meson.build
++++ b/tests/meson.build
+@@ -181,18 +181,6 @@ portal_tests = [
+ 
+ test_env = env_tests
+ test_env.set('XDG_CURRENT_DESKTOP', 'test')
+-foreach p : portal_tests
+-    test(
+-      'test-portals-@0@'.format(p),
+-      test_portals,
+-      args: ['--verbose', '--keep-going', '--tap', '-p', '/portal/@0@'.format(p)],
+-      depends: [test_backends, test_portals],
+-      env: test_env,
+-      is_parallel: false,
+-      protocol: test_protocol,
+-      suite: 'portals',
+-    )
+-endforeach
+ 
+ # Split the portal tests into one test per portal, this makes debugging a lot
+ # easier.
+@@ -204,18 +192,6 @@ portal_limited = [
+ 
+ limited_env = env_tests
+ limited_env.set('XDG_CURRENT_DESKTOP', 'limited')
+-foreach p : portal_limited
+-    test(
+-      'limited-portals-@0@'.format(p),
+-      limited_portals,
+-      args: ['--verbose', '--keep-going', '--tap', '-p', '/limited/@0@'.format(p)],
+-      depends: [test_backends, limited_portals],
+-      env: limited_env,
+-      is_parallel: false,
+-      protocol: test_protocol,
+-      suite: 'portals',
+-    )
+-endforeach
+ 
+ if enable_installed_tests
+   install_data(
+
+base-commit: 11c8a96b147aeae70e3f770313f93b367d53fedd
+-- 
+2.41.0
+
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH 3/3] gnu: telegram-desktop: Update to 5.2.1.
  2024-07-02 13:17 ` [bug#71897] [PATCH 1/3] " dan
  2024-07-02 13:17   ` [bug#71897] [PATCH 2/3] gnu: xdg-desktop-portal: Update to 1.18.4 dan
@ 2024-07-02 13:17   ` dan
  2024-07-02 16:58   ` [bug#71897] [PATCH 1/3] gnu: Add cppgir Liliana Marie Prikler
  2 siblings, 0 replies; 98+ messages in thread
From: dan @ 2024-07-02 13:17 UTC (permalink / raw)
  To: 71897; +Cc: dan, Maxim Cournoyer

* 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): New variables.
(telegram-desktop): Update to 5.2.1.
[arguments]<#:phases><unpack-additional-sources>: Add
libprisma-for-telegram-desktop.
<patch-gir-ignore-paths>: New phase.
<use-system-xdg-desktop-portal>: New phase.
[inputs]: Add boost, cppgir, expected-lite and gobject-introspection.

Change-Id: I75441a6284e3755f510a7d3ba5746bfbb8acbb91
---
 gnu/local.mk                                  |  2 +
 .../telegram-desktop-unbundle-cppgir.patch    | 95 ++++++++++++++++++
 .../telegram-desktop-unbundle-gsl.patch       | 31 ++++++
 gnu/packages/telegram.scm                     | 99 +++++++++++++------
 4 files changed, 196 insertions(+), 31 deletions(-)
 create mode 100644 gnu/packages/patches/telegram-desktop-unbundle-cppgir.patch
 create mode 100644 gnu/packages/patches/telegram-desktop-unbundle-gsl.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 973c4a5dad..2d4f866491 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2135,6 +2135,8 @@ dist_patch_DATA =						\
   %D%/packages/patches/texinfo-headings-single.patch		\
   %D%/packages/patches/texinfo-5-perl-compat.patch		\
   %D%/packages/patches/telegram-desktop-allow-disable-libtgvoip.patch   \
+  %D%/packages/patches/telegram-desktop-unbundle-cppgir.patch   \
+  %D%/packages/patches/telegram-desktop-unbundle-gsl.patch      \
   %D%/packages/patches/telegram-purple-adjust-test.patch	\
   %D%/packages/patches/teuchos-remove-duplicate-using.patch	\
   %D%/packages/patches/texi2html-document-encoding.patch	\
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/telegram.scm b/gnu/packages/telegram.scm
index 358374a5bb..54b9c72361 100644
--- a/gnu/packages/telegram.scm
+++ b/gnu/packages/telegram.scm
@@ -5,6 +5,7 @@
 ;;; Copyright © 2023 Lu Hui <luhux76@gmail.com>
 ;;; Copyright © 2023 Camilo Q.S. (Distopico) <distopico@riseup.net>
 ;;; Copyright © 2024 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2024 dan <i@dan.games>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -28,6 +29,7 @@ (define-module (gnu packages telegram)
   #:use-module (gnu packages assembly)
   #:use-module (gnu packages audio)
   #:use-module (gnu packages autotools)
+  #:use-module (gnu packages boost)
   #:use-module (gnu packages check)
   #:use-module (gnu packages cmake)
   #:use-module (gnu packages compression)
@@ -82,11 +84,11 @@ (define-module (gnu packages telegram)
   #:use-module (guix build-system python)
   #:use-module (guix build-system qt))
 
-(define %telegram-version "4.8.1")
+(define %telegram-version "5.2.1")
 
 (define libyuv-for-telegram-desktop
-  (let ((commit "77c2121f7e6b8e694d6e908bbbe9be24214097da")
-        (revision "2439"))
+  (let ((commit "04821d1e7d60845525e8db55c7bcd41ef5be9406")
+        (revision "2440"))
     (origin
       (method git-fetch)
       (uri (git-reference
@@ -97,67 +99,72 @@ (define libyuv-for-telegram-desktop
                   (git-version "0" revision commit)))
       (sha256
        (base32
-        "1b4k8yskr9ffl5k8s9i0af1gn1pavsfixla26vh8bij69rdr7f9c")))))
+        "1fsvc0f8mckrdzys8lnlnbw6676mjamm6p3ghr2h9liqfa83s6wg")))))
 
 (define cmake-helpers-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/cmake_helpers.git")
-          (commit "6ab5543b3dd1e40979d258e46d03376931b6c37b")))
+          (commit "5742caae65e4163e7faec238eb4e3e5c219ad09c")))
     (file-name
      (git-file-name "cmake-helpers-for-telegram-desktop" %telegram-version))
+    (patches
+     ;; https://github.com/desktop-app/cmake_helpers/pull/320
+     ;; https://github.com/desktop-app/cmake_helpers/pull/305
+     (search-patches "telegram-desktop-unbundle-gsl.patch"
+                     "telegram-desktop-unbundle-cppgir.patch"))
     (sha256
      (base32
-      "0y96mvzs113zh8bdw1h3i6l0pgwg93rigrday8kfdg4magz686k6"))))
+      "1ld74wd4gyx22gd132ci13sbzis7ypxqiyk4y0mrlhjvmciq9nw1"))))
 
 (define codegen-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/codegen.git")
-          (commit "1a969faa0afb29d53af03e530775eccdfb8433f1")))
+          (commit "0af136124083369073b8fdaf45f0816fd2b10bad")))
     (file-name
      (git-file-name "codegen-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "1xmw8dfm51p5g20rlmzqnr72a14ngyxwq09an8clf1v5s6mmwvak"))))
+      "057bwn9smrgnyfb1vraf50ihbkhjc4d72msl7vnbqc4h5sg8dav9"))))
 
 (define lib-base-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_base.git")
-          (commit "fd9adb30ee906ea02c125eaa58fcfae773fdc677")))
+          (commit "f30400147d997fedc787e214467d305db6c159e7")))
     (file-name
      (git-file-name "lib-base-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "1m760mcfvgzia53nrs6wvjn353jvzlzln7c9fkx2dhpkigiynz83"))))
+      "0mm88xj9q9v5p0z7byjfpbmw8h6rqg9ya9m0jhfzi2s8iglz0cga"))))
 
 (define lib-crl-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_crl.git")
-          (commit "3d7e1e1f1321c3defd21c01882d674e485ecd8df")))
+          (commit "078006d29af0002e6cd8c61a405cdeaf65b37142")))
     (file-name
      (git-file-name "lib-crl-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "06mzafnjpfr5ih297dh7bxm6bgpg0wy0gv2r2732n5szyrg9sdl6"))))
+      "18n88ghj3akpkxvllrh1rs19vd0d3xw87hd67qphr30b6ggqs9fd"))))
 
 (define lib-lottie-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_lottie.git")
-          (commit "3e9c2f1026e4b5aa3202fca4cc67ece36c7cebb2")))
+          (commit "1a700e5a0d7c3e2f617530354ff2a47c5c72bb4a")))
     (file-name
      (git-file-name "lib-lottie-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "0l57ibfij9xm4ww4s9cc63q1x8xzpc6ablwaji1krrn3xxksqdd4"))))
+      "18w35sz6k3wcv07v0szx3avpfdl0rjby6yqm1fzmx7fqw2jn6wpl"))))
 
 (define lib-qr-for-telegram-desktop
   (origin
@@ -188,24 +195,24 @@ (define lib-spellcheck-for-telegram-desktop
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_spellcheck.git")
-          (commit "ae89fefd239ecc47d4dab7ba29f9e230376a57d3")))
+          (commit "0b7622ff38778e9cd03d3997de59351973480a1f")))
     (file-name
      (git-file-name "lib-spellcheck-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "147xbbcza5q4wcdipk5jplajzkc48971kg2s7qv5jlz33sxkw1lq"))))
+      "0s9fjxpxxvj1xgzg3sfw6079blgmdvbb5cy6wb921sqaqwf52j6x"))))
 
 (define lib-storage-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_storage.git")
-          (commit "839609369d04615475cb1518636de3619106a917")))
+          (commit "0971b69ca90f1697ef81276d9820dcd6d26de4ac")))
     (file-name
      (git-file-name "lib-storage-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "1l26h2fmqp9dcpr6pfvdd5sjb68j7yh0ms2lnr8na7jf5xqmkwwm"))))
+      "0ihbh1ajns0sf42h9992hnawwjr1n439sgb0g4zirn2bj5i1zbdv"))))
 
 (define lib-tl-for-telegram-desktop
   (origin
@@ -224,52 +231,52 @@ (define lib-ui-for-telegram-desktop
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_ui.git")
-          (commit "37531086ec21a8569deddedb11b402f8a3157b90")))
+          (commit "ebd8609ee73d48186b905787dd5bb3bcbb4f9f3f")))
     (file-name
      (git-file-name "lib-ui-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "0l4baalwdiwcwzn3wgrbyiaryi70lswillbpkzcjpavaa2pjg6b0"))))
+      "0abpb0gi3k99pm5zh5gh9czhi48jqvr6wy0yli004hswlfqs2nxk"))))
 
 (define lib-webrtc-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_webrtc.git")
-          (commit "b68a95ad4d1ae9a1827671100a7fd76cbe448c3f")))
+          (commit "f701713cd798bd7d5f69d318fdefb125d101aa76")))
     (file-name
      (git-file-name "lib-webrtc-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "1c8jwdnn26n13yp0rp0l71q6xlxa6wp3cspbm3pnghw964jwgp3z"))))
+      "1hki5lc2jrack0r7wyixfh3c08jnmnw3pfrggrznvj4kq490z1b4"))))
 
 (define lib-webview-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_webview.git")
-          (commit "f632fc84cbc62ae8abbbd05f81d472757a337c11")))
+          (commit "659b9181240aae16c05ef8ab7e6c4dd527afcf8a")))
     (file-name
      (git-file-name "lib-webview-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "0idsfkxq7l9kgyrhifys5l4jkhvbyxkgkp0qdq9218h7g0ldw84i"))))
+      "1hg8jnpkszf3rrbnkqq9xc3n743602vkjp4kj8rccw7syjmgvrf1"))))
 
 (define tgcalls-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/TelegramMessenger/tgcalls.git")
-          (commit "2e2797648aac2588e7fe479c2e8b4455ec65c5e6")))
+          (commit "b9fa8b84d8abe741183f157218ac038c596a54a5")))
     (file-name
      (git-file-name "tgcalls-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "193m2gkvipijqbfd6a8mhg9nd63wlnshzgspk3pip57vk21l709z"))))
+      "1swni7xw5l0q376b6rnf9h93arzjqm9rkv7g6hz67742lf9a0x9z"))))
 
 (define-public webrtc-for-telegram-desktop
-  (let ((commit "0532942ac6176a66ef184fb728a4cbb02958fc0b")
-        (revision "389"))
+  (let ((commit "c9cc4390ab951f2cbc103ff783a11f398b27660b")
+        (revision "399"))
     (hidden-package
      (package
        (name "webrtc-for-telegram-desktop")
@@ -285,7 +292,7 @@ (define-public webrtc-for-telegram-desktop
           (file-name
            (git-file-name name version))
           (sha256
-           (base32 "0fary99yl1ddk5zjpfy0pyb5brd268j41plcnvv9qjyf0wj9hf2k"))
+           (base32 "0x2hjliiapb9kacbg8fwkz7g09c9k8dc77xxycjh5kmm1fc2i6dd"))
           (patches
            (search-patches
             ;; https://github.com/desktop-app/tg_owt/pull/123
@@ -400,6 +407,18 @@ (define cld3-for-telegram-desktop
     (base32
      "0ayrrhfdwrf4260h9fsirkhhfrcvc3qqnh6h9wj3ixij2lq0wwqb"))))
 
+(define libprisma-for-telegram-desktop
+  (origin
+   (method git-fetch)
+   (uri (git-reference
+         (url "https://github.com/desktop-app/libprisma")
+         (commit "23b0d70f9709da9b38561d5706891a134d18df76")))
+   (file-name
+    (git-file-name "libprisma-for-telegram-desktop" %telegram-version))
+   (sha256
+    (base32
+     "0fg4x4ikj7f3706bmfvkwq4smxc98qr3cgpm25w48n4ys6wfgadg"))))
+
 (define-public telegram-desktop
   (package
     (name "telegram-desktop")
@@ -415,7 +434,7 @@ (define-public telegram-desktop
        (file-name
         (git-file-name name version))
        (sha256
-        (base32 "0g47ffamh1csp79yzkv28v3qjkhjacj0c7pjf53n1ks80j5hc2j0"))
+        (base32 "0x5fjr0brl3x5d3d0jjkx0gsm297wl47bnwhy1zb4zndkwl0h28b"))
        (patches
         (search-patches
          ;; https://github.com/telegramdesktop/tdesktop/pull/24126
@@ -481,7 +500,20 @@ (define-public telegram-desktop
                       ("Telegram/lib_webrtc" #$lib-webrtc-for-telegram-desktop)
                       ("Telegram/lib_webview" #$lib-webview-for-telegram-desktop)
                       ("Telegram/ThirdParty/cld3" #$cld3-for-telegram-desktop)
+                      ("Telegram/ThirdParty/libprisma" #$libprisma-for-telegram-desktop)
                       ("Telegram/ThirdParty/tgcalls" #$tgcalls-for-telegram-desktop)))))
+               (add-after 'unpack-additional-sources 'patch-gir-ignore-paths
+                 (lambda _
+                   (substitute* "cmake/external/glib/generate_cppgir.cmake"
+                     (("\\$\\{cmake_helpers_loc\\}/external/glib/cppgir/data")
+                      (string-append #$(this-package-input "cppgir") "/share/cppgir")))))
+               (add-after 'unpack-additional-sources 'use-system-xdg-desktop-portal
+                 (lambda _
+                   (substitute* (list "Telegram/CMakeLists.txt"
+                                      "Telegram/lib_base/CMakeLists.txt")
+                     (("\\$\\{third_party_loc\\}/xdg-desktop-portal/data")
+                      (string-append #$(this-package-native-input "xdg-desktop-portal")
+                                     "/share/dbus-1/interfaces")))))
                (add-after 'install 'glib-or-gtk-compile-schemas
                  (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-compile-schemas))
                (add-after 'glib-or-gtk-compile-schemas 'glib-or-gtk-wrap
@@ -490,17 +522,22 @@ (define-public telegram-desktop
      (list `(,glib "bin")
            `(,gtk+ "bin")
            pkg-config
-           python-wrapper))
+           python-wrapper
+           xdg-desktop-portal))
     (inputs
      (list abseil-cpp-cxxstd17
            alsa-lib
+           boost
            c++-gsl
            crc32c
+           cppgir
+           expected-lite
            fcitx-qt5
            fcitx5-qt
            ffmpeg
            glib
            glibmm-2.76
+           gobject-introspection
            gtk+
            hime
            hunspell
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH 1/3] gnu: Add cppgir.
  2024-07-02 13:17 ` [bug#71897] [PATCH 1/3] " dan
  2024-07-02 13:17   ` [bug#71897] [PATCH 2/3] gnu: xdg-desktop-portal: Update to 1.18.4 dan
  2024-07-02 13:17   ` [bug#71897] [PATCH 3/3] gnu: telegram-desktop: Update to 5.2.1 dan
@ 2024-07-02 16:58   ` Liliana Marie Prikler
  2 siblings, 0 replies; 98+ messages in thread
From: Liliana Marie Prikler @ 2024-07-02 16:58 UTC (permalink / raw)
  To: dan, 71897; +Cc: Vivien Kraus, Maxim Cournoyer

Am Dienstag, dem 02.07.2024 um 21:17 +0800 schrieb dan:
> * gnu/packages/glib.scm: (cppgir): New variable.
> 
> Change-Id: Ifaf3af1642bb8cb4750ee4f679967fb57c9cc7e2
> ---
>  gnu/packages/glib.scm | 34 ++++++++++++++++++++++++++++++++++
>  1 file changed, 34 insertions(+)
> 
> diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
> index b11046f05d..77279e6ad0 100644
> --- a/gnu/packages/glib.scm
> +++ b/gnu/packages/glib.scm
> @@ -20,6 +20,7 @@
>  ;;; Copyright © 2022 Petr Hodina <phodina@protonmail.com>
>  ;;; Copyright © 2023 Saku Laesvuori <saku@laesvuori.fi>
>  ;;; Copyright © 2024 Zheng Junjie <873216071@qq.com>
> +;;; Copyright © 2024 dan <i@dan.games>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -71,6 +72,7 @@ (define-module (gnu packages glib)
>    #:use-module (gnu packages perl-check)
>    #:use-module (gnu packages popt)
>    #:use-module (gnu packages pkg-config)
> +  #:use-module (gnu packages pretty-print)
>    #:use-module (gnu packages python)
>    #:use-module (gnu packages python-xyz)
>    #:use-module (gnu packages sqlite)
> @@ -1594,3 +1596,35 @@ (define-public libdex
>  Dex also provides Fibers which allow writing synchronous looking
> code in C
>  that uses asynchronous and future-based APIs.")
>      (license license:lgpl2.1+)))
> +
> +;; This package is added as a dependency of telegram-desktop.  The
> 2.0 version
> +;; failed to compile, so we use the commit specified in telegram-
> desktop.
> +(define-public cppgir
> +  (let ((commit "9c4f5820d94d62ab451501f016bfea97156518f4")
> +        (revision "0"))
> +    (package
> +      (name "cppgir")
> +      (version (git-version "2.0" revision commit))
Can we investigate why 2.0 fails to compile?  If telegram-desktop
requires a newer one, that's fine, we'd just name it cppgir-for-
telegram-desktop, as it's an application that likes to require special
versions.
> +      (source (origin
> +                (method git-fetch)
> +                (uri
> +                 (git-reference
> +                  (url "https://gitlab.com/mnauw/cppgir")
> +                  (commit commit)))
> +                (file-name (git-file-name name version))
> +                (sha256
> +                 (base32
> "1fa9nf4yljfarihaqj5kd98yysrky7q316mh6l5b1rq39ga15k9b"))))
> +      (build-system cmake-build-system)
> +      (arguments
> +       (list
> +        #:configure-flags #~(list "-DINTERNAL_EXPECTED=OFF")))
> +      (inputs (list boost fmt expected-lite))
> +      (home-page "https://gitlab.com/mnauw/cppgir")
> +      (synopsis "GObject introspection C++ binding wrapper
> generator")
> +      (description "cppgir processes .gir files derived from GObject
> +introspection annotations into a set of C++ files defining suitable
> +namespaces, classes and other types that together form a C++
> binding.  In this
> +way, the plain C libraries and objects become available as native
> objects
> +along with @acronym{RAII, Resource Acquisition Is Initialization}
> managed
> +resource handling.")
I think "and resources are handled according to the @acronym{RAII, …}
pattern." would fit nicer, grammatically.

Cheers




^ permalink raw reply	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH v3 1/2] gnu: xdg-desktop-portal: Update to 1.18.4.
  2024-07-02  5:18 [bug#71897] [PATCH 1/2] gnu: Add cppgir dan
                   ` (2 preceding siblings ...)
  2024-07-02 13:17 ` [bug#71897] [PATCH 1/3] " dan
@ 2024-07-03 13:22 ` dan
  2024-07-03 13:22   ` [bug#71897] [PATCH v3 2/2] gnu: telegram-desktop: Update to 5.2.2 dan
  2024-07-03 17:01   ` [bug#71897] [PATCH v3 1/2] gnu: xdg-desktop-portal: Update to 1.18.4 Liliana Marie Prikler
  2024-07-07 15:00 ` [bug#71897] [PATCH 1/5] " dan
                   ` (7 subsequent siblings)
  11 siblings, 2 replies; 98+ messages in thread
From: dan @ 2024-07-03 13:22 UTC (permalink / raw)
  To: 71897; +Cc: dan, Maxim Cournoyer, Liliana Marie Prikler

* gnu/packages/patches/xdg-desktop-portal-disable-portal-tests.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/freedesktop.scm (xdg-desktop-portal): Update to 1.18.4.
[patches]: Disable portal tests.
[native-inputs]: Remove autoconf, automake, libtool and which.  Add python,
python-dbusmock, python-pytest and python-pytest-xdist.
[inputs]: Add bubblewrap.
[phases]<#:configureflags>: Update flags to meson options.

Change-Id: Ic9876565e9119443fedd082273be4f372ebce1d4
---
 gnu/local.mk                                  |  1 +
 gnu/packages/freedesktop.scm                  | 25 +++++----
 ...-desktop-portal-disable-portal-tests.patch | 56 +++++++++++++++++++
 3 files changed, 72 insertions(+), 10 deletions(-)
 create mode 100644 gnu/packages/patches/xdg-desktop-portal-disable-portal-tests.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index cf6b1d61b3..973c4a5dad 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2240,6 +2240,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/wordnet-CVE-2008-3908-pt2.patch			\
   %D%/packages/patches/wpa-supplicant-dbus-group-policy.patch		\
   %D%/packages/patches/x265-arm-flags.patch			\
+  %D%/packages/patches/xdg-desktop-portal-disable-portal-tests.patch\
   %D%/packages/patches/xdg-desktop-portal-wlr-harcoded-length.patch\
   %D%/packages/patches/xen-docs-use-predictable-ordering.patch	\
   %D%/packages/patches/xen-remove-config.gz-timestamp.patch	\
diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index 6941450436..2015ee46f8 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -38,6 +38,7 @@
 ;;; Copyright © 2022 Samuel Culpepper <sculpepper@newstore.com>
 ;;; Copyright © 2024 aurtzy <aurtzy@gmail.com>
 ;;; Copyright © 2024 Dariqq <dariqq@posteo.net>
+;;; Copyright © 2024 dan <i@dan.games>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -133,6 +134,7 @@ (define-module (gnu packages freedesktop)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages valgrind)
   #:use-module (gnu packages video)
+  #:use-module (gnu packages virtualization)
   #:use-module (gnu packages w3m)
   #:use-module (gnu packages web)
   #:use-module (gnu packages xdisorg)
@@ -2989,7 +2991,7 @@ (define-public libportal
 (define-public xdg-desktop-portal
   (package
     (name "xdg-desktop-portal")
-    (version "1.16.0")
+    (version "1.18.4")
     (source
      (origin
        (method url-fetch)
@@ -2998,18 +3000,21 @@ (define-public xdg-desktop-portal
              version "/xdg-desktop-portal-" version ".tar.xz"))
        (sha256
         (base32
-         "06cczlh39kc41rvav06v37sad827y61rffy3v29i918ibj8sahav"))))
-    (build-system gnu-build-system)
+         "0r8y8qmzcfj7b7brqcxr9lg8pavfds815ffvj0kqc378fhgaln5q"))
+       ;; disable portal tests since they try to use fuse
+       (patches (search-patches "xdg-desktop-portal-disable-portal-tests.patch"))))
+    (build-system meson-build-system)
     (native-inputs
      `(("pkg-config" ,pkg-config)
-       ("autoconf" ,autoconf)
-       ("automake" ,automake)
-       ("libtool" ,libtool)
        ("glib:bin" ,glib "bin")
-       ("which" ,which)
-       ("gettext" ,gettext-minimal)))
+       ("gettext" ,gettext-minimal)
+       ("python" ,python)
+       ("python-dbusmock" ,python-dbusmock)
+       ("python-pytest" ,python-pytest)
+       ("python-pytest-xdist" ,python-pytest-xdist)))
     (inputs
-     `(("gdk-pixbuf" ,gdk-pixbuf)
+     `(("bubblewrap" ,bubblewrap)
+       ("gdk-pixbuf" ,gdk-pixbuf)
        ("glib" ,glib)
        ("flatpak" ,flatpak)
        ("fontconfig" ,fontconfig)
@@ -3021,7 +3026,7 @@ (define-public xdg-desktop-portal
        ("fuse" ,fuse)))
     (arguments
      `(#:configure-flags
-       (list "--with-systemd=no")
+       (list "-Dsystemd=disabled")
        #:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'po-chmod
diff --git a/gnu/packages/patches/xdg-desktop-portal-disable-portal-tests.patch b/gnu/packages/patches/xdg-desktop-portal-disable-portal-tests.patch
new file mode 100644
index 0000000000..5e13493613
--- /dev/null
+++ b/gnu/packages/patches/xdg-desktop-portal-disable-portal-tests.patch
@@ -0,0 +1,56 @@
+From b7750fa99c31c5f28ac2053fa154bef4038b5cc0 Mon Sep 17 00:00:00 2001
+From: dan <i@dan.games>
+Date: Tue, 2 Jul 2024 19:37:38 +0800
+Subject: [PATCH] tests: remove portal tests.
+
+---
+ tests/meson.build | 24 ------------------------
+ 1 file changed, 24 deletions(-)
+
+diff --git a/tests/meson.build b/tests/meson.build
+index a2dafee..bcd87be 100644
+--- a/tests/meson.build
++++ b/tests/meson.build
+@@ -181,18 +181,6 @@ portal_tests = [
+ 
+ test_env = env_tests
+ test_env.set('XDG_CURRENT_DESKTOP', 'test')
+-foreach p : portal_tests
+-    test(
+-      'test-portals-@0@'.format(p),
+-      test_portals,
+-      args: ['--verbose', '--keep-going', '--tap', '-p', '/portal/@0@'.format(p)],
+-      depends: [test_backends, test_portals],
+-      env: test_env,
+-      is_parallel: false,
+-      protocol: test_protocol,
+-      suite: 'portals',
+-    )
+-endforeach
+ 
+ # Split the portal tests into one test per portal, this makes debugging a lot
+ # easier.
+@@ -204,18 +192,6 @@ portal_limited = [
+ 
+ limited_env = env_tests
+ limited_env.set('XDG_CURRENT_DESKTOP', 'limited')
+-foreach p : portal_limited
+-    test(
+-      'limited-portals-@0@'.format(p),
+-      limited_portals,
+-      args: ['--verbose', '--keep-going', '--tap', '-p', '/limited/@0@'.format(p)],
+-      depends: [test_backends, limited_portals],
+-      env: limited_env,
+-      is_parallel: false,
+-      protocol: test_protocol,
+-      suite: 'portals',
+-    )
+-endforeach
+ 
+ if enable_installed_tests
+   install_data(
+
+base-commit: 11c8a96b147aeae70e3f770313f93b367d53fedd
+-- 
+2.41.0
+

base-commit: bab73e413b3421f4aa051e9438d147040a52e1be
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH v3 2/2] gnu: telegram-desktop: Update to 5.2.2.
  2024-07-03 13:22 ` [bug#71897] [PATCH v3 1/2] gnu: xdg-desktop-portal: Update to 1.18.4 dan
@ 2024-07-03 13:22   ` dan
  2024-07-03 17:06     ` Liliana Marie Prikler
  2024-07-03 17:01   ` [bug#71897] [PATCH v3 1/2] gnu: xdg-desktop-portal: Update to 1.18.4 Liliana Marie Prikler
  1 sibling, 1 reply; 98+ messages in thread
From: dan @ 2024-07-03 13:22 UTC (permalink / raw)
  To: 71897; +Cc: dan, Maxim Cournoyer, Liliana Marie Prikler

* 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): New variable.
(cppgir-for-telegram-desktop): New variable.
(telegram-desktop): Update to 5.2.2.
[arguments]<#:phases><unpack-additional-sources>: Add
libprisma-for-telegram-desktop.
<patch-gir-ignore-paths>: New phase.
<use-system-xdg-desktop-portal>: New phase.
[inputs]: Add boost, cppgir-for-telegram-desktop, expected-lite and
gobject-introspection.

Change-Id: I75441a6284e3755f510a7d3ba5746bfbb8acbb91
---
 gnu/local.mk                                  |   2 +
 .../telegram-desktop-unbundle-cppgir.patch    |  95 +++++++++++++
 .../telegram-desktop-unbundle-gsl.patch       |  31 +++++
 gnu/packages/telegram.scm                     | 129 +++++++++++++-----
 4 files changed, 226 insertions(+), 31 deletions(-)
 create mode 100644 gnu/packages/patches/telegram-desktop-unbundle-cppgir.patch
 create mode 100644 gnu/packages/patches/telegram-desktop-unbundle-gsl.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 973c4a5dad..2d4f866491 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2135,6 +2135,8 @@ dist_patch_DATA =						\
   %D%/packages/patches/texinfo-headings-single.patch		\
   %D%/packages/patches/texinfo-5-perl-compat.patch		\
   %D%/packages/patches/telegram-desktop-allow-disable-libtgvoip.patch   \
+  %D%/packages/patches/telegram-desktop-unbundle-cppgir.patch   \
+  %D%/packages/patches/telegram-desktop-unbundle-gsl.patch      \
   %D%/packages/patches/telegram-purple-adjust-test.patch	\
   %D%/packages/patches/teuchos-remove-duplicate-using.patch	\
   %D%/packages/patches/texi2html-document-encoding.patch	\
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/telegram.scm b/gnu/packages/telegram.scm
index 358374a5bb..533e976f6f 100644
--- a/gnu/packages/telegram.scm
+++ b/gnu/packages/telegram.scm
@@ -5,6 +5,7 @@
 ;;; Copyright © 2023 Lu Hui <luhux76@gmail.com>
 ;;; Copyright © 2023 Camilo Q.S. (Distopico) <distopico@riseup.net>
 ;;; Copyright © 2024 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2024 dan <i@dan.games>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -28,6 +29,7 @@ (define-module (gnu packages telegram)
   #:use-module (gnu packages assembly)
   #:use-module (gnu packages audio)
   #:use-module (gnu packages autotools)
+  #:use-module (gnu packages boost)
   #:use-module (gnu packages check)
   #:use-module (gnu packages cmake)
   #:use-module (gnu packages compression)
@@ -54,6 +56,7 @@ (define-module (gnu packages telegram)
   #:use-module (gnu packages lua)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages pretty-print)
   #:use-module (gnu packages protobuf)
   #:use-module (gnu packages pulseaudio)
   #:use-module (gnu packages python)
@@ -82,11 +85,11 @@ (define-module (gnu packages telegram)
   #:use-module (guix build-system python)
   #:use-module (guix build-system qt))
 
-(define %telegram-version "4.8.1")
+(define %telegram-version "5.2.2")
 
 (define libyuv-for-telegram-desktop
-  (let ((commit "77c2121f7e6b8e694d6e908bbbe9be24214097da")
-        (revision "2439"))
+  (let ((commit "04821d1e7d60845525e8db55c7bcd41ef5be9406")
+        (revision "2440"))
     (origin
       (method git-fetch)
       (uri (git-reference
@@ -97,67 +100,72 @@ (define libyuv-for-telegram-desktop
                   (git-version "0" revision commit)))
       (sha256
        (base32
-        "1b4k8yskr9ffl5k8s9i0af1gn1pavsfixla26vh8bij69rdr7f9c")))))
+        "1fsvc0f8mckrdzys8lnlnbw6676mjamm6p3ghr2h9liqfa83s6wg")))))
 
 (define cmake-helpers-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/cmake_helpers.git")
-          (commit "6ab5543b3dd1e40979d258e46d03376931b6c37b")))
+          (commit "5742caae65e4163e7faec238eb4e3e5c219ad09c")))
     (file-name
      (git-file-name "cmake-helpers-for-telegram-desktop" %telegram-version))
+    (patches
+     ;; https://github.com/desktop-app/cmake_helpers/pull/320
+     ;; https://github.com/desktop-app/cmake_helpers/pull/305
+     (search-patches "telegram-desktop-unbundle-gsl.patch"
+                     "telegram-desktop-unbundle-cppgir.patch"))
     (sha256
      (base32
-      "0y96mvzs113zh8bdw1h3i6l0pgwg93rigrday8kfdg4magz686k6"))))
+      "1ld74wd4gyx22gd132ci13sbzis7ypxqiyk4y0mrlhjvmciq9nw1"))))
 
 (define codegen-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/codegen.git")
-          (commit "1a969faa0afb29d53af03e530775eccdfb8433f1")))
+          (commit "0af136124083369073b8fdaf45f0816fd2b10bad")))
     (file-name
      (git-file-name "codegen-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "1xmw8dfm51p5g20rlmzqnr72a14ngyxwq09an8clf1v5s6mmwvak"))))
+      "057bwn9smrgnyfb1vraf50ihbkhjc4d72msl7vnbqc4h5sg8dav9"))))
 
 (define lib-base-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_base.git")
-          (commit "fd9adb30ee906ea02c125eaa58fcfae773fdc677")))
+          (commit "f30400147d997fedc787e214467d305db6c159e7")))
     (file-name
      (git-file-name "lib-base-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "1m760mcfvgzia53nrs6wvjn353jvzlzln7c9fkx2dhpkigiynz83"))))
+      "0mm88xj9q9v5p0z7byjfpbmw8h6rqg9ya9m0jhfzi2s8iglz0cga"))))
 
 (define lib-crl-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_crl.git")
-          (commit "3d7e1e1f1321c3defd21c01882d674e485ecd8df")))
+          (commit "078006d29af0002e6cd8c61a405cdeaf65b37142")))
     (file-name
      (git-file-name "lib-crl-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "06mzafnjpfr5ih297dh7bxm6bgpg0wy0gv2r2732n5szyrg9sdl6"))))
+      "18n88ghj3akpkxvllrh1rs19vd0d3xw87hd67qphr30b6ggqs9fd"))))
 
 (define lib-lottie-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_lottie.git")
-          (commit "3e9c2f1026e4b5aa3202fca4cc67ece36c7cebb2")))
+          (commit "1a700e5a0d7c3e2f617530354ff2a47c5c72bb4a")))
     (file-name
      (git-file-name "lib-lottie-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "0l57ibfij9xm4ww4s9cc63q1x8xzpc6ablwaji1krrn3xxksqdd4"))))
+      "18w35sz6k3wcv07v0szx3avpfdl0rjby6yqm1fzmx7fqw2jn6wpl"))))
 
 (define lib-qr-for-telegram-desktop
   (origin
@@ -188,24 +196,24 @@ (define lib-spellcheck-for-telegram-desktop
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_spellcheck.git")
-          (commit "ae89fefd239ecc47d4dab7ba29f9e230376a57d3")))
+          (commit "0b7622ff38778e9cd03d3997de59351973480a1f")))
     (file-name
      (git-file-name "lib-spellcheck-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "147xbbcza5q4wcdipk5jplajzkc48971kg2s7qv5jlz33sxkw1lq"))))
+      "0s9fjxpxxvj1xgzg3sfw6079blgmdvbb5cy6wb921sqaqwf52j6x"))))
 
 (define lib-storage-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_storage.git")
-          (commit "839609369d04615475cb1518636de3619106a917")))
+          (commit "0971b69ca90f1697ef81276d9820dcd6d26de4ac")))
     (file-name
      (git-file-name "lib-storage-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "1l26h2fmqp9dcpr6pfvdd5sjb68j7yh0ms2lnr8na7jf5xqmkwwm"))))
+      "0ihbh1ajns0sf42h9992hnawwjr1n439sgb0g4zirn2bj5i1zbdv"))))
 
 (define lib-tl-for-telegram-desktop
   (origin
@@ -224,52 +232,52 @@ (define lib-ui-for-telegram-desktop
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_ui.git")
-          (commit "37531086ec21a8569deddedb11b402f8a3157b90")))
+          (commit "ebd8609ee73d48186b905787dd5bb3bcbb4f9f3f")))
     (file-name
      (git-file-name "lib-ui-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "0l4baalwdiwcwzn3wgrbyiaryi70lswillbpkzcjpavaa2pjg6b0"))))
+      "0abpb0gi3k99pm5zh5gh9czhi48jqvr6wy0yli004hswlfqs2nxk"))))
 
 (define lib-webrtc-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_webrtc.git")
-          (commit "b68a95ad4d1ae9a1827671100a7fd76cbe448c3f")))
+          (commit "f701713cd798bd7d5f69d318fdefb125d101aa76")))
     (file-name
      (git-file-name "lib-webrtc-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "1c8jwdnn26n13yp0rp0l71q6xlxa6wp3cspbm3pnghw964jwgp3z"))))
+      "1hki5lc2jrack0r7wyixfh3c08jnmnw3pfrggrznvj4kq490z1b4"))))
 
 (define lib-webview-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_webview.git")
-          (commit "f632fc84cbc62ae8abbbd05f81d472757a337c11")))
+          (commit "659b9181240aae16c05ef8ab7e6c4dd527afcf8a")))
     (file-name
      (git-file-name "lib-webview-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "0idsfkxq7l9kgyrhifys5l4jkhvbyxkgkp0qdq9218h7g0ldw84i"))))
+      "1hg8jnpkszf3rrbnkqq9xc3n743602vkjp4kj8rccw7syjmgvrf1"))))
 
 (define tgcalls-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/TelegramMessenger/tgcalls.git")
-          (commit "2e2797648aac2588e7fe479c2e8b4455ec65c5e6")))
+          (commit "b9fa8b84d8abe741183f157218ac038c596a54a5")))
     (file-name
      (git-file-name "tgcalls-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "193m2gkvipijqbfd6a8mhg9nd63wlnshzgspk3pip57vk21l709z"))))
+      "1swni7xw5l0q376b6rnf9h93arzjqm9rkv7g6hz67742lf9a0x9z"))))
 
 (define-public webrtc-for-telegram-desktop
-  (let ((commit "0532942ac6176a66ef184fb728a4cbb02958fc0b")
-        (revision "389"))
+  (let ((commit "c9cc4390ab951f2cbc103ff783a11f398b27660b")
+        (revision "399"))
     (hidden-package
      (package
        (name "webrtc-for-telegram-desktop")
@@ -285,7 +293,7 @@ (define-public webrtc-for-telegram-desktop
           (file-name
            (git-file-name name version))
           (sha256
-           (base32 "0fary99yl1ddk5zjpfy0pyb5brd268j41plcnvv9qjyf0wj9hf2k"))
+           (base32 "0x2hjliiapb9kacbg8fwkz7g09c9k8dc77xxycjh5kmm1fc2i6dd"))
           (patches
            (search-patches
             ;; https://github.com/desktop-app/tg_owt/pull/123
@@ -400,6 +408,47 @@ (define cld3-for-telegram-desktop
     (base32
      "0ayrrhfdwrf4260h9fsirkhhfrcvc3qqnh6h9wj3ixij2lq0wwqb"))))
 
+(define libprisma-for-telegram-desktop
+  (origin
+   (method git-fetch)
+   (uri (git-reference
+         (url "https://github.com/desktop-app/libprisma")
+         (commit "23b0d70f9709da9b38561d5706891a134d18df76")))
+   (file-name
+    (git-file-name "libprisma-for-telegram-desktop" %telegram-version))
+   (sha256
+    (base32
+     "0fg4x4ikj7f3706bmfvkwq4smxc98qr3cgpm25w48n4ys6wfgadg"))))
+
+(define cppgir-for-telegram-desktop
+  (let ((commit "9c4f5820d94d62ab451501f016bfea97156518f4")
+        (revision "0"))
+    (package
+      (name "cppgir-for-telegram-desktop")
+      (version (git-version "2.0" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri
+          (git-reference
+           (url "https://gitlab.com/mnauw/cppgir")
+           (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "1fa9nf4yljfarihaqj5kd98yysrky7q316mh6l5b1rq39ga15k9b"))))
+      (build-system cmake-build-system)
+      (arguments
+       (list
+        #:configure-flags
+        #~(list "-DINTERNAL_EXPECTED=OFF")))
+      (inputs (list boost fmt expected-lite))
+      (home-page "https://gitlab.com/mnauw/cppgir")
+      (synopsis "GObject introspection C++ binding wrapper generator")
+      (description "cppgir processes .gir files derived from GObject
+introspection annotations into a set of C++ files defining suitable
+namespaces, classes and other types that together form a C++ binding.")
+      (license license:expat))))
+
 (define-public telegram-desktop
   (package
     (name "telegram-desktop")
@@ -415,7 +464,7 @@ (define-public telegram-desktop
        (file-name
         (git-file-name name version))
        (sha256
-        (base32 "0g47ffamh1csp79yzkv28v3qjkhjacj0c7pjf53n1ks80j5hc2j0"))
+        (base32 "0ik74jdvjlan34mykidgrk8d7p2b2y27ax5szvx7kdas7vmbl7k1"))
        (patches
         (search-patches
          ;; https://github.com/telegramdesktop/tdesktop/pull/24126
@@ -481,7 +530,20 @@ (define-public telegram-desktop
                       ("Telegram/lib_webrtc" #$lib-webrtc-for-telegram-desktop)
                       ("Telegram/lib_webview" #$lib-webview-for-telegram-desktop)
                       ("Telegram/ThirdParty/cld3" #$cld3-for-telegram-desktop)
+                      ("Telegram/ThirdParty/libprisma" #$libprisma-for-telegram-desktop)
                       ("Telegram/ThirdParty/tgcalls" #$tgcalls-for-telegram-desktop)))))
+               (add-after 'unpack-additional-sources 'patch-gir-ignore-paths
+                 (lambda _
+                   (substitute* "cmake/external/glib/generate_cppgir.cmake"
+                     (("\\$\\{cmake_helpers_loc\\}/external/glib/cppgir/data")
+                      (string-append #$(this-package-input "cppgir") "/share/cppgir")))))
+               (add-after 'unpack-additional-sources 'use-system-xdg-desktop-portal
+                 (lambda _
+                   (substitute* (list "Telegram/CMakeLists.txt"
+                                      "Telegram/lib_base/CMakeLists.txt")
+                     (("\\$\\{third_party_loc\\}/xdg-desktop-portal/data")
+                      (string-append #$(this-package-native-input "xdg-desktop-portal")
+                                     "/share/dbus-1/interfaces")))))
                (add-after 'install 'glib-or-gtk-compile-schemas
                  (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-compile-schemas))
                (add-after 'glib-or-gtk-compile-schemas 'glib-or-gtk-wrap
@@ -490,17 +552,22 @@ (define-public telegram-desktop
      (list `(,glib "bin")
            `(,gtk+ "bin")
            pkg-config
-           python-wrapper))
+           python-wrapper
+           xdg-desktop-portal))
     (inputs
      (list abseil-cpp-cxxstd17
            alsa-lib
+           boost
            c++-gsl
            crc32c
+           cppgir-for-telegram-desktop
+           expected-lite
            fcitx-qt5
            fcitx5-qt
            ffmpeg
            glib
            glibmm-2.76
+           gobject-introspection
            gtk+
            hime
            hunspell
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH v3 1/2] gnu: xdg-desktop-portal: Update to 1.18.4.
  2024-07-03 13:22 ` [bug#71897] [PATCH v3 1/2] gnu: xdg-desktop-portal: Update to 1.18.4 dan
  2024-07-03 13:22   ` [bug#71897] [PATCH v3 2/2] gnu: telegram-desktop: Update to 5.2.2 dan
@ 2024-07-03 17:01   ` Liliana Marie Prikler
  1 sibling, 0 replies; 98+ messages in thread
From: Liliana Marie Prikler @ 2024-07-03 17:01 UTC (permalink / raw)
  To: dan, 71897; +Cc: Maxim Cournoyer

Am Mittwoch, dem 03.07.2024 um 21:22 +0800 schrieb dan:
> * gnu/packages/patches/xdg-desktop-portal-disable-portal-tests.patch:
> New file.
> * gnu/local.mk (dist_patch_DATA): Register it.
> * gnu/packages/freedesktop.scm (xdg-desktop-portal): Update to
> 1.18.4.
> [patches]: Disable portal tests.
> [native-inputs]: Remove autoconf, automake, libtool and which.  Add
> python,
> python-dbusmock, python-pytest and python-pytest-xdist.
> [inputs]: Add bubblewrap.
> [phases]<#:configureflags>: Update flags to meson options.
Nit-pick: you misspelled #:configure-flags.

> Change-Id: Ic9876565e9119443fedd082273be4f372ebce1d4
> ---
>  gnu/local.mk                                  |  1 +
>  gnu/packages/freedesktop.scm                  | 25 +++++----
>  ...-desktop-portal-disable-portal-tests.patch | 56
> +++++++++++++++++++
>  3 files changed, 72 insertions(+), 10 deletions(-)
>  create mode 100644 gnu/packages/patches/xdg-desktop-portal-disable-
> portal-tests.patch
> 
> diff --git a/gnu/local.mk b/gnu/local.mk
> index cf6b1d61b3..973c4a5dad 100644
> --- a/gnu/local.mk
> +++ b/gnu/local.mk
> @@ -2240,6 +2240,7 @@ dist_patch_DATA
> =                                         \
>    %D%/packages/patches/wordnet-CVE-2008-3908-
> pt2.patch                 \
>    %D%/packages/patches/wpa-supplicant-dbus-group-
> policy.patch          \
>    %D%/packages/patches/x265-arm-flags.patch                    \
> +  %D%/packages/patches/xdg-desktop-portal-disable-portal-
> tests.patch\
>    %D%/packages/patches/xdg-desktop-portal-wlr-harcoded-length.patch\
>    %D%/packages/patches/xen-docs-use-predictable-ordering.patch \
>    %D%/packages/patches/xen-remove-config.gz-timestamp.patch    \
> diff --git a/gnu/packages/freedesktop.scm
> b/gnu/packages/freedesktop.scm
> index 6941450436..2015ee46f8 100644
> --- a/gnu/packages/freedesktop.scm
> +++ b/gnu/packages/freedesktop.scm
> @@ -38,6 +38,7 @@
>  ;;; Copyright © 2022 Samuel Culpepper <sculpepper@newstore.com>
>  ;;; Copyright © 2024 aurtzy <aurtzy@gmail.com>
>  ;;; Copyright © 2024 Dariqq <dariqq@posteo.net>
> +;;; Copyright © 2024 dan <i@dan.games>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -133,6 +134,7 @@ (define-module (gnu packages freedesktop)
>    #:use-module (gnu packages tls)
>    #:use-module (gnu packages valgrind)
>    #:use-module (gnu packages video)
> +  #:use-module (gnu packages virtualization)
>    #:use-module (gnu packages w3m)
>    #:use-module (gnu packages web)
>    #:use-module (gnu packages xdisorg)
> @@ -2989,7 +2991,7 @@ (define-public libportal
>  (define-public xdg-desktop-portal
>    (package
>      (name "xdg-desktop-portal")
> -    (version "1.16.0")
> +    (version "1.18.4")
>      (source
>       (origin
>         (method url-fetch)
> @@ -2998,18 +3000,21 @@ (define-public xdg-desktop-portal
>               version "/xdg-desktop-portal-" version ".tar.xz"))
>         (sha256
>          (base32
> -         "06cczlh39kc41rvav06v37sad827y61rffy3v29i918ibj8sahav"))))
> -    (build-system gnu-build-system)
> +         "0r8y8qmzcfj7b7brqcxr9lg8pavfds815ffvj0kqc378fhgaln5q"))
> +       ;; disable portal tests since they try to use fuse
> +       (patches (search-patches "xdg-desktop-portal-disable-portal-
> tests.patch"))))
> +    (build-system meson-build-system)
>      (native-inputs
>       `(("pkg-config" ,pkg-config)
> -       ("autoconf" ,autoconf)
> -       ("automake" ,automake)
> -       ("libtool" ,libtool)
>         ("glib:bin" ,glib "bin")
> -       ("which" ,which)
> -       ("gettext" ,gettext-minimal)))
> +       ("gettext" ,gettext-minimal)
> +       ("python" ,python)
> +       ("python-dbusmock" ,python-dbusmock)
> +       ("python-pytest" ,python-pytest)
> +       ("python-pytest-xdist" ,python-pytest-xdist)))
>      (inputs
> -     `(("gdk-pixbuf" ,gdk-pixbuf)
> +     `(("bubblewrap" ,bubblewrap)
> +       ("gdk-pixbuf" ,gdk-pixbuf)
>         ("glib" ,glib)
>         ("flatpak" ,flatpak)
>         ("fontconfig" ,fontconfig)
Since this is still using old-style inputs, it would be nice to follow
up with a styling commit.


Cheers

^ permalink raw reply	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH v3 2/2] gnu: telegram-desktop: Update to 5.2.2.
  2024-07-03 13:22   ` [bug#71897] [PATCH v3 2/2] gnu: telegram-desktop: Update to 5.2.2 dan
@ 2024-07-03 17:06     ` Liliana Marie Prikler
  2024-07-03 17:18       ` dan
  0 siblings, 1 reply; 98+ messages in thread
From: Liliana Marie Prikler @ 2024-07-03 17:06 UTC (permalink / raw)
  To: dan, 71897; +Cc: Maxim Cournoyer

Am Mittwoch, dem 03.07.2024 um 21:22 +0800 schrieb dan:
> * 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.
Note: ChangeLog format uses closing braces.
> (cmake-helpers-for-telegram-desktop)[origin]: Add patches to unbundle
> gsl and
> cppgir.
> (libprisma-for-telegram-desktop): New variable.
> (cppgir-for-telegram-desktop): New variable.
Introduce these in their own commits.
> (telegram-desktop): Update to 5.2.2.
> [arguments]<#:phases><unpack-additional-sources>: Add
Shorten this to just [#:phases] – you're not using any other
[arguments], and repeating the same brackets would be confusing.
> libprisma-for-telegram-desktop.
> <patch-gir-ignore-paths>: New phase.
> <use-system-xdg-desktop-portal>: New phase.
> [inputs]: Add boost, cppgir-for-telegram-desktop, expected-lite and
> gobject-introspection.
Lexically, the rest LGTM, but I ain't subject my weak machine to that
build.  Let's see if CI can handle this for us.

Cheers




^ permalink raw reply	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH v3 2/2] gnu: telegram-desktop: Update to 5.2.2.
  2024-07-03 17:06     ` Liliana Marie Prikler
@ 2024-07-03 17:18       ` dan
  2024-07-03 17:22         ` dan
  0 siblings, 1 reply; 98+ messages in thread
From: dan @ 2024-07-03 17:18 UTC (permalink / raw)
  To: Liliana Marie Prikler; +Cc: Maxim Cournoyer, 71897

Jul 4, 2024 01:06:06 Liliana Marie Prikler <liliana.prikler@gmail.com>:
>
>> (libprisma-for-telegram-desktop): New variable.
>> (cppgir-for-telegram-desktop): New variable.
> Introduce these in their own commits.
But these variables depend on the new %telegram-desktop-version, which is 
only updated in this commit.  Personally I feel more comfortable sticking 
these changes together, although it's a bit less ideal.  I would like to 
know if there are better ways to do so.




^ permalink raw reply	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH v3 2/2] gnu: telegram-desktop: Update to 5.2.2.
  2024-07-03 17:18       ` dan
@ 2024-07-03 17:22         ` dan
  2024-07-03 18:21           ` Liliana Marie Prikler
  0 siblings, 1 reply; 98+ messages in thread
From: dan @ 2024-07-03 17:22 UTC (permalink / raw)
  To: Liliana Marie Prikler; +Cc: Maxim Cournoyer, 71897

Jul 4, 2024 01:18:19 dan <i@dan.games>:

> Jul 4, 2024 01:06:06 Liliana Marie Prikler <liliana.prikler@gmail.com>:
>>
>>> (libprisma-for-telegram-desktop): New variable.
>>> (cppgir-for-telegram-desktop): New variable.
>> Introduce these in their own commits.
> But these variables depend on the new %telegram-desktop-version, which 
> is only updated in this commit.  Personally I feel more comfortable 
> sticking these changes together, although it's a bit less ideal.  I 
> would like to know if there are better ways to do so.
Oh I misread, cppgir probably can be split to a dedicated commit since 
it's using their own version number.




^ permalink raw reply	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH v3 2/2] gnu: telegram-desktop: Update to 5.2.2.
  2024-07-03 17:22         ` dan
@ 2024-07-03 18:21           ` Liliana Marie Prikler
  0 siblings, 0 replies; 98+ messages in thread
From: Liliana Marie Prikler @ 2024-07-03 18:21 UTC (permalink / raw)
  To: dan; +Cc: Maxim Cournoyer, 71897

Am Donnerstag, dem 04.07.2024 um 01:22 +0800 schrieb dan:
> Jul 4, 2024 01:18:19 dan <i@dan.games>:
> 
> > Jul 4, 2024 01:06:06 Liliana Marie Prikler
> > <liliana.prikler@gmail.com>:
> > > 
> > > > (libprisma-for-telegram-desktop): New variable.
> > > > (cppgir-for-telegram-desktop): New variable.
> > > Introduce these in their own commits.
> > But these variables depend on the new %telegram-desktop-version,
> > which is only updated in this commit.  Personally I feel more
> > comfortable sticking these changes together, although it's a bit
> > less ideal.  I would like to know if there are better ways to do
> > so.
> Oh I misread, cppgir probably can be split to a dedicated commit
> since it's using their own version number.
For libprisma, assuming it uses %telegram-desktop-version, you can make
it to do so in the commit that updates telegram and hardcode the
version prior to that.

Cheers




^ permalink raw reply	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH 1/5] gnu: xdg-desktop-portal: Update to 1.18.4.
  2024-07-02  5:18 [bug#71897] [PATCH 1/2] gnu: Add cppgir dan
                   ` (3 preceding siblings ...)
  2024-07-03 13:22 ` [bug#71897] [PATCH v3 1/2] gnu: xdg-desktop-portal: Update to 1.18.4 dan
@ 2024-07-07 15:00 ` dan
  2024-07-07 15:00   ` [bug#71897] [PATCH 2/5] gnu: xdg-desktop-portal: Update input style dan
                     ` (4 more replies)
  2024-07-14 15:48 ` [bug#71897] [PATCH v5 1/6] " dan
                   ` (6 subsequent siblings)
  11 siblings, 5 replies; 98+ messages in thread
From: dan @ 2024-07-07 15:00 UTC (permalink / raw)
  To: 71897; +Cc: dan, Maxim Cournoyer, Liliana Marie Prikler

* gnu/packages/patches/xdg-desktop-portal-disable-portal-tests.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/freedesktop.scm (xdg-desktop-portal): Update to 1.18.4.
[patches]: Disable portal tests.
[native-inputs]: Remove autoconf, automake, libtool and which.  Add python,
python-dbusmock, python-pytest and python-pytest-xdist.
[inputs]: Add bubblewrap.
[phases]<#:configure-flags>: Update flags to meson options.

Change-Id: Ic9876565e9119443fedd082273be4f372ebce1d4
---
 gnu/local.mk                                  |  1 +
 gnu/packages/freedesktop.scm                  | 25 +++++----
 ...-desktop-portal-disable-portal-tests.patch | 56 +++++++++++++++++++
 3 files changed, 72 insertions(+), 10 deletions(-)
 create mode 100644 gnu/packages/patches/xdg-desktop-portal-disable-portal-tests.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 329eaf9358..bb53b08b8e 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2240,6 +2240,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/wordnet-CVE-2008-3908-pt2.patch			\
   %D%/packages/patches/wpa-supplicant-dbus-group-policy.patch		\
   %D%/packages/patches/x265-arm-flags.patch			\
+  %D%/packages/patches/xdg-desktop-portal-disable-portal-tests.patch\
   %D%/packages/patches/xdg-desktop-portal-wlr-harcoded-length.patch\
   %D%/packages/patches/xen-docs-use-predictable-ordering.patch	\
   %D%/packages/patches/xen-remove-config.gz-timestamp.patch	\
diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index 6941450436..2015ee46f8 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -38,6 +38,7 @@
 ;;; Copyright © 2022 Samuel Culpepper <sculpepper@newstore.com>
 ;;; Copyright © 2024 aurtzy <aurtzy@gmail.com>
 ;;; Copyright © 2024 Dariqq <dariqq@posteo.net>
+;;; Copyright © 2024 dan <i@dan.games>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -133,6 +134,7 @@ (define-module (gnu packages freedesktop)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages valgrind)
   #:use-module (gnu packages video)
+  #:use-module (gnu packages virtualization)
   #:use-module (gnu packages w3m)
   #:use-module (gnu packages web)
   #:use-module (gnu packages xdisorg)
@@ -2989,7 +2991,7 @@ (define-public libportal
 (define-public xdg-desktop-portal
   (package
     (name "xdg-desktop-portal")
-    (version "1.16.0")
+    (version "1.18.4")
     (source
      (origin
        (method url-fetch)
@@ -2998,18 +3000,21 @@ (define-public xdg-desktop-portal
              version "/xdg-desktop-portal-" version ".tar.xz"))
        (sha256
         (base32
-         "06cczlh39kc41rvav06v37sad827y61rffy3v29i918ibj8sahav"))))
-    (build-system gnu-build-system)
+         "0r8y8qmzcfj7b7brqcxr9lg8pavfds815ffvj0kqc378fhgaln5q"))
+       ;; disable portal tests since they try to use fuse
+       (patches (search-patches "xdg-desktop-portal-disable-portal-tests.patch"))))
+    (build-system meson-build-system)
     (native-inputs
      `(("pkg-config" ,pkg-config)
-       ("autoconf" ,autoconf)
-       ("automake" ,automake)
-       ("libtool" ,libtool)
        ("glib:bin" ,glib "bin")
-       ("which" ,which)
-       ("gettext" ,gettext-minimal)))
+       ("gettext" ,gettext-minimal)
+       ("python" ,python)
+       ("python-dbusmock" ,python-dbusmock)
+       ("python-pytest" ,python-pytest)
+       ("python-pytest-xdist" ,python-pytest-xdist)))
     (inputs
-     `(("gdk-pixbuf" ,gdk-pixbuf)
+     `(("bubblewrap" ,bubblewrap)
+       ("gdk-pixbuf" ,gdk-pixbuf)
        ("glib" ,glib)
        ("flatpak" ,flatpak)
        ("fontconfig" ,fontconfig)
@@ -3021,7 +3026,7 @@ (define-public xdg-desktop-portal
        ("fuse" ,fuse)))
     (arguments
      `(#:configure-flags
-       (list "--with-systemd=no")
+       (list "-Dsystemd=disabled")
        #:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'po-chmod
diff --git a/gnu/packages/patches/xdg-desktop-portal-disable-portal-tests.patch b/gnu/packages/patches/xdg-desktop-portal-disable-portal-tests.patch
new file mode 100644
index 0000000000..5e13493613
--- /dev/null
+++ b/gnu/packages/patches/xdg-desktop-portal-disable-portal-tests.patch
@@ -0,0 +1,56 @@
+From b7750fa99c31c5f28ac2053fa154bef4038b5cc0 Mon Sep 17 00:00:00 2001
+From: dan <i@dan.games>
+Date: Tue, 2 Jul 2024 19:37:38 +0800
+Subject: [PATCH] tests: remove portal tests.
+
+---
+ tests/meson.build | 24 ------------------------
+ 1 file changed, 24 deletions(-)
+
+diff --git a/tests/meson.build b/tests/meson.build
+index a2dafee..bcd87be 100644
+--- a/tests/meson.build
++++ b/tests/meson.build
+@@ -181,18 +181,6 @@ portal_tests = [
+ 
+ test_env = env_tests
+ test_env.set('XDG_CURRENT_DESKTOP', 'test')
+-foreach p : portal_tests
+-    test(
+-      'test-portals-@0@'.format(p),
+-      test_portals,
+-      args: ['--verbose', '--keep-going', '--tap', '-p', '/portal/@0@'.format(p)],
+-      depends: [test_backends, test_portals],
+-      env: test_env,
+-      is_parallel: false,
+-      protocol: test_protocol,
+-      suite: 'portals',
+-    )
+-endforeach
+ 
+ # Split the portal tests into one test per portal, this makes debugging a lot
+ # easier.
+@@ -204,18 +192,6 @@ portal_limited = [
+ 
+ limited_env = env_tests
+ limited_env.set('XDG_CURRENT_DESKTOP', 'limited')
+-foreach p : portal_limited
+-    test(
+-      'limited-portals-@0@'.format(p),
+-      limited_portals,
+-      args: ['--verbose', '--keep-going', '--tap', '-p', '/limited/@0@'.format(p)],
+-      depends: [test_backends, limited_portals],
+-      env: limited_env,
+-      is_parallel: false,
+-      protocol: test_protocol,
+-      suite: 'portals',
+-    )
+-endforeach
+ 
+ if enable_installed_tests
+   install_data(
+
+base-commit: 11c8a96b147aeae70e3f770313f93b367d53fedd
+-- 
+2.41.0
+

base-commit: c86a07bacc2469e7a00fbc66cfe4f322e4bafb06
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH 2/5] gnu: xdg-desktop-portal: Update input style.
  2024-07-07 15:00 ` [bug#71897] [PATCH 1/5] " dan
@ 2024-07-07 15:00   ` dan
  2024-07-09  2:14     ` Maxim Cournoyer
  2024-07-07 15:00   ` [bug#71897] [PATCH 3/5] gnu: Add cppgir-for-telegram-desktop dan
                     ` (3 subsequent siblings)
  4 siblings, 1 reply; 98+ messages in thread
From: dan @ 2024-07-07 15:00 UTC (permalink / raw)
  To: 71897; +Cc: dan, Maxim Cournoyer, Liliana Marie Prikler

* gnu/packages/freedesktop.scm (xdg-desktop-portal): Update input style.

Change-Id: Iec0630cd945dfcd4db67af30211cbfd4d058766d
---
 gnu/packages/freedesktop.scm | 36 ++++++++++++++++++------------------
 1 file changed, 18 insertions(+), 18 deletions(-)

diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index 2015ee46f8..28954451d5 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -3005,25 +3005,25 @@ (define-public xdg-desktop-portal
        (patches (search-patches "xdg-desktop-portal-disable-portal-tests.patch"))))
     (build-system meson-build-system)
     (native-inputs
-     `(("pkg-config" ,pkg-config)
-       ("glib:bin" ,glib "bin")
-       ("gettext" ,gettext-minimal)
-       ("python" ,python)
-       ("python-dbusmock" ,python-dbusmock)
-       ("python-pytest" ,python-pytest)
-       ("python-pytest-xdist" ,python-pytest-xdist)))
+     (list gettext-minimal
+           (list glib "bin")
+           pkg-config
+           python
+           python-dbusmock
+           python-pytest
+           python-pytest-xdist))
     (inputs
-     `(("bubblewrap" ,bubblewrap)
-       ("gdk-pixbuf" ,gdk-pixbuf)
-       ("glib" ,glib)
-       ("flatpak" ,flatpak)
-       ("fontconfig" ,fontconfig)
-       ("json-glib" ,json-glib)
-       ("libportal" ,libportal)
-       ("dbus" ,dbus)
-       ("geoclue" ,geoclue)
-       ("pipewire" ,pipewire)
-       ("fuse" ,fuse)))
+     (list bubblewrap
+           dbus
+           flatpak
+           fontconfig
+           fuse
+           gdk-pixbuf
+           geoclue
+           glib
+           json-glib
+           libportal
+           pipewire))
     (arguments
      `(#:configure-flags
        (list "-Dsystemd=disabled")
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH 3/5] gnu: Add cppgir-for-telegram-desktop.
  2024-07-07 15:00 ` [bug#71897] [PATCH 1/5] " dan
  2024-07-07 15:00   ` [bug#71897] [PATCH 2/5] gnu: xdg-desktop-portal: Update input style dan
@ 2024-07-07 15:00   ` dan
  2024-07-09  2:25     ` Maxim Cournoyer
  2024-07-07 15:00   ` [bug#71897] [PATCH 4/5] gnu: Add libprisma-for-telegram-desktop dan
                     ` (2 subsequent siblings)
  4 siblings, 1 reply; 98+ messages in thread
From: dan @ 2024-07-07 15:00 UTC (permalink / raw)
  To: 71897; +Cc: dan, Maxim Cournoyer, Liliana Marie Prikler

* gnu/packages/telegram.scm (cppgir-for-telegram-desktop): New variable.

Change-Id: I4bb37f9ebc6cfd711ad83f29cd95bc72c0d3bf45
---
 gnu/packages/telegram.scm | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/gnu/packages/telegram.scm b/gnu/packages/telegram.scm
index 358374a5bb..26ab27293f 100644
--- a/gnu/packages/telegram.scm
+++ b/gnu/packages/telegram.scm
@@ -400,6 +400,35 @@ (define cld3-for-telegram-desktop
     (base32
      "0ayrrhfdwrf4260h9fsirkhhfrcvc3qqnh6h9wj3ixij2lq0wwqb"))))
 
+(define cppgir-for-telegram-desktop
+  (let ((commit "9c4f5820d94d62ab451501f016bfea97156518f4")
+        (revision "0"))
+    (package
+      (name "cppgir-for-telegram-desktop")
+      (version (git-version "2.0" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri
+          (git-reference
+           (url "https://gitlab.com/mnauw/cppgir")
+           (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "1fa9nf4yljfarihaqj5kd98yysrky7q316mh6l5b1rq39ga15k9b"))))
+      (build-system cmake-build-system)
+      (arguments
+       (list
+        #:configure-flags
+        #~(list "-DINTERNAL_EXPECTED=OFF")))
+      (inputs (list boost fmt expected-lite))
+      (home-page "https://gitlab.com/mnauw/cppgir")
+      (synopsis "GObject introspection C++ binding wrapper generator")
+      (description "cppgir processes .gir files derived from GObject
+introspection annotations into a set of C++ files defining suitable
+namespaces, classes and other types that together form a C++ binding.")
+      (license license:expat))))
+
 (define-public telegram-desktop
   (package
     (name "telegram-desktop")
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH 4/5] gnu: Add libprisma-for-telegram-desktop.
  2024-07-07 15:00 ` [bug#71897] [PATCH 1/5] " dan
  2024-07-07 15:00   ` [bug#71897] [PATCH 2/5] gnu: xdg-desktop-portal: Update input style dan
  2024-07-07 15:00   ` [bug#71897] [PATCH 3/5] gnu: Add cppgir-for-telegram-desktop dan
@ 2024-07-07 15:00   ` dan
  2024-07-09  2:29     ` Maxim Cournoyer
  2024-07-07 15:00   ` [bug#71897] [PATCH 5/5] gnu: telegram-desktop: Update to 5.2.3 dan
  2024-07-09  2:14   ` [bug#71897] [PATCH 1/5] gnu: xdg-desktop-portal: Update to 1.18.4 Maxim Cournoyer
  4 siblings, 1 reply; 98+ messages in thread
From: dan @ 2024-07-07 15:00 UTC (permalink / raw)
  To: 71897; +Cc: dan, Maxim Cournoyer, Liliana Marie Prikler

* gnu/packages/telegram.scm (libprisma-for-telegram-desktop): New variable.

Change-Id: I855b463993654a8cad491c7b56c9581b3083f5e4
---
 gnu/packages/telegram.scm | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/gnu/packages/telegram.scm b/gnu/packages/telegram.scm
index 26ab27293f..0a48361eb4 100644
--- a/gnu/packages/telegram.scm
+++ b/gnu/packages/telegram.scm
@@ -400,6 +400,18 @@ (define cld3-for-telegram-desktop
     (base32
      "0ayrrhfdwrf4260h9fsirkhhfrcvc3qqnh6h9wj3ixij2lq0wwqb"))))
 
+(define libprisma-for-telegram-desktop
+  (origin
+   (method git-fetch)
+   (uri (git-reference
+         (url "https://github.com/desktop-app/libprisma")
+         (commit "23b0d70f9709da9b38561d5706891a134d18df76")))
+   (file-name
+    (git-file-name "libprisma-for-telegram-desktop" "5.2.3"))
+   (sha256
+    (base32
+     "0fg4x4ikj7f3706bmfvkwq4smxc98qr3cgpm25w48n4ys6wfgadg"))))
+
 (define cppgir-for-telegram-desktop
   (let ((commit "9c4f5820d94d62ab451501f016bfea97156518f4")
         (revision "0"))
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH 5/5] gnu: telegram-desktop: Update to 5.2.3.
  2024-07-07 15:00 ` [bug#71897] [PATCH 1/5] " dan
                     ` (2 preceding siblings ...)
  2024-07-07 15:00   ` [bug#71897] [PATCH 4/5] gnu: Add libprisma-for-telegram-desktop dan
@ 2024-07-07 15:00   ` dan
  2024-07-09  2:35     ` Maxim Cournoyer
  2024-07-09  2:14   ` [bug#71897] [PATCH 1/5] gnu: xdg-desktop-portal: Update to 1.18.4 Maxim Cournoyer
  4 siblings, 1 reply; 98+ messages in thread
From: dan @ 2024-07-07 15:00 UTC (permalink / raw)
  To: 71897; +Cc: dan, Maxim Cournoyer, Liliana Marie Prikler

* 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.2.3.
[#:phases]<unpack-additional-sources>: Add libprisma-for-telegram-desktop.
  <patch-gir-ignore-paths>: New phase.
  <use-system-xdg-desktop-portal>: New phase.
[native-inputs]: Add xdg-desktop-portal.
[inputs]: Add boost, cppgir-for-telegram-desktop, expected-lite and
gobject-introspection.

Change-Id: I78df3434a2cd04afc54107b7fecd5e5a8df85564
---
 gnu/local.mk                                  |  2 +
 .../telegram-desktop-unbundle-cppgir.patch    | 95 +++++++++++++++++++
 .../telegram-desktop-unbundle-gsl.patch       | 31 ++++++
 gnu/packages/telegram.scm                     | 90 +++++++++++-------
 4 files changed, 186 insertions(+), 32 deletions(-)
 create mode 100644 gnu/packages/patches/telegram-desktop-unbundle-cppgir.patch
 create mode 100644 gnu/packages/patches/telegram-desktop-unbundle-gsl.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index bb53b08b8e..396cd72fcf 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2135,6 +2135,8 @@ dist_patch_DATA =						\
   %D%/packages/patches/texinfo-headings-single.patch		\
   %D%/packages/patches/texinfo-5-perl-compat.patch		\
   %D%/packages/patches/telegram-desktop-allow-disable-libtgvoip.patch   \
+  %D%/packages/patches/telegram-desktop-unbundle-cppgir.patch   \
+  %D%/packages/patches/telegram-desktop-unbundle-gsl.patch      \
   %D%/packages/patches/telegram-purple-adjust-test.patch	\
   %D%/packages/patches/teuchos-remove-duplicate-using.patch	\
   %D%/packages/patches/texi2html-document-encoding.patch	\
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/telegram.scm b/gnu/packages/telegram.scm
index 0a48361eb4..f4bba8cae9 100644
--- a/gnu/packages/telegram.scm
+++ b/gnu/packages/telegram.scm
@@ -5,6 +5,7 @@
 ;;; Copyright © 2023 Lu Hui <luhux76@gmail.com>
 ;;; Copyright © 2023 Camilo Q.S. (Distopico) <distopico@riseup.net>
 ;;; Copyright © 2024 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2024 dan <i@dan.games>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -28,6 +29,7 @@ (define-module (gnu packages telegram)
   #:use-module (gnu packages assembly)
   #:use-module (gnu packages audio)
   #:use-module (gnu packages autotools)
+  #:use-module (gnu packages boost)
   #:use-module (gnu packages check)
   #:use-module (gnu packages cmake)
   #:use-module (gnu packages compression)
@@ -54,6 +56,7 @@ (define-module (gnu packages telegram)
   #:use-module (gnu packages lua)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages pretty-print)
   #:use-module (gnu packages protobuf)
   #:use-module (gnu packages pulseaudio)
   #:use-module (gnu packages python)
@@ -82,11 +85,11 @@ (define-module (gnu packages telegram)
   #:use-module (guix build-system python)
   #:use-module (guix build-system qt))
 
-(define %telegram-version "4.8.1")
+(define %telegram-version "5.2.3")
 
 (define libyuv-for-telegram-desktop
-  (let ((commit "77c2121f7e6b8e694d6e908bbbe9be24214097da")
-        (revision "2439"))
+  (let ((commit "04821d1e7d60845525e8db55c7bcd41ef5be9406")
+        (revision "2440"))
     (origin
       (method git-fetch)
       (uri (git-reference
@@ -97,67 +100,72 @@ (define libyuv-for-telegram-desktop
                   (git-version "0" revision commit)))
       (sha256
        (base32
-        "1b4k8yskr9ffl5k8s9i0af1gn1pavsfixla26vh8bij69rdr7f9c")))))
+        "1fsvc0f8mckrdzys8lnlnbw6676mjamm6p3ghr2h9liqfa83s6wg")))))
 
 (define cmake-helpers-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/cmake_helpers.git")
-          (commit "6ab5543b3dd1e40979d258e46d03376931b6c37b")))
+          (commit "4a4bc4cd34b3ade038541a2b8b2c79f05393d67b")))
     (file-name
      (git-file-name "cmake-helpers-for-telegram-desktop" %telegram-version))
+    (patches
+     ;; https://github.com/desktop-app/cmake_helpers/pull/320
+     ;; https://github.com/desktop-app/cmake_helpers/pull/305
+     (search-patches "telegram-desktop-unbundle-gsl.patch"
+                     "telegram-desktop-unbundle-cppgir.patch"))
     (sha256
      (base32
-      "0y96mvzs113zh8bdw1h3i6l0pgwg93rigrday8kfdg4magz686k6"))))
+      "129m2wy3jyrcngsln46k7cl00jjg30kj9kdfil7aq9c23z3iqvm8"))))
 
 (define codegen-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/codegen.git")
-          (commit "1a969faa0afb29d53af03e530775eccdfb8433f1")))
+          (commit "0af136124083369073b8fdaf45f0816fd2b10bad")))
     (file-name
      (git-file-name "codegen-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "1xmw8dfm51p5g20rlmzqnr72a14ngyxwq09an8clf1v5s6mmwvak"))))
+      "057bwn9smrgnyfb1vraf50ihbkhjc4d72msl7vnbqc4h5sg8dav9"))))
 
 (define lib-base-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_base.git")
-          (commit "fd9adb30ee906ea02c125eaa58fcfae773fdc677")))
+          (commit "1a50fd2300da3198e751a22bf728d33822180e15")))
     (file-name
      (git-file-name "lib-base-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "1m760mcfvgzia53nrs6wvjn353jvzlzln7c9fkx2dhpkigiynz83"))))
+      "1hyhqz6mwdmcs6wcglz3hwlzl1n04lfi22d3n75ad40qfc9kh3ci"))))
 
 (define lib-crl-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_crl.git")
-          (commit "3d7e1e1f1321c3defd21c01882d674e485ecd8df")))
+          (commit "078006d29af0002e6cd8c61a405cdeaf65b37142")))
     (file-name
      (git-file-name "lib-crl-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "06mzafnjpfr5ih297dh7bxm6bgpg0wy0gv2r2732n5szyrg9sdl6"))))
+      "18n88ghj3akpkxvllrh1rs19vd0d3xw87hd67qphr30b6ggqs9fd"))))
 
 (define lib-lottie-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_lottie.git")
-          (commit "3e9c2f1026e4b5aa3202fca4cc67ece36c7cebb2")))
+          (commit "1a700e5a0d7c3e2f617530354ff2a47c5c72bb4a")))
     (file-name
      (git-file-name "lib-lottie-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "0l57ibfij9xm4ww4s9cc63q1x8xzpc6ablwaji1krrn3xxksqdd4"))))
+      "18w35sz6k3wcv07v0szx3avpfdl0rjby6yqm1fzmx7fqw2jn6wpl"))))
 
 (define lib-qr-for-telegram-desktop
   (origin
@@ -188,24 +196,24 @@ (define lib-spellcheck-for-telegram-desktop
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_spellcheck.git")
-          (commit "ae89fefd239ecc47d4dab7ba29f9e230376a57d3")))
+          (commit "0b7622ff38778e9cd03d3997de59351973480a1f")))
     (file-name
      (git-file-name "lib-spellcheck-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "147xbbcza5q4wcdipk5jplajzkc48971kg2s7qv5jlz33sxkw1lq"))))
+      "0s9fjxpxxvj1xgzg3sfw6079blgmdvbb5cy6wb921sqaqwf52j6x"))))
 
 (define lib-storage-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_storage.git")
-          (commit "839609369d04615475cb1518636de3619106a917")))
+          (commit "0971b69ca90f1697ef81276d9820dcd6d26de4ac")))
     (file-name
      (git-file-name "lib-storage-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "1l26h2fmqp9dcpr6pfvdd5sjb68j7yh0ms2lnr8na7jf5xqmkwwm"))))
+      "0ihbh1ajns0sf42h9992hnawwjr1n439sgb0g4zirn2bj5i1zbdv"))))
 
 (define lib-tl-for-telegram-desktop
   (origin
@@ -224,52 +232,52 @@ (define lib-ui-for-telegram-desktop
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_ui.git")
-          (commit "37531086ec21a8569deddedb11b402f8a3157b90")))
+          (commit "96be2a6b72f0405a9c01407148303fba2dab101c")))
     (file-name
      (git-file-name "lib-ui-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "0l4baalwdiwcwzn3wgrbyiaryi70lswillbpkzcjpavaa2pjg6b0"))))
+      "0y989q2xs5hjm7dg7rpgyqlalf8sjklhg0v26nnzfgabl8248bgy"))))
 
 (define lib-webrtc-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_webrtc.git")
-          (commit "b68a95ad4d1ae9a1827671100a7fd76cbe448c3f")))
+          (commit "eb9496540356945e2c9fb700bcfa51444fd36f41")))
     (file-name
      (git-file-name "lib-webrtc-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "1c8jwdnn26n13yp0rp0l71q6xlxa6wp3cspbm3pnghw964jwgp3z"))))
+      "0nqlzb02b39ywjmazx30y43nalvc3ypkqjh5zvs35gnvm9x2hy43"))))
 
 (define lib-webview-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_webview.git")
-          (commit "f632fc84cbc62ae8abbbd05f81d472757a337c11")))
+          (commit "363db4e49a0b78e5dd08bd922e09cf8810318c09")))
     (file-name
      (git-file-name "lib-webview-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "0idsfkxq7l9kgyrhifys5l4jkhvbyxkgkp0qdq9218h7g0ldw84i"))))
+      "1l84rlm4cb56q87k5036n4c0g49f6a5qlhrjc5wn57s56wphvhqn"))))
 
 (define tgcalls-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/TelegramMessenger/tgcalls.git")
-          (commit "2e2797648aac2588e7fe479c2e8b4455ec65c5e6")))
+          (commit "b9fa8b84d8abe741183f157218ac038c596a54a5")))
     (file-name
      (git-file-name "tgcalls-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "193m2gkvipijqbfd6a8mhg9nd63wlnshzgspk3pip57vk21l709z"))))
+      "1swni7xw5l0q376b6rnf9h93arzjqm9rkv7g6hz67742lf9a0x9z"))))
 
 (define-public webrtc-for-telegram-desktop
-  (let ((commit "0532942ac6176a66ef184fb728a4cbb02958fc0b")
-        (revision "389"))
+  (let ((commit "c9cc4390ab951f2cbc103ff783a11f398b27660b")
+        (revision "399"))
     (hidden-package
      (package
        (name "webrtc-for-telegram-desktop")
@@ -285,7 +293,7 @@ (define-public webrtc-for-telegram-desktop
           (file-name
            (git-file-name name version))
           (sha256
-           (base32 "0fary99yl1ddk5zjpfy0pyb5brd268j41plcnvv9qjyf0wj9hf2k"))
+           (base32 "0x2hjliiapb9kacbg8fwkz7g09c9k8dc77xxycjh5kmm1fc2i6dd"))
           (patches
            (search-patches
             ;; https://github.com/desktop-app/tg_owt/pull/123
@@ -407,7 +415,7 @@ (define libprisma-for-telegram-desktop
          (url "https://github.com/desktop-app/libprisma")
          (commit "23b0d70f9709da9b38561d5706891a134d18df76")))
    (file-name
-    (git-file-name "libprisma-for-telegram-desktop" "5.2.3"))
+    (git-file-name "libprisma-for-telegram-desktop" %telegram-version))
    (sha256
     (base32
      "0fg4x4ikj7f3706bmfvkwq4smxc98qr3cgpm25w48n4ys6wfgadg"))))
@@ -456,7 +464,7 @@ (define-public telegram-desktop
        (file-name
         (git-file-name name version))
        (sha256
-        (base32 "0g47ffamh1csp79yzkv28v3qjkhjacj0c7pjf53n1ks80j5hc2j0"))
+        (base32 "1jwm8irjx5yfzd9a94f5dy4y9v5as0an8m83hlal6czlqbi5v4sm"))
        (patches
         (search-patches
          ;; https://github.com/telegramdesktop/tdesktop/pull/24126
@@ -522,7 +530,20 @@ (define-public telegram-desktop
                       ("Telegram/lib_webrtc" #$lib-webrtc-for-telegram-desktop)
                       ("Telegram/lib_webview" #$lib-webview-for-telegram-desktop)
                       ("Telegram/ThirdParty/cld3" #$cld3-for-telegram-desktop)
+                      ("Telegram/ThirdParty/libprisma" #$libprisma-for-telegram-desktop)
                       ("Telegram/ThirdParty/tgcalls" #$tgcalls-for-telegram-desktop)))))
+               (add-after 'unpack-additional-sources 'patch-gir-ignore-paths
+                 (lambda _
+                   (substitute* "cmake/external/glib/generate_cppgir.cmake"
+                     (("\\$\\{cmake_helpers_loc\\}/external/glib/cppgir/data")
+                      (string-append #$(this-package-input "cppgir") "/share/cppgir")))))
+               (add-after 'unpack-additional-sources 'use-system-xdg-desktop-portal
+                 (lambda _
+                   (substitute* (list "Telegram/CMakeLists.txt"
+                                      "Telegram/lib_base/CMakeLists.txt")
+                     (("\\$\\{third_party_loc\\}/xdg-desktop-portal/data")
+                      (string-append #$(this-package-native-input "xdg-desktop-portal")
+                                     "/share/dbus-1/interfaces")))))
                (add-after 'install 'glib-or-gtk-compile-schemas
                  (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-compile-schemas))
                (add-after 'glib-or-gtk-compile-schemas 'glib-or-gtk-wrap
@@ -531,17 +552,22 @@ (define-public telegram-desktop
      (list `(,glib "bin")
            `(,gtk+ "bin")
            pkg-config
-           python-wrapper))
+           python-wrapper
+           xdg-desktop-portal))
     (inputs
      (list abseil-cpp-cxxstd17
            alsa-lib
+           boost
            c++-gsl
            crc32c
+           cppgir-for-telegram-desktop
+           expected-lite
            fcitx-qt5
            fcitx5-qt
            ffmpeg
            glib
            glibmm-2.76
+           gobject-introspection
            gtk+
            hime
            hunspell
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH 1/5] gnu: xdg-desktop-portal: Update to 1.18.4.
  2024-07-07 15:00 ` [bug#71897] [PATCH 1/5] " dan
                     ` (3 preceding siblings ...)
  2024-07-07 15:00   ` [bug#71897] [PATCH 5/5] gnu: telegram-desktop: Update to 5.2.3 dan
@ 2024-07-09  2:14   ` Maxim Cournoyer
  4 siblings, 0 replies; 98+ messages in thread
From: Maxim Cournoyer @ 2024-07-09  2:14 UTC (permalink / raw)
  To: dan; +Cc: Liliana Marie Prikler, 71897

dan <i@dan.games> writes:

> * gnu/packages/patches/xdg-desktop-portal-disable-portal-tests.patch: New file.
> * gnu/local.mk (dist_patch_DATA): Register it.
> * gnu/packages/freedesktop.scm (xdg-desktop-portal): Update to 1.18.4.
> [patches]: Disable portal tests.
> [native-inputs]: Remove autoconf, automake, libtool and which.  Add python,
> python-dbusmock, python-pytest and python-pytest-xdist.
> [inputs]: Add bubblewrap.
> [phases]<#:configure-flags>: Update flags to meson options.
>
> Change-Id: Ic9876565e9119443fedd082273be4f372ebce1d4

Reviewed-by: Maxim Cournoyer <maxim.cournoyer@gmail>

-- 
Thanks,
Maxim




^ permalink raw reply	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH 2/5] gnu: xdg-desktop-portal: Update input style.
  2024-07-07 15:00   ` [bug#71897] [PATCH 2/5] gnu: xdg-desktop-portal: Update input style dan
@ 2024-07-09  2:14     ` Maxim Cournoyer
  0 siblings, 0 replies; 98+ messages in thread
From: Maxim Cournoyer @ 2024-07-09  2:14 UTC (permalink / raw)
  To: dan; +Cc: Liliana Marie Prikler, 71897

dan <i@dan.games> writes:

> * gnu/packages/freedesktop.scm (xdg-desktop-portal): Update input style.
>
> Change-Id: Iec0630cd945dfcd4db67af30211cbfd4d058766d

Reviewed-by: Maxim Cournoyer <maxim.cournoyer@gmail>

-- 
Thanks,
Maxim




^ permalink raw reply	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH 3/5] gnu: Add cppgir-for-telegram-desktop.
  2024-07-07 15:00   ` [bug#71897] [PATCH 3/5] gnu: Add cppgir-for-telegram-desktop dan
@ 2024-07-09  2:25     ` Maxim Cournoyer
  2024-07-09  3:07       ` dan
  0 siblings, 1 reply; 98+ messages in thread
From: Maxim Cournoyer @ 2024-07-09  2:25 UTC (permalink / raw)
  To: dan; +Cc: Liliana Marie Prikler, 71897

Hi Dan,

dan <i@dan.games> writes:

> * gnu/packages/telegram.scm (cppgir-for-telegram-desktop): New variable.
>
> Change-Id: I4bb37f9ebc6cfd711ad83f29cd95bc72c0d3bf45
> ---
>  gnu/packages/telegram.scm | 29 +++++++++++++++++++++++++++++
>  1 file changed, 29 insertions(+)
>
> diff --git a/gnu/packages/telegram.scm b/gnu/packages/telegram.scm
> index 358374a5bb..26ab27293f 100644
> --- a/gnu/packages/telegram.scm
> +++ b/gnu/packages/telegram.scm
> @@ -400,6 +400,35 @@ (define cld3-for-telegram-desktop
>      (base32
>       "0ayrrhfdwrf4260h9fsirkhhfrcvc3qqnh6h9wj3ixij2lq0wwqb"))))
>  
> +(define cppgir-for-telegram-desktop
> +  (let ((commit "9c4f5820d94d62ab451501f016bfea97156518f4")
> +        (revision "0"))
> +    (package
> +      (name "cppgir-for-telegram-desktop")
> +      (version (git-version "2.0" revision commit))
> +      (source
> +       (origin
> +         (method git-fetch)
> +         (uri
> +          (git-reference
> +           (url "https://gitlab.com/mnauw/cppgir")
> +           (commit commit)))
> +         (file-name (git-file-name name version))
> +         (sha256
> +          (base32 "1fa9nf4yljfarihaqj5kd98yysrky7q316mh6l5b1rq39ga15k9b"))))
> +      (build-system cmake-build-system)
> +      (arguments
> +       (list
> +        #:configure-flags
> +        #~(list "-DINTERNAL_EXPECTED=OFF")))
> +      (inputs (list boost fmt expected-lite))
> +      (home-page "https://gitlab.com/mnauw/cppgir")
> +      (synopsis "GObject introspection C++ binding wrapper generator")
> +      (description "cppgir processes .gir files derived from GObject
> +introspection annotations into a set of C++ files defining suitable
> +namespaces, classes and other types that together form a C++ binding.")
> +      (license license:expat))))

That'd be reasonable as a new package if it was very tightly developed
with telegram, but it doesn't seem to be the case.  I'd prefer having it
in (gnu packages glib).

What is the "compilation error" you had mentioned when using version
2.0?  Does the cppgir release fails to compile itself, or is it
telegram that then doesn't build using that one?

If the later, I'd define, in (gnu packages glib)

--8<---------------cut here---------------start------------->8---
(define-public cppgir
 [...]
 "original package at version 2.0")

(define-public cppgir-for-telegram-desktop
 (package
  (inherit cppgir)
  (source ... (using latest or telegram-specific (?) commit))))
--8<---------------cut here---------------end--------------->8---

Sorry for the back and forth, we're narrowing down on the perfect
submission; keep it up.  Don't forget to use -v5 for your next patches
submission :-), and ensure 'guix lint' is happy with all the packages.

Thank you for your efforts!  Keep it up.

-- 
Maxim




^ permalink raw reply	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH 4/5] gnu: Add libprisma-for-telegram-desktop.
  2024-07-07 15:00   ` [bug#71897] [PATCH 4/5] gnu: Add libprisma-for-telegram-desktop dan
@ 2024-07-09  2:29     ` Maxim Cournoyer
       [not found]       ` <a1177ffa-90ba-483e-9c60-2aebf6e5dc4c@dan.games>
  0 siblings, 1 reply; 98+ messages in thread
From: Maxim Cournoyer @ 2024-07-09  2:29 UTC (permalink / raw)
  To: dan; +Cc: Liliana Marie Prikler, 71897

Hi,

dan <i@dan.games> writes:

> * gnu/packages/telegram.scm (libprisma-for-telegram-desktop): New variable.
>
> Change-Id: I855b463993654a8cad491c7b56c9581b3083f5e4
> ---
>  gnu/packages/telegram.scm | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
>
> diff --git a/gnu/packages/telegram.scm b/gnu/packages/telegram.scm
> index 26ab27293f..0a48361eb4 100644
> --- a/gnu/packages/telegram.scm
> +++ b/gnu/packages/telegram.scm
> @@ -400,6 +400,18 @@ (define cld3-for-telegram-desktop
>      (base32
>       "0ayrrhfdwrf4260h9fsirkhhfrcvc3qqnh6h9wj3ixij2lq0wwqb"))))
>  
> +(define libprisma-for-telegram-desktop
> +  (origin
> +   (method git-fetch)
> +   (uri (git-reference
> +         (url "https://github.com/desktop-app/libprisma")
> +         (commit "23b0d70f9709da9b38561d5706891a134d18df76")))
> +   (file-name
> +    (git-file-name "libprisma-for-telegram-desktop" "5.2.3"))
> +   (sha256
> +    (base32
> +     "0fg4x4ikj7f3706bmfvkwq4smxc98qr3cgpm25w48n4ys6wfgadg"))))
> +

So this is built as part of telegram?  If this doesn't have any proper
build system to be built separately and linked, or if telegram lacks
such a feature in its own build system (I like to report such feature
request for that to upstream myself), another perhaps more maintainable
strategy would be to use recursive? #t on the git-reference to clone
these, and delete in a source snippet the submodules we don't want to
have.

Otherwise, OK!

-- 
Thanks,
Maxim




^ permalink raw reply	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH 5/5] gnu: telegram-desktop: Update to 5.2.3.
  2024-07-07 15:00   ` [bug#71897] [PATCH 5/5] gnu: telegram-desktop: Update to 5.2.3 dan
@ 2024-07-09  2:35     ` Maxim Cournoyer
  0 siblings, 0 replies; 98+ messages in thread
From: Maxim Cournoyer @ 2024-07-09  2:35 UTC (permalink / raw)
  To: dan; +Cc: Liliana Marie Prikler, 71897

Hello!

dan <i@dan.games> writes:

> * 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.

Nitpick: "Register", capitalized.

> * 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.2.3.
> [#:phases]<unpack-additional-sources>: Add libprisma-for-telegram-desktop.
>   <patch-gir-ignore-paths>: New phase.
>   <use-system-xdg-desktop-portal>: New phase.
> [native-inputs]: Add xdg-desktop-portal.

Nitpick: GNU ChangeLog doesn't uses hanging indents.

> [inputs]: Add boost, cppgir-for-telegram-desktop, expected-lite and
> gobject-introspection.

[...]

> diff --git a/gnu/packages/telegram.scm b/gnu/packages/telegram.scm

[...]

> -(define %telegram-version "4.8.1")
> +(define %telegram-version "5.2.3")

[...]

>          (search-patches
>           ;; https://github.com/telegramdesktop/tdesktop/pull/24126
> @@ -522,7 +530,20 @@ (define-public telegram-desktop
>                        ("Telegram/lib_webrtc" #$lib-webrtc-for-telegram-desktop)
>                        ("Telegram/lib_webview" #$lib-webview-for-telegram-desktop)
>                        ("Telegram/ThirdParty/cld3" #$cld3-for-telegram-desktop)
> +                      ("Telegram/ThirdParty/libprisma" #$libprisma-for-telegram-desktop)
>                        ("Telegram/ThirdParty/tgcalls" #$tgcalls-for-telegram-desktop)))))
> +               (add-after 'unpack-additional-sources 'patch-gir-ignore-paths
> +                 (lambda _
> +                   (substitute* "cmake/external/glib/generate_cppgir.cmake"
> +                     (("\\$\\{cmake_helpers_loc\\}/external/glib/cppgir/data")
> +                      (string-append #$(this-package-input "cppgir") "/share/cppgir")))))
> +               (add-after 'unpack-additional-sources 'use-system-xdg-desktop-portal
> +                 (lambda _
> +                   (substitute* (list "Telegram/CMakeLists.txt"
> +                                      "Telegram/lib_base/CMakeLists.txt")
> +                     (("\\$\\{third_party_loc\\}/xdg-desktop-portal/data")
> +                      (string-append #$(this-package-native-input "xdg-desktop-portal")
> +                                     "/share/dbus-1/interfaces")))))
>                 (add-after 'install 'glib-or-gtk-compile-schemas
>                   (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-compile-schemas))
>                 (add-after 'glib-or-gtk-compile-schemas 'glib-or-gtk-wrap
> @@ -531,17 +552,22 @@ (define-public telegram-desktop
>       (list `(,glib "bin")
>             `(,gtk+ "bin")
>             pkg-config
> -           python-wrapper))
> +           python-wrapper
> +           xdg-desktop-portal))
>      (inputs
>       (list abseil-cpp-cxxstd17
>             alsa-lib
> +           boost
>             c++-gsl
>             crc32c
> +           cppgir-for-telegram-desktop

Nitpick: should be listed alphabetically before the crc32c input.

> +           expected-lite
>             fcitx-qt5
>             fcitx5-qt
>             ffmpeg
>             glib
>             glibmm-2.76
> +           gobject-introspection
>             gtk+
>             hime
>             hunspell

Otherwise LGTM!  Feel free to adjust the little things above in a v5.

-- 
Thanks,
Maxim




^ permalink raw reply	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH 3/5] gnu: Add cppgir-for-telegram-desktop.
  2024-07-09  2:25     ` Maxim Cournoyer
@ 2024-07-09  3:07       ` dan
  2024-07-10  1:31         ` Maxim Cournoyer
  0 siblings, 1 reply; 98+ messages in thread
From: dan @ 2024-07-09  3:07 UTC (permalink / raw)
  To: Maxim Cournoyer; +Cc: Liliana Marie Prikler, 71897

On 7/9/2024 10:25 AM, Maxim Cournoyer wrote:
> Hi Dan,
> 
> dan <i@dan.games> writes:
> 
>> * gnu/packages/telegram.scm (cppgir-for-telegram-desktop): New variable.
>>
>> Change-Id: I4bb37f9ebc6cfd711ad83f29cd95bc72c0d3bf45
>> ---
>>   gnu/packages/telegram.scm | 29 +++++++++++++++++++++++++++++
>>   1 file changed, 29 insertions(+)
>>
>> diff --git a/gnu/packages/telegram.scm b/gnu/packages/telegram.scm
>> index 358374a5bb..26ab27293f 100644
>> --- a/gnu/packages/telegram.scm
>> +++ b/gnu/packages/telegram.scm
>> @@ -400,6 +400,35 @@ (define cld3-for-telegram-desktop
>>       (base32
>>        "0ayrrhfdwrf4260h9fsirkhhfrcvc3qqnh6h9wj3ixij2lq0wwqb"))))
>>   
>> +(define cppgir-for-telegram-desktop
>> +  (let ((commit "9c4f5820d94d62ab451501f016bfea97156518f4")
>> +        (revision "0"))
>> +    (package
>> +      (name "cppgir-for-telegram-desktop")
>> +      (version (git-version "2.0" revision commit))
>> +      (source
>> +       (origin
>> +         (method git-fetch)
>> +         (uri
>> +          (git-reference
>> +           (url "https://gitlab.com/mnauw/cppgir")
>> +           (commit commit)))
>> +         (file-name (git-file-name name version))
>> +         (sha256
>> +          (base32 "1fa9nf4yljfarihaqj5kd98yysrky7q316mh6l5b1rq39ga15k9b"))))
>> +      (build-system cmake-build-system)
>> +      (arguments
>> +       (list
>> +        #:configure-flags
>> +        #~(list "-DINTERNAL_EXPECTED=OFF")))
>> +      (inputs (list boost fmt expected-lite))
>> +      (home-page "https://gitlab.com/mnauw/cppgir")
>> +      (synopsis "GObject introspection C++ binding wrapper generator")
>> +      (description "cppgir processes .gir files derived from GObject
>> +introspection annotations into a set of C++ files defining suitable
>> +namespaces, classes and other types that together form a C++ binding.")
>> +      (license license:expat))))
> 
> That'd be reasonable as a new package if it was very tightly developed
> with telegram, but it doesn't seem to be the case.  I'd prefer having it
> in (gnu packages glib).
> 
> What is the "compilation error" you had mentioned when using version
> 2.0?  Does the cppgir release fails to compile itself, or is it
> telegram that then doesn't build using that one?

Sorry about not directly replying the previous message.  It's the 
latter, telegram-desktop fails to compile with cppgir@2.0.

> 
> If the later, I'd define, in (gnu packages glib)
> 
> --8<---------------cut here---------------start------------->8---
> (define-public cppgir
>   [...]
>   "original package at version 2.0")
> 
> (define-public cppgir-for-telegram-desktop
>   (package
>    (inherit cppgir)
>    (source ... (using latest or telegram-specific (?) commit))))
> --8<---------------cut here---------------end--------------->8---

For the lower package definition, I put it in (gnu packages glib) or 
(gnu packages telegram)?  I think it should be the latter one?

> 
> Sorry for the back and forth, we're narrowing down on the perfect
> submission; keep it up.  Don't forget to use -v5 for your next patches
> submission :-), and ensure 'guix lint' is happy with all the packages.
> 
> Thank you for your efforts!  Keep it up.
> 

Sorry about forgetting to add revision number to the patch series. 
Although we have mumi right now, there are still a bit of manual works 
to be done before sending patches.  I constantly forget some of them.

-- 
dan





^ permalink raw reply	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH 4/5] gnu: Add libprisma-for-telegram-desktop.
       [not found]       ` <a1177ffa-90ba-483e-9c60-2aebf6e5dc4c@dan.games>
@ 2024-07-09 11:54         ` Maxim Cournoyer
  0 siblings, 0 replies; 98+ messages in thread
From: Maxim Cournoyer @ 2024-07-09 11:54 UTC (permalink / raw)
  To: dan; +Cc: 71897

Hi Dan,

dan <i@dan.games> writes:

> Hi Maxim,
>
> On 7/9/2024 10:29 AM, Maxim Cournoyer wrote:
>> Hi,
>> dan <i@dan.games> writes:
>> 
>>> * gnu/packages/telegram.scm (libprisma-for-telegram-desktop): New variable.
>>>
>>> Change-Id: I855b463993654a8cad491c7b56c9581b3083f5e4
>>> ---
>>>   gnu/packages/telegram.scm | 12 ++++++++++++
>>>   1 file changed, 12 insertions(+)
>>>
>>> diff --git a/gnu/packages/telegram.scm b/gnu/packages/telegram.scm
>>> index 26ab27293f..0a48361eb4 100644
>>> --- a/gnu/packages/telegram.scm
>>> +++ b/gnu/packages/telegram.scm
>>> @@ -400,6 +400,18 @@ (define cld3-for-telegram-desktop
>>>       (base32
>>>        "0ayrrhfdwrf4260h9fsirkhhfrcvc3qqnh6h9wj3ixij2lq0wwqb"))))
>>>   +(define libprisma-for-telegram-desktop
>>> +  (origin
>>> +   (method git-fetch)
>>> +   (uri (git-reference
>>> +         (url "https://github.com/desktop-app/libprisma")
>>> +         (commit "23b0d70f9709da9b38561d5706891a134d18df76")))
>>> +   (file-name
>>> +    (git-file-name "libprisma-for-telegram-desktop" "5.2.3"))
>>> +   (sha256
>>> +    (base32
>>> +     "0fg4x4ikj7f3706bmfvkwq4smxc98qr3cgpm25w48n4ys6wfgadg"))))
>>> +
>> So this is built as part of telegram?  If this doesn't have any
>> proper
>> build system to be built separately and linked, or if telegram lacks
>> such a feature in its own build system (I like to report such feature
>> request for that to upstream myself), another perhaps more maintainable
>> strategy would be to use recursive? #t on the git-reference to clone
>> these, and delete in a source snippet the submodules we don't want to
>> have.
>
> Most of the dependencies of telegram-desktop are packaged this way, so
> here I'm more or less following the convention. de If we decide to use
> recursive? #t, I think it's better to fully revamp the packaging of
> telegram-desktop.  libprisma itself doesn't have a build system, and I
> think it's only used in telegram-desktop.

OK, fair enough.  Thanks for the explanation (I also noticed the tens of
git submodules as source variables in a later commit).

Reviewed-by: Maxim Cournoyer <maxim.cournoyer@gmail>

-- 
Thanks,
Maxim




^ permalink raw reply	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH 3/5] gnu: Add cppgir-for-telegram-desktop.
  2024-07-09  3:07       ` dan
@ 2024-07-10  1:31         ` Maxim Cournoyer
  0 siblings, 0 replies; 98+ messages in thread
From: Maxim Cournoyer @ 2024-07-10  1:31 UTC (permalink / raw)
  To: dan; +Cc: Liliana Marie Prikler, 71897

Hi Dan,

dan <i@dan.games> writes:

> On 7/9/2024 10:25 AM, Maxim Cournoyer wrote:
>> Hi Dan,
>> dan <i@dan.games> writes:
>> 
>>> * gnu/packages/telegram.scm (cppgir-for-telegram-desktop): New variable.

[...]

>> That'd be reasonable as a new package if it was very tightly
>> developed
>> with telegram, but it doesn't seem to be the case.  I'd prefer having it
>> in (gnu packages glib).
>> What is the "compilation error" you had mentioned when using version
>> 2.0?  Does the cppgir release fails to compile itself, or is it
>> telegram that then doesn't build using that one?
>
> Sorry about not directly replying the previous message.  It's the
> latter, telegram-desktop fails to compile with cppgir@2.0.
>
>> If the later, I'd define, in (gnu packages glib)
>> --8<---------------cut here---------------start------------->8---
>> (define-public cppgir
>>   [...]
>>   "original package at version 2.0")
>> (define-public cppgir-for-telegram-desktop
>>   (package
>>    (inherit cppgir)
>>    (source ... (using latest or telegram-specific (?) commit))))
>> --8<---------------cut here---------------end--------------->8---
>
> For the lower package definition, I put it in (gnu packages glib) or
> (gnu packages telegram)?  I think it should be the latter one?

It's a bit counter-intuitive, but it has to be in the former, to avoid
cyclic module dependencies caused by top level variables referring one
another in different modules (that's fine for delayed fields, but the
inherit field is not delayed).  For more information on this topic, see
(info 'guix (Cyclic Module Dependencies)').

>> Sorry for the back and forth, we're narrowing down on the perfect
>> submission; keep it up.  Don't forget to use -v5 for your next patches
>> submission :-), and ensure 'guix lint' is happy with all the packages.
>> Thank you for your efforts!  Keep it up.
>> 
>
> Sorry about forgetting to add revision number to the patch
> series. Although we have mumi right now, there are still a bit of
> manual works to be done before sending patches.  I constantly forget
> some of them.

I do like the ability of patman of recording where my submission
metadata as git trailers in the top commit.  Mumi could in theory avoid
the need for automatically using -v though, since it can look at the
past messages sent to an issue and could infer which revision should be
used, in theory.

-- 
Thanks,
Maxim




^ permalink raw reply	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH v5 1/6] gnu: xdg-desktop-portal: Update to 1.18.4.
  2024-07-02  5:18 [bug#71897] [PATCH 1/2] gnu: Add cppgir dan
                   ` (4 preceding siblings ...)
  2024-07-07 15:00 ` [bug#71897] [PATCH 1/5] " dan
@ 2024-07-14 15:48 ` dan
  2024-07-14 15:48   ` [bug#71897] [PATCH v5 2/6] gnu: xdg-desktop-portal: Update input style dan
                     ` (4 more replies)
  2024-08-04 14:30 ` [bug#71897] [PATCH v6 0/7] gnu: telegram-desktop: Update to 5.3.2 dan
                   ` (5 subsequent siblings)
  11 siblings, 5 replies; 98+ messages in thread
From: dan @ 2024-07-14 15:48 UTC (permalink / raw)
  To: 71897; +Cc: dan, Maxim Cournoyer, Liliana Marie Prikler

* gnu/packages/patches/xdg-desktop-portal-disable-portal-tests.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/freedesktop.scm (xdg-desktop-portal): Update to 1.18.4.
[patches]: Disable portal tests.
[native-inputs]: Remove autoconf, automake, libtool and which.  Add python,
python-dbusmock, python-pytest and python-pytest-xdist.
[inputs]: Add bubblewrap.
[phases]<#:configure-flags>: Update flags to meson options.

Change-Id: Ic9876565e9119443fedd082273be4f372ebce1d4
---
 gnu/local.mk                                  |  1 +
 gnu/packages/freedesktop.scm                  | 25 +++++----
 ...-desktop-portal-disable-portal-tests.patch | 56 +++++++++++++++++++
 3 files changed, 72 insertions(+), 10 deletions(-)
 create mode 100644 gnu/packages/patches/xdg-desktop-portal-disable-portal-tests.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index e584e426d0..7672c9fef0 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2246,6 +2246,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/wordnet-CVE-2008-3908-pt2.patch			\
   %D%/packages/patches/wpa-supplicant-dbus-group-policy.patch		\
   %D%/packages/patches/x265-arm-flags.patch			\
+  %D%/packages/patches/xdg-desktop-portal-disable-portal-tests.patch\
   %D%/packages/patches/xdg-desktop-portal-wlr-harcoded-length.patch\
   %D%/packages/patches/xen-docs-use-predictable-ordering.patch	\
   %D%/packages/patches/xen-remove-config.gz-timestamp.patch	\
diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index 6941450436..2015ee46f8 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -38,6 +38,7 @@
 ;;; Copyright © 2022 Samuel Culpepper <sculpepper@newstore.com>
 ;;; Copyright © 2024 aurtzy <aurtzy@gmail.com>
 ;;; Copyright © 2024 Dariqq <dariqq@posteo.net>
+;;; Copyright © 2024 dan <i@dan.games>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -133,6 +134,7 @@ (define-module (gnu packages freedesktop)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages valgrind)
   #:use-module (gnu packages video)
+  #:use-module (gnu packages virtualization)
   #:use-module (gnu packages w3m)
   #:use-module (gnu packages web)
   #:use-module (gnu packages xdisorg)
@@ -2989,7 +2991,7 @@ (define-public libportal
 (define-public xdg-desktop-portal
   (package
     (name "xdg-desktop-portal")
-    (version "1.16.0")
+    (version "1.18.4")
     (source
      (origin
        (method url-fetch)
@@ -2998,18 +3000,21 @@ (define-public xdg-desktop-portal
              version "/xdg-desktop-portal-" version ".tar.xz"))
        (sha256
         (base32
-         "06cczlh39kc41rvav06v37sad827y61rffy3v29i918ibj8sahav"))))
-    (build-system gnu-build-system)
+         "0r8y8qmzcfj7b7brqcxr9lg8pavfds815ffvj0kqc378fhgaln5q"))
+       ;; disable portal tests since they try to use fuse
+       (patches (search-patches "xdg-desktop-portal-disable-portal-tests.patch"))))
+    (build-system meson-build-system)
     (native-inputs
      `(("pkg-config" ,pkg-config)
-       ("autoconf" ,autoconf)
-       ("automake" ,automake)
-       ("libtool" ,libtool)
        ("glib:bin" ,glib "bin")
-       ("which" ,which)
-       ("gettext" ,gettext-minimal)))
+       ("gettext" ,gettext-minimal)
+       ("python" ,python)
+       ("python-dbusmock" ,python-dbusmock)
+       ("python-pytest" ,python-pytest)
+       ("python-pytest-xdist" ,python-pytest-xdist)))
     (inputs
-     `(("gdk-pixbuf" ,gdk-pixbuf)
+     `(("bubblewrap" ,bubblewrap)
+       ("gdk-pixbuf" ,gdk-pixbuf)
        ("glib" ,glib)
        ("flatpak" ,flatpak)
        ("fontconfig" ,fontconfig)
@@ -3021,7 +3026,7 @@ (define-public xdg-desktop-portal
        ("fuse" ,fuse)))
     (arguments
      `(#:configure-flags
-       (list "--with-systemd=no")
+       (list "-Dsystemd=disabled")
        #:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'po-chmod
diff --git a/gnu/packages/patches/xdg-desktop-portal-disable-portal-tests.patch b/gnu/packages/patches/xdg-desktop-portal-disable-portal-tests.patch
new file mode 100644
index 0000000000..5e13493613
--- /dev/null
+++ b/gnu/packages/patches/xdg-desktop-portal-disable-portal-tests.patch
@@ -0,0 +1,56 @@
+From b7750fa99c31c5f28ac2053fa154bef4038b5cc0 Mon Sep 17 00:00:00 2001
+From: dan <i@dan.games>
+Date: Tue, 2 Jul 2024 19:37:38 +0800
+Subject: [PATCH] tests: remove portal tests.
+
+---
+ tests/meson.build | 24 ------------------------
+ 1 file changed, 24 deletions(-)
+
+diff --git a/tests/meson.build b/tests/meson.build
+index a2dafee..bcd87be 100644
+--- a/tests/meson.build
++++ b/tests/meson.build
+@@ -181,18 +181,6 @@ portal_tests = [
+ 
+ test_env = env_tests
+ test_env.set('XDG_CURRENT_DESKTOP', 'test')
+-foreach p : portal_tests
+-    test(
+-      'test-portals-@0@'.format(p),
+-      test_portals,
+-      args: ['--verbose', '--keep-going', '--tap', '-p', '/portal/@0@'.format(p)],
+-      depends: [test_backends, test_portals],
+-      env: test_env,
+-      is_parallel: false,
+-      protocol: test_protocol,
+-      suite: 'portals',
+-    )
+-endforeach
+ 
+ # Split the portal tests into one test per portal, this makes debugging a lot
+ # easier.
+@@ -204,18 +192,6 @@ portal_limited = [
+ 
+ limited_env = env_tests
+ limited_env.set('XDG_CURRENT_DESKTOP', 'limited')
+-foreach p : portal_limited
+-    test(
+-      'limited-portals-@0@'.format(p),
+-      limited_portals,
+-      args: ['--verbose', '--keep-going', '--tap', '-p', '/limited/@0@'.format(p)],
+-      depends: [test_backends, limited_portals],
+-      env: limited_env,
+-      is_parallel: false,
+-      protocol: test_protocol,
+-      suite: 'portals',
+-    )
+-endforeach
+ 
+ if enable_installed_tests
+   install_data(
+
+base-commit: 11c8a96b147aeae70e3f770313f93b367d53fedd
+-- 
+2.41.0
+

base-commit: 3b5533f9bdac4a929c3d93e628ee2ae279013685
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH v5 2/6] gnu: xdg-desktop-portal: Update input style.
  2024-07-14 15:48 ` [bug#71897] [PATCH v5 1/6] " dan
@ 2024-07-14 15:48   ` dan
  2024-07-14 15:49   ` [bug#71897] [PATCH v5 3/6] gnu: Add cppgir dan
                     ` (3 subsequent siblings)
  4 siblings, 0 replies; 98+ messages in thread
From: dan @ 2024-07-14 15:48 UTC (permalink / raw)
  To: 71897; +Cc: dan, Maxim Cournoyer, Liliana Marie Prikler

* gnu/packages/freedesktop.scm (xdg-desktop-portal): Update input style.

Change-Id: Iec0630cd945dfcd4db67af30211cbfd4d058766d
---
 gnu/packages/freedesktop.scm | 36 ++++++++++++++++++------------------
 1 file changed, 18 insertions(+), 18 deletions(-)

diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index 2015ee46f8..28954451d5 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -3005,25 +3005,25 @@ (define-public xdg-desktop-portal
        (patches (search-patches "xdg-desktop-portal-disable-portal-tests.patch"))))
     (build-system meson-build-system)
     (native-inputs
-     `(("pkg-config" ,pkg-config)
-       ("glib:bin" ,glib "bin")
-       ("gettext" ,gettext-minimal)
-       ("python" ,python)
-       ("python-dbusmock" ,python-dbusmock)
-       ("python-pytest" ,python-pytest)
-       ("python-pytest-xdist" ,python-pytest-xdist)))
+     (list gettext-minimal
+           (list glib "bin")
+           pkg-config
+           python
+           python-dbusmock
+           python-pytest
+           python-pytest-xdist))
     (inputs
-     `(("bubblewrap" ,bubblewrap)
-       ("gdk-pixbuf" ,gdk-pixbuf)
-       ("glib" ,glib)
-       ("flatpak" ,flatpak)
-       ("fontconfig" ,fontconfig)
-       ("json-glib" ,json-glib)
-       ("libportal" ,libportal)
-       ("dbus" ,dbus)
-       ("geoclue" ,geoclue)
-       ("pipewire" ,pipewire)
-       ("fuse" ,fuse)))
+     (list bubblewrap
+           dbus
+           flatpak
+           fontconfig
+           fuse
+           gdk-pixbuf
+           geoclue
+           glib
+           json-glib
+           libportal
+           pipewire))
     (arguments
      `(#:configure-flags
        (list "-Dsystemd=disabled")
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH v5 3/6] gnu: Add cppgir.
  2024-07-14 15:48 ` [bug#71897] [PATCH v5 1/6] " dan
  2024-07-14 15:48   ` [bug#71897] [PATCH v5 2/6] gnu: xdg-desktop-portal: Update input style dan
@ 2024-07-14 15:49   ` dan
  2024-07-14 15:49   ` [bug#71897] [PATCH v5 4/6] gnu: Add cppgir-for-telegram-desktop dan
                     ` (2 subsequent siblings)
  4 siblings, 0 replies; 98+ messages in thread
From: dan @ 2024-07-14 15:49 UTC (permalink / raw)
  To: 71897; +Cc: dan, Maxim Cournoyer, Liliana Marie Prikler, Vivien Kraus

* gnu/packages/glib.scm (cppgir): New variable.

Change-Id: Ic4510be6d05b7b3977aa457c6a7fec382c1d3a88
---
 gnu/packages/glib.scm | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index b11046f05d..3a44207afe 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -20,6 +20,7 @@
 ;;; Copyright © 2022 Petr Hodina <phodina@protonmail.com>
 ;;; Copyright © 2023 Saku Laesvuori <saku@laesvuori.fi>
 ;;; Copyright © 2024 Zheng Junjie <873216071@qq.com>
+;;; Copyright © 2024 dan <i@dan.games>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -71,6 +72,7 @@ (define-module (gnu packages glib)
   #:use-module (gnu packages perl-check)
   #:use-module (gnu packages popt)
   #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages pretty-print)
   #:use-module (gnu packages python)
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages sqlite)
@@ -1594,3 +1596,30 @@ (define-public libdex
 Dex also provides Fibers which allow writing synchronous looking code in C
 that uses asynchronous and future-based APIs.")
     (license license:lgpl2.1+)))
+
+(define-public cppgir
+  (package
+    (name "cppgir")
+    (version "2.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://gitlab.com/mnauw/cppgir")
+         (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0cj4myqzb28hgb7zlxlba9y8n4ysxkvv2y9wy6f7ps58mr18h7bl"))))
+    (build-system cmake-build-system)
+    (arguments
+     (list
+      #:configure-flags
+      #~(list "-DINTERNAL_EXPECTED=OFF")))
+    (inputs (list boost fmt expected-lite))
+    (home-page "https://gitlab.com/mnauw/cppgir")
+    (synopsis "GObject introspection C++ binding wrapper generator")
+    (description "cppgir processes .gir files derived from GObject
+introspection annotations into a set of C++ files defining suitable
+namespaces, classes and other types that together form a C++ binding.")
+    (license license:expat)))
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH v5 4/6] gnu: Add cppgir-for-telegram-desktop.
  2024-07-14 15:48 ` [bug#71897] [PATCH v5 1/6] " dan
  2024-07-14 15:48   ` [bug#71897] [PATCH v5 2/6] gnu: xdg-desktop-portal: Update input style dan
  2024-07-14 15:49   ` [bug#71897] [PATCH v5 3/6] gnu: Add cppgir dan
@ 2024-07-14 15:49   ` dan
  2024-07-14 15:49   ` [bug#71897] [PATCH v5 5/6] gnu: Add libprisma-for-telegram-desktop dan
  2024-07-14 15:49   ` [bug#71897] [PATCH v5 6/6] gnu: telegram-desktop: Update to 5.2.3 dan
  4 siblings, 0 replies; 98+ messages in thread
From: dan @ 2024-07-14 15:49 UTC (permalink / raw)
  To: 71897; +Cc: dan, Maxim Cournoyer, Liliana Marie Prikler, Vivien Kraus

* gnu/packages/glib.scm (cppgir-for-telegram-desktop): New variable.

Change-Id: Ib9ca3bd376f32d13939adabd2c52e1eb24e2ddcb
---
 gnu/packages/glib.scm | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index 3a44207afe..29ac8d5542 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -1623,3 +1623,22 @@ (define-public cppgir
 introspection annotations into a set of C++ files defining suitable
 namespaces, classes and other types that together form a C++ binding.")
     (license license:expat)))
+
+;; telegram-desktop requires a more recent version of cppgir
+(define-public cppgir-for-telegram-desktop
+  (let ((commit "9c4f5820d94d62ab451501f016bfea97156518f4")
+        (revision "0"))
+    (package
+      (inherit cppgir)
+      (name "cppgir-for-telegram-desktop")
+      (version (git-version "2.0" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri
+          (git-reference
+           (url "https://gitlab.com/mnauw/cppgir")
+           (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "1fa9nf4yljfarihaqj5kd98yysrky7q316mh6l5b1rq39ga15k9b")))))))
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH v5 5/6] gnu: Add libprisma-for-telegram-desktop.
  2024-07-14 15:48 ` [bug#71897] [PATCH v5 1/6] " dan
                     ` (2 preceding siblings ...)
  2024-07-14 15:49   ` [bug#71897] [PATCH v5 4/6] gnu: Add cppgir-for-telegram-desktop dan
@ 2024-07-14 15:49   ` dan
  2024-07-14 15:49   ` [bug#71897] [PATCH v5 6/6] gnu: telegram-desktop: Update to 5.2.3 dan
  4 siblings, 0 replies; 98+ messages in thread
From: dan @ 2024-07-14 15:49 UTC (permalink / raw)
  To: 71897; +Cc: dan, Maxim Cournoyer, Liliana Marie Prikler

* gnu/packages/telegram.scm (libprisma-for-telegram-desktop): New variable.

Change-Id: I855b463993654a8cad491c7b56c9581b3083f5e4
---
 gnu/packages/telegram.scm | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/gnu/packages/telegram.scm b/gnu/packages/telegram.scm
index 358374a5bb..d7e69aa113 100644
--- a/gnu/packages/telegram.scm
+++ b/gnu/packages/telegram.scm
@@ -400,6 +400,18 @@ (define cld3-for-telegram-desktop
     (base32
      "0ayrrhfdwrf4260h9fsirkhhfrcvc3qqnh6h9wj3ixij2lq0wwqb"))))
 
+(define libprisma-for-telegram-desktop
+  (origin
+   (method git-fetch)
+   (uri (git-reference
+         (url "https://github.com/desktop-app/libprisma")
+         (commit "23b0d70f9709da9b38561d5706891a134d18df76")))
+   (file-name
+    (git-file-name "libprisma-for-telegram-desktop" "5.2.3"))
+   (sha256
+    (base32
+     "0fg4x4ikj7f3706bmfvkwq4smxc98qr3cgpm25w48n4ys6wfgadg"))))
+
 (define-public telegram-desktop
   (package
     (name "telegram-desktop")
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH v5 6/6] gnu: telegram-desktop: Update to 5.2.3.
  2024-07-14 15:48 ` [bug#71897] [PATCH v5 1/6] " dan
                     ` (3 preceding siblings ...)
  2024-07-14 15:49   ` [bug#71897] [PATCH v5 5/6] gnu: Add libprisma-for-telegram-desktop dan
@ 2024-07-14 15:49   ` dan
  2024-07-27 15:56     ` Liliana Marie Prikler
  4 siblings, 1 reply; 98+ messages in thread
From: dan @ 2024-07-14 15:49 UTC (permalink / raw)
  To: 71897; +Cc: dan, Maxim Cournoyer, Liliana Marie Prikler

* 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.2.3.
[#:phases]<unpack-additional-sources>: Add libprisma-for-telegram-desktop.
<patch-gir-ignore-paths>: New phase.
<use-system-xdg-desktop-portal>: New phase.
[native-inputs]: Add gobject-introspection and xdg-desktop-portal.
[inputs]: Add boost, cppgir-for-telegram-desktop, expected-lite.

Change-Id: I78df3434a2cd04afc54107b7fecd5e5a8df85564
---
 gnu/local.mk                                  |  2 +
 .../telegram-desktop-unbundle-cppgir.patch    | 95 +++++++++++++++++++
 .../telegram-desktop-unbundle-gsl.patch       | 31 ++++++
 gnu/packages/telegram.scm                     | 89 ++++++++++-------
 4 files changed, 185 insertions(+), 32 deletions(-)
 create mode 100644 gnu/packages/patches/telegram-desktop-unbundle-cppgir.patch
 create mode 100644 gnu/packages/patches/telegram-desktop-unbundle-gsl.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 7672c9fef0..af0b583ee2 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2141,6 +2141,8 @@ dist_patch_DATA =						\
   %D%/packages/patches/texinfo-headings-single.patch		\
   %D%/packages/patches/texinfo-5-perl-compat.patch		\
   %D%/packages/patches/telegram-desktop-allow-disable-libtgvoip.patch   \
+  %D%/packages/patches/telegram-desktop-unbundle-cppgir.patch   \
+  %D%/packages/patches/telegram-desktop-unbundle-gsl.patch      \
   %D%/packages/patches/telegram-purple-adjust-test.patch	\
   %D%/packages/patches/teuchos-remove-duplicate-using.patch	\
   %D%/packages/patches/texi2html-document-encoding.patch	\
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/telegram.scm b/gnu/packages/telegram.scm
index d7e69aa113..530fd4c66c 100644
--- a/gnu/packages/telegram.scm
+++ b/gnu/packages/telegram.scm
@@ -5,6 +5,7 @@
 ;;; Copyright © 2023 Lu Hui <luhux76@gmail.com>
 ;;; Copyright © 2023 Camilo Q.S. (Distopico) <distopico@riseup.net>
 ;;; Copyright © 2024 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2024 dan <i@dan.games>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -28,6 +29,7 @@ (define-module (gnu packages telegram)
   #:use-module (gnu packages assembly)
   #:use-module (gnu packages audio)
   #:use-module (gnu packages autotools)
+  #:use-module (gnu packages boost)
   #:use-module (gnu packages check)
   #:use-module (gnu packages cmake)
   #:use-module (gnu packages compression)
@@ -82,11 +84,11 @@ (define-module (gnu packages telegram)
   #:use-module (guix build-system python)
   #:use-module (guix build-system qt))
 
-(define %telegram-version "4.8.1")
+(define %telegram-version "5.2.3")
 
 (define libyuv-for-telegram-desktop
-  (let ((commit "77c2121f7e6b8e694d6e908bbbe9be24214097da")
-        (revision "2439"))
+  (let ((commit "04821d1e7d60845525e8db55c7bcd41ef5be9406")
+        (revision "2440"))
     (origin
       (method git-fetch)
       (uri (git-reference
@@ -97,67 +99,72 @@ (define libyuv-for-telegram-desktop
                   (git-version "0" revision commit)))
       (sha256
        (base32
-        "1b4k8yskr9ffl5k8s9i0af1gn1pavsfixla26vh8bij69rdr7f9c")))))
+        "1fsvc0f8mckrdzys8lnlnbw6676mjamm6p3ghr2h9liqfa83s6wg")))))
 
 (define cmake-helpers-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/cmake_helpers.git")
-          (commit "6ab5543b3dd1e40979d258e46d03376931b6c37b")))
+          (commit "4a4bc4cd34b3ade038541a2b8b2c79f05393d67b")))
     (file-name
      (git-file-name "cmake-helpers-for-telegram-desktop" %telegram-version))
+    (patches
+     ;; https://github.com/desktop-app/cmake_helpers/pull/320
+     ;; https://github.com/desktop-app/cmake_helpers/pull/305
+     (search-patches "telegram-desktop-unbundle-gsl.patch"
+                     "telegram-desktop-unbundle-cppgir.patch"))
     (sha256
      (base32
-      "0y96mvzs113zh8bdw1h3i6l0pgwg93rigrday8kfdg4magz686k6"))))
+      "129m2wy3jyrcngsln46k7cl00jjg30kj9kdfil7aq9c23z3iqvm8"))))
 
 (define codegen-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/codegen.git")
-          (commit "1a969faa0afb29d53af03e530775eccdfb8433f1")))
+          (commit "0af136124083369073b8fdaf45f0816fd2b10bad")))
     (file-name
      (git-file-name "codegen-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "1xmw8dfm51p5g20rlmzqnr72a14ngyxwq09an8clf1v5s6mmwvak"))))
+      "057bwn9smrgnyfb1vraf50ihbkhjc4d72msl7vnbqc4h5sg8dav9"))))
 
 (define lib-base-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_base.git")
-          (commit "fd9adb30ee906ea02c125eaa58fcfae773fdc677")))
+          (commit "1a50fd2300da3198e751a22bf728d33822180e15")))
     (file-name
      (git-file-name "lib-base-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "1m760mcfvgzia53nrs6wvjn353jvzlzln7c9fkx2dhpkigiynz83"))))
+      "1hyhqz6mwdmcs6wcglz3hwlzl1n04lfi22d3n75ad40qfc9kh3ci"))))
 
 (define lib-crl-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_crl.git")
-          (commit "3d7e1e1f1321c3defd21c01882d674e485ecd8df")))
+          (commit "078006d29af0002e6cd8c61a405cdeaf65b37142")))
     (file-name
      (git-file-name "lib-crl-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "06mzafnjpfr5ih297dh7bxm6bgpg0wy0gv2r2732n5szyrg9sdl6"))))
+      "18n88ghj3akpkxvllrh1rs19vd0d3xw87hd67qphr30b6ggqs9fd"))))
 
 (define lib-lottie-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_lottie.git")
-          (commit "3e9c2f1026e4b5aa3202fca4cc67ece36c7cebb2")))
+          (commit "1a700e5a0d7c3e2f617530354ff2a47c5c72bb4a")))
     (file-name
      (git-file-name "lib-lottie-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "0l57ibfij9xm4ww4s9cc63q1x8xzpc6ablwaji1krrn3xxksqdd4"))))
+      "18w35sz6k3wcv07v0szx3avpfdl0rjby6yqm1fzmx7fqw2jn6wpl"))))
 
 (define lib-qr-for-telegram-desktop
   (origin
@@ -188,24 +195,24 @@ (define lib-spellcheck-for-telegram-desktop
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_spellcheck.git")
-          (commit "ae89fefd239ecc47d4dab7ba29f9e230376a57d3")))
+          (commit "0b7622ff38778e9cd03d3997de59351973480a1f")))
     (file-name
      (git-file-name "lib-spellcheck-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "147xbbcza5q4wcdipk5jplajzkc48971kg2s7qv5jlz33sxkw1lq"))))
+      "0s9fjxpxxvj1xgzg3sfw6079blgmdvbb5cy6wb921sqaqwf52j6x"))))
 
 (define lib-storage-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_storage.git")
-          (commit "839609369d04615475cb1518636de3619106a917")))
+          (commit "0971b69ca90f1697ef81276d9820dcd6d26de4ac")))
     (file-name
      (git-file-name "lib-storage-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "1l26h2fmqp9dcpr6pfvdd5sjb68j7yh0ms2lnr8na7jf5xqmkwwm"))))
+      "0ihbh1ajns0sf42h9992hnawwjr1n439sgb0g4zirn2bj5i1zbdv"))))
 
 (define lib-tl-for-telegram-desktop
   (origin
@@ -224,52 +231,52 @@ (define lib-ui-for-telegram-desktop
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_ui.git")
-          (commit "37531086ec21a8569deddedb11b402f8a3157b90")))
+          (commit "96be2a6b72f0405a9c01407148303fba2dab101c")))
     (file-name
      (git-file-name "lib-ui-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "0l4baalwdiwcwzn3wgrbyiaryi70lswillbpkzcjpavaa2pjg6b0"))))
+      "0y989q2xs5hjm7dg7rpgyqlalf8sjklhg0v26nnzfgabl8248bgy"))))
 
 (define lib-webrtc-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_webrtc.git")
-          (commit "b68a95ad4d1ae9a1827671100a7fd76cbe448c3f")))
+          (commit "eb9496540356945e2c9fb700bcfa51444fd36f41")))
     (file-name
      (git-file-name "lib-webrtc-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "1c8jwdnn26n13yp0rp0l71q6xlxa6wp3cspbm3pnghw964jwgp3z"))))
+      "0nqlzb02b39ywjmazx30y43nalvc3ypkqjh5zvs35gnvm9x2hy43"))))
 
 (define lib-webview-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_webview.git")
-          (commit "f632fc84cbc62ae8abbbd05f81d472757a337c11")))
+          (commit "363db4e49a0b78e5dd08bd922e09cf8810318c09")))
     (file-name
      (git-file-name "lib-webview-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "0idsfkxq7l9kgyrhifys5l4jkhvbyxkgkp0qdq9218h7g0ldw84i"))))
+      "1l84rlm4cb56q87k5036n4c0g49f6a5qlhrjc5wn57s56wphvhqn"))))
 
 (define tgcalls-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/TelegramMessenger/tgcalls.git")
-          (commit "2e2797648aac2588e7fe479c2e8b4455ec65c5e6")))
+          (commit "b9fa8b84d8abe741183f157218ac038c596a54a5")))
     (file-name
      (git-file-name "tgcalls-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "193m2gkvipijqbfd6a8mhg9nd63wlnshzgspk3pip57vk21l709z"))))
+      "1swni7xw5l0q376b6rnf9h93arzjqm9rkv7g6hz67742lf9a0x9z"))))
 
 (define-public webrtc-for-telegram-desktop
-  (let ((commit "0532942ac6176a66ef184fb728a4cbb02958fc0b")
-        (revision "389"))
+  (let ((commit "c9cc4390ab951f2cbc103ff783a11f398b27660b")
+        (revision "399"))
     (hidden-package
      (package
        (name "webrtc-for-telegram-desktop")
@@ -285,7 +292,7 @@ (define-public webrtc-for-telegram-desktop
           (file-name
            (git-file-name name version))
           (sha256
-           (base32 "0fary99yl1ddk5zjpfy0pyb5brd268j41plcnvv9qjyf0wj9hf2k"))
+           (base32 "0x2hjliiapb9kacbg8fwkz7g09c9k8dc77xxycjh5kmm1fc2i6dd"))
           (patches
            (search-patches
             ;; https://github.com/desktop-app/tg_owt/pull/123
@@ -407,7 +414,7 @@ (define libprisma-for-telegram-desktop
          (url "https://github.com/desktop-app/libprisma")
          (commit "23b0d70f9709da9b38561d5706891a134d18df76")))
    (file-name
-    (git-file-name "libprisma-for-telegram-desktop" "5.2.3"))
+    (git-file-name "libprisma-for-telegram-desktop" %telegram-version))
    (sha256
     (base32
      "0fg4x4ikj7f3706bmfvkwq4smxc98qr3cgpm25w48n4ys6wfgadg"))))
@@ -427,7 +434,7 @@ (define-public telegram-desktop
        (file-name
         (git-file-name name version))
        (sha256
-        (base32 "0g47ffamh1csp79yzkv28v3qjkhjacj0c7pjf53n1ks80j5hc2j0"))
+        (base32 "1jwm8irjx5yfzd9a94f5dy4y9v5as0an8m83hlal6czlqbi5v4sm"))
        (patches
         (search-patches
          ;; https://github.com/telegramdesktop/tdesktop/pull/24126
@@ -493,21 +500,39 @@ (define-public telegram-desktop
                       ("Telegram/lib_webrtc" #$lib-webrtc-for-telegram-desktop)
                       ("Telegram/lib_webview" #$lib-webview-for-telegram-desktop)
                       ("Telegram/ThirdParty/cld3" #$cld3-for-telegram-desktop)
+                      ("Telegram/ThirdParty/libprisma" #$libprisma-for-telegram-desktop)
                       ("Telegram/ThirdParty/tgcalls" #$tgcalls-for-telegram-desktop)))))
+               (add-after 'unpack-additional-sources 'patch-gir-ignore-paths
+                 (lambda _
+                   (substitute* "cmake/external/glib/generate_cppgir.cmake"
+                     (("\\$\\{cmake_helpers_loc\\}/external/glib/cppgir/data")
+                      (string-append #$(this-package-input "cppgir") "/share/cppgir")))))
+               (add-after 'unpack-additional-sources 'use-system-xdg-desktop-portal
+                 (lambda _
+                   (substitute* (list "Telegram/CMakeLists.txt"
+                                      "Telegram/lib_base/CMakeLists.txt")
+                     (("\\$\\{third_party_loc\\}/xdg-desktop-portal/data")
+                      (string-append #$(this-package-native-input "xdg-desktop-portal")
+                                     "/share/dbus-1/interfaces")))))
                (add-after 'install 'glib-or-gtk-compile-schemas
                  (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-compile-schemas))
                (add-after 'glib-or-gtk-compile-schemas 'glib-or-gtk-wrap
                  (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap)))))
     (native-inputs
      (list `(,glib "bin")
+           gobject-introspection
            `(,gtk+ "bin")
            pkg-config
-           python-wrapper))
+           python-wrapper
+           xdg-desktop-portal))
     (inputs
      (list abseil-cpp-cxxstd17
            alsa-lib
+           boost
            c++-gsl
+           cppgir-for-telegram-desktop
            crc32c
+           expected-lite
            fcitx-qt5
            fcitx5-qt
            ffmpeg
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH v5 6/6] gnu: telegram-desktop: Update to 5.2.3.
  2024-07-14 15:49   ` [bug#71897] [PATCH v5 6/6] gnu: telegram-desktop: Update to 5.2.3 dan
@ 2024-07-27 15:56     ` Liliana Marie Prikler
  2024-09-26  5:24       ` bug#71897: " Maxim Cournoyer
  0 siblings, 1 reply; 98+ messages in thread
From: Liliana Marie Prikler @ 2024-07-27 15:56 UTC (permalink / raw)
  To: dan, 71897; +Cc: Maxim Cournoyer

Am Sonntag, dem 14.07.2024 um 23:49 +0800 schrieb dan:
> * 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.
This is minor, but the ChangeLog format uses closing parentheses before
continuation lines.
> (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.2.3.
> [#:phases]<unpack-additional-sources>: Add libprisma-for-telegram-
> desktop.
> <patch-gir-ignore-paths>: New phase.
> <use-system-xdg-desktop-portal>: New phase.
> [native-inputs]: Add gobject-introspection and xdg-desktop-portal.
> [inputs]: Add boost, cppgir-for-telegram-desktop, expected-lite.
> 
> Change-Id: I78df3434a2cd04afc54107b7fecd5e5a8df85564
Can anyone confirm, that this patch builds?  CI didn't build it and ld
died to OOM on my machine.

Cheers




^ permalink raw reply	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH v6 0/7] gnu: telegram-desktop: Update to 5.3.2.
  2024-07-02  5:18 [bug#71897] [PATCH 1/2] gnu: Add cppgir dan
                   ` (5 preceding siblings ...)
  2024-07-14 15:48 ` [bug#71897] [PATCH v5 1/6] " dan
@ 2024-08-04 14:30 ` dan
  2024-08-04 14:30   ` [bug#71897] [PATCH v6 1/7] gnu: xdg-desktop-portal: Update to 1.18.4 dan
                     ` (6 more replies)
  2024-09-18  9:58 ` [bug#71897] [PATCH 0/3] gnu: telegram-desktop: Update to 5.2.1 Sharlatan Hellseher
                   ` (4 subsequent siblings)
  11 siblings, 7 replies; 98+ messages in thread
From: dan @ 2024-08-04 14:30 UTC (permalink / raw)
  To: 71897; +Cc: dan, Maxim Cournoyer, Liliana Marie Prikler

Hello Guix!

This patche series update telegram-desktop to 5.3.2, the latest release, which
the previous one tries to update it to 5.2.3.  The major differences are:

* added a new dependency ada
* modified two patch file so that they could be successfully applied
* added a new phase for telegram-desktop so that they could be built with
  gcc-final

I was trying to build telegram-desktop with a newer gcc, like gcc-12 or
gcc-13, but I ran into an issue which is similar to:
https://issues.guix.gnu.org/43579.

It would be helpful if anyone could give me some guidance on how to solve this
issue.

dan (7):
  gnu: xdg-desktop-portal: Update to 1.18.4.
  gnu: xdg-desktop-portal: Update input style.
  gnu: Add cppgir.
  gnu: Add cppgir-for-telegram-desktop.
  gnu: Add ada.
  gnu: Add libprisma-for-telegram-desktop.
  gnu: telegram-desktop: Update to 5.3.2.

 gnu/local.mk                                  |   3 +
 gnu/packages/cpp.scm                          |  23 ++++
 gnu/packages/freedesktop.scm                  |  47 ++++----
 gnu/packages/glib.scm                         |  48 ++++++++
 ...gram-desktop-allow-disable-libtgvoip.patch |   6 +-
 .../telegram-desktop-unbundle-cppgir.patch    |  95 ++++++++++++++++
 .../telegram-desktop-unbundle-gsl.patch       |  31 +++++
 ...or-telegram-desktop-unbundle-libsrtp.patch |   7 +-
 ...-desktop-portal-disable-portal-tests.patch |  56 +++++++++
 gnu/packages/telegram.scm                     | 107 ++++++++++++------
 10 files changed, 362 insertions(+), 61 deletions(-)
 create mode 100644 gnu/packages/patches/telegram-desktop-unbundle-cppgir.patch
 create mode 100644 gnu/packages/patches/telegram-desktop-unbundle-gsl.patch
 create mode 100644 gnu/packages/patches/xdg-desktop-portal-disable-portal-tests.patch


base-commit: efb3e63a2293f92f4790f1e3b498113e1128d8d4
-- 
2.41.0





^ permalink raw reply	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH v6 1/7] gnu: xdg-desktop-portal: Update to 1.18.4.
  2024-08-04 14:30 ` [bug#71897] [PATCH v6 0/7] gnu: telegram-desktop: Update to 5.3.2 dan
@ 2024-08-04 14:30   ` dan
  2024-08-04 14:30   ` [bug#71897] [PATCH v6 2/7] gnu: xdg-desktop-portal: Update input style dan
                     ` (5 subsequent siblings)
  6 siblings, 0 replies; 98+ messages in thread
From: dan @ 2024-08-04 14:30 UTC (permalink / raw)
  To: 71897; +Cc: dan, Maxim Cournoyer, Liliana Marie Prikler

* gnu/packages/patches/xdg-desktop-portal-disable-portal-tests.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/freedesktop.scm (xdg-desktop-portal): Update to 1.18.4.
[patches]: Disable portal tests.
[native-inputs]: Remove autoconf, automake, libtool and which.  Add python,
python-dbusmock, python-pytest and python-pytest-xdist.
[inputs]: Add bubblewrap.
[phases]<#:configure-flags>: Update flags to meson options.

Change-Id: Ic9876565e9119443fedd082273be4f372ebce1d4
---
 gnu/local.mk                                  |  1 +
 gnu/packages/freedesktop.scm                  | 25 +++++----
 ...-desktop-portal-disable-portal-tests.patch | 56 +++++++++++++++++++
 3 files changed, 72 insertions(+), 10 deletions(-)
 create mode 100644 gnu/packages/patches/xdg-desktop-portal-disable-portal-tests.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 6d2b14e72d..d8fcb13cfe 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2245,6 +2245,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/wordnet-CVE-2008-3908-pt2.patch			\
   %D%/packages/patches/wpa-supplicant-dbus-group-policy.patch		\
   %D%/packages/patches/x265-arm-flags.patch			\
+  %D%/packages/patches/xdg-desktop-portal-disable-portal-tests.patch\
   %D%/packages/patches/xdg-desktop-portal-wlr-harcoded-length.patch\
   %D%/packages/patches/xen-docs-use-predictable-ordering.patch	\
   %D%/packages/patches/xen-remove-config.gz-timestamp.patch	\
diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index 8e0c5f0cf3..99a4469264 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -39,6 +39,7 @@
 ;;; Copyright © 2024 aurtzy <aurtzy@gmail.com>
 ;;; Copyright © 2024 Dariqq <dariqq@posteo.net>
 ;;; Copyright © 2024 Wilko Meyer <w@wmeyer.eu>
+;;; Copyright © 2024 dan <i@dan.games>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -135,6 +136,7 @@ (define-module (gnu packages freedesktop)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages valgrind)
   #:use-module (gnu packages video)
+  #:use-module (gnu packages virtualization)
   #:use-module (gnu packages w3m)
   #:use-module (gnu packages web)
   #:use-module (gnu packages xdisorg)
@@ -3048,7 +3050,7 @@ (define-public libportal
 (define-public xdg-desktop-portal
   (package
     (name "xdg-desktop-portal")
-    (version "1.16.0")
+    (version "1.18.4")
     (source
      (origin
        (method url-fetch)
@@ -3057,18 +3059,21 @@ (define-public xdg-desktop-portal
              version "/xdg-desktop-portal-" version ".tar.xz"))
        (sha256
         (base32
-         "06cczlh39kc41rvav06v37sad827y61rffy3v29i918ibj8sahav"))))
-    (build-system gnu-build-system)
+         "0r8y8qmzcfj7b7brqcxr9lg8pavfds815ffvj0kqc378fhgaln5q"))
+       ;; disable portal tests since they try to use fuse
+       (patches (search-patches "xdg-desktop-portal-disable-portal-tests.patch"))))
+    (build-system meson-build-system)
     (native-inputs
      `(("pkg-config" ,pkg-config)
-       ("autoconf" ,autoconf)
-       ("automake" ,automake)
-       ("libtool" ,libtool)
        ("glib:bin" ,glib "bin")
-       ("which" ,which)
-       ("gettext" ,gettext-minimal)))
+       ("gettext" ,gettext-minimal)
+       ("python" ,python)
+       ("python-dbusmock" ,python-dbusmock)
+       ("python-pytest" ,python-pytest)
+       ("python-pytest-xdist" ,python-pytest-xdist)))
     (inputs
-     `(("gdk-pixbuf" ,gdk-pixbuf)
+     `(("bubblewrap" ,bubblewrap)
+       ("gdk-pixbuf" ,gdk-pixbuf)
        ("glib" ,glib)
        ("flatpak" ,flatpak)
        ("fontconfig" ,fontconfig)
@@ -3080,7 +3085,7 @@ (define-public xdg-desktop-portal
        ("fuse" ,fuse)))
     (arguments
      `(#:configure-flags
-       (list "--with-systemd=no")
+       (list "-Dsystemd=disabled")
        #:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'po-chmod
diff --git a/gnu/packages/patches/xdg-desktop-portal-disable-portal-tests.patch b/gnu/packages/patches/xdg-desktop-portal-disable-portal-tests.patch
new file mode 100644
index 0000000000..5e13493613
--- /dev/null
+++ b/gnu/packages/patches/xdg-desktop-portal-disable-portal-tests.patch
@@ -0,0 +1,56 @@
+From b7750fa99c31c5f28ac2053fa154bef4038b5cc0 Mon Sep 17 00:00:00 2001
+From: dan <i@dan.games>
+Date: Tue, 2 Jul 2024 19:37:38 +0800
+Subject: [PATCH] tests: remove portal tests.
+
+---
+ tests/meson.build | 24 ------------------------
+ 1 file changed, 24 deletions(-)
+
+diff --git a/tests/meson.build b/tests/meson.build
+index a2dafee..bcd87be 100644
+--- a/tests/meson.build
++++ b/tests/meson.build
+@@ -181,18 +181,6 @@ portal_tests = [
+ 
+ test_env = env_tests
+ test_env.set('XDG_CURRENT_DESKTOP', 'test')
+-foreach p : portal_tests
+-    test(
+-      'test-portals-@0@'.format(p),
+-      test_portals,
+-      args: ['--verbose', '--keep-going', '--tap', '-p', '/portal/@0@'.format(p)],
+-      depends: [test_backends, test_portals],
+-      env: test_env,
+-      is_parallel: false,
+-      protocol: test_protocol,
+-      suite: 'portals',
+-    )
+-endforeach
+ 
+ # Split the portal tests into one test per portal, this makes debugging a lot
+ # easier.
+@@ -204,18 +192,6 @@ portal_limited = [
+ 
+ limited_env = env_tests
+ limited_env.set('XDG_CURRENT_DESKTOP', 'limited')
+-foreach p : portal_limited
+-    test(
+-      'limited-portals-@0@'.format(p),
+-      limited_portals,
+-      args: ['--verbose', '--keep-going', '--tap', '-p', '/limited/@0@'.format(p)],
+-      depends: [test_backends, limited_portals],
+-      env: limited_env,
+-      is_parallel: false,
+-      protocol: test_protocol,
+-      suite: 'portals',
+-    )
+-endforeach
+ 
+ if enable_installed_tests
+   install_data(
+
+base-commit: 11c8a96b147aeae70e3f770313f93b367d53fedd
+-- 
+2.41.0
+
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH v6 2/7] gnu: xdg-desktop-portal: Update input style.
  2024-08-04 14:30 ` [bug#71897] [PATCH v6 0/7] gnu: telegram-desktop: Update to 5.3.2 dan
  2024-08-04 14:30   ` [bug#71897] [PATCH v6 1/7] gnu: xdg-desktop-portal: Update to 1.18.4 dan
@ 2024-08-04 14:30   ` dan
  2024-08-04 14:30   ` [bug#71897] [PATCH v6 3/7] gnu: Add cppgir dan
                     ` (4 subsequent siblings)
  6 siblings, 0 replies; 98+ messages in thread
From: dan @ 2024-08-04 14:30 UTC (permalink / raw)
  To: 71897; +Cc: dan, Maxim Cournoyer, Liliana Marie Prikler

* gnu/packages/freedesktop.scm (xdg-desktop-portal): Update input style.

Change-Id: Iec0630cd945dfcd4db67af30211cbfd4d058766d
---
 gnu/packages/freedesktop.scm | 36 ++++++++++++++++++------------------
 1 file changed, 18 insertions(+), 18 deletions(-)

diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index 99a4469264..d06ce2a48a 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -3064,25 +3064,25 @@ (define-public xdg-desktop-portal
        (patches (search-patches "xdg-desktop-portal-disable-portal-tests.patch"))))
     (build-system meson-build-system)
     (native-inputs
-     `(("pkg-config" ,pkg-config)
-       ("glib:bin" ,glib "bin")
-       ("gettext" ,gettext-minimal)
-       ("python" ,python)
-       ("python-dbusmock" ,python-dbusmock)
-       ("python-pytest" ,python-pytest)
-       ("python-pytest-xdist" ,python-pytest-xdist)))
+     (list gettext-minimal
+           (list glib "bin")
+           pkg-config
+           python
+           python-dbusmock
+           python-pytest
+           python-pytest-xdist))
     (inputs
-     `(("bubblewrap" ,bubblewrap)
-       ("gdk-pixbuf" ,gdk-pixbuf)
-       ("glib" ,glib)
-       ("flatpak" ,flatpak)
-       ("fontconfig" ,fontconfig)
-       ("json-glib" ,json-glib)
-       ("libportal" ,libportal)
-       ("dbus" ,dbus)
-       ("geoclue" ,geoclue)
-       ("pipewire" ,pipewire)
-       ("fuse" ,fuse)))
+     (list bubblewrap
+           dbus
+           flatpak
+           fontconfig
+           fuse
+           gdk-pixbuf
+           geoclue
+           glib
+           json-glib
+           libportal
+           pipewire))
     (arguments
      `(#:configure-flags
        (list "-Dsystemd=disabled")
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH v6 3/7] gnu: Add cppgir.
  2024-08-04 14:30 ` [bug#71897] [PATCH v6 0/7] gnu: telegram-desktop: Update to 5.3.2 dan
  2024-08-04 14:30   ` [bug#71897] [PATCH v6 1/7] gnu: xdg-desktop-portal: Update to 1.18.4 dan
  2024-08-04 14:30   ` [bug#71897] [PATCH v6 2/7] gnu: xdg-desktop-portal: Update input style dan
@ 2024-08-04 14:30   ` dan
  2024-08-04 14:30   ` [bug#71897] [PATCH v6 4/7] gnu: Add cppgir-for-telegram-desktop dan
                     ` (3 subsequent siblings)
  6 siblings, 0 replies; 98+ messages in thread
From: dan @ 2024-08-04 14:30 UTC (permalink / raw)
  To: 71897; +Cc: dan, Maxim Cournoyer, Liliana Marie Prikler, Vivien Kraus

* gnu/packages/glib.scm (cppgir): New variable.

Change-Id: Ic4510be6d05b7b3977aa457c6a7fec382c1d3a88
---
 gnu/packages/glib.scm | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index b11046f05d..3a44207afe 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -20,6 +20,7 @@
 ;;; Copyright © 2022 Petr Hodina <phodina@protonmail.com>
 ;;; Copyright © 2023 Saku Laesvuori <saku@laesvuori.fi>
 ;;; Copyright © 2024 Zheng Junjie <873216071@qq.com>
+;;; Copyright © 2024 dan <i@dan.games>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -71,6 +72,7 @@ (define-module (gnu packages glib)
   #:use-module (gnu packages perl-check)
   #:use-module (gnu packages popt)
   #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages pretty-print)
   #:use-module (gnu packages python)
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages sqlite)
@@ -1594,3 +1596,30 @@ (define-public libdex
 Dex also provides Fibers which allow writing synchronous looking code in C
 that uses asynchronous and future-based APIs.")
     (license license:lgpl2.1+)))
+
+(define-public cppgir
+  (package
+    (name "cppgir")
+    (version "2.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://gitlab.com/mnauw/cppgir")
+         (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0cj4myqzb28hgb7zlxlba9y8n4ysxkvv2y9wy6f7ps58mr18h7bl"))))
+    (build-system cmake-build-system)
+    (arguments
+     (list
+      #:configure-flags
+      #~(list "-DINTERNAL_EXPECTED=OFF")))
+    (inputs (list boost fmt expected-lite))
+    (home-page "https://gitlab.com/mnauw/cppgir")
+    (synopsis "GObject introspection C++ binding wrapper generator")
+    (description "cppgir processes .gir files derived from GObject
+introspection annotations into a set of C++ files defining suitable
+namespaces, classes and other types that together form a C++ binding.")
+    (license license:expat)))
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH v6 4/7] gnu: Add cppgir-for-telegram-desktop.
  2024-08-04 14:30 ` [bug#71897] [PATCH v6 0/7] gnu: telegram-desktop: Update to 5.3.2 dan
                     ` (2 preceding siblings ...)
  2024-08-04 14:30   ` [bug#71897] [PATCH v6 3/7] gnu: Add cppgir dan
@ 2024-08-04 14:30   ` dan
  2024-08-04 14:30   ` [bug#71897] [PATCH v6 5/7] gnu: Add ada dan
                     ` (2 subsequent siblings)
  6 siblings, 0 replies; 98+ messages in thread
From: dan @ 2024-08-04 14:30 UTC (permalink / raw)
  To: 71897; +Cc: dan, Maxim Cournoyer, Liliana Marie Prikler, Vivien Kraus

* gnu/packages/glib.scm (cppgir-for-telegram-desktop): New variable.

Change-Id: Ib9ca3bd376f32d13939adabd2c52e1eb24e2ddcb
---
 gnu/packages/glib.scm | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index 3a44207afe..29ac8d5542 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -1623,3 +1623,22 @@ (define-public cppgir
 introspection annotations into a set of C++ files defining suitable
 namespaces, classes and other types that together form a C++ binding.")
     (license license:expat)))
+
+;; telegram-desktop requires a more recent version of cppgir
+(define-public cppgir-for-telegram-desktop
+  (let ((commit "9c4f5820d94d62ab451501f016bfea97156518f4")
+        (revision "0"))
+    (package
+      (inherit cppgir)
+      (name "cppgir-for-telegram-desktop")
+      (version (git-version "2.0" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri
+          (git-reference
+           (url "https://gitlab.com/mnauw/cppgir")
+           (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "1fa9nf4yljfarihaqj5kd98yysrky7q316mh6l5b1rq39ga15k9b")))))))
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH v6 5/7] gnu: Add ada.
  2024-08-04 14:30 ` [bug#71897] [PATCH v6 0/7] gnu: telegram-desktop: Update to 5.3.2 dan
                     ` (3 preceding siblings ...)
  2024-08-04 14:30   ` [bug#71897] [PATCH v6 4/7] gnu: Add cppgir-for-telegram-desktop dan
@ 2024-08-04 14:30   ` dan
  2024-08-04 14:48     ` Liliana Marie Prikler
  2024-08-04 14:30   ` [bug#71897] [PATCH v6 6/7] gnu: Add libprisma-for-telegram-desktop dan
  2024-08-04 14:30   ` [bug#71897] [PATCH v6 7/7] gnu: telegram-desktop: Update to 5.3.2 dan
  6 siblings, 1 reply; 98+ messages in thread
From: dan @ 2024-08-04 14:30 UTC (permalink / raw)
  To: 71897; +Cc: dan, Maxim Cournoyer, Liliana Marie Prikler

* gnu/packages/cpp.scm (ada): New variable.

Change-Id: I9924bba53ed58bbf306bf073c9724cd7bd6f570a
---
 gnu/packages/cpp.scm | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index c1c2a4028b..de607f4756 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -3244,3 +3244,26 @@ (define-public tl-optional
 the std::optional for C++11/14/17, with support for monadic operations added in
 C++23.")
     (license license:cc0)))
+
+(define-public ada
+  (package
+    (name "ada")
+    (version "2.9.0")
+    (source
+      (origin
+        (method git-fetch)
+        (uri (git-reference
+              (url "https://github.com/ada-url/ada.git")
+              (commit (string-append "v" version))))
+        (file-name (git-file-name name version))
+        (sha256 (base32 "1d2mj2zmw0dkkgas3bap2xwlizsy0qdpqwcavb4hqx7xp5xnm7yn"))))
+    (build-system cmake-build-system)
+    (arguments
+     (list
+      #:configure-flags
+      #~(list "-DADA_TESTING=OFF" "-DADA_TOOLS=OFF")))
+    (home-page "https://github.com/ada-url/ada")
+    (synopsis "URL parser")
+    (description "Ada is a fast and spec-compliant URL parser written in C++.
+Specification for URL parser can be found from the WHATWG website.")
+    (license license:gpl3+)))
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH v6 6/7] gnu: Add libprisma-for-telegram-desktop.
  2024-08-04 14:30 ` [bug#71897] [PATCH v6 0/7] gnu: telegram-desktop: Update to 5.3.2 dan
                     ` (4 preceding siblings ...)
  2024-08-04 14:30   ` [bug#71897] [PATCH v6 5/7] gnu: Add ada dan
@ 2024-08-04 14:30   ` dan
  2024-08-04 14:30   ` [bug#71897] [PATCH v6 7/7] gnu: telegram-desktop: Update to 5.3.2 dan
  6 siblings, 0 replies; 98+ messages in thread
From: dan @ 2024-08-04 14:30 UTC (permalink / raw)
  To: 71897; +Cc: dan, Maxim Cournoyer, Liliana Marie Prikler

* gnu/packages/telegram.scm (libprisma-for-telegram-desktop): New variable.

Change-Id: I855b463993654a8cad491c7b56c9581b3083f5e4
---
 gnu/packages/telegram.scm | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/gnu/packages/telegram.scm b/gnu/packages/telegram.scm
index a77164b93e..88b4baa0da 100644
--- a/gnu/packages/telegram.scm
+++ b/gnu/packages/telegram.scm
@@ -400,6 +400,18 @@ (define cld3-for-telegram-desktop
     (base32
      "0ayrrhfdwrf4260h9fsirkhhfrcvc3qqnh6h9wj3ixij2lq0wwqb"))))
 
+(define libprisma-for-telegram-desktop
+  (origin
+   (method git-fetch)
+   (uri (git-reference
+         (url "https://github.com/desktop-app/libprisma")
+         (commit "23b0d70f9709da9b38561d5706891a134d18df76")))
+   (file-name
+    (git-file-name "libprisma-for-telegram-desktop" "5.3.2"))
+   (sha256
+    (base32
+     "0fg4x4ikj7f3706bmfvkwq4smxc98qr3cgpm25w48n4ys6wfgadg"))))
+
 (define-public telegram-desktop
   (package
     (name "telegram-desktop")
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH v6 7/7] gnu: telegram-desktop: Update to 5.3.2.
  2024-08-04 14:30 ` [bug#71897] [PATCH v6 0/7] gnu: telegram-desktop: Update to 5.3.2 dan
                     ` (5 preceding siblings ...)
  2024-08-04 14:30   ` [bug#71897] [PATCH v6 6/7] gnu: Add libprisma-for-telegram-desktop dan
@ 2024-08-04 14:30   ` dan
  6 siblings, 0 replies; 98+ messages in thread
From: dan @ 2024-08-04 14:30 UTC (permalink / raw)
  To: 71897; +Cc: dan, Maxim Cournoyer, Liliana Marie Prikler

* 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.3.2.
[#: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 ada, gobject-introspection and xdg-desktop-portal.
[inputs]: Add boost, cppgir-for-telegram-desktop, expected-lite.

Change-Id: I78df3434a2cd04afc54107b7fecd5e5a8df85564
* gnu/packages/patches/telegram-desktop-allow-disable-libtgvoip.patch:

Change-Id: I086ca5016477b5e7713985c4ade4e2828b98a6ca
---
 gnu/local.mk                                  |  2 +
 ...gram-desktop-allow-disable-libtgvoip.patch |  6 +-
 .../telegram-desktop-unbundle-cppgir.patch    | 95 ++++++++++++++++++
 .../telegram-desktop-unbundle-gsl.patch       | 31 ++++++
 ...or-telegram-desktop-unbundle-libsrtp.patch |  7 +-
 gnu/packages/telegram.scm                     | 97 ++++++++++++-------
 6 files changed, 197 insertions(+), 41 deletions(-)
 create mode 100644 gnu/packages/patches/telegram-desktop-unbundle-cppgir.patch
 create mode 100644 gnu/packages/patches/telegram-desktop-unbundle-gsl.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index d8fcb13cfe..6bce751788 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2139,6 +2139,8 @@ dist_patch_DATA =						\
   %D%/packages/patches/texinfo-headings-single.patch		\
   %D%/packages/patches/texinfo-5-perl-compat.patch		\
   %D%/packages/patches/telegram-desktop-allow-disable-libtgvoip.patch   \
+  %D%/packages/patches/telegram-desktop-unbundle-cppgir.patch   \
+  %D%/packages/patches/telegram-desktop-unbundle-gsl.patch      \
   %D%/packages/patches/telegram-purple-adjust-test.patch	\
   %D%/packages/patches/teuchos-remove-duplicate-using.patch	\
   %D%/packages/patches/texi2html-document-encoding.patch	\
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()
diff --git a/gnu/packages/telegram.scm b/gnu/packages/telegram.scm
index 88b4baa0da..486e742d5e 100644
--- a/gnu/packages/telegram.scm
+++ b/gnu/packages/telegram.scm
@@ -5,6 +5,7 @@
 ;;; Copyright © 2023 Lu Hui <luhux76@gmail.com>
 ;;; Copyright © 2023 Camilo Q.S. (Distopico) <distopico@riseup.net>
 ;;; Copyright © 2024 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2024 dan <i@dan.games>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -28,6 +29,7 @@ (define-module (gnu packages telegram)
   #:use-module (gnu packages assembly)
   #:use-module (gnu packages audio)
   #:use-module (gnu packages autotools)
+  #:use-module (gnu packages boost)
   #:use-module (gnu packages check)
   #:use-module (gnu packages cmake)
   #:use-module (gnu packages compression)
@@ -82,11 +84,11 @@ (define-module (gnu packages telegram)
   #:use-module (guix build-system python)
   #:use-module (guix build-system qt))
 
-(define %telegram-version "4.8.1")
+(define %telegram-version "5.3.2")
 
 (define libyuv-for-telegram-desktop
-  (let ((commit "77c2121f7e6b8e694d6e908bbbe9be24214097da")
-        (revision "2439"))
+  (let ((commit "04821d1e7d60845525e8db55c7bcd41ef5be9406")
+        (revision "2440"))
     (origin
       (method git-fetch)
       (uri (git-reference
@@ -97,67 +99,72 @@ (define libyuv-for-telegram-desktop
                   (git-version "0" revision commit)))
       (sha256
        (base32
-        "1b4k8yskr9ffl5k8s9i0af1gn1pavsfixla26vh8bij69rdr7f9c")))))
+        "1fsvc0f8mckrdzys8lnlnbw6676mjamm6p3ghr2h9liqfa83s6wg")))))
 
 (define cmake-helpers-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/cmake_helpers.git")
-          (commit "6ab5543b3dd1e40979d258e46d03376931b6c37b")))
+          (commit "08de4f18f5e4459689957b3aa115e10d8cbef9d6")))
     (file-name
      (git-file-name "cmake-helpers-for-telegram-desktop" %telegram-version))
+    (patches
+     ;; https://github.com/desktop-app/cmake_helpers/pull/320
+     ;; https://github.com/desktop-app/cmake_helpers/pull/305
+     (search-patches "telegram-desktop-unbundle-gsl.patch"
+                     "telegram-desktop-unbundle-cppgir.patch"))
     (sha256
      (base32
-      "0y96mvzs113zh8bdw1h3i6l0pgwg93rigrday8kfdg4magz686k6"))))
+      "0a2y9dpszw686lk83k3psvid6kqrwnx7z4zcb35xahn4ab3pp7il"))))
 
 (define codegen-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/codegen.git")
-          (commit "1a969faa0afb29d53af03e530775eccdfb8433f1")))
+          (commit "0af136124083369073b8fdaf45f0816fd2b10bad")))
     (file-name
      (git-file-name "codegen-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "1xmw8dfm51p5g20rlmzqnr72a14ngyxwq09an8clf1v5s6mmwvak"))))
+      "057bwn9smrgnyfb1vraf50ihbkhjc4d72msl7vnbqc4h5sg8dav9"))))
 
 (define lib-base-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_base.git")
-          (commit "fd9adb30ee906ea02c125eaa58fcfae773fdc677")))
+          (commit "ca4503b3075fcaed5719b6ff1f40e40d14d08d95")))
     (file-name
      (git-file-name "lib-base-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "1m760mcfvgzia53nrs6wvjn353jvzlzln7c9fkx2dhpkigiynz83"))))
+      "1clzv85gbix9km2id2c4r0dpsc6jjrybrs4z6bpzfriwahhd64a5"))))
 
 (define lib-crl-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_crl.git")
-          (commit "3d7e1e1f1321c3defd21c01882d674e485ecd8df")))
+          (commit "c1d6b0273653095b10b4d0f4f7c30b614b690fd5")))
     (file-name
      (git-file-name "lib-crl-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "06mzafnjpfr5ih297dh7bxm6bgpg0wy0gv2r2732n5szyrg9sdl6"))))
+      "1sxn3qccsfbx1289z0fdrb4cggs16a8r75ic6wi81c6lnkrdi3wl"))))
 
 (define lib-lottie-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_lottie.git")
-          (commit "3e9c2f1026e4b5aa3202fca4cc67ece36c7cebb2")))
+          (commit "1a700e5a0d7c3e2f617530354ff2a47c5c72bb4a")))
     (file-name
      (git-file-name "lib-lottie-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "0l57ibfij9xm4ww4s9cc63q1x8xzpc6ablwaji1krrn3xxksqdd4"))))
+      "18w35sz6k3wcv07v0szx3avpfdl0rjby6yqm1fzmx7fqw2jn6wpl"))))
 
 (define lib-qr-for-telegram-desktop
   (origin
@@ -188,24 +195,24 @@ (define lib-spellcheck-for-telegram-desktop
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_spellcheck.git")
-          (commit "ae89fefd239ecc47d4dab7ba29f9e230376a57d3")))
+          (commit "0b7622ff38778e9cd03d3997de59351973480a1f")))
     (file-name
      (git-file-name "lib-spellcheck-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "147xbbcza5q4wcdipk5jplajzkc48971kg2s7qv5jlz33sxkw1lq"))))
+      "0s9fjxpxxvj1xgzg3sfw6079blgmdvbb5cy6wb921sqaqwf52j6x"))))
 
 (define lib-storage-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_storage.git")
-          (commit "839609369d04615475cb1518636de3619106a917")))
+          (commit "ccdc72548a5065b5991b4e06e610d76bc4f6023e")))
     (file-name
      (git-file-name "lib-storage-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "1l26h2fmqp9dcpr6pfvdd5sjb68j7yh0ms2lnr8na7jf5xqmkwwm"))))
+      "0b11ix95dzpkz335q0a6b5yg8qhj33s4fgj9ppl37pszcqq1j3wi"))))
 
 (define lib-tl-for-telegram-desktop
   (origin
@@ -224,52 +231,52 @@ (define lib-ui-for-telegram-desktop
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_ui.git")
-          (commit "37531086ec21a8569deddedb11b402f8a3157b90")))
+          (commit "8db5d1aa533334c75ed2598ecf3607768ae9b418")))
     (file-name
      (git-file-name "lib-ui-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "0l4baalwdiwcwzn3wgrbyiaryi70lswillbpkzcjpavaa2pjg6b0"))))
+      "0zkxjqg112wp1120vqc8qw0hm9dwhf51p8v9mrc76i4p1bd7m571"))))
 
 (define lib-webrtc-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_webrtc.git")
-          (commit "b68a95ad4d1ae9a1827671100a7fd76cbe448c3f")))
+          (commit "8751e27d50d2f26b5d20673e5ddba38e90953570")))
     (file-name
      (git-file-name "lib-webrtc-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "1c8jwdnn26n13yp0rp0l71q6xlxa6wp3cspbm3pnghw964jwgp3z"))))
+      "0f05pqb83qckghzlhnwqbi9qfi9xw7qsv8jampl4qyaq9q0w9p20"))))
 
 (define lib-webview-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_webview.git")
-          (commit "f632fc84cbc62ae8abbbd05f81d472757a337c11")))
+          (commit "c27c69953db52cfcb56abc3d422764f0fb4c2152")))
     (file-name
      (git-file-name "lib-webview-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "0idsfkxq7l9kgyrhifys5l4jkhvbyxkgkp0qdq9218h7g0ldw84i"))))
+      "0r86c5r0dhrvvjaaava5jfayk3gmimnb74b6dbwmzd6dcw35nfip"))))
 
 (define tgcalls-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/TelegramMessenger/tgcalls.git")
-          (commit "2e2797648aac2588e7fe479c2e8b4455ec65c5e6")))
+          (commit "9bf4065ea00cbed5e63cec348457ed13143459d0")))
     (file-name
      (git-file-name "tgcalls-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "193m2gkvipijqbfd6a8mhg9nd63wlnshzgspk3pip57vk21l709z"))))
+      "1p563a11w8jrid96xf03dg6j39ciz28n5f4r6g28lxhiphbqzfym"))))
 
 (define-public webrtc-for-telegram-desktop
-  (let ((commit "0532942ac6176a66ef184fb728a4cbb02958fc0b")
-        (revision "389"))
+  (let ((commit "c425281150317753d7bc5182c6572abe20f9a784")
+        (revision "456"))
     (hidden-package
      (package
        (name "webrtc-for-telegram-desktop")
@@ -285,7 +292,7 @@ (define-public webrtc-for-telegram-desktop
           (file-name
            (git-file-name name version))
           (sha256
-           (base32 "0fary99yl1ddk5zjpfy0pyb5brd268j41plcnvv9qjyf0wj9hf2k"))
+           (base32 "1fj48iq56awnrckncy1qc3zhdzifl725hbb6an7wg2v3zmagvrwn"))
           (patches
            (search-patches
             ;; https://github.com/desktop-app/tg_owt/pull/123
@@ -407,7 +414,7 @@ (define libprisma-for-telegram-desktop
          (url "https://github.com/desktop-app/libprisma")
          (commit "23b0d70f9709da9b38561d5706891a134d18df76")))
    (file-name
-    (git-file-name "libprisma-for-telegram-desktop" "5.3.2"))
+    (git-file-name "libprisma-for-telegram-desktop" %telegram-version))
    (sha256
     (base32
      "0fg4x4ikj7f3706bmfvkwq4smxc98qr3cgpm25w48n4ys6wfgadg"))))
@@ -427,7 +434,7 @@ (define-public telegram-desktop
        (file-name
         (git-file-name name version))
        (sha256
-        (base32 "0g47ffamh1csp79yzkv28v3qjkhjacj0c7pjf53n1ks80j5hc2j0"))
+        (base32 "0pw11f3a616niimq9xpqxh2mcrd88q3dw22m3avrn90lmqb7mp12"))
        (patches
         (search-patches
          ;; https://github.com/telegramdesktop/tdesktop/pull/24126
@@ -493,21 +500,45 @@ (define-public telegram-desktop
                       ("Telegram/lib_webrtc" #$lib-webrtc-for-telegram-desktop)
                       ("Telegram/lib_webview" #$lib-webview-for-telegram-desktop)
                       ("Telegram/ThirdParty/cld3" #$cld3-for-telegram-desktop)
+                      ("Telegram/ThirdParty/libprisma" #$libprisma-for-telegram-desktop)
                       ("Telegram/ThirdParty/tgcalls" #$tgcalls-for-telegram-desktop)))))
+               (add-after 'unpack-additional-sources 'patch-gir-ignore-paths
+                 (lambda _
+                   (substitute* "cmake/external/glib/generate_cppgir.cmake"
+                     (("\\$\\{cmake_helpers_loc\\}/external/glib/cppgir/data")
+                      (string-append #$(this-package-input "cppgir") "/share/cppgir")))))
+               (add-after 'unpack-additional-sources 'use-system-xdg-desktop-portal
+                 (lambda _
+                   (substitute* (list "Telegram/CMakeLists.txt"
+                                      "Telegram/lib_base/CMakeLists.txt")
+                     (("\\$\\{third_party_loc\\}/xdg-desktop-portal/data")
+                      (string-append #$(this-package-native-input "xdg-desktop-portal")
+                                     "/share/dbus-1/interfaces")))))
+               ;; has to remove this constexpr otherwise cannot compile with gcc-final
+               (add-after 'use-system-xdg-desktop-portal 'patch-libwebview
+                 (lambda _
+                   (substitute* "Telegram/lib_webview/webview/webview_interface.h"
+                     (("constexpr ") ""))))
                (add-after 'install 'glib-or-gtk-compile-schemas
                  (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-compile-schemas))
                (add-after 'glib-or-gtk-compile-schemas 'glib-or-gtk-wrap
                  (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap)))))
     (native-inputs
-     (list `(,glib "bin")
+     (list ada
+           `(,glib "bin")
+           gobject-introspection
            `(,gtk+ "bin")
            pkg-config
-           python-wrapper))
+           python-wrapper
+           xdg-desktop-portal))
     (inputs
      (list abseil-cpp-cxxstd17
            alsa-lib
+           boost
            c++-gsl
+           cppgir-for-telegram-desktop
            crc32c
+           expected-lite
            fcitx-qt5
            fcitx5-qt
            ffmpeg
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH v6 5/7] gnu: Add ada.
  2024-08-04 14:30   ` [bug#71897] [PATCH v6 5/7] gnu: Add ada dan
@ 2024-08-04 14:48     ` Liliana Marie Prikler
  0 siblings, 0 replies; 98+ messages in thread
From: Liliana Marie Prikler @ 2024-08-04 14:48 UTC (permalink / raw)
  To: dan, 71897; +Cc: Maxim Cournoyer

Am Sonntag, dem 04.08.2024 um 22:30 +0800 schrieb dan:
> * gnu/packages/cpp.scm (ada): New variable.
> 
> Change-Id: I9924bba53ed58bbf306bf073c9724cd7bd6f570a
> ---
>  gnu/packages/cpp.scm | 23 +++++++++++++++++++++++
>  1 file changed, 23 insertions(+)
> 
> diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
> index c1c2a4028b..de607f4756 100644
> --- a/gnu/packages/cpp.scm
> +++ b/gnu/packages/cpp.scm
> @@ -3244,3 +3244,26 @@ (define-public tl-optional
>  the std::optional for C++11/14/17, with support for monadic
> operations added in
>  C++23.")
>      (license license:cc0)))
> +
> +(define-public ada
> +  (package
> +    (name "ada")
Given that ada is also a programming language, perhaps we should play
it safe and name the package "cpp-ada-url-parser"
> +    (version "2.9.0")
> +    (source
> +      (origin
> +        (method git-fetch)
> +        (uri (git-reference
> +              (url "https://github.com/ada-url/ada.git")
> +              (commit (string-append "v" version))))
> +        (file-name (git-file-name name version))
> +        (sha256 (base32
> "1d2mj2zmw0dkkgas3bap2xwlizsy0qdpqwcavb4hqx7xp5xnm7yn"))))
> +    (build-system cmake-build-system)
> +    (arguments
> +     (list
> +      #:configure-flags
> +      #~(list "-DADA_TESTING=OFF" "-DADA_TOOLS=OFF")))
We should enable testing, even if we need to patch the cmake files to
unvendor inputs.
> +    (home-page "https://github.com/ada-url/ada")
It looks like the home-page is instead https://ada-url.com/
> +    (synopsis "URL parser")
> +    (description "Ada is a fast and spec-compliant URL parser
> written in C++.
> +Specification for URL parser can be found from the WHATWG website.")
> +    (license license:gpl3+)))

Cheers




^ permalink raw reply	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH 0/3] gnu: telegram-desktop: Update to 5.2.1.
  2024-07-02  5:18 [bug#71897] [PATCH 1/2] gnu: Add cppgir dan
                   ` (6 preceding siblings ...)
  2024-08-04 14:30 ` [bug#71897] [PATCH v6 0/7] gnu: telegram-desktop: Update to 5.3.2 dan
@ 2024-09-18  9:58 ` Sharlatan Hellseher
  2024-09-21 10:35   ` dan
  2024-09-21 11:34 ` [bug#71897] [PATCH v7 1/9] gnu: xdg-desktop-portal: Update to 1.18.4 dan
                   ` (3 subsequent siblings)
  11 siblings, 1 reply; 98+ messages in thread
From: Sharlatan Hellseher @ 2024-09-18  9:58 UTC (permalink / raw)
  To: 71897; +Cc: dan, Liliana Marie Prikler, Maxim Cournoyer

[-- Attachment #1: Type: text/plain, Size: 735 bytes --]


Hi,

Telegram is segfaulting on:

--8<---------------cut here---------------start------------->8---
guix describe
Generation 43   Sep 13 2024 21:14:29    (current)
  guix 0e0d9bc
    repository URL: https://git.savannah.gnu.org/git/guix.git
    branch: master
    commit: 0e0d9bc91f20ac6dda439ab09330f0163eb9bf42
--8<---------------cut here---------------end--------------->8---

--8<---------------cut here---------------start------------->8---
Telegram-WARNING **: 10:55:34.082: Application has been built with
foreign rlottie, animated emojis won't be colored to the selected pack.

Segmentation fault
--8<---------------cut here---------------end--------------->8---

Is anything left to be updated on this patch series?

--
Oleg

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH 0/3] gnu: telegram-desktop: Update to 5.2.1.
  2024-09-18  9:58 ` [bug#71897] [PATCH 0/3] gnu: telegram-desktop: Update to 5.2.1 Sharlatan Hellseher
@ 2024-09-21 10:35   ` dan
  2024-09-21 14:05     ` Liliana Marie Prikler
  0 siblings, 1 reply; 98+ messages in thread
From: dan @ 2024-09-21 10:35 UTC (permalink / raw)
  To: Sharlatan Hellseher; +Cc: Liliana Marie Prikler, Maxim Cournoyer, 71897

Sharlatan Hellseher <sharlatanus@gmail.com> writes:

> Hi,
>
> Telegram is segfaulting on:
>
> --8<---------------cut 
> here---------------start------------->8---
> guix describe
> Generation 43   Sep 13 2024 21:14:29    (current)
>   guix 0e0d9bc
>     repository URL: https://git.savannah.gnu.org/git/guix.git
>     branch: master
>     commit: 0e0d9bc91f20ac6dda439ab09330f0163eb9bf42
> --8<---------------cut 
> here---------------end--------------->8---
>
> --8<---------------cut 
> here---------------start------------->8---
> Telegram-WARNING **: 10:55:34.082: Application has been built 
> with
> foreign rlottie, animated emojis won't be colored to the 
> selected pack.
>
> Segmentation fault
> --8<---------------cut 
> here---------------end--------------->8---
>
> Is anything left to be updated on this patch series?

I've rebased this patch series to master, updated it to latest 
(5.5.5)
and build it.  When trying to run telegram-desktop, it also 
crashed with
SIGSEGV.  Using gdb, I obtained the stack trace:

--8<---------------cut here---------------start------------->8---
#0  0x00007ffff7fdb65d in _dl_update_slotinfo () from 
 /gnu/store/zvlp3n8iwa1svxmwv4q22pv1pb1c9pjq-glibc-2.39/lib/ld-linux-x86-64.so.2
#1  0x00007ffff7fdb73c in update_get_addr () from 
 /gnu/store/zvlp3n8iwa1svxmwv4q22pv1pb1c9pjq-glibc-2.39/lib/ld-linux-x86-64.so.2
#2  0x00007ffff7fde298 in __tls_get_addr () from 
 /gnu/store/zvlp3n8iwa1svxmwv4q22pv1pb1c9pjq-glibc-2.39/lib/ld-linux-x86-64.so.2
#3  0x00007ffff162092b in free () from 
 /gnu/store/j1dpz07vh9wagksidqjqbckh7ihn6hl6-jemalloc-5.3.0/lib/libjemalloc.so.2
#4  0x00007ffff7fdb677 in _dl_update_slotinfo () from 
 /gnu/store/zvlp3n8iwa1svxmwv4q22pv1pb1c9pjq-glibc-2.39/lib/ld-linux-x86-64.so.2
#5  0x00007ffff7fdb73c in update_get_addr () from 
 /gnu/store/zvlp3n8iwa1svxmwv4q22pv1pb1c9pjq-glibc-2.39/lib/ld-linux-x86-64.so.2
#6  0x00007ffff7fde298 in __tls_get_addr () from 
 /gnu/store/zvlp3n8iwa1svxmwv4q22pv1pb1c9pjq-glibc-2.39/lib/ld-linux-x86-64.so.2
#7  0x00007ffff162092b in free () from 
 /gnu/store/j1dpz07vh9wagksidqjqbckh7ihn6hl6-jemalloc-5.3.0/lib/libjemalloc.so.2
#8  0x00007ffff7fdb677 in _dl_update_slotinfo () from 
 /gnu/store/zvlp3n8iwa1svxmwv4q22pv1pb1c9pjq-glibc-2.39/lib/ld-linux-x86-64.so.2
#9  0x00007ffff7fdb73c in update_get_addr () from 
 /gnu/store/zvlp3n8iwa1svxmwv4q22pv1pb1c9pjq-glibc-2.39/lib/ld-linux-x86-64.so.2
#10 0x00007ffff7fde298 in __tls_get_addr () from 
 /gnu/store/zvlp3n8iwa1svxmwv4q22pv1pb1c9pjq-glibc-2.39/lib/ld-linux-x86-64.so.2
#11 0x00007ffff162092b in free () from 
 /gnu/store/j1dpz07vh9wagksidqjqbckh7ihn6hl6-jemalloc-5.3.0/lib/libjemalloc.so.2
#12 0x00007ffff7fdb677 in _dl_update_slotinfo () from 
 /gnu/store/zvlp3n8iwa1svxmwv4q22pv1pb1c9pjq-glibc-2.39/lib/ld-linux-x86-64.so.2
--8<---------------cut here---------------end--------------->8---

I'm not sure what's the real cause of this SIGSEGV, but seems like 
glibc
is calling free from jemalloc, which doesn't seem correct.  To 
test, I
removed jemalloc from inputs and added the disable jemalloc flags. 
This
time telegram-desktop could run without any problem.

I suspect this is related to the glibc, since it's updated 
recently, but
I haven't done any bisect test, since building telegram-desktop is
really time-consuming.

Would like to know if it's appropriate for me to disable jemalloc 
for
telegram-desktop.

-- 
dan




^ permalink raw reply	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH v7 1/9] gnu: xdg-desktop-portal: Update to 1.18.4.
  2024-07-02  5:18 [bug#71897] [PATCH 1/2] gnu: Add cppgir dan
                   ` (7 preceding siblings ...)
  2024-09-18  9:58 ` [bug#71897] [PATCH 0/3] gnu: telegram-desktop: Update to 5.2.1 Sharlatan Hellseher
@ 2024-09-21 11:34 ` dan
  2024-09-21 11:34   ` [bug#71897] [PATCH v7 2/9] gnu: xdg-desktop-portal: Update input style dan
                     ` (8 more replies)
  2024-09-21 14:53 ` [bug#71897] [PATCH v8 1/8] " dan
                   ` (2 subsequent siblings)
  11 siblings, 9 replies; 98+ messages in thread
From: dan @ 2024-09-21 11:34 UTC (permalink / raw)
  To: 71897; +Cc: dan, Maxim Cournoyer, Liliana Marie Prikler, Sharlatan Hellseher

* gnu/packages/patches/xdg-desktop-portal-disable-portal-tests.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/freedesktop.scm (xdg-desktop-portal): Update to 1.18.4.
[patches]: Disable portal tests.
[native-inputs]: Remove autoconf, automake, libtool and which.  Add python,
python-dbusmock, python-pytest and python-pytest-xdist.
[inputs]: Add bubblewrap.
[phases]<#:configure-flags>: Update flags to meson options.

Change-Id: Ic9876565e9119443fedd082273be4f372ebce1d4
---
 gnu/local.mk                                  |  1 +
 gnu/packages/freedesktop.scm                  | 25 +++++----
 ...-desktop-portal-disable-portal-tests.patch | 56 +++++++++++++++++++
 3 files changed, 72 insertions(+), 10 deletions(-)
 create mode 100644 gnu/packages/patches/xdg-desktop-portal-disable-portal-tests.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 8e7abc8a47..802f4be4fe 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2303,6 +2303,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/wordnet-CVE-2008-3908-pt2.patch			\
   %D%/packages/patches/wpa-supplicant-dbus-group-policy.patch		\
   %D%/packages/patches/x265-arm-flags.patch			\
+  %D%/packages/patches/xdg-desktop-portal-disable-portal-tests.patch\
   %D%/packages/patches/xdg-desktop-portal-wlr-harcoded-length.patch\
   %D%/packages/patches/xen-docs-use-predictable-ordering.patch	\
   %D%/packages/patches/xen-remove-config.gz-timestamp.patch	\
diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index 993bb84ec6..46199bac00 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -39,6 +39,7 @@
 ;;; Copyright © 2024 aurtzy <aurtzy@gmail.com>
 ;;; Copyright © 2024 Dariqq <dariqq@posteo.net>
 ;;; Copyright © 2024 Wilko Meyer <w@wmeyer.eu>
+;;; Copyright © 2024 dan <i@dan.games>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -136,6 +137,7 @@ (define-module (gnu packages freedesktop)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages valgrind)
   #:use-module (gnu packages video)
+  #:use-module (gnu packages virtualization)
   #:use-module (gnu packages w3m)
   #:use-module (gnu packages web)
   #:use-module (gnu packages xdisorg)
@@ -2986,7 +2988,7 @@ (define-public libportal
 (define-public xdg-desktop-portal
   (package
     (name "xdg-desktop-portal")
-    (version "1.16.0")
+    (version "1.18.4")
     (source
      (origin
        (method url-fetch)
@@ -2995,18 +2997,21 @@ (define-public xdg-desktop-portal
              version "/xdg-desktop-portal-" version ".tar.xz"))
        (sha256
         (base32
-         "06cczlh39kc41rvav06v37sad827y61rffy3v29i918ibj8sahav"))))
-    (build-system gnu-build-system)
+         "0r8y8qmzcfj7b7brqcxr9lg8pavfds815ffvj0kqc378fhgaln5q"))
+       ;; disable portal tests since they try to use fuse
+       (patches (search-patches "xdg-desktop-portal-disable-portal-tests.patch"))))
+    (build-system meson-build-system)
     (native-inputs
      `(("pkg-config" ,pkg-config)
-       ("autoconf" ,autoconf)
-       ("automake" ,automake)
-       ("libtool" ,libtool)
        ("glib:bin" ,glib "bin")
-       ("which" ,which)
-       ("gettext" ,gettext-minimal)))
+       ("gettext" ,gettext-minimal)
+       ("python" ,python)
+       ("python-dbusmock" ,python-dbusmock)
+       ("python-pytest" ,python-pytest)
+       ("python-pytest-xdist" ,python-pytest-xdist)))
     (inputs
-     `(("gdk-pixbuf" ,gdk-pixbuf)
+     `(("bubblewrap" ,bubblewrap)
+       ("gdk-pixbuf" ,gdk-pixbuf)
        ("glib" ,glib)
        ("flatpak" ,flatpak)
        ("fontconfig" ,fontconfig)
@@ -3018,7 +3023,7 @@ (define-public xdg-desktop-portal
        ("fuse" ,fuse)))
     (arguments
      `(#:configure-flags
-       (list "--with-systemd=no")
+       (list "-Dsystemd=disabled")
        #:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'po-chmod
diff --git a/gnu/packages/patches/xdg-desktop-portal-disable-portal-tests.patch b/gnu/packages/patches/xdg-desktop-portal-disable-portal-tests.patch
new file mode 100644
index 0000000000..5e13493613
--- /dev/null
+++ b/gnu/packages/patches/xdg-desktop-portal-disable-portal-tests.patch
@@ -0,0 +1,56 @@
+From b7750fa99c31c5f28ac2053fa154bef4038b5cc0 Mon Sep 17 00:00:00 2001
+From: dan <i@dan.games>
+Date: Tue, 2 Jul 2024 19:37:38 +0800
+Subject: [PATCH] tests: remove portal tests.
+
+---
+ tests/meson.build | 24 ------------------------
+ 1 file changed, 24 deletions(-)
+
+diff --git a/tests/meson.build b/tests/meson.build
+index a2dafee..bcd87be 100644
+--- a/tests/meson.build
++++ b/tests/meson.build
+@@ -181,18 +181,6 @@ portal_tests = [
+ 
+ test_env = env_tests
+ test_env.set('XDG_CURRENT_DESKTOP', 'test')
+-foreach p : portal_tests
+-    test(
+-      'test-portals-@0@'.format(p),
+-      test_portals,
+-      args: ['--verbose', '--keep-going', '--tap', '-p', '/portal/@0@'.format(p)],
+-      depends: [test_backends, test_portals],
+-      env: test_env,
+-      is_parallel: false,
+-      protocol: test_protocol,
+-      suite: 'portals',
+-    )
+-endforeach
+ 
+ # Split the portal tests into one test per portal, this makes debugging a lot
+ # easier.
+@@ -204,18 +192,6 @@ portal_limited = [
+ 
+ limited_env = env_tests
+ limited_env.set('XDG_CURRENT_DESKTOP', 'limited')
+-foreach p : portal_limited
+-    test(
+-      'limited-portals-@0@'.format(p),
+-      limited_portals,
+-      args: ['--verbose', '--keep-going', '--tap', '-p', '/limited/@0@'.format(p)],
+-      depends: [test_backends, limited_portals],
+-      env: limited_env,
+-      is_parallel: false,
+-      protocol: test_protocol,
+-      suite: 'portals',
+-    )
+-endforeach
+ 
+ if enable_installed_tests
+   install_data(
+
+base-commit: 11c8a96b147aeae70e3f770313f93b367d53fedd
+-- 
+2.41.0
+

base-commit: 9d75215a59629ab224154ef6b843043289291f81
-- 
2.45.2





^ permalink raw reply related	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH v7 2/9] gnu: xdg-desktop-portal: Update input style.
  2024-09-21 11:34 ` [bug#71897] [PATCH v7 1/9] gnu: xdg-desktop-portal: Update to 1.18.4 dan
@ 2024-09-21 11:34   ` dan
  2024-09-21 11:34   ` [bug#71897] [PATCH v7 3/9] gnu: Add cppgir dan
                     ` (7 subsequent siblings)
  8 siblings, 0 replies; 98+ messages in thread
From: dan @ 2024-09-21 11:34 UTC (permalink / raw)
  To: 71897; +Cc: dan, Maxim Cournoyer, Liliana Marie Prikler, Sharlatan Hellseher

* gnu/packages/freedesktop.scm (xdg-desktop-portal): Update input style.

Change-Id: Iec0630cd945dfcd4db67af30211cbfd4d058766d
---
 gnu/packages/freedesktop.scm | 36 ++++++++++++++++++------------------
 1 file changed, 18 insertions(+), 18 deletions(-)

diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index 46199bac00..e02b3d89dc 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -3002,25 +3002,25 @@ (define-public xdg-desktop-portal
        (patches (search-patches "xdg-desktop-portal-disable-portal-tests.patch"))))
     (build-system meson-build-system)
     (native-inputs
-     `(("pkg-config" ,pkg-config)
-       ("glib:bin" ,glib "bin")
-       ("gettext" ,gettext-minimal)
-       ("python" ,python)
-       ("python-dbusmock" ,python-dbusmock)
-       ("python-pytest" ,python-pytest)
-       ("python-pytest-xdist" ,python-pytest-xdist)))
+     (list gettext-minimal
+           (list glib "bin")
+           pkg-config
+           python
+           python-dbusmock
+           python-pytest
+           python-pytest-xdist))
     (inputs
-     `(("bubblewrap" ,bubblewrap)
-       ("gdk-pixbuf" ,gdk-pixbuf)
-       ("glib" ,glib)
-       ("flatpak" ,flatpak)
-       ("fontconfig" ,fontconfig)
-       ("json-glib" ,json-glib)
-       ("libportal" ,libportal)
-       ("dbus" ,dbus)
-       ("geoclue" ,geoclue)
-       ("pipewire" ,pipewire)
-       ("fuse" ,fuse)))
+     (list bubblewrap
+           dbus
+           flatpak
+           fontconfig
+           fuse
+           gdk-pixbuf
+           geoclue
+           glib
+           json-glib
+           libportal
+           pipewire))
     (arguments
      `(#:configure-flags
        (list "-Dsystemd=disabled")
-- 
2.45.2





^ permalink raw reply related	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH v7 3/9] gnu: Add cppgir.
  2024-09-21 11:34 ` [bug#71897] [PATCH v7 1/9] gnu: xdg-desktop-portal: Update to 1.18.4 dan
  2024-09-21 11:34   ` [bug#71897] [PATCH v7 2/9] gnu: xdg-desktop-portal: Update input style dan
@ 2024-09-21 11:34   ` dan
  2024-09-21 11:34   ` [bug#71897] [PATCH v7 4/9] gnu: Add cppgir-for-telegram-desktop dan
                     ` (6 subsequent siblings)
  8 siblings, 0 replies; 98+ messages in thread
From: dan @ 2024-09-21 11:34 UTC (permalink / raw)
  To: 71897
  Cc: dan, Maxim Cournoyer, Liliana Marie Prikler, Sharlatan Hellseher,
	Vivien Kraus

* gnu/packages/glib.scm (cppgir): New variable.

Change-Id: Ic4510be6d05b7b3977aa457c6a7fec382c1d3a88
---
 gnu/packages/glib.scm | 31 ++++++++++++++++++++++++++++++-
 1 file changed, 30 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index d6275ea63e..f695d065b3 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014, 2015, 2016, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2014, 2015, 2016, 2019, 2020, 2021, 2024 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2013, 2015 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
 ;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2021 Mark H Weaver <mhw@netris.org>
@@ -21,6 +21,7 @@
 ;;; Copyright © 2023 Saku Laesvuori <saku@laesvuori.fi>
 ;;; Copyright © 2024 Zheng Junjie <873216071@qq.com>
 ;;; Copyright © 2024 Remco van 't Veer <remco@remworks.net>
+;;; Copyright © 2024 dan <i@dan.games>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -72,6 +73,7 @@ (define-module (gnu packages glib)
   #:use-module (gnu packages perl-check)
   #:use-module (gnu packages popt)
   #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages pretty-print)
   #:use-module (gnu packages python)
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages sqlite)
@@ -1592,3 +1594,30 @@ (define-public libdex
 Dex also provides Fibers which allow writing synchronous looking code in C
 that uses asynchronous and future-based APIs.")
     (license license:lgpl2.1+)))
+
+(define-public cppgir
+  (package
+    (name "cppgir")
+    (version "2.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://gitlab.com/mnauw/cppgir")
+         (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0cj4myqzb28hgb7zlxlba9y8n4ysxkvv2y9wy6f7ps58mr18h7bl"))))
+    (build-system cmake-build-system)
+    (arguments
+     (list
+      #:configure-flags
+      #~(list "-DINTERNAL_EXPECTED=OFF")))
+    (inputs (list boost fmt expected-lite))
+    (home-page "https://gitlab.com/mnauw/cppgir")
+    (synopsis "GObject introspection C++ binding wrapper generator")
+    (description "cppgir processes .gir files derived from GObject
+introspection annotations into a set of C++ files defining suitable
+namespaces, classes and other types that together form a C++ binding.")
+    (license license:expat)))
-- 
2.45.2





^ permalink raw reply related	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH v7 4/9] gnu: Add cppgir-for-telegram-desktop.
  2024-09-21 11:34 ` [bug#71897] [PATCH v7 1/9] gnu: xdg-desktop-portal: Update to 1.18.4 dan
  2024-09-21 11:34   ` [bug#71897] [PATCH v7 2/9] gnu: xdg-desktop-portal: Update input style dan
  2024-09-21 11:34   ` [bug#71897] [PATCH v7 3/9] gnu: Add cppgir dan
@ 2024-09-21 11:34   ` dan
  2024-09-21 11:34   ` [bug#71897] [PATCH v7 5/9] gnu: simdjson: Update to 3.10.1 dan
                     ` (5 subsequent siblings)
  8 siblings, 0 replies; 98+ messages in thread
From: dan @ 2024-09-21 11:34 UTC (permalink / raw)
  To: 71897
  Cc: dan, Maxim Cournoyer, Liliana Marie Prikler, Sharlatan Hellseher,
	Vivien Kraus

* gnu/packages/glib.scm (cppgir-for-telegram-desktop): New variable.

Change-Id: Ib9ca3bd376f32d13939adabd2c52e1eb24e2ddcb
---
 gnu/packages/glib.scm | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index f695d065b3..75954217be 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -1621,3 +1621,22 @@ (define-public cppgir
 introspection annotations into a set of C++ files defining suitable
 namespaces, classes and other types that together form a C++ binding.")
     (license license:expat)))
+
+;; telegram-desktop requires a more recent version of cppgir
+(define-public cppgir-for-telegram-desktop
+  (let ((commit "9c4f5820d94d62ab451501f016bfea97156518f4")
+        (revision "0"))
+    (package
+      (inherit cppgir)
+      (name "cppgir-for-telegram-desktop")
+      (version (git-version "2.0" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri
+          (git-reference
+           (url "https://gitlab.com/mnauw/cppgir")
+           (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "1fa9nf4yljfarihaqj5kd98yysrky7q316mh6l5b1rq39ga15k9b")))))))
-- 
2.45.2





^ permalink raw reply related	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH v7 5/9] gnu: simdjson: Update to 3.10.1.
  2024-09-21 11:34 ` [bug#71897] [PATCH v7 1/9] gnu: xdg-desktop-portal: Update to 1.18.4 dan
                     ` (2 preceding siblings ...)
  2024-09-21 11:34   ` [bug#71897] [PATCH v7 4/9] gnu: Add cppgir-for-telegram-desktop dan
@ 2024-09-21 11:34   ` dan
  2024-09-21 11:34   ` [bug#71897] [PATCH v7 6/9] gnu: Add ada dan
                     ` (4 subsequent siblings)
  8 siblings, 0 replies; 98+ messages in thread
From: dan @ 2024-09-21 11:34 UTC (permalink / raw)
  To: 71897; +Cc: dan, Maxim Cournoyer, Liliana Marie Prikler, Sharlatan Hellseher

* gnu/packages/cpp.scm (simdjson): Update to 3.10.1.

Change-Id: I6711077e162bcfbf6702d521fdeec44e3b21f074
---
 gnu/packages/cpp.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 7d782c7ea6..c805dae825 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -2395,7 +2395,7 @@ (define-public python-jsonnet
 (define-public simdjson
   (package
     (name "simdjson")
-    (version "3.1.0")
+    (version "3.10.1")
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -2404,7 +2404,7 @@ (define-public simdjson
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "0q784bm8xbz3p782dw02cdds6m71wk3acy94vva8krc9g88142ws"))))
+                "1qv7lvls7x9aw6mlnwfgchbajsxh6qygp09wpkb2w6mjdbidmi0h"))))
     (build-system cmake-build-system)
     (arguments
      '(#:tests? #f                      ; tests require downloading dependencies
-- 
2.45.2





^ permalink raw reply related	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH v7 6/9] gnu: Add ada.
  2024-09-21 11:34 ` [bug#71897] [PATCH v7 1/9] gnu: xdg-desktop-portal: Update to 1.18.4 dan
                     ` (3 preceding siblings ...)
  2024-09-21 11:34   ` [bug#71897] [PATCH v7 5/9] gnu: simdjson: Update to 3.10.1 dan
@ 2024-09-21 11:34   ` dan
  2024-09-21 11:34   ` [bug#71897] [PATCH v7 7/9] gnu: Add libprisma-for-telegram-desktop dan
                     ` (3 subsequent siblings)
  8 siblings, 0 replies; 98+ messages in thread
From: dan @ 2024-09-21 11:34 UTC (permalink / raw)
  To: 71897; +Cc: dan, Maxim Cournoyer, Liliana Marie Prikler, Sharlatan Hellseher

*
gnu/packages/patches/cpp-ada-url-parser-find-system-testing-dependencies.patch:
New file.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/cpp.scm (ada): New variable.

Change-Id: I9924bba53ed58bbf306bf073c9724cd7bd6f570a
---
 gnu/local.mk                                  |   1 +
 gnu/packages/cpp.scm                          |  26 ++++
 ...ser-find-system-testing-dependencies.patch | 130 ++++++++++++++++++
 3 files changed, 157 insertions(+)
 create mode 100644 gnu/packages/patches/cpp-ada-url-parser-find-system-testing-dependencies.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 802f4be4fe..829c5e166e 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1103,6 +1103,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/cool-retro-term-wctype.patch		\
   %D%/packages/patches/coq-autosubst-1.8-remove-deprecated-files.patch		\
   %D%/packages/patches/coreutils-gnulib-tests.patch		\
+  %D%/packages/patches/cpp-ada-url-parser-find-system-testing-dependencies.patch\
   %D%/packages/patches/cppcheck-disable-char-signedness-test.patch	\
   %D%/packages/patches/cppdap-add-CPPDAP_USE_EXTERNAL_GTEST_PACKAGE.patch\
   %D%/packages/patches/cpulimit-with-glib-2.32.patch		\
diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index c805dae825..92be49967f 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -3284,3 +3284,29 @@ (define-public tl-optional
 the std::optional for C++11/14/17, with support for monadic operations added in
 C++23.")
     (license license:cc0)))
+
+(define-public cpp-ada-url-parser
+  (package
+    (name "cpp-ada-url-parser")
+    (version "2.9.2")
+    (source
+      (origin
+        (method git-fetch)
+        (uri (git-reference
+              (url "https://github.com/ada-url/ada.git")
+              (commit (string-append "v" version))))
+        (file-name (git-file-name name version))
+        (sha256 (base32 "0xvvjlia627ajl966gdxzy2b1j0jiimx7zx8ypmffwx0k6x72qam"))
+        (patches (search-patches "cpp-ada-url-parser-find-system-testing-dependencies.patch"))))
+    (build-system cmake-build-system)
+    (native-inputs
+     (list cxxopts
+           fmt
+           googletest
+           python
+           simdjson))
+    (home-page "https://github.com/ada-url/ada")
+    (synopsis "URL parser")
+    (description "Ada is a fast and spec-compliant URL parser written in C++.
+Specification for URL parser can be found from the WHATWG website.")
+    (license license:gpl3+)))
diff --git a/gnu/packages/patches/cpp-ada-url-parser-find-system-testing-dependencies.patch b/gnu/packages/patches/cpp-ada-url-parser-find-system-testing-dependencies.patch
new file mode 100644
index 0000000000..b32d162530
--- /dev/null
+++ b/gnu/packages/patches/cpp-ada-url-parser-find-system-testing-dependencies.patch
@@ -0,0 +1,130 @@
+From 74cac57a3cebe0cfbbc44f46270d5e51986f4881 Mon Sep 17 00:00:00 2001
+From: dan <i@dan.games>
+Date: Sat, 21 Sep 2024 18:49:10 +0800
+Subject: [PATCH] find system testing dependencies.
+
+---
+ CMakeLists.txt             | 50 +++++++++-----------------------------
+ singleheader/amalgamate.py |  2 +-
+ tools/cli/CMakeLists.txt   |  8 ++----
+ 3 files changed, 14 insertions(+), 46 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index a7ce3796..0903cc31 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -28,43 +28,23 @@ option(ADA_TESTING "Build tests" ${BUILD_TESTING})
+ # errors due to CPM, so this is here to support disabling all the testing
+ # and tooling for ada if one only wishes to use the ada library.
+ if(ADA_TESTING OR ADA_BENCHMARKS OR ADA_TOOLS)
+-  include(cmake/CPM.cmake)
+-  # CPM requires git as an implicit dependency
+-  find_package(Git QUIET)
+   # We use googletest in the tests
+-  if(Git_FOUND AND ADA_TESTING)
+-    CPMAddPackage(
+-      NAME GTest
+-      GITHUB_REPOSITORY google/googletest
+-      VERSION 1.14.0
+-      OPTIONS  "BUILD_GMOCK OFF" "INSTALL_GTEST OFF"
+-    )
++  if(ADA_TESTING)
++    find_package(GTest)
+   endif()
+   # We use simdjson in both the benchmarks and tests
+-  if(Git_FOUND AND (ADA_TESTING OR ADA_BENCHMARKS))
+-    CPMAddPackage("gh:simdjson/simdjson@3.9.1")
++  if(ADA_TESTING OR ADA_BENCHMARKS)
++    find_package(simdjson)
+   endif()
+   # We use Google Benchmark, but it does not build under several 32-bit systems.
+-  if(Git_FOUND AND ADA_BENCHMARKS AND (CMAKE_SIZEOF_VOID_P EQUAL 8))
+-    CPMAddPackage(
+-      NAME benchmark
+-      GITHUB_REPOSITORY google/benchmark
+-      GIT_TAG f91b6b4
+-      OPTIONS "BENCHMARK_ENABLE_TESTING OFF"
+-              "BENCHMARK_ENABLE_INSTALL OFF"
+-              "BENCHMARK_ENABLE_WERROR OFF"
+-
+-    )
++  if(ADA_BENCHMARKS AND (CMAKE_SIZEOF_VOID_P EQUAL 8))
++    find_package(benchmark)
+   endif()
+ 
+   if (ADA_TESTING AND NOT EMSCRIPTEN)
+-    if(Git_FOUND)
+-      set(CTEST_TEST_TIMEOUT 5)
+-      message(STATUS "The tests are enabled.")
+-      add_subdirectory(tests)
+-    else()
+-      message(STATUS "The tests are disabled because git was not found.")
+-    endif()
++    set(CTEST_TEST_TIMEOUT 5)
++    message(STATUS "The tests are enabled.")
++    add_subdirectory(tests)
+   else()
+     if(is_top_project)
+       message(STATUS "The tests are disabled.")
+@@ -72,12 +52,8 @@ if(ADA_TESTING OR ADA_BENCHMARKS OR ADA_TOOLS)
+   endif(ADA_TESTING AND NOT EMSCRIPTEN)
+ 
+   If(ADA_BENCHMARKS AND NOT EMSCRIPTEN)
+-    if(Git_FOUND)
+-      message(STATUS "Ada benchmarks enabled.")
+-      add_subdirectory(benchmarks)
+-    else()
+-      message(STATUS "The benchmarks are disabled because git was not found.")
+-    endif()
++    message(STATUS "Ada benchmarks enabled.")
++    add_subdirectory(benchmarks)
+   else(ADA_BENCHMARKS AND NOT EMSCRIPTEN)
+     if(is_top_project)
+       message(STATUS "Ada benchmarks disabled. Set ADA_BENCHMARKS=ON to enable them.")
+@@ -107,11 +83,7 @@ if(NOT ADA_COVERAGE AND NOT EMSCRIPTEN)
+ endif()
+ 
+ if(ADA_TOOLS)
+-  if(Git_FOUND)
+     add_subdirectory(tools)
+-  else()
+-    message(STATUS "The tools are disabled because git was not found.")
+-  endif()
+ endif()
+ 
+ install(
+diff --git a/singleheader/amalgamate.py b/singleheader/amalgamate.py
+index 52b154b6..94e4e638 100755
+--- a/singleheader/amalgamate.py
++++ b/singleheader/amalgamate.py
+@@ -138,7 +138,7 @@ if SCRIPTPATH != AMALGAMATE_OUTPUT_PATH:
+ 
+ shutil.copy2(os.path.join(AMALGAMATE_INCLUDE_PATH, 'ada_c.h'), AMALGAMATE_OUTPUT_PATH)
+ 
+-zf = zipfile.ZipFile(os.path.join(AMALGAMATE_OUTPUT_PATH, 'singleheader.zip'), 'w', zipfile.ZIP_DEFLATED)
++zf = zipfile.ZipFile(os.path.join(AMALGAMATE_OUTPUT_PATH, 'singleheader.zip'), 'w', zipfile.ZIP_DEFLATED, strict_timestamps=False)
+ zf.write(os.path.join(AMALGAMATE_OUTPUT_PATH, 'ada.cpp'), 'ada.cpp')
+ zf.write(os.path.join(AMALGAMATE_OUTPUT_PATH, 'ada.h'), 'ada.h')
+ zf.write(os.path.join(AMALGAMATE_INCLUDE_PATH, 'ada_c.h'), 'ada_c.h')
+diff --git a/tools/cli/CMakeLists.txt b/tools/cli/CMakeLists.txt
+index 9f0da167..d0f7e0c9 100644
+--- a/tools/cli/CMakeLists.txt
++++ b/tools/cli/CMakeLists.txt
+@@ -8,12 +8,8 @@ if(MSVC AND BUILD_SHARED_LIBS)
+         "$<TARGET_FILE:ada>"      # <--this is in-file
+         "$<TARGET_FILE_DIR:adaparse>")                 # <--this is out-file path
+ endif()
+-CPMAddPackage("gh:fmtlib/fmt#10.2.1")
+-CPMAddPackage(
+-  GITHUB_REPOSITORY jarro2783/cxxopts
+-  VERSION 3.2.0
+-  OPTIONS "CXXOPTS_BUILD_EXAMPLES NO" "CXXOPTS_BUILD_TESTS NO" "CXXOPTS_ENABLE_INSTALL YES"
+-)
++find_package(fmt)
++find_package(cxxopts)
+ target_link_libraries(adaparse PRIVATE cxxopts::cxxopts fmt::fmt)
+ 
+ if(MSVC OR MINGW)
+-- 
+2.45.2
+
-- 
2.45.2





^ permalink raw reply related	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH v7 7/9] gnu: Add libprisma-for-telegram-desktop.
  2024-09-21 11:34 ` [bug#71897] [PATCH v7 1/9] gnu: xdg-desktop-portal: Update to 1.18.4 dan
                     ` (4 preceding siblings ...)
  2024-09-21 11:34   ` [bug#71897] [PATCH v7 6/9] gnu: Add ada dan
@ 2024-09-21 11:34   ` dan
  2024-09-21 11:34   ` [bug#71897] [PATCH v7 8/9] gnu: telegram-desktop: Update to 5.5.5 dan
                     ` (2 subsequent siblings)
  8 siblings, 0 replies; 98+ messages in thread
From: dan @ 2024-09-21 11:34 UTC (permalink / raw)
  To: 71897; +Cc: dan, Maxim Cournoyer, Liliana Marie Prikler, Sharlatan Hellseher

* gnu/packages/telegram.scm (libprisma-for-telegram-desktop): New variable.

Change-Id: I855b463993654a8cad491c7b56c9581b3083f5e4
---
 gnu/packages/telegram.scm | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/gnu/packages/telegram.scm b/gnu/packages/telegram.scm
index 432d6f79a1..af16d4840b 100644
--- a/gnu/packages/telegram.scm
+++ b/gnu/packages/telegram.scm
@@ -400,6 +400,18 @@ (define cld3-for-telegram-desktop
     (base32
      "0ayrrhfdwrf4260h9fsirkhhfrcvc3qqnh6h9wj3ixij2lq0wwqb"))))
 
+(define libprisma-for-telegram-desktop
+  (origin
+   (method git-fetch)
+   (uri (git-reference
+         (url "https://github.com/desktop-app/libprisma")
+         (commit "23b0d70f9709da9b38561d5706891a134d18df76")))
+   (file-name
+    (git-file-name "libprisma-for-telegram-desktop" "5.3.2"))
+   (sha256
+    (base32
+     "0fg4x4ikj7f3706bmfvkwq4smxc98qr3cgpm25w48n4ys6wfgadg"))))
+
 (define-public telegram-desktop
   (package
     (name "telegram-desktop")
-- 
2.45.2





^ permalink raw reply related	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH v7 8/9] gnu: telegram-desktop: Update to 5.5.5.
  2024-09-21 11:34 ` [bug#71897] [PATCH v7 1/9] gnu: xdg-desktop-portal: Update to 1.18.4 dan
                     ` (5 preceding siblings ...)
  2024-09-21 11:34   ` [bug#71897] [PATCH v7 7/9] gnu: Add libprisma-for-telegram-desktop dan
@ 2024-09-21 11:34   ` dan
  2024-09-21 14:18     ` Liliana Marie Prikler
  2024-09-21 11:34   ` [bug#71897] [PATCH v7 9/9] gnu: telegram-desktop: Disable jemalloc dan
  2024-09-21 14:14   ` [bug#71897] [PATCH v7 1/9] gnu: xdg-desktop-portal: Update to 1.18.4 Liliana Marie Prikler
  8 siblings, 1 reply; 98+ messages in thread
From: dan @ 2024-09-21 11:34 UTC (permalink / raw)
  To: 71897; +Cc: dan, Maxim Cournoyer, Liliana Marie Prikler, Sharlatan Hellseher

* 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.
[#: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 ada, gobject-introspection and xdg-desktop-portal.
[inputs]: Add boost, cppgir-for-telegram-desktop, expected-lite.

Change-Id: I78df3434a2cd04afc54107b7fecd5e5a8df85564
* gnu/packages/patches/telegram-desktop-allow-disable-libtgvoip.patch:

Change-Id: I086ca5016477b5e7713985c4ade4e2828b98a6ca
---
 gnu/local.mk                                  |   2 +
 ...gram-desktop-allow-disable-libtgvoip.patch |   6 +-
 .../telegram-desktop-unbundle-cppgir.patch    |  95 ++++++++++++++++
 .../telegram-desktop-unbundle-gsl.patch       |  31 ++++++
 ...or-telegram-desktop-unbundle-libsrtp.patch |   7 +-
 gnu/packages/telegram.scm                     | 105 ++++++++++++------
 6 files changed, 201 insertions(+), 45 deletions(-)
 create mode 100644 gnu/packages/patches/telegram-desktop-unbundle-cppgir.patch
 create mode 100644 gnu/packages/patches/telegram-desktop-unbundle-gsl.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 829c5e166e..623da8c3ff 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2197,6 +2197,8 @@ dist_patch_DATA =						\
   %D%/packages/patches/texinfo-headings-single.patch		\
   %D%/packages/patches/texinfo-5-perl-compat.patch		\
   %D%/packages/patches/telegram-desktop-allow-disable-libtgvoip.patch   \
+  %D%/packages/patches/telegram-desktop-unbundle-cppgir.patch   \
+  %D%/packages/patches/telegram-desktop-unbundle-gsl.patch      \
   %D%/packages/patches/telegram-purple-adjust-test.patch	\
   %D%/packages/patches/teuchos-remove-duplicate-using.patch	\
   %D%/packages/patches/texi2html-document-encoding.patch	\
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()
diff --git a/gnu/packages/telegram.scm b/gnu/packages/telegram.scm
index af16d4840b..91e743aff3 100644
--- a/gnu/packages/telegram.scm
+++ b/gnu/packages/telegram.scm
@@ -5,6 +5,7 @@
 ;;; Copyright © 2023 Lu Hui <luhux76@gmail.com>
 ;;; Copyright © 2023 Camilo Q.S. (Distopico) <distopico@riseup.net>
 ;;; Copyright © 2024 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2024 dan <i@dan.games>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -28,6 +29,7 @@ (define-module (gnu packages telegram)
   #:use-module (gnu packages assembly)
   #:use-module (gnu packages audio)
   #:use-module (gnu packages autotools)
+  #:use-module (gnu packages boost)
   #:use-module (gnu packages check)
   #:use-module (gnu packages cmake)
   #:use-module (gnu packages compression)
@@ -82,11 +84,11 @@ (define-module (gnu packages telegram)
   #:use-module (guix build-system python)
   #:use-module (guix build-system qt))
 
-(define %telegram-version "4.8.1")
+(define %telegram-version "5.5.5")
 
 (define libyuv-for-telegram-desktop
-  (let ((commit "77c2121f7e6b8e694d6e908bbbe9be24214097da")
-        (revision "2439"))
+  (let ((commit "04821d1e7d60845525e8db55c7bcd41ef5be9406")
+        (revision "2440"))
     (origin
       (method git-fetch)
       (uri (git-reference
@@ -97,79 +99,84 @@ (define libyuv-for-telegram-desktop
                   (git-version "0" revision commit)))
       (sha256
        (base32
-        "1b4k8yskr9ffl5k8s9i0af1gn1pavsfixla26vh8bij69rdr7f9c")))))
+        "1fsvc0f8mckrdzys8lnlnbw6676mjamm6p3ghr2h9liqfa83s6wg")))))
 
 (define cmake-helpers-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/cmake_helpers.git")
-          (commit "6ab5543b3dd1e40979d258e46d03376931b6c37b")))
+          (commit "05a7db2e2d2a59ecf42483debca4944d09154b5b")))
     (file-name
      (git-file-name "cmake-helpers-for-telegram-desktop" %telegram-version))
+    (patches
+     ;; https://github.com/desktop-app/cmake_helpers/pull/320
+     ;; https://github.com/desktop-app/cmake_helpers/pull/305
+     (search-patches "telegram-desktop-unbundle-gsl.patch"
+                     "telegram-desktop-unbundle-cppgir.patch"))
     (sha256
      (base32
-      "0y96mvzs113zh8bdw1h3i6l0pgwg93rigrday8kfdg4magz686k6"))))
+      "1gapyk5a8rsl8vigbz0l8h9858f2lkhkd2pjy72zivp0mrq8w0hr"))))
 
 (define codegen-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/codegen.git")
-          (commit "1a969faa0afb29d53af03e530775eccdfb8433f1")))
+          (commit "0af136124083369073b8fdaf45f0816fd2b10bad")))
     (file-name
      (git-file-name "codegen-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "1xmw8dfm51p5g20rlmzqnr72a14ngyxwq09an8clf1v5s6mmwvak"))))
+      "057bwn9smrgnyfb1vraf50ihbkhjc4d72msl7vnbqc4h5sg8dav9"))))
 
 (define lib-base-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_base.git")
-          (commit "fd9adb30ee906ea02c125eaa58fcfae773fdc677")))
+          (commit "547e7f2914d9b5548dd17e70a3a7bf5d6606afc3")))
     (file-name
      (git-file-name "lib-base-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "1m760mcfvgzia53nrs6wvjn353jvzlzln7c9fkx2dhpkigiynz83"))))
+      "0sgm2prhd4fw89afh62k7i4i7mj60n170kqz50b0mad927zngxvn"))))
 
 (define lib-crl-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_crl.git")
-          (commit "3d7e1e1f1321c3defd21c01882d674e485ecd8df")))
+          (commit "c1d6b0273653095b10b4d0f4f7c30b614b690fd5")))
     (file-name
      (git-file-name "lib-crl-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "06mzafnjpfr5ih297dh7bxm6bgpg0wy0gv2r2732n5szyrg9sdl6"))))
+      "1sxn3qccsfbx1289z0fdrb4cggs16a8r75ic6wi81c6lnkrdi3wl"))))
 
 (define lib-lottie-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_lottie.git")
-          (commit "3e9c2f1026e4b5aa3202fca4cc67ece36c7cebb2")))
+          (commit "1a700e5a0d7c3e2f617530354ff2a47c5c72bb4a")))
     (file-name
      (git-file-name "lib-lottie-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "0l57ibfij9xm4ww4s9cc63q1x8xzpc6ablwaji1krrn3xxksqdd4"))))
+      "18w35sz6k3wcv07v0szx3avpfdl0rjby6yqm1fzmx7fqw2jn6wpl"))))
 
 (define lib-qr-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_qr.git")
-          (commit "501f4c3502fd872ab4d777df8911bdac32de7c48")))
+          (commit "6fdf60461444ba150e13ac36009c0ffce72c4c83")))
     (file-name
      (git-file-name "lib-qr-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "0hmwqj7a9vcy8wq7pd1qprl68im3zl5f1wzcn2zzk2wvi0389k9f"))))
+      "1i5n3qvjkf4nv8k75cc0a71xyvpklc4nzg4k2zsfr2pxk0cy7hkw"))))
 
 (define lib-rpl-for-telegram-desktop
   (origin
@@ -188,88 +195,88 @@ (define lib-spellcheck-for-telegram-desktop
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_spellcheck.git")
-          (commit "ae89fefd239ecc47d4dab7ba29f9e230376a57d3")))
+          (commit "e76981e133a1d29f3ceb557f53850a8d822f439a")))
     (file-name
      (git-file-name "lib-spellcheck-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "147xbbcza5q4wcdipk5jplajzkc48971kg2s7qv5jlz33sxkw1lq"))))
+      "0dslsy3d6gmxaj6yv49zjgl2b2mh75j7fpnbynglr02h3m2fdj96"))))
 
 (define lib-storage-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_storage.git")
-          (commit "839609369d04615475cb1518636de3619106a917")))
+          (commit "ccdc72548a5065b5991b4e06e610d76bc4f6023e")))
     (file-name
      (git-file-name "lib-storage-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "1l26h2fmqp9dcpr6pfvdd5sjb68j7yh0ms2lnr8na7jf5xqmkwwm"))))
+      "0b11ix95dzpkz335q0a6b5yg8qhj33s4fgj9ppl37pszcqq1j3wi"))))
 
 (define lib-tl-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_tl.git")
-          (commit "36fb95c4de1339d2c8921ad6b2911858c3d0e0fa")))
+          (commit "237cbeb9d1c637759f89a508c1d854caf16e1984")))
     (file-name
      (git-file-name "lib-tl-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "03rngnssnqwr7ad05qn64mwgji5fb0r3fp5ybkf951p8phr1jvzk"))))
+      "1ji3gypy4yf9knsgylnyz5gc2kii7lls5ymj1rkf0daixdz931cm"))))
 
 (define lib-ui-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_ui.git")
-          (commit "37531086ec21a8569deddedb11b402f8a3157b90")))
+          (commit "c4e3a08e6fb90a6174c8b592d9eb747dd4d3f9c5")))
     (file-name
      (git-file-name "lib-ui-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "0l4baalwdiwcwzn3wgrbyiaryi70lswillbpkzcjpavaa2pjg6b0"))))
+      "1lbfy4fbb52lklfwn6kxny3mwl653r4vc80k922kwjfgbcy9c25f"))))
 
 (define lib-webrtc-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_webrtc.git")
-          (commit "b68a95ad4d1ae9a1827671100a7fd76cbe448c3f")))
+          (commit "8751e27d50d2f26b5d20673e5ddba38e90953570")))
     (file-name
      (git-file-name "lib-webrtc-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "1c8jwdnn26n13yp0rp0l71q6xlxa6wp3cspbm3pnghw964jwgp3z"))))
+      "0f05pqb83qckghzlhnwqbi9qfi9xw7qsv8jampl4qyaq9q0w9p20"))))
 
 (define lib-webview-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_webview.git")
-          (commit "f632fc84cbc62ae8abbbd05f81d472757a337c11")))
+          (commit "2de655f58dc327e40d5d9df71300a0d0fdb39c9f")))
     (file-name
      (git-file-name "lib-webview-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "0idsfkxq7l9kgyrhifys5l4jkhvbyxkgkp0qdq9218h7g0ldw84i"))))
+      "12vrif0685vb068mj5sd7cknav1n66jysp18j21nlp0am9pw7ydj"))))
 
 (define tgcalls-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/TelegramMessenger/tgcalls.git")
-          (commit "2e2797648aac2588e7fe479c2e8b4455ec65c5e6")))
+          (commit "9bf4065ea00cbed5e63cec348457ed13143459d0")))
     (file-name
      (git-file-name "tgcalls-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "193m2gkvipijqbfd6a8mhg9nd63wlnshzgspk3pip57vk21l709z"))))
+      "1p563a11w8jrid96xf03dg6j39ciz28n5f4r6g28lxhiphbqzfym"))))
 
 (define-public webrtc-for-telegram-desktop
-  (let ((commit "0532942ac6176a66ef184fb728a4cbb02958fc0b")
-        (revision "389"))
+  (let ((commit "c425281150317753d7bc5182c6572abe20f9a784")
+        (revision "456"))
     (hidden-package
      (package
        (name "webrtc-for-telegram-desktop")
@@ -285,7 +292,7 @@ (define-public webrtc-for-telegram-desktop
           (file-name
            (git-file-name name version))
           (sha256
-           (base32 "0fary99yl1ddk5zjpfy0pyb5brd268j41plcnvv9qjyf0wj9hf2k"))
+           (base32 "1fj48iq56awnrckncy1qc3zhdzifl725hbb6an7wg2v3zmagvrwn"))
           (patches
            (search-patches
             ;; https://github.com/desktop-app/tg_owt/pull/123
@@ -407,7 +414,7 @@ (define libprisma-for-telegram-desktop
          (url "https://github.com/desktop-app/libprisma")
          (commit "23b0d70f9709da9b38561d5706891a134d18df76")))
    (file-name
-    (git-file-name "libprisma-for-telegram-desktop" "5.3.2"))
+    (git-file-name "libprisma-for-telegram-desktop" %telegram-version))
    (sha256
     (base32
      "0fg4x4ikj7f3706bmfvkwq4smxc98qr3cgpm25w48n4ys6wfgadg"))))
@@ -427,7 +434,7 @@ (define-public telegram-desktop
        (file-name
         (git-file-name name version))
        (sha256
-        (base32 "0g47ffamh1csp79yzkv28v3qjkhjacj0c7pjf53n1ks80j5hc2j0"))
+        (base32 "12fdybn085s3i3a8hwi0bmdns7jxvg0k662n04jgffirgsz8n54m"))
        (patches
         (search-patches
          ;; https://github.com/telegramdesktop/tdesktop/pull/24126
@@ -493,21 +500,45 @@ (define-public telegram-desktop
                       ("Telegram/lib_webrtc" #$lib-webrtc-for-telegram-desktop)
                       ("Telegram/lib_webview" #$lib-webview-for-telegram-desktop)
                       ("Telegram/ThirdParty/cld3" #$cld3-for-telegram-desktop)
+                      ("Telegram/ThirdParty/libprisma" #$libprisma-for-telegram-desktop)
                       ("Telegram/ThirdParty/tgcalls" #$tgcalls-for-telegram-desktop)))))
+               (add-after 'unpack-additional-sources 'patch-gir-ignore-paths
+                 (lambda _
+                   (substitute* "cmake/external/glib/generate_cppgir.cmake"
+                     (("\\$\\{cmake_helpers_loc\\}/external/glib/cppgir/data")
+                      (string-append #$(this-package-input "cppgir") "/share/cppgir")))))
+               (add-after 'unpack-additional-sources 'use-system-xdg-desktop-portal
+                 (lambda _
+                   (substitute* (list "Telegram/CMakeLists.txt"
+                                      "Telegram/lib_base/CMakeLists.txt")
+                     (("\\$\\{third_party_loc\\}/xdg-desktop-portal/data")
+                      (string-append #$(this-package-native-input "xdg-desktop-portal")
+                                     "/share/dbus-1/interfaces")))))
+               ;; has to remove this constexpr otherwise cannot compile with gcc-final
+               (add-after 'use-system-xdg-desktop-portal 'patch-libwebview
+                 (lambda _
+                   (substitute* "Telegram/lib_webview/webview/webview_interface.h"
+                     (("constexpr ") ""))))
                (add-after 'install 'glib-or-gtk-compile-schemas
                  (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-compile-schemas))
                (add-after 'glib-or-gtk-compile-schemas 'glib-or-gtk-wrap
                  (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap)))))
     (native-inputs
-     (list `(,glib "bin")
+     (list cpp-ada-url-parser
+           `(,glib "bin")
+           gobject-introspection
            `(,gtk+ "bin")
            pkg-config
-           python-wrapper))
+           python-wrapper
+           xdg-desktop-portal))
     (inputs
      (list abseil-cpp-cxxstd17
            alsa-lib
+           boost
            c++-gsl
+           cppgir-for-telegram-desktop
            crc32c
+           expected-lite
            fcitx-qt5
            fcitx5-qt
            ffmpeg
-- 
2.45.2





^ permalink raw reply related	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH v7 9/9] gnu: telegram-desktop: Disable jemalloc.
  2024-09-21 11:34 ` [bug#71897] [PATCH v7 1/9] gnu: xdg-desktop-portal: Update to 1.18.4 dan
                     ` (6 preceding siblings ...)
  2024-09-21 11:34   ` [bug#71897] [PATCH v7 8/9] gnu: telegram-desktop: Update to 5.5.5 dan
@ 2024-09-21 11:34   ` dan
  2024-09-21 14:15     ` Liliana Marie Prikler
  2024-09-21 14:14   ` [bug#71897] [PATCH v7 1/9] gnu: xdg-desktop-portal: Update to 1.18.4 Liliana Marie Prikler
  8 siblings, 1 reply; 98+ messages in thread
From: dan @ 2024-09-21 11:34 UTC (permalink / raw)
  To: 71897; +Cc: dan, Maxim Cournoyer, Liliana Marie Prikler, Sharlatan Hellseher

* gnu/packages/telegram.scm: Disable jemalloc.

Change-Id: Ia89ca0fef6ddaa9f6eb32637471110a0cec7ec54
---
 gnu/packages/telegram.scm | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/telegram.scm b/gnu/packages/telegram.scm
index 91e743aff3..327fd0d2b3 100644
--- a/gnu/packages/telegram.scm
+++ b/gnu/packages/telegram.scm
@@ -46,7 +46,6 @@ (define-module (gnu packages telegram)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages hunspell)
   #:use-module (gnu packages image)
-  #:use-module (gnu packages jemalloc)
   #:use-module (gnu packages kde-frameworks)
   #:use-module (gnu packages language)
   #:use-module (gnu packages libevent)
@@ -475,7 +474,10 @@ (define-public telegram-desktop
               "-DTDESKTOP_DISABLE_LEGACY_TGVOIP=ON"
               "-DDESKTOP_APP_DISABLE_CRASH_REPORTS=ON"
               "-DDESKTOP_APP_DISABLE_AUTOUPDATE=ON"
-              "-DDESKTOP_APP_USE_PACKAGED_RLOTTIE=ON")
+              "-DDESKTOP_APP_USE_PACKAGED_RLOTTIE=ON"
+              ;; enabling jemalloc causes SIGSEGV.  this probably happened
+              ;; after upgrading to glibc 2.39.
+              "-DDESKTOP_APP_DISABLE_JEMALLOC=ON")
            #:phases
            #~(modify-phases %standard-phases
                (add-after 'unpack 'unpack-additional-sources
@@ -547,7 +549,6 @@ (define-public telegram-desktop
            gtk+
            hime
            hunspell
-           jemalloc
            kcoreaddons-5
            kimageformats-5
            libdispatch
-- 
2.45.2





^ permalink raw reply related	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH 0/3] gnu: telegram-desktop: Update to 5.2.1.
  2024-09-21 10:35   ` dan
@ 2024-09-21 14:05     ` Liliana Marie Prikler
  0 siblings, 0 replies; 98+ messages in thread
From: Liliana Marie Prikler @ 2024-09-21 14:05 UTC (permalink / raw)
  To: dan, Sharlatan Hellseher; +Cc: Maxim Cournoyer, 71897

Am Samstag, dem 21.09.2024 um 18:35 +0800 schrieb dan:
> Would like to know if it's appropriate for me to disable jemalloc 
> for telegram-desktop.
I don't see an issue with that – though do check whether they vendor
their own jemalloc if you "disable" it.

Cheers




^ permalink raw reply	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH v7 1/9] gnu: xdg-desktop-portal: Update to 1.18.4.
  2024-09-21 11:34 ` [bug#71897] [PATCH v7 1/9] gnu: xdg-desktop-portal: Update to 1.18.4 dan
                     ` (7 preceding siblings ...)
  2024-09-21 11:34   ` [bug#71897] [PATCH v7 9/9] gnu: telegram-desktop: Disable jemalloc dan
@ 2024-09-21 14:14   ` Liliana Marie Prikler
  8 siblings, 0 replies; 98+ messages in thread
From: Liliana Marie Prikler @ 2024-09-21 14:14 UTC (permalink / raw)
  To: dan, 71897; +Cc: Sharlatan Hellseher, Maxim Cournoyer

Am Samstag, dem 21.09.2024 um 19:34 +0800 schrieb dan:
> * gnu/packages/patches/xdg-desktop-portal-disable-portal-tests.patch:
> New file.
> * gnu/local.mk (dist_patch_DATA): Register it.
> * gnu/packages/freedesktop.scm (xdg-desktop-portal): Update to
> 1.18.4.
> [patches]: Disable portal tests.
> [native-inputs]: Remove autoconf, automake, libtool and which.  Add
> python,
> python-dbusmock, python-pytest and python-pytest-xdist.
> [inputs]: Add bubblewrap.
> [phases]<#:configure-flags>: Update flags to meson options.
> 
> Change-Id: Ic9876565e9119443fedd082273be4f372ebce1d4
> ---
Note: this has already been reviewed for gnome-team and ought to be
cherry-picked from there.  Same with 2/9.

Cheers




^ permalink raw reply	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH v7 9/9] gnu: telegram-desktop: Disable jemalloc.
  2024-09-21 11:34   ` [bug#71897] [PATCH v7 9/9] gnu: telegram-desktop: Disable jemalloc dan
@ 2024-09-21 14:15     ` Liliana Marie Prikler
  0 siblings, 0 replies; 98+ messages in thread
From: Liliana Marie Prikler @ 2024-09-21 14:15 UTC (permalink / raw)
  To: dan, 71897; +Cc: Sharlatan Hellseher, Maxim Cournoyer

Am Samstag, dem 21.09.2024 um 19:34 +0800 schrieb dan:
> * gnu/packages/telegram.scm: Disable jemalloc.
> 
> Change-Id: Ia89ca0fef6ddaa9f6eb32637471110a0cec7ec54
> ---
>  gnu/packages/telegram.scm | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/gnu/packages/telegram.scm b/gnu/packages/telegram.scm
> index 91e743aff3..327fd0d2b3 100644
> --- a/gnu/packages/telegram.scm
> +++ b/gnu/packages/telegram.scm
> @@ -46,7 +46,6 @@ (define-module (gnu packages telegram)
>    #:use-module (gnu packages gtk)
>    #:use-module (gnu packages hunspell)
>    #:use-module (gnu packages image)
> -  #:use-module (gnu packages jemalloc)
>    #:use-module (gnu packages kde-frameworks)
>    #:use-module (gnu packages language)
>    #:use-module (gnu packages libevent)
> @@ -475,7 +474,10 @@ (define-public telegram-desktop
>                "-DTDESKTOP_DISABLE_LEGACY_TGVOIP=ON"
>                "-DDESKTOP_APP_DISABLE_CRASH_REPORTS=ON"
>                "-DDESKTOP_APP_DISABLE_AUTOUPDATE=ON"
> -              "-DDESKTOP_APP_USE_PACKAGED_RLOTTIE=ON")
> +              "-DDESKTOP_APP_USE_PACKAGED_RLOTTIE=ON"
> +              ;; enabling jemalloc causes SIGSEGV.  this probably
> happened
> +              ;; after upgrading to glibc 2.39.
> +              "-DDESKTOP_APP_DISABLE_JEMALLOC=ON")
Since this is required for build, it should be squashed into the
previous commit. 




^ permalink raw reply	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH v7 8/9] gnu: telegram-desktop: Update to 5.5.5.
  2024-09-21 11:34   ` [bug#71897] [PATCH v7 8/9] gnu: telegram-desktop: Update to 5.5.5 dan
@ 2024-09-21 14:18     ` Liliana Marie Prikler
  0 siblings, 0 replies; 98+ messages in thread
From: Liliana Marie Prikler @ 2024-09-21 14:18 UTC (permalink / raw)
  To: dan, 71897; +Cc: Sharlatan Hellseher, Maxim Cournoyer

Am Samstag, dem 21.09.2024 um 19:34 +0800 schrieb dan:
> * 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.
Not sure if this is just formatting of the mail client, but there
shouldn't be any line breaks between the star and the file or in
"patch".
> * 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.
Upcase "Register".
> * gnu/packages/telegram.scm:
> (libyuv-for-telegram-desktop, cmake-helpers-for-telegram-desktop,
ChangeLog uses closing parentheses on each line.
> 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.
> [#: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 ada, gobject-introspection and xdg-desktop-
> portal.
Note: ada is cpp-ada-url-parser.
> [inputs]: Add boost, cppgir-for-telegram-desktop, expected-lite.
> 
> Change-Id: I78df3434a2cd04afc54107b7fecd5e5a8df85564
> * gnu/packages/patches/telegram-desktop-allow-disable-
> libtgvoip.patch:
Uhm, what happened here?


Cheers




^ permalink raw reply	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH v8 1/8] gnu: xdg-desktop-portal: Update to 1.18.4.
  2024-07-02  5:18 [bug#71897] [PATCH 1/2] gnu: Add cppgir dan
                   ` (8 preceding siblings ...)
  2024-09-21 11:34 ` [bug#71897] [PATCH v7 1/9] gnu: xdg-desktop-portal: Update to 1.18.4 dan
@ 2024-09-21 14:53 ` dan
  2024-09-21 14:53   ` [bug#71897] [PATCH v8 2/8] gnu: xdg-desktop-portal: Improve style dan
                     ` (6 more replies)
  2024-09-22 11:37 ` [bug#71897] [PATCH v9 1/8] gnu: xdg-desktop-portal: Update to 1.18.4 dan
  2024-09-22 23:04 ` [bug#71897] [PATCH v10 1/9] gnu: xdg-desktop-portal: Update to 1.18.4 dan
  11 siblings, 7 replies; 98+ messages in thread
From: dan @ 2024-09-21 14:53 UTC (permalink / raw)
  To: 71897
  Cc: Liliana Marie Prikler, Maxim Cournoyer, dan, Maxim Cournoyer,
	Liliana Marie Prikler, Sharlatan Hellseher

* gnu/packages/patches/xdg-desktop-portal-disable-portal-tests.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/freedesktop.scm (xdg-desktop-portal): Update to 1.18.4.
[patches]: Disable portal tests.
[native-inputs]: Remove autoconf, automake, libtool and which.  Add python,
python-dbusmock, python-pytest and python-pytest-xdist.
[inputs]: Add bubblewrap.
[arguments]<#:configure-flags>: Replace “--with-systemd=no” with
“-Dsystemd=disabled”.

Change-Id: Ic9876565e9119443fedd082273be4f372ebce1d4
Reviewed-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
---
 gnu/local.mk                                  |  1 +
 gnu/packages/freedesktop.scm                  | 25 +++++----
 ...-desktop-portal-disable-portal-tests.patch | 56 +++++++++++++++++++
 3 files changed, 72 insertions(+), 10 deletions(-)
 create mode 100644 gnu/packages/patches/xdg-desktop-portal-disable-portal-tests.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 8e7abc8a47..802f4be4fe 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2303,6 +2303,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/wordnet-CVE-2008-3908-pt2.patch			\
   %D%/packages/patches/wpa-supplicant-dbus-group-policy.patch		\
   %D%/packages/patches/x265-arm-flags.patch			\
+  %D%/packages/patches/xdg-desktop-portal-disable-portal-tests.patch\
   %D%/packages/patches/xdg-desktop-portal-wlr-harcoded-length.patch\
   %D%/packages/patches/xen-docs-use-predictable-ordering.patch	\
   %D%/packages/patches/xen-remove-config.gz-timestamp.patch	\
diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index 993bb84ec6..f00f4b3956 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -39,6 +39,7 @@
 ;;; Copyright © 2024 aurtzy <aurtzy@gmail.com>
 ;;; Copyright © 2024 Dariqq <dariqq@posteo.net>
 ;;; Copyright © 2024 Wilko Meyer <w@wmeyer.eu>
+;;; Copyright © 2024 dan <i@dan.games>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -136,6 +137,7 @@ (define-module (gnu packages freedesktop)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages valgrind)
   #:use-module (gnu packages video)
+  #:use-module (gnu packages virtualization)
   #:use-module (gnu packages w3m)
   #:use-module (gnu packages web)
   #:use-module (gnu packages xdisorg)
@@ -2986,7 +2988,7 @@ (define-public libportal
 (define-public xdg-desktop-portal
   (package
     (name "xdg-desktop-portal")
-    (version "1.16.0")
+    (version "1.18.4")
     (source
      (origin
        (method url-fetch)
@@ -2995,18 +2997,21 @@ (define-public xdg-desktop-portal
              version "/xdg-desktop-portal-" version ".tar.xz"))
        (sha256
         (base32
-         "06cczlh39kc41rvav06v37sad827y61rffy3v29i918ibj8sahav"))))
-    (build-system gnu-build-system)
+         "0r8y8qmzcfj7b7brqcxr9lg8pavfds815ffvj0kqc378fhgaln5q"))
+       ;; Disable portal tests since they try to use fuse.
+       (patches (search-patches "xdg-desktop-portal-disable-portal-tests.patch"))))
+    (build-system meson-build-system)
     (native-inputs
      `(("pkg-config" ,pkg-config)
-       ("autoconf" ,autoconf)
-       ("automake" ,automake)
-       ("libtool" ,libtool)
        ("glib:bin" ,glib "bin")
-       ("which" ,which)
-       ("gettext" ,gettext-minimal)))
+       ("gettext" ,gettext-minimal)
+       ("python" ,python)
+       ("python-dbusmock" ,python-dbusmock)
+       ("python-pytest" ,python-pytest)
+       ("python-pytest-xdist" ,python-pytest-xdist)))
     (inputs
-     `(("gdk-pixbuf" ,gdk-pixbuf)
+     `(("bubblewrap" ,bubblewrap)
+       ("gdk-pixbuf" ,gdk-pixbuf)
        ("glib" ,glib)
        ("flatpak" ,flatpak)
        ("fontconfig" ,fontconfig)
@@ -3018,7 +3023,7 @@ (define-public xdg-desktop-portal
        ("fuse" ,fuse)))
     (arguments
      `(#:configure-flags
-       (list "--with-systemd=no")
+       (list "-Dsystemd=disabled")
        #:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'po-chmod
diff --git a/gnu/packages/patches/xdg-desktop-portal-disable-portal-tests.patch b/gnu/packages/patches/xdg-desktop-portal-disable-portal-tests.patch
new file mode 100644
index 0000000000..5e13493613
--- /dev/null
+++ b/gnu/packages/patches/xdg-desktop-portal-disable-portal-tests.patch
@@ -0,0 +1,56 @@
+From b7750fa99c31c5f28ac2053fa154bef4038b5cc0 Mon Sep 17 00:00:00 2001
+From: dan <i@dan.games>
+Date: Tue, 2 Jul 2024 19:37:38 +0800
+Subject: [PATCH] tests: remove portal tests.
+
+---
+ tests/meson.build | 24 ------------------------
+ 1 file changed, 24 deletions(-)
+
+diff --git a/tests/meson.build b/tests/meson.build
+index a2dafee..bcd87be 100644
+--- a/tests/meson.build
++++ b/tests/meson.build
+@@ -181,18 +181,6 @@ portal_tests = [
+ 
+ test_env = env_tests
+ test_env.set('XDG_CURRENT_DESKTOP', 'test')
+-foreach p : portal_tests
+-    test(
+-      'test-portals-@0@'.format(p),
+-      test_portals,
+-      args: ['--verbose', '--keep-going', '--tap', '-p', '/portal/@0@'.format(p)],
+-      depends: [test_backends, test_portals],
+-      env: test_env,
+-      is_parallel: false,
+-      protocol: test_protocol,
+-      suite: 'portals',
+-    )
+-endforeach
+ 
+ # Split the portal tests into one test per portal, this makes debugging a lot
+ # easier.
+@@ -204,18 +192,6 @@ portal_limited = [
+ 
+ limited_env = env_tests
+ limited_env.set('XDG_CURRENT_DESKTOP', 'limited')
+-foreach p : portal_limited
+-    test(
+-      'limited-portals-@0@'.format(p),
+-      limited_portals,
+-      args: ['--verbose', '--keep-going', '--tap', '-p', '/limited/@0@'.format(p)],
+-      depends: [test_backends, limited_portals],
+-      env: limited_env,
+-      is_parallel: false,
+-      protocol: test_protocol,
+-      suite: 'portals',
+-    )
+-endforeach
+ 
+ if enable_installed_tests
+   install_data(
+
+base-commit: 11c8a96b147aeae70e3f770313f93b367d53fedd
+-- 
+2.41.0
+

base-commit: 9d75215a59629ab224154ef6b843043289291f81
-- 
2.45.2





^ permalink raw reply related	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH v8 2/8] gnu: xdg-desktop-portal: Improve style.
  2024-09-21 14:53 ` [bug#71897] [PATCH v8 1/8] " dan
@ 2024-09-21 14:53   ` dan
  2024-09-21 14:53   ` [bug#71897] [PATCH v8 3/8] gnu: Add cppgir dan
                     ` (5 subsequent siblings)
  6 siblings, 0 replies; 98+ messages in thread
From: dan @ 2024-09-21 14:53 UTC (permalink / raw)
  To: 71897
  Cc: Liliana Marie Prikler, Maxim Cournoyer, dan, Maxim Cournoyer,
	Liliana Marie Prikler, Sharlatan Hellseher

From: Liliana Marie Prikler <liliana.prikler@gmail.com>

* gnu/packages/freedesktop.scm (xdg-desktop-portal) [inputs]: Move after
arguments.  Drop labels.
[native-inputs]: Move after inputs.  Drop labels.

Reviewed-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
---
 gnu/packages/freedesktop.scm | 40 ++++++++++++++++++------------------
 1 file changed, 20 insertions(+), 20 deletions(-)

diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index f00f4b3956..664adf0cb2 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -3001,26 +3001,6 @@ (define-public xdg-desktop-portal
        ;; Disable portal tests since they try to use fuse.
        (patches (search-patches "xdg-desktop-portal-disable-portal-tests.patch"))))
     (build-system meson-build-system)
-    (native-inputs
-     `(("pkg-config" ,pkg-config)
-       ("glib:bin" ,glib "bin")
-       ("gettext" ,gettext-minimal)
-       ("python" ,python)
-       ("python-dbusmock" ,python-dbusmock)
-       ("python-pytest" ,python-pytest)
-       ("python-pytest-xdist" ,python-pytest-xdist)))
-    (inputs
-     `(("bubblewrap" ,bubblewrap)
-       ("gdk-pixbuf" ,gdk-pixbuf)
-       ("glib" ,glib)
-       ("flatpak" ,flatpak)
-       ("fontconfig" ,fontconfig)
-       ("json-glib" ,json-glib)
-       ("libportal" ,libportal)
-       ("dbus" ,dbus)
-       ("geoclue" ,geoclue)
-       ("pipewire" ,pipewire)
-       ("fuse" ,fuse)))
     (arguments
      `(#:configure-flags
        (list "-Dsystemd=disabled")
@@ -3034,6 +3014,26 @@ (define-public xdg-desktop-portal
                        (find-files "po" "\\.po$"))))
          (add-after 'unpack 'set-home-directory
            (lambda _ (setenv "HOME" "/tmp"))))))
+    (inputs
+     (list bubblewrap
+           dbus
+           flatpak
+           fontconfig
+           fuse
+           gdk-pixbuf
+           geoclue
+           glib
+           json-glib
+           libportal
+           pipewire))
+    (native-inputs
+     (list gettext-minimal
+           `(,glib "bin")
+           pkg-config
+           python
+           python-dbusmock
+           python-pytest
+           python-pytest-xdist))
     (native-search-paths
      (list (search-path-specification
             (variable "XDG_DESKTOP_PORTAL_DIR")
-- 
2.45.2





^ permalink raw reply related	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH v8 3/8] gnu: Add cppgir.
  2024-09-21 14:53 ` [bug#71897] [PATCH v8 1/8] " dan
  2024-09-21 14:53   ` [bug#71897] [PATCH v8 2/8] gnu: xdg-desktop-portal: Improve style dan
@ 2024-09-21 14:53   ` dan
  2024-09-22  3:04     ` Maxim Cournoyer
  2024-09-21 14:53   ` [bug#71897] [PATCH v8 4/8] gnu: Add cppgir-for-telegram-desktop dan
                     ` (4 subsequent siblings)
  6 siblings, 1 reply; 98+ messages in thread
From: dan @ 2024-09-21 14:53 UTC (permalink / raw)
  To: 71897
  Cc: dan, Maxim Cournoyer, Liliana Marie Prikler, Sharlatan Hellseher,
	Vivien Kraus

* gnu/packages/glib.scm (cppgir): New variable.

Change-Id: Ic4510be6d05b7b3977aa457c6a7fec382c1d3a88
---
 gnu/packages/glib.scm | 31 ++++++++++++++++++++++++++++++-
 1 file changed, 30 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index d6275ea63e..f695d065b3 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014, 2015, 2016, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2014, 2015, 2016, 2019, 2020, 2021, 2024 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2013, 2015 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
 ;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2021 Mark H Weaver <mhw@netris.org>
@@ -21,6 +21,7 @@
 ;;; Copyright © 2023 Saku Laesvuori <saku@laesvuori.fi>
 ;;; Copyright © 2024 Zheng Junjie <873216071@qq.com>
 ;;; Copyright © 2024 Remco van 't Veer <remco@remworks.net>
+;;; Copyright © 2024 dan <i@dan.games>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -72,6 +73,7 @@ (define-module (gnu packages glib)
   #:use-module (gnu packages perl-check)
   #:use-module (gnu packages popt)
   #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages pretty-print)
   #:use-module (gnu packages python)
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages sqlite)
@@ -1592,3 +1594,30 @@ (define-public libdex
 Dex also provides Fibers which allow writing synchronous looking code in C
 that uses asynchronous and future-based APIs.")
     (license license:lgpl2.1+)))
+
+(define-public cppgir
+  (package
+    (name "cppgir")
+    (version "2.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://gitlab.com/mnauw/cppgir")
+         (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0cj4myqzb28hgb7zlxlba9y8n4ysxkvv2y9wy6f7ps58mr18h7bl"))))
+    (build-system cmake-build-system)
+    (arguments
+     (list
+      #:configure-flags
+      #~(list "-DINTERNAL_EXPECTED=OFF")))
+    (inputs (list boost fmt expected-lite))
+    (home-page "https://gitlab.com/mnauw/cppgir")
+    (synopsis "GObject introspection C++ binding wrapper generator")
+    (description "cppgir processes .gir files derived from GObject
+introspection annotations into a set of C++ files defining suitable
+namespaces, classes and other types that together form a C++ binding.")
+    (license license:expat)))
-- 
2.45.2





^ permalink raw reply related	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH v8 4/8] gnu: Add cppgir-for-telegram-desktop.
  2024-09-21 14:53 ` [bug#71897] [PATCH v8 1/8] " dan
  2024-09-21 14:53   ` [bug#71897] [PATCH v8 2/8] gnu: xdg-desktop-portal: Improve style dan
  2024-09-21 14:53   ` [bug#71897] [PATCH v8 3/8] gnu: Add cppgir dan
@ 2024-09-21 14:53   ` dan
  2024-09-21 14:53   ` [bug#71897] [PATCH v8 5/8] gnu: simdjson: Update to 3.10.1 dan
                     ` (3 subsequent siblings)
  6 siblings, 0 replies; 98+ messages in thread
From: dan @ 2024-09-21 14:53 UTC (permalink / raw)
  To: 71897
  Cc: dan, Maxim Cournoyer, Liliana Marie Prikler, Sharlatan Hellseher,
	Vivien Kraus

* gnu/packages/glib.scm (cppgir-for-telegram-desktop): New variable.

Change-Id: Ib9ca3bd376f32d13939adabd2c52e1eb24e2ddcb
---
 gnu/packages/glib.scm | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index f695d065b3..75954217be 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -1621,3 +1621,22 @@ (define-public cppgir
 introspection annotations into a set of C++ files defining suitable
 namespaces, classes and other types that together form a C++ binding.")
     (license license:expat)))
+
+;; telegram-desktop requires a more recent version of cppgir
+(define-public cppgir-for-telegram-desktop
+  (let ((commit "9c4f5820d94d62ab451501f016bfea97156518f4")
+        (revision "0"))
+    (package
+      (inherit cppgir)
+      (name "cppgir-for-telegram-desktop")
+      (version (git-version "2.0" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri
+          (git-reference
+           (url "https://gitlab.com/mnauw/cppgir")
+           (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "1fa9nf4yljfarihaqj5kd98yysrky7q316mh6l5b1rq39ga15k9b")))))))
-- 
2.45.2





^ permalink raw reply related	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH v8 5/8] gnu: simdjson: Update to 3.10.1.
  2024-09-21 14:53 ` [bug#71897] [PATCH v8 1/8] " dan
                     ` (2 preceding siblings ...)
  2024-09-21 14:53   ` [bug#71897] [PATCH v8 4/8] gnu: Add cppgir-for-telegram-desktop dan
@ 2024-09-21 14:53   ` dan
  2024-09-22  2:58     ` Maxim Cournoyer
  2024-09-21 14:53   ` [bug#71897] [PATCH v8 6/8] gnu: Add cpp-ada-url-parser dan
                     ` (2 subsequent siblings)
  6 siblings, 1 reply; 98+ messages in thread
From: dan @ 2024-09-21 14:53 UTC (permalink / raw)
  To: 71897; +Cc: dan, Maxim Cournoyer, Liliana Marie Prikler, Sharlatan Hellseher

* gnu/packages/cpp.scm (simdjson): Update to 3.10.1.

Change-Id: I6711077e162bcfbf6702d521fdeec44e3b21f074
---
 gnu/packages/cpp.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 7d782c7ea6..c805dae825 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -2395,7 +2395,7 @@ (define-public python-jsonnet
 (define-public simdjson
   (package
     (name "simdjson")
-    (version "3.1.0")
+    (version "3.10.1")
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -2404,7 +2404,7 @@ (define-public simdjson
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "0q784bm8xbz3p782dw02cdds6m71wk3acy94vva8krc9g88142ws"))))
+                "1qv7lvls7x9aw6mlnwfgchbajsxh6qygp09wpkb2w6mjdbidmi0h"))))
     (build-system cmake-build-system)
     (arguments
      '(#:tests? #f                      ; tests require downloading dependencies
-- 
2.45.2





^ permalink raw reply related	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH v8 6/8] gnu: Add cpp-ada-url-parser.
  2024-09-21 14:53 ` [bug#71897] [PATCH v8 1/8] " dan
                     ` (3 preceding siblings ...)
  2024-09-21 14:53   ` [bug#71897] [PATCH v8 5/8] gnu: simdjson: Update to 3.10.1 dan
@ 2024-09-21 14:53   ` dan
  2024-09-22  3:13     ` Maxim Cournoyer
  2024-09-21 14:53   ` [bug#71897] [PATCH v8 7/8] gnu: Add libprisma-for-telegram-desktop dan
  2024-09-21 14:53   ` [bug#71897] [PATCH v8 8/8] gnu: telegram-desktop: Update to 5.5.5 dan
  6 siblings, 1 reply; 98+ messages in thread
From: dan @ 2024-09-21 14:53 UTC (permalink / raw)
  To: 71897; +Cc: dan, Maxim Cournoyer, Liliana Marie Prikler, Sharlatan Hellseher

*
gnu/packages/patches/cpp-ada-url-parser-find-system-testing-dependencies.patch:
New file.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/cpp.scm (cpp-ada-url-parser): New variable.

Change-Id: I9924bba53ed58bbf306bf073c9724cd7bd6f570a
---
 gnu/local.mk                                  |   1 +
 gnu/packages/cpp.scm                          |  26 ++++
 ...ser-find-system-testing-dependencies.patch | 130 ++++++++++++++++++
 3 files changed, 157 insertions(+)
 create mode 100644 gnu/packages/patches/cpp-ada-url-parser-find-system-testing-dependencies.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 802f4be4fe..829c5e166e 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1103,6 +1103,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/cool-retro-term-wctype.patch		\
   %D%/packages/patches/coq-autosubst-1.8-remove-deprecated-files.patch		\
   %D%/packages/patches/coreutils-gnulib-tests.patch		\
+  %D%/packages/patches/cpp-ada-url-parser-find-system-testing-dependencies.patch\
   %D%/packages/patches/cppcheck-disable-char-signedness-test.patch	\
   %D%/packages/patches/cppdap-add-CPPDAP_USE_EXTERNAL_GTEST_PACKAGE.patch\
   %D%/packages/patches/cpulimit-with-glib-2.32.patch		\
diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index c805dae825..92be49967f 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -3284,3 +3284,29 @@ (define-public tl-optional
 the std::optional for C++11/14/17, with support for monadic operations added in
 C++23.")
     (license license:cc0)))
+
+(define-public cpp-ada-url-parser
+  (package
+    (name "cpp-ada-url-parser")
+    (version "2.9.2")
+    (source
+      (origin
+        (method git-fetch)
+        (uri (git-reference
+              (url "https://github.com/ada-url/ada.git")
+              (commit (string-append "v" version))))
+        (file-name (git-file-name name version))
+        (sha256 (base32 "0xvvjlia627ajl966gdxzy2b1j0jiimx7zx8ypmffwx0k6x72qam"))
+        (patches (search-patches "cpp-ada-url-parser-find-system-testing-dependencies.patch"))))
+    (build-system cmake-build-system)
+    (native-inputs
+     (list cxxopts
+           fmt
+           googletest
+           python
+           simdjson))
+    (home-page "https://github.com/ada-url/ada")
+    (synopsis "URL parser")
+    (description "Ada is a fast and spec-compliant URL parser written in C++.
+Specification for URL parser can be found from the WHATWG website.")
+    (license license:gpl3+)))
diff --git a/gnu/packages/patches/cpp-ada-url-parser-find-system-testing-dependencies.patch b/gnu/packages/patches/cpp-ada-url-parser-find-system-testing-dependencies.patch
new file mode 100644
index 0000000000..b32d162530
--- /dev/null
+++ b/gnu/packages/patches/cpp-ada-url-parser-find-system-testing-dependencies.patch
@@ -0,0 +1,130 @@
+From 74cac57a3cebe0cfbbc44f46270d5e51986f4881 Mon Sep 17 00:00:00 2001
+From: dan <i@dan.games>
+Date: Sat, 21 Sep 2024 18:49:10 +0800
+Subject: [PATCH] find system testing dependencies.
+
+---
+ CMakeLists.txt             | 50 +++++++++-----------------------------
+ singleheader/amalgamate.py |  2 +-
+ tools/cli/CMakeLists.txt   |  8 ++----
+ 3 files changed, 14 insertions(+), 46 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index a7ce3796..0903cc31 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -28,43 +28,23 @@ option(ADA_TESTING "Build tests" ${BUILD_TESTING})
+ # errors due to CPM, so this is here to support disabling all the testing
+ # and tooling for ada if one only wishes to use the ada library.
+ if(ADA_TESTING OR ADA_BENCHMARKS OR ADA_TOOLS)
+-  include(cmake/CPM.cmake)
+-  # CPM requires git as an implicit dependency
+-  find_package(Git QUIET)
+   # We use googletest in the tests
+-  if(Git_FOUND AND ADA_TESTING)
+-    CPMAddPackage(
+-      NAME GTest
+-      GITHUB_REPOSITORY google/googletest
+-      VERSION 1.14.0
+-      OPTIONS  "BUILD_GMOCK OFF" "INSTALL_GTEST OFF"
+-    )
++  if(ADA_TESTING)
++    find_package(GTest)
+   endif()
+   # We use simdjson in both the benchmarks and tests
+-  if(Git_FOUND AND (ADA_TESTING OR ADA_BENCHMARKS))
+-    CPMAddPackage("gh:simdjson/simdjson@3.9.1")
++  if(ADA_TESTING OR ADA_BENCHMARKS)
++    find_package(simdjson)
+   endif()
+   # We use Google Benchmark, but it does not build under several 32-bit systems.
+-  if(Git_FOUND AND ADA_BENCHMARKS AND (CMAKE_SIZEOF_VOID_P EQUAL 8))
+-    CPMAddPackage(
+-      NAME benchmark
+-      GITHUB_REPOSITORY google/benchmark
+-      GIT_TAG f91b6b4
+-      OPTIONS "BENCHMARK_ENABLE_TESTING OFF"
+-              "BENCHMARK_ENABLE_INSTALL OFF"
+-              "BENCHMARK_ENABLE_WERROR OFF"
+-
+-    )
++  if(ADA_BENCHMARKS AND (CMAKE_SIZEOF_VOID_P EQUAL 8))
++    find_package(benchmark)
+   endif()
+ 
+   if (ADA_TESTING AND NOT EMSCRIPTEN)
+-    if(Git_FOUND)
+-      set(CTEST_TEST_TIMEOUT 5)
+-      message(STATUS "The tests are enabled.")
+-      add_subdirectory(tests)
+-    else()
+-      message(STATUS "The tests are disabled because git was not found.")
+-    endif()
++    set(CTEST_TEST_TIMEOUT 5)
++    message(STATUS "The tests are enabled.")
++    add_subdirectory(tests)
+   else()
+     if(is_top_project)
+       message(STATUS "The tests are disabled.")
+@@ -72,12 +52,8 @@ if(ADA_TESTING OR ADA_BENCHMARKS OR ADA_TOOLS)
+   endif(ADA_TESTING AND NOT EMSCRIPTEN)
+ 
+   If(ADA_BENCHMARKS AND NOT EMSCRIPTEN)
+-    if(Git_FOUND)
+-      message(STATUS "Ada benchmarks enabled.")
+-      add_subdirectory(benchmarks)
+-    else()
+-      message(STATUS "The benchmarks are disabled because git was not found.")
+-    endif()
++    message(STATUS "Ada benchmarks enabled.")
++    add_subdirectory(benchmarks)
+   else(ADA_BENCHMARKS AND NOT EMSCRIPTEN)
+     if(is_top_project)
+       message(STATUS "Ada benchmarks disabled. Set ADA_BENCHMARKS=ON to enable them.")
+@@ -107,11 +83,7 @@ if(NOT ADA_COVERAGE AND NOT EMSCRIPTEN)
+ endif()
+ 
+ if(ADA_TOOLS)
+-  if(Git_FOUND)
+     add_subdirectory(tools)
+-  else()
+-    message(STATUS "The tools are disabled because git was not found.")
+-  endif()
+ endif()
+ 
+ install(
+diff --git a/singleheader/amalgamate.py b/singleheader/amalgamate.py
+index 52b154b6..94e4e638 100755
+--- a/singleheader/amalgamate.py
++++ b/singleheader/amalgamate.py
+@@ -138,7 +138,7 @@ if SCRIPTPATH != AMALGAMATE_OUTPUT_PATH:
+ 
+ shutil.copy2(os.path.join(AMALGAMATE_INCLUDE_PATH, 'ada_c.h'), AMALGAMATE_OUTPUT_PATH)
+ 
+-zf = zipfile.ZipFile(os.path.join(AMALGAMATE_OUTPUT_PATH, 'singleheader.zip'), 'w', zipfile.ZIP_DEFLATED)
++zf = zipfile.ZipFile(os.path.join(AMALGAMATE_OUTPUT_PATH, 'singleheader.zip'), 'w', zipfile.ZIP_DEFLATED, strict_timestamps=False)
+ zf.write(os.path.join(AMALGAMATE_OUTPUT_PATH, 'ada.cpp'), 'ada.cpp')
+ zf.write(os.path.join(AMALGAMATE_OUTPUT_PATH, 'ada.h'), 'ada.h')
+ zf.write(os.path.join(AMALGAMATE_INCLUDE_PATH, 'ada_c.h'), 'ada_c.h')
+diff --git a/tools/cli/CMakeLists.txt b/tools/cli/CMakeLists.txt
+index 9f0da167..d0f7e0c9 100644
+--- a/tools/cli/CMakeLists.txt
++++ b/tools/cli/CMakeLists.txt
+@@ -8,12 +8,8 @@ if(MSVC AND BUILD_SHARED_LIBS)
+         "$<TARGET_FILE:ada>"      # <--this is in-file
+         "$<TARGET_FILE_DIR:adaparse>")                 # <--this is out-file path
+ endif()
+-CPMAddPackage("gh:fmtlib/fmt#10.2.1")
+-CPMAddPackage(
+-  GITHUB_REPOSITORY jarro2783/cxxopts
+-  VERSION 3.2.0
+-  OPTIONS "CXXOPTS_BUILD_EXAMPLES NO" "CXXOPTS_BUILD_TESTS NO" "CXXOPTS_ENABLE_INSTALL YES"
+-)
++find_package(fmt)
++find_package(cxxopts)
+ target_link_libraries(adaparse PRIVATE cxxopts::cxxopts fmt::fmt)
+ 
+ if(MSVC OR MINGW)
+-- 
+2.45.2
+
-- 
2.45.2





^ permalink raw reply related	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH v8 7/8] gnu: Add libprisma-for-telegram-desktop.
  2024-09-21 14:53 ` [bug#71897] [PATCH v8 1/8] " dan
                     ` (4 preceding siblings ...)
  2024-09-21 14:53   ` [bug#71897] [PATCH v8 6/8] gnu: Add cpp-ada-url-parser dan
@ 2024-09-21 14:53   ` dan
  2024-09-22  3:04     ` Maxim Cournoyer
  2024-09-21 14:53   ` [bug#71897] [PATCH v8 8/8] gnu: telegram-desktop: Update to 5.5.5 dan
  6 siblings, 1 reply; 98+ messages in thread
From: dan @ 2024-09-21 14:53 UTC (permalink / raw)
  To: 71897; +Cc: dan, Maxim Cournoyer, Liliana Marie Prikler, Sharlatan Hellseher

* gnu/packages/telegram.scm (libprisma-for-telegram-desktop): New variable.

Change-Id: I855b463993654a8cad491c7b56c9581b3083f5e4
---
 gnu/packages/telegram.scm | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/gnu/packages/telegram.scm b/gnu/packages/telegram.scm
index 432d6f79a1..af16d4840b 100644
--- a/gnu/packages/telegram.scm
+++ b/gnu/packages/telegram.scm
@@ -400,6 +400,18 @@ (define cld3-for-telegram-desktop
     (base32
      "0ayrrhfdwrf4260h9fsirkhhfrcvc3qqnh6h9wj3ixij2lq0wwqb"))))
 
+(define libprisma-for-telegram-desktop
+  (origin
+   (method git-fetch)
+   (uri (git-reference
+         (url "https://github.com/desktop-app/libprisma")
+         (commit "23b0d70f9709da9b38561d5706891a134d18df76")))
+   (file-name
+    (git-file-name "libprisma-for-telegram-desktop" "5.3.2"))
+   (sha256
+    (base32
+     "0fg4x4ikj7f3706bmfvkwq4smxc98qr3cgpm25w48n4ys6wfgadg"))))
+
 (define-public telegram-desktop
   (package
     (name "telegram-desktop")
-- 
2.45.2





^ permalink raw reply related	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH v8 8/8] gnu: telegram-desktop: Update to 5.5.5.
  2024-09-21 14:53 ` [bug#71897] [PATCH v8 1/8] " dan
                     ` (5 preceding siblings ...)
  2024-09-21 14:53   ` [bug#71897] [PATCH v8 7/8] gnu: Add libprisma-for-telegram-desktop dan
@ 2024-09-21 14:53   ` dan
  2024-09-22  3:22     ` Maxim Cournoyer
  6 siblings, 1 reply; 98+ messages in thread
From: dan @ 2024-09-21 14:53 UTC (permalink / raw)
  To: 71897; +Cc: dan, Maxim Cournoyer, Liliana Marie Prikler, Sharlatan Hellseher

* 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
---
 gnu/local.mk                                  |   2 +
 ...gram-desktop-allow-disable-libtgvoip.patch |   6 +-
 .../telegram-desktop-unbundle-cppgir.patch    |  95 +++++++++++++++
 .../telegram-desktop-unbundle-gsl.patch       |  31 +++++
 ...or-telegram-desktop-unbundle-libsrtp.patch |   7 +-
 gnu/packages/telegram.scm                     | 112 +++++++++++-------
 6 files changed, 205 insertions(+), 48 deletions(-)
 create mode 100644 gnu/packages/patches/telegram-desktop-unbundle-cppgir.patch
 create mode 100644 gnu/packages/patches/telegram-desktop-unbundle-gsl.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 829c5e166e..623da8c3ff 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2197,6 +2197,8 @@ dist_patch_DATA =						\
   %D%/packages/patches/texinfo-headings-single.patch		\
   %D%/packages/patches/texinfo-5-perl-compat.patch		\
   %D%/packages/patches/telegram-desktop-allow-disable-libtgvoip.patch   \
+  %D%/packages/patches/telegram-desktop-unbundle-cppgir.patch   \
+  %D%/packages/patches/telegram-desktop-unbundle-gsl.patch      \
   %D%/packages/patches/telegram-purple-adjust-test.patch	\
   %D%/packages/patches/teuchos-remove-duplicate-using.patch	\
   %D%/packages/patches/texi2html-document-encoding.patch	\
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()
diff --git a/gnu/packages/telegram.scm b/gnu/packages/telegram.scm
index af16d4840b..327fd0d2b3 100644
--- a/gnu/packages/telegram.scm
+++ b/gnu/packages/telegram.scm
@@ -5,6 +5,7 @@
 ;;; Copyright © 2023 Lu Hui <luhux76@gmail.com>
 ;;; Copyright © 2023 Camilo Q.S. (Distopico) <distopico@riseup.net>
 ;;; Copyright © 2024 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2024 dan <i@dan.games>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -28,6 +29,7 @@ (define-module (gnu packages telegram)
   #:use-module (gnu packages assembly)
   #:use-module (gnu packages audio)
   #:use-module (gnu packages autotools)
+  #:use-module (gnu packages boost)
   #:use-module (gnu packages check)
   #:use-module (gnu packages cmake)
   #:use-module (gnu packages compression)
@@ -44,7 +46,6 @@ (define-module (gnu packages telegram)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages hunspell)
   #:use-module (gnu packages image)
-  #:use-module (gnu packages jemalloc)
   #:use-module (gnu packages kde-frameworks)
   #:use-module (gnu packages language)
   #:use-module (gnu packages libevent)
@@ -82,11 +83,11 @@ (define-module (gnu packages telegram)
   #:use-module (guix build-system python)
   #:use-module (guix build-system qt))
 
-(define %telegram-version "4.8.1")
+(define %telegram-version "5.5.5")
 
 (define libyuv-for-telegram-desktop
-  (let ((commit "77c2121f7e6b8e694d6e908bbbe9be24214097da")
-        (revision "2439"))
+  (let ((commit "04821d1e7d60845525e8db55c7bcd41ef5be9406")
+        (revision "2440"))
     (origin
       (method git-fetch)
       (uri (git-reference
@@ -97,79 +98,84 @@ (define libyuv-for-telegram-desktop
                   (git-version "0" revision commit)))
       (sha256
        (base32
-        "1b4k8yskr9ffl5k8s9i0af1gn1pavsfixla26vh8bij69rdr7f9c")))))
+        "1fsvc0f8mckrdzys8lnlnbw6676mjamm6p3ghr2h9liqfa83s6wg")))))
 
 (define cmake-helpers-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/cmake_helpers.git")
-          (commit "6ab5543b3dd1e40979d258e46d03376931b6c37b")))
+          (commit "05a7db2e2d2a59ecf42483debca4944d09154b5b")))
     (file-name
      (git-file-name "cmake-helpers-for-telegram-desktop" %telegram-version))
+    (patches
+     ;; https://github.com/desktop-app/cmake_helpers/pull/320
+     ;; https://github.com/desktop-app/cmake_helpers/pull/305
+     (search-patches "telegram-desktop-unbundle-gsl.patch"
+                     "telegram-desktop-unbundle-cppgir.patch"))
     (sha256
      (base32
-      "0y96mvzs113zh8bdw1h3i6l0pgwg93rigrday8kfdg4magz686k6"))))
+      "1gapyk5a8rsl8vigbz0l8h9858f2lkhkd2pjy72zivp0mrq8w0hr"))))
 
 (define codegen-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/codegen.git")
-          (commit "1a969faa0afb29d53af03e530775eccdfb8433f1")))
+          (commit "0af136124083369073b8fdaf45f0816fd2b10bad")))
     (file-name
      (git-file-name "codegen-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "1xmw8dfm51p5g20rlmzqnr72a14ngyxwq09an8clf1v5s6mmwvak"))))
+      "057bwn9smrgnyfb1vraf50ihbkhjc4d72msl7vnbqc4h5sg8dav9"))))
 
 (define lib-base-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_base.git")
-          (commit "fd9adb30ee906ea02c125eaa58fcfae773fdc677")))
+          (commit "547e7f2914d9b5548dd17e70a3a7bf5d6606afc3")))
     (file-name
      (git-file-name "lib-base-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "1m760mcfvgzia53nrs6wvjn353jvzlzln7c9fkx2dhpkigiynz83"))))
+      "0sgm2prhd4fw89afh62k7i4i7mj60n170kqz50b0mad927zngxvn"))))
 
 (define lib-crl-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_crl.git")
-          (commit "3d7e1e1f1321c3defd21c01882d674e485ecd8df")))
+          (commit "c1d6b0273653095b10b4d0f4f7c30b614b690fd5")))
     (file-name
      (git-file-name "lib-crl-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "06mzafnjpfr5ih297dh7bxm6bgpg0wy0gv2r2732n5szyrg9sdl6"))))
+      "1sxn3qccsfbx1289z0fdrb4cggs16a8r75ic6wi81c6lnkrdi3wl"))))
 
 (define lib-lottie-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_lottie.git")
-          (commit "3e9c2f1026e4b5aa3202fca4cc67ece36c7cebb2")))
+          (commit "1a700e5a0d7c3e2f617530354ff2a47c5c72bb4a")))
     (file-name
      (git-file-name "lib-lottie-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "0l57ibfij9xm4ww4s9cc63q1x8xzpc6ablwaji1krrn3xxksqdd4"))))
+      "18w35sz6k3wcv07v0szx3avpfdl0rjby6yqm1fzmx7fqw2jn6wpl"))))
 
 (define lib-qr-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_qr.git")
-          (commit "501f4c3502fd872ab4d777df8911bdac32de7c48")))
+          (commit "6fdf60461444ba150e13ac36009c0ffce72c4c83")))
     (file-name
      (git-file-name "lib-qr-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "0hmwqj7a9vcy8wq7pd1qprl68im3zl5f1wzcn2zzk2wvi0389k9f"))))
+      "1i5n3qvjkf4nv8k75cc0a71xyvpklc4nzg4k2zsfr2pxk0cy7hkw"))))
 
 (define lib-rpl-for-telegram-desktop
   (origin
@@ -188,88 +194,88 @@ (define lib-spellcheck-for-telegram-desktop
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_spellcheck.git")
-          (commit "ae89fefd239ecc47d4dab7ba29f9e230376a57d3")))
+          (commit "e76981e133a1d29f3ceb557f53850a8d822f439a")))
     (file-name
      (git-file-name "lib-spellcheck-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "147xbbcza5q4wcdipk5jplajzkc48971kg2s7qv5jlz33sxkw1lq"))))
+      "0dslsy3d6gmxaj6yv49zjgl2b2mh75j7fpnbynglr02h3m2fdj96"))))
 
 (define lib-storage-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_storage.git")
-          (commit "839609369d04615475cb1518636de3619106a917")))
+          (commit "ccdc72548a5065b5991b4e06e610d76bc4f6023e")))
     (file-name
      (git-file-name "lib-storage-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "1l26h2fmqp9dcpr6pfvdd5sjb68j7yh0ms2lnr8na7jf5xqmkwwm"))))
+      "0b11ix95dzpkz335q0a6b5yg8qhj33s4fgj9ppl37pszcqq1j3wi"))))
 
 (define lib-tl-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_tl.git")
-          (commit "36fb95c4de1339d2c8921ad6b2911858c3d0e0fa")))
+          (commit "237cbeb9d1c637759f89a508c1d854caf16e1984")))
     (file-name
      (git-file-name "lib-tl-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "03rngnssnqwr7ad05qn64mwgji5fb0r3fp5ybkf951p8phr1jvzk"))))
+      "1ji3gypy4yf9knsgylnyz5gc2kii7lls5ymj1rkf0daixdz931cm"))))
 
 (define lib-ui-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_ui.git")
-          (commit "37531086ec21a8569deddedb11b402f8a3157b90")))
+          (commit "c4e3a08e6fb90a6174c8b592d9eb747dd4d3f9c5")))
     (file-name
      (git-file-name "lib-ui-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "0l4baalwdiwcwzn3wgrbyiaryi70lswillbpkzcjpavaa2pjg6b0"))))
+      "1lbfy4fbb52lklfwn6kxny3mwl653r4vc80k922kwjfgbcy9c25f"))))
 
 (define lib-webrtc-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_webrtc.git")
-          (commit "b68a95ad4d1ae9a1827671100a7fd76cbe448c3f")))
+          (commit "8751e27d50d2f26b5d20673e5ddba38e90953570")))
     (file-name
      (git-file-name "lib-webrtc-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "1c8jwdnn26n13yp0rp0l71q6xlxa6wp3cspbm3pnghw964jwgp3z"))))
+      "0f05pqb83qckghzlhnwqbi9qfi9xw7qsv8jampl4qyaq9q0w9p20"))))
 
 (define lib-webview-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_webview.git")
-          (commit "f632fc84cbc62ae8abbbd05f81d472757a337c11")))
+          (commit "2de655f58dc327e40d5d9df71300a0d0fdb39c9f")))
     (file-name
      (git-file-name "lib-webview-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "0idsfkxq7l9kgyrhifys5l4jkhvbyxkgkp0qdq9218h7g0ldw84i"))))
+      "12vrif0685vb068mj5sd7cknav1n66jysp18j21nlp0am9pw7ydj"))))
 
 (define tgcalls-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/TelegramMessenger/tgcalls.git")
-          (commit "2e2797648aac2588e7fe479c2e8b4455ec65c5e6")))
+          (commit "9bf4065ea00cbed5e63cec348457ed13143459d0")))
     (file-name
      (git-file-name "tgcalls-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "193m2gkvipijqbfd6a8mhg9nd63wlnshzgspk3pip57vk21l709z"))))
+      "1p563a11w8jrid96xf03dg6j39ciz28n5f4r6g28lxhiphbqzfym"))))
 
 (define-public webrtc-for-telegram-desktop
-  (let ((commit "0532942ac6176a66ef184fb728a4cbb02958fc0b")
-        (revision "389"))
+  (let ((commit "c425281150317753d7bc5182c6572abe20f9a784")
+        (revision "456"))
     (hidden-package
      (package
        (name "webrtc-for-telegram-desktop")
@@ -285,7 +291,7 @@ (define-public webrtc-for-telegram-desktop
           (file-name
            (git-file-name name version))
           (sha256
-           (base32 "0fary99yl1ddk5zjpfy0pyb5brd268j41plcnvv9qjyf0wj9hf2k"))
+           (base32 "1fj48iq56awnrckncy1qc3zhdzifl725hbb6an7wg2v3zmagvrwn"))
           (patches
            (search-patches
             ;; https://github.com/desktop-app/tg_owt/pull/123
@@ -407,7 +413,7 @@ (define libprisma-for-telegram-desktop
          (url "https://github.com/desktop-app/libprisma")
          (commit "23b0d70f9709da9b38561d5706891a134d18df76")))
    (file-name
-    (git-file-name "libprisma-for-telegram-desktop" "5.3.2"))
+    (git-file-name "libprisma-for-telegram-desktop" %telegram-version))
    (sha256
     (base32
      "0fg4x4ikj7f3706bmfvkwq4smxc98qr3cgpm25w48n4ys6wfgadg"))))
@@ -427,7 +433,7 @@ (define-public telegram-desktop
        (file-name
         (git-file-name name version))
        (sha256
-        (base32 "0g47ffamh1csp79yzkv28v3qjkhjacj0c7pjf53n1ks80j5hc2j0"))
+        (base32 "12fdybn085s3i3a8hwi0bmdns7jxvg0k662n04jgffirgsz8n54m"))
        (patches
         (search-patches
          ;; https://github.com/telegramdesktop/tdesktop/pull/24126
@@ -468,7 +474,10 @@ (define-public telegram-desktop
               "-DTDESKTOP_DISABLE_LEGACY_TGVOIP=ON"
               "-DDESKTOP_APP_DISABLE_CRASH_REPORTS=ON"
               "-DDESKTOP_APP_DISABLE_AUTOUPDATE=ON"
-              "-DDESKTOP_APP_USE_PACKAGED_RLOTTIE=ON")
+              "-DDESKTOP_APP_USE_PACKAGED_RLOTTIE=ON"
+              ;; enabling jemalloc causes SIGSEGV.  this probably happened
+              ;; after upgrading to glibc 2.39.
+              "-DDESKTOP_APP_DISABLE_JEMALLOC=ON")
            #:phases
            #~(modify-phases %standard-phases
                (add-after 'unpack 'unpack-additional-sources
@@ -493,21 +502,45 @@ (define-public telegram-desktop
                       ("Telegram/lib_webrtc" #$lib-webrtc-for-telegram-desktop)
                       ("Telegram/lib_webview" #$lib-webview-for-telegram-desktop)
                       ("Telegram/ThirdParty/cld3" #$cld3-for-telegram-desktop)
+                      ("Telegram/ThirdParty/libprisma" #$libprisma-for-telegram-desktop)
                       ("Telegram/ThirdParty/tgcalls" #$tgcalls-for-telegram-desktop)))))
+               (add-after 'unpack-additional-sources 'patch-gir-ignore-paths
+                 (lambda _
+                   (substitute* "cmake/external/glib/generate_cppgir.cmake"
+                     (("\\$\\{cmake_helpers_loc\\}/external/glib/cppgir/data")
+                      (string-append #$(this-package-input "cppgir") "/share/cppgir")))))
+               (add-after 'unpack-additional-sources 'use-system-xdg-desktop-portal
+                 (lambda _
+                   (substitute* (list "Telegram/CMakeLists.txt"
+                                      "Telegram/lib_base/CMakeLists.txt")
+                     (("\\$\\{third_party_loc\\}/xdg-desktop-portal/data")
+                      (string-append #$(this-package-native-input "xdg-desktop-portal")
+                                     "/share/dbus-1/interfaces")))))
+               ;; has to remove this constexpr otherwise cannot compile with gcc-final
+               (add-after 'use-system-xdg-desktop-portal 'patch-libwebview
+                 (lambda _
+                   (substitute* "Telegram/lib_webview/webview/webview_interface.h"
+                     (("constexpr ") ""))))
                (add-after 'install 'glib-or-gtk-compile-schemas
                  (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-compile-schemas))
                (add-after 'glib-or-gtk-compile-schemas 'glib-or-gtk-wrap
                  (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap)))))
     (native-inputs
-     (list `(,glib "bin")
+     (list cpp-ada-url-parser
+           `(,glib "bin")
+           gobject-introspection
            `(,gtk+ "bin")
            pkg-config
-           python-wrapper))
+           python-wrapper
+           xdg-desktop-portal))
     (inputs
      (list abseil-cpp-cxxstd17
            alsa-lib
+           boost
            c++-gsl
+           cppgir-for-telegram-desktop
            crc32c
+           expected-lite
            fcitx-qt5
            fcitx5-qt
            ffmpeg
@@ -516,7 +549,6 @@ (define-public telegram-desktop
            gtk+
            hime
            hunspell
-           jemalloc
            kcoreaddons-5
            kimageformats-5
            libdispatch
-- 
2.45.2





^ permalink raw reply related	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH v8 5/8] gnu: simdjson: Update to 3.10.1.
  2024-09-21 14:53   ` [bug#71897] [PATCH v8 5/8] gnu: simdjson: Update to 3.10.1 dan
@ 2024-09-22  2:58     ` Maxim Cournoyer
  0 siblings, 0 replies; 98+ messages in thread
From: Maxim Cournoyer @ 2024-09-22  2:58 UTC (permalink / raw)
  To: dan; +Cc: Sharlatan Hellseher, Liliana Marie Prikler, 71897

dan <i@dan.games> writes:

> * gnu/packages/cpp.scm (simdjson): Update to 3.10.1.
>
> Change-Id: I6711077e162bcfbf6702d521fdeec44e3b21f074

Reviewed-by: Maxim Cournoyer <maxim.cournoyer@gmail>

-- 
Thanks,
Maxim




^ permalink raw reply	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH v8 3/8] gnu: Add cppgir.
  2024-09-21 14:53   ` [bug#71897] [PATCH v8 3/8] gnu: Add cppgir dan
@ 2024-09-22  3:04     ` Maxim Cournoyer
  0 siblings, 0 replies; 98+ messages in thread
From: Maxim Cournoyer @ 2024-09-22  3:04 UTC (permalink / raw)
  To: dan; +Cc: Vivien Kraus, Sharlatan Hellseher, Liliana Marie Prikler, 71897

Hi,

dan <i@dan.games> writes:

> * gnu/packages/glib.scm (cppgir): New variable.
>
> Change-Id: Ic4510be6d05b7b3977aa457c6a7fec382c1d3a88
> ---
>  gnu/packages/glib.scm | 31 ++++++++++++++++++++++++++++++-
>  1 file changed, 30 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
> index d6275ea63e..f695d065b3 100644
> --- a/gnu/packages/glib.scm
> +++ b/gnu/packages/glib.scm
> @@ -1,5 +1,5 @@
>  ;;; GNU Guix --- Functional package management for GNU
> -;;; Copyright © 2013, 2014, 2015, 2016, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
> +;;; Copyright © 2013, 2014, 2015, 2016, 2019, 2020, 2021, 2024 Ludovic Courtès <ludo@gnu.org>

Is this a mistake?  Else I'd expect to see the 'Co-authored-by:' git
trailer at the bottom of the commit message.

>  ;;; Copyright © 2013, 2015 Andreas Enge <andreas@enge.fr>
>  ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
>  ;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2021 Mark H Weaver <mhw@netris.org>
> @@ -21,6 +21,7 @@
>  ;;; Copyright © 2023 Saku Laesvuori <saku@laesvuori.fi>
>  ;;; Copyright © 2024 Zheng Junjie <873216071@qq.com>
>  ;;; Copyright © 2024 Remco van 't Veer <remco@remworks.net>
> +;;; Copyright © 2024 dan <i@dan.games>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -72,6 +73,7 @@ (define-module (gnu packages glib)
>    #:use-module (gnu packages perl-check)
>    #:use-module (gnu packages popt)
>    #:use-module (gnu packages pkg-config)
> +  #:use-module (gnu packages pretty-print)
>    #:use-module (gnu packages python)
>    #:use-module (gnu packages python-xyz)
>    #:use-module (gnu packages sqlite)
> @@ -1592,3 +1594,30 @@ (define-public libdex
>  Dex also provides Fibers which allow writing synchronous looking code in C
>  that uses asynchronous and future-based APIs.")
>      (license license:lgpl2.1+)))
> +
> +(define-public cppgir
> +  (package
> +    (name "cppgir")
> +    (version "2.0")
> +    (source
> +     (origin
> +       (method git-fetch)
> +       (uri
> +        (git-reference
> +         (url "https://gitlab.com/mnauw/cppgir")
> +         (commit (string-append "v" version))))
> +       (file-name (git-file-name name version))
> +       (sha256
> +        (base32 "0cj4myqzb28hgb7zlxlba9y8n4ysxkvv2y9wy6f7ps58mr18h7bl"))))
> +    (build-system cmake-build-system)
> +    (arguments
> +     (list
> +      #:configure-flags
> +      #~(list "-DINTERNAL_EXPECTED=OFF")))
> +    (inputs (list boost fmt expected-lite))
> +    (home-page "https://gitlab.com/mnauw/cppgir")
> +    (synopsis "GObject introspection C++ binding wrapper generator")

Perhaps 'bindings' plural?  Perhaps drop 'wrapper', as it doesn't bring
much.  It generates C++ bindings to use GOboject introspection, right?

I think I'd word it like:

"C++ bindings generator for GObject introspection"

> +    (description "cppgir processes .gir files derived from GObject
> +introspection annotations into a set of C++ files defining suitable
> +namespaces, classes and other types that together form a C++ binding.")
> +    (license license:expat)))

Is 'guix lint' happy with the above?  I remember it used to complained
when the first character of the description wasn't capitalized.  You
could use @file{.gir} for extra decoration.

Otherwise, LGTM.

-- 
Thanks,
Maxim




^ permalink raw reply	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH v8 7/8] gnu: Add libprisma-for-telegram-desktop.
  2024-09-21 14:53   ` [bug#71897] [PATCH v8 7/8] gnu: Add libprisma-for-telegram-desktop dan
@ 2024-09-22  3:04     ` Maxim Cournoyer
  0 siblings, 0 replies; 98+ messages in thread
From: Maxim Cournoyer @ 2024-09-22  3:04 UTC (permalink / raw)
  To: dan; +Cc: Sharlatan Hellseher, Liliana Marie Prikler, 71897

dan <i@dan.games> writes:

> * gnu/packages/telegram.scm (libprisma-for-telegram-desktop): New variable.
>
> Change-Id: I855b463993654a8cad491c7b56c9581b3083f5e4

Reviewed-by: Maxim Cournoyer <maxim.cournoyer@gmail>

-- 
Thanks,
Maxim




^ permalink raw reply	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH v8 6/8] gnu: Add cpp-ada-url-parser.
  2024-09-21 14:53   ` [bug#71897] [PATCH v8 6/8] gnu: Add cpp-ada-url-parser dan
@ 2024-09-22  3:13     ` Maxim Cournoyer
  2024-09-22  3:37       ` dan
  0 siblings, 1 reply; 98+ messages in thread
From: Maxim Cournoyer @ 2024-09-22  3:13 UTC (permalink / raw)
  To: dan; +Cc: Sharlatan Hellseher, Liliana Marie Prikler, 71897

Hi Dan,

dan <i@dan.games> writes:

> *
> gnu/packages/patches/cpp-ada-url-parser-find-system-testing-dependencies.patch:
> New file.
> * gnu/local.mk (dist_patch_DATA): Register it.
> * gnu/packages/cpp.scm (cpp-ada-url-parser): New variable.
>
> Change-Id: I9924bba53ed58bbf306bf073c9724cd7bd6f570a
> ---
>  gnu/local.mk                                  |   1 +
>  gnu/packages/cpp.scm                          |  26 ++++
>  ...ser-find-system-testing-dependencies.patch | 130 ++++++++++++++++++
>  3 files changed, 157 insertions(+)
>  create mode 100644 gnu/packages/patches/cpp-ada-url-parser-find-system-testing-dependencies.patch
>
> diff --git a/gnu/local.mk b/gnu/local.mk
> index 802f4be4fe..829c5e166e 100644
> --- a/gnu/local.mk
> +++ b/gnu/local.mk
> @@ -1103,6 +1103,7 @@ dist_patch_DATA =						\
>    %D%/packages/patches/cool-retro-term-wctype.patch		\
>    %D%/packages/patches/coq-autosubst-1.8-remove-deprecated-files.patch		\
>    %D%/packages/patches/coreutils-gnulib-tests.patch		\
> +  %D%/packages/patches/cpp-ada-url-parser-find-system-testing-dependencies.patch\
>    %D%/packages/patches/cppcheck-disable-char-signedness-test.patch	\
>    %D%/packages/patches/cppdap-add-CPPDAP_USE_EXTERNAL_GTEST_PACKAGE.patch\
>    %D%/packages/patches/cpulimit-with-glib-2.32.patch		\
> diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
> index c805dae825..92be49967f 100644
> --- a/gnu/packages/cpp.scm
> +++ b/gnu/packages/cpp.scm
> @@ -3284,3 +3284,29 @@ (define-public tl-optional
>  the std::optional for C++11/14/17, with support for monadic operations added in
>  C++23.")
>      (license license:cc0)))
> +
> +(define-public cpp-ada-url-parser
> +  (package
> +    (name "cpp-ada-url-parser")

I wasn't sure about the naming, since it doesn't match with the upstream
repository name convention, but after looking into it, it seems
reasonable given their own naming is not explicit enough and there are
bindings for various languages.

> +    (version "2.9.2")
> +    (source
> +      (origin
> +        (method git-fetch)
> +        (uri (git-reference
> +              (url "https://github.com/ada-url/ada.git")

I believe 'guix lint' would complain about a URL redirect on the
above. '.git' suffices haven't been used in years for GitHub.

> +              (commit (string-append "v" version))))
> +        (file-name (git-file-name name version))
> +        (sha256 (base32 "0xvvjlia627ajl966gdxzy2b1j0jiimx7zx8ypmffwx0k6x72qam"))
> +        (patches (search-patches "cpp-ada-url-parser-find-system-testing-dependencies.patch"))))

Too long line; please break it so it fits under 80 chars (that's our
convention), although 'guix lint' won't warn until 100 chars.

> +    (build-system cmake-build-system)
> +    (native-inputs
> +     (list cxxopts
> +           fmt
> +           googletest
> +           python
> +           simdjson))
> +    (home-page "https://github.com/ada-url/ada")
> +    (synopsis "URL parser")
> +    (description "Ada is a fast and spec-compliant URL parser written in C++.
> +Specification for URL parser can be found from the WHATWG website.")
> +    (license license:gpl3+)))
> diff --git a/gnu/packages/patches/cpp-ada-url-parser-find-system-testing-dependencies.patch b/gnu/packages/patches/cpp-ada-url-parser-find-system-testing-dependencies.patch
> new file mode 100644
> index 0000000000..b32d162530
> --- /dev/null
> +++ b/gnu/packages/patches/cpp-ada-url-parser-find-system-testing-dependencies.patch
> @@ -0,0 +1,130 @@
> +From 74cac57a3cebe0cfbbc44f46270d5e51986f4881 Mon Sep 17 00:00:00 2001
> +From: dan <i@dan.games>
> +Date: Sat, 21 Sep 2024 18:49:10 +0800
> +Subject: [PATCH] find system testing dependencies.
> +
> +---
> + CMakeLists.txt             | 50 +++++++++-----------------------------
> + singleheader/amalgamate.py |  2 +-
> + tools/cli/CMakeLists.txt   |  8 ++----
> + 3 files changed, 14 insertions(+), 46 deletions(-)
> +
> +diff --git a/CMakeLists.txt b/CMakeLists.txt
> +index a7ce3796..0903cc31 100644
> +--- a/CMakeLists.txt
> ++++ b/CMakeLists.txt
> +@@ -28,43 +28,23 @@ option(ADA_TESTING "Build tests" ${BUILD_TESTING})
> + # errors due to CPM, so this is here to support disabling all the testing
> + # and tooling for ada if one only wishes to use the ada library.
> + if(ADA_TESTING OR ADA_BENCHMARKS OR ADA_TOOLS)
> +-  include(cmake/CPM.cmake)
> +-  # CPM requires git as an implicit dependency
> +-  find_package(Git QUIET)
> +   # We use googletest in the tests
> +-  if(Git_FOUND AND ADA_TESTING)
> +-    CPMAddPackage(
> +-      NAME GTest
> +-      GITHUB_REPOSITORY google/googletest
> +-      VERSION 1.14.0
> +-      OPTIONS  "BUILD_GMOCK OFF" "INSTALL_GTEST OFF"
> +-    )
> ++  if(ADA_TESTING)
> ++    find_package(GTest)
> +   endif()
> +   # We use simdjson in both the benchmarks and tests
> +-  if(Git_FOUND AND (ADA_TESTING OR ADA_BENCHMARKS))
> +-    CPMAddPackage("gh:simdjson/simdjson@3.9.1")
> ++  if(ADA_TESTING OR ADA_BENCHMARKS)
> ++    find_package(simdjson)
> +   endif()
> +   # We use Google Benchmark, but it does not build under several 32-bit systems.
> +-  if(Git_FOUND AND ADA_BENCHMARKS AND (CMAKE_SIZEOF_VOID_P EQUAL 8))
> +-    CPMAddPackage(
> +-      NAME benchmark
> +-      GITHUB_REPOSITORY google/benchmark
> +-      GIT_TAG f91b6b4
> +-      OPTIONS "BENCHMARK_ENABLE_TESTING OFF"
> +-              "BENCHMARK_ENABLE_INSTALL OFF"
> +-              "BENCHMARK_ENABLE_WERROR OFF"
> +-
> +-    )
> ++  if(ADA_BENCHMARKS AND (CMAKE_SIZEOF_VOID_P EQUAL 8))
> ++    find_package(benchmark)
> +   endif()
> + 
> +   if (ADA_TESTING AND NOT EMSCRIPTEN)
> +-    if(Git_FOUND)
> +-      set(CTEST_TEST_TIMEOUT 5)
> +-      message(STATUS "The tests are enabled.")
> +-      add_subdirectory(tests)
> +-    else()
> +-      message(STATUS "The tests are disabled because git was not found.")
> +-    endif()
> ++    set(CTEST_TEST_TIMEOUT 5)
> ++    message(STATUS "The tests are enabled.")
> ++    add_subdirectory(tests)
> +   else()
> +     if(is_top_project)
> +       message(STATUS "The tests are disabled.")
> +@@ -72,12 +52,8 @@ if(ADA_TESTING OR ADA_BENCHMARKS OR ADA_TOOLS)
> +   endif(ADA_TESTING AND NOT EMSCRIPTEN)
> + 
> +   If(ADA_BENCHMARKS AND NOT EMSCRIPTEN)
> +-    if(Git_FOUND)
> +-      message(STATUS "Ada benchmarks enabled.")
> +-      add_subdirectory(benchmarks)
> +-    else()
> +-      message(STATUS "The benchmarks are disabled because git was not found.")
> +-    endif()
> ++    message(STATUS "Ada benchmarks enabled.")
> ++    add_subdirectory(benchmarks)
> +   else(ADA_BENCHMARKS AND NOT EMSCRIPTEN)
> +     if(is_top_project)
> +       message(STATUS "Ada benchmarks disabled. Set ADA_BENCHMARKS=ON to enable them.")
> +@@ -107,11 +83,7 @@ if(NOT ADA_COVERAGE AND NOT EMSCRIPTEN)
> + endif()
> + 
> + if(ADA_TOOLS)
> +-  if(Git_FOUND)
> +     add_subdirectory(tools)
> +-  else()
> +-    message(STATUS "The tools are disabled because git was not found.")
> +-  endif()
> + endif()
> + 
> + install(
> +diff --git a/singleheader/amalgamate.py b/singleheader/amalgamate.py
> +index 52b154b6..94e4e638 100755
> +--- a/singleheader/amalgamate.py
> ++++ b/singleheader/amalgamate.py
> +@@ -138,7 +138,7 @@ if SCRIPTPATH != AMALGAMATE_OUTPUT_PATH:
> + 
> + shutil.copy2(os.path.join(AMALGAMATE_INCLUDE_PATH, 'ada_c.h'), AMALGAMATE_OUTPUT_PATH)
> + 
> +-zf = zipfile.ZipFile(os.path.join(AMALGAMATE_OUTPUT_PATH, 'singleheader.zip'), 'w', zipfile.ZIP_DEFLATED)
> ++zf = zipfile.ZipFile(os.path.join(AMALGAMATE_OUTPUT_PATH, 'singleheader.zip'), 'w', zipfile.ZIP_DEFLATED, strict_timestamps=False)
> + zf.write(os.path.join(AMALGAMATE_OUTPUT_PATH, 'ada.cpp'), 'ada.cpp')
> + zf.write(os.path.join(AMALGAMATE_OUTPUT_PATH, 'ada.h'), 'ada.h')
> + zf.write(os.path.join(AMALGAMATE_INCLUDE_PATH, 'ada_c.h'), 'ada_c.h')
> +diff --git a/tools/cli/CMakeLists.txt b/tools/cli/CMakeLists.txt
> +index 9f0da167..d0f7e0c9 100644
> +--- a/tools/cli/CMakeLists.txt
> ++++ b/tools/cli/CMakeLists.txt
> +@@ -8,12 +8,8 @@ if(MSVC AND BUILD_SHARED_LIBS)
> +         "$<TARGET_FILE:ada>"      # <--this is in-file
> +         "$<TARGET_FILE_DIR:adaparse>")                 # <--this is out-file path
> + endif()
> +-CPMAddPackage("gh:fmtlib/fmt#10.2.1")
> +-CPMAddPackage(
> +-  GITHUB_REPOSITORY jarro2783/cxxopts
> +-  VERSION 3.2.0
> +-  OPTIONS "CXXOPTS_BUILD_EXAMPLES NO" "CXXOPTS_BUILD_TESTS NO" "CXXOPTS_ENABLE_INSTALL YES"
> +-)
> ++find_package(fmt)
> ++find_package(cxxopts)
> + target_link_libraries(adaparse PRIVATE cxxopts::cxxopts fmt::fmt)
> + 
> + if(MSVC OR MINGW)
> +-- 
> +2.45.2
> +

That's not upstreamable work, so should ideally be marked as such as a
patch at the top of the patch file (Upstream-status: N/A or similar).
It's a bit sad that this will need ongoing maintenance (careful rebasing
when they touch that file).  I'd like to see the problem with CPM
commented in a bit more details -- wondering if it could be made to work
without patching it out, e.g. perhaps some CMake variables can be set to
have CPM work offline?

-- 
Thanks,
Maxim




^ permalink raw reply	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH v8 8/8] gnu: telegram-desktop: Update to 5.5.5.
  2024-09-21 14:53   ` [bug#71897] [PATCH v8 8/8] gnu: telegram-desktop: Update to 5.5.5 dan
@ 2024-09-22  3:22     ` Maxim Cournoyer
  2024-09-22  3:51       ` dan
                         ` (2 more replies)
  0 siblings, 3 replies; 98+ messages in thread
From: Maxim Cournoyer @ 2024-09-22  3:22 UTC (permalink / raw)
  To: dan; +Cc: Sharlatan Hellseher, Liliana Marie Prikler, 71897

Hi,

dan <i@dan.games> writes:

> * 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.

I suppose these patches are from upstream?  For extra origin tracking, I
like to add a URL to the upstream URL they were fetched from, or at
least a comment mentioning this is committed but unreleased in the main
repo.

[...]

>  (define-public webrtc-for-telegram-desktop
> -  (let ((commit "0532942ac6176a66ef184fb728a4cbb02958fc0b")
> -        (revision "389"))
> +  (let ((commit "c425281150317753d7bc5182c6572abe20f9a784")
> +        (revision "456"))
>      (hidden-package
>       (package
>         (name "webrtc-for-telegram-desktop")
> @@ -285,7 +291,7 @@ (define-public webrtc-for-telegram-desktop
>            (file-name
>             (git-file-name name version))
>            (sha256
> -           (base32 "0fary99yl1ddk5zjpfy0pyb5brd268j41plcnvv9qjyf0wj9hf2k"))
> +           (base32 "1fj48iq56awnrckncy1qc3zhdzifl725hbb6an7wg2v3zmagvrwn"))
>            (patches
>             (search-patches
>              ;; https://github.com/desktop-app/tg_owt/pull/123
> @@ -407,7 +413,7 @@ (define libprisma-for-telegram-desktop
>           (url "https://github.com/desktop-app/libprisma")
>           (commit "23b0d70f9709da9b38561d5706891a134d18df76")))
>     (file-name
> -    (git-file-name "libprisma-for-telegram-desktop" "5.3.2"))
> +    (git-file-name "libprisma-for-telegram-desktop" %telegram-version))
>     (sha256
>      (base32
>       "0fg4x4ikj7f3706bmfvkwq4smxc98qr3cgpm25w48n4ys6wfgadg"))))
> @@ -427,7 +433,7 @@ (define-public telegram-desktop
>         (file-name
>          (git-file-name name version))
>         (sha256
> -        (base32 "0g47ffamh1csp79yzkv28v3qjkhjacj0c7pjf53n1ks80j5hc2j0"))
> +        (base32 "12fdybn085s3i3a8hwi0bmdns7jxvg0k662n04jgffirgsz8n54m"))
>         (patches
>          (search-patches
>           ;; https://github.com/telegramdesktop/tdesktop/pull/24126
> @@ -468,7 +474,10 @@ (define-public telegram-desktop
>                "-DTDESKTOP_DISABLE_LEGACY_TGVOIP=ON"
>                "-DDESKTOP_APP_DISABLE_CRASH_REPORTS=ON"
>                "-DDESKTOP_APP_DISABLE_AUTOUPDATE=ON"
> -              "-DDESKTOP_APP_USE_PACKAGED_RLOTTIE=ON")
> +              "-DDESKTOP_APP_USE_PACKAGED_RLOTTIE=ON"
> +              ;; enabling jemalloc causes SIGSEGV.  this probably happened
> +              ;; after upgrading to glibc 2.39.
> +              "-DDESKTOP_APP_DISABLE_JEMALLOC=ON")

Nitpick: Please use fully punctuated complete sentences for stand alone
comments (the ones on their own lines -- inline comments (trailing at
the end of line are OK to be incomplete sentence))

>             #:phases
>             #~(modify-phases %standard-phases
>                 (add-after 'unpack 'unpack-additional-sources
> @@ -493,21 +502,45 @@ (define-public telegram-desktop
>                        ("Telegram/lib_webrtc" #$lib-webrtc-for-telegram-desktop)
>                        ("Telegram/lib_webview" #$lib-webview-for-telegram-desktop)
>                        ("Telegram/ThirdParty/cld3" #$cld3-for-telegram-desktop)
> +                      ("Telegram/ThirdParty/libprisma" #$libprisma-for-telegram-desktop)
>                        ("Telegram/ThirdParty/tgcalls" #$tgcalls-for-telegram-desktop)))))
> +               (add-after 'unpack-additional-sources 'patch-gir-ignore-paths
> +                 (lambda _
> +                   (substitute* "cmake/external/glib/generate_cppgir.cmake"
> +                     (("\\$\\{cmake_helpers_loc\\}/external/glib/cppgir/data")
> +                      (string-append #$(this-package-input "cppgir") "/share/cppgir")))))
> +               (add-after 'unpack-additional-sources 'use-system-xdg-desktop-portal
> +                 (lambda _
> +                   (substitute* (list "Telegram/CMakeLists.txt"
> +                                      "Telegram/lib_base/CMakeLists.txt")
> +                     (("\\$\\{third_party_loc\\}/xdg-desktop-portal/data")
> +                      (string-append #$(this-package-native-input "xdg-desktop-portal")
> +                                     "/share/dbus-1/interfaces")))))
> +               ;; has to remove this constexpr otherwise cannot compile with gcc-final

Ditto (same comment as above).

> +               (add-after 'use-system-xdg-desktop-portal 'patch-libwebview
> +                 (lambda _
> +                   (substitute* "Telegram/lib_webview/webview/webview_interface.h"
> +                     (("constexpr ") ""))))

GCC should know about constexpr; perhaps the wrong C++ standard (can be
provided via a CMake flag) is being selected, or alternatively you could
provide a newer gcc compiler native inputs?

>                 (add-after 'install 'glib-or-gtk-compile-schemas
>                   (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-compile-schemas))
>                 (add-after 'glib-or-gtk-compile-schemas 'glib-or-gtk-wrap
>                   (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap)))))
>      (native-inputs
> -     (list `(,glib "bin")
> +     (list cpp-ada-url-parser
> +           `(,glib "bin")
> +           gobject-introspection
>             `(,gtk+ "bin")
>             pkg-config
> -           python-wrapper))
> +           python-wrapper
> +           xdg-desktop-portal))
>      (inputs
>       (list abseil-cpp-cxxstd17
>             alsa-lib
> +           boost
>             c++-gsl
> +           cppgir-for-telegram-desktop
>             crc32c
> +           expected-lite
>             fcitx-qt5
>             fcitx5-qt
>             ffmpeg
> @@ -516,7 +549,6 @@ (define-public telegram-desktop
>             gtk+

No GTK 4 support yet?

>             hime
>             hunspell
> -           jemalloc
>             kcoreaddons-5
>             kimageformats-5
>             libdispatch

Thanks for this undertaking.  It looks nearly good to go, with my little
comments/concerns ideally addressed.

-- 
Thanks,
Maxim




^ permalink raw reply	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH v8 6/8] gnu: Add cpp-ada-url-parser.
  2024-09-22  3:13     ` Maxim Cournoyer
@ 2024-09-22  3:37       ` dan
  2024-09-22  6:13         ` Maxim Cournoyer
  0 siblings, 1 reply; 98+ messages in thread
From: dan @ 2024-09-22  3:37 UTC (permalink / raw)
  To: Maxim Cournoyer; +Cc: Sharlatan Hellseher, Liliana Marie Prikler, 71897

Hi Maxim,

Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:

> That's not upstreamable work, so should ideally be marked as 
> such as a
> patch at the top of the patch file (Upstream-status: N/A or 
> similar).
> It's a bit sad that this will need ongoing maintenance (careful 
> rebasing
> when they touch that file).  I'd like to see the problem with 
> CPM
> commented in a bit more details -- wondering if it could be made 
> to work
> without patching it out, e.g. perhaps some CMake variables can 
> be set to
> have CPM work offline?

In the previous iteration, I disabled ADA_TESTING and ADA_TOOLS so 
that no patches are needed.  However, Liliana suggest that "we 
should enable testing, even if we need to patch the cmake files to 
unvendor inputs".  I think we have to make a decision here: we 
either accept a package with testing disabled, or we need extra 
work to maintain the patch in the future.

I took a brief look at CPM, and it seems possible to fetch 
dependencies from local directories, but I assume even we go this 
way we still need to patch their CMakeLists.txt files.

What do you think?

-- 
dan




^ permalink raw reply	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH v8 8/8] gnu: telegram-desktop: Update to 5.5.5.
  2024-09-22  3:22     ` Maxim Cournoyer
@ 2024-09-22  3:51       ` dan
  2024-09-22  4:09       ` dan
  2024-09-22  4:14       ` dan
  2 siblings, 0 replies; 98+ messages in thread
From: dan @ 2024-09-22  3:51 UTC (permalink / raw)
  To: Maxim Cournoyer; +Cc: Sharlatan Hellseher, Liliana Marie Prikler, 71897

Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:

>> +               (add-after 'use-system-xdg-desktop-portal 
>> 'patch-libwebview
>> +                 (lambda _
>> +                   (substitute* 
>> "Telegram/lib_webview/webview/webview_interface.h"
>> +                     (("constexpr ") ""))))
>
> GCC should know about constexpr; perhaps the wrong C++ standard 
> (can be
> provided via a CMake flag) is being selected, or alternatively 
> you could
> provide a newer gcc compiler native inputs?

Mentioned in a previous cover letter, when trying to build 
telegram-desktop with a newer version of gcc (I've tried gcc-12, 
gcc-13 and gcc-14), I ran into an issue which is similar to:
https://issues.guix.gnu.org/43579.

--8<---------------cut here---------------start------------->8---
/tmp/guix-build-telegram-desktop-5.5.5.drv-0/source/Telegram/lib_base/base/algorithm.cpp:21:47: 
error: ?FE_ALL_EXCEPT? was not declared in this scope
   21 |         const auto errors = 
   std::fetestexcept(FE_ALL_EXCEPT);
      | 
      ^~~~~~~~~~~~~
/tmp/guix-build-telegram-desktop-5.5.5.drv-0/source/Telegram/lib_base/base/algorithm.cpp:28:14: 
error: ?feclearexcept? is not a member of ?std?
   28 |         std::feclearexcept(FE_ALL_EXCEPT);
      |              ^~~~~~~~~~~~~
--8<---------------cut here---------------end--------------->8---

-- 
dan




^ permalink raw reply	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH v8 8/8] gnu: telegram-desktop: Update to 5.5.5.
  2024-09-22  3:22     ` Maxim Cournoyer
  2024-09-22  3:51       ` dan
@ 2024-09-22  4:09       ` dan
  2024-09-24  6:00         ` Maxim Cournoyer
  2024-09-22  4:14       ` dan
  2 siblings, 1 reply; 98+ messages in thread
From: dan @ 2024-09-22  4:09 UTC (permalink / raw)
  To: Maxim Cournoyer; +Cc: Sharlatan Hellseher, Liliana Marie Prikler, 71897

Hi Maxim,

Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:

>> +               (add-after 'use-system-xdg-desktop-portal 
>> 'patch-libwebview
>> +                 (lambda _
>> +                   (substitute* 
>> "Telegram/lib_webview/webview/webview_interface.h"
>> +                     (("constexpr ") ""))))
>
> GCC should know about constexpr; perhaps the wrong C++ standard 
> (can be
> provided via a CMake flag) is being selected, or alternatively 
> you could
> provide a newer gcc compiler native inputs?

The original compilation error is:
--8<---------------cut here---------------start------------->8---
/tmp/guix-build-telegram-desktop-5.5.5.drv-0/source/Telegram/lib_webview/webview/webview_interface.h:34:38: 
error: call to non-?constexpr? function ?typename 
__gnu_cxx::__enable_if<std::__is_char<_Tp>::__value, bool>::__type 
std::operator==(const std::__cxx11::basic_string<_CharT>&, const 
std::__cxx11::basic_string<_CharT>&) [with _CharT = char; typename 
__gnu_cxx::__enable_if<std::__is_char<_Tp>::__value, bool>::__type 
= bool]?
   34 |         friend inline constexpr bool operator==(
      |                                      ^~~~~~~~
In file included from 
/gnu/store/86fc8bi3mciljxz7c79jx8zr4wsx7xw8-gcc-11.4.0/include/c++/string:55,
                 from 
                 /gnu/store/86fc8bi3mciljxz7c79jx8zr4wsx7xw8-gcc-11.4.0/include/c++/bits/locale_classes.h:40,
                 from 
                 /gnu/store/86fc8bi3mciljxz7c79jx8zr4wsx7xw8-gcc-11.4.0/include/c++/bits/ios_base.h:41,
                 from 
                 /gnu/store/86fc8bi3mciljxz7c79jx8zr4wsx7xw8-gcc-11.4.0/include/c++/streambuf:41,
                 from 
                 /gnu/store/86fc8bi3mciljxz7c79jx8zr4wsx7xw8-gcc-11.4.0/include/c++/bits/streambuf_iterator.h:35,
                 from 
                 /gnu/store/86fc8bi3mciljxz7c79jx8zr4wsx7xw8-gcc-11.4.0/include/c++/iterator:66,
                 from 
                 /gnu/store/86fc8bi3mciljxz7c79jx8zr4wsx7xw8-gcc-11.4.0/include/c++/bits/ranges_algobase.h:36,
                 from 
                 /gnu/store/86fc8bi3mciljxz7c79jx8zr4wsx7xw8-gcc-11.4.0/include/c++/bits/ranges_algo.h:35,
                 from 
                 /gnu/store/86fc8bi3mciljxz7c79jx8zr4wsx7xw8-gcc-11.4.0/include/c++/algorithm:64,
                 from 
                 /gnu/store/mz9sf8vsp2qksx1vb4fz8mrz4pkypfmc-qtbase-5.15.10/include/qt5/QtCore/qglobal.h:142,
                 from 
                 /gnu/store/mz9sf8vsp2qksx1vb4fz8mrz4pkypfmc-qtbase-5.15.10/include/qt5/QtCore/qiterator.h:43,
                 from 
                 /gnu/store/mz9sf8vsp2qksx1vb4fz8mrz4pkypfmc-qtbase-5.15.10/include/qt5/QtCore/qmap.h:43,
                 from 
                 /gnu/store/mz9sf8vsp2qksx1vb4fz8mrz4pkypfmc-qtbase-5.15.10/include/qt5/QtCore/QMap:1,
                 from 
                 /tmp/guix-build-telegram-desktop-5.5.5.drv-0/source/Telegram/lib_base/base/ordered_set.h:9,
                 from 
                 /tmp/guix-build-telegram-desktop-5.5.5.drv-0/source/Telegram/lib_base/base/basic_types.h:10,
                 from 
                 /tmp/guix-build-telegram-desktop-5.5.5.drv-0/source/Telegram/lib_webview/webview/webview_common.h:9,
                 from 
                 /tmp/guix-build-telegram-desktop-5.5.5.drv-0/source/Telegram/lib_webview/webview/webview_interface.h:9,
                 from 
                 /tmp/guix-build-telegram-desktop-5.5.5.drv-0/source/Telegram/lib_webview/webview/platform/linux/webview_linux.h:9,
                 from 
                 /tmp/guix-build-telegram-desktop-5.5.5.drv-0/source/Telegram/lib_webview/webview/platform/linux/webview_linux_webkitgtk.h:9,
                 from 
                 /tmp/guix-build-telegram-desktop-5.5.5.drv-0/source/Telegram/lib_webview/webview/platform/linux/webview_linux_webkitgtk.cpp:7:
/gnu/store/86fc8bi3mciljxz7c79jx8zr4wsx7xw8-gcc-11.4.0/include/c++/bits/basic_string.h:6234:5: 
note: ?typename 
__gnu_cxx::__enable_if<std::__is_char<_Tp>::__value, bool>::__type 
std::operator==(const std::__cxx11::basic_string<_CharT>&, const 
std::__cxx11::basic_string<_CharT>&) [with _CharT = char; typename 
__gnu_cxx::__enable_if<std::__is_char<_Tp>::__value, bool>::__type 
= bool]? declared here
 6234 |     operator==(const basic_string<_CharT>& __lhs,
      |     ^~~~~~~~
--8<---------------cut here---------------end--------------->8---

The problematic code in telegram-desktop is:
--8<---------------cut here---------------start------------->8---
struct NavigationHistoryState {
	std::string url;
	std::string title;
	bool canGoBack : 1 = false;
	bool canGoForward : 1 = false;

	friend inline constexpr bool operator==(
		NavigationHistoryState,
		NavigationHistoryState) = default;
};
--8<---------------cut here---------------end--------------->8---

And the code in 
/gnu/store/86fc8bi3mciljxz7c79jx8zr4wsx7xw8-gcc-11.4.0/include/c++/bits/basic_string.h 
is:
--8<---------------cut here---------------start------------->8---
  template<typename _CharT>
    inline
    typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, 
    bool>::__type
    operator==(const basic_string<_CharT>& __lhs,
	       const basic_string<_CharT>& __rhs) 
	       _GLIBCXX_NOEXCEPT
    { return (__lhs.size() == __rhs.size()
	      && !std::char_traits<_CharT>::compare(__lhs.data(), 
	      __rhs.data(),
						    __lhs.size())); 
						    }
--8<---------------cut here---------------end--------------->8---

In gcc-12, the code looks like this:
--8<---------------cut here---------------start------------->8---
  template<typename _CharT>
    _GLIBCXX20_CONSTEXPR
    inline
    typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, 
    bool>::__type
    operator==(const basic_string<_CharT>& __lhs,
	       const basic_string<_CharT>& __rhs) 
	       _GLIBCXX_NOEXCEPT
    { return (__lhs.size() == __rhs.size()
	      && !std::char_traits<_CharT>::compare(__lhs.data(), 
	      __rhs.data(),
						    __lhs.size())); 
						    }
--8<---------------cut here---------------end--------------->8---
Which indeed has the constexpr.

But as I explained in previous reply, I failed at using a newer 
version of gcc.  Thus, I think trivially remove the constexpr from 
telegram-desktop's source is the easiest fix here.

-- 
dan




^ permalink raw reply	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH v8 8/8] gnu: telegram-desktop: Update to 5.5.5.
  2024-09-22  3:22     ` Maxim Cournoyer
  2024-09-22  3:51       ` dan
  2024-09-22  4:09       ` dan
@ 2024-09-22  4:14       ` dan
  2024-09-24  5:59         ` Maxim Cournoyer
  2 siblings, 1 reply; 98+ messages in thread
From: dan @ 2024-09-22  4:14 UTC (permalink / raw)
  To: Maxim Cournoyer; +Cc: Sharlatan Hellseher, Liliana Marie Prikler, 71897

Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:

> Hi,
>
> dan <i@dan.games> writes:
>
>> * 
>> 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.
>
> I suppose these patches are from upstream?  For extra origin 
> tracking, I
> like to add a URL to the upstream URL they were fetched from, or 
> at
> least a comment mentioning this is committed but unreleased in 
> the main
> repo.
>
> [...]
>
>>  (define-public webrtc-for-telegram-desktop
>> -  (let ((commit "0532942ac6176a66ef184fb728a4cbb02958fc0b")
>> -        (revision "389"))
>> +  (let ((commit "c425281150317753d7bc5182c6572abe20f9a784")
>> +        (revision "456"))
>>      (hidden-package
>>       (package
>>         (name "webrtc-for-telegram-desktop")
>> @@ -285,7 +291,7 @@ (define-public webrtc-for-telegram-desktop
>>            (file-name
>>             (git-file-name name version))
>>            (sha256
>> -           (base32 
>> "0fary99yl1ddk5zjpfy0pyb5brd268j41plcnvv9qjyf0wj9hf2k"))
>> +           (base32 
>> "1fj48iq56awnrckncy1qc3zhdzifl725hbb6an7wg2v3zmagvrwn"))
>>            (patches
>>             (search-patches
>>              ;; https://github.com/desktop-app/tg_owt/pull/123
>> @@ -407,7 +413,7 @@ (define libprisma-for-telegram-desktop
>>           (url "https://github.com/desktop-app/libprisma")
>>           (commit "23b0d70f9709da9b38561d5706891a134d18df76")))

The upstream pull request URLs were added as comments in the 
package definition.  Do you think this is sufficient? Or do you 
suggest me adding them in the patch file directly, or in the 
commit message?

-- 
dan




^ permalink raw reply	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH v8 6/8] gnu: Add cpp-ada-url-parser.
  2024-09-22  3:37       ` dan
@ 2024-09-22  6:13         ` Maxim Cournoyer
  0 siblings, 0 replies; 98+ messages in thread
From: Maxim Cournoyer @ 2024-09-22  6:13 UTC (permalink / raw)
  To: dan; +Cc: Sharlatan Hellseher, Liliana Marie Prikler, 71897

Hi Dan,

dan <i@dan.games> writes:

> Hi Maxim,
>
> Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:
>
>> That's not upstreamable work, so should ideally be marked as such as
>> a
>> patch at the top of the patch file (Upstream-status: N/A or
>> similar).
>> It's a bit sad that this will need ongoing maintenance (careful
>> rebasing
>> when they touch that file).  I'd like to see the problem with CPM
>> commented in a bit more details -- wondering if it could be made to
>> work
>> without patching it out, e.g. perhaps some CMake variables can be
>> set to
>> have CPM work offline?
>
> In the previous iteration, I disabled ADA_TESTING and ADA_TOOLS so
> that no patches are needed.  However, Liliana suggest that "we should
> enable testing, even if we need to patch the cmake files to unvendor
> inputs".  I think we have to make a decision here: we either accept a
> package with testing disabled, or we need extra work to maintain the
> patch in the future.

I agree with Liliana.  We strive to enable test suites in Guix packages,
as this gives us a much easier time detecting breakages early when
upgrading dependent packages.

My suggestion was to look a little bit deeper in the problem at hand in
case to see if it can be configured to work for our needs.  If it can't,
then your approach is perfectly fine (ideally with a feature request
upstream requesting an easier way to run their test suite offline); if
it can, we should configure it instead and avoid having to maintain
extra patches.

> I took a brief look at CPM, and it seems possible to fetch
> dependencies from local directories, but I assume even we go this way
> we still need to patch their CMakeLists.txt files.

There's a relatively new FetchContent module in CMake that perhaps CPM
abstracts?  If it's using FetchContent, it should be possible to have
the build system attempt to use a system-provided library instead of
fetching from a submodule and building it from source.  See the 'jami'
package, for example, which sets
'-DFETCHCONTENT_TRY_FIND_PACKAGE_MODE=ALWAYS' to have FetchContent do
that.

-- 
Thanks,
Maxim




^ permalink raw reply	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH v9 1/8] gnu: xdg-desktop-portal: Update to 1.18.4.
  2024-07-02  5:18 [bug#71897] [PATCH 1/2] gnu: Add cppgir dan
                   ` (9 preceding siblings ...)
  2024-09-21 14:53 ` [bug#71897] [PATCH v8 1/8] " dan
@ 2024-09-22 11:37 ` dan
  2024-09-22 11:37   ` [bug#71897] [PATCH v9 2/8] gnu: xdg-desktop-portal: Improve style dan
                     ` (6 more replies)
  2024-09-22 23:04 ` [bug#71897] [PATCH v10 1/9] gnu: xdg-desktop-portal: Update to 1.18.4 dan
  11 siblings, 7 replies; 98+ messages in thread
From: dan @ 2024-09-22 11:37 UTC (permalink / raw)
  To: 71897
  Cc: Liliana Marie Prikler, Maxim Cournoyer, dan, Maxim Cournoyer,
	Liliana Marie Prikler, Sharlatan Hellseher

* gnu/packages/patches/xdg-desktop-portal-disable-portal-tests.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/freedesktop.scm (xdg-desktop-portal): Update to 1.18.4.
[patches]: Disable portal tests.
[native-inputs]: Remove autoconf, automake, libtool and which.  Add python,
python-dbusmock, python-pytest and python-pytest-xdist.
[inputs]: Add bubblewrap.
[arguments]<#:configure-flags>: Replace “--with-systemd=no” with
“-Dsystemd=disabled”.

Change-Id: Ic9876565e9119443fedd082273be4f372ebce1d4
Reviewed-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
---
 gnu/local.mk                                  |  1 +
 gnu/packages/freedesktop.scm                  | 25 +++++----
 ...-desktop-portal-disable-portal-tests.patch | 56 +++++++++++++++++++
 3 files changed, 72 insertions(+), 10 deletions(-)
 create mode 100644 gnu/packages/patches/xdg-desktop-portal-disable-portal-tests.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 8e7abc8a47..802f4be4fe 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2303,6 +2303,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/wordnet-CVE-2008-3908-pt2.patch			\
   %D%/packages/patches/wpa-supplicant-dbus-group-policy.patch		\
   %D%/packages/patches/x265-arm-flags.patch			\
+  %D%/packages/patches/xdg-desktop-portal-disable-portal-tests.patch\
   %D%/packages/patches/xdg-desktop-portal-wlr-harcoded-length.patch\
   %D%/packages/patches/xen-docs-use-predictable-ordering.patch	\
   %D%/packages/patches/xen-remove-config.gz-timestamp.patch	\
diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index 993bb84ec6..f00f4b3956 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -39,6 +39,7 @@
 ;;; Copyright © 2024 aurtzy <aurtzy@gmail.com>
 ;;; Copyright © 2024 Dariqq <dariqq@posteo.net>
 ;;; Copyright © 2024 Wilko Meyer <w@wmeyer.eu>
+;;; Copyright © 2024 dan <i@dan.games>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -136,6 +137,7 @@ (define-module (gnu packages freedesktop)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages valgrind)
   #:use-module (gnu packages video)
+  #:use-module (gnu packages virtualization)
   #:use-module (gnu packages w3m)
   #:use-module (gnu packages web)
   #:use-module (gnu packages xdisorg)
@@ -2986,7 +2988,7 @@ (define-public libportal
 (define-public xdg-desktop-portal
   (package
     (name "xdg-desktop-portal")
-    (version "1.16.0")
+    (version "1.18.4")
     (source
      (origin
        (method url-fetch)
@@ -2995,18 +2997,21 @@ (define-public xdg-desktop-portal
              version "/xdg-desktop-portal-" version ".tar.xz"))
        (sha256
         (base32
-         "06cczlh39kc41rvav06v37sad827y61rffy3v29i918ibj8sahav"))))
-    (build-system gnu-build-system)
+         "0r8y8qmzcfj7b7brqcxr9lg8pavfds815ffvj0kqc378fhgaln5q"))
+       ;; Disable portal tests since they try to use fuse.
+       (patches (search-patches "xdg-desktop-portal-disable-portal-tests.patch"))))
+    (build-system meson-build-system)
     (native-inputs
      `(("pkg-config" ,pkg-config)
-       ("autoconf" ,autoconf)
-       ("automake" ,automake)
-       ("libtool" ,libtool)
        ("glib:bin" ,glib "bin")
-       ("which" ,which)
-       ("gettext" ,gettext-minimal)))
+       ("gettext" ,gettext-minimal)
+       ("python" ,python)
+       ("python-dbusmock" ,python-dbusmock)
+       ("python-pytest" ,python-pytest)
+       ("python-pytest-xdist" ,python-pytest-xdist)))
     (inputs
-     `(("gdk-pixbuf" ,gdk-pixbuf)
+     `(("bubblewrap" ,bubblewrap)
+       ("gdk-pixbuf" ,gdk-pixbuf)
        ("glib" ,glib)
        ("flatpak" ,flatpak)
        ("fontconfig" ,fontconfig)
@@ -3018,7 +3023,7 @@ (define-public xdg-desktop-portal
        ("fuse" ,fuse)))
     (arguments
      `(#:configure-flags
-       (list "--with-systemd=no")
+       (list "-Dsystemd=disabled")
        #:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'po-chmod
diff --git a/gnu/packages/patches/xdg-desktop-portal-disable-portal-tests.patch b/gnu/packages/patches/xdg-desktop-portal-disable-portal-tests.patch
new file mode 100644
index 0000000000..5e13493613
--- /dev/null
+++ b/gnu/packages/patches/xdg-desktop-portal-disable-portal-tests.patch
@@ -0,0 +1,56 @@
+From b7750fa99c31c5f28ac2053fa154bef4038b5cc0 Mon Sep 17 00:00:00 2001
+From: dan <i@dan.games>
+Date: Tue, 2 Jul 2024 19:37:38 +0800
+Subject: [PATCH] tests: remove portal tests.
+
+---
+ tests/meson.build | 24 ------------------------
+ 1 file changed, 24 deletions(-)
+
+diff --git a/tests/meson.build b/tests/meson.build
+index a2dafee..bcd87be 100644
+--- a/tests/meson.build
++++ b/tests/meson.build
+@@ -181,18 +181,6 @@ portal_tests = [
+ 
+ test_env = env_tests
+ test_env.set('XDG_CURRENT_DESKTOP', 'test')
+-foreach p : portal_tests
+-    test(
+-      'test-portals-@0@'.format(p),
+-      test_portals,
+-      args: ['--verbose', '--keep-going', '--tap', '-p', '/portal/@0@'.format(p)],
+-      depends: [test_backends, test_portals],
+-      env: test_env,
+-      is_parallel: false,
+-      protocol: test_protocol,
+-      suite: 'portals',
+-    )
+-endforeach
+ 
+ # Split the portal tests into one test per portal, this makes debugging a lot
+ # easier.
+@@ -204,18 +192,6 @@ portal_limited = [
+ 
+ limited_env = env_tests
+ limited_env.set('XDG_CURRENT_DESKTOP', 'limited')
+-foreach p : portal_limited
+-    test(
+-      'limited-portals-@0@'.format(p),
+-      limited_portals,
+-      args: ['--verbose', '--keep-going', '--tap', '-p', '/limited/@0@'.format(p)],
+-      depends: [test_backends, limited_portals],
+-      env: limited_env,
+-      is_parallel: false,
+-      protocol: test_protocol,
+-      suite: 'portals',
+-    )
+-endforeach
+ 
+ if enable_installed_tests
+   install_data(
+
+base-commit: 11c8a96b147aeae70e3f770313f93b367d53fedd
+-- 
+2.41.0
+

base-commit: b7c94d528875415ea7ec6225d88a6b3d55fa2e14
-- 
2.45.2





^ permalink raw reply related	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH v9 2/8] gnu: xdg-desktop-portal: Improve style.
  2024-09-22 11:37 ` [bug#71897] [PATCH v9 1/8] gnu: xdg-desktop-portal: Update to 1.18.4 dan
@ 2024-09-22 11:37   ` dan
  2024-09-22 11:37   ` [bug#71897] [PATCH v9 3/8] gnu: Add cppgir dan
                     ` (5 subsequent siblings)
  6 siblings, 0 replies; 98+ messages in thread
From: dan @ 2024-09-22 11:37 UTC (permalink / raw)
  To: 71897
  Cc: Liliana Marie Prikler, Maxim Cournoyer, dan, Maxim Cournoyer,
	Liliana Marie Prikler, Sharlatan Hellseher

From: Liliana Marie Prikler <liliana.prikler@gmail.com>

* gnu/packages/freedesktop.scm (xdg-desktop-portal) [inputs]: Move after
arguments.  Drop labels.
[native-inputs]: Move after inputs.  Drop labels.

Reviewed-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
---
 gnu/packages/freedesktop.scm | 40 ++++++++++++++++++------------------
 1 file changed, 20 insertions(+), 20 deletions(-)

diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index f00f4b3956..664adf0cb2 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -3001,26 +3001,6 @@ (define-public xdg-desktop-portal
        ;; Disable portal tests since they try to use fuse.
        (patches (search-patches "xdg-desktop-portal-disable-portal-tests.patch"))))
     (build-system meson-build-system)
-    (native-inputs
-     `(("pkg-config" ,pkg-config)
-       ("glib:bin" ,glib "bin")
-       ("gettext" ,gettext-minimal)
-       ("python" ,python)
-       ("python-dbusmock" ,python-dbusmock)
-       ("python-pytest" ,python-pytest)
-       ("python-pytest-xdist" ,python-pytest-xdist)))
-    (inputs
-     `(("bubblewrap" ,bubblewrap)
-       ("gdk-pixbuf" ,gdk-pixbuf)
-       ("glib" ,glib)
-       ("flatpak" ,flatpak)
-       ("fontconfig" ,fontconfig)
-       ("json-glib" ,json-glib)
-       ("libportal" ,libportal)
-       ("dbus" ,dbus)
-       ("geoclue" ,geoclue)
-       ("pipewire" ,pipewire)
-       ("fuse" ,fuse)))
     (arguments
      `(#:configure-flags
        (list "-Dsystemd=disabled")
@@ -3034,6 +3014,26 @@ (define-public xdg-desktop-portal
                        (find-files "po" "\\.po$"))))
          (add-after 'unpack 'set-home-directory
            (lambda _ (setenv "HOME" "/tmp"))))))
+    (inputs
+     (list bubblewrap
+           dbus
+           flatpak
+           fontconfig
+           fuse
+           gdk-pixbuf
+           geoclue
+           glib
+           json-glib
+           libportal
+           pipewire))
+    (native-inputs
+     (list gettext-minimal
+           `(,glib "bin")
+           pkg-config
+           python
+           python-dbusmock
+           python-pytest
+           python-pytest-xdist))
     (native-search-paths
      (list (search-path-specification
             (variable "XDG_DESKTOP_PORTAL_DIR")
-- 
2.45.2





^ permalink raw reply related	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH v9 3/8] gnu: Add cppgir.
  2024-09-22 11:37 ` [bug#71897] [PATCH v9 1/8] gnu: xdg-desktop-portal: Update to 1.18.4 dan
  2024-09-22 11:37   ` [bug#71897] [PATCH v9 2/8] gnu: xdg-desktop-portal: Improve style dan
@ 2024-09-22 11:37   ` dan
  2024-09-22 11:37   ` [bug#71897] [PATCH v9 4/8] gnu: Add cppgir-for-telegram-desktop dan
                     ` (4 subsequent siblings)
  6 siblings, 0 replies; 98+ messages in thread
From: dan @ 2024-09-22 11:37 UTC (permalink / raw)
  To: 71897
  Cc: dan, Maxim Cournoyer, Liliana Marie Prikler, Sharlatan Hellseher,
	Vivien Kraus

* gnu/packages/glib.scm (cppgir): New variable.

Change-Id: Ic4510be6d05b7b3977aa457c6a7fec382c1d3a88
---
 gnu/packages/glib.scm | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index d6275ea63e..a479199cdd 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -21,6 +21,7 @@
 ;;; Copyright © 2023 Saku Laesvuori <saku@laesvuori.fi>
 ;;; Copyright © 2024 Zheng Junjie <873216071@qq.com>
 ;;; Copyright © 2024 Remco van 't Veer <remco@remworks.net>
+;;; Copyright © 2024 dan <i@dan.games>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -72,6 +73,7 @@ (define-module (gnu packages glib)
   #:use-module (gnu packages perl-check)
   #:use-module (gnu packages popt)
   #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages pretty-print)
   #:use-module (gnu packages python)
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages sqlite)
@@ -1592,3 +1594,30 @@ (define-public libdex
 Dex also provides Fibers which allow writing synchronous looking code in C
 that uses asynchronous and future-based APIs.")
     (license license:lgpl2.1+)))
+
+(define-public cppgir
+  (package
+    (name "cppgir")
+    (version "2.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://gitlab.com/mnauw/cppgir")
+         (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0cj4myqzb28hgb7zlxlba9y8n4ysxkvv2y9wy6f7ps58mr18h7bl"))))
+    (build-system cmake-build-system)
+    (arguments
+     (list
+      #:configure-flags
+      #~(list "-DINTERNAL_EXPECTED=OFF")))
+    (inputs (list boost fmt expected-lite))
+    (home-page "https://gitlab.com/mnauw/cppgir")
+    (synopsis "C++ bindings generator for GObject introspection")
+    (description "cppgir processes @file{.gir} files derived from GObject
+introspection annotations into a set of C++ files defining suitable
+namespaces, classes and other types that together form a C++ binding.")
+    (license license:expat)))
-- 
2.45.2





^ permalink raw reply related	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH v9 4/8] gnu: Add cppgir-for-telegram-desktop.
  2024-09-22 11:37 ` [bug#71897] [PATCH v9 1/8] gnu: xdg-desktop-portal: Update to 1.18.4 dan
  2024-09-22 11:37   ` [bug#71897] [PATCH v9 2/8] gnu: xdg-desktop-portal: Improve style dan
  2024-09-22 11:37   ` [bug#71897] [PATCH v9 3/8] gnu: Add cppgir dan
@ 2024-09-22 11:37   ` dan
  2024-09-22 11:37   ` [bug#71897] [PATCH v9 5/8] gnu: simdjson: Update to 3.10.1 dan
                     ` (3 subsequent siblings)
  6 siblings, 0 replies; 98+ messages in thread
From: dan @ 2024-09-22 11:37 UTC (permalink / raw)
  To: 71897
  Cc: dan, Maxim Cournoyer, Liliana Marie Prikler, Sharlatan Hellseher,
	Vivien Kraus

* gnu/packages/glib.scm (cppgir-for-telegram-desktop): New variable.

Change-Id: Ib9ca3bd376f32d13939adabd2c52e1eb24e2ddcb
---
 gnu/packages/glib.scm | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index a479199cdd..a15a7ce58a 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -1621,3 +1621,22 @@ (define-public cppgir
 introspection annotations into a set of C++ files defining suitable
 namespaces, classes and other types that together form a C++ binding.")
     (license license:expat)))
+
+;; telegram-desktop requires a more recent version of cppgir
+(define-public cppgir-for-telegram-desktop
+  (let ((commit "9c4f5820d94d62ab451501f016bfea97156518f4")
+        (revision "0"))
+    (package
+      (inherit cppgir)
+      (name "cppgir-for-telegram-desktop")
+      (version (git-version "2.0" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri
+          (git-reference
+           (url "https://gitlab.com/mnauw/cppgir")
+           (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "1fa9nf4yljfarihaqj5kd98yysrky7q316mh6l5b1rq39ga15k9b")))))))
-- 
2.45.2





^ permalink raw reply related	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH v9 5/8] gnu: simdjson: Update to 3.10.1.
  2024-09-22 11:37 ` [bug#71897] [PATCH v9 1/8] gnu: xdg-desktop-portal: Update to 1.18.4 dan
                     ` (2 preceding siblings ...)
  2024-09-22 11:37   ` [bug#71897] [PATCH v9 4/8] gnu: Add cppgir-for-telegram-desktop dan
@ 2024-09-22 11:37   ` dan
  2024-09-22 11:37   ` [bug#71897] [PATCH v9 6/8] gnu: Add cpp-ada-url-parser dan
                     ` (2 subsequent siblings)
  6 siblings, 0 replies; 98+ messages in thread
From: dan @ 2024-09-22 11:37 UTC (permalink / raw)
  To: 71897; +Cc: dan, Maxim Cournoyer, Liliana Marie Prikler, Sharlatan Hellseher

* gnu/packages/cpp.scm (simdjson): Update to 3.10.1.

Change-Id: I6711077e162bcfbf6702d521fdeec44e3b21f074
---
 gnu/packages/cpp.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 7d782c7ea6..c805dae825 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -2395,7 +2395,7 @@ (define-public python-jsonnet
 (define-public simdjson
   (package
     (name "simdjson")
-    (version "3.1.0")
+    (version "3.10.1")
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -2404,7 +2404,7 @@ (define-public simdjson
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "0q784bm8xbz3p782dw02cdds6m71wk3acy94vva8krc9g88142ws"))))
+                "1qv7lvls7x9aw6mlnwfgchbajsxh6qygp09wpkb2w6mjdbidmi0h"))))
     (build-system cmake-build-system)
     (arguments
      '(#:tests? #f                      ; tests require downloading dependencies
-- 
2.45.2





^ permalink raw reply related	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH v9 6/8] gnu: Add cpp-ada-url-parser.
  2024-09-22 11:37 ` [bug#71897] [PATCH v9 1/8] gnu: xdg-desktop-portal: Update to 1.18.4 dan
                     ` (3 preceding siblings ...)
  2024-09-22 11:37   ` [bug#71897] [PATCH v9 5/8] gnu: simdjson: Update to 3.10.1 dan
@ 2024-09-22 11:37   ` dan
  2024-09-22 21:31     ` Liliana Marie Prikler
  2024-09-22 11:37   ` [bug#71897] [PATCH v9 7/8] gnu: Add libprisma-for-telegram-desktop dan
  2024-09-22 11:37   ` [bug#71897] [PATCH v9 8/8] gnu: telegram-desktop: Update to 5.5.5 dan
  6 siblings, 1 reply; 98+ messages in thread
From: dan @ 2024-09-22 11:37 UTC (permalink / raw)
  To: 71897; +Cc: dan, Maxim Cournoyer, Liliana Marie Prikler, Sharlatan Hellseher

* gnu/packages/cpp.scm (cpp-ada-url-parser): New variable.
(cpm-for-cpp-ada-url-parser): New variable.

Change-Id: I0b61c3b136e2781774c6a5e67eeb6b662e97dd88
---
 gnu/packages/cpp.scm | 58 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 58 insertions(+)

diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index c805dae825..29e50d4531 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -3284,3 +3284,61 @@ (define-public tl-optional
 the std::optional for C++11/14/17, with support for monadic operations added in
 C++23.")
     (license license:cc0)))
+
+(define cpm-for-cpp-ada-url-parser
+  (let ((version "0.38.6"))
+    (origin
+      (method git-fetch)
+      (uri (git-reference
+            (url "https://github.com/cpm-cmake/CPM.cmake")
+            (commit (string-append "v" version))))
+      (file-name (git-file-name "cpm-for-cpp-ada-url-parser" version))
+      (sha256 (base32 "1qbbhdq6cz2y7qfyy1k11i98d13s229r3phd5y3n5maq51ky8bgb")))))
+
+(define-public cpp-ada-url-parser
+  (package
+    (name "cpp-ada-url-parser")
+    (version "2.9.2")
+    (source
+      (origin
+        (method git-fetch)
+        (uri (git-reference
+              (url "https://github.com/ada-url/ada")
+              (commit (string-append "v" version))))
+        (file-name (git-file-name name version))
+        (sha256 (base32 "0xvvjlia627ajl966gdxzy2b1j0jiimx7zx8ypmffwx0k6x72qam"))))
+    (build-system cmake-build-system)
+    (arguments
+     (list
+      #:configure-flags #~(list "-DCPM_LOCAL_PACKAGES_ONLY=ON")
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'patch-deps
+            (lambda _
+              (substitute* "CMakeLists.txt"
+                (("cmake/CPM.cmake")
+                 (string-append #$cpm-for-cpp-ada-url-parser "/cmake/CPM.cmake"))
+                ;; We force CPM to find system packages rather than using git
+                ;; to download them.
+                (("Git_FOUND") "TRUE")
+                (("3.9.1")
+                 #$(package-version (this-package-native-input "simdjson"))))
+              (substitute* "tools/cli/CMakeLists.txt"
+                (("3.2.0")
+                 #$(package-version (this-package-native-input "cxxopts"))))))
+          (add-after 'patch-deps 'python-zipfile-disable-strict-timestamps
+            (lambda _
+              (substitute* "singleheader/amalgamate.py"
+                (("zipfile.ZIP_DEFLATED")
+                 "zipfile.ZIP_DEFLATED, strict_timestamps=False")))))))
+    (native-inputs
+     (list cxxopts
+           fmt-10
+           googletest
+           python
+           simdjson))
+    (home-page "https://github.com/ada-url/ada")
+    (synopsis "URL parser")
+    (description "Ada is a fast and spec-compliant URL parser written in C++.
+Specification for URL parser can be found from the WHATWG website.")
+    (license license:gpl3+)))
-- 
2.45.2





^ permalink raw reply related	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH v9 7/8] gnu: Add libprisma-for-telegram-desktop.
  2024-09-22 11:37 ` [bug#71897] [PATCH v9 1/8] gnu: xdg-desktop-portal: Update to 1.18.4 dan
                     ` (4 preceding siblings ...)
  2024-09-22 11:37   ` [bug#71897] [PATCH v9 6/8] gnu: Add cpp-ada-url-parser dan
@ 2024-09-22 11:37   ` dan
  2024-09-22 11:37   ` [bug#71897] [PATCH v9 8/8] gnu: telegram-desktop: Update to 5.5.5 dan
  6 siblings, 0 replies; 98+ messages in thread
From: dan @ 2024-09-22 11:37 UTC (permalink / raw)
  To: 71897; +Cc: dan, Maxim Cournoyer, Liliana Marie Prikler, Sharlatan Hellseher

* gnu/packages/telegram.scm (libprisma-for-telegram-desktop): New variable.

Change-Id: I855b463993654a8cad491c7b56c9581b3083f5e4
---
 gnu/packages/telegram.scm | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/gnu/packages/telegram.scm b/gnu/packages/telegram.scm
index 432d6f79a1..af16d4840b 100644
--- a/gnu/packages/telegram.scm
+++ b/gnu/packages/telegram.scm
@@ -400,6 +400,18 @@ (define cld3-for-telegram-desktop
     (base32
      "0ayrrhfdwrf4260h9fsirkhhfrcvc3qqnh6h9wj3ixij2lq0wwqb"))))
 
+(define libprisma-for-telegram-desktop
+  (origin
+   (method git-fetch)
+   (uri (git-reference
+         (url "https://github.com/desktop-app/libprisma")
+         (commit "23b0d70f9709da9b38561d5706891a134d18df76")))
+   (file-name
+    (git-file-name "libprisma-for-telegram-desktop" "5.3.2"))
+   (sha256
+    (base32
+     "0fg4x4ikj7f3706bmfvkwq4smxc98qr3cgpm25w48n4ys6wfgadg"))))
+
 (define-public telegram-desktop
   (package
     (name "telegram-desktop")
-- 
2.45.2





^ permalink raw reply related	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH v9 8/8] gnu: telegram-desktop: Update to 5.5.5.
  2024-09-22 11:37 ` [bug#71897] [PATCH v9 1/8] gnu: xdg-desktop-portal: Update to 1.18.4 dan
                     ` (5 preceding siblings ...)
  2024-09-22 11:37   ` [bug#71897] [PATCH v9 7/8] gnu: Add libprisma-for-telegram-desktop dan
@ 2024-09-22 11:37   ` dan
  6 siblings, 0 replies; 98+ messages in thread
From: dan @ 2024-09-22 11:37 UTC (permalink / raw)
  To: 71897; +Cc: dan, Maxim Cournoyer, Liliana Marie Prikler, Sharlatan Hellseher

* 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
---
 gnu/local.mk                                  |   2 +
 ...gram-desktop-allow-disable-libtgvoip.patch |   6 +-
 .../telegram-desktop-unbundle-cppgir.patch    |  95 +++++++++++++++
 .../telegram-desktop-unbundle-gsl.patch       |  31 +++++
 ...or-telegram-desktop-unbundle-libsrtp.patch |   7 +-
 gnu/packages/telegram.scm                     | 112 +++++++++++-------
 6 files changed, 205 insertions(+), 48 deletions(-)
 create mode 100644 gnu/packages/patches/telegram-desktop-unbundle-cppgir.patch
 create mode 100644 gnu/packages/patches/telegram-desktop-unbundle-gsl.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 802f4be4fe..dc6c7294e7 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2196,6 +2196,8 @@ dist_patch_DATA =						\
   %D%/packages/patches/texinfo-headings-single.patch		\
   %D%/packages/patches/texinfo-5-perl-compat.patch		\
   %D%/packages/patches/telegram-desktop-allow-disable-libtgvoip.patch   \
+  %D%/packages/patches/telegram-desktop-unbundle-cppgir.patch   \
+  %D%/packages/patches/telegram-desktop-unbundle-gsl.patch      \
   %D%/packages/patches/telegram-purple-adjust-test.patch	\
   %D%/packages/patches/teuchos-remove-duplicate-using.patch	\
   %D%/packages/patches/texi2html-document-encoding.patch	\
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()
diff --git a/gnu/packages/telegram.scm b/gnu/packages/telegram.scm
index af16d4840b..084b14088a 100644
--- a/gnu/packages/telegram.scm
+++ b/gnu/packages/telegram.scm
@@ -5,6 +5,7 @@
 ;;; Copyright © 2023 Lu Hui <luhux76@gmail.com>
 ;;; Copyright © 2023 Camilo Q.S. (Distopico) <distopico@riseup.net>
 ;;; Copyright © 2024 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2024 dan <i@dan.games>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -28,6 +29,7 @@ (define-module (gnu packages telegram)
   #:use-module (gnu packages assembly)
   #:use-module (gnu packages audio)
   #:use-module (gnu packages autotools)
+  #:use-module (gnu packages boost)
   #:use-module (gnu packages check)
   #:use-module (gnu packages cmake)
   #:use-module (gnu packages compression)
@@ -44,7 +46,6 @@ (define-module (gnu packages telegram)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages hunspell)
   #:use-module (gnu packages image)
-  #:use-module (gnu packages jemalloc)
   #:use-module (gnu packages kde-frameworks)
   #:use-module (gnu packages language)
   #:use-module (gnu packages libevent)
@@ -82,11 +83,11 @@ (define-module (gnu packages telegram)
   #:use-module (guix build-system python)
   #:use-module (guix build-system qt))
 
-(define %telegram-version "4.8.1")
+(define %telegram-version "5.5.5")
 
 (define libyuv-for-telegram-desktop
-  (let ((commit "77c2121f7e6b8e694d6e908bbbe9be24214097da")
-        (revision "2439"))
+  (let ((commit "04821d1e7d60845525e8db55c7bcd41ef5be9406")
+        (revision "2440"))
     (origin
       (method git-fetch)
       (uri (git-reference
@@ -97,79 +98,84 @@ (define libyuv-for-telegram-desktop
                   (git-version "0" revision commit)))
       (sha256
        (base32
-        "1b4k8yskr9ffl5k8s9i0af1gn1pavsfixla26vh8bij69rdr7f9c")))))
+        "1fsvc0f8mckrdzys8lnlnbw6676mjamm6p3ghr2h9liqfa83s6wg")))))
 
 (define cmake-helpers-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/cmake_helpers.git")
-          (commit "6ab5543b3dd1e40979d258e46d03376931b6c37b")))
+          (commit "05a7db2e2d2a59ecf42483debca4944d09154b5b")))
     (file-name
      (git-file-name "cmake-helpers-for-telegram-desktop" %telegram-version))
+    (patches
+     ;; https://github.com/desktop-app/cmake_helpers/pull/320
+     ;; https://github.com/desktop-app/cmake_helpers/pull/305
+     (search-patches "telegram-desktop-unbundle-gsl.patch"
+                     "telegram-desktop-unbundle-cppgir.patch"))
     (sha256
      (base32
-      "0y96mvzs113zh8bdw1h3i6l0pgwg93rigrday8kfdg4magz686k6"))))
+      "1gapyk5a8rsl8vigbz0l8h9858f2lkhkd2pjy72zivp0mrq8w0hr"))))
 
 (define codegen-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/codegen.git")
-          (commit "1a969faa0afb29d53af03e530775eccdfb8433f1")))
+          (commit "0af136124083369073b8fdaf45f0816fd2b10bad")))
     (file-name
      (git-file-name "codegen-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "1xmw8dfm51p5g20rlmzqnr72a14ngyxwq09an8clf1v5s6mmwvak"))))
+      "057bwn9smrgnyfb1vraf50ihbkhjc4d72msl7vnbqc4h5sg8dav9"))))
 
 (define lib-base-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_base.git")
-          (commit "fd9adb30ee906ea02c125eaa58fcfae773fdc677")))
+          (commit "547e7f2914d9b5548dd17e70a3a7bf5d6606afc3")))
     (file-name
      (git-file-name "lib-base-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "1m760mcfvgzia53nrs6wvjn353jvzlzln7c9fkx2dhpkigiynz83"))))
+      "0sgm2prhd4fw89afh62k7i4i7mj60n170kqz50b0mad927zngxvn"))))
 
 (define lib-crl-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_crl.git")
-          (commit "3d7e1e1f1321c3defd21c01882d674e485ecd8df")))
+          (commit "c1d6b0273653095b10b4d0f4f7c30b614b690fd5")))
     (file-name
      (git-file-name "lib-crl-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "06mzafnjpfr5ih297dh7bxm6bgpg0wy0gv2r2732n5szyrg9sdl6"))))
+      "1sxn3qccsfbx1289z0fdrb4cggs16a8r75ic6wi81c6lnkrdi3wl"))))
 
 (define lib-lottie-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_lottie.git")
-          (commit "3e9c2f1026e4b5aa3202fca4cc67ece36c7cebb2")))
+          (commit "1a700e5a0d7c3e2f617530354ff2a47c5c72bb4a")))
     (file-name
      (git-file-name "lib-lottie-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "0l57ibfij9xm4ww4s9cc63q1x8xzpc6ablwaji1krrn3xxksqdd4"))))
+      "18w35sz6k3wcv07v0szx3avpfdl0rjby6yqm1fzmx7fqw2jn6wpl"))))
 
 (define lib-qr-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_qr.git")
-          (commit "501f4c3502fd872ab4d777df8911bdac32de7c48")))
+          (commit "6fdf60461444ba150e13ac36009c0ffce72c4c83")))
     (file-name
      (git-file-name "lib-qr-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "0hmwqj7a9vcy8wq7pd1qprl68im3zl5f1wzcn2zzk2wvi0389k9f"))))
+      "1i5n3qvjkf4nv8k75cc0a71xyvpklc4nzg4k2zsfr2pxk0cy7hkw"))))
 
 (define lib-rpl-for-telegram-desktop
   (origin
@@ -188,88 +194,88 @@ (define lib-spellcheck-for-telegram-desktop
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_spellcheck.git")
-          (commit "ae89fefd239ecc47d4dab7ba29f9e230376a57d3")))
+          (commit "e76981e133a1d29f3ceb557f53850a8d822f439a")))
     (file-name
      (git-file-name "lib-spellcheck-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "147xbbcza5q4wcdipk5jplajzkc48971kg2s7qv5jlz33sxkw1lq"))))
+      "0dslsy3d6gmxaj6yv49zjgl2b2mh75j7fpnbynglr02h3m2fdj96"))))
 
 (define lib-storage-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_storage.git")
-          (commit "839609369d04615475cb1518636de3619106a917")))
+          (commit "ccdc72548a5065b5991b4e06e610d76bc4f6023e")))
     (file-name
      (git-file-name "lib-storage-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "1l26h2fmqp9dcpr6pfvdd5sjb68j7yh0ms2lnr8na7jf5xqmkwwm"))))
+      "0b11ix95dzpkz335q0a6b5yg8qhj33s4fgj9ppl37pszcqq1j3wi"))))
 
 (define lib-tl-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_tl.git")
-          (commit "36fb95c4de1339d2c8921ad6b2911858c3d0e0fa")))
+          (commit "237cbeb9d1c637759f89a508c1d854caf16e1984")))
     (file-name
      (git-file-name "lib-tl-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "03rngnssnqwr7ad05qn64mwgji5fb0r3fp5ybkf951p8phr1jvzk"))))
+      "1ji3gypy4yf9knsgylnyz5gc2kii7lls5ymj1rkf0daixdz931cm"))))
 
 (define lib-ui-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_ui.git")
-          (commit "37531086ec21a8569deddedb11b402f8a3157b90")))
+          (commit "c4e3a08e6fb90a6174c8b592d9eb747dd4d3f9c5")))
     (file-name
      (git-file-name "lib-ui-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "0l4baalwdiwcwzn3wgrbyiaryi70lswillbpkzcjpavaa2pjg6b0"))))
+      "1lbfy4fbb52lklfwn6kxny3mwl653r4vc80k922kwjfgbcy9c25f"))))
 
 (define lib-webrtc-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_webrtc.git")
-          (commit "b68a95ad4d1ae9a1827671100a7fd76cbe448c3f")))
+          (commit "8751e27d50d2f26b5d20673e5ddba38e90953570")))
     (file-name
      (git-file-name "lib-webrtc-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "1c8jwdnn26n13yp0rp0l71q6xlxa6wp3cspbm3pnghw964jwgp3z"))))
+      "0f05pqb83qckghzlhnwqbi9qfi9xw7qsv8jampl4qyaq9q0w9p20"))))
 
 (define lib-webview-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_webview.git")
-          (commit "f632fc84cbc62ae8abbbd05f81d472757a337c11")))
+          (commit "2de655f58dc327e40d5d9df71300a0d0fdb39c9f")))
     (file-name
      (git-file-name "lib-webview-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "0idsfkxq7l9kgyrhifys5l4jkhvbyxkgkp0qdq9218h7g0ldw84i"))))
+      "12vrif0685vb068mj5sd7cknav1n66jysp18j21nlp0am9pw7ydj"))))
 
 (define tgcalls-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/TelegramMessenger/tgcalls.git")
-          (commit "2e2797648aac2588e7fe479c2e8b4455ec65c5e6")))
+          (commit "9bf4065ea00cbed5e63cec348457ed13143459d0")))
     (file-name
      (git-file-name "tgcalls-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "193m2gkvipijqbfd6a8mhg9nd63wlnshzgspk3pip57vk21l709z"))))
+      "1p563a11w8jrid96xf03dg6j39ciz28n5f4r6g28lxhiphbqzfym"))))
 
 (define-public webrtc-for-telegram-desktop
-  (let ((commit "0532942ac6176a66ef184fb728a4cbb02958fc0b")
-        (revision "389"))
+  (let ((commit "c425281150317753d7bc5182c6572abe20f9a784")
+        (revision "456"))
     (hidden-package
      (package
        (name "webrtc-for-telegram-desktop")
@@ -285,7 +291,7 @@ (define-public webrtc-for-telegram-desktop
           (file-name
            (git-file-name name version))
           (sha256
-           (base32 "0fary99yl1ddk5zjpfy0pyb5brd268j41plcnvv9qjyf0wj9hf2k"))
+           (base32 "1fj48iq56awnrckncy1qc3zhdzifl725hbb6an7wg2v3zmagvrwn"))
           (patches
            (search-patches
             ;; https://github.com/desktop-app/tg_owt/pull/123
@@ -407,7 +413,7 @@ (define libprisma-for-telegram-desktop
          (url "https://github.com/desktop-app/libprisma")
          (commit "23b0d70f9709da9b38561d5706891a134d18df76")))
    (file-name
-    (git-file-name "libprisma-for-telegram-desktop" "5.3.2"))
+    (git-file-name "libprisma-for-telegram-desktop" %telegram-version))
    (sha256
     (base32
      "0fg4x4ikj7f3706bmfvkwq4smxc98qr3cgpm25w48n4ys6wfgadg"))))
@@ -427,7 +433,7 @@ (define-public telegram-desktop
        (file-name
         (git-file-name name version))
        (sha256
-        (base32 "0g47ffamh1csp79yzkv28v3qjkhjacj0c7pjf53n1ks80j5hc2j0"))
+        (base32 "12fdybn085s3i3a8hwi0bmdns7jxvg0k662n04jgffirgsz8n54m"))
        (patches
         (search-patches
          ;; https://github.com/telegramdesktop/tdesktop/pull/24126
@@ -468,7 +474,10 @@ (define-public telegram-desktop
               "-DTDESKTOP_DISABLE_LEGACY_TGVOIP=ON"
               "-DDESKTOP_APP_DISABLE_CRASH_REPORTS=ON"
               "-DDESKTOP_APP_DISABLE_AUTOUPDATE=ON"
-              "-DDESKTOP_APP_USE_PACKAGED_RLOTTIE=ON")
+              "-DDESKTOP_APP_USE_PACKAGED_RLOTTIE=ON"
+              ;; Enabling jemalloc causes SIGSEGV.  This probably happened
+              ;; after upgrading to glibc 2.39.
+              "-DDESKTOP_APP_DISABLE_JEMALLOC=ON")
            #:phases
            #~(modify-phases %standard-phases
                (add-after 'unpack 'unpack-additional-sources
@@ -493,21 +502,45 @@ (define-public telegram-desktop
                       ("Telegram/lib_webrtc" #$lib-webrtc-for-telegram-desktop)
                       ("Telegram/lib_webview" #$lib-webview-for-telegram-desktop)
                       ("Telegram/ThirdParty/cld3" #$cld3-for-telegram-desktop)
+                      ("Telegram/ThirdParty/libprisma" #$libprisma-for-telegram-desktop)
                       ("Telegram/ThirdParty/tgcalls" #$tgcalls-for-telegram-desktop)))))
+               (add-after 'unpack-additional-sources 'patch-gir-ignore-paths
+                 (lambda _
+                   (substitute* "cmake/external/glib/generate_cppgir.cmake"
+                     (("\\$\\{cmake_helpers_loc\\}/external/glib/cppgir/data")
+                      (string-append #$(this-package-input "cppgir") "/share/cppgir")))))
+               (add-after 'unpack-additional-sources 'use-system-xdg-desktop-portal
+                 (lambda _
+                   (substitute* (list "Telegram/CMakeLists.txt"
+                                      "Telegram/lib_base/CMakeLists.txt")
+                     (("\\$\\{third_party_loc\\}/xdg-desktop-portal/data")
+                      (string-append #$(this-package-native-input "xdg-desktop-portal")
+                                     "/share/dbus-1/interfaces")))))
+               ;; Remove this constexpr keyword to make it compatible with gcc-final.
+               (add-after 'use-system-xdg-desktop-portal 'patch-libwebview
+                 (lambda _
+                   (substitute* "Telegram/lib_webview/webview/webview_interface.h"
+                     (("constexpr ") ""))))
                (add-after 'install 'glib-or-gtk-compile-schemas
                  (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-compile-schemas))
                (add-after 'glib-or-gtk-compile-schemas 'glib-or-gtk-wrap
                  (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap)))))
     (native-inputs
-     (list `(,glib "bin")
+     (list cpp-ada-url-parser
+           `(,glib "bin")
+           gobject-introspection
            `(,gtk+ "bin")
            pkg-config
-           python-wrapper))
+           python-wrapper
+           xdg-desktop-portal))
     (inputs
      (list abseil-cpp-cxxstd17
            alsa-lib
+           boost
            c++-gsl
+           cppgir-for-telegram-desktop
            crc32c
+           expected-lite
            fcitx-qt5
            fcitx5-qt
            ffmpeg
@@ -516,7 +549,6 @@ (define-public telegram-desktop
            gtk+
            hime
            hunspell
-           jemalloc
            kcoreaddons-5
            kimageformats-5
            libdispatch
-- 
2.45.2





^ permalink raw reply related	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH v9 6/8] gnu: Add cpp-ada-url-parser.
  2024-09-22 11:37   ` [bug#71897] [PATCH v9 6/8] gnu: Add cpp-ada-url-parser dan
@ 2024-09-22 21:31     ` Liliana Marie Prikler
  0 siblings, 0 replies; 98+ messages in thread
From: Liliana Marie Prikler @ 2024-09-22 21:31 UTC (permalink / raw)
  To: dan, 71897; +Cc: Sharlatan Hellseher, Maxim Cournoyer

Am Sonntag, dem 22.09.2024 um 19:37 +0800 schrieb dan:
> * gnu/packages/cpp.scm (cpp-ada-url-parser): New variable.
> (cpm-for-cpp-ada-url-parser): New variable.
> 
> Change-Id: I0b61c3b136e2781774c6a5e67eeb6b662e97dd88
> ---
>  gnu/packages/cpp.scm | 58
> ++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 58 insertions(+)
> 
> diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
> index c805dae825..29e50d4531 100644
> --- a/gnu/packages/cpp.scm
> +++ b/gnu/packages/cpp.scm
> @@ -3284,3 +3284,61 @@ (define-public tl-optional
>  the std::optional for C++11/14/17, with support for monadic
> operations added in
>  C++23.")
>      (license license:cc0)))
> +
> +(define cpm-for-cpp-ada-url-parser
> +  (let ((version "0.38.6"))
> +    (origin
> +      (method git-fetch)
> +      (uri (git-reference
> +            (url "https://github.com/cpm-cmake/CPM.cmake")
> +            (commit (string-append "v" version))))
> +      (file-name (git-file-name "cpm-for-cpp-ada-url-parser"
> version))
> +      (sha256 (base32
> "1qbbhdq6cz2y7qfyy1k11i98d13s229r3phd5y3n5maq51ky8bgb")))))
> +
> +(define-public cpp-ada-url-parser
> +  (package
> +    (name "cpp-ada-url-parser")
> +    (version "2.9.2")
> +    (source
> +      (origin
> +        (method git-fetch)
> +        (uri (git-reference
> +              (url "https://github.com/ada-url/ada")
> +              (commit (string-append "v" version))))
> +        (file-name (git-file-name name version))
> +        (sha256 (base32
> "0xvvjlia627ajl966gdxzy2b1j0jiimx7zx8ypmffwx0k6x72qam"))))
> +    (build-system cmake-build-system)
> +    (arguments
> +     (list
> +      #:configure-flags #~(list "-DCPM_LOCAL_PACKAGES_ONLY=ON")
> +      #:phases
> +      #~(modify-phases %standard-phases
> +          (add-after 'unpack 'patch-deps
> +            (lambda _
> +              (substitute* "CMakeLists.txt"
> +                (("cmake/CPM.cmake")
> +                 (string-append #$cpm-for-cpp-ada-url-parser
> "/cmake/CPM.cmake"))
> +                ;; We force CPM to find system packages rather than
> using git
Doesn't CMake have a lookup mechanism for those too?  Could we not just
delete the file through a snippet and add this as native input?

> +                ;; to download them.
> +                (("Git_FOUND") "TRUE")
> +                (("3.9.1")
> +                 #$(package-version (this-package-native-input
> "simdjson"))))
You might want to use the package as needle as well, i.e.
(simdjson@)[0-9.]* and then replace the version substring.  This is
more robust in the face of multiple packages having the same versions
by accident of one package getting version-bumped. 
> +              (substitute* "tools/cli/CMakeLists.txt"
> +                (("3.2.0")
> +                 #$(package-version (this-package-native-input
> "cxxopts"))))))
> +          (add-after 'patch-deps 'python-zipfile-disable-strict-
> timestamps
> +            (lambda _
> +              (substitute* "singleheader/amalgamate.py"
> +                (("zipfile.ZIP_DEFLATED")
> +                 "zipfile.ZIP_DEFLATED,
> strict_timestamps=False")))))))
> +    (native-inputs
> +     (list cxxopts
> +           fmt-10
> +           googletest
> +           python
> +           simdjson))
> +    (home-page "https://github.com/ada-url/ada")
> +    (synopsis "URL parser")
> +    (description "Ada is a fast and spec-compliant URL parser
> written in C++.
> +Specification for URL parser can be found from the WHATWG website.")
> +    (license license:gpl3+)))
Cheers

^ permalink raw reply	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH v10 1/9] gnu: xdg-desktop-portal: Update to 1.18.4.
  2024-07-02  5:18 [bug#71897] [PATCH 1/2] gnu: Add cppgir dan
                   ` (10 preceding siblings ...)
  2024-09-22 11:37 ` [bug#71897] [PATCH v9 1/8] gnu: xdg-desktop-portal: Update to 1.18.4 dan
@ 2024-09-22 23:04 ` dan
  2024-09-22 23:04   ` [bug#71897] [PATCH v10 2/9] gnu: xdg-desktop-portal: Improve style dan
                     ` (8 more replies)
  11 siblings, 9 replies; 98+ messages in thread
From: dan @ 2024-09-22 23:04 UTC (permalink / raw)
  To: 71897
  Cc: Liliana Marie Prikler, Maxim Cournoyer, dan, Maxim Cournoyer,
	Liliana Marie Prikler, Sharlatan Hellseher

* gnu/packages/patches/xdg-desktop-portal-disable-portal-tests.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/freedesktop.scm (xdg-desktop-portal): Update to 1.18.4.
[patches]: Disable portal tests.
[native-inputs]: Remove autoconf, automake, libtool and which.  Add python,
python-dbusmock, python-pytest and python-pytest-xdist.
[inputs]: Add bubblewrap.
[arguments]<#:configure-flags>: Replace “--with-systemd=no” with
“-Dsystemd=disabled”.

Change-Id: Ic9876565e9119443fedd082273be4f372ebce1d4
Reviewed-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
---
 gnu/local.mk                                  |  1 +
 gnu/packages/freedesktop.scm                  | 25 +++++----
 ...-desktop-portal-disable-portal-tests.patch | 56 +++++++++++++++++++
 3 files changed, 72 insertions(+), 10 deletions(-)
 create mode 100644 gnu/packages/patches/xdg-desktop-portal-disable-portal-tests.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 8e7abc8a47..802f4be4fe 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2303,6 +2303,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/wordnet-CVE-2008-3908-pt2.patch			\
   %D%/packages/patches/wpa-supplicant-dbus-group-policy.patch		\
   %D%/packages/patches/x265-arm-flags.patch			\
+  %D%/packages/patches/xdg-desktop-portal-disable-portal-tests.patch\
   %D%/packages/patches/xdg-desktop-portal-wlr-harcoded-length.patch\
   %D%/packages/patches/xen-docs-use-predictable-ordering.patch	\
   %D%/packages/patches/xen-remove-config.gz-timestamp.patch	\
diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index 993bb84ec6..f00f4b3956 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -39,6 +39,7 @@
 ;;; Copyright © 2024 aurtzy <aurtzy@gmail.com>
 ;;; Copyright © 2024 Dariqq <dariqq@posteo.net>
 ;;; Copyright © 2024 Wilko Meyer <w@wmeyer.eu>
+;;; Copyright © 2024 dan <i@dan.games>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -136,6 +137,7 @@ (define-module (gnu packages freedesktop)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages valgrind)
   #:use-module (gnu packages video)
+  #:use-module (gnu packages virtualization)
   #:use-module (gnu packages w3m)
   #:use-module (gnu packages web)
   #:use-module (gnu packages xdisorg)
@@ -2986,7 +2988,7 @@ (define-public libportal
 (define-public xdg-desktop-portal
   (package
     (name "xdg-desktop-portal")
-    (version "1.16.0")
+    (version "1.18.4")
     (source
      (origin
        (method url-fetch)
@@ -2995,18 +2997,21 @@ (define-public xdg-desktop-portal
              version "/xdg-desktop-portal-" version ".tar.xz"))
        (sha256
         (base32
-         "06cczlh39kc41rvav06v37sad827y61rffy3v29i918ibj8sahav"))))
-    (build-system gnu-build-system)
+         "0r8y8qmzcfj7b7brqcxr9lg8pavfds815ffvj0kqc378fhgaln5q"))
+       ;; Disable portal tests since they try to use fuse.
+       (patches (search-patches "xdg-desktop-portal-disable-portal-tests.patch"))))
+    (build-system meson-build-system)
     (native-inputs
      `(("pkg-config" ,pkg-config)
-       ("autoconf" ,autoconf)
-       ("automake" ,automake)
-       ("libtool" ,libtool)
        ("glib:bin" ,glib "bin")
-       ("which" ,which)
-       ("gettext" ,gettext-minimal)))
+       ("gettext" ,gettext-minimal)
+       ("python" ,python)
+       ("python-dbusmock" ,python-dbusmock)
+       ("python-pytest" ,python-pytest)
+       ("python-pytest-xdist" ,python-pytest-xdist)))
     (inputs
-     `(("gdk-pixbuf" ,gdk-pixbuf)
+     `(("bubblewrap" ,bubblewrap)
+       ("gdk-pixbuf" ,gdk-pixbuf)
        ("glib" ,glib)
        ("flatpak" ,flatpak)
        ("fontconfig" ,fontconfig)
@@ -3018,7 +3023,7 @@ (define-public xdg-desktop-portal
        ("fuse" ,fuse)))
     (arguments
      `(#:configure-flags
-       (list "--with-systemd=no")
+       (list "-Dsystemd=disabled")
        #:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'po-chmod
diff --git a/gnu/packages/patches/xdg-desktop-portal-disable-portal-tests.patch b/gnu/packages/patches/xdg-desktop-portal-disable-portal-tests.patch
new file mode 100644
index 0000000000..5e13493613
--- /dev/null
+++ b/gnu/packages/patches/xdg-desktop-portal-disable-portal-tests.patch
@@ -0,0 +1,56 @@
+From b7750fa99c31c5f28ac2053fa154bef4038b5cc0 Mon Sep 17 00:00:00 2001
+From: dan <i@dan.games>
+Date: Tue, 2 Jul 2024 19:37:38 +0800
+Subject: [PATCH] tests: remove portal tests.
+
+---
+ tests/meson.build | 24 ------------------------
+ 1 file changed, 24 deletions(-)
+
+diff --git a/tests/meson.build b/tests/meson.build
+index a2dafee..bcd87be 100644
+--- a/tests/meson.build
++++ b/tests/meson.build
+@@ -181,18 +181,6 @@ portal_tests = [
+ 
+ test_env = env_tests
+ test_env.set('XDG_CURRENT_DESKTOP', 'test')
+-foreach p : portal_tests
+-    test(
+-      'test-portals-@0@'.format(p),
+-      test_portals,
+-      args: ['--verbose', '--keep-going', '--tap', '-p', '/portal/@0@'.format(p)],
+-      depends: [test_backends, test_portals],
+-      env: test_env,
+-      is_parallel: false,
+-      protocol: test_protocol,
+-      suite: 'portals',
+-    )
+-endforeach
+ 
+ # Split the portal tests into one test per portal, this makes debugging a lot
+ # easier.
+@@ -204,18 +192,6 @@ portal_limited = [
+ 
+ limited_env = env_tests
+ limited_env.set('XDG_CURRENT_DESKTOP', 'limited')
+-foreach p : portal_limited
+-    test(
+-      'limited-portals-@0@'.format(p),
+-      limited_portals,
+-      args: ['--verbose', '--keep-going', '--tap', '-p', '/limited/@0@'.format(p)],
+-      depends: [test_backends, limited_portals],
+-      env: limited_env,
+-      is_parallel: false,
+-      protocol: test_protocol,
+-      suite: 'portals',
+-    )
+-endforeach
+ 
+ if enable_installed_tests
+   install_data(
+
+base-commit: 11c8a96b147aeae70e3f770313f93b367d53fedd
+-- 
+2.41.0
+

base-commit: fc059c66cf8456aa7e456be8c3bc706c4e70fcaf
-- 
2.45.2





^ permalink raw reply related	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH v10 2/9] gnu: xdg-desktop-portal: Improve style.
  2024-09-22 23:04 ` [bug#71897] [PATCH v10 1/9] gnu: xdg-desktop-portal: Update to 1.18.4 dan
@ 2024-09-22 23:04   ` dan
  2024-09-22 23:04   ` [bug#71897] [PATCH v10 3/9] gnu: Add cppgir dan
                     ` (7 subsequent siblings)
  8 siblings, 0 replies; 98+ messages in thread
From: dan @ 2024-09-22 23:04 UTC (permalink / raw)
  To: 71897
  Cc: Liliana Marie Prikler, Maxim Cournoyer, dan, Maxim Cournoyer,
	Liliana Marie Prikler, Sharlatan Hellseher

From: Liliana Marie Prikler <liliana.prikler@gmail.com>

* gnu/packages/freedesktop.scm (xdg-desktop-portal) [inputs]: Move after
arguments.  Drop labels.
[native-inputs]: Move after inputs.  Drop labels.

Reviewed-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
---
 gnu/packages/freedesktop.scm | 40 ++++++++++++++++++------------------
 1 file changed, 20 insertions(+), 20 deletions(-)

diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index f00f4b3956..664adf0cb2 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -3001,26 +3001,6 @@ (define-public xdg-desktop-portal
        ;; Disable portal tests since they try to use fuse.
        (patches (search-patches "xdg-desktop-portal-disable-portal-tests.patch"))))
     (build-system meson-build-system)
-    (native-inputs
-     `(("pkg-config" ,pkg-config)
-       ("glib:bin" ,glib "bin")
-       ("gettext" ,gettext-minimal)
-       ("python" ,python)
-       ("python-dbusmock" ,python-dbusmock)
-       ("python-pytest" ,python-pytest)
-       ("python-pytest-xdist" ,python-pytest-xdist)))
-    (inputs
-     `(("bubblewrap" ,bubblewrap)
-       ("gdk-pixbuf" ,gdk-pixbuf)
-       ("glib" ,glib)
-       ("flatpak" ,flatpak)
-       ("fontconfig" ,fontconfig)
-       ("json-glib" ,json-glib)
-       ("libportal" ,libportal)
-       ("dbus" ,dbus)
-       ("geoclue" ,geoclue)
-       ("pipewire" ,pipewire)
-       ("fuse" ,fuse)))
     (arguments
      `(#:configure-flags
        (list "-Dsystemd=disabled")
@@ -3034,6 +3014,26 @@ (define-public xdg-desktop-portal
                        (find-files "po" "\\.po$"))))
          (add-after 'unpack 'set-home-directory
            (lambda _ (setenv "HOME" "/tmp"))))))
+    (inputs
+     (list bubblewrap
+           dbus
+           flatpak
+           fontconfig
+           fuse
+           gdk-pixbuf
+           geoclue
+           glib
+           json-glib
+           libportal
+           pipewire))
+    (native-inputs
+     (list gettext-minimal
+           `(,glib "bin")
+           pkg-config
+           python
+           python-dbusmock
+           python-pytest
+           python-pytest-xdist))
     (native-search-paths
      (list (search-path-specification
             (variable "XDG_DESKTOP_PORTAL_DIR")
-- 
2.45.2





^ permalink raw reply related	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH v10 3/9] gnu: Add cppgir.
  2024-09-22 23:04 ` [bug#71897] [PATCH v10 1/9] gnu: xdg-desktop-portal: Update to 1.18.4 dan
  2024-09-22 23:04   ` [bug#71897] [PATCH v10 2/9] gnu: xdg-desktop-portal: Improve style dan
@ 2024-09-22 23:04   ` dan
  2024-09-22 23:04   ` [bug#71897] [PATCH v10 4/9] gnu: Add cppgir-for-telegram-desktop dan
                     ` (6 subsequent siblings)
  8 siblings, 0 replies; 98+ messages in thread
From: dan @ 2024-09-22 23:04 UTC (permalink / raw)
  To: 71897
  Cc: dan, Maxim Cournoyer, Liliana Marie Prikler, Sharlatan Hellseher,
	Vivien Kraus

* gnu/packages/glib.scm (cppgir): New variable.

Change-Id: Ic4510be6d05b7b3977aa457c6a7fec382c1d3a88
---
 gnu/packages/glib.scm | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index d6275ea63e..a479199cdd 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -21,6 +21,7 @@
 ;;; Copyright © 2023 Saku Laesvuori <saku@laesvuori.fi>
 ;;; Copyright © 2024 Zheng Junjie <873216071@qq.com>
 ;;; Copyright © 2024 Remco van 't Veer <remco@remworks.net>
+;;; Copyright © 2024 dan <i@dan.games>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -72,6 +73,7 @@ (define-module (gnu packages glib)
   #:use-module (gnu packages perl-check)
   #:use-module (gnu packages popt)
   #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages pretty-print)
   #:use-module (gnu packages python)
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages sqlite)
@@ -1592,3 +1594,30 @@ (define-public libdex
 Dex also provides Fibers which allow writing synchronous looking code in C
 that uses asynchronous and future-based APIs.")
     (license license:lgpl2.1+)))
+
+(define-public cppgir
+  (package
+    (name "cppgir")
+    (version "2.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://gitlab.com/mnauw/cppgir")
+         (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0cj4myqzb28hgb7zlxlba9y8n4ysxkvv2y9wy6f7ps58mr18h7bl"))))
+    (build-system cmake-build-system)
+    (arguments
+     (list
+      #:configure-flags
+      #~(list "-DINTERNAL_EXPECTED=OFF")))
+    (inputs (list boost fmt expected-lite))
+    (home-page "https://gitlab.com/mnauw/cppgir")
+    (synopsis "C++ bindings generator for GObject introspection")
+    (description "cppgir processes @file{.gir} files derived from GObject
+introspection annotations into a set of C++ files defining suitable
+namespaces, classes and other types that together form a C++ binding.")
+    (license license:expat)))
-- 
2.45.2





^ permalink raw reply related	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH v10 4/9] gnu: Add cppgir-for-telegram-desktop.
  2024-09-22 23:04 ` [bug#71897] [PATCH v10 1/9] gnu: xdg-desktop-portal: Update to 1.18.4 dan
  2024-09-22 23:04   ` [bug#71897] [PATCH v10 2/9] gnu: xdg-desktop-portal: Improve style dan
  2024-09-22 23:04   ` [bug#71897] [PATCH v10 3/9] gnu: Add cppgir dan
@ 2024-09-22 23:04   ` dan
  2024-09-22 23:04   ` [bug#71897] [PATCH v10 5/9] gnu: simdjson: Update to 3.10.1 dan
                     ` (5 subsequent siblings)
  8 siblings, 0 replies; 98+ messages in thread
From: dan @ 2024-09-22 23:04 UTC (permalink / raw)
  To: 71897
  Cc: dan, Maxim Cournoyer, Liliana Marie Prikler, Sharlatan Hellseher,
	Vivien Kraus

* gnu/packages/glib.scm (cppgir-for-telegram-desktop): New variable.

Change-Id: Ib9ca3bd376f32d13939adabd2c52e1eb24e2ddcb
---
 gnu/packages/glib.scm | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index a479199cdd..a15a7ce58a 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -1621,3 +1621,22 @@ (define-public cppgir
 introspection annotations into a set of C++ files defining suitable
 namespaces, classes and other types that together form a C++ binding.")
     (license license:expat)))
+
+;; telegram-desktop requires a more recent version of cppgir
+(define-public cppgir-for-telegram-desktop
+  (let ((commit "9c4f5820d94d62ab451501f016bfea97156518f4")
+        (revision "0"))
+    (package
+      (inherit cppgir)
+      (name "cppgir-for-telegram-desktop")
+      (version (git-version "2.0" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri
+          (git-reference
+           (url "https://gitlab.com/mnauw/cppgir")
+           (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "1fa9nf4yljfarihaqj5kd98yysrky7q316mh6l5b1rq39ga15k9b")))))))
-- 
2.45.2





^ permalink raw reply related	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH v10 5/9] gnu: simdjson: Update to 3.10.1.
  2024-09-22 23:04 ` [bug#71897] [PATCH v10 1/9] gnu: xdg-desktop-portal: Update to 1.18.4 dan
                     ` (2 preceding siblings ...)
  2024-09-22 23:04   ` [bug#71897] [PATCH v10 4/9] gnu: Add cppgir-for-telegram-desktop dan
@ 2024-09-22 23:04   ` dan
  2024-09-22 23:04   ` [bug#71897] [PATCH v10 6/9] gnu: Add cpm-cmake dan
                     ` (4 subsequent siblings)
  8 siblings, 0 replies; 98+ messages in thread
From: dan @ 2024-09-22 23:04 UTC (permalink / raw)
  To: 71897; +Cc: dan, Maxim Cournoyer, Liliana Marie Prikler, Sharlatan Hellseher

* gnu/packages/cpp.scm (simdjson): Update to 3.10.1.

Change-Id: I6711077e162bcfbf6702d521fdeec44e3b21f074
---
 gnu/packages/cpp.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 7d782c7ea6..c805dae825 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -2395,7 +2395,7 @@ (define-public python-jsonnet
 (define-public simdjson
   (package
     (name "simdjson")
-    (version "3.1.0")
+    (version "3.10.1")
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -2404,7 +2404,7 @@ (define-public simdjson
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "0q784bm8xbz3p782dw02cdds6m71wk3acy94vva8krc9g88142ws"))))
+                "1qv7lvls7x9aw6mlnwfgchbajsxh6qygp09wpkb2w6mjdbidmi0h"))))
     (build-system cmake-build-system)
     (arguments
      '(#:tests? #f                      ; tests require downloading dependencies
-- 
2.45.2





^ permalink raw reply related	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH v10 6/9] gnu: Add cpm-cmake.
  2024-09-22 23:04 ` [bug#71897] [PATCH v10 1/9] gnu: xdg-desktop-portal: Update to 1.18.4 dan
                     ` (3 preceding siblings ...)
  2024-09-22 23:04   ` [bug#71897] [PATCH v10 5/9] gnu: simdjson: Update to 3.10.1 dan
@ 2024-09-22 23:04   ` dan
  2024-09-22 23:04   ` [bug#71897] [PATCH v10 7/9] gnu: Add cpp-ada-url-parser dan
                     ` (3 subsequent siblings)
  8 siblings, 0 replies; 98+ messages in thread
From: dan @ 2024-09-22 23:04 UTC (permalink / raw)
  To: 71897; +Cc: dan, Maxim Cournoyer, Liliana Marie Prikler, Sharlatan Hellseher

* gnu/packages/cmake.scm (cpm-cmake): New variable.

Change-Id: I3938f1da1513010c8af6bedc2aa26635d43ca7ce
---
 gnu/packages/cmake.scm | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/gnu/packages/cmake.scm b/gnu/packages/cmake.scm
index 0a9e5ba907..4466c4b91d 100644
--- a/gnu/packages/cmake.scm
+++ b/gnu/packages/cmake.scm
@@ -13,6 +13,7 @@
 ;;; Copyright © 2020, 2023 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2021 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2024 John Kehayias <john.kehayias@protonmail.com>
+;;; Copyright © 2024 dan <i@dan.games>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -39,6 +40,7 @@ (define-module (gnu packages cmake)
   #:use-module (guix deprecation)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system cmake)
+  #:use-module (guix build-system copy)
   #:use-module (guix build-system emacs)
   #:use-module ((guix search-paths) #:select ($SSL_CERT_DIR $SSL_CERT_FILE))
   #:use-module (gnu packages)
@@ -520,3 +522,26 @@ (define-public tinycmmc
     (description "The tinycmmc package contains a small collection of reusable
 CMake modules.")
     (license license:zlib)))
+
+(define-public cpm-cmake
+  (package
+    (name "cpm-cmake")
+    (version "0.38.6")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/cpm-cmake/CPM.cmake")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1qbbhdq6cz2y7qfyy1k11i98d13s229r3phd5y3n5maq51ky8bgb"))))
+    (build-system copy-build-system)
+    (arguments
+     (list
+      #:install-plan #~'(("cmake/CPM.cmake" "lib/cmake/CPM.cmake"))))
+    (home-page "https://github.com/cpm-cmake/CPM.cmake")
+    (synopsis "Package manager for CMake")
+    (description "CPM.cmake is a cross-platform CMake script that adds
+dependency management capabilities to CMake.")
+    (license license:expat)))
-- 
2.45.2





^ permalink raw reply related	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH v10 7/9] gnu: Add cpp-ada-url-parser.
  2024-09-22 23:04 ` [bug#71897] [PATCH v10 1/9] gnu: xdg-desktop-portal: Update to 1.18.4 dan
                     ` (4 preceding siblings ...)
  2024-09-22 23:04   ` [bug#71897] [PATCH v10 6/9] gnu: Add cpm-cmake dan
@ 2024-09-22 23:04   ` dan
  2024-09-22 23:04   ` [bug#71897] [PATCH v10 8/9] gnu: Add libprisma-for-telegram-desktop dan
                     ` (2 subsequent siblings)
  8 siblings, 0 replies; 98+ messages in thread
From: dan @ 2024-09-22 23:04 UTC (permalink / raw)
  To: 71897; +Cc: dan, Maxim Cournoyer, Liliana Marie Prikler, Sharlatan Hellseher

* gnu/packages/cpp.scm (cpp-ada-url-parser): New variable.
(cpm-for-cpp-ada-url-parser): New variable.

Change-Id: I0b61c3b136e2781774c6a5e67eeb6b662e97dd88
---
 gnu/packages/cpp.scm | 57 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 57 insertions(+)

diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index c805dae825..187c0d4b45 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -3284,3 +3284,60 @@ (define-public tl-optional
 the std::optional for C++11/14/17, with support for monadic operations added in
 C++23.")
     (license license:cc0)))
+
+(define-public cpp-ada-url-parser
+  (package
+    (name "cpp-ada-url-parser")
+    (version "2.9.2")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/ada-url/ada")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0xvvjlia627ajl966gdxzy2b1j0jiimx7zx8ypmffwx0k6x72qam"))))
+    (build-system cmake-build-system)
+    (arguments
+     (list
+      #:configure-flags
+      #~(list "-DCPM_LOCAL_PACKAGES_ONLY=ON")
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'patch-deps
+            (lambda _
+              (substitute* "CMakeLists.txt"
+                (("cmake/CPM.cmake")
+                 (string-append #$(this-package-native-input
+                                   "cpm-cmake")
+                                "/lib/cmake/CPM.cmake"))
+                ;; We force CPM to find system packages rather than using git
+                ;; to download them.
+                (("Git_FOUND") "TRUE")
+                (("(simdjson@)[0-9.]*" _ simdjson)
+                 (string-append simdjson
+                                #$(package-version (this-package-native-input
+                                                    "simdjson")))))
+              (substitute* "tools/cli/CMakeLists.txt"
+                (("(VERSION\\s)[0-9.]*" _ a)
+                 (string-append a
+                                #$(package-version (this-package-native-input
+                                                    "cxxopts")))))))
+          (add-after 'patch-deps 'python-zipfile-disable-strict-timestamps
+            (lambda _
+              (substitute* "singleheader/amalgamate.py"
+                (("zipfile.ZIP_DEFLATED")
+                 "zipfile.ZIP_DEFLATED, strict_timestamps=False")))))))
+    (native-inputs (list cpm-cmake
+                         cxxopts
+                         fmt-10
+                         googletest
+                         python
+                         simdjson))
+    (home-page "https://github.com/ada-url/ada")
+    (synopsis "URL parser")
+    (description
+     "Ada is a fast and spec-compliant URL parser written in C++.
+Specification for URL parser can be found from the WHATWG website.")
+    (license license:gpl3+)))
-- 
2.45.2





^ permalink raw reply related	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH v10 8/9] gnu: Add libprisma-for-telegram-desktop.
  2024-09-22 23:04 ` [bug#71897] [PATCH v10 1/9] gnu: xdg-desktop-portal: Update to 1.18.4 dan
                     ` (5 preceding siblings ...)
  2024-09-22 23:04   ` [bug#71897] [PATCH v10 7/9] gnu: Add cpp-ada-url-parser dan
@ 2024-09-22 23:04   ` dan
  2024-09-22 23:04   ` [bug#71897] [PATCH v10 9/9] gnu: telegram-desktop: Update to 5.5.5 dan
  2024-09-26  5:26   ` [bug#71897] [PATCH v10 1/9] gnu: xdg-desktop-portal: Update to 1.18.4 Maxim Cournoyer
  8 siblings, 0 replies; 98+ messages in thread
From: dan @ 2024-09-22 23:04 UTC (permalink / raw)
  To: 71897; +Cc: dan, Maxim Cournoyer, Liliana Marie Prikler, Sharlatan Hellseher

* gnu/packages/telegram.scm (libprisma-for-telegram-desktop): New variable.

Change-Id: I855b463993654a8cad491c7b56c9581b3083f5e4
---
 gnu/packages/telegram.scm | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/gnu/packages/telegram.scm b/gnu/packages/telegram.scm
index 432d6f79a1..af16d4840b 100644
--- a/gnu/packages/telegram.scm
+++ b/gnu/packages/telegram.scm
@@ -400,6 +400,18 @@ (define cld3-for-telegram-desktop
     (base32
      "0ayrrhfdwrf4260h9fsirkhhfrcvc3qqnh6h9wj3ixij2lq0wwqb"))))
 
+(define libprisma-for-telegram-desktop
+  (origin
+   (method git-fetch)
+   (uri (git-reference
+         (url "https://github.com/desktop-app/libprisma")
+         (commit "23b0d70f9709da9b38561d5706891a134d18df76")))
+   (file-name
+    (git-file-name "libprisma-for-telegram-desktop" "5.3.2"))
+   (sha256
+    (base32
+     "0fg4x4ikj7f3706bmfvkwq4smxc98qr3cgpm25w48n4ys6wfgadg"))))
+
 (define-public telegram-desktop
   (package
     (name "telegram-desktop")
-- 
2.45.2





^ permalink raw reply related	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH v10 9/9] gnu: telegram-desktop: Update to 5.5.5.
  2024-09-22 23:04 ` [bug#71897] [PATCH v10 1/9] gnu: xdg-desktop-portal: Update to 1.18.4 dan
                     ` (6 preceding siblings ...)
  2024-09-22 23:04   ` [bug#71897] [PATCH v10 8/9] gnu: Add libprisma-for-telegram-desktop dan
@ 2024-09-22 23:04   ` dan
  2024-09-26  5:26   ` [bug#71897] [PATCH v10 1/9] gnu: xdg-desktop-portal: Update to 1.18.4 Maxim Cournoyer
  8 siblings, 0 replies; 98+ messages in thread
From: dan @ 2024-09-22 23:04 UTC (permalink / raw)
  To: 71897; +Cc: dan, Maxim Cournoyer, Liliana Marie Prikler, Sharlatan Hellseher

* 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
---
 gnu/local.mk                                  |   2 +
 ...gram-desktop-allow-disable-libtgvoip.patch |   6 +-
 .../telegram-desktop-unbundle-cppgir.patch    |  95 +++++++++++++++
 .../telegram-desktop-unbundle-gsl.patch       |  31 +++++
 ...or-telegram-desktop-unbundle-libsrtp.patch |   7 +-
 gnu/packages/telegram.scm                     | 112 +++++++++++-------
 6 files changed, 205 insertions(+), 48 deletions(-)
 create mode 100644 gnu/packages/patches/telegram-desktop-unbundle-cppgir.patch
 create mode 100644 gnu/packages/patches/telegram-desktop-unbundle-gsl.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 802f4be4fe..dc6c7294e7 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2196,6 +2196,8 @@ dist_patch_DATA =						\
   %D%/packages/patches/texinfo-headings-single.patch		\
   %D%/packages/patches/texinfo-5-perl-compat.patch		\
   %D%/packages/patches/telegram-desktop-allow-disable-libtgvoip.patch   \
+  %D%/packages/patches/telegram-desktop-unbundle-cppgir.patch   \
+  %D%/packages/patches/telegram-desktop-unbundle-gsl.patch      \
   %D%/packages/patches/telegram-purple-adjust-test.patch	\
   %D%/packages/patches/teuchos-remove-duplicate-using.patch	\
   %D%/packages/patches/texi2html-document-encoding.patch	\
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()
diff --git a/gnu/packages/telegram.scm b/gnu/packages/telegram.scm
index af16d4840b..084b14088a 100644
--- a/gnu/packages/telegram.scm
+++ b/gnu/packages/telegram.scm
@@ -5,6 +5,7 @@
 ;;; Copyright © 2023 Lu Hui <luhux76@gmail.com>
 ;;; Copyright © 2023 Camilo Q.S. (Distopico) <distopico@riseup.net>
 ;;; Copyright © 2024 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2024 dan <i@dan.games>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -28,6 +29,7 @@ (define-module (gnu packages telegram)
   #:use-module (gnu packages assembly)
   #:use-module (gnu packages audio)
   #:use-module (gnu packages autotools)
+  #:use-module (gnu packages boost)
   #:use-module (gnu packages check)
   #:use-module (gnu packages cmake)
   #:use-module (gnu packages compression)
@@ -44,7 +46,6 @@ (define-module (gnu packages telegram)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages hunspell)
   #:use-module (gnu packages image)
-  #:use-module (gnu packages jemalloc)
   #:use-module (gnu packages kde-frameworks)
   #:use-module (gnu packages language)
   #:use-module (gnu packages libevent)
@@ -82,11 +83,11 @@ (define-module (gnu packages telegram)
   #:use-module (guix build-system python)
   #:use-module (guix build-system qt))
 
-(define %telegram-version "4.8.1")
+(define %telegram-version "5.5.5")
 
 (define libyuv-for-telegram-desktop
-  (let ((commit "77c2121f7e6b8e694d6e908bbbe9be24214097da")
-        (revision "2439"))
+  (let ((commit "04821d1e7d60845525e8db55c7bcd41ef5be9406")
+        (revision "2440"))
     (origin
       (method git-fetch)
       (uri (git-reference
@@ -97,79 +98,84 @@ (define libyuv-for-telegram-desktop
                   (git-version "0" revision commit)))
       (sha256
        (base32
-        "1b4k8yskr9ffl5k8s9i0af1gn1pavsfixla26vh8bij69rdr7f9c")))))
+        "1fsvc0f8mckrdzys8lnlnbw6676mjamm6p3ghr2h9liqfa83s6wg")))))
 
 (define cmake-helpers-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/cmake_helpers.git")
-          (commit "6ab5543b3dd1e40979d258e46d03376931b6c37b")))
+          (commit "05a7db2e2d2a59ecf42483debca4944d09154b5b")))
     (file-name
      (git-file-name "cmake-helpers-for-telegram-desktop" %telegram-version))
+    (patches
+     ;; https://github.com/desktop-app/cmake_helpers/pull/320
+     ;; https://github.com/desktop-app/cmake_helpers/pull/305
+     (search-patches "telegram-desktop-unbundle-gsl.patch"
+                     "telegram-desktop-unbundle-cppgir.patch"))
     (sha256
      (base32
-      "0y96mvzs113zh8bdw1h3i6l0pgwg93rigrday8kfdg4magz686k6"))))
+      "1gapyk5a8rsl8vigbz0l8h9858f2lkhkd2pjy72zivp0mrq8w0hr"))))
 
 (define codegen-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/codegen.git")
-          (commit "1a969faa0afb29d53af03e530775eccdfb8433f1")))
+          (commit "0af136124083369073b8fdaf45f0816fd2b10bad")))
     (file-name
      (git-file-name "codegen-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "1xmw8dfm51p5g20rlmzqnr72a14ngyxwq09an8clf1v5s6mmwvak"))))
+      "057bwn9smrgnyfb1vraf50ihbkhjc4d72msl7vnbqc4h5sg8dav9"))))
 
 (define lib-base-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_base.git")
-          (commit "fd9adb30ee906ea02c125eaa58fcfae773fdc677")))
+          (commit "547e7f2914d9b5548dd17e70a3a7bf5d6606afc3")))
     (file-name
      (git-file-name "lib-base-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "1m760mcfvgzia53nrs6wvjn353jvzlzln7c9fkx2dhpkigiynz83"))))
+      "0sgm2prhd4fw89afh62k7i4i7mj60n170kqz50b0mad927zngxvn"))))
 
 (define lib-crl-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_crl.git")
-          (commit "3d7e1e1f1321c3defd21c01882d674e485ecd8df")))
+          (commit "c1d6b0273653095b10b4d0f4f7c30b614b690fd5")))
     (file-name
      (git-file-name "lib-crl-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "06mzafnjpfr5ih297dh7bxm6bgpg0wy0gv2r2732n5szyrg9sdl6"))))
+      "1sxn3qccsfbx1289z0fdrb4cggs16a8r75ic6wi81c6lnkrdi3wl"))))
 
 (define lib-lottie-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_lottie.git")
-          (commit "3e9c2f1026e4b5aa3202fca4cc67ece36c7cebb2")))
+          (commit "1a700e5a0d7c3e2f617530354ff2a47c5c72bb4a")))
     (file-name
      (git-file-name "lib-lottie-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "0l57ibfij9xm4ww4s9cc63q1x8xzpc6ablwaji1krrn3xxksqdd4"))))
+      "18w35sz6k3wcv07v0szx3avpfdl0rjby6yqm1fzmx7fqw2jn6wpl"))))
 
 (define lib-qr-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_qr.git")
-          (commit "501f4c3502fd872ab4d777df8911bdac32de7c48")))
+          (commit "6fdf60461444ba150e13ac36009c0ffce72c4c83")))
     (file-name
      (git-file-name "lib-qr-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "0hmwqj7a9vcy8wq7pd1qprl68im3zl5f1wzcn2zzk2wvi0389k9f"))))
+      "1i5n3qvjkf4nv8k75cc0a71xyvpklc4nzg4k2zsfr2pxk0cy7hkw"))))
 
 (define lib-rpl-for-telegram-desktop
   (origin
@@ -188,88 +194,88 @@ (define lib-spellcheck-for-telegram-desktop
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_spellcheck.git")
-          (commit "ae89fefd239ecc47d4dab7ba29f9e230376a57d3")))
+          (commit "e76981e133a1d29f3ceb557f53850a8d822f439a")))
     (file-name
      (git-file-name "lib-spellcheck-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "147xbbcza5q4wcdipk5jplajzkc48971kg2s7qv5jlz33sxkw1lq"))))
+      "0dslsy3d6gmxaj6yv49zjgl2b2mh75j7fpnbynglr02h3m2fdj96"))))
 
 (define lib-storage-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_storage.git")
-          (commit "839609369d04615475cb1518636de3619106a917")))
+          (commit "ccdc72548a5065b5991b4e06e610d76bc4f6023e")))
     (file-name
      (git-file-name "lib-storage-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "1l26h2fmqp9dcpr6pfvdd5sjb68j7yh0ms2lnr8na7jf5xqmkwwm"))))
+      "0b11ix95dzpkz335q0a6b5yg8qhj33s4fgj9ppl37pszcqq1j3wi"))))
 
 (define lib-tl-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_tl.git")
-          (commit "36fb95c4de1339d2c8921ad6b2911858c3d0e0fa")))
+          (commit "237cbeb9d1c637759f89a508c1d854caf16e1984")))
     (file-name
      (git-file-name "lib-tl-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "03rngnssnqwr7ad05qn64mwgji5fb0r3fp5ybkf951p8phr1jvzk"))))
+      "1ji3gypy4yf9knsgylnyz5gc2kii7lls5ymj1rkf0daixdz931cm"))))
 
 (define lib-ui-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_ui.git")
-          (commit "37531086ec21a8569deddedb11b402f8a3157b90")))
+          (commit "c4e3a08e6fb90a6174c8b592d9eb747dd4d3f9c5")))
     (file-name
      (git-file-name "lib-ui-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "0l4baalwdiwcwzn3wgrbyiaryi70lswillbpkzcjpavaa2pjg6b0"))))
+      "1lbfy4fbb52lklfwn6kxny3mwl653r4vc80k922kwjfgbcy9c25f"))))
 
 (define lib-webrtc-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_webrtc.git")
-          (commit "b68a95ad4d1ae9a1827671100a7fd76cbe448c3f")))
+          (commit "8751e27d50d2f26b5d20673e5ddba38e90953570")))
     (file-name
      (git-file-name "lib-webrtc-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "1c8jwdnn26n13yp0rp0l71q6xlxa6wp3cspbm3pnghw964jwgp3z"))))
+      "0f05pqb83qckghzlhnwqbi9qfi9xw7qsv8jampl4qyaq9q0w9p20"))))
 
 (define lib-webview-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/desktop-app/lib_webview.git")
-          (commit "f632fc84cbc62ae8abbbd05f81d472757a337c11")))
+          (commit "2de655f58dc327e40d5d9df71300a0d0fdb39c9f")))
     (file-name
      (git-file-name "lib-webview-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "0idsfkxq7l9kgyrhifys5l4jkhvbyxkgkp0qdq9218h7g0ldw84i"))))
+      "12vrif0685vb068mj5sd7cknav1n66jysp18j21nlp0am9pw7ydj"))))
 
 (define tgcalls-for-telegram-desktop
   (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/TelegramMessenger/tgcalls.git")
-          (commit "2e2797648aac2588e7fe479c2e8b4455ec65c5e6")))
+          (commit "9bf4065ea00cbed5e63cec348457ed13143459d0")))
     (file-name
      (git-file-name "tgcalls-for-telegram-desktop" %telegram-version))
     (sha256
      (base32
-      "193m2gkvipijqbfd6a8mhg9nd63wlnshzgspk3pip57vk21l709z"))))
+      "1p563a11w8jrid96xf03dg6j39ciz28n5f4r6g28lxhiphbqzfym"))))
 
 (define-public webrtc-for-telegram-desktop
-  (let ((commit "0532942ac6176a66ef184fb728a4cbb02958fc0b")
-        (revision "389"))
+  (let ((commit "c425281150317753d7bc5182c6572abe20f9a784")
+        (revision "456"))
     (hidden-package
      (package
        (name "webrtc-for-telegram-desktop")
@@ -285,7 +291,7 @@ (define-public webrtc-for-telegram-desktop
           (file-name
            (git-file-name name version))
           (sha256
-           (base32 "0fary99yl1ddk5zjpfy0pyb5brd268j41plcnvv9qjyf0wj9hf2k"))
+           (base32 "1fj48iq56awnrckncy1qc3zhdzifl725hbb6an7wg2v3zmagvrwn"))
           (patches
            (search-patches
             ;; https://github.com/desktop-app/tg_owt/pull/123
@@ -407,7 +413,7 @@ (define libprisma-for-telegram-desktop
          (url "https://github.com/desktop-app/libprisma")
          (commit "23b0d70f9709da9b38561d5706891a134d18df76")))
    (file-name
-    (git-file-name "libprisma-for-telegram-desktop" "5.3.2"))
+    (git-file-name "libprisma-for-telegram-desktop" %telegram-version))
    (sha256
     (base32
      "0fg4x4ikj7f3706bmfvkwq4smxc98qr3cgpm25w48n4ys6wfgadg"))))
@@ -427,7 +433,7 @@ (define-public telegram-desktop
        (file-name
         (git-file-name name version))
        (sha256
-        (base32 "0g47ffamh1csp79yzkv28v3qjkhjacj0c7pjf53n1ks80j5hc2j0"))
+        (base32 "12fdybn085s3i3a8hwi0bmdns7jxvg0k662n04jgffirgsz8n54m"))
        (patches
         (search-patches
          ;; https://github.com/telegramdesktop/tdesktop/pull/24126
@@ -468,7 +474,10 @@ (define-public telegram-desktop
               "-DTDESKTOP_DISABLE_LEGACY_TGVOIP=ON"
               "-DDESKTOP_APP_DISABLE_CRASH_REPORTS=ON"
               "-DDESKTOP_APP_DISABLE_AUTOUPDATE=ON"
-              "-DDESKTOP_APP_USE_PACKAGED_RLOTTIE=ON")
+              "-DDESKTOP_APP_USE_PACKAGED_RLOTTIE=ON"
+              ;; Enabling jemalloc causes SIGSEGV.  This probably happened
+              ;; after upgrading to glibc 2.39.
+              "-DDESKTOP_APP_DISABLE_JEMALLOC=ON")
            #:phases
            #~(modify-phases %standard-phases
                (add-after 'unpack 'unpack-additional-sources
@@ -493,21 +502,45 @@ (define-public telegram-desktop
                       ("Telegram/lib_webrtc" #$lib-webrtc-for-telegram-desktop)
                       ("Telegram/lib_webview" #$lib-webview-for-telegram-desktop)
                       ("Telegram/ThirdParty/cld3" #$cld3-for-telegram-desktop)
+                      ("Telegram/ThirdParty/libprisma" #$libprisma-for-telegram-desktop)
                       ("Telegram/ThirdParty/tgcalls" #$tgcalls-for-telegram-desktop)))))
+               (add-after 'unpack-additional-sources 'patch-gir-ignore-paths
+                 (lambda _
+                   (substitute* "cmake/external/glib/generate_cppgir.cmake"
+                     (("\\$\\{cmake_helpers_loc\\}/external/glib/cppgir/data")
+                      (string-append #$(this-package-input "cppgir") "/share/cppgir")))))
+               (add-after 'unpack-additional-sources 'use-system-xdg-desktop-portal
+                 (lambda _
+                   (substitute* (list "Telegram/CMakeLists.txt"
+                                      "Telegram/lib_base/CMakeLists.txt")
+                     (("\\$\\{third_party_loc\\}/xdg-desktop-portal/data")
+                      (string-append #$(this-package-native-input "xdg-desktop-portal")
+                                     "/share/dbus-1/interfaces")))))
+               ;; Remove this constexpr keyword to make it compatible with gcc-final.
+               (add-after 'use-system-xdg-desktop-portal 'patch-libwebview
+                 (lambda _
+                   (substitute* "Telegram/lib_webview/webview/webview_interface.h"
+                     (("constexpr ") ""))))
                (add-after 'install 'glib-or-gtk-compile-schemas
                  (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-compile-schemas))
                (add-after 'glib-or-gtk-compile-schemas 'glib-or-gtk-wrap
                  (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap)))))
     (native-inputs
-     (list `(,glib "bin")
+     (list cpp-ada-url-parser
+           `(,glib "bin")
+           gobject-introspection
            `(,gtk+ "bin")
            pkg-config
-           python-wrapper))
+           python-wrapper
+           xdg-desktop-portal))
     (inputs
      (list abseil-cpp-cxxstd17
            alsa-lib
+           boost
            c++-gsl
+           cppgir-for-telegram-desktop
            crc32c
+           expected-lite
            fcitx-qt5
            fcitx5-qt
            ffmpeg
@@ -516,7 +549,6 @@ (define-public telegram-desktop
            gtk+
            hime
            hunspell
-           jemalloc
            kcoreaddons-5
            kimageformats-5
            libdispatch
-- 
2.45.2





^ permalink raw reply related	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH v8 8/8] gnu: telegram-desktop: Update to 5.5.5.
  2024-09-22  4:14       ` dan
@ 2024-09-24  5:59         ` Maxim Cournoyer
  0 siblings, 0 replies; 98+ messages in thread
From: Maxim Cournoyer @ 2024-09-24  5:59 UTC (permalink / raw)
  To: dan; +Cc: Sharlatan Hellseher, Liliana Marie Prikler, 71897

Hi Dan,

dan <i@dan.games> writes:

[...]

> The upstream pull request URLs were added as comments in the package
> definition.  Do you think this is sufficient? Or do you suggest me
> adding them in the patch file directly, or in the commit message?

I'd suggest adding the source 6formation in the patch files directly; I
think 'guix lint' looks if there's some comment/url there, and it can't
be missed when looking to update the patch.

-- 
Thanks,
Maxim




^ permalink raw reply	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH v8 8/8] gnu: telegram-desktop: Update to 5.5.5.
  2024-09-22  4:09       ` dan
@ 2024-09-24  6:00         ` Maxim Cournoyer
  0 siblings, 0 replies; 98+ messages in thread
From: Maxim Cournoyer @ 2024-09-24  6:00 UTC (permalink / raw)
  To: dan; +Cc: Sharlatan Hellseher, Liliana Marie Prikler, 71897

Hi Dan,

dan <i@dan.games> writes:

[...]

> In gcc-12, the code looks like this:
>
>   template<typename _CharT>
>     _GLIBCXX20_CONSTEXPR
>     inline
>     typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, 
>     bool>::__type
>     operator==(const basic_string<_CharT>& __lhs,
> 	       const basic_string<_CharT>& __rhs) 
> 	       _GLIBCXX_NOEXCEPT
>     { return (__lhs.size() == __rhs.size()
> 	      && !std::char_traits<_CharT>::compare(__lhs.data(), 
> 	      __rhs.data(),
> 						    __lhs.size())); 
> 						    }
>
> Which indeed has the constexpr.
>
> But as I explained in previous reply, I failed at using a newer 
> version of gcc.  Thus, I think trivially remove the constexpr from 
> telegram-desktop's source is the easiest fix here.

I see.  I thisk it'd be nice if a short summary of this was added to a
comment in the phase patching out the constexpr keyword.

-- 
Thanks,
Maxim




^ permalink raw reply	[flat|nested] 98+ messages in thread

* bug#71897: [PATCH v5 6/6] gnu: telegram-desktop: Update to 5.2.3.
  2024-07-27 15:56     ` Liliana Marie Prikler
@ 2024-09-26  5:24       ` Maxim Cournoyer
  0 siblings, 0 replies; 98+ messages in thread
From: Maxim Cournoyer @ 2024-09-26  5:24 UTC (permalink / raw)
  To: Liliana Marie Prikler; +Cc: 71897-done, dan

Hi,

Liliana Marie Prikler <liliana.prikler@gmail.com> writes:

> Am Sonntag, dem 14.07.2024 um 23:49 +0800 schrieb dan:
>> * 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.
> This is minor, but the ChangeLog format uses closing parentheses before
> continuation lines.
>> (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.2.3.
>> [#:phases]<unpack-additional-sources>: Add libprisma-for-telegram-
>> desktop.
>> <patch-gir-ignore-paths>: New phase.
>> <use-system-xdg-desktop-portal>: New phase.
>> [native-inputs]: Add gobject-introspection and xdg-desktop-portal.
>> [inputs]: Add boost, cppgir-for-telegram-desktop, expected-lite.
>> 
>> Change-Id: I78df3434a2cd04afc54107b7fecd5e5a8df85564
> Can anyone confirm, that this patch builds?  CI didn't build it and ld
> died to OOM on my machine.

Confirmed. I've now pushed the series and added commit 404dbd894c ("gnu:
telegraph-desktop: Fix exhuberant build memory requirements.") on top,
which should help guarding against OOMing in the future.

-- 
Thanks,
Maxim




^ permalink raw reply	[flat|nested] 98+ messages in thread

* [bug#71897] [PATCH v10 1/9] gnu: xdg-desktop-portal: Update to 1.18.4.
  2024-09-22 23:04 ` [bug#71897] [PATCH v10 1/9] gnu: xdg-desktop-portal: Update to 1.18.4 dan
                     ` (7 preceding siblings ...)
  2024-09-22 23:04   ` [bug#71897] [PATCH v10 9/9] gnu: telegram-desktop: Update to 5.5.5 dan
@ 2024-09-26  5:26   ` Maxim Cournoyer
  8 siblings, 0 replies; 98+ messages in thread
From: Maxim Cournoyer @ 2024-09-26  5:26 UTC (permalink / raw)
  To: dan; +Cc: 71897-done, Sharlatan Hellseher, Liliana Marie Prikler

Hi Dan and Liliana,

I've applied and built (also dependents) this series, and it looked
fine. I've lightly edited the telegraph-desktop commit (moved comment
inside patch and clarified the constrexpr one).

Telegraph is now updated on master, with commit 404dbd894c69c94b483c6139d2a39b1c1eaddf36.

Closing.

-- 
Thanks,
Maxim




^ permalink raw reply	[flat|nested] 98+ messages in thread

end of thread, other threads:[~2024-09-26  5:28 UTC | newest]

Thread overview: 98+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-02  5:18 [bug#71897] [PATCH 1/2] gnu: Add cppgir dan
2024-07-02  5:26 ` [bug#71897] [PATCH 2/2] gnu: telegram-desktop: Update to 5.1.7 dan
2024-07-02 11:09 ` [bug#71897] [PATCH 1/2] gnu: Add cppgir Maxim Cournoyer
2024-07-02 13:17 ` [bug#71897] [PATCH 1/3] " dan
2024-07-02 13:17   ` [bug#71897] [PATCH 2/3] gnu: xdg-desktop-portal: Update to 1.18.4 dan
2024-07-02 13:17   ` [bug#71897] [PATCH 3/3] gnu: telegram-desktop: Update to 5.2.1 dan
2024-07-02 16:58   ` [bug#71897] [PATCH 1/3] gnu: Add cppgir Liliana Marie Prikler
2024-07-03 13:22 ` [bug#71897] [PATCH v3 1/2] gnu: xdg-desktop-portal: Update to 1.18.4 dan
2024-07-03 13:22   ` [bug#71897] [PATCH v3 2/2] gnu: telegram-desktop: Update to 5.2.2 dan
2024-07-03 17:06     ` Liliana Marie Prikler
2024-07-03 17:18       ` dan
2024-07-03 17:22         ` dan
2024-07-03 18:21           ` Liliana Marie Prikler
2024-07-03 17:01   ` [bug#71897] [PATCH v3 1/2] gnu: xdg-desktop-portal: Update to 1.18.4 Liliana Marie Prikler
2024-07-07 15:00 ` [bug#71897] [PATCH 1/5] " dan
2024-07-07 15:00   ` [bug#71897] [PATCH 2/5] gnu: xdg-desktop-portal: Update input style dan
2024-07-09  2:14     ` Maxim Cournoyer
2024-07-07 15:00   ` [bug#71897] [PATCH 3/5] gnu: Add cppgir-for-telegram-desktop dan
2024-07-09  2:25     ` Maxim Cournoyer
2024-07-09  3:07       ` dan
2024-07-10  1:31         ` Maxim Cournoyer
2024-07-07 15:00   ` [bug#71897] [PATCH 4/5] gnu: Add libprisma-for-telegram-desktop dan
2024-07-09  2:29     ` Maxim Cournoyer
     [not found]       ` <a1177ffa-90ba-483e-9c60-2aebf6e5dc4c@dan.games>
2024-07-09 11:54         ` Maxim Cournoyer
2024-07-07 15:00   ` [bug#71897] [PATCH 5/5] gnu: telegram-desktop: Update to 5.2.3 dan
2024-07-09  2:35     ` Maxim Cournoyer
2024-07-09  2:14   ` [bug#71897] [PATCH 1/5] gnu: xdg-desktop-portal: Update to 1.18.4 Maxim Cournoyer
2024-07-14 15:48 ` [bug#71897] [PATCH v5 1/6] " dan
2024-07-14 15:48   ` [bug#71897] [PATCH v5 2/6] gnu: xdg-desktop-portal: Update input style dan
2024-07-14 15:49   ` [bug#71897] [PATCH v5 3/6] gnu: Add cppgir dan
2024-07-14 15:49   ` [bug#71897] [PATCH v5 4/6] gnu: Add cppgir-for-telegram-desktop dan
2024-07-14 15:49   ` [bug#71897] [PATCH v5 5/6] gnu: Add libprisma-for-telegram-desktop dan
2024-07-14 15:49   ` [bug#71897] [PATCH v5 6/6] gnu: telegram-desktop: Update to 5.2.3 dan
2024-07-27 15:56     ` Liliana Marie Prikler
2024-09-26  5:24       ` bug#71897: " Maxim Cournoyer
2024-08-04 14:30 ` [bug#71897] [PATCH v6 0/7] gnu: telegram-desktop: Update to 5.3.2 dan
2024-08-04 14:30   ` [bug#71897] [PATCH v6 1/7] gnu: xdg-desktop-portal: Update to 1.18.4 dan
2024-08-04 14:30   ` [bug#71897] [PATCH v6 2/7] gnu: xdg-desktop-portal: Update input style dan
2024-08-04 14:30   ` [bug#71897] [PATCH v6 3/7] gnu: Add cppgir dan
2024-08-04 14:30   ` [bug#71897] [PATCH v6 4/7] gnu: Add cppgir-for-telegram-desktop dan
2024-08-04 14:30   ` [bug#71897] [PATCH v6 5/7] gnu: Add ada dan
2024-08-04 14:48     ` Liliana Marie Prikler
2024-08-04 14:30   ` [bug#71897] [PATCH v6 6/7] gnu: Add libprisma-for-telegram-desktop dan
2024-08-04 14:30   ` [bug#71897] [PATCH v6 7/7] gnu: telegram-desktop: Update to 5.3.2 dan
2024-09-18  9:58 ` [bug#71897] [PATCH 0/3] gnu: telegram-desktop: Update to 5.2.1 Sharlatan Hellseher
2024-09-21 10:35   ` dan
2024-09-21 14:05     ` Liliana Marie Prikler
2024-09-21 11:34 ` [bug#71897] [PATCH v7 1/9] gnu: xdg-desktop-portal: Update to 1.18.4 dan
2024-09-21 11:34   ` [bug#71897] [PATCH v7 2/9] gnu: xdg-desktop-portal: Update input style dan
2024-09-21 11:34   ` [bug#71897] [PATCH v7 3/9] gnu: Add cppgir dan
2024-09-21 11:34   ` [bug#71897] [PATCH v7 4/9] gnu: Add cppgir-for-telegram-desktop dan
2024-09-21 11:34   ` [bug#71897] [PATCH v7 5/9] gnu: simdjson: Update to 3.10.1 dan
2024-09-21 11:34   ` [bug#71897] [PATCH v7 6/9] gnu: Add ada dan
2024-09-21 11:34   ` [bug#71897] [PATCH v7 7/9] gnu: Add libprisma-for-telegram-desktop dan
2024-09-21 11:34   ` [bug#71897] [PATCH v7 8/9] gnu: telegram-desktop: Update to 5.5.5 dan
2024-09-21 14:18     ` Liliana Marie Prikler
2024-09-21 11:34   ` [bug#71897] [PATCH v7 9/9] gnu: telegram-desktop: Disable jemalloc dan
2024-09-21 14:15     ` Liliana Marie Prikler
2024-09-21 14:14   ` [bug#71897] [PATCH v7 1/9] gnu: xdg-desktop-portal: Update to 1.18.4 Liliana Marie Prikler
2024-09-21 14:53 ` [bug#71897] [PATCH v8 1/8] " dan
2024-09-21 14:53   ` [bug#71897] [PATCH v8 2/8] gnu: xdg-desktop-portal: Improve style dan
2024-09-21 14:53   ` [bug#71897] [PATCH v8 3/8] gnu: Add cppgir dan
2024-09-22  3:04     ` Maxim Cournoyer
2024-09-21 14:53   ` [bug#71897] [PATCH v8 4/8] gnu: Add cppgir-for-telegram-desktop dan
2024-09-21 14:53   ` [bug#71897] [PATCH v8 5/8] gnu: simdjson: Update to 3.10.1 dan
2024-09-22  2:58     ` Maxim Cournoyer
2024-09-21 14:53   ` [bug#71897] [PATCH v8 6/8] gnu: Add cpp-ada-url-parser dan
2024-09-22  3:13     ` Maxim Cournoyer
2024-09-22  3:37       ` dan
2024-09-22  6:13         ` Maxim Cournoyer
2024-09-21 14:53   ` [bug#71897] [PATCH v8 7/8] gnu: Add libprisma-for-telegram-desktop dan
2024-09-22  3:04     ` Maxim Cournoyer
2024-09-21 14:53   ` [bug#71897] [PATCH v8 8/8] gnu: telegram-desktop: Update to 5.5.5 dan
2024-09-22  3:22     ` Maxim Cournoyer
2024-09-22  3:51       ` dan
2024-09-22  4:09       ` dan
2024-09-24  6:00         ` Maxim Cournoyer
2024-09-22  4:14       ` dan
2024-09-24  5:59         ` Maxim Cournoyer
2024-09-22 11:37 ` [bug#71897] [PATCH v9 1/8] gnu: xdg-desktop-portal: Update to 1.18.4 dan
2024-09-22 11:37   ` [bug#71897] [PATCH v9 2/8] gnu: xdg-desktop-portal: Improve style dan
2024-09-22 11:37   ` [bug#71897] [PATCH v9 3/8] gnu: Add cppgir dan
2024-09-22 11:37   ` [bug#71897] [PATCH v9 4/8] gnu: Add cppgir-for-telegram-desktop dan
2024-09-22 11:37   ` [bug#71897] [PATCH v9 5/8] gnu: simdjson: Update to 3.10.1 dan
2024-09-22 11:37   ` [bug#71897] [PATCH v9 6/8] gnu: Add cpp-ada-url-parser dan
2024-09-22 21:31     ` Liliana Marie Prikler
2024-09-22 11:37   ` [bug#71897] [PATCH v9 7/8] gnu: Add libprisma-for-telegram-desktop dan
2024-09-22 11:37   ` [bug#71897] [PATCH v9 8/8] gnu: telegram-desktop: Update to 5.5.5 dan
2024-09-22 23:04 ` [bug#71897] [PATCH v10 1/9] gnu: xdg-desktop-portal: Update to 1.18.4 dan
2024-09-22 23:04   ` [bug#71897] [PATCH v10 2/9] gnu: xdg-desktop-portal: Improve style dan
2024-09-22 23:04   ` [bug#71897] [PATCH v10 3/9] gnu: Add cppgir dan
2024-09-22 23:04   ` [bug#71897] [PATCH v10 4/9] gnu: Add cppgir-for-telegram-desktop dan
2024-09-22 23:04   ` [bug#71897] [PATCH v10 5/9] gnu: simdjson: Update to 3.10.1 dan
2024-09-22 23:04   ` [bug#71897] [PATCH v10 6/9] gnu: Add cpm-cmake dan
2024-09-22 23:04   ` [bug#71897] [PATCH v10 7/9] gnu: Add cpp-ada-url-parser dan
2024-09-22 23:04   ` [bug#71897] [PATCH v10 8/9] gnu: Add libprisma-for-telegram-desktop dan
2024-09-22 23:04   ` [bug#71897] [PATCH v10 9/9] gnu: telegram-desktop: Update to 5.5.5 dan
2024-09-26  5:26   ` [bug#71897] [PATCH v10 1/9] gnu: xdg-desktop-portal: Update to 1.18.4 Maxim Cournoyer

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).