Index: head/net-im/telegram-desktop/Makefile =================================================================== --- head/net-im/telegram-desktop/Makefile (revision 511977) +++ head/net-im/telegram-desktop/Makefile (revision 511978) @@ -1,120 +1,122 @@ # $FreeBSD$ PORTNAME= telegram-desktop DISTVERSIONPREFIX= v -DISTVERSION= 1.7.14 +DISTVERSION= 1.8.4 CATEGORIES= net-im MAINTAINER= henry.hu.sh@gmail.com COMMENT= Telegram Desktop messaging app LICENSE= GPLv3 LICENSE_FILE= ${WRKSRC}/LICENSE NOT_FOR_ARCHS= powerpc powerpc64 powerpcspe NOT_FOR_ARCHS_REASON= Please add support for your architecture in base/build_config.h -BUILD_DEPENDS= dee>0:devel/dee \ +BUILD_DEPENDS= alsa-lib>0:audio/alsa-lib \ + dee>0:devel/dee \ gyp:devel/py-gyp@${PY_FLAVOR} \ - range-v3>0:devel/range-v3 \ pulseaudio>0:audio/pulseaudio \ - alsa-lib>0:audio/alsa-lib + range-v3>0:devel/range-v3 LIB_DEPENDS= libavformat.so:multimedia/ffmpeg \ libdbus-1.so:devel/dbus \ libminizip.so:archivers/minizip \ libopenal.so:audio/openal-soft \ libopus.so:audio/opus -USES= compiler:c++17-lang cmake:noninja desktop-file-utils gmake gnome pkgconfig python:2.7,build qt:5 ssl +USES= cmake:noninja compiler:c++17-lang desktop-file-utils gmake \ + gnome pkgconfig python:2.7,build qt:5 ssl xorg USE_GITHUB= yes GH_ACCOUNT= telegramdesktop GH_PROJECT= tdesktop GH_TUPLE= catchorg:Catch2:5ca44b68:catch/Telegram/ThirdParty/Catch \ mapbox:variant:550ac2f:variant/Telegram/ThirdParty/variant \ Microsoft:GSL:d846fe5:gsl/Telegram/ThirdParty/GSL \ - telegramdesktop:libtgvoip:0e92a22:libtgvoip/Telegram/ThirdParty/libtgvoip \ - telegramdesktop:crl:9ea8700:crl/Telegram/ThirdParty/crl \ + telegramdesktop:libtgvoip:d4a0f71:libtgvoip/Telegram/ThirdParty/libtgvoip \ + telegramdesktop:crl:52baf11:crl/Telegram/ThirdParty/crl \ Cyan4973:xxHash:7cc9639:xxhash/Telegram/ThirdParty/xxHash \ - john-preston:rlottie:302b7f9:rlottie/Telegram/ThirdParty/rlottie \ + john-preston:rlottie:589db02:rlottie/Telegram/ThirdParty/rlottie \ lz4:lz4:9a2a9f2:lz4/Telegram/ThirdParty/lz4 USE_GNOME= glib20 -USE_QT= core gui imageformats network widgets buildtools_build qmake_build dbus +USE_QT= core dbus gui imageformats network widgets buildtools_build \ + qmake_build USE_XORG= x11 xcb CMAKE_SOURCE_PATH= ${WRKSRC}/out/Release # Telegram asks each custom build to have its own API ID and hash. # Use the default ones for now. We may need to switch to the official ones, # or create our own. TELEGRAM_API_ID= 17349 TELEGRAM_API_HASH= 344583e45741c457fe1862106095a5eb -GYP_DEFINES= TDESKTOP_DISABLE_CRASH_REPORTS,TDESKTOP_DISABLE_AUTOUPDATE,TDESKTOP_DISABLE_REGISTER_CUSTOM_SCHEME +GYP_DEFINES= TDESKTOP_DISABLE_CRASH_REPORTS,TDESKTOP_DISABLE_AUTOUPDATE,TDESKTOP_DISABLE_REGISTER_CUSTOM_SCHEME # Telegram uses OpenAL for its audio, but libtgvoip (for voice calls) can use PulseAudio or ALSA. # It dynamically loads PulseAudio, and if this fails, it loads ALSA. # If both of them are not installed, then voice calls do not work, but other functionalities still work. -OPTIONS_MULTI= AUDIO +OPTIONS_MULTI= AUDIO OPTIONS_MULTI_AUDIO= ALSA PULSEAUDIO -OPTIONS_DEFINE= GTK +OPTIONS_DEFINE= GTK OPTIONS_DEFAULT= ALSA AUDIO_DESC= Audio backend for voice calls GTK_DESC= Gtk integration (Use Gtk dialogs, etc.) ALSA_LIB_DEPENDS= libasound.so:audio/alsa-lib PULSEAUDIO_LIB_DEPENDS= libpulse.so:audio/pulseaudio .include .if ${PORT_OPTIONS:MGTK} USE_GNOME+= gtk30 .else GYP_DEFINES:= ${GYP_DEFINES},TDESKTOP_DISABLE_GTK_INTEGRATION .endif .include post-patch: @cd ${WRKSRC} && \ (${SED} -e " \ s|%%QT_VERSION%%|${QT5_VERSION}| ; \ s|%%LOCALBASE%%|${LOCALBASE}| ; \ s|%%CFLAGS%%|${CFLAGS:C/(.*)/'\1',/}| ; \ s|%%CXXFLAGS%%|${CXXFLAGS:C/(.*)/'\1',/}| ; \ s|%%LDFLAGS%%|${LDFLAGS:C/(.*)/'\1',/}| ; \ s|%%QT_BINDIR%%|${QT_BINDIR}| ; \ s|%%QT_INCDIR%%|${QT_INCDIR}| ; \ s|%%QT_LIBDIR%%|${QT_LIBDIR}| ; \ s|%%QMAKESPEC%%|${QMAKESPEC}| ; \ s|%%PYTHON_CMD%%|${PYTHON_CMD}|" \ ${FILESDIR}/gyp-patches | \ ${PATCH} -z .bak -s) @${ECHO} "#define FREEBSD_QT_PLUGINDIR \"${QT_PLUGINDIR}\"" > ${WRKSRC}/Telegram/SourceFiles/FREEBSD_QT_PLUGINDIR.h @${REINPLACE_CMD} "/Icon=/s|telegram|${PORTNAME}|" ${WRKSRC}/lib/xdg/telegramdesktop.desktop pre-configure: @cd ${WRKSRC} && gyp \ -Dapi_id=${TELEGRAM_API_ID} \ -Dapi_hash=${TELEGRAM_API_HASH} \ -Dbuild_defines=${GYP_DEFINES} \ -Gconfig=Release \ --depth=Telegram/gyp --generator-output=../.. -Goutput_dir=out Telegram/gyp/Telegram.gyp --format=cmake @TOT=`wc -l < ${WRKSRC}/out/Release/CMakeLists.txt` && NUM=`expr $$TOT - 2` && \ ${REINPLACE_CMD} "$$NUM r ${FILESDIR}/CMakeLists.inj" ${WRKSRC}/out/Release/CMakeLists.txt do-install: ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/Telegram ${STAGEDIR}${PREFIX}/bin/${PORTNAME} ${INSTALL_DATA} ${WRKSRC}/lib/xdg/telegramdesktop.desktop ${STAGEDIR}${PREFIX}/share/applications/${PORTNAME}.desktop @${MKDIR} ${STAGEDIR}${PREFIX}/share/kservices5 ${INSTALL_DATA} ${WRKSRC}/lib/xdg/tg.protocol ${STAGEDIR}${PREFIX}/share/kservices5 @${MKDIR} ${STAGEDIR}${PREFIX}/share/appdata ${INSTALL_DATA} ${WRKSRC}/lib/xdg/telegramdesktop.appdata.xml ${STAGEDIR}${PREFIX}/share/appdata/${PORTNAME}.appdata.xml .for icon_size in 16 32 48 64 128 256 512 @${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/${icon_size}x${icon_size}/apps ${INSTALL_DATA} \ ${WRKSRC}/Telegram/Resources/art/icon${icon_size}.png \ ${STAGEDIR}${PREFIX}/share/icons/hicolor/${icon_size}x${icon_size}/apps/${PORTNAME}.png .endfor .include Index: head/net-im/telegram-desktop/distinfo =================================================================== --- head/net-im/telegram-desktop/distinfo (revision 511977) +++ head/net-im/telegram-desktop/distinfo (revision 511978) @@ -1,19 +1,19 @@ -TIMESTAMP = 1564285102 -SHA256 (telegramdesktop-tdesktop-v1.7.14_GH0.tar.gz) = a52ab6efb4dc7579f05543df3fc3814baa09c0644e00ca30e37a9c6f99a5d164 -SIZE (telegramdesktop-tdesktop-v1.7.14_GH0.tar.gz) = 14296012 +TIMESTAMP = 1567889674 +SHA256 (telegramdesktop-tdesktop-v1.8.4_GH0.tar.gz) = 97f034d78447c99002b8742c75a3a436e709cdf2f5dff79f7ca04a8c76298627 +SIZE (telegramdesktop-tdesktop-v1.8.4_GH0.tar.gz) = 14367314 SHA256 (catchorg-Catch2-5ca44b68_GH0.tar.gz) = 8cdf2a345897bda1aaabffd4496dffe263768cef3e4254e74ae63545c8e12cc2 SIZE (catchorg-Catch2-5ca44b68_GH0.tar.gz) = 375264 SHA256 (mapbox-variant-550ac2f_GH0.tar.gz) = 7ab3aa7c9fa672027f13721584df5f7ec09c0ecca499d374c6ac76e147ef7354 SIZE (mapbox-variant-550ac2f_GH0.tar.gz) = 108686 SHA256 (Microsoft-GSL-d846fe5_GH0.tar.gz) = 4c463f93ca3b1dcb0b8d73b54309c1d31145761c457f1a6fd53554a6d469b468 SIZE (Microsoft-GSL-d846fe5_GH0.tar.gz) = 58930 -SHA256 (telegramdesktop-libtgvoip-0e92a22_GH0.tar.gz) = 179c780bf199ff41984756d1b0b96287edf0fa1490f76a31eb9cbdc572ecce6f -SIZE (telegramdesktop-libtgvoip-0e92a22_GH0.tar.gz) = 1484785 -SHA256 (telegramdesktop-crl-9ea8700_GH0.tar.gz) = 68011a83a139d68bed4fd13b946c1aea6f7bea8bffc702a4795f2c0e23f9efd4 -SIZE (telegramdesktop-crl-9ea8700_GH0.tar.gz) = 21873 +SHA256 (telegramdesktop-libtgvoip-d4a0f71_GH0.tar.gz) = bff049b414bdaafe488f3d46d894e910c06ff5233bf33001d59fe50b7de3702a +SIZE (telegramdesktop-libtgvoip-d4a0f71_GH0.tar.gz) = 1484804 +SHA256 (telegramdesktop-crl-52baf11_GH0.tar.gz) = 04effcfcbcd1486619d93dba0a30ca16579bca5cc37273ed1908dd8b375e3e3b +SIZE (telegramdesktop-crl-52baf11_GH0.tar.gz) = 21842 SHA256 (Cyan4973-xxHash-7cc9639_GH0.tar.gz) = f40801820e885f92bbe3d2434efeb39aa18eeaf878341982e8525b538468e3ed SIZE (Cyan4973-xxHash-7cc9639_GH0.tar.gz) = 37534 -SHA256 (john-preston-rlottie-302b7f9_GH0.tar.gz) = ade35b77c10c2a733ecccbca261222c36755bbd0f0d03f2e2772bd7cc0ad3d2b -SIZE (john-preston-rlottie-302b7f9_GH0.tar.gz) = 7896441 +SHA256 (john-preston-rlottie-589db02_GH0.tar.gz) = 415a78d04836f5bf4e535b034a7d5cf540d55cce98b9be869c3178e1c251f361 +SIZE (john-preston-rlottie-589db02_GH0.tar.gz) = 7887733 SHA256 (lz4-lz4-9a2a9f2_GH0.tar.gz) = 437827e1a1a0eec752777d29ef7ac78b195c805438448fe08154d9b5b181b8ea SIZE (lz4-lz4-9a2a9f2_GH0.tar.gz) = 293999 Index: head/net-im/telegram-desktop/files/patch-issue6219 =================================================================== --- head/net-im/telegram-desktop/files/patch-issue6219 (revision 511977) +++ head/net-im/telegram-desktop/files/patch-issue6219 (nonexistent) @@ -1,172 +0,0 @@ -From 0710dde4d5526454318b2748331e887c01ecfdce Mon Sep 17 00:00:00 2001 -From: John Preston -Date: Tue, 9 Jul 2019 13:43:57 +0200 -Subject: [PATCH] Use private Qt color API only in official build. - -Fixes #6219. ---- - .../SourceFiles/ffmpeg/ffmpeg_utility.cpp | 100 ++++++++++++------ - Telegram/gyp/lib_ffmpeg.gyp | 6 +- - 2 files changed, 71 insertions(+), 35 deletions(-) - -diff --git a/Telegram/SourceFiles/ffmpeg/ffmpeg_utility.cpp b/Telegram/SourceFiles/ffmpeg/ffmpeg_utility.cpp -index 5d0e50926..3775f7503 100644 ---- Telegram/SourceFiles/ffmpeg/ffmpeg_utility.cpp -+++ Telegram/SourceFiles/ffmpeg/ffmpeg_utility.cpp -@@ -11,7 +11,10 @@ For license and copyright information please follow this link: - #include "logs.h" - - #include -+ -+#ifdef TDESKTOP_OFFICIAL_TARGET - #include -+#endif // TDESKTOP_OFFICIAL_TARGET - - extern "C" { - #include -@@ -44,6 +47,58 @@ void AlignedImageBufferCleanupHandler(void* data) { - && !(image.bytesPerLine() % kAlignImageBy); - } - -+void UnPremultiplyLine(uchar *dst, const uchar *src, int intsCount) { -+#ifdef TDESKTOP_OFFICIAL_TARGET -+ const auto layout = &qPixelLayouts[QImage::Format_ARGB32]; -+ const auto convert = layout->convertFromARGB32PM; -+#else // TDESKTOP_OFFICIAL_TARGET -+ const auto layout = nullptr; -+ const auto convert = []( -+ uint *dst, -+ const uint *src, -+ int count, -+ std::nullptr_t, -+ std::nullptr_t) { -+ for (auto i = 0; i != count; ++i) { -+ dst[i] = qUnpremultiply(src[i]); -+ } -+ }; -+#endif // TDESKTOP_OFFICIAL_TARGET -+ -+ convert( -+ reinterpret_cast(dst), -+ reinterpret_cast(src), -+ intsCount, -+ layout, -+ nullptr); -+} -+ -+void PremultiplyLine(uchar *dst, const uchar *src, int intsCount) { -+#ifdef TDESKTOP_OFFICIAL_TARGET -+ const auto layout = &qPixelLayouts[QImage::Format_ARGB32]; -+ const auto convert = layout->convertToARGB32PM; -+#else // TDESKTOP_OFFICIAL_TARGET -+ const auto layout = nullptr; -+ const auto convert = []( -+ uint *dst, -+ const uint *src, -+ int count, -+ std::nullptr_t, -+ std::nullptr_t) { -+ for (auto i = 0; i != count; ++i) { -+ dst[i] = qPremultiply(src[i]); -+ } -+ }; -+#endif // TDESKTOP_OFFICIAL_TARGET -+ -+ convert( -+ reinterpret_cast(dst), -+ reinterpret_cast(src), -+ intsCount, -+ layout, -+ nullptr); -+} -+ - } // namespace - - IOPointer MakeIOPointer( -@@ -360,58 +415,35 @@ void UnPremultiply(QImage &to, const QImage &from) { - if (!GoodStorageForFrame(to, from.size())) { - to = CreateFrameStorage(from.size()); - } -- -- const auto layout = &qPixelLayouts[QImage::Format_ARGB32]; -- const auto convert = layout->convertFromARGB32PM; - const auto fromPerLine = from.bytesPerLine(); - const auto toPerLine = to.bytesPerLine(); - const auto width = from.width(); -+ const auto height = from.height(); -+ auto fromBytes = from.bits(); -+ auto toBytes = to.bits(); - if (fromPerLine != width * 4 || toPerLine != width * 4) { -- auto fromBytes = from.bits(); -- auto toBytes = to.bits(); -- for (auto i = 0; i != to.height(); ++i) { -- convert( -- reinterpret_cast(toBytes), -- reinterpret_cast(fromBytes), -- width, -- layout, -- nullptr); -+ for (auto i = 0; i != height; ++i) { -+ UnPremultiplyLine(toBytes, fromBytes, width); - fromBytes += fromPerLine; - toBytes += toPerLine; - } - } else { -- convert( -- reinterpret_cast(to.bits()), -- reinterpret_cast(from.bits()), -- from.width() * from.height(), -- layout, -- nullptr); -+ UnPremultiplyLine(toBytes, fromBytes, width * height); - } - } - - void PremultiplyInplace(QImage &image) { -- const auto layout = &qPixelLayouts[QImage::Format_ARGB32]; -- const auto convert = layout->convertToARGB32PM; - const auto perLine = image.bytesPerLine(); - const auto width = image.width(); -+ const auto height = image.height(); -+ auto bytes = image.bits(); - if (perLine != width * 4) { -- auto bytes = image.bits(); -- for (auto i = 0; i != image.height(); ++i) { -- convert( -- reinterpret_cast(bytes), -- reinterpret_cast(bytes), -- width, -- layout, -- nullptr); -+ for (auto i = 0; i != height; ++i) { -+ PremultiplyLine(bytes, bytes, width); - bytes += perLine; - } - } else { -- convert( -- reinterpret_cast(image.bits()), -- reinterpret_cast(image.bits()), -- image.width() * image.height(), -- layout, -- nullptr); -+ PremultiplyLine(bytes, bytes, width * height); - } - } - -diff --git a/Telegram/gyp/lib_ffmpeg.gyp b/Telegram/gyp/lib_ffmpeg.gyp -index 9971d76ae..b9ada5362 100644 ---- Telegram/gyp/lib_ffmpeg.gyp -+++ Telegram/gyp/lib_ffmpeg.gyp -@@ -46,7 +46,11 @@ - '<(src_loc)/ffmpeg/ffmpeg_utility.cpp', - '<(src_loc)/ffmpeg/ffmpeg_utility.h', - ], -- 'conditions': [[ 'build_macold', { -+ 'conditions': [[ '"<(official_build_target)" != ""', { -+ 'defines': [ -+ 'TDESKTOP_OFFICIAL_TARGET=<(official_build_target)', -+ ], -+ }], [ 'build_macold', { - 'xcode_settings': { - 'OTHER_CPLUSPLUSFLAGS': [ '-nostdinc++' ], - }, Property changes on: head/net-im/telegram-desktop/files/patch-issue6219 ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/net-im/telegram-desktop/files/CMakeLists.inj =================================================================== --- head/net-im/telegram-desktop/files/CMakeLists.inj (revision 511977) +++ head/net-im/telegram-desktop/files/CMakeLists.inj (revision 511978) @@ -1,17 +1,18 @@ # ------------- debian/CMakeLists.inj begin ------------- # The text will be putted into the appropriate CMakeLists by debian/rules script # 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) +add_precompiled_header(lib_mtproto ../../Telegram/SourceFiles/mtproto/mtp_pch.h) # vim: ft=cmake # -------------- debian/CMakeLists.inj end -------------- Index: head/net-im/telegram-desktop/files/gyp-patches =================================================================== --- head/net-im/telegram-desktop/files/gyp-patches (revision 511977) +++ head/net-im/telegram-desktop/files/gyp-patches (revision 511978) @@ -1,454 +1,454 @@ ---- Telegram/gyp/codegen_rules.gypi.orig 2019-07-07 13:34:35 UTC +--- Telegram/gyp/codegen_rules.gypi.orig 2019-09-06 13:41:43 UTC +++ Telegram/gyp/codegen_rules.gypi @@ -15,7 +15,7 @@ '<(SHARED_INTERMEDIATE_DIR)/update_dependent_styles.timestamp', ], 'action': [ - 'python', '<(DEPTH)/update_dependent.py', '--styles', + '%%PYTHON_CMD%%', '<(DEPTH)/update_dependent.py', '--styles', '-I', '<(res_loc)', '-I', '<(src_loc)', '-o', '<(SHARED_INTERMEDIATE_DIR)/update_dependent_styles.timestamp', '<@(style_files)', @@ -26,13 +26,13 @@ 'inputs': [ '<(DEPTH)/update_dependent.py', '<@(qrc_files)', - ' /dev/null --libs <@(pkgconfig_libs))', + 'lzma', + 'openal', + 'avformat', + 'avcodec', + 'swresample', + 'swscale', + 'avutil', + 'minizip', + 'opus', + 'z', ], 'cflags_cc': [ '-Wno-strict-overflow', @@ -72,7 +63,6 @@ 'ldflags': [ '-Wl,-wrap,aligned_alloc', '-Wl,-wrap,secure_getenv', - '-Wl,-wrap,clock_gettime', '-Wl,--no-as-needed,-lrt', ], 'configurations': { @@ -80,13 +70,16 @@ 'cflags_c': [ '-Ofast', '-fno-strict-aliasing', + %%CFLAGS%% ], 'cflags_cc': [ '-Ofast', '-fno-strict-aliasing', + %%CXXFLAGS%% ], 'ldflags': [ '-Ofast', + %%LDFLAGS%% ], }, }, @@ -97,9 +90,7 @@ ], }], ['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 gtk+-3.0)', ], }], ['{ + &color1, + &color2, + &color3, Property changes on: head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_chat__helpers_stickers__emoji__pack.cpp ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_core_launcher.cpp =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_core_launcher.cpp (revision 511977) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_core_launcher.cpp (revision 511978) @@ -1,40 +1,40 @@ ---- Telegram/SourceFiles/core/launcher.cpp.orig 2019-07-07 13:34:35 UTC +--- Telegram/SourceFiles/core/launcher.cpp.orig 2019-09-06 13:41:43 UTC +++ Telegram/SourceFiles/core/launcher.cpp @@ -16,6 +16,8 @@ https://github.com/telegramdesktop/tdesktop/blob/maste #include "core/sandbox.h" #include "base/concurrent_timer.h" +#include "FREEBSD_QT_PLUGINDIR.h" + namespace Core { namespace { -@@ -246,12 +248,13 @@ void Launcher::init() { +@@ -248,12 +250,13 @@ void Launcher::init() { #define TDESKTOP_LAUNCHER_FILENAME_TO_STRING_HELPER(V) #V #define TDESKTOP_LAUNCHER_FILENAME_TO_STRING(V) TDESKTOP_LAUNCHER_FILENAME_TO_STRING_HELPER(V) QApplication::setDesktopFileName(qsl(TDESKTOP_LAUNCHER_FILENAME_TO_STRING(TDESKTOP_LAUNCHER_FILENAME))); -#elif defined(Q_OS_LINUX) && QT_VERSION >= QT_VERSION_CHECK(5, 7, 0) +#elif (defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD)) && QT_VERSION >= QT_VERSION_CHECK(5, 7, 0) QApplication::setDesktopFileName(qsl("telegramdesktop.desktop")); #endif -#ifndef OS_MAC_OLD +#if !defined(Q_OS_MAC) && QT_VERSION >= QT_VERSION_CHECK(5, 6, 0) + // Retina display support is working fine, others are not. QApplication::setAttribute(Qt::AA_DisableHighDpiScaling, true); -#endif // OS_MAC_OLD +#endif // not defined Q_OS_MAC and QT_VERSION >= 5.6.0 initHook(); } -@@ -268,6 +271,11 @@ int Launcher::exec() { +@@ -270,6 +273,11 @@ int Launcher::exec() { // both are finished in Sandbox::closeApplication Logs::start(this); // must be started before Platform is started Platform::start(); // must be started before Sandbox is created + + // I don't know why path is not in QT_PLUGIN_PATH by default + QCoreApplication::addLibraryPath(FREEBSD_QT_PLUGINDIR); + // Telegram doesn't start when extraordinary theme is set, see launchpad.net/bugs/1680943 + unsetenv("QT_QPA_PLATFORMTHEME"); auto result = executeApplication(); Index: head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_core_update__checker.cpp =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_core_update__checker.cpp (revision 511977) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_core_update__checker.cpp (revision 511978) @@ -1,22 +1,22 @@ ---- Telegram/SourceFiles/core/update_checker.cpp.orig 2019-07-07 13:34:35 UTC +--- Telegram/SourceFiles/core/update_checker.cpp.orig 2019-09-06 13:41:43 UTC +++ Telegram/SourceFiles/core/update_checker.cpp -@@ -1461,6 +1461,9 @@ int UpdateChecker::size() const { +@@ -1463,6 +1463,9 @@ int UpdateChecker::size() const { //} bool checkReadyUpdate() { +#ifdef Q_OS_FREEBSD + return false; +#endif QString readyFilePath = cWorkingDir() + qsl("tupdates/temp/ready"), readyPath = cWorkingDir() + qsl("tupdates/temp"); if (!QFile(readyFilePath).exists() || cExeName().isEmpty()) { if (QDir(cWorkingDir() + qsl("tupdates/ready")).exists() || QDir(cWorkingDir() + qsl("tupdates/temp")).exists()) { -@@ -1513,6 +1516,9 @@ bool checkReadyUpdate() { +@@ -1515,6 +1518,9 @@ bool checkReadyUpdate() { #elif defined Q_OS_LINUX // Q_OS_MAC QString curUpdater = (cExeDir() + qsl("Updater")); QFileInfo updater(cWorkingDir() + qsl("tupdates/temp/Updater")); +#elif defined Q_OS_FREEBSD + QString curUpdater; + QFileInfo updater; #endif // Q_OS_LINUX if (!updater.exists()) { QFileInfo current(curUpdater); Index: head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_export_data_export__data__types.cpp =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_export_data_export__data__types.cpp (revision 511977) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_export_data_export__data__types.cpp (revision 511978) @@ -1,14 +1,14 @@ ---- Telegram/SourceFiles/export/data/export_data_types.cpp.orig 2019-07-07 13:34:35 UTC +--- Telegram/SourceFiles/export/data/export_data_types.cpp.orig 2019-09-06 13:41:43 UTC +++ Telegram/SourceFiles/export/data/export_data_types.cpp -@@ -360,9 +360,9 @@ QString CleanDocumentName(QString name) { +@@ -362,9 +362,9 @@ QString CleanDocumentName(QString name) { '|', #elif defined Q_OS_MAC // Q_OS_WIN ':', -#elif defined Q_OS_LINUX // Q_OS_WIN || Q_OS_MAC +#elif defined Q_OS_LINUX || defined Q_OS_FREEBSD // Q_OS_WIN || Q_OS_MAC '/', -#endif // Q_OS_WIN || Q_OS_MAC || Q_OS_LINUX +#endif // Q_OS_WIN || Q_OS_MAC || Q_OS_LINUX || Q_OS_FREEBSD }; for (const auto ch : controls) { name = std::move(name).replace(ch, '_'); Index: head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_history_admin__log_history__admin__log__inner.cpp =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_history_admin__log_history__admin__log__inner.cpp (revision 511977) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_history_admin__log_history__admin__log__inner.cpp (revision 511978) @@ -1,18 +1,18 @@ ---- Telegram/SourceFiles/history/admin_log/history_admin_log_inner.cpp.orig 2019-07-07 13:34:35 UTC +--- Telegram/SourceFiles/history/admin_log/history_admin_log_inner.cpp.orig 2019-09-06 13:41:43 UTC +++ Telegram/SourceFiles/history/admin_log/history_admin_log_inner.cpp -@@ -1411,13 +1411,13 @@ void InnerWidget::mouseActionFinish(const QPoint &scre +@@ -1425,13 +1425,13 @@ void InnerWidget::mouseActionFinish(const QPoint &scre _mouseSelectType = TextSelectType::Letters; //_widget->noSelectingScroll(); // TODO -#if defined Q_OS_LINUX32 || defined Q_OS_LINUX64 +#if defined Q_OS_LINUX32 || defined Q_OS_LINUX64 || defined Q_OS_FREEBSD if (_selectedItem && _selectedText.from != _selectedText.to) { SetClipboardText( _selectedItem->selectedText(_selectedText), QClipboard::Selection); } -#endif // Q_OS_LINUX32 || Q_OS_LINUX64 +#endif // Q_OS_LINUX32 || Q_OS_LINUX64 || Q_OS_FREEBSD } void InnerWidget::updateSelected() { Index: head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_history_history__inner__widget.cpp =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_history_history__inner__widget.cpp (revision 511977) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_history_history__inner__widget.cpp (revision 511978) @@ -1,20 +1,20 @@ ---- Telegram/SourceFiles/history/history_inner_widget.cpp.orig 2019-07-07 13:34:35 UTC +--- Telegram/SourceFiles/history/history_inner_widget.cpp.orig 2019-09-06 13:41:43 UTC +++ Telegram/SourceFiles/history/history_inner_widget.cpp -@@ -1382,7 +1382,7 @@ void HistoryInner::mouseActionFinish( +@@ -1390,7 +1390,7 @@ void HistoryInner::mouseActionFinish( _widget->noSelectingScroll(); _widget->updateTopBarSelection(); -#if defined Q_OS_LINUX32 || defined Q_OS_LINUX64 +#if defined Q_OS_LINUX32 || defined Q_OS_LINUX64 || defined Q_OS_FREEBSD if (!_selected.empty() && _selected.cbegin()->second != FullSelection) { const auto [item, selection] = *_selected.cbegin(); if (const auto view = item->mainView()) { -@@ -1391,7 +1391,7 @@ void HistoryInner::mouseActionFinish( +@@ -1399,7 +1399,7 @@ void HistoryInner::mouseActionFinish( QClipboard::Selection); } } -#endif // Q_OS_LINUX32 || Q_OS_LINUX64 +#endif // Q_OS_LINUX32 || Q_OS_LINUX64 || Q_OS_FREEBSD } void HistoryInner::mouseReleaseEvent(QMouseEvent *e) { Index: head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_history_view_history__view__list__widget.cpp =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_history_view_history__view__list__widget.cpp (revision 511977) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_history_view_history__view__list__widget.cpp (revision 511978) @@ -1,20 +1,20 @@ ---- Telegram/SourceFiles/history/view/history_view_list_widget.cpp.orig 2019-07-07 13:34:35 UTC +--- Telegram/SourceFiles/history/view/history_view_list_widget.cpp.orig 2019-09-06 13:41:43 UTC +++ Telegram/SourceFiles/history/view/history_view_list_widget.cpp -@@ -2042,7 +2042,7 @@ void ListWidget::mouseActionFinish( +@@ -2050,7 +2050,7 @@ void ListWidget::mouseActionFinish( _mouseSelectType = TextSelectType::Letters; //_widget->noSelectingScroll(); // #TODO select scroll -#if defined Q_OS_LINUX32 || defined Q_OS_LINUX64 +#if defined Q_OS_LINUX32 || defined Q_OS_LINUX64 || defined Q_OS_FREEBSD if (_selectedTextItem && _selectedTextRange.from != _selectedTextRange.to) { if (const auto view = viewForItem(_selectedTextItem)) { -@@ -2051,7 +2051,7 @@ void ListWidget::mouseActionFinish( +@@ -2059,7 +2059,7 @@ void ListWidget::mouseActionFinish( QClipboard::Selection); } } -#endif // Q_OS_LINUX32 || Q_OS_LINUX64 +#endif // Q_OS_LINUX32 || Q_OS_LINUX64 || Q_OS_FREEBSD } void ListWidget::mouseActionUpdate() { Index: head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_platform_linux_main__window__linux.cpp =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_platform_linux_main__window__linux.cpp (revision 511977) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_platform_linux_main__window__linux.cpp (revision 511978) @@ -1,87 +1,87 @@ ---- Telegram/SourceFiles/platform/linux/main_window_linux.cpp.orig 2019-07-07 13:34:35 UTC +--- Telegram/SourceFiles/platform/linux/main_window_linux.cpp.orig 2019-09-06 13:41:43 UTC +++ Telegram/SourceFiles/platform/linux/main_window_linux.cpp -@@ -25,7 +25,9 @@ bool noQtTrayIcon = false, tryAppIndicator = false; +@@ -26,7 +26,9 @@ bool noQtTrayIcon = false, tryAppIndicator = false; bool useGtkBase = false, useAppIndicator = false, useStatusIcon = false, trayIconChecked = false, useUnityCount = false; #ifndef TDESKTOP_DISABLE_GTK_INTEGRATION +#ifdef HAVE_APPINDICATOR AppIndicator *_trayIndicator = 0; +#endif GtkStatusIcon *_trayIcon = 0; GtkWidget *_trayMenu = 0; GdkPixbuf *_trayPixbuf = 0; -@@ -291,7 +293,9 @@ void MainWindow::workmodeUpdated(DBIWorkMode mode) { +@@ -292,7 +294,9 @@ void MainWindow::workmodeUpdated(DBIWorkMode mode) { if (noQtTrayIcon) { #ifndef TDESKTOP_DISABLE_GTK_INTEGRATION if (useAppIndicator) { +#ifdef HAVE_APPINDICATOR Libs::app_indicator_set_status(_trayIndicator, APP_INDICATOR_STATUS_PASSIVE); +#endif } else if (useStatusIcon) { Libs::gtk_status_icon_set_visible(_trayIcon, false); } -@@ -307,7 +311,9 @@ void MainWindow::workmodeUpdated(DBIWorkMode mode) { +@@ -308,7 +312,9 @@ void MainWindow::workmodeUpdated(DBIWorkMode mode) { if (noQtTrayIcon) { #ifndef TDESKTOP_DISABLE_GTK_INTEGRATION if (useAppIndicator) { +#ifdef HAVE_APPINDICATOR Libs::app_indicator_set_status(_trayIndicator, APP_INDICATOR_STATUS_ACTIVE); +#endif } else if (useStatusIcon) { Libs::gtk_status_icon_set_visible(_trayIcon, true); } -@@ -326,7 +332,9 @@ void MainWindow::psUpdateIndicator() { +@@ -327,7 +333,9 @@ void MainWindow::psUpdateIndicator() { if (iconFile.exists()) { QByteArray path = QFile::encodeName(iconFile.absoluteFilePath()), name = QFile::encodeName(iconFile.fileName()); name = name.mid(0, name.size() - 4); +#ifdef HAVE_APPINDICATOR Libs::app_indicator_set_icon_full(_trayIndicator, path.constData(), name); +#endif } else { useAppIndicator = false; } -@@ -423,11 +431,15 @@ void MainWindow::LibsLoaded() { +@@ -424,11 +432,15 @@ void MainWindow::LibsLoaded() { && (Libs::g_object_ref_sink != nullptr) && (Libs::g_object_unref != nullptr); +#ifdef HAVE_APPINDICATOR useAppIndicator = useGtkBase && (Libs::app_indicator_new != nullptr) && (Libs::app_indicator_set_status != nullptr) && (Libs::app_indicator_set_menu != nullptr) && (Libs::app_indicator_set_icon_full != nullptr); +#else + useAppIndicator = false; +#endif if (tryAppIndicator && useGtkBase && useAppIndicator) { noQtTrayIcon = true; -@@ -463,6 +475,7 @@ void MainWindow::psCreateTrayIcon() { +@@ -464,6 +476,7 @@ void MainWindow::psCreateTrayIcon() { } #ifndef TDESKTOP_DISABLE_GTK_INTEGRATION +#ifdef HAVE_APPINDICATOR if (useAppIndicator) { DEBUG_LOG(("Trying to create AppIndicator")); _trayMenu = Libs::gtk_menu_new(); -@@ -493,6 +506,7 @@ void MainWindow::psCreateTrayIcon() { +@@ -494,6 +507,7 @@ void MainWindow::psCreateTrayIcon() { useAppIndicator = false; } } +#endif if (useStatusIcon) { if (Libs::gdk_init_check(0, 0)) { if (!_trayMenu) _trayMenu = Libs::gtk_menu_new(); -@@ -617,10 +631,12 @@ MainWindow::~MainWindow() { +@@ -628,10 +642,12 @@ MainWindow::~MainWindow() { Libs::g_object_unref(_trayMenu); _trayMenu = nullptr; } +#ifdef HAVE_APPINDICATOR if (_trayIndicator) { Libs::g_object_unref(_trayIndicator); _trayIndicator = nullptr; } +#endif #endif // !TDESKTOP_DISABLE_GTK_INTEGRATION } Index: head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_qt__functions.cpp =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_qt__functions.cpp (revision 511977) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_qt__functions.cpp (revision 511978) @@ -1,97 +1,99 @@ ---- Telegram/SourceFiles/qt_functions.cpp.orig 2018-08-05 22:39:05 UTC +--- Telegram/SourceFiles/qt_functions.cpp.orig 2019-09-07 21:39:10 UTC +++ Telegram/SourceFiles/qt_functions.cpp -@@ -0,0 +1,94 @@ +@@ -0,0 +1,96 @@ +/**************************************************************************** +** +** 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$ +** +****************************************************************************/ ++ ++#include + +/* 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; +} Index: head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_settings_settings__notifications.cpp =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_settings_settings__notifications.cpp (revision 511977) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_settings_settings__notifications.cpp (revision 511978) @@ -1,17 +1,17 @@ ---- Telegram/SourceFiles/settings/settings_notifications.cpp.orig 2019-07-07 13:34:35 UTC +--- Telegram/SourceFiles/settings/settings_notifications.cpp.orig 2019-09-06 13:41:43 UTC +++ Telegram/SourceFiles/settings/settings_notifications.cpp -@@ -480,11 +480,11 @@ void NotificationsCount::SampleWidget::destroyDelayed( +@@ -494,11 +494,11 @@ void NotificationsCount::SampleWidget::destroyDelayed( _deleted = true; // Ubuntu has a lag if deleteLater() called immediately. -#if defined Q_OS_LINUX32 || defined Q_OS_LINUX64 +#if defined Q_OS_LINUX32 || defined Q_OS_LINUX64 || defined Q_OS_FREEBSD QTimer::singleShot(1000, [this] { delete this; }); -#else // Q_OS_LINUX32 || Q_OS_LINUX64 +#else // Q_OS_LINUX32 || Q_OS_LINUX64 || Q_OS_FREEBSD deleteLater(); -#endif // Q_OS_LINUX32 || Q_OS_LINUX64 +#endif // Q_OS_LINUX32 || Q_OS_LINUX64 || Q_OS_FREEBSD } - void SetupAdvancedNotifications(not_null container) { + void SetupAdvancedNotifications( Index: head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_ui_text_text.cpp =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_ui_text_text.cpp (revision 511977) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_ui_text_text.cpp (revision 511978) @@ -1,17 +1,17 @@ ---- Telegram/SourceFiles/ui/text/text.cpp.orig 2019-07-07 13:34:35 UTC +--- Telegram/SourceFiles/ui/text/text.cpp.orig 2019-09-06 13:41:43 UTC +++ Telegram/SourceFiles/ui/text/text.cpp -@@ -2016,11 +2016,11 @@ class Renderer { (private) +@@ -2018,11 +2018,11 @@ class Renderer { (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(); Index: head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_ui_text_text__block.cpp =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_ui_text_text__block.cpp (revision 511977) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_ui_text_text__block.cpp (revision 511978) @@ -1,12 +1,12 @@ ---- Telegram/SourceFiles/ui/text/text_block.cpp.orig 2019-07-07 13:34:35 UTC +--- Telegram/SourceFiles/ui/text/text_block.cpp.orig 2019-09-06 13:41:43 UTC +++ Telegram/SourceFiles/ui/text/text_block.cpp -@@ -335,6 +335,9 @@ TextBlock::TextBlock(const style::font &font, const QS +@@ -337,6 +337,9 @@ TextBlock::TextBlock(const style::font &font, const QS QStackTextEngine engine(part, blockFont->f); BlockParser parser(&engine, this, minResizeWidth, _from, part); + QTextLayout layout(part, blockFont->f); + layout.beginLayout(); + layout.createLine(); CrashReports::ClearAnnotationRef("CrashString"); } Index: head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_window_main__window.cpp =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_window_main__window.cpp (revision 511977) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_window_main__window.cpp (revision 511978) @@ -1,20 +1,20 @@ ---- Telegram/SourceFiles/window/main_window.cpp.orig 2019-07-07 13:34:35 UTC +--- Telegram/SourceFiles/window/main_window.cpp.orig 2019-09-06 13:41:43 UTC +++ Telegram/SourceFiles/window/main_window.cpp -@@ -565,7 +565,7 @@ bool MainWindow::minimizeToTray() { +@@ -564,7 +564,7 @@ bool MainWindow::minimizeToTray() { } void MainWindow::reActivateWindow() { -#if defined Q_OS_LINUX32 || defined Q_OS_LINUX64 +#if defined Q_OS_LINUX32 || defined Q_OS_LINUX64 || defined Q_OS_FREEBSD const auto reActivate = [=] { if (const auto w = App::wnd()) { if (auto f = QApplication::focusWidget()) { -@@ -580,7 +580,7 @@ void MainWindow::reActivateWindow() { +@@ -579,7 +579,7 @@ void MainWindow::reActivateWindow() { }; crl::on_main(this, reActivate); App::CallDelayed(200, this, reActivate); -#endif // Q_OS_LINUX32 || Q_OS_LINUX64 +#endif // Q_OS_LINUX32 || Q_OS_LINUX64 || Q_OS_FREEBSD } void MainWindow::showRightColumn(object_ptr widget) { Index: head/net-im/telegram-desktop/files/patch-Telegram_ThirdParty_libtgvoip_VoIPController.cpp =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_ThirdParty_libtgvoip_VoIPController.cpp (revision 511977) +++ head/net-im/telegram-desktop/files/patch-Telegram_ThirdParty_libtgvoip_VoIPController.cpp (revision 511978) @@ -1,22 +1,11 @@ ---- Telegram/ThirdParty/libtgvoip/VoIPController.cpp.orig 2019-06-24 11:42:33 UTC +--- Telegram/ThirdParty/libtgvoip/VoIPController.cpp.orig 2019-07-15 12:59:17 UTC +++ Telegram/ThirdParty/libtgvoip/VoIPController.cpp -@@ -2389,8 +2389,8 @@ simpleAudioBlock random_id:long random_bytes:string ra - stm->decoder=NULL; - }else if(stm->type==STREAM_TYPE_VIDEO){ - if(!stm->packetReassembler){ -- stm->packetReassembler=make_shared(); -- stm->packetReassembler->SetCallback(bind(&VoIPController::ProcessIncomingVideoFrame, this, placeholders::_1, placeholders::_2, placeholders::_3)); -+ //stm->packetReassembler=make_shared(); -+ //stm->packetReassembler->SetCallback(bind(&VoIPController::ProcessIncomingVideoFrame, this, placeholders::_1, placeholders::_2, placeholders::_3)); - } - }else{ - LOGW("Unknown incoming stream type: %d", stm->type); @@ -3048,7 +3048,7 @@ static void initMachTimestart() { #endif double VoIPController::GetCurrentTime(){ -#if defined(__linux__) +#if defined(__linux__) || defined(__FreeBSD__) struct timespec ts; clock_gettime(CLOCK_MONOTONIC, &ts); return ts.tv_sec+(double)ts.tv_nsec/1000000000.0; Index: head/net-im/telegram-desktop/files/patch-Telegram_gyp_telegram__sources.txt =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_gyp_telegram__sources.txt (revision 511977) +++ head/net-im/telegram-desktop/files/patch-Telegram_gyp_telegram__sources.txt (revision 511978) @@ -1,29 +1,29 @@ ---- Telegram/gyp/telegram_sources.txt.orig 2019-07-07 13:34:35 UTC +--- Telegram/gyp/telegram_sources.txt.orig 2019-09-06 13:41:43 UTC +++ Telegram/gyp/telegram_sources.txt -@@ -577,8 +577,8 @@ +@@ -605,8 +605,8 @@ <(src_loc)/platform/linux/linux_libs.h <(src_loc)/platform/linux/file_utilities_linux.cpp <(src_loc)/platform/linux/file_utilities_linux.h -<(src_loc)/platform/linux/info_linux.cpp -<(src_loc)/platform/linux/info_linux.h +<(src_loc)/platform/freebsd/info_freebsd.cpp +<(src_loc)/platform/freebsd/info_freebsd.h <(src_loc)/platform/linux/launcher_linux.cpp <(src_loc)/platform/linux/launcher_linux.h <(src_loc)/platform/linux/main_window_linux.cpp -@@ -894,14 +894,7 @@ +@@ -923,14 +923,7 @@ <(emoji_suggestions_loc)/emoji_suggestions.cpp <(emoji_suggestions_loc)/emoji_suggestions.h -platforms: !win -<(minizip_loc)/crypt.h -<(minizip_loc)/ioapi.c -<(minizip_loc)/ioapi.h -<(minizip_loc)/zip.c -<(minizip_loc)/zip.h -<(minizip_loc)/unzip.c -<(minizip_loc)/unzip.h +<(src_loc)/qt_functions.cpp platforms: win <(res_loc)/winrc/Telegram.rc