net-im/telegram-desktop: Update to 1.5.4

PR:		234500
Submitted by:	Henry Hu <henry.hu.sh@gmail.com> (maintainer)
This commit is contained in:
Steve Wills 2018-12-31 20:14:21 +00:00
parent e708afc9e6
commit dec2497f55
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=488829
35 changed files with 163 additions and 191 deletions

View File

@ -2,8 +2,7 @@
PORTNAME= telegram-desktop
DISTVERSIONPREFIX= v
DISTVERSION= 1.4.2
PORTREVISION= 3
DISTVERSION= 1.5.4
CATEGORIES= net-im
MAINTAINER= henry.hu.sh@gmail.com
@ -31,7 +30,7 @@ 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:9b292fd:libtgvoip/Telegram/ThirdParty/libtgvoip \
telegramdesktop:libtgvoip:78e584c:libtgvoip/Telegram/ThirdParty/libtgvoip \
telegramdesktop:crl:4291015:crl/Telegram/ThirdParty/crl \
Cyan4973:xxHash:7cc9639:xxhash/Telegram/ThirdParty/xxHash
USE_GNOME= glib20
@ -40,6 +39,11 @@ USE_XORG= x11 xcb
CMAKE_SOURCE_PATH= ${WRKSRC}/out/Release
# Telegram asks each custom build to have its own API ID and hash.
# Use the default ones for now. We may need to switch to the official ones,
# or create our own.
TELEGRAM_API_ID= 17349
TELEGRAM_API_HASH= 344583e45741c457fe1862106095a5eb
GYP_DEFINES= TDESKTOP_DISABLE_CRASH_REPORTS,TDESKTOP_DISABLE_AUTOUPDATE,TDESKTOP_DISABLE_REGISTER_CUSTOM_SCHEME
# Telegram uses OpenAL for its audio, but libtgvoip (for voice calls) can use PulseAudio or ALSA.
@ -86,6 +90,8 @@ post-patch:
pre-configure:
@cd ${WRKSRC} && gyp \
-Dapi_id=${TELEGRAM_API_ID} \
-Dapi_hash=${TELEGRAM_API_HASH} \
-Dbuild_defines=${GYP_DEFINES} \
-Gconfig=Release \
--depth=Telegram/gyp --generator-output=../.. -Goutput_dir=out Telegram/gyp/Telegram.gyp --format=cmake

View File

@ -1,14 +1,14 @@
TIMESTAMP = 1539390512
SHA256 (telegramdesktop-tdesktop-v1.4.2_GH0.tar.gz) = f8e90949e2b52c2df7dca35d33731880fa8f3d526431ad82f197ece7dce773aa
SIZE (telegramdesktop-tdesktop-v1.4.2_GH0.tar.gz) = 17340759
TIMESTAMP = 1546062245
SHA256 (telegramdesktop-tdesktop-v1.5.4_GH0.tar.gz) = 747e6f73071ac24edab0704ad87f4dc36e7708d0ae38d01de78732ca943903e6
SIZE (telegramdesktop-tdesktop-v1.5.4_GH0.tar.gz) = 14129681
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-9b292fd_GH0.tar.gz) = 0545b3cdadb65f74d69bf11d9fd39f1ad15f5045cd819d64e8d40ef536b22a7e
SIZE (telegramdesktop-libtgvoip-9b292fd_GH0.tar.gz) = 803095
SHA256 (telegramdesktop-libtgvoip-78e584c_GH0.tar.gz) = b5363e613e7b7fa1273d89856bf33e6fc1f7f028c44911d6dc8f64ebb7e3b389
SIZE (telegramdesktop-libtgvoip-78e584c_GH0.tar.gz) = 1439050
SHA256 (telegramdesktop-crl-4291015_GH0.tar.gz) = 25f461f0e575cfa2b55959f735115acac1f515d923a85b2a7a7a886dd6f0c395
SIZE (telegramdesktop-crl-4291015_GH0.tar.gz) = 21322
SHA256 (Cyan4973-xxHash-7cc9639_GH0.tar.gz) = f40801820e885f92bbe3d2434efeb39aa18eeaf878341982e8525b538468e3ed

View File

