# 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: # # net-im/telegram-desktop # net-im/telegram-desktop/files # net-im/telegram-desktop/files/patch-libtgvoip # net-im/telegram-desktop/files/patch-tdesktop # net-im/telegram-desktop/files/CMakeLists.inj # net-im/telegram-desktop/files/patch-lib_xdg_tg.protocol # net-im/telegram-desktop/Makefile # net-im/telegram-desktop/distinfo # net-im/telegram-desktop/pkg-descr # net-im/telegram-desktop/pkg-plist # echo c - net-im/telegram-desktop mkdir -p net-im/telegram-desktop > /dev/null 2>&1 echo c - net-im/telegram-desktop/files mkdir -p net-im/telegram-desktop/files > /dev/null 2>&1 echo x - net-im/telegram-desktop/files/patch-libtgvoip sed 's/^X//' >net-im/telegram-desktop/files/patch-libtgvoip << 'c93228da27a16c49548a82898c6c6d69' 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 X #else // BSD X #include c93228da27a16c49548a82898c6c6d69 echo x - net-im/telegram-desktop/files/patch-tdesktop sed 's/^X//' >net-im/telegram-desktop/files/patch-tdesktop << '552c7133a9f1fa2ef1c18b8cb37b063a' 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 X struct vtable_once : public vtable_once_impl, Return, Args...> { X- static const vtable_once instance; X+ static const vtable_once* get_instance(); X }; X X template X-const vtable_once vtable_once::instance = {}; X+const vtable_once* vtable_once::get_instance() { X+ static vtable_once instance; X+ return &instance; X+} X X template struct vtable_impl; X X@@ -262,12 +265,14 @@ struct vtable_impl : public vtable_once_impl X struct vtable : public vtable_impl, Return, Args...> { X- static const vtable instance; X+ static const vtable* get_instance(); X }; X X template X-const vtable vtable::instance = {}; X- X+const vtable* vtable::get_instance() { X+ static vtable instance; X+ return &instance; X+} X } // namespace lambda_internal X X template X@@ -346,7 +351,7 @@ public: X // Copy / move construct / assign from an arbitrary type. X template ()(std::declval()...)),Return>::value>> X lambda_once(Lambda other) { X- data_.vtable = &lambda_internal::vtable_once::instance; X+ data_.vtable = lambda_internal::vtable_once::get_instance(); X lambda_internal::vtable_once::construct_move_lambda_method(data_.storage, &other); X } X template ()(std::declval()...)),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::instance; X+ data_.vtable = lambda_internal::vtable_once::get_instance(); X lambda_internal::vtable_once::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 ()(std::declval()...)),Return>::value>> X- lambda(Lambda other) : Parent(&lambda_internal::vtable::instance, typename Parent::Private()) { X+ lambda(Lambda other) : Parent(lambda_internal::vtable::get_instance(), typename Parent::Private()) { X lambda_internal::vtable::construct_move_lambda_method(this->data_.storage, &other); X } X template ()(std::declval()...)),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::instance; X+ this->data_.vtable = lambda_internal::vtable::get_instance(); X lambda_internal::vtable::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..4be9bd63 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@@ -281,6 +281,8 @@ inline const char *cApiSystemVersion() { X return "OS X"; X #elif defined Q_OS_LINUX X return "Linux"; X+#elif defined Q_OS_FREEBSD X+ return "FreeBSD"; X #endif X } 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(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 X+#endif X #include X #include X #define signals public X } // extern "C" X X #ifndef TDESKTOP_DISABLE_UNITY_INTEGRATION X-#include 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 ' /dev/null --libs <@(pkgconfig_libs))', X ], X 'cflags_cc': [ X- ' /dev/null --cflags appindicator-0.1)', X- ' /dev/null --cflags gtk+-2.0)', X- ' /dev/null --cflags glib-2.0)', X+# ' /dev/null --cflags appindicator-0.1)', X+ ' /dev/null --cflags gtk+-3.0)', X ' /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 552c7133a9f1fa2ef1c18b8cb37b063a echo x - net-im/telegram-desktop/files/CMakeLists.inj sed 's/^X//' >net-im/telegram-desktop/files/CMakeLists.inj << '10fff14e74db10d3966d827ffa7a73ad' 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 -------------- 10fff14e74db10d3966d827ffa7a73ad echo x - net-im/telegram-desktop/files/patch-lib_xdg_tg.protocol sed 's/^X//' >net-im/telegram-desktop/files/patch-lib_xdg_tg.protocol << 'b8d363408390246867b0c538efef527f' X--- lib/xdg/tg.protocol.orig 2017-12-09 20:42:47 UTC X+++ lib/xdg/tg.protocol X@@ -1,5 +1,5 @@ X [Protocol] X-exec=/usr/bin/telegram-desktop -- %u X+exec=telegram-desktop -- %u X protocol=tg X input=none X output=none b8d363408390246867b0c538efef527f echo x - net-im/telegram-desktop/Makefile sed 's/^X//' >net-im/telegram-desktop/Makefile << '112d078984cee093a071977ae335f9c8' X# $FreeBSD$ X XPORTNAME= telegram-desktop XDISTVERSIONPREFIX= v XDISTVERSION= 1.1.23 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= dee>0:devel/dee \ X gyp:devel/py-gyp \ X python:lang/python \ X ${LOCALBASE}/include/alsa/asoundlib.h:audio/alsa-lib \ X ${LOCALBASE}/include/pulse/pulseaudio.h:audio/pulseaudio XLIB_DEPENDS= libavformat.so:multimedia/ffmpeg \ X libdbus-1.so:devel/dbus \ X libminizip.so:archivers/minizip \ X libopenal.so:audio/openal-soft \ X libopus.so:audio/opus X XUSES= cmake:noninja,outsource desktop-file-utils gmake pkgconfig ssl 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 XUSE_QT5= core gui imageformats network widgets buildtools_build qmake_build XUSE_XORG= x11 xcb XUSE_GNOME= glib20 gtk30 XINSTALLS_ICONS= yes 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/telegram-desktop X ${INSTALL_DATA} ${WRKSRC}/lib/xdg/telegramdesktop.desktop ${STAGEDIR}${PREFIX}/share/applications X ${INSTALL} -d ${STAGEDIR}${PREFIX}/share/kservices5 X ${INSTALL_DATA} ${WRKSRC}/lib/xdg/tg.protocol ${STAGEDIR}${PREFIX}/share/kservices5 X ${INSTALL} -d ${STAGEDIR}${PREFIX}/share/appdata X ${INSTALL_DATA} ${WRKSRC}/lib/xdg/telegramdesktop.appdata.xml ${STAGEDIR}${PREFIX}/share/appdata X.for icon_size in 16 32 48 64 128 256 512 X ${INSTALL} -d ${STAGEDIR}${PREFIX}/share/icons/hicolor/${icon_size}x${icon_size}/apps X ${INSTALL_DATA} ${WRKSRC}/Telegram/Resources/art/icon${icon_size}.png \ X ${STAGEDIR}${PREFIX}/share/icons/hicolor/${icon_size}x${icon_size}/apps/telegram-desktop.png X.endfor X X.include 112d078984cee093a071977ae335f9c8 echo x - net-im/telegram-desktop/distinfo sed 's/^X//' >net-im/telegram-desktop/distinfo << 'ddad88a9c773e7d6983308c102d596ad' 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 ddad88a9c773e7d6983308c102d596ad echo x - net-im/telegram-desktop/pkg-descr sed 's/^X//' >net-im/telegram-desktop/pkg-descr << '27a187fc6b6ca9b7df67f0cc5b9426b4' XTelegram Desktop messaging app. Fast and secure desktop app, perfectly synced Xwith your mobile phone. X XWWW: https://desktop.telegram.org/ 27a187fc6b6ca9b7df67f0cc5b9426b4 echo x - net-im/telegram-desktop/pkg-plist sed 's/^X//' >net-im/telegram-desktop/pkg-plist << '09a0a6c4ac359ed4bfbefadf9a41848e' Xbin/telegram-desktop Xshare/appdata/telegramdesktop.appdata.xml Xshare/applications/telegramdesktop.desktop Xshare/kservices5/tg.protocol Xshare/icons/hicolor/128x128/apps/telegram-desktop.png Xshare/icons/hicolor/16x16/apps/telegram-desktop.png Xshare/icons/hicolor/256x256/apps/telegram-desktop.png Xshare/icons/hicolor/32x32/apps/telegram-desktop.png Xshare/icons/hicolor/48x48/apps/telegram-desktop.png Xshare/icons/hicolor/512x512/apps/telegram-desktop.png Xshare/icons/hicolor/64x64/apps/telegram-desktop.png 09a0a6c4ac359ed4bfbefadf9a41848e exit