Index: head/net-im/telegram-desktop/Makefile =================================================================== --- head/net-im/telegram-desktop/Makefile (revision 477795) +++ head/net-im/telegram-desktop/Makefile (revision 477796) @@ -1,104 +1,114 @@ # $FreeBSD$ PORTNAME= telegram-desktop DISTVERSIONPREFIX= v -DISTVERSION= 1.2.17 -PORTREVISION= 1 +DISTVERSION= 1.3.12 CATEGORIES= net-im MAINTAINER= henry.hu.sh@gmail.com COMMENT= Telegram Desktop messaging app LICENSE= GPLv3 LICENSE_FILE= ${WRKSRC}/LICENSE BUILD_DEPENDS= 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 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,outsource desktop-file-utils gmake pkgconfig python:2.7,build qt:5 ssl 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:9d65e74:gsl/Telegram/ThirdParty/GSL \ - telegramdesktop:libtgvoip:6e0e102:libtgvoip/Telegram/ThirdParty/libtgvoip \ - telegramdesktop:crl:344cbde9:crl/Telegram/ThirdParty/crl -USE_GNOME= glib20 gtk30 + Microsoft:GSL:d846fe5:gsl/Telegram/ThirdParty/GSL \ + telegramdesktop:libtgvoip:5380aab:libtgvoip/Telegram/ThirdParty/libtgvoip \ + telegramdesktop:crl:527ad27:crl/Telegram/ThirdParty/crl +USE_GNOME= glib20 USE_QT= core gui imageformats network widgets buildtools_build qmake_build dbus USE_XORG= x11 xcb +INSTALLS_ICONS= yes CMAKE_SOURCE_PATH= ${WRKSRC}/out/Release 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 # This port needs C++17 libs/compiler. # Currently, this is not supported by USES=compiler # Using clang does not work: libc++ in base does not support C++17. # Using gcc does not work: using both libc++ and libstdc++ causes crashes. .if ${OPSYS} == FreeBSD && ${OSVERSION} < 1100000 BROKEN= Need C++17 support in compiler and runtime .endif 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 pre-configure: @cd ${WRKSRC} && gyp \ -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` && \ ${SED} -i -e "$$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 477795) +++ head/net-im/telegram-desktop/distinfo (revision 477796) @@ -1,13 +1,13 @@ -TIMESTAMP = 1523832839 -SHA256 (telegramdesktop-tdesktop-v1.2.17_GH0.tar.gz) = 775614e70372b2e18ef1b2940fa043599240975597e4c5e4431c6deb041a613d -SIZE (telegramdesktop-tdesktop-v1.2.17_GH0.tar.gz) = 16916625 +TIMESTAMP = 1533439370 +SHA256 (telegramdesktop-tdesktop-v1.3.12_GH0.tar.gz) = 4d19fdc85f0c792c6c073062dacf707fc976581a8d249fa91757015cceb7662b +SIZE (telegramdesktop-tdesktop-v1.3.12_GH0.tar.gz) = 17180353 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-9d65e74_GH0.tar.gz) = c2270ade74bd74831e2e854970c04db77f00e0dfdb0a3c3bce356da6019dd18d -SIZE (Microsoft-GSL-9d65e74_GH0.tar.gz) = 57320 -SHA256 (telegramdesktop-libtgvoip-6e0e102_GH0.tar.gz) = 53f2d27f8bc76d454cd933fe0d598155d091967e9cb98b095cd44f2a70137220 -SIZE (telegramdesktop-libtgvoip-6e0e102_GH0.tar.gz) = 411964 -SHA256 (telegramdesktop-crl-344cbde9_GH0.tar.gz) = ec7d04bc36ed6dda88574e317e78d332b36cbd3378c3a8218ac5a3f37ee6d90f -SIZE (telegramdesktop-crl-344cbde9_GH0.tar.gz) = 18308 +SHA256 (Microsoft-GSL-d846fe5_GH0.tar.gz) = 4c463f93ca3b1dcb0b8d73b54309c1d31145761c457f1a6fd53554a6d469b468 +SIZE (Microsoft-GSL-d846fe5_GH0.tar.gz) = 58930 +SHA256 (telegramdesktop-libtgvoip-5380aab_GH0.tar.gz) = 6b3e49835a7705406a0161162a1ffb53be6d66b17a8faaca49e6df51a34ebe23 +SIZE (telegramdesktop-libtgvoip-5380aab_GH0.tar.gz) = 810123 +SHA256 (telegramdesktop-crl-527ad27_GH0.tar.gz) = 6ab03b09ea2f501f3602acfd06d6a5d174db6a25259268978323552a69b37622 +SIZE (telegramdesktop-crl-527ad27_GH0.tar.gz) = 20081 Index: head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_window_main__window.h =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_window_main__window.h (revision 477795) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_window_main__window.h (nonexistent) @@ -1,11 +0,0 @@ ---- Telegram/SourceFiles/window/main_window.h.orig 2018-04-08 17:34:33 UTC -+++ Telegram/SourceFiles/window/main_window.h -@@ -57,7 +57,7 @@ public: - } - - void reActivateWindow() { --#if defined Q_OS_LINUX32 || defined Q_OS_LINUX64 -+#if defined Q_OS_LINUX32 || defined Q_OS_LINUX64 || defined Q_OS_FREEBSD - onReActivate(); - QTimer::singleShot(200, this, SLOT(onReActivate())); - #endif // Q_OS_LINUX32 || Q_OS_LINUX64 Property changes on: head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_window_main__window.h ___________________________________________________________________ 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_config.h =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_config.h (revision 477795) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_config.h (nonexistent) @@ -1,20 +0,0 @@ ---- Telegram/SourceFiles/config.h.orig 2018-04-08 17:34:33 UTC -+++ Telegram/SourceFiles/config.h -@@ -240,7 +240,7 @@ inline const char *cApiDeviceModel() { - return "PC"; - #elif defined Q_OS_MAC - return "Mac"; --#elif defined Q_OS_LINUX -+#elif defined Q_OS_LINUX || defined Q_OS_FREEBSD - return "PC"; - #endif - } -@@ -251,6 +251,8 @@ inline const char *cApiSystemVersion() { - return "OS X"; - #elif defined Q_OS_LINUX - return "Linux"; -+#elif defined Q_OS_FREEBSD -+ return "FreeBSD"; - #endif - } - Property changes on: head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_config.h ___________________________________________________________________ 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_ThirdParty_libtgvoip_os_linux_AudioOutputPulse.cpp =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_ThirdParty_libtgvoip_os_linux_AudioOutputPulse.cpp (revision 477795) +++ head/net-im/telegram-desktop/files/patch-Telegram_ThirdParty_libtgvoip_os_linux_AudioOutputPulse.cpp (nonexistent) @@ -1,10 +0,0 @@ ---- Telegram/ThirdParty/libtgvoip/os/linux/AudioOutputPulse.cpp.orig 2018-02-07 04:48:32 UTC -+++ Telegram/ThirdParty/libtgvoip/os/linux/AudioOutputPulse.cpp -@@ -8,6 +8,7 @@ - #include - #include - #include -+#include - #include "AudioOutputPulse.h" - #include "../../logging.h" - #include "../../VoIPController.h" Property changes on: head/net-im/telegram-desktop/files/patch-Telegram_ThirdParty_libtgvoip_os_linux_AudioOutputPulse.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_ThirdParty_libtgvoip_os_linux_AudioInputPulse.cpp =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_ThirdParty_libtgvoip_os_linux_AudioInputPulse.cpp (revision 477795) +++ head/net-im/telegram-desktop/files/patch-Telegram_ThirdParty_libtgvoip_os_linux_AudioInputPulse.cpp (nonexistent) @@ -1,10 +0,0 @@ ---- Telegram/ThirdParty/libtgvoip/os/linux/AudioInputPulse.cpp.orig 2018-02-07 04:48:22 UTC -+++ Telegram/ThirdParty/libtgvoip/os/linux/AudioInputPulse.cpp -@@ -8,6 +8,7 @@ - #include - #include - #include -+#include - #include "AudioInputPulse.h" - #include "../../logging.h" - #include "../../VoIPController.h" Property changes on: head/net-im/telegram-desktop/files/patch-Telegram_ThirdParty_libtgvoip_os_linux_AudioInputPulse.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_SourceFiles_base_lambda.h =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_base_lambda.h (revision 477795) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_base_lambda.h (nonexistent) @@ -1,73 +0,0 @@ ---- Telegram/SourceFiles/base/lambda.h.orig 2018-01-03 10:46:01 UTC -+++ Telegram/SourceFiles/base/lambda.h -@@ -226,11 +226,14 @@ protected: - - template - struct vtable_once : public vtable_once_impl, Return, Args...> { -- static const vtable_once instance; -+ static const vtable_once* get_instance(); - }; - - template --const vtable_once vtable_once::instance = {}; -+const vtable_once* vtable_once::get_instance() { -+ static vtable_once instance; -+ return &instance; -+} - - template struct vtable_impl; - -@@ -276,12 +279,14 @@ struct vtable_impl - struct vtable : public vtable_impl, Return, Args...> { -- static const vtable instance; -+ static const vtable* get_instance(); - }; - - template --const vtable vtable::instance = {}; -- -+const vtable* vtable::get_instance() { -+ static vtable instance; -+ return &instance; -+} - } // namespace lambda_internal - - template -@@ -360,7 +365,7 @@ public: - // Copy / move construct / assign from an arbitrary type. - template ()(std::declval()...)),Return>::value>> - lambda_once(Lambda other) { -- data_.vtable = &lambda_internal::vtable_once::instance; -+ data_.vtable = lambda_internal::vtable_once::get_instance(); - lambda_internal::vtable_once::construct_move_lambda_method(data_.storage, &other); - } - template ()(std::declval()...)),Return>::value>> -@@ -368,7 +373,7 @@ public: - if (data_.vtable) { - data_.vtable->destruct(data_.storage); - } -- data_.vtable = &lambda_internal::vtable_once::instance; -+ data_.vtable = lambda_internal::vtable_once::get_instance(); - lambda_internal::vtable_once::construct_move_lambda_method(data_.storage, &other); - return *this; - } -@@ -443,7 +448,7 @@ public: - - // Copy / move construct / assign from an arbitrary type. - template ()(std::declval()...)),Return>::value>> -- lambda(Lambda other) : Parent(&lambda_internal::vtable::instance, typename Parent::Private()) { -+ lambda(Lambda other) : Parent(lambda_internal::vtable::get_instance(), typename Parent::Private()) { - lambda_internal::vtable::construct_move_lambda_method(this->data_.storage, &other); - } - template ()(std::declval()...)),Return>::value>> -@@ -451,7 +456,7 @@ public: - if (this->data_.vtable) { - this->data_.vtable->destruct(this->data_.storage); - } -- this->data_.vtable = &lambda_internal::vtable::instance; -+ this->data_.vtable = lambda_internal::vtable::get_instance(); - lambda_internal::vtable::construct_move_lambda_method(this->data_.storage, &other); - return *this; - } Property changes on: head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_base_lambda.h ___________________________________________________________________ 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 477795) +++ head/net-im/telegram-desktop/files/CMakeLists.inj (revision 477796) @@ -1,14 +1,15 @@ # ------------- 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_export ../../Telegram/SourceFiles/export/export_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 477795) +++ head/net-im/telegram-desktop/files/gyp-patches (revision 477796) @@ -1,435 +1,448 @@ ---- Telegram/gyp/qt_rcc.gypi.orig 2018-01-03 10:46:01 UTC -+++ Telegram/gyp/qt_rcc.gypi +--- Telegram/gyp/codegen_rules.gypi.orig 2018-08-04 18:53:40 UTC ++++ Telegram/gyp/codegen_rules.gypi @@ -15,7 +15,7 @@ - '<(SHARED_INTERMEDIATE_DIR)/<(_target_name)/qrc/qrc_<(RULE_INPUT_ROOT).cpp', + '<(SHARED_INTERMEDIATE_DIR)/update_dependent_styles.timestamp', ], 'action': [ -- '<(qt_loc)/bin/rcc<(exe_ext)', -+ '%%QT_BINDIR%%/rcc', - '-name', '<(RULE_INPUT_ROOT)', - '-no-compress', - '<(RULE_INPUT_PATH)', ---- Telegram/gyp/qt_moc.gypi.orig 2018-01-03 10:46:01 UTC +- '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))', ], 'cflags_cc': [ -@@ -67,7 +59,6 @@ +@@ -71,7 +64,6 @@ 'ldflags': [ '-Wl,-wrap,aligned_alloc', '-Wl,-wrap,secure_getenv', - '-Wl,-wrap,clock_gettime', '-Wl,--no-as-needed,-lrt', ], 'configurations': { -@@ -86,7 +77,7 @@ +@@ -79,13 +71,16 @@ + 'cflags_c': [ + '-Ofast', + '-fno-strict-aliasing', ++ %%CFLAGS%% + ], + 'cflags_cc': [ + '-Ofast', + '-fno-strict-aliasing', ++ %%CXXFLAGS%% + ], + 'ldflags': [ + '-Ofast', ++ %%LDFLAGS%% + ], }, }, - 'conditions': [ -- [ '" /dev/null --cflags appindicator-0.1)', - ' /dev/null --cflags gtk+-2.0)', - ' /dev/null --cflags glib-2.0)', - ' /dev/null --cflags dee-1.0)', + ' /dev/null --cflags gtk+-3.0)', ], }] ], ---- Telegram/gyp/Telegram.gyp.orig 2018-01-03 10:46:01 UTC +--- Telegram/gyp/Telegram.gyp.orig 2018-08-04 18:53:40 UTC +++ Telegram/gyp/Telegram.gyp -@@ -49,7 +49,7 @@ +@@ -51,7 +51,7 @@ 'pt-BR', ], 'build_defines%': '', - 'list_sources_command': 'python <(DEPTH)/list_sources.py --input <(DEPTH)/telegram_sources.txt --replace src_loc=<(src_loc)', + 'list_sources_command': '%%PYTHON_CMD%% <(DEPTH)/list_sources.py --input <(DEPTH)/telegram_sources.txt --replace src_loc=<(src_loc)', + 'pch_source': '<(src_loc)/stdafx.cpp', + 'pch_header': '<(src_loc)/stdafx.h', }, - 'includes': [ - 'common_executable.gypi', -@@ -69,30 +69,20 @@ +@@ -74,31 +74,21 @@ 'codegen.gyp:codegen_numbers', 'codegen.gyp:codegen_style', 'tests/tests.gyp:tests', - 'utils.gyp:Updater', '../ThirdParty/libtgvoip/libtgvoip.gyp:libtgvoip', 'crl.gyp:crl', + 'lib_export.gyp:lib_export', ], 'defines': [ - 'AL_LIBTYPE_STATIC', 'AL_ALEXT_PROTOTYPES', 'TGVOIP_USE_CXX11_LIB', - ' - ../etc/qt_linux.conf Index: head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles___other_packer.cpp =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles___other_packer.cpp (revision 477795) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles___other_packer.cpp (revision 477796) @@ -1,11 +1,11 @@ ---- Telegram/SourceFiles/_other/packer.cpp.orig 2018-02-06 05:52:28 UTC +--- Telegram/SourceFiles/_other/packer.cpp.orig 2018-08-04 18:53:40 UTC +++ Telegram/SourceFiles/_other/packer.cpp @@ -233,7 +233,7 @@ int main(int argc, char *argv[]) } QByteArray inner = f.readAll(); stream << name << quint32(inner.size()) << inner; -#if defined Q_OS_MAC || defined Q_OS_LINUX +#if defined Q_OS_MAC || defined Q_OS_LINUX || defined Q_OS_FREEBSD stream << (QFileInfo(fullName).isExecutable() ? true : false); #endif } Index: head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_base_build__config.h =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_base_build__config.h (revision 477795) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_base_build__config.h (revision 477796) @@ -1,11 +1,11 @@ ---- Telegram/SourceFiles/base/build_config.h.orig 2018-02-06 05:52:11 UTC +--- Telegram/SourceFiles/base/build_config.h.orig 2018-08-04 18:53:40 UTC +++ Telegram/SourceFiles/base/build_config.h @@ -13,7 +13,7 @@ https://github.com/telegramdesktop/tdesk #if defined(__APPLE__) #define OS_MAC 1 -#elif defined(__linux__) // __APPLE__ +#elif defined(__linux__) || defined(__FreeBSD__) // __APPLE__ #define OS_LINUX 1 #elif defined(_WIN32) // __APPLE__ || __linux__ #define OS_WIN 1 Index: head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_base_bytes.h =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_base_bytes.h (nonexistent) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_base_bytes.h (revision 477796) @@ -0,0 +1,20 @@ +--- ./Telegram/SourceFiles/base/bytes.h.orig 2018-08-04 14:53:40 UTC ++++ ./Telegram/SourceFiles/base/bytes.h +@@ -114,7 +114,7 @@ template < + vector concatenate(Args &&...args) { + const auto size = details::spansLength(args...); + auto result = vector(size); +- details::spansAppend(make_span(result), args...); ++ details::spansAppend(bytes::make_span(result), args...); + return result; + } + +@@ -126,7 +126,7 @@ vector concatenate(SpanRange args) { + size += bytes::make_span(arg).size(); + } + auto result = vector(size); +- auto buffer = make_span(result); ++ auto buffer = bytes::make_span(result); + for (const auto &arg : args) { + const auto part = bytes::make_span(arg); + bytes::copy(buffer, part); Property changes on: head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_base_bytes.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_boxes_notifications__box.cpp =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_boxes_notifications__box.cpp (revision 477795) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_boxes_notifications__box.cpp (revision 477796) @@ -1,17 +1,17 @@ ---- Telegram/SourceFiles/boxes/notifications_box.cpp.orig 2018-02-06 06:26:42 UTC +--- Telegram/SourceFiles/boxes/notifications_box.cpp.orig 2018-08-04 18:53:40 UTC +++ Telegram/SourceFiles/boxes/notifications_box.cpp @@ -84,11 +84,11 @@ private: _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 || defined Q_OS_FREEBSD deleteLater(); -#endif // Q_OS_LINUX32 || Q_OS_LINUX64 +#endif // Q_OS_LINUX32 || Q_OS_LINUX64 || defined Q_OS_FREEBSD } NotificationsBox *_owner; 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 477795) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_core_launcher.cpp (revision 477796) @@ -1,47 +1,46 @@ ---- Telegram/SourceFiles/core/launcher.cpp.orig 2018-01-03 10:46:01 UTC +--- Telegram/SourceFiles/core/launcher.cpp.orig 2018-08-04 18:53:40 UTC +++ Telegram/SourceFiles/core/launcher.cpp -@@ -13,6 +13,8 @@ https://github.com/telegramdesktop/tdesk - #include "core/main_queue_processor.h" +@@ -14,6 +14,8 @@ https://github.com/telegramdesktop/tdesk + #include "core/update_checker.h" #include "application.h" +#include "FREEBSD_QT_PLUGINDIR.h" + namespace Core { std::unique_ptr Launcher::Create(int argc, char *argv[]) { -@@ -31,9 +33,10 @@ void Launcher::init() { +@@ -38,9 +40,10 @@ void Launcher::init() { QCoreApplication::setApplicationName(qsl("TelegramDesktop")); -#ifndef OS_MAC_OLD +#if !defined(Q_OS_MAC) && QT_VERSION >= QT_VERSION_CHECK(5, 6, 0) + // Retina display support is working fine, others are not. QCoreApplication::setAttribute(Qt::AA_DisableHighDpiScaling, true); -#endif // OS_MAC_OLD +#endif // not defined Q_OS_MAC and QT_VERSION >= 5.6.0 initHook(); } -@@ -51,6 +54,11 @@ int Launcher::exec() { +@@ -58,6 +61,11 @@ 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(FREEBSD_QT_PLUGINDIR); + // 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)); -@@ -136,6 +144,10 @@ void Launcher::prepareSettings() { - gUpdateURL = QUrl(qsl("http://tdesktop.com/linux32/tupdates/current")); +@@ -139,6 +147,9 @@ void Launcher::prepareSettings() { + case dbipLinux32: gPlatformString = qsl("Linux32bit"); break; + case dbipFreeBSD: -+ gUpdateURL = QUrl(qsl("")); + gPlatformString = qsl("FreeBSD"); + break; } auto path = Platform::CurrentExecutablePath(_argc, _argv); 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 (nonexistent) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_core_update__checker.cpp (revision 477796) @@ -0,0 +1,22 @@ +--- Telegram/SourceFiles/core/update_checker.cpp.orig 2018-08-04 18:53:40 UTC ++++ Telegram/SourceFiles/core/update_checker.cpp +@@ -2016,6 +2016,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()) { +@@ -2068,6 +2071,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); Property changes on: head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_core_update__checker.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_utils.h =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_core_utils.h (revision 477795) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_core_utils.h (revision 477796) @@ -1,10 +1,10 @@ ---- Telegram/SourceFiles/core/utils.h.orig 2018-04-08 17:34:33 UTC +--- Telegram/SourceFiles/core/utils.h.orig 2018-08-04 18:53:40 UTC +++ Telegram/SourceFiles/core/utils.h -@@ -451,6 +451,7 @@ enum DBIPlatform { +@@ -433,6 +433,7 @@ enum DBIPlatform { dbipLinux64 = 2, dbipLinux32 = 3, dbipMacOld = 4, + dbipFreeBSD = 5, }; enum DBIPeerReportSpamStatus { 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 477795) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_data_data__document.cpp (revision 477796) @@ -1,11 +1,11 @@ ---- Telegram/SourceFiles/data/data_document.cpp.orig 2018-04-08 17:34:33 UTC +--- Telegram/SourceFiles/data/data_document.cpp.orig 2018-08-04 18:53:40 UTC +++ Telegram/SourceFiles/data/data_document.cpp -@@ -76,7 +76,7 @@ QString FileNameUnsafe( +@@ -77,7 +77,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_export_data_export__data__types.cpp =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_export_data_export__data__types.cpp (nonexistent) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_export_data_export__data__types.cpp (revision 477796) @@ -0,0 +1,14 @@ +--- Telegram/SourceFiles/export/data/export_data_types.cpp.orig 2018-08-04 18:53:40 UTC ++++ Telegram/SourceFiles/export/data/export_data_types.cpp +@@ -344,9 +344,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, '_'); Property changes on: head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_export_data_export__data__types.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_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 477795) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_history_admin__log_history__admin__log__inner.cpp (revision 477796) @@ -1,18 +1,18 @@ ---- Telegram/SourceFiles/history/admin_log/history_admin_log_inner.cpp.orig 2018-04-08 17:34:33 UTC +--- Telegram/SourceFiles/history/admin_log/history_admin_log_inner.cpp.orig 2018-08-04 18:53:40 UTC +++ Telegram/SourceFiles/history/admin_log/history_admin_log_inner.cpp -@@ -1388,13 +1388,13 @@ void InnerWidget::mouseActionFinish(cons +@@ -1389,13 +1389,13 @@ void InnerWidget::mouseActionFinish(cons _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) { SetClipboardWithEntities( _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 477795) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_history_history__inner__widget.cpp (revision 477796) @@ -1,20 +1,20 @@ ---- Telegram/SourceFiles/history/history_inner_widget.cpp.orig 2018-04-08 17:34:33 UTC +--- Telegram/SourceFiles/history/history_inner_widget.cpp.orig 2018-08-04 18:53:40 UTC +++ Telegram/SourceFiles/history/history_inner_widget.cpp -@@ -1336,7 +1336,7 @@ void HistoryInner::mouseActionFinish( +@@ -1344,7 +1344,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()) { -@@ -1345,7 +1345,7 @@ void HistoryInner::mouseActionFinish( +@@ -1353,7 +1353,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 477795) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_history_view_history__view__list__widget.cpp (revision 477796) @@ -1,11 +1,20 @@ ---- Telegram/SourceFiles/history/view/history_view_list_widget.cpp.orig 2018-04-15 23:31:46 UTC +--- Telegram/SourceFiles/history/view/history_view_list_widget.cpp.orig 2018-08-04 18:53:40 UTC +++ Telegram/SourceFiles/history/view/history_view_list_widget.cpp -@@ -2014,7 +2014,7 @@ void ListWidget::mouseActionFinish( +@@ -2017,7 +2017,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)) { +@@ -2026,7 +2026,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_layout.cpp =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_layout.cpp (revision 477795) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_layout.cpp (revision 477796) @@ -1,22 +1,22 @@ ---- Telegram/SourceFiles/layout.cpp.orig 2018-04-08 17:34:33 UTC +--- Telegram/SourceFiles/layout.cpp.orig 2018-08-04 18:53:40 UTC +++ Telegram/SourceFiles/layout.cpp @@ -206,16 +206,16 @@ bool documentIsExecutableName(const QStr *result = qsl("\ action app bin command csh osx workflow\ ").split(' '); -#elif defined Q_OS_LINUX // Q_OS_MAC +#elif defined Q_OS_LINUX || defined Q_OS_FREEBSD // Q_OS_MAC *result = qsl("\ bin csh ksh out run\ ").split(' '); -#else // Q_OS_MAC || Q_OS_LINUX +#else // Q_OS_MAC || Q_OS_LINUX || Q_OS_FREEBSD *result = qsl("\ bat bin cmd com cpl exe gadget inf ins inx isu job jse lnk msc msi \ msp mst paf pif ps1 reg rgs sct shb shs u3p vb vbe vbs vbscript ws wsf\ ").split(' '); -#endif // !Q_OS_MAC && !Q_OS_LINUX +#endif // !Q_OS_MAC && !Q_OS_LINUX && !Q_OS_FREEBSD return result.release(); })()); Index: head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_logs.cpp =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_logs.cpp (revision 477795) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_logs.cpp (revision 477796) @@ -1,39 +1,40 @@ ---- Telegram/SourceFiles/logs.cpp.orig 2018-02-06 05:51:11 UTC +--- Telegram/SourceFiles/logs.cpp.orig 2018-08-04 18:53:40 UTC +++ Telegram/SourceFiles/logs.cpp -@@ -321,7 +321,7 @@ void start(not_null lau +@@ -333,7 +333,7 @@ void start(not_null lau if (cBetaVersion()) { - cSetDebug(true); + SetDebugEnabled(true); workingDirChosen = true; -#if defined Q_OS_MAC || defined Q_OS_LINUX +#if defined Q_OS_MAC || defined Q_OS_LINUX || defined Q_OS_FREEBSD } else { #ifdef _DEBUG cForceWorkingDir(cExeDir()); -@@ -335,15 +335,15 @@ void start(not_null lau +@@ -347,15 +347,15 @@ void start(not_null lau #endif // !_DEBUG workingDirChosen = true; -#if defined Q_OS_LINUX && !defined _DEBUG // fix first version +#if (defined Q_OS_LINUX || defined Q_OS_FREEBSD) && !defined _DEBUG // fix first version moveOldDataFrom = initialWorkingDir; - #endif // Q_OS_LINUX && !_DEBUG +-#endif // Q_OS_LINUX && !_DEBUG ++#endif // (Q_OS_LINUX || Q_OS_FREEBSD) && !_DEBUG -#elif defined Q_OS_WINRT // Q_OS_MAC || Q_OS_LINUX +#elif defined Q_OS_WINRT // Q_OS_MAC || Q_OS_LINUX || Q_OS_FREEBSD } else { cForceWorkingDir(psAppDataPath()); workingDirChosen = true; -#elif defined OS_WIN_STORE // Q_OS_MAC || Q_OS_LINUX || Q_OS_WINRT +#elif defined OS_WIN_STORE // Q_OS_MAC || Q_OS_LINUX || Q_OS_WINRT || Q_OS_FREEBSD #ifdef _DEBUG cForceWorkingDir(cExeDir()); #else // _DEBUG -@@ -357,7 +357,7 @@ void start(not_null lau +@@ -369,7 +369,7 @@ void start(not_null lau cForceWorkingDir(cWorkingDir()); workingDirChosen = true; } -#endif // Q_OS_MAC || Q_OS_LINUX || Q_OS_WINRT || OS_WIN_STORE +#endif // Q_OS_MAC || Q_OS_LINUX || Q_OS_WINRT || OS_WIN_STORE || Q_OS_FREEBSD } LogsData = new LogsDataFields(); Index: head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_platform_linux_linux__libs.cpp =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_platform_linux_linux__libs.cpp (revision 477795) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_platform_linux_linux__libs.cpp (revision 477796) @@ -1,47 +1,47 @@ ---- Telegram/SourceFiles/platform/linux/linux_libs.cpp.orig 2018-02-06 05:57:25 UTC +--- Telegram/SourceFiles/platform/linux/linux_libs.cpp.orig 2018-08-04 18:53:40 UTC +++ Telegram/SourceFiles/platform/linux/linux_libs.cpp @@ -121,6 +121,7 @@ bool setupGtkBase(QLibrary &lib_gtk) { return true; } +#ifdef HAVE_APPINDICATOR bool setupAppIndicator(QLibrary &lib_indicator) { if (!load(lib_indicator, "app_indicator_new", app_indicator_new)) return false; if (!load(lib_indicator, "app_indicator_set_status", app_indicator_set_status)) return false; @@ -130,6 +131,7 @@ bool setupAppIndicator(QLibrary &lib_ind DEBUG_LOG(("Library appindicator functions loaded!")); return true; } +#endif #endif // !TDESKTOP_DISABLE_GTK_INTEGRATION } // namespace @@ -191,10 +193,12 @@ f_g_type_check_instance_cast g_type_chec f_g_type_check_instance_is_a g_type_check_instance_is_a = nullptr; f_g_signal_connect_data g_signal_connect_data = nullptr; f_g_signal_handler_disconnect g_signal_handler_disconnect = nullptr; +#ifdef HAVE_APPINDICATOR f_app_indicator_new app_indicator_new = nullptr; f_app_indicator_set_status app_indicator_set_status = nullptr; f_app_indicator_set_menu app_indicator_set_menu = nullptr; f_app_indicator_set_icon_full app_indicator_set_icon_full = nullptr; +#endif f_gdk_init_check gdk_init_check = nullptr; f_gdk_pixbuf_new_from_data gdk_pixbuf_new_from_data = nullptr; f_gdk_pixbuf_new_from_file gdk_pixbuf_new_from_file = nullptr; @@ -234,6 +238,7 @@ void start() { bool gtkLoaded = false; bool indicatorLoaded = false; QLibrary lib_gtk, lib_indicator; +#ifdef HAVE_APPINDICATOR if (loadLibrary(lib_indicator, "appindicator3", 1)) { if (loadLibrary(lib_gtk, "gtk-3", 0)) { gtkLoaded = setupGtkBase(lib_gtk); @@ -249,6 +254,7 @@ void start() { } } } +#endif // If no appindicator, try at least load gtk. if (!gtkLoaded && !indicatorLoaded) { Index: head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_platform_linux_linux__libs.h =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_platform_linux_linux__libs.h (revision 477795) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_platform_linux_linux__libs.h (revision 477796) @@ -1,36 +1,36 @@ ---- Telegram/SourceFiles/platform/linux/linux_libs.h.orig 2018-02-06 05:56:56 UTC +--- Telegram/SourceFiles/platform/linux/linux_libs.h.orig 2018-08-04 18:53:40 UTC +++ Telegram/SourceFiles/platform/linux/linux_libs.h @@ -10,14 +10,16 @@ https://github.com/telegramdesktop/tdesk #ifndef TDESKTOP_DISABLE_GTK_INTEGRATION extern "C" { #undef signals +#ifdef HAVE_APPINDICATOR #include +#endif #include #include #define signals public } // extern "C" #ifndef TDESKTOP_DISABLE_UNITY_INTEGRATION -#include +typedef void UnityLauncherEntry; #endif // !TDESKTOP_DISABLE_UNITY_INTEGRATION #endif // !TDESKTOP_DISABLE_GTK_INTEGRATION @@ -274,6 +276,7 @@ inline gulong g_signal_connect_swapped_h typedef void (*f_g_signal_handler_disconnect)(gpointer instance, gulong handler_id); extern f_g_signal_handler_disconnect g_signal_handler_disconnect; +#ifdef HAVE_APPINDICATOR typedef AppIndicator* (*f_app_indicator_new)(const gchar *id, const gchar *icon_name, AppIndicatorCategory category); extern f_app_indicator_new app_indicator_new; @@ -285,6 +288,7 @@ extern f_app_indicator_set_menu app_indi typedef void (*f_app_indicator_set_icon_full)(AppIndicator *self, const gchar *icon_name, const gchar *icon_desc); extern f_app_indicator_set_icon_full app_indicator_set_icon_full; +#endif typedef gboolean (*f_gdk_init_check)(gint *argc, gchar ***argv); extern f_gdk_init_check gdk_init_check; 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 477795) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_platform_linux_main__window__linux.cpp (revision 477796) @@ -1,87 +1,87 @@ ---- Telegram/SourceFiles/platform/linux/main_window_linux.cpp.orig 2018-04-08 17:34:33 UTC +--- Telegram/SourceFiles/platform/linux/main_window_linux.cpp.orig 2018-08-04 18:53:40 UTC +++ Telegram/SourceFiles/platform/linux/main_window_linux.cpp @@ -25,7 +25,9 @@ bool noQtTrayIcon = false, tryAppIndicat 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; @@ -279,7 +281,9 @@ void MainWindow::workmodeUpdated(DBIWork 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); } @@ -295,7 +299,9 @@ void MainWindow::workmodeUpdated(DBIWork 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); } @@ -314,7 +320,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; } @@ -407,11 +415,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; @@ -456,6 +468,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(); @@ -486,6 +499,7 @@ void MainWindow::psCreateTrayIcon() { useAppIndicator = false; } } +#endif if (useStatusIcon) { if (Libs::gdk_init_check(0, 0)) { if (!_trayMenu) _trayMenu = Libs::gtk_menu_new(); @@ -604,10 +618,12 @@ MainWindow::~MainWindow() { Libs::g_object_unref(_trayMenu); _trayMenu = nullptr; } +#ifdef HAVE_APPINDICATOR if (_trayIndicator) { Libs::g_object_unref(_trayIndicator); _trayIndicator = nullptr; } +#endif #ifndef TDESKTOP_DISABLE_UNITY_INTEGRATION if (_psUnityLauncherEntry) { Libs::g_object_unref(_psUnityLauncherEntry); Index: head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_platform_platform__audio.h =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_platform_platform__audio.h (revision 477795) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_platform_platform__audio.h (revision 477796) @@ -1,20 +1,20 @@ ---- Telegram/SourceFiles/platform/platform_audio.h.orig 2018-02-06 05:55:32 UTC +--- Telegram/SourceFiles/platform/platform_audio.h.orig 2018-08-04 18:53:40 UTC +++ Telegram/SourceFiles/platform/platform_audio.h @@ -19,7 +19,7 @@ void DeInit(); // Platform dependent implementations. -#if defined Q_OS_MAC || defined Q_OS_LINUX +#if defined Q_OS_MAC || defined Q_OS_LINUX || defined Q_OS_FREEBSD namespace Platform { namespace Audio { @@ -31,6 +31,6 @@ inline void DeInit() { } // namespace Audio } // namespace Platform -#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 "platform/win/audio_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 Index: head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_platform_platform__file__utilities.h =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_platform_platform__file__utilities.h (revision 477795) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_platform_platform__file__utilities.h (revision 477796) @@ -1,14 +1,14 @@ ---- Telegram/SourceFiles/platform/platform_file_utilities.h.orig 2018-02-06 05:55:41 UTC +--- Telegram/SourceFiles/platform/platform_file_utilities.h.orig 2018-08-04 18:53:40 UTC +++ Telegram/SourceFiles/platform/platform_file_utilities.h -@@ -38,8 +38,8 @@ bool Get(QStringList &files, QByteArray +@@ -45,8 +45,8 @@ bool Get( #ifdef Q_OS_MAC #include "platform/mac/file_utilities_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/file_utilities_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 "platform/win/file_utilities_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 Index: head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_platform_platform__launcher.h =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_platform_platform__launcher.h (revision 477795) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_platform_platform__launcher.h (revision 477796) @@ -1,14 +1,14 @@ ---- Telegram/SourceFiles/platform/platform_launcher.h.orig 2018-02-07 00:52:41 UTC +--- Telegram/SourceFiles/platform/platform_launcher.h.orig 2018-08-04 18:53:40 UTC +++ Telegram/SourceFiles/platform/platform_launcher.h @@ -23,8 +23,8 @@ namespace Platform { #ifdef Q_OS_MAC #include "platform/mac/launcher_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/launcher_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 "platform/win/launcher_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 Index: head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_platform_platform__main__window.h =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_platform_platform__main__window.h (revision 477795) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_platform_platform__main__window.h (revision 477796) @@ -1,14 +1,14 @@ ---- Telegram/SourceFiles/platform/platform_main_window.h.orig 2018-02-06 05:55:51 UTC +--- Telegram/SourceFiles/platform/platform_main_window.h.orig 2018-08-04 18:53:40 UTC +++ Telegram/SourceFiles/platform/platform_main_window.h @@ -19,8 +19,8 @@ class MainWindow; #ifdef Q_OS_MAC #include "platform/mac/main_window_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/main_window_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/main_window_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__notifications__manager.h =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_platform_platform__notifications__manager.h (revision 477795) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_platform_platform__notifications__manager.h (revision 477796) @@ -1,14 +1,14 @@ ---- Telegram/SourceFiles/platform/platform_notifications_manager.h.orig 2018-02-06 05:55:59 UTC +--- Telegram/SourceFiles/platform/platform_notifications_manager.h.orig 2018-08-04 18:53:40 UTC +++ Telegram/SourceFiles/platform/platform_notifications_manager.h @@ -26,8 +26,8 @@ void FlashBounce(); #ifdef Q_OS_MAC #include "platform/mac/notifications_manager_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/notifications_manager_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/notifications_manager_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__specific.h =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_platform_platform__specific.h (revision 477795) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_platform_platform__specific.h (revision 477796) @@ -1,14 +1,14 @@ ---- Telegram/SourceFiles/platform/platform_specific.h.orig 2018-02-06 05:56:11 UTC +--- Telegram/SourceFiles/platform/platform_specific.h.orig 2018-08-04 18:53:40 UTC +++ Telegram/SourceFiles/platform/platform_specific.h -@@ -32,8 +32,8 @@ void finish(); +@@ -34,8 +34,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 477795) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_platform_platform__window__title.h (revision 477796) @@ -1,17 +1,17 @@ ---- Telegram/SourceFiles/platform/platform_window_title.h.orig 2018-02-06 05:56:19 UTC +--- Telegram/SourceFiles/platform/platform_window_title.h.orig 2018-08-04 18:53:40 UTC +++ Telegram/SourceFiles/platform/platform_window_title.h @@ -25,7 +25,7 @@ void PreviewWindowFramePaint(QImage &pre #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(QIma } // 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_qt__functions.cpp =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_qt__functions.cpp (revision 477795) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_qt__functions.cpp (revision 477796) @@ -1,97 +1,97 @@ ---- Telegram/SourceFiles/qt_functions.cpp.orig 2018-02-06 05:16:48 UTC +--- Telegram/SourceFiles/qt_functions.cpp.orig 2018-08-05 22:39:05 UTC +++ 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; +} Index: head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_qt__static__plugins.cpp =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_qt__static__plugins.cpp (revision 477795) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_qt__static__plugins.cpp (revision 477796) @@ -1,19 +1,19 @@ ---- Telegram/SourceFiles/qt_static_plugins.cpp.orig 2018-01-03 10:46:01 UTC +--- Telegram/SourceFiles/qt_static_plugins.cpp.orig 2018-08-04 18:53:40 UTC +++ Telegram/SourceFiles/qt_static_plugins.cpp @@ -14,14 +14,5 @@ Q_IMPORT_PLUGIN(QWindowsIntegrationPlugi Q_IMPORT_PLUGIN(QWebpPlugin) Q_IMPORT_PLUGIN(QCocoaIntegrationPlugin) Q_IMPORT_PLUGIN(QGenericEnginePlugin) -#elif defined Q_OS_LINUX // Q_OS_WIN | Q_OS_MAC -Q_IMPORT_PLUGIN(QWebpPlugin) -Q_IMPORT_PLUGIN(QXcbIntegrationPlugin) -Q_IMPORT_PLUGIN(QConnmanEnginePlugin) -Q_IMPORT_PLUGIN(QGenericEnginePlugin) -Q_IMPORT_PLUGIN(QNetworkManagerEnginePlugin) -Q_IMPORT_PLUGIN(QComposePlatformInputContextPlugin) -Q_IMPORT_PLUGIN(QIbusPlatformInputContextPlugin) -Q_IMPORT_PLUGIN(QFcitxPlatformInputContextPlugin) -Q_IMPORT_PLUGIN(QHimePlatformInputContextPlugin) -#endif // Q_OS_WIN | Q_OS_MAC | Q_OS_LINUX +#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 | Q_OS_FREEBSD Index: head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_settings.cpp =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_settings.cpp (revision 477795) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_settings.cpp (revision 477796) @@ -1,11 +1,11 @@ ---- Telegram/SourceFiles/settings.cpp.orig 2018-02-06 06:26:16 UTC +--- Telegram/SourceFiles/settings.cpp.orig 2018-08-04 18:53:40 UTC +++ Telegram/SourceFiles/settings.cpp -@@ -83,6 +83,8 @@ DBIPlatform gPlatform = dbipMac; +@@ -81,6 +81,8 @@ DBIPlatform gPlatform = dbipMac; DBIPlatform gPlatform = dbipLinux64; #elif defined Q_OS_LINUX32 DBIPlatform gPlatform = dbipLinux32; +#elif defined Q_OS_FREEBSD +DBIPlatform gPlatform = dbipFreeBSD; #else #error Unknown platform #endif Index: head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_settings_settings__notifications__widget.cpp =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_settings_settings__notifications__widget.cpp (revision 477795) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_settings_settings__notifications__widget.cpp (revision 477796) @@ -1,14 +1,14 @@ ---- Telegram/SourceFiles/settings/settings_notifications_widget.cpp.orig 2018-02-06 06:27:16 UTC +--- Telegram/SourceFiles/settings/settings_notifications_widget.cpp.orig 2018-08-04 18:53:40 UTC +++ Telegram/SourceFiles/settings/settings_notifications_widget.cpp @@ -69,9 +69,9 @@ void NotificationsWidget::createNotifica if (Platform::Notifications::Supported()) { #ifdef Q_OS_WIN nativeNotificationsLabel = lang(lng_settings_use_windows); -#elif defined Q_OS_LINUX64 || defined Q_OS_LINUX32 // Q_OS_WIN +#elif defined Q_OS_LINUX64 || defined Q_OS_LINUX32 || defined Q_OS_FREEBSD // Q_OS_WIN nativeNotificationsLabel = lang(lng_settings_use_native_notifications); -#endif // Q_OS_WIN || Q_OS_LINUX64 || Q_OS_LINUX32 +#endif // Q_OS_WIN || Q_OS_LINUX64 || Q_OS_LINUX32 || Q_OS_FREEBSD } if (!nativeNotificationsLabel.isEmpty()) { createChildRow(_nativeNotifications, margin, nativeNotificationsLabel, [this](bool) { onNativeNotifications(); }, Global::NativeNotifications()); 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 477795) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_ui_text_text.cpp (revision 477796) @@ -1,17 +1,17 @@ ---- Telegram/SourceFiles/ui/text/text.cpp.orig 2018-04-08 17:34:33 UTC +--- Telegram/SourceFiles/ui/text/text.cpp.orig 2018-08-04 18:53:40 UTC +++ Telegram/SourceFiles/ui/text/text.cpp -@@ -1748,11 +1748,11 @@ private: +@@ -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(); 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 477795) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_ui_text_text__block.cpp (revision 477796) @@ -1,12 +1,12 @@ ---- Telegram/SourceFiles/ui/text/text_block.cpp.orig 2018-04-08 17:34:33 UTC +--- Telegram/SourceFiles/ui/text/text_block.cpp.orig 2018-08-04 18:53:40 UTC +++ Telegram/SourceFiles/ui/text/text_block.cpp @@ -332,6 +332,9 @@ TextBlock::TextBlock(const style::font & 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_ui_twidget.cpp =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_ui_twidget.cpp (revision 477795) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_ui_twidget.cpp (revision 477796) @@ -1,14 +1,14 @@ ---- Telegram/SourceFiles/ui/twidget.cpp.orig 2018-01-03 10:46:01 UTC +--- Telegram/SourceFiles/ui/twidget.cpp.orig 2018-08-04 18:53:40 UTC +++ Telegram/SourceFiles/ui/twidget.cpp -@@ -235,9 +235,9 @@ void sendSynteticMouseEvent(QWidget *wid +@@ -233,9 +233,9 @@ void sendSynteticMouseEvent(QWidget *wid , 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); 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 477795) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_ui_widgets_labels.cpp (revision 477796) @@ -1,16 +1,16 @@ ---- Telegram/SourceFiles/ui/widgets/labels.cpp.orig 2018-02-06 06:28:03 UTC +--- Telegram/SourceFiles/ui/widgets/labels.cpp.orig 2018-08-04 18:53:40 UTC +++ Telegram/SourceFiles/ui/widgets/labels.cpp -@@ -359,11 +359,11 @@ Text::StateResult FlatLabel::dragActionF +@@ -364,11 +364,11 @@ Text::StateResult FlatLabel::dragActionF } } -#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()) { QApplication::clipboard()->setText(_text.originalText(_selection, _contextExpandLinksMode), 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 (nonexistent) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_window_main__window.cpp (revision 477796) @@ -0,0 +1,20 @@ +--- Telegram/SourceFiles/window/main_window.cpp.orig 2018-08-04 18:53:40 UTC ++++ Telegram/SourceFiles/window/main_window.cpp +@@ -421,7 +421,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()) { +@@ -436,7 +436,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) { Property changes on: head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_window_main__window.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_ThirdParty_libtgvoip_VoIPController.cpp =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_ThirdParty_libtgvoip_VoIPController.cpp (revision 477795) +++ head/net-im/telegram-desktop/files/patch-Telegram_ThirdParty_libtgvoip_VoIPController.cpp (revision 477796) @@ -1,11 +1,11 @@ ---- Telegram/ThirdParty/libtgvoip/VoIPController.cpp.orig 2018-02-07 04:45:28 UTC +--- Telegram/ThirdParty/libtgvoip/VoIPController.cpp.orig 2018-07-17 16:48:21 UTC +++ Telegram/ThirdParty/libtgvoip/VoIPController.cpp -@@ -1954,7 +1954,7 @@ static void initMachTimestart() { +@@ -2046,7 +2046,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_ThirdParty_libtgvoip_audio_AudioIO.cpp =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_ThirdParty_libtgvoip_audio_AudioIO.cpp (nonexistent) +++ head/net-im/telegram-desktop/files/patch-Telegram_ThirdParty_libtgvoip_audio_AudioIO.cpp (revision 477796) @@ -0,0 +1,20 @@ +--- Telegram/ThirdParty/libtgvoip/audio/AudioIO.cpp.orig 2018-07-17 16:48:21 UTC ++++ Telegram/ThirdParty/libtgvoip/audio/AudioIO.cpp +@@ -29,7 +29,7 @@ + #endif + #include "../os/windows/AudioInputWASAPI.h" + #include "../os/windows/AudioOutputWASAPI.h" +-#elif defined(__linux__) || defined(__FreeBSD_kernel__) || defined(__gnu_hurd__) ++#elif defined(__linux__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__gnu_hurd__) + #ifndef WITHOUT_ALSA + #include "../os/linux/AudioInputALSA.h" + #include "../os/linux/AudioOutputALSA.h" +@@ -62,7 +62,7 @@ shared_ptr AudioIO::Create(){ + return std::make_shared>(inputDevice, outputDevice); + #endif + return std::make_shared>(inputDevice, outputDevice); +-#elif defined(__linux__) ++#elif defined(__linux__) || defined(__FreeBSD__) + #ifndef WITHOUT_ALSA + #ifndef WITHOUT_PULSE + if(AudioPulse::Load()){ Property changes on: head/net-im/telegram-desktop/files/patch-Telegram_ThirdParty_libtgvoip_audio_AudioIO.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_ThirdParty_libtgvoip_audio_AudioInput.cpp =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_ThirdParty_libtgvoip_audio_AudioInput.cpp (revision 477795) +++ head/net-im/telegram-desktop/files/patch-Telegram_ThirdParty_libtgvoip_audio_AudioInput.cpp (revision 477796) @@ -1,29 +1,29 @@ ---- Telegram/ThirdParty/libtgvoip/audio/AudioInput.cpp.orig 2017-12-27 18:47:58 UTC +--- Telegram/ThirdParty/libtgvoip/audio/AudioInput.cpp.orig 2018-07-17 16:48:21 UTC +++ Telegram/ThirdParty/libtgvoip/audio/AudioInput.cpp -@@ -19,7 +19,7 @@ +@@ -24,7 +24,7 @@ #include "../os/windows/AudioInputWave.h" #endif #include "../os/windows/AudioInputWASAPI.h" --#elif defined(__linux__) -+#elif defined(__linux__) || defined(__FreeBSD__) +-#elif defined(__linux__) || defined(__FreeBSD_kernel__) || defined(__gnu_hurd__) ++#elif defined(__linux__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__gnu_hurd__) + #ifndef WITHOUT_ALSA #include "../os/linux/AudioInputALSA.h" - #include "../os/linux/AudioInputPulse.h" - #else -@@ -54,7 +54,7 @@ AudioInput *AudioInput::Create(std::stri + #endif +@@ -63,7 +63,7 @@ AudioInput::AudioInput(std::string devic return new AudioInputWave(deviceID); #endif return new AudioInputWASAPI(deviceID); -#elif defined(__linux__) +#elif defined(__linux__) || defined(__FreeBSD__) if(AudioInputPulse::IsAvailable()){ AudioInputPulse* aip=new AudioInputPulse(deviceID); if(!aip->IsInitialized()) -@@ -87,7 +87,7 @@ void AudioInput::EnumerateDevices(std::v +@@ -96,7 +96,7 @@ void AudioInput::EnumerateDevices(std::v } #endif AudioInputWASAPI::EnumerateDevices(devs); -#elif defined(__linux__) && !defined(__ANDROID__) +#elif (defined(__linux__) || defined(__FreeBSD__)) && !defined(__ANDROID__) - if(!AudioInputPulse::IsAvailable() || !AudioInputPulse::EnumerateDevices(devs)) + #if !defined(WITHOUT_PULSE) && !defined(WITHOUT_ALSA) + if(!AudioInputPulse::EnumerateDevices(devs)) AudioInputALSA::EnumerateDevices(devs); - #endif Index: head/net-im/telegram-desktop/files/patch-Telegram_ThirdParty_libtgvoip_audio_AudioOutput.cpp =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_ThirdParty_libtgvoip_audio_AudioOutput.cpp (revision 477795) +++ head/net-im/telegram-desktop/files/patch-Telegram_ThirdParty_libtgvoip_audio_AudioOutput.cpp (revision 477796) @@ -1,29 +1,29 @@ ---- Telegram/ThirdParty/libtgvoip/audio/AudioOutput.cpp.orig 2017-12-27 18:47:58 UTC +--- Telegram/ThirdParty/libtgvoip/audio/AudioOutput.cpp.orig 2018-07-17 16:48:21 UTC +++ Telegram/ThirdParty/libtgvoip/audio/AudioOutput.cpp -@@ -20,7 +20,7 @@ +@@ -27,7 +27,7 @@ #include "../os/windows/AudioOutputWave.h" #endif #include "../os/windows/AudioOutputWASAPI.h" --#elif defined(__linux__) -+#elif defined(__linux__) || defined(__FreeBSD__) +-#elif defined(__linux__) || defined(__FreeBSD_kernel__) || defined(__gnu_hurd__) ++#elif defined(__linux__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__gnu_hurd__) + #ifndef WITHOUT_ALSA #include "../os/linux/AudioOutputALSA.h" - #include "../os/linux/AudioOutputPulse.h" - #else -@@ -52,7 +52,7 @@ AudioOutput *AudioOutput::Create(std::st - return new AudioOutputWave(deviceID); #endif - return new AudioOutputWASAPI(deviceID); +@@ -59,7 +59,7 @@ int32_t AudioOutput::estimatedDelay=60; + return std::unique_ptr(new AudioOutputWave(deviceID)); + #endif + return std::unique_ptr(new AudioOutputWASAPI(deviceID)); -#elif defined(__linux__) +#elif defined(__linux__) || defined(__FreeBSD__) if(AudioOutputPulse::IsAvailable()){ AudioOutputPulse* aop=new AudioOutputPulse(deviceID); if(!aop->IsInitialized()) -@@ -101,7 +101,7 @@ void AudioOutput::EnumerateDevices(std:: +@@ -107,7 +107,7 @@ void AudioOutput::EnumerateDevices(std:: } #endif AudioOutputWASAPI::EnumerateDevices(devs); -#elif defined(__linux__) && !defined(__ANDROID__) +#elif (defined(__linux__) || defined(__FreeBSD__)) && !defined(__ANDROID__) - if(!AudioOutputPulse::IsAvailable() || !AudioOutputPulse::EnumerateDevices(devs)) + #if !defined(WITHOUT_PULSE) && !defined(WITHOUT_ALSA) + if(!AudioOutputPulse::EnumerateDevices(devs)) AudioOutputALSA::EnumerateDevices(devs); - #endif Index: head/net-im/telegram-desktop/files/patch-Telegram_ThirdParty_libtgvoip_logging.cpp =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_ThirdParty_libtgvoip_logging.cpp (revision 477795) +++ head/net-im/telegram-desktop/files/patch-Telegram_ThirdParty_libtgvoip_logging.cpp (revision 477796) @@ -1,20 +1,20 @@ ---- Telegram/ThirdParty/libtgvoip/logging.cpp.orig 2018-02-07 04:44:58 UTC +--- Telegram/ThirdParty/libtgvoip/logging.cpp.orig 2018-07-17 16:48:21 UTC +++ Telegram/ThirdParty/libtgvoip/logging.cpp @@ -13,7 +13,7 @@ #ifdef __ANDROID__ #include -#elif defined(__linux__) +#elif defined(__linux__) || defined(__FreeBSD__) #include #endif -@@ -51,7 +51,7 @@ void tgvoip_log_file_write_header(){ +@@ -51,7 +51,7 @@ void tgvoip_log_file_write_header(FILE* #else char* systemVersion="Windows RT"; #endif -#elif defined(__linux__) +#elif defined(__linux__) || defined(__FreeBSD__) #ifdef __ANDROID__ char systemVersion[128]; char sysRel[PROP_VALUE_MAX]; Index: head/net-im/telegram-desktop/files/patch-Telegram_ThirdParty_libtgvoip_os_linux_AudioInputALSA.cpp =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_ThirdParty_libtgvoip_os_linux_AudioInputALSA.cpp (revision 477795) +++ head/net-im/telegram-desktop/files/patch-Telegram_ThirdParty_libtgvoip_os_linux_AudioInputALSA.cpp (revision 477796) @@ -1,20 +1,20 @@ ---- Telegram/ThirdParty/libtgvoip/os/linux/AudioInputALSA.cpp.orig 2018-02-07 04:47:15 UTC +--- Telegram/ThirdParty/libtgvoip/os/linux/AudioInputALSA.cpp.orig 2018-07-17 16:48:21 UTC +++ Telegram/ThirdParty/libtgvoip/os/linux/AudioInputALSA.cpp @@ -12,6 +12,10 @@ #include "../../logging.h" #include "../../VoIPController.h" +#ifndef typeof +#define typeof __typeof__ +#endif + using namespace tgvoip::audio; #define BUFFER_SIZE 960 -@@ -177,4 +181,4 @@ void AudioInputALSA::EnumerateDevices(st +@@ -172,4 +176,4 @@ void AudioInputALSA::EnumerateDevices(st } dlclose(lib); -} \ No newline at end of file +} Index: head/net-im/telegram-desktop/files/patch-Telegram_ThirdParty_libtgvoip_os_linux_AudioOutputALSA.cpp =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_ThirdParty_libtgvoip_os_linux_AudioOutputALSA.cpp (revision 477795) +++ head/net-im/telegram-desktop/files/patch-Telegram_ThirdParty_libtgvoip_os_linux_AudioOutputALSA.cpp (revision 477796) @@ -1,20 +1,20 @@ ---- Telegram/ThirdParty/libtgvoip/os/linux/AudioOutputALSA.cpp.orig 2018-02-07 04:46:53 UTC +--- Telegram/ThirdParty/libtgvoip/os/linux/AudioOutputALSA.cpp.orig 2018-07-17 16:48:21 UTC +++ Telegram/ThirdParty/libtgvoip/os/linux/AudioOutputALSA.cpp @@ -11,6 +11,10 @@ #include "../../logging.h" #include "../../VoIPController.h" +#ifndef typeof +#define typeof __typeof__ +#endif + #define BUFFER_SIZE 960 #define CHECK_ERROR(res, msg) if(res<0){LOGE(msg ": %s", _snd_strerror(res)); failed=true; return;} #define CHECK_DL_ERROR(res, msg) if(!res){LOGE(msg ": %s", dlerror()); failed=true; return;} -@@ -180,4 +184,4 @@ void AudioOutputALSA::EnumerateDevices(s +@@ -174,4 +178,4 @@ void AudioOutputALSA::EnumerateDevices(s } dlclose(lib); -} \ No newline at end of file +} Index: head/net-im/telegram-desktop/files/patch-Telegram_ThirdParty_libtgvoip_os_linux_AudioPulse.cpp =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_ThirdParty_libtgvoip_os_linux_AudioPulse.cpp (nonexistent) +++ head/net-im/telegram-desktop/files/patch-Telegram_ThirdParty_libtgvoip_os_linux_AudioPulse.cpp (revision 477796) @@ -0,0 +1,19 @@ +--- Telegram/ThirdParty/libtgvoip/os/linux/AudioPulse.cpp.orig 2018-07-17 16:48:21 UTC ++++ Telegram/ThirdParty/libtgvoip/os/linux/AudioPulse.cpp +@@ -7,6 +7,9 @@ + #include "AudioPulse.h" + #include + #include "../../logging.h" ++#ifdef __FreeBSD__ ++#include ++#endif + + #define DECLARE_DL_FUNCTION(name) typeof(name)* AudioPulse::_import_##name=NULL + #define CHECK_DL_ERROR(res, msg) if(!res){LOGE(msg ": %s", dlerror()); return false;} +@@ -272,4 +275,4 @@ bool AudioPulse::DoOneOperation(std::fun + } + pa_mainloop_iterate(ml, 1, NULL); + } +-} +\ No newline at end of file ++} Property changes on: head/net-im/telegram-desktop/files/patch-Telegram_ThirdParty_libtgvoip_os_linux_AudioPulse.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_ThirdParty_libtgvoip_os_linux_PulseAudioLoader.h =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_ThirdParty_libtgvoip_os_linux_PulseAudioLoader.h (revision 477795) +++ head/net-im/telegram-desktop/files/patch-Telegram_ThirdParty_libtgvoip_os_linux_PulseAudioLoader.h (revision 477796) @@ -1,20 +1,20 @@ ---- Telegram/ThirdParty/libtgvoip/os/linux/PulseAudioLoader.h.orig 2018-02-07 04:46:43 UTC +--- Telegram/ThirdParty/libtgvoip/os/linux/PulseAudioLoader.h.orig 2018-07-17 16:48:21 UTC +++ Telegram/ThirdParty/libtgvoip/os/linux/PulseAudioLoader.h @@ -9,6 +9,10 @@ #include +#ifndef typeof +#define typeof __typeof__ +#endif + #define DECLARE_DL_FUNCTION(name) static typeof(name)* _import_##name namespace tgvoip{ @@ -106,4 +110,4 @@ private: #define pa_operation_get_state PulseAudioLoader::_import_pa_operation_get_state #endif -#endif // LIBTGVOIP_PULSEAUDIOLOADER_H \ No newline at end of file +#endif // LIBTGVOIP_PULSEAUDIOLOADER_H Index: head/net-im/telegram-desktop/files/patch-Telegram_ThirdParty_libtgvoip_os_posix_NetworkSocketPosix.cpp =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_ThirdParty_libtgvoip_os_posix_NetworkSocketPosix.cpp (revision 477795) +++ head/net-im/telegram-desktop/files/patch-Telegram_ThirdParty_libtgvoip_os_posix_NetworkSocketPosix.cpp (revision 477796) @@ -1,10 +1,10 @@ ---- Telegram/ThirdParty/libtgvoip/os/posix/NetworkSocketPosix.cpp.orig 2017-12-27 18:47:58 UTC +--- Telegram/ThirdParty/libtgvoip/os/posix/NetworkSocketPosix.cpp.orig 2018-07-17 16:48:21 UTC +++ Telegram/ThirdParty/libtgvoip/os/posix/NetworkSocketPosix.cpp -@@ -46,6 +46,7 @@ void NetworkSocketPosix::SetMaxPriority( +@@ -53,6 +53,7 @@ void NetworkSocketPosix::SetMaxPriority( if(res<0){ LOGE("error setting darwin-specific net priority: %d / %s", errno, strerror(errno)); } +#elif defined(__FreeBSD__) - #else + #elif defined(__linux__) int prio=5; int res=setsockopt(fd, SOL_SOCKET, SO_PRIORITY, &prio, sizeof(prio)); Index: head/net-im/telegram-desktop/files/patch-Telegram_ThirdParty_libtgvoip_threading.h =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_ThirdParty_libtgvoip_threading.h (revision 477795) +++ head/net-im/telegram-desktop/files/patch-Telegram_ThirdParty_libtgvoip_threading.h (revision 477796) @@ -1,11 +1,23 @@ ---- Telegram/ThirdParty/libtgvoip/threading.h.orig 2017-12-27 18:47:58 UTC +--- Telegram/ThirdParty/libtgvoip/threading.h.orig 2018-07-17 16:48:21 UTC +++ Telegram/ThirdParty/libtgvoip/threading.h -@@ -20,7 +20,7 @@ typedef pthread_cond_t tgvoip_lock_t; - #define start_thread(ref, entry, arg) pthread_create(&ref, NULL, entry, arg) - #define join_thread(thread) pthread_join(thread, NULL) - #ifndef __APPLE__ --#define set_thread_name(thread, name) pthread_setname_np(thread, name) -+#define set_thread_name(thread, name) - #else - #define set_thread_name(thread, name) +@@ -42,6 +42,9 @@ namespace tgvoip{ + #ifdef __APPLE__ + #include "os/darwin/DarwinSpecific.h" #endif ++#ifdef __FreeBSD__ ++#include ++#endif + + namespace tgvoip{ + class Mutex{ +@@ -112,7 +115,9 @@ namespace tgvoip{ + static void* ActualEntryPoint(void* arg){ + Thread* self=reinterpret_cast(arg); + if(self->name){ +-#if !defined(__APPLE__) && !defined(__gnu_hurd__) ++#if defined(__FreeBSD__) ++ pthread_set_name_np(self->thread, self->name); ++#elif !defined(__APPLE__) && !defined(__gnu_hurd__) + pthread_setname_np(self->thread, self->name); + #elif !defined(__gnu_hurd__) + pthread_setname_np(self->name); Index: head/net-im/telegram-desktop/files/patch-Telegram_ThirdParty_libtgvoip_webrtc__dsp_webrtc_base_stringutils.h =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_ThirdParty_libtgvoip_webrtc__dsp_webrtc_base_stringutils.h (revision 477795) +++ head/net-im/telegram-desktop/files/patch-Telegram_ThirdParty_libtgvoip_webrtc__dsp_webrtc_base_stringutils.h (revision 477796) @@ -1,11 +1,11 @@ ---- Telegram/ThirdParty/libtgvoip/webrtc_dsp/webrtc/base/stringutils.h.orig 2017-12-27 18:47:58 UTC +--- Telegram/ThirdParty/libtgvoip/webrtc_dsp/webrtc/base/stringutils.h.orig 2018-07-17 16:48:21 UTC +++ Telegram/ThirdParty/libtgvoip/webrtc_dsp/webrtc/base/stringutils.h @@ -23,7 +23,7 @@ #endif // WEBRTC_WIN #if defined(WEBRTC_POSIX) -#ifdef BSD +#if defined BSD || defined __FreeBSD__ #include #else // BSD #include Index: head/net-im/telegram-desktop/files/patch-Telegram_gyp_PrecompiledHeader.cmake =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_gyp_PrecompiledHeader.cmake (revision 477795) +++ head/net-im/telegram-desktop/files/patch-Telegram_gyp_PrecompiledHeader.cmake (revision 477796) @@ -1,36 +1,36 @@ ---- Telegram/gyp/PrecompiledHeader.cmake.orig 2018-01-03 10:46:01 UTC +--- Telegram/gyp/PrecompiledHeader.cmake.orig 2018-08-04 18:53:40 UTC +++ Telegram/gyp/PrecompiledHeader.cmake -@@ -79,7 +79,7 @@ function(export_all_flags _filename _sou +@@ -81,7 +81,7 @@ function(export_all_flags _filename _sou endfunction() function(add_precompiled_header _target _input) - if(CMAKE_COMPILER_IS_GNUCXX) + if(CMAKE_COMPILER_IS_GNUCXX OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang")) get_filename_component(_name ${_input} NAME) set(_pch_header "${CMAKE_CURRENT_SOURCE_DIR}/${_input}") set(_pch_binary_dir "${CMAKE_CURRENT_BINARY_DIR}/${_target}_pch") -@@ -112,7 +112,7 @@ function(add_precompiled_header _target +@@ -114,7 +114,7 @@ function(add_precompiled_header _target 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}" "$(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)") -@@ -123,7 +123,7 @@ function(add_precompiled_header _target +@@ -125,7 +125,7 @@ function(add_precompiled_header _target 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}" "$(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 ${_name} for ${_target} (C++)") -@@ -161,5 +161,5 @@ function(add_precompiled_header _target + COMMENT "Precompiling header ${_name} for ${_target} (C++)") +@@ -163,5 +163,5 @@ function(add_precompiled_header _target OBJECT_DEPENDS "${_object_depends}") endif() endforeach() - endif(CMAKE_COMPILER_IS_GNUCXX) + endif(CMAKE_COMPILER_IS_GNUCXX OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang")) endfunction() Index: head/net-im/telegram-desktop/files/patch-Telegram_gyp_common.gypi =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_gyp_common.gypi (revision 477795) +++ head/net-im/telegram-desktop/files/patch-Telegram_gyp_common.gypi (revision 477796) @@ -1,11 +1,11 @@ ---- Telegram/gyp/common.gypi.orig 2018-02-06 06:29:27 UTC +--- 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, 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 477795) +++ head/net-im/telegram-desktop/files/patch-Telegram_gyp_settings__linux.gypi (revision 477796) @@ -1,27 +1,37 @@ ---- Telegram/gyp/settings_linux.gypi.orig 2018-01-03 10:46:01 UTC +--- Telegram/gyp/settings_linux.gypi.orig 2018-08-04 18:53:40 UTC +++ Telegram/gyp/settings_linux.gypi @@ -11,7 +11,6 @@ 'linux_common_flags': [ '-pipe', '-Wall', - '-Werror', '-W', '-fPIC', '-Wno-unused-variable', @@ -25,7 +24,7 @@ ], }, 'conditions': [ - [ '"