* [gentoo-commits] repo/gentoo:master commit in: net-im/telegram-desktop/files/, net-im/telegram-desktop/
@ 2021-05-09 8:05 Georgy Yakovlev
0 siblings, 0 replies; 38+ messages in thread
From: Georgy Yakovlev @ 2021-05-09 8:05 UTC (permalink / raw
To: gentoo-commits
commit: bf6fe4f653ded715ab500b5911d394547be42fb3
Author: Esteve Varela Colominas <esteve.varela <AT> gmail <DOT> com>
AuthorDate: Sat May 8 14:17:28 2021 +0000
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Sun May 9 08:04:43 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bf6fe4f6
net-im/telegram-desktop: Fix build with GCC 11
Closes: https://bugs.gentoo.org/787968
Thanks-to: Agostino Sarubbo <ago <AT> gentoo.org>
Signed-off-by: Esteve Varela Colominas <esteve.varela <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/20729
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
.../files/tdesktop-2.7.4-webview-fix-gcc11.patch | 25 ++++++++++++++++++++++
.../telegram-desktop/telegram-desktop-2.7.4.ebuild | 2 ++
2 files changed, 27 insertions(+)
diff --git a/net-im/telegram-desktop/files/tdesktop-2.7.4-webview-fix-gcc11.patch b/net-im/telegram-desktop/files/tdesktop-2.7.4-webview-fix-gcc11.patch
new file mode 100644
index 00000000000..0188eaf76f8
--- /dev/null
+++ b/net-im/telegram-desktop/files/tdesktop-2.7.4-webview-fix-gcc11.patch
@@ -0,0 +1,25 @@
+Index: tdesktop-2.7.4-full/Telegram/lib_webview/webview/webview_embed.cpp
+===================================================================
+--- tdesktop-2.7.4-full.orig/Telegram/lib_webview/webview/webview_embed.cpp
++++ tdesktop-2.7.4-full/Telegram/lib_webview/webview/webview_embed.cpp
+@@ -14,7 +14,6 @@
+
+ #include <QtWidgets/QWidget>
+ #include <QtGui/QWindow>
+-#include <QtCore/QJsonDocument>
+
+ namespace Webview {
+ namespace {
+Index: tdesktop-2.7.4-full/Telegram/lib_webview/webview/webview_embed.h
+===================================================================
+--- tdesktop-2.7.4-full.orig/Telegram/lib_webview/webview/webview_embed.h
++++ tdesktop-2.7.4-full/Telegram/lib_webview/webview/webview_embed.h
+@@ -9,6 +9,8 @@
+ #include "base/unique_qptr.h"
+ #include "base/basic_types.h"
+
++#include <QtCore/QJsonDocument>
++
+ class QString;
+ class QWidget;
+ class QWindow;
diff --git a/net-im/telegram-desktop/telegram-desktop-2.7.4.ebuild b/net-im/telegram-desktop/telegram-desktop-2.7.4.ebuild
index 609781f96cb..8081b9da583 100644
--- a/net-im/telegram-desktop/telegram-desktop-2.7.4.ebuild
+++ b/net-im/telegram-desktop/telegram-desktop-2.7.4.ebuild
@@ -71,6 +71,8 @@ PATCHES=(
"${FILESDIR}/tdesktop-2.7.3-disable-webkit-separately.patch"
# https://github.com/desktop-app/lib_webview/commit/0b4100d7cecc4e748c51f3f51ebfd1392ec3978a
"${FILESDIR}/tdesktop-2.7.3-webview-include-gdkx.patch"
+ # https://github.com/desktop-app/lib_webview/pull/3
+ "${FILESDIR}/tdesktop-2.7.4-webview-fix-gcc11.patch"
)
pkg_pretend() {
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-im/telegram-desktop/files/, net-im/telegram-desktop/
@ 2024-05-15 8:51 Yixun Lan
0 siblings, 0 replies; 38+ messages in thread
From: Yixun Lan @ 2024-05-15 8:51 UTC (permalink / raw
To: gentoo-commits
commit: 120013af5e426be31d56a12b672429380d506959
Author: Quincy Fleming <quincyf467 <AT> protonmail <DOT> com>
AuthorDate: Wed May 15 08:43:44 2024 +0000
Commit: Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Wed May 15 08:50:52 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=120013af
net-im/telegram-desktop: fix compile error
fix case with USE=X disabled and USE=wayland enabled
Closes: https://bugs.gentoo.org/931923
Closes: https://github.com/gentoo/gentoo/pull/36680
Acked-by: Esteve Varela Colominas <esteve.varela <AT> gmail.com>
Signed-off-by: Quincy Fleming <quincyf467 <AT> protonmail.com>
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>
.../files/tdesktop-5.0.1-qt6-no-wayland.patch | 20 ++++++++++----------
...5.0.1.ebuild => telegram-desktop-5.0.1-r1.ebuild} | 0
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/net-im/telegram-desktop/files/tdesktop-5.0.1-qt6-no-wayland.patch b/net-im/telegram-desktop/files/tdesktop-5.0.1-qt6-no-wayland.patch
index 10a8743a0d31..2c10ceb9b388 100644
--- a/net-im/telegram-desktop/files/tdesktop-5.0.1-qt6-no-wayland.patch
+++ b/net-im/telegram-desktop/files/tdesktop-5.0.1-qt6-no-wayland.patch
@@ -9,8 +9,8 @@ be seen, depending on what upstream thinks about this.
https://bugs.gentoo.org/928451
https://github.com/desktop-app/cmake_helpers/commit/a428df5440e76a726abc30924766ac7da0cb381c
---- tdesktop-5.0.1-full.orig/Telegram/lib_base/base/platform/linux/base_linux_xdg_activation_token.cpp
-+++ tdesktop-5.0.1-full/Telegram/lib_base/base/platform/linux/base_linux_xdg_activation_token.cpp
+--- a/Telegram/lib_base/base/platform/linux/base_linux_xdg_activation_token.cpp
++++ b/Telegram/lib_base/base/platform/linux/base_linux_xdg_activation_token.cpp
@@ -15,7 +15,7 @@
namespace base::Platform {
@@ -20,14 +20,14 @@ https://github.com/desktop-app/cmake_helpers/commit/a428df5440e76a726abc30924766
const auto window = QGuiApplication::focusWindow();
if (!window) {
callback({});
---- tdesktop-5.0.1-full.orig/Telegram/lib_ui/ui/platform/linux/ui_utility_linux.cpp
-+++ tdesktop-5.0.1-full/Telegram/lib_ui/ui/platform/linux/ui_utility_linux.cpp
+--- a/Telegram/lib_ui/ui/platform/linux/ui_utility_linux.cpp
++++ b/Telegram/lib_ui/ui/platform/linux/ui_utility_linux.cpp
@@ -413,7 +413,7 @@
}
#endif // !DESKTOP_APP_DISABLE_X11_INTEGRATION
-#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
-+#if !defined DESKTOP_APP_DISABLE_X11_INTEGRATION && QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
++#if !defined DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION && QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
void ShowWaylandWindowMenu(not_null<QWidget*> widget, const QPoint &point) {
static const auto wl_proxy_marshal_array = [] {
void (*result)(
@@ -67,8 +67,8 @@ https://github.com/desktop-app/cmake_helpers/commit/a428df5440e76a726abc30924766
if (::Platform::IsWayland()) {
ShowWaylandWindowMenu(widget, point);
return;
---- tdesktop-5.0.1-full.orig/cmake/options.cmake
-+++ tdesktop-5.0.1-full/cmake/options.cmake
+--- a/cmake/options.cmake
++++ b/cmake/options.cmake
@@ -23,6 +23,13 @@
)
endif()
@@ -76,15 +76,15 @@ https://github.com/desktop-app/cmake_helpers/commit/a428df5440e76a726abc30924766
+if (DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION)
+ target_compile_definitions(common_options
+ INTERFACE
-+ DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION
++ DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION
+ )
+endif()
+
if (WIN32)
include(cmake/options_win.cmake)
elseif (APPLE)
---- tdesktop-5.0.1-full.orig/cmake/variables.cmake
-+++ tdesktop-5.0.1-full/cmake/variables.cmake
+--- a/cmake/variables.cmake
++++ b/cmake/variables.cmake
@@ -21,6 +21,7 @@
option(DESKTOP_APP_LOTTIE_USE_CACHE "Use caching in lottie animations." ON)
diff --git a/net-im/telegram-desktop/telegram-desktop-5.0.1.ebuild b/net-im/telegram-desktop/telegram-desktop-5.0.1-r1.ebuild
similarity index 100%
rename from net-im/telegram-desktop/telegram-desktop-5.0.1.ebuild
rename to net-im/telegram-desktop/telegram-desktop-5.0.1-r1.ebuild
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-im/telegram-desktop/files/, net-im/telegram-desktop/
@ 2024-05-14 2:08 Yixun Lan
0 siblings, 0 replies; 38+ messages in thread
From: Yixun Lan @ 2024-05-14 2:08 UTC (permalink / raw
To: gentoo-commits
commit: 1372b4e7c89a5a73ff736282f65c0c44f2ff33d9
Author: Esteve Varela Colominas <esteve.varela <AT> gmail <DOT> com>
AuthorDate: Sat May 11 14:12:58 2024 +0000
Commit: Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Tue May 14 01:43:15 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1372b4e7
net-im/telegram-desktop: Bump to 5.0.1
Bug: https://bugs.gentoo.org/920464
Thanks-to: Erik
Signed-off-by: Esteve Varela Colominas <esteve.varela <AT> gmail.com>
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>
net-im/telegram-desktop/Manifest | 1 +
.../files/tdesktop-5.0.1-qt6-no-wayland.patch | 95 ++++++++
.../telegram-desktop/telegram-desktop-5.0.1.ebuild | 249 +++++++++++++++++++++
3 files changed, 345 insertions(+)
diff --git a/net-im/telegram-desktop/Manifest b/net-im/telegram-desktop/Manifest
index 013773ab3d08..a2da9c6b0b99 100644
--- a/net-im/telegram-desktop/Manifest
+++ b/net-im/telegram-desktop/Manifest
@@ -2,3 +2,4 @@ DIST tdesktop-4.15.0-full.tar.gz 68286818 BLAKE2B 2bd4d59370a4f97aa3c1b1d64fa7ee
DIST tdesktop-4.15.2-full.tar.gz 69539402 BLAKE2B 95d6cd3eead56f7cb2aeafd0cc1a05d740ec243644e6d318f415a7fa6c8ad94d3a95cfc9082ba04507a024c81bfc15700ad6adcbfd932ca1993a3310744ac196 SHA512 6e65183d5e77d17e11d0c70e1654373e69f6243f2879cf403701e23acd5aed9df6c6892a1c7c83fd975a858e90e20d73824d0754a2f96ad5af6e3de6515e2627
DIST tdesktop-4.16.8-full.tar.gz 70436084 BLAKE2B 5e64372de39a94b2fb7d4b0b8cb4896e9f4bb9eb1421898f30b686a6ce02141cebc42e2be280107ccbbda771f868de365267248dbdab393d88e204fa197f5e3d SHA512 7d9d8ab4c62cf9e4f44ff879953f3d543427f7fd80682f6d08b58fb3dec481b0082086c3958e38b809b886359a76b1f5450142dbcfb58c867014d78f5fa19f60
DIST tdesktop-5.0.0-full.tar.gz 69454950 BLAKE2B 3bea8eb50cc5a86b12cbc8a1e6ccd537be7ecc0b90427a4325ee8e9b18469575c0026763e469241f0c71f0e9f0a1be799dfadc62d4177a00d804845c81fae1cc SHA512 9e674cf8b8bbb94cc7bd0fd9493c435f25314a317086e8c102fe0309bdcd5805b605257883831eb8548825597aab5b9f8f0b5074689b630b63f301506402323d
+DIST tdesktop-5.0.1-full.tar.gz 69454563 BLAKE2B 0bbb0ee0c096a344b00091795c2bfadd71272b01966daed8f44fd7010c4c4ecfb265c80ecd773934dd0636be1e703bbadc0038befdefd6da93dfadea40e53fba SHA512 45b7833f20f01d78c09163e205af7d68afffcfc88075ba6af35dc6cbbce1f0205c0150b137ca09e6bdaf271240e4d1336411ad427bc27a2b2ad42dc435ee0ec2
diff --git a/net-im/telegram-desktop/files/tdesktop-5.0.1-qt6-no-wayland.patch b/net-im/telegram-desktop/files/tdesktop-5.0.1-qt6-no-wayland.patch
new file mode 100644
index 000000000000..10a8743a0d31
--- /dev/null
+++ b/net-im/telegram-desktop/files/tdesktop-5.0.1-qt6-no-wayland.patch
@@ -0,0 +1,95 @@
+Allow disabling wayland integration for Qt6 builds
+
+Upstream has removed the required toggle for wayland integration, and instead
+is forcing it when the program is being built with Qt6 version 6.5.0 or higher.
+
+Currently this is simple to work around, but its future feasibility remains to
+be seen, depending on what upstream thinks about this.
+
+https://bugs.gentoo.org/928451
+https://github.com/desktop-app/cmake_helpers/commit/a428df5440e76a726abc30924766ac7da0cb381c
+
+--- tdesktop-5.0.1-full.orig/Telegram/lib_base/base/platform/linux/base_linux_xdg_activation_token.cpp
++++ tdesktop-5.0.1-full/Telegram/lib_base/base/platform/linux/base_linux_xdg_activation_token.cpp
+@@ -15,7 +15,7 @@
+ namespace base::Platform {
+
+ void RunWithXdgActivationToken(Fn<void(QString)> callback) {
+-#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
++#if !defined DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION && QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
+ const auto window = QGuiApplication::focusWindow();
+ if (!window) {
+ callback({});
+--- tdesktop-5.0.1-full.orig/Telegram/lib_ui/ui/platform/linux/ui_utility_linux.cpp
++++ tdesktop-5.0.1-full/Telegram/lib_ui/ui/platform/linux/ui_utility_linux.cpp
+@@ -413,7 +413,7 @@
+ }
+ #endif // !DESKTOP_APP_DISABLE_X11_INTEGRATION
+
+-#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
++#if !defined DESKTOP_APP_DISABLE_X11_INTEGRATION && QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
+ void ShowWaylandWindowMenu(not_null<QWidget*> widget, const QPoint &point) {
+ static const auto wl_proxy_marshal_array = [] {
+ void (*result)(
+@@ -533,7 +533,7 @@
+ }
+
+ bool WindowMarginsSupported() {
+-#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
++#if !defined DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION && QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
+ static const auto WaylandResult = [] {
+ using namespace QNativeInterface::Private;
+ QWindow window;
+@@ -560,7 +560,7 @@
+ }
+
+ void SetWindowMargins(not_null<QWidget*> widget, const QMargins &margins) {
+-#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
++#if !defined DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION && QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
+ using namespace QNativeInterface::Private;
+ const auto window = not_null(widget->windowHandle());
+ const auto platformWindow = not_null(window->handle());
+@@ -582,7 +582,7 @@
+ }
+
+ void UnsetWindowMargins(not_null<QWidget*> widget) {
+-#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
++#if !defined DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION && QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
+ using namespace QNativeInterface::Private;
+ if (const auto native = not_null(widget->windowHandle())
+ ->nativeInterface<QWaylandWindow>()) {
+@@ -600,7 +600,7 @@
+ }
+
+ void ShowWindowMenu(not_null<QWidget*> widget, const QPoint &point) {
+-#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
++#if !defined DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION && QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
+ if (::Platform::IsWayland()) {
+ ShowWaylandWindowMenu(widget, point);
+ return;
+--- tdesktop-5.0.1-full.orig/cmake/options.cmake
++++ tdesktop-5.0.1-full/cmake/options.cmake
+@@ -23,6 +23,13 @@
+ )
+ endif()
+
++if (DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION)
++ target_compile_definitions(common_options
++ INTERFACE
++ DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION
++ )
++endif()
++
+ if (WIN32)
+ include(cmake/options_win.cmake)
+ elseif (APPLE)
+--- tdesktop-5.0.1-full.orig/cmake/variables.cmake
++++ tdesktop-5.0.1-full/cmake/variables.cmake
+@@ -21,6 +21,7 @@
+
+ option(DESKTOP_APP_LOTTIE_USE_CACHE "Use caching in lottie animations." ON)
+ cmake_dependent_option(DESKTOP_APP_DISABLE_X11_INTEGRATION "Disable all code for X11 integration." OFF LINUX ON)
++cmake_dependent_option(DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION "Disable all code for Wayland integration." OFF LINUX ON)
+ cmake_dependent_option(DESKTOP_APP_USE_ALLOCATION_TRACER "Use simple allocation tracer." OFF LINUX OFF)
+ cmake_dependent_option(DESKTOP_APP_USE_PACKAGED_LAZY "Bundle recommended Qt plugins for self-contained packages." OFF LINUX OFF)
+ option(DESKTOP_APP_USE_PACKAGED_FONTS "Use preinstalled fonts instead of bundled patched ones." OFF)
diff --git a/net-im/telegram-desktop/telegram-desktop-5.0.1.ebuild b/net-im/telegram-desktop/telegram-desktop-5.0.1.ebuild
new file mode 100644
index 000000000000..0dfe60495f3e
--- /dev/null
+++ b/net-im/telegram-desktop/telegram-desktop-5.0.1.ebuild
@@ -0,0 +1,249 @@
+# Copyright 2020-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit xdg cmake python-any-r1 optfeature 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"
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="BSD GPL-3-with-openssl-exception LGPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~loong ~ppc64 ~riscv"
+IUSE="dbus enchant +fonts +jemalloc screencast qt6 qt6-imageformats wayland webkit +X"
+REQUIRED_USE="
+ qt6-imageformats? ( qt6 )
+"
+
+KIMAGEFORMATS_RDEPEND="
+ media-libs/libavif:=
+ media-libs/libheif:=
+ >=media-libs/libjxl-0.8.0:=
+"
+CDEPEND="
+ !net-im/telegram-desktop-bin
+ app-arch/lz4:=
+ dev-cpp/abseil-cpp:=
+ >=dev-cpp/glibmm-2.77:2.68
+ dev-libs/glib:2
+ dev-libs/libdispatch
+ dev-libs/openssl:=
+ dev-libs/protobuf
+ dev-libs/xxhash
+ media-libs/libjpeg-turbo:=
+ ~media-libs/libtgvoip-2.4.4_p20221208
+ media-libs/openal
+ media-libs/opus
+ media-libs/rnnoise
+ ~media-libs/tg_owt-0_pre20230921:=[screencast=,X=]
+ media-video/ffmpeg:=[opus,vpx]
+ sys-libs/zlib:=[minizip]
+ !enchant? ( >=app-text/hunspell-1.7:= )
+ enchant? ( app-text/enchant:= )
+ jemalloc? ( dev-libs/jemalloc:= )
+ !qt6? (
+ >=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?]
+ kde-frameworks/kcoreaddons:5
+ webkit? (
+ >=dev-qt/qtdeclarative-5.15:5
+ >=dev-qt/qtwayland-5.15:5[compositor(+)]
+ )
+ )
+ qt6? (
+ >=dev-qt/qtbase-6.5:6=[dbus?,gui,network,opengl,wayland?,widgets,X?]
+ >=dev-qt/qtimageformats-6.5:6
+ >=dev-qt/qtsvg-6.5:6
+ webkit? (
+ >=dev-qt/qtdeclarative-6.5:6
+ >=dev-qt/qtwayland-6.5:6[compositor,qml]
+ )
+ qt6-imageformats? (
+ >=dev-qt/qtimageformats-6.5:6=
+ ${KIMAGEFORMATS_RDEPEND}
+ )
+ )
+ X? (
+ x11-libs/libxcb:=
+ x11-libs/xcb-util-keysyms
+ )
+"
+RDEPEND="${CDEPEND}
+ webkit? ( || ( net-libs/webkit-gtk:4.1 net-libs/webkit-gtk:6 ) )
+"
+DEPEND="${CDEPEND}
+ >=dev-cpp/cppgir-2.0_p20240315
+ >=dev-cpp/ms-gsl-4
+ dev-cpp/expected-lite
+ dev-cpp/range-v3
+"
+BDEPEND="
+ ${PYTHON_DEPS}
+ >=dev-build/cmake-3.16
+ >=dev-cpp/cppgir-2.0_p20240315
+ dev-util/gdbus-codegen
+ virtual/pkgconfig
+ wayland? ( dev-util/wayland-scanner )
+"
+
+PATCHES=(
+ "${FILESDIR}/tdesktop-4.2.4-jemalloc-only-telegram-r1.patch"
+ "${FILESDIR}/tdesktop-4.10.0-system-cppgir.patch"
+ "${FILESDIR}/tdesktop-5.0.1-qt6-no-wayland.patch"
+)
+
+pkg_pretend() {
+ if has ccache ${FEATURES}; then
+ 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() {
+ # Bundle kde-frameworks/kimageformats for qt6, since it's impossible to
+ # build in gentoo right now.
+ if use qt6-imageformats; then
+ sed -e 's/DESKTOP_APP_USE_PACKAGED_LAZY/TRUE/' -i \
+ cmake/external/kimageformats/CMakeLists.txt || die
+ printf '%s\n' \
+ 'Q_IMPORT_PLUGIN(QAVIFPlugin)' \
+ 'Q_IMPORT_PLUGIN(HEIFPlugin)' \
+ 'Q_IMPORT_PLUGIN(QJpegXLPlugin)' \
+ >> cmake/external/qt/qt_static_plugins/qt_static_plugins.cpp || die
+ fi
+ # kde-frameworks/kcoreaddons is bundled when using qt6.
+
+ # Happily fail if libraries aren't found...
+ find -type f \( -name 'CMakeLists.txt' -o -name '*.cmake' \) \
+ \! -path './Telegram/lib_webview/CMakeLists.txt' \
+ \! -path './cmake/external/expected/CMakeLists.txt' \
+ \! -path './cmake/external/kcoreaddons/CMakeLists.txt' \
+ \! -path './cmake/external/qt/package.cmake' \
+ -print0 | xargs -0 sed -i \
+ -e '/pkg_check_modules(/s/[^ ]*)/REQUIRED &/' \
+ -e '/find_package(/s/)/ REQUIRED)/' || die
+ # Make sure to check the excluded files for new
+ # CMAKE_DISABLE_FIND_PACKAGE entries.
+
+ # Control QtDBus dependency from here, to avoid messing with QtGui.
+ # QtGui will use find_package to find QtDbus as well, which
+ # conflicts with the -DCMAKE_DISABLE_FIND_PACKAGE method.
+ if ! use dbus; then
+ sed -e '/find_package(Qt[^ ]* OPTIONAL_COMPONENTS/s/DBus *//' \
+ -i cmake/external/qt/package.cmake || die
+ fi
+
+ cmake_src_prepare
+}
+
+src_configure() {
+ # Having user paths sneak into the build environment through the
+ # XDG_DATA_DIRS variable causes all sorts of weirdness with cppgir:
+ # - bug 909038: can't read from flatpak directories (fixed upstream)
+ # - bug 920819: system-wide directories ignored when variable is set
+ export XDG_DATA_DIRS="${EPREFIX}/usr/share"
+
+ # Evil flag (bug #919201)
+ filter-flags -fno-delete-null-pointer-checks
+
+ # The ABI of media-libs/tg_owt breaks if the -DNDEBUG flag doesn't keep
+ # the same state across both projects.
+ # See https://bugs.gentoo.org/866055
+ append-cppflags '-DNDEBUG'
+
+ local qt=$(usex qt6 6 5)
+ local mycmakeargs=(
+ -DQT_VERSION_MAJOR=${qt}
+
+ # Override new cmake.eclass defaults (https://bugs.gentoo.org/921939)
+ # Upstream never tests this any other way
+ -DCMAKE_DISABLE_PRECOMPILE_HEADERS=OFF
+
+ # Control automagic dependencies on certain packages
+ ## Header-only lib, some git version.
+ -DCMAKE_DISABLE_FIND_PACKAGE_tl-expected=ON
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt${qt}Quick=$(usex !webkit)
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt${qt}QuickWidgets=$(usex !webkit)
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt${qt}WaylandClient=$(usex !wayland)
+ ## Only used in Telegram/lib_webview/CMakeLists.txt
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt${qt}WaylandCompositor=$(usex !webkit)
+ ## KF6CoreAddons is currently unavailable in ::gentoo
+ -DCMAKE_DISABLE_FIND_PACKAGE_KF${qt}CoreAddons=$(usex qt6)
+
+ -DDESKTOP_APP_DISABLE_X11_INTEGRATION=$(usex !X)
+ -DDESKTOP_APP_DISABLE_WAYLAND_INTEGRATION=$(usex !wayland)
+ -DDESKTOP_APP_DISABLE_JEMALLOC=$(usex !jemalloc)
+ ## Enables enchant and disables hunspell
+ -DDESKTOP_APP_USE_ENCHANT=$(usex enchant)
+ ## Use system fonts instead of bundled ones
+ -DDESKTOP_APP_USE_PACKAGED_FONTS=$(usex !fonts)
+ )
+
+ 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
+ if ! use X && ! use screencast; then
+ ewarn "both the 'X' and 'screencast' USE flags are disabled, screen sharing won't work!"
+ ewarn
+ fi
+ if ! use jemalloc && use elibc_glibc; then
+ # https://github.com/telegramdesktop/tdesktop/issues/16084
+ # https://github.com/desktop-app/cmake_helpers/pull/91#issuecomment-881788003
+ ewarn "Disabling USE=jemalloc on glibc systems may cause very high RAM usage!"
+ ewarn "Do NOT report issues about RAM usage without enabling this flag first."
+ ewarn
+ fi
+ if use wayland && ! use qt6; then
+ ewarn "Wayland-specific integrations have been deprecated with Qt5."
+ ewarn "The app will continue to function under wayland, but some"
+ ewarn "functionality may be reduced."
+ ewarn "These integrations are only supported when built with Qt6."
+ ewarn
+ fi
+ if use qt6 && ! use qt6-imageformats; then
+ elog "Enable USE=qt6-imageformats for AVIF, HEIF and JpegXL support"
+ elog
+ fi
+ optfeature_header
+ if ! use qt6; then
+ optfeature "AVIF, HEIF and JpegXL image support" kde-frameworks/kimageformats[avif,heif,jpegxl]
+ fi
+}
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-im/telegram-desktop/files/, net-im/telegram-desktop/
@ 2024-04-10 23:34 Yixun Lan
0 siblings, 0 replies; 38+ messages in thread
From: Yixun Lan @ 2024-04-10 23:34 UTC (permalink / raw
To: gentoo-commits
commit: 195ee5572f4f70d244469a6d515e309133ed7b36
Author: Aliaksei Urbanski <aliaksei.urbanski <AT> gmail <DOT> com>
AuthorDate: Wed Apr 10 21:36:04 2024 +0000
Commit: Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Wed Apr 10 23:33:19 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=195ee557
net-im/telegram-desktop: add 4.16.6
Release:
- https://github.com/telegramdesktop/tdesktop/releases/tag/v4.16.6
Changelog:
- https://github.com/telegramdesktop/tdesktop/blob/v4.16.6/changelog.txt
Based on previous commit of gentoo.git repository :
4b681a67160271ec96912fc12ad1c50536825705
3006f656e6dd79d109533b220b224ad7de22a818
ce4cbbe6125f6444606f3c3df4c82c93e17a8e64
Closes: https://github.com/gentoo/gentoo/pull/36193
Co-authored-by: Esteve Varela Colominas <esteve.varela <AT> gmail.com>
Signed-off-by: Aliaksei Urbanski <aliaksei.urbanski <AT> gmail.com>
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>
net-im/telegram-desktop/Manifest | 1 +
.../tdesktop-4.2.4-jemalloc-only-telegram-r1.patch | 43 ++++
.../telegram-desktop-4.16.6.ebuild | 247 +++++++++++++++++++++
3 files changed, 291 insertions(+)
diff --git a/net-im/telegram-desktop/Manifest b/net-im/telegram-desktop/Manifest
index 480276343a72..889b8b5babf0 100644
--- a/net-im/telegram-desktop/Manifest
+++ b/net-im/telegram-desktop/Manifest
@@ -1,3 +1,4 @@
DIST tdesktop-4.15.0-full.tar.gz 68286818 BLAKE2B 2bd4d59370a4f97aa3c1b1d64fa7eea114539edcff46ea30a5361cefeeb1de8a1954be91a1a420ddc1b1a30970944387c2cd3749badaa494e53862066c624ac3 SHA512 95aa5f14a9a88b9c6421049445f59f1c5c5d7ab4ca4e8b8f4ab7389bdb8f3cc6b29fea270574881633035acec769ba271261f84ec269010c63af28a03719da98
DIST tdesktop-4.15.2-full.tar.gz 69539402 BLAKE2B 95d6cd3eead56f7cb2aeafd0cc1a05d740ec243644e6d318f415a7fa6c8ad94d3a95cfc9082ba04507a024c81bfc15700ad6adcbfd932ca1993a3310744ac196 SHA512 6e65183d5e77d17e11d0c70e1654373e69f6243f2879cf403701e23acd5aed9df6c6892a1c7c83fd975a858e90e20d73824d0754a2f96ad5af6e3de6515e2627
DIST tdesktop-4.16.4-full.tar.gz 69798524 BLAKE2B 1d946a2f9408dfe29bdab679bcd68703f9de2d2aade84eea3331616cd1352c3304c2407e0a8d81044dad262482eab36e983b151f0a600df383a9f23b39177fd4 SHA512 cee57e654d06dd50843a0ae88cb658d69b546e37f613a2e93d7f44463136830ff5c3de6b7177fb050b1301bfa25ed6e16f0b3fd894b0635772941c999d3ff63f
+DIST tdesktop-4.16.6-full.tar.gz 70435773 BLAKE2B 5b66ba9e7a4cbbadcfd271bd33940ccf928e32b7b008b60b710095ff3b60255257b56746b5344100f034164949f428cfd19727f5d5a9f364eba7e7f6b58853fb SHA512 5b580d36c8b8a90981c3541d4c148df37bb7ebdec0970bfbfe4c1a9a1175e3cf41c2a14d854d7d917482aa9086ee712844ec40780741df22ad6d42fcf3c48f1f
diff --git a/net-im/telegram-desktop/files/tdesktop-4.2.4-jemalloc-only-telegram-r1.patch b/net-im/telegram-desktop/files/tdesktop-4.2.4-jemalloc-only-telegram-r1.patch
new file mode 100644
index 000000000000..d56bacea69f8
--- /dev/null
+++ b/net-im/telegram-desktop/files/tdesktop-4.2.4-jemalloc-only-telegram-r1.patch
@@ -0,0 +1,43 @@
+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-4.2.4-full.orig/Telegram/CMakeLists.txt
++++ tdesktop-4.2.4-full/Telegram/CMakeLists.txt
+@@ -1478,6 +1478,14 @@
+ desktop-app::external_wayland_client
+ )
+ endif()
++
++ if (NOT DESKTOP_APP_DISABLE_JEMALLOC)
++ target_link_libraries(Telegram
++ PRIVATE
++ $<TARGET_OBJECTS:desktop-app::linux_jemalloc_helper>
++ $<LINK_ONLY:desktop-app::external_jemalloc>
++ )
++ endif()
+ endif()
+
+ if (build_macstore)
+--- tdesktop-4.2.4-full.orig/cmake/options_linux.cmake
++++ tdesktop-4.2.4-full/cmake/options_linux.cmake
+@@ -78,14 +78,6 @@
+ )
+ 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()
+-
+ if (DESKTOP_APP_USE_ALLOCATION_TRACER)
+ target_link_options(common_options
+ INTERFACE
diff --git a/net-im/telegram-desktop/telegram-desktop-4.16.6.ebuild b/net-im/telegram-desktop/telegram-desktop-4.16.6.ebuild
new file mode 100644
index 000000000000..a71d70336af3
--- /dev/null
+++ b/net-im/telegram-desktop/telegram-desktop-4.16.6.ebuild
@@ -0,0 +1,247 @@
+# Copyright 2020-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit xdg cmake python-any-r1 optfeature 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"
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="BSD GPL-3-with-openssl-exception LGPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~loong ~ppc64 ~riscv"
+IUSE="dbus enchant +fonts +jemalloc screencast qt6 qt6-imageformats wayland webkit +X"
+REQUIRED_USE="
+ qt6-imageformats? ( qt6 )
+"
+
+KIMAGEFORMATS_RDEPEND="
+ media-libs/libavif:=
+ media-libs/libheif:=
+ >=media-libs/libjxl-0.8.0:=
+"
+CDEPEND="
+ !net-im/telegram-desktop-bin
+ app-arch/lz4:=
+ dev-cpp/abseil-cpp:=
+ >=dev-cpp/glibmm-2.77:2.68
+ dev-libs/glib:2
+ dev-libs/libdispatch
+ dev-libs/openssl:=
+ dev-libs/protobuf
+ dev-libs/xxhash
+ media-libs/libjpeg-turbo:=
+ ~media-libs/libtgvoip-2.4.4_p20221208
+ media-libs/openal
+ media-libs/opus
+ media-libs/rnnoise
+ ~media-libs/tg_owt-0_pre20230921:=[screencast=,X=]
+ media-video/ffmpeg:=[opus,vpx]
+ sys-libs/zlib:=[minizip]
+ !enchant? ( >=app-text/hunspell-1.7:= )
+ enchant? ( app-text/enchant:= )
+ jemalloc? ( dev-libs/jemalloc:=[-lazy-lock] )
+ !qt6? (
+ >=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?]
+ kde-frameworks/kcoreaddons:5
+ webkit? (
+ >=dev-qt/qtdeclarative-5.15:5
+ >=dev-qt/qtwayland-5.15:5
+ )
+ )
+ qt6? (
+ >=dev-qt/qtbase-6.5:6=[dbus?,gui,network,opengl,wayland?,widgets,X?]
+ >=dev-qt/qtimageformats-6.5:6
+ >=dev-qt/qtsvg-6.5:6
+ webkit? (
+ >=dev-qt/qtdeclarative-6.5:6
+ >=dev-qt/qtwayland-6.5:6[compositor]
+ )
+ qt6-imageformats? (
+ >=dev-qt/qtimageformats-6.5:6=
+ ${KIMAGEFORMATS_RDEPEND}
+ )
+ )
+ X? (
+ x11-libs/libxcb:=
+ x11-libs/xcb-util-keysyms
+ )
+"
+RDEPEND="${CDEPEND}
+ webkit? ( || ( net-libs/webkit-gtk:4.1 net-libs/webkit-gtk:6 ) )
+"
+DEPEND="${CDEPEND}
+ >=dev-cpp/cppgir-2.0_p20240315
+ >=dev-cpp/ms-gsl-4
+ dev-cpp/expected-lite
+ dev-cpp/range-v3
+"
+BDEPEND="
+ ${PYTHON_DEPS}
+ >=dev-build/cmake-3.16
+ >=dev-cpp/cppgir-2.0_p20240315
+ dev-util/gdbus-codegen
+ virtual/pkgconfig
+ wayland? ( dev-util/wayland-scanner )
+"
+# dev-libs/jemalloc:=[-lazy-lock] -> https://bugs.gentoo.org/803233
+
+PATCHES=(
+ "${FILESDIR}/tdesktop-4.2.4-jemalloc-only-telegram-r1.patch"
+ "${FILESDIR}/tdesktop-4.10.0-system-cppgir.patch"
+)
+
+pkg_pretend() {
+ if has ccache ${FEATURES}; then
+ 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() {
+ # Bundle kde-frameworks/kimageformats for qt6, since it's impossible to
+ # build in gentoo right now.
+ if use qt6-imageformats; then
+ sed -e 's/DESKTOP_APP_USE_PACKAGED_LAZY/TRUE/' -i \
+ cmake/external/kimageformats/CMakeLists.txt || die
+ printf '%s\n' \
+ 'Q_IMPORT_PLUGIN(QAVIFPlugin)' \
+ 'Q_IMPORT_PLUGIN(HEIFPlugin)' \
+ 'Q_IMPORT_PLUGIN(QJpegXLPlugin)' \
+ >> cmake/external/qt/qt_static_plugins/qt_static_plugins.cpp || die
+ fi
+ # kde-frameworks/kcoreaddons is bundled when using qt6.
+
+ # Happily fail if libraries aren't found...
+ find -type f \( -name 'CMakeLists.txt' -o -name '*.cmake' \) \
+ \! -path './Telegram/lib_webview/CMakeLists.txt' \
+ \! -path './cmake/external/expected/CMakeLists.txt' \
+ \! -path './cmake/external/kcoreaddons/CMakeLists.txt' \
+ \! -path './cmake/external/qt/package.cmake' \
+ -print0 | xargs -0 sed -i \
+ -e '/pkg_check_modules(/s/[^ ]*)/REQUIRED &/' \
+ -e '/find_package(/s/)/ REQUIRED)/' || die
+ # Make sure to check the excluded files for new
+ # CMAKE_DISABLE_FIND_PACKAGE entries.
+
+ # Control QtDBus dependency from here, to avoid messing with QtGui.
+ if ! use dbus; then
+ sed -e '/find_package(Qt[^ ]* OPTIONAL_COMPONENTS/s/DBus *//' \
+ -i cmake/external/qt/package.cmake || die
+ fi
+
+ cmake_src_prepare
+}
+
+src_configure() {
+ # Having user paths sneak into the build environment through the
+ # XDG_DATA_DIRS variable causes all sorts of weirdness with cppgir:
+ # - bug 909038: can't read from flatpak directories (fixed upstream)
+ # - bug 920819: system-wide directories ignored when variable is set
+ export XDG_DATA_DIRS="${EPREFIX}/usr/share"
+
+ # Evil flag (bug #919201)
+ filter-flags -fno-delete-null-pointer-checks
+
+ # The ABI of media-libs/tg_owt breaks if the -DNDEBUG flag doesn't keep
+ # the same state across both projects.
+ # See https://bugs.gentoo.org/866055
+ append-cppflags '-DNDEBUG'
+
+ local qt=$(usex qt6 6 5)
+ local mycmakeargs=(
+ -DQT_VERSION_MAJOR=${qt}
+
+ # Override new cmake.eclass defaults (https://bugs.gentoo.org/921939)
+ # Upstream never tests this any other way
+ -DCMAKE_DISABLE_PRECOMPILE_HEADERS=OFF
+
+ # Control automagic dependencies on certain packages
+ ## Header-only lib, some git version.
+ -DCMAKE_DISABLE_FIND_PACKAGE_tl-expected=ON
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt${qt}Quick=$(usex !webkit)
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt${qt}QuickWidgets=$(usex !webkit)
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt${qt}WaylandClient=$(usex !wayland)
+ ## Only used in Telegram/lib_webview/CMakeLists.txt
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt${qt}WaylandCompositor=$(usex !webkit)
+ ## KF6CoreAddons is currently unavailable in ::gentoo
+ -DCMAKE_DISABLE_FIND_PACKAGE_KF${qt}CoreAddons=$(usex qt6)
+
+ -DDESKTOP_APP_DISABLE_X11_INTEGRATION=$(usex !X)
+ -DDESKTOP_APP_DISABLE_WAYLAND_INTEGRATION=$(usex !wayland)
+ -DDESKTOP_APP_DISABLE_JEMALLOC=$(usex !jemalloc)
+ ## Enables enchant and disables hunspell
+ -DDESKTOP_APP_USE_ENCHANT=$(usex enchant)
+ ## Use system fonts instead of bundled ones
+ -DDESKTOP_APP_USE_PACKAGED_FONTS=$(usex !fonts)
+ )
+
+ 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
+ if ! use X && ! use screencast; then
+ ewarn "both the 'X' and 'screencast' USE flags are disabled, screen sharing won't work!"
+ ewarn
+ fi
+ if ! use jemalloc && use elibc_glibc; then
+ # https://github.com/telegramdesktop/tdesktop/issues/16084
+ # https://github.com/desktop-app/cmake_helpers/pull/91#issuecomment-881788003
+ ewarn "Disabling USE=jemalloc on glibc systems may cause very high RAM usage!"
+ ewarn "Do NOT report issues about RAM usage without enabling this flag first."
+ ewarn
+ fi
+ if use wayland && ! use qt6; then
+ ewarn "Wayland-specific integrations have been deprecated with Qt5."
+ ewarn "The app will continue to function under wayland, but some"
+ ewarn "functionality may be reduced."
+ ewarn "These integrations are only supported when built with Qt6."
+ ewarn
+ fi
+ if use qt6 && ! use qt6-imageformats; then
+ elog "Enable USE=qt6-imageformats for AVIF, HEIF and JpegXL support"
+ elog
+ fi
+ optfeature_header
+ if ! use qt6; then
+ optfeature "AVIF, HEIF and JpegXL image support" kde-frameworks/kimageformats[avif,heif,jpegxl]
+ fi
+}
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-im/telegram-desktop/files/, net-im/telegram-desktop/
@ 2023-12-28 13:58 Yixun Lan
0 siblings, 0 replies; 38+ messages in thread
From: Yixun Lan @ 2023-12-28 13:58 UTC (permalink / raw
To: gentoo-commits
commit: ab95f69647e6e0a63d48574b2e7c0f34714a40aa
Author: Esteve Varela Colominas <esteve.varela <AT> gmail <DOT> com>
AuthorDate: Thu Dec 28 10:49:10 2023 +0000
Commit: Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Thu Dec 28 13:58:29 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ab95f696
net-im/telegram-desktop: drop old
Closes: https://github.com/gentoo/gentoo/pull/34516
Signed-off-by: Esteve Varela Colominas <esteve.varela <AT> gmail.com>
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>
net-im/telegram-desktop/Manifest | 1 -
.../tdesktop-4.2.4-jemalloc-only-telegram-r1.patch | 43 ----
.../telegram-desktop-4.11.7-r1.ebuild | 238 ---------------------
3 files changed, 282 deletions(-)
diff --git a/net-im/telegram-desktop/Manifest b/net-im/telegram-desktop/Manifest
index 171dfe4f8b53..ee26e181234b 100644
--- a/net-im/telegram-desktop/Manifest
+++ b/net-im/telegram-desktop/Manifest
@@ -1,3 +1,2 @@
-DIST tdesktop-4.11.7-full.tar.gz 68388327 BLAKE2B 3be938534ff599e44b4ded384c47914a0e7992f5a3a6901e04c60e53386cf1994f19f6dec6195bf44bfbc93f965f16b05644a7ef786deacdc10c021a9ada882d SHA512 d8557a8e11a3b2f34fb65c5a3fafaebc31d93b5855f947b1049e5e7c7e5a5e161df708ba1882cc096f9a789fac56d3bbcbe640d2a026cb8355e946b735995501
DIST tdesktop-4.12.2-full.tar.gz 67796891 BLAKE2B b5d0d4d065bf586ffade6b81abbb7854d06516a3f0f34071d9c91d8fa7b2f40b5f79917a07039ec5d030a0265cf60a8255b9d9a748541d480448dd1224d1b86a SHA512 af890d693ec24ff96b48a1c3eab29e199c2a324db35ead33afc733ac8dedefa67574d3540dd87f0e19eb91435c699d839ced579b1485028fab737c1c02eaeff6
DIST tdesktop-4.13.1-full.tar.gz 67876971 BLAKE2B 6743aabae75f06e8691ed77ff22836a0276313756240ec864ac93eba7c04cd2d41c4f844fdea6f89d482e5e0e70793dc7d1fb3f19b788397abab56f631134866 SHA512 4cbbfaf6e5ecc90b429fc2207a106988ab839aa42d0d225841069d20bf2152fada489c28e6816eefa143724f5b8ea4db6995a0612f0df195d8dbd5f40d8a63a3
diff --git a/net-im/telegram-desktop/files/tdesktop-4.2.4-jemalloc-only-telegram-r1.patch b/net-im/telegram-desktop/files/tdesktop-4.2.4-jemalloc-only-telegram-r1.patch
deleted file mode 100644
index d56bacea69f8..000000000000
--- a/net-im/telegram-desktop/files/tdesktop-4.2.4-jemalloc-only-telegram-r1.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-4.2.4-full.orig/Telegram/CMakeLists.txt
-+++ tdesktop-4.2.4-full/Telegram/CMakeLists.txt
-@@ -1478,6 +1478,14 @@
- desktop-app::external_wayland_client
- )
- endif()
-+
-+ if (NOT DESKTOP_APP_DISABLE_JEMALLOC)
-+ target_link_libraries(Telegram
-+ PRIVATE
-+ $<TARGET_OBJECTS:desktop-app::linux_jemalloc_helper>
-+ $<LINK_ONLY:desktop-app::external_jemalloc>
-+ )
-+ endif()
- endif()
-
- if (build_macstore)
---- tdesktop-4.2.4-full.orig/cmake/options_linux.cmake
-+++ tdesktop-4.2.4-full/cmake/options_linux.cmake
-@@ -78,14 +78,6 @@
- )
- 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()
--
- if (DESKTOP_APP_USE_ALLOCATION_TRACER)
- target_link_options(common_options
- INTERFACE
diff --git a/net-im/telegram-desktop/telegram-desktop-4.11.7-r1.ebuild b/net-im/telegram-desktop/telegram-desktop-4.11.7-r1.ebuild
deleted file mode 100644
index 4ad46eb573f4..000000000000
--- a/net-im/telegram-desktop/telegram-desktop-4.11.7-r1.ebuild
+++ /dev/null
@@ -1,238 +0,0 @@
-# Copyright 2020-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{10..12} )
-
-inherit xdg cmake python-any-r1 optfeature 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"
-S="${WORKDIR}/${MY_P}"
-
-LICENSE="BSD GPL-3-with-openssl-exception LGPL-2+"
-SLOT="0"
-KEYWORDS="~amd64 ~arm64 ~riscv"
-IUSE="dbus enchant +fonts +jemalloc screencast qt6 qt6-imageformats wayland webkit +X"
-REQUIRED_USE="
- qt6-imageformats? ( qt6 )
-"
-
-KIMAGEFORMATS_RDEPEND="
- media-libs/libavif:=
- media-libs/libheif:=
- >=media-libs/libjxl-0.8.0
-"
-CDEPEND="
- !net-im/telegram-desktop-bin
- app-arch/lz4:=
- dev-cpp/abseil-cpp:=
- >=dev-cpp/glibmm-2.77:2.68
- dev-libs/glib:2
- dev-libs/libdispatch
- dev-libs/openssl:=
- dev-libs/protobuf
- dev-libs/xxhash
- media-libs/libjpeg-turbo:=
- ~media-libs/libtgvoip-2.4.4_p20221208
- media-libs/openal
- media-libs/opus
- media-libs/rnnoise
- ~media-libs/tg_owt-0_pre20230921:=[screencast=,X=]
- media-video/ffmpeg:=[opus,vpx]
- sys-libs/zlib:=[minizip]
- virtual/opengl
- !enchant? ( >=app-text/hunspell-1.7:= )
- enchant? ( app-text/enchant:= )
- jemalloc? ( dev-libs/jemalloc:=[-lazy-lock] )
- !qt6? (
- >=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?]
- kde-frameworks/kcoreaddons:5
- webkit? (
- >=dev-qt/qtdeclarative-5.15:5
- >=dev-qt/qtwayland-5.15:5
- )
- )
- qt6? (
- >=dev-qt/qtbase-6.5:6=[dbus?,gui,network,opengl,wayland?,widgets,X?]
- >=dev-qt/qtimageformats-6.5:6
- >=dev-qt/qtsvg-6.5:6
- webkit? (
- >=dev-qt/qtdeclarative-6.5:6
- >=dev-qt/qtwayland-6.5:6[compositor]
- )
- qt6-imageformats? (
- >=dev-qt/qtimageformats-6.5:6=
- ${KIMAGEFORMATS_RDEPEND}
- )
- )
- X? (
- x11-libs/libxcb:=
- x11-libs/xcb-util-keysyms
- )
-"
-RDEPEND="${CDEPEND}
- webkit? ( net-libs/webkit-gtk:4.1 net-libs/webkit-gtk:6 )
-"
-DEPEND="${CDEPEND}
- >=dev-cpp/cppgir-0_p20230926
- >=dev-cpp/ms-gsl-4
- dev-cpp/range-v3
-"
-BDEPEND="
- ${PYTHON_DEPS}
- >=dev-cpp/cppgir-0_p20230926
- >=dev-util/cmake-3.16
- dev-util/gdbus-codegen
- virtual/pkgconfig
- wayland? ( dev-util/wayland-scanner )
-"
-# dev-libs/jemalloc:=[-lazy-lock] -> https://bugs.gentoo.org/803233
-
-PATCHES=(
- "${FILESDIR}/tdesktop-4.2.4-jemalloc-only-telegram-r1.patch"
- "${FILESDIR}/tdesktop-4.10.0-system-cppgir.patch"
- "${FILESDIR}/tdesktop-4.10.5-qt_compare.patch"
-)
-
-pkg_pretend() {
- if has ccache ${FEATURES}; then
- 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() {
- # Bundle kde-frameworks/kimageformats for qt6, since it's impossible to
- # build in gentoo right now.
- if use qt6-imageformats; then
- sed -e 's/DESKTOP_APP_USE_PACKAGED_LAZY/TRUE/' -i \
- cmake/external/kimageformats/CMakeLists.txt || die
- printf '%s\n' \
- 'Q_IMPORT_PLUGIN(QAVIFPlugin)' \
- 'Q_IMPORT_PLUGIN(HEIFPlugin)' \
- 'Q_IMPORT_PLUGIN(QJpegXLPlugin)' \
- >> cmake/external/qt/qt_static_plugins/qt_static_plugins.cpp || die
- fi
- # kde-frameworks/kcoreaddons is bundled when using qt6.
-
- # Happily fail if libraries aren't found...
- find -type f \( -name 'CMakeLists.txt' -o -name '*.cmake' \) \
- \! -path './Telegram/lib_webview/CMakeLists.txt' \
- \! -path './cmake/external/expected/CMakeLists.txt' \
- \! -path './cmake/external/kcoreaddons/CMakeLists.txt' \
- \! -path './cmake/external/qt/package.cmake' \
- -print0 | xargs -0 sed -i \
- -e '/pkg_check_modules(/s/[^ ]*)/REQUIRED &/' \
- -e '/find_package(/s/)/ REQUIRED)/' || die
- # Make sure to check the excluded files for new
- # CMAKE_DISABLE_FIND_PACKAGE entries.
-
- # Control QtDBus dependency from here, to avoid messing with QtGui.
- if ! use dbus; then
- sed -e '/find_package(Qt[^ ]* OPTIONAL_COMPONENTS/s/DBus *//' \
- -i cmake/external/qt/package.cmake || die
- fi
-
- cmake_src_prepare
-}
-
-src_configure() {
- # Evil flag (bug #919201)
- filter-flags -fno-delete-null-pointer-checks
-
- # The ABI of media-libs/tg_owt breaks if the -DNDEBUG flag doesn't keep
- # the same state across both projects.
- # See https://bugs.gentoo.org/866055
- append-cppflags '-DNDEBUG'
-
- local qt=$(usex qt6 6 5)
- local mycmakeargs=(
- -DQT_VERSION_MAJOR=${qt}
-
- # Control automagic dependencies on certain packages
- ## Header-only lib, some git version.
- -DCMAKE_DISABLE_FIND_PACKAGE_tl-expected=ON
- -DCMAKE_DISABLE_FIND_PACKAGE_Qt${qt}Quick=$(usex !webkit)
- -DCMAKE_DISABLE_FIND_PACKAGE_Qt${qt}QuickWidgets=$(usex !webkit)
- -DCMAKE_DISABLE_FIND_PACKAGE_Qt${qt}WaylandClient=$(usex !wayland)
- ## Only used in Telegram/lib_webview/CMakeLists.txt
- -DCMAKE_DISABLE_FIND_PACKAGE_Qt${qt}WaylandCompositor=$(usex !webkit)
- ## KF6CoreAddons is currently unavailable in ::gentoo
- -DCMAKE_DISABLE_FIND_PACKAGE_KF${qt}CoreAddons=$(usex qt6)
-
- -DDESKTOP_APP_DISABLE_X11_INTEGRATION=$(usex !X)
- -DDESKTOP_APP_DISABLE_WAYLAND_INTEGRATION=$(usex !wayland)
- -DDESKTOP_APP_DISABLE_JEMALLOC=$(usex !jemalloc)
- ## Enables enchant and disables hunspell
- -DDESKTOP_APP_USE_ENCHANT=$(usex enchant)
- ## Use system fonts instead of bundled ones
- -DDESKTOP_APP_USE_PACKAGED_FONTS=$(usex !fonts)
- )
-
- 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
- if ! use X && ! use screencast; then
- ewarn "both the 'X' and 'screencast' USE flags are disabled, screen sharing won't work!"
- ewarn
- fi
- if ! use jemalloc && use elibc_glibc; then
- # https://github.com/telegramdesktop/tdesktop/issues/16084
- # https://github.com/desktop-app/cmake_helpers/pull/91#issuecomment-881788003
- ewarn "Disabling USE=jemalloc on glibc systems may cause very high RAM usage!"
- ewarn "Do NOT report issues about RAM usage without enabling this flag first."
- ewarn
- fi
- if use wayland && ! use qt6; then
- ewarn "Wayland-specific integrations have been deprecated with Qt5."
- ewarn "The app will continue to function under wayland, but some"
- ewarn "functionality may be reduced."
- ewarn "These integrations are only supported when built with Qt6."
- ewarn
- fi
- if use qt6 && ! use qt6-imageformats; then
- elog "Enable USE=qt6-imageformats for AVIF, HEIF and JpegXL support"
- elog
- fi
- optfeature_header
- if ! use qt6; then
- optfeature "AVIF, HEIF and JpegXL image support" kde-frameworks/kimageformats[avif,heif,jpegxl]
- fi
-}
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-im/telegram-desktop/files/, net-im/telegram-desktop/
@ 2023-12-11 13:25 Yixun Lan
0 siblings, 0 replies; 38+ messages in thread
From: Yixun Lan @ 2023-12-11 13:25 UTC (permalink / raw
To: gentoo-commits
commit: 4083b218baa7e9b59fb760533b06954e03d64daf
Author: Esteve Varela Colominas <esteve.varela <AT> gmail <DOT> com>
AuthorDate: Sun Dec 10 22:26:25 2023 +0000
Commit: Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Mon Dec 11 13:23:29 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4083b218
net-im/telegram-desktop: Drop old
Signed-off-by: Esteve Varela Colominas <esteve.varela <AT> gmail.com>
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>
net-im/telegram-desktop/Manifest | 1 -
.../tdesktop-4.10.3-fix-clang-libstdcxx.patch | 13 --
.../telegram-desktop-4.10.3-r1.ebuild | 233 ---------------------
3 files changed, 247 deletions(-)
diff --git a/net-im/telegram-desktop/Manifest b/net-im/telegram-desktop/Manifest
index 00471c1e5c19..9c6ff70b532e 100644
--- a/net-im/telegram-desktop/Manifest
+++ b/net-im/telegram-desktop/Manifest
@@ -1,4 +1,3 @@
-DIST tdesktop-4.10.3-full.tar.gz 67750018 BLAKE2B 395484594dc201019b5cdf3fdaabe1155dca99504b74e65951b6264b61ed0403bb1e016542c6c59370b3ee39d1449ea223409fc64fd6bff723c1be43b615570a SHA512 1e7c0f32b4e17c1f1c39aa9a4f35ce2867324c4410a30fde2c2d6ca5d5fe59a84f58f93cb6b4f8c7ad04fa0adcaf5a276dd2aa7dee0ef34446e6bb95fafa49d6
DIST tdesktop-4.11.7-full.tar.gz 68388327 BLAKE2B 3be938534ff599e44b4ded384c47914a0e7992f5a3a6901e04c60e53386cf1994f19f6dec6195bf44bfbc93f965f16b05644a7ef786deacdc10c021a9ada882d SHA512 d8557a8e11a3b2f34fb65c5a3fafaebc31d93b5855f947b1049e5e7c7e5a5e161df708ba1882cc096f9a789fac56d3bbcbe640d2a026cb8355e946b735995501
DIST tdesktop-4.12.2-full.tar.gz 67796891 BLAKE2B b5d0d4d065bf586ffade6b81abbb7854d06516a3f0f34071d9c91d8fa7b2f40b5f79917a07039ec5d030a0265cf60a8255b9d9a748541d480448dd1224d1b86a SHA512 af890d693ec24ff96b48a1c3eab29e199c2a324db35ead33afc733ac8dedefa67574d3540dd87f0e19eb91435c699d839ced579b1485028fab737c1c02eaeff6
DIST tdesktop-4.8.1-full.tar.gz 63997319 BLAKE2B daac461f0b3205bf647027329660b43f4646db987e27bfe2a2848bfbfb3309c503132d1533f26e95512520417d30f5063b1c395b174787aa7533727549ee77e5 SHA512 4dc495e4502bdba634c4468af4f1321aef1152d619c811f004489f8616504a465069508239eae41a08a83e190a61d26881733ebc38dd88160f81dce070bb0567
diff --git a/net-im/telegram-desktop/files/tdesktop-4.10.3-fix-clang-libstdcxx.patch b/net-im/telegram-desktop/files/tdesktop-4.10.3-fix-clang-libstdcxx.patch
deleted file mode 100644
index 290eb2a6b2d9..000000000000
--- a/net-im/telegram-desktop/files/tdesktop-4.10.3-fix-clang-libstdcxx.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Fix compilation with Clang + libstdc++
-
---- tdesktop-4.10.3-full.orig/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp
-+++ tdesktop-4.10.3-full/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp
-@@ -814,7 +814,7 @@
-
- // A list of capabilities that offer feature parity
- // with custom notifications
-- return ranges::all_of(std::initializer_list{
-+ return ranges::all_of(std::array{
- // To show message content
- "body",
- // To have buttons on notifications
diff --git a/net-im/telegram-desktop/telegram-desktop-4.10.3-r1.ebuild b/net-im/telegram-desktop/telegram-desktop-4.10.3-r1.ebuild
deleted file mode 100644
index f2e0f095d515..000000000000
--- a/net-im/telegram-desktop/telegram-desktop-4.10.3-r1.ebuild
+++ /dev/null
@@ -1,233 +0,0 @@
-# Copyright 2020-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{10..12} )
-
-inherit xdg cmake python-any-r1 optfeature 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"
-S="${WORKDIR}/${MY_P}"
-
-LICENSE="BSD GPL-3-with-openssl-exception LGPL-2+"
-SLOT="0"
-KEYWORDS="~amd64 ~arm64 ~riscv"
-IUSE="dbus enchant +fonts +jemalloc screencast qt6 qt6-imageformats wayland webkit +X"
-REQUIRED_USE="
- qt6-imageformats? ( qt6 )
-"
-
-KIMAGEFORMATS_RDEPEND="
- media-libs/libavif:=
- media-libs/libheif:=
- media-libs/libjxl
-"
-CDEPEND="
- !net-im/telegram-desktop-bin
- app-arch/lz4:=
- dev-cpp/abseil-cpp:=
- >=dev-cpp/glibmm-2.77:2.68
- dev-libs/glib:2
- dev-libs/libdispatch
- dev-libs/openssl:=
- dev-libs/protobuf
- dev-libs/xxhash
- media-libs/libjpeg-turbo:=
- ~media-libs/libtgvoip-2.4.4_p20221208
- media-libs/openal
- media-libs/opus
- media-libs/rnnoise
- ~media-libs/tg_owt-0_pre20230921:=[screencast=,X=]
- media-video/ffmpeg:=[opus,vpx]
- sys-libs/zlib:=[minizip]
- virtual/opengl
- !enchant? ( >=app-text/hunspell-1.7:= )
- enchant? ( app-text/enchant:= )
- jemalloc? ( dev-libs/jemalloc:=[-lazy-lock] )
- !qt6? (
- >=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?]
- kde-frameworks/kcoreaddons:5
- webkit? (
- >=dev-qt/qtdeclarative-5.15:5
- >=dev-qt/qtwayland-5.15:5
- )
- )
- qt6? (
- >=dev-qt/qtbase-6.5:6=[dbus?,gui,network,opengl,wayland?,widgets,X?]
- >=dev-qt/qtimageformats-6.5:6
- >=dev-qt/qtsvg-6.5:6
- webkit? (
- >=dev-qt/qtdeclarative-6.5:6
- >=dev-qt/qtwayland-6.5:6[compositor]
- )
- qt6-imageformats? (
- >=dev-qt/qtimageformats-6.5:6=
- ${KIMAGEFORMATS_RDEPEND}
- )
- )
- X? (
- x11-libs/libxcb:=
- x11-libs/xcb-util-keysyms
- )
-"
-RDEPEND="${CDEPEND}
- webkit? ( net-libs/webkit-gtk:4 )
-"
-DEPEND="${CDEPEND}
- >=dev-cpp/cppgir-0_p20230926
- >=dev-cpp/ms-gsl-4
- dev-cpp/range-v3
-"
-BDEPEND="
- ${PYTHON_DEPS}
- >=dev-cpp/cppgir-0_p20230926
- >=dev-util/cmake-3.16
- dev-util/gdbus-codegen
- virtual/pkgconfig
-"
-# dev-libs/jemalloc:=[-lazy-lock] -> https://bugs.gentoo.org/803233
-
-PATCHES=(
- "${FILESDIR}/tdesktop-4.2.4-jemalloc-only-telegram-r1.patch"
- "${FILESDIR}/tdesktop-4.10.0-system-cppgir.patch"
- "${FILESDIR}/tdesktop-4.10.3-fix-clang-libstdcxx.patch"
-)
-
-pkg_pretend() {
- if has ccache ${FEATURES}; then
- 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() {
- # Bundle kde-frameworks/kimageformats for qt6, since it's impossible to
- # build in gentoo right now.
- if use qt6-imageformats; then
- sed -e 's/DESKTOP_APP_USE_PACKAGED_LAZY/TRUE/' -i \
- cmake/external/kimageformats/CMakeLists.txt || die
- printf '%s\n' \
- 'Q_IMPORT_PLUGIN(QAVIFPlugin)' \
- 'Q_IMPORT_PLUGIN(HEIFPlugin)' \
- 'Q_IMPORT_PLUGIN(QJpegXLPlugin)' \
- >> cmake/external/qt/qt_static_plugins/qt_static_plugins.cpp || die
- fi
-
- # kde-frameworks/kcoreaddons is bundled when using qt6, see:
- # cmake/external/kcoreaddons/CMakeLists.txt
-
- # Happily fail if libraries aren't found...
- find -type f \( -name 'CMakeLists.txt' -o -name '*.cmake' \) \
- \! -path './cmake/external/expected/CMakeLists.txt' \
- \! -path './cmake/external/qt/package.cmake' \
- \! -path './Telegram/lib_webview/CMakeLists.txt' \
- -print0 | xargs -0 sed -i \
- -e '/pkg_check_modules(/s/[^ ]*)/REQUIRED &/' \
- -e '/find_package(/s/)/ REQUIRED)/' || die
- # Make sure to check the excluded files for new
- # CMAKE_DISABLE_FIND_PACKAGE entries.
-
- # Control QtDBus dependency from here, to avoid messing with QtGui.
- if ! use dbus; then
- sed -e '/find_package(Qt[^ ]* OPTIONAL_COMPONENTS/s/DBus *//' \
- -i cmake/external/qt/package.cmake || die
- fi
-
- cmake_src_prepare
-}
-
-src_configure() {
- # The ABI of media-libs/tg_owt breaks if the -DNDEBUG flag doesn't keep
- # the same state across both projects.
- # See https://bugs.gentoo.org/866055
- append-cppflags '-DNDEBUG'
-
- local qt=$(usex qt6 6 5)
- local mycmakeargs=(
- -DQT_VERSION_MAJOR=${qt}
-
- # Control automagic dependencies on certain packages
- ## Header-only lib, some git version.
- -DCMAKE_DISABLE_FIND_PACKAGE_tl-expected=ON
- -DCMAKE_DISABLE_FIND_PACKAGE_Qt${qt}Quick=$(usex !webkit)
- -DCMAKE_DISABLE_FIND_PACKAGE_Qt${qt}QuickWidgets=$(usex !webkit)
- -DCMAKE_DISABLE_FIND_PACKAGE_Qt${qt}WaylandClient=$(usex !wayland)
- ## Only used in Telegram/lib_webview/CMakeLists.txt
- -DCMAKE_DISABLE_FIND_PACKAGE_Qt${qt}WaylandCompositor=$(usex !webkit)
-
- -DDESKTOP_APP_DISABLE_X11_INTEGRATION=$(usex !X)
- -DDESKTOP_APP_DISABLE_WAYLAND_INTEGRATION=$(usex !wayland)
- -DDESKTOP_APP_DISABLE_JEMALLOC=$(usex !jemalloc)
- ## Enables enchant and disables hunspell
- -DDESKTOP_APP_USE_ENCHANT=$(usex enchant)
- ## Use system fonts instead of bundled ones
- -DDESKTOP_APP_USE_PACKAGED_FONTS=$(usex !fonts)
- )
-
- 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
- if ! use X && ! use screencast; then
- ewarn "both the 'X' and 'screencast' USE flags are disabled, screen sharing won't work!"
- ewarn
- fi
- if ! use jemalloc && use elibc_glibc; then
- # https://github.com/telegramdesktop/tdesktop/issues/16084
- # https://github.com/desktop-app/cmake_helpers/pull/91#issuecomment-881788003
- ewarn "Disabling USE=jemalloc on glibc systems may cause very high RAM usage!"
- ewarn "Do NOT report issues about RAM usage without enabling this flag first."
- ewarn
- fi
- if use wayland && ! use qt6; then
- ewarn "Wayland-specific integrations have been deprecated with Qt5."
- ewarn "The app will continue to function under wayland, but some"
- ewarn "functionality may be reduced."
- ewarn "These integrations are only supported when built with Qt6."
- ewarn
- fi
- if use qt6 && ! use qt6-imageformats; then
- elog "Enable USE=qt6-imageformats for AVIF, HEIF and JpegXL support"
- elog
- fi
- optfeature_header
- if ! use qt6; then
- optfeature "AVIF, HEIF and JpegXL image support" kde-frameworks/kimageformats[avif,heif,jpegxl]
- fi
-}
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-im/telegram-desktop/files/, net-im/telegram-desktop/
@ 2023-12-11 13:25 Yixun Lan
0 siblings, 0 replies; 38+ messages in thread
From: Yixun Lan @ 2023-12-11 13:25 UTC (permalink / raw
To: gentoo-commits
commit: 7497d83f469b739fcc81775878c5e59c2000e5c8
Author: Esteve Varela Colominas <esteve.varela <AT> gmail <DOT> com>
AuthorDate: Sun Dec 10 22:30:20 2023 +0000
Commit: Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Mon Dec 11 13:23:32 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7497d83f
net-im/telegram-desktop: Drop stable
The list of bugs has become untenable, the package is essentially
unusable, and there's no clear idea of when glibmm will be bumped.
Sorry for the inconveniences...
Bug: https://bugs.gentoo.org/915992
Closes: https://bugs.gentoo.org/877067
Closes: https://bugs.gentoo.org/910544
Closes: https://bugs.gentoo.org/911395
Closes: https://bugs.gentoo.org/912896
Closes: https://bugs.gentoo.org/914419
Closes: https://bugs.gentoo.org/914902
Closes: https://bugs.gentoo.org/915109
Closes: https://bugs.gentoo.org/915237
Closes: https://bugs.gentoo.org/915982
Signed-off-by: Esteve Varela Colominas <esteve.varela <AT> gmail.com>
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>
net-im/telegram-desktop/Manifest | 1 -
.../files/tdesktop-4.4.1-fix-dupe-main-decl.patch | 26 ---
.../telegram-desktop-4.8.1-r3.ebuild | 210 ---------------------
3 files changed, 237 deletions(-)
diff --git a/net-im/telegram-desktop/Manifest b/net-im/telegram-desktop/Manifest
index 9c6ff70b532e..d61778cb17da 100644
--- a/net-im/telegram-desktop/Manifest
+++ b/net-im/telegram-desktop/Manifest
@@ -1,3 +1,2 @@
DIST tdesktop-4.11.7-full.tar.gz 68388327 BLAKE2B 3be938534ff599e44b4ded384c47914a0e7992f5a3a6901e04c60e53386cf1994f19f6dec6195bf44bfbc93f965f16b05644a7ef786deacdc10c021a9ada882d SHA512 d8557a8e11a3b2f34fb65c5a3fafaebc31d93b5855f947b1049e5e7c7e5a5e161df708ba1882cc096f9a789fac56d3bbcbe640d2a026cb8355e946b735995501
DIST tdesktop-4.12.2-full.tar.gz 67796891 BLAKE2B b5d0d4d065bf586ffade6b81abbb7854d06516a3f0f34071d9c91d8fa7b2f40b5f79917a07039ec5d030a0265cf60a8255b9d9a748541d480448dd1224d1b86a SHA512 af890d693ec24ff96b48a1c3eab29e199c2a324db35ead33afc733ac8dedefa67574d3540dd87f0e19eb91435c699d839ced579b1485028fab737c1c02eaeff6
-DIST tdesktop-4.8.1-full.tar.gz 63997319 BLAKE2B daac461f0b3205bf647027329660b43f4646db987e27bfe2a2848bfbfb3309c503132d1533f26e95512520417d30f5063b1c395b174787aa7533727549ee77e5 SHA512 4dc495e4502bdba634c4468af4f1321aef1152d619c811f004489f8616504a465069508239eae41a08a83e190a61d26881733ebc38dd88160f81dce070bb0567
diff --git a/net-im/telegram-desktop/files/tdesktop-4.4.1-fix-dupe-main-decl.patch b/net-im/telegram-desktop/files/tdesktop-4.4.1-fix-dupe-main-decl.patch
deleted file mode 100644
index 4c4f7b0377bd..000000000000
--- a/net-im/telegram-desktop/files/tdesktop-4.4.1-fix-dupe-main-decl.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 37e03fb4289a3f46a5201caaebbdce8e441d55f5 Mon Sep 17 00:00:00 2001
-From: John Helmert III <ajak@gentoo.org>
-Date: Sun, 11 Dec 2022 14:21:32 -0600
-Subject: [PATCH] fix duplicate main declaration
-
-Bug: https://bugs.gentoo.org/883935
-Signed-off-by: John Helmert III <ajak@gentoo.org>
----
- cmake/external/cld3/CMakeLists.txt | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/cmake/external/cld3/CMakeLists.txt b/cmake/external/cld3/CMakeLists.txt
-index f351ca1..54c524b 100644
---- a/cmake/external/cld3/CMakeLists.txt
-+++ b/cmake/external/cld3/CMakeLists.txt
-@@ -80,7 +80,6 @@ PRIVATE
- script_span/generated_entities.cc
- script_span/getonescriptspan.cc
- script_span/getonescriptspan.h
-- script_span/getonescriptspan_test.cc
- script_span/utf8statetable.cc
- script_span/offsetmap.cc
- script_span/text_processing.cc
---
-2.38.1
-
diff --git a/net-im/telegram-desktop/telegram-desktop-4.8.1-r3.ebuild b/net-im/telegram-desktop/telegram-desktop-4.8.1-r3.ebuild
deleted file mode 100644
index d4aa40df0c04..000000000000
--- a/net-im/telegram-desktop/telegram-desktop-4.8.1-r3.ebuild
+++ /dev/null
@@ -1,210 +0,0 @@
-# Copyright 2020-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{9..11} )
-
-inherit xdg cmake python-any-r1 optfeature 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"
-S="${WORKDIR}/${MY_P}"
-
-LICENSE="BSD GPL-3-with-openssl-exception LGPL-2+"
-SLOT="0"
-KEYWORDS="amd64 ~arm64 ~ppc64 ~riscv"
-IUSE="+dbus enchant +fonts +jemalloc screencast qt6 qt6-imageformats wayland +X"
-REQUIRED_USE="
- qt6-imageformats? ( qt6 )
-"
-
-KIMAGEFORMATS_RDEPEND="
- media-libs/libavif:=
- media-libs/libheif:=
- media-libs/libjxl
-"
-RDEPEND="
- !net-im/telegram-desktop-bin
- app-arch/lz4:=
- dev-cpp/abseil-cpp:=
- dev-libs/glib:2
- dev-libs/libdispatch
- dev-libs/libsigc++:2
- dev-libs/openssl:=
- dev-libs/protobuf
- dev-libs/xxhash
- media-libs/fontconfig:=
- media-libs/libjpeg-turbo:=
- ~media-libs/libtgvoip-2.4.4_p20221208
- media-libs/openal
- media-libs/opus:=
- media-libs/rnnoise
- ~media-libs/tg_owt-0_pre20230428:=[screencast=,X=]
- media-video/ffmpeg:=[opus,vpx]
- sys-libs/zlib:=[minizip]
- virtual/opengl
- dbus? ( >=dev-cpp/glibmm-2.76:2.68 )
- !enchant? ( >=app-text/hunspell-1.7:= )
- enchant? ( app-text/enchant:= )
- jemalloc? ( dev-libs/jemalloc:=[-lazy-lock] )
- !qt6? (
- >=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?]
- kde-frameworks/kcoreaddons:=
- )
- qt6? (
- dev-qt/qt5compat:6
- dev-qt/qtbase:6=[dbus?,gui,network,opengl,widgets,X?]
- dev-qt/qtimageformats:6
- dev-qt/qtsvg:6
- wayland? ( dev-qt/qtwayland:6 )
- qt6-imageformats? (
- dev-qt/qtimageformats:6=
- ${KIMAGEFORMATS_RDEPEND}
- )
- )
- X? (
- x11-libs/libxcb:=
- x11-libs/xcb-util-keysyms
- )
-"
-DEPEND="${RDEPEND}
- dev-cpp/range-v3
- >=dev-cpp/ms-gsl-4
-"
-BDEPEND="
- ${PYTHON_DEPS}
- >=dev-util/cmake-3.16
- virtual/pkgconfig
-"
-# dev-libs/jemalloc:=[-lazy-lock] -> https://bugs.gentoo.org/803233
-
-PATCHES=(
- "${FILESDIR}/tdesktop-4.2.4-jemalloc-only-telegram-r1.patch"
- "${FILESDIR}/tdesktop-4.4.1-fix-dupe-main-decl.patch"
-)
-
-# Current desktop-file-utils-0.26 does not understand Version=1.5
-QA_DESKTOP_FILE="usr/share/applications/${PN}.desktop"
-
-pkg_pretend() {
- if has ccache ${FEATURES}; then
- 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() {
- # Bundle kde-frameworks/kimageformats for qt6, since it's impossible to
- # build in gentoo right now.
- if use qt6-imageformats; then
- sed -e 's/DESKTOP_APP_USE_PACKAGED_LAZY/TRUE/' -i \
- cmake/external/kimageformats/CMakeLists.txt || die
- printf '%s\n' \
- 'Q_IMPORT_PLUGIN(QAVIFPlugin)' \
- 'Q_IMPORT_PLUGIN(HEIFPlugin)' \
- 'Q_IMPORT_PLUGIN(QJpegXLPlugin)' \
- >> cmake/external/qt/qt_static_plugins/qt_static_plugins.cpp || die
- fi
-
- # kde-frameworks/kcoreaddons is bundled when using qt6, see:
- # cmake/external/kcoreaddons/CMakeLists.txt
-
- cmake_src_prepare
-}
-
-src_configure() {
- # The ABI of media-libs/tg_owt breaks if the -DNDEBUG flag doesn't keep
- # the same state across both projects.
- # See https://bugs.gentoo.org/866055
- append-cppflags '-DNDEBUG'
-
- local mycmakeargs=(
- -DCMAKE_DISABLE_FIND_PACKAGE_tl-expected=ON # header only lib, some git version. prevents warnings.
- -DQT_VERSION_MAJOR=$(usex qt6 6 5)
-
- -DDESKTOP_APP_DISABLE_DBUS_INTEGRATION=$(usex !dbus)
- -DDESKTOP_APP_DISABLE_X11_INTEGRATION=$(usex !X)
- -DDESKTOP_APP_DISABLE_WAYLAND_INTEGRATION=$(usex !wayland)
- -DDESKTOP_APP_DISABLE_JEMALLOC=$(usex !jemalloc)
- -DDESKTOP_APP_USE_ENCHANT=$(usex enchant) # enables enchant and disables hunspell
- -DDESKTOP_APP_USE_PACKAGED_FONTS=$(usex !fonts) # use system fonts instead of bundled ones
- )
-
- 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
- if ! use X && ! use screencast; then
- ewarn "both the 'X' and 'screencast' USE flags are disabled, screen sharing won't work!"
- ewarn
- fi
- if has_version '<dev-qt/qtcore-5.15.2-r10'; then
- ewarn "Versions of dev-qt/qtcore lower than 5.15.2-r10 might cause telegram"
- ewarn "to crash when pasting big images from the clipboard."
- ewarn
- fi
- if ! use jemalloc && use elibc_glibc; then
- # https://github.com/telegramdesktop/tdesktop/issues/16084
- # https://github.com/desktop-app/cmake_helpers/pull/91#issuecomment-881788003
- ewarn "Disabling USE=jemalloc on glibc systems may cause very high RAM usage!"
- ewarn "Do NOT report issues about RAM usage without enabling this flag first."
- ewarn
- fi
- if use qt6; then
- ewarn "Qt6 support in gentoo is experimental."
- ewarn "Please report any issues you may find, but don't expect"
- ewarn "everything to work correctly as of yet."
- ewarn
- fi
- if use wayland && ! use qt6; then
- ewarn "Wayland-specific integrations have been deprecated with Qt5."
- ewarn "The app will continue to function under wayland, but some"
- ewarn "functionality may be reduced."
- ewarn "These integrations are only supported when built with Qt6."
- ewarn
- fi
- if use qt6 && ! use qt6-imageformats; then
- elog "Enable USE=qt6-imageformats for AVIF, HEIF and JpegXL support"
- elog
- fi
- optfeature_header
- optfeature "shop payment support (requires USE=dbus enabled)" net-libs/webkit-gtk:4
- if ! use qt6; then
- optfeature "AVIF, HEIF and JpegXL image support" kde-frameworks/kimageformats[avif,heif,jpegxl]
- fi
-}
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-im/telegram-desktop/files/, net-im/telegram-desktop/
@ 2023-10-28 15:01 Yixun Lan
0 siblings, 0 replies; 38+ messages in thread
From: Yixun Lan @ 2023-10-28 15:01 UTC (permalink / raw
To: gentoo-commits
commit: 03ee037d41382be864a72d72ad96413b8f171745
Author: Yixun Lan <dlan <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 28 14:48:04 2023 +0000
Commit: Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Sat Oct 28 14:48:04 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=03ee037d
net-im/telegram-desktop: add 4.10.5
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>
net-im/telegram-desktop/Manifest | 1 +
.../files/tdesktop-4.10.5-qt_compare.patch | 12 ++
.../telegram-desktop-4.10.5.ebuild | 234 +++++++++++++++++++++
3 files changed, 247 insertions(+)
diff --git a/net-im/telegram-desktop/Manifest b/net-im/telegram-desktop/Manifest
index e426cd09fe62..2b3974aaf830 100644
--- a/net-im/telegram-desktop/Manifest
+++ b/net-im/telegram-desktop/Manifest
@@ -1,3 +1,4 @@
DIST tdesktop-4.10.3-full.tar.gz 67750018 BLAKE2B 395484594dc201019b5cdf3fdaabe1155dca99504b74e65951b6264b61ed0403bb1e016542c6c59370b3ee39d1449ea223409fc64fd6bff723c1be43b615570a SHA512 1e7c0f32b4e17c1f1c39aa9a4f35ce2867324c4410a30fde2c2d6ca5d5fe59a84f58f93cb6b4f8c7ad04fa0adcaf5a276dd2aa7dee0ef34446e6bb95fafa49d6
+DIST tdesktop-4.10.5-full.tar.gz 68246449 BLAKE2B e1059a929776ba1769515b0a4d9e118c471a48050be77fbcda885c572537a9a7051c0a6deb9a6b9c913af0ea0087b4c826bb905a9c98e4fab04aeaa755da9127 SHA512 8f15428e126bd11e76ca48f21ad98022e20443acca6344e3e27abafe09225cc1dfe0f300235e083abd39ff72d03946613b731d4067a3a11f42c265fe37266c74
DIST tdesktop-4.8.1-full.tar.gz 63997319 BLAKE2B daac461f0b3205bf647027329660b43f4646db987e27bfe2a2848bfbfb3309c503132d1533f26e95512520417d30f5063b1c395b174787aa7533727549ee77e5 SHA512 4dc495e4502bdba634c4468af4f1321aef1152d619c811f004489f8616504a465069508239eae41a08a83e190a61d26881733ebc38dd88160f81dce070bb0567
DIST tdesktop-4.8.4-full.tar.gz 69090626 BLAKE2B e2c6072b7b90911068ed57ed651176fb4d772f14710d2a4012bda47dae50be7f3050242c3a6950035f3f33a4041257cadac54e639691735f6acfda98c8db8b7b SHA512 7988d047cb72888e303f9902f04bd2168f67fb18a4451e5122ce80b0aef726173f0ee10f83b8bb713a46e02c9ec4150ad6128e4288be432ed3d590011f80e4dd
diff --git a/net-im/telegram-desktop/files/tdesktop-4.10.5-qt_compare.patch b/net-im/telegram-desktop/files/tdesktop-4.10.5-qt_compare.patch
new file mode 100644
index 000000000000..f481ddd74d7c
--- /dev/null
+++ b/net-im/telegram-desktop/files/tdesktop-4.10.5-qt_compare.patch
@@ -0,0 +1,12 @@
+diff --git a/Telegram/lib_base/base/qt/qt_compare.h b/Telegram/lib_base/base/qt/qt_compare.h
+index ca03fa2..d1eb6ab 100644
+--- a/Telegram/lib_base/base/qt/qt_compare.h
++++ b/Telegram/lib_base/base/qt/qt_compare.h
+@@ -10,6 +10,7 @@
+ #include <gsl/pointers>
+
+ #include <QString>
++#include <variant>
+
+ #if !defined(__apple_build_version__) || (__apple_build_version__ > 12000032)
+
diff --git a/net-im/telegram-desktop/telegram-desktop-4.10.5.ebuild b/net-im/telegram-desktop/telegram-desktop-4.10.5.ebuild
new file mode 100644
index 000000000000..3d4d93ae110e
--- /dev/null
+++ b/net-im/telegram-desktop/telegram-desktop-4.10.5.ebuild
@@ -0,0 +1,234 @@
+# Copyright 2020-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit xdg cmake python-any-r1 optfeature 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"
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="BSD GPL-3-with-openssl-exception LGPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~riscv"
+IUSE="dbus enchant +fonts +jemalloc screencast qt6 qt6-imageformats wayland webkit +X"
+REQUIRED_USE="
+ qt6-imageformats? ( qt6 )
+"
+
+KIMAGEFORMATS_RDEPEND="
+ media-libs/libavif:=
+ media-libs/libheif:=
+ media-libs/libjxl
+"
+CDEPEND="
+ !net-im/telegram-desktop-bin
+ app-arch/lz4:=
+ dev-cpp/abseil-cpp:=
+ >=dev-cpp/glibmm-2.77:2.68
+ dev-libs/glib:2
+ dev-libs/libdispatch
+ dev-libs/openssl:=
+ dev-libs/protobuf
+ dev-libs/xxhash
+ media-libs/libjpeg-turbo:=
+ ~media-libs/libtgvoip-2.4.4_p20221208
+ media-libs/openal
+ media-libs/opus
+ media-libs/rnnoise
+ ~media-libs/tg_owt-0_pre20230921:=[screencast=,X=]
+ media-video/ffmpeg:=[opus,vpx]
+ sys-libs/zlib:=[minizip]
+ virtual/opengl
+ !enchant? ( >=app-text/hunspell-1.7:= )
+ enchant? ( app-text/enchant:= )
+ jemalloc? ( dev-libs/jemalloc:=[-lazy-lock] )
+ !qt6? (
+ >=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?]
+ kde-frameworks/kcoreaddons:5
+ webkit? (
+ >=dev-qt/qtdeclarative-5.15:5
+ >=dev-qt/qtwayland-5.15:5
+ )
+ )
+ qt6? (
+ >=dev-qt/qtbase-6.5:6=[dbus?,gui,network,opengl,wayland?,widgets,X?]
+ >=dev-qt/qtimageformats-6.5:6
+ >=dev-qt/qtsvg-6.5:6
+ wayland? ( >=dev-qt/qtwayland-6.5:6[compositor] )
+ webkit? (
+ >=dev-qt/qtdeclarative-6.5:6
+ >=dev-qt/qtwayland-6.5:6[compositor]
+ )
+ qt6-imageformats? (
+ >=dev-qt/qtimageformats-6.5:6=
+ ${KIMAGEFORMATS_RDEPEND}
+ )
+ )
+ X? (
+ x11-libs/libxcb:=
+ x11-libs/xcb-util-keysyms
+ )
+"
+RDEPEND="${CDEPEND}
+ webkit? ( net-libs/webkit-gtk:4 )
+"
+DEPEND="${CDEPEND}
+ >=dev-cpp/cppgir-0_p20230926
+ >=dev-cpp/ms-gsl-4
+ dev-cpp/range-v3
+"
+BDEPEND="
+ ${PYTHON_DEPS}
+ >=dev-cpp/cppgir-0_p20230926
+ >=dev-util/cmake-3.16
+ dev-util/gdbus-codegen
+ virtual/pkgconfig
+"
+# dev-libs/jemalloc:=[-lazy-lock] -> https://bugs.gentoo.org/803233
+
+PATCHES=(
+ "${FILESDIR}/tdesktop-4.2.4-jemalloc-only-telegram-r1.patch"
+ "${FILESDIR}/tdesktop-4.10.0-system-cppgir.patch"
+ "${FILESDIR}/tdesktop-4.10.5-qt_compare.patch"
+)
+
+pkg_pretend() {
+ if has ccache ${FEATURES}; then
+ 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() {
+ # Bundle kde-frameworks/kimageformats for qt6, since it's impossible to
+ # build in gentoo right now.
+ if use qt6-imageformats; then
+ sed -e 's/DESKTOP_APP_USE_PACKAGED_LAZY/TRUE/' -i \
+ cmake/external/kimageformats/CMakeLists.txt || die
+ printf '%s\n' \
+ 'Q_IMPORT_PLUGIN(QAVIFPlugin)' \
+ 'Q_IMPORT_PLUGIN(HEIFPlugin)' \
+ 'Q_IMPORT_PLUGIN(QJpegXLPlugin)' \
+ >> cmake/external/qt/qt_static_plugins/qt_static_plugins.cpp || die
+ fi
+
+ # kde-frameworks/kcoreaddons is bundled when using qt6, see:
+ # cmake/external/kcoreaddons/CMakeLists.txt
+
+ # Happily fail if libraries aren't found...
+ find -type f \( -name 'CMakeLists.txt' -o -name '*.cmake' \) \
+ \! -path './cmake/external/expected/CMakeLists.txt' \
+ \! -path './cmake/external/qt/package.cmake' \
+ \! -path './Telegram/lib_webview/CMakeLists.txt' \
+ -print0 | xargs -0 sed -i \
+ -e '/pkg_check_modules(/s/[^ ]*)/REQUIRED &/' \
+ -e '/find_package(/s/)/ REQUIRED)/' || die
+ # Make sure to check the excluded files for new
+ # CMAKE_DISABLE_FIND_PACKAGE entries.
+
+ # Control QtDBus dependency from here, to avoid messing with QtGui.
+ if ! use dbus; then
+ sed -e '/find_package(Qt[^ ]* OPTIONAL_COMPONENTS/s/DBus *//' \
+ -i cmake/external/qt/package.cmake || die
+ fi
+
+ cmake_src_prepare
+}
+
+src_configure() {
+ # The ABI of media-libs/tg_owt breaks if the -DNDEBUG flag doesn't keep
+ # the same state across both projects.
+ # See https://bugs.gentoo.org/866055
+ append-cppflags '-DNDEBUG'
+
+ local qt=$(usex qt6 6 5)
+ local mycmakeargs=(
+ -DQT_VERSION_MAJOR=${qt}
+
+ # Control automagic dependencies on certain packages
+ ## Header-only lib, some git version.
+ -DCMAKE_DISABLE_FIND_PACKAGE_tl-expected=ON
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt${qt}Quick=$(usex !webkit)
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt${qt}QuickWidgets=$(usex !webkit)
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt${qt}WaylandClient=$(usex !wayland)
+ ## Only used in Telegram/lib_webview/CMakeLists.txt
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt${qt}WaylandCompositor=$(usex !webkit)
+
+ -DDESKTOP_APP_DISABLE_X11_INTEGRATION=$(usex !X)
+ -DDESKTOP_APP_DISABLE_WAYLAND_INTEGRATION=$(usex !wayland)
+ -DDESKTOP_APP_DISABLE_JEMALLOC=$(usex !jemalloc)
+ ## Enables enchant and disables hunspell
+ -DDESKTOP_APP_USE_ENCHANT=$(usex enchant)
+ ## Use system fonts instead of bundled ones
+ -DDESKTOP_APP_USE_PACKAGED_FONTS=$(usex !fonts)
+ )
+
+ 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
+ if ! use X && ! use screencast; then
+ ewarn "both the 'X' and 'screencast' USE flags are disabled, screen sharing won't work!"
+ ewarn
+ fi
+ if ! use jemalloc && use elibc_glibc; then
+ # https://github.com/telegramdesktop/tdesktop/issues/16084
+ # https://github.com/desktop-app/cmake_helpers/pull/91#issuecomment-881788003
+ ewarn "Disabling USE=jemalloc on glibc systems may cause very high RAM usage!"
+ ewarn "Do NOT report issues about RAM usage without enabling this flag first."
+ ewarn
+ fi
+ if use wayland && ! use qt6; then
+ ewarn "Wayland-specific integrations have been deprecated with Qt5."
+ ewarn "The app will continue to function under wayland, but some"
+ ewarn "functionality may be reduced."
+ ewarn "These integrations are only supported when built with Qt6."
+ ewarn
+ fi
+ if use qt6 && ! use qt6-imageformats; then
+ elog "Enable USE=qt6-imageformats for AVIF, HEIF and JpegXL support"
+ elog
+ fi
+ optfeature_header
+ if ! use qt6; then
+ optfeature "AVIF, HEIF and JpegXL image support" kde-frameworks/kimageformats[avif,heif,jpegxl]
+ fi
+}
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-im/telegram-desktop/files/, net-im/telegram-desktop/
@ 2023-07-15 16:25 Sam James
0 siblings, 0 replies; 38+ messages in thread
From: Sam James @ 2023-07-15 16:25 UTC (permalink / raw
To: gentoo-commits
commit: 8a5a0205dc4f55b099c6ccffd6599458a154dd78
Author: Esteve Varela Colominas <esteve.varela <AT> gmail <DOT> com>
AuthorDate: Fri Jul 14 00:04:23 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Jul 15 16:24:56 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8a5a0205
net-im/telegram-desktop: Remove dependency on private Qt components
Closes: https://bugs.gentoo.org/908500
Thanks-to: ZetaCorvi <AT> protonmail.com
Signed-off-by: Esteve Varela Colominas <esteve.varela <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/31538
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../files/tdesktop-4.8.4-remove-private-qt.patch | 50 +++++
.../telegram-desktop-4.8.4-r2.ebuild | 227 +++++++++++++++++++++
2 files changed, 277 insertions(+)
diff --git a/net-im/telegram-desktop/files/tdesktop-4.8.4-remove-private-qt.patch b/net-im/telegram-desktop/files/tdesktop-4.8.4-remove-private-qt.patch
new file mode 100644
index 000000000000..3dcf17662564
--- /dev/null
+++ b/net-im/telegram-desktop/files/tdesktop-4.8.4-remove-private-qt.patch
@@ -0,0 +1,50 @@
+Remove uses of private Qt classes
+
+Currently, this is used to fix compatibility with odd environments, and only
+for Qt6. This causes more trouble than it's worth, because it means telegram
+must be rebuilt with every minor Qt bump.
+
+https://bugs.gentoo.org/908500
+
+--- tdesktop-4.8.4-full.orig/Telegram/lib_ui/ui/rp_widget.cpp
++++ tdesktop-4.8.4-full/Telegram/lib_ui/ui/rp_widget.cpp
+@@ -12,38 +12,9 @@
+
+ #include <QtGui/QWindow>
+ #include <QtGui/QtEvents>
+-#include <private/qwidget_p.h>
+-
+-class TWidgetPrivate : public QWidgetPrivate {
+-public:
+-#if QT_VERSION >= QT_VERSION_CHECK(6, 4, 0)
+- QPlatformBackingStoreRhiConfig rhiConfig() const override {
+- const auto q = static_cast<TWidget*>(q_ptr);
+- if (!q->testAttribute(Qt::WA_WState_Created)) {
+- return QWidgetPrivate::rhiConfig();
+- }
+- if (const auto config = q->rhiConfig()) {
+- return *config;
+- }
+- if (::Platform::IsMac10_14OrGreater()) {
+- return { QPlatformBackingStoreRhiConfig::Metal };
+- }
+- // We can't specify the widget here as q_evaluateRhiConfig is called
+- // in QWidgetWindow constructor, while windowHandle is set right after
+- // the constructor is completed
+- if (::Platform::IsWayland() // old versions of mutter produce flicker without OpenGL
+- && Ui::GL::ChooseBackendDefault(
+- Ui::GL::CheckCapabilities(nullptr))
+- == Ui::GL::Backend::OpenGL) {
+- return { QPlatformBackingStoreRhiConfig::OpenGL };
+- }
+- return QWidgetPrivate::rhiConfig();
+- }
+-#endif // Qt >= 6.4.0
+-};
+
+ TWidget::TWidget(QWidget *parent)
+-: TWidgetHelper<QWidget>(*(new TWidgetPrivate), parent, {}) {
++: TWidgetHelper<QWidget>(parent, {}) {
+ [[maybe_unused]] static const auto Once = [] {
+ auto format = QSurfaceFormat::defaultFormat();
+ format.setSwapInterval(0);
diff --git a/net-im/telegram-desktop/telegram-desktop-4.8.4-r2.ebuild b/net-im/telegram-desktop/telegram-desktop-4.8.4-r2.ebuild
new file mode 100644
index 000000000000..c58885293abd
--- /dev/null
+++ b/net-im/telegram-desktop/telegram-desktop-4.8.4-r2.ebuild
@@ -0,0 +1,227 @@
+# Copyright 2020-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..12} )
+
+inherit xdg cmake python-any-r1 optfeature 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"
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="BSD GPL-3-with-openssl-exception LGPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~riscv"
+IUSE="enchant +fonts +jemalloc screencast qt6 qt6-imageformats wayland +X"
+REQUIRED_USE="
+ qt6-imageformats? ( qt6 )
+"
+
+KIMAGEFORMATS_RDEPEND="
+ media-libs/libavif:=
+ media-libs/libheif:=
+ media-libs/libjxl
+"
+RDEPEND="
+ !net-im/telegram-desktop-bin
+ app-arch/lz4:=
+ dev-cpp/abseil-cpp:=
+ >=dev-cpp/glibmm-2.76:2.68
+ dev-libs/glib:2
+ dev-libs/libdispatch
+ dev-libs/libsigc++:2
+ dev-libs/openssl:=
+ dev-libs/protobuf
+ dev-libs/xxhash
+ media-libs/fontconfig:=
+ media-libs/libjpeg-turbo:=
+ ~media-libs/libtgvoip-2.4.4_p20221208
+ media-libs/openal
+ media-libs/opus
+ media-libs/rnnoise
+ ~media-libs/tg_owt-0_pre20230428:=[screencast=,X=]
+ media-video/ffmpeg:=[opus,vpx]
+ sys-libs/zlib:=[minizip]
+ virtual/opengl
+ !enchant? ( >=app-text/hunspell-1.7:= )
+ enchant? ( app-text/enchant:= )
+ jemalloc? ( dev-libs/jemalloc:=[-lazy-lock] )
+ !qt6? (
+ >=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?]
+ kde-frameworks/kcoreaddons:=
+ )
+ qt6? (
+ dev-qt/qtbase:6[dbus,gui,network,opengl,widgets,X?]
+ dev-qt/qtimageformats:6
+ dev-qt/qtsvg:6
+ wayland? ( dev-qt/qtwayland:6 )
+ qt6-imageformats? (
+ dev-qt/qtimageformats:6=
+ ${KIMAGEFORMATS_RDEPEND}
+ )
+ )
+ X? (
+ x11-libs/libxcb:=
+ x11-libs/xcb-util-keysyms
+ )
+"
+DEPEND="${RDEPEND}
+ dev-cpp/cppgir
+ >=dev-cpp/ms-gsl-4
+ dev-cpp/range-v3
+"
+BDEPEND="
+ ${PYTHON_DEPS}
+ dev-cpp/cppgir
+ >=dev-util/cmake-3.16
+ dev-util/gdbus-codegen
+ virtual/pkgconfig
+"
+# dev-libs/jemalloc:=[-lazy-lock] -> https://bugs.gentoo.org/803233
+
+PATCHES=(
+ "${FILESDIR}/tdesktop-4.2.4-jemalloc-only-telegram-r1.patch"
+ "${FILESDIR}/tdesktop-4.8.4-system-cppgir.patch"
+ "${FILESDIR}/tdesktop-4.8.3-fix-clang.patch"
+ "${FILESDIR}/tdesktop-4.8.4-remove-private-qt.patch"
+)
+
+# Current desktop-file-utils-0.26 does not understand Version=1.5
+QA_DESKTOP_FILE="usr/share/applications/${PN}.desktop"
+
+pkg_pretend() {
+ if has ccache ${FEATURES}; then
+ 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
+}
+
+pkg_setup() {
+ # Having inaccessible paths sneak into the build environment through the
+ # XDG_DATA_DIRS variable breaks cppgir.
+ # bug 909038
+ unset XDG_DATA_DIRS
+}
+
+src_prepare() {
+ # Bundle kde-frameworks/kimageformats for qt6, since it's impossible to
+ # build in gentoo right now.
+ if use qt6-imageformats; then
+ sed -e 's/DESKTOP_APP_USE_PACKAGED_LAZY/TRUE/' -i \
+ cmake/external/kimageformats/CMakeLists.txt || die
+ printf '%s\n' \
+ 'Q_IMPORT_PLUGIN(QAVIFPlugin)' \
+ 'Q_IMPORT_PLUGIN(HEIFPlugin)' \
+ 'Q_IMPORT_PLUGIN(QJpegXLPlugin)' \
+ >> cmake/external/qt/qt_static_plugins/qt_static_plugins.cpp || die
+ fi
+
+ # kde-frameworks/kcoreaddons is bundled when using qt6, see:
+ # cmake/external/kcoreaddons/CMakeLists.txt
+
+ # Happily fail if libraries aren't found...
+ find -type f -name 'CMakeLists.txt' \
+ \! -path "./cmake/external/expected/CMakeLists.txt" \
+ -print0 | xargs -0 sed -i \
+ -e '/pkg_check_modules(/s/[^ ]*)/REQUIRED &/' \
+ -e '/find_package(/s/)/ REQUIRED)/' || die
+
+ cmake_src_prepare
+}
+
+src_configure() {
+ # The ABI of media-libs/tg_owt breaks if the -DNDEBUG flag doesn't keep
+ # the same state across both projects.
+ # See https://bugs.gentoo.org/866055
+ append-cppflags '-DNDEBUG'
+
+ local mycmakeargs=(
+ -DCMAKE_DISABLE_FIND_PACKAGE_tl-expected=ON # header only lib, some git version. prevents warnings.
+ -DQT_VERSION_MAJOR=$(usex qt6 6 5)
+
+ -DDESKTOP_APP_DISABLE_X11_INTEGRATION=$(usex !X)
+ -DDESKTOP_APP_DISABLE_WAYLAND_INTEGRATION=$(usex !wayland)
+ -DDESKTOP_APP_DISABLE_JEMALLOC=$(usex !jemalloc)
+ -DDESKTOP_APP_USE_ENCHANT=$(usex enchant) # enables enchant and disables hunspell
+ -DDESKTOP_APP_USE_PACKAGED_FONTS=$(usex !fonts) # use system fonts instead of bundled ones
+ )
+
+ 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
+ if ! use X && ! use screencast; then
+ ewarn "both the 'X' and 'screencast' USE flags are disabled, screen sharing won't work!"
+ ewarn
+ fi
+ if has_version '<dev-qt/qtcore-5.15.2-r10'; then
+ ewarn "Versions of dev-qt/qtcore lower than 5.15.2-r10 might cause telegram"
+ ewarn "to crash when pasting big images from the clipboard."
+ ewarn
+ fi
+ if ! use jemalloc && use elibc_glibc; then
+ # https://github.com/telegramdesktop/tdesktop/issues/16084
+ # https://github.com/desktop-app/cmake_helpers/pull/91#issuecomment-881788003
+ ewarn "Disabling USE=jemalloc on glibc systems may cause very high RAM usage!"
+ ewarn "Do NOT report issues about RAM usage without enabling this flag first."
+ ewarn
+ fi
+ if use qt6; then
+ ewarn "Qt6 support in gentoo is experimental."
+ ewarn "Please report any issues you may find, but don't expect"
+ ewarn "everything to work correctly as of yet."
+ ewarn
+ fi
+ if use wayland && ! use qt6; then
+ ewarn "Wayland-specific integrations have been deprecated with Qt5."
+ ewarn "The app will continue to function under wayland, but some"
+ ewarn "functionality may be reduced."
+ ewarn "These integrations are only supported when built with Qt6."
+ ewarn
+ fi
+ if use qt6 && ! use qt6-imageformats; then
+ elog "Enable USE=qt6-imageformats for AVIF, HEIF and JpegXL support"
+ elog
+ fi
+ optfeature_header
+ optfeature "shop payment support" net-libs/webkit-gtk:4
+ if ! use qt6; then
+ optfeature "AVIF, HEIF and JpegXL image support" kde-frameworks/kimageformats[avif,heif,jpegxl]
+ fi
+}
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-im/telegram-desktop/files/, net-im/telegram-desktop/
@ 2023-06-10 13:43 Sam James
0 siblings, 0 replies; 38+ messages in thread
From: Sam James @ 2023-06-10 13:43 UTC (permalink / raw
To: gentoo-commits
commit: f032c51b6f880a6d3fb6e8070cd8e922d4f66b8d
Author: Esteve Varela Colominas <esteve.varela <AT> gmail <DOT> com>
AuthorDate: Sat Jun 10 12:10:18 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Jun 10 13:43:29 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f032c51b
net-im/telegram-desktop: Bump to 4.8.3
A very """minor""" upgrade, user-interface wise, but an annoying one
from the packaging side of things.
A new dependency to cppgir appeared, with no regards to packaging. This
applies to cppgir itself as well, as it bundles another library.
Dropped keywords, will need to be re-instated as the new dependencies
gain support for additional architectures.
D-Bus support was dropped:
https://github.com/telegramdesktop/tdesktop/commit/0a011db483eaaf4f9eec33c6af77d3bdf049c816
(I don't wish to go against this flow and re-introduce glib support
without dbus)
Signed-off-by: Esteve Varela Colominas <esteve.varela <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/31373
Signed-off-by: Sam James <sam <AT> gentoo.org>
net-im/telegram-desktop/Manifest | 1 +
.../files/tdesktop-4.8.3-fix-clang.patch | 52 +++++
.../files/tdesktop-4.8.3-system-cppgir.patch | 50 +++++
.../telegram-desktop/telegram-desktop-4.8.3.ebuild | 210 +++++++++++++++++++++
4 files changed, 313 insertions(+)
diff --git a/net-im/telegram-desktop/Manifest b/net-im/telegram-desktop/Manifest
index e4b269dc8954..644debcd4e0b 100644
--- a/net-im/telegram-desktop/Manifest
+++ b/net-im/telegram-desktop/Manifest
@@ -1 +1,2 @@
DIST tdesktop-4.8.1-full.tar.gz 63997319 BLAKE2B daac461f0b3205bf647027329660b43f4646db987e27bfe2a2848bfbfb3309c503132d1533f26e95512520417d30f5063b1c395b174787aa7533727549ee77e5 SHA512 4dc495e4502bdba634c4468af4f1321aef1152d619c811f004489f8616504a465069508239eae41a08a83e190a61d26881733ebc38dd88160f81dce070bb0567
+DIST tdesktop-4.8.3-full.tar.gz 64351425 BLAKE2B b2f18abee66364f9075dc9a924221092b511d092f755ebf44705efdc96b2cbfe71b77a1a375624fa48e072f2b3f9bd19795b456c5f03f236b164dba35febacf9 SHA512 11fdd39319d1fdae07094d0ab2cb919355015bee14567d88daf98f9e5332bfee7a938415800397e6f24224e97f6425fe0a1d7549d7de14b63f84ab7cb7741872
diff --git a/net-im/telegram-desktop/files/tdesktop-4.8.3-fix-clang.patch b/net-im/telegram-desktop/files/tdesktop-4.8.3-fix-clang.patch
new file mode 100644
index 000000000000..5135c3c5ef4b
--- /dev/null
+++ b/net-im/telegram-desktop/files/tdesktop-4.8.3-fix-clang.patch
@@ -0,0 +1,52 @@
+Fix build issues with clang
+
+/var/tmp/portage/net-im/telegram-desktop-4.8.3/work/tdesktop-4.8.3-full/Telegram/lib_base/base/platform/linux/base_system_media_controls_linux.cpp:198:4: error: reference to 'GObject' is ambiguous
+ GObject::Object,
+ ^
+/usr/include/glib-2.0/gobject/gobject.h:192:42: note: candidate found by name lookup is 'GObject'
+typedef struct _GObject GObject;
+ ^
+/var/tmp/portage/net-im/telegram-desktop-4.8.3/work/tdesktop-4.8.3-full_build/gen/gobject/_functions_impl.hpp:10:11: note: candidate found by name lookup is 'gi::repository::GObject'
+namespace GObject {
+ ^
+--- tdesktop-4.8.3-full.orig/Telegram/lib_base/base/platform/linux/base_system_media_controls_linux.cpp
++++ tdesktop-4.8.3-full/Telegram/lib_base/base/platform/linux/base_system_media_controls_linux.cpp
+@@ -195,7 +195,7 @@
+ player().set_loop_status("None");
+ player().set_rate(1.0);
+ const auto executeCommand = [=](
+- GObject::Object,
++ gi::repository::GObject::Object,
+ Gio::DBusMethodInvocation invocation) {
+ base::Integration::Instance().enterFromEventLoop([&] {
+ _commandRequests.fire_copy(
+@@ -232,23 +232,23 @@
+ return true;
+ });
+ player().property_loop_status().signal_notify().connect([=](
+- GObject::Object,
+- GObject::ParamSpec) {
++ gi::repository::GObject::Object,
++ gi::repository::GObject::ParamSpec) {
+ base::Integration::Instance().enterFromEventLoop([&] {
+ _commandRequests.fire_copy(
+ LoopStatusToCommand(player().get_loop_status()));
+ });
+ });
+ player().property_shuffle().signal_notify().connect([=](
+- GObject::Object,
+- GObject::ParamSpec) {
++ gi::repository::GObject::Object,
++ gi::repository::GObject::ParamSpec) {
+ base::Integration::Instance().enterFromEventLoop([&] {
+ _commandRequests.fire_copy(Command::Shuffle);
+ });
+ });
+ player().property_volume().signal_notify().connect([=](
+- GObject::Object,
+- GObject::ParamSpec) {
++ gi::repository::GObject::Object,
++ gi::repository::GObject::ParamSpec) {
+ base::Integration::Instance().enterFromEventLoop([&] {
+ _volumeChangeRequests.fire_copy(player().get_volume());
+ });
diff --git a/net-im/telegram-desktop/files/tdesktop-4.8.3-system-cppgir.patch b/net-im/telegram-desktop/files/tdesktop-4.8.3-system-cppgir.patch
new file mode 100644
index 000000000000..54c79b3e5a0c
--- /dev/null
+++ b/net-im/telegram-desktop/files/tdesktop-4.8.3-system-cppgir.patch
@@ -0,0 +1,50 @@
+Use system cppgir
+
+--- tdesktop-4.8.3-full.orig/cmake/external/glib/CMakeLists.txt
++++ tdesktop-4.8.3-full/cmake/external/glib/CMakeLists.txt
+@@ -7,14 +7,6 @@
+ add_library(external_glib INTERFACE IMPORTED GLOBAL)
+ add_library(desktop-app::external_glib ALIAS external_glib)
+
+-function(add_cppgir) # isolate scope
+- set(BUILD_TESTING OFF)
+- set(BUILD_DOC OFF)
+- set(CMAKE_DISABLE_FIND_PACKAGE_Qt5Core ON)
+- add_subdirectory(cppgir)
+-endfunction()
+-add_cppgir()
+-
+ include(generate_cppgir.cmake)
+ generate_cppgir(external_glib Gio-2.0)
+
+--- tdesktop-4.8.3-full.orig/cmake/external/glib/generate_cppgir.cmake
++++ tdesktop-4.8.3-full/cmake/external/glib/generate_cppgir.cmake
+@@ -4,6 +4,8 @@
+ # For license and copyright information please follow this link:
+ # https://github.com/desktop-app/legal/blob/master/LEGAL
+
++find_package(CppGir REQUIRED)
++
+ function(generate_cppgir target_name gir)
+ # cppgir generates all the dependent headers everytime, better to have a global folder
+ set(gen_dst ${CMAKE_BINARY_DIR}/gen)
+@@ -32,17 +34,16 @@
+ echo 1> ${gen_timestamp}
+ COMMENT "Generating C++ wrapper for ${gir} (${target_name})"
+ DEPENDS
+- cppgir
+ ${gir_path}
+ )
+ generate_target(${target_name} cppgir ${gen_timestamp} "" ${gen_dst})
+
+ get_target_property(target_type ${target_name} TYPE)
+ if (${target_type} STREQUAL "INTERFACE_LIBRARY")
+- target_link_libraries(${target_name} INTERFACE gi)
++ target_link_libraries(${target_name} INTERFACE CppGir::gi)
+ target_compile_definitions(${target_name} INTERFACE GI_INLINE GI_OBJECT_NEWV)
+ else()
+- target_link_libraries(${target_name} PUBLIC gi)
++ target_link_libraries(${target_name} PUBLIC CppGir::gi)
+ target_compile_definitions(${target_name} PUBLIC GI_INLINE GI_OBJECT_NEWV)
+ endif()
+ endfunction()
diff --git a/net-im/telegram-desktop/telegram-desktop-4.8.3.ebuild b/net-im/telegram-desktop/telegram-desktop-4.8.3.ebuild
new file mode 100644
index 000000000000..4060dde670a2
--- /dev/null
+++ b/net-im/telegram-desktop/telegram-desktop-4.8.3.ebuild
@@ -0,0 +1,210 @@
+# Copyright 2020-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..12} )
+
+inherit xdg cmake python-any-r1 optfeature 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"
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="BSD GPL-3-with-openssl-exception LGPL-2+"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="enchant +fonts +jemalloc screencast qt6 qt6-imageformats wayland +X"
+REQUIRED_USE="
+ qt6-imageformats? ( qt6 )
+"
+
+KIMAGEFORMATS_RDEPEND="
+ media-libs/libavif:=
+ media-libs/libheif:=
+ media-libs/libjxl
+"
+RDEPEND="
+ !net-im/telegram-desktop-bin
+ app-arch/lz4:=
+ dev-cpp/abseil-cpp:=
+ >=dev-cpp/glibmm-2.76:2.68
+ dev-libs/glib:2
+ dev-libs/libdispatch
+ dev-libs/libsigc++:2
+ dev-libs/openssl:=
+ dev-libs/protobuf
+ dev-libs/xxhash
+ media-libs/fontconfig:=
+ media-libs/libjpeg-turbo:=
+ ~media-libs/libtgvoip-2.4.4_p20221208
+ media-libs/openal
+ media-libs/opus:=
+ media-libs/rnnoise
+ ~media-libs/tg_owt-0_pre20230428:=[screencast=,X=]
+ media-video/ffmpeg:=[opus,vpx]
+ sys-libs/zlib:=[minizip]
+ virtual/opengl
+ !enchant? ( >=app-text/hunspell-1.7:= )
+ enchant? ( app-text/enchant:= )
+ jemalloc? ( dev-libs/jemalloc:=[-lazy-lock] )
+ !qt6? (
+ >=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?]
+ kde-frameworks/kcoreaddons:=
+ )
+ qt6? (
+ dev-qt/qtbase:6[dbus,gui,network,opengl,widgets,X?]
+ dev-qt/qtimageformats:6
+ dev-qt/qtsvg:6
+ wayland? ( dev-qt/qtwayland:6 )
+ qt6-imageformats? ( ${KIMAGEFORMATS_RDEPEND} )
+ )
+ X? (
+ x11-libs/libxcb:=
+ x11-libs/xcb-util-keysyms
+ )
+"
+DEPEND="${RDEPEND}
+ dev-cpp/cppgir
+ >=dev-cpp/ms-gsl-4
+ dev-cpp/range-v3
+"
+BDEPEND="
+ ${PYTHON_DEPS}
+ dev-cpp/cppgir
+ >=dev-util/cmake-3.16
+ dev-util/gdbus-codegen
+ virtual/pkgconfig
+"
+# dev-libs/jemalloc:=[-lazy-lock] -> https://bugs.gentoo.org/803233
+
+PATCHES=(
+ "${FILESDIR}/tdesktop-4.2.4-jemalloc-only-telegram-r1.patch"
+ "${FILESDIR}/tdesktop-4.4.1-fix-dupe-main-decl.patch"
+ "${FILESDIR}/tdesktop-4.8.3-system-cppgir.patch"
+ "${FILESDIR}/tdesktop-4.8.3-fix-clang.patch"
+)
+
+# Current desktop-file-utils-0.26 does not understand Version=1.5
+QA_DESKTOP_FILE="usr/share/applications/${PN}.desktop"
+
+pkg_pretend() {
+ if has ccache ${FEATURES}; then
+ 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() {
+ # Bundle kde-frameworks/kimageformats for qt6, since it's impossible to
+ # build in gentoo right now.
+ if use qt6-imageformats; then
+ sed -e 's/DESKTOP_APP_USE_PACKAGED_LAZY/TRUE/' -i \
+ cmake/external/kimageformats/CMakeLists.txt || die
+ printf '%s\n' \
+ 'Q_IMPORT_PLUGIN(QAVIFPlugin)' \
+ 'Q_IMPORT_PLUGIN(HEIFPlugin)' \
+ 'Q_IMPORT_PLUGIN(QJpegXLPlugin)' \
+ >> cmake/external/qt/qt_static_plugins/qt_static_plugins.cpp || die
+ fi
+
+ # kde-frameworks/kcoreaddons is bundled when using qt6, see:
+ # cmake/external/kcoreaddons/CMakeLists.txt
+
+ cmake_src_prepare
+}
+
+src_configure() {
+ # The ABI of media-libs/tg_owt breaks if the -DNDEBUG flag doesn't keep
+ # the same state across both projects.
+ # See https://bugs.gentoo.org/866055
+ append-cppflags '-DNDEBUG'
+
+ local mycmakeargs=(
+ -DCMAKE_DISABLE_FIND_PACKAGE_tl-expected=ON # header only lib, some git version. prevents warnings.
+ -DQT_VERSION_MAJOR=$(usex qt6 6 5)
+
+ -DDESKTOP_APP_DISABLE_X11_INTEGRATION=$(usex !X)
+ -DDESKTOP_APP_DISABLE_WAYLAND_INTEGRATION=$(usex !wayland)
+ -DDESKTOP_APP_DISABLE_JEMALLOC=$(usex !jemalloc)
+ -DDESKTOP_APP_USE_ENCHANT=$(usex enchant) # enables enchant and disables hunspell
+ -DDESKTOP_APP_USE_PACKAGED_FONTS=$(usex !fonts) # use system fonts instead of bundled ones
+ )
+
+ 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
+ if ! use X && ! use screencast; then
+ ewarn "both the 'X' and 'screencast' USE flags are disabled, screen sharing won't work!"
+ ewarn
+ fi
+ if has_version '<dev-qt/qtcore-5.15.2-r10'; then
+ ewarn "Versions of dev-qt/qtcore lower than 5.15.2-r10 might cause telegram"
+ ewarn "to crash when pasting big images from the clipboard."
+ ewarn
+ fi
+ if ! use jemalloc && use elibc_glibc; then
+ # https://github.com/telegramdesktop/tdesktop/issues/16084
+ # https://github.com/desktop-app/cmake_helpers/pull/91#issuecomment-881788003
+ ewarn "Disabling USE=jemalloc on glibc systems may cause very high RAM usage!"
+ ewarn "Do NOT report issues about RAM usage without enabling this flag first."
+ ewarn
+ fi
+ if use qt6; then
+ ewarn "Qt6 support in gentoo is experimental."
+ ewarn "Please report any issues you may find, but don't expect"
+ ewarn "everything to work correctly as of yet."
+ ewarn
+ fi
+ if use wayland && ! use qt6; then
+ ewarn "Wayland-specific integrations have been deprecated with Qt5."
+ ewarn "The app will continue to function under wayland, but some"
+ ewarn "functionality may be reduced."
+ ewarn "These integrations are only supported when built with Qt6."
+ ewarn
+ fi
+ if use qt6 && ! use qt6-imageformats; then
+ elog "Enable USE=qt6-imageformats for AVIF, HEIF and JpegXL support"
+ elog
+ fi
+ optfeature_header
+ optfeature "shop payment support" net-libs/webkit-gtk:4
+ if ! use qt6; then
+ optfeature "AVIF, HEIF and JpegXL image support" kde-frameworks/kimageformats[avif,heif,jpegxl]
+ fi
+}
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-im/telegram-desktop/files/, net-im/telegram-desktop/
@ 2023-05-16 17:07 Sam James
0 siblings, 0 replies; 38+ messages in thread
From: Sam James @ 2023-05-16 17:07 UTC (permalink / raw
To: gentoo-commits
commit: ce4cbbe6125f6444606f3c3df4c82c93e17a8e64
Author: Esteve Varela Colominas <esteve.varela <AT> gmail <DOT> com>
AuthorDate: Mon May 15 14:20:02 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue May 16 17:07:16 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ce4cbbe6
net-im/telegram-desktop: Fix jemalloc linkage
Updated patch allows for jemalloc to be linked properly
Closes: https://bugs.gentoo.org/906302
Thanks-to: Михаил <spike <AT> lmu.name>
Signed-off-by: Esteve Varela Colominas <esteve.varela <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/31044
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../tdesktop-4.2.4-jemalloc-only-telegram-r1.patch | 43 ++++++++++++++++++++++
...-r1.ebuild => telegram-desktop-4.6.5-r2.ebuild} | 2 +-
...-r1.ebuild => telegram-desktop-4.8.1-r2.ebuild} | 2 +-
3 files changed, 45 insertions(+), 2 deletions(-)
diff --git a/net-im/telegram-desktop/files/tdesktop-4.2.4-jemalloc-only-telegram-r1.patch b/net-im/telegram-desktop/files/tdesktop-4.2.4-jemalloc-only-telegram-r1.patch
new file mode 100644
index 000000000000..d56bacea69f8
--- /dev/null
+++ b/net-im/telegram-desktop/files/tdesktop-4.2.4-jemalloc-only-telegram-r1.patch
@@ -0,0 +1,43 @@
+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-4.2.4-full.orig/Telegram/CMakeLists.txt
++++ tdesktop-4.2.4-full/Telegram/CMakeLists.txt
+@@ -1478,6 +1478,14 @@
+ desktop-app::external_wayland_client
+ )
+ endif()
++
++ if (NOT DESKTOP_APP_DISABLE_JEMALLOC)
++ target_link_libraries(Telegram
++ PRIVATE
++ $<TARGET_OBJECTS:desktop-app::linux_jemalloc_helper>
++ $<LINK_ONLY:desktop-app::external_jemalloc>
++ )
++ endif()
+ endif()
+
+ if (build_macstore)
+--- tdesktop-4.2.4-full.orig/cmake/options_linux.cmake
++++ tdesktop-4.2.4-full/cmake/options_linux.cmake
+@@ -78,14 +78,6 @@
+ )
+ 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()
+-
+ if (DESKTOP_APP_USE_ALLOCATION_TRACER)
+ target_link_options(common_options
+ INTERFACE
diff --git a/net-im/telegram-desktop/telegram-desktop-4.6.5-r1.ebuild b/net-im/telegram-desktop/telegram-desktop-4.6.5-r2.ebuild
similarity index 99%
rename from net-im/telegram-desktop/telegram-desktop-4.6.5-r1.ebuild
rename to net-im/telegram-desktop/telegram-desktop-4.6.5-r2.ebuild
index f50292ef176a..a0dc810ebc7f 100644
--- a/net-im/telegram-desktop/telegram-desktop-4.6.5-r1.ebuild
+++ b/net-im/telegram-desktop/telegram-desktop-4.6.5-r2.ebuild
@@ -84,7 +84,7 @@ BDEPEND="
# dev-libs/jemalloc:=[-lazy-lock] -> https://bugs.gentoo.org/803233
PATCHES=(
- "${FILESDIR}/tdesktop-4.2.4-jemalloc-only-telegram.patch"
+ "${FILESDIR}/tdesktop-4.2.4-jemalloc-only-telegram-r1.patch"
"${FILESDIR}/tdesktop-4.4.1-fix-dupe-main-decl.patch"
)
diff --git a/net-im/telegram-desktop/telegram-desktop-4.8.1-r1.ebuild b/net-im/telegram-desktop/telegram-desktop-4.8.1-r2.ebuild
similarity index 99%
rename from net-im/telegram-desktop/telegram-desktop-4.8.1-r1.ebuild
rename to net-im/telegram-desktop/telegram-desktop-4.8.1-r2.ebuild
index 349592fc763a..dee0c3c1cc2f 100644
--- a/net-im/telegram-desktop/telegram-desktop-4.8.1-r1.ebuild
+++ b/net-im/telegram-desktop/telegram-desktop-4.8.1-r2.ebuild
@@ -85,7 +85,7 @@ BDEPEND="
# dev-libs/jemalloc:=[-lazy-lock] -> https://bugs.gentoo.org/803233
PATCHES=(
- "${FILESDIR}/tdesktop-4.2.4-jemalloc-only-telegram.patch"
+ "${FILESDIR}/tdesktop-4.2.4-jemalloc-only-telegram-r1.patch"
"${FILESDIR}/tdesktop-4.4.1-fix-dupe-main-decl.patch"
)
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-im/telegram-desktop/files/, net-im/telegram-desktop/
@ 2023-04-17 20:16 Georgy Yakovlev
0 siblings, 0 replies; 38+ messages in thread
From: Georgy Yakovlev @ 2023-04-17 20:16 UTC (permalink / raw
To: gentoo-commits
commit: f829a1e074c9bbacbd0edddd01d2a33c711f9446
Author: Esteve Varela Colominas <esteve.varela <AT> gmail <DOT> com>
AuthorDate: Sat Apr 8 14:19:37 2023 +0000
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Mon Apr 17 20:15:49 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f829a1e0
net-im/telegram-desktop: Drop old
Signed-off-by: Esteve Varela Colominas <esteve.varela <AT> gmail.com>
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
net-im/telegram-desktop/Manifest | 2 -
.../tdesktop-4.3.4-qt5-incompatibility-2.patch | 28 ---
net-im/telegram-desktop/metadata.xml | 1 -
.../telegram-desktop/telegram-desktop-4.4.1.ebuild | 211 ---------------------
.../telegram-desktop/telegram-desktop-4.5.3.ebuild | 210 --------------------
5 files changed, 452 deletions(-)
diff --git a/net-im/telegram-desktop/Manifest b/net-im/telegram-desktop/Manifest
index 0462a3422ba7..1366bad56749 100644
--- a/net-im/telegram-desktop/Manifest
+++ b/net-im/telegram-desktop/Manifest
@@ -1,3 +1 @@
-DIST tdesktop-4.4.1-full.tar.gz 50077498 BLAKE2B 6196c474c0771197c56b386bbfd67e4a014569cb8bd9676990e323005f06cb6938aad0c0dd00fd74cab9fca1ac50c7bf7227f34aa39ae598b4f003199fa8cd00 SHA512 91038f0a615ef7ae1050cbfa614041a3d6a45fdbd26d120ef98cca3c31377612c3bb1e80f9aff58c4853a1726bf2cfb427f752a4f88a796f05b381516c981563
-DIST tdesktop-4.5.3-full.tar.gz 63718129 BLAKE2B 85492ad92ea2643dd5e74c831609a4f7be9671648d2b542c24f415dbb19b66521ccecb2a545eadfbf9fa7f934d35d32de085b5b8403dce54bed0b85c54ea98fe SHA512 58a9c5d096e236090347388e1ed480527f841045a80771079dc0c3e35e12ce8ac11753987e87bb57870d9bd8488fc6a4734114648ecec7823d8544744b06c6b1
DIST tdesktop-4.6.5-full.tar.gz 63793549 BLAKE2B a425aaf8d1f1c633b3b8ddacff5bb7cc26e6063d4238413fea76db6a4608497d229061a614c79464373e7f1aa3bb854d9718083638e119538e989a202741b3d6 SHA512 4a337e375d7746cb1fa652f5851f8be5718b7b9d9676bba8ab040489b8492b2a665a51848adba28117a910789aa942c386318a01f6c99b4caa12a1eac682c780
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
deleted file mode 100644
index ae5c84763c8d..000000000000
--- a/net-im/telegram-desktop/files/tdesktop-4.3.4-qt5-incompatibility-2.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-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");
- }());
diff --git a/net-im/telegram-desktop/metadata.xml b/net-im/telegram-desktop/metadata.xml
index cd141868ce56..f99bd5fb5e94 100644
--- a/net-im/telegram-desktop/metadata.xml
+++ b/net-im/telegram-desktop/metadata.xml
@@ -11,7 +11,6 @@
</maintainer>
<use>
<flag name="enchant">Use the <pkg>app-text/aspell</pkg> spell-checking backend instead of <pkg>app-text/hunspell</pkg></flag>
- <flag name="hunspell">Enable the <pkg>app-text/hunspell</pkg> spell-checking backend (old flag)</flag>
<flag name="fonts">Use builtin patched copy of open-sans fonts (overrides fontconfig)</flag>
<flag name="qt6">Build with Qt6 support</flag>
<flag name="qt6-imageformats">Add support for HEIF, AVIF and JpegXL by bundling kde-frameworks/kimageformats</flag>
diff --git a/net-im/telegram-desktop/telegram-desktop-4.4.1.ebuild b/net-im/telegram-desktop/telegram-desktop-4.4.1.ebuild
deleted file mode 100644
index 48b724704d43..000000000000
--- a/net-im/telegram-desktop/telegram-desktop-4.4.1.ebuild
+++ /dev/null
@@ -1,211 +0,0 @@
-# Copyright 2020-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{9..11} )
-
-inherit xdg cmake python-any-r1 optfeature 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"
-S="${WORKDIR}/${MY_P}"
-
-LICENSE="BSD GPL-3-with-openssl-exception LGPL-2+"
-SLOT="0"
-KEYWORDS="amd64 ~arm64 ~ppc64 ~riscv"
-IUSE="+dbus enchant +fonts +hunspell +jemalloc screencast +spell qt6 qt6-imageformats wayland +X"
-REQUIRED_USE="
- spell? (
- ^^ ( enchant hunspell )
- )
- qt6-imageformats? ( qt6 )
-"
-
-KIMAGEFORMATS_RDEPEND="
- media-libs/libavif:=
- media-libs/libheif:=
- media-libs/libjxl
-"
-RDEPEND="
- !net-im/telegram-desktop-bin
- app-arch/lz4:=
- dev-cpp/abseil-cpp:=
- dev-libs/glib:2
- dev-libs/libdispatch
- dev-libs/libsigc++:2
- dev-libs/openssl:=
- dev-libs/xxhash
- media-libs/fontconfig:=
- media-libs/libjpeg-turbo:=
- ~media-libs/libtgvoip-2.4.4_p20220503
- media-libs/openal
- media-libs/opus:=
- media-libs/rnnoise
- ~media-libs/tg_owt-0_pre20220507:=[screencast=,X=]
- media-video/ffmpeg:=[opus]
- sys-libs/zlib:=[minizip]
- virtual/opengl
- dbus? ( dev-cpp/glibmm:2.68 )
- enchant? ( app-text/enchant:= )
- hunspell? ( >=app-text/hunspell-1.7:= )
- jemalloc? ( dev-libs/jemalloc:=[-lazy-lock] )
- !qt6? (
- >=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?]
- kde-frameworks/kcoreaddons:=
- )
- qt6? (
- dev-qt/qt5compat:6
- dev-qt/qtbase:6[dbus?,gui,network,opengl,widgets,X?]
- dev-qt/qtimageformats:6
- dev-qt/qtsvg:6
- wayland? ( dev-qt/qtwayland:6 )
- qt6-imageformats? ( ${KIMAGEFORMATS_RDEPEND} )
- )
- X? (
- x11-libs/libxcb:=
- x11-libs/xcb-util-keysyms
- )
-"
-DEPEND="${RDEPEND}
- dev-cpp/range-v3
- dev-cpp/ms-gsl
-"
-BDEPEND="
- ${PYTHON_DEPS}
- >=dev-util/cmake-3.16
- virtual/pkgconfig
-"
-# dev-libs/jemalloc:=[-lazy-lock] -> https://bugs.gentoo.org/803233
-
-PATCHES=(
- "${FILESDIR}/tdesktop-4.2.4-jemalloc-only-telegram.patch"
- "${FILESDIR}/tdesktop-4.3.4-qt5-incompatibility-2.patch"
- "${FILESDIR}/tdesktop-4.4.1-fix-dupe-main-decl.patch"
-)
-
-# Current desktop-file-utils-0.26 does not understand Version=1.5
-QA_DESKTOP_FILE="usr/share/applications/${PN}.desktop"
-
-pkg_pretend() {
- if has ccache ${FEATURES}; then
- 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() {
- # Bundle kde-frameworks/kimageformats for qt6, since it's impossible to
- # build in gentoo right now.
- if use qt6-imageformats; then
- sed -e 's/DESKTOP_APP_USE_PACKAGED_LAZY/TRUE/' -i \
- cmake/external/kimageformats/CMakeLists.txt || die
- printf "%s\n" \
- 'Q_IMPORT_PLUGIN(QAVIFPlugin)' \
- 'Q_IMPORT_PLUGIN(HEIFPlugin)' \
- 'Q_IMPORT_PLUGIN(QJpegXLPlugin)' \
- >> cmake/external/qt/qt_static_plugins/qt_static_plugins.cpp || die
- fi
-
- # kde-frameworks/kcoreaddons is bundled when using qt6, see:
- # cmake/external/kcoreaddons/CMakeLists.txt
-
- cmake_src_prepare
-}
-
-src_configure() {
- # The ABI of media-libs/tg_owt breaks if the -DNDEBUG flag doesn't keep
- # the same state across both projects.
- # See https://bugs.gentoo.org/866055
- append-cppflags '-DNDEBUG'
-
- local mycmakeargs=(
- -DCMAKE_DISABLE_FIND_PACKAGE_tl-expected=ON # header only lib, some git version. prevents warnings.
- -DQT_VERSION_MAJOR=$(usex qt6 6 5)
-
- -DDESKTOP_APP_DISABLE_DBUS_INTEGRATION=$(usex !dbus)
- -DDESKTOP_APP_DISABLE_X11_INTEGRATION=$(usex !X)
- -DDESKTOP_APP_DISABLE_WAYLAND_INTEGRATION=$(usex !wayland)
- -DDESKTOP_APP_DISABLE_JEMALLOC=$(usex !jemalloc)
- -DDESKTOP_APP_DISABLE_SPELLCHECK=$(usex !spell) # enables hunspell (recommended)
- -DDESKTOP_APP_USE_ENCHANT=$(usex enchant) # enables enchant and disables hunspell
- -DDESKTOP_APP_USE_PACKAGED_FONTS=$(usex !fonts) # use system fonts instead of bundled ones
- )
-
- 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
- if ! use X && ! use screencast; then
- ewarn "both the 'X' and 'screencast' USE flags are disabled, screen sharing won't work!"
- ewarn
- fi
- if has_version '<dev-qt/qtcore-5.15.2-r10'; then
- ewarn "Versions of dev-qt/qtcore lower than 5.15.2-r10 might cause telegram"
- ewarn "to crash when pasting big images from the clipboard."
- ewarn
- fi
- if ! use jemalloc && use elibc_glibc; then
- # https://github.com/telegramdesktop/tdesktop/issues/16084
- # https://github.com/desktop-app/cmake_helpers/pull/91#issuecomment-881788003
- ewarn "Disabling USE=jemalloc on glibc systems may cause very high RAM usage!"
- ewarn "Do NOT report issues about RAM usage without enabling this flag first."
- ewarn
- fi
- if use qt6; then
- ewarn "Qt6 support in gentoo is experimental."
- ewarn "Please report any issues you may find, but don't expect"
- ewarn "everything to work correctly as of yet."
- ewarn
- fi
- if use wayland && ! use qt6; then
- ewarn "Wayland-specific integrations have been deprecated with Qt5."
- ewarn "The app will continue to function under wayland, but some"
- ewarn "functionality may be reduced."
- ewarn "These integrations are only supported when built with Qt6."
- ewarn
- fi
- if use qt6 && ! use qt6-imageformats; then
- elog "Enable USE=qt6-imageformats for AVIF, HEIF and JpegXL support"
- elog
- fi
- optfeature_header
- optfeature "shop payment support (requires USE=dbus enabled)" net-libs/webkit-gtk:4
- if ! use qt6; then
- optfeature "AVIF, HEIF and JpegXL image support" kde-frameworks/kimageformats[avif,heif,jpegxl]
- fi
-}
diff --git a/net-im/telegram-desktop/telegram-desktop-4.5.3.ebuild b/net-im/telegram-desktop/telegram-desktop-4.5.3.ebuild
deleted file mode 100644
index 099ce3718db4..000000000000
--- a/net-im/telegram-desktop/telegram-desktop-4.5.3.ebuild
+++ /dev/null
@@ -1,210 +0,0 @@
-# Copyright 2020-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{9..11} )
-
-inherit xdg cmake python-any-r1 optfeature 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"
-S="${WORKDIR}/${MY_P}"
-
-LICENSE="BSD GPL-3-with-openssl-exception LGPL-2+"
-SLOT="0"
-KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv"
-IUSE="+dbus enchant +fonts +hunspell +jemalloc screencast +spell qt6 qt6-imageformats wayland +X"
-REQUIRED_USE="
- spell? (
- ^^ ( enchant hunspell )
- )
- qt6-imageformats? ( qt6 )
-"
-
-KIMAGEFORMATS_RDEPEND="
- media-libs/libavif:=
- media-libs/libheif:=
- media-libs/libjxl
-"
-RDEPEND="
- !net-im/telegram-desktop-bin
- app-arch/lz4:=
- dev-cpp/abseil-cpp:=
- dev-libs/glib:2
- dev-libs/libdispatch
- dev-libs/libsigc++:2
- dev-libs/openssl:=
- dev-libs/xxhash
- media-libs/fontconfig:=
- media-libs/libjpeg-turbo:=
- ~media-libs/libtgvoip-2.4.4_p20221208
- media-libs/openal
- media-libs/opus:=
- media-libs/rnnoise
- ~media-libs/tg_owt-0_pre20230105:=[screencast=,X=]
- media-video/ffmpeg:=[opus]
- sys-libs/zlib:=[minizip]
- virtual/opengl
- dbus? ( dev-cpp/glibmm:2.68 )
- enchant? ( app-text/enchant:= )
- hunspell? ( >=app-text/hunspell-1.7:= )
- jemalloc? ( dev-libs/jemalloc:=[-lazy-lock] )
- !qt6? (
- >=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?]
- kde-frameworks/kcoreaddons:=
- )
- qt6? (
- dev-qt/qt5compat:6
- dev-qt/qtbase:6[dbus?,gui,network,opengl,widgets,X?]
- dev-qt/qtimageformats:6
- dev-qt/qtsvg:6
- wayland? ( dev-qt/qtwayland:6 )
- qt6-imageformats? ( ${KIMAGEFORMATS_RDEPEND} )
- )
- X? (
- x11-libs/libxcb:=
- x11-libs/xcb-util-keysyms
- )
-"
-DEPEND="${RDEPEND}
- dev-cpp/range-v3
- dev-cpp/ms-gsl
-"
-BDEPEND="
- ${PYTHON_DEPS}
- >=dev-util/cmake-3.16
- virtual/pkgconfig
-"
-# dev-libs/jemalloc:=[-lazy-lock] -> https://bugs.gentoo.org/803233
-
-PATCHES=(
- "${FILESDIR}/tdesktop-4.2.4-jemalloc-only-telegram.patch"
- "${FILESDIR}/tdesktop-4.4.1-fix-dupe-main-decl.patch"
-)
-
-# Current desktop-file-utils-0.26 does not understand Version=1.5
-QA_DESKTOP_FILE="usr/share/applications/${PN}.desktop"
-
-pkg_pretend() {
- if has ccache ${FEATURES}; then
- 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() {
- # Bundle kde-frameworks/kimageformats for qt6, since it's impossible to
- # build in gentoo right now.
- if use qt6-imageformats; then
- sed -e 's/DESKTOP_APP_USE_PACKAGED_LAZY/TRUE/' -i \
- cmake/external/kimageformats/CMakeLists.txt || die
- printf "%s\n" \
- 'Q_IMPORT_PLUGIN(QAVIFPlugin)' \
- 'Q_IMPORT_PLUGIN(HEIFPlugin)' \
- 'Q_IMPORT_PLUGIN(QJpegXLPlugin)' \
- >> cmake/external/qt/qt_static_plugins/qt_static_plugins.cpp || die
- fi
-
- # kde-frameworks/kcoreaddons is bundled when using qt6, see:
- # cmake/external/kcoreaddons/CMakeLists.txt
-
- cmake_src_prepare
-}
-
-src_configure() {
- # The ABI of media-libs/tg_owt breaks if the -DNDEBUG flag doesn't keep
- # the same state across both projects.
- # See https://bugs.gentoo.org/866055
- append-cppflags '-DNDEBUG'
-
- local mycmakeargs=(
- -DCMAKE_DISABLE_FIND_PACKAGE_tl-expected=ON # header only lib, some git version. prevents warnings.
- -DQT_VERSION_MAJOR=$(usex qt6 6 5)
-
- -DDESKTOP_APP_DISABLE_DBUS_INTEGRATION=$(usex !dbus)
- -DDESKTOP_APP_DISABLE_X11_INTEGRATION=$(usex !X)
- -DDESKTOP_APP_DISABLE_WAYLAND_INTEGRATION=$(usex !wayland)
- -DDESKTOP_APP_DISABLE_JEMALLOC=$(usex !jemalloc)
- -DDESKTOP_APP_DISABLE_SPELLCHECK=$(usex !spell) # enables hunspell (recommended)
- -DDESKTOP_APP_USE_ENCHANT=$(usex enchant) # enables enchant and disables hunspell
- -DDESKTOP_APP_USE_PACKAGED_FONTS=$(usex !fonts) # use system fonts instead of bundled ones
- )
-
- 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
- if ! use X && ! use screencast; then
- ewarn "both the 'X' and 'screencast' USE flags are disabled, screen sharing won't work!"
- ewarn
- fi
- if has_version '<dev-qt/qtcore-5.15.2-r10'; then
- ewarn "Versions of dev-qt/qtcore lower than 5.15.2-r10 might cause telegram"
- ewarn "to crash when pasting big images from the clipboard."
- ewarn
- fi
- if ! use jemalloc && use elibc_glibc; then
- # https://github.com/telegramdesktop/tdesktop/issues/16084
- # https://github.com/desktop-app/cmake_helpers/pull/91#issuecomment-881788003
- ewarn "Disabling USE=jemalloc on glibc systems may cause very high RAM usage!"
- ewarn "Do NOT report issues about RAM usage without enabling this flag first."
- ewarn
- fi
- if use qt6; then
- ewarn "Qt6 support in gentoo is experimental."
- ewarn "Please report any issues you may find, but don't expect"
- ewarn "everything to work correctly as of yet."
- ewarn
- fi
- if use wayland && ! use qt6; then
- ewarn "Wayland-specific integrations have been deprecated with Qt5."
- ewarn "The app will continue to function under wayland, but some"
- ewarn "functionality may be reduced."
- ewarn "These integrations are only supported when built with Qt6."
- ewarn
- fi
- if use qt6 && ! use qt6-imageformats; then
- elog "Enable USE=qt6-imageformats for AVIF, HEIF and JpegXL support"
- elog
- fi
- optfeature_header
- optfeature "shop payment support (requires USE=dbus enabled)" net-libs/webkit-gtk:4
- if ! use qt6; then
- optfeature "AVIF, HEIF and JpegXL image support" kde-frameworks/kimageformats[avif,heif,jpegxl]
- fi
-}
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-im/telegram-desktop/files/, net-im/telegram-desktop/
@ 2023-02-13 21:03 Georgy Yakovlev
0 siblings, 0 replies; 38+ messages in thread
From: Georgy Yakovlev @ 2023-02-13 21:03 UTC (permalink / raw
To: gentoo-commits
commit: ccbffa5458885063d9f6a54d06e902b280de3306
Author: Joe Kappus <joe <AT> wt <DOT> gd>
AuthorDate: Sat Feb 4 10:20:14 2023 +0000
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Mon Feb 13 21:02:04 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ccbffa54
net-im/telegram-desktop: Bump to 4.6.2
USE=-spell is no longer supported by upstream:
https://github.com/telegramdesktop/tdesktop/commit/f5be551ff8bb16f92638d4ddb5097a4e64507851#r99549281
Signed-off-by: Joe Kappus <joe <AT> wt.gd>
Signed-off-by: Esteve Varela Colominas <esteve.varela <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/29461
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
net-im/telegram-desktop/Manifest | 1 +
.../files/tdesktop-4.6.2-fix-gcc12-optional.patch | 15 ++
.../telegram-desktop/telegram-desktop-4.6.2.ebuild | 208 +++++++++++++++++++++
3 files changed, 224 insertions(+)
diff --git a/net-im/telegram-desktop/Manifest b/net-im/telegram-desktop/Manifest
index f1c518443e04..bd02883d4a69 100644
--- a/net-im/telegram-desktop/Manifest
+++ b/net-im/telegram-desktop/Manifest
@@ -1,2 +1,3 @@
DIST tdesktop-4.4.1-full.tar.gz 50077498 BLAKE2B 6196c474c0771197c56b386bbfd67e4a014569cb8bd9676990e323005f06cb6938aad0c0dd00fd74cab9fca1ac50c7bf7227f34aa39ae598b4f003199fa8cd00 SHA512 91038f0a615ef7ae1050cbfa614041a3d6a45fdbd26d120ef98cca3c31377612c3bb1e80f9aff58c4853a1726bf2cfb427f752a4f88a796f05b381516c981563
DIST tdesktop-4.5.3-full.tar.gz 63718129 BLAKE2B 85492ad92ea2643dd5e74c831609a4f7be9671648d2b542c24f415dbb19b66521ccecb2a545eadfbf9fa7f934d35d32de085b5b8403dce54bed0b85c54ea98fe SHA512 58a9c5d096e236090347388e1ed480527f841045a80771079dc0c3e35e12ce8ac11753987e87bb57870d9bd8488fc6a4734114648ecec7823d8544744b06c6b1
+DIST tdesktop-4.6.2-full.tar.gz 63799003 BLAKE2B 828b75e13f00c50d26df276479500edd7604987d233b3caf433dc1d5611f0743ef6c9e25ccecd35581b809ca1986ffc3f01bcc0a10c7d05b1d8c9396edc026b1 SHA512 9a52cecb2ccde6e1381045b1c96730c63c5f19ca188a1be3bc905762f6e356906b7be141e8d373473390c21bc8b48ef7d5f4ee43bb09229a96b82c4fd974b531
diff --git a/net-im/telegram-desktop/files/tdesktop-4.6.2-fix-gcc12-optional.patch b/net-im/telegram-desktop/files/tdesktop-4.6.2-fix-gcc12-optional.patch
new file mode 100644
index 000000000000..7e471e143ec0
--- /dev/null
+++ b/net-im/telegram-desktop/files/tdesktop-4.6.2-fix-gcc12-optional.patch
@@ -0,0 +1,15 @@
+Fix missing header with gcc 12
+
+Upstream:
+https://github.com/telegramdesktop/tdesktop/commit/a8decf154f5aceeff0b977c0a5845e42404286b3
+
+--- tdesktop-4.6.2-full.orig/Telegram/SourceFiles/payments/stripe/stripe_card_validator.h
++++ tdesktop-4.6.2-full/Telegram/SourceFiles/payments/stripe/stripe_card_validator.h
+@@ -9,6 +9,7 @@
+
+ #include "stripe/stripe_card.h"
+ #include <vector>
++#include <optional>
+
+ class QDate;
+
diff --git a/net-im/telegram-desktop/telegram-desktop-4.6.2.ebuild b/net-im/telegram-desktop/telegram-desktop-4.6.2.ebuild
new file mode 100644
index 000000000000..647c887cfff8
--- /dev/null
+++ b/net-im/telegram-desktop/telegram-desktop-4.6.2.ebuild
@@ -0,0 +1,208 @@
+# Copyright 2020-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..11} )
+
+inherit xdg cmake python-any-r1 optfeature 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"
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="BSD GPL-3-with-openssl-exception LGPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv"
+IUSE="+dbus enchant +fonts +hunspell +jemalloc screencast qt6 qt6-imageformats wayland +X"
+REQUIRED_USE="
+ ^^ ( enchant hunspell )
+ qt6-imageformats? ( qt6 )
+"
+
+KIMAGEFORMATS_RDEPEND="
+ media-libs/libavif:=
+ media-libs/libheif:=
+ media-libs/libjxl
+"
+RDEPEND="
+ !net-im/telegram-desktop-bin
+ app-arch/lz4:=
+ dev-cpp/abseil-cpp:=
+ dev-libs/glib:2
+ dev-libs/libdispatch
+ dev-libs/libsigc++:2
+ dev-libs/openssl:=
+ dev-libs/xxhash
+ media-libs/fontconfig:=
+ media-libs/libjpeg-turbo:=
+ ~media-libs/libtgvoip-2.4.4_p20221208
+ media-libs/openal
+ media-libs/opus:=
+ media-libs/rnnoise
+ ~media-libs/tg_owt-0_pre20230105:=[screencast=,X=]
+ media-video/ffmpeg:=[opus]
+ sys-libs/zlib:=[minizip]
+ virtual/opengl
+ dbus? ( dev-cpp/glibmm:2.68 )
+ enchant? ( app-text/enchant:= )
+ hunspell? ( >=app-text/hunspell-1.7:= )
+ jemalloc? ( dev-libs/jemalloc:=[-lazy-lock] )
+ !qt6? (
+ >=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?]
+ kde-frameworks/kcoreaddons:=
+ )
+ qt6? (
+ dev-qt/qt5compat:6
+ dev-qt/qtbase:6[dbus?,gui,network,opengl,widgets,X?]
+ dev-qt/qtimageformats:6
+ dev-qt/qtsvg:6
+ wayland? ( dev-qt/qtwayland:6 )
+ qt6-imageformats? ( ${KIMAGEFORMATS_RDEPEND} )
+ )
+ X? (
+ x11-libs/libxcb:=
+ x11-libs/xcb-util-keysyms
+ )
+"
+DEPEND="${RDEPEND}
+ dev-cpp/range-v3
+ dev-cpp/ms-gsl
+"
+BDEPEND="
+ ${PYTHON_DEPS}
+ >=dev-util/cmake-3.16
+ virtual/pkgconfig
+"
+# dev-libs/jemalloc:=[-lazy-lock] -> https://bugs.gentoo.org/803233
+
+PATCHES=(
+ "${FILESDIR}/tdesktop-4.2.4-jemalloc-only-telegram.patch"
+ "${FILESDIR}/tdesktop-4.4.1-fix-dupe-main-decl.patch"
+ "${FILESDIR}/tdesktop-4.6.2-fix-gcc12-optional.patch"
+)
+
+# Current desktop-file-utils-0.26 does not understand Version=1.5
+QA_DESKTOP_FILE="usr/share/applications/${PN}.desktop"
+
+pkg_pretend() {
+ if has ccache ${FEATURES}; then
+ 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() {
+ # Bundle kde-frameworks/kimageformats for qt6, since it's impossible to
+ # build in gentoo right now.
+ if use qt6-imageformats; then
+ sed -e 's/DESKTOP_APP_USE_PACKAGED_LAZY/TRUE/' -i \
+ cmake/external/kimageformats/CMakeLists.txt || die
+ printf "%s\n" \
+ 'Q_IMPORT_PLUGIN(QAVIFPlugin)' \
+ 'Q_IMPORT_PLUGIN(HEIFPlugin)' \
+ 'Q_IMPORT_PLUGIN(QJpegXLPlugin)' \
+ >> cmake/external/qt/qt_static_plugins/qt_static_plugins.cpp || die
+ fi
+
+ # kde-frameworks/kcoreaddons is bundled when using qt6, see:
+ # cmake/external/kcoreaddons/CMakeLists.txt
+
+ cmake_src_prepare
+}
+
+src_configure() {
+ # The ABI of media-libs/tg_owt breaks if the -DNDEBUG flag doesn't keep
+ # the same state across both projects.
+ # See https://bugs.gentoo.org/866055
+ append-cppflags '-DNDEBUG'
+
+ local mycmakeargs=(
+ -DCMAKE_DISABLE_FIND_PACKAGE_tl-expected=ON # header only lib, some git version. prevents warnings.
+ -DQT_VERSION_MAJOR=$(usex qt6 6 5)
+
+ -DDESKTOP_APP_DISABLE_DBUS_INTEGRATION=$(usex !dbus)
+ -DDESKTOP_APP_DISABLE_X11_INTEGRATION=$(usex !X)
+ -DDESKTOP_APP_DISABLE_WAYLAND_INTEGRATION=$(usex !wayland)
+ -DDESKTOP_APP_DISABLE_JEMALLOC=$(usex !jemalloc)
+ -DDESKTOP_APP_USE_ENCHANT=$(usex enchant) # enables enchant and disables hunspell
+ -DDESKTOP_APP_USE_PACKAGED_FONTS=$(usex !fonts) # use system fonts instead of bundled ones
+ )
+
+ 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
+ if ! use X && ! use screencast; then
+ ewarn "both the 'X' and 'screencast' USE flags are disabled, screen sharing won't work!"
+ ewarn
+ fi
+ if has_version '<dev-qt/qtcore-5.15.2-r10'; then
+ ewarn "Versions of dev-qt/qtcore lower than 5.15.2-r10 might cause telegram"
+ ewarn "to crash when pasting big images from the clipboard."
+ ewarn
+ fi
+ if ! use jemalloc && use elibc_glibc; then
+ # https://github.com/telegramdesktop/tdesktop/issues/16084
+ # https://github.com/desktop-app/cmake_helpers/pull/91#issuecomment-881788003
+ ewarn "Disabling USE=jemalloc on glibc systems may cause very high RAM usage!"
+ ewarn "Do NOT report issues about RAM usage without enabling this flag first."
+ ewarn
+ fi
+ if use qt6; then
+ ewarn "Qt6 support in gentoo is experimental."
+ ewarn "Please report any issues you may find, but don't expect"
+ ewarn "everything to work correctly as of yet."
+ ewarn
+ fi
+ if use wayland && ! use qt6; then
+ ewarn "Wayland-specific integrations have been deprecated with Qt5."
+ ewarn "The app will continue to function under wayland, but some"
+ ewarn "functionality may be reduced."
+ ewarn "These integrations are only supported when built with Qt6."
+ ewarn
+ fi
+ if use qt6 && ! use qt6-imageformats; then
+ elog "Enable USE=qt6-imageformats for AVIF, HEIF and JpegXL support"
+ elog
+ fi
+ optfeature_header
+ optfeature "shop payment support (requires USE=dbus enabled)" net-libs/webkit-gtk:4
+ if ! use qt6; then
+ optfeature "AVIF, HEIF and JpegXL image support" kde-frameworks/kimageformats[avif,heif,jpegxl]
+ fi
+}
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-im/telegram-desktop/files/, net-im/telegram-desktop/
@ 2022-12-13 3:13 John Helmert III
0 siblings, 0 replies; 38+ messages in thread
From: John Helmert III @ 2022-12-13 3:13 UTC (permalink / raw
To: gentoo-commits
commit: 8851c84a31b65fb92cdf9d61689929c84d5d23bb
Author: Esteve Varela Colominas <esteve.varela <AT> gmail <DOT> com>
AuthorDate: Mon Dec 12 15:36:04 2022 +0000
Commit: John Helmert III <ajak <AT> gentoo <DOT> org>
CommitDate: Tue Dec 13 03:00:34 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8851c84a
net-im/telegram-desktop: Fix linking with ld.lld
Closes: https://bugs.gentoo.org/883935
Thanks-to: John Helmert III <ajak <AT> gentoo.org>
Signed-off-by: Esteve Varela Colominas <esteve.varela <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/28646
Signed-off-by: John Helmert III <ajak <AT> gentoo.org>
.../files/tdesktop-4.4.1-fix-dupe-main-decl.patch | 26 ++++++++++++++++++++++
.../telegram-desktop-4.3.4-r2.ebuild | 1 +
.../telegram-desktop/telegram-desktop-4.4.1.ebuild | 1 +
3 files changed, 28 insertions(+)
diff --git a/net-im/telegram-desktop/files/tdesktop-4.4.1-fix-dupe-main-decl.patch b/net-im/telegram-desktop/files/tdesktop-4.4.1-fix-dupe-main-decl.patch
new file mode 100644
index 000000000000..4c4f7b0377bd
--- /dev/null
+++ b/net-im/telegram-desktop/files/tdesktop-4.4.1-fix-dupe-main-decl.patch
@@ -0,0 +1,26 @@
+From 37e03fb4289a3f46a5201caaebbdce8e441d55f5 Mon Sep 17 00:00:00 2001
+From: John Helmert III <ajak@gentoo.org>
+Date: Sun, 11 Dec 2022 14:21:32 -0600
+Subject: [PATCH] fix duplicate main declaration
+
+Bug: https://bugs.gentoo.org/883935
+Signed-off-by: John Helmert III <ajak@gentoo.org>
+---
+ cmake/external/cld3/CMakeLists.txt | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/cmake/external/cld3/CMakeLists.txt b/cmake/external/cld3/CMakeLists.txt
+index f351ca1..54c524b 100644
+--- a/cmake/external/cld3/CMakeLists.txt
++++ b/cmake/external/cld3/CMakeLists.txt
+@@ -80,7 +80,6 @@ PRIVATE
+ script_span/generated_entities.cc
+ script_span/getonescriptspan.cc
+ script_span/getonescriptspan.h
+- script_span/getonescriptspan_test.cc
+ script_span/utf8statetable.cc
+ script_span/offsetmap.cc
+ script_span/text_processing.cc
+--
+2.38.1
+
diff --git a/net-im/telegram-desktop/telegram-desktop-4.3.4-r2.ebuild b/net-im/telegram-desktop/telegram-desktop-4.3.4-r2.ebuild
index 442730b0071d..adeaf57bd1ca 100644
--- a/net-im/telegram-desktop/telegram-desktop-4.3.4-r2.ebuild
+++ b/net-im/telegram-desktop/telegram-desktop-4.3.4-r2.ebuild
@@ -92,6 +92,7 @@ PATCHES=(
"${FILESDIR}/tdesktop-4.3.4-fix-disabling-spellcheck.patch"
"${FILESDIR}/tdesktop-4.3.4-qt5-incompatibility-1.patch"
"${FILESDIR}/tdesktop-4.3.4-qt5-incompatibility-2.patch"
+ "${FILESDIR}/tdesktop-4.4.1-fix-dupe-main-decl.patch"
)
# Current desktop-file-utils-0.26 does not understand Version=1.5
diff --git a/net-im/telegram-desktop/telegram-desktop-4.4.1.ebuild b/net-im/telegram-desktop/telegram-desktop-4.4.1.ebuild
index b77e4471ba3d..ecd0b44efbec 100644
--- a/net-im/telegram-desktop/telegram-desktop-4.4.1.ebuild
+++ b/net-im/telegram-desktop/telegram-desktop-4.4.1.ebuild
@@ -89,6 +89,7 @@ BDEPEND="
PATCHES=(
"${FILESDIR}/tdesktop-4.2.4-jemalloc-only-telegram.patch"
"${FILESDIR}/tdesktop-4.3.4-qt5-incompatibility-2.patch"
+ "${FILESDIR}/tdesktop-4.4.1-fix-dupe-main-decl.patch"
)
# Current desktop-file-utils-0.26 does not understand Version=1.5
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-im/telegram-desktop/files/, net-im/telegram-desktop/
@ 2022-10-03 22:52 Georgy Yakovlev
0 siblings, 0 replies; 38+ messages in thread
From: Georgy Yakovlev @ 2022-10-03 22:52 UTC (permalink / raw
To: gentoo-commits
commit: 1bbc682ab1db76c4fa5b95433fc0032b16e6f54a
Author: Esteve Varela Colominas <esteve.varela <AT> gmail <DOT> com>
AuthorDate: Sat Oct 1 10:37:52 2022 +0000
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Mon Oct 3 22:51:37 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1bbc682a
net-im/telegram-desktop: Drop broken
Linked bug applies to these versions, and won't be fixed for these.
Bug: https://bugs.gentoo.org/866055
Signed-off-by: Esteve Varela Colominas <esteve.varela <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/27553
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
net-im/telegram-desktop/Manifest | 2 -
.../files/tdesktop-4.0.2-fix-gcc12-cstdint.patch | 10 --
.../telegram-desktop/telegram-desktop-4.0.2.ebuild | 183 --------------------
.../telegram-desktop-4.1.1-r1.ebuild | 185 ---------------------
4 files changed, 380 deletions(-)
diff --git a/net-im/telegram-desktop/Manifest b/net-im/telegram-desktop/Manifest
index 1930ecc47b32..adc3d1e0d03a 100644
--- a/net-im/telegram-desktop/Manifest
+++ b/net-im/telegram-desktop/Manifest
@@ -1,4 +1,2 @@
DIST tdesktop-3.6.1-full.tar.gz 41226549 BLAKE2B 6922ae015e36f86597aaedf1212ed951d6313a8f5f76a8838ab7ef9e02afe0cbc428acd991488190bafdf28faf2a69a09a5a1e963b2aa6ed27ef941602e15d88 SHA512 dd216c720ea3b1c72669805bb31319746a7ddfe746d188bf2ae0c5cdf0a10b379fc2e888a26fe755d77381fc5d9aa638cedc76b2dce1f1126a9c1ef9c02da2ba
-DIST tdesktop-4.0.2-full.tar.gz 41059443 BLAKE2B da4efb15c8a2d11719d3aa56c3a40b12f70c37577d2909c43e6029e10ca0bb1f8445ed68ed9acd532009c8e0a8f48fa13d2a51573a81f58a8a83b13427ffb631 SHA512 0078b627d06dd8e655bd2bcc222ecbb3b15b7d88f858810bccdca84793ad02a60f4a4bf3808838752d65d4f6cffa3ddb5f70c5afc8e94cb6edae52101362feeb
-DIST tdesktop-4.1.1-full.tar.gz 41431505 BLAKE2B 7faf8d3a1e6d1ccb621f7a5af89c9b680fe515fbf4994f05d899ec44b8dc863440a368194a0237bef09078d14b5c670749276765da28ac6118787b6584fcbc01 SHA512 3240b9f81c3901997b1ea13fd7db7b8598b31c0faa68a2f711909ed11f33345db5a45ac99c0be77f1caeb1f571093ea42b1dbc7e7bb15e989c8756805c2ec887
DIST tdesktop-4.2.4-full.tar.gz 49210806 BLAKE2B 5900f977156f8ec98098a5e2fe97efcc5c2d7e2768123268e4b232e384c47a02fec11b3d5d875f99134aace9d3d7f937defb83ea1572d41c7df52f4d1bda1e9c SHA512 c0b458e4f21855d1041f7343ffdd501890a7535d040b45a8bd565e545d5bc01a00703af65e14ae407bf53f81a6d28d3f7d6afa664eb5b8e5641b21bb8e669a3a
diff --git a/net-im/telegram-desktop/files/tdesktop-4.0.2-fix-gcc12-cstdint.patch b/net-im/telegram-desktop/files/tdesktop-4.0.2-fix-gcc12-cstdint.patch
deleted file mode 100644
index a3d67e0c9a1b..000000000000
--- a/net-im/telegram-desktop/files/tdesktop-4.0.2-fix-gcc12-cstdint.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/Telegram/ThirdParty/tgcalls/tgcalls/utils/gzip.h
-+++ b/Telegram/ThirdParty/tgcalls/tgcalls/utils/gzip.h
-@@ -2,6 +2,7 @@
- #define TGCALLS_UTILS_GZIP_H
-
- #include <absl/types/optional.h>
-+#include <cstdint>
- #include <vector>
-
- namespace tgcalls {
diff --git a/net-im/telegram-desktop/telegram-desktop-4.0.2.ebuild b/net-im/telegram-desktop/telegram-desktop-4.0.2.ebuild
deleted file mode 100644
index d201d03a995c..000000000000
--- a/net-im/telegram-desktop/telegram-desktop-4.0.2.ebuild
+++ /dev/null
@@ -1,183 +0,0 @@
-# Copyright 2020-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{8..11} )
-
-inherit xdg cmake python-any-r1 optfeature
-
-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"
-S="${WORKDIR}/${MY_P}"
-
-LICENSE="BSD GPL-3-with-openssl-exception LGPL-2+"
-SLOT="0"
-KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv"
-IUSE="+dbus enchant +hunspell +jemalloc screencast +spell qt6 wayland +X"
-REQUIRED_USE="
- spell? (
- ^^ ( enchant hunspell )
- )
-"
-
-RDEPEND="
- !net-im/telegram-desktop-bin
- app-arch/lz4:=
- dev-cpp/abseil-cpp:=
- dev-libs/libdispatch
- dev-libs/openssl:=
- dev-libs/xxhash
- media-fonts/open-sans
- media-libs/fontconfig:=
- ~media-libs/libtgvoip-2.4.4_p20220503
- media-libs/openal
- media-libs/opus:=
- media-libs/rnnoise
- ~media-libs/tg_owt-0_pre20220507[screencast=,X=]
- media-video/ffmpeg:=[opus]
- sys-libs/zlib:=[minizip]
- dbus? ( dev-cpp/glibmm:2 )
- enchant? ( app-text/enchant:= )
- hunspell? ( >=app-text/hunspell-1.7:= )
- jemalloc? ( dev-libs/jemalloc:=[-lazy-lock] )
- !qt6? (
- >=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?]
- )
- qt6? (
- dev-qt/qtbase:6[dbus?,gui,network,opengl,widgets,X?]
- dev-qt/qtsvg:6
- dev-qt/qt5compat:6
- wayland? ( dev-qt/qtwayland:6 )
- )
- 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
-"
-# dev-libs/jemalloc:=[-lazy-lock] -> https://bugs.gentoo.org/803233
-
-PATCHES=(
- "${FILESDIR}/tdesktop-3.6.0-jemalloc-only-telegram.patch"
- "${FILESDIR}/tdesktop-3.3.0-fix-enchant.patch"
- "${FILESDIR}/tdesktop-3.5.2-musl.patch"
- "${FILESDIR}/tdesktop-4.0.2-fix-gcc12-cstdint.patch"
-)
-
-# Current desktop-file-utils-0.26 does not understand Version=1.5
-QA_DESKTOP_FILE="usr/share/applications/${PN}.desktop"
-
-pkg_pretend() {
- if has ccache ${FEATURES}; then
- 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
- if use qt6; then
- ewarn "Qt6 support in gentoo is experimental."
- ewarn "Please report any issues you may find, but don't expect"
- ewarn "everything to work correctly as of yet."
- ewarn "Qt6 ebuilds are available in the ::qt overlay."
- 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() {
- # DESKTOP_APP_DISABLE_JEMALLOC is heavily discouraged by upstream, as the
- # glibc allocator results in high memory usage.
- # https://github.com/telegramdesktop/tdesktop/issues/16084
- # https://github.com/desktop-app/cmake_helpers/pull/91#issuecomment-881788003
-
- # DESKTOP_APP_QT6=OFF force-enables DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION
- # This means that REQUIRED_USE="wayland? ( qt6 )", but a lot of people
- # enable USE=wayland globally, so we instead silently disable it...
-
- local mycmakeargs=(
- -DTDESKTOP_LAUNCHER_BASENAME="${PN}"
- -DCMAKE_DISABLE_FIND_PACKAGE_tl-expected=ON # header only lib, some git version. prevents warnings.
- -DDESKTOP_APP_QT6=$(usex qt6)
-
- -DDESKTOP_APP_DISABLE_DBUS_INTEGRATION=$(usex !dbus)
- -DDESKTOP_APP_DISABLE_X11_INTEGRATION=$(usex !X)
- -DDESKTOP_APP_DISABLE_WAYLAND_INTEGRATION=$(usex !wayland)
- -DDESKTOP_APP_DISABLE_JEMALLOC=$(usex !jemalloc)
- -DDESKTOP_APP_DISABLE_SPELLCHECK=$(usex !spell) # enables hunspell (recommended)
- -DDESKTOP_APP_USE_ENCHANT=$(usex enchant) # 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
- if ! use X && ! use screencast; then
- elog "both the 'X' and 'screencast' useflags are disabled, screen sharing won't work!"
- elog
- fi
- if has_version '<dev-qt/qtcore-5.15.2-r10'; then
- ewarn "Versions of dev-qt/qtcore lower than 5.15.2-r10 might cause telegram"
- ewarn "to crash when pasting big images from the clipboard."
- ewarn
- fi
- if ! use jemalloc && use elibc_glibc; then
- ewarn "Disabling USE=jemalloc on glibc systems may cause very high RAM usage!"
- ewarn "Do NOT report issues about RAM usage without enabling this flag first."
- ewarn
- fi
- if use wayland && ! use qt6; then
- ewarn "Wayland-specific integrations have been deprecated with Qt5."
- ewarn "The app will continue to function under wayland, but some"
- ewarn "functionality may be reduced."
- ewarn "These integrations are only supported when built with Qt6,"
- ewarn "which isn't available in ::gentoo as of writing."
- ewarn
- fi
- optfeature_header
- optfeature "shop payment support (requires USE=dbus enabled)" net-libs/webkit-gtk:4
-}
diff --git a/net-im/telegram-desktop/telegram-desktop-4.1.1-r1.ebuild b/net-im/telegram-desktop/telegram-desktop-4.1.1-r1.ebuild
deleted file mode 100644
index a8c3ce49a669..000000000000
--- a/net-im/telegram-desktop/telegram-desktop-4.1.1-r1.ebuild
+++ /dev/null
@@ -1,185 +0,0 @@
-# Copyright 2020-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{8..11} )
-
-inherit xdg cmake python-any-r1 optfeature
-
-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"
-S="${WORKDIR}/${MY_P}"
-
-LICENSE="BSD GPL-3-with-openssl-exception LGPL-2+"
-SLOT="0"
-KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv"
-IUSE="+dbus enchant +hunspell +jemalloc screencast +spell qt6 wayland +X"
-REQUIRED_USE="
- spell? (
- ^^ ( enchant hunspell )
- )
-"
-
-RDEPEND="
- !net-im/telegram-desktop-bin
- app-arch/lz4:=
- dev-cpp/abseil-cpp:=
- dev-libs/glib:2
- dev-libs/libdispatch
- dev-libs/libsigc++:2
- dev-libs/openssl:=
- dev-libs/xxhash
- media-fonts/open-sans
- media-libs/fontconfig:=
- media-libs/libjpeg-turbo:=
- ~media-libs/libtgvoip-2.4.4_p20220503
- media-libs/openal
- media-libs/opus:=
- media-libs/rnnoise
- ~media-libs/tg_owt-0_pre20220507:=[screencast=,X=]
- media-video/ffmpeg:=[opus]
- sys-libs/zlib:=[minizip]
- x11-libs/xcb-util-keysyms
- dbus? ( dev-cpp/glibmm:2 )
- enchant? ( app-text/enchant:= )
- hunspell? ( >=app-text/hunspell-1.7:= )
- jemalloc? ( dev-libs/jemalloc:=[-lazy-lock] )
- !qt6? (
- >=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?]
- )
- qt6? (
- dev-qt/qtbase:6[dbus?,gui,network,opengl,widgets,X?]
- dev-qt/qtsvg:6
- dev-qt/qt5compat:6
- wayland? ( dev-qt/qtwayland:6 )
- )
- 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
-"
-# dev-libs/jemalloc:=[-lazy-lock] -> https://bugs.gentoo.org/803233
-
-PATCHES=(
- "${FILESDIR}/tdesktop-3.6.0-jemalloc-only-telegram.patch"
- "${FILESDIR}/tdesktop-3.3.0-fix-enchant.patch"
- "${FILESDIR}/tdesktop-3.5.2-musl.patch"
- "${FILESDIR}/tdesktop-4.0.2-fix-gcc12-cstdint.patch"
-)
-
-# Current desktop-file-utils-0.26 does not understand Version=1.5
-QA_DESKTOP_FILE="usr/share/applications/${PN}.desktop"
-
-pkg_pretend() {
- if has ccache ${FEATURES}; then
- 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
- if use qt6; then
- ewarn "Qt6 support in gentoo is experimental."
- ewarn "Please report any issues you may find, but don't expect"
- ewarn "everything to work correctly as of yet."
- 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() {
- # DESKTOP_APP_DISABLE_JEMALLOC is heavily discouraged by upstream, as the
- # glibc allocator results in high memory usage.
- # https://github.com/telegramdesktop/tdesktop/issues/16084
- # https://github.com/desktop-app/cmake_helpers/pull/91#issuecomment-881788003
-
- # DESKTOP_APP_QT6=OFF force-enables DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION
- # This means that REQUIRED_USE="wayland? ( qt6 )", but a lot of people
- # enable USE=wayland globally, so we instead silently disable it...
-
- local mycmakeargs=(
- -DTDESKTOP_LAUNCHER_BASENAME="${PN}"
- -DCMAKE_DISABLE_FIND_PACKAGE_tl-expected=ON # header only lib, some git version. prevents warnings.
- -DQT_VERSION_MAJOR=$(usex qt6 6 5)
-
- -DDESKTOP_APP_DISABLE_DBUS_INTEGRATION=$(usex !dbus)
- -DDESKTOP_APP_DISABLE_X11_INTEGRATION=$(usex !X)
- -DDESKTOP_APP_DISABLE_WAYLAND_INTEGRATION=$(usex !wayland)
- -DDESKTOP_APP_DISABLE_JEMALLOC=$(usex !jemalloc)
- -DDESKTOP_APP_DISABLE_SPELLCHECK=$(usex !spell) # enables hunspell (recommended)
- -DDESKTOP_APP_USE_ENCHANT=$(usex enchant) # 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
- if ! use X && ! use screencast; then
- elog "both the 'X' and 'screencast' useflags are disabled, screen sharing won't work!"
- elog
- fi
- if has_version '<dev-qt/qtcore-5.15.2-r10'; then
- ewarn "Versions of dev-qt/qtcore lower than 5.15.2-r10 might cause telegram"
- ewarn "to crash when pasting big images from the clipboard."
- ewarn
- fi
- if ! use jemalloc && use elibc_glibc; then
- ewarn "Disabling USE=jemalloc on glibc systems may cause very high RAM usage!"
- ewarn "Do NOT report issues about RAM usage without enabling this flag first."
- ewarn
- fi
- if use wayland && ! use qt6; then
- ewarn "Wayland-specific integrations have been deprecated with Qt5."
- ewarn "The app will continue to function under wayland, but some"
- ewarn "functionality may be reduced."
- ewarn "These integrations are only supported when built with Qt6."
- ewarn
- fi
- optfeature_header
- optfeature "shop payment support (requires USE=dbus enabled)" net-libs/webkit-gtk:4
-}
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-im/telegram-desktop/files/, net-im/telegram-desktop/
@ 2022-08-23 5:24 Sam James
0 siblings, 0 replies; 38+ messages in thread
From: Sam James @ 2022-08-23 5:24 UTC (permalink / raw
To: gentoo-commits
commit: 1bc87f3bef4c7e02e495328b81ddd765923c0502
Author: Joe Kappus <joe <AT> wt <DOT> gd>
AuthorDate: Wed Aug 17 09:35:48 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Aug 23 05:23:59 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1bc87f3b
net-im/telegram-desktop: bump to 4.1.1
Dropped tdesktop-4.1.0-fix-unique_ptr-declaration.patch as fix was upstreamed.
Signed-off-by: Joe Kappus <joe <AT> wt.gd>
Closes: https://github.com/gentoo/gentoo/pull/26893
Signed-off-by: Sam James <sam <AT> gentoo.org>
net-im/telegram-desktop/Manifest | 2 +-
...tdesktop-4.1.0-fix-unique_ptr-declaration.patch | 25 ----------------------
...-4.1.0.ebuild => telegram-desktop-4.1.1.ebuild} | 1 -
3 files changed, 1 insertion(+), 27 deletions(-)
diff --git a/net-im/telegram-desktop/Manifest b/net-im/telegram-desktop/Manifest
index fc3d53da412e..9be9d2961fa7 100644
--- a/net-im/telegram-desktop/Manifest
+++ b/net-im/telegram-desktop/Manifest
@@ -1,3 +1,3 @@
DIST tdesktop-3.6.1-full.tar.gz 41226549 BLAKE2B 6922ae015e36f86597aaedf1212ed951d6313a8f5f76a8838ab7ef9e02afe0cbc428acd991488190bafdf28faf2a69a09a5a1e963b2aa6ed27ef941602e15d88 SHA512 dd216c720ea3b1c72669805bb31319746a7ddfe746d188bf2ae0c5cdf0a10b379fc2e888a26fe755d77381fc5d9aa638cedc76b2dce1f1126a9c1ef9c02da2ba
DIST tdesktop-4.0.2-full.tar.gz 41059443 BLAKE2B da4efb15c8a2d11719d3aa56c3a40b12f70c37577d2909c43e6029e10ca0bb1f8445ed68ed9acd532009c8e0a8f48fa13d2a51573a81f58a8a83b13427ffb631 SHA512 0078b627d06dd8e655bd2bcc222ecbb3b15b7d88f858810bccdca84793ad02a60f4a4bf3808838752d65d4f6cffa3ddb5f70c5afc8e94cb6edae52101362feeb
-DIST tdesktop-4.1.0-full.tar.gz 41431524 BLAKE2B 041e3561a1666e60ccee8ca002a413cc773cd5aa7e42f8c1ca5878860eb9ed2d8175c78929b32c25530b511877751982c191dd3be182daf31808c439eedb2705 SHA512 d58ad4b3eaf72b4885612ecca0b29057a1f0e7efc7a539c4ed7cdfa9f6b8dd19e378f1e4b9f28a644d8c8559a5310a168e0b949aafac6902bd21155795db2574
+DIST tdesktop-4.1.1-full.tar.gz 41431505 BLAKE2B 7faf8d3a1e6d1ccb621f7a5af89c9b680fe515fbf4994f05d899ec44b8dc863440a368194a0237bef09078d14b5c670749276765da28ac6118787b6584fcbc01 SHA512 3240b9f81c3901997b1ea13fd7db7b8598b31c0faa68a2f711909ed11f33345db5a45ac99c0be77f1caeb1f571093ea42b1dbc7e7bb15e989c8756805c2ec887
diff --git a/net-im/telegram-desktop/files/tdesktop-4.1.0-fix-unique_ptr-declaration.patch b/net-im/telegram-desktop/files/tdesktop-4.1.0-fix-unique_ptr-declaration.patch
deleted file mode 100644
index 46d7afe1851e..000000000000
--- a/net-im/telegram-desktop/files/tdesktop-4.1.0-fix-unique_ptr-declaration.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-Fix declaration of std::unique_ptr
-
-I'm not sure if this is an inherent tdesktop issue or if it's related to any
-new version of a tool...
-
---- tdesktop-4.1.0-full.orig/Telegram/SourceFiles/ffmpeg/ffmpeg_emoji.h
-+++ tdesktop-4.1.0-full/Telegram/SourceFiles/ffmpeg/ffmpeg_emoji.h
-@@ -9,6 +9,7 @@
-
- #include "ui/effects/frame_generator.h"
-
-+#include <memory>
- #include <QtGui/QImage>
-
- namespace FFmpeg {
---- tdesktop-4.1.0-full.orig/Telegram/lib_lottie/lottie/lottie_emoji.h
-+++ tdesktop-4.1.0-full/Telegram/lib_lottie/lottie/lottie_emoji.h
-@@ -8,6 +8,7 @@
-
- #include "ui/effects/frame_generator.h"
-
-+#include <memory>
- #include <QtGui/QImage>
-
- namespace rlottie {
diff --git a/net-im/telegram-desktop/telegram-desktop-4.1.0.ebuild b/net-im/telegram-desktop/telegram-desktop-4.1.1.ebuild
similarity index 98%
rename from net-im/telegram-desktop/telegram-desktop-4.1.0.ebuild
rename to net-im/telegram-desktop/telegram-desktop-4.1.1.ebuild
index 014988de2f0e..363e89f23081 100644
--- a/net-im/telegram-desktop/telegram-desktop-4.1.0.ebuild
+++ b/net-im/telegram-desktop/telegram-desktop-4.1.1.ebuild
@@ -76,7 +76,6 @@ PATCHES=(
"${FILESDIR}/tdesktop-3.3.0-fix-enchant.patch"
"${FILESDIR}/tdesktop-3.5.2-musl.patch"
"${FILESDIR}/tdesktop-4.0.2-fix-gcc12-cstdint.patch"
- "${FILESDIR}/tdesktop-4.1.0-fix-unique_ptr-declaration.patch"
)
# Current desktop-file-utils-0.26 does not understand Version=1.5
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-im/telegram-desktop/files/, net-im/telegram-desktop/
@ 2022-08-23 5:24 Sam James
0 siblings, 0 replies; 38+ messages in thread
From: Sam James @ 2022-08-23 5:24 UTC (permalink / raw
To: gentoo-commits
commit: 18cc6458425a80fa8cc090f4066add9c3319c8a2
Author: Esteve Varela Colominas <esteve.varela <AT> gmail <DOT> com>
AuthorDate: Sat Aug 13 14:06:42 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Aug 23 05:23:59 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=18cc6458
net-im/telegram-desktop: Bump to 4.1.0
Signed-off-by: Esteve Varela Colominas <esteve.varela <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>
net-im/telegram-desktop/Manifest | 1 +
.../files/tdesktop-3.3.0-fix-enchant.patch | 2 +
.../tdesktop-3.6.0-jemalloc-only-telegram.patch | 2 +
...tdesktop-4.1.0-fix-unique_ptr-declaration.patch | 25 +++
.../telegram-desktop/telegram-desktop-4.1.0.ebuild | 182 +++++++++++++++++++++
5 files changed, 212 insertions(+)
diff --git a/net-im/telegram-desktop/Manifest b/net-im/telegram-desktop/Manifest
index 5cc1ba90b246..fc3d53da412e 100644
--- a/net-im/telegram-desktop/Manifest
+++ b/net-im/telegram-desktop/Manifest
@@ -1,2 +1,3 @@
DIST tdesktop-3.6.1-full.tar.gz 41226549 BLAKE2B 6922ae015e36f86597aaedf1212ed951d6313a8f5f76a8838ab7ef9e02afe0cbc428acd991488190bafdf28faf2a69a09a5a1e963b2aa6ed27ef941602e15d88 SHA512 dd216c720ea3b1c72669805bb31319746a7ddfe746d188bf2ae0c5cdf0a10b379fc2e888a26fe755d77381fc5d9aa638cedc76b2dce1f1126a9c1ef9c02da2ba
DIST tdesktop-4.0.2-full.tar.gz 41059443 BLAKE2B da4efb15c8a2d11719d3aa56c3a40b12f70c37577d2909c43e6029e10ca0bb1f8445ed68ed9acd532009c8e0a8f48fa13d2a51573a81f58a8a83b13427ffb631 SHA512 0078b627d06dd8e655bd2bcc222ecbb3b15b7d88f858810bccdca84793ad02a60f4a4bf3808838752d65d4f6cffa3ddb5f70c5afc8e94cb6edae52101362feeb
+DIST tdesktop-4.1.0-full.tar.gz 41431524 BLAKE2B 041e3561a1666e60ccee8ca002a413cc773cd5aa7e42f8c1ca5878860eb9ed2d8175c78929b32c25530b511877751982c191dd3be182daf31808c439eedb2705 SHA512 d58ad4b3eaf72b4885612ecca0b29057a1f0e7efc7a539c4ed7cdfa9f6b8dd19e378f1e4b9f28a644d8c8559a5310a168e0b949aafac6902bd21155795db2574
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
index 35781fda0ced..7550828ef59e 100644
--- 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
@@ -1,3 +1,5 @@
+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 @@
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
index 6836e6935049..18240ce522e2 100644
--- 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
@@ -5,6 +5,8 @@ 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 @@
diff --git a/net-im/telegram-desktop/files/tdesktop-4.1.0-fix-unique_ptr-declaration.patch b/net-im/telegram-desktop/files/tdesktop-4.1.0-fix-unique_ptr-declaration.patch
new file mode 100644
index 000000000000..46d7afe1851e
--- /dev/null
+++ b/net-im/telegram-desktop/files/tdesktop-4.1.0-fix-unique_ptr-declaration.patch
@@ -0,0 +1,25 @@
+Fix declaration of std::unique_ptr
+
+I'm not sure if this is an inherent tdesktop issue or if it's related to any
+new version of a tool...
+
+--- tdesktop-4.1.0-full.orig/Telegram/SourceFiles/ffmpeg/ffmpeg_emoji.h
++++ tdesktop-4.1.0-full/Telegram/SourceFiles/ffmpeg/ffmpeg_emoji.h
+@@ -9,6 +9,7 @@
+
+ #include "ui/effects/frame_generator.h"
+
++#include <memory>
+ #include <QtGui/QImage>
+
+ namespace FFmpeg {
+--- tdesktop-4.1.0-full.orig/Telegram/lib_lottie/lottie/lottie_emoji.h
++++ tdesktop-4.1.0-full/Telegram/lib_lottie/lottie/lottie_emoji.h
+@@ -8,6 +8,7 @@
+
+ #include "ui/effects/frame_generator.h"
+
++#include <memory>
+ #include <QtGui/QImage>
+
+ namespace rlottie {
diff --git a/net-im/telegram-desktop/telegram-desktop-4.1.0.ebuild b/net-im/telegram-desktop/telegram-desktop-4.1.0.ebuild
new file mode 100644
index 000000000000..014988de2f0e
--- /dev/null
+++ b/net-im/telegram-desktop/telegram-desktop-4.1.0.ebuild
@@ -0,0 +1,182 @@
+# Copyright 2020-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..11} )
+
+inherit xdg cmake python-any-r1 optfeature
+
+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"
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="BSD GPL-3-with-openssl-exception LGPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv"
+IUSE="+dbus enchant +hunspell +jemalloc screencast +spell qt6 wayland +X"
+REQUIRED_USE="
+ spell? (
+ ^^ ( enchant hunspell )
+ )
+"
+
+RDEPEND="
+ !net-im/telegram-desktop-bin
+ app-arch/lz4:=
+ dev-cpp/abseil-cpp:=
+ dev-libs/libdispatch
+ dev-libs/openssl:=
+ dev-libs/xxhash
+ media-fonts/open-sans
+ media-libs/fontconfig:=
+ ~media-libs/libtgvoip-2.4.4_p20220503
+ media-libs/openal
+ media-libs/opus:=
+ media-libs/rnnoise
+ ~media-libs/tg_owt-0_pre20220507[screencast=,X=]
+ media-video/ffmpeg:=[opus]
+ sys-libs/zlib:=[minizip]
+ dbus? ( dev-cpp/glibmm:2 )
+ enchant? ( app-text/enchant:= )
+ hunspell? ( >=app-text/hunspell-1.7:= )
+ jemalloc? ( dev-libs/jemalloc:=[-lazy-lock] )
+ !qt6? (
+ >=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?]
+ )
+ qt6? (
+ dev-qt/qtbase:6[dbus?,gui,network,opengl,widgets,X?]
+ dev-qt/qtsvg:6
+ dev-qt/qt5compat:6
+ wayland? ( dev-qt/qtwayland:6 )
+ )
+ 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
+"
+# dev-libs/jemalloc:=[-lazy-lock] -> https://bugs.gentoo.org/803233
+
+PATCHES=(
+ "${FILESDIR}/tdesktop-3.6.0-jemalloc-only-telegram.patch"
+ "${FILESDIR}/tdesktop-3.3.0-fix-enchant.patch"
+ "${FILESDIR}/tdesktop-3.5.2-musl.patch"
+ "${FILESDIR}/tdesktop-4.0.2-fix-gcc12-cstdint.patch"
+ "${FILESDIR}/tdesktop-4.1.0-fix-unique_ptr-declaration.patch"
+)
+
+# Current desktop-file-utils-0.26 does not understand Version=1.5
+QA_DESKTOP_FILE="usr/share/applications/${PN}.desktop"
+
+pkg_pretend() {
+ if has ccache ${FEATURES}; then
+ 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
+ if use qt6; then
+ ewarn "Qt6 support in gentoo is experimental."
+ ewarn "Please report any issues you may find, but don't expect"
+ ewarn "everything to work correctly as of yet."
+ 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() {
+ # DESKTOP_APP_DISABLE_JEMALLOC is heavily discouraged by upstream, as the
+ # glibc allocator results in high memory usage.
+ # https://github.com/telegramdesktop/tdesktop/issues/16084
+ # https://github.com/desktop-app/cmake_helpers/pull/91#issuecomment-881788003
+
+ # DESKTOP_APP_QT6=OFF force-enables DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION
+ # This means that REQUIRED_USE="wayland? ( qt6 )", but a lot of people
+ # enable USE=wayland globally, so we instead silently disable it...
+
+ local mycmakeargs=(
+ -DTDESKTOP_LAUNCHER_BASENAME="${PN}"
+ -DCMAKE_DISABLE_FIND_PACKAGE_tl-expected=ON # header only lib, some git version. prevents warnings.
+ -DDESKTOP_APP_QT6=$(usex qt6)
+
+ -DDESKTOP_APP_DISABLE_DBUS_INTEGRATION=$(usex !dbus)
+ -DDESKTOP_APP_DISABLE_X11_INTEGRATION=$(usex !X)
+ -DDESKTOP_APP_DISABLE_WAYLAND_INTEGRATION=$(usex !wayland)
+ -DDESKTOP_APP_DISABLE_JEMALLOC=$(usex !jemalloc)
+ -DDESKTOP_APP_DISABLE_SPELLCHECK=$(usex !spell) # enables hunspell (recommended)
+ -DDESKTOP_APP_USE_ENCHANT=$(usex enchant) # 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
+ if ! use X && ! use screencast; then
+ elog "both the 'X' and 'screencast' useflags are disabled, screen sharing won't work!"
+ elog
+ fi
+ if has_version '<dev-qt/qtcore-5.15.2-r10'; then
+ ewarn "Versions of dev-qt/qtcore lower than 5.15.2-r10 might cause telegram"
+ ewarn "to crash when pasting big images from the clipboard."
+ ewarn
+ fi
+ if ! use jemalloc && use elibc_glibc; then
+ ewarn "Disabling USE=jemalloc on glibc systems may cause very high RAM usage!"
+ ewarn "Do NOT report issues about RAM usage without enabling this flag first."
+ ewarn
+ fi
+ if use wayland && ! use qt6; then
+ ewarn "Wayland-specific integrations have been deprecated with Qt5."
+ ewarn "The app will continue to function under wayland, but some"
+ ewarn "functionality may be reduced."
+ ewarn "These integrations are only supported when built with Qt6."
+ ewarn
+ fi
+ optfeature_header
+ optfeature "shop payment support (requires USE=dbus enabled)" net-libs/webkit-gtk
+}
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-im/telegram-desktop/files/, net-im/telegram-desktop/
@ 2022-04-25 1:43 Georgy Yakovlev
0 siblings, 0 replies; 38+ messages in thread
From: Georgy Yakovlev @ 2022-04-25 1:43 UTC (permalink / raw
To: gentoo-commits
commit: 35dad0d1895f480f390231f42b3e64b02b148f89
Author: Esteve Varela Colominas <esteve.varela <AT> gmail <DOT> com>
AuthorDate: Sun Apr 24 17:52:29 2022 +0000
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Mon Apr 25 01:42:29 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=35dad0d1
net-im/telegram-desktop: Fix use after free affecting multi user
Closes: https://bugs.gentoo.org/837914
Thanks-to: Joe Kappus <joe <AT> wt.gd>
Signed-off-by: Esteve Varela Colominas <esteve.varela <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/25184
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
.../files/tdesktop-3.6.1-fix-use-after-free.patch | 44 ++++++++++++++++++++++
...6.1.ebuild => telegram-desktop-3.6.1-r1.ebuild} | 1 +
2 files changed, 45 insertions(+)
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
new file mode 100644
index 000000000000..5a8e6ceedd66
--- /dev/null
+++ b/net-im/telegram-desktop/files/tdesktop-3.6.1-fix-use-after-free.patch
@@ -0,0 +1,44 @@
+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 <guriev-ns@ya.ru>
+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());
diff --git a/net-im/telegram-desktop/telegram-desktop-3.6.1.ebuild b/net-im/telegram-desktop/telegram-desktop-3.6.1-r1.ebuild
similarity index 98%
rename from net-im/telegram-desktop/telegram-desktop-3.6.1.ebuild
rename to net-im/telegram-desktop/telegram-desktop-3.6.1-r1.ebuild
index d2fc536e145f..4a14450d8da3 100644
--- a/net-im/telegram-desktop/telegram-desktop-3.6.1.ebuild
+++ b/net-im/telegram-desktop/telegram-desktop-3.6.1-r1.ebuild
@@ -77,6 +77,7 @@ PATCHES=(
"${FILESDIR}/tdesktop-3.5.2-musl.patch"
"${FILESDIR}/tdesktop-3.6.0-support-ffmpeg5.patch"
"${FILESDIR}/tdesktop-3.6.1-fix-kwayland-5.93.patch"
+ "${FILESDIR}/tdesktop-3.6.1-fix-use-after-free.patch"
)
# Current desktop-file-utils-0.26 does not understand Version=1.5
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-im/telegram-desktop/files/, net-im/telegram-desktop/
@ 2022-04-15 6:04 Sam James
0 siblings, 0 replies; 38+ messages in thread
From: Sam James @ 2022-04-15 6:04 UTC (permalink / raw
To: gentoo-commits
commit: c1c0db7a9551d6ab61c6589eaf756f91ec8f3c14
Author: Esteve Varela Colominas <esteve.varela <AT> gmail <DOT> com>
AuthorDate: Mon Apr 11 22:20:53 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Apr 15 06:04:17 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c1c0db7a
net-im/telegram-desktop: Drop old
Signed-off-by: Esteve Varela Colominas <esteve.varela <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>
net-im/telegram-desktop/Manifest | 1 -
.../tdesktop-3.4.8-jemalloc-only-telegram.patch | 31 -----
.../telegram-desktop/telegram-desktop-3.4.8.ebuild | 152 ---------------------
3 files changed, 184 deletions(-)
diff --git a/net-im/telegram-desktop/Manifest b/net-im/telegram-desktop/Manifest
index ef2b9c7bb618..5e1ddfb6238b 100644
--- a/net-im/telegram-desktop/Manifest
+++ b/net-im/telegram-desktop/Manifest
@@ -1,3 +1,2 @@
-DIST tdesktop-3.4.8-full.tar.gz 41220984 BLAKE2B e75e7d7432a863e7a35b73bb2a378970f8aab74d99a425e631947fd894e51d931ee2390e2f885831d165d73541cf2151840467e2ef02ece175cc6a18f3e2c81c SHA512 cdeb5a83a375a494d805bf4198beee1c4bfc94bd9626535721a0cf04a590c70bfdb20e76baaa2a4c8c6db54c5813f22ce2a8c6291786b6b6db3dcde10b266fe1
DIST tdesktop-3.5.2-full.tar.gz 41216346 BLAKE2B 5f2570073e02c5aadbf5f9b6251f9b71e9a608d97763bd3a792d3c4836b68245410142face3446660b68e519bd7e71df0319cb1ff1ea1fed24327ac8db0e8d0b SHA512 adb95fb37fedba6344107e4dd789b88563e24e6a01c7b944d9e5365ceccff60d774eb31a2c1e39cd200ef6de83317fe654956cfecaa1e13c7b2fdbf4c38f057e
DIST tdesktop-3.6.1-full.tar.gz 41226549 BLAKE2B 6922ae015e36f86597aaedf1212ed951d6313a8f5f76a8838ab7ef9e02afe0cbc428acd991488190bafdf28faf2a69a09a5a1e963b2aa6ed27ef941602e15d88 SHA512 dd216c720ea3b1c72669805bb31319746a7ddfe746d188bf2ae0c5cdf0a10b379fc2e888a26fe755d77381fc5d9aa638cedc76b2dce1f1126a9c1ef9c02da2ba
diff --git a/net-im/telegram-desktop/files/tdesktop-3.4.8-jemalloc-only-telegram.patch b/net-im/telegram-desktop/files/tdesktop-3.4.8-jemalloc-only-telegram.patch
deleted file mode 100644
index e99cd2e4bf91..000000000000
--- a/net-im/telegram-desktop/files/tdesktop-3.4.8-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-3.4.8-full.orig/Telegram/CMakeLists.txt
-+++ tdesktop-3.4.8-full/Telegram/CMakeLists.txt
-@@ -1331,6 +1331,11 @@
- endif()
- endif()
- else()
-+ target_link_libraries(Telegram
-+ PRIVATE
-+ desktop-app::external_jemalloc
-+ )
-+
- if (NOT DESKTOP_APP_DISABLE_DBUS_INTEGRATION)
- target_link_libraries(Telegram
- PRIVATE
---- tdesktop-3.4.8-full.orig/cmake/options_linux.cmake
-+++ tdesktop-3.4.8-full/cmake/options_linux.cmake
-@@ -65,7 +65,6 @@
-
- target_link_libraries(common_options
- INTERFACE
-- desktop-app::external_jemalloc
- ${CMAKE_DL_LIBS}
- )
-
diff --git a/net-im/telegram-desktop/telegram-desktop-3.4.8.ebuild b/net-im/telegram-desktop/telegram-desktop-3.4.8.ebuild
deleted file mode 100644
index ce7da5f009ff..000000000000
--- a/net-im/telegram-desktop/telegram-desktop-3.4.8.ebuild
+++ /dev/null
@@ -1,152 +0,0 @@
-# Copyright 2020-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{7..10} )
-
-inherit xdg cmake python-any-r1 optfeature 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"
-S="${WORKDIR}/${MY_P}"
-
-LICENSE="BSD GPL-3-with-openssl-exception LGPL-2+"
-SLOT="0"
-KEYWORDS="amd64 ~arm64 ~ppc64 ~riscv"
-IUSE="+dbus enchant +hunspell screencast +spell wayland +X"
-REQUIRED_USE="
- spell? (
- ^^ ( enchant hunspell )
- )
-"
-
-RDEPEND="
- !net-im/telegram-desktop-bin
- app-arch/lz4:=
- dev-cpp/abseil-cpp:=
- dev-libs/jemalloc:=[-lazy-lock]
- dev-libs/libdispatch
- dev-libs/openssl:=
- 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_p20211129
- media-libs/openal
- media-libs/opus:=
- media-libs/rnnoise
- ~media-libs/tg_owt-0_pre20211207[screencast=,X=]
- media-video/ffmpeg:=[opus]
- sys-libs/zlib:=[minizip]
- dbus? (
- dev-cpp/glibmm:2
- dev-qt/qtdbus:5
- dev-libs/libdbusmenu-qt[qt5(+)]
- )
- enchant? ( app-text/enchant:= )
- hunspell? ( >=app-text/hunspell-1.7:= )
- wayland? ( kde-frameworks/kwayland:= )
- 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
-"
-# dev-libs/jemalloc:=[-lazy-lock] -> https://bugs.gentoo.org/803233
-
-PATCHES=(
- "${FILESDIR}/tdesktop-3.4.8-jemalloc-only-telegram.patch"
- "${FILESDIR}/tdesktop-3.3.0-fix-enchant.patch"
-)
-
-# Current desktop-file-utils-0.26 does not understand Version=1.5
-QA_DESKTOP_FILE="usr/share/applications/${PN}.desktop"
-
-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_QT6=OFF
-
- -DDESKTOP_APP_DISABLE_X11_INTEGRATION=$(usex X no yes)
- -DDESKTOP_APP_DISABLE_WAYLAND_INTEGRATION=$(usex wayland no yes)
- -DDESKTOP_APP_DISABLE_DBUS_INTEGRATION=$(usex dbus no yes)
- -DDESKTOP_APP_DISABLE_SPELLCHECK=$(usex spell no yes) # enables hunspell (recommended)
- -DDESKTOP_APP_USE_ENCHANT=$(usex enchant) # 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
-
- # Fix for RISCV, as well as any other platforms that might generate libatomic calls
- # Upstreamed in >3.4.3
- append-ldflags '-pthread'
-
- cmake_src_configure
-}
-
-pkg_postinst() {
- xdg_pkg_postinst
- if ! use X && ! use screencast; then
- elog "both the 'X' and 'screencast' useflags are disabled, screen sharing won't work!"
- fi
- if has_version '<dev-qt/qtcore-5.15.2-r10'; then
- ewarn "Versions of dev-qt/qtcore lower than 5.15.2-r10 might cause telegram"
- ewarn "to crash when pasting big images from the clipboard."
- fi
- optfeature_header
- optfeature "shop payment support (requires USE=dbus enabled)" net-libs/webkit-gtk
-}
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-im/telegram-desktop/files/, net-im/telegram-desktop/
@ 2022-04-15 6:04 Sam James
0 siblings, 0 replies; 38+ messages in thread
From: Sam James @ 2022-04-15 6:04 UTC (permalink / raw
To: gentoo-commits
commit: eabc16b768077a41ec4b4cd74d8088e52b024ccd
Author: Esteve Varela Colominas <esteve.varela <AT> gmail <DOT> com>
AuthorDate: Mon Apr 11 22:28:30 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Apr 15 06:04:19 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eabc16b7
net-im/telegram-desktop: Fix building with KWayland 5.93
Closes: https://bugs.gentoo.org/837569
Thanks-to: Nick Sarnie <sarnex <AT> gentoo.org>
Signed-off-by: Esteve Varela Colominas <esteve.varela <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/24998
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../files/tdesktop-3.6.1-fix-kwayland-5.93.patch | 55 ++++++++++++++++++++++
.../telegram-desktop-3.5.2-r1.ebuild | 1 +
.../telegram-desktop/telegram-desktop-3.6.1.ebuild | 1 +
3 files changed, 57 insertions(+)
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
new file mode 100644
index 000000000000..e818ffe46456
--- /dev/null
+++ b/net-im/telegram-desktop/files/tdesktop-3.6.1-fix-kwayland-5.93.patch
@@ -0,0 +1,55 @@
+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/telegram-desktop-3.5.2-r1.ebuild b/net-im/telegram-desktop/telegram-desktop-3.5.2-r1.ebuild
index fd97841de5b2..e5bd2fb2c389 100644
--- a/net-im/telegram-desktop/telegram-desktop-3.5.2-r1.ebuild
+++ b/net-im/telegram-desktop/telegram-desktop-3.5.2-r1.ebuild
@@ -73,6 +73,7 @@ PATCHES=(
"${FILESDIR}/tdesktop-3.3.0-fix-enchant.patch"
"${FILESDIR}/tdesktop-3.5.2-musl.patch"
"${FILESDIR}/tdesktop-3.5.2-jemalloc-optional.patch"
+ "${FILESDIR}/tdesktop-3.6.1-fix-kwayland-5.93.patch"
)
# Current desktop-file-utils-0.26 does not understand Version=1.5
diff --git a/net-im/telegram-desktop/telegram-desktop-3.6.1.ebuild b/net-im/telegram-desktop/telegram-desktop-3.6.1.ebuild
index 5d77d8964fd7..d2fc536e145f 100644
--- a/net-im/telegram-desktop/telegram-desktop-3.6.1.ebuild
+++ b/net-im/telegram-desktop/telegram-desktop-3.6.1.ebuild
@@ -76,6 +76,7 @@ PATCHES=(
"${FILESDIR}/tdesktop-3.3.0-fix-enchant.patch"
"${FILESDIR}/tdesktop-3.5.2-musl.patch"
"${FILESDIR}/tdesktop-3.6.0-support-ffmpeg5.patch"
+ "${FILESDIR}/tdesktop-3.6.1-fix-kwayland-5.93.patch"
)
# Current desktop-file-utils-0.26 does not understand Version=1.5
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-im/telegram-desktop/files/, net-im/telegram-desktop/
@ 2022-01-28 20:02 Georgy Yakovlev
0 siblings, 0 replies; 38+ messages in thread
From: Georgy Yakovlev @ 2022-01-28 20:02 UTC (permalink / raw
To: gentoo-commits
commit: 2433fe2053690dc801c3a088d69aa7bbfeed79e7
Author: mazunki <rolferen <AT> gmail <DOT> com>
AuthorDate: Wed Jan 26 13:36:43 2022 +0000
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Fri Jan 28 20:00:44 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2433fe20
net-im/telegram-desktop: Bump to 3.4.8
Closes: https://github.com/gentoo/gentoo/pull/23912
Closes: https://github.com/gentoo/gentoo/pull/23981
Co-authored-by: Esteve Varela Colominas <esteve.varela <AT> gmail.com>
Signed-off-by: mazunki <rolferen <AT> gmail.com>
Signed-off-by: Esteve Varela Colominas <esteve.varela <AT> gmail.com>
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
net-im/telegram-desktop/Manifest | 1 +
.../tdesktop-3.4.8-jemalloc-only-telegram.patch | 31 +++++
.../telegram-desktop/telegram-desktop-3.4.8.ebuild | 152 +++++++++++++++++++++
3 files changed, 184 insertions(+)
diff --git a/net-im/telegram-desktop/Manifest b/net-im/telegram-desktop/Manifest
index e5931abb9049..87c135a38f5b 100644
--- a/net-im/telegram-desktop/Manifest
+++ b/net-im/telegram-desktop/Manifest
@@ -1,3 +1,4 @@
DIST tdesktop-3.1.8-full.tar.gz 38494235 BLAKE2B 50da0fdfe48f6492dc255c0fdfdb584750fd137ab0f847d226f9f62012ed1c34cc1a597f97735ca6aae1ba7e262562be2c88b92fe22c2868ed2cda437341a1f9 SHA512 787c92d6aaad2998d7195f2e1c98eddc6e87c3cb04a0d9ab80ea9a4a2dd1a798004109f8cc1ad82136c511ae191cea5b15cc23cc541ce86ccdb79dbc65367f09
DIST tdesktop-3.3.0-full.tar.gz 38662573 BLAKE2B f6cba2be02faccde77c510742dc57680a2731cd3b2bc4a2d680f6cda7fd1a634e2fa0406855a491241434daa080e782f561e5e472dcc42a8b8376c16e038b6af SHA512 ff0ac1abe264f19812c2e0b40d4861caddd6c01a3f863ccb68de9c5227282872b2bde878dcf751d7d04d36c6e0e77912619ac7863d54f25f739f3744e9bca53a
DIST tdesktop-3.4.3-full.tar.gz 40647558 BLAKE2B 220a7b29dbc7a48d53e53fe9609dba804e5fe536feebc1225fd5400a8eec703e64f65decb8b503ed77e843c011c8b5fd12916534d4a1ecbc84724f277dcc301a SHA512 6b27eb14570b55fb14c77f1d557591985a4791712897c2e144196c54c2a98b10c7ece9dac7d039a6bb56f39e3062e4fbfbb60f6822e52b76f927bbf419d88a6b
+DIST tdesktop-3.4.8-full.tar.gz 41220984 BLAKE2B e75e7d7432a863e7a35b73bb2a378970f8aab74d99a425e631947fd894e51d931ee2390e2f885831d165d73541cf2151840467e2ef02ece175cc6a18f3e2c81c SHA512 cdeb5a83a375a494d805bf4198beee1c4bfc94bd9626535721a0cf04a590c70bfdb20e76baaa2a4c8c6db54c5813f22ce2a8c6291786b6b6db3dcde10b266fe1
diff --git a/net-im/telegram-desktop/files/tdesktop-3.4.8-jemalloc-only-telegram.patch b/net-im/telegram-desktop/files/tdesktop-3.4.8-jemalloc-only-telegram.patch
new file mode 100644
index 000000000000..e99cd2e4bf91
--- /dev/null
+++ b/net-im/telegram-desktop/files/tdesktop-3.4.8-jemalloc-only-telegram.patch
@@ -0,0 +1,31 @@
+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-3.4.8-full.orig/Telegram/CMakeLists.txt
++++ tdesktop-3.4.8-full/Telegram/CMakeLists.txt
+@@ -1331,6 +1331,11 @@
+ endif()
+ endif()
+ else()
++ target_link_libraries(Telegram
++ PRIVATE
++ desktop-app::external_jemalloc
++ )
++
+ if (NOT DESKTOP_APP_DISABLE_DBUS_INTEGRATION)
+ target_link_libraries(Telegram
+ PRIVATE
+--- tdesktop-3.4.8-full.orig/cmake/options_linux.cmake
++++ tdesktop-3.4.8-full/cmake/options_linux.cmake
+@@ -65,7 +65,6 @@
+
+ target_link_libraries(common_options
+ INTERFACE
+- desktop-app::external_jemalloc
+ ${CMAKE_DL_LIBS}
+ )
+
diff --git a/net-im/telegram-desktop/telegram-desktop-3.4.8.ebuild b/net-im/telegram-desktop/telegram-desktop-3.4.8.ebuild
new file mode 100644
index 000000000000..5282d22ec82f
--- /dev/null
+++ b/net-im/telegram-desktop/telegram-desktop-3.4.8.ebuild
@@ -0,0 +1,152 @@
+# Copyright 2020-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{7..10} )
+
+inherit xdg cmake python-any-r1 optfeature 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"
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="BSD GPL-3-with-openssl-exception LGPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc64 ~riscv"
+IUSE="+dbus enchant +hunspell screencast +spell wayland +X"
+REQUIRED_USE="
+ spell? (
+ ^^ ( enchant hunspell )
+ )
+"
+
+RDEPEND="
+ !net-im/telegram-desktop-bin
+ app-arch/lz4:=
+ dev-cpp/abseil-cpp:=
+ dev-libs/jemalloc:=[-lazy-lock]
+ dev-libs/libdispatch
+ dev-libs/openssl:=
+ 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_p20211129
+ media-libs/openal
+ media-libs/opus:=
+ media-libs/rnnoise
+ ~media-libs/tg_owt-0_pre20211207[screencast=,X=]
+ media-video/ffmpeg:=[opus]
+ sys-libs/zlib:=[minizip]
+ dbus? (
+ dev-cpp/glibmm:2
+ dev-qt/qtdbus:5
+ dev-libs/libdbusmenu-qt[qt5(+)]
+ )
+ enchant? ( app-text/enchant:= )
+ hunspell? ( >=app-text/hunspell-1.7:= )
+ wayland? ( kde-frameworks/kwayland:= )
+ 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
+"
+# dev-libs/jemalloc:=[-lazy-lock] -> https://bugs.gentoo.org/803233
+
+PATCHES=(
+ "${FILESDIR}/tdesktop-3.4.8-jemalloc-only-telegram.patch"
+ "${FILESDIR}/tdesktop-3.3.0-fix-enchant.patch"
+)
+
+# Current desktop-file-utils-0.26 does not understand Version=1.5
+QA_DESKTOP_FILE="usr/share/applications/${PN}.desktop"
+
+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_QT6=OFF
+
+ -DDESKTOP_APP_DISABLE_X11_INTEGRATION=$(usex X no yes)
+ -DDESKTOP_APP_DISABLE_WAYLAND_INTEGRATION=$(usex wayland no yes)
+ -DDESKTOP_APP_DISABLE_DBUS_INTEGRATION=$(usex dbus no yes)
+ -DDESKTOP_APP_DISABLE_SPELLCHECK=$(usex spell no yes) # enables hunspell (recommended)
+ -DDESKTOP_APP_USE_ENCHANT=$(usex enchant) # 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
+
+ # Fix for RISCV, as well as any other platforms that might generate libatomic calls
+ # Upstreamed in >3.4.3
+ append-ldflags '-pthread'
+
+ cmake_src_configure
+}
+
+pkg_postinst() {
+ xdg_pkg_postinst
+ if ! use X && ! use screencast; then
+ elog "both the 'X' and 'screencast' useflags are disabled, screen sharing won't work!"
+ fi
+ if has_version '<dev-qt/qtcore-5.15.2-r10'; then
+ ewarn "Versions of dev-qt/qtcore lower than 5.15.2-r10 might cause telegram"
+ ewarn "to crash when pasting big images from the clipboard."
+ fi
+ optfeature_header
+ optfeature "shop payment support (requires USE=dbus enabled)" net-libs/webkit-gtk
+}
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-im/telegram-desktop/files/, net-im/telegram-desktop/
@ 2021-12-10 21:31 Georgy Yakovlev
0 siblings, 0 replies; 38+ messages in thread
From: Georgy Yakovlev @ 2021-12-10 21:31 UTC (permalink / raw
To: gentoo-commits
commit: 6c081f8d808d0d1430698701ab9d7572fd6370f8
Author: Esteve Varela Colominas <esteve.varela <AT> gmail <DOT> com>
AuthorDate: Fri Dec 10 15:20:11 2021 +0000
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Fri Dec 10 21:29:38 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6c081f8d
net-im/telegram-desktop: Drop old
Signed-off-by: Esteve Varela Colominas <esteve.varela <AT> gmail.com>
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
net-im/telegram-desktop/Manifest | 1 -
.../tdesktop-2.9.3-jemalloc-only-telegram.patch | 31 -----
.../telegram-desktop-3.0.1-r1.ebuild | 146 ---------------------
3 files changed, 178 deletions(-)
diff --git a/net-im/telegram-desktop/Manifest b/net-im/telegram-desktop/Manifest
index 0eed5eaaf5f9..fa490fca4ac2 100644
--- a/net-im/telegram-desktop/Manifest
+++ b/net-im/telegram-desktop/Manifest
@@ -1,3 +1,2 @@
-DIST tdesktop-3.0.1-full.tar.gz 37531917 BLAKE2B c139501f23c742f76d4acd43def69963413ffafef1be584f13d7359b3c20625def7ec283a981556c795aa4dc5ad2e117e1f8aada28cd4815f66f02510e607435 SHA512 6bff6be5f2c0c7a17df61dccc5a3216dcbb95a1c6d3176442c530e2c1b525e6d15079b230d40751f20684da2a1067d4518a9a1ab90d49d1a7338d3e05239d447
DIST tdesktop-3.1.8-full.tar.gz 38494235 BLAKE2B 50da0fdfe48f6492dc255c0fdfdb584750fd137ab0f847d226f9f62012ed1c34cc1a597f97735ca6aae1ba7e262562be2c88b92fe22c2868ed2cda437341a1f9 SHA512 787c92d6aaad2998d7195f2e1c98eddc6e87c3cb04a0d9ab80ea9a4a2dd1a798004109f8cc1ad82136c511ae191cea5b15cc23cc541ce86ccdb79dbc65367f09
DIST tdesktop-3.2.4-full.tar.gz 38537053 BLAKE2B d31f354d5efe51b6268eb42a39e1c54af7c3b570534b6f206a7e6bd5cf96555f1c6633b79eda919ffcd25ca38a48d6e297db5a1b071434bbdaddf724068fcb13 SHA512 a4651e0af49195f4f3ff15d74a616a5ccd056f15d0448687138947ab0f816b45c05dec81029b59c5e7b5eefed3059618245ad1b3b3f27f894c6accad697ecd94
diff --git a/net-im/telegram-desktop/files/tdesktop-2.9.3-jemalloc-only-telegram.patch b/net-im/telegram-desktop/files/tdesktop-2.9.3-jemalloc-only-telegram.patch
deleted file mode 100644
index f90270fccee3..000000000000
--- a/net-im/telegram-desktop/files/tdesktop-2.9.3-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.9.3-full.orig/Telegram/CMakeLists.txt
-+++ tdesktop-2.9.3-full/Telegram/CMakeLists.txt
-@@ -1264,6 +1264,7 @@
- PRIVATE
- desktop-app::external_glibmm
- desktop-app::external_glib
-+ desktop-app::external_jemalloc
- )
-
- if (NOT DESKTOP_APP_DISABLE_DBUS_INTEGRATION)
---- tdesktop-2.9.3-full.orig/cmake/options_linux.cmake
-+++ tdesktop-2.9.3-full/cmake/options_linux.cmake
-@@ -45,11 +45,6 @@
- endif()
- endif()
-
--target_link_libraries(common_options
--INTERFACE
-- desktop-app::external_jemalloc
--)
--
- if (DESKTOP_APP_USE_ALLOCATION_TRACER)
- target_link_options(common_options
- INTERFACE
diff --git a/net-im/telegram-desktop/telegram-desktop-3.0.1-r1.ebuild b/net-im/telegram-desktop/telegram-desktop-3.0.1-r1.ebuild
deleted file mode 100644
index 090b6a2773bc..000000000000
--- a/net-im/telegram-desktop/telegram-desktop-3.0.1-r1.ebuild
+++ /dev/null
@@ -1,146 +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 )
- )
- gtk? ( dbus )
- webkit? ( dbus )
-"
-
-RDEPEND="
- !net-im/telegram-desktop-bin
- app-arch/lz4:=
- dev-cpp/abseil-cpp:=
- dev-cpp/glibmm:2
- dev-libs/jemalloc:=[-lazy-lock]
- dev-libs/openssl:=
- 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
-"
-# dev-libs/jemalloc:=[-lazy-lock] -> https://bugs.gentoo.org/803233
-
-S="${WORKDIR}/${MY_P}"
-
-PATCHES=(
- "${FILESDIR}/tdesktop-2.9.3-jemalloc-only-telegram.patch"
- "${FILESDIR}/tdesktop-3.1.0-fix-openssl3.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 no yes)
- -DDESKTOP_APP_DISABLE_WAYLAND_INTEGRATION=$(usex wayland no yes)
- -DDESKTOP_APP_DISABLE_DBUS_INTEGRATION=$(usex dbus no yes)
- -DDESKTOP_APP_DISABLE_GTK_INTEGRATION=$(usex gtk no yes)
- -DDESKTOP_APP_DISABLE_WEBKITGTK=$(usex webkit no yes)
- -DDESKTOP_APP_DISABLE_SPELLCHECK=$(usex spell no yes) # enables hunspell (recommended)
- -DDESKTOP_APP_USE_ENCHANT=$(usex enchant) # 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
-}
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-im/telegram-desktop/files/, net-im/telegram-desktop/
@ 2021-09-16 12:07 Georgy Yakovlev
0 siblings, 0 replies; 38+ messages in thread
From: Georgy Yakovlev @ 2021-09-16 12:07 UTC (permalink / raw
To: gentoo-commits
commit: 18b6ffbbb0621fb207b34618a41d53e9607b057f
Author: Esteve Varela Colominas <esteve.varela <AT> gmail <DOT> com>
AuthorDate: Tue Sep 14 20:54:10 2021 +0000
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Thu Sep 16 12:07:02 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=18b6ffbb
net-im/telegram-desktop: Drop old
Signed-off-by: Esteve Varela Colominas <esteve.varela <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/22300
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
net-im/telegram-desktop/Manifest | 1 -
.../tdesktop-2.8.10-jemalloc-only-telegram.patch | 31 -----
...desktop-2.8.11-fix-build-without-pipewire.patch | 26 ----
.../tdesktop-2.8.11-load-gtk-with-qlibrary.patch | 112 ---------------
.../tdesktop-2.8.9-disable-webkit-separately.patch | 122 -----------------
.../files/tdesktop-2.8.9-webview-fix-glib.patch | 31 -----
.../telegram-desktop-2.8.11-r2.ebuild | 150 ---------------------
7 files changed, 473 deletions(-)
diff --git a/net-im/telegram-desktop/Manifest b/net-im/telegram-desktop/Manifest
index 1a75fbd0593..f2bd8bdf9dc 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 8604acc6a74..00000000000
--- 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 ecfc63abeb5..00000000000
--- 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 91e3f859eeb..00000000000
--- 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 388e09fa58d..00000000000
--- 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 02c96d28b2c..00000000000
--- 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 940c5b1aed2..00000000000
--- 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
-}
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-im/telegram-desktop/files/, net-im/telegram-desktop/
@ 2021-08-12 17:56 Georgy Yakovlev
0 siblings, 0 replies; 38+ messages in thread
From: Georgy Yakovlev @ 2021-08-12 17:56 UTC (permalink / raw
To: gentoo-commits
commit: 3bd39ad0be7cafc8fd2ea2f49762c2bd34e8df38
Author: Esteve Varela Colominas <esteve.varela <AT> gmail <DOT> com>
AuthorDate: Thu Aug 12 09:09:33 2021 +0000
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Thu Aug 12 17:39:12 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3bd39ad0
net-im/telegram-desktop: Bump to 2.9.3
Signed-off-by: Esteve Varela Colominas <esteve.varela <AT> gmail.com>
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
net-im/telegram-desktop/Manifest | 2 +-
...top-2.9.0-fix-disable-wayland-integration.patch | 11 --------
.../tdesktop-2.9.3-jemalloc-only-telegram.patch | 31 ++++++++++++++++++++++
...9.0-r1.ebuild => telegram-desktop-2.9.3.ebuild} | 8 +++---
4 files changed, 36 insertions(+), 16 deletions(-)
diff --git a/net-im/telegram-desktop/Manifest b/net-im/telegram-desktop/Manifest
index 060040b4c96..19aaf880f2c 100644
--- a/net-im/telegram-desktop/Manifest
+++ b/net-im/telegram-desktop/Manifest
@@ -1,2 +1,2 @@
DIST tdesktop-2.8.11-full.tar.gz 37105468 BLAKE2B 1ec5a0003bd1b948b45213509fa0649dfde5ec8e3dff097bf45aa0951c7963930788b0bee853f286d04b008b78704c464b6614b8391350767affebc2623b25af SHA512 a553313b04fbb562745be2381a84117657172952e46e280980a73c9fcfe2a7cf29c0e012e4b1259816d1e6652418e7a1ddfc4e394544fcc3aeb33704cbe80860
-DIST tdesktop-2.9.0-full.tar.gz 37327425 BLAKE2B f47abfd41e71dbf950e6357417fd2725b145286861f6dfc8edc4101b6b232c43ea7a9987d028e57979588bf44919fef2e89b00adae7a9843e52f8f2566013dd8 SHA512 e9be60cdaeffa4efa95ea1e5d8fe50308bff5612b546fa92c02f824f479b42e098fb8fbe713e652578ee2308e3faadaf82e4c101dee0e58b6f3c70d8dcb0bd8e
+DIST tdesktop-2.9.3-full.tar.gz 37335782 BLAKE2B 197583ba6568c455218c51f590c1ba1a3f10c390caa4fd03657098f499ce113a4f5f57ca9dd53bc4baba31992d4229768ed35e68ad6b0685010bc335817edcac SHA512 810cfac5d7e6ce9413b1b2406927e89c1383ea5b725233a68b2cb29dd374b4c3386c22186640afde4492c844516c88889a5db8e5b167a09d6d6c1270ac965ac4
diff --git a/net-im/telegram-desktop/files/tdesktop-2.9.0-fix-disable-wayland-integration.patch b/net-im/telegram-desktop/files/tdesktop-2.9.0-fix-disable-wayland-integration.patch
deleted file mode 100644
index c76bcc06dfd..00000000000
--- a/net-im/telegram-desktop/files/tdesktop-2.9.0-fix-disable-wayland-integration.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- tdesktop-2.9.0-full.orig/Telegram/lib_ui/ui/platform/linux/ui_linux_wayland_integration_dummy.cpp
-+++ tdesktop-2.9.0-full/Telegram/lib_ui/ui/platform/linux/ui_linux_wayland_integration_dummy.cpp
-@@ -18,6 +18,8 @@
- WaylandIntegration::WaylandIntegration() {
- }
-
-+WaylandIntegration::~WaylandIntegration() = default;
-+
- WaylandIntegration *WaylandIntegration::Instance() {
- if (!::Platform::IsWayland()) return nullptr;
- static WaylandIntegration instance;
diff --git a/net-im/telegram-desktop/files/tdesktop-2.9.3-jemalloc-only-telegram.patch b/net-im/telegram-desktop/files/tdesktop-2.9.3-jemalloc-only-telegram.patch
new file mode 100644
index 00000000000..f90270fccee
--- /dev/null
+++ b/net-im/telegram-desktop/files/tdesktop-2.9.3-jemalloc-only-telegram.patch
@@ -0,0 +1,31 @@
+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.9.3-full.orig/Telegram/CMakeLists.txt
++++ tdesktop-2.9.3-full/Telegram/CMakeLists.txt
+@@ -1264,6 +1264,7 @@
+ PRIVATE
+ desktop-app::external_glibmm
+ desktop-app::external_glib
++ desktop-app::external_jemalloc
+ )
+
+ if (NOT DESKTOP_APP_DISABLE_DBUS_INTEGRATION)
+--- tdesktop-2.9.3-full.orig/cmake/options_linux.cmake
++++ tdesktop-2.9.3-full/cmake/options_linux.cmake
+@@ -45,11 +45,6 @@
+ endif()
+ endif()
+
+-target_link_libraries(common_options
+-INTERFACE
+- desktop-app::external_jemalloc
+-)
+-
+ if (DESKTOP_APP_USE_ALLOCATION_TRACER)
+ target_link_options(common_options
+ INTERFACE
diff --git a/net-im/telegram-desktop/telegram-desktop-2.9.0-r1.ebuild b/net-im/telegram-desktop/telegram-desktop-2.9.3.ebuild
similarity index 94%
rename from net-im/telegram-desktop/telegram-desktop-2.9.0-r1.ebuild
rename to net-im/telegram-desktop/telegram-desktop-2.9.3.ebuild
index 7ed38b44c9d..38257e0072a 100644
--- a/net-im/telegram-desktop/telegram-desktop-2.9.0-r1.ebuild
+++ b/net-im/telegram-desktop/telegram-desktop-2.9.3.ebuild
@@ -16,7 +16,7 @@ SRC_URI="https://github.com/telegramdesktop/tdesktop/releases/download/v${PV}/${
LICENSE="BSD GPL-3-with-openssl-exception LGPL-2+"
SLOT="0"
KEYWORDS="~amd64 ~ppc64"
-IUSE="+dbus enchant +gtk +hunspell +spell wayland webkit +X"
+IUSE="+dbus enchant +gtk +hunspell screencast +spell wayland webkit +X"
REQUIRED_USE="
spell? (
^^ ( enchant hunspell )
@@ -24,6 +24,7 @@ REQUIRED_USE="
webkit? ( gtk )
gtk? ( dbus )
"
+# Future: webkit doesn't depend on gtk anymore (version: >2.9.3)
RDEPEND="
!net-im/telegram-desktop-bin
@@ -44,7 +45,7 @@ RDEPEND="
media-libs/openal
media-libs/opus:=
media-libs/rnnoise
- ~media-libs/tg_owt-0_pre20210626
+ ~media-libs/tg_owt-0_pre20210626[screencast=,X=]
media-video/ffmpeg:=[opus]
sys-libs/zlib:=[minizip]
dbus? (
@@ -71,8 +72,7 @@ BDEPEND="
S="${WORKDIR}/${MY_P}"
PATCHES=(
- "${FILESDIR}/tdesktop-2.8.10-jemalloc-only-telegram.patch"
- "${FILESDIR}/tdesktop-2.9.0-fix-disable-wayland-integration.patch"
+ "${FILESDIR}/tdesktop-2.9.3-jemalloc-only-telegram.patch"
)
pkg_pretend() {
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-im/telegram-desktop/files/, net-im/telegram-desktop/
@ 2021-08-05 16:42 Georgy Yakovlev
0 siblings, 0 replies; 38+ messages in thread
From: Georgy Yakovlev @ 2021-08-05 16:42 UTC (permalink / raw
To: gentoo-commits
commit: 6cbb8b0398ed27aa780f0b60911582926d40092e
Author: Esteve Varela Colominas <esteve.varela <AT> gmail <DOT> com>
AuthorDate: Thu Aug 5 10:24:30 2021 +0000
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Thu Aug 5 16:42:10 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6cbb8b03
net-im/telegram-desktop: Drop vulnerable versions
Security bump was already a bit late, it's had long enough to cook.
Bug: https://bugs.gentoo.org/802537
Signed-off-by: Esteve Varela Colominas <esteve.varela <AT> gmail.com>
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
net-im/telegram-desktop/Manifest | 1 -
.../tdesktop-2.7.3-webview-include-gdkx.patch | 10 -
.../tdesktop-2.7.4-disable-webkit-separately.patch | 72 ------
...esktop-2.7.4-fix-disable-dbus-integration.patch | 21 --
.../files/tdesktop-2.7.4-voice-crash.patch | 262 ---------------------
.../files/tdesktop-2.7.4-voice-ffmpeg44.patch | 25 --
.../files/tdesktop-2.7.4-webview-fix-gcc11.patch | 31 ---
.../telegram-desktop-2.7.4-r1.ebuild | 146 ------------
8 files changed, 568 deletions(-)
diff --git a/net-im/telegram-desktop/Manifest b/net-im/telegram-desktop/Manifest
index 7bba87ebefe..060040b4c96 100644
--- a/net-im/telegram-desktop/Manifest
+++ b/net-im/telegram-desktop/Manifest
@@ -1,3 +1,2 @@
-DIST tdesktop-2.7.4-full.tar.gz 36894673 BLAKE2B e04749fb0168f8bae69a9ad85c5bff315faf0b355ff5f3a85a34ee36e3305c6b550553284d5179aff9283bbd1a94f9ec3c41e293d0ad8c86e4d08283189e42b3 SHA512 0a796d7a8c5e5982bc60f19c41da53996a609bf794fad224e7beea5fc3816b5cf35f16b0ec2cc7279085c69996063a44085f48e1596dfe746d260a2e8f1b2d14
DIST tdesktop-2.8.11-full.tar.gz 37105468 BLAKE2B 1ec5a0003bd1b948b45213509fa0649dfde5ec8e3dff097bf45aa0951c7963930788b0bee853f286d04b008b78704c464b6614b8391350767affebc2623b25af SHA512 a553313b04fbb562745be2381a84117657172952e46e280980a73c9fcfe2a7cf29c0e012e4b1259816d1e6652418e7a1ddfc4e394544fcc3aeb33704cbe80860
DIST tdesktop-2.9.0-full.tar.gz 37327425 BLAKE2B f47abfd41e71dbf950e6357417fd2725b145286861f6dfc8edc4101b6b232c43ea7a9987d028e57979588bf44919fef2e89b00adae7a9843e52f8f2566013dd8 SHA512 e9be60cdaeffa4efa95ea1e5d8fe50308bff5612b546fa92c02f824f479b42e098fb8fbe713e652578ee2308e3faadaf82e4c101dee0e58b6f3c70d8dcb0bd8e
diff --git a/net-im/telegram-desktop/files/tdesktop-2.7.3-webview-include-gdkx.patch b/net-im/telegram-desktop/files/tdesktop-2.7.3-webview-include-gdkx.patch
deleted file mode 100644
index 491a8cd3e1d..00000000000
--- a/net-im/telegram-desktop/files/tdesktop-2.7.3-webview-include-gdkx.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- tdesktop-2.7.3-full.orig/Telegram/lib_webview/webview/platform/linux/webview_linux_webkit_gtk.h
-+++ tdesktop-2.7.3-full/Telegram/lib_webview/webview/platform/linux/webview_linux_webkit_gtk.h
-@@ -12,6 +12,7 @@ extern "C" {
- #undef signals
- #include <JavaScriptCore/JavaScript.h>
- #include <gtk/gtk.h>
-+#include <gdk/gdkx.h>
- #include <webkit2/webkit2.h>
- #include <X11/Xlib.h>
- #define signals public
diff --git a/net-im/telegram-desktop/files/tdesktop-2.7.4-disable-webkit-separately.patch b/net-im/telegram-desktop/files/tdesktop-2.7.4-disable-webkit-separately.patch
deleted file mode 100644
index e54aca2ffa0..00000000000
--- a/net-im/telegram-desktop/files/tdesktop-2.7.4-disable-webkit-separately.patch
+++ /dev/null
@@ -1,72 +0,0 @@
---- tdesktop-2.7.4-full.orig/Telegram/lib_webview/CMakeLists.txt
-+++ tdesktop-2.7.4-full/Telegram/lib_webview/CMakeLists.txt
-@@ -116,7 +116,7 @@
- desktop-app::lib_webview_winrt
- )
- 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.7.4-full.orig/Telegram/lib_webview/webview/platform/linux/webview_linux.cpp
-+++ tdesktop-2.7.4-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.7.4-full.orig/cmake/options.cmake
-+++ tdesktop-2.7.4-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.7.4-full.orig/cmake/variables.cmake
-+++ tdesktop-2.7.4-full/cmake/variables.cmake
-@@ -38,6 +38,7 @@
- option(DESKTOP_APP_USE_PACKAGED_LAZY_PLATFORMTHEMES "Bundle recommended Qt platform themes for self-contained packages. (Linux only)" ${DESKTOP_APP_USE_PACKAGED_LAZY})
- 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.7.4-fix-disable-dbus-integration.patch b/net-im/telegram-desktop/files/tdesktop-2.7.4-fix-disable-dbus-integration.patch
deleted file mode 100644
index 941a4ecc09c..00000000000
--- a/net-im/telegram-desktop/files/tdesktop-2.7.4-fix-disable-dbus-integration.patch
+++ /dev/null
@@ -1,21 +0,0 @@
---- tdesktop-2.7.4-full.orig/Telegram/SourceFiles/platform/linux/notifications_manager_linux_dummy.cpp
-+++ tdesktop-2.7.4-full/Telegram/SourceFiles/platform/linux/notifications_manager_linux_dummy.cpp
-@@ -13,15 +13,15 @@
- namespace Platform {
- namespace Notifications {
-
--bool SkipAudio() {
-+bool SkipAudioForCustom() {
- return false;
- }
-
--bool SkipToast() {
-+bool SkipToastForCustom() {
- return false;
- }
-
--bool SkipFlashBounce() {
-+bool SkipFlashBounceForCustom() {
- return false;
- }
-
diff --git a/net-im/telegram-desktop/files/tdesktop-2.7.4-voice-crash.patch b/net-im/telegram-desktop/files/tdesktop-2.7.4-voice-crash.patch
deleted file mode 100644
index 41e447989cb..00000000000
--- a/net-im/telegram-desktop/files/tdesktop-2.7.4-voice-crash.patch
+++ /dev/null
@@ -1,262 +0,0 @@
-From 71deaa48afab2bcf9df67b9b347b1f44aad3a9ce Mon Sep 17 00:00:00 2001
-From: John Preston <johnprestonmail@gmail.com>
-Date: Thu, 13 May 2021 15:17:54 +0400
-Subject: [PATCH] Don't crash on voice recording error.
-
-Fixes #16217.
----
- .../media/audio/media_audio_capture.cpp | 89 +++++++++++--------
- 1 file changed, 54 insertions(+), 35 deletions(-)
-
-diff --git a/Telegram/SourceFiles/media/audio/media_audio_capture.cpp b/Telegram/SourceFiles/media/audio/media_audio_capture.cpp
-index a5965e0d1988..deb2474d7891 100644
---- a/Telegram/SourceFiles/media/audio/media_audio_capture.cpp
-+++ b/Telegram/SourceFiles/media/audio/media_audio_capture.cpp
-@@ -47,17 +47,17 @@ class Instance::Inner final : public QObject {
- void start(Fn<void(Update)> updated, Fn<void()> error);
- void stop(Fn<void(Result&&)> callback = nullptr);
-
-- void timeout();
--
- private:
-- void processFrame(int32 offset, int32 framesize);
-+ void process();
-+
-+ [[nodiscard]] bool processFrame(int32 offset, int32 framesize);
- void fail();
-
-- void writeFrame(AVFrame *frame);
-+ [[nodiscard]] bool writeFrame(AVFrame *frame);
-
- // Writes the packets till EAGAIN is got from av_receive_packet()
- // Returns number of packets written or -1 on error
-- int writePackets();
-+ [[nodiscard]] int writePackets();
-
- Fn<void(Update)> _updated;
- Fn<void()> _error;
-@@ -150,6 +150,7 @@ struct Instance::Inner::Private {
- AVCodec *codec = nullptr;
- AVCodecContext *codecContext = nullptr;
- bool opened = false;
-+ bool processing = false;
-
- int srcSamples = 0;
- int dstSamples = 0;
-@@ -217,7 +218,7 @@ struct Instance::Inner::Private {
-
- Instance::Inner::Inner(QThread *thread)
- : d(std::make_unique<Private>())
--, _timer(thread, [=] { timeout(); }) {
-+, _timer(thread, [=] { process(); }) {
- moveToThread(thread);
- }
-
-@@ -226,10 +227,10 @@ Instance::Inner::~Inner() {
- }
-
- void Instance::Inner::fail() {
-- Expects(_error != nullptr);
--
- stop();
-- _error();
-+ if (const auto error = base::take(_error)) {
-+ InvokeQueued(this, error);
-+ }
- }
-
- void Instance::Inner::start(Fn<void(Update)> updated, Fn<void()> error) {
-@@ -384,13 +385,21 @@ void Instance::Inner::stop(Fn<void(Result&&)> callback) {
- }
- _timer.cancel();
-
-- if (d->device) {
-+ const auto needResult = (callback != nullptr);
-+ const auto hadDevice = (d->device != nullptr);
-+ if (hadDevice) {
- alcCaptureStop(d->device);
-- timeout(); // get last data
-+ if (d->processing) {
-+ Assert(!needResult); // stop in the middle of processing - error.
-+ } else {
-+ process(); // get last data
-+ }
-+ alcCaptureCloseDevice(d->device);
-+ d->device = nullptr;
- }
-
- // Write what is left
-- if (!_captured.isEmpty()) {
-+ if (needResult && !_captured.isEmpty()) {
- auto fadeSamples = kCaptureFadeInDuration * kCaptureFrequency / 1000;
- auto capturedSamples = static_cast<int>(_captured.size() / sizeof(short));
- if ((_captured.size() % sizeof(short)) || (d->fullSamples + capturedSamples < kCaptureFrequency) || (capturedSamples < fadeSamples)) {
-@@ -414,11 +423,13 @@ void Instance::Inner::stop(Fn<void(Result&&)> callback) {
-
- int32 framesize = d->srcSamples * d->codecContext->channels * sizeof(short), encoded = 0;
- while (_captured.size() >= encoded + framesize) {
-- processFrame(encoded, framesize);
-+ if (!processFrame(encoded, framesize)) {
-+ break;
-+ }
- encoded += framesize;
- }
-- writeFrame(nullptr); // drain the codec
-- if (encoded != _captured.size()) {
-+ // Drain the codec.
-+ if (!writeFrame(nullptr) || encoded != _captured.size()) {
- d->fullSamples = 0;
- d->dataPos = 0;
- d->data.clear();
-@@ -436,14 +447,14 @@ void Instance::Inner::stop(Fn<void(Result&&)> callback) {
- _captured = QByteArray();
-
- // Finish stream
-- if (d->device) {
-+ if (needResult && hadDevice) {
- av_write_trailer(d->fmtContext);
- }
-
- QByteArray result = d->fullSamples ? d->data : QByteArray();
- VoiceWaveform waveform;
- qint32 samples = d->fullSamples;
-- if (samples && !d->waveform.isEmpty()) {
-+ if (needResult && samples && !d->waveform.isEmpty()) {
- int64 count = d->waveform.size(), sum = 0;
- if (count >= Player::kWaveformSamplesCount) {
- QVector<uint16> peaks;
-@@ -472,11 +483,7 @@ void Instance::Inner::stop(Fn<void(Result&&)> callback) {
- }
- }
- }
-- if (d->device) {
-- alcCaptureStop(d->device);
-- alcCaptureCloseDevice(d->device);
-- d->device = nullptr;
--
-+ if (hadDevice) {
- if (d->codecContext) {
- avcodec_free_context(&d->codecContext);
- d->codecContext = nullptr;
-@@ -528,12 +535,17 @@ void Instance::Inner::stop(Fn<void(Result&&)> callback) {
- d->waveform.clear();
- }
-
-- if (callback) {
-+ if (needResult) {
- callback({ result, waveform, samples });
- }
- }
-
--void Instance::Inner::timeout() {
-+void Instance::Inner::process() {
-+ Expects(!d->processing);
-+
-+ d->processing = true;
-+ const auto guard = gsl::finally([&] { d->processing = false; });
-+
- if (!d->device) {
- _timer.cancel();
- return;
-@@ -582,7 +594,9 @@ void Instance::Inner::timeout() {
- // Write frames
- int32 framesize = d->srcSamples * d->codecContext->channels * sizeof(short), encoded = 0;
- while (uint32(_captured.size()) >= encoded + framesize + fadeSamples * sizeof(short)) {
-- processFrame(encoded, framesize);
-+ if (!processFrame(encoded, framesize)) {
-+ return;
-+ }
- encoded += framesize;
- }
-
-@@ -597,13 +611,13 @@ void Instance::Inner::timeout() {
- }
- }
-
--void Instance::Inner::processFrame(int32 offset, int32 framesize) {
-+bool Instance::Inner::processFrame(int32 offset, int32 framesize) {
- // Prepare audio frame
-
- if (framesize % sizeof(short)) { // in the middle of a sample
- LOG(("Audio Error: Bad framesize in writeFrame() for capture, framesize %1, %2").arg(framesize));
- fail();
-- return;
-+ return false;
- }
- auto samplesCnt = static_cast<int>(framesize / sizeof(short));
-
-@@ -650,7 +664,7 @@ void Instance::Inner::processFrame(int32 offset, int32 framesize) {
- if ((res = av_samples_alloc(d->dstSamplesData, 0, d->codecContext->channels, d->dstSamples, d->codecContext->sample_fmt, 1)) < 0) {
- LOG(("Audio Error: Unable to av_samples_alloc for capture, error %1, %2").arg(res).arg(av_make_error_string(err, sizeof(err), res)));
- fail();
-- return;
-+ return false;
- }
- d->dstSamplesSize = av_samples_get_buffer_size(0, d->codecContext->channels, d->maxDstSamples, d->codecContext->sample_fmt, 0);
- }
-@@ -658,7 +672,7 @@ void Instance::Inner::processFrame(int32 offset, int32 framesize) {
- if ((res = swr_convert(d->swrContext, d->dstSamplesData, d->dstSamples, (const uint8_t **)srcSamplesData, d->srcSamples)) < 0) {
- LOG(("Audio Error: Unable to swr_convert for capture, error %1, %2").arg(res).arg(av_make_error_string(err, sizeof(err), res)));
- fail();
-- return;
-+ return false;
- }
-
- // Write audio frame
-@@ -670,45 +684,50 @@ void Instance::Inner::processFrame(int32 offset, int32 framesize) {
-
- avcodec_fill_audio_frame(frame, d->codecContext->channels, d->codecContext->sample_fmt, d->dstSamplesData[0], d->dstSamplesSize, 0);
-
-- writeFrame(frame);
-+ if (!writeFrame(frame)) {
-+ return false;
-+ }
-
- d->fullSamples += samplesCnt;
-
- av_frame_free(&frame);
-+ return true;
- }
-
--void Instance::Inner::writeFrame(AVFrame *frame) {
-+bool Instance::Inner::writeFrame(AVFrame *frame) {
- int res = 0;
- char err[AV_ERROR_MAX_STRING_SIZE] = { 0 };
-
- res = avcodec_send_frame(d->codecContext, frame);
- if (res == AVERROR(EAGAIN)) {
-- int packetsWritten = writePackets();
-+ const auto packetsWritten = writePackets();
- if (packetsWritten < 0) {
- if (frame && packetsWritten == AVERROR_EOF) {
- LOG(("Audio Error: EOF in packets received when EAGAIN was got in avcodec_send_frame()"));
- fail();
- }
-- return;
-+ return false;
- } else if (!packetsWritten) {
- LOG(("Audio Error: No packets received when EAGAIN was got in avcodec_send_frame()"));
- fail();
-- return;
-+ return false;
- }
- res = avcodec_send_frame(d->codecContext, frame);
- }
- if (res < 0) {
- LOG(("Audio Error: Unable to avcodec_send_frame for capture, error %1, %2").arg(res).arg(av_make_error_string(err, sizeof(err), res)));
- fail();
-- return;
-+ return false;
- }
-
- if (!frame) { // drain
- if ((res = writePackets()) != AVERROR_EOF) {
- LOG(("Audio Error: not EOF in packets received when draining the codec, result %1").arg(res));
- fail();
-+ return false;
- }
- }
-+ return true;
- }
-
- int Instance::Inner::writePackets() {
diff --git a/net-im/telegram-desktop/files/tdesktop-2.7.4-voice-ffmpeg44.patch b/net-im/telegram-desktop/files/tdesktop-2.7.4-voice-ffmpeg44.patch
deleted file mode 100644
index 4156956032d..00000000000
--- a/net-im/telegram-desktop/files/tdesktop-2.7.4-voice-ffmpeg44.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From a8807bc915f2439acc7c84f06d931d96d6ca602a Mon Sep 17 00:00:00 2001
-From: John Preston <johnprestonmail@gmail.com>
-Date: Thu, 13 May 2021 15:33:42 +0400
-Subject: [PATCH] Fix voice recoding with FFmpeg 4.4.
-
-Fixes #16217.
----
- Telegram/SourceFiles/media/audio/media_audio_capture.cpp | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/Telegram/SourceFiles/media/audio/media_audio_capture.cpp b/Telegram/SourceFiles/media/audio/media_audio_capture.cpp
-index deb2474d789..d129168783d 100644
---- a/Telegram/SourceFiles/media/audio/media_audio_capture.cpp
-+++ b/Telegram/SourceFiles/media/audio/media_audio_capture.cpp
-@@ -679,6 +679,10 @@ bool Instance::Inner::processFrame(int32 offset, int32 framesize) {
-
- AVFrame *frame = av_frame_alloc();
-
-+ frame->format = d->codecContext->sample_fmt;
-+ frame->channels = d->codecContext->channels;
-+ frame->channel_layout = d->codecContext->channel_layout;
-+ frame->sample_rate = d->codecContext->sample_rate;
- frame->nb_samples = d->dstSamples;
- frame->pts = av_rescale_q(d->fullSamples, AVRational { 1, d->codecContext->sample_rate }, d->codecContext->time_base);
-
diff --git a/net-im/telegram-desktop/files/tdesktop-2.7.4-webview-fix-gcc11.patch b/net-im/telegram-desktop/files/tdesktop-2.7.4-webview-fix-gcc11.patch
deleted file mode 100644
index 7f4b3f2601f..00000000000
--- a/net-im/telegram-desktop/files/tdesktop-2.7.4-webview-fix-gcc11.patch
+++ /dev/null
@@ -1,31 +0,0 @@
---- tdesktop-2.7.4-full.orig/Telegram/lib_webview/webview/platform/linux/webview_linux_webkit_gtk.cpp
-+++ tdesktop-2.7.4-full/Telegram/lib_webview/webview/platform/linux/webview_linux_webkit_gtk.cpp
-@@ -6,6 +6,7 @@
- //
- #include "webview/platform/linux/webview_linux_webkit_gtk.h"
-
-+#include "base/optional.h"
- #include "base/platform/linux/base_linux_gtk_integration.h"
- #include "base/platform/linux/base_linux_gtk_integration_p.h"
-
---- tdesktop-2.7.4-full.orig/Telegram/lib_webview/webview/webview_embed.cpp
-+++ tdesktop-2.7.4-full/Telegram/lib_webview/webview/webview_embed.cpp
-@@ -14,7 +14,6 @@
-
- #include <QtWidgets/QWidget>
- #include <QtGui/QWindow>
--#include <QtCore/QJsonDocument>
-
- namespace Webview {
- namespace {
---- tdesktop-2.7.4-full.orig/Telegram/lib_webview/webview/webview_embed.h
-+++ tdesktop-2.7.4-full/Telegram/lib_webview/webview/webview_embed.h
-@@ -9,6 +9,8 @@
- #include "base/unique_qptr.h"
- #include "base/basic_types.h"
-
-+#include <QtCore/QJsonDocument>
-+
- class QString;
- class QWidget;
- class QWindow;
diff --git a/net-im/telegram-desktop/telegram-desktop-2.7.4-r1.ebuild b/net-im/telegram-desktop/telegram-desktop-2.7.4-r1.ebuild
deleted file mode 100644
index 1f51780319c..00000000000
--- a/net-im/telegram-desktop/telegram-desktop-2.7.4-r1.ebuild
+++ /dev/null
@@ -1,146 +0,0 @@
-# Copyright 2020-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{7,8,9} )
-
-inherit xdg cmake python-any-r1 flag-o-matic
-
-MY_P="tdesktop-${PV}-full"
-
-DESCRIPTION="Official desktop client for Telegram"
-HOMEPAGE="https://desktop.telegram.org"
-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 +spell wayland webkit +X"
-
-RDEPEND="
- !net-im/telegram-desktop-bin
- app-arch/lz4:=
- dev-cpp/glibmm:2
- dev-libs/xxhash
- dev-qt/qtcore:5
- dev-qt/qtgui:5[dbus?,jpeg,png,wayland?,X(-)?]
- dev-qt/qtimageformats:5
- dev-qt/qtnetwork:5[ssl]
- dev-qt/qtsvg:5
- dev-qt/qtwidgets:5[png,X(-)?]
- media-fonts/open-sans
- media-libs/fontconfig:=
- media-libs/opus:=
- ~media-libs/libtgvoip-2.4.4_p20210302
- media-libs/openal
- ~media-libs/tg_owt-0_pre20210422
- 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?] )
- 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
-"
-REQUIRED_USE="
- spell? (
- ^^ ( enchant hunspell )
- )
- webkit? ( gtk )
-"
-
-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.7.4-disable-webkit-separately.patch"
- # https://github.com/desktop-app/lib_webview/commit/0b4100d7cecc4e748c51f3f51ebfd1392ec3978a
- "${FILESDIR}/tdesktop-2.7.3-webview-include-gdkx.patch"
- # https://github.com/desktop-app/lib_webview/pull/3
- "${FILESDIR}/tdesktop-2.7.4-webview-fix-gcc11.patch"
- # https://github.com/telegramdesktop/tdesktop/issues/16217
- "${FILESDIR}/tdesktop-2.7.4-voice-crash.patch"
- "${FILESDIR}/tdesktop-2.7.4-voice-ffmpeg44.patch"
- # https://github.com/telegramdesktop/tdesktop/commit/404538c98968d44d207671de3adde91b8df50721
- "${FILESDIR}/tdesktop-2.7.4-fix-disable-dbus-integration.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 'gtk' useflag if you have image copy-paste problems"
-}
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-im/telegram-desktop/files/, net-im/telegram-desktop/
@ 2021-08-04 8:31 Georgy Yakovlev
0 siblings, 0 replies; 38+ messages in thread
From: Georgy Yakovlev @ 2021-08-04 8:31 UTC (permalink / raw
To: gentoo-commits
commit: 189af5cced33632a7fd422fa9301067f609ae647
Author: Esteve Varela Colominas <esteve.varela <AT> gmail <DOT> com>
AuthorDate: Tue Aug 3 21:24:40 2021 +0000
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Wed Aug 4 08:29:28 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=189af5cc
net-im/telegram-desktop: Bump to 2.9.0
inb4 upstream releases a "General system stability improvements to
enhance the user's experience." bump.
Signed-off-by: Esteve Varela Colominas <esteve.varela <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/21871
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
net-im/telegram-desktop/Manifest | 2 +-
...top-2.9.0-fix-disable-wayland-integration.patch | 11 ++
.../telegram-desktop/telegram-desktop-2.9.0.ebuild | 140 +++++++++++++++++++++
3 files changed, 152 insertions(+), 1 deletion(-)
diff --git a/net-im/telegram-desktop/Manifest b/net-im/telegram-desktop/Manifest
index 8aaae69ec84..7bba87ebefe 100644
--- a/net-im/telegram-desktop/Manifest
+++ b/net-im/telegram-desktop/Manifest
@@ -1,3 +1,3 @@
DIST tdesktop-2.7.4-full.tar.gz 36894673 BLAKE2B e04749fb0168f8bae69a9ad85c5bff315faf0b355ff5f3a85a34ee36e3305c6b550553284d5179aff9283bbd1a94f9ec3c41e293d0ad8c86e4d08283189e42b3 SHA512 0a796d7a8c5e5982bc60f19c41da53996a609bf794fad224e7beea5fc3816b5cf35f16b0ec2cc7279085c69996063a44085f48e1596dfe746d260a2e8f1b2d14
-DIST tdesktop-2.8.1-full.tar.gz 37129127 BLAKE2B 06f2a3050f0e0f321c766c54e19faf3ea172c41088e2ffdbb5928a41ba01de1fc845a84addded17d113316857c68f265642a8ab32feb79a87beef548c739b56c SHA512 df35cc00dc47a8c65b32b62c139cc3a49333f573aa88fb70cc65197524f9b9b4756c58752866c843704ea4df5d6224eb4cba5b32953dd9a4d721b0ee0e1efc69
DIST tdesktop-2.8.11-full.tar.gz 37105468 BLAKE2B 1ec5a0003bd1b948b45213509fa0649dfde5ec8e3dff097bf45aa0951c7963930788b0bee853f286d04b008b78704c464b6614b8391350767affebc2623b25af SHA512 a553313b04fbb562745be2381a84117657172952e46e280980a73c9fcfe2a7cf29c0e012e4b1259816d1e6652418e7a1ddfc4e394544fcc3aeb33704cbe80860
+DIST tdesktop-2.9.0-full.tar.gz 37327425 BLAKE2B f47abfd41e71dbf950e6357417fd2725b145286861f6dfc8edc4101b6b232c43ea7a9987d028e57979588bf44919fef2e89b00adae7a9843e52f8f2566013dd8 SHA512 e9be60cdaeffa4efa95ea1e5d8fe50308bff5612b546fa92c02f824f479b42e098fb8fbe713e652578ee2308e3faadaf82e4c101dee0e58b6f3c70d8dcb0bd8e
diff --git a/net-im/telegram-desktop/files/tdesktop-2.9.0-fix-disable-wayland-integration.patch b/net-im/telegram-desktop/files/tdesktop-2.9.0-fix-disable-wayland-integration.patch
new file mode 100644
index 00000000000..c76bcc06dfd
--- /dev/null
+++ b/net-im/telegram-desktop/files/tdesktop-2.9.0-fix-disable-wayland-integration.patch
@@ -0,0 +1,11 @@
+--- tdesktop-2.9.0-full.orig/Telegram/lib_ui/ui/platform/linux/ui_linux_wayland_integration_dummy.cpp
++++ tdesktop-2.9.0-full/Telegram/lib_ui/ui/platform/linux/ui_linux_wayland_integration_dummy.cpp
+@@ -18,6 +18,8 @@
+ WaylandIntegration::WaylandIntegration() {
+ }
+
++WaylandIntegration::~WaylandIntegration() = default;
++
+ WaylandIntegration *WaylandIntegration::Instance() {
+ if (!::Platform::IsWayland()) return nullptr;
+ static WaylandIntegration instance;
diff --git a/net-im/telegram-desktop/telegram-desktop-2.9.0.ebuild b/net-im/telegram-desktop/telegram-desktop-2.9.0.ebuild
new file mode 100644
index 00000000000..13da86a6071
--- /dev/null
+++ b/net-im/telegram-desktop/telegram-desktop-2.9.0.ebuild
@@ -0,0 +1,140 @@
+# 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 +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
+ 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=(
+ "${FILESDIR}/tdesktop-2.8.10-jemalloc-only-telegram.patch"
+ "${FILESDIR}/tdesktop-2.9.0-fix-disable-wayland-integration.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)
+ -DDESKTOP_APP_DISABLE_WAYLAND_INTEGRATION=$(usex wayland)
+ -DDESKTOP_APP_DISABLE_DBUS_INTEGRATION=$(usex dbus)
+ -DDESKTOP_APP_DISABLE_GTK_INTEGRATION=$(usex gtk)
+ -DDESKTOP_APP_DISABLE_WEBKITGTK=$(usex webkit)
+ -DDESKTOP_APP_DISABLE_SPELLCHECK=$(usex spell) # enables hunspell (recommended)
+ -DDESKTOP_APP_USE_ENCHANT=$(usex enchant) # 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"
+}
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-im/telegram-desktop/files/, net-im/telegram-desktop/
@ 2021-07-17 20:05 Georgy Yakovlev
0 siblings, 0 replies; 38+ messages in thread
From: Georgy Yakovlev @ 2021-07-17 20:05 UTC (permalink / raw
To: gentoo-commits
commit: d091935d85df82d49cf2473e21881b7a2e628deb
Author: Esteve Varela Colominas <esteve.varela <AT> gmail <DOT> com>
AuthorDate: Sat Jul 17 10:39:22 2021 +0000
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Sat Jul 17 20:04:44 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d091935d
net-im/telegram-desktop: Drop jemalloc patch
Upstream clarified; The glibc allocator causes telegram to use excessive
amounts of memory, and never free it. That's a bug.
See-also: https://github.com/telegramdesktop/tdesktop/issues/16084
See-also: https://github.com/desktop-app/cmake_helpers/pull/91#issuecomment-881788003
Closes: https://github.com/gentoo/gentoo/pull/21688
Signed-off-by: Esteve Varela Colominas <esteve.varela <AT> gmail.com>
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
...desktop-2.8.9-disable-jemalloc-separately.patch | 100 ---------------------
.../telegram-desktop-2.8.10.ebuild | 10 +--
2 files changed, 3 insertions(+), 107 deletions(-)
diff --git a/net-im/telegram-desktop/files/tdesktop-2.8.9-disable-jemalloc-separately.patch b/net-im/telegram-desktop/files/tdesktop-2.8.9-disable-jemalloc-separately.patch
deleted file mode 100644
index dff2455d4e3..00000000000
--- a/net-im/telegram-desktop/files/tdesktop-2.8.9-disable-jemalloc-separately.patch
+++ /dev/null
@@ -1,100 +0,0 @@
-Allow controlling the use of jemalloc
-
-Jemalloc is often controlled through USE=jemalloc in Gentoo. Removing or
-replacing it is trivial, and I'm not aware of any particular advantages that
-come with using this allocator, especially for an IM client. Benchmarks
-regarding this allocator provide a huge variety of results depending on the
-workload and system, so it's hard to establish when this allocator provides any
-tangible advantage.
-
-Considering things like Hardened Gentoo, the user might prefer to use a more
-exploit-resistant allocator, like GrapheneOS/hardened_malloc, and I've heard
-Musl is hardening their allocator as well.
-
-I trust the user can better judge if they need this in their particular setup.
-
-If a telegram dev is reading this, feel free to drop me a message (metadata.xml
-contains the maintainer's address), if you believe it should be forced due to
-usability concerns, or if you can provide me with some context I might be
-missing. Jemalloc is currently enabled by default.
-
---- tdesktop-2.8.9-full.orig/Telegram/SourceFiles/platform/linux/specific_linux.cpp
-+++ tdesktop-2.8.9-full/Telegram/SourceFiles/platform/linux/specific_linux.cpp
-@@ -48,7 +48,10 @@
- #include <gio/gio.h>
- #include <glibmm.h>
- #include <giomm.h>
-+
-+#ifndef DESKTOP_APP_DISABLE_JEMALLOC
- #include <jemalloc/jemalloc.h>
-+#endif // !DESKTOP_APP_DISABLE_JEMALLOC
-
- #include <sys/stat.h>
- #include <sys/types.h>
-@@ -727,8 +730,10 @@
- namespace Platform {
-
- void start() {
-+#ifndef DESKTOP_APP_DISABLE_JEMALLOC
- auto backgroundThread = true;
- mallctl("background_thread", nullptr, nullptr, &backgroundThread, sizeof(bool));
-+#endif // !DESKTOP_APP_DISABLE_JEMALLOC
-
- LOG(("Launcher filename: %1").arg(QGuiApplication::desktopFileName()));
-
---- tdesktop-2.8.9-full.orig/cmake/external/CMakeLists.txt
-+++ tdesktop-2.8.9-full/cmake/external/CMakeLists.txt
-@@ -37,7 +37,7 @@
- add_checked_subdirectory(hunspell)
- endif()
- add_checked_subdirectory(iconv)
--if (LINUX)
-+if (LINUX AND NOT DESKTOP_APP_DISABLE_JEMALLOC)
- add_checked_subdirectory(jemalloc)
- endif()
- add_checked_subdirectory(jpeg)
---- tdesktop-2.8.9-full.orig/cmake/options.cmake
-+++ tdesktop-2.8.9-full/cmake/options.cmake
-@@ -56,6 +56,13 @@
- )
- endif()
-
-+if (DESKTOP_APP_DISABLE_JEMALLOC)
-+ target_compile_definitions(common_options
-+ INTERFACE
-+ DESKTOP_APP_DISABLE_JEMALLOC
-+ )
-+endif()
-+
- if (DESKTOP_APP_USE_PACKAGED)
- target_compile_definitions(common_options
- INTERFACE
---- tdesktop-2.8.9-full.orig/cmake/options_linux.cmake
-+++ tdesktop-2.8.9-full/cmake/options_linux.cmake
-@@ -58,10 +58,12 @@
- endif()
- endif()
-
--target_link_libraries(common_options
--INTERFACE
-- desktop-app::external_jemalloc
--)
-+if (NOT DESKTOP_APP_DISABLE_JEMALLOC)
-+ target_link_libraries(common_options
-+ INTERFACE
-+ desktop-app::external_jemalloc
-+ )
-+endif()
-
- if (DESKTOP_APP_USE_PACKAGED)
- find_library(ATOMIC_LIBRARY atomic)
---- tdesktop-2.8.9-full.orig/cmake/variables.cmake
-+++ tdesktop-2.8.9-full/cmake/variables.cmake
-@@ -38,6 +38,7 @@
- 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_JEMALLOC "Disable use of the jemalloc allocator (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/telegram-desktop-2.8.10.ebuild b/net-im/telegram-desktop/telegram-desktop-2.8.10.ebuild
index 69bfb7c3a17..e738b91f41d 100644
--- a/net-im/telegram-desktop/telegram-desktop-2.8.10.ebuild
+++ b/net-im/telegram-desktop/telegram-desktop-2.8.10.ebuild
@@ -16,7 +16,7 @@ SRC_URI="https://github.com/telegramdesktop/tdesktop/releases/download/v${PV}/${
LICENSE="BSD GPL-3-with-openssl-exception LGPL-2+"
SLOT="0"
KEYWORDS="~amd64 ~ppc64"
-IUSE="+dbus enchant +gtk +hunspell +jemalloc +spell wayland webkit +X"
+IUSE="+dbus enchant +gtk +hunspell +spell wayland webkit +X"
REQUIRED_USE="
spell? (
^^ ( enchant hunspell )
@@ -29,6 +29,7 @@ RDEPEND="
!net-im/telegram-desktop-bin
app-arch/lz4:=
dev-cpp/glibmm:2
+ dev-libs/jemalloc:=
dev-libs/xxhash
>=dev-qt/qtcore-5.15:5
>=dev-qt/qtgui-5.15:5[dbus?,jpeg,png,wayland?,X(-)?]
@@ -53,7 +54,6 @@ RDEPEND="
enchant? ( app-text/enchant:= )
gtk? ( x11-libs/gtk+:3[X?,wayland?] )
hunspell? ( >=app-text/hunspell-1.7:= )
- jemalloc? ( dev-libs/jemalloc:= )
wayland? ( kde-frameworks/kwayland:= )
webkit? ( net-libs/webkit-gtk:= )
X? ( x11-libs/libxcb:= )
@@ -74,9 +74,6 @@ 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 going to attempt upstreaming this after the reaction to
- # "disable-webkit-separately"
- "${FILESDIR}/tdesktop-2.8.9-disable-jemalloc-separately.patch"
# Not a proper fix, not upstreamed
"${FILESDIR}/tdesktop-2.8.9-webview-fix-glib.patch"
)
@@ -110,7 +107,6 @@ src_configure() {
-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_JEMALLOC=$(usex jemalloc 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
)
@@ -143,5 +139,5 @@ src_configure() {
pkg_postinst() {
xdg_pkg_postinst
- use gtk || elog "enable 'gtk' useflag if you have image copy-paste problems"
+ use gtk || elog "enable the 'gtk' useflag if you have image copy-paste problems"
}
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-im/telegram-desktop/files/, net-im/telegram-desktop/
@ 2021-07-17 0:06 Georgy Yakovlev
0 siblings, 0 replies; 38+ messages in thread
From: Georgy Yakovlev @ 2021-07-17 0:06 UTC (permalink / raw
To: gentoo-commits
commit: 7fc1afa3705d7c107e17f9a1e9402aeece0acd56
Author: Esteve Varela Colominas <esteve.varela <AT> gmail <DOT> com>
AuthorDate: Fri Jul 16 15:00:57 2021 +0000
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Sat Jul 17 00:05:52 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7fc1afa3
net-im/telegram-desktop: Bump to 2.8.10
Closes: https://github.com/gentoo/gentoo/pull/21674
Signed-off-by: Esteve Varela Colominas <esteve.varela <AT> gmail.com>
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
net-im/telegram-desktop/Manifest | 1 +
...desktop-2.8.9-disable-jemalloc-separately.patch | 100 ++++++++++++++
.../tdesktop-2.8.9-disable-webkit-separately.patch | 122 +++++++++++++++++
.../files/tdesktop-2.8.9-webview-fix-glib.patch | 31 +++++
.../telegram-desktop-2.8.10.ebuild | 147 +++++++++++++++++++++
5 files changed, 401 insertions(+)
diff --git a/net-im/telegram-desktop/Manifest b/net-im/telegram-desktop/Manifest
index 96744242fc0..e246987bf0e 100644
--- a/net-im/telegram-desktop/Manifest
+++ b/net-im/telegram-desktop/Manifest
@@ -1,2 +1,3 @@
DIST tdesktop-2.7.4-full.tar.gz 36894673 BLAKE2B e04749fb0168f8bae69a9ad85c5bff315faf0b355ff5f3a85a34ee36e3305c6b550553284d5179aff9283bbd1a94f9ec3c41e293d0ad8c86e4d08283189e42b3 SHA512 0a796d7a8c5e5982bc60f19c41da53996a609bf794fad224e7beea5fc3816b5cf35f16b0ec2cc7279085c69996063a44085f48e1596dfe746d260a2e8f1b2d14
DIST tdesktop-2.8.1-full.tar.gz 37129127 BLAKE2B 06f2a3050f0e0f321c766c54e19faf3ea172c41088e2ffdbb5928a41ba01de1fc845a84addded17d113316857c68f265642a8ab32feb79a87beef548c739b56c SHA512 df35cc00dc47a8c65b32b62c139cc3a49333f573aa88fb70cc65197524f9b9b4756c58752866c843704ea4df5d6224eb4cba5b32953dd9a4d721b0ee0e1efc69
+DIST tdesktop-2.8.10-full.tar.gz 37105631 BLAKE2B 71a08e0d2fda90898e711dd285478e565ddf7f6bd71db8910688c7f0bb550f04136cb3ccec101d5e89860471ffdd7a868dd90a6317924e96c8ad558d4e3079f2 SHA512 910e34718a061d643937393fa105f2236549059eaecc56aab1203a0efa3a7538f7a2d9b432c8b0a9269118ef3bff56dc1edf856476629efe666d16851e68932f
diff --git a/net-im/telegram-desktop/files/tdesktop-2.8.9-disable-jemalloc-separately.patch b/net-im/telegram-desktop/files/tdesktop-2.8.9-disable-jemalloc-separately.patch
new file mode 100644
index 00000000000..dff2455d4e3
--- /dev/null
+++ b/net-im/telegram-desktop/files/tdesktop-2.8.9-disable-jemalloc-separately.patch
@@ -0,0 +1,100 @@
+Allow controlling the use of jemalloc
+
+Jemalloc is often controlled through USE=jemalloc in Gentoo. Removing or
+replacing it is trivial, and I'm not aware of any particular advantages that
+come with using this allocator, especially for an IM client. Benchmarks
+regarding this allocator provide a huge variety of results depending on the
+workload and system, so it's hard to establish when this allocator provides any
+tangible advantage.
+
+Considering things like Hardened Gentoo, the user might prefer to use a more
+exploit-resistant allocator, like GrapheneOS/hardened_malloc, and I've heard
+Musl is hardening their allocator as well.
+
+I trust the user can better judge if they need this in their particular setup.
+
+If a telegram dev is reading this, feel free to drop me a message (metadata.xml
+contains the maintainer's address), if you believe it should be forced due to
+usability concerns, or if you can provide me with some context I might be
+missing. Jemalloc is currently enabled by default.
+
+--- tdesktop-2.8.9-full.orig/Telegram/SourceFiles/platform/linux/specific_linux.cpp
++++ tdesktop-2.8.9-full/Telegram/SourceFiles/platform/linux/specific_linux.cpp
+@@ -48,7 +48,10 @@
+ #include <gio/gio.h>
+ #include <glibmm.h>
+ #include <giomm.h>
++
++#ifndef DESKTOP_APP_DISABLE_JEMALLOC
+ #include <jemalloc/jemalloc.h>
++#endif // !DESKTOP_APP_DISABLE_JEMALLOC
+
+ #include <sys/stat.h>
+ #include <sys/types.h>
+@@ -727,8 +730,10 @@
+ namespace Platform {
+
+ void start() {
++#ifndef DESKTOP_APP_DISABLE_JEMALLOC
+ auto backgroundThread = true;
+ mallctl("background_thread", nullptr, nullptr, &backgroundThread, sizeof(bool));
++#endif // !DESKTOP_APP_DISABLE_JEMALLOC
+
+ LOG(("Launcher filename: %1").arg(QGuiApplication::desktopFileName()));
+
+--- tdesktop-2.8.9-full.orig/cmake/external/CMakeLists.txt
++++ tdesktop-2.8.9-full/cmake/external/CMakeLists.txt
+@@ -37,7 +37,7 @@
+ add_checked_subdirectory(hunspell)
+ endif()
+ add_checked_subdirectory(iconv)
+-if (LINUX)
++if (LINUX AND NOT DESKTOP_APP_DISABLE_JEMALLOC)
+ add_checked_subdirectory(jemalloc)
+ endif()
+ add_checked_subdirectory(jpeg)
+--- tdesktop-2.8.9-full.orig/cmake/options.cmake
++++ tdesktop-2.8.9-full/cmake/options.cmake
+@@ -56,6 +56,13 @@
+ )
+ endif()
+
++if (DESKTOP_APP_DISABLE_JEMALLOC)
++ target_compile_definitions(common_options
++ INTERFACE
++ DESKTOP_APP_DISABLE_JEMALLOC
++ )
++endif()
++
+ if (DESKTOP_APP_USE_PACKAGED)
+ target_compile_definitions(common_options
+ INTERFACE
+--- tdesktop-2.8.9-full.orig/cmake/options_linux.cmake
++++ tdesktop-2.8.9-full/cmake/options_linux.cmake
+@@ -58,10 +58,12 @@
+ endif()
+ endif()
+
+-target_link_libraries(common_options
+-INTERFACE
+- desktop-app::external_jemalloc
+-)
++if (NOT DESKTOP_APP_DISABLE_JEMALLOC)
++ target_link_libraries(common_options
++ INTERFACE
++ desktop-app::external_jemalloc
++ )
++endif()
+
+ if (DESKTOP_APP_USE_PACKAGED)
+ find_library(ATOMIC_LIBRARY atomic)
+--- tdesktop-2.8.9-full.orig/cmake/variables.cmake
++++ tdesktop-2.8.9-full/cmake/variables.cmake
+@@ -38,6 +38,7 @@
+ 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_JEMALLOC "Disable use of the jemalloc allocator (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-disable-webkit-separately.patch b/net-im/telegram-desktop/files/tdesktop-2.8.9-disable-webkit-separately.patch
new file mode 100644
index 00000000000..388e09fa58d
--- /dev/null
+++ b/net-im/telegram-desktop/files/tdesktop-2.8.9-disable-webkit-separately.patch
@@ -0,0 +1,122 @@
+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
new file mode 100644
index 00000000000..02c96d28b2c
--- /dev/null
+++ b/net-im/telegram-desktop/files/tdesktop-2.8.9-webview-fix-glib.patch
@@ -0,0 +1,31 @@
+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.10.ebuild b/net-im/telegram-desktop/telegram-desktop-2.8.10.ebuild
new file mode 100644
index 00000000000..375320d4583
--- /dev/null
+++ b/net-im/telegram-desktop/telegram-desktop-2.8.10.ebuild
@@ -0,0 +1,147 @@
+# 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"
+IUSE="+dbus enchant +gtk +hunspell +jemalloc +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/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
+ 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:= )
+ jemalloc? ( dev-libs/jemalloc:= )
+ 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 going to attempt upstreaming this after the reaction to
+ # "disable-webkit-separately"
+ "${FILESDIR}/tdesktop-2.8.9-disable-jemalloc-separately.patch"
+ # Not a proper fix, not upstreamed
+ "${FILESDIR}/tdesktop-2.8.9-webview-fix-glib.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_JEMALLOC=$(usex jemalloc 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 'gtk' useflag if you have image copy-paste problems"
+}
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-im/telegram-desktop/files/, net-im/telegram-desktop/
@ 2021-06-28 8:38 Georgy Yakovlev
0 siblings, 0 replies; 38+ messages in thread
From: Georgy Yakovlev @ 2021-06-28 8:38 UTC (permalink / raw
To: gentoo-commits
commit: a0466f136f37558b7d5e1784e0a9c6af894cff87
Author: Esteve Varela Colominas <esteve.varela <AT> gmail <DOT> com>
AuthorDate: Sun Jun 27 22:24:14 2021 +0000
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Mon Jun 28 08:38:36 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a0466f13
net-im/telegram-desktop: Drop old
Signed-off-by: Esteve Varela Colominas <esteve.varela <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/21450
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
net-im/telegram-desktop/Manifest | 1 -
.../telegram-desktop/files/fix-tgcalls-gcc10.patch | 34 -----
...esktop-2.7.1-fix-disable-dbus-integration.patch | 15 ---
.../telegram-desktop-2.7.1-r2.ebuild | 137 ---------------------
4 files changed, 187 deletions(-)
diff --git a/net-im/telegram-desktop/Manifest b/net-im/telegram-desktop/Manifest
index 106a3dc4e8b..96744242fc0 100644
--- a/net-im/telegram-desktop/Manifest
+++ b/net-im/telegram-desktop/Manifest
@@ -1,3 +1,2 @@
-DIST tdesktop-2.7.1-full.tar.gz 36770178 BLAKE2B 21379cc970da07725e7a46d18a4f0bc459b1da1b730587595448b8f78133ce701e374e7faefc649a973342c203eee510872b5a4ed2ff6be92daec25157e400a4 SHA512 dffd184c4369c5c5947b1ca085add533e54313ce39aebcdca4f0958431a305aa5e95c2f2b48592f6992e666b2d33eeba5697f9e09f6048a53b807f2950fbd17b
DIST tdesktop-2.7.4-full.tar.gz 36894673 BLAKE2B e04749fb0168f8bae69a9ad85c5bff315faf0b355ff5f3a85a34ee36e3305c6b550553284d5179aff9283bbd1a94f9ec3c41e293d0ad8c86e4d08283189e42b3 SHA512 0a796d7a8c5e5982bc60f19c41da53996a609bf794fad224e7beea5fc3816b5cf35f16b0ec2cc7279085c69996063a44085f48e1596dfe746d260a2e8f1b2d14
DIST tdesktop-2.8.1-full.tar.gz 37129127 BLAKE2B 06f2a3050f0e0f321c766c54e19faf3ea172c41088e2ffdbb5928a41ba01de1fc845a84addded17d113316857c68f265642a8ab32feb79a87beef548c739b56c SHA512 df35cc00dc47a8c65b32b62c139cc3a49333f573aa88fb70cc65197524f9b9b4756c58752866c843704ea4df5d6224eb4cba5b32953dd9a4d721b0ee0e1efc69
diff --git a/net-im/telegram-desktop/files/fix-tgcalls-gcc10.patch b/net-im/telegram-desktop/files/fix-tgcalls-gcc10.patch
deleted file mode 100644
index ac7e067f3ab..00000000000
--- a/net-im/telegram-desktop/files/fix-tgcalls-gcc10.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From eded7cc540123eaf26361958b9a61c65cb2f7cfc Mon Sep 17 00:00:00 2001
-From: John Preston <johnprestonmail@gmail.com>
-Date: Mon, 22 Mar 2021 19:24:10 +0400
-Subject: [PATCH] Fix build on GCC 10, second attempt.
-
----
- tgcalls/group/StreamingPart.cpp | 1 -
- tgcalls/group/StreamingPart.h | 1 +
- 2 files changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/tgcalls/group/StreamingPart.cpp b/tgcalls/group/StreamingPart.cpp
-index a7f2e00..6b0206f 100644
---- a/tgcalls/group/StreamingPart.cpp
-+++ b/tgcalls/group/StreamingPart.cpp
-@@ -12,7 +12,6 @@ extern "C" {
- #include <string>
- #include <set>
- #include <map>
--#include <stdint.h>
-
- namespace tgcalls {
-
-diff --git a/tgcalls/group/StreamingPart.h b/tgcalls/group/StreamingPart.h
-index 08859d6..6e0812c 100644
---- a/tgcalls/group/StreamingPart.h
-+++ b/tgcalls/group/StreamingPart.h
-@@ -3,6 +3,7 @@
-
- #include "absl/types/optional.h"
- #include <vector>
-+#include <stdint.h>
-
- namespace tgcalls {
-
diff --git a/net-im/telegram-desktop/files/tdesktop-2.7.1-fix-disable-dbus-integration.patch b/net-im/telegram-desktop/files/tdesktop-2.7.1-fix-disable-dbus-integration.patch
deleted file mode 100644
index 8563ee5fdca..00000000000
--- a/net-im/telegram-desktop/files/tdesktop-2.7.1-fix-disable-dbus-integration.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- tdesktop-2.7.1-full.orig/Telegram/SourceFiles/platform/linux/specific_linux.cpp
-+++ tdesktop-2.7.1-full/Telegram/SourceFiles/platform/linux/specific_linux.cpp
-@@ -754,10 +754,12 @@ void InstallLauncher(bool force) {
-
- void RegisterCustomScheme(bool force) {
- try {
-+#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
- if (InSnap()) {
- SnapDefaultHandler(qsl("tg"));
- return;
- }
-+#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION
-
- if (cExeName().isEmpty()) {
- return;
diff --git a/net-im/telegram-desktop/telegram-desktop-2.7.1-r2.ebuild b/net-im/telegram-desktop/telegram-desktop-2.7.1-r2.ebuild
deleted file mode 100644
index ef9ecd0fd65..00000000000
--- a/net-im/telegram-desktop/telegram-desktop-2.7.1-r2.ebuild
+++ /dev/null
@@ -1,137 +0,0 @@
-# Copyright 2020-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{7,8,9} )
-
-inherit xdg cmake python-any-r1 flag-o-matic
-
-MY_P="tdesktop-${PV}-full"
-
-DESCRIPTION="Official desktop client for Telegram"
-HOMEPAGE="https://desktop.telegram.org"
-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 pulseaudio +spell wayland +X"
-
-RDEPEND="
- !net-im/telegram-desktop-bin
- app-arch/lz4:=
- dev-cpp/glibmm:2
- dev-libs/xxhash
- dev-qt/qtcore:5
- dev-qt/qtgui:5[dbus?,jpeg,png,wayland?,X(-)?]
- dev-qt/qtimageformats:5
- dev-qt/qtnetwork:5[ssl]
- dev-qt/qtsvg:5
- dev-qt/qtwidgets:5[png,X(-)?]
- media-fonts/open-sans
- media-libs/fontconfig:=
- media-libs/opus:=
- ~media-libs/libtgvoip-2.4.4_p20210302[pulseaudio=]
- media-libs/openal[alsa]
- ~media-libs/tg_owt-0_pre20210309[pulseaudio=]
- media-video/ffmpeg:=[alsa,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?] )
- hunspell? ( >=app-text/hunspell-1.7:= )
- wayland? ( kde-frameworks/kwayland:= )
- 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
-"
-
-REQUIRED_USE="
- spell? (
- ^^ ( enchant hunspell )
- )
-"
-
-S="${WORKDIR}/${MY_P}"
-
-PATCHES=(
- "${FILESDIR}/tdesktop-2.7.1-fix-disable-dbus-integration.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() {
- cd "${S}/Telegram/ThirdParty/tgcalls" || die
- eapply "${FILESDIR}/fix-tgcalls-gcc10.patch"
-
- cd "${S}" || die
- # 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_GTK_INTEGRATION=$(usex gtk OFF ON)
- -DDESKTOP_APP_DISABLE_DBUS_INTEGRATION=$(usex dbus 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 || einfo "enable 'gtk' useflag if you have image copy-paste problems"
-}
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-im/telegram-desktop/files/, net-im/telegram-desktop/
@ 2021-06-03 2:11 Stefan Strogin
0 siblings, 0 replies; 38+ messages in thread
From: Stefan Strogin @ 2021-06-03 2:11 UTC (permalink / raw
To: gentoo-commits
commit: 1c91884873968997be4b0c954169d04dc839f1db
Author: Stefan Strogin <steils <AT> gentoo <DOT> org>
AuthorDate: Thu Jun 3 02:07:03 2021 +0000
Commit: Stefan Strogin <steils <AT> gentoo <DOT> org>
CommitDate: Thu Jun 3 02:11:10 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1c918848
net-im/telegram-desktop: add patch to fix crash on voice recording
- Don't crash on voice recording error.
- Fix voice recoding with FFmpeg 4.4.
See also: https://github.com/telegramdesktop/tdesktop/issues/16217
Package-Manager: Portage-3.0.19, Repoman-3.0.3
Signed-off-by: Stefan Strogin <steils <AT> gentoo.org>
.../files/tdesktop-2.7.4-voice-crash.patch | 262 +++++++++++++++++++++
.../files/tdesktop-2.7.4-voice-ffmpeg44.patch | 25 ++
.../telegram-desktop-2.7.4-r1.ebuild | 144 +++++++++++
3 files changed, 431 insertions(+)
diff --git a/net-im/telegram-desktop/files/tdesktop-2.7.4-voice-crash.patch b/net-im/telegram-desktop/files/tdesktop-2.7.4-voice-crash.patch
new file mode 100644
index 00000000000..41e447989cb
--- /dev/null
+++ b/net-im/telegram-desktop/files/tdesktop-2.7.4-voice-crash.patch
@@ -0,0 +1,262 @@
+From 71deaa48afab2bcf9df67b9b347b1f44aad3a9ce Mon Sep 17 00:00:00 2001
+From: John Preston <johnprestonmail@gmail.com>
+Date: Thu, 13 May 2021 15:17:54 +0400
+Subject: [PATCH] Don't crash on voice recording error.
+
+Fixes #16217.
+---
+ .../media/audio/media_audio_capture.cpp | 89 +++++++++++--------
+ 1 file changed, 54 insertions(+), 35 deletions(-)
+
+diff --git a/Telegram/SourceFiles/media/audio/media_audio_capture.cpp b/Telegram/SourceFiles/media/audio/media_audio_capture.cpp
+index a5965e0d1988..deb2474d7891 100644
+--- a/Telegram/SourceFiles/media/audio/media_audio_capture.cpp
++++ b/Telegram/SourceFiles/media/audio/media_audio_capture.cpp
+@@ -47,17 +47,17 @@ class Instance::Inner final : public QObject {
+ void start(Fn<void(Update)> updated, Fn<void()> error);
+ void stop(Fn<void(Result&&)> callback = nullptr);
+
+- void timeout();
+-
+ private:
+- void processFrame(int32 offset, int32 framesize);
++ void process();
++
++ [[nodiscard]] bool processFrame(int32 offset, int32 framesize);
+ void fail();
+
+- void writeFrame(AVFrame *frame);
++ [[nodiscard]] bool writeFrame(AVFrame *frame);
+
+ // Writes the packets till EAGAIN is got from av_receive_packet()
+ // Returns number of packets written or -1 on error
+- int writePackets();
++ [[nodiscard]] int writePackets();
+
+ Fn<void(Update)> _updated;
+ Fn<void()> _error;
+@@ -150,6 +150,7 @@ struct Instance::Inner::Private {
+ AVCodec *codec = nullptr;
+ AVCodecContext *codecContext = nullptr;
+ bool opened = false;
++ bool processing = false;
+
+ int srcSamples = 0;
+ int dstSamples = 0;
+@@ -217,7 +218,7 @@ struct Instance::Inner::Private {
+
+ Instance::Inner::Inner(QThread *thread)
+ : d(std::make_unique<Private>())
+-, _timer(thread, [=] { timeout(); }) {
++, _timer(thread, [=] { process(); }) {
+ moveToThread(thread);
+ }
+
+@@ -226,10 +227,10 @@ Instance::Inner::~Inner() {
+ }
+
+ void Instance::Inner::fail() {
+- Expects(_error != nullptr);
+-
+ stop();
+- _error();
++ if (const auto error = base::take(_error)) {
++ InvokeQueued(this, error);
++ }
+ }
+
+ void Instance::Inner::start(Fn<void(Update)> updated, Fn<void()> error) {
+@@ -384,13 +385,21 @@ void Instance::Inner::stop(Fn<void(Result&&)> callback) {
+ }
+ _timer.cancel();
+
+- if (d->device) {
++ const auto needResult = (callback != nullptr);
++ const auto hadDevice = (d->device != nullptr);
++ if (hadDevice) {
+ alcCaptureStop(d->device);
+- timeout(); // get last data
++ if (d->processing) {
++ Assert(!needResult); // stop in the middle of processing - error.
++ } else {
++ process(); // get last data
++ }
++ alcCaptureCloseDevice(d->device);
++ d->device = nullptr;
+ }
+
+ // Write what is left
+- if (!_captured.isEmpty()) {
++ if (needResult && !_captured.isEmpty()) {
+ auto fadeSamples = kCaptureFadeInDuration * kCaptureFrequency / 1000;
+ auto capturedSamples = static_cast<int>(_captured.size() / sizeof(short));
+ if ((_captured.size() % sizeof(short)) || (d->fullSamples + capturedSamples < kCaptureFrequency) || (capturedSamples < fadeSamples)) {
+@@ -414,11 +423,13 @@ void Instance::Inner::stop(Fn<void(Result&&)> callback) {
+
+ int32 framesize = d->srcSamples * d->codecContext->channels * sizeof(short), encoded = 0;
+ while (_captured.size() >= encoded + framesize) {
+- processFrame(encoded, framesize);
++ if (!processFrame(encoded, framesize)) {
++ break;
++ }
+ encoded += framesize;
+ }
+- writeFrame(nullptr); // drain the codec
+- if (encoded != _captured.size()) {
++ // Drain the codec.
++ if (!writeFrame(nullptr) || encoded != _captured.size()) {
+ d->fullSamples = 0;
+ d->dataPos = 0;
+ d->data.clear();
+@@ -436,14 +447,14 @@ void Instance::Inner::stop(Fn<void(Result&&)> callback) {
+ _captured = QByteArray();
+
+ // Finish stream
+- if (d->device) {
++ if (needResult && hadDevice) {
+ av_write_trailer(d->fmtContext);
+ }
+
+ QByteArray result = d->fullSamples ? d->data : QByteArray();
+ VoiceWaveform waveform;
+ qint32 samples = d->fullSamples;
+- if (samples && !d->waveform.isEmpty()) {
++ if (needResult && samples && !d->waveform.isEmpty()) {
+ int64 count = d->waveform.size(), sum = 0;
+ if (count >= Player::kWaveformSamplesCount) {
+ QVector<uint16> peaks;
+@@ -472,11 +483,7 @@ void Instance::Inner::stop(Fn<void(Result&&)> callback) {
+ }
+ }
+ }
+- if (d->device) {
+- alcCaptureStop(d->device);
+- alcCaptureCloseDevice(d->device);
+- d->device = nullptr;
+-
++ if (hadDevice) {
+ if (d->codecContext) {
+ avcodec_free_context(&d->codecContext);
+ d->codecContext = nullptr;
+@@ -528,12 +535,17 @@ void Instance::Inner::stop(Fn<void(Result&&)> callback) {
+ d->waveform.clear();
+ }
+
+- if (callback) {
++ if (needResult) {
+ callback({ result, waveform, samples });
+ }
+ }
+
+-void Instance::Inner::timeout() {
++void Instance::Inner::process() {
++ Expects(!d->processing);
++
++ d->processing = true;
++ const auto guard = gsl::finally([&] { d->processing = false; });
++
+ if (!d->device) {
+ _timer.cancel();
+ return;
+@@ -582,7 +594,9 @@ void Instance::Inner::timeout() {
+ // Write frames
+ int32 framesize = d->srcSamples * d->codecContext->channels * sizeof(short), encoded = 0;
+ while (uint32(_captured.size()) >= encoded + framesize + fadeSamples * sizeof(short)) {
+- processFrame(encoded, framesize);
++ if (!processFrame(encoded, framesize)) {
++ return;
++ }
+ encoded += framesize;
+ }
+
+@@ -597,13 +611,13 @@ void Instance::Inner::timeout() {
+ }
+ }
+
+-void Instance::Inner::processFrame(int32 offset, int32 framesize) {
++bool Instance::Inner::processFrame(int32 offset, int32 framesize) {
+ // Prepare audio frame
+
+ if (framesize % sizeof(short)) { // in the middle of a sample
+ LOG(("Audio Error: Bad framesize in writeFrame() for capture, framesize %1, %2").arg(framesize));
+ fail();
+- return;
++ return false;
+ }
+ auto samplesCnt = static_cast<int>(framesize / sizeof(short));
+
+@@ -650,7 +664,7 @@ void Instance::Inner::processFrame(int32 offset, int32 framesize) {
+ if ((res = av_samples_alloc(d->dstSamplesData, 0, d->codecContext->channels, d->dstSamples, d->codecContext->sample_fmt, 1)) < 0) {
+ LOG(("Audio Error: Unable to av_samples_alloc for capture, error %1, %2").arg(res).arg(av_make_error_string(err, sizeof(err), res)));
+ fail();
+- return;
++ return false;
+ }
+ d->dstSamplesSize = av_samples_get_buffer_size(0, d->codecContext->channels, d->maxDstSamples, d->codecContext->sample_fmt, 0);
+ }
+@@ -658,7 +672,7 @@ void Instance::Inner::processFrame(int32 offset, int32 framesize) {
+ if ((res = swr_convert(d->swrContext, d->dstSamplesData, d->dstSamples, (const uint8_t **)srcSamplesData, d->srcSamples)) < 0) {
+ LOG(("Audio Error: Unable to swr_convert for capture, error %1, %2").arg(res).arg(av_make_error_string(err, sizeof(err), res)));
+ fail();
+- return;
++ return false;
+ }
+
+ // Write audio frame
+@@ -670,45 +684,50 @@ void Instance::Inner::processFrame(int32 offset, int32 framesize) {
+
+ avcodec_fill_audio_frame(frame, d->codecContext->channels, d->codecContext->sample_fmt, d->dstSamplesData[0], d->dstSamplesSize, 0);
+
+- writeFrame(frame);
++ if (!writeFrame(frame)) {
++ return false;
++ }
+
+ d->fullSamples += samplesCnt;
+
+ av_frame_free(&frame);
++ return true;
+ }
+
+-void Instance::Inner::writeFrame(AVFrame *frame) {
++bool Instance::Inner::writeFrame(AVFrame *frame) {
+ int res = 0;
+ char err[AV_ERROR_MAX_STRING_SIZE] = { 0 };
+
+ res = avcodec_send_frame(d->codecContext, frame);
+ if (res == AVERROR(EAGAIN)) {
+- int packetsWritten = writePackets();
++ const auto packetsWritten = writePackets();
+ if (packetsWritten < 0) {
+ if (frame && packetsWritten == AVERROR_EOF) {
+ LOG(("Audio Error: EOF in packets received when EAGAIN was got in avcodec_send_frame()"));
+ fail();
+ }
+- return;
++ return false;
+ } else if (!packetsWritten) {
+ LOG(("Audio Error: No packets received when EAGAIN was got in avcodec_send_frame()"));
+ fail();
+- return;
++ return false;
+ }
+ res = avcodec_send_frame(d->codecContext, frame);
+ }
+ if (res < 0) {
+ LOG(("Audio Error: Unable to avcodec_send_frame for capture, error %1, %2").arg(res).arg(av_make_error_string(err, sizeof(err), res)));
+ fail();
+- return;
++ return false;
+ }
+
+ if (!frame) { // drain
+ if ((res = writePackets()) != AVERROR_EOF) {
+ LOG(("Audio Error: not EOF in packets received when draining the codec, result %1").arg(res));
+ fail();
++ return false;
+ }
+ }
++ return true;
+ }
+
+ int Instance::Inner::writePackets() {
diff --git a/net-im/telegram-desktop/files/tdesktop-2.7.4-voice-ffmpeg44.patch b/net-im/telegram-desktop/files/tdesktop-2.7.4-voice-ffmpeg44.patch
new file mode 100644
index 00000000000..4156956032d
--- /dev/null
+++ b/net-im/telegram-desktop/files/tdesktop-2.7.4-voice-ffmpeg44.patch
@@ -0,0 +1,25 @@
+From a8807bc915f2439acc7c84f06d931d96d6ca602a Mon Sep 17 00:00:00 2001
+From: John Preston <johnprestonmail@gmail.com>
+Date: Thu, 13 May 2021 15:33:42 +0400
+Subject: [PATCH] Fix voice recoding with FFmpeg 4.4.
+
+Fixes #16217.
+---
+ Telegram/SourceFiles/media/audio/media_audio_capture.cpp | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/Telegram/SourceFiles/media/audio/media_audio_capture.cpp b/Telegram/SourceFiles/media/audio/media_audio_capture.cpp
+index deb2474d789..d129168783d 100644
+--- a/Telegram/SourceFiles/media/audio/media_audio_capture.cpp
++++ b/Telegram/SourceFiles/media/audio/media_audio_capture.cpp
+@@ -679,6 +679,10 @@ bool Instance::Inner::processFrame(int32 offset, int32 framesize) {
+
+ AVFrame *frame = av_frame_alloc();
+
++ frame->format = d->codecContext->sample_fmt;
++ frame->channels = d->codecContext->channels;
++ frame->channel_layout = d->codecContext->channel_layout;
++ frame->sample_rate = d->codecContext->sample_rate;
+ frame->nb_samples = d->dstSamples;
+ frame->pts = av_rescale_q(d->fullSamples, AVRational { 1, d->codecContext->sample_rate }, d->codecContext->time_base);
+
diff --git a/net-im/telegram-desktop/telegram-desktop-2.7.4-r1.ebuild b/net-im/telegram-desktop/telegram-desktop-2.7.4-r1.ebuild
new file mode 100644
index 00000000000..095e7419b7c
--- /dev/null
+++ b/net-im/telegram-desktop/telegram-desktop-2.7.4-r1.ebuild
@@ -0,0 +1,144 @@
+# Copyright 2020-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7,8,9} )
+
+inherit xdg cmake python-any-r1 flag-o-matic
+
+MY_P="tdesktop-${PV}-full"
+
+DESCRIPTION="Official desktop client for Telegram"
+HOMEPAGE="https://desktop.telegram.org"
+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 +spell wayland webkit +X"
+
+RDEPEND="
+ !net-im/telegram-desktop-bin
+ app-arch/lz4:=
+ dev-cpp/glibmm:2
+ dev-libs/xxhash
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5[dbus?,jpeg,png,wayland?,X(-)?]
+ dev-qt/qtimageformats:5
+ dev-qt/qtnetwork:5[ssl]
+ dev-qt/qtsvg:5
+ dev-qt/qtwidgets:5[png,X(-)?]
+ media-fonts/open-sans
+ media-libs/fontconfig:=
+ media-libs/opus:=
+ ~media-libs/libtgvoip-2.4.4_p20210302
+ media-libs/openal
+ ~media-libs/tg_owt-0_pre20210422
+ 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?] )
+ 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
+"
+REQUIRED_USE="
+ spell? (
+ ^^ ( enchant hunspell )
+ )
+"
+
+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.7.3-disable-webkit-separately.patch"
+ # https://github.com/desktop-app/lib_webview/commit/0b4100d7cecc4e748c51f3f51ebfd1392ec3978a
+ "${FILESDIR}/tdesktop-2.7.3-webview-include-gdkx.patch"
+ # https://github.com/desktop-app/lib_webview/pull/3
+ "${FILESDIR}/tdesktop-2.7.4-webview-fix-gcc11.patch"
+
+ # https://github.com/telegramdesktop/tdesktop/issues/16217
+ "${FILESDIR}/tdesktop-2.7.4-voice-crash.patch"
+ "${FILESDIR}/tdesktop-2.7.4-voice-ffmpeg44.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_INTEGRATION=$(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 'gtk' useflag if you have image copy-paste problems"
+}
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-im/telegram-desktop/files/, net-im/telegram-desktop/
@ 2021-05-03 17:01 Georgy Yakovlev
0 siblings, 0 replies; 38+ messages in thread
From: Georgy Yakovlev @ 2021-05-03 17:01 UTC (permalink / raw
To: gentoo-commits
commit: f54e597c8b62c21a2e1fc1df07a425872b78383b
Author: Esteve Varela Colominas <esteve.varela <AT> gmail <DOT> com>
AuthorDate: Wed Apr 28 12:42:46 2021 +0000
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Mon May 3 17:01:38 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f54e597c
net-im/telegram-desktop: bump to 2.7.4
Also removed now-defunct alsa/pulseaudio dependencies. Telegram uses
openal these days.
Signed-off-by: Esteve Varela Colominas <esteve.varela <AT> gmail.com>
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
net-im/telegram-desktop/Manifest | 1 +
.../tdesktop-2.7.3-disable-webkit-separately.patch | 80 ++++++++++++
.../tdesktop-2.7.3-webview-include-gdkx.patch | 12 ++
.../telegram-desktop/telegram-desktop-2.7.4.ebuild | 135 +++++++++++++++++++++
4 files changed, 228 insertions(+)
diff --git a/net-im/telegram-desktop/Manifest b/net-im/telegram-desktop/Manifest
index 9e1071af1e4..5e50ddbe47e 100644
--- a/net-im/telegram-desktop/Manifest
+++ b/net-im/telegram-desktop/Manifest
@@ -1 +1,2 @@
DIST tdesktop-2.7.1-full.tar.gz 36770178 BLAKE2B 21379cc970da07725e7a46d18a4f0bc459b1da1b730587595448b8f78133ce701e374e7faefc649a973342c203eee510872b5a4ed2ff6be92daec25157e400a4 SHA512 dffd184c4369c5c5947b1ca085add533e54313ce39aebcdca4f0958431a305aa5e95c2f2b48592f6992e666b2d33eeba5697f9e09f6048a53b807f2950fbd17b
+DIST tdesktop-2.7.4-full.tar.gz 36894673 BLAKE2B e04749fb0168f8bae69a9ad85c5bff315faf0b355ff5f3a85a34ee36e3305c6b550553284d5179aff9283bbd1a94f9ec3c41e293d0ad8c86e4d08283189e42b3 SHA512 0a796d7a8c5e5982bc60f19c41da53996a609bf794fad224e7beea5fc3816b5cf35f16b0ec2cc7279085c69996063a44085f48e1596dfe746d260a2e8f1b2d14
diff --git a/net-im/telegram-desktop/files/tdesktop-2.7.3-disable-webkit-separately.patch b/net-im/telegram-desktop/files/tdesktop-2.7.3-disable-webkit-separately.patch
new file mode 100644
index 00000000000..a143071401a
--- /dev/null
+++ b/net-im/telegram-desktop/files/tdesktop-2.7.3-disable-webkit-separately.patch
@@ -0,0 +1,80 @@
+Index: tdesktop-2.7.3-full/Telegram/lib_webview/CMakeLists.txt
+===================================================================
+--- tdesktop-2.7.3-full.orig/Telegram/lib_webview/CMakeLists.txt
++++ tdesktop-2.7.3-full/Telegram/lib_webview/CMakeLists.txt
+@@ -116,7 +116,7 @@ if (WIN32)
+ desktop-app::lib_webview_winrt
+ )
+ elseif (LINUX)
+- if (NOT DESKTOP_APP_DISABLE_GTK_INTEGRATION)
++ if (NOT DESKTOP_APP_DISABLE_WEBKIT_INTEGRATION)
+ find_package(PkgConfig REQUIRED)
+
+ if (DESKTOP_APP_USE_PACKAGED AND NOT DESKTOP_APP_USE_PACKAGED_LAZY)
+Index: tdesktop-2.7.3-full/Telegram/lib_webview/webview/platform/linux/webview_linux.cpp
+===================================================================
+--- tdesktop-2.7.3-full.orig/Telegram/lib_webview/webview/platform/linux/webview_linux.cpp
++++ tdesktop-2.7.3-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_INTEGRATION
+ return WebKit2Gtk::Availability();
+-#else // !DESKTOP_APP_DISABLE_GTK_INTEGRATION
++#else // !DESKTOP_APP_DISABLE_WEBKIT_INTEGRATION
+ 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_INTEGRATION
+ }
+
+ bool SupportsEmbedAfterCreate() {
+@@ -26,11 +26,11 @@ bool SupportsEmbedAfterCreate() {
+ }
+
+ std::unique_ptr<Interface> CreateInstance(Config config) {
+-#ifndef DESKTOP_APP_DISABLE_GTK_INTEGRATION
++#ifndef DESKTOP_APP_DISABLE_WEBKIT_INTEGRATION
+ return WebKit2Gtk::CreateInstance(std::move(config));
+-#else // !DESKTOP_APP_DISABLE_GTK_INTEGRATION
++#else // !DESKTOP_APP_DISABLE_WEBKIT_INTEGRATION
+ return nullptr;
+-#endif // DESKTOP_APP_DISABLE_GTK_INTEGRATION
++#endif // DESKTOP_APP_DISABLE_WEBKIT_INTEGRATION
+ }
+
+ } // namespace Webview
+Index: tdesktop-2.7.3-full/cmake/options.cmake
+===================================================================
+--- tdesktop-2.7.3-full.orig/cmake/options.cmake
++++ tdesktop-2.7.3-full/cmake/options.cmake
+@@ -49,6 +49,13 @@ if (DESKTOP_APP_DISABLE_GTK_INTEGRATION)
+ )
+ endif()
+
++if (DESKTOP_APP_DISABLE_WEBKIT_INTEGRATION)
++ target_compile_definitions(common_options
++ INTERFACE
++ DESKTOP_APP_DISABLE_WEBKIT_INTEGRATION
++ )
++endif()
++
+ if (DESKTOP_APP_USE_PACKAGED)
+ target_compile_definitions(common_options
+ INTERFACE
+Index: tdesktop-2.7.3-full/cmake/variables.cmake
+===================================================================
+--- tdesktop-2.7.3-full.orig/cmake/variables.cmake
++++ tdesktop-2.7.3-full/cmake/variables.cmake
+@@ -32,6 +32,7 @@ option(DESKTOP_APP_DISABLE_DBUS_INTEGRAT
+ option(DESKTOP_APP_DISABLE_X11_INTEGRATION "Disable all code for X11 integration (Linux only)." OFF)
+ option(DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION "Disable all code for Wayland integration (Linux only)." OFF)
+ option(DESKTOP_APP_DISABLE_GTK_INTEGRATION "Disable all code for GTK integration (Linux only)." OFF)
++option(DESKTOP_APP_DISABLE_WEBKIT_INTEGRATION "Disable all code for WebkitGTK integration (Linux only)." OFF)
+ option(DESKTOP_APP_USE_GLIBC_WRAPS "Use wraps for new GLIBC features." OFF)
+ option(DESKTOP_APP_USE_PACKAGED "Find libraries using CMake instead of exact paths." ${no_special_target})
+ option(DESKTOP_APP_USE_PACKAGED_LAZY "Bundle recommended Qt plugins for self-contained packages. (Linux only)" OFF)
diff --git a/net-im/telegram-desktop/files/tdesktop-2.7.3-webview-include-gdkx.patch b/net-im/telegram-desktop/files/tdesktop-2.7.3-webview-include-gdkx.patch
new file mode 100644
index 00000000000..2f06bda3272
--- /dev/null
+++ b/net-im/telegram-desktop/files/tdesktop-2.7.3-webview-include-gdkx.patch
@@ -0,0 +1,12 @@
+Index: tdesktop-2.7.3-full/Telegram/lib_webview/webview/platform/linux/webview_linux_webkit_gtk.h
+===================================================================
+--- tdesktop-2.7.3-full.orig/Telegram/lib_webview/webview/platform/linux/webview_linux_webkit_gtk.h
++++ tdesktop-2.7.3-full/Telegram/lib_webview/webview/platform/linux/webview_linux_webkit_gtk.h
+@@ -12,6 +12,7 @@ extern "C" {
+ #undef signals
+ #include <JavaScriptCore/JavaScript.h>
+ #include <gtk/gtk.h>
++#include <gdk/gdkx.h>
+ #include <webkit2/webkit2.h>
+ #include <X11/Xlib.h>
+ #define signals public
diff --git a/net-im/telegram-desktop/telegram-desktop-2.7.4.ebuild b/net-im/telegram-desktop/telegram-desktop-2.7.4.ebuild
new file mode 100644
index 00000000000..63ffd479879
--- /dev/null
+++ b/net-im/telegram-desktop/telegram-desktop-2.7.4.ebuild
@@ -0,0 +1,135 @@
+# Copyright 2020-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7,8,9} )
+
+inherit xdg cmake python-any-r1 flag-o-matic
+
+MY_P="tdesktop-${PV}-full"
+
+DESCRIPTION="Official desktop client for Telegram"
+HOMEPAGE="https://desktop.telegram.org"
+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 +spell wayland webkit +X"
+
+RDEPEND="
+ !net-im/telegram-desktop-bin
+ app-arch/lz4:=
+ dev-cpp/glibmm:2
+ dev-libs/xxhash
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5[dbus?,jpeg,png,wayland?,X(-)?]
+ dev-qt/qtimageformats:5
+ dev-qt/qtnetwork:5[ssl]
+ dev-qt/qtsvg:5
+ dev-qt/qtwidgets:5[png,X(-)?]
+ media-fonts/open-sans
+ media-libs/fontconfig:=
+ media-libs/opus:=
+ ~media-libs/libtgvoip-2.4.4_p20210302
+ media-libs/openal
+ ~media-libs/tg_owt-0_pre20210422
+ 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?] )
+ 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
+"
+REQUIRED_USE="
+ spell? (
+ ^^ ( enchant hunspell )
+ )
+"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+ "${FILESDIR}/tdesktop-2.7.3-disable-webkit-separately.patch"
+ "${FILESDIR}/tdesktop-2.7.3-webview-include-gdkx.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_INTEGRATION=$(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 'gtk' useflag if you have image copy-paste problems"
+}
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-im/telegram-desktop/files/, net-im/telegram-desktop/
@ 2021-03-25 19:31 Georgy Yakovlev
0 siblings, 0 replies; 38+ messages in thread
From: Georgy Yakovlev @ 2021-03-25 19:31 UTC (permalink / raw
To: gentoo-commits
commit: 5c9fc1812e0f19b6c730883c4a74f6e01e90909a
Author: Esteve Varela Colominas <esteve.varela <AT> gmail <DOT> com>
AuthorDate: Thu Mar 25 17:34:05 2021 +0000
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Thu Mar 25 19:29:48 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5c9fc181
net-im/telegram-desktop: Take maintainership, bump to 2.7.1
Bug: https://bugs.gentoo.org/763522
Closes: https://github.com/gentoo/gentoo/pull/20117
Signed-off-by: Esteve Varela Colominas <esteve.varela <AT> gmail.com>
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
net-im/telegram-desktop/Manifest | 1 +
.../telegram-desktop/files/fix-tgcalls-gcc10.patch | 34 ++++++
net-im/telegram-desktop/metadata.xml | 9 +-
.../telegram-desktop/telegram-desktop-2.7.1.ebuild | 132 +++++++++++++++++++++
4 files changed, 175 insertions(+), 1 deletion(-)
diff --git a/net-im/telegram-desktop/Manifest b/net-im/telegram-desktop/Manifest
index a4e9ec30a02..dac600068a1 100644
--- a/net-im/telegram-desktop/Manifest
+++ b/net-im/telegram-desktop/Manifest
@@ -1,2 +1,3 @@
DIST tdesktop-2.4.11-full.tar.gz 36405312 BLAKE2B 7c4239d4a2193c910aeb918f40d4c196702bffb4236f7702a5573840b8d4a1a9183e3c91fd97c5d9e4ab5950d96e99b427746ffb18ed5bbef16b240dfc873e2e SHA512 b6452c39ea1b1b794c61ec2fc700356c9ee314250d73b895d297ad66602a93676d3cf74d695ac53965719ddb54da9e290f4f638bbf2e0fb21fec8995b6788a1c
DIST tdesktop-2.4.7-full.tar.gz 36355613 BLAKE2B 5b60bddd81d5472aaa303817be280604d5dcb4a5f7260c6b6fbd7ca075a46972adb4439e58e2f5b7877c10b3cb6420a7bc95ffe36ab0b3cf531a46758046f7c1 SHA512 712ab6896f89f7df0c7ac297039ee3b3532c159e17f66e4539b701a35d04d4709b558755d592d3cd91df541a2d2ca9f0485cf073c32f0b69a18848ab2ccd1993
+DIST tdesktop-2.7.1-full.tar.gz 36770178 BLAKE2B 21379cc970da07725e7a46d18a4f0bc459b1da1b730587595448b8f78133ce701e374e7faefc649a973342c203eee510872b5a4ed2ff6be92daec25157e400a4 SHA512 dffd184c4369c5c5947b1ca085add533e54313ce39aebcdca4f0958431a305aa5e95c2f2b48592f6992e666b2d33eeba5697f9e09f6048a53b807f2950fbd17b
diff --git a/net-im/telegram-desktop/files/fix-tgcalls-gcc10.patch b/net-im/telegram-desktop/files/fix-tgcalls-gcc10.patch
new file mode 100644
index 00000000000..ac7e067f3ab
--- /dev/null
+++ b/net-im/telegram-desktop/files/fix-tgcalls-gcc10.patch
@@ -0,0 +1,34 @@
+From eded7cc540123eaf26361958b9a61c65cb2f7cfc Mon Sep 17 00:00:00 2001
+From: John Preston <johnprestonmail@gmail.com>
+Date: Mon, 22 Mar 2021 19:24:10 +0400
+Subject: [PATCH] Fix build on GCC 10, second attempt.
+
+---
+ tgcalls/group/StreamingPart.cpp | 1 -
+ tgcalls/group/StreamingPart.h | 1 +
+ 2 files changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tgcalls/group/StreamingPart.cpp b/tgcalls/group/StreamingPart.cpp
+index a7f2e00..6b0206f 100644
+--- a/tgcalls/group/StreamingPart.cpp
++++ b/tgcalls/group/StreamingPart.cpp
+@@ -12,7 +12,6 @@ extern "C" {
+ #include <string>
+ #include <set>
+ #include <map>
+-#include <stdint.h>
+
+ namespace tgcalls {
+
+diff --git a/tgcalls/group/StreamingPart.h b/tgcalls/group/StreamingPart.h
+index 08859d6..6e0812c 100644
+--- a/tgcalls/group/StreamingPart.h
++++ b/tgcalls/group/StreamingPart.h
+@@ -3,6 +3,7 @@
+
+ #include "absl/types/optional.h"
+ #include <vector>
++#include <stdint.h>
+
+ namespace tgcalls {
+
diff --git a/net-im/telegram-desktop/metadata.xml b/net-im/telegram-desktop/metadata.xml
index e70b218c5a4..81134efc2a6 100644
--- a/net-im/telegram-desktop/metadata.xml
+++ b/net-im/telegram-desktop/metadata.xml
@@ -1,7 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <!-- maintainer-needed -->
+ <maintainer type="person" proxied="yes">
+ <email>esteve.varela@gmail.com</email>
+ <name>Esteve Varela Colominas</name>
+ </maintainer>
+ <maintainer type="project" proxied="proxy">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
<use>
<flag name="enchant">Enable the app-text/aspell spell-checking backend</flag>
<flag name="hunspell">Enable the app-text/hunspell spell-checking backend</flag>
diff --git a/net-im/telegram-desktop/telegram-desktop-2.7.1.ebuild b/net-im/telegram-desktop/telegram-desktop-2.7.1.ebuild
new file mode 100644
index 00000000000..fe33f5223ac
--- /dev/null
+++ b/net-im/telegram-desktop/telegram-desktop-2.7.1.ebuild
@@ -0,0 +1,132 @@
+# Copyright 2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7,8,9} )
+
+inherit xdg cmake python-any-r1 flag-o-matic
+
+MY_P="tdesktop-${PV}-full"
+
+DESCRIPTION="Official desktop client for Telegram"
+HOMEPAGE="https://desktop.telegram.org"
+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 libressl pulseaudio +spell wayland +X"
+
+RDEPEND="
+ !net-im/telegram-desktop-bin
+ app-arch/lz4:=
+ dev-libs/xxhash
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5[dbus?,jpeg,png,wayland?,X(-)?]
+ dev-qt/qtimageformats:5
+ dev-qt/qtnetwork:5[ssl]
+ dev-qt/qtsvg:5
+ dev-qt/qtwidgets:5[png,X(-)?]
+ media-fonts/open-sans
+ media-libs/fontconfig:=
+ media-libs/opus:=
+ ~media-libs/libtgvoip-2.4.4_p20210302[pulseaudio=]
+ media-libs/openal[alsa]
+ ~media-libs/tg_owt-0_pre20210309[pulseaudio=]
+ media-video/ffmpeg:=[alsa,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?] )
+ hunspell? ( >=app-text/hunspell-1.7:= )
+ wayland? ( kde-frameworks/kwayland:= )
+ 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
+"
+
+REQUIRED_USE="
+ spell? (
+ ^^ ( enchant hunspell )
+ )
+"
+
+S="${WORKDIR}/${MY_P}"
+
+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() {
+ cd "$S/Telegram/ThirdParty/tgcalls" || die
+ eapply "$FILESDIR/fix-tgcalls-gcc10.patch"
+
+ cd "$S"
+ # 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_GTK_INTEGRATION=$(usex gtk OFF ON)
+ -DDESKTOP_APP_DISABLE_DBUS_INTEGRATION=$(usex dbus 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 || einfo "enable 'gtk' useflag if you have image copy-paste problems"
+}
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-im/telegram-desktop/files/, net-im/telegram-desktop/
@ 2020-10-31 21:17 Georgy Yakovlev
0 siblings, 0 replies; 38+ messages in thread
From: Georgy Yakovlev @ 2020-10-31 21:17 UTC (permalink / raw
To: gentoo-commits
commit: 052e291b89bd1ccba37c8ba8cca4c4df8e5266c5
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 31 21:06:29 2020 +0000
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Sat Oct 31 21:14:36 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=052e291b
net-im/telegram-desktop: add webrtc flag back to 2.4.5
Closes: https://bugs.gentoo.org/751481
Thanks-to: Joe Kappus
Package-Manager: Portage-3.0.8, Repoman-3.0.2
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
.../telegram-desktop/files/no-webrtc-build.patch | 96 ++++++++++++++++++++++
net-im/telegram-desktop/metadata.xml | 1 +
.../telegram-desktop/telegram-desktop-2.4.5.ebuild | 16 +++-
3 files changed, 110 insertions(+), 3 deletions(-)
diff --git a/net-im/telegram-desktop/files/no-webrtc-build.patch b/net-im/telegram-desktop/files/no-webrtc-build.patch
new file mode 100644
index 00000000000..8ae4113f440
--- /dev/null
+++ b/net-im/telegram-desktop/files/no-webrtc-build.patch
@@ -0,0 +1,96 @@
+diff --git a/Telegram/SourceFiles/calls/calls_instance.cpp b/Telegram/SourceFiles/calls/calls_instance.cpp
+index e99958109..bb7678d3c 100644
+--- a/Telegram/SourceFiles/calls/calls_instance.cpp
++++ b/Telegram/SourceFiles/calls/calls_instance.cpp
+@@ -350,8 +350,11 @@ std::shared_ptr<tgcalls::VideoCaptureInterface> Instance::getVideoCapture() {
+ return result;
+ }
+ auto result = std::shared_ptr<tgcalls::VideoCaptureInterface>(
++ #ifndef DESKTOP_APP_DISABLE_WEBRTC_INTEGRATION
+ tgcalls::VideoCaptureInterface::Create(
+- Core::App().settings().callVideoInputDeviceId().toStdString()));
++ Core::App().settings().callVideoInputDeviceId().toStdString())
++ #endif
++ );
+ _videoCapture = result;
+ return result;
+ }
+diff --git Telegram/lib_webrtc/CMakeLists.txt b/CMakeLists.txt
+index 47796f1..1f54c21 100644
+--- a/Telegram/lib_webrtc/CMakeLists.txt
++++ b/Telegram/lib_webrtc/CMakeLists.txt
+@@ -14,8 +14,10 @@ target_precompile_headers(lib_webrtc PRIVATE ${src_loc}/webrtc/webrtc_pch.h)
+ nice_target_sources(lib_webrtc ${src_loc}
+ PRIVATE
+ webrtc/webrtc_audio_input_tester.cpp
++ webrtc/webrtc_audio_input_tester_dummy.cpp
+ webrtc/webrtc_audio_input_tester.h
+ webrtc/webrtc_media_devices.cpp
++ webrtc/webrtc_media_devices_dummy.cpp
+ webrtc/webrtc_media_devices.h
+ webrtc/webrtc_video_track.cpp
+ webrtc/webrtc_video_track.h
+@@ -40,10 +42,14 @@ PUBLIC
+ if (DESKTOP_APP_DISABLE_WEBRTC_INTEGRATION)
+ remove_target_sources(lib_webrtc ${src_loc}
+ webrtc/webrtc_video_track.cpp
++ webrtc/webrtc_media_devices.cpp
++ webrtc/webrtc_audio_input_tester.cpp
+ )
+ else()
+ remove_target_sources(lib_webrtc ${src_loc}
+ webrtc/webrtc_video_track_dummy.cpp
++ webrtc/webrtc_media_devices_dummy.cpp
++ webrtc/webrtc_audio_input_tester_dummy.cpp
+ )
+ target_link_libraries(lib_webrtc
+ PRIVATE
+diff --git Telegram/lib_webrtc/webrtc/webrtc_audio_input_tester.h b/webrtc/webrtc_audio_input_tester.h
+index 1ae8d30..008df7e 100644
+--- a/Telegram/lib_webrtc/webrtc/webrtc_audio_input_tester.h
++++ b/Telegram/lib_webrtc/webrtc/webrtc_audio_input_tester.h
+@@ -20,11 +20,13 @@ public:
+ [[nodiscard]] float getAndResetLevel();
+
+ private:
++#ifndef DESKTOP_APP_DISABLE_WEBRTC_INTEGRATION
+ class Impl;
+-
++#endif
+ std::shared_ptr<std::atomic<int>> _maxSample;
++#ifndef DESKTOP_APP_DISABLE_WEBRTC_INTEGRATION
+ crl::object_on_thread<Impl> _impl;
+-
++#endif
+ };
+
+ } // namespace Webrtc
+diff --git Telegram/lib_webrtc/webrtc/webrtc_audio_input_tester_dummy.cpp b/webrtc/webrtc_audio_input_tester_dummy.cpp
+new file mode 100644
+index 0000000..4e47eaa
+--- a//dev/null
++++ b/Telegram/lib_webrtc/webrtc/webrtc_audio_input_tester_dummy.cpp
+@@ -0,0 +1,11 @@
++#include "webrtc/webrtc_audio_input_tester.h"
++
++namespace Webrtc {
++AudioInputTester::AudioInputTester(const QString &deviceId)
++: _maxSample(std::make_shared<std::atomic<int>>(0)) {}
++AudioInputTester::~AudioInputTester() {}
++void AudioInputTester::setDeviceId(const QString &deviceId) {};
++float AudioInputTester::getAndResetLevel() {
++ return _maxSample->exchange(0) / float(INT16_MAX);\
++}
++}
+diff --git Telegram/lib_webrtc/webrtc/webrtc_media_devices_dummy.cpp b/webrtc/webrtc_media_devices_dummy.cpp
+new file mode 100644
+index 0000000..8d5d245
+--- a/dev/null
++++ b/Telegram/lib_webrtc/webrtc/webrtc_media_devices_dummy.cpp
+@@ -0,0 +1,6 @@
++#include "webrtc/webrtc_media_devices.h"
++namespace Webrtc {
++std::vector<VideoInput> GetVideoInputList() { return std::vector<VideoInput>(); };
++std::vector<AudioInput> GetAudioInputList() { return std::vector<AudioInput>(); };
++std::vector<AudioOutput> GetAudioOutputList() { return std::vector<AudioOutput>(); };
++}
diff --git a/net-im/telegram-desktop/metadata.xml b/net-im/telegram-desktop/metadata.xml
index f7ab5b26ef9..4e1022a426d 100644
--- a/net-im/telegram-desktop/metadata.xml
+++ b/net-im/telegram-desktop/metadata.xml
@@ -9,5 +9,6 @@
<flag name="enchant">Enable the app-text/aspell spell-checking backend</flag>
<flag name="hunspell">Enable the app-text/hunspell spell-checking backend</flag>
<flag name="lto">Enable Link Time Optimization (LTO / IPO)</flag>
+ <flag name="webrtc">WebRTC based video call support</flag>
</use>
</pkgmetadata>
diff --git a/net-im/telegram-desktop/telegram-desktop-2.4.5.ebuild b/net-im/telegram-desktop/telegram-desktop-2.4.5.ebuild
index 953d5820864..ca2ff2db3af 100644
--- a/net-im/telegram-desktop/telegram-desktop-2.4.5.ebuild
+++ b/net-im/telegram-desktop/telegram-desktop-2.4.5.ebuild
@@ -17,7 +17,7 @@ SRC_URI="https://github.com/telegramdesktop/tdesktop/releases/download/v${PV}/${
LICENSE="BSD GPL-3-with-openssl-exception LGPL-2+"
SLOT="0"
KEYWORDS="~amd64 ~ppc64"
-IUSE="+dbus enchant +gtk +hunspell libressl lto pulseaudio +spell +X"
+IUSE="+dbus enchant +gtk +hunspell libressl lto pulseaudio +spell +webrtc +X"
RDEPEND="
!net-im/telegram-desktop-bin
@@ -35,11 +35,9 @@ RDEPEND="
media-fonts/open-sans
media-libs/alsa-lib
media-libs/fontconfig:=
- media-libs/libjpeg-turbo:=
~media-libs/libtgvoip-2.4.4_p20201030[pulseaudio=]
media-libs/openal[alsa]
media-libs/opus:=
- ~media-libs/tg_owt-0_pre20201030[pulseaudio=]
media-video/ffmpeg:=[alsa,opus]
sys-libs/zlib[minizip]
virtual/libiconv
@@ -58,6 +56,10 @@ RDEPEND="
hunspell? ( >=app-text/hunspell-1.7:= )
!pulseaudio? ( media-sound/apulse[sdk] )
pulseaudio? ( media-sound/pulseaudio )
+ webrtc? (
+ media-libs/libjpeg-turbo:=
+ ~media-libs/tg_owt-0_pre20201030[pulseaudio=]
+ )
"
DEPEND="
@@ -77,6 +79,7 @@ REQUIRED_USE="
spell? (
^^ ( enchant hunspell )
)
+ webrtc? ( !libressl )
"
S="${WORKDIR}/${MY_P}"
@@ -91,6 +94,12 @@ pkg_pretend() {
fi
}
+src_prepare() {
+ # conditional patching is bad, but we want vanilla telegram with webrtc.
+ use webrtc || local PATCHES=( "${FILESDIR}/no-webrtc-build.patch" )
+ cmake_src_prepare
+}
+
src_configure() {
local mycxxflags=(
-Wno-deprecated-declarations
@@ -116,6 +125,7 @@ src_configure() {
-DTDESKTOP_LAUNCHER_BASENAME="${PN}"
-DDESKTOP_APP_DISABLE_DBUS_INTEGRATION="$(usex dbus OFF ON)"
-DDESKTOP_APP_DISABLE_SPELLCHECK="$(usex spell OFF ON)" # enables hunspell (recommended)
+ -DDESKTOP_APP_DISABLE_WEBRTC_INTEGRATION="$(usex webrtc OFF ON)"
-DDESKTOP_APP_USE_ENCHANT="$(usex enchant ON OFF)" # enables enchant and disables hunspell
$(usex lto "-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON" '')
)
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-im/telegram-desktop/files/, net-im/telegram-desktop/
@ 2020-05-28 6:14 Georgy Yakovlev
0 siblings, 0 replies; 38+ messages in thread
From: Georgy Yakovlev @ 2020-05-28 6:14 UTC (permalink / raw
To: gentoo-commits
commit: 4fd7ae3236efd1834cafd9771e942fc49cc94da2
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Thu May 28 05:57:42 2020 +0000
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Thu May 28 06:06:23 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4fd7ae32
net-im/telegram-desktop: add qt-5.15 include patch
Bug: https://bugs.gentoo.org/725652
Package-Manager: Portage-2.3.100, Repoman-2.3.22
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
.../files/telegram-desktop-qt5.15.patch | 23 ++++++++++++++++++++++
.../telegram-desktop/telegram-desktop-2.1.0.ebuild | 5 ++++-
.../telegram-desktop/telegram-desktop-2.1.7.ebuild | 4 ++++
3 files changed, 31 insertions(+), 1 deletion(-)
diff --git a/net-im/telegram-desktop/files/telegram-desktop-qt5.15.patch b/net-im/telegram-desktop/files/telegram-desktop-qt5.15.patch
new file mode 100644
index 00000000000..80c02b10db2
--- /dev/null
+++ b/net-im/telegram-desktop/files/telegram-desktop-qt5.15.patch
@@ -0,0 +1,23 @@
+diff -ru tdesktop-2.1.7-full.orig/Telegram/lib_ui/ui/effects/animation_value.h tdesktop-2.1.7-full/Telegram/lib_ui/ui/effects/animation_value.h
+--- tdesktop-2.1.7-full.orig/Telegram/lib_ui/ui/effects/animation_value.h 2020-05-24 09:44:41.000000000 +0200
++++ tdesktop-2.1.7-full/Telegram/lib_ui/ui/effects/animation_value.h 2020-05-26 20:31:34.381796057 +0200
+@@ -10,6 +10,8 @@
+
+ #include "ui/style/style_core.h"
+
++#include <QPainterPath>
++
+ namespace anim {
+
+ enum class type {
+diff -ru tdesktop-2.1.7-full.orig/Telegram/lib_ui/ui/effects/cross_animation.cpp tdesktop-2.1.7-full/Telegram/lib_ui/ui/effects/cross_animation.cpp
+--- tdesktop-2.1.7-full.orig/Telegram/lib_ui/ui/effects/cross_animation.cpp 2020-05-24 09:44:41.000000000 +0200
++++ tdesktop-2.1.7-full/Telegram/lib_ui/ui/effects/cross_animation.cpp 2020-05-26 20:32:16.340015129 +0200
+@@ -10,6 +10,7 @@
+ #include "ui/painter.h"
+
+ #include <QtCore/QtMath>
++#include <QPainterPath>
+
+ namespace Ui {
+ namespace {
diff --git a/net-im/telegram-desktop/telegram-desktop-2.1.0.ebuild b/net-im/telegram-desktop/telegram-desktop-2.1.0.ebuild
index 07c9b19ab45..dd038756cdd 100644
--- a/net-im/telegram-desktop/telegram-desktop-2.1.0.ebuild
+++ b/net-im/telegram-desktop/telegram-desktop-2.1.0.ebuild
@@ -70,7 +70,10 @@ REQUIRED_USE="
S="${WORKDIR}/${MY_P}"
-PATCHES=( "${FILESDIR}/${PV}-kde-dir.patch" )
+PATCHES=(
+ "${FILESDIR}/${PV}-kde-dir.patch"
+ "${FILESDIR}/${PN}-qt5.15.patch"
+)
src_configure() {
local mycxxflags=(
diff --git a/net-im/telegram-desktop/telegram-desktop-2.1.7.ebuild b/net-im/telegram-desktop/telegram-desktop-2.1.7.ebuild
index 3206772347b..e031bf3e1e7 100644
--- a/net-im/telegram-desktop/telegram-desktop-2.1.7.ebuild
+++ b/net-im/telegram-desktop/telegram-desktop-2.1.7.ebuild
@@ -69,6 +69,10 @@ REQUIRED_USE="
S="${WORKDIR}/${MY_P}"
+PATCHES=(
+ "${FILESDIR}/${PN}-qt5.15.patch"
+)
+
pkg_pretend() {
if has ccache ${FEATURES}; then
ewarn
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-im/telegram-desktop/files/, net-im/telegram-desktop/
@ 2020-03-31 8:33 Georgy Yakovlev
0 siblings, 0 replies; 38+ messages in thread
From: Georgy Yakovlev @ 2020-03-31 8:33 UTC (permalink / raw
To: gentoo-commits
commit: d5f51442b433ba6fed96314a99307081148c9c41
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Tue Mar 31 08:24:49 2020 +0000
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Tue Mar 31 08:29:54 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d5f51442
net-im/telegram-desktop: bump to 2.0.0
Package-Manager: Portage-2.3.96, Repoman-2.3.22
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
net-im/telegram-desktop/Manifest | 2 +-
net-im/telegram-desktop/files/2.0.0-fixes.patch | 410 +++++++++++++++++++++
...1.9.22.ebuild => telegram-desktop-2.0.0.ebuild} | 4 +
3 files changed, 415 insertions(+), 1 deletion(-)
diff --git a/net-im/telegram-desktop/Manifest b/net-im/telegram-desktop/Manifest
index 2b515917de3..e0809eb234a 100644
--- a/net-im/telegram-desktop/Manifest
+++ b/net-im/telegram-desktop/Manifest
@@ -1,3 +1,3 @@
DIST tdesktop-1.9.14-full.tar.gz 25324084 BLAKE2B 45c071aa573541b6e483d2ae712b7f3b672c1294e8e7e624d9292f7176482f4d68069c35541019dc27fdb1c66134c29fb4d3667f1197e7085e4f8a80c8ca603c SHA512 56efa64048d23b280782b51319c0071c6cef833cb7e2584e52c6e45488577755beb85185ec9187029c425cc8d4c9c1887142687c744697e7731a15abe2846056
DIST tdesktop-1.9.21-full.tar.gz 25848026 BLAKE2B 503e22bcc83a64721aa4c4c6e8bca89c4c976703c338b1615c5ab1599098e98cbd220a94cffdbe24d9c305b44ffef7719ad1c2d2ad81f4ec6edc8377e1afa4ef SHA512 ea02fc69e88ed6244ed420516bb7a93827cb85efaa0a7e9af7562aa1bc29184c5a2102caca8693c976b25d374832e0deb2ccbf00144d5340b5ffacbdc9dcebf1
-DIST tdesktop-1.9.22-full.tar.gz 26103977 BLAKE2B 30f78225f7c1f96a9c96a777ee29e361452a0a4e3c74b3fb54eae003caa29118ff7ee38e7727997150f8d686e94618c387bd45c985e1a7ad8b12f396b3afb3cd SHA512 1fd9b04da02e648bf4e54cb3344b2490f5d7dc08d94e2dc0aa18f0402b96a8a923adaf9a1664393629bc8054ef91ef8ea20e8dd59222da52560a04eb5c541d0d
+DIST tdesktop-2.0.0-full.tar.gz 26106238 BLAKE2B 0634e66384b786cfaf6d3608bdf6f64985bc433a272d6eb86f4e787a9ee7e25dfaae89a6cb0a5aa2e73a2e1f3593a8a776d12457ab90f0a7c3ef6d0f254e254d SHA512 53ea3bb0e1d7cb1fc9d8c8725801295e89f8765b6560f046065dde89aef501d7ddb8aa268aa82f33e3674164a825506c4276cd07c0b59c242dd78ab59d659508
diff --git a/net-im/telegram-desktop/files/2.0.0-fixes.patch b/net-im/telegram-desktop/files/2.0.0-fixes.patch
new file mode 100644
index 00000000000..2040a9da668
--- /dev/null
+++ b/net-im/telegram-desktop/files/2.0.0-fixes.patch
@@ -0,0 +1,410 @@
+From 2f7563767dc7214ec3c9a4d0c4d4b50e62c5927f Mon Sep 17 00:00:00 2001
+From: John Preston <johnprestonmail@gmail.com>
+Date: Mon, 30 Mar 2020 21:04:49 +0400
+Subject: [PATCH 1/3] Fix crash in archive / pinned in folder management.
+
+---
+ Telegram/SourceFiles/history/history.cpp | 16 ++++------------
+ 1 file changed, 4 insertions(+), 12 deletions(-)
+
+diff --git a/Telegram/SourceFiles/history/history.cpp b/Telegram/SourceFiles/history/history.cpp
+index d1d0bcb43c..fa69e0a9de 100644
+--- a/Telegram/SourceFiles/history/history.cpp
++++ b/Telegram/SourceFiles/history/history.cpp
+@@ -1948,12 +1948,6 @@ void History::setFolderPointer(Data::Folder *folder) {
+ const auto wasInList = inChatList();
+ if (wasInList) {
+ removeFromChatList(0, owner().chatsList(this->folder()));
+- for (const auto &filter : filters.list()) {
+- const auto id = filter.id();
+- if (inChatList(id)) {
+- removeFromChatList(id, filters.chatsList(id));
+- }
+- }
+ }
+ const auto was = _folder.value_or(nullptr);
+ _folder = folder;
+@@ -1962,12 +1956,10 @@ void History::setFolderPointer(Data::Folder *folder) {
+ }
+ if (wasInList) {
+ addToChatList(0, owner().chatsList(folder));
+- for (const auto &filter : filters.list()) {
+- if (filter.contains(this)) {
+- const auto id = filter.id();
+- addToChatList(id, filters.chatsList(id));
+- }
+- }
++
++ owner().chatsFilters().refreshHistory(this);
++ updateChatListEntry();
++
+ owner().chatsListChanged(was);
+ owner().chatsListChanged(folder);
+ } else if (!wasKnown) {
+
+From c2ff27793a56241135fde194256a2ebf7bc5ec90 Mon Sep 17 00:00:00 2001
+From: John Preston <johnprestonmail@gmail.com>
+Date: Mon, 30 Mar 2020 23:34:07 +0400
+Subject: [PATCH 2/3] Try to use Ctrl+1..Ctrl+8 for folders.
+
+---
+ Telegram/SourceFiles/core/shortcuts.cpp | 78 ++++++++++++-------
+ Telegram/SourceFiles/core/shortcuts.h | 18 ++---
+ .../dialogs/dialogs_inner_widget.cpp | 60 +++++++-------
+ 3 files changed, 86 insertions(+), 70 deletions(-)
+
+diff --git a/Telegram/SourceFiles/core/shortcuts.cpp b/Telegram/SourceFiles/core/shortcuts.cpp
+index 76bc4bd0d3..f8c10e4ee8 100644
+--- a/Telegram/SourceFiles/core/shortcuts.cpp
++++ b/Telegram/SourceFiles/core/shortcuts.cpp
+@@ -113,7 +113,7 @@ class Manager {
+ void fill();
+ void clear();
+
+- std::optional<Command> lookup(int shortcutId) const;
++ [[nodiscard]] std::vector<Command> lookup(int shortcutId) const;
+ void toggleMedia(bool toggled);
+ void toggleSupport(bool toggled);
+
+@@ -124,14 +124,14 @@ class Manager {
+ void writeDefaultFile();
+ bool readCustomFile();
+
+- void set(const QString &keys, Command command);
++ void set(const QString &keys, Command command, bool replace = false);
+ void remove(const QString &keys);
+ void unregister(base::unique_qptr<QShortcut> shortcut);
+
+ QStringList _errors;
+
+ base::flat_map<QKeySequence, base::unique_qptr<QShortcut>> _shortcuts;
+- base::flat_map<int, Command> _commandByShortcutId;
++ base::flat_multi_map<int, Command> _commandByShortcutId;
+
+ base::flat_set<QShortcut*> _mediaShortcuts;
+ base::flat_set<QShortcut*> _supportShortcuts;
+@@ -206,11 +206,14 @@ const QStringList &Manager::errors() const {
+ return _errors;
+ }
+
+-std::optional<Command> Manager::lookup(int shortcutId) const {
+- const auto i = _commandByShortcutId.find(shortcutId);
+- return (i != end(_commandByShortcutId))
+- ? base::make_optional(i->second)
+- : std::nullopt;
++std::vector<Command> Manager::lookup(int shortcutId) const {
++ auto result = std::vector<Command>();
++ auto i = _commandByShortcutId.findFirst(shortcutId);
++ const auto end = _commandByShortcutId.end();
++ for (; i != end && (i->first == shortcutId); ++i) {
++ result.push_back(i->second);
++ }
++ return result;
+ }
+
+ void Manager::toggleMedia(bool toggled) {
+@@ -278,7 +281,7 @@ bool Manager::readCustomFile() {
+ const auto name = (*command).toString();
+ const auto i = CommandByName.find(name);
+ if (i != end(CommandByName)) {
+- set((*keys).toString(), i->second);
++ set((*keys).toString(), i->second, true);
+ } else {
+ LOG(("Shortcut Warning: "
+ "could not find shortcut command handler '%1'"
+@@ -343,7 +346,7 @@ void Manager::fillDefaults() {
+ ranges::view::ints(1, ranges::unreachable));
+
+ for (const auto [command, index] : folders) {
+- set(qsl("%1+shift+%2").arg(ctrl).arg(index > 9 ? 0 : index), command);
++ set(qsl("%1+%2").arg(ctrl).arg(index), command);
+ }
+
+ set(qsl("%1+shift+down").arg(ctrl), Command::FolderNext);
+@@ -373,10 +376,12 @@ void Manager::writeDefaultFile() {
+ shortcuts.push_back(version);
+
+ for (const auto &[sequence, shortcut] : _shortcuts) {
+- const auto i = _commandByShortcutId.find(shortcut->id());
+- if (i != end(_commandByShortcutId)) {
++ const auto shortcutId = shortcut->id();
++ auto i = _commandByShortcutId.findFirst(shortcutId);
++ const auto end = _commandByShortcutId.end();
++ for (; i != end && i->first == shortcutId; ++i) {
+ const auto j = CommandNames.find(i->second);
+- if (j != end(CommandNames)) {
++ if (j != CommandNames.end()) {
+ QJsonObject entry;
+ entry.insert(qsl("keys"), sequence.toString().toLower());
+ entry.insert(qsl("command"), j->second);
+@@ -390,7 +395,7 @@ void Manager::writeDefaultFile() {
+ file.write(document.toJson(QJsonDocument::Indented));
+ }
+
+-void Manager::set(const QString &keys, Command command) {
++void Manager::set(const QString &keys, Command command, bool replace) {
+ if (keys.isEmpty()) {
+ return;
+ }
+@@ -415,22 +420,25 @@ void Manager::set(const QString &keys, Command command) {
+ if (isMediaShortcut || isSupportShortcut) {
+ shortcut->setEnabled(false);
+ }
+- const auto id = shortcut->id();
+- if (!id) {
+- _errors.push_back(qsl("Could not create shortcut '%1'!").arg(keys));
+- return;
+- }
++ auto id = shortcut->id();
+ auto i = _shortcuts.find(result);
+ if (i == end(_shortcuts)) {
+ i = _shortcuts.emplace(result, std::move(shortcut)).first;
+- } else {
++ } else if (replace) {
+ unregister(std::exchange(i->second, std::move(shortcut)));
++ } else {
++ shortcut = nullptr;
++ id = i->second->id();
++ }
++ if (!id) {
++ _errors.push_back(qsl("Could not create shortcut '%1'!").arg(keys));
++ return;
+ }
+ _commandByShortcutId.emplace(id, command);
+- if (isMediaShortcut) {
++ if (shortcut && isMediaShortcut) {
+ _mediaShortcuts.emplace(i->second.get());
+ }
+- if (isSupportShortcut) {
++ if (shortcut && isSupportShortcut) {
+ _supportShortcuts.emplace(i->second.get());
+ }
+ }
+@@ -465,11 +473,13 @@ Manager Data;
+
+ } // namespace
+
+-Request::Request(Command command) : _command(command) {
++Request::Request(std::vector<Command> commands)
++: _commands(std::move(commands)) {
+ }
+
+ bool Request::check(Command command, int priority) {
+- if (_command == command && priority > _handlerPriority) {
++ if (ranges::contains(_commands, command)
++ && priority > _handlerPriority) {
+ _handlerPriority = priority;
+ return true;
+ }
+@@ -481,12 +491,16 @@ bool Request::handle(FnMut<bool()> handler) {
+ return true;
+ }
+
+-FnMut<bool()> RequestHandler(Command command) {
+- auto request = Request(command);
++FnMut<bool()> RequestHandler(std::vector<Command> commands) {
++ auto request = Request(std::move(commands));
+ RequestsStream.fire(&request);
+ return std::move(request._handler);
+ }
+
++FnMut<bool()> RequestHandler(Command command) {
++ return RequestHandler(std::vector<Command>{ command });
++}
++
+ bool Launch(Command command) {
+ if (auto handler = RequestHandler(command)) {
+ return handler();
+@@ -494,6 +508,13 @@ bool Launch(Command command) {
+ return false;
+ }
+
++bool Launch(std::vector<Command> commands) {
++ if (auto handler = RequestHandler(std::move(commands))) {
++ return handler();
++ }
++ return false;
++}
++
+ rpl::producer<not_null<Request*>> Requests() {
+ return RequestsStream.events();
+ }
+@@ -509,10 +530,7 @@ const QStringList &Errors() {
+ }
+
+ bool HandleEvent(not_null<QShortcutEvent*> event) {
+- if (const auto command = Data.lookup(event->shortcutId())) {
+- return Launch(*command);
+- }
+- return false;
++ return Launch(Data.lookup(event->shortcutId()));
+ }
+
+ void ToggleMediaShortcuts(bool toggled) {
+diff --git a/Telegram/SourceFiles/core/shortcuts.h b/Telegram/SourceFiles/core/shortcuts.h
+index fbce7c9ced..4bdf9bca44 100644
+--- a/Telegram/SourceFiles/core/shortcuts.h
++++ b/Telegram/SourceFiles/core/shortcuts.h
+@@ -35,16 +35,14 @@ enum class Command {
+ ChatPinned4,
+ ChatPinned5,
+
++ ShowAllChats,
+ ShowFolder1,
+ ShowFolder2,
+ ShowFolder3,
+ ShowFolder4,
+ ShowFolder5,
+ ShowFolder6,
+- ShowFolder7,
+- ShowFolder8,
+- ShowFolder9,
+- ShowFolder10,
++ ShowFolderLast,
+
+ FolderNext,
+ FolderPrevious,
+@@ -63,16 +61,14 @@ enum class Command {
+ };
+
+ constexpr auto kShowFolder = {
++ Command::ShowAllChats,
+ Command::ShowFolder1,
+ Command::ShowFolder2,
+ Command::ShowFolder3,
+ Command::ShowFolder4,
+ Command::ShowFolder5,
+ Command::ShowFolder6,
+- Command::ShowFolder7,
+- Command::ShowFolder8,
+- Command::ShowFolder9,
+- Command::ShowFolder10,
++ Command::ShowFolderLast,
+ };
+
+ [[nodiscard]] FnMut<bool()> RequestHandler(Command command);
+@@ -83,13 +79,13 @@ class Request {
+ bool handle(FnMut<bool()> handler);
+
+ private:
+- explicit Request(Command command);
++ explicit Request(std::vector<Command> commands);
+
+- Command _command;
++ std::vector<Command> _commands;
+ int _handlerPriority = -1;
+ FnMut<bool()> _handler;
+
+- friend FnMut<bool()> RequestHandler(Command command);
++ friend FnMut<bool()> RequestHandler(std::vector<Command> commands);
+
+ };
+
+diff --git a/Telegram/SourceFiles/dialogs/dialogs_inner_widget.cpp b/Telegram/SourceFiles/dialogs/dialogs_inner_widget.cpp
+index 6ad29fc53f..c1e30d385d 100644
+--- a/Telegram/SourceFiles/dialogs/dialogs_inner_widget.cpp
++++ b/Telegram/SourceFiles/dialogs/dialogs_inner_widget.cpp
+@@ -3008,6 +3008,27 @@ void InnerWidget::setupShortcuts() {
+ return false;
+ });
+
++ const auto filters = &session().data().chatsFilters().list();
++ if (const auto filtersCount = int(filters->size())) {
++ auto &&folders = ranges::view::zip(
++ Shortcuts::kShowFolder,
++ ranges::view::ints(0, ranges::unreachable));
++
++ for (const auto [command, index] : folders) {
++ const auto select = (command == Command::ShowFolderLast)
++ ? filtersCount
++ : std::clamp(index, 0, filtersCount);
++ request->check(command) && request->handle([=] {
++ if (select <= filtersCount) {
++ _controller->setActiveChatsFilter((select > 0)
++ ? (*filters)[select - 1].id()
++ : 0);
++ }
++ return true;
++ });
++ }
++ }
++
+ static const auto kPinned = {
+ Command::ChatPinned1,
+ Command::ChatPinned2,
+@@ -3036,42 +3057,23 @@ void InnerWidget::setupShortcuts() {
+ });
+ }
+
+- auto &&folders = ranges::view::zip(
+- Shortcuts::kShowFolder,
+- ranges::view::ints(0, ranges::unreachable));
+-
+- for (const auto [command, index] : folders) {
+- request->check(command) && request->handle([=, index = index] {
+- const auto list = &session().data().chatsFilters().list();
+- if (index >= list->size()) {
+- return false;
+- }
+- const auto filterId = list->at(index).id();
+- _controller->setActiveChatsFilter((filterId == _filterId)
+- ? 0
+- : filterId);
+- return true;
+- });
+- }
+-
+ const auto nearFolder = [=](bool isNext) {
+ const auto id = _controller->activeChatsFilterCurrent();
+ const auto list = &session().data().chatsFilters().list();
+- const auto it = (id == 0)
+- ? begin(*list) - 1
+- : ranges::find(*list, id, &Data::ChatFilter::id);
+- if (it == end(*list) && id != 0) {
++ const auto index = (id != 0)
++ ? int(ranges::find(*list, id, &Data::ChatFilter::id)
++ - begin(*list))
++ : -1;
++ if (index == list->size() && id != 0) {
+ return false;
+ }
+- const auto i = isNext ? 1 : -1;
+- const auto index = it - begin(*list) + i;
+- if (index >= (int)list->size() || index < -1) {
++ const auto changed = index + (isNext ? 1 : -1);
++ if (changed >= int(list->size()) || changed < -1) {
+ return false;
+ }
+- const auto filterId = (index == -1)
+- ? 0
+- : list->at(index).id();
+- _controller->setActiveChatsFilter(filterId);
++ _controller->setActiveChatsFilter((changed >= 0)
++ ? (*list)[changed].id()
++ : 0);
+ return true;
+ };
+
+
+From 9ef41062d316be092fbd07a4aef05eb076622556 Mon Sep 17 00:00:00 2001
+From: John Preston <johnprestonmail@gmail.com>
+Date: Mon, 30 Mar 2020 23:53:10 +0400
+Subject: [PATCH 3/3] Ignore whitespaces in dice sending.
+
+---
+ Telegram/SourceFiles/api/api_sending.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Telegram/SourceFiles/api/api_sending.cpp b/Telegram/SourceFiles/api/api_sending.cpp
+index d0c5315ac0..eaac3957e7 100644
+--- a/Telegram/SourceFiles/api/api_sending.cpp
++++ b/Telegram/SourceFiles/api/api_sending.cpp
+@@ -200,7 +200,7 @@ void SendExistingPhoto(
+
+ bool SendDice(Api::MessageToSend &message) {
+ static const auto kDiceString = QString::fromUtf8("\xF0\x9F\x8E\xB2");
+- if (message.textWithTags.text != kDiceString) {
++ if (message.textWithTags.text.midRef(0).trimmed() != kDiceString) {
+ return false;
+ }
+ const auto history = message.action.history;
diff --git a/net-im/telegram-desktop/telegram-desktop-1.9.22.ebuild b/net-im/telegram-desktop/telegram-desktop-2.0.0.ebuild
similarity index 98%
rename from net-im/telegram-desktop/telegram-desktop-1.9.22.ebuild
rename to net-im/telegram-desktop/telegram-desktop-2.0.0.ebuild
index c863829b60c..d84a55c83c3 100644
--- a/net-im/telegram-desktop/telegram-desktop-1.9.22.ebuild
+++ b/net-im/telegram-desktop/telegram-desktop-2.0.0.ebuild
@@ -75,6 +75,10 @@ REQUIRED_USE="|| ( alsa pulseaudio )
S="${WORKDIR}/${MY_P}"
+PATCHES=(
+ "${FILESDIR}/2.0.0-fixes.patch"
+)
+
src_configure() {
local mycxxflags=(
-Wno-deprecated-declarations
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-im/telegram-desktop/files/, net-im/telegram-desktop/
@ 2020-03-19 17:47 Georgy Yakovlev
0 siblings, 0 replies; 38+ messages in thread
From: Georgy Yakovlev @ 2020-03-19 17:47 UTC (permalink / raw
To: gentoo-commits
commit: a16bcf73d9baa23503a2b714466cbab6cd56547d
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 19 17:45:19 2020 +0000
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Thu Mar 19 17:47:20 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a16bcf73
net-im/telegram-desktop: drop old
Package-Manager: Portage-2.3.94, Repoman-2.3.21
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
net-im/telegram-desktop/Manifest | 1 -
net-im/telegram-desktop/files/1.9.19-crash.patch | 47 -------
net-im/telegram-desktop/files/1.9.20-gcc9.patch | 36 ------
.../telegram-desktop-1.9.19-r1.ebuild | 142 --------------------
.../telegram-desktop-1.9.20.ebuild | 143 ---------------------
5 files changed, 369 deletions(-)
diff --git a/net-im/telegram-desktop/Manifest b/net-im/telegram-desktop/Manifest
index 68299fefb13..ddd4e4a6ac6 100644
--- a/net-im/telegram-desktop/Manifest
+++ b/net-im/telegram-desktop/Manifest
@@ -1,4 +1,3 @@
DIST tdesktop-1.9.14-full.tar.gz 25324084 BLAKE2B 45c071aa573541b6e483d2ae712b7f3b672c1294e8e7e624d9292f7176482f4d68069c35541019dc27fdb1c66134c29fb4d3667f1197e7085e4f8a80c8ca603c SHA512 56efa64048d23b280782b51319c0071c6cef833cb7e2584e52c6e45488577755beb85185ec9187029c425cc8d4c9c1887142687c744697e7731a15abe2846056
DIST tdesktop-1.9.19-full.tar.gz 25840478 BLAKE2B 1a730e74df71af0c8fcc579fb1b2546fe279d64dd60786a32e015dbc0046a5d4a933bfdc128f7bb2b624705e6788ec6d597ceeb328f91dc173d1c5a0e739a29c SHA512 29070c6e1d813943d5062dc1703f383a18323b5698fbc4e6f2c89b33366da9da5d1ec84dc29950288e7e7d112024de2924244ec9c800d59d4b210e6288c7291d
-DIST tdesktop-1.9.20-full.tar.gz 25847905 BLAKE2B 228e7ad703bf3c3ca5ac198d099b0c747ddce31fbf7f93b46084043b0d02f36df54f684ee1cddb1040ff83cb1d5c41a05e84e045c68fba4bf13c864ab0b29e80 SHA512 d4f3b57a5b34f47b9a35517d15f7296509e9b2a160d6c8b77aae1c791e13c5171409c32be371bd8191bb8fbde3e32d03c380a99b5587a98c38b93f34c8cd7b52
DIST tdesktop-1.9.21-full.tar.gz 25848026 BLAKE2B 503e22bcc83a64721aa4c4c6e8bca89c4c976703c338b1615c5ab1599098e98cbd220a94cffdbe24d9c305b44ffef7719ad1c2d2ad81f4ec6edc8377e1afa4ef SHA512 ea02fc69e88ed6244ed420516bb7a93827cb85efaa0a7e9af7562aa1bc29184c5a2102caca8693c976b25d374832e0deb2ccbf00144d5340b5ffacbdc9dcebf1
diff --git a/net-im/telegram-desktop/files/1.9.19-crash.patch b/net-im/telegram-desktop/files/1.9.19-crash.patch
deleted file mode 100644
index ff88aec74eb..00000000000
--- a/net-im/telegram-desktop/files/1.9.19-crash.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From 844e9b60ddf01712082e7ff87cfe74bb20d97297 Mon Sep 17 00:00:00 2001
-From: John Preston <johnprestonmail@gmail.com>
-Date: Tue, 25 Feb 2020 16:12:04 +0400
-Subject: [PATCH] Fix crash in SearchController.
-
-Data::Histories cancels request in Main::Session::api(), so the
-request must be sent using this global api(), not custom MTP::Sender.
----
- Telegram/SourceFiles/data/data_search_controller.cpp | 5 ++---
- Telegram/SourceFiles/data/data_search_controller.h | 1 -
- 2 files changed, 2 insertions(+), 4 deletions(-)
-
-diff --git a/Telegram/SourceFiles/data/data_search_controller.cpp b/Telegram/SourceFiles/data/data_search_controller.cpp
-index 08541b13da..90fbd36762 100644
---- a/Telegram/SourceFiles/data/data_search_controller.cpp
-+++ b/Telegram/SourceFiles/data/data_search_controller.cpp
-@@ -194,8 +194,7 @@ SearchController::CacheEntry::CacheEntry(const Query &query)
- }
-
- SearchController::SearchController(not_null<Main::Session*> session)
--: _session(session)
--, _api(session->api().instance()) {
-+: _session(session) {
- }
-
- bool SearchController::hasInCache(const Query &query) const {
-@@ -372,7 +371,7 @@ void SearchController::requestMore(
- const auto type = ::Data::Histories::RequestType::History;
- const auto history = _session->data().history(listData->peer);
- auto requestId = histories.sendRequest(history, type, [=](Fn<void()> finish) {
-- return _api.request(
-+ return _session->api().request(
- std::move(*prepared)
- ).done([=](const MTPmessages_Messages &result) {
- listData->requests.remove(key);
-diff --git a/Telegram/SourceFiles/data/data_search_controller.h b/Telegram/SourceFiles/data/data_search_controller.h
-index a439bb38ed..f9341ac4d4 100644
---- a/Telegram/SourceFiles/data/data_search_controller.h
-+++ b/Telegram/SourceFiles/data/data_search_controller.h
-@@ -130,7 +130,6 @@ class SearchController final {
- Data *listData);
-
- const not_null<Main::Session*> _session;
-- MTP::Sender _api;
- Cache _cache;
- Cache::iterator _current = _cache.end();
-
diff --git a/net-im/telegram-desktop/files/1.9.20-gcc9.patch b/net-im/telegram-desktop/files/1.9.20-gcc9.patch
deleted file mode 100644
index 4fef1aa2877..00000000000
--- a/net-im/telegram-desktop/files/1.9.20-gcc9.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From cf89b5a94411afa9d3f36e9f27e40426f8899bc1 Mon Sep 17 00:00:00 2001
-From: Ilya Fedin <fedin-ilja2010@ya.ru>
-Date: Sat, 14 Mar 2020 23:35:51 +0400
-Subject: [PATCH] Fix build with gcc 9
-
----
- .../SourceFiles/platform/linux/notifications_manager_linux.cpp | 2 +-
- Telegram/SourceFiles/platform/linux/specific_linux.cpp | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp b/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp
-index 6b9057437d..86382ab812 100644
---- a/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp
-+++ b/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp
-@@ -104,7 +104,7 @@ bool Inhibited() {
- const QDBusReply<QVariant> reply = QDBusConnection::sessionBus().call(
- message);
-
-- constexpr auto notSupportedErrors = {
-+ const auto notSupportedErrors = {
- QDBusError::ServiceUnknown,
- QDBusError::InvalidArgs,
- };
-diff --git a/Telegram/SourceFiles/platform/linux/specific_linux.cpp b/Telegram/SourceFiles/platform/linux/specific_linux.cpp
-index b9c5d3f0b8..916a26360f 100644
---- a/Telegram/SourceFiles/platform/linux/specific_linux.cpp
-+++ b/Telegram/SourceFiles/platform/linux/specific_linux.cpp
-@@ -374,7 +374,7 @@ std::optional<crl::time> LastUserInputTime() {
- const QDBusReply<uint> reply = QDBusConnection::sessionBus().call(
- message);
-
-- constexpr auto notSupportedErrors = {
-+ const auto notSupportedErrors = {
- QDBusError::ServiceUnknown,
- QDBusError::NotSupported,
- };
diff --git a/net-im/telegram-desktop/telegram-desktop-1.9.19-r1.ebuild b/net-im/telegram-desktop/telegram-desktop-1.9.19-r1.ebuild
deleted file mode 100644
index f09450f07e8..00000000000
--- a/net-im/telegram-desktop/telegram-desktop-1.9.19-r1.ebuild
+++ /dev/null
@@ -1,142 +0,0 @@
-# Copyright 2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{6,7} )
-
-inherit cmake desktop flag-o-matic python-any-r1 xdg-utils
-
-MY_P="tdesktop-${PV}-full"
-
-DESCRIPTION="Official desktop client for Telegram"
-HOMEPAGE="https://desktop.telegram.org"
-SRC_URI="https://github.com/telegramdesktop/tdesktop/releases/download/v${PV}/${MY_P}.tar.gz"
-
-LICENSE="GPL-3-with-openssl-exception"
-SLOT="0"
-KEYWORDS="~amd64 ~ppc64"
-IUSE="+alsa +dbus enchant +hunspell libressl pulseaudio +spell"
-
-RDEPEND="
- !net-im/telegram-desktop-bin
- app-arch/lz4:=
- app-arch/xz-utils
- !libressl? ( dev-libs/openssl:0= )
- libressl? ( dev-libs/libressl:0= )
- >=dev-cpp/ms-gsl-2.1.0
- dev-cpp/range-v3
- dev-libs/xxhash
- dev-qt/qtcore:5
- dev-qt/qtimageformats:5
- dev-qt/qtnetwork:5
- dev-qt/qtsvg:5
- media-libs/fontconfig:=
- >=media-libs/libtgvoip-2.4.4_p20200212[alsa?,pulseaudio?]
- media-libs/openal[alsa?,pulseaudio?]
- media-libs/opus:=
- media-video/ffmpeg:=[opus]
- sys-libs/zlib[minizip]
- virtual/libiconv
- x11-libs/libva:=[X,drm]
- x11-libs/libX11
- || (
- dev-qt/qtgui:5[jpeg,png,X(-)]
- dev-qt/qtgui:5[jpeg,png,xcb(-)]
- )
- || (
- dev-qt/qtwidgets:5[png,X(-)]
- dev-qt/qtwidgets:5[png,xcb(-)]
- )
- dbus? (
- dev-qt/qtdbus:5
- dev-libs/libdbusmenu-qt[qt5(+)]
- )
- enchant? ( app-text/enchant:= )
- hunspell? ( >=app-text/hunspell-1.7:= )
- pulseaudio? ( media-sound/pulseaudio )
-"
-
-DEPEND="
- ${PYTHON_DEPS}
- ${RDEPEND}
-"
-
-BDEPEND="
- >=dev-util/cmake-3.16
- virtual/pkgconfig
-"
-
-REQUIRED_USE="|| ( alsa pulseaudio )
- spell? (
- ^^ ( enchant hunspell )
- )
-"
-
-S="${WORKDIR}/${MY_P}"
-
-PATCHES=( "${FILESDIR}/${PV}-crash.patch" )
-
-src_configure() {
- local mycxxflags=(
- -Wno-deprecated-declarations
- -Wno-error=deprecated-declarations
- -Wno-switch
- )
-
- append-cxxflags "${mycxxflags[@]}"
-
- # TODO: unbundle header-only libs, ofc telegram uses git versions...
- # it fals with tl-expected-1.0.0, so we use bundled for now to avoid git rev snapshots
- # EXPECTED VARIANT
- local mycmakeargs=(
- -DDESKTOP_APP_DISABLE_CRASH_REPORTS=ON
- -DDESKTOP_APP_USE_GLIBC_WRAPS=OFF
- -DDESKTOP_APP_USE_PACKAGED=ON
- -DDESKTOP_APP_USE_PACKAGED_EXPECTED=OFF
- -DDESKTOP_APP_USE_PACKAGED_RLOTTIE=OFF
- -DDESKTOP_APP_USE_PACKAGED_VARIANT=OFF
- -DTDESKTOP_DISABLE_DESKTOP_FILE_GENERATION=ON
- -DTDESKTOP_LAUNCHER_BASENAME="${PN}"
- -DDESKTOP_APP_DISABLE_DBUS_INTEGRATION="$(usex dbus OFF ON)"
- -DDESKTOP_APP_DISABLE_SPELLCHECK="$(usex spell OFF ON)" # enables hunspell
- -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_desktop_database_update
- xdg_icon_cache_update
- xdg_mimeinfo_database_update
-}
-
-pkg_postrm() {
- xdg_desktop_database_update
- xdg_icon_cache_update
- xdg_mimeinfo_database_update
-}
diff --git a/net-im/telegram-desktop/telegram-desktop-1.9.20.ebuild b/net-im/telegram-desktop/telegram-desktop-1.9.20.ebuild
deleted file mode 100644
index 9741e177f28..00000000000
--- a/net-im/telegram-desktop/telegram-desktop-1.9.20.ebuild
+++ /dev/null
@@ -1,143 +0,0 @@
-# Copyright 2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{6,7} )
-
-inherit cmake desktop flag-o-matic python-any-r1 xdg-utils
-
-MY_P="tdesktop-${PV}-full"
-
-DESCRIPTION="Official desktop client for Telegram"
-HOMEPAGE="https://desktop.telegram.org"
-SRC_URI="https://github.com/telegramdesktop/tdesktop/releases/download/v${PV}/${MY_P}.tar.gz"
-
-LICENSE="GPL-3-with-openssl-exception"
-SLOT="0"
-KEYWORDS="~amd64 ~ppc64"
-IUSE="+alsa +dbus enchant +hunspell libressl pulseaudio +spell"
-
-RDEPEND="
- !net-im/telegram-desktop-bin
- app-arch/lz4:=
- app-arch/xz-utils
- !libressl? ( dev-libs/openssl:0= )
- libressl? ( dev-libs/libressl:0= )
- >=dev-cpp/ms-gsl-2.1.0
- dev-cpp/range-v3
- dev-libs/xxhash
- dev-qt/qtcore:5
- dev-qt/qtimageformats:5
- dev-qt/qtnetwork:5
- dev-qt/qtsvg:5
- media-libs/fontconfig:=
- >=media-libs/libtgvoip-2.4.4_p20200301[alsa?,pulseaudio?]
- media-libs/openal[alsa?,pulseaudio?]
- media-libs/opus:=
- media-video/ffmpeg:=[opus]
- sys-libs/zlib[minizip]
- virtual/libiconv
- x11-libs/libva:=[X,drm]
- x11-libs/libX11
- || (
- dev-qt/qtgui:5[jpeg,png,X(-)]
- dev-qt/qtgui:5[jpeg,png,xcb(-)]
- )
- || (
- dev-qt/qtwidgets:5[png,X(-)]
- dev-qt/qtwidgets:5[png,xcb(-)]
- )
- dbus? (
- dev-qt/qtdbus:5
- dev-libs/libdbusmenu-qt[qt5(+)]
- )
- enchant? ( app-text/enchant:= )
- hunspell? ( >=app-text/hunspell-1.7:= )
- pulseaudio? ( media-sound/pulseaudio )
-"
-
-DEPEND="
- ${PYTHON_DEPS}
- ${RDEPEND}
-"
-
-BDEPEND="
- >=dev-util/cmake-3.16
- virtual/pkgconfig
-"
-
-REQUIRED_USE="|| ( alsa pulseaudio )
- spell? (
- ^^ ( enchant hunspell )
- )
-"
-
-S="${WORKDIR}/${MY_P}"
-
-PATCHES=(
- "${FILESDIR}/1.9.20-gcc9.patch"
-)
-
-src_configure() {
- local mycxxflags=(
- -Wno-deprecated-declarations
- -Wno-error=deprecated-declarations
- -Wno-switch
- )
-
- append-cxxflags "${mycxxflags[@]}"
-
- # TODO: unbundle header-only libs, ofc telegram uses git versions...
- # it fals with tl-expected-1.0.0, so we use bundled for now to avoid git rev snapshots
- # EXPECTED VARIANT
- local mycmakeargs=(
- -DDESKTOP_APP_DISABLE_CRASH_REPORTS=ON
- -DDESKTOP_APP_USE_GLIBC_WRAPS=OFF
- -DDESKTOP_APP_USE_PACKAGED=ON
- -DDESKTOP_APP_USE_PACKAGED_EXPECTED=OFF
- -DDESKTOP_APP_USE_PACKAGED_RLOTTIE=OFF
- -DDESKTOP_APP_USE_PACKAGED_VARIANT=OFF
- -DTDESKTOP_LAUNCHER_BASENAME="${PN}"
- -DDESKTOP_APP_DISABLE_DBUS_INTEGRATION="$(usex dbus OFF ON)"
- -DDESKTOP_APP_DISABLE_SPELLCHECK="$(usex spell OFF ON)" # enables hunspell
- -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_desktop_database_update
- xdg_icon_cache_update
- xdg_mimeinfo_database_update
-}
-
-pkg_postrm() {
- xdg_desktop_database_update
- xdg_icon_cache_update
- xdg_mimeinfo_database_update
-}
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-im/telegram-desktop/files/, net-im/telegram-desktop/
@ 2020-03-15 19:14 Georgy Yakovlev
0 siblings, 0 replies; 38+ messages in thread
From: Georgy Yakovlev @ 2020-03-15 19:14 UTC (permalink / raw
To: gentoo-commits
commit: c970e2c3b18dba6dc8df7cefa19e8a02403c9467
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 15 19:12:24 2020 +0000
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Sun Mar 15 19:13:41 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c970e2c3
net-im/telegram-desktop: bump to 1.9.20
Package-Manager: Portage-2.3.94, Repoman-2.3.21
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
net-im/telegram-desktop/Manifest | 1 +
net-im/telegram-desktop/files/1.9.20-gcc9.patch | 36 ++++++
.../telegram-desktop-1.9.20.ebuild | 143 +++++++++++++++++++++
3 files changed, 180 insertions(+)
diff --git a/net-im/telegram-desktop/Manifest b/net-im/telegram-desktop/Manifest
index 61025523b00..3eecdabeb01 100644
--- a/net-im/telegram-desktop/Manifest
+++ b/net-im/telegram-desktop/Manifest
@@ -1,2 +1,3 @@
DIST tdesktop-1.9.14-full.tar.gz 25324084 BLAKE2B 45c071aa573541b6e483d2ae712b7f3b672c1294e8e7e624d9292f7176482f4d68069c35541019dc27fdb1c66134c29fb4d3667f1197e7085e4f8a80c8ca603c SHA512 56efa64048d23b280782b51319c0071c6cef833cb7e2584e52c6e45488577755beb85185ec9187029c425cc8d4c9c1887142687c744697e7731a15abe2846056
DIST tdesktop-1.9.19-full.tar.gz 25840478 BLAKE2B 1a730e74df71af0c8fcc579fb1b2546fe279d64dd60786a32e015dbc0046a5d4a933bfdc128f7bb2b624705e6788ec6d597ceeb328f91dc173d1c5a0e739a29c SHA512 29070c6e1d813943d5062dc1703f383a18323b5698fbc4e6f2c89b33366da9da5d1ec84dc29950288e7e7d112024de2924244ec9c800d59d4b210e6288c7291d
+DIST tdesktop-1.9.20-full.tar.gz 25847905 BLAKE2B 228e7ad703bf3c3ca5ac198d099b0c747ddce31fbf7f93b46084043b0d02f36df54f684ee1cddb1040ff83cb1d5c41a05e84e045c68fba4bf13c864ab0b29e80 SHA512 d4f3b57a5b34f47b9a35517d15f7296509e9b2a160d6c8b77aae1c791e13c5171409c32be371bd8191bb8fbde3e32d03c380a99b5587a98c38b93f34c8cd7b52
diff --git a/net-im/telegram-desktop/files/1.9.20-gcc9.patch b/net-im/telegram-desktop/files/1.9.20-gcc9.patch
new file mode 100644
index 00000000000..4fef1aa2877
--- /dev/null
+++ b/net-im/telegram-desktop/files/1.9.20-gcc9.patch
@@ -0,0 +1,36 @@
+From cf89b5a94411afa9d3f36e9f27e40426f8899bc1 Mon Sep 17 00:00:00 2001
+From: Ilya Fedin <fedin-ilja2010@ya.ru>
+Date: Sat, 14 Mar 2020 23:35:51 +0400
+Subject: [PATCH] Fix build with gcc 9
+
+---
+ .../SourceFiles/platform/linux/notifications_manager_linux.cpp | 2 +-
+ Telegram/SourceFiles/platform/linux/specific_linux.cpp | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp b/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp
+index 6b9057437d..86382ab812 100644
+--- a/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp
++++ b/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp
+@@ -104,7 +104,7 @@ bool Inhibited() {
+ const QDBusReply<QVariant> reply = QDBusConnection::sessionBus().call(
+ message);
+
+- constexpr auto notSupportedErrors = {
++ const auto notSupportedErrors = {
+ QDBusError::ServiceUnknown,
+ QDBusError::InvalidArgs,
+ };
+diff --git a/Telegram/SourceFiles/platform/linux/specific_linux.cpp b/Telegram/SourceFiles/platform/linux/specific_linux.cpp
+index b9c5d3f0b8..916a26360f 100644
+--- a/Telegram/SourceFiles/platform/linux/specific_linux.cpp
++++ b/Telegram/SourceFiles/platform/linux/specific_linux.cpp
+@@ -374,7 +374,7 @@ std::optional<crl::time> LastUserInputTime() {
+ const QDBusReply<uint> reply = QDBusConnection::sessionBus().call(
+ message);
+
+- constexpr auto notSupportedErrors = {
++ const auto notSupportedErrors = {
+ QDBusError::ServiceUnknown,
+ QDBusError::NotSupported,
+ };
diff --git a/net-im/telegram-desktop/telegram-desktop-1.9.20.ebuild b/net-im/telegram-desktop/telegram-desktop-1.9.20.ebuild
new file mode 100644
index 00000000000..9741e177f28
--- /dev/null
+++ b/net-im/telegram-desktop/telegram-desktop-1.9.20.ebuild
@@ -0,0 +1,143 @@
+# Copyright 2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{6,7} )
+
+inherit cmake desktop flag-o-matic python-any-r1 xdg-utils
+
+MY_P="tdesktop-${PV}-full"
+
+DESCRIPTION="Official desktop client for Telegram"
+HOMEPAGE="https://desktop.telegram.org"
+SRC_URI="https://github.com/telegramdesktop/tdesktop/releases/download/v${PV}/${MY_P}.tar.gz"
+
+LICENSE="GPL-3-with-openssl-exception"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc64"
+IUSE="+alsa +dbus enchant +hunspell libressl pulseaudio +spell"
+
+RDEPEND="
+ !net-im/telegram-desktop-bin
+ app-arch/lz4:=
+ app-arch/xz-utils
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )
+ >=dev-cpp/ms-gsl-2.1.0
+ dev-cpp/range-v3
+ dev-libs/xxhash
+ dev-qt/qtcore:5
+ dev-qt/qtimageformats:5
+ dev-qt/qtnetwork:5
+ dev-qt/qtsvg:5
+ media-libs/fontconfig:=
+ >=media-libs/libtgvoip-2.4.4_p20200301[alsa?,pulseaudio?]
+ media-libs/openal[alsa?,pulseaudio?]
+ media-libs/opus:=
+ media-video/ffmpeg:=[opus]
+ sys-libs/zlib[minizip]
+ virtual/libiconv
+ x11-libs/libva:=[X,drm]
+ x11-libs/libX11
+ || (
+ dev-qt/qtgui:5[jpeg,png,X(-)]
+ dev-qt/qtgui:5[jpeg,png,xcb(-)]
+ )
+ || (
+ dev-qt/qtwidgets:5[png,X(-)]
+ dev-qt/qtwidgets:5[png,xcb(-)]
+ )
+ dbus? (
+ dev-qt/qtdbus:5
+ dev-libs/libdbusmenu-qt[qt5(+)]
+ )
+ enchant? ( app-text/enchant:= )
+ hunspell? ( >=app-text/hunspell-1.7:= )
+ pulseaudio? ( media-sound/pulseaudio )
+"
+
+DEPEND="
+ ${PYTHON_DEPS}
+ ${RDEPEND}
+"
+
+BDEPEND="
+ >=dev-util/cmake-3.16
+ virtual/pkgconfig
+"
+
+REQUIRED_USE="|| ( alsa pulseaudio )
+ spell? (
+ ^^ ( enchant hunspell )
+ )
+"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+ "${FILESDIR}/1.9.20-gcc9.patch"
+)
+
+src_configure() {
+ local mycxxflags=(
+ -Wno-deprecated-declarations
+ -Wno-error=deprecated-declarations
+ -Wno-switch
+ )
+
+ append-cxxflags "${mycxxflags[@]}"
+
+ # TODO: unbundle header-only libs, ofc telegram uses git versions...
+ # it fals with tl-expected-1.0.0, so we use bundled for now to avoid git rev snapshots
+ # EXPECTED VARIANT
+ local mycmakeargs=(
+ -DDESKTOP_APP_DISABLE_CRASH_REPORTS=ON
+ -DDESKTOP_APP_USE_GLIBC_WRAPS=OFF
+ -DDESKTOP_APP_USE_PACKAGED=ON
+ -DDESKTOP_APP_USE_PACKAGED_EXPECTED=OFF
+ -DDESKTOP_APP_USE_PACKAGED_RLOTTIE=OFF
+ -DDESKTOP_APP_USE_PACKAGED_VARIANT=OFF
+ -DTDESKTOP_LAUNCHER_BASENAME="${PN}"
+ -DDESKTOP_APP_DISABLE_DBUS_INTEGRATION="$(usex dbus OFF ON)"
+ -DDESKTOP_APP_DISABLE_SPELLCHECK="$(usex spell OFF ON)" # enables hunspell
+ -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_desktop_database_update
+ xdg_icon_cache_update
+ xdg_mimeinfo_database_update
+}
+
+pkg_postrm() {
+ xdg_desktop_database_update
+ xdg_icon_cache_update
+ xdg_mimeinfo_database_update
+}
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-im/telegram-desktop/files/, net-im/telegram-desktop/
@ 2020-02-25 2:53 Georgy Yakovlev
0 siblings, 0 replies; 38+ messages in thread
From: Georgy Yakovlev @ 2020-02-25 2:53 UTC (permalink / raw
To: gentoo-commits
commit: e56291255f5727ec7706552f85107ce7b958362c
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Tue Feb 25 02:39:54 2020 +0000
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Tue Feb 25 02:52:02 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e5629125
net-im/telegram-desktop: bump to 1.9.17, enable hunspell by default
enchant is crashing from time to time.
added missing qtwayland dep.
Package-Manager: Portage-2.3.89, Repoman-2.3.20
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
net-im/telegram-desktop/Manifest | 1 +
.../files/1.9.17-hunspell-cmake.patch | 22 ++++
net-im/telegram-desktop/metadata.xml | 4 +
.../telegram-desktop-1.9.17.ebuild | 143 +++++++++++++++++++++
4 files changed, 170 insertions(+)
diff --git a/net-im/telegram-desktop/Manifest b/net-im/telegram-desktop/Manifest
index 5bed1039a64..8031465b0e3 100644
--- a/net-im/telegram-desktop/Manifest
+++ b/net-im/telegram-desktop/Manifest
@@ -1,3 +1,4 @@
DIST tdesktop-1.9.14-full.tar.gz 25324084 BLAKE2B 45c071aa573541b6e483d2ae712b7f3b672c1294e8e7e624d9292f7176482f4d68069c35541019dc27fdb1c66134c29fb4d3667f1197e7085e4f8a80c8ca603c SHA512 56efa64048d23b280782b51319c0071c6cef833cb7e2584e52c6e45488577755beb85185ec9187029c425cc8d4c9c1887142687c744697e7731a15abe2846056
DIST tdesktop-1.9.15-full.tar.gz 25327647 BLAKE2B 5d689f656a66d55b3e62d52d48106270fc16675a01ff8a2b865c122191c7ee4781c2e698d0652c765a10985148ade0ce5dd47f4938538f24348cd5b42fe0160c SHA512 457b568226e34cc23e379d34a9ad21d0d6c26fb69647cd17bf74aef48ad9ce35eae6697795af8c349f43e376b44bcab49e1939733b1cc20ec16ddf1c29a32c4e
DIST tdesktop-1.9.16-full.tar.gz 25328085 BLAKE2B 1d429964e67641a1cfa0f826820ed54eb7e37d9946fdd3292d5d67276609d736dcfb2b4c422f6b64364705eb68e78f6ac6bfa52096ca39d948a9e01bc152404b SHA512 89cdf12456d9bcaa4e332286d2d5c4da6cf715bd0e798e51e458adb7bf5c89044899beb9ac7b11a808b81e37958473a473e3774519420baf7a6bc34eb7938733
+DIST tdesktop-1.9.17-full.tar.gz 25840548 BLAKE2B ca824ceb691d244a6a7879d753c78559d763e023f77527bd843693035716f27576a9d4e97b38b4d25cc7b3950dbc593dcca21effda47199bc080ff5976c48612 SHA512 b545c39b9ae013a2ae96636895b6eedf27e6deda07af7516e3b2caf58bf7df6f67d9f9da281d7eb9589081b2dc61b95fdf6088afa6fc19e3b79f27e46505738c
diff --git a/net-im/telegram-desktop/files/1.9.17-hunspell-cmake.patch b/net-im/telegram-desktop/files/1.9.17-hunspell-cmake.patch
new file mode 100644
index 00000000000..bbf250861ad
--- /dev/null
+++ b/net-im/telegram-desktop/files/1.9.17-hunspell-cmake.patch
@@ -0,0 +1,22 @@
+From 81e27ccc0e7bf27405569ce98582860dfc9ea9bb Mon Sep 17 00:00:00 2001
+From: John Preston <johnprestonmail@gmail.com>
+Date: Tue, 25 Feb 2020 01:11:10 +0400
+Subject: [PATCH] Fix packaged build.
+
+---
+ external/hunspell/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/cmake/external/hunspell/CMakeLists.txt b/cmake/external/hunspell/CMakeLists.txt
+index 6fec471..fbe2e95 100644
+--- a/cmake/external/hunspell/CMakeLists.txt
++++ b/cmake/external/hunspell/CMakeLists.txt
+@@ -5,7 +5,7 @@
+ # https://github.com/desktop-app/legal/blob/master/LEGAL
+
+ if (DESKTOP_APP_USE_PACKAGED)
+- add_library(external_hunspell INTERFACE IMPORTED)
++ add_library(external_hunspell INTERFACE IMPORTED GLOBAL)
+ add_library(desktop-app::external_hunspell ALIAS external_hunspell)
+
+ find_package(PkgConfig REQUIRED)
diff --git a/net-im/telegram-desktop/metadata.xml b/net-im/telegram-desktop/metadata.xml
index efcd58fe0b9..5eb4b12ceaa 100644
--- a/net-im/telegram-desktop/metadata.xml
+++ b/net-im/telegram-desktop/metadata.xml
@@ -5,4 +5,8 @@
<email>gyakovlev@gentoo.org</email>
<name>Georgy Yakovlev</name>
</maintainer>
+ <use>
+ <flag name="enchant">Enable the app-text/aspell spell-checking backend</flag>
+ <flag name="hunspell">Enable the app-text/hunspell spell-checking backend</flag>
+ </use>
</pkgmetadata>
diff --git a/net-im/telegram-desktop/telegram-desktop-1.9.17.ebuild b/net-im/telegram-desktop/telegram-desktop-1.9.17.ebuild
new file mode 100644
index 00000000000..fd191f347c8
--- /dev/null
+++ b/net-im/telegram-desktop/telegram-desktop-1.9.17.ebuild
@@ -0,0 +1,143 @@
+# Copyright 2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{6,7} )
+
+inherit cmake desktop flag-o-matic python-any-r1 xdg-utils
+
+MY_P="tdesktop-${PV}-full"
+
+DESCRIPTION="Official desktop client for Telegram"
+HOMEPAGE="https://desktop.telegram.org"
+SRC_URI="https://github.com/telegramdesktop/tdesktop/releases/download/v${PV}/${MY_P}.tar.gz"
+
+LICENSE="GPL-3-with-openssl-exception"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc64"
+IUSE="+alsa +dbus enchant +hunspell libressl pulseaudio +spell"
+
+RDEPEND="
+ !net-im/telegram-desktop-bin
+ app-arch/lz4:=
+ app-arch/xz-utils
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )
+ >=dev-cpp/ms-gsl-2.1.0
+ dev-cpp/range-v3
+ dev-libs/xxhash
+ dev-qt/qtcore:5
+ dev-qt/qtimageformats:5
+ dev-qt/qtnetwork:5
+ dev-qt/qtsvg:5
+ dev-qt/qtwayland:5
+ media-libs/fontconfig:=
+ >=media-libs/libtgvoip-2.4.4_p20200212[alsa?,pulseaudio?]
+ media-libs/openal[alsa?,pulseaudio?]
+ media-libs/opus:=
+ media-video/ffmpeg:=[opus]
+ sys-libs/zlib[minizip]
+ virtual/libiconv
+ x11-libs/libva:=[X,drm]
+ x11-libs/libX11
+ || (
+ dev-qt/qtgui:5[jpeg,png,X(-)]
+ dev-qt/qtgui:5[jpeg,png,xcb(-)]
+ )
+ || (
+ dev-qt/qtwidgets:5[png,X(-)]
+ dev-qt/qtwidgets:5[png,xcb(-)]
+ )
+ dbus? (
+ dev-qt/qtdbus:5
+ dev-libs/libdbusmenu-qt[qt5(+)]
+ )
+ enchant? ( app-text/enchant:= )
+ hunspell? ( >=app-text/hunspell-1.7:= )
+ pulseaudio? ( media-sound/pulseaudio )
+"
+
+DEPEND="
+ ${PYTHON_DEPS}
+ ${RDEPEND}
+"
+
+BDEPEND="
+ >=dev-util/cmake-3.16
+ virtual/pkgconfig
+"
+
+REQUIRED_USE="|| ( alsa pulseaudio )
+ spell? (
+ ^^ ( enchant hunspell )
+ )
+"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=( "${FILESDIR}/${PV}-hunspell-cmake.patch" )
+
+src_configure() {
+ local mycxxflags=(
+ -Wno-deprecated-declarations
+ -Wno-error=deprecated-declarations
+ -Wno-switch
+ )
+
+ append-cxxflags "${mycxxflags[@]}"
+
+ # TODO: unbundle header-only libs, ofc telegram uses git versions...
+ # it fals with tl-expected-1.0.0, so we use bundled for now to avoid git rev snapshots
+ # EXPECTED VARIANT
+ local mycmakeargs=(
+ -DDESKTOP_APP_DISABLE_CRASH_REPORTS=ON
+ -DDESKTOP_APP_USE_GLIBC_WRAPS=OFF
+ -DDESKTOP_APP_USE_PACKAGED=ON
+ -DDESKTOP_APP_USE_PACKAGED_EXPECTED=OFF
+ -DDESKTOP_APP_USE_PACKAGED_RLOTTIE=OFF
+ -DDESKTOP_APP_USE_PACKAGED_VARIANT=OFF
+ -DTDESKTOP_DISABLE_DESKTOP_FILE_GENERATION=ON
+ -DTDESKTOP_LAUNCHER_BASENAME="${PN}"
+ -DDESKTOP_APP_DISABLE_DBUS_INTEGRATION="$(usex dbus OFF ON)"
+ -DDESKTOP_APP_DISABLE_SPELLCHECK="$(usex spell OFF ON)" # enables hunspell
+ -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_desktop_database_update
+ xdg_icon_cache_update
+ xdg_mimeinfo_database_update
+}
+
+pkg_postrm() {
+ xdg_desktop_database_update
+ xdg_icon_cache_update
+ xdg_mimeinfo_database_update
+}
^ permalink raw reply related [flat|nested] 38+ messages in thread
end of thread, other threads:[~2024-05-15 8:51 UTC | newest]
Thread overview: 38+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-09 8:05 [gentoo-commits] repo/gentoo:master commit in: net-im/telegram-desktop/files/, net-im/telegram-desktop/ Georgy Yakovlev
-- strict thread matches above, loose matches on Subject: below --
2024-05-15 8:51 Yixun Lan
2024-05-14 2:08 Yixun Lan
2024-04-10 23:34 Yixun Lan
2023-12-28 13:58 Yixun Lan
2023-12-11 13:25 Yixun Lan
2023-12-11 13:25 Yixun Lan
2023-10-28 15:01 Yixun Lan
2023-07-15 16:25 Sam James
2023-06-10 13:43 Sam James
2023-05-16 17:07 Sam James
2023-04-17 20:16 Georgy Yakovlev
2023-02-13 21:03 Georgy Yakovlev
2022-12-13 3:13 John Helmert III
2022-10-03 22:52 Georgy Yakovlev
2022-08-23 5:24 Sam James
2022-08-23 5:24 Sam James
2022-04-25 1:43 Georgy Yakovlev
2022-04-15 6:04 Sam James
2022-04-15 6:04 Sam James
2022-01-28 20:02 Georgy Yakovlev
2021-12-10 21:31 Georgy Yakovlev
2021-09-16 12:07 Georgy Yakovlev
2021-08-12 17:56 Georgy Yakovlev
2021-08-05 16:42 Georgy Yakovlev
2021-08-04 8:31 Georgy Yakovlev
2021-07-17 20:05 Georgy Yakovlev
2021-07-17 0:06 Georgy Yakovlev
2021-06-28 8:38 Georgy Yakovlev
2021-06-03 2:11 Stefan Strogin
2021-05-03 17:01 Georgy Yakovlev
2021-03-25 19:31 Georgy Yakovlev
2020-10-31 21:17 Georgy Yakovlev
2020-05-28 6:14 Georgy Yakovlev
2020-03-31 8:33 Georgy Yakovlev
2020-03-19 17:47 Georgy Yakovlev
2020-03-15 19:14 Georgy Yakovlev
2020-02-25 2:53 Georgy Yakovlev
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox