diff options
Diffstat (limited to 'net-im/telegram-desktop/files')
6 files changed, 15 insertions, 322 deletions
diff --git a/net-im/telegram-desktop/files/tdesktop-2.8.10-jemalloc-only-telegram.patch b/net-im/telegram-desktop/files/tdesktop-2.8.10-jemalloc-only-telegram.patch deleted file mode 100644 index 8604acc6a74d..000000000000 --- a/net-im/telegram-desktop/files/tdesktop-2.8.10-jemalloc-only-telegram.patch +++ /dev/null @@ -1,31 +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. - ---- tdesktop-2.8.10-full.orig/Telegram/CMakeLists.txt -+++ tdesktop-2.8.10-full/Telegram/CMakeLists.txt -@@ -87,6 +87,7 @@ - PRIVATE - desktop-app::external_glibmm - desktop-app::external_glib -+ desktop-app::external_jemalloc - ) - - if (NOT DESKTOP_APP_DISABLE_DBUS_INTEGRATION) ---- tdesktop-2.8.10-full.orig/cmake/options_linux.cmake -+++ tdesktop-2.8.10-full/cmake/options_linux.cmake -@@ -58,11 +58,6 @@ - endif() - endif() - --target_link_libraries(common_options --INTERFACE -- desktop-app::external_jemalloc --) -- - if (DESKTOP_APP_USE_PACKAGED) - find_library(ATOMIC_LIBRARY atomic) - else() diff --git a/net-im/telegram-desktop/files/tdesktop-2.8.11-fix-build-without-pipewire.patch b/net-im/telegram-desktop/files/tdesktop-2.8.11-fix-build-without-pipewire.patch deleted file mode 100644 index ecfc63abeb58..000000000000 --- a/net-im/telegram-desktop/files/tdesktop-2.8.11-fix-build-without-pipewire.patch +++ /dev/null @@ -1,26 +0,0 @@ -Fix build without pipewire - -set_allow_pipewire isn't available if WEBRTC_USE_PIPEWIRE isn't set - ---- tdesktop-2.8.11-full.orig/Telegram/ThirdParty/tgcalls/tgcalls/desktop_capturer/DesktopCaptureSourceHelper.cpp -+++ tdesktop-2.8.11-full/Telegram/ThirdParty/tgcalls/tgcalls/desktop_capturer/DesktopCaptureSourceHelper.cpp -@@ -286,7 +286,7 @@ - options.set_allow_use_magnification_api(false); - #elif defined WEBRTC_MAC - options.set_allow_iosurface(true); --#elif defined WEBRTC_LINUX -+#elif defined WEBRTC_USE_PIPEWIRE - options.set_allow_pipewire(true); - #endif // WEBRTC_WIN || WEBRTC_MAC - ---- tdesktop-2.8.11-full.orig/Telegram/ThirdParty/tgcalls/tgcalls/desktop_capturer/DesktopCaptureSourceManager.cpp -+++ tdesktop-2.8.11-full/Telegram/ThirdParty/tgcalls/tgcalls/desktop_capturer/DesktopCaptureSourceManager.cpp -@@ -33,7 +33,7 @@ - result.set_allow_use_magnification_api(false); - #elif defined WEBRTC_MAC - result.set_allow_iosurface(type == DesktopCaptureType::Screen); --#elif defined WEBRTC_LINUX -+#elif defined WEBRTC_USE_PIPEWIRE - result.set_allow_pipewire(true); - #endif // WEBRTC_WIN || WEBRTC_MAC - result.set_detect_updated_region(true); diff --git a/net-im/telegram-desktop/files/tdesktop-2.8.11-load-gtk-with-qlibrary.patch b/net-im/telegram-desktop/files/tdesktop-2.8.11-load-gtk-with-qlibrary.patch deleted file mode 100644 index 91e3f859eebc..000000000000 --- a/net-im/telegram-desktop/files/tdesktop-2.8.11-load-gtk-with-qlibrary.patch +++ /dev/null @@ -1,112 +0,0 @@ -Fix running with QT_QPA_PLATFORMTHEME=gtk2 - -From: https://bugs.archlinux.org/task/71541 - ---- tdesktop-2.8.11-full.orig/Telegram/CMakeLists.txt -+++ tdesktop-2.8.11-full/Telegram/CMakeLists.txt -@@ -114,25 +114,16 @@ - endif() - - if (NOT DESKTOP_APP_DISABLE_GTK_INTEGRATION) -- target_link_libraries(Telegram PRIVATE rt) - 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) -- -- 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_check_modules(GTK REQUIRED gtk+-3.0) -- target_include_directories(Telegram PRIVATE ${GTK_INCLUDE_DIRS}) -+ pkg_check_modules(GTK REQUIRED gtk+-3.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() -+ -+ target_link_libraries(Telegram PRIVATE rt) - endif() - endif() - ---- tdesktop-2.8.11-full.orig/Telegram/lib_base/CMakeLists.txt -+++ tdesktop-2.8.11-full/Telegram/lib_base/CMakeLists.txt -@@ -254,13 +254,8 @@ - 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) -- else() -- pkg_check_modules(GTK REQUIRED gtk+-3.0) -- target_include_directories(lib_base PUBLIC ${GTK_INCLUDE_DIRS}) -- endif() -+ pkg_check_modules(GTK REQUIRED gtk+-3.0) -+ target_include_directories(lib_base PUBLIC ${GTK_INCLUDE_DIRS}) - endif() - endif() - ---- tdesktop-2.8.11-full.orig/Telegram/lib_base/base/platform/linux/base_linux_gtk_integration_p.h -+++ tdesktop-2.8.11-full/Telegram/lib_base/base/platform/linux/base_linux_gtk_integration_p.h -@@ -13,15 +13,7 @@ - #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 - #define LOAD_GTK_SYMBOL LOAD_LIBRARY_SYMBOL --#endif // !LINK_TO_GTK - - namespace base { - namespace Platform { -@@ -31,11 +23,7 @@ - QLibrary &lib, - const char *name, - std::optional<int> version = std::nullopt) { --#ifdef LINK_TO_GTK -- return true; --#else // LINK_TO_GTK - return LoadLibrary(lib, name, version); --#endif // LINK_TO_GTK - } - - inline gboolean (*gtk_init_check)(int *argc, char ***argv) = nullptr; ---- tdesktop-2.8.11-full.orig/Telegram/lib_webview/CMakeLists.txt -+++ tdesktop-2.8.11-full/Telegram/lib_webview/CMakeLists.txt -@@ -51,19 +51,11 @@ - if (NOT DESKTOP_APP_DISABLE_WEBKIT) - 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(GTK3 REQUIRED gtk+-3.0) -+ target_include_directories(lib_webview PUBLIC ${GTK3_INCLUDE_DIRS}) - -- 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(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/net-im/telegram-desktop/files/tdesktop-2.8.9-disable-webkit-separately.patch b/net-im/telegram-desktop/files/tdesktop-2.8.9-disable-webkit-separately.patch deleted file mode 100644 index 388e09fa58d2..000000000000 --- a/net-im/telegram-desktop/files/tdesktop-2.8.9-disable-webkit-separately.patch +++ /dev/null @@ -1,122 +0,0 @@ -Allow controlling the use of webkit-gtk - -WebKitGTK is used to display payment pages when buying things in Telegram -shops. This library can be disabled properly alongside the GTK integration with -its flag. However, I reckon *most* users want the GTK integration (fixes -pasting big images, amongst other things), but hardly anyone actually buys -things through Telegram. Controlling these two things separately is trivial, and -the user gets a nice dialog telling them WebKitGTK isn't available in the event -they *do* attempt to use the related features. - -NOTE: GTK integration *must* be enabled for WebKitGTK to work. - ---- tdesktop-2.8.9-full.orig/Telegram/SourceFiles/platform/linux/linux_gtk_integration.cpp -+++ tdesktop-2.8.9-full/Telegram/SourceFiles/platform/linux/linux_gtk_integration.cpp -@@ -587,9 +587,11 @@ - if (const auto integration = BaseGtkIntegration::Instance()) { - return integration->exec(parentDBusName); - } -+#ifndef DESKTOP_APP_DISABLE_WEBKIT - } else if (type == Type::Webview) { - Webview::WebKit2Gtk::SetServiceName(serviceName.toStdString()); - return Webview::WebKit2Gtk::Exec(parentDBusName.toStdString()); -+#endif - } else if (type == Type::TDesktop) { - ServiceName = serviceName.toStdString(); - if (const auto integration = Instance()) { -@@ -602,7 +604,9 @@ - - void GtkIntegration::Start(Type type) { - if (type != Type::Base -+#ifndef DESKTOP_APP_DISABLE_WEBKIT - && type != Type::Webview -+#endif - && type != Type::TDesktop) { - return; - } -@@ -613,11 +617,13 @@ - - if (type == Type::Base) { - BaseGtkIntegration::SetServiceName(kBaseService.utf16().arg(h)); -+#ifndef DESKTOP_APP_DISABLE_WEBKIT - } else if (type == Type::Webview) { - Webview::WebKit2Gtk::SetServiceName( - kWebviewService.utf16().arg(h).arg("%1").toStdString()); - - return; -+#endif - } else { - ServiceName = kService.utf16().arg(h).toStdString(); - } ---- tdesktop-2.8.9-full.orig/Telegram/lib_webview/CMakeLists.txt -+++ tdesktop-2.8.9-full/Telegram/lib_webview/CMakeLists.txt -@@ -48,7 +48,7 @@ - nuget_add_webview(lib_webview) - nuget_add_winrt(lib_webview) - elseif (LINUX) -- if (NOT DESKTOP_APP_DISABLE_GTK_INTEGRATION) -+ if (NOT DESKTOP_APP_DISABLE_WEBKIT) - find_package(PkgConfig REQUIRED) - - if (DESKTOP_APP_USE_PACKAGED AND NOT DESKTOP_APP_USE_PACKAGED_LAZY) ---- tdesktop-2.8.9-full.orig/Telegram/lib_webview/webview/platform/linux/webview_linux.cpp -+++ tdesktop-2.8.9-full/Telegram/lib_webview/webview/platform/linux/webview_linux.cpp -@@ -11,14 +11,14 @@ - namespace Webview { - - Available Availability() { --#ifndef DESKTOP_APP_DISABLE_GTK_INTEGRATION -+#ifndef DESKTOP_APP_DISABLE_WEBKIT - return WebKit2Gtk::Availability(); --#else // !DESKTOP_APP_DISABLE_GTK_INTEGRATION -+#else // !DESKTOP_APP_DISABLE_WEBKIT - return Available{ - .error = Available::Error::NoGtkOrWebkit2Gtk, - .details = "This feature was disabled at build time.", - }; --#endif // DESKTOP_APP_DISABLE_GTK_INTEGRATION -+#endif // DESKTOP_APP_DISABLE_WEBKIT - } - - bool SupportsEmbedAfterCreate() { -@@ -26,11 +26,11 @@ - } - - std::unique_ptr<Interface> CreateInstance(Config config) { --#ifndef DESKTOP_APP_DISABLE_GTK_INTEGRATION -+#ifndef DESKTOP_APP_DISABLE_WEBKIT - return WebKit2Gtk::CreateInstance(std::move(config)); --#else // !DESKTOP_APP_DISABLE_GTK_INTEGRATION -+#else // !DESKTOP_APP_DISABLE_WEBKIT - return nullptr; --#endif // DESKTOP_APP_DISABLE_GTK_INTEGRATION -+#endif // DESKTOP_APP_DISABLE_WEBKIT - } - - } // namespace Webview ---- tdesktop-2.8.9-full.orig/cmake/options.cmake -+++ tdesktop-2.8.9-full/cmake/options.cmake -@@ -49,6 +49,13 @@ - ) - endif() - -+if (DESKTOP_APP_DISABLE_WEBKIT) -+ target_compile_definitions(common_options -+ INTERFACE -+ DESKTOP_APP_DISABLE_WEBKIT -+ ) -+endif() -+ - if (DESKTOP_APP_USE_PACKAGED) - target_compile_definitions(common_options - INTERFACE ---- tdesktop-2.8.9-full.orig/cmake/variables.cmake -+++ tdesktop-2.8.9-full/cmake/variables.cmake -@@ -37,6 +37,7 @@ - option(DESKTOP_APP_USE_PACKAGED_LAZY "Bundle recommended Qt plugins for self-contained packages. (Linux only)" OFF) - option(DESKTOP_APP_USE_PACKAGED_FFMPEG_STATIC "Link ffmpeg statically in packaged mode." OFF) - option(DESKTOP_APP_DISABLE_SPELLCHECK "Disable spellcheck library." ${osx_special_target}) -+option(DESKTOP_APP_DISABLE_WEBKIT "Disable WebkitGTK library (Linux only)." OFF) - option(DESKTOP_APP_DISABLE_CRASH_REPORTS "Disable crash report generation." ${no_special_target}) - option(DESKTOP_APP_DISABLE_AUTOUPDATE "Disable autoupdate." ${disable_autoupdate}) - option(DESKTOP_APP_USE_HUNSPELL_ONLY "Disable system spellchecker and use bundled Hunspell only. (For debugging purposes)" OFF) diff --git a/net-im/telegram-desktop/files/tdesktop-2.8.9-webview-fix-glib.patch b/net-im/telegram-desktop/files/tdesktop-2.8.9-webview-fix-glib.patch deleted file mode 100644 index 02c96d28b2c1..000000000000 --- a/net-im/telegram-desktop/files/tdesktop-2.8.9-webview-fix-glib.patch +++ /dev/null @@ -1,31 +0,0 @@ -Fixes an issue with glib headers including a C++ header inside extern "C" - -This patch is a hacky workaround, proper solution doesn't seem trivial. - -In file included from /usr/include/glib-2.0/glib/gatomic.h:31, - from /usr/include/glib-2.0/glib/gthread.h:32, - from /usr/include/glib-2.0/glib/gasyncqueue.h:32, - from /usr/include/glib-2.0/glib.h:32, - from /usr/include/gtk-3.0/gdk/gdkconfig.h:13, - from /usr/include/gtk-3.0/gdk/gdk.h:30, - from /usr/include/gtk-3.0/gtk/gtk.h:30, - from /var/tmp/portage/net-im/telegram-desktop-2.8.9/work/tdesktop-2.8.9-full/Telegram/lib_webview/webview/platform/linux/webview_linux_webkit_gtk.h:11, - from /var/tmp/portage/net-im/telegram-desktop-2.8.9/work/tdesktop-2.8.9-full/Telegram/lib_webview/webview/platform/linux/webview_linux_webkit_gtk.cpp:7: -/usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/include/g++-v11/type_traits:56:3: error: template with C linkage - 56 | template<typename _Tp, _Tp __v> - | ^~~~~~~~ -In file included from /var/tmp/portage/net-im/telegram-desktop-2.8.9/work/tdesktop-2.8.9-full/Telegram/lib_webview/webview/platform/linux/webview_linux_webkit_gtk.cpp:7: -/var/tmp/portage/net-im/telegram-desktop-2.8.9/work/tdesktop-2.8.9-full/Telegram/lib_webview/webview/platform/linux/webview_linux_webkit_gtk.h:9:1: note: extern "C" linkage started here - 9 | extern "C" { - | ^~~~~~~~~~ - ---- tdesktop-2.8.9-full.orig/Telegram/lib_webview/webview/platform/linux/webview_linux_webkit_gtk.h -+++ tdesktop-2.8.9-full/Telegram/lib_webview/webview/platform/linux/webview_linux_webkit_gtk.h -@@ -6,6 +6,7 @@ - // - #pragma once - -+#include <type_traits> // Required for glib/gatomic.h - extern "C" { - #include <JavaScriptCore/JavaScript.h> - #include <gtk/gtk.h> diff --git a/net-im/telegram-desktop/files/tdesktop-2.9.3-add-libdl-dependency.patch b/net-im/telegram-desktop/files/tdesktop-2.9.3-add-libdl-dependency.patch new file mode 100644 index 000000000000..3df0601b454b --- /dev/null +++ b/net-im/telegram-desktop/files/tdesktop-2.9.3-add-libdl-dependency.patch @@ -0,0 +1,15 @@ +Add missed dependency on libdl + +https://github.com/desktop-app/lib_webview/commit/3cb51ac668d4e1b4f7f2b95fed1192350ba403af + +--- tdesktop-2.9.3-full.orig/Telegram/lib_webview/CMakeLists.txt ++++ tdesktop-2.9.3-full/Telegram/lib_webview/CMakeLists.txt +@@ -56,6 +56,8 @@ + + pkg_check_modules(WEBKIT REQUIRED webkit2gtk-4.0) + target_include_directories(lib_webview SYSTEM PUBLIC ${WEBKIT_INCLUDE_DIRS}) ++ ++ target_link_libraries(lib_webview PUBLIC ${CMAKE_DL_LIBS}) + else() + remove_target_sources(lib_webview ${src_loc} + webview/platform/linux/webview_linux_webkit_gtk.cpp |