FreeBSD Bugzilla – Attachment 188642 Details for
Bug 224193
[new port] net-im/telegram-desktop: Telegram Desktop messaging app
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
new patch
telegram-desktop.shar (text/plain), 50.14 KB, created by
Henry Hu
on 2017-12-09 06:43:24 UTC
(
hide
)
Description:
new patch
Filename:
MIME Type:
Creator:
Henry Hu
Created:
2017-12-09 06:43:24 UTC
Size:
50.14 KB
patch
obsolete
># This is a shell archive. Save it in a file, remove anything before ># this line, and then unpack it by entering "sh file". Note, it may ># create directories; files and directories will be owned by you and ># have default permissions. ># ># This archive contains: ># ># telegram-desktop/ ># telegram-desktop/files ># telegram-desktop/files/patch-tdesktop ># telegram-desktop/files/CMakeLists.inj ># telegram-desktop/files/patch-libtgvoip ># telegram-desktop/pkg-descr ># telegram-desktop/Makefile ># telegram-desktop/distinfo ># >echo c - telegram-desktop/ >mkdir -p telegram-desktop/ > /dev/null 2>&1 >echo c - telegram-desktop/files >mkdir -p telegram-desktop/files > /dev/null 2>&1 >echo x - telegram-desktop/files/patch-tdesktop >sed 's/^X//' >telegram-desktop/files/patch-tdesktop << '53e9508519c80fe49fc361e20e6e78d2' >Xdiff --git a/Telegram/SourceFiles/_other/packer.cpp b/Telegram/SourceFiles/_other/packer.cpp >Xindex 4fe9530d..6983ff86 100644 >X--- a/Telegram/SourceFiles/_other/packer.cpp >X+++ b/Telegram/SourceFiles/_other/packer.cpp >X@@ -246,7 +246,7 @@ int main(int argc, char *argv[]) >X } >X QByteArray inner = f.readAll(); >X stream << name << quint32(inner.size()) << inner; >X-#if defined Q_OS_MAC || defined Q_OS_LINUX >X+#if defined Q_OS_MAC || defined Q_OS_LINUX || defined Q_OS_FREEBSD >X stream << (QFileInfo(fullName).isExecutable() ? true : false); >X #endif >X } >Xdiff --git a/Telegram/SourceFiles/base/build_config.h b/Telegram/SourceFiles/base/build_config.h >Xindex 17316303..ea0eb0db 100644 >X--- a/Telegram/SourceFiles/base/build_config.h >X+++ b/Telegram/SourceFiles/base/build_config.h >X@@ -26,7 +26,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org >X >X #if defined(__APPLE__) >X #define OS_MAC 1 >X-#elif defined(__linux__) // __APPLE__ >X+#elif defined(__linux__) || defined(__FreeBSD__)// __APPLE__ >X #define OS_LINUX 1 >X #elif defined(_WIN32) // __APPLE__ || __linux__ >X #define OS_WIN 1 >Xdiff --git a/Telegram/SourceFiles/base/lambda.h b/Telegram/SourceFiles/base/lambda.h >Xindex 48742ce7..7e5ffcce 100644 >X--- a/Telegram/SourceFiles/base/lambda.h >X+++ b/Telegram/SourceFiles/base/lambda.h >X@@ -212,11 +212,14 @@ protected: >X >X template <typename Lambda, typename Return, typename ...Args> >X struct vtable_once : public vtable_once_impl<Lambda, is_large<Lambda>, Return, Args...> { >X- static const vtable_once instance; >X+ static const vtable_once* get_instance(); >X }; >X >X template <typename Lambda, typename Return, typename ...Args> >X-const vtable_once<Lambda, Return, Args...> vtable_once<Lambda, Return, Args...>::instance = {}; >X+const vtable_once<Lambda, Return, Args...>* vtable_once<Lambda, Return, Args...>::get_instance() { >X+ static vtable_once<Lambda, Return, Args...> instance; >X+ return &instance; >X+} >X >X template <typename Lambda, bool IsLarge, typename Return, typename ...Args> struct vtable_impl; >X >X@@ -262,12 +265,14 @@ struct vtable_impl<Lambda, false, Return, Args...> : public vtable_once_impl<Lam >X >X template <typename Lambda, typename Return, typename ...Args> >X struct vtable : public vtable_impl<Lambda, is_large<Lambda>, Return, Args...> { >X- static const vtable instance; >X+ static const vtable* get_instance(); >X }; >X >X template <typename Lambda, typename Return, typename ...Args> >X-const vtable<Lambda, Return, Args...> vtable<Lambda, Return, Args...>::instance = {}; >X- >X+const vtable<Lambda, Return, Args...>* vtable<Lambda, Return, Args...>::get_instance() { >X+ static vtable<Lambda, Return, Args...> instance; >X+ return &instance; >X+} >X } // namespace lambda_internal >X >X template <typename Return, typename ...Args> >X@@ -346,7 +351,7 @@ public: >X // Copy / move construct / assign from an arbitrary type. >X template <typename Lambda, typename = std::enable_if_t<std::is_convertible<decltype(std::declval<Lambda>()(std::declval<Args>()...)),Return>::value>> >X lambda_once(Lambda other) { >X- data_.vtable = &lambda_internal::vtable_once<Lambda, Return, Args...>::instance; >X+ data_.vtable = lambda_internal::vtable_once<Lambda, Return, Args...>::get_instance(); >X lambda_internal::vtable_once<Lambda, Return, Args...>::construct_move_lambda_method(data_.storage, &other); >X } >X template <typename Lambda, typename = std::enable_if_t<std::is_convertible<decltype(std::declval<Lambda>()(std::declval<Args>()...)),Return>::value>> >X@@ -354,7 +359,7 @@ public: >X if (data_.vtable) { >X data_.vtable->destruct(data_.storage); >X } >X- data_.vtable = &lambda_internal::vtable_once<Lambda, Return, Args...>::instance; >X+ data_.vtable = lambda_internal::vtable_once<Lambda, Return, Args...>::get_instance(); >X lambda_internal::vtable_once<Lambda, Return, Args...>::construct_move_lambda_method(data_.storage, &other); >X return *this; >X } >X@@ -424,7 +429,7 @@ public: >X >X // Copy / move construct / assign from an arbitrary type. >X template <typename Lambda, typename = std::enable_if_t<std::is_convertible<decltype(std::declval<Lambda>()(std::declval<Args>()...)),Return>::value>> >X- lambda(Lambda other) : Parent(&lambda_internal::vtable<Lambda, Return, Args...>::instance, typename Parent::Private()) { >X+ lambda(Lambda other) : Parent(lambda_internal::vtable<Lambda, Return, Args...>::get_instance(), typename Parent::Private()) { >X lambda_internal::vtable<Lambda, Return, Args...>::construct_move_lambda_method(this->data_.storage, &other); >X } >X template <typename Lambda, typename = std::enable_if_t<std::is_convertible<decltype(std::declval<Lambda>()(std::declval<Args>()...)),Return>::value>> >X@@ -432,7 +437,7 @@ public: >X if (this->data_.vtable) { >X this->data_.vtable->destruct(this->data_.storage); >X } >X- this->data_.vtable = &lambda_internal::vtable<Lambda, Return, Args...>::instance; >X+ this->data_.vtable = lambda_internal::vtable<Lambda, Return, Args...>::get_instance(); >X lambda_internal::vtable<Lambda, Return, Args...>::construct_move_lambda_method(this->data_.storage, &other); >X return *this; >X } >Xdiff --git a/Telegram/SourceFiles/config.h b/Telegram/SourceFiles/config.h >Xindex 633c4e4a..47ebb941 100644 >X--- a/Telegram/SourceFiles/config.h >X+++ b/Telegram/SourceFiles/config.h >X@@ -270,7 +270,7 @@ inline const char *cApiDeviceModel() { >X return "PC"; >X #elif defined Q_OS_MAC >X return "Mac"; >X-#elif defined Q_OS_LINUX >X+#elif defined Q_OS_LINUX || defined Q_OS_FREEBSD >X return "PC"; >X #endif >X } >X@@ -279,7 +279,7 @@ inline const char *cApiSystemVersion() { >X return "Windows"; >X #elif defined Q_OS_MAC >X return "OS X"; >X-#elif defined Q_OS_LINUX >X+#elif defined Q_OS_LINUX || defined Q_OS_FREEBSD >X return "Linux"; >X #endif >X } >Xdiff --git a/Telegram/SourceFiles/layout.cpp b/Telegram/SourceFiles/layout.cpp >Xindex 89e67b03..1f11ce3b 100644 >X--- a/Telegram/SourceFiles/layout.cpp >X+++ b/Telegram/SourceFiles/layout.cpp >X@@ -264,16 +264,16 @@ bool documentIsExecutableName(const QString &filename) { >X *result = qsl("\ >X action app bin command csh osx workflow\ >X ").split(' '); >X-#elif defined Q_OS_LINUX // Q_OS_MAC >X+#elif defined Q_OS_LINUX || defined Q_OS_FREEBSD // Q_OS_MAC >X *result = qsl("\ >X bin csh ksh out run\ >X ").split(' '); >X-#else // Q_OS_MAC || Q_OS_LINUX >X+#else // Q_OS_MAC || Q_OS_LINUX || Q_OS_FREEBSD >X *result = qsl("\ >X bat bin cmd com cpl exe gadget inf ins inx isu job jse lnk msc msi \ >X msp mst paf pif ps1 reg rgs sct shb shs u3p vb vbe vbs vbscript ws wsf\ >X ").split(' '); >X-#endif // !Q_OS_MAC && !Q_OS_LINUX >X+#endif // !Q_OS_MAC && !Q_OS_LINUX && ! Q_OS_FREEBSD >X return result.release(); >X })()); >X >Xdiff --git a/Telegram/SourceFiles/logs.cpp b/Telegram/SourceFiles/logs.cpp >Xindex d916756c..4d8a5f5f 100644 >X--- a/Telegram/SourceFiles/logs.cpp >X+++ b/Telegram/SourceFiles/logs.cpp >X@@ -311,7 +311,7 @@ namespace Logs { >X QString initialWorkingDir = QDir(cWorkingDir()).absolutePath() + '/', moveOldDataFrom; >X if (cBetaVersion()) { >X cSetDebug(true); >X-#if defined Q_OS_MAC || defined Q_OS_LINUX >X+#if defined Q_OS_MAC || defined Q_OS_LINUX || defined Q_OS_FREEBSD >X } else { >X #ifdef _DEBUG >X cForceWorkingDir(cExeDir()); >X@@ -322,11 +322,11 @@ namespace Logs { >X #endif // else for _DEBUG >X workingDirChosen = true; >X >X-#if defined Q_OS_LINUX && !defined _DEBUG // fix first version >X+#if (defined Q_OS_LINUX || defined Q_OS_FREEBSD) && !defined _DEBUG // fix first version >X moveOldDataFrom = initialWorkingDir; >X-#endif // Q_OS_LINUX && !_DEBUG >X+#endif // (Q_OS_LINUX || Q_OS_FREEBSD) && !_DEBUG >X >X-#elif defined Q_OS_WINRT // Q_OS_MAC || Q_OS_LINUX >X+#elif defined Q_OS_WINRT // Q_OS_MAC || Q_OS_LINUX || Q_OS_FREEBSD >X } else { >X cForceWorkingDir(psAppDataPath()); >X workingDirChosen = true; >X@@ -502,7 +502,7 @@ namespace Logs { >X //OutputDebugString(reinterpret_cast<const wchar_t *>(msg.utf16())); >X #elif defined Q_OS_MAC >X //objc_outputDebugString(msg); >X-#elif defined Q_OS_LINUX && defined _DEBUG >X+#elif (defined Q_OS_LINUX || defined Q_OS_FREEBSD) && defined _DEBUG >X //std::cout << msg.toUtf8().constData(); >X #endif >X } >Xdiff --git a/Telegram/SourceFiles/main.cpp b/Telegram/SourceFiles/main.cpp >Xindex 6e85f27d..e3e20610 100644 >X--- a/Telegram/SourceFiles/main.cpp >X+++ b/Telegram/SourceFiles/main.cpp >X@@ -23,9 +23,10 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org >X #include "storage/localstorage.h" >X >X int main(int argc, char *argv[]) { >X-#ifndef Q_OS_MAC // Retina display support is working fine, others are not. >X+#if !defined(Q_OS_MAC) && QT_VERSION >= QT_VERSION_CHECK(5, 6, 0) >X+ // Retina display support is working fine, others are not. >X QCoreApplication::setAttribute(Qt::AA_DisableHighDpiScaling, true); >X-#endif // Q_OS_MAC >X+#endif // not defined Q_OS_MAC and QT_VERSION >= 5.6.0 >X QCoreApplication::setApplicationName(qsl("TelegramDesktop")); >X >X InitFromCommandLine(argc, argv); >X@@ -39,6 +40,11 @@ int main(int argc, char *argv[]) { >X Logs::start(); // must be started before Platform is started >X Platform::start(); // must be started before QApplication is created >X >X+ // I don't know why path is not in QT_PLUGIN_PATH by default >X+ QCoreApplication::addLibraryPath("%%LOCALBASE%%/lib/qt5/plugins"); >X+ // without this Telegram doesn't start on Ubuntu 17.04 due GTK errors >X+ setenv("QT_STYLE_OVERRIDE", "qwerty", false); >X+ >X int result = 0; >X { >X Application app(argc, argv); >Xdiff --git a/Telegram/SourceFiles/mainwindow.cpp b/Telegram/SourceFiles/mainwindow.cpp >Xindex 0798d184..00682cbe 100644 >X--- a/Telegram/SourceFiles/mainwindow.cpp >X+++ b/Telegram/SourceFiles/mainwindow.cpp >X@@ -460,6 +460,7 @@ void MainWindow::ui_hideMediaPreview() { >X void MainWindow::showConnecting(const QString &text, const QString &reconnect) { >X if (_connecting) { >X _connecting->set(text, reconnect); >X+ _connecting->show(); >X } else { >X _connecting.create(bodyWidget(), text, reconnect); >X _connecting->show(); >X@@ -470,7 +471,7 @@ void MainWindow::showConnecting(const QString &text, const QString &reconnect) { >X >X void MainWindow::hideConnecting() { >X if (_connecting) { >X- _connecting.destroyDelayed(); >X+ _connecting->hide(); >X } >X } >X >Xdiff --git a/Telegram/SourceFiles/platform/linux/linux_libs.cpp b/Telegram/SourceFiles/platform/linux/linux_libs.cpp >Xindex b6d18ae9..0f0e4a2a 100644 >X--- a/Telegram/SourceFiles/platform/linux/linux_libs.cpp >X+++ b/Telegram/SourceFiles/platform/linux/linux_libs.cpp >X@@ -133,6 +133,7 @@ bool setupGtkBase(QLibrary &lib_gtk) { >X return true; >X } >X >X+#ifdef HAVE_APPINDICATOR >X bool setupAppIndicator(QLibrary &lib_indicator) { >X if (!load(lib_indicator, "app_indicator_new", app_indicator_new)) return false; >X if (!load(lib_indicator, "app_indicator_set_status", app_indicator_set_status)) return false; >X@@ -142,6 +143,7 @@ bool setupAppIndicator(QLibrary &lib_indicator) { >X DEBUG_LOG(("Library appindicator functions loaded!")); >X return true; >X } >X+#endif >X >X } // namespace >X >X@@ -201,10 +203,12 @@ f_g_type_check_instance_cast g_type_check_instance_cast = nullptr; >X f_g_type_check_instance_is_a g_type_check_instance_is_a = nullptr; >X f_g_signal_connect_data g_signal_connect_data = nullptr; >X f_g_signal_handler_disconnect g_signal_handler_disconnect = nullptr; >X+#ifdef HAVE_APPINDICATOR >X f_app_indicator_new app_indicator_new = nullptr; >X f_app_indicator_set_status app_indicator_set_status = nullptr; >X f_app_indicator_set_menu app_indicator_set_menu = nullptr; >X f_app_indicator_set_icon_full app_indicator_set_icon_full = nullptr; >X+#endif >X f_gdk_init_check gdk_init_check = nullptr; >X f_gdk_pixbuf_new_from_data gdk_pixbuf_new_from_data = nullptr; >X f_gdk_pixbuf_new_from_file gdk_pixbuf_new_from_file = nullptr; >X@@ -242,6 +246,7 @@ void start() { >X bool gtkLoaded = false; >X bool indicatorLoaded = false; >X QLibrary lib_gtk, lib_indicator; >X+#ifdef HAVE_APPINDICATOR >X if (loadLibrary(lib_indicator, "appindicator3", 1)) { >X if (loadLibrary(lib_gtk, "gtk-3", 0)) { >X gtkLoaded = setupGtkBase(lib_gtk); >X@@ -257,6 +262,7 @@ void start() { >X } >X } >X } >X+#endif >X >X // If no appindicator, try at least load gtk. >X if (!gtkLoaded && !indicatorLoaded) { >Xdiff --git a/Telegram/SourceFiles/platform/linux/linux_libs.h b/Telegram/SourceFiles/platform/linux/linux_libs.h >Xindex a8bf969c..6bea9ecf 100644 >X--- a/Telegram/SourceFiles/platform/linux/linux_libs.h >X+++ b/Telegram/SourceFiles/platform/linux/linux_libs.h >X@@ -22,14 +22,16 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org >X >X extern "C" { >X #undef signals >X+#ifdef HAVE_APPINDICATOR >X #include <libappindicator/app-indicator.h> >X+#endif >X #include <gtk/gtk.h> >X #include <gdk/gdk.h> >X #define signals public >X } // extern "C" >X >X #ifndef TDESKTOP_DISABLE_UNITY_INTEGRATION >X-#include <unity/unity/unity.h> >X+typedef void UnityLauncherEntry; >X #endif // !TDESKTOP_DISABLE_UNITY_INTEGRATION >X >X namespace Platform { >X@@ -284,6 +286,7 @@ inline gulong g_signal_connect_swapped_helper(gpointer instance, const gchar *de >X typedef void (*f_g_signal_handler_disconnect)(gpointer instance, gulong handler_id); >X extern f_g_signal_handler_disconnect g_signal_handler_disconnect; >X >X+#ifdef HAVE_APPINDICATOR >X typedef AppIndicator* (*f_app_indicator_new)(const gchar *id, const gchar *icon_name, AppIndicatorCategory category); >X extern f_app_indicator_new app_indicator_new; >X >X@@ -295,6 +298,7 @@ extern f_app_indicator_set_menu app_indicator_set_menu; >X >X typedef void (*f_app_indicator_set_icon_full)(AppIndicator *self, const gchar *icon_name, const gchar *icon_desc); >X extern f_app_indicator_set_icon_full app_indicator_set_icon_full; >X+#endif >X >X typedef gboolean (*f_gdk_init_check)(gint *argc, gchar ***argv); >X extern f_gdk_init_check gdk_init_check; >Xdiff --git a/Telegram/SourceFiles/platform/linux/main_window_linux.cpp b/Telegram/SourceFiles/platform/linux/main_window_linux.cpp >Xindex d3e3816f..5c29070e 100644 >X--- a/Telegram/SourceFiles/platform/linux/main_window_linux.cpp >X+++ b/Telegram/SourceFiles/platform/linux/main_window_linux.cpp >X@@ -36,7 +36,9 @@ namespace { >X bool noQtTrayIcon = false, tryAppIndicator = false; >X bool useGtkBase = false, useAppIndicator = false, useStatusIcon = false, trayIconChecked = false, useUnityCount = false; >X >X+#ifdef HAVE_APPINDICATOR >X AppIndicator *_trayIndicator = 0; >X+#endif >X GtkStatusIcon *_trayIcon = 0; >X GtkWidget *_trayMenu = 0; >X GdkPixbuf *_trayPixbuf = 0; >X@@ -274,7 +276,9 @@ void MainWindow::workmodeUpdated(DBIWorkMode mode) { >X if (mode == dbiwmWindowOnly) { >X if (noQtTrayIcon) { >X if (useAppIndicator) { >X+#ifdef HAVE_APPINDICATOR >X Libs::app_indicator_set_status(_trayIndicator, APP_INDICATOR_STATUS_PASSIVE); >X+#endif >X } else if (useStatusIcon) { >X Libs::gtk_status_icon_set_visible(_trayIcon, false); >X } >X@@ -288,7 +292,9 @@ void MainWindow::workmodeUpdated(DBIWorkMode mode) { >X } else { >X if (noQtTrayIcon) { >X if (useAppIndicator) { >X+#ifdef HAVE_APPINDICATOR >X Libs::app_indicator_set_status(_trayIndicator, APP_INDICATOR_STATUS_ACTIVE); >X+#endif >X } else if (useStatusIcon) { >X Libs::gtk_status_icon_set_visible(_trayIcon, true); >X } >X@@ -305,7 +311,9 @@ void MainWindow::psUpdateIndicator() { >X if (iconFile.exists()) { >X QByteArray path = QFile::encodeName(iconFile.absoluteFilePath()), name = QFile::encodeName(iconFile.fileName()); >X name = name.mid(0, name.size() - 4); >X+#ifdef HAVE_APPINDICATOR >X Libs::app_indicator_set_icon_full(_trayIndicator, path.constData(), name); >X+#endif >X } else { >X useAppIndicator = false; >X } >X@@ -392,11 +400,15 @@ void MainWindow::LibsLoaded() { >X && (Libs::g_object_ref_sink != nullptr) >X && (Libs::g_object_unref != nullptr); >X >X+#ifdef HAVE_APPINDICATOR >X useAppIndicator = useGtkBase >X && (Libs::app_indicator_new != nullptr) >X && (Libs::app_indicator_set_status != nullptr) >X && (Libs::app_indicator_set_menu != nullptr) >X && (Libs::app_indicator_set_icon_full != nullptr); >X+#else >X+ useAppIndicator = false; >X+#endif >X >X if (tryAppIndicator && useGtkBase && useAppIndicator) { >X noQtTrayIcon = true; >X@@ -439,6 +451,7 @@ void MainWindow::psCreateTrayIcon() { >X return; >X } >X >X+#ifdef HAVE_APPINDICATOR >X if (useAppIndicator) { >X DEBUG_LOG(("Trying to create AppIndicator")); >X _trayMenu = Libs::gtk_menu_new(); >X@@ -469,6 +482,7 @@ void MainWindow::psCreateTrayIcon() { >X useAppIndicator = false; >X } >X } >X+#endif >X if (useStatusIcon) { >X if (Libs::gdk_init_check(0, 0)) { >X if (!_trayMenu) _trayMenu = Libs::gtk_menu_new(); >X@@ -585,10 +599,12 @@ MainWindow::~MainWindow() { >X Libs::g_object_unref(_trayMenu); >X _trayMenu = nullptr; >X } >X+#ifdef HAVE_APPINDICATOR >X if (_trayIndicator) { >X Libs::g_object_unref(_trayIndicator); >X _trayIndicator = nullptr; >X } >X+#endif >X #ifndef TDESKTOP_DISABLE_UNITY_INTEGRATION >X if (_psUnityLauncherEntry) { >X Libs::g_object_unref(_psUnityLauncherEntry); >Xdiff --git a/Telegram/SourceFiles/platform/platform_audio.h b/Telegram/SourceFiles/platform/platform_audio.h >Xindex 516398a1..688099e8 100644 >X--- a/Telegram/SourceFiles/platform/platform_audio.h >X+++ b/Telegram/SourceFiles/platform/platform_audio.h >X@@ -32,7 +32,7 @@ void DeInit(); >X >X // Platform dependent implementations. >X >X-#if defined Q_OS_MAC || defined Q_OS_LINUX >X+#if defined Q_OS_MAC || defined Q_OS_LINUX || defined Q_OS_FREEBSD >X namespace Platform { >X namespace Audio { >X >X@@ -44,6 +44,6 @@ inline void DeInit() { >X >X } // namespace Audio >X } // namespace Platform >X-#elif defined Q_OS_WINRT || defined Q_OS_WIN // Q_OS_MAC || Q_OS_LINUX >X+#elif defined Q_OS_WINRT || defined Q_OS_WIN // Q_OS_MAC || Q_OS_LINUX || Q_OS_FREEBSD >X #include "platform/win/audio_win.h" >X-#endif // Q_OS_MAC || Q_OS_LINUX || Q_OS_WINRT || Q_OS_WIN >X+#endif // Q_OS_MAC || Q_OS_LINUX || Q_OS_WINRT || Q_OS_WIN || Q_OS_FREEBSD >Xdiff --git a/Telegram/SourceFiles/platform/platform_file_utilities.h b/Telegram/SourceFiles/platform/platform_file_utilities.h >Xindex 593ab286..60ee591c 100644 >X--- a/Telegram/SourceFiles/platform/platform_file_utilities.h >X+++ b/Telegram/SourceFiles/platform/platform_file_utilities.h >X@@ -51,8 +51,8 @@ bool Get(QStringList &files, QByteArray &remoteContent, const QString &caption, >X >X #ifdef Q_OS_MAC >X #include "platform/mac/file_utilities_mac.h" >X-#elif defined Q_OS_LINUX // Q_OS_MAC >X+#elif defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD) // Q_OS_MAC >X #include "platform/linux/file_utilities_linux.h" >X-#elif defined Q_OS_WINRT || defined Q_OS_WIN // Q_OS_MAC || Q_OS_LINUX >X+#elif defined Q_OS_WINRT || defined Q_OS_WIN // Q_OS_MAC || Q_OS_LINUX || Q_OS_FREEBSD >X #include "platform/win/file_utilities_win.h" >X-#endif // Q_OS_MAC || Q_OS_LINUX || Q_OS_WINRT || Q_OS_WIN >X+#endif // Q_OS_MAC || Q_OS_LINUX || Q_OS_WINRT || Q_OS_WIN || Q_OS_FREEBSD >Xdiff --git a/Telegram/SourceFiles/platform/platform_main_window.h b/Telegram/SourceFiles/platform/platform_main_window.h >Xindex b7b5334f..dad75373 100644 >X--- a/Telegram/SourceFiles/platform/platform_main_window.h >X+++ b/Telegram/SourceFiles/platform/platform_main_window.h >X@@ -32,8 +32,8 @@ class MainWindow; >X >X #ifdef Q_OS_MAC >X #include "platform/mac/main_window_mac.h" >X-#elif defined Q_OS_LINUX // Q_OS_MAC >X+#elif defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD) // Q_OS_MAC >X #include "platform/linux/main_window_linux.h" >X-#elif defined Q_OS_WIN // Q_OS_MAC || Q_OS_LINUX >X+#elif defined Q_OS_WIN // Q_OS_MAC || Q_OS_LINUX || Q_OS_FREEBSD >X #include "platform/win/main_window_win.h" >X-#endif // Q_OS_MAC || Q_OS_LINUX || Q_OS_WIN >X+#endif // Q_OS_MAC || Q_OS_LINUX || Q_OS_WIN || Q_OS_FREEBSD >Xdiff --git a/Telegram/SourceFiles/platform/platform_notifications_manager.h b/Telegram/SourceFiles/platform/platform_notifications_manager.h >Xindex e303272e..c53179fa 100644 >X--- a/Telegram/SourceFiles/platform/platform_notifications_manager.h >X+++ b/Telegram/SourceFiles/platform/platform_notifications_manager.h >X@@ -39,8 +39,8 @@ void FlashBounce(); >X >X #ifdef Q_OS_MAC >X #include "platform/mac/notifications_manager_mac.h" >X-#elif defined Q_OS_LINUX // Q_OS_MAC >X+#elif defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD) // Q_OS_MAC >X #include "platform/linux/notifications_manager_linux.h" >X-#elif defined Q_OS_WIN // Q_OS_MAC || Q_OS_LINUX >X+#elif defined Q_OS_WIN // Q_OS_MAC || Q_OS_LINUX || Q_OS_FREEBSD >X #include "platform/win/notifications_manager_win.h" >X-#endif // Q_OS_MAC || Q_OS_LINUX || Q_OS_WIN >X+#endif // Q_OS_MAC || Q_OS_LINUX || Q_OS_WIN || Q_OS_FREEBSD >Xdiff --git a/Telegram/SourceFiles/platform/platform_specific.h b/Telegram/SourceFiles/platform/platform_specific.h >Xindex 359b0476..87e0fba7 100644 >X--- a/Telegram/SourceFiles/platform/platform_specific.h >X+++ b/Telegram/SourceFiles/platform/platform_specific.h >X@@ -45,8 +45,8 @@ void finish(); >X >X #ifdef Q_OS_MAC >X #include "platform/mac/specific_mac.h" >X-#elif defined Q_OS_LINUX // Q_OS_MAC >X+#elif defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD) // Q_OS_MAC >X #include "platform/linux/specific_linux.h" >X-#elif defined Q_OS_WIN // Q_OS_MAC || Q_OS_LINUX >X+#elif defined Q_OS_WIN // Q_OS_MAC || Q_OS_LINUX || Q_OS_FREEBSD >X #include "platform/win/specific_win.h" >X-#endif // Q_OS_MAC || Q_OS_LINUX || Q_OS_WIN >X+#endif // Q_OS_MAC || Q_OS_LINUX || Q_OS_WIN || Q_OS_FREEBSD >Xdiff --git a/Telegram/SourceFiles/platform/platform_window_title.h b/Telegram/SourceFiles/platform/platform_window_title.h >Xindex 1d0d892a..d802f35f 100644 >X--- a/Telegram/SourceFiles/platform/platform_window_title.h >X+++ b/Telegram/SourceFiles/platform/platform_window_title.h >X@@ -38,7 +38,7 @@ void PreviewWindowFramePaint(QImage &preview, const style::palette &palette, QRe >X #include "platform/mac/window_title_mac.h" >X #elif defined Q_OS_WIN // Q_OS_MAC >X #include "platform/win/window_title_win.h" >X-#elif defined Q_OS_WINRT || defined Q_OS_LINUX // Q_OS_MAC || Q_OS_WIN >X+#elif defined Q_OS_WINRT || defined Q_OS_LINUX || defined Q_OS_FREEBSD // Q_OS_MAC || Q_OS_WIN >X >X namespace Platform { >X >X@@ -56,4 +56,4 @@ inline void PreviewWindowFramePaint(QImage &preview, const style::palette &palet >X >X } // namespace Platform >X >X-#endif // Q_OS_MAC || Q_OS_WIN || Q_OS_WINRT || Q_OS_LINUX >X+#endif // Q_OS_MAC || Q_OS_WIN || Q_OS_WINRT || Q_OS_LINUX || Q_OS_FREEBSD >Xdiff --git a/Telegram/SourceFiles/qt_functions.cpp b/Telegram/SourceFiles/qt_functions.cpp >Xnew file mode 100644 >Xindex 00000000..4a722b8d >X--- /dev/null >X+++ b/Telegram/SourceFiles/qt_functions.cpp >X@@ -0,0 +1,94 @@ >X+/**************************************************************************** >X+** >X+** Copyright (C) 2015 The Qt Company Ltd. >X+** Contact: http://www.qt.io/licensing/ >X+** >X+** This file contains some parts of the Qt Toolkit. >X+** >X+** $QT_BEGIN_LICENSE:LGPL21$ >X+** Commercial License Usage >X+** Licensees holding valid commercial Qt licenses may use this file in >X+** accordance with the commercial license agreement provided with the >X+** Software or, alternatively, in accordance with the terms contained in >X+** a written agreement between you and The Qt Company. For licensing terms >X+** and conditions see http://www.qt.io/terms-conditions. For further >X+** information use the contact form at http://www.qt.io/contact-us. >X+** >X+** GNU Lesser General Public License Usage >X+** Alternatively, this file may be used under the terms of the GNU Lesser >X+** General Public License version 2.1 or version 3 as published by the Free >X+** Software Foundation and appearing in the file LICENSE.LGPLv21 and >X+** LICENSE.LGPLv3 included in the packaging of this file. Please review the >X+** following information to ensure the GNU Lesser General Public License >X+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and >X+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. >X+** >X+** As a special exception, The Qt Company gives you certain additional >X+** rights. These rights are described in The Qt Company LGPL Exception >X+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. >X+** >X+** $QT_END_LICENSE$ >X+** >X+****************************************************************************/ >X+ >X+/* TODO: find a dynamic library with these symbols. */ >X+ >X+/* Debian maintainer: this function is taken from qfiledialog.cpp */ >X+/* >X+ Makes a list of filters from ;;-separated text. >X+ Used by the mac and windows implementations >X+*/ >X+QStringList qt_make_filter_list(const QString &filter) >X+{ >X+ QString f(filter); >X+ >X+ if (f.isEmpty()) >X+ return QStringList(); >X+ >X+ QString sep(QLatin1String(";;")); >X+ int i = f.indexOf(sep, 0); >X+ if (i == -1) { >X+ if (f.indexOf(QLatin1Char('\n'), 0) != -1) { >X+ sep = QLatin1Char('\n'); >X+ i = f.indexOf(sep, 0); >X+ } >X+ } >X+ >X+ return f.split(sep); >X+} >X+ >X+/* Debian maintainer: this constructor is taken from qtextengine.cpp for TextPainter::drawLine */ >X+QTextItemInt::QTextItemInt(const QGlyphLayout &g, QFont *font, const QChar *chars_, int numChars, QFontEngine *fe, const QTextCharFormat &format) >X+ : flags(0), justified(false), underlineStyle(QTextCharFormat::NoUnderline), charFormat(format), >X+ num_chars(numChars), chars(chars_), logClusters(0), f(font), glyphs(g), fontEngine(fe) >X+{ >X+} >X+ >X+/* Debian maintainer: this method is also taken from qtextengine.cpp */ >X+// Fix up flags and underlineStyle with given info >X+void QTextItemInt::initWithScriptItem(const QScriptItem &si) >X+{ >X+ // explicitly initialize flags so that initFontAttributes can be called >X+ // multiple times on the same TextItem >X+ flags = 0; >X+ if (si.analysis.bidiLevel %2) >X+ flags |= QTextItem::RightToLeft; >X+ ascent = si.ascent; >X+ descent = si.descent; >X+ >X+ if (charFormat.hasProperty(QTextFormat::TextUnderlineStyle)) { >X+ underlineStyle = charFormat.underlineStyle(); >X+ } else if (charFormat.boolProperty(QTextFormat::FontUnderline) >X+ || f->d->underline) { >X+ underlineStyle = QTextCharFormat::SingleUnderline; >X+ } >X+ >X+ // compat >X+ if (underlineStyle == QTextCharFormat::SingleUnderline) >X+ flags |= QTextItem::Underline; >X+ >X+ if (f->d->overline || charFormat.fontOverline()) >X+ flags |= QTextItem::Overline; >X+ if (f->d->strikeOut || charFormat.fontStrikeOut()) >X+ flags |= QTextItem::StrikeOut; >X+} >Xdiff --git a/Telegram/SourceFiles/qt_static_plugins.cpp b/Telegram/SourceFiles/qt_static_plugins.cpp >Xindex b975c7a8..0e0b9830 100644 >X--- a/Telegram/SourceFiles/qt_static_plugins.cpp >X+++ b/Telegram/SourceFiles/qt_static_plugins.cpp >X@@ -27,14 +27,5 @@ Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin) >X Q_IMPORT_PLUGIN(QWebpPlugin) >X Q_IMPORT_PLUGIN(QCocoaIntegrationPlugin) >X Q_IMPORT_PLUGIN(QGenericEnginePlugin) >X-#elif defined Q_OS_LINUX // Q_OS_WIN | Q_OS_MAC >X-Q_IMPORT_PLUGIN(QWebpPlugin) >X-Q_IMPORT_PLUGIN(QXcbIntegrationPlugin) >X-Q_IMPORT_PLUGIN(QConnmanEnginePlugin) >X-Q_IMPORT_PLUGIN(QGenericEnginePlugin) >X-Q_IMPORT_PLUGIN(QNetworkManagerEnginePlugin) >X-Q_IMPORT_PLUGIN(QComposePlatformInputContextPlugin) >X-Q_IMPORT_PLUGIN(QIbusPlatformInputContextPlugin) >X-Q_IMPORT_PLUGIN(QFcitxPlatformInputContextPlugin) >X-Q_IMPORT_PLUGIN(QHimePlatformInputContextPlugin) >X-#endif // Q_OS_WIN | Q_OS_MAC | Q_OS_LINUX >X+#elif defined Q_OS_LINUX || defined Q_OS_FREEBSD // Q_OS_WIN | Q_OS_MAC >X+#endif // Q_OS_WIN | Q_OS_MAC | Q_OS_LINUX | Q_OS_FREEBSD >Xdiff --git a/Telegram/SourceFiles/structs.cpp b/Telegram/SourceFiles/structs.cpp >Xindex f025a536..bfa1875e 100644 >X--- a/Telegram/SourceFiles/structs.cpp >X+++ b/Telegram/SourceFiles/structs.cpp >X@@ -1280,7 +1280,7 @@ QString saveFileName(const QString &title, const QString &filter, const QString >X name = name.replace(QRegularExpression(qsl("[\\\\\\/\\:\\*\\?\\\"\\<\\>\\|]")), qsl("_")); >X #elif defined Q_OS_MAC >X name = name.replace(QRegularExpression(qsl("[\\:]")), qsl("_")); >X-#elif defined Q_OS_LINUX >X+#elif defined Q_OS_LINUX || defined Q_OS_FREEBSD >X name = name.replace(QRegularExpression(qsl("[\\/]")), qsl("_")); >X #endif >X if (Global::AskDownloadPath() || savingAs) { >Xdiff --git a/Telegram/SourceFiles/ui/text/text.cpp b/Telegram/SourceFiles/ui/text/text.cpp >Xindex d18a8ea5..2c58287e 100644 >X--- a/Telegram/SourceFiles/ui/text/text.cpp >X+++ b/Telegram/SourceFiles/ui/text/text.cpp >X@@ -1689,11 +1689,11 @@ private: >X if (item == -1) >X return; >X >X-#ifdef OS_MAC_OLD >X+#if defined(OS_MAC_OLD) || QT_VERSION < QT_VERSION_CHECK(5, 6, 0) >X auto end = _e->findItem(line.from + line.length - 1); >X-#else // OS_MAC_OLD >X+#else >X auto end = _e->findItem(line.from + line.length - 1, item); >X-#endif // OS_MAC_OLD >X+#endif >X >X auto blockIndex = _lineStartBlock; >X auto currentBlock = _t->_blocks[blockIndex].get(); >Xdiff --git a/Telegram/SourceFiles/ui/text/text_block.cpp b/Telegram/SourceFiles/ui/text/text_block.cpp >Xindex f89644e1..35230cfc 100644 >X--- a/Telegram/SourceFiles/ui/text/text_block.cpp >X+++ b/Telegram/SourceFiles/ui/text/text_block.cpp >X@@ -330,7 +330,7 @@ TextBlock::TextBlock(const style::font &font, const QString &str, QFixed minResi >X SignalHandlers::setCrashAnnotationRef("CrashString", &part); >X >X QStackTextEngine engine(part, blockFont->f); >X- QTextLayout layout(&engine); >X+ QTextLayout layout(part, blockFont->f); >X layout.beginLayout(); >X layout.createLine(); >X >Xdiff --git a/Telegram/SourceFiles/ui/twidget.cpp b/Telegram/SourceFiles/ui/twidget.cpp >Xindex e9848ef2..dcee47ee 100644 >X--- a/Telegram/SourceFiles/ui/twidget.cpp >X+++ b/Telegram/SourceFiles/ui/twidget.cpp >X@@ -191,9 +191,9 @@ void sendSynteticMouseEvent(QWidget *widget, QEvent::Type type, Qt::MouseButton >X , button >X , QGuiApplication::mouseButtons() | button >X , QGuiApplication::keyboardModifiers() >X-#ifndef OS_MAC_OLD >X+#if !defined(OS_MAC_OLD) && QT_VERSION >= QT_VERSION_CHECK(5, 6, 0) >X , Qt::MouseEventSynthesizedByApplication >X-#endif // OS_MAC_OLD >X+#endif >X ); >X ev.setTimestamp(getms()); >X QGuiApplication::sendEvent(windowHandle, &ev); >Xdiff --git a/Telegram/gyp/PrecompiledHeader.cmake b/Telegram/gyp/PrecompiledHeader.cmake >Xindex 5d6830e9..3ce7c5a2 100644 >X--- a/Telegram/gyp/PrecompiledHeader.cmake >X+++ b/Telegram/gyp/PrecompiledHeader.cmake >X@@ -79,7 +79,7 @@ function(export_all_flags _filename _source_name_for_flags) >X endfunction() >X >X function(add_precompiled_header _target _input) >X- if(CMAKE_COMPILER_IS_GNUCXX) >X+ if(CMAKE_COMPILER_IS_GNUCXX OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang")) >X get_filename_component(_name ${_input} NAME) >X set(_pch_header "${CMAKE_CURRENT_SOURCE_DIR}/${_input}") >X set(_pch_binary_dir "${CMAKE_CURRENT_BINARY_DIR}/${_target}_pch") >X@@ -112,7 +112,7 @@ function(add_precompiled_header _target _input) >X set(_compiler_FLAGS "@${_pch_c_flags_file}") >X add_custom_command( >X OUTPUT "${_output_c}" >X- COMMAND "${CMAKE_C_COMPILER}" ${_compiler_FLAGS} -x c-header -o "${_output_c}" -c "${_pchfile}" >X+ COMMAND "${CMAKE_C_COMPILER}" "$(C_DEFINES)" "$(C_INCLUDES)" "$(C_FLAGS)" -x c-header -o "${_output_c}" -c "${_pchfile}" >X DEPENDS "${_pchfile}" "${_pch_c_flags_file}" >X IMPLICIT_DEPENDS C "${_pch_header}" >X COMMENT "Precompiling ${_name} for ${_target} (C)") >X@@ -123,7 +123,7 @@ function(add_precompiled_header _target _input) >X set(_compiler_FLAGS "@${_pch_cpp_flags_file}") >X add_custom_command( >X OUTPUT "${_output_cxx}" >X- COMMAND "${CMAKE_CXX_COMPILER}" ${_compiler_FLAGS} -x c++-header -o "${_output_cxx}" -c "${_pchfile}" >X+ COMMAND "${CMAKE_CXX_COMPILER}" "$(CXX_DEFINES)" "$(CXX_INCLUDES)" "$(CXX_FLAGS)" -x c++-header -o "${_output_cxx}" -c "${_pchfile}" >X DEPENDS "${_pchfile}" "${_pch_cpp_flags_file}" >X IMPLICIT_DEPENDS CXX "${_pch_header}" >X COMMENT "Precompiling ${_name} for ${_target} (C++)") >X@@ -161,5 +161,5 @@ function(add_precompiled_header _target _input) >X OBJECT_DEPENDS "${_object_depends}") >X endif() >X endforeach() >X- endif(CMAKE_COMPILER_IS_GNUCXX) >X+ endif(CMAKE_COMPILER_IS_GNUCXX OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang")) >X endfunction() >Xdiff --git a/Telegram/gyp/Telegram.gyp b/Telegram/gyp/Telegram.gyp >Xindex 0d1f38aa..40821f66 100644 >X--- a/Telegram/gyp/Telegram.gyp >X+++ b/Telegram/gyp/Telegram.gyp >X@@ -80,12 +80,10 @@ >X 'codegen.gyp:codegen_numbers', >X 'codegen.gyp:codegen_style', >X 'tests/tests.gyp:tests', >X- 'utils.gyp:Updater', >X '../ThirdParty/libtgvoip/libtgvoip.gyp:libtgvoip', >X ], >X >X 'defines': [ >X- 'AL_LIBTYPE_STATIC', >X 'AL_ALEXT_PROTOTYPES', >X 'TGVOIP_USE_CXX11_LIB', >X '<!@(python -c "for s in \'<(build_defines)\'.split(\',\'): print(s)")', >X@@ -94,14 +92,7 @@ >X 'include_dirs': [ >X '<(src_loc)', >X '<(SHARED_INTERMEDIATE_DIR)', >X- '<(libs_loc)/breakpad/src', >X- '<(libs_loc)/lzma/C', >X- '<(libs_loc)/libexif-0.6.20', >X- '<(libs_loc)/zlib-1.2.8', >X- '<(libs_loc)/ffmpeg', >X- '<(libs_loc)/openal-soft/include', >X- '<(libs_loc)/opus/include', >X- '<(minizip_loc)', >X+ '%%LOCALBASE%%/include/minizip', >X '<(sp_media_key_tap_loc)', >X '<(emoji_suggestions_loc)', >X '<(submodules_loc)/GSL/include', >X@@ -113,7 +104,7 @@ >X '<!@(<(list_sources_command) <(qt_moc_list_sources_arg))', >X ], >X 'sources!': [ >X- '<!@(<(list_sources_command) <(qt_moc_list_sources_arg) --exclude_for <(build_os))', >X+ '<!@(<(list_sources_command) <(qt_moc_list_sources_arg) --exclude_for linux)', >X ], >X 'conditions': [ >X [ '"<(official_build_target)" != ""', { >Xdiff --git a/Telegram/gyp/common.gypi b/Telegram/gyp/common.gypi >Xindex 9d9e67a3..848d3519 100644 >X--- a/Telegram/gyp/common.gypi >X+++ b/Telegram/gyp/common.gypi >X@@ -42,7 +42,7 @@ >X }, { >X 'build_mac': 0, >X }], >X- [ 'build_os == "linux"', { >X+ [ 'build_os == "freebsd"', { >X 'build_linux': 1, >X }, { >X 'build_linux': 0, >Xdiff --git a/Telegram/gyp/qt.gypi b/Telegram/gyp/qt.gypi >Xindex 6032d066..796a564e 100644 >X--- a/Telegram/gyp/qt.gypi >X+++ b/Telegram/gyp/qt.gypi >X@@ -27,25 +27,21 @@ >X [ 'build_macold', { >X 'qt_version%': '5.3.2', >X }, { >X- 'qt_version%': '5.6.2', >X+ 'qt_version%': '%%QT_VERSION%%', >X }] >X ], >X }, >X 'qt_libs': [ >X- 'qwebp', >X- 'Qt5PrintSupport', >X- 'Qt5PlatformSupport', >X 'Qt5Network', >X 'Qt5Widgets', >X 'Qt5Gui', >X- 'qtharfbuzzng', >X ], >X 'qt_version%': '<(qt_version)', >X 'conditions': [ >X [ 'build_macold', { >X 'linux_path_qt%': '/usr/local/macold/Qt-<(qt_version)', >X }, { >X- 'linux_path_qt%': '/usr/local/tdesktop/Qt-<(qt_version)', >X+ 'linux_path_qt%': '/usr/lib/qt', >X }] >X ] >X }, >X@@ -85,32 +81,12 @@ >X ], >X }], >X [ 'build_linux', { >X- 'qt_lib_prefix': 'lib', >X- 'qt_lib_debug_postfix': '.a', >X- 'qt_lib_release_postfix': '.a', >X+ 'qt_lib_prefix': '', >X+ 'qt_lib_debug_postfix': '', >X+ 'qt_lib_release_postfix': '', >X 'qt_libs': [ >X- 'qxcb', >X- 'Qt5XcbQpa', >X- 'qconnmanbearer', >X- 'qgenericbearer', >X- 'qnmbearer', >X '<@(qt_libs)', >X- 'Qt5DBus', >X 'Qt5Core', >X- 'qtpcre', >X- 'Xi', >X- 'Xext', >X- 'Xfixes', >X- 'SM', >X- 'ICE', >X- 'fontconfig', >X- 'expat', >X- 'freetype', >X- 'z', >X- 'xcb-shm', >X- 'xcb-xfixes', >X- 'xcb-render', >X- 'xcb-static', >X ], >X }], >X ], >X@@ -140,11 +116,6 @@ >X # '<!@(python <(DEPTH)/list_sources.py [sources] <(qt_moc_list_sources_arg))' >X # where [sources] contains all your source files >X 'qt_moc_list_sources_arg': '--moc-prefix SHARED_INTERMEDIATE_DIR/<(_target_name)/moc/moc_', >X- >X- 'linux_path_xkbcommon%': '/usr/local', >X- 'linux_lib_ssl%': '/usr/local/ssl/lib/libssl.a', >X- 'linux_lib_crypto%': '/usr/local/ssl/lib/libcrypto.a', >X- 'linux_lib_icu%': '/usr/lib/libicutu.a /usr/lib/libicui18n.a /usr/lib/libicuuc.a /usr/lib/libicudata.a', >X }, >X >X 'configurations': { >X@@ -193,15 +164,17 @@ >X }, >X >X 'include_dirs': [ >X- '<(qt_loc)/include', >X- '<(qt_loc)/include/QtCore', >X- '<(qt_loc)/include/QtGui', >X- '<(qt_loc)/include/QtCore/<(qt_version)', >X- '<(qt_loc)/include/QtGui/<(qt_version)', >X- '<(qt_loc)/include/QtCore/<(qt_version)/QtCore', >X- '<(qt_loc)/include/QtGui/<(qt_version)/QtGui', >X+ '%%LOCALBASE%%/include/qt5', >X+ '%%LOCALBASE%%/include/qt5/QtCore', >X+ '%%LOCALBASE%%/include/qt5/QtGui', >X+ '%%LOCALBASE%%/include/qt5/QtCore/<(qt_version)', >X+ '%%LOCALBASE%%/include/qt5/QtGui/<(qt_version)', >X+ '%%LOCALBASE%%/include/qt5/QtCore/<(qt_version)/QtCore', >X+ '%%LOCALBASE%%/include/qt5/QtGui/<(qt_version)/QtGui', >X ], >X 'library_dirs': [ >X+ '%%LOCALBASE%%/lib', >X+ '%%LOCALBASE%%/lib/qt5/', >X '<(qt_loc)/lib', >X '<(qt_loc)/plugins', >X '<(qt_loc)/plugins/bearer', >X@@ -220,25 +193,20 @@ >X '<(qt_loc)/plugins/platforminputcontexts', >X ], >X 'libraries': [ >X- '<(linux_path_xkbcommon)/lib/libxkbcommon.a', >X '<@(qt_libs_release)', >X- '<(linux_lib_ssl)', >X- '<(linux_lib_crypto)', >X- '<!@(python -c "for s in \'<(linux_lib_icu)\'.split(\' \'): print(s)")', >X+ '-lcrypto', >X '-lxcb', >X '-lX11', >X '-lX11-xcb', >X '-ldbus-1', >X- '-ldl', >X '-lgthread-2.0', >X '-lglib-2.0', >X '-lpthread', >X ], >X 'include_dirs': [ >X- '<(qt_loc)/mkspecs/linux-g++', >X+ '%%LOCALBASE%%/lib/qt5/mkspecs/freebsd-clang', >X ], >X 'ldflags': [ >X- '-static-libstdc++', >X '-pthread', >X '-g', >X '-rdynamic', >X@@ -260,7 +228,7 @@ >X '<(SHARED_INTERMEDIATE_DIR)/<(_target_name)/moc/moc_<(RULE_INPUT_ROOT).cpp', >X ], >X 'action': [ >X- '<(qt_loc)/bin/moc<(exe_ext)', >X+ '%%LOCALBASE%%/bin/moc', >X >X # Silence "Note: No relevant classes found. No output generated." >X '--no-notes', >Xdiff --git a/Telegram/gyp/qt_rcc.gypi b/Telegram/gyp/qt_rcc.gypi >Xindex eebc6967..a088065a 100644 >X--- a/Telegram/gyp/qt_rcc.gypi >X+++ b/Telegram/gyp/qt_rcc.gypi >X@@ -28,7 +28,7 @@ >X '<(SHARED_INTERMEDIATE_DIR)/<(_target_name)/qrc/qrc_<(RULE_INPUT_ROOT).cpp', >X ], >X 'action': [ >X- '<(qt_loc)/bin/rcc<(exe_ext)', >X+ '%%LOCALBASE%%/bin/rcc', >X '-name', '<(RULE_INPUT_ROOT)', >X '-no-compress', >X '<(RULE_INPUT_PATH)', >Xdiff --git a/Telegram/gyp/settings_linux.gypi b/Telegram/gyp/settings_linux.gypi >Xindex fde88dcd..ca149b85 100644 >X--- a/Telegram/gyp/settings_linux.gypi >X+++ b/Telegram/gyp/settings_linux.gypi >X@@ -25,7 +25,6 @@ >X '-pipe', >X '-g', >X '-Wall', >X- '-Werror', >X '-W', >X '-fPIC', >X '-Wno-unused-variable', >X@@ -61,7 +60,6 @@ >X ], >X 'defines': [ >X '_REENTRANT', >X- 'QT_STATICPLUGIN', >X 'QT_PLUGIN', >X ], >X 'cflags_c': [ >Xdiff --git a/Telegram/gyp/telegram_linux.gypi b/Telegram/gyp/telegram_linux.gypi >Xindex 2c464928..bf353a32 100644 >X--- a/Telegram/gyp/telegram_linux.gypi >X+++ b/Telegram/gyp/telegram_linux.gypi >X@@ -33,7 +33,7 @@ >X 'linux_path_va%': '/usr/local', >X 'linux_path_vdpau%': '/usr/local', >X 'linux_path_breakpad%': '<(libs_loc)/breakpad', >X- 'linux_path_opus_include%': '<(libs_loc)/opus/include', >X+ 'linux_path_opus_include%': '%%LOCALBASE%%/include/opus', >X }, >X 'include_dirs': [ >X '/usr/local/include', >X@@ -52,48 +52,34 @@ >X '<(linux_path_breakpad)/lib', >X ], >X 'libraries': [ >X- 'breakpad_client', >X- 'composeplatforminputcontextplugin', >X- 'ibusplatforminputcontextplugin', >X- 'fcitxplatforminputcontextplugin', >X- 'himeplatforminputcontextplugin', >X- 'liblzma.a', >X- 'libopenal.a', >X- 'libavformat.a', >X- 'libavcodec.a', >X- 'libswresample.a', >X- 'libswscale.a', >X- 'libavutil.a', >X- 'libopus.a', >X- 'libva-x11.a', >X- 'libva-drm.a', >X- 'libva.a', >X- 'libvdpau.a', >X- 'libdrm.a', >X- 'libz.a', >X+ 'openal', >X+ 'avformat', >X+ 'avcodec', >X+ 'swresample', >X+ 'swscale', >X+ 'avutil', >X+ 'minizip', >X+ 'opus', >X+ 'z', >X # '<!(pkg-config 2> /dev/null --libs <@(pkgconfig_libs))', >X ], >X 'cflags_cc': [ >X- '<!(pkg-config 2> /dev/null --cflags appindicator-0.1)', >X- '<!(pkg-config 2> /dev/null --cflags gtk+-2.0)', >X- '<!(pkg-config 2> /dev/null --cflags glib-2.0)', >X+# '<!(pkg-config 2> /dev/null --cflags appindicator-0.1)', >X+ '<!(pkg-config 2> /dev/null --cflags gtk+-3.0)', >X '<!(pkg-config 2> /dev/null --cflags dee-1.0)', >X ], >X 'configurations': { >X 'Release': { >X 'cflags': [ >X- '-Ofast', >X- '-flto', >X+ '-O2', >X '-fno-strict-aliasing', >X ], >X 'cflags_cc': [ >X- '-Ofast', >X- '-flto', >X+ '-O2', >X '-fno-strict-aliasing', >X ], >X 'ldflags': [ >X- '-Ofast', >X- '-flto', >X+ '-O2', >X ], >X }, >X }, >Xdiff --git a/Telegram/gyp/telegram_sources.txt b/Telegram/gyp/telegram_sources.txt >Xindex ef66965f..81852d10 100644 >X--- a/Telegram/gyp/telegram_sources.txt >X+++ b/Telegram/gyp/telegram_sources.txt >X@@ -598,14 +598,7 @@ >X <(emoji_suggestions_loc)/emoji_suggestions.cpp >X <(emoji_suggestions_loc)/emoji_suggestions.h >X >X-platforms: !win >X-<(minizip_loc)/crypt.h >X-<(minizip_loc)/ioapi.c >X-<(minizip_loc)/ioapi.h >X-<(minizip_loc)/zip.c >X-<(minizip_loc)/zip.h >X-<(minizip_loc)/unzip.c >X-<(minizip_loc)/unzip.h >X+<(src_loc)/qt_functions.cpp >X >X platforms: mac >X <(sp_media_key_tap_loc)/SPMediaKeyTap.m >53e9508519c80fe49fc361e20e6e78d2 >echo x - telegram-desktop/files/CMakeLists.inj >sed 's/^X//' >telegram-desktop/files/CMakeLists.inj << '90406da963583c19197616f9c3e51ee8' >X# ------------- debian/CMakeLists.inj begin ------------- >X# The text will be putted into the appropriate CMakeLists by debian/rules script >X >X# Avoid rpath compiler parameter >Xset_target_properties(Telegram PROPERTIES SKIP_BUILD_RPATH TRUE) >X >X# This makes up for patch of gyp utility, supporting precompiled headers. If >X# Telegram/Patches/gyp.diff file will be changed in future, please check these >X# lines. >Xinclude(../../Telegram/gyp/PrecompiledHeader.cmake) >Xadd_precompiled_header(Telegram ../../Telegram/SourceFiles/stdafx.h) >X >X# vim: ft=cmake >X# -------------- debian/CMakeLists.inj end -------------- >90406da963583c19197616f9c3e51ee8 >echo x - telegram-desktop/files/patch-libtgvoip >sed 's/^X//' >telegram-desktop/files/patch-libtgvoip << '7e82ba6f6f31d16e8f2e29fff839e115' >Xdiff --git a/audio/AudioInput.cpp b/audio/AudioInput.cpp >Xindex 674b955..9c02546 100644 >X--- a/audio/AudioInput.cpp >X+++ b/audio/AudioInput.cpp >X@@ -20,7 +20,7 @@ >X #include "../os/windows/AudioInputWave.h" >X #endif >X #include "../os/windows/AudioInputWASAPI.h" >X-#elif defined(__linux__) >X+#elif defined(__linux__) || defined(__FreeBSD__) >X #include "../os/linux/AudioInputALSA.h" >X #include "../os/linux/AudioInputPulse.h" >X #else >Xdiff --git a/audio/AudioOutput.cpp b/audio/AudioOutput.cpp >Xindex 4f5fdfa..594168d 100644 >X--- a/audio/AudioOutput.cpp >X+++ b/audio/AudioOutput.cpp >X@@ -21,7 +21,7 @@ >X #include "../os/windows/AudioOutputWave.h" >X #endif >X #include "../os/windows/AudioOutputWASAPI.h" >X-#elif defined(__linux__) >X+#elif defined(__linux__) || defined(__FreeBSD__) >X #include "../os/linux/AudioOutputALSA.h" >X #include "../os/linux/AudioOutputPulse.h" >X #else >Xdiff --git a/libtgvoip.gyp b/libtgvoip.gyp >Xindex 52fbea1..6ec864a 100644 >X--- a/libtgvoip.gyp >X+++ b/libtgvoip.gyp >X@@ -13,11 +13,12 @@ >X 'variables': { >X 'tgvoip_src_loc': '.', >X 'official_build_target%': '', >X- 'linux_path_opus_include%': '<(DEPTH)/../../../Libraries/opus/include', >X+ 'linux_path_opus_include%': '%%LOCALBASE%%/include/opus', >X }, >X 'include_dirs': [ >X '<(tgvoip_src_loc)/webrtc_dsp', >X '<(linux_path_opus_include)', >X+ '%%LOCALBASE%%/include/', >X ], >X 'direct_dependent_settings': { >X 'include_dirs': [ >X@@ -371,12 +372,13 @@ >X }, >X ], >X [ >X- '"<(OS)" == "linux"', { >X+ '"<(OS)" == "freebsd"', { >X 'defines': [ >X 'WEBRTC_POSIX', >X ], >X 'cflags_cc': [ >X '-msse2', >X+ '-std=c++11', >X ], >X 'direct_dependent_settings': { >X 'libraries': [ >Xdiff --git a/os/posix/NetworkSocketPosix.cpp b/os/posix/NetworkSocketPosix.cpp >Xindex 7fa7063..aa14368 100644 >X--- a/os/posix/NetworkSocketPosix.cpp >X+++ b/os/posix/NetworkSocketPosix.cpp >X@@ -45,6 +45,7 @@ void NetworkSocketPosix::SetMaxPriority(){ >X if(res<0){ >X LOGE("error setting darwin-specific net priority: %d / %s", errno, strerror(errno)); >X } >X+#elif defined(__FreeBSD__) >X #else >X int prio=5; >X int res=setsockopt(fd, SOL_SOCKET, SO_PRIORITY, &prio, sizeof(prio)); >Xdiff --git a/threading.h b/threading.h >Xindex 8a6f438..cc6eac6 100644 >X--- a/threading.h >X+++ b/threading.h >X@@ -20,7 +20,7 @@ typedef pthread_cond_t tgvoip_lock_t; >X #define start_thread(ref, entry, arg) pthread_create(&ref, NULL, entry, arg) >X #define join_thread(thread) pthread_join(thread, NULL) >X #ifndef __APPLE__ >X-#define set_thread_name(thread, name) pthread_setname_np(thread, name) >X+#define set_thread_name(thread, name) >X #else >X #define set_thread_name(thread, name) >X #endif >Xdiff --git a/webrtc_dsp/webrtc/base/stringutils.h b/webrtc_dsp/webrtc/base/stringutils.h >Xindex 51fd488..cb5fc18 100644 >X--- a/webrtc_dsp/webrtc/base/stringutils.h >X+++ b/webrtc_dsp/webrtc/base/stringutils.h >X@@ -23,7 +23,7 @@ >X #endif // WEBRTC_WIN >X >X #if defined(WEBRTC_POSIX) >X-#ifdef BSD >X+#if defined BSD || defined __FreeBSD__ >X #include <stdlib.h> >X #else // BSD >X #include <alloca.h> >7e82ba6f6f31d16e8f2e29fff839e115 >echo x - telegram-desktop/pkg-descr >sed 's/^X//' >telegram-desktop/pkg-descr << '36985d6a52efa05171e71a471fa551fc' >XTelegram Desktop messaging app. Fast and secure desktop app, perfectly synced >Xwith your mobile phone. >X >XWWW: https://desktop.telegram.org/ >36985d6a52efa05171e71a471fa551fc >echo x - telegram-desktop/Makefile >sed 's/^X//' >telegram-desktop/Makefile << '8e6cc70b378c9c187e2171d51d14f9bb' >X# Created by: Henry Hu <henry.hu.sh@gmail.com> >X# $FreeBSD$ >X >XPORTNAME= telegram-desktop >XPORTVERSION= 1.1.23 >XDISTVERSIONPREFIX= v >XCATEGORIES= net-im >X >XMAINTAINER= henry.hu.sh@gmail.com >XCOMMENT= Telegram Desktop messaging app >X >XLICENSE= GPLv3 >XLICENSE_FILE= ${WRKSRC}/LICENSE >X >XBUILD_DEPENDS= gyp:devel/py-gyp \ >X python:lang/python \ >X dee>=0:devel/dee \ >X ${LOCALBASE}/include/pulse/pulseaudio.h:audio/pulseaudio \ >X ${LOCALBASE}/include/alsa/asoundlib.h:audio/alsa-lib >XLIB_DEPENDS= libopenal.so:audio/openal-soft \ >X libminizip.so:archivers/minizip \ >X libavformat.so:multimedia/ffmpeg \ >X libopus.so:audio/opus \ >X libdbus-1.so:devel/dbus >X >XUSE_GITHUB= yes >XGH_ACCOUNT= telegramdesktop Microsoft:gsl mapbox:variant catchorg:catch >XGH_PROJECT= tdesktop libtgvoip:libtgvoip GSL:gsl variant:variant Catch2:catch >XGH_TAGNAME= v${PORTVERSION} 757a5d8e:libtgvoip c5851a8:gsl 550ac2f:variant 5ca44b68:catch >XGH_SUBDIR= Telegram/ThirdParty/libtgvoip:libtgvoip \ >X Telegram/ThirdParty/GSL:gsl \ >X Telegram/ThirdParty/variant:variant \ >X Telegram/ThirdParty/Catch:catch >X >XUSES= ssl cmake:noninja,outsource gmake pkgconfig >XUSE_QT5= buildtools_build core gui widgets network imageformats qmake_build >XUSE_XORG= xcb x11 >XUSE_GNOME= glib20 gtk30 >X >XPLIST_FILES= bin/Telegram >X >XCMAKE_SOURCE_PATH= ${WRKSRC}/out/Release >X >XGYP_DEFINES= TDESKTOP_DISABLE_CRASH_REPORTS,TDESKTOP_DISABLE_AUTOUPDATE,TDESKTOP_DISABLE_REGISTER_CUSTOM_SCHEME >X >Xpre-configure: >X cd ${WRKSRC} && gyp \ >X -Dbuild_defines=${GYP_DEFINES} \ >X -Gconfig=Release \ >X --depth=Telegram/gyp --generator-output=../.. -Goutput_dir=out Telegram/gyp/Telegram.gyp --format=cmake >X TOT=`wc -l < ${WRKSRC}/out/Release/CMakeLists.txt` && NUM=`expr $$TOT - 2` && \ >X ${SED} -i -e "$$NUM r ${FILESDIR}/CMakeLists.inj" ${WRKSRC}/out/Release/CMakeLists.txt >X >Xdo-patch: >X cd ${WRKSRC} && \ >X ${SED} -e "s/%%QT_VERSION%%/${QT5_VERSION}/" ${FILESDIR}/patch-tdesktop | \ >X ${SED} -e "s#%%LOCALBASE%%#${LOCALBASE}#" | \ >X ${PATCH} -s -p1 >X cd ${WRKSRC}/Telegram/ThirdParty/libtgvoip && \ >X ${SED} -e "s#%%LOCALBASE%%#${LOCALBASE}#" ${FILESDIR}/patch-libtgvoip | \ >X ${PATCH} -s -p1 >X >Xdo-install: >X ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/Telegram ${STAGEDIR}${PREFIX}/bin >X >X.include <bsd.port.mk> >8e6cc70b378c9c187e2171d51d14f9bb >echo x - telegram-desktop/distinfo >sed 's/^X//' >telegram-desktop/distinfo << '8393ec4f07a95f98e8fc6f9ed6c78b43' >XTIMESTAMP = 1512711381 >XSHA256 (telegramdesktop-tdesktop-v1.1.23_GH0.tar.gz) = 56b7fce84adf85a4af1c3174353169f32d0b0c052a4e7a284fc741fa96b04030 >XSIZE (telegramdesktop-tdesktop-v1.1.23_GH0.tar.gz) = 16863984 >XSHA256 (Microsoft-GSL-c5851a8_GH0.tar.gz) = 32fae541af0bc21cdf83922740db6a3a00fbb9cb9ace323fbc038b608ac36956 >XSIZE (Microsoft-GSL-c5851a8_GH0.tar.gz) = 54462 >XSHA256 (mapbox-variant-550ac2f_GH0.tar.gz) = 7ab3aa7c9fa672027f13721584df5f7ec09c0ecca499d374c6ac76e147ef7354 >XSIZE (mapbox-variant-550ac2f_GH0.tar.gz) = 108686 >XSHA256 (catchorg-Catch2-5ca44b68_GH0.tar.gz) = 8cdf2a345897bda1aaabffd4496dffe263768cef3e4254e74ae63545c8e12cc2 >XSIZE (catchorg-Catch2-5ca44b68_GH0.tar.gz) = 375264 >XSHA256 (telegramdesktop-libtgvoip-757a5d8e_GH0.tar.gz) = a745c2c097f6a98bf9443d0cee9e375f279571a18dcb51bf06684eccf82eb9c6 >XSIZE (telegramdesktop-libtgvoip-757a5d8e_GH0.tar.gz) = 408328 >8393ec4f07a95f98e8fc6f9ed6c78b43 >exit >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 224193
:
188637
|
188638
|
188642
|
188672
|
188674
|
188679
|
188680
|
188698
|
188701