From 6cf1cec30a75aaf209bd2f2bac7578598d2f35f911fc70a80172f4a62b40baf5 Mon Sep 17 00:00:00 2001 From: Marcel Kuehlhorn Date: Thu, 21 Feb 2019 18:34:25 +0000 Subject: [PATCH] Accepting request 678049 from home:ramax:branches:server:messaging - Fix build failure for openSUSE Leap 15.0. This version of telegram is no longer buildable for Leap 42.3 due to the lack of c++17 support in gcc 4.8. OBS-URL: https://build.opensuse.org/request/show/678049 OBS-URL: https://build.opensuse.org/package/show/server:messaging/telegram-desktop?expand=0&rev=68 --- gcc7-fix.patch | 13 +++++++++++++ telegram-desktop.changes | 5 +++++ telegram-desktop.spec | 6 +++++- 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 gcc7-fix.patch diff --git a/gcc7-fix.patch b/gcc7-fix.patch new file mode 100644 index 0000000..f9605b3 --- /dev/null +++ b/gcc7-fix.patch @@ -0,0 +1,13 @@ +Index: tdesktop-1.5.15/Telegram/SourceFiles/boxes/add_contact_box.cpp +=================================================================== +--- tdesktop-1.5.15.orig/Telegram/SourceFiles/boxes/add_contact_box.cpp ++++ tdesktop-1.5.15/Telegram/SourceFiles/boxes/add_contact_box.cpp +@@ -97,7 +97,7 @@ void ShowAddParticipantsError( + channel, + user, + close, +- close); ++ [=] { close(0); }); + auto box = Box( + channel, + user, diff --git a/telegram-desktop.changes b/telegram-desktop.changes index 99015e7..f4cfe6e 100644 --- a/telegram-desktop.changes +++ b/telegram-desktop.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Feb 20 12:12:25 UTC 2019 - ramaxlo@gmail.com + +- Fix build failure for openSUSE Leap 15.0. + ------------------------------------------------------------------- Tue Feb 12 18:54:25 UTC 2019 - Marcel Kuehlhorn diff --git a/telegram-desktop.spec b/telegram-desktop.spec index f46660e..e7ef8e1 100644 --- a/telegram-desktop.spec +++ b/telegram-desktop.spec @@ -12,7 +12,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# Please submit bugfixes or comments via http://bugs.opensuse.org/ # @@ -47,6 +47,7 @@ Source10: crl-master.zip Source11: xxHash-master.zip Patch0: tdesktop.patch +Patch1: gcc7-fix.patch BuildRequires: chrpath BuildRequires: cmake BuildRequires: desktop-file-utils @@ -162,6 +163,9 @@ mv xxHash %{_builddir}/tdesktop-%{version}/Telegram/ThirdParty/ cp %{_sourcedir}/tdesktop.patch %{_builddir}/tdesktop-%{version} cd %{_builddir}/tdesktop-%{version} %patch0 -p1 +%if 0%{?sle_version} <= 150000 && 0%{?is_opensuse} +%patch1 -p1 +%endif cp %{_sourcedir}/patch.py . && python3 ./patch.py cp %{_sourcedir}/catch.hpp ./Telegram/SourceFiles/