commit 3de465935112e2af3ccf760c3d3228abb93f7a4b
Author: Vitaly Zaitsev <vitaly(a)easycoding.org>
Date: Wed Dec 13 13:52:36 2017 +0100
Updated to version 1.2.1.
.gitignore | 1 +
sources | 3 +-
telegram-desktop-build-fixes.patch | 56 ++++++++++++++++++++++----------------
telegram-desktop.spec | 34 ++++++++---------------
4 files changed, 47 insertions(+), 47 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 2277030..947f905 100644
--- a/.gitignore
+++ b/.gitignore
@@ -33,3 +33,4 @@
/tdesktop-1.1.22.tar.gz
/tdesktop-1.1.23.tar.gz
/tdesktop-1.2.0.tar.gz
+/tdesktop-1.2.1.tar.gz
diff --git a/sources b/sources
index 06c123e..6c24caa 100644
--- a/sources
+++ b/sources
@@ -1,2 +1 @@
-0373c28165f86474f8abdce278320c1a gyp-a478c1a.tar.gz
-b6381dfdd5603064322b3b38ef4179fa tdesktop-1.2.0.tar.gz
+45b4740c0fa0cdf1fa8193ad442c5e01 tdesktop-1.2.1.tar.gz
diff --git a/telegram-desktop-build-fixes.patch b/telegram-desktop-build-fixes.patch
index f6fc15c..67a4bbd 100644
--- a/telegram-desktop-build-fixes.patch
+++ b/telegram-desktop-build-fixes.patch
@@ -1,15 +1,16 @@
-From 8fe6c649fe8267be83d573aafb303266855220cd Mon Sep 17 00:00:00 2001
+From f1c4bfa96b3a605785bcf8f9935f31af60466c62 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/main.cpp | 12 +++-
+ 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 +++++++------------------
@@ -20,29 +21,29 @@ Subject: [PATCH] Fixed build under Fedora using rpmbuild and mock.
Telegram/gyp/telegram_sources.txt | 8 +--
lib/xdg/telegramdesktop.appdata.xml | 2 +-
lib/xdg/telegramdesktop.desktop | 6 +-
- 16 files changed, 168 insertions(+), 182 deletions(-)
+ 17 files changed, 170 insertions(+), 182 deletions(-)
create mode 100644 Telegram/SourceFiles/qt_functions.cpp
+ create mode 100644 Telegram/gyp/CMakeLists.inj
-diff --git a/Telegram/SourceFiles/main.cpp b/Telegram/SourceFiles/main.cpp
-index 6e85f27d..5b29d3f1 100644
---- a/Telegram/SourceFiles/main.cpp
-+++ b/Telegram/SourceFiles/main.cpp
-@@ -23,9 +23,10 @@ Copyright (c) 2014-2017 John Preston,
https://desktop.telegram.org
- #include "storage/localstorage.h"
+diff --git a/Telegram/SourceFiles/core/launcher.cpp
b/Telegram/SourceFiles/core/launcher.cpp
+index c0591597..69e0e75e 100644
+--- a/Telegram/SourceFiles/core/launcher.cpp
++++ b/Telegram/SourceFiles/core/launcher.cpp
+@@ -43,9 +43,9 @@ void Launcher::init() {
- int main(int argc, char *argv[]) {
--#ifndef Q_OS_MAC // Retina display support is working fine, others are not.
+ QCoreApplication::setApplicationName(qsl("TelegramDesktop"));
+
+-#ifndef OS_MAC_OLD
+#if !defined(Q_OS_MAC) && QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)
-+ // Retina display support is working fine, others are not.
QCoreApplication::setAttribute(Qt::AA_DisableHighDpiScaling, true);
--#endif // Q_OS_MAC
+-#endif // OS_MAC_OLD
+#endif // not defined Q_OS_MAC and QT_VERSION >= 5.6.0
- QCoreApplication::setApplicationName(qsl("TelegramDesktop"));
- InitFromCommandLine(argc, argv);
-@@ -38,6 +39,13 @@ int main(int argc, char *argv[]) {
+ initHook();
+ }
+@@ -62,6 +62,13 @@ int Launcher::exec() {
// both are finished in Application::closeApplication
- Logs::start(); // must be started before Platform is started
+ 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");
@@ -52,7 +53,7 @@ index 6e85f27d..5b29d3f1 100644
+ setenv("QT_STYLE_OVERRIDE", "qwerty", false);
+ unsetenv("QT_QPA_PLATFORMTHEME");
- int result = 0;
+ auto result = 0;
{
diff --git a/Telegram/SourceFiles/qt_functions.cpp
b/Telegram/SourceFiles/qt_functions.cpp
new file mode 100644
@@ -192,11 +193,11 @@ index 710277fe..5eb4465d 100644
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 f89644e1..35230cfc 100644
+index e435b50d..893496b4 100644
--- a/Telegram/SourceFiles/ui/text/text_block.cpp
+++ b/Telegram/SourceFiles/ui/text/text_block.cpp
-@@ -330,7 +330,7 @@ TextBlock::TextBlock(const style::font &font, const QString
&str, QFixed minResi
- SignalHandlers::setCrashAnnotationRef("CrashString", &part);
+@@ -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);
@@ -220,6 +221,15 @@ index a78af59d..feee450e 100644
);
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
+--- /dev/null
++++ b/Telegram/gyp/CMakeLists.inj
+@@ -0,0 +1,3 @@
++set_target_properties(Telegram PROPERTIES SKIP_BUILD_RPATH TRUE)
++include(../../Telegram/gyp/PrecompiledHeader.cmake)
++add_precompiled_header(Telegram ../../Telegram/SourceFiles/stdafx.h)
diff --git a/Telegram/gyp/PrecompiledHeader.cmake b/Telegram/gyp/PrecompiledHeader.cmake
index 5d6830e9..c3f08d3f 100644
--- a/Telegram/gyp/PrecompiledHeader.cmake
@@ -646,10 +656,10 @@ index f6918c22..5307a518 100644
],
}]
diff --git a/Telegram/gyp/telegram_sources.txt b/Telegram/gyp/telegram_sources.txt
-index e90614da..b2c9395d 100644
+index bbf2b2ad..f989fd9d 100644
--- a/Telegram/gyp/telegram_sources.txt
+++ b/Telegram/gyp/telegram_sources.txt
-@@ -681,13 +681,7 @@
+@@ -694,13 +694,7 @@
<(emoji_suggestions_loc)/emoji_suggestions.h
platforms: !win
diff --git a/telegram-desktop.spec b/telegram-desktop.spec
index 9e5efde..57bf0c7 100644
--- a/telegram-desktop.spec
+++ b/telegram-desktop.spec
@@ -1,23 +1,18 @@
# Telegram Desktop's constants...
%global appname tdesktop
-# Git revision of GYP...
-%global commit1 a478c1ab51ea3e04e79791ac3d1dad01b3f57434
-%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.0
+Version: 1.2.1
Release: 1%{?dist}
# Application and 3rd-party modules licensing:
# * S0 (Telegram Desktop) - GPLv3+ with OpenSSL exception -- main source;
-# * S1 (GYP) - BSD -- build-time dependency;
# * P0 (qt_functions.cpp) - LGPLv3 -- build-time dependency.
-License: GPLv3+ and LGPLv3 and BSD
+License: GPLv3+ and LGPLv3
Group: Applications/Internet
URL:
https://github.com/telegramdesktop/%{appname}
@@ -26,24 +21,20 @@ URL:
https://github.com/telegramdesktop/%{appname}
ExclusiveArch: i686 x86_64
Source0: %{url}/archive/v%{version}.tar.gz#/%{appname}-%{version}.tar.gz
-Source1:
https://chromium.googlesource.com/external/gyp/+archive/%{commit1}.tar.gz...
-
Patch0: %{name}-build-fixes.patch
+Recommends: libappindicator-gtk3%{?_isa}
Requires: qt5-qtimageformats%{?_isa}
Requires: hicolor-icon-theme
Requires: gtk3%{?_isa}
-%if 0%{?fedora} && 0%{?fedora} >= 24
-Recommends: libappindicator-gtk3%{?_isa}
-%endif
# Compilers and tools...
BuildRequires: desktop-file-utils
BuildRequires: libappstream-glib
BuildRequires: gcc-c++
-BuildRequires: chrpath
BuildRequires: cmake
BuildRequires: gcc
+BuildRequires: gyp
# Development packages for Telegram Desktop...
BuildRequires: guidelines-support-library-devel
@@ -78,19 +69,16 @@ personal or business messaging needs.
# Unpacking Telegram Desktop source archive...
%autosetup -n %{appname}-%{version} -p1
-# Unpacking GYP...
-mkdir -p Telegram/ThirdParty/gyp
-pushd Telegram/ThirdParty/gyp
- tar -xf %{SOURCE1}
- patch -p1 -i ../../../Telegram/Patches/gyp.diff
-popd
-
%build
# Generating cmake script using GYP...
pushd Telegram/gyp
- ../ThirdParty/gyp/gyp --depth=. --generator-output=../.. -Goutput_dir=out
Telegram.gyp --format=cmake
+ gyp --depth=. --generator-output=../.. -Goutput_dir=out Telegram.gyp --format=cmake
popd
+# Patching generated cmake manifest...
+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...
pushd out/Release
%cmake .
@@ -100,7 +88,6 @@ popd
%install
# Installing executables...
mkdir -p "%{buildroot}%{_bindir}"
-chrpath -d out/Release/Telegram
install -m 0755 -p out/Release/Telegram "%{buildroot}%{_bindir}/%{name}"
# Installing desktop shortcut...
@@ -147,6 +134,9 @@ fi
%{_datadir}/appdata/%{name}.appdata.xml
%changelog
+* Tue Dec 12 2017 Vitaly Zaitsev <vitaly(a)easycoding.org> - 1.2.1-1
+- Updated to 1.2.1.
+
* Sun Dec 10 2017 Vitaly Zaitsev <vitaly(a)easycoding.org> - 1.2.0-1
- Updated to 1.2.0.