diff --git a/net-im/telegram-desktop/patches/telegram_desktop-1.4.0-libtgvoip.patchset b/net-im/telegram-desktop/patches/telegram_desktop-1.4.4-libtgvoip.patchset similarity index 100% rename from net-im/telegram-desktop/patches/telegram_desktop-1.4.0-libtgvoip.patchset rename to net-im/telegram-desktop/patches/telegram_desktop-1.4.4-libtgvoip.patchset diff --git a/net-im/telegram-desktop/patches/telegram_desktop-1.4.0-systemqt.patch b/net-im/telegram-desktop/patches/telegram_desktop-1.4.4-systemqt.patch similarity index 100% rename from net-im/telegram-desktop/patches/telegram_desktop-1.4.0-systemqt.patch rename to net-im/telegram-desktop/patches/telegram_desktop-1.4.4-systemqt.patch diff --git a/net-im/telegram-desktop/patches/telegram_desktop-1.4.0.patchset b/net-im/telegram-desktop/patches/telegram_desktop-1.4.4.patchset similarity index 97% rename from net-im/telegram-desktop/patches/telegram_desktop-1.4.0.patchset rename to net-im/telegram-desktop/patches/telegram_desktop-1.4.4.patchset index 7429b5f20..03c6539e1 100644 --- a/net-im/telegram-desktop/patches/telegram_desktop-1.4.0.patchset +++ b/net-im/telegram-desktop/patches/telegram_desktop-1.4.4.patchset @@ -1,6 +1,6 @@ -From 68c8bd7d3abacff92bba9157cee42bc29ceef215 Mon Sep 17 00:00:00 2001 +From 20fbc592b43f673b3e1fb2a2c2cc9ebe9541567d Mon Sep 17 00:00:00 2001 From: Gerasim Troeglazov <3dEyes@gmail.com> -Date: Sun, 30 Sep 2018 12:33:03 +1000 +Date: Fri, 19 Oct 2018 19:22:32 +1000 Subject: Add Haiku support @@ -12,30 +12,6 @@ index 0000000..6d80862 @@ -0,0 +1,2 @@ +[Paths] +Libraries=:/gui/art -diff --git a/Telegram/Resources/qrc/telegram_emoji.qrc b/Telegram/Resources/qrc/telegram_emoji.qrc -index bb9ce0a..47a0c05 100644 ---- a/Telegram/Resources/qrc/telegram_emoji.qrc -+++ b/Telegram/Resources/qrc/telegram_emoji.qrc -@@ -2,7 +2,5 @@ - - ../art/emoji.webp - ../art/emoji_125x.webp -- ../art/emoji_150x.webp -- ../art/emoji_200x.webp - - -diff --git a/Telegram/Resources/qrc/telegram_emoji2.qrc b/Telegram/Resources/qrc/telegram_emoji2.qrc -new file mode 100644 -index 0000000..e1ddb8d ---- /dev/null -+++ b/Telegram/Resources/qrc/telegram_emoji2.qrc -@@ -0,0 +1,6 @@ -+ -+ -+ ../art/emoji_150x.webp -+ ../art/emoji_200x.webp -+ -+ diff --git a/Telegram/Resources/qrc/telegram_haiku.qrc b/Telegram/Resources/qrc/telegram_haiku.qrc new file mode 100644 index 0000000..33115f9 @@ -204,10 +180,10 @@ index 0c71c39..32f29ee 100644 if (!updater.exists()) { QFileInfo current(curUpdater); diff --git a/Telegram/SourceFiles/core/utils.h b/Telegram/SourceFiles/core/utils.h -index 0cd4059..1047a5f 100644 +index 219dc22..7effe80 100644 --- a/Telegram/SourceFiles/core/utils.h +++ b/Telegram/SourceFiles/core/utils.h -@@ -411,6 +411,7 @@ enum DBIPlatform { +@@ -396,6 +396,7 @@ enum DBIPlatform { dbipLinux64 = 2, dbipLinux32 = 3, dbipMacOld = 4, @@ -216,7 +192,7 @@ index 0cd4059..1047a5f 100644 enum DBIPeerReportSpamStatus { diff --git a/Telegram/SourceFiles/export/data/export_data_types.cpp b/Telegram/SourceFiles/export/data/export_data_types.cpp -index 5479891..b48fe00 100644 +index a2e26ed..f839c43 100644 --- a/Telegram/SourceFiles/export/data/export_data_types.cpp +++ b/Telegram/SourceFiles/export/data/export_data_types.cpp @@ -225,6 +225,8 @@ Image ParseMaxImage( @@ -236,15 +212,16 @@ index 5479891..b48fe00 100644 return result; } -@@ -406,6 +409,7 @@ Document ParseDocument( +@@ -406,6 +409,8 @@ Document ParseDocument( const QString &suggestedFolder, TimeId date) { auto result = Document(); ++// GCC7 Segmentation violation for Haiku +#ifndef __HAIKU__ data.match([&](const MTPDdocument &data) { result.id = data.vid.v; result.date = data.vdate.v; -@@ -442,6 +446,7 @@ Document ParseDocument( +@@ -442,6 +447,7 @@ Document ParseDocument( }, [&](const MTPDdocumentEmpty &data) { result.id = data.vid.v; }); @@ -252,15 +229,16 @@ index 5479891..b48fe00 100644 return result; } -@@ -1043,6 +1048,7 @@ Message ParseMessage( +@@ -1043,6 +1049,8 @@ Message ParseMessage( const MTPMessage &data, const QString &mediaFolder) { auto result = Message(); ++// GCC7 Segmentation violation for Haiku +#ifndef __HAIKU__ data.match([&](const auto &data) { result.id = data.vid.v; if constexpr (!MTPDmessageEmpty::Is()) { -@@ -1131,6 +1137,7 @@ Message ParseMessage( +@@ -1131,6 +1139,7 @@ Message ParseMessage( }, [&](const MTPDmessageEmpty &data) { result.id = data.vid.v; }); @@ -269,7 +247,7 @@ index 5479891..b48fe00 100644 } diff --git a/Telegram/SourceFiles/export/export_api_wrap.cpp b/Telegram/SourceFiles/export/export_api_wrap.cpp -index dee4a09..efb0ab2 100644 +index f183f3b..a9791dc 100644 --- a/Telegram/SourceFiles/export/export_api_wrap.cpp +++ b/Telegram/SourceFiles/export/export_api_wrap.cpp @@ -719,6 +719,8 @@ void ApiWrap::requestUserpics( @@ -289,17 +267,16 @@ index dee4a09..efb0ab2 100644 } void ApiWrap::loadUserpicsFiles(Data::UserpicsSlice &&slice) { -@@ -1199,7 +1202,8 @@ void ApiWrap::appendChatsSlice( - +@@ -1240,6 +1243,8 @@ void ApiWrap::appendChatsSlice( void ApiWrap::requestMessagesSlice() { Expects(_chatProcess != nullptr); -- + +// GCC7 Segmentation violation for Haiku +#ifndef __HAIKU__ - requestChatMessages( - _chatProcess->info.splits[_chatProcess->localSplitIndex], - _chatProcess->largestIdPlusOne, -@@ -1222,6 +1226,7 @@ void ApiWrap::requestMessagesSlice() { + const auto count = _chatProcess->info.messagesCountPerSplit[ + _chatProcess->localSplitIndex]; + if (!count) { +@@ -1268,6 +1273,7 @@ void ApiWrap::requestMessagesSlice() { _chatProcess->info.relativePath)); }); }); @@ -308,18 +285,18 @@ index dee4a09..efb0ab2 100644 void ApiWrap::requestChatMessages( diff --git a/Telegram/SourceFiles/logs.cpp b/Telegram/SourceFiles/logs.cpp -index c09b2ff..4a04e83 100644 +index ed2c7ce..1a6d4e1 100644 --- a/Telegram/SourceFiles/logs.cpp +++ b/Telegram/SourceFiles/logs.cpp -@@ -332,7 +332,7 @@ void start(not_null launcher) { - +@@ -333,7 +333,7 @@ void start(not_null launcher) { if (cAlphaVersion()) { workingDirChosen = true; + -#if defined Q_OS_MAC || defined Q_OS_LINUX +#if defined Q_OS_MAC || defined Q_OS_LINUX || defined Q_OS_HAIKU } else { - #ifdef _DEBUG - cForceWorkingDir(cExeDir()); + if (!cWorkingDir().isEmpty()) { + // This value must come from TelegramForcePortable diff --git a/Telegram/SourceFiles/media/media_audio.cpp b/Telegram/SourceFiles/media/media_audio.cpp index fb46a00..752e7ef 100644 --- a/Telegram/SourceFiles/media/media_audio.cpp @@ -1070,7 +1047,7 @@ index 0000000..b6f3490 +resource app_signature "application/x-vnd.tg-notify-gate"; diff --git a/Telegram/SourceFiles/platform/haiku/notifications_manager_haiku.cpp b/Telegram/SourceFiles/platform/haiku/notifications_manager_haiku.cpp new file mode 100644 -index 0000000..8a75ed7 +index 0000000..410bdf9 --- /dev/null +++ b/Telegram/SourceFiles/platform/haiku/notifications_manager_haiku.cpp @@ -0,0 +1,214 @@ @@ -1154,6 +1131,7 @@ index 0000000..8a75ed7 + for(;;) { + FILE *in=fopen(NOTIFY_FIFO_NAME, "rt"); + fgets(line, sizeof line, in); ++ fclose(in); + if (line[strlen(line)-1] == '\n') { + uint64 peerid = 0; + int32 msgid = 0; @@ -1167,7 +1145,6 @@ index 0000000..8a75ed7 + notificationActivated(peerid, msgid); + } + } -+ fclose(in); + } +} + @@ -1422,10 +1399,10 @@ index 0000000..53491b6 +} // namespace Platform diff --git a/Telegram/SourceFiles/platform/haiku/specific_haiku.cpp b/Telegram/SourceFiles/platform/haiku/specific_haiku.cpp new file mode 100644 -index 0000000..4ce6ac6 +index 0000000..143fa79 --- /dev/null +++ b/Telegram/SourceFiles/platform/haiku/specific_haiku.cpp -@@ -0,0 +1,404 @@ +@@ -0,0 +1,415 @@ +/* +This file is part of Telegram Desktop, +the official desktop version of Telegram messaging app, see https://telegram.org @@ -1770,6 +1747,17 @@ index 0000000..4ce6ac6 +void RegisterCustomScheme() { +} + ++PermissionStatus GetPermissionStatus(PermissionType type){ ++ return PermissionStatus::Granted; ++} ++ ++void RequestPermission(PermissionType type, Fn resultCallback){ ++ resultCallback(PermissionStatus::Granted); ++} ++ ++void OpenSystemSettingsForPermission(PermissionType type){ ++} ++ +namespace ThirdParty { + +void start() { @@ -2023,10 +2011,10 @@ index 692f4b4..a40f830 100644 #include "platform/win/notifications_manager_win.h" #endif // Q_OS_MAC || Q_OS_LINUX || Q_OS_WIN diff --git a/Telegram/SourceFiles/platform/platform_specific.h b/Telegram/SourceFiles/platform/platform_specific.h -index 92485c7..ebe4a4f 100644 +index 03a32b2..1e17970 100644 --- a/Telegram/SourceFiles/platform/platform_specific.h +++ b/Telegram/SourceFiles/platform/platform_specific.h -@@ -36,6 +36,8 @@ void finish(); +@@ -49,6 +49,8 @@ void finish(); #include "platform/mac/specific_mac.h" #elif defined Q_OS_LINUX // Q_OS_MAC #include "platform/linux/specific_linux.h" @@ -2098,10 +2086,10 @@ index 9c697fc..36ddf56 100644 #include #include diff --git a/Telegram/SourceFiles/settings.cpp b/Telegram/SourceFiles/settings.cpp -index 48c947d..a3784de 100644 +index 0ab38d6..82f8a1f 100644 --- a/Telegram/SourceFiles/settings.cpp +++ b/Telegram/SourceFiles/settings.cpp -@@ -77,6 +77,8 @@ DBIPlatform gPlatform = dbipWindows; +@@ -74,6 +74,8 @@ DBIPlatform gPlatform = dbipWindows; DBIPlatform gPlatform = dbipMacOld; #elif defined Q_OS_MAC DBIPlatform gPlatform = dbipMac; @@ -2157,7 +2145,7 @@ index 7f5c191..649255c 100644 #define FOPEN_FUNC(filename, mode) fopen(filename, mode) #define FTELLO_FUNC(stream) ftello(stream) diff --git a/Telegram/gyp/Telegram.gyp b/Telegram/gyp/Telegram.gyp -index 2c6ef58..73da5e1 100644 +index 7ff8dff..301e0f4 100644 --- a/Telegram/gyp/Telegram.gyp +++ b/Telegram/gyp/Telegram.gyp @@ -61,6 +61,7 @@ @@ -2566,18 +2554,10 @@ index 0000000..171c216 + }]], +} diff --git a/Telegram/gyp/telegram_qrc.gypi b/Telegram/gyp/telegram_qrc.gypi -index 77b126d..6c27563 100644 +index a8c936d..86a58d7 100644 --- a/Telegram/gyp/telegram_qrc.gypi +++ b/Telegram/gyp/telegram_qrc.gypi -@@ -9,6 +9,7 @@ - 'qrc_files': [ - '<(res_loc)/qrc/telegram.qrc', - '<(res_loc)/qrc/telegram_emoji.qrc', -+ '<(res_loc)/qrc/telegram_emoji2.qrc', - '<(res_loc)/qrc/telegram_emoji_large.qrc', - '<(res_loc)/qrc/telegram_sounds.qrc', - ], -@@ -21,6 +22,13 @@ +@@ -24,6 +24,13 @@ ], } }], @@ -2592,10 +2572,10 @@ index 77b126d..6c27563 100644 'variables': { 'qrc_files': [ diff --git a/Telegram/gyp/telegram_sources.txt b/Telegram/gyp/telegram_sources.txt -index 46bd016..f16a2f8 100644 +index 3eedaab..1dac791 100644 --- a/Telegram/gyp/telegram_sources.txt +++ b/Telegram/gyp/telegram_sources.txt -@@ -475,6 +475,18 @@ +@@ -473,6 +473,18 @@ <(src_loc)/platform/linux/notifications_manager_linux.h <(src_loc)/platform/linux/specific_linux.cpp <(src_loc)/platform/linux/specific_linux.h @@ -2633,5 +2613,5 @@ index 622462e..e3ba800 100644 'include_dirs': [ '<(libs_loc)/openssl/include' -- -2.19.0 +2.19.1 diff --git a/net-im/telegram-desktop/telegram_desktop-1.4.0.recipe b/net-im/telegram-desktop/telegram_desktop-1.4.4.recipe similarity index 98% rename from net-im/telegram-desktop/telegram_desktop-1.4.0.recipe rename to net-im/telegram-desktop/telegram_desktop-1.4.4.recipe index 6b1b090a2..f45705159 100644 --- a/net-im/telegram-desktop/telegram_desktop-1.4.0.recipe +++ b/net-im/telegram-desktop/telegram_desktop-1.4.4.recipe @@ -5,7 +5,7 @@ COPYRIGHT="2013-2018 Telegram" LICENSE="GNU GPL v3" REVISION="1" SOURCE_URI="https://github.com/telegramdesktop/tdesktop/archive/v$portVersion.tar.gz" -CHECKSUM_SHA256="e3ee54461dae5552b41b6b56f12225a4d546118b2e2d4d864442e4462da97a9b" +CHECKSUM_SHA256="1a34737347b0fdd7f935213de9c39f40f7cf161a6cad10cceb1126ff74f7b4a9" SOURCE_FILENAME="tdesktop-$portVersion.tar.gz" SOURCE_DIR="tdesktop-$portVersion" srcGitRev_2="697eea96aa90205db4fc368df4127eef56b2a5c6"