diff options
author | 3JlOy_PYCCKUI | 2021-12-15 20:04:20 +0300 |
---|---|---|
committer | 3JlOy_PYCCKUI | 2021-12-15 20:04:20 +0300 |
commit | 5287d36631cf77028cbe959bc1d5d79358581aeb (patch) | |
tree | 28b962cc7d5ef9eb111bbb158450d2491fcfe9f6 | |
parent | bacc189b39f11f92c640294b2f1228ce41d440c9 (diff) | |
download | aur-5287d36631cf77028cbe959bc1d5d79358581aeb.tar.gz |
fix building, added new patches
-rw-r--r-- | .SRCINFO | 167 | ||||
-rw-r--r-- | .gitignore | 6 | ||||
-rw-r--r-- | 0001-Add-an-option-to-hide-messages-from-blocked-users-in.patch | 155 | ||||
-rw-r--r-- | PKGBUILD | 323 | ||||
-rw-r--r-- | block-sponsored_messages.patch | 13 | ||||
-rw-r--r-- | dlopen-gtk.patch | 106 | ||||
-rw-r--r-- | lib_base-gcc11-fix.patch | 12 | ||||
-rw-r--r-- | lib_base-gtk-loading-fix.patch | 13 | ||||
-rw-r--r-- | lottie-fix.patch | 22 | ||||
-rw-r--r-- | mallocng.patch | 23 |
10 files changed, 407 insertions, 433 deletions
@@ -1,8 +1,8 @@ pkgbase = kotatogram-dev-git pkgdesc = Kotatogram – experimental Telegram Desktop fork - Dev branch - pkgver = k1.4.12.g40df43998 - pkgrel = 6 - url = https://github.com/kotatogram/kotatogram-desktop + pkgver = k1.4.5.r550.gb9a479517 + pkgrel = 7 + url = https://kotatogram.github.io arch = x86_64 license = GPL3 makedepends = cmake @@ -12,91 +12,124 @@ pkgbase = kotatogram-dev-git makedepends = range-v3 makedepends = tl-expected makedepends = microsoft-gsl - makedepends = libtg_owt - makedepends = gtk3 + makedepends = extra-cmake-modules makedepends = webkit2gtk - depends = qt5-imageformats + makedepends = unzip + makedepends = protobuf + makedepends = libxrandr + makedepends = libxcomposite + makedepends = openssl + makedepends = glibc + makedepends = ffmpeg + makedepends = libva + makedepends = opus + makedepends = yasm + makedepends = libjpeg-turbo + makedepends = pipewire + makedepends = libxtst + makedepends = abseil-cpp + depends = hunspell depends = ffmpeg - depends = openal - depends = glibmm - depends = kwayland + depends = hicolor-icon-theme depends = lz4 - depends = xxhash depends = minizip + depends = openal + depends = ttf-opensans + depends = qt5-imageformats + depends = qt5-svg + depends = qt5-wayland depends = libdbusmenu-qt5 - depends = hunspell - optdepends = ttf-opensans: default Open Sans font family + depends = xxhash + depends = kwayland + depends = glibmm + depends = rnnoise + depends = jemalloc + optdepends = webkit2gtk: embedded browser features + optdepends = xdg-desktop-portal: desktop integration provides = kotatogram-desktop + provides = kotatogram-desktop-git + conflicts = kotatogram-desktop-bin + conflicts = kotatogram-desktop-dynamic-bin conflicts = kotatogram-desktop source = kotatogram-desktop::git+https://github.com/kotatogram/kotatogram-desktop.git#branch=dev - source = kotatogram-desktop-libtgvoip::git+https://github.com/telegramdesktop/libtgvoip + source = kotatogram-desktop-libtgvoip::git+https://github.com/telegramdesktop/libtgvoip.git + source = kotatogram-desktop-GSL::git+https://github.com/Microsoft/GSL.git + source = kotatogram-desktop-Catch::git+https://github.com/philsquared/Catch + source = kotatogram-desktop-xxHash::git+https://github.com/Cyan4973/xxHash.git source = kotatogram-desktop-rlottie::git+https://github.com/desktop-app/rlottie.git + source = kotatogram-desktop-lz4::git+https://github.com/lz4/lz4.git source = kotatogram-desktop-lib_crl::git+https://github.com/desktop-app/lib_crl.git source = kotatogram-desktop-lib_rpl::git+https://github.com/desktop-app/lib_rpl.git - source = kotatogram-desktop-lib_base::git+https://github.com/kotatogram/lib_base.git + source = kotatogram-desktop-lib_base::git+https://github.com/desktop-app/lib_base.git source = kotatogram-desktop-codegen::git+https://github.com/desktop-app/codegen.git source = kotatogram-desktop-lib_ui::git+https://github.com/kotatogram/lib_ui.git source = kotatogram-desktop-lib_rlottie::git+https://github.com/desktop-app/lib_rlottie.git source = kotatogram-desktop-lib_lottie::git+https://github.com/desktop-app/lib_lottie.git source = kotatogram-desktop-lib_tl::git+https://github.com/desktop-app/lib_tl.git - source = kotatogram-desktop-lib_spellcheck::git+https://github.com/desktop-app/lib_spellcheck + source = kotatogram-desktop-lib_spellcheck::git+https://github.com/desktop-app/lib_spellcheck.git source = kotatogram-desktop-lib_storage::git+https://github.com/desktop-app/lib_storage.git source = kotatogram-desktop-cmake_helpers::git+https://github.com/kotatogram/cmake_helpers.git - source = kotatogram-desktop-QR-Code-generator::git+https://github.com/nayuki/QR-Code-generator + source = kotatogram-desktop-expected::git+https://github.com/TartanLlama/expected.git + source = kotatogram-desktop-QR-Code-generator::git+https://github.com/nayuki/QR-Code-generator.git source = kotatogram-desktop-lib_qr::git+https://github.com/desktop-app/lib_qr.git + source = kotatogram-desktop-libdbusmenu-qt::git+https://github.com/desktop-app/libdbusmenu-qt.git + source = kotatogram-desktop-hunspell::git+https://github.com/hunspell/hunspell.git + source = kotatogram-desktop-range-v3::git+https://github.com/ericniebler/range-v3.git + source = kotatogram-desktop-fcitx-qt5::git+https://github.com/fcitx/fcitx-qt5.git + source = kotatogram-desktop-nimf::git+https://github.com/hamonikr/nimf.git + source = kotatogram-desktop-hime::git+https://github.com/hime-ime/hime.git + source = kotatogram-desktop-fcitx5-qt::git+https://github.com/fcitx/fcitx5-qt.git source = kotatogram-desktop-lib_webrtc::git+https://github.com/desktop-app/lib_webrtc.git source = kotatogram-desktop-tgcalls::git+https://github.com/TelegramMessenger/tgcalls.git - source = kotatogram-desktop-lib_webview::git+https://github.com/kotatogram/lib_webview.git - source = kotatogram-desktop-mallocng::git+https://github.com/desktop-app/mallocng.git + source = kotatogram-desktop-lib_webview::git+https://github.com/desktop-app/lib_webview.git + source = kotatogram-desktop-lib_waylandshells::git+https://github.com/desktop-app/lib_waylandshells.git + source = kotatogram-desktop-jemalloc::git+https://github.com/jemalloc/jemalloc.git + source = kotatogram-desktop-tg_owt::git+https://github.com/desktop-app/tg_owt.git + source = libvpx::git+https://chromium.googlesource.com/webm/libvpx.git + source = libyuv::git+https://chromium.googlesource.com/libyuv/libyuv.git + source = pipewire::git+https://github.com/PipeWire/pipewire.git source = 0001-Add-an-option-to-hide-messages-from-blocked-users-in.patch - source = dlopen-gtk.patch - source = https://github.com/telegramdesktop/tdesktop/commit/71deaa48afab2bcf9df67b9b347b1f44aad3a9ce.patch - source = https://github.com/telegramdesktop/tdesktop/commit/a8807bc915f2439acc7c84f06d931d96d6ca602a.patch - source = https://github.com/telegramdesktop/tdesktop/commit/d87ea056c6166345d061fc3a69a6f95eceaab0a1.patch - source = https://github.com/telegramdesktop/tdesktop/commit/98180d3a9e994081a134196adad0023651d28bf3.patch - source = https://github.com/telegramdesktop/tdesktop/commit/383acf0ffc489990302797ff0f048519b3c7c9bf.patch - source = lib_base-gcc11-fix.patch - source = lib_base-gtk-loading-fix.patch - source = https://github.com/desktop-app/lib_webview/commit/8816639c74a4cb6d512cba8e2271aceb404b0492.patch - source = mallocng.patch - source = https://github.com/desktop-app/cmake_helpers/commit/5318ac7c54dbf33b17ccc4bd3281bb8b8db25e02.patch - source = https://github.com/desktop-app/cmake_helpers/commit/de65519132126db2c2166cdf5af5f12e61652419.patch - source = https://github.com/desktop-app/cmake_helpers/commit/45be9e321517f15378982bd0353f80ab884679eb.patch - source = https://github.com/desktop-app/cmake_helpers/commit/bcc0ac15f497513455aa144ffe4e658f7aca0e73.patch - sha512sums = SKIP - sha512sums = SKIP - sha512sums = SKIP - sha512sums = SKIP - sha512sums = SKIP - sha512sums = SKIP - sha512sums = SKIP - sha512sums = SKIP - sha512sums = SKIP - sha512sums = SKIP - sha512sums = SKIP - sha512sums = SKIP - sha512sums = SKIP - sha512sums = SKIP - sha512sums = SKIP - sha512sums = SKIP - sha512sums = SKIP - sha512sums = SKIP - sha512sums = SKIP - sha512sums = SKIP - sha512sums = 13357d081fb658c735bb2575360f5d48214e1cf5002719ba410405a2fe05c7c3d2379588c2ca3c2ca6a5e6ff64e01e6d1ff3aecdaee8f3dd0519a64f6ee94182 - sha512sums = 3a2cf87836153d2a184b18e8ede4a279e5b55c6c8023e2ac5234482c510c4a7aff58fade8f6fcb4d52fb76601afda11b676694d4eaf3029836101aeeee0007e7 - sha512sums = cabdadddc7a6873c7c6fc8128ceddf2712c0c73d3316520482162e5c67937bda2a627ddb2f078558a52e812c2a876351196488a5a75381d84a43815b873bac5b - sha512sums = a88ceb0de04c8f895b804f6df4112553f083076cdd3caa39595f944fb523b3b03e0a33dc7f94d808f83183bcd525a86c6fa1f1375ae34a62d12db2167dec84a3 - sha512sums = 9dc2d75745c434d46b220cf44f4dfe2a96cee230f5a404e5e2ce8b1ce82dbcca9b4a22231722054f37a54af5030ab6575edad07d16c9fc4bfea88cfcf3ed6a62 - sha512sums = a18bef9252ce9db64d0d47daafc1958aea448218062c82d4863c880e0c5767ccb3331f84a7f84648002c207ced66cb89c1de57e93939ddb8c270c8728c08e5d6 - sha512sums = c7fa111149a0ee71c975c26ef942e96615c03f99a477c2abb2a1b67711a85706e7b2fdce626c01d2ba1fb43c1cc3e0cea0c53d47291a0d851e32fabfc7360330 - sha512sums = ce364d20b9c3e8d65d4d0def6c2f025e16814c8782c78f720ee5e9891e0b296c6edca9f3a7fa46652516c6a748e29a8cdbbf5f7d1273e4e1a64c7216275c5cda - sha512sums = 956cd39e5a488b8ce02eddbca75c3f05467dcd4ff0f62907a966a1ad36b7d9329130e48f570f2e3ee95c135a085106442ce87bd48e0288db3bf8d8f06821f28d - sha512sums = c82e41e9fab49d7eca4602327ebb10c795cf6db414a3c5fe91271af336c327fed5a5c67e3219734e20b7559ff7cbca220be8b94b3b551bf33c162c90370e5af3 - sha512sums = 12c6a439b3960cb5a25edd2b2b1959f96fdbba634f281890f5ec91420834a852a7bcfa5d11051dfdf4fe719137345b23ae77a8e48eb6b9444ad973a34574cb84 - sha512sums = 2f7c24851e9879b238366c82f35a046c5a69ec5059e6441ac6eae578450669f094bb659a63b79be635dcae93ddd388bc957e29a219cc3cfc0e6591f0f333d7e3 - sha512sums = 6bce17e6e763859a95a35ff759b56aa5e51b7ba7534d5502517ae3a970cb42d901b2f6a9862a4ef06adfa5ef85e6e3e517a16ce7ab516ee9f3e4c21c38bb8cdb - sha512sums = 110654df22e36fc3185e8db05fd4cefcee30ade1a76f0640b97a15bcf532b8b560e8a9740f4e73be48accad4459487e5246d8f44d988a021b9f8024d27d29bfe - sha512sums = db3d5b53436a732ea2950c7772c9edec2e6879caefa2bfb6112e5bb12f464a33a11ca9d4f3d2699da99df97d6721fbcf958a8b2256e911fb9a18c8229e5b67fd + source = block-sponsored_messages.patch + source = lottie-fix.patch + b2sums = SKIP + b2sums = SKIP + b2sums = SKIP + b2sums = SKIP + b2sums = SKIP + b2sums = SKIP + b2sums = SKIP + b2sums = SKIP + b2sums = SKIP + b2sums = SKIP + b2sums = SKIP + b2sums = SKIP + b2sums = SKIP + b2sums = SKIP + b2sums = SKIP + b2sums = SKIP + b2sums = SKIP + b2sums = SKIP + b2sums = SKIP + b2sums = SKIP + b2sums = SKIP + b2sums = SKIP + b2sums = SKIP + b2sums = SKIP + b2sums = SKIP + b2sums = SKIP + b2sums = SKIP + b2sums = SKIP + b2sums = SKIP + b2sums = SKIP + b2sums = SKIP + b2sums = SKIP + b2sums = SKIP + b2sums = SKIP + b2sums = SKIP + b2sums = SKIP + b2sums = SKIP + b2sums = 462900e97b9d7a9d40bc02d3dc7dacd3060cc19af02135065628e38e83835a2fb438581ca78001aaffc27d8b0473a78d39509c35f50e4ebb25607fe9c6bae264 + b2sums = 1e2705008ea8cef1a5c46793a6115ba0f35f77529d18ea04a03e5a0e89980916d78d49a9aa86863b1a0b440debb650262ceb3c9d68600ffe6e5c98fd65804526 + b2sums = 8feeb47ad0c238b32cb91788340b8794d6e58fa3a1c4027a57f7edcbd2c30d755cf27a778d446d59a4dbc07c255f3d0bcefdce4b5322ed2d00854c6e4a7831e0 pkgname = kotatogram-dev-git diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..6aa3250d3e1b --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +kotatogram-desktop* +libvpx +libyuv +pipewire +pkg/ +src/ diff --git a/0001-Add-an-option-to-hide-messages-from-blocked-users-in.patch b/0001-Add-an-option-to-hide-messages-from-blocked-users-in.patch index 7f8221f0b276..c409e1481e36 100644 --- a/0001-Add-an-option-to-hide-messages-from-blocked-users-in.patch +++ b/0001-Add-an-option-to-hide-messages-from-blocked-users-in.patch @@ -1,39 +1,26 @@ -From c492b914837cead3fc5f2530c560ad76b65f4113 Mon Sep 17 00:00:00 2001 +From 1a636ab4e3dce29a08a32c5282441076fa199f23 Mon Sep 17 00:00:00 2001 From: Ilya Fedin <fedin-ilja2010@ya.ru> Date: Sun, 14 Jun 2020 03:25:53 +0400 Subject: [PATCH] Add an option to hide messages from blocked users in groups --- - Telegram/Resources/langs/lang.strings | 2 ++ Telegram/Resources/langs/rewrites/en.json | 1 + Telegram/Resources/langs/rewrites/ru.json | 1 + - .../history/history_item_components.cpp | 7 +++-- - .../SourceFiles/history/history_widget.cpp | 28 +++++++++++++++++++ - .../history/view/history_view_element.cpp | 7 +++++ - Telegram/SourceFiles/kotato/json_settings.cpp | 5 ++++ - Telegram/SourceFiles/kotato/settings.cpp | 11 ++++++++ - Telegram/SourceFiles/kotato/settings.h | 4 +++ + .../history/history_item_components.cpp | 7 +++- + .../SourceFiles/history/history_widget.cpp | 29 ++++++++++++++ + .../history/view/history_view_element.cpp | 7 ++++ + Telegram/SourceFiles/kotato/json_settings.cpp | 5 +++ + Telegram/SourceFiles/kotato/settings.cpp | 11 +++++ + Telegram/SourceFiles/kotato/settings.h | 4 ++ Telegram/SourceFiles/kotato/settings_menu.cpp | 1 + - 10 files changed, 65 insertions(+), 2 deletions(-) + Telegram/SourceFiles/main/main_session.cpp | 40 +++++++++++++++++++ + 10 files changed, 104 insertions(+), 2 deletions(-) -diff --git a/Telegram/Resources/langs/lang.strings b/Telegram/Resources/langs/lang.strings -index 2b8212d73..e1c7f2643 100644 ---- a/Telegram/Resources/langs/lang.strings -+++ b/Telegram/Resources/langs/lang.strings -@@ -2897,6 +2897,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL - "ktg_settings_forward_chat_on_click" = "Open chat on click"; - "ktg_settings_forward_chat_on_click_description" = "You can hold Ctrl to select multiple chats regardless of this option."; - -+"ktg_settings_block_users_in_groups" = "Block users in groups"; -+ - "ktg_forward_menu_quoted" = "Quoted"; - "ktg_forward_menu_unquoted" = "Unquoted with captions"; - "ktg_forward_menu_uncaptioned" = "Unquoted without captions"; diff --git a/Telegram/Resources/langs/rewrites/en.json b/Telegram/Resources/langs/rewrites/en.json -index 8c828daa4..2a1616ec9 100644 +index 846807a44..3d3f8205d 100644 --- a/Telegram/Resources/langs/rewrites/en.json +++ b/Telegram/Resources/langs/rewrites/en.json -@@ -181,6 +181,7 @@ +@@ -167,6 +167,7 @@ "ktg_admin_log_banned_send_games": "Send games", "ktg_admin_log_banned_use_inline": "Use inline bots", "ktg_forward_go_to_chat": "Go to chat", @@ -42,10 +29,10 @@ index 8c828daa4..2a1616ec9 100644 "ktg_settings_forward_retain_selection": "Retain selection after forward", "ktg_settings_forward_chat_on_click": "Open chat on click", diff --git a/Telegram/Resources/langs/rewrites/ru.json b/Telegram/Resources/langs/rewrites/ru.json -index 96c961099..b2ff772bd 100644 +index be0be9f7e..e8085cb45 100644 --- a/Telegram/Resources/langs/rewrites/ru.json +++ b/Telegram/Resources/langs/rewrites/ru.json -@@ -181,6 +181,7 @@ +@@ -167,6 +167,7 @@ "ktg_admin_log_banned_send_games": "Отправка игр", "ktg_admin_log_banned_use_inline": "Отправка через ботов", "ktg_forward_go_to_chat": "Перейти в чат", @@ -54,10 +41,10 @@ index 96c961099..b2ff772bd 100644 "ktg_settings_forward_retain_selection": "Сохранять выделение после пересылки", "ktg_settings_forward_chat_on_click": "Открывать чат по клику", diff --git a/Telegram/SourceFiles/history/history_item_components.cpp b/Telegram/SourceFiles/history/history_item_components.cpp -index 90ab65500..fa921b256 100644 +index 563cc4bcf..6535a7ba9 100644 --- a/Telegram/SourceFiles/history/history_item_components.cpp +++ b/Telegram/SourceFiles/history/history_item_components.cpp -@@ -349,7 +349,10 @@ void HistoryMessageReply::paint( +@@ -355,7 +355,10 @@ void HistoryMessageReply::paint( p.fillRect(rbar, bar); if (w > st::msgReplyBarSkip) { @@ -69,20 +56,20 @@ index 90ab65500..fa921b256 100644 auto hasPreview = replyToMsg->media() ? replyToMsg->media()->hasReplyPreview() : false; if (hasPreview && w < st::msgReplyBarSkip + st::msgReplyBarSize.height()) { hasPreview = false; -@@ -390,7 +393,7 @@ void HistoryMessageReply::paint( - p.setFont(st::msgDateFont); - auto &date = outbg ? (selected ? st::msgOutDateFgSelected : st::msgOutDateFg) : (selected ? st::msgInDateFgSelected : st::msgInDateFg); - p.setPen((flags & PaintFlag::InBubble) ? date : st::msgDateImgFg); +@@ -402,7 +405,7 @@ void HistoryMessageReply::paint( + p.setPen(inBubble + ? stm->msgDateFg + : st->msgDateImgFg()); - p.drawTextLeft(x + st::msgReplyBarSkip, y + st::msgReplyPadding.top() + (st::msgReplyBarSize.height() - st::msgDateFont->height) / 2, w + 2 * x, st::msgDateFont->elided(replyToMsgId ? tr::lng_profile_loading(tr::now) : tr::lng_deleted_message(tr::now), w - st::msgReplyBarSkip)); + p.drawTextLeft(x + st::msgReplyBarSkip, y + st::msgReplyPadding.top() + (st::msgReplyBarSize.height() - st::msgDateFont->height) / 2, w + 2 * x, st::msgDateFont->elided((replyToMsgId && (!blocked || !BlockUsersInGroups())) ? tr::lng_profile_loading(tr::now) : tr::lng_deleted_message(tr::now), w - st::msgReplyBarSkip)); } } } diff --git a/Telegram/SourceFiles/history/history_widget.cpp b/Telegram/SourceFiles/history/history_widget.cpp -index 1ceb4badf..585416c57 100644 +index 4324c7edc..8466e0055 100644 --- a/Telegram/SourceFiles/history/history_widget.cpp +++ b/Telegram/SourceFiles/history/history_widget.cpp -@@ -601,6 +601,34 @@ HistoryWidget::HistoryWidget( +@@ -641,6 +641,35 @@ HistoryWidget::HistoryWidget( }); }, lifetime()); @@ -100,7 +87,8 @@ index 1ceb4badf..585416c57 100644 + }); + }, lifetime()); + -+ session().api().blockedPeersSlice( ++ session().changes().peerUpdates( ++ Data::PeerUpdate::Flag::IsBlocked + ) | rpl::start_with_next([=] { + crl::on_main(this, [=] { + if (_history) { @@ -118,10 +106,10 @@ index 1ceb4badf..585416c57 100644 ) | rpl::start_with_next([=] { crl::on_main(this, [=] { diff --git a/Telegram/SourceFiles/history/view/history_view_element.cpp b/Telegram/SourceFiles/history/view/history_view_element.cpp -index ede5b7b51..fb361696a 100644 +index e588bdb92..ee8133474 100644 --- a/Telegram/SourceFiles/history/view/history_view_element.cpp +++ b/Telegram/SourceFiles/history/view/history_view_element.cpp -@@ -25,6 +25,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL +@@ -28,6 +28,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "ui/toast/toast.h" #include "ui/toasts/common_toasts.h" #include "data/data_session.h" @@ -129,7 +117,7 @@ index ede5b7b51..fb361696a 100644 #include "data/data_groups.h" #include "data/data_media_types.h" #include "lang/lang_keys.h" -@@ -433,6 +434,12 @@ bool Element::isHiddenByGroup() const { +@@ -477,6 +478,12 @@ bool Element::isHiddenByGroup() const { } bool Element::isHidden() const { @@ -143,18 +131,18 @@ index ede5b7b51..fb361696a 100644 } diff --git a/Telegram/SourceFiles/kotato/json_settings.cpp b/Telegram/SourceFiles/kotato/json_settings.cpp -index 464264048..9a7b904e0 100644 +index 7b1fab50a..37f657bd4 100644 --- a/Telegram/SourceFiles/kotato/json_settings.cpp +++ b/Telegram/SourceFiles/kotato/json_settings.cpp -@@ -359,6 +359,7 @@ QByteArray GenerateSettingsJson(bool areDefault = false) { +@@ -366,6 +366,7 @@ QByteArray GenerateSettingsJson(bool areDefault = false) { settings.insert(qsl("sticker_scale_both"), StickerScaleBoth()); settings.insert(qsl("adaptive_bubbles"), AdaptiveBubbles()); settings.insert(qsl("big_emoji_outline"), BigEmojiOutline()); + settings.insert(qsl("block_users_in_groups"), BlockUsersInGroups()); settings.insert(qsl("always_show_scheduled"), cAlwaysShowScheduled()); - settings.insert(qsl("show_chat_id"), cShowChatId()); + settings.insert(qsl("show_chat_id"), ShowChatId()); settings.insert(qsl("show_phone_in_drawer"), cShowPhoneInDrawer()); -@@ -509,6 +510,10 @@ bool Manager::readCustomFile() { +@@ -529,6 +530,10 @@ bool Manager::readCustomFile() { SetBigEmojiOutline(v); }); @@ -166,10 +154,10 @@ index 464264048..9a7b904e0 100644 cSetAlwaysShowScheduled(v); }); diff --git a/Telegram/SourceFiles/kotato/settings.cpp b/Telegram/SourceFiles/kotato/settings.cpp -index 4614fc505..01bf7d71b 100644 +index e073d96f6..0b2dd5241 100644 --- a/Telegram/SourceFiles/kotato/settings.cpp +++ b/Telegram/SourceFiles/kotato/settings.cpp -@@ -77,6 +77,17 @@ rpl::producer<bool> MonospaceLargeBubblesChanges() { +@@ -79,6 +79,17 @@ rpl::producer<bool> MonospaceLargeBubblesChanges() { return gMonospaceLargeBubbles.changes(); } @@ -185,13 +173,13 @@ index 4614fc505..01bf7d71b 100644 +} + bool gAlwaysShowScheduled = false; - int gShowChatId = 2; + rpl::variable<int> gShowChatId = 2; diff --git a/Telegram/SourceFiles/kotato/settings.h b/Telegram/SourceFiles/kotato/settings.h -index 209c5133d..36f88b338 100644 +index 6d3a82d9d..dcc98b319 100644 --- a/Telegram/SourceFiles/kotato/settings.h +++ b/Telegram/SourceFiles/kotato/settings.h -@@ -53,6 +53,10 @@ void SetMonospaceLargeBubbles(bool enabled); +@@ -62,6 +62,10 @@ void SetMonospaceLargeBubbles(bool enabled); [[nodiscard]] bool MonospaceLargeBubbles(); [[nodiscard]] rpl::producer<bool> MonospaceLargeBubblesChanges(); @@ -200,13 +188,13 @@ index 209c5133d..36f88b338 100644 +[[nodiscard]] rpl::producer<bool> BlockUsersInGroupsChanges(); + DeclareSetting(bool, AlwaysShowScheduled); - DeclareSetting(int, ShowChatId); + void SetShowChatId(int chatIdType); diff --git a/Telegram/SourceFiles/kotato/settings_menu.cpp b/Telegram/SourceFiles/kotato/settings_menu.cpp -index 2c836018c..13396a94e 100644 +index 6c9ab475b..d7760b729 100644 --- a/Telegram/SourceFiles/kotato/settings_menu.cpp +++ b/Telegram/SourceFiles/kotato/settings_menu.cpp -@@ -377,6 +377,7 @@ void SetupKotatoMessages(not_null<Ui::VerticalLayout*> container) { +@@ -444,6 +444,7 @@ void SetupKotatoMessages(not_null<Ui::VerticalLayout*> container) { } SettingsMenuSwitch(ktg_settings_emoji_outline, BigEmojiOutline); @@ -214,6 +202,71 @@ index 2c836018c..13396a94e 100644 AddSkip(container); } +diff --git a/Telegram/SourceFiles/main/main_session.cpp b/Telegram/SourceFiles/main/main_session.cpp +index 99e02e2aa..40d4f8fa1 100644 +--- a/Telegram/SourceFiles/main/main_session.cpp ++++ b/Telegram/SourceFiles/main/main_session.cpp +@@ -11,6 +11,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL + #include "api/api_updates.h" + #include "api/api_send_progress.h" + #include "api/api_user_privacy.h" ++#include "api/api_blocked_peers.h" + #include "main/main_account.h" + #include "main/main_domain.h" + #include "main/main_session_settings.h" +@@ -61,6 +62,43 @@ constexpr auto kTmpPasswordReserveTime = TimeId(10); + return MTP::ConfigFields().internalLinksDomain; + } + ++void InitializeBlockedPeers(not_null<Main::Session*> session) { ++ const auto offset = std::make_shared<int>(0); ++ const auto allLoaded = std::make_shared<bool>(false); ++ const auto applySlice = [=]( ++ const Api::BlockedPeers::Slice &slice, ++ auto self) -> void { ++ if (slice.list.empty()) { ++ *allLoaded = true; ++ } ++ ++ *offset += slice.list.size(); ++ for (const auto &item : slice.list) { ++ if (const auto peer = session->data().peerLoaded(item.id)) { ++ peer->setIsBlocked(true); ++ } ++ } ++ if (*offset >= slice.total) { ++ *allLoaded = true; ++ } ++ ++ if (!*allLoaded) { ++ session->api().blockedPeers().request( ++ *offset, ++ [=](const Api::BlockedPeers::Slice &slice) { ++ self(slice, self); ++ }); ++ } ++ }; ++ ++ session->api().blockedPeers().slice( ++ ) | rpl::take( ++ 1 ++ ) | rpl::start_with_next([=](const Api::BlockedPeers::Slice &result) { ++ applySlice(result, applySlice); ++ }, session->lifetime()); ++} ++ + } // namespace + + Session::Session( +@@ -149,6 +187,8 @@ Session::Session( + _api->requestNotifySettings(MTP_inputNotifyUsers()); + _api->requestNotifySettings(MTP_inputNotifyChats()); + _api->requestNotifySettings(MTP_inputNotifyBroadcasts()); ++ ++ InitializeBlockedPeers(this); + } + + void Session::setTmpPassword(const QByteArray &password, TimeId validUntil) { -- -2.31.1 +2.33.1 @@ -1,125 +1,123 @@ # Maintainer: Francesco Minnocci <ascoli dot minnocci at gmail dot com> +# Co Maintainer: 3Jl0y_PYCCKUi <3jl0y_pycckui@riseup.net> +# Contributor: solopasha <daron439 at gmail dot com> +# Contributor: Ilya Fedin <fedin-ilja2010@ya.ru> +# Contributor: Auteiy <dmitry@auteiy.me> pkgname=kotatogram-dev-git _pkgname=kotatogram-desktop -pkgver=k1.4.12.g40df43998 -pkgrel=6 -pkgdesc="Kotatogram – experimental Telegram Desktop fork - Dev branch" -arch=(x86_64) -url="https://github.com/kotatogram/kotatogram-desktop" -license=(GPL3) -depends=( - qt5-imageformats - ffmpeg - openal - glibmm - kwayland - lz4 - xxhash - minizip - libdbusmenu-qt5 - hunspell -) -makedepends=( - cmake - git - ninja - python - range-v3 - tl-expected - microsoft-gsl - libtg_owt - gtk3 - webkit2gtk -) -optdepends=( - 'ttf-opensans: default Open Sans font family' -) -conflicts=('kotatogram-desktop') -provides=('kotatogram-desktop') -source=( - "${_pkgname}::git+${url}.git#branch=dev" - "${_pkgname}-libtgvoip::git+https://github.com/telegramdesktop/libtgvoip" - "${_pkgname}-rlottie::git+https://github.com/desktop-app/rlottie.git" - "${_pkgname}-lib_crl::git+https://github.com/desktop-app/lib_crl.git" - "${_pkgname}-lib_rpl::git+https://github.com/desktop-app/lib_rpl.git" - "${_pkgname}-lib_base::git+https://github.com/kotatogram/lib_base.git" - "${_pkgname}-codegen::git+https://github.com/desktop-app/codegen.git" - "${_pkgname}-lib_ui::git+https://github.com/kotatogram/lib_ui.git" - "${_pkgname}-lib_rlottie::git+https://github.com/desktop-app/lib_rlottie.git" - "${_pkgname}-lib_lottie::git+https://github.com/desktop-app/lib_lottie.git" - "${_pkgname}-lib_tl::git+https://github.com/desktop-app/lib_tl.git" - "${_pkgname}-lib_spellcheck::git+https://github.com/desktop-app/lib_spellcheck" - "${_pkgname}-lib_storage::git+https://github.com/desktop-app/lib_storage.git" - "${_pkgname}-cmake_helpers::git+https://github.com/kotatogram/cmake_helpers.git" - "${_pkgname}-QR-Code-generator::git+https://github.com/nayuki/QR-Code-generator" - "${_pkgname}-lib_qr::git+https://github.com/desktop-app/lib_qr.git" - "${_pkgname}-lib_webrtc::git+https://github.com/desktop-app/lib_webrtc.git" - "${_pkgname}-tgcalls::git+https://github.com/TelegramMessenger/tgcalls.git" - "${_pkgname}-lib_webview::git+https://github.com/kotatogram/lib_webview.git" - "${_pkgname}-mallocng::git+https://github.com/desktop-app/mallocng.git" - "0001-Add-an-option-to-hide-messages-from-blocked-users-in.patch" - "dlopen-gtk.patch" - "https://github.com/telegramdesktop/tdesktop/commit/71deaa48afab2bcf9df67b9b347b1f44aad3a9ce.patch" - "https://github.com/telegramdesktop/tdesktop/commit/a8807bc915f2439acc7c84f06d931d96d6ca602a.patch" - "https://github.com/telegramdesktop/tdesktop/commit/d87ea056c6166345d061fc3a69a6f95eceaab0a1.patch" - "https://github.com/telegramdesktop/tdesktop/commit/98180d3a9e994081a134196adad0023651d28bf3.patch" - "https://github.com/telegramdesktop/tdesktop/commit/383acf0ffc489990302797ff0f048519b3c7c9bf.patch" - "lib_base-gcc11-fix.patch" - "lib_base-gtk-loading-fix.patch" - "https://github.com/desktop-app/lib_webview/commit/8816639c74a4cb6d512cba8e2271aceb404b0492.patch" - "mallocng.patch" - "https://github.com/desktop-app/cmake_helpers/commit/5318ac7c54dbf33b17ccc4bd3281bb8b8db25e02.patch" - "https://github.com/desktop-app/cmake_helpers/commit/de65519132126db2c2166cdf5af5f12e61652419.patch" - "https://github.com/desktop-app/cmake_helpers/commit/45be9e321517f15378982bd0353f80ab884679eb.patch" - "https://github.com/desktop-app/cmake_helpers/commit/bcc0ac15f497513455aa144ffe4e658f7aca0e73.patch") -sha512sums=('SKIP' - 'SKIP' - 'SKIP' - 'SKIP' - 'SKIP' - 'SKIP' - 'SKIP' - 'SKIP' - 'SKIP' - 'SKIP' - 'SKIP' - 'SKIP' - 'SKIP' - 'SKIP' - 'SKIP' - 'SKIP' - 'SKIP' - 'SKIP' - 'SKIP' - 'SKIP' - '13357d081fb658c735bb2575360f5d48214e1cf5002719ba410405a2fe05c7c3d2379588c2ca3c2ca6a5e6ff64e01e6d1ff3aecdaee8f3dd0519a64f6ee94182' - '3a2cf87836153d2a184b18e8ede4a279e5b55c6c8023e2ac5234482c510c4a7aff58fade8f6fcb4d52fb76601afda11b676694d4eaf3029836101aeeee0007e7' - 'cabdadddc7a6873c7c6fc8128ceddf2712c0c73d3316520482162e5c67937bda2a627ddb2f078558a52e812c2a876351196488a5a75381d84a43815b873bac5b' - 'a88ceb0de04c8f895b804f6df4112553f083076cdd3caa39595f944fb523b3b03e0a33dc7f94d808f83183bcd525a86c6fa1f1375ae34a62d12db2167dec84a3' - '9dc2d75745c434d46b220cf44f4dfe2a96cee230f5a404e5e2ce8b1ce82dbcca9b4a22231722054f37a54af5030ab6575edad07d16c9fc4bfea88cfcf3ed6a62' - 'a18bef9252ce9db64d0d47daafc1958aea448218062c82d4863c880e0c5767ccb3331f84a7f84648002c207ced66cb89c1de57e93939ddb8c270c8728c08e5d6' - 'c7fa111149a0ee71c975c26ef942e96615c03f99a477c2abb2a1b67711a85706e7b2fdce626c01d2ba1fb43c1cc3e0cea0c53d47291a0d851e32fabfc7360330' - 'ce364d20b9c3e8d65d4d0def6c2f025e16814c8782c78f720ee5e9891e0b296c6edca9f3a7fa46652516c6a748e29a8cdbbf5f7d1273e4e1a64c7216275c5cda' - '956cd39e5a488b8ce02eddbca75c3f05467dcd4ff0f62907a966a1ad36b7d9329130e48f570f2e3ee95c135a085106442ce87bd48e0288db3bf8d8f06821f28d' - 'c82e41e9fab49d7eca4602327ebb10c795cf6db414a3c5fe91271af336c327fed5a5c67e3219734e20b7559ff7cbca220be8b94b3b551bf33c162c90370e5af3' - '12c6a439b3960cb5a25edd2b2b1959f96fdbba634f281890f5ec91420834a852a7bcfa5d11051dfdf4fe719137345b23ae77a8e48eb6b9444ad973a34574cb84' - '2f7c24851e9879b238366c82f35a046c5a69ec5059e6441ac6eae578450669f094bb659a63b79be635dcae93ddd388bc957e29a219cc3cfc0e6591f0f333d7e3' - '6bce17e6e763859a95a35ff759b56aa5e51b7ba7534d5502517ae3a970cb42d901b2f6a9862a4ef06adfa5ef85e6e3e517a16ce7ab516ee9f3e4c21c38bb8cdb' - '110654df22e36fc3185e8db05fd4cefcee30ade1a76f0640b97a15bcf532b8b560e8a9740f4e73be48accad4459487e5246d8f44d988a021b9f8024d27d29bfe' - 'db3d5b53436a732ea2950c7772c9edec2e6879caefa2bfb6112e5bb12f464a33a11ca9d4f3d2699da99df97d6721fbcf958a8b2256e911fb9a18c8229e5b67fd') +pkgver=k1.4.5.r550.gb9a479517 +pkgrel=7 +pkgdesc='Kotatogram – experimental Telegram Desktop fork - Dev branch' +arch=('x86_64') +url="https://kotatogram.github.io" +license=('GPL3') +provides=(kotatogram-desktop kotatogram-desktop-git) +depends=('hunspell' 'ffmpeg' 'hicolor-icon-theme' 'lz4' 'minizip' 'openal' 'ttf-opensans' + 'qt5-imageformats' 'qt5-svg' 'qt5-wayland' 'libdbusmenu-qt5' 'xxhash' 'kwayland' 'glibmm' + 'rnnoise' 'jemalloc') +makedepends=('cmake' 'git' 'ninja' 'python' 'range-v3' 'tl-expected' 'microsoft-gsl' + 'extra-cmake-modules' 'webkit2gtk' 'unzip' 'protobuf' 'libxrandr' 'libxcomposite' 'openssl' 'glibc' + 'ffmpeg' 'libva' 'opus' 'yasm' 'libjpeg-turbo' 'pipewire' 'libxtst' 'abseil-cpp') +optdepends=('webkit2gtk: embedded browser features' + 'xdg-desktop-portal: desktop integration') +conflicts=('kotatogram-desktop-bin' 'kotatogram-desktop-dynamic-bin' 'kotatogram-desktop') +source=("${_pkgname}::git+https://github.com/kotatogram/${_pkgname}.git#branch=dev" + "${_pkgname}-libtgvoip::git+https://github.com/telegramdesktop/libtgvoip.git" + "${_pkgname}-GSL::git+https://github.com/Microsoft/GSL.git" + "${_pkgname}-Catch::git+https://github.com/philsquared/Catch" + "${_pkgname}-xxHash::git+https://github.com/Cyan4973/xxHash.git" + "${_pkgname}-rlottie::git+https://github.com/desktop-app/rlottie.git" + "${_pkgname}-lz4::git+https://github.com/lz4/lz4.git" + "${_pkgname}-lib_crl::git+https://github.com/desktop-app/lib_crl.git" + "${_pkgname}-lib_rpl::git+https://github.com/desktop-app/lib_rpl.git" + "${_pkgname}-lib_base::git+https://github.com/desktop-app/lib_base.git" + "${_pkgname}-codegen::git+https://github.com/desktop-app/codegen.git" + "${_pkgname}-lib_ui::git+https://github.com/kotatogram/lib_ui.git" + "${_pkgname}-lib_rlottie::git+https://github.com/desktop-app/lib_rlottie.git" + "${_pkgname}-lib_lottie::git+https://github.com/desktop-app/lib_lottie.git" + "${_pkgname}-lib_tl::git+https://github.com/desktop-app/lib_tl.git" + "${_pkgname}-lib_spellcheck::git+https://github.com/desktop-app/lib_spellcheck.git" + "${_pkgname}-lib_storage::git+https://github.com/desktop-app/lib_storage.git" + "${_pkgname}-cmake_helpers::git+https://github.com/kotatogram/cmake_helpers.git" + "${_pkgname}-expected::git+https://github.com/TartanLlama/expected.git" + "${_pkgname}-QR-Code-generator::git+https://github.com/nayuki/QR-Code-generator.git" + "${_pkgname}-lib_qr::git+https://github.com/desktop-app/lib_qr.git" + "${_pkgname}-libdbusmenu-qt::git+https://github.com/desktop-app/libdbusmenu-qt.git" + "${_pkgname}-hunspell::git+https://github.com/hunspell/hunspell.git" + "${_pkgname}-range-v3::git+https://github.com/ericniebler/range-v3.git" + "${_pkgname}-fcitx-qt5::git+https://github.com/fcitx/fcitx-qt5.git" + "${_pkgname}-nimf::git+https://github.com/hamonikr/nimf.git" + "${_pkgname}-hime::git+https://github.com/hime-ime/hime.git" + "${_pkgname}-fcitx5-qt::git+https://github.com/fcitx/fcitx5-qt.git" + "${_pkgname}-lib_webrtc::git+https://github.com/desktop-app/lib_webrtc.git" + "${_pkgname}-tgcalls::git+https://github.com/TelegramMessenger/tgcalls.git" + "${_pkgname}-lib_webview::git+https://github.com/desktop-app/lib_webview.git" + "${_pkgname}-lib_waylandshells::git+https://github.com/desktop-app/lib_waylandshells.git" + "${_pkgname}-jemalloc::git+https://github.com/jemalloc/jemalloc.git" + "${_pkgname}-tg_owt::git+https://github.com/desktop-app/tg_owt.git" + + "libvpx::git+https://chromium.googlesource.com/webm/libvpx.git" + "libyuv::git+https://chromium.googlesource.com/libyuv/libyuv.git" + "pipewire::git+https://github.com/PipeWire/pipewire.git" + + "0001-Add-an-option-to-hide-messages-from-blocked-users-in.patch" + "block-sponsored_messages.patch" + "lottie-fix.patch") + + +b2sums=('SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + '462900e97b9d7a9d40bc02d3dc7dacd3060cc19af02135065628e38e83835a2fb438581ca78001aaffc27d8b0473a78d39509c35f50e4ebb25607fe9c6bae264' + '1e2705008ea8cef1a5c46793a6115ba0f35f77529d18ea04a03e5a0e89980916d78d49a9aa86863b1a0b440debb650262ceb3c9d68600ffe6e5c98fd65804526' + '8feeb47ad0c238b32cb91788340b8794d6e58fa3a1c4027a57f7edcbd2c30d755cf27a778d446d59a4dbc07c255f3d0bcefdce4b5322ed2d00854c6e4a7831e0') pkgver() { cd "${srcdir}/${_pkgname}" - - git describe --tags --long | sed 's/-/./g' + git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g' } prepare() { cd "${srcdir}/${_pkgname}" git submodule init - git config submodule.Telegram/ThirdParty/libtgvoip.url "${srcdir}/${_pkgname}-libtgvoip" - git config submodule.Telegram/ThirdParty/rlottie.url "${srcdir}/${_pkgname}-rlottie" + + git config submodule.cmake.url "${srcdir}/${_pkgname}-cmake_helpers" + git config submodule.Telegram/lib_crl.url "${srcdir}/${_pkgname}-lib_crl" git config submodule.Telegram/lib_rpl.url "${srcdir}/${_pkgname}-lib_rpl" git config submodule.Telegram/lib_base.url "${srcdir}/${_pkgname}-lib_base" @@ -130,66 +128,69 @@ prepare() { git config submodule.Telegram/lib_tl.url "${srcdir}/${_pkgname}-lib_tl" git config submodule.Telegram/lib_spellcheck.url "${srcdir}/${_pkgname}-lib_spellcheck" git config submodule.Telegram/lib_storage.url "${srcdir}/${_pkgname}-lib_storage" - git config submodule.cmake.url "${srcdir}/${_pkgname}-cmake_helpers" - git config submodule.Telegram/ThirdParty/QR.url "${srcdir}/${_pkgname}-QR-Code-generator" git config submodule.Telegram/lib_qr.url "${srcdir}/${_pkgname}-lib_qr" - git config sumbodule.Telegram/lib_webrtc.url "${srcdir}/${_pkgname}-lib_webrtc" - git config sumbodule.Telegram/ThirdParty/tgcalls.url "${srcdir}/${_pkgname}-tgcalls" + git config submodule.Telegram/lib_webrtc.url "${srcdir}/${_pkgname}-lib_webrtc" git config submodule.Telegram/lib_webview.url "${srcdir}/${_pkgname}-lib_webview" + git config submodule.Telegram/lib_waylandshells.url "${srcdir}/${_pkgname}-lib_waylandshells" + + git config submodule.Telegram/ThirdParty/libtgvoip.url "${srcdir}/${_pkgname}-libtgvoip" + git config submodule.Telegram/ThirdParty/GSL.url "${srcdir}/${_pkgname}-GSL" + git config submodule.Telegram/ThirdParty/Catch.url "${srcdir}/${_pkgname}-Catch" + git config submodule.Telegram/ThirdParty/xxHash.url "${srcdir}/${_pkgname}-xxHash" + git config submodule.Telegram/ThirdParty/rlottie.url "${srcdir}/${_pkgname}-rlottie" + git config submodule.Telegram/ThirdParty/lz4.url "${srcdir}/${_pkgname}-lz4" + git config submodule.Telegram/ThirdParty/expected.url "${srcdir}/${_pkgname}-expected" + git config submodule.Telegram/ThirdParty/QR.url "${srcdir}/${_pkgname}-QR-Code-generator" + git config submodule.Telegram/ThirdParty/libdbusmenu-qt.url "${srcdir}/${_pkgname}-libdbusmenu-qt" + git config submodule.Telegram/ThirdParty/hunspell.url "${srcdir}/${_pkgname}-hunspell" + git config submodule.Telegram/ThirdParty/range-v3.url "${srcdir}/${_pkgname}-range-v3" + git config submodule.Telegram/ThirdParty/fcitx-qt5.url "${srcdir}/${_pkgname}-fcitx-qt5" + git config submodule.Telegram/ThirdParty/nimf.url "${srcdir}/${_pkgname}-nimf" + git config submodule.Telegram/ThirdParty/hime.url "${srcdir}/${_pkgname}-hime" + git config submodule.Telegram/ThirdParty/fcitx5-qt.url "${srcdir}/${_pkgname}-fcitx5-qt" + git config submodule.Telegram/ThirdParty/tgcalls.url "${srcdir}/${_pkgname}-tgcalls" + git config submodule.Telegram/ThirdParty/jemalloc.url "${srcdir}/${_pkgname}-jemalloc" + + git submodule update + + #patches + patch -p1 < "${srcdir}/0001-Add-an-option-to-hide-messages-from-blocked-users-in.patch" + patch -p1 < "${srcdir}/block-sponsored_messages.patch" + + cd "${srcdir}/${_pkgname}-tg_owt" + git submodule init + git config submodule.src/third_party/libvpx/source/libvpx.url "$srcdir"/libvpx + git config submodule.src/third_party/libyuv.url "$srcdir"/libyuv + git config submodule.src/third_party/pipewire.url "$srcdir"/pipewire git submodule update - pushd cmake - # force webrtc link to libjpeg - echo "target_link_libraries(external_webrtc INTERFACE jpeg)" | tee -a external/webrtc/CMakeLists.txt - popd - - patch -p1 < ${srcdir}/0001-Add-an-option-to-hide-messages-from-blocked-users-in.patch - # patch -p1 < ${srcdir}/dlopen-gtk.patch - - # some fixes - # patch -p1 < ${srcdir}/71deaa48afab2bcf9df67b9b347b1f44aad3a9ce.patch - patch -p1 < ${srcdir}/a8807bc915f2439acc7c84f06d931d96d6ca602a.patch - patch -p1 < ${srcdir}/d87ea056c6166345d061fc3a69a6f95eceaab0a1.patch - patch -p1 < ${srcdir}/98180d3a9e994081a134196adad0023651d28bf3.patch - patch -p1 < ${srcdir}/383acf0ffc489990302797ff0f048519b3c7c9bf.patch - pushd Telegram/lib_base - patch -p1 < ${srcdir}/lib_base-gcc11-fix.patch - patch -p1 < ${srcdir}/lib_base-gtk-loading-fix.patch - popd - pushd Telegram/lib_webview - patch -p1 < ${srcdir}/8816639c74a4cb6d512cba8e2271aceb404b0492.patch - popd - - # backported mallocng usage - patch -p1 < ${srcdir}/mallocng.patch - pushd cmake - patch -p1 < ${srcdir}/5318ac7c54dbf33b17ccc4bd3281bb8b8db25e02.patch - patch -p1 < ${srcdir}/de65519132126db2c2166cdf5af5f12e61652419.patch - patch -p1 < ${srcdir}/45be9e321517f15378982bd0353f80ab884679eb.patch - patch -p1 < ${srcdir}/bcc0ac15f497513455aa144ffe4e658f7aca0e73.patch - popd - git submodule add "${srcdir}/${_pkgname}-mallocng" Telegram/ThirdParty/mallocng - pushd Telegram/ThirdParty/mallocng - git checkout cf3eabc443292aad8ee63491274d7865b5e0864c - popd + cd "${srcdir}/${_pkgname}/Telegram/lib_lottie/" + patch -p1 < $srcdir/lottie-fix.patch } build() { - cd "${srcdir}/${_pkgname}/" - - cmake . \ - -B build \ - -G Ninja \ - -DCMAKE_INSTALL_PREFIX="/usr" \ - -DCMAKE_BUILD_TYPE=Release \ - -DTDESKTOP_API_TEST=ON + cd "${srcdir}/${_pkgname}-tg_owt" + cmake . \ + -B build \ + -G Ninja \ + -DCMAKE_BUILD_TYPE=Release \ + -DTG_OWT_BUILD_AUDIO_BACKENDS=OFF \ + -DBUILD_SHARED_LIBS=OFF + cmake --build build - cmake --build build + cd "${srcdir}/${_pkgname}" + cmake . \ + -B build \ + -G Ninja \ + -DCMAKE_INSTALL_PREFIX="/usr" \ + -DCMAKE_BUILD_TYPE=Release \ + -DDESKTOP_APP_QT6=off \ + -Dtg_owt_DIR="${srcdir}/${_pkgname}-tg_owt/build" \ + -DTDESKTOP_API_TEST=ON + cmake --build build } package() { - cd "${srcdir}/${_pkgname}" - - DESTDIR="$pkgdir" ninja -C build install + cd "${srcdir}/${_pkgname}" + DESTDIR="$pkgdir" cmake --install build } -# vim:set ts=2 sw=2 et: diff --git a/block-sponsored_messages.patch b/block-sponsored_messages.patch new file mode 100644 index 000000000000..f3640501fbe5 --- /dev/null +++ b/block-sponsored_messages.patch @@ -0,0 +1,13 @@ +diff --git a/Telegram/SourceFiles/data/data_sponsored_messages.cpp b/Telegram/SourceFiles/data/data_sponsored_messages.cpp +index 1dc5b49..91cba9c 100644 +--- a/Telegram/SourceFiles/data/data_sponsored_messages.cpp ++++ b/Telegram/SourceFiles/data/data_sponsored_messages.cpp +@@ -93,7 +93,7 @@ bool SponsoredMessages::append(not_null<History*> history) { + } + + bool SponsoredMessages::canHaveFor(not_null<History*> history) const { +- return history->isChannel(); ++ return false; + } + + void SponsoredMessages::request(not_null<History*> history) { diff --git a/dlopen-gtk.patch b/dlopen-gtk.patch deleted file mode 100644 index 7f4fb54720bb..000000000000 --- a/dlopen-gtk.patch +++ /dev/null @@ -1,106 +0,0 @@ -diff --git a/Telegram/CMakeLists.txt b/Telegram/CMakeLists.txt -index fe177acf6..3adfac28d 100644 ---- a/Telegram/CMakeLists.txt -+++ b/Telegram/CMakeLists.txt -@@ -116,21 +116,11 @@ elseif (LINUX) - if (NOT DESKTOP_APP_DISABLE_GTK_INTEGRATION) - find_package(PkgConfig REQUIRED) - -- if (DESKTOP_APP_USE_PACKAGED AND NOT DESKTOP_APP_USE_PACKAGED_LAZY) -- pkg_check_modules(GTK3 REQUIRED IMPORTED_TARGET gtk+-3.0) -- target_link_libraries(Telegram PRIVATE PkgConfig::GTK3) -+ pkg_search_module(GTK REQUIRED gtk+-3.0 gtk+-2.0) -+ target_include_directories(Telegram PRIVATE ${GTK_INCLUDE_DIRS}) - -- if (NOT DESKTOP_APP_DISABLE_X11_INTEGRATION) -- pkg_check_modules(X11 REQUIRED IMPORTED_TARGET x11) -- target_link_libraries(Telegram PRIVATE PkgConfig::X11) -- endif() -- else() -- pkg_search_module(GTK REQUIRED gtk+-3.0 gtk+-2.0) -- target_include_directories(Telegram PRIVATE ${GTK_INCLUDE_DIRS}) -- -- if (NOT DESKTOP_APP_DISABLE_X11_INTEGRATION) -- target_link_libraries(Telegram PRIVATE X11) -- endif() -+ if (NOT DESKTOP_APP_DISABLE_X11_INTEGRATION) -+ target_link_libraries(Telegram PRIVATE X11) - endif() - endif() - endif() -Submodule Telegram/lib_base contains modified content -diff --git a/Telegram/lib_base/CMakeLists.txt b/Telegram/lib_base/CMakeLists.txt -index b413b47..e3f5973 100644 ---- a/Telegram/lib_base/CMakeLists.txt -+++ b/Telegram/lib_base/CMakeLists.txt -@@ -242,21 +242,11 @@ if (LINUX) - if (NOT DESKTOP_APP_DISABLE_GTK_INTEGRATION) - find_package(PkgConfig REQUIRED) - -- if (DESKTOP_APP_USE_PACKAGED AND NOT DESKTOP_APP_USE_PACKAGED_LAZY) -- pkg_check_modules(GTK3 REQUIRED IMPORTED_TARGET gtk+-3.0) -- target_link_libraries(lib_base PUBLIC PkgConfig::GTK3) -+ pkg_search_module(GTK REQUIRED gtk+-3.0 gtk+-2.0) -+ target_include_directories(lib_base PUBLIC ${GTK_INCLUDE_DIRS}) - -- if (NOT DESKTOP_APP_DISABLE_X11_INTEGRATION) -- pkg_check_modules(X11 REQUIRED IMPORTED_TARGET x11) -- target_link_libraries(lib_base PUBLIC PkgConfig::X11) -- endif() -- else() -- pkg_search_module(GTK REQUIRED gtk+-3.0 gtk+-2.0) -- target_include_directories(lib_base PUBLIC ${GTK_INCLUDE_DIRS}) -- -- if (NOT DESKTOP_APP_DISABLE_X11_INTEGRATION) -- target_link_libraries(lib_base PUBLIC X11) -- endif() -+ if (NOT DESKTOP_APP_DISABLE_X11_INTEGRATION) -+ target_link_libraries(lib_base PUBLIC X11) - endif() - endif() - endif() -diff --git a/Telegram/lib_base/base/platform/linux/base_linux_gtk_integration_p.h b/Telegram/lib_base/base/platform/linux/base_linux_gtk_integration_p.h -index 73a5bb4..d9551df 100644 ---- a/Telegram/lib_base/base/platform/linux/base_linux_gtk_integration_p.h -+++ b/Telegram/lib_base/base/platform/linux/base_linux_gtk_integration_p.h -@@ -15,10 +15,6 @@ extern "C" { - #include <gdk/gdk.h> - } // extern "C" - --#if defined DESKTOP_APP_USE_PACKAGED && !defined DESKTOP_APP_USE_PACKAGED_LAZY --#define LINK_TO_GTK --#endif // DESKTOP_APP_USE_PACKAGED && !DESKTOP_APP_USE_PACKAGED_LAZY -- - #ifdef LINK_TO_GTK - #define LOAD_GTK_SYMBOL(lib, func) (func = ::func) - #else // LINK_TO_GTK -Submodule Telegram/lib_webview contains modified content -diff --git a/Telegram/lib_webview/CMakeLists.txt b/Telegram/lib_webview/CMakeLists.txt -index 1f26f0a..f725630 100644 ---- a/Telegram/lib_webview/CMakeLists.txt -+++ b/Telegram/lib_webview/CMakeLists.txt -@@ -119,19 +119,11 @@ elseif (LINUX) - if (NOT DESKTOP_APP_DISABLE_GTK_INTEGRATION) - find_package(PkgConfig REQUIRED) - -- if (DESKTOP_APP_USE_PACKAGED AND NOT DESKTOP_APP_USE_PACKAGED_LAZY) -- pkg_check_modules(GTK3 REQUIRED IMPORTED_TARGET gtk+-3.0) -- target_link_libraries(lib_webview PUBLIC PkgConfig::GTK3) -- -- pkg_check_modules(WEBKIT REQUIRED IMPORTED_TARGET webkit2gtk-4.0) -- target_link_libraries(lib_webview PUBLIC PkgConfig::WEBKIT) -- else() -- pkg_check_modules(GTK3 REQUIRED gtk+-3.0) -- target_include_directories(lib_webview PUBLIC ${GTK3_INCLUDE_DIRS}) -- -- pkg_check_modules(WEBKIT REQUIRED webkit2gtk-4.0) -- target_include_directories(lib_webview PUBLIC ${WEBKIT_INCLUDE_DIRS}) -- endif() -+ pkg_check_modules(GTK3 REQUIRED gtk+-3.0) -+ target_include_directories(lib_webview PUBLIC ${GTK3_INCLUDE_DIRS}) -+ -+ pkg_check_modules(WEBKIT REQUIRED webkit2gtk-4.0) -+ target_include_directories(lib_webview PUBLIC ${WEBKIT_INCLUDE_DIRS}) - else() - remove_target_sources(lib_webview ${src_loc} - webview/platform/linux/webview_linux_webkit_gtk.cpp diff --git a/lib_base-gcc11-fix.patch b/lib_base-gcc11-fix.patch deleted file mode 100644 index 2405329b0e29..000000000000 --- a/lib_base-gcc11-fix.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/base/platform/linux/base_linux_gtk_integration.h b/base/platform/linux/base_linux_gtk_integration.h -index be19ce0..6622d3e 100644 ---- a/base/platform/linux/base_linux_gtk_integration.h -+++ b/base/platform/linux/base_linux_gtk_integration.h -@@ -10,6 +10,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL - #include "base/const_string.h" - - #include <QtCore/QLibrary> -+#include <optional> - - namespace base { - namespace Platform { diff --git a/lib_base-gtk-loading-fix.patch b/lib_base-gtk-loading-fix.patch deleted file mode 100644 index acc27f7d0bff..000000000000 --- a/lib_base-gtk-loading-fix.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/base/platform/linux/base_linux_gtk_integration.cpp b/base/platform/linux/base_linux_gtk_integration.cpp -index 41f2908..9b8e852 100644 ---- a/base/platform/linux/base_linux_gtk_integration.cpp -+++ b/base/platform/linux/base_linux_gtk_integration.cpp -@@ -262,8 +262,6 @@ void GtkIntegration::load() { - DEBUG_LOG(("Icon theme: %1").arg(QIcon::themeName())); - DEBUG_LOG(("Fallback icon theme: %1").arg(QIcon::fallbackThemeName())); - -- _lib.setLoadHints(QLibrary::DeepBindHint); -- - if (LoadLibrary(_lib, "gtk-3", 0)) { - Loaded = SetupGtkBase(_lib); - } diff --git a/lottie-fix.patch b/lottie-fix.patch new file mode 100644 index 000000000000..7c6aa4ee23d6 --- /dev/null +++ b/lottie-fix.patch @@ -0,0 +1,22 @@ +diff --git a/lottie/details/lottie_frame_provider_direct.cpp b/lottie/details/lottie_frame_provider_direct.cpp +index 4c3cad3..e5f5d6f 100644 +--- a/lottie/details/lottie_frame_provider_direct.cpp ++++ b/lottie/details/lottie_frame_provider_direct.cpp +@@ -30,7 +30,8 @@ int GetLottieFrameIndex(not_null<rlottie::Animation*> animation, Quality quality + return (quality == Quality::Default && rate == 60) ? (index * 2) : index; + } + +-[[nodiscard]] rlottie::FitzModifier MapModifier(SkinModifier modifier) { ++#ifndef DESKTOP_APP_USE_PACKAGED_RLOTTIE ++[nodiscard]] rlottie::FitzModifier MapModifier(SkinModifier modifier) { + using Result = rlottie::FitzModifier; + switch (modifier) { + case SkinModifier::None: return Result::None; +@@ -42,6 +43,7 @@ int GetLottieFrameIndex(not_null<rlottie::Animation*> animation, Quality quality + } + Unexpected("Unexpected modifier in MapModifier."); + } ++#endif + + } // namespace + diff --git a/mallocng.patch b/mallocng.patch deleted file mode 100644 index d4288b654177..000000000000 --- a/mallocng.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff --git a/.gitmodules b/.gitmodules -index beda934f6..01f7cbb83 100644 ---- a/.gitmodules -+++ b/.gitmodules -@@ -91,3 +91,6 @@ - [submodule "Telegram/lib_webview"] - path = Telegram/lib_webview - url = https://github.com/kotatogram/lib_webview.git -+[submodule "Telegram/ThirdParty/mallocng"] -+ path = Telegram/ThirdParty/mallocng -+ url = https://github.com/desktop-app/mallocng.git -diff --git a/Telegram/CMakeLists.txt b/Telegram/CMakeLists.txt -index 0e00fcee1..fed1f9634 100644 ---- a/Telegram/CMakeLists.txt -+++ b/Telegram/CMakeLists.txt -@@ -89,6 +89,7 @@ elseif (LINUX) - PRIVATE - desktop-app::external_glibmm - desktop-app::external_glib -+ desktop-app::external_mallocng - ) - - if (NOT DESKTOP_APP_DISABLE_DBUS_INTEGRATION) |