Subject: [bug#71897] [PATCH 5/5] gnu: telegram-desktop: Update to 5.2.3.

From: Maxim Cournoyer <[email-masked]>
Date: Mon, 08 Jul 2024 22:35:21 -0400

Hello!

dan <[email-masked]> 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