git: 6de0d4af4299 - main - net-im/telegram-desktop: update to 4.0.2

From: Sergey A. Osokin <osa_at_FreeBSD.org>
Date: Tue, 28 Jun 2022 02:11:39 UTC
The branch main has been updated by osa:

URL: https://cgit.FreeBSD.org/ports/commit/?id=6de0d4af4299644536549189b3ef7faa76f94041

commit 6de0d4af4299644536549189b3ef7faa76f94041
Author:     Sergey A. Osokin <osa@FreeBSD.org>
AuthorDate: 2022-06-28 02:09:57 +0000
Commit:     Sergey A. Osokin <osa@FreeBSD.org>
CommitDate: 2022-06-28 02:09:57 +0000

    net-im/telegram-desktop: update to 4.0.2
    
    ChangeLog:      https://desktop.telegram.org/changelog?setln=en
---
 net-im/telegram-desktop/Makefile                   |  2 +-
 net-im/telegram-desktop/distinfo                   |  6 +--
 ...les_media_view_media__view__overlay__widget.cpp | 11 -----
 ...ram_SourceFiles_media_view_media__view__pip.cpp | 11 -----
 ...irdParty_hunspell_tests_suggestiontest_Makefile | 14 -------
 .../files/patch-Telegram_lib__ui_CMakeLists.txt    | 48 ----------------------
 .../files/patch-Telegram_lib__ui_ui_rp__widget.cpp | 24 -----------
 .../files/patch-Telegram_lib__ui_ui_rp__widget.h   | 13 ------
 8 files changed, 4 insertions(+), 125 deletions(-)

diff --git a/net-im/telegram-desktop/Makefile b/net-im/telegram-desktop/Makefile
index ef7de2afa72e..d6025fbb639e 100644
--- a/net-im/telegram-desktop/Makefile
+++ b/net-im/telegram-desktop/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	telegram-desktop
-DISTVERSION=	3.7.3
+DISTVERSION=	4.0.2
 CATEGORIES=	net-im
 MASTER_SITES=	https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/releases/download/v${DISTVERSION}/
 DISTNAME=	tdesktop-${DISTVERSION}-full
