From 6192acf8b77948384e75650ae79dfbaadb26bc37 Mon Sep 17 00:00:00 2001 From: Saku Laesvuori Date: Thu, 25 May 2023 22:12:04 +0300 Subject: [PATCH] gnu: telegram-desktop: Update to 4.8.1 * gnu/packages/patches/webrtc-for-telegram-desktop-fix-gcc12-cstdint.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove deleted patch. * 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-rpl-for-telegram-desktop, lib-spellcheck-for-telegram-desktop, lib-ui-for-telegram-desktop, lib-webrtc-for-telegram-desktop, lib-webview-for-telegram-desktop, tgcalls-for-telegram-desktop): Bump to submodule checkout. (webrtc-for-telegram-desktop): Bump to submodule checkout. [patches]: Remove patch. [snippet]: Unbundle abseil-cpp and crc32c [inputs]: Add crc32c and glibmm-next. Replace glib with glib-next. (cld3-for-telegram-desktop): New variable. (telegram-desktop): Update to 4.8.1 [snippet]: Add cld3 as a submodule. [arguments]: Add cld3 as a submodule. [native-inputs]: Replace glib with glib-next [inputs]: Add crc32c, kimageformats, plasma-wayland-protocols, protobuf, qtdeclarative-5 and wayland-protocols. Replace glib with glib-next and glibmm-2.64 with glibmm-next. * gnu/packages/patches/telegram-desktop-allow-disable-libtgvoip.patch: Update patch. Signed-off-by: Jonathan Brielmaier --- gnu/local.mk | 1 - ...gram-desktop-allow-disable-libtgvoip.patch | 28 ++--- ...r-telegram-desktop-fix-gcc12-cstdint.patch | 21 ---- gnu/packages/telegram.scm | 103 ++++++++++-------- 4 files changed, 74 insertions(+), 79 deletions(-) delete mode 100644 gnu/packages/patches/webrtc-for-telegram-desktop-fix-gcc12-cstdint.patch diff --git a/gnu/local.mk b/gnu/local.mk index cb1705e447..73370dcc78 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -2046,7 +2046,6 @@ dist_patch_DATA = \ %D%/packages/patches/wdl-link-libs-and-fix-jnetlib.patch \ %D%/packages/patches/webkitgtk-adjust-bubblewrap-paths.patch \ %D%/packages/patches/webrtc-audio-processing-big-endian.patch \ - %D%/packages/patches/webrtc-for-telegram-desktop-fix-gcc12-cstdint.patch \ %D%/packages/patches/websocketpp-fix-for-cmake-3.15.patch \ %D%/packages/patches/wmctrl-64-fix.patch \ %D%/packages/patches/wmfire-update-for-new-gdk-versions.patch \ diff --git a/gnu/packages/patches/telegram-desktop-allow-disable-libtgvoip.patch b/gnu/packages/patches/telegram-desktop-allow-disable-libtgvoip.patch index 3c062cbd9a..a603bc9d72 100644 --- a/gnu/packages/patches/telegram-desktop-allow-disable-libtgvoip.patch +++ b/gnu/packages/patches/telegram-desktop-allow-disable-libtgvoip.patch @@ -1,4 +1,4 @@ -From 4d1a8351ee82728912fcf7ad0070049b2910c393 Mon Sep 17 00:00:00 2001 +From 322d2c452bf1a4df7b9fe161d4991a347043550c Mon Sep 17 00:00:00 2001 From: Klemens Nanni Date: Wed, 2 Mar 2022 01:07:48 +0100 Subject: [PATCH] Introduce TDESKTOP_DISABLE_LEGACY_TGVOIP @@ -19,10 +19,10 @@ and telegram desktop/mobile versions without problems. 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/Telegram/CMakeLists.txt b/Telegram/CMakeLists.txt -index fb2bf370f..5d9578f2d 100644 +index 008c71b15..291305909 100644 --- a/Telegram/CMakeLists.txt +++ b/Telegram/CMakeLists.txt -@@ -28,7 +28,9 @@ get_filename_component(res_loc Resources REALPATH) +@@ -26,7 +26,9 @@ get_filename_component(res_loc Resources REALPATH) include(cmake/telegram_options.cmake) include(cmake/lib_ffmpeg.cmake) include(cmake/lib_stripe.cmake) @@ -33,7 +33,7 @@ index fb2bf370f..5d9578f2d 100644 include(cmake/lib_tgcalls.cmake) include(cmake/td_export.cmake) include(cmake/td_mtproto.cmake) -@@ -52,9 +54,7 @@ target_prepare_qrc(Telegram) +@@ -49,9 +51,7 @@ set_target_properties(Telegram PROPERTIES AUTOMOC ON) target_link_libraries(Telegram PRIVATE @@ -44,7 +44,7 @@ index fb2bf370f..5d9578f2d 100644 # Order in this list defines the order of include paths in command line. # We need to place desktop-app::external_minizip this early to have its diff --git a/Telegram/SourceFiles/calls/calls_call.cpp b/Telegram/SourceFiles/calls/calls_call.cpp -index 6894d5d90..cd03620e7 100644 +index 5fe9ac677..bebf48e70 100644 --- a/Telegram/SourceFiles/calls/calls_call.cpp +++ b/Telegram/SourceFiles/calls/calls_call.cpp @@ -39,8 +39,10 @@ class InstanceImpl; @@ -68,7 +68,7 @@ index 6894d5d90..cd03620e7 100644 [[nodiscard]] base::flat_set CollectEndpointIds( const QVector &list) { -@@ -1322,7 +1326,9 @@ Call::~Call() { +@@ -1332,7 +1336,9 @@ Call::~Call() { } void UpdateConfig(const std::string &data) { @@ -79,10 +79,10 @@ index 6894d5d90..cd03620e7 100644 } // namespace Calls diff --git a/Telegram/cmake/lib_tgcalls.cmake b/Telegram/cmake/lib_tgcalls.cmake -index 34a5ba418..8a784be2c 100644 +index 94cfdb856..9ac4fe479 100644 --- a/Telegram/cmake/lib_tgcalls.cmake +++ b/Telegram/cmake/lib_tgcalls.cmake -@@ -267,6 +267,10 @@ PRIVATE +@@ -268,6 +268,10 @@ PRIVATE ${tgcalls_loc} ) @@ -94,7 +94,7 @@ index 34a5ba418..8a784be2c 100644 init_target(lib_tgcalls_legacy) diff --git a/Telegram/cmake/telegram_options.cmake b/Telegram/cmake/telegram_options.cmake -index 1c3c25431..033f2bc95 100644 +index a5a6d9405..2eb9953f2 100644 --- a/Telegram/cmake/telegram_options.cmake +++ b/Telegram/cmake/telegram_options.cmake @@ -4,7 +4,9 @@ @@ -107,7 +107,7 @@ index 1c3c25431..033f2bc95 100644 set(TDESKTOP_API_ID "0" CACHE STRING "Provide 'api_id' for the Telegram API access.") set(TDESKTOP_API_HASH "" CACHE STRING "Provide 'api_hash' for the Telegram API access.") -@@ -40,6 +42,12 @@ if (TDESKTOP_API_ID STREQUAL "0" OR TDESKTOP_API_HASH STREQUAL "") +@@ -36,6 +38,12 @@ if (TDESKTOP_API_ID STREQUAL "0" OR TDESKTOP_API_HASH STREQUAL "") " ") endif() @@ -117,9 +117,9 @@ index 1c3c25431..033f2bc95 100644 + target_link_libraries(Telegram PRIVATE tdesktop::lib_tgcalls_legacy tdesktop::lib_tgvoip) +endif() + - if (DESKTOP_APP_DISABLE_SPELLCHECK) - target_compile_definitions(Telegram PRIVATE TDESKTOP_DISABLE_SPELLCHECK) - else() + if (DESKTOP_APP_DISABLE_AUTOUPDATE) + target_compile_definitions(Telegram PRIVATE TDESKTOP_DISABLE_AUTOUPDATE) + endif() -- -2.37.3 +2.39.2 diff --git a/gnu/packages/patches/webrtc-for-telegram-desktop-fix-gcc12-cstdint.patch b/gnu/packages/patches/webrtc-for-telegram-desktop-fix-gcc12-cstdint.patch deleted file mode 100644 index f1fd29d0d3..0000000000 --- a/gnu/packages/patches/webrtc-for-telegram-desktop-fix-gcc12-cstdint.patch +++ /dev/null @@ -1,21 +0,0 @@ -From 86d2bcd7afb8706663d29e30f65863de5a626142 Mon Sep 17 00:00:00 2001 -From: Xiretza -Date: Sun, 15 May 2022 12:47:41 +0200 -Subject: [PATCH] fix(h265_pps_parser): fix missing cstdint include - ---- - src/common_video/h265/h265_pps_parser.h | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/common_video/h265/h265_pps_parser.h b/src/common_video/h265/h265_pps_parser.h -index 28c95ea9..c180b1b9 100644 ---- a/src/common_video/h265/h265_pps_parser.h -+++ b/src/common_video/h265/h265_pps_parser.h -@@ -12,6 +12,7 @@ - #define COMMON_VIDEO_H265_PPS_PARSER_H_ - - #include "absl/types/optional.h" -+#include - - namespace rtc { - class BitBuffer; diff --git a/gnu/packages/telegram.scm b/gnu/packages/telegram.scm index c6ab5d312c..ae286f4f98 100644 --- a/gnu/packages/telegram.scm +++ b/gnu/packages/telegram.scm @@ -78,11 +78,11 @@ (define-module (gnu packages telegram) #:use-module (guix build-system python) #:use-module (guix build-system qt)) -(define %telegram-version "4.2.2") +(define %telegram-version "4.8.1") (define libyuv-for-telegram-desktop - (let ((commit "ad890067f661dc747a975bc55ba3767fe30d4452") - (revision "2211")) + (let ((commit "00950840d1c9bcbb3eb6ebc5aac5793e71166c8b") + (revision "2212")) (origin (method git-fetch) (uri (git-reference @@ -93,62 +93,62 @@ (define libyuv-for-telegram-desktop (git-version "0" revision commit))) (sha256 (base32 - "01knnk4h247rq536097n9n3s3brxlbby3nv3ppdgsqfda3k159ll"))))) + "0mm56p8iapfild2xdw4w8zi35c3xm06fgagiali644gnxdmnym6c"))))) (define cmake-helpers-for-telegram-desktop (origin (method git-fetch) (uri (git-reference (url "https://github.com/desktop-app/cmake_helpers.git") - (commit "f49e254d8c5287752b5ed7b86bd84073f584768e"))) + (commit "6ab5543b3dd1e40979d258e46d03376931b6c37b"))) (file-name (git-file-name "cmake-helpers-for-telegram-desktop" %telegram-version)) (sha256 (base32 - "0yqib2ndhpaj69z603knpcfga0ni978janb5i8rvhslqddvbzfjv")))) + "0y96mvzs113zh8bdw1h3i6l0pgwg93rigrday8kfdg4magz686k6")))) (define codegen-for-telegram-desktop (origin (method git-fetch) (uri (git-reference (url "https://github.com/desktop-app/codegen.git") - (commit "8815d7aec9b901191d08445f29e2edd0aeba7b2c"))) + (commit "1a969faa0afb29d53af03e530775eccdfb8433f1"))) (file-name (git-file-name "codegen-for-telegram-desktop" %telegram-version)) (sha256 (base32 - "1ly958mjk25kfcpa174kvg134p9r751ixi275afj5kr57by9mbq2")))) + "1xmw8dfm51p5g20rlmzqnr72a14ngyxwq09an8clf1v5s6mmwvak")))) (define lib-base-for-telegram-desktop (origin (method git-fetch) (uri (git-reference (url "https://github.com/desktop-app/lib_base.git") - (commit "d932f5048317b05dd414116741d995c82a528542"))) + (commit "fd9adb30ee906ea02c125eaa58fcfae773fdc677"))) (file-name (git-file-name "lib-base-for-telegram-desktop" %telegram-version)) (sha256 (base32 - "1fnirqxj4qq1gzx52rydrc5r6clw3316bh51dfg652jr8hj6wkp2")))) + "1m760mcfvgzia53nrs6wvjn353jvzlzln7c9fkx2dhpkigiynz83")))) (define lib-crl-for-telegram-desktop (origin (method git-fetch) (uri (git-reference (url "https://github.com/desktop-app/lib_crl.git") - (commit "4e620bc383d032aadea8e6af02661f8c76695cec"))) + (commit "3d7e1e1f1321c3defd21c01882d674e485ecd8df"))) (file-name (git-file-name "lib-crl-for-telegram-desktop" %telegram-version)) (sha256 (base32 - "17bngj247qwq0dg4h37xdi5v1mk22y4yp7sp6ph3irmnz4awah0x")))) + "06mzafnjpfr5ih297dh7bxm6bgpg0wy0gv2r2732n5szyrg9sdl6")))) (define lib-lottie-for-telegram-desktop (origin (method git-fetch) (uri (git-reference (url "https://github.com/desktop-app/lib_lottie.git") - (commit "6ed1c22ed60692d2f288c9222fafd7d5cd62f904"))) + (commit "3e9c2f1026e4b5aa3202fca4cc67ece36c7cebb2"))) (file-name (git-file-name "lib-lottie-for-telegram-desktop" %telegram-version)) (sha256 @@ -172,24 +172,24 @@ (define lib-rpl-for-telegram-desktop (method git-fetch) (uri (git-reference (url "https://github.com/desktop-app/lib_rpl.git") - (commit "fd31f5bf382d2679eccdb1abaf8240a56c6a7abe"))) + (commit "8b1015d1bd57ef03fcd07a3eeddd3f5a9b688ade"))) (file-name (git-file-name "lib-rpl-for-telegram-desktop" %telegram-version)) (sha256 (base32 - "1fpq8nyh8wx6zkb3sjjrx9ydqzyhw4483bdk1i9blp0ijn9xxdxf")))) + "12sdhaqby5vlvd5jsj12b3xsqiaknqvijv9ydlyxclx8zail64lv")))) (define lib-spellcheck-for-telegram-desktop (origin (method git-fetch) (uri (git-reference (url "https://github.com/desktop-app/lib_spellcheck.git") - (commit "0e386e22cb6ba8a114b569840a635e096dcb645e"))) + (commit "ae89fefd239ecc47d4dab7ba29f9e230376a57d3"))) (file-name (git-file-name "lib-spellcheck-for-telegram-desktop" %telegram-version)) (sha256 (base32 - "06js7ccv6z3nbd4v2p4hp2prrlmz5ww46y3yb922pp7gm317dwyw")))) + "147xbbcza5q4wcdipk5jplajzkc48971kg2s7qv5jlz33sxkw1lq")))) (define lib-storage-for-telegram-desktop (origin @@ -220,52 +220,52 @@ (define lib-ui-for-telegram-desktop (method git-fetch) (uri (git-reference (url "https://github.com/desktop-app/lib_ui.git") - (commit "1ceaa0bbcfccb83dbf7f51d7f80a733ff2aa8c22"))) + (commit "37531086ec21a8569deddedb11b402f8a3157b90"))) (file-name (git-file-name "lib-ui-for-telegram-desktop" %telegram-version)) (sha256 (base32 - "0kyrgxi202xwy14mnx62h1kny0434f5fxqns1ydp24q2c2cr1cxn")))) + "0l4baalwdiwcwzn3wgrbyiaryi70lswillbpkzcjpavaa2pjg6b0")))) (define lib-webrtc-for-telegram-desktop (origin (method git-fetch) (uri (git-reference (url "https://github.com/desktop-app/lib_webrtc.git") - (commit "9b11599c3c56047cfa4c68b69f1fcc93b602c33a"))) + (commit "b68a95ad4d1ae9a1827671100a7fd76cbe448c3f"))) (file-name (git-file-name "lib-webrtc-for-telegram-desktop" %telegram-version)) (sha256 (base32 - "0158jx8hj4fv6qpw5pgcr2mdlihj0dxs060dg3iy61zz6q68z5dq")))) + "1c8jwdnn26n13yp0rp0l71q6xlxa6wp3cspbm3pnghw964jwgp3z")))) (define lib-webview-for-telegram-desktop (origin (method git-fetch) (uri (git-reference (url "https://github.com/desktop-app/lib_webview.git") - (commit "546df65eb2424550ed84ce14fc9c5d1bb3586f35"))) + (commit "f632fc84cbc62ae8abbbd05f81d472757a337c11"))) (file-name (git-file-name "lib-webview-for-telegram-desktop" %telegram-version)) (sha256 (base32 - "0zzjwyw82bggncmmsw969lnjl04pklmqjqm77jjzadinivl52z0l")))) + "0idsfkxq7l9kgyrhifys5l4jkhvbyxkgkp0qdq9218h7g0ldw84i")))) (define tgcalls-for-telegram-desktop (origin (method git-fetch) (uri (git-reference (url "https://github.com/TelegramMessenger/tgcalls.git") - (commit "82c4921045c440b727c38e464f3a0539708423ff"))) + (commit "2e2797648aac2588e7fe479c2e8b4455ec65c5e6"))) (file-name (git-file-name "tgcalls-for-telegram-desktop" %telegram-version)) (sha256 (base32 - "1109r17abh66yz91b65fn2g4ryfybnsr5g6075sjhbah1gccv9mk")))) + "193m2gkvipijqbfd6a8mhg9nd63wlnshzgspk3pip57vk21l709z")))) (define-public webrtc-for-telegram-desktop - (let ((commit "621f3da55331733bf0d1b223786b96b68c03dca1") - (revision "327")) + (let ((commit "5098730b9eb6173f0b52068fe2555b7c1015123a") + (revision "328")) (hidden-package (package (name "webrtc-for-telegram-desktop") @@ -281,18 +281,14 @@ (define-public webrtc-for-telegram-desktop (file-name (git-file-name name version)) (sha256 - (base32 "1ks1572k1jj7pmzwm79p2gdgi31dd4bs761bphnx32zyq4c6skxk")) - (patches - (search-patches - ;; https://github.com/desktop-app/tg_owt/pull/101 - "webrtc-for-telegram-desktop-fix-gcc12-cstdint.patch")) + (base32 "1lk54zlrff59rj5k9dylsgz4sdds4728psrk8m3v9qn5y8d6z8qy")) (modules '((guix build utils) (ice-9 ftw) (srfi srfi-1))) (snippet #~(begin (let ((keep - '("abseil-cpp" "libsrtp" "rnnoise" + '("libsrtp" "rnnoise" ;; Not available in Guix. "pffft"))) (with-directory-excursion "src/third_party" @@ -300,9 +296,11 @@ (define-public webrtc-for-telegram-desktop (lset-difference string=? (scandir ".") (cons* "." ".." keep))))) - ;; Unbundle openh264. + ;; Unbundle abseil-cpp, crc32c and openh264. (substitute* "CMakeLists.txt" - (("\\include\\(cmake\\/libopenh264\\.cmake\\)")"")))))) + (("\\include\\(cmake\\/libopenh264\\.cmake\\)")"") + (("\\include\\(cmake\\/libabsl\\.cmake\\)")"") + (("\\include\\(cmake\\/libcrc32c\\.cmake\\)")"")))))) (build-system cmake-build-system) (arguments (list @@ -312,16 +310,16 @@ (define-public webrtc-for-telegram-desktop (add-after 'unpack 'unpack-additional-sources (lambda _ (let* ((third-party (string-append (getcwd) "/src/third_party")) - (crc32c-to (string-append third-party "/crc32c/src")) (libyuv-to (string-append third-party "/libyuv"))) - (copy-recursively #$(package-source crc32c) crc32c-to) (copy-recursively #$libyuv-for-telegram-desktop libyuv-to))))))) (native-inputs (list pkg-config python-wrapper yasm)) (inputs (list abseil-cpp-cxxstd17 + crc32c ffmpeg - glib + glib-next + glibmm-next libdrm libglvnd libjpeg-turbo @@ -381,6 +379,18 @@ (define-public rlottie-for-telegram-desktop (substitute* "meson.build" (("werror=true") "werror=false")))))))))) +(define cld3-for-telegram-desktop + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/google/cld3.git") + (commit "b48dc46512566f5a2d41118c8c1116c4f96dc661"))) + (file-name + (git-file-name "cld3-for-telegram-desktop" %telegram-version)) + (sha256 + (base32 + "0ayrrhfdwrf4260h9fsirkhhfrcvc3qqnh6h9wj3ixij2lq0wwqb")))) + (define-public telegram-desktop (package (name "telegram-desktop") @@ -396,7 +406,7 @@ (define-public telegram-desktop (file-name (git-file-name name version)) (sha256 - (base32 "16mcx4gwkl8s70a8gppxczmjsww1a3vmdrz3snfh986nvid64mq7")) + (base32 "0g47ffamh1csp79yzkv28v3qjkhjacj0c7pjf53n1ks80j5hc2j0")) (patches (search-patches ;; https://github.com/telegramdesktop/tdesktop/pull/24126 @@ -408,7 +418,7 @@ (define-public telegram-desktop #~(begin (let ((keep '(;; Not available in Guix. - "tgcalls"))) + "tgcalls" "cld3"))) (with-directory-excursion "Telegram/ThirdParty" (for-each delete-file-recursively (lset-difference string=? @@ -461,13 +471,14 @@ (define-public telegram-desktop ("Telegram/lib_ui" #$lib-ui-for-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))))) (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 `(,glib-next "bin") `(,gtk+ "bin") pkg-config python-wrapper)) @@ -475,16 +486,18 @@ (define-public telegram-desktop (list abseil-cpp-cxxstd17 alsa-lib c++-gsl + crc32c fcitx-qt5 fcitx5-qt ffmpeg - glib - glibmm-2.64 + glib-next + glibmm-next gtk+ hime hunspell jemalloc kcoreaddons + kimageformats libdispatch libexpected libjpeg-turbo @@ -496,9 +509,12 @@ (define-public telegram-desktop openal openssl opus + plasma-wayland-protocols pulseaudio + protobuf qrcodegen-cpp qtbase-5 + qtdeclarative-5 qtimageformats qtsvg-5 qtwayland-5 @@ -506,6 +522,7 @@ (define-public telegram-desktop rlottie-for-telegram-desktop rnnoise wayland + wayland-protocols webkitgtk webrtc-for-telegram-desktop xcb-util-keysyms