From 877e53b3c028a5beb214d75c974fd0ce500ec97b Mon Sep 17 00:00:00 2001 From: Leo Date: Sun, 7 Jul 2019 10:55:19 -0300 Subject: testing/telegram-desktop: upgrade to 1.7.14 --- testing/telegram-desktop/0001-musl.patch | 11 + testing/telegram-desktop/0002-tdesktop.patch | 533 +++++++++++++++++++++ .../0003-fix-missing-use-of-pch.patch | 11 + testing/telegram-desktop/0004-xdg.patch | 30 ++ .../telegram-desktop/0005-system-wide-fonts.patch | 34 ++ .../0006-ppc64le-enable-arch.patch | 37 ++ testing/telegram-desktop/0007-no-gtk2.patch | 27 ++ testing/telegram-desktop/0009-lz4.patch | 35 ++ testing/telegram-desktop/0010-libtgvoip.patch | 19 + testing/telegram-desktop/0011-no-static-qt.patch | 14 + testing/telegram-desktop/0012-ffmpeg.patch | 73 +++ testing/telegram-desktop/0013-lz4.patch | 13 + testing/telegram-desktop/0014-clock_gettime.patch | 44 ++ testing/telegram-desktop/APKBUILD | 197 ++++---- testing/telegram-desktop/CMakeLists.inj | 19 + testing/telegram-desktop/FindBreakpad.cmake | 19 - .../telegram-desktop/PrecompiledHeader-cmake.patch | 21 - testing/telegram-desktop/Telegram.cmake | 255 ---------- testing/telegram-desktop/TelegramCodegen.cmake | 97 ---- .../telegram-desktop/TelegramCodegenTools.cmake | 33 -- testing/telegram-desktop/TelegramTests.cmake | 62 --- testing/telegram-desktop/ThirdParty-crl.cmake | 17 - .../ThirdParty-libtgvoip-webrtc.cmake | 371 -------------- .../telegram-desktop/ThirdParty-libtgvoip.cmake | 38 -- testing/telegram-desktop/ThirdParty-qtlottie.cmake | 43 -- .../add-private-qt-functions.patch | 101 ---- testing/telegram-desktop/dynamic-linking-qt5.patch | 47 -- .../telegram-desktop/fix-missing-use-of-pch.patch | 11 - testing/telegram-desktop/musl.patch | 10 - testing/telegram-desktop/no-gtk2.patch | 27 -- testing/telegram-desktop/no-pulse.patch | 11 - testing/telegram-desktop/ppc64le-enable-arch.patch | 37 -- testing/telegram-desktop/sourcefiles-lottie.patch | 13 - testing/telegram-desktop/submodule-lottie.patch | 13 - testing/telegram-desktop/system-wide-fonts.patch | 34 -- testing/telegram-desktop/xdg.patch | 30 -- 36 files changed, 990 insertions(+), 1397 deletions(-) create mode 100644 testing/telegram-desktop/0001-musl.patch create mode 100644 testing/telegram-desktop/0002-tdesktop.patch create mode 100644 testing/telegram-desktop/0003-fix-missing-use-of-pch.patch create mode 100644 testing/telegram-desktop/0004-xdg.patch create mode 100644 testing/telegram-desktop/0005-system-wide-fonts.patch create mode 100644 testing/telegram-desktop/0006-ppc64le-enable-arch.patch create mode 100644 testing/telegram-desktop/0007-no-gtk2.patch create mode 100644 testing/telegram-desktop/0009-lz4.patch create mode 100644 testing/telegram-desktop/0010-libtgvoip.patch create mode 100644 testing/telegram-desktop/0011-no-static-qt.patch create mode 100644 testing/telegram-desktop/0012-ffmpeg.patch create mode 100644 testing/telegram-desktop/0013-lz4.patch create mode 100644 testing/telegram-desktop/0014-clock_gettime.patch create mode 100644 testing/telegram-desktop/CMakeLists.inj delete mode 100644 testing/telegram-desktop/FindBreakpad.cmake delete mode 100644 testing/telegram-desktop/PrecompiledHeader-cmake.patch delete mode 100644 testing/telegram-desktop/Telegram.cmake delete mode 100644 testing/telegram-desktop/TelegramCodegen.cmake delete mode 100644 testing/telegram-desktop/TelegramCodegenTools.cmake delete mode 100644 testing/telegram-desktop/TelegramTests.cmake delete mode 100644 testing/telegram-desktop/ThirdParty-crl.cmake delete mode 100644 testing/telegram-desktop/ThirdParty-libtgvoip-webrtc.cmake delete mode 100644 testing/telegram-desktop/ThirdParty-libtgvoip.cmake delete mode 100644 testing/telegram-desktop/ThirdParty-qtlottie.cmake delete mode 100644 testing/telegram-desktop/add-private-qt-functions.patch delete mode 100644 testing/telegram-desktop/dynamic-linking-qt5.patch delete mode 100644 testing/telegram-desktop/fix-missing-use-of-pch.patch delete mode 100644 testing/telegram-desktop/musl.patch delete mode 100644 testing/telegram-desktop/no-gtk2.patch delete mode 100644 testing/telegram-desktop/no-pulse.patch delete mode 100644 testing/telegram-desktop/ppc64le-enable-arch.patch delete mode 100644 testing/telegram-desktop/sourcefiles-lottie.patch delete mode 100644 testing/telegram-desktop/submodule-lottie.patch delete mode 100644 testing/telegram-desktop/system-wide-fonts.patch delete mode 100644 testing/telegram-desktop/xdg.patch (limited to 'testing/telegram-desktop') diff --git a/testing/telegram-desktop/0001-musl.patch b/testing/telegram-desktop/0001-musl.patch new file mode 100644 index 00000000000..e9c6bc03cc4 --- /dev/null +++ b/testing/telegram-desktop/0001-musl.patch @@ -0,0 +1,11 @@ +--- a/Telegram/ThirdParty/libtgvoip/os/linux/AudioPulse.cpp ++++ b/Telegram/ThirdParty/libtgvoip/os/linux/AudioPulse.cpp +@@ -6,6 +6,7 @@ + + #include "AudioPulse.h" + #include ++#include + #include "../../logging.h" + + #define DECLARE_DL_FUNCTION(name) typeof(name)* AudioPulse::_import_##name=NULL + diff --git a/testing/telegram-desktop/0002-tdesktop.patch b/testing/telegram-desktop/0002-tdesktop.patch new file mode 100644 index 00000000000..dbb86a665bd --- /dev/null +++ b/testing/telegram-desktop/0002-tdesktop.patch @@ -0,0 +1,533 @@ +diff --git a/Telegram/Resources/qrc/telegram_linux.qrc b/Telegram/Resources/qrc/telegram_linux.qrc +index 0554fa179..3ea027406 100644 +--- a/Telegram/Resources/qrc/telegram_linux.qrc ++++ b/Telegram/Resources/qrc/telegram_linux.qrc +@@ -1,5 +1,4 @@ + + +- ../etc/qt_linux.conf + + +diff --git a/Telegram/SourceFiles/core/launcher.cpp b/Telegram/SourceFiles/core/launcher.cpp +index b1246588a..7f522cc86 100644 +--- a/Telegram/SourceFiles/core/launcher.cpp ++++ b/Telegram/SourceFiles/core/launcher.cpp +@@ -59,6 +60,19 @@ int Launcher::exec() { + Logs::start(this); // must be started before Platform is started + Platform::start(); // must be started before QApplication is created + ++ // I don't know why path is not in QT_PLUGIN_PATH by default ++ QCoreApplication::addLibraryPath("/usr/lib/qt5/plugins"); ++ // without this Telegram doesn't start on Ubuntu 17.04 due GTK errors ++ setenv("QT_STYLE_OVERRIDE", "qwerty", false); ++ // Telegram doesn't start when extraordinary theme is set, see launchpad.net/bugs/1680943 ++ unsetenv("QT_QPA_PLATFORMTHEME"); ++ ++ // unset QT screen scale related envvars ++ unsetenv("QT_SCREEN_SCALE_FACTORS"); ++ unsetenv("QT_AUTO_SCREEN_SCALE_FACTOR"); ++ unsetenv("QT_SCALE_FACTOR"); ++ unsetenv("QT_DEVICE_PIXEL_RATIO"); ++ + auto result = executeApplication(); + + 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 000000000..4a722b8d7 +--- /dev/null ++++ b/Telegram/SourceFiles/qt_functions.cpp +@@ -0,0 +1,94 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Contact: http://www.qt.io/licensing/ ++** ++** This file contains some parts of the Qt Toolkit. ++** ++** $QT_BEGIN_LICENSE:LGPL21$ ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and The Qt Company. For licensing terms ++** and conditions see http://www.qt.io/terms-conditions. For further ++** information use the contact form at http://www.qt.io/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 or version 3 as published by the Free ++** Software Foundation and appearing in the file LICENSE.LGPLv21 and ++** LICENSE.LGPLv3 included in the packaging of this file. Please review the ++** following information to ensure the GNU Lesser General Public License ++** requirements will be met: https://www.gnu.org/licenses/lgpl.html and ++** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** As a special exception, The Qt Company gives you certain additional ++** rights. These rights are described in The Qt Company LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++** $QT_END_LICENSE$ ++** ++****************************************************************************/ ++ ++/* TODO: find a dynamic library with these symbols. */ ++ ++/* Debian maintainer: this function is taken from qfiledialog.cpp */ ++/* ++ Makes a list of filters from ;;-separated text. ++ Used by the mac and windows implementations ++*/ ++QStringList qt_make_filter_list(const QString &filter) ++{ ++ QString f(filter); ++ ++ if (f.isEmpty()) ++ return QStringList(); ++ ++ QString sep(QLatin1String(";;")); ++ int i = f.indexOf(sep, 0); ++ if (i == -1) { ++ if (f.indexOf(QLatin1Char('\n'), 0) != -1) { ++ sep = QLatin1Char('\n'); ++ i = f.indexOf(sep, 0); ++ } ++ } ++ ++ return f.split(sep); ++} ++ ++/* Debian maintainer: this constructor is taken from qtextengine.cpp for TextPainter::drawLine */ ++QTextItemInt::QTextItemInt(const QGlyphLayout &g, QFont *font, const QChar *chars_, int numChars, QFontEngine *fe, const QTextCharFormat &format) ++ : flags(0), justified(false), underlineStyle(QTextCharFormat::NoUnderline), charFormat(format), ++ num_chars(numChars), chars(chars_), logClusters(0), f(font), glyphs(g), fontEngine(fe) ++{ ++} ++ ++/* Debian maintainer: this method is also taken from qtextengine.cpp */ ++// Fix up flags and underlineStyle with given info ++void QTextItemInt::initWithScriptItem(const QScriptItem &si) ++{ ++ // explicitly initialize flags so that initFontAttributes can be called ++ // multiple times on the same TextItem ++ flags = 0; ++ if (si.analysis.bidiLevel %2) ++ flags |= QTextItem::RightToLeft; ++ ascent = si.ascent; ++ descent = si.descent; ++ ++ if (charFormat.hasProperty(QTextFormat::TextUnderlineStyle)) { ++ underlineStyle = charFormat.underlineStyle(); ++ } else if (charFormat.boolProperty(QTextFormat::FontUnderline) ++ || f->d->underline) { ++ underlineStyle = QTextCharFormat::SingleUnderline; ++ } ++ ++ // compat ++ if (underlineStyle == QTextCharFormat::SingleUnderline) ++ flags |= QTextItem::Underline; ++ ++ if (f->d->overline || charFormat.fontOverline()) ++ flags |= QTextItem::Overline; ++ 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 a757d085f..122ff0f5d 100644 +--- a/Telegram/SourceFiles/qt_static_plugins.cpp ++++ b/Telegram/SourceFiles/qt_static_plugins.cpp +@@ -15,14 +15,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) +-Q_IMPORT_PLUGIN(NimfInputContextPlugin) + #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 944f58479..887c1982f 100644 +--- a/Telegram/SourceFiles/ui/text/text.cpp ++++ b/Telegram/SourceFiles/ui/text/text.cpp +@@ -1750,11 +1750,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 2959cec77..04ad00645 100644 +--- a/Telegram/SourceFiles/ui/text/text_block.cpp ++++ b/Telegram/SourceFiles/ui/text/text_block.cpp +@@ -332,6 +332,9 @@ TextBlock::TextBlock(const style::font &font, const QString &str, QFixed minResi + + QStackTextEngine engine(part, blockFont->f); + BlockParser parser(&engine, this, minResizeWidth, _from, part); ++ QTextLayout layout(part, blockFont->f); ++ layout.beginLayout(); ++ layout.createLine(); + + CrashReports::ClearAnnotationRef("CrashString"); + } +diff --git a/Telegram/SourceFiles/ui/twidget.cpp b/Telegram/SourceFiles/ui/twidget.cpp +index 71f318229..461f52278 100644 +--- a/Telegram/SourceFiles/ui/twidget.cpp ++++ b/Telegram/SourceFiles/ui/twidget.cpp +@@ -233,9 +233,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/PrecompiledHeader.cmake b/Telegram/gyp/PrecompiledHeader.cmake +index a0e1e0489..223113081 100644 +--- a/Telegram/gyp/PrecompiledHeader.cmake ++++ b/Telegram/gyp/PrecompiledHeader.cmake +@@ -114,7 +114,7 @@ function(add_precompiled_header _target _input) + set(_compiler_FLAGS "@${_pch_c_flags_file}") + add_custom_command( + OUTPUT "${_output_c}" +- COMMAND "${CMAKE_C_COMPILER}" ${_compiler_FLAGS} -x c-header -o "${_output_c}" -c "${_pchfile}" ++ COMMAND "${CMAKE_C_COMPILER}" ${_compiler_FLAGS} "$(C_DEFINES)" "$(C_INCLUDES)" "$(C_FLAGS)" -x c-header -o "${_output_c}" -c "${_pchfile}" + DEPENDS "${_pchfile}" "${_pch_c_flags_file}" + IMPLICIT_DEPENDS C "${_pch_header}" + COMMENT "Precompiling ${_name} for ${_target} (C)") +@@ -125,7 +125,7 @@ function(add_precompiled_header _target _input) + set(_compiler_FLAGS "@${_pch_cpp_flags_file}") + add_custom_command( + OUTPUT "${_output_cxx}" +- COMMAND "${CMAKE_CXX_COMPILER}" ${_compiler_FLAGS} -x c++-header -o "${_output_cxx}" -c "${_pchfile}" ++ COMMAND "${CMAKE_CXX_COMPILER}" ${_compiler_FLAGS} "$(CXX_DEFINES)" "$(CXX_INCLUDES)" "$(CXX_FLAGS)" -x c++-header -o "${_output_cxx}" -c "${_pchfile}" + DEPENDS "${_pchfile}" "${_pch_cpp_flags_file}" + IMPLICIT_DEPENDS CXX "${_pch_header}" + COMMENT "Precompiling header ${_name} for ${_target} (C++)") +diff --git a/Telegram/gyp/Telegram.gyp b/Telegram/gyp/Telegram.gyp +index 1cab5ae29..465e8276a 100644 +--- a/Telegram/gyp/Telegram.gyp ++++ b/Telegram/gyp/Telegram.gyp +@@ -75,7 +75,6 @@ + 'codegen.gyp:codegen_numbers', + 'codegen.gyp:codegen_style', + 'tests/tests.gyp:tests', +- 'utils.gyp:Updater', + '../ThirdParty/libtgvoip/libtgvoip.gyp:libtgvoip', + 'crl.gyp:crl', + 'lib_base.gyp:lib_base', +@@ -84,7 +83,6 @@ + ], + + 'defines': [ +- 'AL_LIBTYPE_STATIC', + 'AL_ALEXT_PROTOTYPES', + 'TGVOIP_USE_CXX11_LIB', + 'XXH_INLINE_ALL', +@@ -94,16 +92,8 @@ + 'include_dirs': [ + '<(src_loc)', + '<(SHARED_INTERMEDIATE_DIR)', +- '<(libs_loc)/breakpad/src', +- '<(libs_loc)/lzma/C', +- '<(libs_loc)/zlib', +- '<(libs_loc)/ffmpeg', +- '<(libs_loc)/openal-soft/include', +- '<(libs_loc)/opus/include', +- '<(libs_loc)/range-v3/include', +- '<(minizip_loc)', +- '<(sp_media_key_tap_loc)', + '<(emoji_suggestions_loc)', ++ '/usr/include/minizip', + '<(submodules_loc)/GSL/include', + '<(submodules_loc)/variant/include', + '<(submodules_loc)/crl/src', +diff --git a/Telegram/gyp/qt.gypi b/Telegram/gyp/qt.gypi +index 0b783ec21..3f917765a 100644 +--- a/Telegram/gyp/qt.gypi ++++ b/Telegram/gyp/qt.gypi +@@ -14,25 +14,21 @@ + [ 'build_macold', { + 'qt_version%': '5.3.2', + }, { +- 'qt_version%': '5.6.2', ++ 'qt_version%': ' /dev/null --libs <@(pkgconfig_libs))', + ], + 'cflags_cc': [ +@@ -97,9 +89,8 @@ + ], + }], ['not_need_gtk!="True"', { + 'cflags_cc': [ +- ' /dev/null --cflags gtk+-2.0)', +- ' /dev/null --cflags glib-2.0)', +- ' /dev/null --cflags dee-1.0)', ++ ' /dev/null --cflags appindicator3-0.1)', ++ ' /dev/null --cflags gtk+-3.0)', + ], + }], [' + #include + #include + diff --git a/testing/telegram-desktop/0004-xdg.patch b/testing/telegram-desktop/0004-xdg.patch new file mode 100644 index 00000000000..e26bda0bc78 --- /dev/null +++ b/testing/telegram-desktop/0004-xdg.patch @@ -0,0 +1,30 @@ +--- a/lib/xdg/telegramdesktop.desktop ++++ b/lib/xdg/telegramdesktop.desktop +@@ -1,6 +1,8 @@ + [Desktop Entry] + Version=1.0 + Name=Telegram Desktop ++GenericName=Telegram Desktop ++Keywords=IM;Chat; + Comment=Official desktop version of Telegram messaging app + Exec=telegram-desktop -- %u + Icon=telegram +--- a/lib/xdg/telegramdesktop.appdata.xml ++++ b/lib/xdg/telegramdesktop.appdata.xml +@@ -1,6 +1,6 @@ + + +- org.telegram.desktop ++ telegram-desktop.desktop + CC0-1.0 + GPL-3.0 + Telegram Desktop +--- a/lib/xdg/tg.protocol ++++ b/lib/xdg/tg.protocol +@@ -1,5 +1,5 @@ + [Protocol] +-exec=/usr/bin/telegram-desktop -- %u ++exec=telegram-desktop -- %u + protocol=tg + input=none + output=none diff --git a/testing/telegram-desktop/0005-system-wide-fonts.patch b/testing/telegram-desktop/0005-system-wide-fonts.patch new file mode 100644 index 00000000000..c89222986bc --- /dev/null +++ b/testing/telegram-desktop/0005-system-wide-fonts.patch @@ -0,0 +1,34 @@ +Description: Remove links to packaged Open Sans font + This makes Telegram Desktop use system-wide fonts. + Warnings about non-existent fonts in resources are also disabled. +Author: Nicholas Guriev +Bug-Debian: https://bugs.debian.org/890341 +Last-Update: Sat, 31 Mar 2018 14:36:39 +0300 + +--- a/Telegram/Resources/qrc/telegram.qrc ++++ b/Telegram/Resources/qrc/telegram.qrc +@@ -42,9 +42,6 @@ + ../export_html/js/script.js + + +- ../fonts/OpenSans-Regular.ttf +- ../fonts/OpenSans-Bold.ttf +- ../fonts/OpenSans-Semibold.ttf + ../art/bg.jpg + ../art/bg_initial.jpg + ../art/logo_256.png +--- a/Telegram/SourceFiles/ui/twidget.cpp ++++ b/Telegram/SourceFiles/ui/twidget.cpp +@@ -70,9 +70,9 @@ void Start() { + } + Started = true; + +- auto regular = LoadCustomFont(qsl(":/gui/fonts/OpenSans-Regular.ttf"), qsl("Open Sans")); +- auto bold = LoadCustomFont(qsl(":/gui/fonts/OpenSans-Bold.ttf"), qsl("Open Sans"), style::internal::FontBold); +- auto semibold = LoadCustomFont(qsl(":/gui/fonts/OpenSans-Semibold.ttf"), qsl("Open Sans Semibold")); ++ auto regular = ValidateFont(qsl("Open Sans")); ++ auto bold = ValidateFont(qsl("Open Sans"), style::internal::FontBold); ++ auto semibold = ValidateFont(qsl("Open Sans Semibold")); + + #ifdef Q_OS_WIN + // Attempt to workaround a strange font bug with Open Sans Semibold not loading. diff --git a/testing/telegram-desktop/0006-ppc64le-enable-arch.patch b/testing/telegram-desktop/0006-ppc64le-enable-arch.patch new file mode 100644 index 00000000000..aeebc891eae --- /dev/null +++ b/testing/telegram-desktop/0006-ppc64le-enable-arch.patch @@ -0,0 +1,37 @@ +--- a/Telegram/SourceFiles/base/build_config.h ++++ b/Telegram/SourceFiles/base/build_config.h +@@ -51,6 +51,8 @@ + #define ARCH_CPU_64_BITS 1 + #elif defined(_M_ARM) || defined(__arm__) + #define ARCH_CPU_32_BITS 1 ++#elif defined(__PPC64__) ++#define ARCH_CPU_64_BITS 1 + #else + #error Please add support for your architecture in base/build_config.h + #endif +--- a/Telegram/ThirdParty/libtgvoip/webrtc_dsp/rtc_base/system/arch.h ++++ b/Telegram/ThirdParty/libtgvoip/webrtc_dsp/rtc_base/system/arch.h +@@ -27,6 +27,10 @@ + #define WEBRTC_ARCH_ARM_FAMILY + #define WEBRTC_ARCH_64_BITS + #define WEBRTC_ARCH_LITTLE_ENDIAN ++#elif defined(__PPC64__) ++#define WEBRTC_ARCH_PPC64 ++#define WEBRTC_ARCH_64_BITS ++#define WEBRTC_ARCH_LITTLE_ENDIAN + #elif defined(_M_IX86) || defined(__i386__) + #define WEBRTC_ARCH_X86_FAMILY + #define WEBRTC_ARCH_X86 +--- a/Telegram/ThirdParty/libtgvoip/webrtc_dsp/typedefs.h ++++ b/Telegram/ThirdParty/libtgvoip/webrtc_dsp/typedefs.h +@@ -27,6 +27,10 @@ + #define WEBRTC_ARCH_ARM_FAMILY + #define WEBRTC_ARCH_64_BITS + #define WEBRTC_ARCH_LITTLE_ENDIAN ++#elif defined(__PPC64__) ++#define WEBRTC_ARCH_PPC64 ++#define WEBRTC_ARCH_64_BITS ++#define WEBRTC_ARCH_LITTLE_ENDIAN + #elif defined(_M_IX86) || defined(__i386__) + #define WEBRTC_ARCH_X86_FAMILY + #define WEBRTC_ARCH_X86 diff --git a/testing/telegram-desktop/0007-no-gtk2.patch b/testing/telegram-desktop/0007-no-gtk2.patch new file mode 100644 index 00000000000..839a49bea57 --- /dev/null +++ b/testing/telegram-desktop/0007-no-gtk2.patch @@ -0,0 +1,27 @@ +--- a/Telegram/SourceFiles/platform/linux/linux_libs.cpp ++++ b/Telegram/SourceFiles/platform/linux/linux_libs.cpp +@@ -240,24 +240,12 @@ void start() { + indicatorLoaded = setupAppIndicator(lib_indicator); + } + } +- if (!gtkLoaded || !indicatorLoaded) { +- if (loadLibrary(lib_indicator, "ayatana-appindicator", 1) || loadLibrary(lib_indicator, "appindicator", 1)) { +- if (loadLibrary(lib_gtk, "gtk-x11-2.0", 0)) { +- gtkLoaded = indicatorLoaded = false; +- gtkLoaded = setupGtkBase(lib_gtk); +- indicatorLoaded = setupAppIndicator(lib_indicator); +- } +- } +- } + + // If no appindicator, try at least load gtk. + if (!gtkLoaded && !indicatorLoaded) { + if (loadLibrary(lib_gtk, "gtk-3", 0)) { + gtkLoaded = setupGtkBase(lib_gtk); + } +- if (!gtkLoaded && loadLibrary(lib_gtk, "gtk-x11-2.0", 0)) { +- gtkLoaded = setupGtkBase(lib_gtk); +- } + } + + if (gtkLoaded) { diff --git a/testing/telegram-desktop/0009-lz4.patch b/testing/telegram-desktop/0009-lz4.patch new file mode 100644 index 00000000000..e87097abece --- /dev/null +++ b/testing/telegram-desktop/0009-lz4.patch @@ -0,0 +1,35 @@ +diff --git a/Telegram/gyp/lib_lottie.gyp b/Telegram/gyp/lib_lottie.gyp +index ada149e..870f4e6 100644 +--- a/Telegram/gyp/lib_lottie.gyp ++++ b/Telegram/gyp/lib_lottie.gyp +@@ -24,21 +24,18 @@ + 'official_build_target%': '', + 'submodules_loc': '../ThirdParty', + 'rlottie_loc': '<(submodules_loc)/rlottie/inc', +- 'lz4_loc': '<(submodules_loc)/lz4/lib', + }, + 'dependencies': [ + 'crl.gyp:crl', + 'lib_base.gyp:lib_base', + 'lib_rlottie.gyp:lib_rlottie', + 'lib_ffmpeg.gyp:lib_ffmpeg', +- 'lib_lz4.gyp:lib_lz4', + ], + 'export_dependent_settings': [ + 'crl.gyp:crl', + 'lib_base.gyp:lib_base', + 'lib_rlottie.gyp:lib_rlottie', + 'lib_ffmpeg.gyp:lib_ffmpeg', +- 'lib_lz4.gyp:lib_lz4', + ], + 'defines': [ + 'LOT_BUILD', +@@ -50,7 +47,6 @@ + '<(libs_loc)/zlib', + '<(libs_loc)/ffmpeg', + '<(rlottie_loc)', +- '<(lz4_loc)', + '<(submodules_loc)/GSL/include', + '<(submodules_loc)/variant/include', + '<(submodules_loc)/crl/src', + diff --git a/testing/telegram-desktop/0010-libtgvoip.patch b/testing/telegram-desktop/0010-libtgvoip.patch new file mode 100644 index 00000000000..af146981b40 --- /dev/null +++ b/testing/telegram-desktop/0010-libtgvoip.patch @@ -0,0 +1,19 @@ +diff --git a/libtgvoip.gyp b/libtgvoip.gyp +index 52fbea1..9a4dfb7 100644 +--- a/Telegram/ThirdParty/libtgvoip/libtgvoip.gyp ++++ b/Telegram/ThirdParty/libtgvoip/libtgvoip.gyp +@@ -13,11 +13,12 @@ + 'variables': { + 'tgvoip_src_loc': '.', + 'official_build_target%': '', +- 'linux_path_opus_include%': '<(DEPTH)/../../../Libraries/opus/include', ++ 'linux_path_opus_include%': '/usr/include/opus', + }, + 'include_dirs': [ + '<(tgvoip_src_loc)/webrtc_dsp', + '<(linux_path_opus_include)', ++ '/usr/include/openssl' + ], + 'direct_dependent_settings': { + 'include_dirs': [ + diff --git a/testing/telegram-desktop/0011-no-static-qt.patch b/testing/telegram-desktop/0011-no-static-qt.patch new file mode 100644 index 00000000000..e4751c79f9f --- /dev/null +++ b/testing/telegram-desktop/0011-no-static-qt.patch @@ -0,0 +1,14 @@ +diff --git a/Telegram/gyp/lib_rlottie.gyp b/Telegram/gyp/lib_rlottie.gyp +index efc208500..8f2a66f5a 100644 +--- a/Telegram/gyp/lib_rlottie.gyp ++++ b/Telegram/gyp/lib_rlottie.gyp +@@ -113,7 +113,7 @@ + ], + 'conditions': [[ 'not build_win', { + 'defines': [ +- 'RLOTTIE_WITH_STATIC_QT', ++# 'RLOTTIE_WITH_STATIC_QT', + ] + }], [ 'build_macold', { + 'xcode_settings': { + diff --git a/testing/telegram-desktop/0012-ffmpeg.patch b/testing/telegram-desktop/0012-ffmpeg.patch new file mode 100644 index 00000000000..4d9d7fdd84f --- /dev/null +++ b/testing/telegram-desktop/0012-ffmpeg.patch @@ -0,0 +1,73 @@ +diff --git a/Telegram/SourceFiles/ffmpeg/ffmpeg_utility.cpp b/Telegram/SourceFiles/ffmpeg/ffmpeg_utility.cpp +index 5d0e50926..24b47e8c8 100644 +--- a/Telegram/SourceFiles/ffmpeg/ffmpeg_utility.cpp ++++ b/Telegram/SourceFiles/ffmpeg/ffmpeg_utility.cpp +@@ -354,7 +354,41 @@ QImage CreateFrameStorage(QSize size) { + cleanupData); + } + ++QImage CreateFromData(const QImage & from, QImage::Format format){ ++ const auto size = from.size(); ++ const auto width = size.width(); ++ const auto height = size.height(); ++ const auto widthAlign = kAlignImageBy / kPixelBytesSize; ++ const auto neededWidth = width + ((width % widthAlign) ++ ? (widthAlign - (width % widthAlign)) ++ : 0); ++ const auto perLine = neededWidth * kPixelBytesSize; ++ const auto buffer = new uchar[perLine * height + kAlignImageBy]; ++ memcpy(buffer, from.bits(), perLine * height + kAlignImageBy); ++ const auto cleanupData = reinterpret_cast(buffer); ++ const auto address = reinterpret_cast(buffer); ++ const auto alignedBuffer = buffer + ((address % kAlignImageBy) ++ ? (kAlignImageBy - (address % kAlignImageBy)) ++ : 0); ++ return QImage( ++ alignedBuffer, ++ width, ++ height, ++ perLine, ++ format, ++ AlignedImageBufferCleanupHandler, ++ const_cast(cleanupData)); ++} ++ + void UnPremultiply(QImage &to, const QImage &from) { ++ auto result = CreateFromData(from, QImage::Format_ARGB32_Premultiplied); ++ result = result.convertToFormat(QImage::Format_ARGB32); ++ to = CreateFromData(result, QImage::Format_ARGB32_Premultiplied); ++ return; ++ ++ //// below is original tdesktop code, we shortcut them by using Qt public API ++ //// see https://github.com/telegramdesktop/tdesktop/issues/6219 ++ /* + // This creates QImage::Format_ARGB32_Premultiplied, but we use it + // as an image in QImage::Format_ARGB32 format. + if (!GoodStorageForFrame(to, from.size())) { +@@ -387,9 +421,17 @@ void UnPremultiply(QImage &to, const QImage &from) { + layout, + nullptr); + } ++ */ + } + + void PremultiplyInplace(QImage &image) { ++ image = CreateFromData(image, QImage::Format_ARGB32); ++ image = image.convertToFormat(QImage::Format_ARGB32_Premultiplied); ++ return; ++ ++ //// below is original tdesktop code, we shortcut them by using Qt public API ++ //// see https://github.com/telegramdesktop/tdesktop/issues/6219 ++ /* + const auto layout = &qPixelLayouts[QImage::Format_ARGB32]; + const auto convert = layout->convertToARGB32PM; + const auto perLine = image.bytesPerLine(); +@@ -413,6 +455,7 @@ void PremultiplyInplace(QImage &image) { + layout, + nullptr); + } ++ */ + } + + } // namespace FFmpeg + diff --git a/testing/telegram-desktop/0013-lz4.patch b/testing/telegram-desktop/0013-lz4.patch new file mode 100644 index 00000000000..f7426ebe7ee --- /dev/null +++ b/testing/telegram-desktop/0013-lz4.patch @@ -0,0 +1,13 @@ +diff --git a/Telegram/gyp/telegram_linux.gypi b/Telegram/gyp/telegram_linux.gypi +index bd2ed75..cd0bc59 100644 +--- a/Telegram/gyp/telegram_linux.gypi ++++ b/Telegram/gyp/telegram_linux.gypi +@@ -55,6 +55,7 @@ + 'opus', + 'z', + 'lzma', ++ 'lz4', + # ' /dev/null --libs <@(pkgconfig_libs))', + ], + 'cflags_cc': [ + diff --git a/testing/telegram-desktop/0014-clock_gettime.patch b/testing/telegram-desktop/0014-clock_gettime.patch new file mode 100644 index 00000000000..5458c8c327b --- /dev/null +++ b/testing/telegram-desktop/0014-clock_gettime.patch @@ -0,0 +1,44 @@ +diff --git a/Telegram/gyp/qt.gypi b/Telegram/gyp/qt.gypi +index c7dff28..c674dc0 100644 +--- a/Telegram/gyp/qt.gypi ++++ b/Telegram/gyp/qt.gypi +@@ -176,14 +176,10 @@ + ], + 'conditions': [ + [ 'build_linux', { +- 'dependencies': [ +- '<(DEPTH)/linux_glibc_wraps.gyp:linux_glibc_wraps', +- ], + 'library_dirs': [ + '<(qt_loc)/plugins/platforminputcontexts', + ], + 'libraries': [ +- '<(PRODUCT_DIR)/obj.target/liblinux_glibc_wraps.a', + '<@(qt_libs_release)', + '-lcrypto', + '-lX11', +diff --git a/Telegram/gyp/telegram_linux.gypi b/Telegram/gyp/telegram_linux.gypi +index cd0bc59..5eb5ae9 100644 +--- a/Telegram/gyp/telegram_linux.gypi ++++ b/Telegram/gyp/telegram_linux.gypi +@@ -63,9 +63,6 @@ + '-Wno-maybe-uninitialized', + ], + 'ldflags': [ +- '-Wl,-wrap,aligned_alloc', +- '-Wl,-wrap,secure_getenv', +- '-Wl,-wrap,clock_gettime', + '-Wl,--no-as-needed,-lrt', + ], + 'configurations': { +@@ -85,9 +82,6 @@ + }, + 'conditions': [ + [ '" /dev/null --cflags appindicator3-0.1)', + diff --git a/testing/telegram-desktop/APKBUILD b/testing/telegram-desktop/APKBUILD index 723273c540a..96492edaae1 100644 --- a/testing/telegram-desktop/APKBUILD +++ b/testing/telegram-desktop/APKBUILD @@ -1,21 +1,27 @@ # Maintainer: Leo # Contributor: Leo +# TODO(Leo): remove pulseaudio dep, use system xxhash pkgname=telegram-desktop -pkgver=1.7.10 +pkgver=1.7.14 # https://github.com/telegramdesktop/tdesktop/blob/v$pkgver/docs/building-cmake.md -_libtgvoip_commit=a19a0aff644127d8089f6a4ac18119ec5247dbd0 +_libtgvoip_commit=0e92a22746d15157bea46faddd61b79e9964275a _GSL_commit=d846fe50a3f0bb7767c7e087a05f4be95f4da0ec _variant_commit=550ac2f159ca883d360c196149b466955c77a573 -_crl_commit=d259aebc11df52cb6ff8c738580dc4d8f245d681 -_qtlottie_commit=a3fac9db920b167a5f91d678ee7968f100f6fe51 +_crl_commit=9ea870038a2a667add7f621be6252db909068386 +_rlottie_commit=40ccf084445c60a32d72d4811edf0efd0580dcaa +_Catch2_commit=5ca44b68721833ae3731802ed99af67c6f38a53a +_xxhash_commit=7cc9639699f64b750c0b82333dced9ea77e8436e pkgrel=0 pkgdesc="Telegram Desktop messaging app" options="!check" # Requires Catch2 to be packaged. url="https://desktop.telegram.org/" -arch="all !aarch64 !s390x" # ARM are failing due to range-v3 +arch="all !s390x" # ARM are failing due to range-v3 license="GPL-3.0-or-later WITH OpenSSL" depends="qt5-qtimageformats" -makedepends="cmake +makedepends=" + gyp + grep + cmake zlib-dev opus-dev libva-dev @@ -32,10 +38,11 @@ makedepends="cmake alsa-lib-dev libexecinfo-dev python2 - xxhash-dev range-v3-dev - grep rapidjson-dev + lz4-dev + pulseaudio-dev + qtchooser " source=" $pkgname-$pkgver.tar.gz::https://github.com/telegramdesktop/tdesktop/archive/v${pkgver}.tar.gz @@ -43,28 +50,23 @@ source=" GSL-$_GSL_commit.tar.gz::https://github.com/Microsoft/GSL/archive/${_GSL_commit}.tar.gz variant-$_variant_commit.tar.gz::https://github.com/mapbox/variant/archive/${_variant_commit}.tar.gz crl-$_crl_commit.tar.gz::https://github.com/telegramdesktop/crl/archive/${_crl_commit}.tar.gz - qtlottie-$_qtlottie_commit.tar.gz::https://github.com/telegramdesktop/qtlottie/archive/${_qtlottie_commit}.tar.gz - musl.patch - no-gtk2.patch - no-pulse.patch - xdg.patch - ppc64le-enable-arch.patch - system-wide-fonts.patch - FindBreakpad.cmake - Telegram.cmake - TelegramCodegen.cmake - TelegramCodegenTools.cmake - TelegramTests.cmake - ThirdParty-crl.cmake - ThirdParty-libtgvoip-webrtc.cmake - ThirdParty-libtgvoip.cmake - ThirdParty-qtlottie.cmake - PrecompiledHeader-cmake.patch - add-private-qt-functions.patch - fix-missing-use-of-pch.patch - dynamic-linking-qt5.patch - sourcefiles-lottie.patch - submodule-lottie.patch + rlottie-$_rlottie_commit.tar.gz::https://github.com/john-preston/rlottie/archive/${_rlottie_commit}.tar.gz + Catch2-$_Catch2_commit.tar.gz::https://github.com/catchorg/Catch2/archive/${_Catch2_commit}.tar.gz + xxhash-${_xxhash_commit}.tar.gz::https://github.com/Cyan4973/xxHash/archive/${_xxhash_commit}.tar.gz + CMakeLists.inj + 0001-musl.patch + 0002-tdesktop.patch + 0003-fix-missing-use-of-pch.patch + 0004-xdg.patch + 0005-system-wide-fonts.patch + 0006-ppc64le-enable-arch.patch + 0007-no-gtk2.patch + 0009-lz4.patch + 0010-libtgvoip.patch + 0011-no-static-qt.patch + 0012-ffmpeg.patch + 0013-lz4.patch + 0014-clock_gettime.patch " builddir="$srcdir/tdesktop-$pkgver" @@ -73,106 +75,87 @@ prepare() { rmdir Telegram/ThirdParty/GSL rmdir Telegram/ThirdParty/variant rmdir Telegram/ThirdParty/crl - rmdir Telegram/ThirdParty/qtlottie + rmdir Telegram/ThirdParty/rlottie + rmdir Telegram/ThirdParty/Catch + rmdir Telegram/ThirdParty/xxHash # Copy fetched libraries to their appropriate locations mv ../libtgvoip-${_libtgvoip_commit} "${builddir}"/Telegram/ThirdParty/libtgvoip mv ../GSL-${_GSL_commit} "${builddir}"/Telegram/ThirdParty/GSL mv ../variant-${_variant_commit} "${builddir}"/Telegram/ThirdParty/variant mv ../crl-${_crl_commit} "${builddir}"/Telegram/ThirdParty/crl - mv ../qtlottie-${_qtlottie_commit} "${builddir}"/Telegram/ThirdParty/qtlottie - - # Copy cmake files - mv ../Telegram.cmake "${builddir}"/Telegram/CMakeLists.txt - mv ../ThirdParty-crl.cmake "${builddir}"/Telegram/ThirdParty/crl/CMakeLists.txt - mv ../ThirdParty-libtgvoip.cmake "${builddir}"/Telegram/ThirdParty/libtgvoip/CMakeLists.txt - mv ../ThirdParty-libtgvoip-webrtc.cmake \ - "${builddir}"/Telegram/ThirdParty/libtgvoip/webrtc_dsp/CMakeLists.txt - mv ../ThirdParty-qtlottie.cmake "${builddir}"/Telegram/ThirdParty/qtlottie/CMakeLists.txt - - mkdir -p "${builddir}"/Telegram/cmake - mv ../FindBreakpad.cmake "${builddir}"/Telegram/cmake - mv ../TelegramCodegen.cmake "${builddir}"/Telegram/cmake - mv ../TelegramTests.cmake "${builddir}"/Telegram/cmake - - mkdir -p "${builddir}"/Telegram/native - mv ../TelegramCodegenTools.cmake "${builddir}"/Telegram/native/CMakeLists.txt + mv ../rlottie-${_rlottie_commit} "${builddir}"/Telegram/ThirdParty/rlottie + mv ../Catch2-${_Catch2_commit} "${builddir}"/Telegram/ThirdParty/Catch + mv ../xxHash-${_xxhash_commit} "${builddir}"/Telegram/ThirdParty/xxHash cd "$builddir/Telegram/ThirdParty" - rm -rf minizip # we have this system-wide + rm -rf minizip lz4 # we have these system-wide default_prepare } build() { - cd "$builddir"/Telegram/native - CC= CXX= CPP= LD= AR= AS= RANLIB= CFLAGS= CXXFLAGS= LDFLAGS= cmake . - make + export LANG=en_US.UTF-8 + export GYP_DEFINES="TDESKTOP_DISABLE_CRASH_REPORTS,TDESKTOP_DISABLE_AUTOUPDATE" + export GYP_DEFINES="${GYP_DEFINES},TDESKTOP_DISABLE_REGISTER_CUSTOM_SCHEME" + export GYP_DEFINES="${GYP_DEFINES},TDESKTOP_DISABLE_DESKTOP_FILE_GENERATION" + export GYP_DEFINES="${GYP_DEFINES},TDESKTOP_DISABLE_GTK_INTEGRATION" + export EXTRA_FLAGS="-Winvalid-pch -O2" + export CPPFLAGS="$CPPFLAGS $EXTRA_FLAGS" + export CXXFLAGS="$CXXFLAGS $EXTRA_FLAGS" - mkdir "$builddir"/Telegram/telegram-build - cd "$builddir"/Telegram/telegram-build - export CPPFLAGS="$CPPFLAGS -Winvalid-pch" - export CXXFLAGS="$CXXFLAGS -Winvalid-pch" - export CXXFLAGS="$CXXFLAGS -DTDESKTOP_API_ID=17349" - export CXXFLAGS="$CXXFLAGS -DTDESKTOP_API_HASH=344583e45741c457fe1862106095a5eb" + gyp \ + -Dapi_id=17349 \ + -Dapi_hash=344583e45741c457fe1862106095a5eb \ + -Dbuild_defines=${GYP_DEFINES} \ + -Gconfig=Release \ + --depth=Telegram/gyp --generator-output=../.. -Goutput_dir=out \ + Telegram/gyp/Telegram.gyp --format=cmake - if [ "$CBUILD" != "$CHOST" ]; then - CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux" - fi - cmake \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DBUILD_SHARED_LIBS=True \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_CXX_FLAGS="$CXXFLAGS -O2" \ - -DCMAKE_C_FLAGS="$CFLAGS -O2" \ - -DENABLE_PULSEAUDIO=OFF \ - -DENABLE_CRASH_REPORTS=OFF \ - -DENABLE_GTK_INTEGRATION=OFF \ - -DBUILD_TESTS=OFF \ - ${CMAKE_CROSSOPTS} .. + NUM=$(( $(wc -l < out/Release/CMakeLists.txt) - 2)) + sed -i "$NUM r ../CMakeLists.inj" out/Release/CMakeLists.txt + + cd out/Release + cmake . -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release make } package() { - cd "$builddir"/Telegram/telegram-build - mkdir -p "$pkgdir"/usr/bin - make DESTDIR="$pkgdir" install + install -dm755 "$pkgdir"/usr/bin + install -m755 "$builddir/out/Release/Telegram" "$pkgdir/usr/bin/telegram-desktop" + + install -d "$pkgdir/usr/share/applications" + install -m644 "$builddir/lib/xdg/telegramdesktop.desktop" \ + "$pkgdir/usr/share/applications/telegramdesktop.desktop" - # Fix name to be telegram-desktop - mv "$pkgdir"/usr/bin/Telegram "$pkgdir"/usr/bin/telegram-desktop + for icon_size in 16 32 48 64 128 256 512; do + icon_dir="$pkgdir/usr/share/icons/hicolor/${icon_size}x${icon_size}/apps" - cd "${builddir}"/Telegram/Resources/art - mkdir -p "$pkgdir"/usr/share/icons/hicolor - for size in 16 32 48 64 128 256 512; do - mkdir -p "$pkgdir"/usr/share/icons/hicolor/"$size"x"$size"/apps - mv icon"$size".png "$pkgdir"/usr/share/icons/hicolor/"$size"x"$size"/apps/telegram.png + install -d "$icon_dir" + install -m644 "$builddir/Telegram/Resources/art/icon${icon_size}.png" \ + "$icon_dir/telegram.png" done } -sha512sums="f6e8849d344fd7f8af94d639900150ae87182e1e782f071d1f99aee29a366754eca74ed4062ee10d37348d1195da598a6ce77921fd480e5367b69913c443efe5 telegram-desktop-1.7.10.tar.gz -9d7826d0996d39dcaf1f56bdd418251b3bc39ebf9ec662280a01dea97deeb02b784b69de4e0421791cda7a18680d26437fbe9d0c965c13a2b0cb971a0b3f511f libtgvoip-a19a0aff644127d8089f6a4ac18119ec5247dbd0.tar.gz +sha512sums="b2b19aad5c276a389461964b82773f2d0380f0774557d1d81316dc0b10a915ee88b0439211ebbf8aafd8d3edc17dc0dc9d4b7ac894669fba45307a10f5fa946f telegram-desktop-1.7.14.tar.gz +bf0f1d808b0458d081b5cddcdbf9b24d8a63a31d89c207cd20983abf4f328acea749107d1b0c021579923cfb7371da2a9a6f61d9ce008d6c5c55b3fd7052508e libtgvoip-0e92a22746d15157bea46faddd61b79e9964275a.tar.gz 83560cb0c39b6a4781e916c6081ad2728296e1b19760ca1b6426a8431fb6d7093760a882c539dd77152f5892fe081b1795af6366ea91385bb10aba6adf27170f GSL-d846fe50a3f0bb7767c7e087a05f4be95f4da0ec.tar.gz 537ce0a1731274da63a5be063311f7113c1391081e43970663a994b82a7b2e860302406c2931184789661d86343b2c60064c7014b73dc42799573f5b93bc12ff variant-550ac2f159ca883d360c196149b466955c77a573.tar.gz -b2aac32e8964165dcf449ceb98dca9665ed9ababdd45c323252a8e39f08acac703dc14a17bafefc40f0a7e76a0c6eb7341a7581cc08e47d64a1f98c8cee50d29 crl-d259aebc11df52cb6ff8c738580dc4d8f245d681.tar.gz -9385cd7072b2258d8ca1ed9932d953bbdee104833573e15a19f2a824c760cd43e79cd0713385c63fa10648d6ae3d201df080f9da0135f9b338a86ea10cc8a867 qtlottie-a3fac9db920b167a5f91d678ee7968f100f6fe51.tar.gz -fc672d8168f6b2807e596570bc57f3b89296891b5d62b8e12b38193ed4919e4eb17efd72691c4086fb0ff4383de54695a9faf9874a0727a0980ef35e5ca4bee7 musl.patch -cb01655dd097b68e89b15e6e4b1f6da10c52e8bec681eeef9807ca376283b10cb3da34acc976c790f3c8dea05acbef1ba1967612920a2e4acb3b9da79e251a0d no-gtk2.patch -90caf4e67f1fb8bcb26455553b90e35d247cbf67097508bd430f7f790aad9e2ae1646b0ea174013c87c331fb37e60633031187a24787e6a73ca73b706d741739 no-pulse.patch -8de8c0508177da5fcac4f2dcee4d8baef4b99f74f1dca296567bc3689a6bd17a47c1c945df504abc8811b82a687010d0709503c7c32e47d2ebb1cf0e374c80c5 xdg.patch -3647ad5fff6326ba9c75fa98189a08c0909af8d1c2b704c8c62fd9da6603f5162af3176c37daa67eb5896bebe3814bf1fd66b9e93c78cbd9b439e472d0db4b44 ppc64le-enable-arch.patch -ce6be003220267bac5483caf8302b492e1581892bc36d35a61236ebf9f9d766b8bd2159557a1c36256aa85f461797a38bfaae57b12da7a72101b21c0b17ed653 system-wide-fonts.patch -8b75da50a8212cd7c77e497ad5a49290e2656a2e01037d179cd6270105337a9adb238814f98bdf7a3e954ce8661dc3183a7400533067f9a21e38133a6628563a FindBreakpad.cmake -53a95dfeabb3a923104132c657f228ed5ae689db86a541be3604c00eeecd3e18c20615111f3682d1355713d7005107a2f938a157bb0eb29948d11a709f2ea71e Telegram.cmake -56aaf0e35ba1989d463ffa2699e7c0a7235168599f0720f66ff159f03541920e04e5944554b4d1b3a0893cf4581ff50ff00600b54522d24d59fa7192e4f80c0a TelegramCodegen.cmake -f6e42004d36c69497fd635f1bbd9779027fef1b44fc506cba85ff19c5e49e6b41008782ffb65d59ef4acef78dc0a671c285789ae21cb7a67a9b215c28a2c2eeb TelegramCodegenTools.cmake -4726ba77330d61f952c7e5af82454cc5536cd92634150406ea5dbc303acfd1d33093334b9b04cf06aa4adca84d97553f28b44dcc554d10af8052352f265c9505 TelegramTests.cmake -fe1a860184fc31888430d8efb5d12bcf57ef0ed7d64a9570159b906138e987e711e52ea87e3e0567bf749f0336d394aba8a7af9bae6b156c621a13f0aa301b6e ThirdParty-crl.cmake -2282dedd3d6551893674272ea1308d0c36469711ecf52d1ac2cdc719ab0560a35abc968cc903678dd4e3c2454324e18bcb897b46c597a02013c6d75a7406fffe ThirdParty-libtgvoip-webrtc.cmake -72b7e188c6787b05f68031f24d901194315243a8b8fb5c3e0c10f1e7c75554ae147810e4d47fa2a0fdf7323da07f48b1cd4a6b840cffd65af96ad9a997e4caff ThirdParty-libtgvoip.cmake -c80e0c9f79e61b7b152e17ec69be087f1312ffadf38ea5d5eecf4f43a2eadc0cba9112e61f878d2d8eb0c44c6c33bb8338c87009c6f2d97c58357d73de1af080 ThirdParty-qtlottie.cmake -7ddeb1040e7bf707c13686861d289b3971381bed5c66a2d91b24d0d31c94c38634c0a08916219c51629cabdf33a386e4ad57f719054b0cc3ef1a85ea5d522994 PrecompiledHeader-cmake.patch -d7f8db23af250156b73b47ad4b1996b73643eb224c969cd1da2929eedfa23a3784ccf8a5728070f464891c621ec6f786e5da323f5bbb2a2cfba999cf80d9dec4 add-private-qt-functions.patch -6289d5a3eb224ebb05ab64e23ca3d081e617d905cec07edbba423265dc617548005eeb643ce5dfb2fcef9ac774e9f7b64150729bd894ca0e94af0e2aea9c823b fix-missing-use-of-pch.patch -ad7f1b811b7907b24e0708c5b8f7531891e163b3edebebb159e47cbc24a9201a6ddb5f276f4d0968f84c6d928997f1e94fe9ca678b31e9aad90cdf28449ce39f dynamic-linking-qt5.patch -3b6fabfb23ea82ae7eb42221dd07af6ad08e4ec2e4657697148159c7ebe46c3681857f16b5445b79d5b29de36101d394e2eb6b85a45145e109cfe63e14fed9b4 sourcefiles-lottie.patch -2aafc567e7ad4c5d7b5d3ccba3ee5c6998c0f2107ca63079471379fe27e822ccbd95c4a67cbcef77fbd2b0edca1b493ed19e80d3106f1d71cbe6fd9b05f91729 submodule-lottie.patch" +7bb68c0b0c94bb266a765e01878a0e840fcc28922af8878ff5217da693092ef19c3e543e4ecb86efd41b2b29bb907d98e1998c0d4f3a9e3dbd65c23df4c29ece crl-9ea870038a2a667add7f621be6252db909068386.tar.gz +54ab3c79b9e23b1d055e9bbf802d16e036d606923acfb61d13db2b620e869ce08aa8c0e2fa7728bfe45ee2221238302936698f75a26cf22c31a95604c15dc270 rlottie-40ccf084445c60a32d72d4811edf0efd0580dcaa.tar.gz +5b151e0a8c4594b19258a8aade7132521ffbdc97233c9d4a0e5cb2ea31eb9cb3ee51769884a8a08ab821571215ff32854bd76d2929e3b4c14a39e56657109dd6 Catch2-5ca44b68721833ae3731802ed99af67c6f38a53a.tar.gz +cada36066c14ed735f8f45a2d1e0c2d1bdb564dc18154aaabc12552d41065426d88cdeb8a67b8e697678b01f2e415c0a6caf428baa591d013739d7ac95048d4d xxhash-7cc9639699f64b750c0b82333dced9ea77e8436e.tar.gz +069a3061649567483e4250abdd80aee69937f744aa5ef06bc465ce5bd3abb7b6d934604bd7a35312dd0593895b7709c51288b9063c2919d260909aefab73b3e9 CMakeLists.inj +74e8adfe9cb6c224b12fb653798be1abb55cff40f326a9542e5ae23fb82b57a117b5f74dc8a2af80efcd8e261bbbc46c8e5c10fdb6a55ae3196429fd67afd183 0001-musl.patch +06da4b11ecbaba1f7c46e0afed97abc4b9817349492d947834d40e9e81a4dde43a5223721a6350f5fb34df0997d6ee0ae50558e0899c2ccccfabce5bbb7ddf90 0002-tdesktop.patch +6289d5a3eb224ebb05ab64e23ca3d081e617d905cec07edbba423265dc617548005eeb643ce5dfb2fcef9ac774e9f7b64150729bd894ca0e94af0e2aea9c823b 0003-fix-missing-use-of-pch.patch +8de8c0508177da5fcac4f2dcee4d8baef4b99f74f1dca296567bc3689a6bd17a47c1c945df504abc8811b82a687010d0709503c7c32e47d2ebb1cf0e374c80c5 0004-xdg.patch +ce6be003220267bac5483caf8302b492e1581892bc36d35a61236ebf9f9d766b8bd2159557a1c36256aa85f461797a38bfaae57b12da7a72101b21c0b17ed653 0005-system-wide-fonts.patch +3647ad5fff6326ba9c75fa98189a08c0909af8d1c2b704c8c62fd9da6603f5162af3176c37daa67eb5896bebe3814bf1fd66b9e93c78cbd9b439e472d0db4b44 0006-ppc64le-enable-arch.patch +cb01655dd097b68e89b15e6e4b1f6da10c52e8bec681eeef9807ca376283b10cb3da34acc976c790f3c8dea05acbef1ba1967612920a2e4acb3b9da79e251a0d 0007-no-gtk2.patch +d4ef17600e095b753bcbc4df0078cc025dd235056a8f4946183fc5416e0452bceac020badda60221b98b410261c5aaef72d18e8abc82781257e8075a133908f6 0009-lz4.patch +7d5642672f42f435e206acd047a20b7e38346ed95548f16c0059913546e4e4f54a58927fccb8c1da8e43b6a691bbce2a9608d0db032774d7874d4800e7202d53 0010-libtgvoip.patch +216f8fd0deae38d18d92815b84b4a945a2b83231117d5addd0aa9338acf5cb471c29b2fdfb86ca22c237230f61fbeac14f0445379db4daaddd512cf5e546166e 0011-no-static-qt.patch +30df0fbe5849bbcadb2d28483944f1a5397c056feb0bb4785d481e3e02cad10bb89566b4fb83e0692ca8080963b3d6b817c6ad275bbfebfe74d752a5f5c55c61 0012-ffmpeg.patch +aaff642634f42ba017ac94a2c2cd7df595d0a304a62f5f46dbec82e2c88c00a8cfd6346b2809013228f47f301aedf94e10e77197eebefa26b6df81267e8b1a64 0013-lz4.patch +ab6ef737712cbc934a908aabb57332a4d207c223f50f0108668b8c3c9fd07cd840845ef99c0dc18dca2139f476fcb0309f99058af710ffaf1272023d1d2f1ab4 0014-clock_gettime.patch" diff --git a/testing/telegram-desktop/CMakeLists.inj b/testing/telegram-desktop/CMakeLists.inj new file mode 100644 index 00000000000..75a93241caa --- /dev/null +++ b/testing/telegram-desktop/CMakeLists.inj @@ -0,0 +1,19 @@ +# The text will be put into the appropriate CMakeLists by the PKGBUILD + +# Avoid rpath compiler parameter +set_target_properties(Telegram PROPERTIES SKIP_BUILD_RPATH TRUE) + +# This makes up for patch of gyp utility, supporting precompiled headers. If +# Telegram/Patches/gyp.diff file will be changed in future, please check these +# lines. +include(../../Telegram/gyp/PrecompiledHeader.cmake) +add_precompiled_header(Telegram ../../Telegram/SourceFiles/stdafx.h) +add_precompiled_header(lib_base ../../Telegram/SourceFiles/base/base_pch.h) +add_precompiled_header(lib_export ../../Telegram/SourceFiles/export/export_pch.h) +add_precompiled_header(lib_storage ../../Telegram/SourceFiles/storage/storage_pch.h) + +# You can discover new PCHs using this link: +# https://github.com/telegramdesktop/tdesktop/search?q=pch_header&unscoped_q=pch_header + +# vim: ft=cmake + diff --git a/testing/telegram-desktop/FindBreakpad.cmake b/testing/telegram-desktop/FindBreakpad.cmake deleted file mode 100644 index 42da3f50cd3..00000000000 --- a/testing/telegram-desktop/FindBreakpad.cmake +++ /dev/null @@ -1,19 +0,0 @@ -find_path(BREAKPAD_CLIENT_INCLUDE_DIR - NAMES client/linux/handler/exception_handler.h - PATH_SUFFIXES breakpad -) - -find_library(BREAKPAD_CLIENT_LIBRARY - NAMES breakpad_client -) - -find_package_handle_standard_args(Breakpad DEFAULT_MSG - BREAKPAD_CLIENT_LIBRARY - BREAKPAD_CLIENT_INCLUDE_DIR -) - -add_library(breakpad_client STATIC IMPORTED) -add_dependencies(breakpad_client breakpad_build) - -set_property(TARGET breakpad_client PROPERTY IMPORTED_LOCATION ${BREAKPAD_CLIENT_LIBRARY}) -set_property(TARGET breakpad_client PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${BREAKPAD_CLIENT_INCLUDE_DIR}) diff --git a/testing/telegram-desktop/PrecompiledHeader-cmake.patch b/testing/telegram-desktop/PrecompiledHeader-cmake.patch deleted file mode 100644 index 95f8cc372d9..00000000000 --- a/testing/telegram-desktop/PrecompiledHeader-cmake.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- a/Telegram/gyp/PrecompiledHeader.cmake 2019-06-06 18:14:46.443138055 +0200 -+++ b/Telegram/gyp/PrecompiledHeader.cmake 2019-06-06 18:15:45.874739539 +0200 -@@ -114,7 +114,7 @@ - set(_compiler_FLAGS "@${_pch_c_flags_file}") - add_custom_command( - OUTPUT "${_output_c}" -- COMMAND "${CMAKE_C_COMPILER}" ${_compiler_FLAGS} -x c-header -o "${_output_c}" -c "${_pchfile}" -+ COMMAND "${CMAKE_C_COMPILER}" ${_compiler_FLAGS} "$(C_FLAGS)" -x c-header -o "${_output_c}" -c "${_pchfile}" - DEPENDS "${_pchfile}" "${_pch_c_flags_file}" - IMPLICIT_DEPENDS C "${_pch_header}" - COMMENT "Precompiling ${_name} for ${_target} (C)") -@@ -125,7 +125,7 @@ - set(_compiler_FLAGS "@${_pch_cpp_flags_file}") - add_custom_command( - OUTPUT "${_output_cxx}" -- COMMAND "${CMAKE_CXX_COMPILER}" ${_compiler_FLAGS} -x c++-header -o "${_output_cxx}" -c "${_pchfile}" -+ COMMAND "${CMAKE_CXX_COMPILER}" ${_compiler_FLAGS} "$(CXX_FLAGS)" -x c++-header -o "${_output_cxx}" -c "${_pchfile}" - DEPENDS "${_pchfile}" "${_pch_cpp_flags_file}" - IMPLICIT_DEPENDS CXX "${_pch_header}" - COMMENT "Precompiling header ${_name} for ${_target} (C++)") - diff --git a/testing/telegram-desktop/Telegram.cmake b/testing/telegram-desktop/Telegram.cmake deleted file mode 100644 index 231c39c596e..00000000000 --- a/testing/telegram-desktop/Telegram.cmake +++ /dev/null @@ -1,255 +0,0 @@ -cmake_minimum_required(VERSION 3.8) - -project(TelegramDesktop) - -set(CMAKE_CXX_STANDARD 17) - -set(CMAKE_AUTOMOC ON) -set(CMAKE_AUTORCC ON) -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -include(GNUInstallDirs) - -list(APPEND CMAKE_MODULE_PATH - ${CMAKE_SOURCE_DIR}/gyp - ${CMAKE_SOURCE_DIR}/cmake -) - -option(BUILD_TESTS "Build all available test suites" OFF) -option(ENABLE_CRASH_REPORTS "Enable crash reports" ON) -option(ENABLE_GTK_INTEGRATION "Enable GTK integration" ON) -option(USE_LIBATOMIC "Link Statically against libatomic.a" OFF) -option(ENABLE_OPENAL_EFFECTS "Enable OpenAL effects" ON) - -find_package(LibLZMA REQUIRED) -find_package(OpenAL REQUIRED) -find_package(OpenSSL REQUIRED) -find_package(Threads REQUIRED) -find_package(X11 REQUIRED) -find_package(ZLIB REQUIRED) -find_package(RapidJSON REQUIRED) - -find_package(Qt5 REQUIRED COMPONENTS Core DBus Gui Widgets Network) -get_target_property(QTCORE_INCLUDE_DIRS Qt5::Core INTERFACE_INCLUDE_DIRECTORIES) -list(GET QTCORE_INCLUDE_DIRS 0 QT_INCLUDE_DIR) - -foreach(__qt_module IN ITEMS QtCore QtGui) - list(APPEND QT_PRIVATE_INCLUDE_DIRS - ${QT_INCLUDE_DIR}/${__qt_module}/${Qt5_VERSION} - ${QT_INCLUDE_DIR}/${__qt_module}/${Qt5_VERSION}/${__qt_module} - ) -endforeach() -message(STATUS "Using Qt private include directories: ${QT_PRIVATE_INCLUDE_DIRS}") - -find_package(PkgConfig REQUIRED) -pkg_check_modules(FFMPEG REQUIRED libavcodec libavformat libavutil libswresample libswscale) -pkg_check_modules(LIBDRM REQUIRED libdrm) -pkg_check_modules(LIBVA REQUIRED libva libva-drm libva-x11) -pkg_check_modules(MINIZIP REQUIRED minizip) - -set(THIRD_PARTY_DIR ${CMAKE_SOURCE_DIR}/ThirdParty) -list(APPEND THIRD_PARTY_INCLUDE_DIRS - ${THIRD_PARTY_DIR}/crl/src - ${THIRD_PARTY_DIR}/GSL/include - ${THIRD_PARTY_DIR}/emoji_suggestions - ${THIRD_PARTY_DIR}/libtgvoip - ${THIRD_PARTY_DIR}/variant/include -) - -add_subdirectory(${THIRD_PARTY_DIR}/crl) -add_subdirectory(${THIRD_PARTY_DIR}/libtgvoip) -add_subdirectory(${THIRD_PARTY_DIR}/qtlottie) - -set(TELEGRAM_SOURCES_DIR ${CMAKE_SOURCE_DIR}/SourceFiles) -set(TELEGRAM_RESOURCES_DIR ${CMAKE_SOURCE_DIR}/Resources) - -include_directories(${TELEGRAM_SOURCES_DIR}) - -set(GENERATED_DIR ${CMAKE_BINARY_DIR}/generated) -file(MAKE_DIRECTORY ${GENERATED_DIR}) - -include(TelegramCodegen) -set_property(SOURCE ${TELEGRAM_GENERATED_SOURCES} PROPERTY SKIP_AUTOMOC ON) - -set(QRC_FILES - Resources/qrc/telegram.qrc - Resources/qrc/telegram_emoji_1.qrc - Resources/qrc/telegram_emoji_2.qrc - Resources/qrc/telegram_emoji_3.qrc - Resources/qrc/telegram_emoji_4.qrc - Resources/qrc/telegram_emoji_5.qrc - - # This only disables system plugin search path - # We do not want this behavior for system build - # Resources/qrc/telegram_linux.qrc -) - -file(GLOB FLAT_SOURCE_FILES - SourceFiles/*.cpp - SourceFiles/base/*.cpp - SourceFiles/calls/*.cpp - SourceFiles/chat_helpers/*.cpp - SourceFiles/core/*.cpp - SourceFiles/data/*.cpp - SourceFiles/dialogs/*.cpp - SourceFiles/inline_bots/*.cpp - SourceFiles/intro/*.cpp - SourceFiles/lang/*.cpp - SourceFiles/main/*.cpp - SourceFiles/mtproto/*.cpp - SourceFiles/overview/*.cpp - SourceFiles/passport/*.cpp - SourceFiles/platform/linux/*.cpp - SourceFiles/profile/*.cpp - SourceFiles/settings/*.cpp - SourceFiles/storage/*.cpp - SourceFiles/storage/cache/*.cpp - SourceFiles/support/*cpp - ${THIRD_PARTY_DIR}/emoji_suggestions/*.cpp -) -file(GLOB FLAT_EXTRA_FILES - SourceFiles/qt_static_plugins.cpp - SourceFiles/base/*_tests.cpp - SourceFiles/base/tests_main.cpp - SourceFiles/passport/passport_edit_identity_box.cpp - SourceFiles/passport/passport_form_row.cpp - SourceFiles/storage/*_tests.cpp - SourceFiles/storage/*_win.cpp - SourceFiles/storage/storage_feed_messages.cpp - SourceFiles/storage/cache/*_tests.cpp - SourceFiles/data/data_feed_messages.cpp -) -list(REMOVE_ITEM FLAT_SOURCE_FILES ${FLAT_EXTRA_FILES}) - -file(GLOB_RECURSE SUBDIRS_SOURCE_FILES - SourceFiles/boxes/*.cpp - SourceFiles/export/*.cpp - SourceFiles/history/*.cpp - SourceFiles/info/*.cpp - SourceFiles/media/*.cpp - SourceFiles/ui/*.cpp - SourceFiles/window/*.cpp -) - -file(GLOB SUBDIRS_EXTRA_FILES - SourceFiles/info/feed/*.cpp - SourceFiles/info/channels/*.cpp - SourceFiles/history/feed/*.cpp -) -list(REMOVE_ITEM SUBDIRS_SOURCE_FILES ${SUBDIRS_EXTRA_FILES}) - -add_executable(Telegram WIN32 ${QRC_FILES} ${FLAT_SOURCE_FILES} ${SUBDIRS_SOURCE_FILES}) - -set(TELEGRAM_COMPILE_DEFINITIONS - TDESKTOP_DISABLE_AUTOUPDATE - TDESKTOP_DISABLE_DESKTOP_FILE_GENERATION - NOMINMAX - __STDC_FORMAT_MACROS -) - -set(TELEGRAM_INCLUDE_DIRS - ${FFMPEG_INCLUDE_DIRS} - ${GENERATED_DIR} - ${LIBDRM_INCLUDE_DIRS} - ${LIBLZMA_INCLUDE_DIRS} - ${LIBVA_INCLUDE_DIRS} - ${MINIZIP_INCLUDE_DIRS} - ${OPENAL_INCLUDE_DIR} - ${QT_PRIVATE_INCLUDE_DIRS} - ${RAPIDJSON_INCLUDE_DIRS} - ${THIRD_PARTY_INCLUDE_DIRS} - ${ZLIB_INCLUDE_DIR} -) - -set(TELEGRAM_LINK_LIBRARIES - xxhash - crl - qtlottie - tgvoip - OpenSSL::Crypto - OpenSSL::SSL - Qt5::DBus - Qt5::Network - Qt5::Widgets - Threads::Threads - ${FFMPEG_LIBRARIES} - ${LIBDRM_LIBRARIES} - ${LIBLZMA_LIBRARIES} - ${LIBVA_LIBRARIES} - ${MINIZIP_LIBRARIES} - ${OPENAL_LIBRARY} - ${X11_X11_LIB} - ${ZLIB_LIBRARY_RELEASE} -) - -if(ENABLE_CRASH_REPORTS) - find_package(Breakpad REQUIRED) - list(APPEND TELEGRAM_LINK_LIBRARIES - breakpad_client - ) -else() - list(APPEND TELEGRAM_COMPILE_DEFINITIONS - TDESKTOP_DISABLE_CRASH_REPORTS - ) -endif() - -if(USE_LIBATOMIC) - list(APPEND TELEGRAM_LINK_LIBRARIES libatomic.a) -endif(USE_LIBATOMIC) - -if(ENABLE_GTK_INTEGRATION) - pkg_check_modules(APPINDICATOR REQUIRED appindicator3-0.1) - pkg_check_modules(GTK3 REQUIRED gtk+-3.0) - list(APPEND TELEGRAM_INCLUDE_DIRS - ${APPINDICATOR_INCLUDE_DIRS} - ${GTK3_INCLUDE_DIRS} - ) - list(APPEND TELEGRAM_LINK_LIBRARIES - ${APPINDICATOR_LIBRARIES} - ${GTK3_LIBRARIES} - ) -else() - list(APPEND TELEGRAM_COMPILE_DEFINITIONS - TDESKTOP_DISABLE_GTK_INTEGRATION - ) -endif() - -if(ENABLE_OPENAL_EFFECTS) - list(APPEND TELEGRAM_COMPILE_DEFINITIONS - AL_ALEXT_PROTOTYPES - ) -else() - list(APPEND TELEGRAM_COMPILE_DEFINITIONS - TDESKTOP_DISABLE_OPENAL_EFFECTS - ) -endif() - -if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "8") - list(APPEND TELEGRAM_COMPILE_DEFINITIONS - Q_OS_LINUX64 - ) -else() - list(APPEND TELEGRAM_COMPILE_DEFINITIONS - Q_OS_LINUX32 - ) -endif() - -target_sources(Telegram PRIVATE ${TELEGRAM_GENERATED_SOURCES}) -add_dependencies(Telegram telegram_codegen) - -include(PrecompiledHeader) -add_precompiled_header(Telegram SourceFiles/stdafx.h) - -target_compile_definitions(Telegram PUBLIC ${TELEGRAM_COMPILE_DEFINITIONS}) -target_include_directories(Telegram PUBLIC ${TELEGRAM_INCLUDE_DIRS}) -target_link_libraries(Telegram ${TELEGRAM_LINK_LIBRARIES}) - -set_target_properties(Telegram PROPERTIES AUTOMOC_MOC_OPTIONS -bTelegram_pch/stdafx.h) - -if(BUILD_TESTS) - include(TelegramTests) -endif() - -install(TARGETS Telegram RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) -install(FILES ${CMAKE_SOURCE_DIR}/../lib/xdg/telegramdesktop.desktop DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications) - diff --git a/testing/telegram-desktop/TelegramCodegen.cmake b/testing/telegram-desktop/TelegramCodegen.cmake deleted file mode 100644 index 8f99693284e..00000000000 --- a/testing/telegram-desktop/TelegramCodegen.cmake +++ /dev/null @@ -1,97 +0,0 @@ -set(TELEGRAM_GENERATED_SOURCES) - -set(IMPORT_EXECUTABLES "native/ImportExecutables.cmake" CACHE FILEPATH "POINT") -INCLUDE(${IMPORT_EXECUTABLES}) - -add_custom_command( - OUTPUT - ${GENERATED_DIR}/scheme.h - ${GENERATED_DIR}/scheme.cpp - COMMAND python ${TELEGRAM_SOURCES_DIR}/codegen/scheme/codegen_scheme.py -o${GENERATED_DIR} ${TELEGRAM_RESOURCES_DIR}/scheme.tl - DEPENDS ${TELEGRAM_RESOURCES_DIR}/scheme.tl - COMMENT "Codegen scheme.tl" -) -list(APPEND TELEGRAM_GENERATED_SOURCES - ${GENERATED_DIR}/scheme.h - ${GENERATED_DIR}/scheme.cpp -) - -file(GLOB_RECURSE STYLES - ${TELEGRAM_RESOURCES_DIR}/*.palette - ${TELEGRAM_RESOURCES_DIR}/*.style - ${TELEGRAM_SOURCES_DIR}/*.style -) -set(GENERATED_STYLES) -foreach(STYLE ${STYLES}) - get_filename_component(STYLE_FILENAME ${STYLE} NAME) - get_filename_component(STYLE_NAME ${STYLE} NAME_WE) - if (${STYLE} MATCHES \\.palette$) - set(THIS_GENERATED_STYLES - ${GENERATED_DIR}/styles/palette.h - ${GENERATED_DIR}/styles/palette.cpp - ) - else() - set(THIS_GENERATED_STYLES - ${GENERATED_DIR}/styles/style_${STYLE_NAME}.h - ${GENERATED_DIR}/styles/style_${STYLE_NAME}.cpp - ) - endif() - - # style generator does not like '-' in file path, so let's use relative paths... - add_custom_command( - OUTPUT ${THIS_GENERATED_STYLES} - COMMAND codegen_style -IResources -ISourceFiles -o${GENERATED_DIR}/styles ${STYLE} - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} - DEPENDS codegen_style ${STYLE} - COMMENT "Codegen style ${STYLE_FILENAME}" - ) - set(GENERATED_STYLES ${GENERATED_STYLES} ${THIS_GENERATED_STYLES}) -endforeach() -list(APPEND TELEGRAM_GENERATED_SOURCES ${GENERATED_STYLES}) - -add_custom_command( - OUTPUT - ${GENERATED_DIR}/emoji.h - ${GENERATED_DIR}/emoji.cpp - ${GENERATED_DIR}/emoji_suggestions_data.h - ${GENERATED_DIR}/emoji_suggestions_data.cpp - COMMAND codegen_emoji -o${GENERATED_DIR} ${TELEGRAM_RESOURCES_DIR}/emoji_autocomplete.json - DEPENDS codegen_emoji - COMMENT "Codegen emoji" -) - -list(APPEND TELEGRAM_GENERATED_SOURCES - ${GENERATED_DIR}/emoji.h - ${GENERATED_DIR}/emoji.cpp - ${GENERATED_DIR}/emoji_suggestions_data.h - ${GENERATED_DIR}/emoji_suggestions_data.cpp -) - -add_custom_command( - OUTPUT - ${GENERATED_DIR}/lang_auto.h - ${GENERATED_DIR}/lang_auto.cpp - COMMAND codegen_lang -o${GENERATED_DIR} ${TELEGRAM_RESOURCES_DIR}/langs/lang.strings - DEPENDS codegen_lang - COMMENT "Codegen lang" -) -list(APPEND TELEGRAM_GENERATED_SOURCES - ${GENERATED_DIR}/lang_auto.h - ${GENERATED_DIR}/lang_auto.cpp -) - -add_custom_command( - OUTPUT - ${GENERATED_DIR}/numbers.h - ${GENERATED_DIR}/numbers.cpp - COMMAND codegen_numbers -o${GENERATED_DIR} ${TELEGRAM_RESOURCES_DIR}/numbers.txt - DEPENDS codegen_numbers - COMMENT "Codegen numbers" -) -list(APPEND TELEGRAM_GENERATED_SOURCES - ${GENERATED_DIR}/numbers.h - ${GENERATED_DIR}/numbers.cpp -) - -add_custom_target(telegram_codegen DEPENDS ${TELEGRAM_GENERATED_SOURCES}) - diff --git a/testing/telegram-desktop/TelegramCodegenTools.cmake b/testing/telegram-desktop/TelegramCodegenTools.cmake deleted file mode 100644 index 611c5b5a815..00000000000 --- a/testing/telegram-desktop/TelegramCodegenTools.cmake +++ /dev/null @@ -1,33 +0,0 @@ -cmake_minimum_required(VERSION 3.8) - -project(TelegramCodegen) - -set(CMAKE_CXX_STANDARD 17) -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -find_package(Qt5 REQUIRED Core Gui) - -set(TELEGRAM_SOURCES_DIR ${CMAKE_SOURCE_DIR}/../SourceFiles) -include_directories(${TELEGRAM_SOURCES_DIR}) - -file(GLOB CODEGEN_COMMON_SOURCES - ${TELEGRAM_SOURCES_DIR}/codegen/common/*.h - ${TELEGRAM_SOURCES_DIR}/codegen/common/*.cpp -) - -add_library(codegen_common OBJECT ${CODEGEN_COMMON_SOURCES}) -target_include_directories(codegen_common PUBLIC $) -target_compile_options(codegen_common PUBLIC $) - -foreach(TOOL emoji lang numbers style) - file(GLOB CODEGEN_${TOOL}_SOURCES - ${TELEGRAM_SOURCES_DIR}/codegen/${TOOL}/*.h - ${TELEGRAM_SOURCES_DIR}/codegen/${TOOL}/*.cpp - ) - - add_executable(codegen_${TOOL} ${CODEGEN_${TOOL}_SOURCES} $) - target_link_libraries(codegen_${TOOL} Qt5::Core Qt5::Gui) -endforeach() - -EXPORT(TARGETS codegen_emoji codegen_lang codegen_numbers codegen_style FILE ${CMAKE_BINARY_DIR}/ImportExecutables.cmake ) - diff --git a/testing/telegram-desktop/TelegramTests.cmake b/testing/telegram-desktop/TelegramTests.cmake deleted file mode 100644 index bcb83508fc2..00000000000 --- a/testing/telegram-desktop/TelegramTests.cmake +++ /dev/null @@ -1,62 +0,0 @@ -#find_package(catch REQUIRED) -set(catch_INCLUDE /usr/include/catch) - -file(GLOB LIST_TESTS_PY gyp/tests/list_tests.py) -file(GLOB TESTS_LIST_TXT gyp/tests/tests_list.txt) - -add_executable(tests_algorithm - SourceFiles/base/algorithm_tests.cpp - SourceFiles/base/tests_main.cpp -) - -add_executable(tests_flags - SourceFiles/base/flags_tests.cpp - SourceFiles/base/tests_main.cpp -) - -add_executable(tests_flat_map - SourceFiles/base/flat_map_tests.cpp - SourceFiles/base/tests_main.cpp -) - -add_executable(tests_flat_set - SourceFiles/base/flat_set_tests.cpp - SourceFiles/base/tests_main.cpp -) - -add_executable(tests_rpl - SourceFiles/rpl/operators_tests.cpp - SourceFiles/rpl/producer_tests.cpp - SourceFiles/rpl/variable_tests.cpp - SourceFiles/base/tests_main.cpp -) - -target_link_libraries(tests_algorithm Qt5::Core) -target_link_libraries(tests_flags Qt5::Core) -target_link_libraries(tests_flat_map Qt5::Core) -target_link_libraries(tests_flat_set Qt5::Core) -target_link_libraries(tests_rpl Qt5::Core) - -target_include_directories(tests_algorithm PUBLIC - ${catch_INCLUDE} -) -target_include_directories(tests_flags PUBLIC - ${catch_INCLUDE} -) -target_include_directories(tests_flat_map PUBLIC - ${catch_INCLUDE} - ${THIRD_PARTY_DIR}/GSL/include - ${THIRD_PARTY_DIR}/variant/include -) -target_include_directories(tests_flat_set PUBLIC - ${catch_INCLUDE} -) -target_include_directories(tests_rpl PUBLIC - ${catch_INCLUDE} - ${THIRD_PARTY_DIR}/GSL/include - ${THIRD_PARTY_DIR}/variant/include -) - -enable_testing() -add_test(tests python ${LIST_TESTS_PY} --input ${TESTS_LIST_TXT}) - diff --git a/testing/telegram-desktop/ThirdParty-crl.cmake b/testing/telegram-desktop/ThirdParty-crl.cmake deleted file mode 100644 index 7752c615108..00000000000 --- a/testing/telegram-desktop/ThirdParty-crl.cmake +++ /dev/null @@ -1,17 +0,0 @@ -project(crl) - -find_package(Qt5 REQUIRED COMPONENTS Core) - -file(GLOB CRL_SOURCE_FILES - src/crl/common/*.cpp - src/crl/dispatch/*.cpp - src/crl/qt/*.cpp - src/crl/winapi/*.cpp - src/crl/linux/*.cpp - src/crl/crl_time.cpp -) - -add_library(${PROJECT_NAME} STATIC ${CRL_SOURCE_FILES}) - -target_include_directories(${PROJECT_NAME} PUBLIC src) -target_link_libraries(${PROJECT_NAME} Qt5::Core) diff --git a/testing/telegram-desktop/ThirdParty-libtgvoip-webrtc.cmake b/testing/telegram-desktop/ThirdParty-libtgvoip-webrtc.cmake deleted file mode 100644 index 77857615984..00000000000 --- a/testing/telegram-desktop/ThirdParty-libtgvoip-webrtc.cmake +++ /dev/null @@ -1,371 +0,0 @@ -project(webrtc) - -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -list(APPEND WEBRTC_C_SOURCE_FILES - "modules/third_party/fft/fft.c" - "modules/audio_coding/codecs/isac/main/source/pitch_estimator.c" - "modules/audio_coding/codecs/isac/main/source/lpc_shape_swb16_tables.c" - "modules/audio_coding/codecs/isac/main/source/pitch_gain_tables.c" - "modules/audio_coding/codecs/isac/main/source/arith_routines_logist.c" - "modules/audio_coding/codecs/isac/main/source/filterbanks.c" - "modules/audio_coding/codecs/isac/main/source/transform.c" - "modules/audio_coding/codecs/isac/main/source/pitch_filter.c" - "modules/audio_coding/codecs/isac/main/source/encode_lpc_swb.c" - "modules/audio_coding/codecs/isac/main/source/filter_functions.c" - "modules/audio_coding/codecs/isac/main/source/decode.c" - "modules/audio_coding/codecs/isac/main/source/lattice.c" - "modules/audio_coding/codecs/isac/main/source/intialize.c" - "modules/audio_coding/codecs/isac/main/source/lpc_tables.c" - "modules/audio_coding/codecs/isac/main/source/lpc_gain_swb_tables.c" - "modules/audio_coding/codecs/isac/main/source/bandwidth_estimator.c" - "modules/audio_coding/codecs/isac/main/source/encode.c" - "modules/audio_coding/codecs/isac/main/source/lpc_analysis.c" - "modules/audio_coding/codecs/isac/main/source/arith_routines_hist.c" - "modules/audio_coding/codecs/isac/main/source/entropy_coding.c" - "modules/audio_coding/codecs/isac/main/source/isac_vad.c" - "modules/audio_coding/codecs/isac/main/source/arith_routines.c" - "modules/audio_coding/codecs/isac/main/source/crc.c" - "modules/audio_coding/codecs/isac/main/source/lpc_shape_swb12_tables.c" - "modules/audio_coding/codecs/isac/main/source/decode_bwe.c" - "modules/audio_coding/codecs/isac/main/source/spectrum_ar_model_tables.c" - "modules/audio_coding/codecs/isac/main/source/pitch_lag_tables.c" - "modules/audio_coding/codecs/isac/main/source/isac.c" - "modules/audio_processing/ns/nsx_core.c" - "modules/audio_processing/ns/noise_suppression_x.c" - "modules/audio_processing/ns/nsx_core_c.c" - "modules/audio_processing/ns/ns_core.c" - "modules/audio_processing/ns/noise_suppression.c" - "modules/audio_processing/agc/legacy/analog_agc.c" - "modules/audio_processing/agc/legacy/digital_agc.c" - "common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor.c" - "common_audio/third_party/fft4g/fft4g.c" - "common_audio/ring_buffer.c" - "common_audio/signal_processing/complex_fft.c" - "common_audio/signal_processing/filter_ma_fast_q12.c" - "common_audio/signal_processing/levinson_durbin.c" - "common_audio/signal_processing/auto_corr_to_refl_coef.c" - "common_audio/signal_processing/resample_by_2_internal.c" - "common_audio/signal_processing/energy.c" - "common_audio/signal_processing/sqrt_of_one_minus_x_squared.c" - "common_audio/signal_processing/downsample_fast.c" - "common_audio/signal_processing/splitting_filter1.c" - "common_audio/signal_processing/filter_ar_fast_q12.c" - "common_audio/signal_processing/spl_init.c" - "common_audio/signal_processing/lpc_to_refl_coef.c" - "common_audio/signal_processing/cross_correlation.c" - "common_audio/signal_processing/division_operations.c" - "common_audio/signal_processing/auto_correlation.c" - "common_audio/signal_processing/get_scaling_square.c" - "common_audio/signal_processing/resample.c" - "common_audio/signal_processing/min_max_operations.c" - "common_audio/signal_processing/refl_coef_to_lpc.c" - "common_audio/signal_processing/filter_ar.c" - "common_audio/signal_processing/vector_scaling_operations.c" - "common_audio/signal_processing/resample_fractional.c" - "common_audio/signal_processing/real_fft.c" - "common_audio/signal_processing/ilbc_specific_functions.c" - "common_audio/signal_processing/complex_bit_reverse.c" - "common_audio/signal_processing/randomization_functions.c" - "common_audio/signal_processing/copy_set_operations.c" - "common_audio/signal_processing/resample_by_2.c" - "common_audio/signal_processing/get_hanning_window.c" - "common_audio/signal_processing/resample_48khz.c" - "common_audio/signal_processing/spl_inl.c" - "common_audio/signal_processing/spl_sqrt.c" - "common_audio/vad/vad_sp.c" - "common_audio/vad/webrtc_vad.c" - "common_audio/vad/vad_filterbank.c" - "common_audio/vad/vad_core.c" - "common_audio/vad/vad_gmm.c" -) - -list(APPEND WEBRTC_CXX_SOURCE_FILES - "system_wrappers/source/field_trial.cc" - "system_wrappers/source/metrics.cc" - "system_wrappers/source/cpu_features.cc" - "absl/strings/internal/memutil.cc" - "absl/strings/string_view.cc" - "absl/strings/ascii.cc" - "absl/types/bad_optional_access.cc" - "absl/types/optional.cc" - "absl/base/internal/raw_logging.cc" - "absl/base/internal/throw_delegate.cc" - "rtc_base/race_checker.cc" - "rtc_base/strings/string_builder.cc" - "rtc_base/memory/aligned_malloc.cc" - "rtc_base/timeutils.cc" - "rtc_base/platform_file.cc" - "rtc_base/string_to_number.cc" - "rtc_base/thread_checker_impl.cc" - "rtc_base/stringencode.cc" - "rtc_base/stringutils.cc" - "rtc_base/checks.cc" - "rtc_base/platform_thread.cc" - "rtc_base/criticalsection.cc" - "rtc_base/platform_thread_types.cc" - "rtc_base/event.cc" - "rtc_base/event_tracer.cc" - "rtc_base/logging_webrtc.cc" - "third_party/rnnoise/src/rnn_vad_weights.cc" - "third_party/rnnoise/src/kiss_fft.cc" - "api/audio/audio_frame.cc" - "api/audio/echo_canceller3_config.cc" - "api/audio/echo_canceller3_factory.cc" - "modules/third_party/fft/fft.c" - "modules/audio_coding/codecs/isac/main/source/pitch_estimator.c" - "modules/audio_coding/codecs/isac/main/source/lpc_shape_swb16_tables.c" - "modules/audio_coding/codecs/isac/main/source/pitch_gain_tables.c" - "modules/audio_coding/codecs/isac/main/source/arith_routines_logist.c" - "modules/audio_coding/codecs/isac/main/source/filterbanks.c" - "modules/audio_coding/codecs/isac/main/source/transform.c" - "modules/audio_coding/codecs/isac/main/source/pitch_filter.c" - "modules/audio_coding/codecs/isac/main/source/encode_lpc_swb.c" - "modules/audio_coding/codecs/isac/main/source/filter_functions.c" - "modules/audio_coding/codecs/isac/main/source/decode.c" - "modules/audio_coding/codecs/isac/main/source/lattice.c" - "modules/audio_coding/codecs/isac/main/source/intialize.c" - "modules/audio_coding/codecs/isac/main/source/lpc_tables.c" - "modules/audio_coding/codecs/isac/main/source/lpc_gain_swb_tables.c" - "modules/audio_coding/codecs/isac/main/source/bandwidth_estimator.c" - "modules/audio_coding/codecs/isac/main/source/encode.c" - "modules/audio_coding/codecs/isac/main/source/lpc_analysis.c" - "modules/audio_coding/codecs/isac/main/source/arith_routines_hist.c" - "modules/audio_coding/codecs/isac/main/source/entropy_coding.c" - "modules/audio_coding/codecs/isac/main/source/isac_vad.c" - "modules/audio_coding/codecs/isac/main/source/arith_routines.c" - "modules/audio_coding/codecs/isac/main/source/crc.c" - "modules/audio_coding/codecs/isac/main/source/lpc_shape_swb12_tables.c" - "modules/audio_coding/codecs/isac/main/source/decode_bwe.c" - "modules/audio_coding/codecs/isac/main/source/spectrum_ar_model_tables.c" - "modules/audio_coding/codecs/isac/main/source/pitch_lag_tables.c" - "modules/audio_coding/codecs/isac/main/source/isac.c" - "modules/audio_processing/rms_level.cc" - "modules/audio_processing/echo_detector/normalized_covariance_estimator.cc" - "modules/audio_processing/echo_detector/moving_max.cc" - "modules/audio_processing/echo_detector/circular_buffer.cc" - "modules/audio_processing/echo_detector/mean_variance_estimator.cc" - "modules/audio_processing/splitting_filter.cc" - "modules/audio_processing/gain_control_impl.cc" - "modules/audio_processing/ns/nsx_core.c" - "modules/audio_processing/ns/noise_suppression_x.c" - "modules/audio_processing/ns/nsx_core_c.c" - "modules/audio_processing/ns/ns_core.c" - "modules/audio_processing/ns/noise_suppression.c" - "modules/audio_processing/audio_buffer.cc" - "modules/audio_processing/typing_detection.cc" - "modules/audio_processing/include/audio_processing_statistics.cc" - "modules/audio_processing/include/audio_generator_factory.cc" - "modules/audio_processing/include/aec_dump.cc" - "modules/audio_processing/include/audio_processing.cc" - "modules/audio_processing/include/config.cc" - "modules/audio_processing/agc2/interpolated_gain_curve.cc" - "modules/audio_processing/agc2/agc2_common.cc" - "modules/audio_processing/agc2/gain_applier.cc" - "modules/audio_processing/agc2/adaptive_agc.cc" - "modules/audio_processing/agc2/adaptive_digital_gain_applier.cc" - "modules/audio_processing/agc2/limiter.cc" - "modules/audio_processing/agc2/saturation_protector.cc" - "modules/audio_processing/agc2/rnn_vad/spectral_features_internal.cc" - "modules/audio_processing/agc2/rnn_vad/rnn.cc" - "modules/audio_processing/agc2/rnn_vad/pitch_search_internal.cc" - "modules/audio_processing/agc2/rnn_vad/spectral_features.cc" - "modules/audio_processing/agc2/rnn_vad/pitch_search.cc" - "modules/audio_processing/agc2/rnn_vad/features_extraction.cc" - "modules/audio_processing/agc2/rnn_vad/fft_util.cc" - "modules/audio_processing/agc2/rnn_vad/lp_residual.cc" - "modules/audio_processing/agc2/adaptive_mode_level_estimator_agc.cc" - "modules/audio_processing/agc2/vector_float_frame.cc" - "modules/audio_processing/agc2/noise_level_estimator.cc" - "modules/audio_processing/agc2/agc2_testing_common.cc" - "modules/audio_processing/agc2/fixed_digital_level_estimator.cc" - "modules/audio_processing/agc2/fixed_gain_controller.cc" - "modules/audio_processing/agc2/vad_with_level.cc" - "modules/audio_processing/agc2/limiter_db_gain_curve.cc" - "modules/audio_processing/agc2/down_sampler.cc" - "modules/audio_processing/agc2/signal_classifier.cc" - "modules/audio_processing/agc2/noise_spectrum_estimator.cc" - "modules/audio_processing/agc2/compute_interpolated_gain_curve.cc" - "modules/audio_processing/agc2/biquad_filter.cc" - "modules/audio_processing/agc2/adaptive_mode_level_estimator.cc" - "modules/audio_processing/transient/moving_moments.cc" - "modules/audio_processing/transient/wpd_tree.cc" - "modules/audio_processing/transient/wpd_node.cc" - "modules/audio_processing/transient/transient_suppressor.cc" - "modules/audio_processing/transient/transient_detector.cc" - "modules/audio_processing/low_cut_filter.cc" - "modules/audio_processing/level_estimator_impl.cc" - "modules/audio_processing/three_band_filter_bank.cc" - "modules/audio_processing/aec/echo_cancellation.cc" - "modules/audio_processing/aec/aec_resampler.cc" - "modules/audio_processing/aec/aec_core.cc" - "modules/audio_processing/aec/aec_core_sse2.cc" - "modules/audio_processing/voice_detection_impl.cc" - "modules/audio_processing/echo_cancellation_impl.cc" - "modules/audio_processing/gain_control_for_experimental_agc.cc" - "modules/audio_processing/agc/agc.cc" - "modules/audio_processing/agc/loudness_histogram.cc" - "modules/audio_processing/agc/agc_manager_direct.cc" - "modules/audio_processing/agc/legacy/analog_agc.c" - "modules/audio_processing/agc/legacy/digital_agc.c" - "modules/audio_processing/agc/utility.cc" - "modules/audio_processing/audio_processing_impl.cc" - "modules/audio_processing/audio_generator/file_audio_generator.cc" - "modules/audio_processing/gain_controller2.cc" - "modules/audio_processing/residual_echo_detector.cc" - "modules/audio_processing/noise_suppression_impl.cc" - "modules/audio_processing/aecm/aecm_core.cc" - "modules/audio_processing/aecm/aecm_core_c.cc" - "modules/audio_processing/aecm/echo_control_mobile.cc" - "modules/audio_processing/aec3/render_reverb_model.cc" - "modules/audio_processing/aec3/reverb_model_fallback.cc" - "modules/audio_processing/aec3/echo_remover_metrics.cc" - "modules/audio_processing/aec3/matched_filter_lag_aggregator.cc" - "modules/audio_processing/aec3/render_delay_buffer2.cc" - "modules/audio_processing/aec3/echo_path_variability.cc" - "modules/audio_processing/aec3/frame_blocker.cc" - "modules/audio_processing/aec3/subtractor.cc" - "modules/audio_processing/aec3/aec3_fft.cc" - "modules/audio_processing/aec3/fullband_erle_estimator.cc" - "modules/audio_processing/aec3/suppression_filter.cc" - "modules/audio_processing/aec3/block_processor.cc" - "modules/audio_processing/aec3/subband_erle_estimator.cc" - "modules/audio_processing/aec3/render_delay_controller_metrics.cc" - "modules/audio_processing/aec3/render_delay_buffer.cc" - "modules/audio_processing/aec3/vector_buffer.cc" - "modules/audio_processing/aec3/erl_estimator.cc" - "modules/audio_processing/aec3/aec_state.cc" - "modules/audio_processing/aec3/adaptive_fir_filter.cc" - "modules/audio_processing/aec3/render_delay_controller.cc" - "modules/audio_processing/aec3/skew_estimator.cc" - "modules/audio_processing/aec3/echo_path_delay_estimator.cc" - "modules/audio_processing/aec3/block_framer.cc" - "modules/audio_processing/aec3/erle_estimator.cc" - "modules/audio_processing/aec3/reverb_model.cc" - "modules/audio_processing/aec3/cascaded_biquad_filter.cc" - "modules/audio_processing/aec3/render_buffer.cc" - "modules/audio_processing/aec3/subtractor_output.cc" - "modules/audio_processing/aec3/stationarity_estimator.cc" - "modules/audio_processing/aec3/render_signal_analyzer.cc" - "modules/audio_processing/aec3/subtractor_output_analyzer.cc" - "modules/audio_processing/aec3/suppression_gain.cc" - "modules/audio_processing/aec3/echo_audibility.cc" - "modules/audio_processing/aec3/block_processor_metrics.cc" - "modules/audio_processing/aec3/moving_average.cc" - "modules/audio_processing/aec3/reverb_model_estimator.cc" - "modules/audio_processing/aec3/aec3_common.cc" - "modules/audio_processing/aec3/residual_echo_estimator.cc" - "modules/audio_processing/aec3/matched_filter.cc" - "modules/audio_processing/aec3/reverb_decay_estimator.cc" - "modules/audio_processing/aec3/render_delay_controller2.cc" - "modules/audio_processing/aec3/suppression_gain_limiter.cc" - "modules/audio_processing/aec3/main_filter_update_gain.cc" - "modules/audio_processing/aec3/echo_remover.cc" - "modules/audio_processing/aec3/downsampled_render_buffer.cc" - "modules/audio_processing/aec3/matrix_buffer.cc" - "modules/audio_processing/aec3/block_processor2.cc" - "modules/audio_processing/aec3/echo_canceller3.cc" - "modules/audio_processing/aec3/block_delay_buffer.cc" - "modules/audio_processing/aec3/fft_buffer.cc" - "modules/audio_processing/aec3/comfort_noise_generator.cc" - "modules/audio_processing/aec3/shadow_filter_update_gain.cc" - "modules/audio_processing/aec3/filter_analyzer.cc" - "modules/audio_processing/aec3/reverb_frequency_response.cc" - "modules/audio_processing/aec3/decimator.cc" - "modules/audio_processing/echo_control_mobile_impl.cc" - "modules/audio_processing/logging/apm_data_dumper.cc" - "modules/audio_processing/vad/voice_activity_detector.cc" - "modules/audio_processing/vad/standalone_vad.cc" - "modules/audio_processing/vad/pitch_internal.cc" - "modules/audio_processing/vad/vad_circular_buffer.cc" - "modules/audio_processing/vad/vad_audio_proc.cc" - "modules/audio_processing/vad/pole_zero_filter.cc" - "modules/audio_processing/vad/pitch_based_vad.cc" - "modules/audio_processing/vad/gmm.cc" - "modules/audio_processing/utility/ooura_fft.cc" - "modules/audio_processing/utility/delay_estimator_wrapper.cc" - "modules/audio_processing/utility/ooura_fft_sse2.cc" - "modules/audio_processing/utility/delay_estimator.cc" - "modules/audio_processing/utility/block_mean_calculator.cc" - "common_audio/window_generator.cc" - "common_audio/channel_buffer.cc" - "common_audio/fir_filter_factory.cc" - "common_audio/wav_header.cc" - "common_audio/real_fourier_ooura.cc" - "common_audio/audio_util.cc" - "common_audio/fir_filter_sse.cc" - "common_audio/resampler/push_sinc_resampler.cc" - "common_audio/resampler/resampler.cc" - "common_audio/resampler/sinc_resampler_sse.cc" - "common_audio/resampler/push_resampler.cc" - "common_audio/resampler/sinc_resampler.cc" - "common_audio/resampler/sinusoidal_linear_chirp_source.cc" - "common_audio/wav_file.cc" - "common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor.c" - "common_audio/third_party/fft4g/fft4g.c" - "common_audio/audio_converter.cc" - "common_audio/real_fourier.cc" - "common_audio/sparse_fir_filter.cc" - "common_audio/smoothing_filter.cc" - "common_audio/fir_filter_c.cc" - "common_audio/ring_buffer.c" - "common_audio/signal_processing/complex_fft.c" - "common_audio/signal_processing/filter_ma_fast_q12.c" - "common_audio/signal_processing/levinson_durbin.c" - "common_audio/signal_processing/dot_product_with_scale.cc" - "common_audio/signal_processing/auto_corr_to_refl_coef.c" - "common_audio/signal_processing/resample_by_2_internal.c" - "common_audio/signal_processing/energy.c" - "common_audio/signal_processing/sqrt_of_one_minus_x_squared.c" - "common_audio/signal_processing/downsample_fast.c" - "common_audio/signal_processing/splitting_filter1.c" - "common_audio/signal_processing/filter_ar_fast_q12.c" - "common_audio/signal_processing/spl_init.c" - "common_audio/signal_processing/lpc_to_refl_coef.c" - "common_audio/signal_processing/cross_correlation.c" - "common_audio/signal_processing/division_operations.c" - "common_audio/signal_processing/auto_correlation.c" - "common_audio/signal_processing/get_scaling_square.c" - "common_audio/signal_processing/resample.c" - "common_audio/signal_processing/min_max_operations.c" - "common_audio/signal_processing/refl_coef_to_lpc.c" - "common_audio/signal_processing/filter_ar.c" - "common_audio/signal_processing/vector_scaling_operations.c" - "common_audio/signal_processing/resample_fractional.c" - "common_audio/signal_processing/real_fft.c" - "common_audio/signal_processing/ilbc_specific_functions.c" - "common_audio/signal_processing/complex_bit_reverse.c" - "common_audio/signal_processing/randomization_functions.c" - "common_audio/signal_processing/copy_set_operations.c" - "common_audio/signal_processing/resample_by_2.c" - "common_audio/signal_processing/get_hanning_window.c" - "common_audio/signal_processing/resample_48khz.c" - "common_audio/signal_processing/spl_inl.c" - "common_audio/signal_processing/spl_sqrt.c" - "common_audio/vad/vad_sp.c" - "common_audio/vad/vad.cc" - "common_audio/vad/webrtc_vad.c" - "common_audio/vad/vad_filterbank.c" - "common_audio/vad/vad_core.c" - "common_audio/vad/vad_gmm.c" -) - -add_library(${PROJECT_NAME} OBJECT ${WEBRTC_C_SOURCE_FILES} ${WEBRTC_CXX_SOURCE_FILES}) - -target_compile_definitions(${PROJECT_NAME} PUBLIC - WEBRTC_APM_DEBUG_DUMP=0 - WEBRTC_POSIX - WEBRTC_LINUX - WEBRTC_NS_FLOAT -) - -# TODO: drop include dirs with latest webrtc -target_include_directories(${PROJECT_NAME} PUBLIC - "${CMAKE_CURRENT_LIST_DIR}/.." -) - -if( "${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "i686" ) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse2") -endif( "${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "i686" ) - - diff --git a/testing/telegram-desktop/ThirdParty-libtgvoip.cmake b/testing/telegram-desktop/ThirdParty-libtgvoip.cmake deleted file mode 100644 index 1b006d0dee5..00000000000 --- a/testing/telegram-desktop/ThirdParty-libtgvoip.cmake +++ /dev/null @@ -1,38 +0,0 @@ -project(tgvoip) - -option(ENABLE_PULSEAUDIO "Enable pulseaudio" OFF) - -add_subdirectory("${PROJECT_SOURCE_DIR}/webrtc_dsp") - -find_package(PkgConfig REQUIRED) -pkg_check_modules(OPUS REQUIRED opus) - -file(GLOB TGVOIP_SOURCE_FILES - *.cpp - audio/*.cpp - os/linux/*.cpp - os/posix/*.cpp - video/*.cpp -) -set(TGVOIP_COMPILE_DEFINITIONS TGVOIP_USE_DESKTOP_DSP WEBRTC_NS_FLOAT WEBRTC_POSIX WEBRTC_LINUX) - -if(ENABLE_PULSEAUDIO) - pkg_check_modules(LIBPULSE REQUIRED libpulse) -else() - file(GLOB PULSEAUDIO_SOURCE_FILES - os/linux/*Pulse.cpp - os/linux/*Pulse.h - ) - list(REMOVE_ITEM TGVOIP_SOURCE_FILES ${PULSEAUDIO_SOURCE_FILES}) - list(APPEND TGVOIP_COMPILE_DEFINITIONS WITHOUT_PULSE) -endif() - -add_library(${PROJECT_NAME} STATIC ${TGVOIP_SOURCE_FILES} $) - -target_compile_definitions(${PROJECT_NAME} PUBLIC ${TGVOIP_COMPILE_DEFINITIONS}) -target_include_directories(${PROJECT_NAME} PUBLIC - "${OPUS_INCLUDE_DIRS}" - "${CMAKE_CURRENT_LIST_DIR}/webrtc_dsp" -) -target_link_libraries(${PROJECT_NAME} dl ${OPUS_LIBRARIES}) - diff --git a/testing/telegram-desktop/ThirdParty-qtlottie.cmake b/testing/telegram-desktop/ThirdParty-qtlottie.cmake deleted file mode 100644 index b3ccb032b3f..00000000000 --- a/testing/telegram-desktop/ThirdParty-qtlottie.cmake +++ /dev/null @@ -1,43 +0,0 @@ -project(qtlottie) - -set(CMAKE_CXX_STANDARD 17) - -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -list(APPEND CMAKE_MODULE_PATH - ${CMAKE_SOURCE_DIR}/gyp -) - -find_package(Qt5 REQUIRED COMPONENTS Core Gui) - -foreach(__qt_module IN ITEMS QtCore QtGui) - list(APPEND QT_PRIVATE_INCLUDE_DIRS - ${QT_INCLUDE_DIR}/${__qt_module}/${Qt5_VERSION} - ${QT_INCLUDE_DIR}/${__qt_module}/${Qt5_VERSION}/${__qt_module} - ) -endforeach() - -file(GLOB QTLOTTIE_SOURCE_FILES - src/bodymovin/*.cpp - src/imports/rasterrenderer/rasterrenderer.cpp - ../../SourceFiles/lottie/*.cpp -) - -add_library(${PROJECT_NAME} STATIC ${QTLOTTIE_SOURCE_FILES}) - -include(PrecompiledHeader) -add_precompiled_header(${PROJECT_NAME} ../../SourceFiles/lottie/lottie_pch.h) - -target_include_directories(${PROJECT_NAME} PUBLIC - src - src/bodymovin - src/imports - ${CMAKE_SOURCE_DIR}/SourceFiles - ${CMAKE_SOURCE_DIR}/ThirdParty/GSL/include - ${CMAKE_SOURCE_DIR}/ThirdParty/variant/include - ${QT_PRIVATE_INCLUDE_DIRS} -) -set_target_properties(${PROJECT_NAME} PROPERTIES AUTOMOC_MOC_OPTIONS -bqtlottie_pch/lottie_pch.h) -target_compile_definitions(${PROJECT_NAME} PUBLIC BODYMOVIN_LIBRARY) -target_link_libraries(${PROJECT_NAME} crl Qt5::Core Qt5::Widgets) - diff --git a/testing/telegram-desktop/add-private-qt-functions.patch b/testing/telegram-desktop/add-private-qt-functions.patch deleted file mode 100644 index 54b678a9015..00000000000 --- a/testing/telegram-desktop/add-private-qt-functions.patch +++ /dev/null @@ -1,101 +0,0 @@ -diff --git a/Telegram/SourceFiles/qt_functions.cpp b/Telegram/SourceFiles/qt_functions.cpp -new file mode 100644 -index 0000000..4a722b8 ---- /dev/null -+++ b/Telegram/SourceFiles/qt_functions.cpp -@@ -0,0 +1,94 @@ -+/**************************************************************************** -+** -+** Copyright (C) 2015 The Qt Company Ltd. -+** Contact: http://www.qt.io/licensing/ -+** -+** This file contains some parts of the Qt Toolkit. -+** -+** $QT_BEGIN_LICENSE:LGPL21$ -+** Commercial License Usage -+** Licensees holding valid commercial Qt licenses may use this file in -+** accordance with the commercial license agreement provided with the -+** Software or, alternatively, in accordance with the terms contained in -+** a written agreement between you and The Qt Company. For licensing terms -+** and conditions see http://www.qt.io/terms-conditions. For further -+** information use the contact form at http://www.qt.io/contact-us. -+** -+** GNU Lesser General Public License Usage -+** Alternatively, this file may be used under the terms of the GNU Lesser -+** General Public License version 2.1 or version 3 as published by the Free -+** Software Foundation and appearing in the file LICENSE.LGPLv21 and -+** LICENSE.LGPLv3 included in the packaging of this file. Please review the -+** following information to ensure the GNU Lesser General Public License -+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -+** -+** As a special exception, The Qt Company gives you certain additional -+** rights. These rights are described in The Qt Company LGPL Exception -+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -+** -+** $QT_END_LICENSE$ -+** -+****************************************************************************/ -+ -+/* TODO: find a dynamic library with these symbols. */ -+ -+/* Debian maintainer: this function is taken from qfiledialog.cpp */ -+/* -+ Makes a list of filters from ;;-separated text. -+ Used by the mac and windows implementations -+*/ -+QStringList qt_make_filter_list(const QString &filter) -+{ -+ QString f(filter); -+ -+ if (f.isEmpty()) -+ return QStringList(); -+ -+ QString sep(QLatin1String(";;")); -+ int i = f.indexOf(sep, 0); -+ if (i == -1) { -+ if (f.indexOf(QLatin1Char('\n'), 0) != -1) { -+ sep = QLatin1Char('\n'); -+ i = f.indexOf(sep, 0); -+ } -+ } -+ -+ return f.split(sep); -+} -+ -+/* Debian maintainer: this constructor is taken from qtextengine.cpp for TextPainter::drawLine */ -+QTextItemInt::QTextItemInt(const QGlyphLayout &g, QFont *font, const QChar *chars_, int numChars, QFontEngine *fe, const QTextCharFormat &format) -+ : flags(0), justified(false), underlineStyle(QTextCharFormat::NoUnderline), charFormat(format), -+ num_chars(numChars), chars(chars_), logClusters(0), f(font), glyphs(g), fontEngine(fe) -+{ -+} -+ -+/* Debian maintainer: this method is also taken from qtextengine.cpp */ -+// Fix up flags and underlineStyle with given info -+void QTextItemInt::initWithScriptItem(const QScriptItem &si) -+{ -+ // explicitly initialize flags so that initFontAttributes can be called -+ // multiple times on the same TextItem -+ flags = 0; -+ if (si.analysis.bidiLevel %2) -+ flags |= QTextItem::RightToLeft; -+ ascent = si.ascent; -+ descent = si.descent; -+ -+ if (charFormat.hasProperty(QTextFormat::TextUnderlineStyle)) { -+ underlineStyle = charFormat.underlineStyle(); -+ } else if (charFormat.boolProperty(QTextFormat::FontUnderline) -+ || f->d->underline) { -+ underlineStyle = QTextCharFormat::SingleUnderline; -+ } -+ -+ // compat -+ if (underlineStyle == QTextCharFormat::SingleUnderline) -+ flags |= QTextItem::Underline; -+ -+ if (f->d->overline || charFormat.fontOverline()) -+ flags |= QTextItem::Overline; -+ if (f->d->strikeOut || charFormat.fontStrikeOut()) -+ flags |= QTextItem::StrikeOut; -+} - diff --git a/testing/telegram-desktop/dynamic-linking-qt5.patch b/testing/telegram-desktop/dynamic-linking-qt5.patch deleted file mode 100644 index ed07f036a2c..00000000000 --- a/testing/telegram-desktop/dynamic-linking-qt5.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 6645b23021d169c8d3fc0f4522e1725571ace288 Mon Sep 17 00:00:00 2001 -From: John Zimmermann -Date: Wed, 26 Sep 2018 20:36:13 +0200 -Subject: [PATCH 2/7] Fix a few bugs that are caused by dynamic linking to qt5. - ---- - Telegram/SourceFiles/core/launcher.cpp | 8 ++++++++ - Telegram/SourceFiles/qt_static_plugins.cpp | 9 --------- - 2 files changed, 8 insertions(+), 9 deletions(-) - -diff --git Telegram/SourceFiles/core/launcher.cpp Telegram/SourceFiles/core/launcher.cpp -index d4bdadc17..bf9066274 100644 ---- a/Telegram/SourceFiles/core/launcher.cpp -+++ b/Telegram/SourceFiles/core/launcher.cpp -@@ -59,6 +59,14 @@ int Launcher::exec() { - Logs::start(this); // must be started before Platform is started - Platform::start(); // must be started before QApplication is created - -+ -+ // I don't know why path is not in QT_PLUGIN_PATH by default -+ QCoreApplication::addLibraryPath("/usr/lib/qt/plugins"); -+ // without this Telegram doesn't start on Ubuntu 17.04 due GTK errors -+ setenv("QT_STYLE_OVERRIDE", "qwerty", false); -+ // Telegram doesn't start when extraordinary theme is set, see launchpad.net/bugs/1680943 -+ unsetenv("QT_QPA_PLATFORMTHEME"); -+ - auto result = executeApplication(); - - DEBUG_LOG(("Telegram finished, result: %1").arg(result)); -diff --git Telegram/SourceFiles/qt_static_plugins.cpp Telegram/SourceFiles/qt_static_plugins.cpp -index e29f348c8..122ff0f5d 100644 ---- a/Telegram/SourceFiles/qt_static_plugins.cpp 2018-12-10 16:37:52.000000000 +0100 -+++ b/Telegram/SourceFiles/qt_static_plugins.cpp 2018-12-10 16:37:52.000000000 +0100 -@@ -14,7 +14,7 @@ - Q_IMPORT_PLUGIN(QWebpPlugin) - Q_IMPORT_PLUGIN(QCocoaIntegrationPlugin) - Q_IMPORT_PLUGIN(QGenericEnginePlugin) --#elif defined Q_OS_LINUX // Q_OS_WIN | Q_OS_MAC -+#elif 0 // Q_OS_WIN | Q_OS_MAC - Q_IMPORT_PLUGIN(QWebpPlugin) - Q_IMPORT_PLUGIN(QXcbIntegrationPlugin) - Q_IMPORT_PLUGIN(QConnmanEnginePlugin) --- -2.19.0 - - - diff --git a/testing/telegram-desktop/fix-missing-use-of-pch.patch b/testing/telegram-desktop/fix-missing-use-of-pch.patch deleted file mode 100644 index ec297a06c42..00000000000 --- a/testing/telegram-desktop/fix-missing-use-of-pch.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/Telegram/SourceFiles/storage/cache/storage_cache_database_object.cpp -+++ b/Telegram/SourceFiles/storage/cache/storage_cache_database_object.cpp -@@ -14,6 +14,7 @@ - #include "storage/storage_encrypted_file.h" - #include "base/flat_map.h" - #include "base/algorithm.h" -+#include "base/openssl_help.h" - #include - #include - #include - diff --git a/testing/telegram-desktop/musl.patch b/testing/telegram-desktop/musl.patch deleted file mode 100644 index 70e7415e1ee..00000000000 --- a/testing/telegram-desktop/musl.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/Telegram/ThirdParty/libtgvoip/os/linux/AudioPulse.cpp -+++ b/Telegram/ThirdParty/libtgvoip/os/linux/AudioPulse.cpp -@@ -6,6 +6,7 @@ - - #include "AudioPulse.h" - #include -+#include - #include "../../logging.h" - - #define DECLARE_DL_FUNCTION(name) typeof(name)* AudioPulse::_import_##name=NULL diff --git a/testing/telegram-desktop/no-gtk2.patch b/testing/telegram-desktop/no-gtk2.patch deleted file mode 100644 index 839a49bea57..00000000000 --- a/testing/telegram-desktop/no-gtk2.patch +++ /dev/null @@ -1,27 +0,0 @@ ---- a/Telegram/SourceFiles/platform/linux/linux_libs.cpp -+++ b/Telegram/SourceFiles/platform/linux/linux_libs.cpp -@@ -240,24 +240,12 @@ void start() { - indicatorLoaded = setupAppIndicator(lib_indicator); - } - } -- if (!gtkLoaded || !indicatorLoaded) { -- if (loadLibrary(lib_indicator, "ayatana-appindicator", 1) || loadLibrary(lib_indicator, "appindicator", 1)) { -- if (loadLibrary(lib_gtk, "gtk-x11-2.0", 0)) { -- gtkLoaded = indicatorLoaded = false; -- gtkLoaded = setupGtkBase(lib_gtk); -- indicatorLoaded = setupAppIndicator(lib_indicator); -- } -- } -- } - - // If no appindicator, try at least load gtk. - if (!gtkLoaded && !indicatorLoaded) { - if (loadLibrary(lib_gtk, "gtk-3", 0)) { - gtkLoaded = setupGtkBase(lib_gtk); - } -- if (!gtkLoaded && loadLibrary(lib_gtk, "gtk-x11-2.0", 0)) { -- gtkLoaded = setupGtkBase(lib_gtk); -- } - } - - if (gtkLoaded) { diff --git a/testing/telegram-desktop/no-pulse.patch b/testing/telegram-desktop/no-pulse.patch deleted file mode 100644 index fe0f71f0e8c..00000000000 --- a/testing/telegram-desktop/no-pulse.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/Telegram/ThirdParty/libtgvoip/config.h.in -+++ b/Telegram/ThirdParty/libtgvoip/config.h.in -@@ -197,7 +197,7 @@ - #undef WITHOUT_ALSA - - /* Define to disable PulseAudio support */ --#undef WITHOUT_PULSE -+#define WITHOUT_PULSE - - /* Define for Solaris 2.5.1 so the uint32_t typedef from , - , or is not used. If the typedef were allowed, the diff --git a/testing/telegram-desktop/ppc64le-enable-arch.patch b/testing/telegram-desktop/ppc64le-enable-arch.patch deleted file mode 100644 index aeebc891eae..00000000000 --- a/testing/telegram-desktop/ppc64le-enable-arch.patch +++ /dev/null @@ -1,37 +0,0 @@ ---- a/Telegram/SourceFiles/base/build_config.h -+++ b/Telegram/SourceFiles/base/build_config.h -@@ -51,6 +51,8 @@ - #define ARCH_CPU_64_BITS 1 - #elif defined(_M_ARM) || defined(__arm__) - #define ARCH_CPU_32_BITS 1 -+#elif defined(__PPC64__) -+#define ARCH_CPU_64_BITS 1 - #else - #error Please add support for your architecture in base/build_config.h - #endif ---- a/Telegram/ThirdParty/libtgvoip/webrtc_dsp/rtc_base/system/arch.h -+++ b/Telegram/ThirdParty/libtgvoip/webrtc_dsp/rtc_base/system/arch.h -@@ -27,6 +27,10 @@ - #define WEBRTC_ARCH_ARM_FAMILY - #define WEBRTC_ARCH_64_BITS - #define WEBRTC_ARCH_LITTLE_ENDIAN -+#elif defined(__PPC64__) -+#define WEBRTC_ARCH_PPC64 -+#define WEBRTC_ARCH_64_BITS -+#define WEBRTC_ARCH_LITTLE_ENDIAN - #elif defined(_M_IX86) || defined(__i386__) - #define WEBRTC_ARCH_X86_FAMILY - #define WEBRTC_ARCH_X86 ---- a/Telegram/ThirdParty/libtgvoip/webrtc_dsp/typedefs.h -+++ b/Telegram/ThirdParty/libtgvoip/webrtc_dsp/typedefs.h -@@ -27,6 +27,10 @@ - #define WEBRTC_ARCH_ARM_FAMILY - #define WEBRTC_ARCH_64_BITS - #define WEBRTC_ARCH_LITTLE_ENDIAN -+#elif defined(__PPC64__) -+#define WEBRTC_ARCH_PPC64 -+#define WEBRTC_ARCH_64_BITS -+#define WEBRTC_ARCH_LITTLE_ENDIAN - #elif defined(_M_IX86) || defined(__i386__) - #define WEBRTC_ARCH_X86_FAMILY - #define WEBRTC_ARCH_X86 diff --git a/testing/telegram-desktop/sourcefiles-lottie.patch b/testing/telegram-desktop/sourcefiles-lottie.patch deleted file mode 100644 index 0fd3c1b87ae..00000000000 --- a/testing/telegram-desktop/sourcefiles-lottie.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/Telegram/SourceFiles/lottie/lottie_animation.cpp b/Telegram/SourceFiles/lottie/lottie_animation.cpp -index cee1bf7bb..c8adfc343 100644 ---- a/Telegram/SourceFiles/lottie/lottie_animation.cpp -+++ b/Telegram/SourceFiles/lottie/lottie_animation.cpp -@@ -15,6 +15,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL - #include "logs.h" - - #include -+#include - #include - #include - - diff --git a/testing/telegram-desktop/submodule-lottie.patch b/testing/telegram-desktop/submodule-lottie.patch deleted file mode 100644 index d96ab2506bd..00000000000 --- a/testing/telegram-desktop/submodule-lottie.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/Telegram/ThirdParty/qtlottie/src/bodymovin/bmbase.h b/Telegram/ThirdParty/qtlottie/src/bodymovin/bmbase.h -index 97f5940..a4a3433 100644 ---- a/Telegram/ThirdParty/qtlottie/src/bodymovin/bmbase.h -+++ b/Telegram/ThirdParty/qtlottie/src/bodymovin/bmbase.h -@@ -29,6 +29,7 @@ - #pragma once - - #include -+#include - #include - - namespace Lottie { - diff --git a/testing/telegram-desktop/system-wide-fonts.patch b/testing/telegram-desktop/system-wide-fonts.patch deleted file mode 100644 index c89222986bc..00000000000 --- a/testing/telegram-desktop/system-wide-fonts.patch +++ /dev/null @@ -1,34 +0,0 @@ -Description: Remove links to packaged Open Sans font - This makes Telegram Desktop use system-wide fonts. - Warnings about non-existent fonts in resources are also disabled. -Author: Nicholas Guriev -Bug-Debian: https://bugs.debian.org/890341 -Last-Update: Sat, 31 Mar 2018 14:36:39 +0300 - ---- a/Telegram/Resources/qrc/telegram.qrc -+++ b/Telegram/Resources/qrc/telegram.qrc -@@ -42,9 +42,6 @@ - ../export_html/js/script.js - - -- ../fonts/OpenSans-Regular.ttf -- ../fonts/OpenSans-Bold.ttf -- ../fonts/OpenSans-Semibold.ttf - ../art/bg.jpg - ../art/bg_initial.jpg - ../art/logo_256.png ---- a/Telegram/SourceFiles/ui/twidget.cpp -+++ b/Telegram/SourceFiles/ui/twidget.cpp -@@ -70,9 +70,9 @@ void Start() { - } - Started = true; - -- auto regular = LoadCustomFont(qsl(":/gui/fonts/OpenSans-Regular.ttf"), qsl("Open Sans")); -- auto bold = LoadCustomFont(qsl(":/gui/fonts/OpenSans-Bold.ttf"), qsl("Open Sans"), style::internal::FontBold); -- auto semibold = LoadCustomFont(qsl(":/gui/fonts/OpenSans-Semibold.ttf"), qsl("Open Sans Semibold")); -+ auto regular = ValidateFont(qsl("Open Sans")); -+ auto bold = ValidateFont(qsl("Open Sans"), style::internal::FontBold); -+ auto semibold = ValidateFont(qsl("Open Sans Semibold")); - - #ifdef Q_OS_WIN - // Attempt to workaround a strange font bug with Open Sans Semibold not loading. diff --git a/testing/telegram-desktop/xdg.patch b/testing/telegram-desktop/xdg.patch deleted file mode 100644 index e26bda0bc78..00000000000 --- a/testing/telegram-desktop/xdg.patch +++ /dev/null @@ -1,30 +0,0 @@ ---- a/lib/xdg/telegramdesktop.desktop -+++ b/lib/xdg/telegramdesktop.desktop -@@ -1,6 +1,8 @@ - [Desktop Entry] - Version=1.0 - Name=Telegram Desktop -+GenericName=Telegram Desktop -+Keywords=IM;Chat; - Comment=Official desktop version of Telegram messaging app - Exec=telegram-desktop -- %u - Icon=telegram ---- a/lib/xdg/telegramdesktop.appdata.xml -+++ b/lib/xdg/telegramdesktop.appdata.xml -@@ -1,6 +1,6 @@ - - -- org.telegram.desktop -+ telegram-desktop.desktop - CC0-1.0 - GPL-3.0 - Telegram Desktop ---- a/lib/xdg/tg.protocol -+++ b/lib/xdg/tg.protocol -@@ -1,5 +1,5 @@ - [Protocol] --exec=/usr/bin/telegram-desktop -- %u -+exec=telegram-desktop -- %u - protocol=tg - input=none - output=none -- cgit v1.2.3