From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 9502A13946D for ; Wed, 4 Aug 2021 08:31:31 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 714D8E0839; Wed, 4 Aug 2021 08:31:30 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 4EB0BE0839 for ; Wed, 4 Aug 2021 08:31:30 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id AEBA3342D1C for ; Wed, 4 Aug 2021 08:31:28 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 11084737 for ; Wed, 4 Aug 2021 08:31:27 +0000 (UTC) From: "Georgy Yakovlev" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Georgy Yakovlev" Message-ID: <1628065767.ba3e19059ebe0e6eb6a05e53fd42fff5bdf8e5fd.gyakovlev@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-im/telegram-desktop/, net-im/telegram-desktop/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-im/telegram-desktop/files/tdesktop-2.8.11-load-gtk-with-qlibrary.patch net-im/telegram-desktop/telegram-desktop-2.8.11.ebuild X-VCS-Directories: net-im/telegram-desktop/ net-im/telegram-desktop/files/ X-VCS-Committer: gyakovlev X-VCS-Committer-Name: Georgy Yakovlev X-VCS-Revision: ba3e19059ebe0e6eb6a05e53fd42fff5bdf8e5fd X-VCS-Branch: master Date: Wed, 4 Aug 2021 08:31:27 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: d76d416a-fde9-41e0-b742-b295308ac140 X-Archives-Hash: d4bd57ecebbe3064356a3f7e3b2d40fe commit: ba3e19059ebe0e6eb6a05e53fd42fff5bdf8e5fd Author: Esteve Varela Colominas gmail com> AuthorDate: Tue Aug 3 21:07:49 2021 +0000 Commit: Georgy Yakovlev gentoo org> CommitDate: Wed Aug 4 08:29:27 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ba3e1905 net-im/telegram-desktop: Fix running with QT_QPA_PLATFORMTHEME=gtk2 Closes: https://bugs.gentoo.org/806292 See-also: https://bugs.archlinux.org/task/71541 Thanks-to: Ilia Durov mail.ru> Signed-off-by: Esteve Varela Colominas gmail.com> Signed-off-by: Georgy Yakovlev gentoo.org> .../tdesktop-2.8.11-load-gtk-with-qlibrary.patch | 112 +++++++++++++++++++++ .../telegram-desktop-2.8.11.ebuild | 3 +- 2 files changed, 114 insertions(+), 1 deletion(-) 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 new file mode 100644 index 00000000000..91e3f859eeb --- /dev/null +++ b/net-im/telegram-desktop/files/tdesktop-2.8.11-load-gtk-with-qlibrary.patch @@ -0,0 +1,112 @@ +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 + } // 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 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/telegram-desktop-2.8.11.ebuild b/net-im/telegram-desktop/telegram-desktop-2.8.11.ebuild index 3e3603edd15..c82d78ed253 100644 --- a/net-im/telegram-desktop/telegram-desktop-2.8.11.ebuild +++ b/net-im/telegram-desktop/telegram-desktop-2.8.11.ebuild @@ -76,8 +76,9 @@ PATCHES=( "${FILESDIR}/tdesktop-2.8.9-disable-webkit-separately.patch" # Not a proper fix, not upstreamed "${FILESDIR}/tdesktop-2.8.9-webview-fix-glib.patch" - # Not upstreamed (yet) "${FILESDIR}/tdesktop-2.8.10-jemalloc-only-telegram.patch" + # Already upstream + "${FILESDIR}/tdesktop-2.8.11-load-gtk-with-qlibrary.patch" ) pkg_pretend() {