commit 880d17ba3e1cb69a202c84cd88550ecf32f9c06a
Author: Vitaly Zaitsev <vitaly(a)easycoding.org>
Date: Sat Dec 30 14:22:21 2017 +0100
Updated to version 1.2.6.
.gitignore | 2 +
sources | 3 +-
telegram-desktop-build-fixes.patch | 161 +++++++++++--------------------------
telegram-desktop.spec | 31 ++++++-
4 files changed, 79 insertions(+), 118 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 947f905..7205239 100644
--- a/.gitignore
+++ b/.gitignore
@@ -34,3 +34,5 @@
/tdesktop-1.1.23.tar.gz
/tdesktop-1.2.0.tar.gz
/tdesktop-1.2.1.tar.gz
+/crl-9e11a5c.tar.gz
+/tdesktop-1.2.6.tar.gz
diff --git a/sources b/sources
index 6c24caa..b305db0 100644
--- a/sources
+++ b/sources
@@ -1 +1,2 @@
-45b4740c0fa0cdf1fa8193ad442c5e01 tdesktop-1.2.1.tar.gz
+a3280a044625e250ca4d4df1cd13fe80 crl-9e11a5c.tar.gz
+b7c9c19d164323b73e5bb192b755345e tdesktop-1.2.6.tar.gz
diff --git a/telegram-desktop-build-fixes.patch b/telegram-desktop-build-fixes.patch
index 67a4bbd..6eeb80d 100644
--- a/telegram-desktop-build-fixes.patch
+++ b/telegram-desktop-build-fixes.patch
@@ -1,60 +1,50 @@
-From f1c4bfa96b3a605785bcf8f9935f31af60466c62 Mon Sep 17 00:00:00 2001
+From ceed396b282092a70ff819b17552e3e31419847d Mon Sep 17 00:00:00 2001
From: Vitaly Zaitsev <vitaly(a)easycoding.org>
Date: Fri, 31 Mar 2017 14:29:58 +0200
Subject: [PATCH] Fixed build under Fedora using rpmbuild and mock.
---
- Telegram/SourceFiles/core/launcher.cpp | 11 +++-
- Telegram/SourceFiles/qt_functions.cpp | 94 +++++++++++++++++++++++++++++
- Telegram/SourceFiles/qt_static_plugins.cpp | 9 ---
- Telegram/SourceFiles/ui/text/text.cpp | 6 +-
- Telegram/SourceFiles/ui/text/text_block.cpp | 2 +-
- Telegram/SourceFiles/ui/twidget.cpp | 4 +-
- Telegram/gyp/CMakeLists.inj | 3 +
- Telegram/gyp/PrecompiledHeader.cmake | 4 +-
- Telegram/gyp/Telegram.gyp | 27 ++-------
- Telegram/gyp/qt.gypi | 81 +++++++------------------
- Telegram/gyp/qt_moc.gypi | 3 +-
- Telegram/gyp/qt_rcc.gypi | 2 +-
- Telegram/gyp/settings_linux.gypi | 5 --
- Telegram/gyp/telegram_linux.gypi | 85 ++++++--------------------
- Telegram/gyp/telegram_sources.txt | 8 +--
- lib/xdg/telegramdesktop.appdata.xml | 2 +-
- lib/xdg/telegramdesktop.desktop | 6 +-
- 17 files changed, 170 insertions(+), 182 deletions(-)
+ Telegram/Resources/qrc/telegram_linux.qrc | 1 -
+ Telegram/SourceFiles/core/launcher.cpp | 2 +
+ Telegram/SourceFiles/qt_functions.cpp | 94 +++++++++++++++++++++++++++++++
+ Telegram/gyp/CMakeLists.inj | 3 +
+ Telegram/gyp/PrecompiledHeader.cmake | 4 +-
+ Telegram/gyp/Telegram.gyp | 27 ++-------
+ Telegram/gyp/qt.gypi | 81 +++++++-------------------
+ Telegram/gyp/qt_moc.gypi | 3 +-
+ Telegram/gyp/qt_rcc.gypi | 2 +-
+ Telegram/gyp/settings_linux.gypi | 5 --
+ Telegram/gyp/telegram_linux.gypi | 85 +++++++---------------------
+ Telegram/gyp/telegram_sources.txt | 9 +--
+ lib/xdg/telegramdesktop.appdata.xml | 2 +-
+ lib/xdg/telegramdesktop.desktop | 6 +-
+ 14 files changed, 157 insertions(+), 167 deletions(-)
create mode 100644 Telegram/SourceFiles/qt_functions.cpp
create mode 100644 Telegram/gyp/CMakeLists.inj
+diff --git a/Telegram/Resources/qrc/telegram_linux.qrc
b/Telegram/Resources/qrc/telegram_linux.qrc
+index 0554fa17..3ea02740 100644
+--- a/Telegram/Resources/qrc/telegram_linux.qrc
++++ b/Telegram/Resources/qrc/telegram_linux.qrc
+@@ -1,5 +1,4 @@
+ <RCC>
+ <qresource prefix="/qt">
+- <file alias="etc/qt.conf">../etc/qt_linux.conf</file>
+ </qresource>
+ </RCC>
diff --git a/Telegram/SourceFiles/core/launcher.cpp
b/Telegram/SourceFiles/core/launcher.cpp
-index c0591597..69e0e75e 100644
+index bf21d14d..73b33feb 100644
--- a/Telegram/SourceFiles/core/launcher.cpp
+++ b/Telegram/SourceFiles/core/launcher.cpp
-@@ -43,9 +43,9 @@ void Launcher::init() {
-
- QCoreApplication::setApplicationName(qsl("TelegramDesktop"));
-
--#ifndef OS_MAC_OLD
-+#if !defined(Q_OS_MAC) && QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)
- QCoreApplication::setAttribute(Qt::AA_DisableHighDpiScaling, true);
--#endif // OS_MAC_OLD
-+#endif // not defined Q_OS_MAC and QT_VERSION >= 5.6.0
-
- initHook();
- }
-@@ -62,6 +62,13 @@ int Launcher::exec() {
- // both are finished in Application::closeApplication
+@@ -64,6 +64,8 @@ int Launcher::exec() {
Logs::start(this); // must be started before Platform is started
Platform::start(); // must be started before QApplication is created
-+#if defined(Q_OS_LINUX64)
-+ QCoreApplication::addLibraryPath("/usr/lib64/qt5/plugins");
-+#else
-+ QCoreApplication::addLibraryPath("/usr/lib/qt5/plugins");
-+#endif
+
+ setenv("QT_STYLE_OVERRIDE", "qwerty", false);
+ unsetenv("QT_QPA_PLATFORMTHEME");
+ auto result = executeApplication();
- auto result = 0;
- {
+ DEBUG_LOG(("Telegram finished, result: %1").arg(result));
diff --git a/Telegram/SourceFiles/qt_functions.cpp
b/Telegram/SourceFiles/qt_functions.cpp
new file mode 100644
index 00000000..4a722b8d
@@ -155,72 +145,6 @@ index 00000000..4a722b8d
+ if (f->d->strikeOut || charFormat.fontStrikeOut())
+ flags |= QTextItem::StrikeOut;
+}
-diff --git a/Telegram/SourceFiles/qt_static_plugins.cpp
b/Telegram/SourceFiles/qt_static_plugins.cpp
-index b975c7a8..f2f876b3 100644
---- a/Telegram/SourceFiles/qt_static_plugins.cpp
-+++ b/Telegram/SourceFiles/qt_static_plugins.cpp
-@@ -28,13 +28,4 @@ Q_IMPORT_PLUGIN(QWebpPlugin)
- Q_IMPORT_PLUGIN(QCocoaIntegrationPlugin)
- Q_IMPORT_PLUGIN(QGenericEnginePlugin)
- #elif defined Q_OS_LINUX // Q_OS_WIN | Q_OS_MAC
--Q_IMPORT_PLUGIN(QWebpPlugin)
--Q_IMPORT_PLUGIN(QXcbIntegrationPlugin)
--Q_IMPORT_PLUGIN(QConnmanEnginePlugin)
--Q_IMPORT_PLUGIN(QGenericEnginePlugin)
--Q_IMPORT_PLUGIN(QNetworkManagerEnginePlugin)
--Q_IMPORT_PLUGIN(QComposePlatformInputContextPlugin)
--Q_IMPORT_PLUGIN(QIbusPlatformInputContextPlugin)
--Q_IMPORT_PLUGIN(QFcitxPlatformInputContextPlugin)
--Q_IMPORT_PLUGIN(QHimePlatformInputContextPlugin)
- #endif // Q_OS_WIN | Q_OS_MAC | Q_OS_LINUX
-diff --git a/Telegram/SourceFiles/ui/text/text.cpp
b/Telegram/SourceFiles/ui/text/text.cpp
-index 710277fe..5eb4465d 100644
---- a/Telegram/SourceFiles/ui/text/text.cpp
-+++ b/Telegram/SourceFiles/ui/text/text.cpp
-@@ -1707,11 +1707,11 @@ private:
- if (item == -1)
- return;
-
--#ifdef OS_MAC_OLD
-+#if defined(OS_MAC_OLD) || QT_VERSION < QT_VERSION_CHECK(5, 6, 0)
- auto end = _e->findItem(line.from + line.length - 1);
--#else // OS_MAC_OLD
-+#else
- auto end = _e->findItem(line.from + line.length - 1, item);
--#endif // OS_MAC_OLD
-+#endif
-
- auto blockIndex = _lineStartBlock;
- auto currentBlock = _t->_blocks[blockIndex].get();
-diff --git a/Telegram/SourceFiles/ui/text/text_block.cpp
b/Telegram/SourceFiles/ui/text/text_block.cpp
-index e435b50d..893496b4 100644
---- a/Telegram/SourceFiles/ui/text/text_block.cpp
-+++ b/Telegram/SourceFiles/ui/text/text_block.cpp
-@@ -332,7 +332,7 @@ TextBlock::TextBlock(const style::font &font, const QString
&str, QFixed minResi
- CrashReports::SetAnnotationRef("CrashString", &part);
-
- QStackTextEngine engine(part, blockFont->f);
-- QTextLayout layout(&engine);
-+ QTextLayout layout(part, blockFont->f);
- layout.beginLayout();
- layout.createLine();
-
-diff --git a/Telegram/SourceFiles/ui/twidget.cpp b/Telegram/SourceFiles/ui/twidget.cpp
-index a78af59d..feee450e 100644
---- a/Telegram/SourceFiles/ui/twidget.cpp
-+++ b/Telegram/SourceFiles/ui/twidget.cpp
-@@ -234,9 +234,9 @@ void sendSynteticMouseEvent(QWidget *widget, QEvent::Type type,
Qt::MouseButton
- , button
- , QGuiApplication::mouseButtons() | button
- , QGuiApplication::keyboardModifiers()
--#ifndef OS_MAC_OLD
-+#if !defined(OS_MAC_OLD) && QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)
- , Qt::MouseEventSynthesizedByApplication
--#endif // OS_MAC_OLD
-+#endif
- );
- ev.setTimestamp(getms());
- QGuiApplication::sendEvent(windowHandle, &ev);
diff --git a/Telegram/gyp/CMakeLists.inj b/Telegram/gyp/CMakeLists.inj
new file mode 100644
index 00000000..6207bc74
@@ -253,7 +177,7 @@ index 5d6830e9..c3f08d3f 100644
IMPLICIT_DEPENDS CXX "${_pch_header}"
COMMENT "Precompiling ${_name} for ${_target} (C++)")
diff --git a/Telegram/gyp/Telegram.gyp b/Telegram/gyp/Telegram.gyp
-index 31480945..ffd5d6a6 100644
+index 84a06153..7e6f41b7 100644
--- a/Telegram/gyp/Telegram.gyp
+++ b/Telegram/gyp/Telegram.gyp
@@ -31,7 +31,6 @@
@@ -273,13 +197,14 @@ index 31480945..ffd5d6a6 100644
'telegram_linux.gypi',
'qt.gypi',
'qt_moc.gypi',
-@@ -81,33 +78,22 @@
+@@ -81,34 +78,23 @@
'codegen.gyp:codegen_lang',
'codegen.gyp:codegen_numbers',
'codegen.gyp:codegen_style',
- 'tests/tests.gyp:tests',
- 'utils.gyp:Updater',
- '../ThirdParty/libtgvoip/libtgvoip.gyp:libtgvoip',
+ 'crl.gyp:crl',
],
'defines': [
@@ -310,10 +235,10 @@ index 31480945..ffd5d6a6 100644
'<(emoji_suggestions_loc)',
- '<(submodules_loc)/GSL/include',
- '<(submodules_loc)/variant/include',
+ '<(submodules_loc)/crl/src',
],
'sources': [
- '<@(qrc_files)',
-@@ -124,7 +110,6 @@
+@@ -126,7 +112,6 @@
'CUSTOM_API_ID',
],
'dependencies': [
@@ -656,10 +581,19 @@ index f6918c22..5307a518 100644
],
}]
diff --git a/Telegram/gyp/telegram_sources.txt b/Telegram/gyp/telegram_sources.txt
-index bbf2b2ad..f989fd9d 100644
+index 5d2f627e..b5a261f3 100644
--- a/Telegram/gyp/telegram_sources.txt
+++ b/Telegram/gyp/telegram_sources.txt
-@@ -694,13 +694,7 @@
+@@ -703,7 +703,7 @@
+ <(src_loc)/observer_peer.h
+ <(src_loc)/passcodewidget.cpp
+ <(src_loc)/passcodewidget.h
+-<(src_loc)/qt_static_plugins.cpp
++<(src_loc)/qt_functions.cpp
+ <(src_loc)/settings.cpp
+ <(src_loc)/settings.h
+ <(src_loc)/shortcuts.cpp
+@@ -714,13 +714,6 @@
<(emoji_suggestions_loc)/emoji_suggestions.h
platforms: !win
@@ -670,7 +604,6 @@ index bbf2b2ad..f989fd9d 100644
-<(minizip_loc)/zip.h
-<(minizip_loc)/unzip.c
-<(minizip_loc)/unzip.h
-+<(src_loc)/qt_functions.cpp
platforms: mac
<(sp_media_key_tap_loc)/SPMediaKeyTap.m
diff --git a/telegram-desktop.spec b/telegram-desktop.spec
index 57bf0c7..2ff2f78 100644
--- a/telegram-desktop.spec
+++ b/telegram-desktop.spec
@@ -1,16 +1,21 @@
# Telegram Desktop's constants...
%global appname tdesktop
+# Git revision of crl...
+%global commit1 9e11a5c9291760d03df559d03d81fa7afdd0a46d
+%global shortcommit1 %(c=%{commit1}; echo ${c:0:7})
+
# Decrease debuginfo verbosity to reduce memory consumption...
%global optflags %(echo %{optflags} | sed 's/-g /-g1 /')
Summary: Telegram is a new era of messaging
Name: telegram-desktop
-Version: 1.2.1
+Version: 1.2.6
Release: 1%{?dist}
# Application and 3rd-party modules licensing:
# * S0 (Telegram Desktop) - GPLv3+ with OpenSSL exception -- main source;
+# * S1 (crl) - GPLv3+ -- build-time dependency;
# * P0 (qt_functions.cpp) - LGPLv3 -- build-time dependency.
License: GPLv3+ and LGPLv3
Group: Applications/Internet
@@ -21,6 +26,7 @@ URL:
https://github.com/telegramdesktop/%{appname}
ExclusiveArch: i686 x86_64
Source0: %{url}/archive/v%{version}.tar.gz#/%{appname}-%{version}.tar.gz
+Source1:
https://github.com/telegramdesktop/crl/archive/%{commit1}.tar.gz#/crl-%{s...
Patch0: %{name}-build-fixes.patch
Recommends: libappindicator-gtk3%{?_isa}
@@ -69,14 +75,21 @@ personal or business messaging needs.
# Unpacking Telegram Desktop source archive...
%autosetup -n %{appname}-%{version} -p1
+# Unpacking crl...
+pushd Telegram/ThirdParty
+ rm -rf crl
+ tar -xf %{SOURCE1}
+ mv crl-%{commit1} crl
+popd
+
%build
# Generating cmake script using GYP...
pushd Telegram/gyp
gyp --depth=. --generator-output=../.. -Goutput_dir=out Telegram.gyp --format=cmake
popd
-# Patching generated cmake manifest...
-LEN=$((`wc -l < out/Release/CMakeLists.txt` - 2))
+# Patching generated cmake script...
+LEN=$(($(wc -l < out/Release/CMakeLists.txt) - 2))
sed -i "$LEN r Telegram/gyp/CMakeLists.inj" out/Release/CMakeLists.txt
# Building Telegram Desktop using cmake...
@@ -134,6 +147,18 @@ fi
%{_datadir}/appdata/%{name}.appdata.xml
%changelog
+* Sat Dec 30 2017 Vitaly Zaitsev <vitaly(a)easycoding.org> - 1.2.6-1
+- Updated to 1.2.6.
+
+* Fri Dec 29 2017 Vitaly Zaitsev <vitaly(a)easycoding.org> - 1.2.5-1
+- Updated to 1.2.5 (alpha).
+
+* Wed Dec 27 2017 Vitaly Zaitsev <vitaly(a)easycoding.org> - 1.2.4-1
+- Updated to 1.2.4 (alpha).
+
+* Sun Dec 17 2017 Vitaly Zaitsev <vitaly(a)easycoding.org> - 1.2.3-1
+- Updated to 1.2.3 (alpha).
+
* Tue Dec 12 2017 Vitaly Zaitsev <vitaly(a)easycoding.org> - 1.2.1-1
- Updated to 1.2.1.