diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-11-29 19:21:10 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-11-29 19:21:10 +0000 |
commit | 1bfb8c3d7e00e7ff828008510f5a7568c81d8889 (patch) | |
tree | a22ec1622549507f5333dca366a3b1f3e9af1dca /net-im/telegram-desktop/files | |
parent | 82020bf7ff936f52f6f1efc646ae374e46b5ed36 (diff) |
gentoo auto-resync : 29:11:2022 - 19:21:10
Diffstat (limited to 'net-im/telegram-desktop/files')
3 files changed, 113 insertions, 0 deletions
diff --git a/net-im/telegram-desktop/files/tdesktop-4.3.4-fix-disabling-spellcheck.patch b/net-im/telegram-desktop/files/tdesktop-4.3.4-fix-disabling-spellcheck.patch new file mode 100644 index 000000000000..9529370cdbae --- /dev/null +++ b/net-im/telegram-desktop/files/tdesktop-4.3.4-fix-disabling-spellcheck.patch @@ -0,0 +1,43 @@ +Fix building without spellcheck + +Upcoming changes to tdesktop include language recognition, which is a bit of a +doozy, and as is tradition, "unusual" compilation flags go untested. + +Regular builds would always return false here, anyway, as linux isn't a +priority with these things. + +/var/tmp/portage/net-im/telegram-desktop-4.3.4/work/tdesktop-4.3.4-full/Telegram/SourceFiles/boxes/translate_box.cpp:18:10: fatal error: spellcheck/platform/platform_language.h: No such file or directory + 18 | #include "spellcheck/platform/platform_language.h" + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +compilation terminated. + +--- tdesktop-4.3.4-full.orig/Telegram/SourceFiles/boxes/translate_box.cpp ++++ tdesktop-4.3.4-full/Telegram/SourceFiles/boxes/translate_box.cpp +@@ -15,7 +15,9 @@ + #include "main/main_session.h" + #include "mtproto/sender.h" + #include "settings/settings_common.h" ++#ifndef TDESKTOP_DISABLE_SPELLCHECK + #include "spellcheck/platform/platform_language.h" ++#endif + #include "ui/effects/loading_element.h" + #include "ui/layers/generic_box.h" + #include "ui/widgets/buttons.h" +@@ -331,6 +333,7 @@ + if (!hasLetters) { + return true; + } ++#ifndef TDESKTOP_DISABLE_SPELLCHECK + const auto result = Platform::Language::Recognize(text); + if (result.unknown) { + return false; +@@ -343,6 +346,9 @@ + ? QLocale::English + : settingsLang; + return (result.locale.language() == skip); ++#else ++ return false; ++#endif + } + + } // namespace Ui diff --git a/net-im/telegram-desktop/files/tdesktop-4.3.4-qt5-incompatibility-1.patch b/net-im/telegram-desktop/files/tdesktop-4.3.4-qt5-incompatibility-1.patch new file mode 100644 index 000000000000..3229b5be54c8 --- /dev/null +++ b/net-im/telegram-desktop/files/tdesktop-4.3.4-qt5-incompatibility-1.patch @@ -0,0 +1,42 @@ +Disable portal-related event loop with qt5 + +QEventLoop::ApplicationExec is undocumented, but only present in qt6, so I have +no idea if the functionality can be preserved in qt5. Upstream code indicates +that not using it at all is safe, and unlikely to cause problems in +distribution packaging. + +Yet another reminder that qt5 is dying. + +/var/tmp/portage/net-im/telegram-desktop-4.3.4/work/tdesktop-4.3.4-full/Telegram/SourceFiles/platform/linux/specific_linux.cpp: In lambda function: +/var/tmp/portage/net-im/telegram-desktop-4.3.4/work/tdesktop-4.3.4-full/Telegram/SourceFiles/platform/linux/specific_linux.cpp:294:55: error: ‘ApplicationExec’ is not a member of ‘QEventLoop’ + 294 | loop.exec(QEventLoop::ApplicationExec); + | ^~~~~~~~~~~~~~~ + +--- tdesktop-4.3.4-full.orig/Telegram/SourceFiles/platform/linux/specific_linux.cpp ++++ tdesktop-4.3.4-full/Telegram/SourceFiles/platform/linux/specific_linux.cpp +@@ -229,6 +229,7 @@ + } + } + ++#if QT_VERSION >= QT_VERSION_CHECK(6, 2, 0) + void LaunchGApplication() { + const auto connection = [] { + try { +@@ -401,6 +402,7 @@ + }); + } + } ++#endif // QT_VERSION >= QT_VERSION_CHECK(6, 2, 0) + + bool GenerateDesktopFile( + const QString &targetPath, +@@ -862,7 +864,9 @@ + LOG(("Fallback icon theme: %1").arg(QIcon::fallbackThemeName())); + + #ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION ++#if QT_VERSION >= QT_VERSION_CHECK(6, 2, 0) + LaunchGApplication(); ++#endif // QT_VERSION >= QT_VERSION_CHECK(6, 2, 0) + #endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION + } + diff --git a/net-im/telegram-desktop/files/tdesktop-4.3.4-qt5-incompatibility-2.patch b/net-im/telegram-desktop/files/tdesktop-4.3.4-qt5-incompatibility-2.patch new file mode 100644 index 000000000000..ae5c84763c8d --- /dev/null +++ b/net-im/telegram-desktop/files/tdesktop-4.3.4-qt5-incompatibility-2.patch @@ -0,0 +1,28 @@ +Disable unused incompatible overload with qt5 + +Neither Qt nore C++ are my forte, but this code is unused with the packaged +distro version, anyway. + +/var/tmp/portage/net-im/telegram-desktop-4.3.4/work/tdesktop-4.3.4-full/Telegram/SourceFiles/platform/linux/specific_linux.cpp: In lambda function: +/var/tmp/portage/net-im/telegram-desktop-4.3.4/work/tdesktop-4.3.4-full/Telegram/SourceFiles/platform/linux/specific_linux.cpp:705:74: error: call of overloaded ‘arg(QByteArray&)’ is ambiguous + 705 | return qsl("org.telegram.desktop.%1.desktop").arg(md5Hash); + | ^ + +--- tdesktop-4.3.4-full.orig/Telegram/SourceFiles/platform/linux/specific_linux.cpp ++++ tdesktop-4.3.4-full/Telegram/SourceFiles/platform/linux/specific_linux.cpp +@@ -692,6 +692,7 @@ + + qsl(".desktop"); + } + ++#if !(defined(TDESKTOP_DISABLE_AUTOUPDATE) && QT_VERSION < QT_VERSION_CHECK(6, 2, 0)) + if (!Core::UpdaterDisabled()) { + QByteArray md5Hash(h); + if (!Launcher::Instance().customWorkingDir()) { +@@ -706,6 +707,7 @@ + + return qsl("org.telegram.desktop.%1.desktop").arg(md5Hash); + } ++#endif // !(defined(TDESKTOP_DISABLE_AUTOUPDATE) && QT_VERSION < QT_VERSION_CHECK(6, 2, 0)) + + return qsl("org.telegram.desktop.desktop"); + }()); |