Created attachment 670589 [details, diff] Patch to include in FILESDIR Wayland is currently a build-time dependency for all versions of telegram-desktop, but this is a bit of a waste if you don't actually run wayland. Thankfully, it doesn't seem incredibly hard to patch out, so I've made a patch for this, and submitted it upstream[1]. I hope this can be integrated upstream, but if not, maybe it can be included downstream, or at least for the currently existing versions of telegram-desktop in the portage tree. I've tested this patch, and there don't seem to be any problems with it, so I'm comfortable submitting it. The ebuild patch is for 2.4.6, but 2.4.7 has no substantial changes to prevent it from applying. 1: https://github.com/telegramdesktop/tdesktop/issues/9031
Created attachment 670592 [details, diff] Proposed ebuild patch
Upstream closed the request with a cryptic link to an existing issue on the matter[1], where it's mentioned to be a maintenance burden, so this configuration won't be supported. However, that same issue is cross-referenced by an open pull request[2] that has a different patch to support this configuration, that hasn't been touched since july. I've linked my patch there in the hope of getting some response out of that. Ultimately I'm unclear on upstream's stance, given the open pull request, and I kind of disagree on the maintenance burden aspect given how it's just shorting out checks that would otherwise be performed during runtime (if IsWayland()). 1: https://github.com/telegramdesktop/tdesktop/issues/8282 2: https://github.com/telegramdesktop/tdesktop/pull/8351
I managed to get upstream to tell me how they'd prefer the patch to look like, I'll be seeing if I can accomodate for that soon.
thanks for working on it. if it's upstream we'll include it asap, maybe even backport to stable.
Just a general status update, that the patch was finalized a couple of days ago (aside from a possible stylistical change): https://github.com/telegramdesktop/tdesktop/pull/9051 I'm currently waiting on the main dev to weigh in, which might take a bit. They seem busy.
Created attachment 671893 [details, diff] Patch to include in FILESDIR The patch was merged! This means the "wayland" USE flag can be added from version 2.4.10 onwards. For the older versions, the ebuild patch included in this bug report is still applicable to 2.4.7-r1, and I've backported the patch from the pull request and attached it to this message, removing some bits that were only necessary for a static build and didn't apply cleanly. Building both with and without the "wayland" flag seems to work.
thanks for working on it. seems it was not-so-trivial amount of work. I'll do some testing and bump to 2.4.10 later today and will look at adding backport to stable version with a useflag.
Thanks! Most of the non-triviality stems from upstream requirements. The initial patch I submitted works about as well, and is significantly more simple.
(In reply to Esteve Varela Colominas from comment #8) > Thanks! > Most of the non-triviality stems from upstream requirements. The initial > patch I submitted works about as well, and is significantly more simple. I've just used your patch on 2.4.9 until 2.4.10 will appear in the tree. Thanks: Dw.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2658014f512c0c931c80a95f40828a8af8fb67af commit 2658014f512c0c931c80a95f40828a8af8fb67af Author: Georgy Yakovlev <gyakovlev@gentoo.org> AuthorDate: 2020-11-24 05:39:26 +0000 Commit: Georgy Yakovlev <gyakovlev@gentoo.org> CommitDate: 2020-11-24 05:53:03 +0000 net-im/telegram-desktop: bump to 2.4.11, make wayland optional Thanks-to: Esteve Varela Colominas <esteve.varela@gmail.com> Bug: https://bugs.gentoo.org/733234 Bug: https://bugs.gentoo.org/753737 Package-Manager: Portage-3.0.10, Repoman-3.0.2 Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org> net-im/telegram-desktop/Manifest | 2 +- ...elegram-desktop-2.4.9.ebuild => telegram-desktop-2.4.11.ebuild} | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-)
Implemented upstream and in the new ebuilds, resolved.