@ -1,4 +1,4 @@
--- Telegram/gyp/codegen_rules.gypi.orig 2018-09-28 13:08:38 UTC
--- Telegram/gyp/codegen_rules.gypi.orig 2018-12-24 08:16:05 UTC
+++ Telegram/gyp/codegen_rules.gypi
@@ -15,7 +15,7 @@
'<(SHARED_INTERMEDIATE_DIR)/update_dependent_styles.timestamp',
@ -25,7 +25,7 @@
'-o', '<(SHARED_INTERMEDIATE_DIR)/update_dependent_qrc.timestamp',
'<@(qrc_files)',
],
--- Telegram/gyp/lib_export.gyp.orig 2018-09-28 13:08:38 UTC
--- Telegram/gyp/lib_export.gyp.orig 2018-12-24 08:16:05 UTC
+++ Telegram/gyp/lib_export.gyp
@@ -48,7 +48,7 @@
'include_dirs': [
@ -36,7 +36,7 @@
'<(submodules_loc)/GSL/include',
'<(submodules_loc)/variant/include',
'<(submodules_loc)/crl/src',
--- Telegram/gyp/lib_scheme.gyp.orig 2018-09-28 13:08:38 UTC
--- Telegram/gyp/lib_scheme.gyp.orig 2018-12-24 08:16:05 UTC
+++ Telegram/gyp/lib_scheme.gyp
@@ -48,7 +48,7 @@
'<(SHARED_INTERMEDIATE_DIR)/scheme.h',
@ -47,7 +47,7 @@
'-o', '<(SHARED_INTERMEDIATE_DIR)', '<(res_loc)/scheme.tl',
],
'message': 'codegen_scheme-ing scheme.tl..',
--- Telegram/gyp/qt_moc.gypi.orig 2018-09-28 13:08:38 UTC
--- Telegram/gyp/qt_moc.gypi.orig 2018-12-24 08:16:05 UTC
+++ Telegram/gyp/qt_moc.gypi
@@ -12,12 +12,12 @@
'<(SHARED_INTERMEDIATE_DIR)/<(_target_name)/moc/moc_<(RULE_INPUT_ROOT).cpp',
@ -64,7 +64,7 @@
# '<!@(python -c "for s in \'<@(_include_dirs)\'.split(\' \'): print(\'-I\' + s)")',
'<(RULE_INPUT_PATH)',
'-o', '<(SHARED_INTERMEDIATE_DIR)/<(_target_name)/moc/moc_<(RULE_INPUT_ROOT).cpp',
--- Telegram/gyp/qt_rcc.gypi.orig 2018-09-28 13:08:38 UTC
--- Telegram/gyp/qt_rcc.gypi.orig 2018-12-24 08:16:05 UTC
+++ Telegram/gyp/qt_rcc.gypi
@@ -15,7 +15,7 @@
'<(SHARED_INTERMEDIATE_DIR)/<(_target_name)/qrc/qrc_<(RULE_INPUT_ROOT).cpp',
@ -75,7 +75,7 @@
'-name', '<(RULE_INPUT_ROOT)',
'-no-compress',
'<(RULE_INPUT_PATH)',
--- Telegram/gyp/qt.gypi.orig 2018-09-28 13:08:38 UTC
--- Telegram/gyp/qt.gypi.orig 2018-12-24 08:16:05 UTC
+++ Telegram/gyp/qt.gypi
@@ -14,25 +14,21 @@
[ 'build_macold', {
@ -233,7 +233,7 @@
'-pthread',
'-rdynamic',
],
--- Telegram/gyp/telegram_linux.gypi.orig 2018-09-28 13:08:38 UTC
--- Telegram/gyp/telegram_linux.gypi.orig 2018-12-24 08:16:05 UTC
+++ Telegram/gyp/telegram_linux.gypi
@@ -10,7 +10,7 @@
'variables': {
@ -265,7 +265,7 @@
'/usr/local/lib',
'<(linux_path_ffmpeg)/lib',
'<(linux_path_openal)/lib',
@@ -43,25 +45,16 @@
@@ -43,27 +45,16 @@
'<(linux_path_breakpad)/lib',
],
'libraries': [
@ -274,6 +274,7 @@
- 'ibusplatforminputcontextplugin',
- 'fcitxplatforminputcontextplugin',
- 'himeplatforminputcontextplugin',
- 'nimfplatforminputcontextplugin',
- 'liblzma.a',
- 'libopenal.a',
- 'libavformat.a',
@ -288,6 +289,7 @@
- 'libvdpau.a',
- 'libdrm.a',
- 'libz.a',
-# '<!(pkg-config 2> /dev/null --libs <@(pkgconfig_libs))',
+ 'lzma',
+ 'openal',
+ 'avformat',
@ -298,10 +300,10 @@
+ 'minizip',
+ 'opus',
+ 'z',
# '<!(pkg-config 2> /dev/null --libs <@(pkgconfig_libs))',
],
'cflags_cc': [
@@ -71,7 +64,6 @@
'-Wno-strict-overflow',
@@ -72,7 +63,6 @@
'ldflags': [
'-Wl,-wrap,aligned_alloc',
'-Wl,-wrap,secure_getenv',
@ -309,7 +311,7 @@
'-Wl,--no-as-needed,-lrt',
],
'configurations': {
@@ -79,13 +71,16 @@
@@ -80,13 +70,16 @@
'cflags_c': [
'-Ofast',
'-fno-strict-aliasing',
@ -326,19 +328,18 @@
],
},
},
@@ -96,10 +91,7 @@
@@ -97,9 +90,7 @@
],
}], ['not_need_gtk!="True"', {
'cflags_cc': [
- '<!(pkg-config 2> /dev/null --cflags appindicator-0.1)',
- '<!(pkg-config 2> /dev/null --cflags gtk+-2.0)',
- '<!(pkg-config 2> /dev/null --cflags glib-2.0)',
- '<!(pkg-config 2> /dev/null --cflags dee-1.0)',
+ '<!(pkg-config 2> /dev/null --cflags gtk+-3.0)',
],
}]
],
--- Telegram/gyp/Telegram.gyp.orig 2018-09-28 13:08:38 UTC
}], ['<!(pkg-config ayatana-appindicator3-0.1; echo $?) == 0', {
'cflags_cc': [ '<!(pkg-config --cflags ayatana-appindicator3-0.1)' ],
--- Telegram/gyp/Telegram.gyp.orig 2018-12-24 08:16:05 UTC
+++ Telegram/gyp/Telegram.gyp
@@ -51,7 +51,7 @@
'pt-BR',
@ -357,7 +358,7 @@
'../ThirdParty/libtgvoip/libtgvoip.gyp:libtgvoip',
'crl.gyp:crl',
'lib_base.gyp:lib_base',
@@ -84,25 +83,16 @@
@@ -84,27 +83,18 @@
],
'defines': [
@ -365,6 +366,8 @@
'AL_ALEXT_PROTOTYPES',
'TGVOIP_USE_CXX11_LIB',
'XXH_INLINE_ALL',
'TDESKTOP_API_ID=<(api_id)',
'TDESKTOP_API_HASH=<(api_hash)',
- '<!@(python -c "for s in \'<(build_defines)\'.split(\',\'): print(s)")',
+ '<!@(%%PYTHON_CMD%% -c "for s in \'<(build_defines)\'.split(\',\'): print(s)")',
],
@ -385,7 +388,7 @@
'<(emoji_suggestions_loc)',
'<(submodules_loc)/GSL/include',
'<(submodules_loc)/variant/include',
@@ -121,7 +111,7 @@
@@ -123,7 +113,7 @@
'<(res_loc)/export_html/images/back@2x.png',
],
'sources!': [
@ -394,7 +397,7 @@
],
'conditions': [
[ '"<(official_build_target)" != ""', {
--- Telegram/gyp/tests/tests.gyp.orig 2018-09-28 13:08:38 UTC
--- Telegram/gyp/tests/tests.gyp.orig 2018-12-24 08:16:05 UTC
+++ Telegram/gyp/tests/tests.gyp
@@ -13,7 +13,7 @@
'src_loc': '../../SourceFiles',
@ -405,9 +408,9 @@
},
'targets': [{
'target_name': 'tests',
--- Telegram/ThirdParty/libtgvoip/libtgvoip.gyp.orig 2018-09-18 16:52:01 UTC
--- Telegram/ThirdParty/libtgvoip/libtgvoip.gyp.orig 2018-11-23 01:03:16 UTC
+++ Telegram/ThirdParty/libtgvoip/libtgvoip.gyp
@@ -13,11 +13,12 @@
@@ -14,11 +14,12 @@
'variables': {
'tgvoip_src_loc': '.',
'official_build_target%': '',
@ -421,7 +424,7 @@
],
'direct_dependent_settings': {
'include_dirs': [
@@ -263,7 +264,7 @@
@@ -739,7 +740,7 @@
},
],
[
@ -430,7 +433,7 @@
'sources/': [['exclude', '<(tgvoip_src_loc)/os/linux/']],
},
],
@@ -383,12 +384,15 @@
@@ -864,13 +865,16 @@
},
],
[
@ -438,6 +441,7 @@
+ '"<(OS)" == "freebsd"', {
'defines': [
'WEBRTC_POSIX',
'WEBRTC_LINUX',
],
+ 'cflags_cc': [
+ '-std=gnu++11',

View File

@ -1,8 +1,9 @@
--- Telegram/Resources/qrc/telegram_linux.qrc.orig 2018-08-04 18:53:40 UTC
--- Telegram/Resources/qrc/telegram_linux.qrc.orig 2018-12-24 08:16:05 UTC
+++ Telegram/Resources/qrc/telegram_linux.qrc
@@ -1,5 +1,4 @@
@@ -1,6 +1,5 @@
<RCC>
<qresource prefix="/qt">
- <file alias="etc/qt.conf">../etc/qt_linux.conf</file>
</qresource>
</RCC>
<qresource prefix="/fc">
<file alias="fc-custom.conf">../fc-custom.conf</file>

View File

@ -1,6 +1,6 @@
--- Telegram/SourceFiles/core/utils.h.orig 2018-10-09 21:21:48 UTC
--- Telegram/SourceFiles/core/utils.h.orig 2018-12-24 08:16:05 UTC
+++ Telegram/SourceFiles/core/utils.h
@@ -406,6 +406,7 @@ enum DBIPlatform {
@@ -378,6 +378,7 @@ enum DBIPlatform {
dbipLinux64 = 2,
dbipLinux32 = 3,
dbipMacOld = 4,

View File

@ -1,6 +1,6 @@
--- Telegram/SourceFiles/data/data_document.cpp.orig 2018-09-28 13:08:38 UTC
--- Telegram/SourceFiles/data/data_document.cpp.orig 2018-12-24 08:16:05 UTC
+++ Telegram/SourceFiles/data/data_document.cpp
@@ -78,7 +78,7 @@ QString FileNameUnsafe(
@@ -129,7 +129,7 @@ QString FileNameUnsafe(
name = name.replace(QRegularExpression(qsl("[\\\\\\/\\:\\*\\?\\\"\\<\\>\\|]")), qsl("_"));
#elif defined Q_OS_MAC
name = name.replace(QRegularExpression(qsl("[\\:]")), qsl("_"));

View File

@ -1,6 +1,6 @@
--- Telegram/SourceFiles/export/data/export_data_types.cpp.orig 2018-09-28 13:08:38 UTC
--- Telegram/SourceFiles/export/data/export_data_types.cpp.orig 2018-12-24 08:16:05 UTC
+++ Telegram/SourceFiles/export/data/export_data_types.cpp
@@ -363,9 +363,9 @@ QString CleanDocumentName(QString name)
@@ -366,9 +366,9 @@ QString CleanDocumentName(QString name)
'|',
#elif defined Q_OS_MAC // Q_OS_WIN
':',

View File

@ -1,6 +1,6 @@
--- 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.orig 2018-12-24 08:16:05 UTC
+++ Telegram/SourceFiles/history/admin_log/history_admin_log_inner.cpp
@@ -1391,13 +1391,13 @@ void InnerWidget::mouseActionFinish(cons
@@ -1358,13 +1358,13 @@ void InnerWidget::mouseActionFinish(cons
_mouseSelectType = TextSelectType::Letters;
//_widget->noSelectingScroll(); // TODO

View File

@ -1,6 +1,6 @@
--- Telegram/SourceFiles/history/history_inner_widget.cpp.orig 2018-08-04 18:53:40 UTC
--- Telegram/SourceFiles/history/history_inner_widget.cpp.orig 2018-12-24 08:16:05 UTC
+++ Telegram/SourceFiles/history/history_inner_widget.cpp
@@ -1344,7 +1344,7 @@ void HistoryInner::mouseActionFinish(
@@ -1352,7 +1352,7 @@ void HistoryInner::mouseActionFinish(
_widget->noSelectingScroll();
_widget->updateTopBarSelection();
@ -9,7 +9,7 @@
if (!_selected.empty() && _selected.cbegin()->second != FullSelection) {
const auto [item, selection] = *_selected.cbegin();
if (const auto view = item->mainView()) {
@@ -1353,7 +1353,7 @@ void HistoryInner::mouseActionFinish(
@@ -1361,7 +1361,7 @@ void HistoryInner::mouseActionFinish(
QClipboard::Selection);
}
}

View File

@ -1,6 +1,6 @@
--- 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.orig 2018-12-24 08:16:05 UTC
+++ Telegram/SourceFiles/history/view/history_view_list_widget.cpp
@@ -2017,7 +2017,7 @@ void ListWidget::mouseActionFinish(
@@ -2019,7 +2019,7 @@ void ListWidget::mouseActionFinish(
_mouseSelectType = TextSelectType::Letters;
//_widget->noSelectingScroll(); // #TODO select scroll
@ -9,7 +9,7 @@
if (_selectedTextItem
&& _selectedTextRange.from != _selectedTextRange.to) {
if (const auto view = viewForItem(_selectedTextItem)) {
@@ -2026,7 +2026,7 @@ void ListWidget::mouseActionFinish(
@@ -2028,7 +2028,7 @@ void ListWidget::mouseActionFinish(
QClipboard::Selection);
}
}

View File

@ -1,22 +0,0 @@
--- 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();
})());

View File

@ -1,14 +0,0 @@
--- 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());

View File

@ -1,4 +1,4 @@
--- Telegram/SourceFiles/platform/linux/linux_libs.cpp.orig 2018-08-04 18:53:40 UTC
--- Telegram/SourceFiles/platform/linux/linux_libs.cpp.orig 2018-12-24 08:16:05 UTC
+++ Telegram/SourceFiles/platform/linux/linux_libs.cpp
@@ -121,6 +121,7 @@ bool setupGtkBase(QLibrary &lib_gtk) {
return true;
@ -34,7 +34,7 @@
bool indicatorLoaded = false;
QLibrary lib_gtk, lib_indicator;
+#ifdef HAVE_APPINDICATOR
if (loadLibrary(lib_indicator, "appindicator3", 1)) {
if (loadLibrary(lib_indicator, "ayatana-appindicator3", 1) || loadLibrary(lib_indicator, "appindicator3", 1)) {
if (loadLibrary(lib_gtk, "gtk-3", 0)) {
gtkLoaded = setupGtkBase(lib_gtk);
@@ -249,6 +254,7 @@ void start() {

View File

@ -1,11 +1,15 @@
--- Telegram/SourceFiles/platform/linux/linux_libs.h.orig 2018-08-04 18:53:40 UTC
--- Telegram/SourceFiles/platform/linux/linux_libs.h.orig 2018-12-24 08:16:05 UTC
+++ Telegram/SourceFiles/platform/linux/linux_libs.h
@@ -10,14 +10,16 @@ https://github.com/telegramdesktop/tdesk
@@ -10,18 +10,20 @@ https://github.com/telegramdesktop/tdesk
#ifndef TDESKTOP_DISABLE_GTK_INTEGRATION
extern "C" {
#undef signals
+#ifdef HAVE_APPINDICATOR
#ifdef TDESKTOP_USE_AYATANA_INDICATORS
#include <libayatana-appindicator/app-indicator.h>
#else
#include <libappindicator/app-indicator.h>
#endif
+#endif
#include <gtk/gtk.h>
#include <gdk/gdk.h>
@ -18,7 +22,7 @@
#endif // !TDESKTOP_DISABLE_UNITY_INTEGRATION
#endif // !TDESKTOP_DISABLE_GTK_INTEGRATION
@@ -274,6 +276,7 @@ inline gulong g_signal_connect_swapped_h
@@ -278,6 +280,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;
@ -26,7 +30,7 @@
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
@@ -289,6 +292,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;

View File

@ -1,4 +1,4 @@
--- Telegram/SourceFiles/platform/linux/main_window_linux.cpp.orig 2018-08-04 18:53:40 UTC
--- Telegram/SourceFiles/platform/linux/main_window_linux.cpp.orig 2018-12-24 08:16:05 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;
@ -10,7 +10,7 @@
GtkStatusIcon *_trayIcon = 0;
GtkWidget *_trayMenu = 0;
GdkPixbuf *_trayPixbuf = 0;
@@ -279,7 +281,9 @@ void MainWindow::workmodeUpdated(DBIWork
@@ -283,7 +285,9 @@ void MainWindow::workmodeUpdated(DBIWork
if (noQtTrayIcon) {
#ifndef TDESKTOP_DISABLE_GTK_INTEGRATION
if (useAppIndicator) {
@ -20,7 +20,7 @@
} else if (useStatusIcon) {
Libs::gtk_status_icon_set_visible(_trayIcon, false);
}
@@ -295,7 +299,9 @@ void MainWindow::workmodeUpdated(DBIWork
@@ -299,7 +303,9 @@ void MainWindow::workmodeUpdated(DBIWork
if (noQtTrayIcon) {
#ifndef TDESKTOP_DISABLE_GTK_INTEGRATION
if (useAppIndicator) {
@ -30,7 +30,7 @@
} else if (useStatusIcon) {
Libs::gtk_status_icon_set_visible(_trayIcon, true);
}
@@ -314,7 +320,9 @@ void MainWindow::psUpdateIndicator() {
@@ -318,7 +324,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);
@ -40,7 +40,7 @@
} else {
useAppIndicator = false;
}
@@ -407,11 +415,15 @@ void MainWindow::LibsLoaded() {
@@ -411,11 +419,15 @@ void MainWindow::LibsLoaded() {
&& (Libs::g_object_ref_sink != nullptr)
&& (Libs::g_object_unref != nullptr);
@ -56,7 +56,7 @@
if (tryAppIndicator && useGtkBase && useAppIndicator) {
noQtTrayIcon = true;
@@ -456,6 +468,7 @@ void MainWindow::psCreateTrayIcon() {
@@ -460,6 +472,7 @@ void MainWindow::psCreateTrayIcon() {
}
#ifndef TDESKTOP_DISABLE_GTK_INTEGRATION
@ -64,7 +64,7 @@
if (useAppIndicator) {
DEBUG_LOG(("Trying to create AppIndicator"));
_trayMenu = Libs::gtk_menu_new();
@@ -486,6 +499,7 @@ void MainWindow::psCreateTrayIcon() {
@@ -490,6 +503,7 @@ void MainWindow::psCreateTrayIcon() {
useAppIndicator = false;
}
}
@ -72,7 +72,7 @@
if (useStatusIcon) {
if (Libs::gdk_init_check(0, 0)) {
if (!_trayMenu) _trayMenu = Libs::gtk_menu_new();
@@ -604,10 +618,12 @@ MainWindow::~MainWindow() {
@@ -608,10 +622,12 @@ MainWindow::~MainWindow() {
Libs::g_object_unref(_trayMenu);
_trayMenu = nullptr;
}

View File

@ -1,6 +1,6 @@
--- Telegram/SourceFiles/platform/platform_specific.h.orig 2018-08-04 18:53:40 UTC
--- Telegram/SourceFiles/platform/platform_specific.h.orig 2018-12-24 08:16:05 UTC
+++ Telegram/SourceFiles/platform/platform_specific.h
@@ -34,8 +34,8 @@ void finish();
@@ -50,8 +50,8 @@ void finish();
#ifdef Q_OS_MAC
#include "platform/mac/specific_mac.h"

View File

@ -1,6 +1,6 @@
--- Telegram/SourceFiles/qt_static_plugins.cpp.orig 2018-08-04 18:53:40 UTC
--- Telegram/SourceFiles/qt_static_plugins.cpp.orig 2018-12-24 08:16:05 UTC
+++ Telegram/SourceFiles/qt_static_plugins.cpp
@@ -14,14 +14,5 @@ Q_IMPORT_PLUGIN(QWindowsIntegrationPlugi
@@ -14,15 +14,5 @@ Q_IMPORT_PLUGIN(QWindowsIntegrationPlugi
Q_IMPORT_PLUGIN(QWebpPlugin)
Q_IMPORT_PLUGIN(QCocoaIntegrationPlugin)
Q_IMPORT_PLUGIN(QGenericEnginePlugin)
@ -14,6 +14,7 @@
-Q_IMPORT_PLUGIN(QIbusPlatformInputContextPlugin)
-Q_IMPORT_PLUGIN(QFcitxPlatformInputContextPlugin)
-Q_IMPORT_PLUGIN(QHimePlatformInputContextPlugin)
-Q_IMPORT_PLUGIN(NimfInputContextPlugin)
-#endif // Q_OS_WIN | Q_OS_MAC | Q_OS_LINUX
+#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

View File

@ -1,6 +1,6 @@
--- Telegram/SourceFiles/settings.cpp.orig 2018-10-09 21:21:48 UTC
--- Telegram/SourceFiles/settings.cpp.orig 2018-12-24 08:16:05 UTC
+++ Telegram/SourceFiles/settings.cpp
@@ -79,6 +79,8 @@ DBIPlatform gPlatform = dbipMac;
@@ -77,6 +77,8 @@ DBIPlatform gPlatform = dbipMac;
DBIPlatform gPlatform = dbipLinux64;
#elif defined Q_OS_LINUX32
DBIPlatform gPlatform = dbipLinux32;

View File

@ -0,0 +1,17 @@
--- Telegram/SourceFiles/settings/settings_notifications.cpp.orig 2018-12-24 08:16:05 UTC
+++ Telegram/SourceFiles/settings/settings_notifications.cpp
@@ -477,11 +477,11 @@ void NotificationsCount::SampleWidget::d
_deleted = true;
// Ubuntu has a lag if deleteLater() called immediately.
-#if defined Q_OS_LINUX32 || defined Q_OS_LINUX64
+#if defined Q_OS_LINUX32 || defined Q_OS_LINUX64 || defined Q_OS_FREEBSD
QTimer::singleShot(1000, [this] { delete this; });
-#else // Q_OS_LINUX32 || Q_OS_LINUX64
+#else // Q_OS_LINUX32 || Q_OS_LINUX64 || Q_OS_FREEBSD
deleteLater();
-#endif // Q_OS_LINUX32 || Q_OS_LINUX64
+#endif // Q_OS_LINUX32 || Q_OS_LINUX64 || Q_OS_FREEBSD
}
void SetupAdvancedNotifications(not_null<Ui::VerticalLayout*> container) {

View File

@ -1,6 +1,6 @@
--- Telegram/SourceFiles/ui/text/text.cpp.orig 2018-08-04 18:53:40 UTC
--- Telegram/SourceFiles/ui/text/text.cpp.orig 2018-12-24 08:16:05 UTC
+++ Telegram/SourceFiles/ui/text/text.cpp
@@ -1750,11 +1750,11 @@ private:
@@ -1760,11 +1760,11 @@ private:
if (item == -1)
return;

View File

@ -1,6 +1,6 @@
--- Telegram/SourceFiles/ui/twidget.cpp.orig 2018-08-04 18:53:40 UTC
--- Telegram/SourceFiles/ui/twidget.cpp.orig 2018-12-24 08:16:05 UTC
+++ Telegram/SourceFiles/ui/twidget.cpp
@@ -233,9 +233,9 @@ void sendSynteticMouseEvent(QWidget *wid
@@ -250,9 +250,9 @@ void sendSynteticMouseEvent(QWidget *wid
, button
, QGuiApplication::mouseButtons() | button
, QGuiApplication::keyboardModifiers()

View File

@ -1,6 +1,6 @@
--- Telegram/SourceFiles/window/main_window.cpp.orig 2018-10-09 21:21:48 UTC
--- Telegram/SourceFiles/window/main_window.cpp.orig 2018-12-24 08:16:05 UTC
+++ Telegram/SourceFiles/window/main_window.cpp
@@ -496,7 +496,7 @@ bool MainWindow::minimizeToTray() {
@@ -501,7 +501,7 @@ bool MainWindow::minimizeToTray() {
}
void MainWindow::reActivateWindow() {
@ -9,7 +9,7 @@
const auto reActivate = [=] {
if (const auto w = App::wnd()) {
if (auto f = QApplication::focusWidget()) {
@@ -511,7 +511,7 @@ void MainWindow::reActivateWindow() {
@@ -516,7 +516,7 @@ void MainWindow::reActivateWindow() {
};
crl::on_main(this, reActivate);
App::CallDelayed(200, this, reActivate);

View File

@ -1,11 +0,0 @@
--- 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){

View File

@ -1,6 +1,6 @@
--- Telegram/ThirdParty/libtgvoip/VoIPController.cpp.orig 2018-09-18 16:52:01 UTC
--- Telegram/ThirdParty/libtgvoip/VoIPController.cpp.orig 2018-11-23 01:03:16 UTC
+++ Telegram/ThirdParty/libtgvoip/VoIPController.cpp
@@ -2056,7 +2056,7 @@ static void initMachTimestart() {
@@ -2709,7 +2709,7 @@ static void initMachTimestart() {
#endif
double VoIPController::GetCurrentTime(){

View File

@ -1,4 +1,4 @@
--- Telegram/ThirdParty/libtgvoip/audio/AudioIO.cpp.orig 2018-09-18 16:52:01 UTC
--- Telegram/ThirdParty/libtgvoip/audio/AudioIO.cpp.orig 2018-11-23 01:03:16 UTC
+++ Telegram/ThirdParty/libtgvoip/audio/AudioIO.cpp
@@ -31,7 +31,7 @@
#endif
@ -9,10 +9,10 @@
#ifndef WITHOUT_ALSA
#include "../os/linux/AudioInputALSA.h"
#include "../os/linux/AudioOutputALSA.h"
@@ -66,7 +66,7 @@ shared_ptr<AudioIO> AudioIO::Create(){
return std::make_shared<ContextlessAudioIO<AudioInputWave, AudioOutputWave>>(inputDevice, outputDevice);
@@ -66,7 +66,7 @@ AudioIO* AudioIO::Create(){
return new ContextlessAudioIO<AudioInputWave, AudioOutputWave>(inputDevice, outputDevice);
#endif
return std::make_shared<ContextlessAudioIO<AudioInputWASAPI, AudioOutputWASAPI>>(inputDevice, outputDevice);
return new ContextlessAudioIO<AudioInputWASAPI, AudioOutputWASAPI>(inputDevice, outputDevice);
-#elif defined(__linux__)
+#elif defined(__linux__) || defined(__FreeBSD__)
#ifndef WITHOUT_ALSA

View File

@ -1,4 +1,4 @@
--- Telegram/ThirdParty/libtgvoip/os/linux/AudioInputALSA.cpp.orig 2018-07-17 16:48:21 UTC
--- Telegram/ThirdParty/libtgvoip/os/linux/AudioInputALSA.cpp.orig 2018-11-23 01:03:16 UTC
+++ Telegram/ThirdParty/libtgvoip/os/linux/AudioInputALSA.cpp
@@ -12,6 +12,10 @@
#include "../../logging.h"
@ -11,10 +11,3 @@
using namespace tgvoip::audio;
#define BUFFER_SIZE 960
@@ -172,4 +176,4 @@ void AudioInputALSA::EnumerateDevices(st
}
dlclose(lib);
-}
\ No newline at end of file
+}

View File

@ -1,4 +1,4 @@
--- Telegram/ThirdParty/libtgvoip/os/linux/AudioOutputALSA.cpp.orig 2018-07-17 16:48:21 UTC
--- Telegram/ThirdParty/libtgvoip/os/linux/AudioOutputALSA.cpp.orig 2018-11-23 01:03:16 UTC
+++ Telegram/ThirdParty/libtgvoip/os/linux/AudioOutputALSA.cpp
@@ -11,6 +11,10 @@
#include "../../logging.h"
@ -11,10 +11,3 @@
#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;}
@@ -174,4 +178,4 @@ void AudioOutputALSA::EnumerateDevices(s
}
dlclose(lib);
-}
\ No newline at end of file
+}

View File

@ -1,4 +1,4 @@
--- Telegram/ThirdParty/libtgvoip/os/linux/AudioPulse.cpp.orig 2018-07-17 16:48:21 UTC
--- Telegram/ThirdParty/libtgvoip/os/linux/AudioPulse.cpp.orig 2018-11-23 01:03:16 UTC
+++ Telegram/ThirdParty/libtgvoip/os/linux/AudioPulse.cpp
@@ -7,6 +7,9 @@
#include "AudioPulse.h"
@ -10,10 +10,3 @@
#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;}
@@ -283,4 +286,4 @@ bool AudioPulse::DoOneOperation(std::fun
}
pa_mainloop_iterate(ml, 1, NULL);
}
-}
\ No newline at end of file
+}

View File

@ -1,20 +0,0 @@
--- 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 <pulse/pulseaudio.h>
+#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

View File

@ -1,10 +1,10 @@
--- Telegram/ThirdParty/libtgvoip/os/posix/NetworkSocketPosix.cpp.orig 2018-07-17 16:48:21 UTC
--- Telegram/ThirdParty/libtgvoip/os/posix/NetworkSocketPosix.cpp.orig 2018-11-23 01:03:16 UTC
+++ Telegram/ThirdParty/libtgvoip/os/posix/NetworkSocketPosix.cpp
@@ -54,6 +54,7 @@ void NetworkSocketPosix::SetMaxPriority(
@@ -61,6 +61,7 @@ void NetworkSocketPosix::SetMaxPriority(
if(res<0){
LOGE("error setting darwin-specific net priority: %d / %s", errno, strerror(errno));
}
+#elif defined(__FreeBSD__)
#elif defined(__linux__)
int prio=5;
int prio=6;
int res=setsockopt(fd, SOL_SOCKET, SO_PRIORITY, &prio, sizeof(prio));

View File

@ -1,6 +1,6 @@
--- Telegram/ThirdParty/libtgvoip/threading.h.orig 2018-07-17 16:48:21 UTC
--- Telegram/ThirdParty/libtgvoip/threading.h.orig 2018-11-23 01:03:16 UTC
+++ Telegram/ThirdParty/libtgvoip/threading.h
@@ -42,6 +42,9 @@ namespace tgvoip{
@@ -18,6 +18,9 @@
#ifdef __APPLE__
#include "os/darwin/DarwinSpecific.h"
#endif
@ -10,7 +10,7 @@
namespace tgvoip{
class Mutex{
@@ -115,7 +118,9 @@ namespace tgvoip{
@@ -92,7 +95,9 @@ namespace tgvoip{
static void* ActualEntryPoint(void* arg){
Thread* self=reinterpret_cast<Thread*>(arg);
if(self->name){

View File

@ -0,0 +1,27 @@
--- Telegram/ThirdParty/libtgvoip/webrtc_dsp/rtc_base/platform_thread_types.cc.orig 2018-11-23 01:03:16 UTC
+++ Telegram/ThirdParty/libtgvoip/webrtc_dsp/rtc_base/platform_thread_types.cc
@@ -11,9 +11,13 @@
#include "rtc_base/platform_thread_types.h"
#if defined(WEBRTC_LINUX)
+#ifdef __FreeBSD__
+#include <sys/thr.h>
+#else
#include <sys/prctl.h>
#include <sys/syscall.h>
#endif
+#endif
namespace rtc {
@@ -27,6 +31,10 @@ PlatformThreadId CurrentThreadId() {
return gettid();
#elif defined(WEBRTC_FUCHSIA)
return zx_thread_self();
+#elif defined(__FreeBSD__)
+ long tid;
+ thr_self(&tid);
+ return tid;
#elif defined(WEBRTC_LINUX)
return syscall(__NR_gettid);
#else

View File

@ -0,0 +1,11 @@
--- Telegram/ThirdParty/libtgvoip/webrtc_dsp/rtc_base/stringutils.h.orig 2018-11-23 01:03:16 UTC
+++ Telegram/ThirdParty/libtgvoip/webrtc_dsp/rtc_base/stringutils.h
@@ -25,7 +25,7 @@
#endif // WEBRTC_WIN
#if defined(WEBRTC_POSIX)
-#ifdef BSD
+#ifdef __FreeBSD__
#include <stdlib.h>
#else // BSD
#include <alloca.h>

View File

@ -1,11 +0,0 @@
--- 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 <stdlib.h>
#else // BSD
#include <alloca.h>

View File

@ -1,6 +1,6 @@
--- Telegram/gyp/telegram_sources.txt.orig 2018-10-09 21:21:48 UTC
--- Telegram/gyp/telegram_sources.txt.orig 2018-12-24 08:16:05 UTC
+++ Telegram/gyp/telegram_sources.txt
@@ -761,14 +761,7 @@
@@ -805,14 +805,7 @@
<(emoji_suggestions_loc)/emoji_suggestions.cpp
<(emoji_suggestions_loc)/emoji_suggestions.h