commit:     cce154e38c47220ad917cdcc3f4b6a57583f34b2
Author:     Paul Jewell <paul <AT> teulu <DOT> org>
AuthorDate: Sun Jun 29 20:39:32 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Jun 30 04:13:58 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cce154e3

net-im/telegram-desktop: Patch 5.12.3 for qt6.9 filename changes

[sam: Drop PYTHON_COMPAT hunk which just changed style.]

Closes: https://bugs.gentoo.org/959247
Signed-off-by: Paul Jewell <paul <AT> teulu.org>
Part-of: https://github.com/gentoo/gentoo/pull/42803
Closes: https://github.com/gentoo/gentoo/pull/42803
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/tdesktop-5.12.3-qt-namechange.patch      | 30 ++++++++++++++++++++++
 .../telegram-desktop-5.12.3-r6.ebuild              |  1 +
 2 files changed, 31 insertions(+)

diff --git a/net-im/telegram-desktop/files/tdesktop-5.12.3-qt-namechange.patch 
b/net-im/telegram-desktop/files/tdesktop-5.12.3-qt-namechange.patch
new file mode 100644
index 000000000000..7e84b4664ca5
--- /dev/null
+++ b/net-im/telegram-desktop/files/tdesktop-5.12.3-qt-namechange.patch
@@ -0,0 +1,30 @@
+Qt 6.9.0 has renamed a couple of files, meaning telegram-desktop fails to build
+
+https://bugs.gentoo.org/959247
+
+--- 
tdesktop-5.12.3-full/Telegram/lib_base/base/platform/linux/base_linux_xdp_utilities.cpp
    2025-06-29 10:42:13.725912379 +0100
++++ 
tdesktop-5.12.3-full-new/Telegram/lib_base/base/platform/linux/base_linux_xdp_utilities.cpp
        2025-06-29 10:52:41.097335188 +0100
+@@ -16,7 +16,11 @@
+ #if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
+ #include <qpa/qplatformintegration.h>
+ #include <private/qguiapplication_p.h>
++#if QT_VERSION >= QT_VERSION_CHECK(6, 9, 0)
++#include <private/qdesktopunixservices_p.h>
++#else
+ #include <private/qgenericunixservices_p.h>
++#endif // Qt >= 6.9.0
+ #endif // Qt >= 6.5.0
+ 
+ #include <sstream>
+@@ -39,7 +43,11 @@
+       }
+ 
+ #if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
++#if QT_VERSION >= QT_VERSION_CHECK(6, 9, 0)
++  if (const auto services = dynamic_cast<QDesktopUnixServices*>(
++#else
+       if (const auto services = dynamic_cast<QGenericUnixServices*>(
++#endif // Qt >= 6.9.0
+                       
QGuiApplicationPrivate::platformIntegration()->services())) {
+               return services->portalWindowIdentifier(window).toStdString();
+       }

diff --git a/net-im/telegram-desktop/telegram-desktop-5.12.3-r6.ebuild 
b/net-im/telegram-desktop/telegram-desktop-5.12.3-r6.ebuild
index aca23a42e99e..b9e43057628a 100644
--- a/net-im/telegram-desktop/telegram-desktop-5.12.3-r6.ebuild
+++ b/net-im/telegram-desktop/telegram-desktop-5.12.3-r6.ebuild
@@ -81,6 +81,7 @@ PATCHES=(
        "${FILESDIR}"/tdesktop-5.7.2-cstring.patch
        "${FILESDIR}"/tdesktop-5.8.3-cstdint.patch
        "${FILESDIR}"/tdesktop-5.12.3-fix-webview.patch
+       "${FILESDIR}"/tdesktop-5.12.3-qt-namechange.patch
 )
 
 pkg_pretend() {

Reply via email to