$ git diff --patch-with-stat --summary bc435b3555290e297d88e21cba17547eed483466..4098754e17175c48de9ef8534c4a3876ccdee025
.abf.yml | 2 +-
telegram-desktop.spec | 69 +++++++++++++++++++++++++++++----------------------
2 files changed, 41 insertions(+), 30 deletions(-)
diff --git a/.abf.yml b/.abf.yml
index d7a6d33..4939605 100644
--- a/.abf.yml
+++ b/.abf.yml
@@ -1,2 +1,2 @@
sources:
- tdesktop-4.2.4-full.tar.gz: 7aa065ee8284327435a01b8413ed272b6c84437f
+ tdesktop-4.6.3-full.tar.gz: 45236ad27cc6e21c9af47e7527cebe896dea480f
diff --git a/telegram-desktop.spec b/telegram-desktop.spec
index d08fefd..410887d 100644
--- a/telegram-desktop.spec
+++ b/telegram-desktop.spec
@@ -39,7 +39,7 @@
Name: telegram-desktop
# before every upgrade
# try to up tg_owt project first
-Version: 4.2.4
+Version: 4.6.3
Release: 1
# Application and 3rd-party modules licensing:
@@ -53,7 +53,7 @@ Summary: Telegram Desktop official messaging app
# Source files...
# Upstream frequently forgets to make the -full release. When that happens,
# use the package-source.sh script in this repository.
-Source0: %{url}/releases/download/v%{version}/%{appname}-%{version}%{tarsuffix}.tar.gz
+Source0: https://github.com/telegramdesktop/tdesktop/releases/download/v%{version}/%{appname}-%{version}%{tarsuffix}.tar.gz
Patch1: telegram-2.8.6-compile.patch
Patch3: tdesktop-2.8.5-compile.patch
Patch5: tdesktop-2.3.2-no-underlinking.patch
@@ -61,9 +61,6 @@ Patch6: tdesktop-2.7.9-compile.patch
Patch7: tdesktop-3.3.2-system-minizip.patch
#Patch9: tdesktop-4.0.4-compile.patch
-# Telegram Desktop require exact version of Qt due to Qt private API usage.
-%{?_qt5:Requires: %{_qt5}%{?_isa} = %{_qt5_version}}
-Requires: qt5-qtimageformats%{?_isa}
Requires: hicolor-icon-theme
# Telegram Desktop require patched version of rlottie since 1.8.0.
@@ -89,14 +86,13 @@ BuildRequires: mapbox-variant-devel
BuildRequires: pkgconfig(libavcodec)
BuildRequires: pkgconfig(libavformat)
BuildRequires: pkgconfig(xkbcommon)
-BuildRequires: pkgconfig(glibmm-2.4)
+BuildRequires: pkgconfig(glibmm-2.68)
BuildRequires: cmake(ECM)
BuildRequires: cmake(tl-expected)
BuildRequires: pkgconfig(libyuv)
BuildRequires: qr-code-generator-devel
BuildRequires: qr-code-generator-c++-devel
BuildRequires: pkgconfig(openal)
-BuildRequires: qt5-qtbase-devel
BuildRequires: pkgconfig(tgvoip)
BuildRequires: pkgconfig(xcb-keysyms)
BuildRequires: libstdc++-devel
@@ -108,7 +104,6 @@ BuildRequires: pkgconfig(libxxhash)
BuildRequires: appstream-util
BuildRequires: pkgconfig(opus)
BuildRequires: pkgconfig(liblzma)
-BuildRequires: pkgconfig(Qt5Gui)
BuildRequires: pkgconfig(json11)
BuildRequires: pkgconfig(liblz4)
BuildRequires: pkgconfig(libjpeg)
@@ -121,22 +116,35 @@ BuildRequires: pkgconfig(rnnoise)
BuildRequires: pkgconfig(minizip)
BuildRequires: pkgconfig(libzip)
BuildRequires: cmake(RapidJSON)
-BuildRequires: cmake(Qt5Network)
-BuildRequires: cmake(Qt5Core)
-BuildRequires: cmake(Qt5Svg)
-BuildRequires: cmake(dbusmenu-qt5)
-BuildRequires: cmake(Qt5WaylandClient)
-BuildRequires: cmake(Qt5XkbCommonSupport)
+BuildRequires: qmake-qt6
+BuildRequires: qt6-qtbase-tools
+BuildRequires: cmake(Qt6)
+BuildRequires: cmake(Qt6Core)
+BuildRequires: cmake(Qt6Core5Compat)
+BuildRequires: cmake(Qt6DBus)
+BuildRequires: cmake(Qt6Network)
+BuildRequires: cmake(Qt6Gui)
+BuildRequires: cmake(Qt6Svg)
+BuildRequires: cmake(Qt6WaylandClient)
+BuildRequires: cmake(Qt6OpenGL)
+BuildRequires: cmake(Qt6OpenGLWidgets)
+BuildRequires: cmake(Qt6Qml)
+BuildRequires: cmake(Qt6Quick)
+BuildRequires: cmake(Qt6QuickWidgets)
+BuildRequires: cmake(Qt6Widgets)
+BuildRequires: cmake(Qt6WaylandClient)
+BuildRequires: cmake(Qt6WaylandCompositor)
BuildRequires: cmake(tg_owt)
-BuildRequires: cmake(kf5wayland)
-BuildRequires: cmake(KF5CoreAddons)
-BuildRequires: qt5-qtwayland-private-devel
BuildRequires: wayland-devel
-BuildRequires: qt5-qtwayland
+BuildRequires: qt6-qtwayland
BuildRequires: ninja
%ifarch %{x86_64} %{ix86}
BuildRequires: yasm
%endif
+# FIXME At some point the cmake files should stop looking
+# for libraries that aren't being used
+#BuildRequires: cmake(Qt5Svg)
+#BuildRequires: cmake(KF5CoreAddons)
%if %{with gtk3}
BuildRequires: pkgconfig(appindicator3-0.1)
@@ -179,15 +187,11 @@ export LC_ALL=en_US.utf-8
# Unbundling libraries...
rm -rf Telegram/ThirdParty/{Catch,GSL,QR,SPMediaKeyTap,expected,libdbusmenu-qt,libtgvoip,lz4,minizip,variant,xxHash,mallocng}
-# Patching default desktop file...
-#desktop-file-edit --set-key=Exec --set-value="%{_bindir}/%{name} -- %u" --copy-name-to-generic-name lib/xdg/telegramdesktop.desktop
-
-# We disable Qt6 below because it's just another toolkit on top of KDE5.
-# Enable it once KDE uses Qt 6!
-
+export PATH=%{_libdir}/qt6/bin:$PATH
%cmake -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
- -DDESKTOP_APP_QT6:BOOL=OFF \
+ -DDESKTOP_APP_QT6:BOOL=ON \
+ -DQT_VERSION_MAJOR=6 \
-DDESKTOP_APP_DISABLE_JEMALLOC:BOOL=ON \
%if %{without gtk3}
-DDESKTOP_APP_DISABLE_GTK_INTEGRATION:BOOL=ON \
@@ -240,13 +244,20 @@ rm -rf Telegram/ThirdParty/{Catch,GSL,QR,SPMediaKeyTap,expected,libdbusmenu-qt,l
%build
touch build/changelog.txt
-%ninja_build -C build
+
+PROCESSES="$(getconf _NPROCESSORS_ONLN)"
+# Linking Telegram with LTO enabled is VERY RAM intensive
+# and breaks boxes that have loads of CPU cores but not
+# terabytes of RAM...
+[ "$PROCESSES" -gt 4 ] && PROCESSES=4
+
+%ninja_build -C build -j${PROCESSES}
%install
%ninja_install -C build
%check
-appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/%{launcher}.metainfo.xml
+appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/org.telegram.desktop.metainfo.xml
# validate hates "SingleMainWindow"
#desktop-file-validate %{buildroot}%{_datadir}/applications/%{launcher}.desktop
@@ -254,6 +265,6 @@ appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/%{launcher}.me
%doc README.md changelog.txt
%license LICENSE LEGAL
%{_bindir}/%{name}
-%{_datadir}/applications/%{launcher}.desktop
+%{_datadir}/applications/org.telegram.desktop.desktop
%{_datadir}/icons/hicolor/*/apps/*.png
-%optional %{_metainfodir}/%{launcher}.metainfo.xml
+%optional %{_metainfodir}/org.telegram.desktop.metainfo.xml