Index: head/net-im/telegram-desktop/Makefile =================================================================== --- head/net-im/telegram-desktop/Makefile (revision 481592) +++ head/net-im/telegram-desktop/Makefile (revision 481593) @@ -1,122 +1,122 @@ # $FreeBSD$ PORTNAME= telegram-desktop DISTVERSIONPREFIX= v -DISTVERSION= 1.3.14 +DISTVERSION= 1.4.0 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= compiler:c++17-lang 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:d846fe5:gsl/Telegram/ThirdParty/GSL \ - telegramdesktop:libtgvoip:bfa1e6a:libtgvoip/Telegram/ThirdParty/libtgvoip \ - telegramdesktop:crl:527ad27:crl/Telegram/ThirdParty/crl + telegramdesktop:libtgvoip:9b292fd:libtgvoip/Telegram/ThirdParty/libtgvoip \ + telegramdesktop:crl:4291015:crl/Telegram/ThirdParty/crl \ + Cyan4973:xxHash:7cc9639:xxhash/Telegram/ThirdParty/xxHash 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 -IGNORE= Need C++17 support in compiler and runtime +IGNORE= need C++17 support in compiler and runtime .endif # Since 1.3.14, the clang compiler provided in 11.1 (4.0.0) gets a segmentation # fault. .if ${OPSYS} == FreeBSD && ${OSVERSION} < 1102000 CXXFLAGS+= -DGSL_USE_STD_BYTE=0 QMAKE_COMPILER= clang .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 481592) +++ head/net-im/telegram-desktop/distinfo (revision 481593) @@ -1,13 +1,15 @@ -TIMESTAMP = 1535586991 -SHA256 (telegramdesktop-tdesktop-v1.3.14_GH0.tar.gz) = 83daeded641f79bd370b5e83be88242ab57520e7754f1371a9e5c1f3d9863f2a -SIZE (telegramdesktop-tdesktop-v1.3.14_GH0.tar.gz) = 17199969 +TIMESTAMP = 1538948703 +SHA256 (telegramdesktop-tdesktop-v1.4.0_GH0.tar.gz) = e3ee54461dae5552b41b6b56f12225a4d546118b2e2d4d864442e4462da97a9b +SIZE (telegramdesktop-tdesktop-v1.4.0_GH0.tar.gz) = 17318129 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-bfa1e6a_GH0.tar.gz) = 355ab6bf2d5c2a8edcd1e6263aaec43af67d7085f4ddacfab3f3f942cff8c1b5 -SIZE (telegramdesktop-libtgvoip-bfa1e6a_GH0.tar.gz) = 796409 -SHA256 (telegramdesktop-crl-527ad27_GH0.tar.gz) = 6ab03b09ea2f501f3602acfd06d6a5d174db6a25259268978323552a69b37622 -SIZE (telegramdesktop-crl-527ad27_GH0.tar.gz) = 20081 +SHA256 (telegramdesktop-libtgvoip-9b292fd_GH0.tar.gz) = 0545b3cdadb65f74d69bf11d9fd39f1ad15f5045cd819d64e8d40ef536b22a7e +SIZE (telegramdesktop-libtgvoip-9b292fd_GH0.tar.gz) = 803095 +SHA256 (telegramdesktop-crl-4291015_GH0.tar.gz) = 25f461f0e575cfa2b55959f735115acac1f515d923a85b2a7a7a886dd6f0c395 +SIZE (telegramdesktop-crl-4291015_GH0.tar.gz) = 21322 +SHA256 (Cyan4973-xxHash-7cc9639_GH0.tar.gz) = f40801820e885f92bbe3d2434efeb39aa18eeaf878341982e8525b538468e3ed +SIZE (Cyan4973-xxHash-7cc9639_GH0.tar.gz) = 37534 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 481592) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_boxes_notifications__box.cpp (nonexistent) @@ -1,17 +0,0 @@ ---- 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; Property changes on: head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_boxes_notifications__box.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_settings_settings__notifications__widget.cpp =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_settings_settings__notifications__widget.cpp (revision 481592) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_settings_settings__notifications__widget.cpp (nonexistent) @@ -1,14 +0,0 @@ ---- 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()); Property changes on: head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_settings_settings__notifications__widget.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/CMakeLists.inj =================================================================== --- head/net-im/telegram-desktop/files/CMakeLists.inj (revision 481592) +++ head/net-im/telegram-desktop/files/CMakeLists.inj (revision 481593) @@ -1,15 +1,17 @@ # ------------- 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) # 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 481592) +++ head/net-im/telegram-desktop/files/gyp-patches (revision 481593) @@ -1,448 +1,450 @@ ---- Telegram/gyp/codegen_rules.gypi.orig 2018-08-04 18:53:40 UTC +--- Telegram/gyp/codegen_rules.gypi.orig 2018-09-28 13:08:38 UTC +++ Telegram/gyp/codegen_rules.gypi @@ -15,7 +15,7 @@ '<(SHARED_INTERMEDIATE_DIR)/update_dependent_styles.timestamp', ], 'action': [ - 'python', '<(DEPTH)/update_dependent.py', '--styles', + '%%PYTHON_CMD%%', '<(DEPTH)/update_dependent.py', '--styles', '-I', '<(res_loc)', '-I', '<(src_loc)', '-o', '<(SHARED_INTERMEDIATE_DIR)/update_dependent_styles.timestamp', '<@(style_files)', @@ -26,13 +26,13 @@ 'inputs': [ '<(DEPTH)/update_dependent.py', '<@(qrc_files)', - ' /dev/null --libs <@(pkgconfig_libs))', ], 'cflags_cc': [ @@ -71,7 +64,6 @@ 'ldflags': [ '-Wl,-wrap,aligned_alloc', '-Wl,-wrap,secure_getenv', - '-Wl,-wrap,clock_gettime', '-Wl,--no-as-needed,-lrt', ], 'configurations': { @@ -79,13 +71,16 @@ 'cflags_c': [ '-Ofast', '-fno-strict-aliasing', + %%CFLAGS%% ], 'cflags_cc': [ '-Ofast', '-fno-strict-aliasing', + %%CXXFLAGS%% ], 'ldflags': [ '-Ofast', + %%LDFLAGS%% ], }, }, @@ -96,10 +91,7 @@ ], }], ['not_need_gtk!="True"', { 'cflags_cc': [ - ' /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-08-04 18:53:40 UTC +--- Telegram/gyp/Telegram.gyp.orig 2018-09-28 13:08:38 UTC +++ Telegram/gyp/Telegram.gyp @@ -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', }, -@@ -74,31 +74,21 @@ +@@ -75,7 +75,6 @@ 'codegen.gyp:codegen_numbers', 'codegen.gyp:codegen_style', 'tests/tests.gyp:tests', - 'utils.gyp:Updater', '../ThirdParty/libtgvoip/libtgvoip.gyp:libtgvoip', 'crl.gyp:crl', - 'lib_export.gyp:lib_export', + 'lib_base.gyp:lib_base', +@@ -84,25 +83,16 @@ ], 'defines': [ - 'AL_LIBTYPE_STATIC', 'AL_ALEXT_PROTOTYPES', 'TGVOIP_USE_CXX11_LIB', + 'XXH_INLINE_ALL', - ' Launcher::Create(int argc, char *argv[]) { -@@ -38,9 +40,10 @@ void Launcher::init() { +@@ -39,9 +41,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(); } -@@ -58,6 +61,11 @@ int Launcher::exec() { +@@ -59,6 +62,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)); -@@ -139,6 +147,9 @@ void Launcher::prepareSettings() { +@@ -140,6 +148,9 @@ void Launcher::prepareSettings() { case dbipLinux32: gPlatformString = qsl("Linux32bit"); break; + case dbipFreeBSD: + gPlatformString = qsl("FreeBSD"); + break; } auto path = Platform::CurrentExecutablePath(_argc, _argv); 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 481592) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_core_utils.h (revision 481593) @@ -1,10 +1,10 @@ ---- Telegram/SourceFiles/core/utils.h.orig 2018-08-04 18:53:40 UTC +--- Telegram/SourceFiles/core/utils.h.orig 2018-09-28 13:08:38 UTC +++ Telegram/SourceFiles/core/utils.h -@@ -433,6 +433,7 @@ enum DBIPlatform { +@@ -411,6 +411,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 481592) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_data_data__document.cpp (revision 481593) @@ -1,11 +1,11 @@ ---- Telegram/SourceFiles/data/data_document.cpp.orig 2018-08-04 18:53:40 UTC +--- Telegram/SourceFiles/data/data_document.cpp.orig 2018-09-28 13:08:38 UTC +++ Telegram/SourceFiles/data/data_document.cpp -@@ -77,7 +77,7 @@ QString FileNameUnsafe( +@@ -78,7 +78,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 (revision 481592) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_export_data_export__data__types.cpp (revision 481593) @@ -1,14 +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.orig 2018-09-28 13:08:38 UTC +++ Telegram/SourceFiles/export/data/export_data_types.cpp -@@ -346,9 +346,9 @@ QString CleanDocumentName(QString name) +@@ -363,9 +363,9 @@ QString CleanDocumentName(QString name) '|', #elif defined Q_OS_MAC // Q_OS_WIN ':', -#elif defined Q_OS_LINUX // Q_OS_WIN || Q_OS_MAC +#elif defined Q_OS_LINUX || defined Q_OS_FREEBSD // Q_OS_WIN || Q_OS_MAC '/', -#endif // Q_OS_WIN || Q_OS_MAC || Q_OS_LINUX +#endif // Q_OS_WIN || Q_OS_MAC || Q_OS_LINUX || Q_OS_FREEBSD }; for (const auto ch : controls) { name = std::move(name).replace(ch, '_'); Index: head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_logs.cpp =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_logs.cpp (revision 481592) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_logs.cpp (revision 481593) @@ -1,40 +1,40 @@ ---- Telegram/SourceFiles/logs.cpp.orig 2018-08-04 18:53:40 UTC +--- Telegram/SourceFiles/logs.cpp.orig 2018-09-28 13:08:38 UTC +++ Telegram/SourceFiles/logs.cpp -@@ -333,7 +333,7 @@ void start(not_null lau - if (cBetaVersion()) { - SetDebugEnabled(true); +@@ -332,7 +332,7 @@ void start(not_null lau + + if (cAlphaVersion()) { 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()); -@@ -347,15 +347,15 @@ void start(not_null lau +@@ -346,15 +346,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 || 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 -@@ -369,7 +369,7 @@ void start(not_null lau +@@ -368,7 +368,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_old__settings_settings__notifications__widget.cpp =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_old__settings_settings__notifications__widget.cpp (nonexistent) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_old__settings_settings__notifications__widget.cpp (revision 481593) @@ -0,0 +1,14 @@ +--- Telegram/SourceFiles/old_settings/settings_notifications_widget.cpp.orig 2018-09-28 13:08:38 UTC ++++ Telegram/SourceFiles/old_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()); Property changes on: head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_old__settings_settings__notifications__widget.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_storage_storage__encrypted__file__tests.cpp =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_storage_storage__encrypted__file__tests.cpp (nonexistent) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_storage_storage__encrypted__file__tests.cpp (revision 481593) @@ -0,0 +1,11 @@ +--- Telegram/SourceFiles/storage/storage_encrypted_file_tests.cpp.orig 2018-09-28 13:08:38 UTC ++++ Telegram/SourceFiles/storage/storage_encrypted_file_tests.cpp +@@ -21,7 +21,7 @@ https://github.com/telegramdesktop/tdesk + #include + #ifdef Q_OS_MAC + #include +-#elif defined Q_OS_LINUX // Q_OS_MAC ++#elif defined Q_OS_LINUX || defined Q_OS_FREEBSD // Q_OS_MAC + #include + #endif // Q_OS_MAC || Q_OS_LINUX + Property changes on: head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_storage_storage__encrypted__file__tests.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_MediaStreamItf.cpp =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_ThirdParty_libtgvoip_MediaStreamItf.cpp (nonexistent) +++ head/net-im/telegram-desktop/files/patch-Telegram_ThirdParty_libtgvoip_MediaStreamItf.cpp (revision 481593) @@ -0,0 +1,11 @@ +--- Telegram/ThirdParty/libtgvoip/MediaStreamItf.cpp.orig 2018-09-18 16:52:01 UTC ++++ Telegram/ThirdParty/libtgvoip/MediaStreamItf.cpp +@@ -22,7 +22,7 @@ void MediaStreamItf::SetCallback(size_t + size_t MediaStreamItf::InvokeCallback(unsigned char *data, size_t length){ + if(callback) + return (*callback)(data, length, callbackParam); +- return NULL; ++ return 0; + } + + AudioMixer::AudioMixer() : bufferPool(960*2, 16), processedQueue(16), semaphore(16, 0){ Property changes on: head/net-im/telegram-desktop/files/patch-Telegram_ThirdParty_libtgvoip_MediaStreamItf.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 481592) +++ head/net-im/telegram-desktop/files/patch-Telegram_ThirdParty_libtgvoip_VoIPController.cpp (revision 481593) @@ -1,11 +1,11 @@ ---- Telegram/ThirdParty/libtgvoip/VoIPController.cpp.orig 2018-07-17 16:48:21 UTC +--- Telegram/ThirdParty/libtgvoip/VoIPController.cpp.orig 2018-09-18 16:52:01 UTC +++ Telegram/ThirdParty/libtgvoip/VoIPController.cpp -@@ -2048,7 +2048,7 @@ static void initMachTimestart() { +@@ -2056,7 +2056,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 (revision 481592) +++ head/net-im/telegram-desktop/files/patch-Telegram_ThirdParty_libtgvoip_audio_AudioIO.cpp (revision 481593) @@ -1,20 +1,20 @@ ---- Telegram/ThirdParty/libtgvoip/audio/AudioIO.cpp.orig 2018-07-17 16:48:21 UTC +--- Telegram/ThirdParty/libtgvoip/audio/AudioIO.cpp.orig 2018-09-18 16:52:01 UTC +++ Telegram/ThirdParty/libtgvoip/audio/AudioIO.cpp -@@ -29,7 +29,7 @@ +@@ -31,7 +31,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(){ +@@ -66,7 +66,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()){ 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 481592) +++ head/net-im/telegram-desktop/files/patch-Telegram_ThirdParty_libtgvoip_audio_AudioInput.cpp (revision 481593) @@ -1,20 +1,20 @@ ---- Telegram/ThirdParty/libtgvoip/audio/AudioInput.cpp.orig 2018-07-17 16:48:21 UTC +--- Telegram/ThirdParty/libtgvoip/audio/AudioInput.cpp.orig 2018-09-18 16:52:01 UTC +++ Telegram/ThirdParty/libtgvoip/audio/AudioInput.cpp -@@ -24,7 +24,7 @@ +@@ -26,7 +26,7 @@ #include "../os/windows/AudioInputWave.h" #endif #include "../os/windows/AudioInputWASAPI.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" #endif -@@ -68,7 +68,7 @@ void AudioInput::EnumerateDevices(std::v +@@ -72,7 +72,7 @@ void AudioInput::EnumerateDevices(std::v } #endif AudioInputWASAPI::EnumerateDevices(devs); -#elif defined(__linux__) && !defined(__ANDROID__) +#elif (defined(__linux__) || defined(__FreeBSD__)) && !defined(__ANDROID__) #if !defined(WITHOUT_PULSE) && !defined(WITHOUT_ALSA) if(!AudioInputPulse::EnumerateDevices(devs)) AudioInputALSA::EnumerateDevices(devs); 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 481592) +++ head/net-im/telegram-desktop/files/patch-Telegram_ThirdParty_libtgvoip_audio_AudioOutput.cpp (revision 481593) @@ -1,20 +1,20 @@ ---- Telegram/ThirdParty/libtgvoip/audio/AudioOutput.cpp.orig 2018-07-17 16:48:21 UTC +--- Telegram/ThirdParty/libtgvoip/audio/AudioOutput.cpp.orig 2018-09-18 16:52:01 UTC +++ Telegram/ThirdParty/libtgvoip/audio/AudioOutput.cpp -@@ -27,7 +27,7 @@ +@@ -29,7 +29,7 @@ #include "../os/windows/AudioOutputWave.h" #endif #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/AudioOutputALSA.h" #endif -@@ -79,7 +79,7 @@ void AudioOutput::EnumerateDevices(std:: +@@ -83,7 +83,7 @@ void AudioOutput::EnumerateDevices(std:: } #endif AudioOutputWASAPI::EnumerateDevices(devs); -#elif defined(__linux__) && !defined(__ANDROID__) +#elif (defined(__linux__) || defined(__FreeBSD__)) && !defined(__ANDROID__) #if !defined(WITHOUT_PULSE) && !defined(WITHOUT_ALSA) if(!AudioOutputPulse::EnumerateDevices(devs)) AudioOutputALSA::EnumerateDevices(devs); 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 481592) +++ head/net-im/telegram-desktop/files/patch-Telegram_gyp_telegram__sources.txt (revision 481593) @@ -1,18 +1,18 @@ ---- Telegram/gyp/telegram_sources.txt.orig 2018-08-04 18:53:40 UTC +--- Telegram/gyp/telegram_sources.txt.orig 2018-09-28 13:08:38 UTC +++ Telegram/gyp/telegram_sources.txt -@@ -801,14 +801,7 @@ +@@ -755,14 +755,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: mac - <(sp_media_key_tap_loc)/SPMediaKeyTap.m + platforms: win + <(res_loc)/winrc/Telegram.rc