telegram-desktop: update to 2.3.2.
This commit is contained in:
parent
f88309c3d3
commit
13c86054fb
3 changed files with 132 additions and 6 deletions
34
srcpkgs/telegram-desktop/patches/Fix_xcb_wayland.patch
Normal file
34
srcpkgs/telegram-desktop/patches/Fix_xcb_wayland.patch
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
--- Telegram/SourceFiles/platform/linux/specific_linux.cpp 2020-08-23 15:36:52.000000000 +0200
|
||||||
|
+++ Telegram/SourceFiles/platform/linux/specific_linux.cpp 2020-09-02 08:38:32.950087151 +0200
|
||||||
|
@@ -298,6 +298,20 @@
|
||||||
|
}
|
||||||
|
#endif // !TDESKTOP_DISABLE_GTK_INTEGRATION
|
||||||
|
|
||||||
|
+bool IsXCBExtensionPresent(
|
||||||
|
+ xcb_connection_t *connection,
|
||||||
|
+ xcb_extension_t *ext) {
|
||||||
|
+ const auto reply = xcb_get_extension_data(
|
||||||
|
+ connection,
|
||||||
|
+ ext);
|
||||||
|
+
|
||||||
|
+ if (!reply) {
|
||||||
|
+ return false;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ return reply->present;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
std::optional<crl::time> XCBLastUserInputTime() {
|
||||||
|
const auto native = QGuiApplication::platformNativeInterface();
|
||||||
|
if (!native) {
|
||||||
|
@@ -311,6 +325,10 @@
|
||||||
|
return std::nullopt;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ if (!IsXCBExtensionPresent(connection, &xcb_screensaver_id)) {
|
||||||
|
+ return std::nullopt;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
const auto screen = xcb_setup_roots_iterator(xcb_get_setup(connection)).data;
|
||||||
|
if (!screen) {
|
||||||
|
return std::nullopt;
|
96
srcpkgs/telegram-desktop/patches/no-webrtc-build.patch
Normal file
96
srcpkgs/telegram-desktop/patches/no-webrtc-build.patch
Normal file
|
@ -0,0 +1,96 @@
|
||||||
|
diff --git a/Telegram/SourceFiles/calls/calls_instance.cpp b/Telegram/SourceFiles/calls/calls_instance.cpp
|
||||||
|
index e99958109..bb7678d3c 100644
|
||||||
|
--- Telegram/SourceFiles/calls/calls_instance.cpp
|
||||||
|
+++ Telegram/SourceFiles/calls/calls_instance.cpp
|
||||||
|
@@ -350,8 +350,11 @@ std::shared_ptr<tgcalls::VideoCaptureInterface> Instance::getVideoCapture() {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
auto result = std::shared_ptr<tgcalls::VideoCaptureInterface>(
|
||||||
|
+ #ifndef DESKTOP_APP_DISABLE_WEBRTC_INTEGRATION
|
||||||
|
tgcalls::VideoCaptureInterface::Create(
|
||||||
|
- Core::App().settings().callVideoInputDeviceId().toStdString()));
|
||||||
|
+ Core::App().settings().callVideoInputDeviceId().toStdString())
|
||||||
|
+ #endif
|
||||||
|
+ );
|
||||||
|
_videoCapture = result;
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
diff --git Telegram/lib_webrtc/CMakeLists.txt b/CMakeLists.txt
|
||||||
|
index 47796f1..1f54c21 100644
|
||||||
|
--- Telegram/lib_webrtc/CMakeLists.txt
|
||||||
|
+++ Telegram/lib_webrtc/CMakeLists.txt
|
||||||
|
@@ -14,8 +14,10 @@ target_precompile_headers(lib_webrtc PRIVATE ${src_loc}/webrtc/webrtc_pch.h)
|
||||||
|
nice_target_sources(lib_webrtc ${src_loc}
|
||||||
|
PRIVATE
|
||||||
|
webrtc/webrtc_audio_input_tester.cpp
|
||||||
|
+ webrtc/webrtc_audio_input_tester_dummy.cpp
|
||||||
|
webrtc/webrtc_audio_input_tester.h
|
||||||
|
webrtc/webrtc_media_devices.cpp
|
||||||
|
+ webrtc/webrtc_media_devices_dummy.cpp
|
||||||
|
webrtc/webrtc_media_devices.h
|
||||||
|
webrtc/webrtc_video_track.cpp
|
||||||
|
webrtc/webrtc_video_track.h
|
||||||
|
@@ -40,10 +42,14 @@ PUBLIC
|
||||||
|
if (DESKTOP_APP_DISABLE_WEBRTC_INTEGRATION)
|
||||||
|
remove_target_sources(lib_webrtc ${src_loc}
|
||||||
|
webrtc/webrtc_video_track.cpp
|
||||||
|
+ webrtc/webrtc_media_devices.cpp
|
||||||
|
+ webrtc/webrtc_audio_input_tester.cpp
|
||||||
|
)
|
||||||
|
else()
|
||||||
|
remove_target_sources(lib_webrtc ${src_loc}
|
||||||
|
webrtc/webrtc_video_track_dummy.cpp
|
||||||
|
+ webrtc/webrtc_media_devices_dummy.cpp
|
||||||
|
+ webrtc/webrtc_audio_input_tester_dummy.cpp
|
||||||
|
)
|
||||||
|
target_link_libraries(lib_webrtc
|
||||||
|
PRIVATE
|
||||||
|
diff --git Telegram/lib_webrtc/webrtc/webrtc_audio_input_tester.h b/webrtc/webrtc_audio_input_tester.h
|
||||||
|
index 1ae8d30..008df7e 100644
|
||||||
|
--- Telegram/lib_webrtc/webrtc/webrtc_audio_input_tester.h
|
||||||
|
+++ Telegram/lib_webrtc/webrtc/webrtc_audio_input_tester.h
|
||||||
|
@@ -20,11 +20,13 @@ public:
|
||||||
|
[[nodiscard]] float getAndResetLevel();
|
||||||
|
|
||||||
|
private:
|
||||||
|
+#ifndef DESKTOP_APP_DISABLE_WEBRTC_INTEGRATION
|
||||||
|
class Impl;
|
||||||
|
-
|
||||||
|
+#endif
|
||||||
|
std::shared_ptr<std::atomic<int>> _maxSample;
|
||||||
|
+#ifndef DESKTOP_APP_DISABLE_WEBRTC_INTEGRATION
|
||||||
|
crl::object_on_thread<Impl> _impl;
|
||||||
|
-
|
||||||
|
+#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace Webrtc
|
||||||
|
diff --git Telegram/lib_webrtc/webrtc/webrtc_audio_input_tester_dummy.cpp b/webrtc/webrtc_audio_input_tester_dummy.cpp
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..4e47eaa
|
||||||
|
--- /dev/null
|
||||||
|
+++ Telegram/lib_webrtc/webrtc/webrtc_audio_input_tester_dummy.cpp
|
||||||
|
@@ -0,0 +1,11 @@
|
||||||
|
+#include "webrtc/webrtc_audio_input_tester.h"
|
||||||
|
+
|
||||||
|
+namespace Webrtc {
|
||||||
|
+AudioInputTester::AudioInputTester(const QString &deviceId)
|
||||||
|
+: _maxSample(std::make_shared<std::atomic<int>>(0)) {}
|
||||||
|
+AudioInputTester::~AudioInputTester() {}
|
||||||
|
+void AudioInputTester::setDeviceId(const QString &deviceId) {};
|
||||||
|
+float AudioInputTester::getAndResetLevel() {
|
||||||
|
+ return _maxSample->exchange(0) / float(INT16_MAX);\
|
||||||
|
+}
|
||||||
|
+}
|
||||||
|
diff --git Telegram/lib_webrtc/webrtc/webrtc_media_devices_dummy.cpp b/webrtc/webrtc_media_devices_dummy.cpp
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..8d5d245
|
||||||
|
--- /dev/null
|
||||||
|
+++ Telegram/lib_webrtc/webrtc/webrtc_media_devices_dummy.cpp
|
||||||
|
@@ -0,0 +1,6 @@
|
||||||
|
+#include "webrtc/webrtc_media_devices.h"
|
||||||
|
+namespace Webrtc {
|
||||||
|
+std::vector<VideoInput> GetVideoInputList() { return std::vector<VideoInput>(); };
|
||||||
|
+std::vector<AudioInput> GetAudioInputList() { return std::vector<AudioInput>(); };
|
||||||
|
+std::vector<AudioOutput> GetAudioOutputList() { return std::vector<AudioOutput>(); };
|
||||||
|
+}
|
|
@ -1,6 +1,6 @@
|
||||||
# Template file for 'telegram-desktop'
|
# Template file for 'telegram-desktop'
|
||||||
pkgname=telegram-desktop
|
pkgname=telegram-desktop
|
||||||
version=2.3.0
|
version=2.3.2
|
||||||
revision=1
|
revision=1
|
||||||
wrksrc="tdesktop-${version}-full"
|
wrksrc="tdesktop-${version}-full"
|
||||||
build_style=cmake
|
build_style=cmake
|
||||||
|
@ -11,10 +11,6 @@ configure_args="-DTDESKTOP_API_ID=209235
|
||||||
-DDESKTOP_APP_DISABLE_CRASH_REPORTS=ON
|
-DDESKTOP_APP_DISABLE_CRASH_REPORTS=ON
|
||||||
-DTDESKTOP_LAUNCHER_BASENAME=org.telegram.desktop.desktop
|
-DTDESKTOP_LAUNCHER_BASENAME=org.telegram.desktop.desktop
|
||||||
-DTDESKTOP_DISABLE_REGISTER_CUSTOM_SCHEME=ON
|
-DTDESKTOP_DISABLE_REGISTER_CUSTOM_SCHEME=ON
|
||||||
-DTDESKTOP_USE_PACKAGED_TGVOIP=OFF
|
|
||||||
-DDESKTOP_APP_USE_PACKAGED_EXPECTED=OFF
|
|
||||||
-DDESKTOP_APP_USE_PACKAGED_VARIANT=OFF
|
|
||||||
-DDESKTOP_APP_USE_PACKAGED_GSL=OFF
|
|
||||||
-DDESKTOP_APP_DISABLE_SPELLCHECK=$(vopt_if spellcheck 'false' 'true')
|
-DDESKTOP_APP_DISABLE_SPELLCHECK=$(vopt_if spellcheck 'false' 'true')
|
||||||
-DDESKTOP_APP_DISABLE_WEBRTC_INTEGRATION=ON"
|
-DDESKTOP_APP_DISABLE_WEBRTC_INTEGRATION=ON"
|
||||||
hostmakedepends="pkg-config qt5-qmake qt5-host-tools python"
|
hostmakedepends="pkg-config qt5-qmake qt5-host-tools python"
|
||||||
|
@ -30,7 +26,7 @@ license="GPL-3.0-or-later WITH OpenSSL"
|
||||||
homepage="https://desktop.telegram.org/"
|
homepage="https://desktop.telegram.org/"
|
||||||
changelog="https://github.com/telegramdesktop/tdesktop/blob/v${version}/changelog.txt"
|
changelog="https://github.com/telegramdesktop/tdesktop/blob/v${version}/changelog.txt"
|
||||||
distfiles="https://github.com/telegramdesktop/tdesktop/releases/download/v${version}/tdesktop-${version}-full.tar.gz"
|
distfiles="https://github.com/telegramdesktop/tdesktop/releases/download/v${version}/tdesktop-${version}-full.tar.gz"
|
||||||
checksum=bc05b13c4cb2137a15d3ecc1c201295bb0020a78c20b8cdaa8856569c625ea79
|
checksum=292631bcac4b30f778879ecd2cebf4c6f569ab5be01230c8e62b924b4211a259
|
||||||
|
|
||||||
build_options="spellcheck"
|
build_options="spellcheck"
|
||||||
build_options_default="spellcheck"
|
build_options_default="spellcheck"
|
||||||
|
|
Loading…
Reference in a new issue