summaryrefslogtreecommitdiff
path: root/net-im
diff options
context:
space:
mode:
authorEsteve Varela Colominas <esteve.varela@gmail.com>2021-09-14 22:54:10 +0200
committerGeorgy Yakovlev <gyakovlev@gentoo.org>2021-09-16 05:07:02 -0700
commit18b6ffbbb0621fb207b34618a41d53e9607b057f (patch)
tree0bb6c90bac5ade69a75c56ffbcd4c10b232e809a /net-im
parentnet-im/telegram-desktop: Add libdl dependency (diff)
downloadgentoo-18b6ffbbb0621fb207b34618a41d53e9607b057f.tar.gz
gentoo-18b6ffbbb0621fb207b34618a41d53e9607b057f.tar.bz2
gentoo-18b6ffbbb0621fb207b34618a41d53e9607b057f.zip
net-im/telegram-desktop: Drop old
Signed-off-by: Esteve Varela Colominas <esteve.varela@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/22300 Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
Diffstat (limited to 'net-im')
-rw-r--r--net-im/telegram-desktop/Manifest1
-rw-r--r--net-im/telegram-desktop/files/tdesktop-2.8.10-jemalloc-only-telegram.patch31
-rw-r--r--net-im/telegram-desktop/files/tdesktop-2.8.11-fix-build-without-pipewire.patch26
-rw-r--r--net-im/telegram-desktop/files/tdesktop-2.8.11-load-gtk-with-qlibrary.patch112
-rw-r--r--net-im/telegram-desktop/files/tdesktop-2.8.9-disable-webkit-separately.patch122
-rw-r--r--net-im/telegram-desktop/files/tdesktop-2.8.9-webview-fix-glib.patch31
-rw-r--r--net-im/telegram-desktop/telegram-desktop-2.8.11-r2.ebuild150
7 files changed, 0 insertions, 473 deletions
diff --git a/net-im/telegram-desktop/Manifest b/net-im/telegram-desktop/Manifest
index 1a75fbd05934..f2bd8bdf9dce 100644
--- a/net-im/telegram-desktop/Manifest
+++ b/net-im/telegram-desktop/Manifest
@@ -1,3 +1,2 @@
-DIST tdesktop-2.8.11-full.tar.gz 37105468 BLAKE2B 1ec5a0003bd1b948b45213509fa0649dfde5ec8e3dff097bf45aa0951c7963930788b0bee853f286d04b008b78704c464b6614b8391350767affebc2623b25af SHA512 a553313b04fbb562745be2381a84117657172952e46e280980a73c9fcfe2a7cf29c0e012e4b1259816d1e6652418e7a1ddfc4e394544fcc3aeb33704cbe80860
DIST tdesktop-2.9.3-full.tar.gz 37335782 BLAKE2B 197583ba6568c455218c51f590c1ba1a3f10c390caa4fd03657098f499ce113a4f5f57ca9dd53bc4baba31992d4229768ed35e68ad6b0685010bc335817edcac SHA512 810cfac5d7e6ce9413b1b2406927e89c1383ea5b725233a68b2cb29dd374b4c3386c22186640afde4492c844516c88889a5db8e5b167a09d6d6c1270ac965ac4
DIST tdesktop-3.0.1-full.tar.gz 37531917 BLAKE2B c139501f23c742f76d4acd43def69963413ffafef1be584f13d7359b3c20625def7ec283a981556c795aa4dc5ad2e117e1f8aada28cd4815f66f02510e607435 SHA512 6bff6be5f2c0c7a17df61dccc5a3216dcbb95a1c6d3176442c530e2c1b525e6d15079b230d40751f20684da2a1067d4518a9a1ab90d49d1a7338d3e05239d447
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/telegram-desktop-2.8.11-r2.ebuild b/net-im/telegram-desktop/telegram-desktop-2.8.11-r2.ebuild
deleted file mode 100644
index 940c5b1aed20..000000000000
--- a/net-im/telegram-desktop/telegram-desktop-2.8.11-r2.ebuild
+++ /dev/null
@@ -1,150 +0,0 @@
-# Copyright 2020-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{7..10} )
-
-inherit xdg cmake python-any-r1 flag-o-matic
-
-DESCRIPTION="Official desktop client for Telegram"
-HOMEPAGE="https://desktop.telegram.org"
-
-MY_P="tdesktop-${PV}-full"
-SRC_URI="https://github.com/telegramdesktop/tdesktop/releases/download/v${PV}/${MY_P}.tar.gz"
-
-LICENSE="BSD GPL-3-with-openssl-exception LGPL-2+"
-SLOT="0"
-KEYWORDS="amd64 ~ppc64"
-IUSE="+dbus enchant +gtk +hunspell screencast +spell wayland webkit +X"
-REQUIRED_USE="
- spell? (
- ^^ ( enchant hunspell )
- )
- webkit? ( gtk )
- gtk? ( dbus )
-"
-
-RDEPEND="
- !net-im/telegram-desktop-bin
- app-arch/lz4:=
- dev-cpp/glibmm:2
- dev-libs/jemalloc:=[-lazy-lock]
- dev-libs/xxhash
- >=dev-qt/qtcore-5.15:5
- >=dev-qt/qtgui-5.15:5[dbus?,jpeg,png,wayland?,X?]
- >=dev-qt/qtimageformats-5.15:5
- >=dev-qt/qtnetwork-5.15:5[ssl]
- >=dev-qt/qtsvg-5.15:5
- >=dev-qt/qtwidgets-5.15:5[png,X?]
- media-fonts/open-sans
- media-libs/fontconfig:=
- ~media-libs/libtgvoip-2.4.4_p20210302
- >=media-libs/libtgvoip-2.4.4_p20210302-r2
- media-libs/openal
- media-libs/opus:=
- media-libs/rnnoise
- ~media-libs/tg_owt-0_pre20210626[screencast=,X=]
- media-video/ffmpeg:=[opus]
- sys-libs/zlib:=[minizip]
- dbus? (
- dev-qt/qtdbus:5
- dev-libs/libdbusmenu-qt[qt5(+)]
- )
- enchant? ( app-text/enchant:= )
- gtk? ( x11-libs/gtk+:3[X?,wayland?] )
- hunspell? ( >=app-text/hunspell-1.7:= )
- wayland? ( kde-frameworks/kwayland:= )
- webkit? ( net-libs/webkit-gtk:= )
- X? ( x11-libs/libxcb:= )
-"
-DEPEND="${RDEPEND}
- dev-cpp/range-v3
- =dev-cpp/ms-gsl-3*
-"
-BDEPEND="
- ${PYTHON_DEPS}
- >=dev-util/cmake-3.16
- virtual/pkgconfig
-"
-
-S="${WORKDIR}/${MY_P}"
-
-PATCHES=(
- # https://github.com/desktop-app/cmake_helpers/pull/91
- # https://github.com/desktop-app/lib_webview/pull/2
- "${FILESDIR}/tdesktop-2.8.9-disable-webkit-separately.patch"
- # Not a proper fix, not upstreamed
- "${FILESDIR}/tdesktop-2.8.9-webview-fix-glib.patch"
- "${FILESDIR}/tdesktop-2.8.10-jemalloc-only-telegram.patch"
- # Already upstream
- "${FILESDIR}/tdesktop-2.8.11-load-gtk-with-qlibrary.patch"
- "${FILESDIR}/tdesktop-2.8.11-fix-build-without-pipewire.patch"
-)
-
-pkg_pretend() {
- if has ccache ${FEATURES}; then
- ewarn
- ewarn "ccache does not work with ${PN} out of the box"
- ewarn "due to usage of precompiled headers"
- ewarn "check bug https://bugs.gentoo.org/715114 for more info"
- ewarn
- fi
-}
-
-src_prepare() {
- # no explicit toggle, doesn't build with the system one #752417
- sed -i 's/DESKTOP_APP_USE_PACKAGED/NO_ONE_WILL_EVER_SET_THIS/' \
- cmake/external/rlottie/CMakeLists.txt || die
-
- cmake_src_prepare
-}
-
-src_configure() {
- # gtk is really needed for image copy-paste due to https://bugreports.qt.io/browse/QTBUG-56595
- local mycmakeargs=(
- -DTDESKTOP_LAUNCHER_BASENAME="${PN}"
- -DCMAKE_DISABLE_FIND_PACKAGE_tl-expected=ON # header only lib, some git version. prevents warnings.
-
- -DDESKTOP_APP_DISABLE_X11_INTEGRATION=$(usex X OFF ON)
- -DDESKTOP_APP_DISABLE_WAYLAND_INTEGRATION=$(usex wayland OFF ON)
- -DDESKTOP_APP_DISABLE_DBUS_INTEGRATION=$(usex dbus OFF ON)
- -DDESKTOP_APP_DISABLE_GTK_INTEGRATION=$(usex gtk OFF ON)
- -DDESKTOP_APP_DISABLE_WEBKIT=$(usex webkit OFF ON)
- -DDESKTOP_APP_DISABLE_SPELLCHECK=$(usex spell OFF ON) # enables hunspell (recommended)
- -DDESKTOP_APP_USE_ENCHANT=$(usex enchant ON OFF) # enables enchant and disables hunspell
- )
-
- if [[ -n ${MY_TDESKTOP_API_ID} && -n ${MY_TDESKTOP_API_HASH} ]]; then
- einfo "Found custom API credentials"
- mycmakeargs+=(
- -DTDESKTOP_API_ID="${MY_TDESKTOP_API_ID}"
- -DTDESKTOP_API_HASH="${MY_TDESKTOP_API_HASH}"
- )
- else
- # https://github.com/telegramdesktop/tdesktop/blob/dev/snap/snapcraft.yaml
- # Building with snapcraft API credentials by default
- # Custom API credentials can be obtained here:
- # https://github.com/telegramdesktop/tdesktop/blob/dev/docs/api_credentials.md
- # After getting credentials you can export variables:
- # export MY_TDESKTOP_API_ID="17349""
- # export MY_TDESKTOP_API_HASH="344583e45741c457fe1862106095a5eb"
- # and restart the build"
- # you can set above variables (without export) in /etc/portage/env/net-im/telegram-desktop
- # portage will use custom variable every build automatically
- mycmakeargs+=(
- -DTDESKTOP_API_ID="611335"
- -DTDESKTOP_API_HASH="d524b414d21f4d37f08684c1df41ac9c"
- )
- fi
-
- cmake_src_configure
-}
-
-pkg_postinst() {
- xdg_pkg_postinst
- use gtk || elog "enable the 'gtk' useflag if you have image copy-paste problems"
- if ! use X && ! use screencast; then
- elog "both the 'X' and 'screencast' useflags are disabled, screen sharing won't work!"
- fi
-}