commit:     c1b9e4b245500c965623e90187230a3cac0a62f5
Author:     Michael Mair-Keimberger <mmk <AT> levelnine <DOT> at>
AuthorDate: Sat Feb  4 22:42:57 2023 +0000
Commit:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Tue Feb  7 00:30:42 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c1b9e4b2

net-im/telegram-desktop: remove unused patches

Signed-off-by: Michael Mair-Keimberger <mmk <AT> levelnine.at>
Closes: https://github.com/gentoo/gentoo/pull/29432
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>

 .../files/tdesktop-3.3.0-fix-enchant.patch         | 22 -------
 .../files/tdesktop-3.5.2-musl.patch                | 33 ----------
 .../tdesktop-3.6.0-jemalloc-only-telegram.patch    | 43 -------------
 .../files/tdesktop-3.6.0-support-ffmpeg5.patch     | 75 ----------------------
 .../files/tdesktop-3.6.1-fix-kwayland-5.93.patch   | 55 ----------------
 .../files/tdesktop-3.6.1-fix-use-after-free.patch  | 44 -------------
 6 files changed, 272 deletions(-)

diff --git a/net-im/telegram-desktop/files/tdesktop-3.3.0-fix-enchant.patch 
b/net-im/telegram-desktop/files/tdesktop-3.3.0-fix-enchant.patch
deleted file mode 100644
index 7550828ef59e..000000000000
--- a/net-im/telegram-desktop/files/tdesktop-3.3.0-fix-enchant.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-https://bugs.gentoo.org/830180
-
---- 
tdesktop-3.3.0-full.orig/Telegram/lib_spellcheck/spellcheck/platform/linux/spellcheck_linux.cpp
-+++ 
tdesktop-3.3.0-full/Telegram/lib_spellcheck/spellcheck/platform/linux/spellcheck_linux.cpp
-@@ -34,7 +34,7 @@
- auto IsHebrew(const QString &word) {
-       // Words with mixed scripts will be automatically ignored,
-       // so this check should be fine.
--      return ::Spellchecker::WordScript(&word) == QChar::Script_Hebrew;
-+      return ::Spellchecker::WordScript(word) == QChar::Script_Hebrew;
- }
- 
- class EnchantSpellChecker {
-@@ -154,7 +154,7 @@
- }
- 
- auto EnchantSpellChecker::findSuggestions(const QString &word) {
--      const auto wordScript = ::Spellchecker::WordScript(&word);
-+      const auto wordScript = ::Spellchecker::WordScript(word);
-       auto w = word.toStdString();
-       std::vector<QString> result;
-       if (!_validators.size()) {

diff --git a/net-im/telegram-desktop/files/tdesktop-3.5.2-musl.patch 
b/net-im/telegram-desktop/files/tdesktop-3.5.2-musl.patch
deleted file mode 100644
index 4c34d107913e..000000000000
--- a/net-im/telegram-desktop/files/tdesktop-3.5.2-musl.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-Stub out some glibc-specific functions
-
-This allows support for alternative libcs like musl
-
---- 
tdesktop-3.5.2-full.orig/Telegram/lib_base/base/platform/linux/base_info_linux.cpp
-+++ 
tdesktop-3.5.2-full/Telegram/lib_base/base/platform/linux/base_info_linux.cpp
-@@ -22,7 +22,7 @@
- 
- #include <sys/utsname.h>
- 
--#ifdef Q_OS_LINUX
-+#if defined(Q_OS_LINUX) && defined(__GLIBC__)
- #include <gnu/libc-version.h>
- #endif // Q_OS_LINUX
- 
-@@ -200,7 +200,7 @@
- }
- 
- QString GetLibcName() {
--#ifdef Q_OS_LINUX
-+#if defined(Q_OS_LINUX) && defined(__GLIBC__)
-       return "glibc";
- #endif // Q_OS_LINUX
- 
-@@ -208,7 +208,7 @@
- }
- 
- QString GetLibcVersion() {
--#ifdef Q_OS_LINUX
-+#if defined(Q_OS_LINUX) && defined(__GLIBC__)
-       static const auto result = [&] {
-               const auto version = 
QString::fromLatin1(gnu_get_libc_version());
-               return QVersionNumber::fromString(version).isNull() ? QString() 
: version;

diff --git 
a/net-im/telegram-desktop/files/tdesktop-3.6.0-jemalloc-only-telegram.patch 
b/net-im/telegram-desktop/files/tdesktop-3.6.0-jemalloc-only-telegram.patch
deleted file mode 100644
index 18240ce522e2..000000000000
--- a/net-im/telegram-desktop/files/tdesktop-3.6.0-jemalloc-only-telegram.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-Only link jemalloc for the Telegram binary
-
-Some combination of factors is making the different codegen tools hang when
-jemalloc is linked for those, and they're ran under portage's sandbox. Since
-this is only used during build-time, and jemalloc is merely necessary to
-improve runtime memory use, it's unnecessary to use it for anything else.
-
-https://bugs.gentoo.org/802624
-
---- tdesktop-3.6.0-full.orig/Telegram/CMakeLists.txt
-+++ tdesktop-3.6.0-full/Telegram/CMakeLists.txt
-@@ -1376,6 +1376,14 @@
-             desktop-app::external_kwayland
-         )
-     endif()
-+
-+    if (NOT DESKTOP_APP_DISABLE_JEMALLOC)
-+        target_link_libraries(Telegram
-+        INTERFACE
-+            $<TARGET_OBJECTS:desktop-app::linux_jemalloc_helper>
-+            $<LINK_ONLY:desktop-app::external_jemalloc>
-+        )
-+    endif()
- endif()
- 
- if (build_macstore)
---- tdesktop-3.6.0-full.orig/cmake/options_linux.cmake
-+++ tdesktop-3.6.0-full/cmake/options_linux.cmake
-@@ -62,14 +62,6 @@
-     target_link_options(common_options INTERFACE $<IF:$<CONFIG:Debug>,,-g 
-flto -fuse-linker-plugin>)
- endif()
- 
--if (NOT DESKTOP_APP_DISABLE_JEMALLOC)
--      target_link_libraries(common_options
--      INTERFACE
--          $<TARGET_OBJECTS:desktop-app::linux_jemalloc_helper>
--          $<LINK_ONLY:desktop-app::external_jemalloc>
--      )
--endif()
--
- target_link_libraries(common_options
- INTERFACE
-     ${CMAKE_DL_LIBS}

diff --git a/net-im/telegram-desktop/files/tdesktop-3.6.0-support-ffmpeg5.patch 
b/net-im/telegram-desktop/files/tdesktop-3.6.0-support-ffmpeg5.patch
deleted file mode 100644
index 32959acd5482..000000000000
--- a/net-im/telegram-desktop/files/tdesktop-3.6.0-support-ffmpeg5.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-Support FFmpeg 5
-
-I'm not comfortable changing the _durationInMilliseconds formula on older
-versions of ffmpeg. Doing that only for newer versions also reduces the amount
-of testing this patch needs (of which it'll get very minimal amounts, this is a
-job better left for upstream when they get to it).
-
-Also it doesn't compile under ffmpeg 4 if the variables are constants :/
-
---- 
tdesktop-3.6.0-full.orig/Telegram/ThirdParty/tgcalls/tgcalls/group/AudioStreamingPartInternal.cpp
-+++ 
tdesktop-3.6.0-full/Telegram/ThirdParty/tgcalls/tgcalls/group/AudioStreamingPartInternal.cpp
-@@ -104,7 +104,11 @@
- 
-     _frame = av_frame_alloc();
- 
-+#if LIBAVFORMAT_VERSION_MAJOR >= 59
-+    const AVInputFormat *inputFormat = 
av_find_input_format(container.c_str());
-+#else
-     AVInputFormat *inputFormat = av_find_input_format(container.c_str());
-+#endif
-     if (!inputFormat) {
-         _didReadToEnd = true;
-         return;
-@@ -144,7 +148,11 @@
-         
-         _streamId = i;
- 
-+#if LIBAVFORMAT_VERSION_MAJOR >= 59
-+        _durationInMilliseconds = inStream->duration * 1000 / 48000;
-+#else
-         _durationInMilliseconds = (int)((inStream->duration + 
inStream->first_dts) * 1000 / 48000);
-+#endif
- 
-         if (inStream->metadata) {
-             AVDictionaryEntry *entry = av_dict_get(inStream->metadata, 
"TG_META", nullptr, 0);
---- 
tdesktop-3.6.0-full.orig/Telegram/ThirdParty/tgcalls/tgcalls/group/AudioStreamingPartPersistentDecoder.cpp
-+++ 
tdesktop-3.6.0-full/Telegram/ThirdParty/tgcalls/tgcalls/group/AudioStreamingPartPersistentDecoder.cpp
-@@ -32,7 +32,11 @@
-     AudioStreamingPartPersistentDecoderState(AVCodecParameters const 
*codecParameters, AVRational timeBase) :
-     _codecParameters(codecParameters),
-     _timeBase(timeBase) {
-+#ifdef LIBAVCODEC_VERSION_MAJOR >= 59
-+        const AVCodec *codec = 
avcodec_find_decoder(codecParameters->codec_id);
-+#else
-         AVCodec *codec = avcodec_find_decoder(codecParameters->codec_id);
-+#endif
-         if (codec) {
-             _codecContext = avcodec_alloc_context3(codec);
-             int ret = avcodec_parameters_to_context(_codecContext, 
codecParameters);
---- 
tdesktop-3.6.0-full.orig/Telegram/ThirdParty/tgcalls/tgcalls/group/VideoStreamingPart.cpp
-+++ 
tdesktop-3.6.0-full/Telegram/ThirdParty/tgcalls/tgcalls/group/VideoStreamingPart.cpp
-@@ -280,7 +280,11 @@
- 
-         int ret = 0;
- 
-+#if LIBAVFORMAT_VERSION_MAJOR >= 59
-+        const AVInputFormat *inputFormat = 
av_find_input_format(container.c_str());
-+#else
-         AVInputFormat *inputFormat = av_find_input_format(container.c_str());
-+#endif
-         if (!inputFormat) {
-             _didReadToEnd = true;
-             return;
-@@ -323,7 +327,11 @@
-         }
- 
-         if (videoCodecParameters && videoStream) {
-+#if LIBAVCODEC_VERSION_MAJOR >= 59
-+            const AVCodec *codec = 
avcodec_find_decoder(videoCodecParameters->codec_id);
-+#else
-             AVCodec *codec = 
avcodec_find_decoder(videoCodecParameters->codec_id);
-+#endif
-             if (codec) {
-                 _codecContext = avcodec_alloc_context3(codec);
-                 ret = avcodec_parameters_to_context(_codecContext, 
videoCodecParameters);

diff --git 
a/net-im/telegram-desktop/files/tdesktop-3.6.1-fix-kwayland-5.93.patch 
b/net-im/telegram-desktop/files/tdesktop-3.6.1-fix-kwayland-5.93.patch
deleted file mode 100644
index e818ffe46456..000000000000
--- a/net-im/telegram-desktop/files/tdesktop-3.6.1-fix-kwayland-5.93.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-Fix compatibility with kwayland-5.93.0
-
-The header files were moved, the include directory wasn't being added 
correctly.
-
-https://bugs.gentoo.org/837569
-
---- 
tdesktop-3.6.1-full.orig/Telegram/SourceFiles/platform/linux/linux_wayland_integration.cpp
-+++ 
tdesktop-3.6.1-full/Telegram/SourceFiles/platform/linux/linux_wayland_integration.cpp
-@@ -9,10 +9,10 @@
- 
- #include "base/platform/base_platform_info.h"
- 
--#include <connection_thread.h>
--#include <registry.h>
--#include <surface.h>
--#include <plasmashell.h>
-+#include <KWayland/Client/connection_thread.h>
-+#include <KWayland/Client/registry.h>
-+#include <KWayland/Client/surface.h>
-+#include <KWayland/Client/plasmashell.h>
- 
- using namespace KWayland::Client;
- 
---- 
tdesktop-3.6.1-full.orig/Telegram/lib_base/base/platform/linux/base_linux_wayland_integration.cpp
-+++ 
tdesktop-3.6.1-full/Telegram/lib_base/base/platform/linux/base_linux_wayland_integration.cpp
-@@ -13,11 +13,11 @@
- #include <QtCore/QPointer>
- #include <QtGui/QWindow>
- 
--#include <connection_thread.h>
--#include <registry.h>
--#include <surface.h>
--#include <xdgforeign.h>
--#include <idleinhibit.h>
-+#include <KWayland/Client/connection_thread.h>
-+#include <KWayland/Client/registry.h>
-+#include <KWayland/Client/surface.h>
-+#include <KWayland/Client/xdgforeign.h>
-+#include <KWayland/Client/idleinhibit.h>
- 
- using namespace KWayland::Client;
- 
---- 
tdesktop-3.6.1-full.orig/Telegram/lib_ui/ui/platform/linux/ui_linux_wayland_integration.cpp
-+++ 
tdesktop-3.6.1-full/Telegram/lib_ui/ui/platform/linux/ui_linux_wayland_integration.cpp
-@@ -24,8 +24,8 @@
- #include <private/qwaylandwindow_p.h>
- #include <private/qwaylandshellsurface_p.h>
- 
--#include <connection_thread.h>
--#include <registry.h>
-+#include <KWayland/Client/connection_thread.h>
-+#include <KWayland/Client/registry.h>
- 
- Q_DECLARE_METATYPE(QMargins);
- 

diff --git 
a/net-im/telegram-desktop/files/tdesktop-3.6.1-fix-use-after-free.patch 
b/net-im/telegram-desktop/files/tdesktop-3.6.1-fix-use-after-free.patch
deleted file mode 100644
index 5a8e6ceedd66..000000000000
--- a/net-im/telegram-desktop/files/tdesktop-3.6.1-fix-use-after-free.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-Description: Do not capture buttons in AccountsList that belong to inner 
VerticalLayout widget
- This fixes a use-after-free error (double destruction) in the main menu right 
after account switching.
-Bug-Debian: https://bugs.debian.org/1008156
-Bug-Ubuntu: https://launchpad.net/bugs/1967673
-Forwarded: https://github.com/telegramdesktop/tdesktop/pull/24301
-Author: Nicholas Guriev <[email protected]>
-Last-Update: Sat, 09 Apr 2022 13:47:55 +0300
-
---- 
tdesktop-3.6.1-full.orig/Telegram/SourceFiles/settings/settings_information.cpp
-+++ tdesktop-3.6.1-full/Telegram/SourceFiles/settings/settings_information.cpp
-@@ -78,9 +78,7 @@
-       int _outerIndex = 0;
- 
-       Ui::SlideWrap<Ui::SettingsButton> *_addAccount = nullptr;
--      base::flat_map<
--              not_null<Main::Account*>,
--              base::unique_qptr<Ui::SettingsButton>> _watched;
-+      base::flat_map<not_null<Main::Account*>, Ui::SettingsButton*> _watched;
- 
-       base::unique_qptr<Ui::PopupMenu> _contextMenu;
-       std::unique_ptr<Ui::VerticalLayoutReorder> _reorder;
-@@ -730,7 +728,7 @@
-                               order.reserve(inner->count());
-                               for (auto i = 0; i < inner->count(); i++) {
-                                       for (const auto &[account, button] : 
_watched) {
--                                              if (button.get() == 
inner->widgetAt(i)) {
-+                                              if (button == 
inner->widgetAt(i)) {
-                                                       
order.push_back(account->session().uniqueId());
-                                               }
-                                       }
-@@ -769,11 +767,11 @@
-                                       account,
-                                       std::move(activate));
-                       };
--                      button.reset(inner->add(MakeAccountButton(
-+                      button = inner->add(MakeAccountButton(
-                               inner,
-                               _controller,
-                               account,
--                              std::move(callback))));
-+                              std::move(callback)));
-               }
-       }
-       inner->resizeToWidth(_outer->width());

Reply via email to