diff --git a/net-im/telegram-desktop/distinfo b/net-im/telegram-desktop/distinfo
index 8f70236ba961..3bb71dd3b1e0 100644
--- a/net-im/telegram-desktop/distinfo
+++ b/net-im/telegram-desktop/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1650978211
-SHA256 (tdesktop-3.7.3-full.tar.gz) = 9735f30610ff62b01cbdb0b945d32c494cec245961023c9860d9dd5268b9fe1e
-SIZE (tdesktop-3.7.3-full.tar.gz) = 41365751
+TIMESTAMP = 1656174976
+SHA256 (tdesktop-4.0.2-full.tar.gz) = 44659a7b2db3eff2e5c42e372dac14d1b03ffae19e005007ce580719615b59b1
+SIZE (tdesktop-4.0.2-full.tar.gz) = 41059443
diff --git a/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_media_view_media__view__overlay__widget.cpp b/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_media_view_media__view__overlay__widget.cpp
deleted file mode 100644
index 3ad29281ce5d..000000000000
--- a/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_media_view_media__view__overlay__widget.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
---- Telegram/SourceFiles/media/view/media_view_overlay_widget.cpp.orig	2022-04-20 09:56:09 UTC
-+++ Telegram/SourceFiles/media/view/media_view_overlay_widget.cpp
-@@ -499,7 +499,7 @@ void OverlayWidget::moveToScreen(bool inMove) {
- 		DEBUG_LOG(("Viewer Pos: Currently on screen %1, moving to screen %2")
- 			.arg(screenList.indexOf(myScreen))
- 			.arg(screenList.indexOf(activeWindowScreen)));
--		_widget->setScreen(activeWindowScreen);
-+		window()->setScreen(activeWindowScreen);
- 		DEBUG_LOG(("Viewer Pos: New actual screen: %1")
- 			.arg(screenList.indexOf(_widget->screen())));
- 	}
diff --git a/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_media_view_media__view__pip.cpp b/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_media_view_media__view__pip.cpp
deleted file mode 100644
index 509b4addb73c..000000000000
--- a/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_media_view_media__view__pip.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
---- Telegram/SourceFiles/media/view/media_view_pip.cpp.orig	2022-04-20 09:56:09 UTC
-+++ Telegram/SourceFiles/media/view/media_view_pip.cpp
-@@ -475,7 +475,7 @@ void PipPanel::setPositionDefault() {
- 	const auto parentScreen = widgetScreen(_parent);
- 	const auto myScreen = widgetScreen(widget());
- 	if (parentScreen && myScreen && myScreen != parentScreen) {
--		widget()->setScreen(parentScreen);
-+		widget()->windowHandle()->setScreen(parentScreen);
- 	}
- 	auto position = Position();
- 	position.snapped = RectPart::Top | RectPart::Left;
diff --git a/net-im/telegram-desktop/files/patch-Telegram_ThirdParty_hunspell_tests_suggestiontest_Makefile b/net-im/telegram-desktop/files/patch-Telegram_ThirdParty_hunspell_tests_suggestiontest_Makefile
deleted file mode 100644
index b43f7ce18f54..000000000000
--- a/net-im/telegram-desktop/files/patch-Telegram_ThirdParty_hunspell_tests_suggestiontest_Makefile
+++ /dev/null
@@ -1,14 +0,0 @@
---- Telegram/ThirdParty/hunspell/tests/suggestiontest/Makefile.orig	2020-03-16 13:55:43 UTC
-+++ Telegram/ThirdParty/hunspell/tests/suggestiontest/Makefile
-@@ -1,11 +0,0 @@
--all:
--	./prepare
--	./test
--
--single:
--	./prepare2
--	./test
--
--clean:
--	rm *.[1-5] result.*
--
diff --git a/net-im/telegram-desktop/files/patch-Telegram_lib__ui_CMakeLists.txt b/net-im/telegram-desktop/files/patch-Telegram_lib__ui_CMakeLists.txt
deleted file mode 100644
index 5f9b7cc0b66d..000000000000
--- a/net-im/telegram-desktop/files/patch-Telegram_lib__ui_CMakeLists.txt
+++ /dev/null
@@ -1,48 +0,0 @@
---- Telegram/lib_ui/CMakeLists.txt.orig	2022-04-20 07:41:10 UTC
-+++ Telegram/lib_ui/CMakeLists.txt
-@@ -4,6 +4,13 @@
- # For license and copyright information please follow this link:
- # https://github.com/desktop-app/legal/blob/master/LEGAL
- 
-+if (NOT DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION AND NOT DESKTOP_APP_QT6)
-+    find_package(ECM REQUIRED)
-+    set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
-+    find_package(QtWaylandScanner REQUIRED)
-+    find_package(WaylandProtocols)
-+endif()
-+
- add_library(lib_ui STATIC)
- add_library(desktop-app::lib_ui ALIAS lib_ui)
- init_target(lib_ui)
-@@ -20,6 +27,12 @@ set(style_files
-     ui/widgets/widgets.style
- )
- 
-+if (WaylandProtocols_FOUND)
-+    set(wayland_protocols_loc ${WaylandProtocols_DATADIR})
-+else()
-+    set(wayland_protocols_loc ${third_party_loc}/wayland-protocols)
-+endif()
-+
- generate_palette(lib_ui ui/colors.palette)
- generate_styles(lib_ui ${src_loc} "${style_files}" ui/colors.palette)
- generate_emoji(lib_ui emoji.txt emoji_suggestions/emoji_autocomplete.json)
-@@ -273,10 +286,16 @@ elseif(LINUX)
-     if (DESKTOP_APP_QT6)
-         qt6_generate_wayland_protocol_client_sources(lib_ui
-         FILES
--            ${third_party_loc}/wayland-protocols/stable/xdg-shell/xdg-shell.xml
-+            ${wayland_protocols_loc}/stable/xdg-shell/xdg-shell.xml
-         )
-     else()
--        message(FATAL_ERROR "This piece of cmake code is not ported to Qt 5")
-+        ecm_add_qtwayland_client_protocol(xdg_shell_protocol_srcs
-+            PROTOCOL ${wayland_protocols_loc}/stable/xdg-shell/xdg-shell.xml
-+            BASENAME xdg-shell
-+        )
-+
-+        target_sources(lib_ui PRIVATE ${xdg_shell_protocol_srcs})
-+        target_include_directories(lib_ui PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
-     endif()
- 
-     target_link_libraries(lib_ui
diff --git a/net-im/telegram-desktop/files/patch-Telegram_lib__ui_ui_rp__widget.cpp b/net-im/telegram-desktop/files/patch-Telegram_lib__ui_ui_rp__widget.cpp
deleted file mode 100644
index 581641a6706d..000000000000
--- a/net-im/telegram-desktop/files/patch-Telegram_lib__ui_ui_rp__widget.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
---- Telegram/lib_ui/ui/rp_widget.cpp.orig	2022-04-20 07:41:10 UTC
-+++ Telegram/lib_ui/ui/rp_widget.cpp
-@@ -11,6 +11,8 @@
- #include <QtGui/QWindow>
- #include <QtGui/QtEvents>
- 
-+#include <private/qwidget_p.h>
-+
- namespace Ui {
- namespace {
- 
-@@ -207,3 +209,12 @@ auto RpWidgetWrap::eventStreams() const -> EventStream
- }
- 
- } // namespace Ui
-+
-+#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
-+
-+bool TWidget::setScreen(QScreen *next) {
-+	// This method becomes public in Qt6. So anyway reveal it right here.
-+	return qt_widget_private(this)->setScreen(next);
-+}
-+
-+#endif  // Qt < 6.0.0
diff --git a/net-im/telegram-desktop/files/patch-Telegram_lib__ui_ui_rp__widget.h b/net-im/telegram-desktop/files/patch-Telegram_lib__ui_ui_rp__widget.h
deleted file mode 100644
index 63c0f4eeeb0e..000000000000
--- a/net-im/telegram-desktop/files/patch-Telegram_lib__ui_ui_rp__widget.h
+++ /dev/null
@@ -1,13 +0,0 @@
---- Telegram/lib_ui/ui/rp_widget.h.orig	2022-04-20 07:41:10 UTC
-+++ Telegram/lib_ui/ui/rp_widget.h
-@@ -206,6 +206,10 @@ class TWidget : public TWidgetHelper<QWidget> { (publi
- 		return rectNoMargins().size();
- 	}
- 
-+#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
-+	bool setScreen(QScreen*);
-+#endif  // Qt < 6.0.0
-+
- 	// Updates the area that is visible inside the scroll container.
- 	void setVisibleTopBottom(int visibleTop, int visibleBottom) {
- 		auto max = height();