From patchwork Sun Sep 11 10:12:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Hilton Chain X-Patchwork-Id: 42469 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id BABA227BBEA; Sun, 11 Sep 2022 11:14:09 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FROM_SUSPICIOUS_NTLD,MAILING_LIST_MULTI,PDS_OTHER_BAD_TLD, SPF_HELO_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id CD74727BBE9 for ; Sun, 11 Sep 2022 11:14:08 +0100 (BST) Received: from localhost ([::1]:43130 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oXJyZ-0006m7-U6 for patchwork@mira.cbaines.net; Sun, 11 Sep 2022 06:14:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46302) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oXJxX-0006EO-Cd for guix-patches@gnu.org; Sun, 11 Sep 2022 06:13:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:52093) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oXJxW-0007i3-U3 for guix-patches@gnu.org; Sun, 11 Sep 2022 06:13:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oXJxW-0007Th-QB for guix-patches@gnu.org; Sun, 11 Sep 2022 06:13:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57675] [PATCH v3 5/7] gnu: telegram-desktop: Update to 4.1.1. Resent-From: Hilton Chain Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 11 Sep 2022 10:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57675 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57675@debbugs.gnu.org Cc: Liliana Marie Prikler Received: via spool by 57675-submit@debbugs.gnu.org id=B57675.166289118028717 (code B ref 57675); Sun, 11 Sep 2022 10:13:02 +0000 Received: (at 57675) by debbugs.gnu.org; 11 Sep 2022 10:13:00 +0000 Received: from localhost ([127.0.0.1]:40789 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oXJxU-0007T6-55 for submit@debbugs.gnu.org; Sun, 11 Sep 2022 06:13:00 -0400 Received: from mail.boiledscript.com ([144.168.59.46]:38736) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oXJxR-0007Sq-Qp for 57675@debbugs.gnu.org; Sun, 11 Sep 2022 06:12:58 -0400 Date: Sun, 11 Sep 2022 18:12:36 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ultrarare.space; s=dkim; t=1662891172; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=W5aciK/CIF757LyKbnuruH/kJdEVYbjJX4hn9fFR3LA=; b=tx7mbrY7bMn6/pmcGr8Nqn3dXFqhfb+4qXIMbIcX6Wx9iPztG4Jvj40wDeLn7fRRHqnHec 90oX0sNSST/6jvn4mTdTSROCJ2++kOISLjIaI8KzELk3iiM3PU07A71Csjc7N5BBt4w5QP 8hnpqtzEKVJem9JZdtrP9XYyoPPUmKnyJa1yl6Ip/KgF42pCuin1iXcUPc5MsualwHN2GU HnJKzD6jCU0mjOcI6qeEOC5wI6PBae9UTKrcnXNMT+TrOIWrbviey5gvAgFM6RHVaGOIzq +5WPLg9tTx+9t67A2D9xhJLzry+2sKgv7w7BDiSLlIM7ZPOkFdyvvJEa8BAjqQ== Message-ID: In-Reply-To: References: MIME-Version: 1.0 Authentication-Results: mail.boiledscript.com; auth=pass smtp.mailfrom=hako@ultrarare.space X-Spamd-Bar: / X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: Hilton Chain X-ACL-Warn: , Hilton Chain via Guix-patches X-Patchwork-Original-From: Hilton Chain via Guix-patches via From: Hilton Chain X-getmail-retrieved-from-mailbox: Patches * gnu/packages/patches/telegram-desktop-fix-gcc12-cstdint.patch: New file. * gnu/packages/telegram.scm (telegram-desktop): Update to 4.1.1. [patches]: Add telegram-desktop-fix-gcc12-cstdint.patch. [snippet]: Sync with source tree. Add libtgvoip, rlottie and dispatch. [arguments]: Use App ID from Telegram's official Snap builds. Comment out to default configurations. Drop unneeded phases. [native-inputs]: Drop cmake-shared, extra-cmake-modules, glib:bin, gtk+:bin and qttools-5. [inputs]: Drop libexpected, fcitx-qt5, fcitx5-qt, glib, hime, gtk+, kwayland, libx11, catch-framework2, materialdecoration, nimf, qt5ct, libdbusmenu-qt, qtbase-5, libtgvoip-for-telegram-desktop and rlottie-for-telegram-desktop. Add abseil-cpp-cxxstd17, qt5compat, qtbase, qtwayland, wayland, webkitgtk and libvpx. [propageted-inputs]: Drop dconf. [license]: Sync with source tree. * gnu/local.mk: Add patch. --- gnu/local.mk | 1 + .../telegram-desktop-fix-gcc12-cstdint.patch | 10 + gnu/packages/telegram.scm | 175 ++++++++++-------- 3 files changed, 105 insertions(+), 81 deletions(-) create mode 100644 gnu/packages/patches/telegram-desktop-fix-gcc12-cstdint.patch -- 2.37.3 diff --git a/gnu/local.mk b/gnu/local.mk index 683f6bfe0d..1247a09a8e 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1868,6 +1868,7 @@ dist_patch_DATA = \ %D%/packages/patches/teensy-loader-cli-help.patch \ %D%/packages/patches/tensorflow-c-api-fix.patch \ %D%/packages/patches/texinfo-5-perl-compat.patch \ + %D%/packages/patches/telegram-desktop-fix-gcc12-cstdint.patch \ %D%/packages/patches/telegram-purple-adjust-test.patch \ %D%/packages/patches/texi2html-document-encoding.patch \ %D%/packages/patches/texi2html-i18n.patch \ diff --git a/gnu/packages/patches/telegram-desktop-fix-gcc12-cstdint.patch b/gnu/packages/patches/telegram-desktop-fix-gcc12-cstdint.patch new file mode 100644 index 0000000000..a3d67e0c9a --- /dev/null +++ b/gnu/packages/patches/telegram-desktop-fix-gcc12-cstdint.patch @@ -0,0 +1,10 @@ +--- a/Telegram/ThirdParty/tgcalls/tgcalls/utils/gzip.h ++++ b/Telegram/ThirdParty/tgcalls/tgcalls/utils/gzip.h +@@ -2,6 +2,7 @@ + #define TGCALLS_UTILS_GZIP_H + + #include ++#include + #include + + namespace tgcalls { diff --git a/gnu/packages/telegram.scm b/gnu/packages/telegram.scm index cdd3816082..b943b3c4a2 100644 --- a/gnu/packages/telegram.scm +++ b/gnu/packages/telegram.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2021 Raghav Gururajan -;;; +;;; Copyright © 2022 Hilton Chain ;;; This file is part of GNU Guix. ;;; ;;; GNU Guix is free software; you can redistribute it and/or modify it @@ -28,6 +28,7 @@ (define-module (gnu packages telegram) #:use-module (gnu packages compression) #:use-module (gnu packages cpp) #:use-module (gnu packages digest) + #:use-module (gnu packages enchant) #:use-module (gnu packages fcitx) #:use-module (gnu packages fcitx5) #:use-module (gnu packages freedesktop) @@ -60,6 +61,7 @@ (define-module (gnu packages telegram) #:use-module (gnu packages tls) #:use-module (gnu packages video) #:use-module (gnu packages web) + #:use-module (gnu packages webkit) #:use-module (gnu packages xdisorg) #:use-module (gnu packages xiph) #:use-module (gnu packages xorg) @@ -258,7 +260,7 @@ (define-public libtgvoip-for-telegram-desktop (define-public telegram-desktop (package (name "telegram-desktop") - (version "2.9.3") + (version "4.1.1") (source (origin (method git-fetch) @@ -269,16 +271,25 @@ (define-public telegram-desktop (recursive? #t))) (file-name (git-file-name name version)) + (patches + (search-patches + ;; Cherry-picked from upstream, remove when bumping. + "telegram-desktop-fix-gcc12-cstdint.patch")) (sha256 - (base32 "07mw09gmxy2pcga856wbsqmbgl2l5a3ix0hr5p6hlvk7pq260s36")) + (base32 "0b8nwimks6hfnb3bqik8d4s9z689hhj4p9ykqgc36pmpr54nyma8")) (modules '((guix build utils) (ice-9 ftw) (srfi srfi-1))) (snippet `(begin (let ((keep - '( ;; Not available in Guix. - "SPMediaKeyTap" "statusnotifieritem" "tgcalls"))) + '(;; Own fork, legacy library only used for backward + ;; compatibility. + "libtgvoip" + ;; Own fork with custom API. + "rlottie" + ;; Not available in Guix. + "dispatch" "tgcalls"))) (with-directory-excursion "Telegram/ThirdParty" (for-each delete-file-recursively (lset-difference string=? @@ -286,102 +297,104 @@ (define-public telegram-desktop (cons* "." ".." keep))))))))) (build-system qt-build-system) (arguments - `(#:tests? #f ; No target - #:imported-modules - (,@%qt-build-system-modules - (guix build glib-or-gtk-build-system)) - #:modules - ((guix build qt-build-system) - ((guix build glib-or-gtk-build-system) - #:prefix glib-or-gtk:) - (guix build utils) - (ice-9 match)) - #:configure-flags - (list - ;; Client applications must provide their own API-ID and API-HASH, - ;; see also . - ;; In case, that the credentials below fail to work, contact - ;; Raghav Gururajan - "-DTDESKTOP_API_ID=2791056" - "-DTDESKTOP_API_HASH=582d6d0b44f7a2de949e99271fd8b3f2" - ;; Disable WebkitGTK support as it fails to link - "-DDESKTOP_APP_DISABLE_WEBKITGTK=ON" - ;; Use bundled fonts as fallback. - "-DDESKTOP_APP_USE_PACKAGED_FONTS=OFF") - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'make-writable - (lambda _ - (for-each make-file-writable (find-files ".")))) - (add-before 'configure 'patch-cxx-flags - (lambda _ - (substitute* "cmake/options_linux.cmake" - (("class-memaccess") "all")))) - (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 cmake-shared - extra-cmake-modules - `(,glib "bin") - `(,gtk+ "bin") - pkg-config - python-wrapper - qttools-5)) + (list #:tests? #f ;No target + #:imported-modules + `(,@%qt-build-system-modules + (guix build glib-or-gtk-build-system)) + #:modules + '((guix build qt-build-system) + ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:) + (guix build utils) + (ice-9 match)) + #:configure-flags + #~`(;; https://github.com/telegramdesktop/tdesktop/blob/dev/snap/snapcraft.yaml + ;; see also . + "-DTDESKTOP_API_ID=611335" + "-DTDESKTOP_API_HASH=d524b414d21f4d37f08684c1df41ac9c" + ,(string-append "-DTDESKTOP_LAUTCHER_BASENAME=" #$name) + "-DDESKTOP_APP_DISABLE_CRASH_REPORTS=ON" + "-DDESKTOP_APP_DISABLE_AUTOUPDATE=ON" + ;; NOTE: Options commented are default values. + ;; See also: comments in inputs. + ;; "-DDESKTOP_APP_LOTTIE_USE_CACHE=ON" + ;; "-DDESKTOP_APP_DISABLE_DBUS_INTEGRATION=OFF" + ;; "-DDESKTOP_APP_DISABLE_WAYLAND_INTEGRATION=OFF" + ;; "-DDESKTOP_APP_DISABLE_X11_INTEGRATION=OFF" + ;; "-DDESKTOP_APP_USE_ALLOCATION_TRACER=OFF" + ;; "-DDESKTOP_APP_USE_PACKAGED=ON" + ;; "-DDESKTOP_APP_USE_PACKAGED_FONTS=OFF" + ;; "-DDESKTOP_APP_USE_PACKAGED_RLOTTIE=OFF" + ;; "-DDESKTOP_APP_DISABLE_SPELLCHECK=OFF" + ;; "-DDESKTOP_APP_USE_HUNSPELL_ONLY=OFF" + ;; "-DDESKTOP_APP_USE_ENCHANT=OFF" + ;; "-DDESKTOP_APP_NO_PDB=OFF" + ;; "-DDESKTOP_APP_DISABLE_JEMALLOC=OFF" + ) + #:phases + #~(modify-phases %standard-phases + (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 pkg-config python-wrapper)) (inputs - (list alsa-lib + (list abseil-cpp-cxxstd17 + alsa-lib c++-gsl - catch-framework2 - libexpected - fcitx-qt5 - fcitx5-qt ffmpeg - glib - glibmm-2.64 - gtk+ - hime - hunspell jemalloc - kwayland - libdbusmenu-qt + libexpected libjpeg-turbo - libtgvoip-for-telegram-desktop - lz4 - materialdecoration + libvpx minizip - nimf openal openssl opus pulseaudio qrcodegen-cpp - qtbase-5 - qtsvg-5 - qt5ct + qt5compat + qtbase qtimageformats - qtwayland + qtsvg-5 range-v3 - rlottie-for-telegram-desktop rnnoise webrtc-for-telegram-desktop - libx11 - libxcb - xcb-util-keysyms xxhash - zlib)) - (propagated-inputs - (list dconf)) + zlib + ;; DESKTOP_APP_DISABLE_DBUS_INTEGRATION + glibmm-2.64 + ;; DESKTOP_APP_USE_ENCHANT + ;; enchant + ;; DESKTOP_APP_DISABLE_SPELLCHECK + hunspell + ;; DESKTOP_APP_LOTTIE_USE_CACHE + lz4 + ;; DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION + qtwayland wayland + ;; DESKTOP_APP_DISABLE_X11_INTEGRATION + libxcb xcb-util-keysyms + ;; Optional + webkitgtk)) (synopsis "Telegram Desktop") (description "Telegram desktop is the official desktop version of the Telegram instant messenger.") (home-page "https://desktop.telegram.org/") - (license - (list - ;; ThirdParty - license:lgpl2.1+ - ;; Others - license:gpl3+)))) + (license (list + ;; Telegram/ThirdParty/dispatch + license:asl2.0 + ;; Telegram/ThirdParty/rlottie/src/vector/pixman + ;; Telegram/ThirdParty/rlottie/src/vector/stb + ;; Telegram/ThirdParty/rlottie/src/vector/rapidjson + license:expat + ;; Telegram/ThirdParty/rlottie/src/vector/freetype + license:freetype + ;; Telegram/ThirdParty/rlottie + ;; Telegram/ThirdParty/rlottie/src/vector + license:lgpl2.1+ + ;; Telegram/ThirdParty/tgcalls + license:lgpl3 + ;; Others + license:gpl3+)))) (define-public tl-parser (let ((commit "1933e76f8f4fb74311be723b432e4c56e3a5ec06")