commit 605abe504e9b8cf09401b2282c907ae2db1171a7
Author: Vitaly Zaitsev <vitaly(a)easycoding.org>
Date: Sun Aug 14 11:01:49 2022 +0200
Updated to version 4.1.0.
Switched to compat-ffmpeg4 to mitigate RFBZ#6273.
.gitignore | 1 +
sources | 2 +-
telegram-desktop-4.1.0-gcc12-build-fixes.patch | 43 ++++++++++++++++++++++++++
telegram-desktop.spec | 42 +++++++++++++++----------
4 files changed, 71 insertions(+), 17 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e2955d9..668e000 100644
--- a/.gitignore
+++ b/.gitignore
@@ -179,3 +179,4 @@
/tdesktop-3.7.1-full.tar.gz
/tdesktop-3.7.3-full.tar.gz
/tdesktop-4.0.2-full.tar.gz
+/tdesktop-4.1.0-full.tar.gz
diff --git a/sources b/sources
index 6578640..da0068e 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (tdesktop-4.0.2-full.tar.gz) =
0078b627d06dd8e655bd2bcc222ecbb3b15b7d88f858810bccdca84793ad02a60f4a4bf3808838752d65d4f6cffa3ddb5f70c5afc8e94cb6edae52101362feeb
+SHA512 (tdesktop-4.1.0-full.tar.gz) =
d58ad4b3eaf72b4885612ecca0b29057a1f0e7efc7a539c4ed7cdfa9f6b8dd19e378f1e4b9f28a644d8c8559a5310a168e0b949aafac6902bd21155795db2574
diff --git a/telegram-desktop-4.1.0-gcc12-build-fixes.patch
b/telegram-desktop-4.1.0-gcc12-build-fixes.patch
new file mode 100644
index 0000000..84341d2
--- /dev/null
+++ b/telegram-desktop-4.1.0-gcc12-build-fixes.patch
@@ -0,0 +1,43 @@
+From f82089cbfe1c459022f9d4cad250b58a568e9619 Mon Sep 17 00:00:00 2001
+From: Joe Kappus <joe(a)wt.gd>
+Date: Fri, 12 Aug 2022 22:24:10 -0400
+Subject: [PATCH] Fix build with GCC 12.
+
+---
+ Telegram/SourceFiles/ffmpeg/ffmpeg_emoji.h | 1 +
+ Telegram/lib_lottie | 2 +-
+ 2 files changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/Telegram/SourceFiles/ffmpeg/ffmpeg_emoji.h
b/Telegram/SourceFiles/ffmpeg/ffmpeg_emoji.h
+index ac896903edab4..d1e4acd96dee3 100644
+--- a/Telegram/SourceFiles/ffmpeg/ffmpeg_emoji.h
++++ b/Telegram/SourceFiles/ffmpeg/ffmpeg_emoji.h
+@@ -10,6 +10,7 @@
+ #include "ui/effects/frame_generator.h"
+
+ #include <QtGui/QImage>
++#include <memory>
+
+ namespace FFmpeg {
+
+From f3563bc6b0e042095d4d667d013f62cb8ae62b65 Mon Sep 17 00:00:00 2001
+From: Joe Kappus <joe(a)wt.gd>
+Date: Fri, 12 Aug 2022 22:17:20 -0400
+Subject: [PATCH] fix build with GCC-12.
+
+---
+ lottie/lottie_emoji.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/lottie/lottie_emoji.h b/lottie/lottie_emoji.h
+index ec2221c..d882e87 100644
+--- a/Telegram/lib_lottie/lottie/lottie_emoji.h
++++ b/Telegram/lib_lottie/lottie/lottie_emoji.h
+@@ -9,6 +9,7 @@
+ #include "ui/effects/frame_generator.h"
+
+ #include <QtGui/QImage>
++#include <memory>
+
+ namespace rlottie {
+ class Animation;
diff --git a/telegram-desktop.spec b/telegram-desktop.spec
index 0a9c417..5e89b05 100644
--- a/telegram-desktop.spec
+++ b/telegram-desktop.spec
@@ -11,8 +11,8 @@
%global optflags %(echo %{optflags} | sed 's/-g /-g1 /')
Name: telegram-desktop
-Version: 4.0.2
-Release: 3%{?dist}
+Version: 4.1.0
+Release: 1%{?dist}
# Application and 3rd-party modules licensing:
# * Telegram Desktop - GPLv3+ with OpenSSL exception -- main tarball;
@@ -23,6 +23,9 @@ URL:
https://github.com/telegramdesktop/%{appname}
Summary: Telegram Desktop official messaging app
Source0: %{url}/releases/download/v%{version}/%{appname}-%{version}-full.tar.gz
+#
https://github.com/telegramdesktop/tdesktop/pull/24918
+Patch100: %{name}-4.1.0-gcc12-build-fixes.patch
+
# Telegram Desktop require more than 8 GB of RAM on linking stage.
# Disabling all low-memory architectures.
ExclusiveArch: x86_64 aarch64
@@ -49,15 +52,10 @@ BuildRequires: pkgconfig(glibmm-2.4)
BuildRequires: pkgconfig(gobject-2.0)
BuildRequires: pkgconfig(hunspell)
BuildRequires: pkgconfig(jemalloc)
-BuildRequires: pkgconfig(libavcodec)
-BuildRequires: pkgconfig(libavformat)
-BuildRequires: pkgconfig(libavutil)
BuildRequires: pkgconfig(libcrypto)
BuildRequires: pkgconfig(liblz4)
BuildRequires: pkgconfig(liblzma)
BuildRequires: pkgconfig(libpulse)
-BuildRequires: pkgconfig(libswresample)
-BuildRequires: pkgconfig(libswscale)
BuildRequires: pkgconfig(libxxhash)
BuildRequires: pkgconfig(openssl)
BuildRequires: pkgconfig(opus)
@@ -104,10 +102,19 @@ BuildRequires: pkgconfig(xcb-record)
BuildRequires: pkgconfig(xcb-screensaver)
%endif
-# Fedora now has a stripped ffmpeg. Make sure we're using the full version.
+# Telegram Desktop has major issues when built against ffmpeg 5.x:
+#
https://bugzilla.rpmfusion.org/show_bug.cgi?id=6273
+# Upstream refuses to fix this issue:
+#
https://github.com/telegramdesktop/tdesktop/issues/24855
+#
https://github.com/telegramdesktop/tdesktop/issues/23899
%if 0%{?fedora} && 0%{?fedora} >= 36
-BuildRequires: ffmpeg-devel
-Requires: ffmpeg-libs%{?_isa}
+BuildRequires: compat-ffmpeg4-devel
+%else
+BuildRequires: pkgconfig(libavcodec)
+BuildRequires: pkgconfig(libavformat)
+BuildRequires: pkgconfig(libavutil)
+BuildRequires: pkgconfig(libswresample)
+BuildRequires: pkgconfig(libswscale)
%endif
%{?_qt6:Requires: %{_qt6}%{?_isa} = %{_qt6_version}}
@@ -150,6 +157,11 @@ business messaging needs.
rm -rf
Telegram/ThirdParty/{GSL,QR,dispatch,expected,fcitx-qt5,fcitx5-qt,hime,hunspell,jemalloc,lz4,minizip,nimf,range-v3,xxHash}
%build
+# Setting pkgconfig path for compat-ffmpeg4...
+%if 0%{?fedora} && 0%{?fedora} >= 36
+export PKG_CONFIG_PATH="%{_libdir}/compat-ffmpeg4/pkgconfig/"
+%endif
+
# Building Telegram Desktop using cmake...
%cmake -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
@@ -195,15 +207,13 @@ desktop-file-validate
%{buildroot}%{_datadir}/applications/%{launcher}.desktop
%{_metainfodir}/%{launcher}.metainfo.xml
%changelog
+* Sun Aug 14 2022 Vitaly Zaitsev <vitaly(a)easycoding.org> - 4.1.0-1
+- Updated to version 4.1.0.
+- Switched to compat-ffmpeg4 to mitigate RFBZ#6273.
+
* Mon Aug 08 2022 RPM Fusion Release Engineering <sergiomb(a)rpmfusion.org> -
4.0.2-3
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild and ffmpeg
5.1
* Wed Jul 27 2022 Vitaly Zaitsev <vitaly(a)easycoding.org> - 4.0.2-2
- Rebuilt due to the Qt 6.3.1 update.
-
-* Sat Jun 25 2022 Vitaly Zaitsev <vitaly(a)easycoding.org> - 4.0.2-1
-- Updated to version 4.0.2.
-
-* Fri Jun 03 2022 Vitaly Zaitsev <vitaly(a)easycoding.org> - 3.7.3-2
-- Rebuilt due to Qt 6.3.0 update.