Index: head/net-im/telegram-desktop/Makefile =================================================================== --- head/net-im/telegram-desktop/Makefile (revision 514726) +++ head/net-im/telegram-desktop/Makefile (revision 514727) @@ -1,122 +1,122 @@ # $FreeBSD$ PORTNAME= telegram-desktop DISTVERSIONPREFIX= v -DISTVERSION= 1.8.9 +DISTVERSION= 1.8.15 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= Only little endian is supported BUILD_DEPENDS= alsa-lib>0:audio/alsa-lib \ dee>0:devel/dee \ gyp:devel/py-gyp@${PY_FLAVOR} \ pulseaudio>0:audio/pulseaudio \ 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= 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:d4a0f71:libtgvoip/Telegram/ThirdParty/libtgvoip \ telegramdesktop:crl:52baf11:crl/Telegram/ThirdParty/crl \ Cyan4973:xxHash:7cc9639:xxhash/Telegram/ThirdParty/xxHash \ john-preston:rlottie:589db02:rlottie/Telegram/ThirdParty/rlottie \ lz4:lz4:9a2a9f2:lz4/Telegram/ThirdParty/lz4 USE_GNOME= glib20 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 # 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= ALSA PULSEAUDIO 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 514726) +++ head/net-im/telegram-desktop/distinfo (revision 514727) @@ -1,19 +1,19 @@ -TIMESTAMP = 1569722754 -SHA256 (telegramdesktop-tdesktop-v1.8.9_GH0.tar.gz) = 2df035cc4a582660b612656c22ff10d37eb34dbece958f9c99f6a0bd4e2fb61b -SIZE (telegramdesktop-tdesktop-v1.8.9_GH0.tar.gz) = 14407939 +TIMESTAMP = 1571274501 +SHA256 (telegramdesktop-tdesktop-v1.8.15_GH0.tar.gz) = 68bb6c3d007fe21847286815f22c2532a7cf9c247dc2781d749ebeb40f02ed99 +SIZE (telegramdesktop-tdesktop-v1.8.15_GH0.tar.gz) = 14416530 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-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-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-Telegram_gyp_settings__linux.gypi =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_gyp_settings__linux.gypi (revision 514726) +++ head/net-im/telegram-desktop/files/patch-Telegram_gyp_settings__linux.gypi (nonexistent) @@ -1,37 +0,0 @@ ---- Telegram/gyp/settings_linux.gypi.orig 2019-07-07 13:34:35 UTC -+++ Telegram/gyp/settings_linux.gypi -@@ -11,7 +11,6 @@ - 'linux_common_flags': [ - '-pipe', - '-Wall', -- '-Werror', - '-W', - '-fPIC', - '-Wno-unused-variable', -@@ -28,7 +27,7 @@ - ], - }, - 'conditions': [ -- [ '"= QT_VERSION_CHECK(5, 6, 0) - , Qt::MouseEventSynthesizedByApplication --#endif // OS_MAC_OLD -+#endif - ); - ev.setTimestamp(crl::now()); - QGuiApplication::sendEvent(windowHandle, &ev); Property changes on: head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_ui_twidget.cpp ___________________________________________________________________ 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/patch-Telegram_Resources_qrc_telegram__linux.qrc =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_Resources_qrc_telegram__linux.qrc (revision 514726) +++ head/net-im/telegram-desktop/files/patch-Telegram_Resources_qrc_telegram__linux.qrc (nonexistent) @@ -1,9 +0,0 @@ ---- Telegram/Resources/qrc/telegram_linux.qrc.orig 2018-12-24 08:16:05 UTC -+++ Telegram/Resources/qrc/telegram_linux.qrc -@@ -1,6 +1,5 @@ - - -- ../etc/qt_linux.conf - - - ../fc-custom.conf Property changes on: head/net-im/telegram-desktop/files/patch-Telegram_Resources_qrc_telegram__linux.qrc ___________________________________________________________________ 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/patch-Telegram_SourceFiles_ui_text_text__block.cpp =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_ui_text_text__block.cpp (revision 514726) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_ui_text_text__block.cpp (nonexistent) @@ -1,12 +0,0 @@ ---- Telegram/SourceFiles/ui/text/text_block.cpp.orig 2019-09-06 13:41:43 UTC -+++ Telegram/SourceFiles/ui/text/text_block.cpp -@@ -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"); - } Property changes on: head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_ui_text_text__block.cpp ___________________________________________________________________ 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/patch-Telegram_gyp_common.gypi =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_gyp_common.gypi (revision 514726) +++ head/net-im/telegram-desktop/files/patch-Telegram_gyp_common.gypi (nonexistent) @@ -1,11 +0,0 @@ ---- Telegram/gyp/common.gypi.orig 2018-08-04 18:53:40 UTC -+++ Telegram/gyp/common.gypi -@@ -29,7 +29,7 @@ - }, { - 'build_mac': 0, - }], -- [ 'build_os == "linux"', { -+ [ 'build_os == "freebsd"', { - 'build_linux': 1, - }, { - 'build_linux': 0, Property changes on: head/net-im/telegram-desktop/files/patch-Telegram_gyp_common.gypi ___________________________________________________________________ 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/patch-Telegram_gyp_telegram__sources.txt =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_gyp_telegram__sources.txt (revision 514726) +++ head/net-im/telegram-desktop/files/patch-Telegram_gyp_telegram__sources.txt (nonexistent) @@ -1,29 +0,0 @@ ---- Telegram/gyp/telegram_sources.txt.orig 2019-09-27 17:04:25 UTC -+++ Telegram/gyp/telegram_sources.txt -@@ -607,8 +607,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 -@@ -931,14 +931,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 Property changes on: head/net-im/telegram-desktop/files/patch-Telegram_gyp_telegram__sources.txt ___________________________________________________________________ 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 514726) +++ head/net-im/telegram-desktop/files/CMakeLists.inj (revision 514727) @@ -1,18 +1,19 @@ # ------------- 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) +add_precompiled_header(lib_ui ../../Telegram/SourceFiles/ui/ui_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 514726) +++ head/net-im/telegram-desktop/files/gyp-patches (revision 514727) @@ -1,454 +1,558 @@ ---- 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 @@ +--- Telegram/gyp/codegen/rules.gypi.orig 2019-10-07 15:58:21 UTC ++++ Telegram/gyp/codegen/rules.gypi +@@ -10,13 +10,13 @@ 'inputs': [ '<(DEPTH)/update_dependent.py', '<@(qrc_files)', - ' /dev/null --libs <@(pkgconfig_libs))', -+ 'lzma', -+ 'openal', -+ 'avformat', -+ 'avcodec', -+ 'swresample', -+ 'swscale', -+ 'avutil', -+ 'minizip', -+ 'opus', -+ 'z', +- '-lbreakpad_client', +- '-lcomposeplatforminputcontextplugin', +- '-libusplatforminputcontextplugin', +- '-lfcitxplatforminputcontextplugin', +- '-lhimeplatforminputcontextplugin', +- '-lnimfplatforminputcontextplugin', + '-llzma', + '-lopenal', + '-lavformat', +@@ -34,12 +28,8 @@ + '-lswscale', + '-lavutil', + '-lopus', +- '-lva-x11', +- '-lva-drm', +- '-lva', +- '-lvdpau', +- '-ldrm', + '-lz', ++ '-lminizip', + # ' /dev/null --libs <@(pkgconfig_libs))', ], 'cflags_cc': [ - '-Wno-strict-overflow', -@@ -72,7 +63,6 @@ +@@ -49,22 +39,23 @@ 'ldflags': [ '-Wl,-wrap,aligned_alloc', '-Wl,-wrap,secure_getenv', - '-Wl,-wrap,clock_gettime', '-Wl,--no-as-needed,-lrt', +- '-Wl,-Bstatic', ], 'configurations': { -@@ -80,13 +70,16 @@ + 'Release': { 'cflags_c': [ '-Ofast', '-fno-strict-aliasing', + %%CFLAGS%% ], 'cflags_cc': [ '-Ofast', '-fno-strict-aliasing', + %%CXXFLAGS%% ], 'ldflags': [ '-Ofast', + %%LDFLAGS%% ], }, }, -@@ -97,9 +90,7 @@ +@@ -75,9 +66,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)', ], }], [' + +- ../etc/qt_linux.conf + + + ../fc-custom.conf Property changes on: head/net-im/telegram-desktop/files/patch-Telegram_Resources_qrc_linux.qrc ___________________________________________________________________ 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_chat__helpers_stickers__emoji__pack.cpp =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_chat__helpers_stickers__emoji__pack.cpp (revision 514726) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_chat__helpers_stickers__emoji__pack.cpp (revision 514727) @@ -1,11 +1,11 @@ ---- Telegram/SourceFiles/chat_helpers/stickers_emoji_pack.cpp.orig 2019-09-27 17:04:25 UTC +--- Telegram/SourceFiles/chat_helpers/stickers_emoji_pack.cpp.orig 2019-10-07 15:58:21 UTC +++ Telegram/SourceFiles/chat_helpers/stickers_emoji_pack.cpp -@@ -105,7 +105,7 @@ constexpr auto kClearSourceTimeout = 10 * crl::time(10 +@@ -107,7 +107,7 @@ constexpr auto kClearSourceTimeout = 10 * crl::time(10 }, 5, }; - static const auto list = std::array{ + static const auto list = std::array{ &color1, &color2, &color3, 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 514726) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_core_launcher.cpp (revision 514727) @@ -1,40 +1,40 @@ ---- Telegram/SourceFiles/core/launcher.cpp.orig 2019-09-06 13:41:43 UTC +--- Telegram/SourceFiles/core/launcher.cpp.orig 2019-10-07 15:58:21 UTC +++ Telegram/SourceFiles/core/launcher.cpp -@@ -16,6 +16,8 @@ https://github.com/telegramdesktop/tdesktop/blob/maste - #include "core/sandbox.h" +@@ -17,6 +17,8 @@ https://github.com/telegramdesktop/tdesktop/blob/maste #include "base/concurrent_timer.h" + #include "facades.h" +#include "FREEBSD_QT_PLUGINDIR.h" + namespace Core { namespace { -@@ -248,12 +250,13 @@ void Launcher::init() { +@@ -249,12 +251,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(); } -@@ -270,6 +273,11 @@ int Launcher::exec() { +@@ -271,6 +274,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 514726) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_core_update__checker.cpp (revision 514727) @@ -1,22 +1,22 @@ ---- Telegram/SourceFiles/core/update_checker.cpp.orig 2019-09-27 17:04:25 UTC +--- Telegram/SourceFiles/core/update_checker.cpp.orig 2019-10-07 15:58:21 UTC +++ Telegram/SourceFiles/core/update_checker.cpp -@@ -1458,6 +1458,9 @@ int UpdateChecker::size() const { +@@ -1459,6 +1459,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()) { -@@ -1510,6 +1513,9 @@ bool checkReadyUpdate() { +@@ -1511,6 +1514,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_data_data__document.cpp =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_data_data__document.cpp (revision 514726) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_data_data__document.cpp (revision 514727) @@ -1,11 +1,11 @@ ---- Telegram/SourceFiles/data/data_document.cpp.orig 2019-07-07 13:34:35 UTC +--- Telegram/SourceFiles/data/data_document.cpp.orig 2019-10-07 15:58:21 UTC +++ Telegram/SourceFiles/data/data_document.cpp -@@ -138,7 +138,7 @@ QString FileNameUnsafe( +@@ -140,7 +140,7 @@ QString FileNameUnsafe( name = name.replace(QRegularExpression(qsl("[\\\\\\/\\:\\*\\?\\\"\\<\\>\\|]")), qsl("_")); #elif defined Q_OS_MAC name = name.replace(QRegularExpression(qsl("[\\:]")), qsl("_")); -#elif defined Q_OS_LINUX +#elif defined Q_OS_LINUX || defined Q_OS_FREEBSD name = name.replace(QRegularExpression(qsl("[\\/]")), qsl("_")); #endif if (Global::AskDownloadPath() || savingAs) { 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 514726) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_history_admin__log_history__admin__log__inner.cpp (revision 514727) @@ -1,18 +1,18 @@ ---- Telegram/SourceFiles/history/admin_log/history_admin_log_inner.cpp.orig 2019-09-27 17:04:25 UTC +--- Telegram/SourceFiles/history/admin_log/history_admin_log_inner.cpp.orig 2019-10-07 15:58:21 UTC +++ Telegram/SourceFiles/history/admin_log/history_admin_log_inner.cpp -@@ -1428,13 +1428,13 @@ void InnerWidget::mouseActionFinish(const QPoint &scre +@@ -1438,13 +1438,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( + TextUtilities::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 514726) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_history_history__inner__widget.cpp (revision 514727) @@ -1,20 +1,20 @@ ---- Telegram/SourceFiles/history/history_inner_widget.cpp.orig 2019-09-27 17:04:25 UTC +--- Telegram/SourceFiles/history/history_inner_widget.cpp.orig 2019-10-07 15:58:21 UTC +++ Telegram/SourceFiles/history/history_inner_widget.cpp -@@ -1394,7 +1394,7 @@ void HistoryInner::mouseActionFinish( +@@ -1401,7 +1401,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()) { -@@ -1403,7 +1403,7 @@ void HistoryInner::mouseActionFinish( +@@ -1410,7 +1410,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 514726) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_history_view_history__view__list__widget.cpp (revision 514727) @@ -1,20 +1,20 @@ ---- Telegram/SourceFiles/history/view/history_view_list_widget.cpp.orig 2019-09-27 17:04:25 UTC +--- Telegram/SourceFiles/history/view/history_view_list_widget.cpp.orig 2019-10-07 15:58:21 UTC +++ Telegram/SourceFiles/history/view/history_view_list_widget.cpp -@@ -2053,7 +2053,7 @@ void ListWidget::mouseActionFinish( +@@ -2061,7 +2061,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)) { -@@ -2062,7 +2062,7 @@ void ListWidget::mouseActionFinish( +@@ -2070,7 +2070,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 514726) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_platform_linux_main__window__linux.cpp (revision 514727) @@ -1,87 +1,87 @@ ---- Telegram/SourceFiles/platform/linux/main_window_linux.cpp.orig 2019-09-27 17:04:25 UTC +--- Telegram/SourceFiles/platform/linux/main_window_linux.cpp.orig 2019-10-07 15:58:21 UTC +++ Telegram/SourceFiles/platform/linux/main_window_linux.cpp -@@ -28,7 +28,9 @@ bool noQtTrayIcon = false, tryAppIndicator = false; +@@ -30,7 +30,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; -@@ -294,7 +296,9 @@ void MainWindow::workmodeUpdated(DBIWorkMode mode) { +@@ -296,7 +298,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); } -@@ -310,7 +314,9 @@ void MainWindow::workmodeUpdated(DBIWorkMode mode) { +@@ -312,7 +316,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); } -@@ -329,7 +335,9 @@ void MainWindow::psUpdateIndicator() { +@@ -331,7 +337,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; } -@@ -426,11 +434,15 @@ void MainWindow::LibsLoaded() { +@@ -428,11 +436,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; -@@ -466,6 +478,7 @@ void MainWindow::psCreateTrayIcon() { +@@ -468,6 +480,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(); -@@ -496,6 +509,7 @@ void MainWindow::psCreateTrayIcon() { +@@ -498,6 +511,7 @@ void MainWindow::psCreateTrayIcon() { useAppIndicator = false; } } +#endif if (useStatusIcon) { if (Libs::gdk_init_check(0, 0)) { if (!_trayMenu) _trayMenu = Libs::gtk_menu_new(); -@@ -630,10 +644,12 @@ MainWindow::~MainWindow() { +@@ -632,10 +646,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_platform_platform__specific.h =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_platform_platform__specific.h (revision 514726) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_platform_platform__specific.h (revision 514727) @@ -1,14 +1,14 @@ ---- Telegram/SourceFiles/platform/platform_specific.h.orig 2019-04-13 06:46:58 UTC +--- Telegram/SourceFiles/platform/platform_specific.h.orig 2019-10-07 15:58:21 UTC +++ Telegram/SourceFiles/platform/platform_specific.h -@@ -58,8 +58,8 @@ void finish(); +@@ -51,8 +51,8 @@ void finish(); #ifdef Q_OS_MAC #include "platform/mac/specific_mac.h" -#elif defined Q_OS_LINUX // Q_OS_MAC +#elif defined Q_OS_LINUX || defined Q_OS_FREEBSD // Q_OS_MAC #include "platform/linux/specific_linux.h" -#elif defined Q_OS_WIN // Q_OS_MAC || Q_OS_LINUX +#elif defined Q_OS_WIN // Q_OS_MAC || Q_OS_LINUX || Q_OS_FREEBSD #include "platform/win/specific_win.h" -#endif // Q_OS_MAC || Q_OS_LINUX || Q_OS_WIN +#endif // Q_OS_MAC || Q_OS_LINUX || Q_OS_WIN || Q_OS_FREEBSD Index: head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_platform_platform__window__title.h =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_platform_platform__window__title.h (revision 514726) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_platform_platform__window__title.h (revision 514727) @@ -1,17 +1,17 @@ ---- Telegram/SourceFiles/platform/platform_window_title.h.orig 2019-02-01 12:51:46 UTC +--- Telegram/SourceFiles/platform/platform_window_title.h.orig 2019-10-07 15:58:21 UTC +++ Telegram/SourceFiles/platform/platform_window_title.h -@@ -25,7 +25,7 @@ void PreviewWindowFramePaint(QImage &preview, const st +@@ -26,7 +26,7 @@ void PreviewWindowFramePaint(QImage &preview, const st #include "platform/mac/window_title_mac.h" #elif defined Q_OS_WIN // Q_OS_MAC #include "platform/win/window_title_win.h" -#elif defined Q_OS_WINRT || defined Q_OS_LINUX // Q_OS_MAC || Q_OS_WIN +#elif defined Q_OS_WINRT || defined Q_OS_LINUX || defined Q_OS_FREEBSD // Q_OS_MAC || Q_OS_WIN namespace Platform { -@@ -43,4 +43,4 @@ inline void PreviewWindowFramePaint(QImage &preview, c +@@ -44,4 +44,4 @@ inline void PreviewWindowFramePaint(QImage &preview, c } // namespace Platform -#endif // Q_OS_MAC || Q_OS_WIN || Q_OS_WINRT || Q_OS_LINUX +#endif // Q_OS_MAC || Q_OS_WIN || Q_OS_WINRT || Q_OS_LINUX || Q_OS_FREEBSD 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 514726) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_settings_settings__notifications.cpp (revision 514727) @@ -1,17 +1,17 @@ ---- Telegram/SourceFiles/settings/settings_notifications.cpp.orig 2019-09-06 13:41:43 UTC +--- Telegram/SourceFiles/settings/settings_notifications.cpp.orig 2019-10-07 15:58:21 UTC +++ Telegram/SourceFiles/settings/settings_notifications.cpp -@@ -494,11 +494,11 @@ void NotificationsCount::SampleWidget::destroyDelayed( +@@ -496,11 +496,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( Index: head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_ui_platform_ui__platform__utility.h =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_ui_platform_ui__platform__utility.h (nonexistent) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_ui_platform_ui__platform__utility.h (revision 514727) @@ -0,0 +1,14 @@ +--- Telegram/SourceFiles/ui/platform/ui_platform_utility.h.orig 2019-10-07 15:58:21 UTC ++++ Telegram/SourceFiles/ui/platform/ui_platform_utility.h +@@ -37,8 +37,8 @@ void DrainMainQueue(); // Needed only if UseMainQueueG + + #ifdef Q_OS_MAC + #include "ui/platform/mac/ui_platform_utility_mac.h" +-#elif defined Q_OS_LINUX // Q_OS_MAC ++#elif defined Q_OS_LINUX || defined Q_OS_FREEBSD // Q_OS_MAC + #include "ui/platform/linux/ui_platform_utility_linux.h" +-#elif defined Q_OS_WINRT || defined Q_OS_WIN // Q_OS_MAC || Q_OS_LINUX ++#elif defined Q_OS_WINRT || defined Q_OS_WIN // Q_OS_MAC || Q_OS_LINUX || Q_OS_FREEBSD + #include "ui/platform/win/ui_platform_utility_win.h" +-#endif // Q_OS_MAC || Q_OS_LINUX || Q_OS_WINRT || Q_OS_WIN ++#endif // Q_OS_MAC || Q_OS_LINUX || Q_OS_WINRT || Q_OS_WIN || Q_OS_FREEBSD Property changes on: head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_ui_platform_ui__platform__utility.h ___________________________________________________________________ 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_ui_text_text.cpp =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_ui_text_text.cpp (revision 514726) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_ui_text_text.cpp (revision 514727) @@ -1,17 +1,17 @@ ---- Telegram/SourceFiles/ui/text/text.cpp.orig 2019-09-06 13:41:43 UTC +--- Telegram/SourceFiles/ui/text/text.cpp.orig 2019-10-07 15:58:21 UTC +++ Telegram/SourceFiles/ui/text/text.cpp -@@ -2018,11 +2018,11 @@ class Renderer { (private) +@@ -1972,11 +1972,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_widgets_labels.cpp =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_ui_widgets_labels.cpp (revision 514726) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_ui_widgets_labels.cpp (revision 514727) @@ -1,16 +1,18 @@ ---- Telegram/SourceFiles/ui/widgets/labels.cpp.orig 2019-09-27 17:04:25 UTC +--- Telegram/SourceFiles/ui/widgets/labels.cpp.orig 2019-10-07 15:58:21 UTC +++ Telegram/SourceFiles/ui/widgets/labels.cpp -@@ -396,11 +396,11 @@ Ui::Text::StateResult FlatLabel::dragActionFinish(cons +@@ -400,13 +400,13 @@ Text::StateResult FlatLabel::dragActionFinish(const QP } } -#if defined Q_OS_LINUX32 || defined Q_OS_LINUX64 +#if defined Q_OS_LINUX32 || defined Q_OS_LINUX64 || defined Q_OS_FREEBSD if (!_selection.empty()) { - SetClipboardText(_text.toTextForMimeData(_selection), QClipboard::Selection); + TextUtilities::SetClipboardText( + _text.toTextForMimeData(_selection), + QClipboard::Selection); } -#endif // Q_OS_LINUX32 || Q_OS_LINUX64 +#endif // Q_OS_LINUX32 || Q_OS_LINUX64 || Q_OS_FREEBSD return state; } 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 514726) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_window_main__window.cpp (revision 514727) @@ -1,20 +1,20 @@ ---- Telegram/SourceFiles/window/main_window.cpp.orig 2019-09-27 17:04:25 UTC +--- Telegram/SourceFiles/window/main_window.cpp.orig 2019-10-07 15:58:21 UTC +++ Telegram/SourceFiles/window/main_window.cpp -@@ -571,7 +571,7 @@ bool MainWindow::minimizeToTray() { +@@ -573,7 +573,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()) { -@@ -586,7 +586,7 @@ void MainWindow::reActivateWindow() { +@@ -588,7 +588,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_gyp_common_common.gypi =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_gyp_common_common.gypi (nonexistent) +++ head/net-im/telegram-desktop/files/patch-Telegram_gyp_common_common.gypi (revision 514727) @@ -0,0 +1,11 @@ +--- Telegram/gyp/common/common.gypi.orig 2019-10-07 15:58:21 UTC ++++ Telegram/gyp/common/common.gypi +@@ -29,7 +29,7 @@ + }, { + 'build_mac': 0, + }], +- [ 'build_os == "linux"', { ++ [ 'build_os == "freebsd"', { + 'build_linux': 1, + }, { + 'build_linux': 0, Property changes on: head/net-im/telegram-desktop/files/patch-Telegram_gyp_common_common.gypi ___________________________________________________________________ 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_gyp_telegram_sources.txt =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_gyp_telegram_sources.txt (nonexistent) +++ head/net-im/telegram-desktop/files/patch-Telegram_gyp_telegram_sources.txt (revision 514727) @@ -0,0 +1,29 @@ +--- Telegram/gyp/telegram/sources.txt.orig 2019-10-07 15:58:21 UTC ++++ Telegram/gyp/telegram/sources.txt +@@ -610,8 +610,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 +@@ -863,14 +863,7 @@ + <(src_loc)/settings.cpp + <(src_loc)/settings.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 Property changes on: head/net-im/telegram-desktop/files/patch-Telegram_gyp_telegram_sources.txt ___________________________________________________________________ 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