diff --git a/net-im/telegram-desktop/patches/telegram_desktop-1.7.13-libtgvoip.patchset b/net-im/telegram-desktop/patches/telegram_desktop-1.8.1-libtgvoip.patchset similarity index 81% rename from net-im/telegram-desktop/patches/telegram_desktop-1.7.13-libtgvoip.patchset rename to net-im/telegram-desktop/patches/telegram_desktop-1.8.1-libtgvoip.patchset index 4962eed03..34829d264 100644 --- a/net-im/telegram-desktop/patches/telegram_desktop-1.7.13-libtgvoip.patchset +++ b/net-im/telegram-desktop/patches/telegram_desktop-1.8.1-libtgvoip.patchset @@ -1,15 +1,15 @@ -From 9b4f5aa546148062c75e29f82251eb34ab778361 Mon Sep 17 00:00:00 2001 +From ad449f133830076fad26121a34d780a0c385ce25 Mon Sep 17 00:00:00 2001 From: Gerasim Troeglazov <3dEyes@gmail.com> -Date: Mon, 24 Jun 2019 22:45:12 +1000 +Date: Sat, 10 Aug 2019 12:20:44 +1000 Subject: Add mediakit support -diff --git a/libtgvoip-0e92a22746d15157bea46faddd61b79e9964275a/OpusDecoder.cpp b/libtgvoip-0e92a22746d15157bea46faddd61b79e9964275a/OpusDecoder.cpp +diff --git a/libtgvoip-d4a0f719ffd8d29e88474f67abc9fc862661c3b9/OpusDecoder.cpp b/libtgvoip-d4a0f719ffd8d29e88474f67abc9fc862661c3b9/OpusDecoder.cpp old mode 100755 new mode 100644 index 0ecd63e..61081f9 ---- a/libtgvoip-0e92a22746d15157bea46faddd61b79e9964275a/OpusDecoder.cpp -+++ b/libtgvoip-0e92a22746d15157bea46faddd61b79e9964275a/OpusDecoder.cpp +--- a/libtgvoip-d4a0f719ffd8d29e88474f67abc9fc862661c3b9/OpusDecoder.cpp ++++ b/libtgvoip-d4a0f719ffd8d29e88474f67abc9fc862661c3b9/OpusDecoder.cpp @@ -10,7 +10,7 @@ #include #include @@ -19,12 +19,12 @@ index 0ecd63e..61081f9 #include #else #include "opus.h" -diff --git a/libtgvoip-0e92a22746d15157bea46faddd61b79e9964275a/OpusEncoder.cpp b/libtgvoip-0e92a22746d15157bea46faddd61b79e9964275a/OpusEncoder.cpp +diff --git a/libtgvoip-d4a0f719ffd8d29e88474f67abc9fc862661c3b9/OpusEncoder.cpp b/libtgvoip-d4a0f719ffd8d29e88474f67abc9fc862661c3b9/OpusEncoder.cpp old mode 100755 new mode 100644 index 8786bf5..ab5abc4 ---- a/libtgvoip-0e92a22746d15157bea46faddd61b79e9964275a/OpusEncoder.cpp -+++ b/libtgvoip-0e92a22746d15157bea46faddd61b79e9964275a/OpusEncoder.cpp +--- a/libtgvoip-d4a0f719ffd8d29e88474f67abc9fc862661c3b9/OpusEncoder.cpp ++++ b/libtgvoip-d4a0f719ffd8d29e88474f67abc9fc862661c3b9/OpusEncoder.cpp @@ -9,7 +9,7 @@ #include #include "logging.h" @@ -34,15 +34,15 @@ index 8786bf5..ab5abc4 #include #else #include "opus.h" -diff --git a/libtgvoip-0e92a22746d15157bea46faddd61b79e9964275a/OpusEncoder.h b/libtgvoip-0e92a22746d15157bea46faddd61b79e9964275a/OpusEncoder.h +diff --git a/libtgvoip-d4a0f719ffd8d29e88474f67abc9fc862661c3b9/OpusEncoder.h b/libtgvoip-d4a0f719ffd8d29e88474f67abc9fc862661c3b9/OpusEncoder.h old mode 100755 new mode 100644 -diff --git a/libtgvoip-0e92a22746d15157bea46faddd61b79e9964275a/VoIPController.cpp b/libtgvoip-0e92a22746d15157bea46faddd61b79e9964275a/VoIPController.cpp +diff --git a/libtgvoip-d4a0f719ffd8d29e88474f67abc9fc862661c3b9/VoIPController.cpp b/libtgvoip-d4a0f719ffd8d29e88474f67abc9fc862661c3b9/VoIPController.cpp old mode 100755 new mode 100644 -index 618be86..672c038 ---- a/libtgvoip-0e92a22746d15157bea46faddd61b79e9964275a/VoIPController.cpp -+++ b/libtgvoip-0e92a22746d15157bea46faddd61b79e9964275a/VoIPController.cpp +index d9297ce..ca81e70 +--- a/libtgvoip-d4a0f719ffd8d29e88474f67abc9fc862661c3b9/VoIPController.cpp ++++ b/libtgvoip-d4a0f719ffd8d29e88474f67abc9fc862661c3b9/VoIPController.cpp @@ -8,6 +8,9 @@ #include #include @@ -64,10 +64,10 @@ index 618be86..672c038 #elif defined(__APPLE__) static pthread_once_t token = PTHREAD_ONCE_INIT; pthread_once(&token, &initMachTimestart); -diff --git a/libtgvoip-0e92a22746d15157bea46faddd61b79e9964275a/audio/AudioIO.cpp b/libtgvoip-0e92a22746d15157bea46faddd61b79e9964275a/audio/AudioIO.cpp +diff --git a/libtgvoip-d4a0f719ffd8d29e88474f67abc9fc862661c3b9/audio/AudioIO.cpp b/libtgvoip-d4a0f719ffd8d29e88474f67abc9fc862661c3b9/audio/AudioIO.cpp index 2c16ca7..e00c731 100644 ---- a/libtgvoip-0e92a22746d15157bea46faddd61b79e9964275a/audio/AudioIO.cpp -+++ b/libtgvoip-0e92a22746d15157bea46faddd61b79e9964275a/audio/AudioIO.cpp +--- a/libtgvoip-d4a0f719ffd8d29e88474f67abc9fc862661c3b9/audio/AudioIO.cpp ++++ b/libtgvoip-d4a0f719ffd8d29e88474f67abc9fc862661c3b9/audio/AudioIO.cpp @@ -39,6 +39,9 @@ #ifndef WITHOUT_PULSE #include "../os/linux/AudioPulse.h" @@ -87,10 +87,10 @@ index 2c16ca7..e00c731 100644 #elif defined(__linux__) #ifndef WITHOUT_ALSA #ifndef WITHOUT_PULSE -diff --git a/libtgvoip-0e92a22746d15157bea46faddd61b79e9964275a/audio/AudioInput.cpp b/libtgvoip-0e92a22746d15157bea46faddd61b79e9964275a/audio/AudioInput.cpp +diff --git a/libtgvoip-d4a0f719ffd8d29e88474f67abc9fc862661c3b9/audio/AudioInput.cpp b/libtgvoip-d4a0f719ffd8d29e88474f67abc9fc862661c3b9/audio/AudioInput.cpp index dae647a..4bab98c 100644 ---- a/libtgvoip-0e92a22746d15157bea46faddd61b79e9964275a/audio/AudioInput.cpp -+++ b/libtgvoip-0e92a22746d15157bea46faddd61b79e9964275a/audio/AudioInput.cpp +--- a/libtgvoip-d4a0f719ffd8d29e88474f67abc9fc862661c3b9/audio/AudioInput.cpp ++++ b/libtgvoip-d4a0f719ffd8d29e88474f67abc9fc862661c3b9/audio/AudioInput.cpp @@ -33,6 +33,8 @@ #ifndef WITHOUT_PULSE #include "../os/linux/AudioPulse.h" @@ -100,10 +100,10 @@ index dae647a..4bab98c 100644 #else #error "Unsupported operating system" #endif -diff --git a/libtgvoip-0e92a22746d15157bea46faddd61b79e9964275a/audio/AudioOutput.cpp b/libtgvoip-0e92a22746d15157bea46faddd61b79e9964275a/audio/AudioOutput.cpp +diff --git a/libtgvoip-d4a0f719ffd8d29e88474f67abc9fc862661c3b9/audio/AudioOutput.cpp b/libtgvoip-d4a0f719ffd8d29e88474f67abc9fc862661c3b9/audio/AudioOutput.cpp index 458e8a5..1890350 100644 ---- a/libtgvoip-0e92a22746d15157bea46faddd61b79e9964275a/audio/AudioOutput.cpp -+++ b/libtgvoip-0e92a22746d15157bea46faddd61b79e9964275a/audio/AudioOutput.cpp +--- a/libtgvoip-d4a0f719ffd8d29e88474f67abc9fc862661c3b9/audio/AudioOutput.cpp ++++ b/libtgvoip-d4a0f719ffd8d29e88474f67abc9fc862661c3b9/audio/AudioOutput.cpp @@ -37,6 +37,8 @@ #include "../os/linux/AudioOutputPulse.h" #include "../os/linux/AudioPulse.h" @@ -113,10 +113,10 @@ index 458e8a5..1890350 100644 #else #error "Unsupported operating system" #endif -diff --git a/libtgvoip-0e92a22746d15157bea46faddd61b79e9964275a/libtgvoip.gyp b/libtgvoip-0e92a22746d15157bea46faddd61b79e9964275a/libtgvoip.gyp +diff --git a/libtgvoip-d4a0f719ffd8d29e88474f67abc9fc862661c3b9/libtgvoip.gyp b/libtgvoip-d4a0f719ffd8d29e88474f67abc9fc862661c3b9/libtgvoip.gyp index b5f3b81..1d5b508 100644 ---- a/libtgvoip-0e92a22746d15157bea46faddd61b79e9964275a/libtgvoip.gyp -+++ b/libtgvoip-0e92a22746d15157bea46faddd61b79e9964275a/libtgvoip.gyp +--- a/libtgvoip-d4a0f719ffd8d29e88474f67abc9fc862661c3b9/libtgvoip.gyp ++++ b/libtgvoip-d4a0f719ffd8d29e88474f67abc9fc862661c3b9/libtgvoip.gyp @@ -115,6 +115,14 @@ '<(tgvoip_src_loc)/os/linux/AudioPulse.cpp', '<(tgvoip_src_loc)/os/linux/AudioPulse.h', @@ -167,11 +167,11 @@ index b5f3b81..1d5b508 100644 '"<(OS)" == "linux"', { 'defines': [ 'WEBRTC_POSIX', -diff --git a/libtgvoip-0e92a22746d15157bea46faddd61b79e9964275a/os/haiku/AudioInputHaiku.cpp b/libtgvoip-0e92a22746d15157bea46faddd61b79e9964275a/os/haiku/AudioInputHaiku.cpp +diff --git a/libtgvoip-d4a0f719ffd8d29e88474f67abc9fc862661c3b9/os/haiku/AudioInputHaiku.cpp b/libtgvoip-d4a0f719ffd8d29e88474f67abc9fc862661c3b9/os/haiku/AudioInputHaiku.cpp new file mode 100644 index 0000000..7cce3e3 --- /dev/null -+++ b/libtgvoip-0e92a22746d15157bea46faddd61b79e9964275a/os/haiku/AudioInputHaiku.cpp ++++ b/libtgvoip-d4a0f719ffd8d29e88474f67abc9fc862661c3b9/os/haiku/AudioInputHaiku.cpp @@ -0,0 +1,276 @@ +// +// libtgvoip is free and unencumbered public domain software. @@ -449,11 +449,11 @@ index 0000000..7cce3e3 + snooze(100); + } +} -diff --git a/libtgvoip-0e92a22746d15157bea46faddd61b79e9964275a/os/haiku/AudioInputHaiku.h b/libtgvoip-0e92a22746d15157bea46faddd61b79e9964275a/os/haiku/AudioInputHaiku.h +diff --git a/libtgvoip-d4a0f719ffd8d29e88474f67abc9fc862661c3b9/os/haiku/AudioInputHaiku.h b/libtgvoip-d4a0f719ffd8d29e88474f67abc9fc862661c3b9/os/haiku/AudioInputHaiku.h new file mode 100644 index 0000000..1c63afe --- /dev/null -+++ b/libtgvoip-0e92a22746d15157bea46faddd61b79e9964275a/os/haiku/AudioInputHaiku.h ++++ b/libtgvoip-d4a0f719ffd8d29e88474f67abc9fc862661c3b9/os/haiku/AudioInputHaiku.h @@ -0,0 +1,66 @@ +// +// libtgvoip is free and unencumbered public domain software. @@ -521,11 +521,11 @@ index 0000000..1c63afe +} + +#endif //LIBTGVOIP_AUDIOINPUTHAIKU_H -diff --git a/libtgvoip-0e92a22746d15157bea46faddd61b79e9964275a/os/haiku/AudioOutputHaiku.cpp b/libtgvoip-0e92a22746d15157bea46faddd61b79e9964275a/os/haiku/AudioOutputHaiku.cpp +diff --git a/libtgvoip-d4a0f719ffd8d29e88474f67abc9fc862661c3b9/os/haiku/AudioOutputHaiku.cpp b/libtgvoip-d4a0f719ffd8d29e88474f67abc9fc862661c3b9/os/haiku/AudioOutputHaiku.cpp new file mode 100644 index 0000000..2fca8a1 --- /dev/null -+++ b/libtgvoip-0e92a22746d15157bea46faddd61b79e9964275a/os/haiku/AudioOutputHaiku.cpp ++++ b/libtgvoip-d4a0f719ffd8d29e88474f67abc9fc862661c3b9/os/haiku/AudioOutputHaiku.cpp @@ -0,0 +1,99 @@ +// +// libtgvoip is free and unencumbered public domain software. @@ -626,11 +626,11 @@ index 0000000..2fca8a1 +bool AudioOutputHaiku::IsPlaying(){ + return isPlaying; +} -diff --git a/libtgvoip-0e92a22746d15157bea46faddd61b79e9964275a/os/haiku/AudioOutputHaiku.h b/libtgvoip-0e92a22746d15157bea46faddd61b79e9964275a/os/haiku/AudioOutputHaiku.h +diff --git a/libtgvoip-d4a0f719ffd8d29e88474f67abc9fc862661c3b9/os/haiku/AudioOutputHaiku.h b/libtgvoip-d4a0f719ffd8d29e88474f67abc9fc862661c3b9/os/haiku/AudioOutputHaiku.h new file mode 100644 index 0000000..91f2521 --- /dev/null -+++ b/libtgvoip-0e92a22746d15157bea46faddd61b79e9964275a/os/haiku/AudioOutputHaiku.h ++++ b/libtgvoip-d4a0f719ffd8d29e88474f67abc9fc862661c3b9/os/haiku/AudioOutputHaiku.h @@ -0,0 +1,35 @@ +// +// libtgvoip is free and unencumbered public domain software. @@ -667,11 +667,11 @@ index 0000000..91f2521 +} + +#endif //LIBTGVOIP_AUDIOOUTPUTHAIKU_H -diff --git a/libtgvoip-0e92a22746d15157bea46faddd61b79e9964275a/os/haiku/RingBuffer.cpp b/libtgvoip-0e92a22746d15157bea46faddd61b79e9964275a/os/haiku/RingBuffer.cpp +diff --git a/libtgvoip-d4a0f719ffd8d29e88474f67abc9fc862661c3b9/os/haiku/RingBuffer.cpp b/libtgvoip-d4a0f719ffd8d29e88474f67abc9fc862661c3b9/os/haiku/RingBuffer.cpp new file mode 100644 index 0000000..43236d3 --- /dev/null -+++ b/libtgvoip-0e92a22746d15157bea46faddd61b79e9964275a/os/haiku/RingBuffer.cpp ++++ b/libtgvoip-d4a0f719ffd8d29e88474f67abc9fc862661c3b9/os/haiku/RingBuffer.cpp @@ -0,0 +1,130 @@ +#include +#include @@ -803,11 +803,11 @@ index 0000000..43236d3 +{ + return initialized?B_OK:B_ERROR; +} -diff --git a/libtgvoip-0e92a22746d15157bea46faddd61b79e9964275a/os/haiku/RingBuffer.h b/libtgvoip-0e92a22746d15157bea46faddd61b79e9964275a/os/haiku/RingBuffer.h +diff --git a/libtgvoip-d4a0f719ffd8d29e88474f67abc9fc862661c3b9/os/haiku/RingBuffer.h b/libtgvoip-d4a0f719ffd8d29e88474f67abc9fc862661c3b9/os/haiku/RingBuffer.h new file mode 100644 index 0000000..4715632 --- /dev/null -+++ b/libtgvoip-0e92a22746d15157bea46faddd61b79e9964275a/os/haiku/RingBuffer.h ++++ b/libtgvoip-d4a0f719ffd8d29e88474f67abc9fc862661c3b9/os/haiku/RingBuffer.h @@ -0,0 +1,31 @@ +#ifndef __RING_BUFFER_H__ +#define __RING_BUFFER_H__ @@ -840,10 +840,10 @@ index 0000000..4715632 +}; + +#endif -diff --git a/libtgvoip-0e92a22746d15157bea46faddd61b79e9964275a/os/posix/NetworkSocketPosix.cpp b/libtgvoip-0e92a22746d15157bea46faddd61b79e9964275a/os/posix/NetworkSocketPosix.cpp +diff --git a/libtgvoip-d4a0f719ffd8d29e88474f67abc9fc862661c3b9/os/posix/NetworkSocketPosix.cpp b/libtgvoip-d4a0f719ffd8d29e88474f67abc9fc862661c3b9/os/posix/NetworkSocketPosix.cpp index 52eef76..c480dfb 100644 ---- a/libtgvoip-0e92a22746d15157bea46faddd61b79e9964275a/os/posix/NetworkSocketPosix.cpp -+++ b/libtgvoip-0e92a22746d15157bea46faddd61b79e9964275a/os/posix/NetworkSocketPosix.cpp +--- a/libtgvoip-d4a0f719ffd8d29e88474f67abc9fc862661c3b9/os/posix/NetworkSocketPosix.cpp ++++ b/libtgvoip-d4a0f719ffd8d29e88474f67abc9fc862661c3b9/os/posix/NetworkSocketPosix.cpp @@ -248,12 +248,13 @@ void NetworkSocketPosix::Open(){ } int flag=0; @@ -868,12 +868,12 @@ index 52eef76..c480dfb 100644 #else struct ifaddrs* interfaces; if(!getifaddrs(&interfaces)){ -diff --git a/libtgvoip-0e92a22746d15157bea46faddd61b79e9964275a/threading.h b/libtgvoip-0e92a22746d15157bea46faddd61b79e9964275a/threading.h +diff --git a/libtgvoip-d4a0f719ffd8d29e88474f67abc9fc862661c3b9/threading.h b/libtgvoip-d4a0f719ffd8d29e88474f67abc9fc862661c3b9/threading.h old mode 100755 new mode 100644 index 9dc2554..fc68fd4 ---- a/libtgvoip-0e92a22746d15157bea46faddd61b79e9964275a/threading.h -+++ b/libtgvoip-0e92a22746d15157bea46faddd61b79e9964275a/threading.h +--- a/libtgvoip-d4a0f719ffd8d29e88474f67abc9fc862661c3b9/threading.h ++++ b/libtgvoip-d4a0f719ffd8d29e88474f67abc9fc862661c3b9/threading.h @@ -9,7 +9,7 @@ #include @@ -899,12 +899,12 @@ index 9dc2554..fc68fd4 } self->entry(); return NULL; -diff --git a/libtgvoip-0e92a22746d15157bea46faddd61b79e9964275a/webrtc_dsp/rtc_base/logging_webrtc.cc b/libtgvoip-0e92a22746d15157bea46faddd61b79e9964275a/webrtc_dsp/rtc_base/logging_webrtc.cc +diff --git a/libtgvoip-d4a0f719ffd8d29e88474f67abc9fc862661c3b9/webrtc_dsp/rtc_base/logging_webrtc.cc b/libtgvoip-d4a0f719ffd8d29e88474f67abc9fc862661c3b9/webrtc_dsp/rtc_base/logging_webrtc.cc old mode 100755 new mode 100644 index a8d1522..991241b ---- a/libtgvoip-0e92a22746d15157bea46faddd61b79e9964275a/webrtc_dsp/rtc_base/logging_webrtc.cc -+++ b/libtgvoip-0e92a22746d15157bea46faddd61b79e9964275a/webrtc_dsp/rtc_base/logging_webrtc.cc +--- a/libtgvoip-d4a0f719ffd8d29e88474f67abc9fc862661c3b9/webrtc_dsp/rtc_base/logging_webrtc.cc ++++ b/libtgvoip-d4a0f719ffd8d29e88474f67abc9fc862661c3b9/webrtc_dsp/rtc_base/logging_webrtc.cc @@ -28,6 +28,10 @@ static const int kMaxLogLineSize = 1024 - 60; #endif // WEBRTC_MAC && !defined(WEBRTC_IOS) || WEBRTC_ANDROID @@ -929,13 +929,13 @@ index a8d1522..991241b } if (file != nullptr) { -diff --git a/libtgvoip-0e92a22746d15157bea46faddd61b79e9964275a/webrtc_dsp/rtc_base/platform_file.h b/libtgvoip-0e92a22746d15157bea46faddd61b79e9964275a/webrtc_dsp/rtc_base/platform_file.h +diff --git a/libtgvoip-d4a0f719ffd8d29e88474f67abc9fc862661c3b9/webrtc_dsp/rtc_base/platform_file.h b/libtgvoip-d4a0f719ffd8d29e88474f67abc9fc862661c3b9/webrtc_dsp/rtc_base/platform_file.h old mode 100755 new mode 100644 -diff --git a/libtgvoip-0e92a22746d15157bea46faddd61b79e9964275a/webrtc_dsp/rtc_base/platform_thread_types.cc b/libtgvoip-0e92a22746d15157bea46faddd61b79e9964275a/webrtc_dsp/rtc_base/platform_thread_types.cc +diff --git a/libtgvoip-d4a0f719ffd8d29e88474f67abc9fc862661c3b9/webrtc_dsp/rtc_base/platform_thread_types.cc b/libtgvoip-d4a0f719ffd8d29e88474f67abc9fc862661c3b9/webrtc_dsp/rtc_base/platform_thread_types.cc index 70cf237..e48948e 100644 ---- a/libtgvoip-0e92a22746d15157bea46faddd61b79e9964275a/webrtc_dsp/rtc_base/platform_thread_types.cc -+++ b/libtgvoip-0e92a22746d15157bea46faddd61b79e9964275a/webrtc_dsp/rtc_base/platform_thread_types.cc +--- a/libtgvoip-d4a0f719ffd8d29e88474f67abc9fc862661c3b9/webrtc_dsp/rtc_base/platform_thread_types.cc ++++ b/libtgvoip-d4a0f719ffd8d29e88474f67abc9fc862661c3b9/webrtc_dsp/rtc_base/platform_thread_types.cc @@ -20,6 +20,8 @@ namespace rtc { PlatformThreadId CurrentThreadId() { #if defined(WEBRTC_WIN) @@ -945,10 +945,10 @@ index 70cf237..e48948e 100644 #elif defined(WEBRTC_POSIX) #if defined(WEBRTC_MAC) || defined(WEBRTC_IOS) return pthread_mach_thread_np(pthread_self()); -diff --git a/libtgvoip-0e92a22746d15157bea46faddd61b79e9964275a/webrtc_dsp/rtc_base/platform_thread_types.h b/libtgvoip-0e92a22746d15157bea46faddd61b79e9964275a/webrtc_dsp/rtc_base/platform_thread_types.h +diff --git a/libtgvoip-d4a0f719ffd8d29e88474f67abc9fc862661c3b9/webrtc_dsp/rtc_base/platform_thread_types.h b/libtgvoip-d4a0f719ffd8d29e88474f67abc9fc862661c3b9/webrtc_dsp/rtc_base/platform_thread_types.h index 0bc42eb..c87cde9 100644 ---- a/libtgvoip-0e92a22746d15157bea46faddd61b79e9964275a/webrtc_dsp/rtc_base/platform_thread_types.h -+++ b/libtgvoip-0e92a22746d15157bea46faddd61b79e9964275a/webrtc_dsp/rtc_base/platform_thread_types.h +--- a/libtgvoip-d4a0f719ffd8d29e88474f67abc9fc862661c3b9/webrtc_dsp/rtc_base/platform_thread_types.h ++++ b/libtgvoip-d4a0f719ffd8d29e88474f67abc9fc862661c3b9/webrtc_dsp/rtc_base/platform_thread_types.h @@ -35,6 +35,9 @@ typedef DWORD PlatformThreadRef; #elif defined(WEBRTC_FUCHSIA) typedef zx_handle_t PlatformThreadId; diff --git a/net-im/telegram-desktop/patches/telegram_desktop-1.7.13-systemqt.patch b/net-im/telegram-desktop/patches/telegram_desktop-1.8.1-systemqt.patch similarity index 100% rename from net-im/telegram-desktop/patches/telegram_desktop-1.7.13-systemqt.patch rename to net-im/telegram-desktop/patches/telegram_desktop-1.8.1-systemqt.patch diff --git a/net-im/telegram-desktop/patches/telegram_desktop-1.7.13.patchset b/net-im/telegram-desktop/patches/telegram_desktop-1.8.1.patchset similarity index 94% rename from net-im/telegram-desktop/patches/telegram_desktop-1.7.13.patchset rename to net-im/telegram-desktop/patches/telegram_desktop-1.8.1.patchset index a75def7c8..e39be13f8 100644 --- a/net-im/telegram-desktop/patches/telegram_desktop-1.7.13.patchset +++ b/net-im/telegram-desktop/patches/telegram_desktop-1.8.1.patchset @@ -1,6 +1,6 @@ -From d5b38f31bf6d49109e0d38294c4ef39862a3498b Mon Sep 17 00:00:00 2001 +From f519c3f4892c3de9b8fb54179fb8fa19566ca159 Mon Sep 17 00:00:00 2001 From: Gerasim Troeglazov <3dEyes@gmail.com> -Date: Fri, 5 Jul 2019 20:52:58 +1000 +Date: Sat, 10 Aug 2019 12:08:14 +1000 Subject: Add Haiku support @@ -133,7 +133,7 @@ index fbdcb56..0eb0e4f 100644 int (*TestForkedMethod)()/* = nullptr*/; diff --git a/Telegram/SourceFiles/core/launcher.cpp b/Telegram/SourceFiles/core/launcher.cpp -index 5d550c5..f676909 100644 +index b5a6d7f..8223fad 100644 --- a/Telegram/SourceFiles/core/launcher.cpp +++ b/Telegram/SourceFiles/core/launcher.cpp @@ -5,6 +5,7 @@ the official desktop application for the Telegram messaging service. @@ -156,7 +156,7 @@ index 5d550c5..f676909 100644 namespace Core { namespace { -@@ -271,6 +277,10 @@ int Launcher::exec() { +@@ -273,6 +279,10 @@ int Launcher::exec() { // I don't know why path is not in QT_PLUGIN_PATH by default QCoreApplication::addLibraryPath("/usr/lib/qt/plugins"); @@ -167,7 +167,7 @@ index 5d550c5..f676909 100644 // without this Telegram doesn't start on Ubuntu 17.04 due GTK errors setenv("QT_STYLE_OVERRIDE", "qwerty", false); // Telegram doesn't start when extraordinary theme is set, see launchpad.net/bugs/1680943 -@@ -460,7 +470,16 @@ int Launcher::executeApplication() { +@@ -462,7 +472,16 @@ int Launcher::executeApplication() { Sandbox sandbox(this, arguments.count(), arguments.values()); MainQueueProcessor processor; base::ConcurrentTimerEnvironment environment; @@ -185,10 +185,10 @@ index 5d550c5..f676909 100644 } // namespace Core diff --git a/Telegram/SourceFiles/core/update_checker.cpp b/Telegram/SourceFiles/core/update_checker.cpp -index fe025f0..c04f6eb 100644 +index bff6dcd..64406eb 100644 --- a/Telegram/SourceFiles/core/update_checker.cpp +++ b/Telegram/SourceFiles/core/update_checker.cpp -@@ -501,6 +501,8 @@ bool ParseCommonMap( +@@ -503,6 +503,8 @@ bool ParseCommonMap( return "mac32"; } else if (Platform::IsMac()) { return "mac"; @@ -197,7 +197,7 @@ index fe025f0..c04f6eb 100644 } else if (Platform::IsLinux32Bit()) { return "linux32"; } else if (Platform::IsLinux64Bit()) { -@@ -1513,6 +1515,9 @@ bool checkReadyUpdate() { +@@ -1515,6 +1517,9 @@ bool checkReadyUpdate() { #elif defined Q_OS_LINUX // Q_OS_MAC QString curUpdater = (cExeDir() + qsl("Updater")); QFileInfo updater(cWorkingDir() + qsl("tupdates/temp/Updater")); @@ -208,7 +208,7 @@ index fe025f0..c04f6eb 100644 if (!updater.exists()) { QFileInfo current(curUpdater); diff --git a/Telegram/SourceFiles/media/audio/media_audio.cpp b/Telegram/SourceFiles/media/audio/media_audio.cpp -index 0ac3579..14dbbc7 100644 +index af0935f..2dc99d5 100644 --- a/Telegram/SourceFiles/media/audio/media_audio.cpp +++ b/Telegram/SourceFiles/media/audio/media_audio.cpp @@ -100,6 +100,7 @@ void EnumeratePlaybackDevices() { @@ -1852,10 +1852,10 @@ index 0000000..0cc771c +} diff --git a/Telegram/SourceFiles/platform/haiku/specific_haiku.h b/Telegram/SourceFiles/platform/haiku/specific_haiku.h new file mode 100644 -index 0000000..6788e70 +index 0000000..3995ab2 --- /dev/null +++ b/Telegram/SourceFiles/platform/haiku/specific_haiku.h -@@ -0,0 +1,122 @@ +@@ -0,0 +1,126 @@ +/* +This file is part of Telegram Desktop for Haiku, + @@ -1903,6 +1903,10 @@ index 0000000..6788e70 + return std::nullopt; +} + ++inline constexpr bool UseMainQueueGeneric() { ++ return true; ++} ++ +} // namespace Platform + +inline QString psServerPrefix() { @@ -2178,10 +2182,10 @@ index 9c697fc..36ddf56 100644 #include #include diff --git a/Telegram/SourceFiles/settings/settings_notifications.cpp b/Telegram/SourceFiles/settings/settings_notifications.cpp -index 680b34d..de6f90f 100644 +index 71ded81..4e5f922 100644 --- a/Telegram/SourceFiles/settings/settings_notifications.cpp +++ b/Telegram/SourceFiles/settings/settings_notifications.cpp -@@ -602,7 +602,7 @@ void SetupNotificationsContent(not_null container) { +@@ -621,7 +621,7 @@ void SetupNotificationsContent( return QString(); } else if (Platform::IsWindows()) { return tr::lng_settings_use_windows(tr::now); @@ -2225,6 +2229,45 @@ index 11655ab..ed6db17 100644 } f.setItalic(_flags & FontItalic); f.setUnderline(_flags & FontUnderline); +diff --git a/Telegram/SourceFiles/ui/style/style_core_font.h b/Telegram/SourceFiles/ui/style/style_core_font.h +index 566a4fe..0864fe7 100644 +--- a/Telegram/SourceFiles/ui/style/style_core_font.h ++++ b/Telegram/SourceFiles/ui/style/style_core_font.h +@@ -65,13 +65,13 @@ class FontData { + public: + + int32 width(const QString &str) const { +- return m.width(str); ++ return m.horizontalAdvance(str); + } + int32 width(const QString &str, int32 from, int32 to) const { + return width(str.mid(from, to)); + } + int32 width(QChar ch) const { +- return m.width(ch); ++ return m.horizontalAdvance(ch); + } + QString elided(const QString &str, int32 width, Qt::TextElideMode mode = Qt::ElideRight) const { + return m.elidedText(str, mode, width); +diff --git a/Telegram/SourceFiles/ui/twidget.h b/Telegram/SourceFiles/ui/twidget.h +index 6202dc7..1325c7b 100644 +--- a/Telegram/SourceFiles/ui/twidget.h ++++ b/Telegram/SourceFiles/ui/twidget.h +@@ -140,12 +140,12 @@ public: + + void drawTextLeft(int x, int y, int outerw, const QString &text, int textWidth = -1) { + QFontMetrics m(fontMetrics()); +- if (rtl() && textWidth < 0) textWidth = m.width(text); ++ if (rtl() && textWidth < 0) textWidth = m.horizontalAdvance(text); + drawText(rtl() ? (outerw - x - textWidth) : x, y + m.ascent(), text); + } + void drawTextRight(int x, int y, int outerw, const QString &text, int textWidth = -1) { + QFontMetrics m(fontMetrics()); +- if (!rtl() && textWidth < 0) textWidth = m.width(text); ++ if (!rtl() && textWidth < 0) textWidth = m.horizontalAdvance(text); + drawText(rtl() ? x : (outerw - x - textWidth), y + m.ascent(), text); + } + void drawPixmapLeft(int x, int y, int outerw, const QPixmap &pix, const QRect &from) { diff --git a/Telegram/ThirdParty/minizip/ioapi.c b/Telegram/ThirdParty/minizip/ioapi.c index 7f5c191..649255c 100644 --- a/Telegram/ThirdParty/minizip/ioapi.c @@ -2239,7 +2282,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 7fbc349..c09d5a9 100644 +index 4aef7c4..79ee2af 100644 --- a/Telegram/gyp/Telegram.gyp +++ b/Telegram/gyp/Telegram.gyp @@ -61,6 +61,7 @@ @@ -2250,7 +2293,7 @@ index 7fbc349..c09d5a9 100644 'openssl.gypi', 'qt.gypi', 'qt_moc.gypi', -@@ -97,7 +98,7 @@ +@@ -98,7 +99,7 @@ '<(src_loc)', '<(SHARED_INTERMEDIATE_DIR)', '<(emoji_suggestions_loc)', @@ -2306,12 +2349,12 @@ index eb90fe2..b12c1d6 100644 # GYP does not support per-configuration libraries :( diff --git a/Telegram/gyp/generate.py b/Telegram/gyp/generate.py -index cf7b447..c21a4b1 100644 +index 4194e16..c2fd3c8 100644 --- a/Telegram/gyp/generate.py +++ b/Telegram/gyp/generate.py @@ -98,6 +98,11 @@ elif sys.platform == 'darwin': gypScript = '../../../Libraries/gyp/gyp' - gypArguments.append('-Gxcode_upgrade_check_project_version=1020') + gypArguments.append('-Gxcode_upgrade_check_project_version=1030') gypFormats.append('xcode') +elif sys.platform == 'haiku1': + gypScript = 'gyp' @@ -2322,7 +2365,7 @@ index cf7b447..c21a4b1 100644 gypScript = '../../../Libraries/gyp/gyp' gypFormats.append('cmake') diff --git a/Telegram/gyp/lib_base.gyp b/Telegram/gyp/lib_base.gyp -index 3ffbf7f..2a2db1b 100644 +index 82d42d4..5bf0f18 100644 --- a/Telegram/gyp/lib_base.gyp +++ b/Telegram/gyp/lib_base.gyp @@ -36,7 +36,7 @@ @@ -2348,7 +2391,7 @@ index f73aabd..07c6b35 100644 '<(submodules_loc)/variant/include', '<(submodules_loc)/crl/src', diff --git a/Telegram/gyp/lib_lottie.gyp b/Telegram/gyp/lib_lottie.gyp -index ada149e..b96bd98 100644 +index 9767651..cc629fc 100644 --- a/Telegram/gyp/lib_lottie.gyp +++ b/Telegram/gyp/lib_lottie.gyp @@ -46,7 +46,7 @@ @@ -2679,10 +2722,10 @@ index d9147d6..16c9d3f 100644 'variables': { 'qrc_files': [ diff --git a/Telegram/gyp/telegram_sources.txt b/Telegram/gyp/telegram_sources.txt -index 8e92e72..78b8477 100644 +index 40b147d..6a9d8a9 100644 --- a/Telegram/gyp/telegram_sources.txt +++ b/Telegram/gyp/telegram_sources.txt -@@ -587,6 +587,20 @@ +@@ -601,6 +601,20 @@ <(src_loc)/platform/linux/notifications_manager_linux.h <(src_loc)/platform/linux/specific_linux.cpp <(src_loc)/platform/linux/specific_linux.h @@ -2725,183 +2768,25 @@ index bd46332..d85a403 100644 2.21.0 -From c9e31c84291708d4b2409a657d5714016eb4e114 Mon Sep 17 00:00:00 2001 +From afe6392f70794a86a73e0b469201487022141592 Mon Sep 17 00:00:00 2001 From: Gerasim Troeglazov <3dEyes@gmail.com> -Date: Sat, 6 Jul 2019 22:26:25 +1000 -Subject: Disable static Qt for Haiku +Date: Sat, 10 Aug 2019 19:46:28 +1000 +Subject: Fix build -diff --git a/Telegram/gyp/lib_rlottie.gyp b/Telegram/gyp/lib_rlottie.gyp -index 4d3a7ab..eae76f9 100644 ---- a/Telegram/gyp/lib_rlottie.gyp -+++ b/Telegram/gyp/lib_rlottie.gyp -@@ -110,7 +110,7 @@ - '<(rlottie_src)/vector/vstackallocator.h', - '<(rlottie_src)/vector/vtaskqueue.h', - ], -- 'conditions': [[ 'not build_win', { -+ 'conditions': [[ 'not build_win and not build_haiku', { - 'defines': [ - 'RLOTTIE_WITH_STATIC_QT', - ] --- -2.21.0 - - -From d400900e2ed7ed82d91170a75bd8858b70678550 Mon Sep 17 00:00:00 2001 -From: Gerasim Troeglazov <3dEyes@gmail.com> -Date: Sat, 6 Jul 2019 22:27:19 +1000 -Subject: Add UseMainQueueGeneric function for Haiku backend - - -diff --git a/Telegram/SourceFiles/platform/haiku/specific_haiku.h b/Telegram/SourceFiles/platform/haiku/specific_haiku.h -index 6788e70..3995ab2 100644 ---- a/Telegram/SourceFiles/platform/haiku/specific_haiku.h -+++ b/Telegram/SourceFiles/platform/haiku/specific_haiku.h -@@ -45,6 +45,10 @@ inline std::optional LastUserInputTime() { - return std::nullopt; - } +diff --git a/Telegram/SourceFiles/qt_functions.cpp b/Telegram/SourceFiles/qt_functions.cpp +index 4a722b8..e987503 100644 +--- a/Telegram/SourceFiles/qt_functions.cpp ++++ b/Telegram/SourceFiles/qt_functions.cpp +@@ -31,6 +31,8 @@ + ** + ****************************************************************************/ -+inline constexpr bool UseMainQueueGeneric() { -+ return true; -+} ++#include + - } // namespace Platform + /* TODO: find a dynamic library with these symbols. */ - inline QString psServerPrefix() { --- -2.21.0 - - -From 20c7a1805bfd7bbddf95da4146a6a456fa27d254 Mon Sep 17 00:00:00 2001 -From: Gerasim Troeglazov <3dEyes@gmail.com> -Date: Sat, 6 Jul 2019 22:27:58 +1000 -Subject: Fixes for Qt 5.13 - - -diff --git a/Telegram/SourceFiles/ffmpeg/ffmpeg_utility.cpp b/Telegram/SourceFiles/ffmpeg/ffmpeg_utility.cpp -index 5d0e509..df3e17c 100644 ---- a/Telegram/SourceFiles/ffmpeg/ffmpeg_utility.cpp -+++ b/Telegram/SourceFiles/ffmpeg/ffmpeg_utility.cpp -@@ -355,64 +355,14 @@ QImage CreateFrameStorage(QSize size) { - } - - void UnPremultiply(QImage &to, const QImage &from) { -- // This creates QImage::Format_ARGB32_Premultiplied, but we use it -- // as an image in QImage::Format_ARGB32 format. -- if (!GoodStorageForFrame(to, from.size())) { -- to = CreateFrameStorage(from.size()); -- } -- -- const auto layout = &qPixelLayouts[QImage::Format_ARGB32]; -- const auto convert = layout->convertFromARGB32PM; -- const auto fromPerLine = from.bytesPerLine(); -- const auto toPerLine = to.bytesPerLine(); -- const auto width = from.width(); -- if (fromPerLine != width * 4 || toPerLine != width * 4) { -- auto fromBytes = from.bits(); -- auto toBytes = to.bits(); -- for (auto i = 0; i != to.height(); ++i) { -- convert( -- reinterpret_cast(toBytes), -- reinterpret_cast(fromBytes), -- width, -- layout, -- nullptr); -- fromBytes += fromPerLine; -- toBytes += toPerLine; -- } -- } else { -- convert( -- reinterpret_cast(to.bits()), -- reinterpret_cast(from.bits()), -- from.width() * from.height(), -- layout, -- nullptr); -- } -+ to = from.convertToFormat(QImage::Format_ARGB32); - } - - void PremultiplyInplace(QImage &image) { -- const auto layout = &qPixelLayouts[QImage::Format_ARGB32]; -- const auto convert = layout->convertToARGB32PM; -- const auto perLine = image.bytesPerLine(); -- const auto width = image.width(); -- if (perLine != width * 4) { -- auto bytes = image.bits(); -- for (auto i = 0; i != image.height(); ++i) { -- convert( -- reinterpret_cast(bytes), -- reinterpret_cast(bytes), -- width, -- layout, -- nullptr); -- bytes += perLine; -- } -- } else { -- convert( -- reinterpret_cast(image.bits()), -- reinterpret_cast(image.bits()), -- image.width() * image.height(), -- layout, -- nullptr); -- } -+ QImage temp(image.size(), QImage::Format_ARGB32); -+ if (image.sizeInBytes() == temp.sizeInBytes()) -+ memcpy(temp.bits(), image.bits(), image.sizeInBytes()); -+ image = temp.convertToFormat(QImage::Format_ARGB32_Premultiplied); - } - - } // namespace FFmpeg --- -2.21.0 - - -From 6691adf6671efbd82aa73cd95817115f0b7cfc1e Mon Sep 17 00:00:00 2001 -From: Gerasim Troeglazov <3dEyes@gmail.com> -Date: Sun, 7 Jul 2019 15:02:46 +1000 -Subject: Don't use depricated Qt 5.13 API - - -diff --git a/Telegram/SourceFiles/ui/style/style_core_font.h b/Telegram/SourceFiles/ui/style/style_core_font.h -index 566a4fe..0864fe7 100644 ---- a/Telegram/SourceFiles/ui/style/style_core_font.h -+++ b/Telegram/SourceFiles/ui/style/style_core_font.h -@@ -65,13 +65,13 @@ class FontData { - public: - - int32 width(const QString &str) const { -- return m.width(str); -+ return m.horizontalAdvance(str); - } - int32 width(const QString &str, int32 from, int32 to) const { - return width(str.mid(from, to)); - } - int32 width(QChar ch) const { -- return m.width(ch); -+ return m.horizontalAdvance(ch); - } - QString elided(const QString &str, int32 width, Qt::TextElideMode mode = Qt::ElideRight) const { - return m.elidedText(str, mode, width); -diff --git a/Telegram/SourceFiles/ui/twidget.h b/Telegram/SourceFiles/ui/twidget.h -index 6202dc7..1325c7b 100644 ---- a/Telegram/SourceFiles/ui/twidget.h -+++ b/Telegram/SourceFiles/ui/twidget.h -@@ -140,12 +140,12 @@ public: - - void drawTextLeft(int x, int y, int outerw, const QString &text, int textWidth = -1) { - QFontMetrics m(fontMetrics()); -- if (rtl() && textWidth < 0) textWidth = m.width(text); -+ if (rtl() && textWidth < 0) textWidth = m.horizontalAdvance(text); - drawText(rtl() ? (outerw - x - textWidth) : x, y + m.ascent(), text); - } - void drawTextRight(int x, int y, int outerw, const QString &text, int textWidth = -1) { - QFontMetrics m(fontMetrics()); -- if (!rtl() && textWidth < 0) textWidth = m.width(text); -+ if (!rtl() && textWidth < 0) textWidth = m.horizontalAdvance(text); - drawText(rtl() ? x : (outerw - x - textWidth), y + m.ascent(), text); - } - void drawPixmapLeft(int x, int y, int outerw, const QPixmap &pix, const QRect &from) { + /* Debian maintainer: this function is taken from qfiledialog.cpp */ -- 2.21.0 diff --git a/net-im/telegram-desktop/telegram_desktop-1.7.13.recipe b/net-im/telegram-desktop/telegram_desktop-1.8.1.recipe similarity index 93% rename from net-im/telegram-desktop/telegram_desktop-1.7.13.recipe rename to net-im/telegram-desktop/telegram_desktop-1.8.1.recipe index 245a65182..986a98159 100644 --- a/net-im/telegram-desktop/telegram_desktop-1.7.13.recipe +++ b/net-im/telegram-desktop/telegram_desktop-1.8.1.recipe @@ -5,12 +5,12 @@ COPYRIGHT="2013-2019 Telegram" LICENSE="GNU GPL v3" REVISION="1" SOURCE_URI="https://github.com/telegramdesktop/tdesktop/archive/v$portVersion.tar.gz" -CHECKSUM_SHA256="58a59ceefd226e85a085bb4d952a9f709a8499afcaab45dbb92bc3b83a7af7fb" +CHECKSUM_SHA256="4fa1f20d8b4e0a006067fd042b0e85b5df252e9142d2f9b020fa4013d547701e" SOURCE_FILENAME="tdesktop-$portVersion.tar.gz" SOURCE_DIR="tdesktop-$portVersion" -srcGitRev_2="0e92a22746d15157bea46faddd61b79e9964275a" +srcGitRev_2="d4a0f719ffd8d29e88474f67abc9fc862661c3b9" SOURCE_URI_2="https://github.com/telegramdesktop/libtgvoip/archive/$srcGitRev_2.tar.gz" -CHECKSUM_SHA256_2="ee45011d0eda61f188d9f7f077efa64551913c2c7e7250b40f3c7c3a330cd5cc" +CHECKSUM_SHA256_2="bb75188b900907a5b00594ad3ddb78195c8d1fdc144e5a458b314dd666eba996" SOURCE_FILENAME_2="libtgvoip-$srcGitRev_2.tar.gz" srcGitRev_3="550ac2f159ca883d360c196149b466955c77a573" SOURCE_URI_3="https://github.com/mapbox/variant/archive/$srcGitRev_3.tar.gz" @@ -24,9 +24,9 @@ srcGitRev_5="5ca44b68721833ae3731802ed99af67c6f38a53a" SOURCE_URI_5="https://github.com/philsquared/Catch/archive/$srcGitRev_5.tar.gz" CHECKSUM_SHA256_5="d24e6d9df2b8aa5739d3b9077c6b0ff0ef4d5ef8acc52c3a57e32893854d8d18" SOURCE_FILENAME_5="Catch-$srcGitRev_5.tar.gz" -srcGitRev_6="9ea870038a2a667add7f621be6252db909068386" +srcGitRev_6="52baf11aaeb7f5ea6955a438abaa1aee4c4308d8" SOURCE_URI_6="https://github.com/telegramdesktop/crl/archive/$srcGitRev_6.tar.gz" -CHECKSUM_SHA256_6="5844fbd5647c1605d8f7b1391e583e484054884cc1a71681e3abeb153b8ec5b4" +CHECKSUM_SHA256_6="9ab12f23916a66665dce9b3baf16594886322f426516d34e2166e7057d78e18e" SOURCE_FILENAME_6="crl-$srcGitRev_6.tar.gz" srcGitRev_7="4b10be9cbadd7d0880437f48f875185589fd86d3" SOURCE_URI_7="https://github.com/ericniebler/range-v3/archive/$srcGitRev_7.tar.gz" @@ -36,9 +36,9 @@ srcGitRev_8="7cc9639699f64b750c0b82333dced9ea77e8436e" SOURCE_URI_8="https://github.com/Cyan4973/xxHash/archive/$srcGitRev_8.tar.gz" CHECKSUM_SHA256_8="0d1e2b4ae15f98acc49084e23ba94853dba2b0f654865ecedb1072b3959421bf" SOURCE_FILENAME_8="xxHash-$srcGitRev_8.tar.gz" -srcGitRev_9="8983925c3f9aaf82eb061b2e86c5bd1e22705a73" +srcGitRev_9="d08a03b6508b390af20491f2dbeee3453594afc8" SOURCE_URI_9="https://github.com/john-preston/rlottie/archive/$srcGitRev_9.zip" -CHECKSUM_SHA256_9="d7073fb16e090b169b2c0191e2c042558575ac70a05822ec6f59a2ffdda55da0" +CHECKSUM_SHA256_9="f3d29e30da7e63e8eebbe5ccd84cd6697cd0944df237db45889a85779dbd301b" SOURCE_FILENAME_9="rlottie-$srcGitRev_9.zip" srcGitRev_10="9a2a9f2d0f38a39c5ec9b329042ca5f060b058e0" SOURCE_URI_10="https://github.com/lz4/lz4/archive/$srcGitRev_10.tar.gz"