telegram-desktop: update to 2.7.1.
This commit is contained in:
parent
ea4496ae32
commit
7657d85518
6 changed files with 133 additions and 103 deletions
11
srcpkgs/telegram-desktop/patches/0002-use-vendored-gsl.patch
Normal file
11
srcpkgs/telegram-desktop/patches/0002-use-vendored-gsl.patch
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- cmake/external/gsl/CMakeLists.txt 2021-03-17 10:33:50.000000000 +0100
|
||||
+++ - 2021-03-21 21:08:36.925095597 +0100
|
||||
@@ -8,7 +8,7 @@
|
||||
add_library(desktop-app::external_gsl ALIAS external_gsl)
|
||||
|
||||
if (DESKTOP_APP_USE_PACKAGED)
|
||||
- if (DESKTOP_APP_USE_PACKAGED_LAZY)
|
||||
+ if (TRUE)
|
||||
find_package(Microsoft.GSL QUIET)
|
||||
else()
|
||||
find_package(Microsoft.GSL)
|
10
srcpkgs/telegram-desktop/patches/0003-stdint.patch
Normal file
10
srcpkgs/telegram-desktop/patches/0003-stdint.patch
Normal file
|
@ -0,0 +1,10 @@
|
|||
--- Telegram/ThirdParty/tgcalls/tgcalls/group/StreamingPart.h 2021-03-17 21:29:27.000000000 +0100
|
||||
+++ - 2021-03-21 21:11:50.643605199 +0100
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
#include "absl/types/optional.h"
|
||||
#include <vector>
|
||||
+#include <cstdint>
|
||||
|
||||
namespace tgcalls {
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
From 3582bca53a1e195a31760978dc41f67ce44fc7e4 Mon Sep 17 00:00:00 2001
|
||||
From: Ilya Fedin <fedin-ilja2010@ya.ru>
|
||||
Date: Mon, 22 Mar 2021 18:56:15 +0400
|
||||
Subject: [PATCH] Fix build on 32-bit systems
|
||||
|
||||
---
|
||||
base/platform/linux/base_last_input_linux.cpp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/base/platform/linux/base_last_input_linux.cpp b/base/platform/linux/base_last_input_linux.cpp
|
||||
index c51d890..b20bd03 100644
|
||||
--- Telegram/lib_base/base/platform/linux/base_last_input_linux.cpp
|
||||
+++ Telegram/lib_base/base/platform/linux/base_last_input_linux.cpp
|
||||
@@ -135,7 +135,7 @@ std::optional<crl::time> MutterDBusLastUserInputTime() {
|
||||
{},
|
||||
"org.gnome.Mutter.IdleMonitor");
|
||||
|
||||
- const auto value = GlibVariantCast<ulong>(reply.get_child(0));
|
||||
+ const auto value = GlibVariantCast<uint>(reply.get_child(0));
|
||||
return (crl::now() - static_cast<crl::time>(value));
|
||||
} catch (const Glib::Error &e) {
|
||||
static const auto NotSupportedErrors = {
|
|
@ -0,0 +1,84 @@
|
|||
From c08a148bafc27f35011b805e773993300c55713f Mon Sep 17 00:00:00 2001
|
||||
From: Ilya Fedin <fedin-ilja2010@ya.ru>
|
||||
Date: Tue, 23 Mar 2021 18:27:13 +0400
|
||||
Subject: [PATCH] Fix build on 32-bit systems
|
||||
|
||||
---
|
||||
.../platform/linux/linux_mpris_support.cpp | 12 ++++++------
|
||||
.../SourceFiles/platform/linux/main_window_linux.cpp | 4 ++--
|
||||
2 files changed, 8 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git Telegram/SourceFiles/platform/linux/linux_mpris_support.cpp Telegram/SourceFiles/platform/linux/linux_mpris_support.cpp
|
||||
index 3a3d05a1324..339ae554ef8 100644
|
||||
--- Telegram/SourceFiles/platform/linux/linux_mpris_support.cpp
|
||||
+++ Telegram/SourceFiles/platform/linux/linux_mpris_support.cpp
|
||||
@@ -96,7 +96,7 @@ auto CreateMetadata(const Media::Player::TrackState &state) {
|
||||
if (!Media::Player::IsStoppedOrStopping(state.state)) {
|
||||
result["mpris:trackid"] = Glib::wrap(g_variant_new_object_path(
|
||||
kFakeTrackPath.utf8().constData()));
|
||||
- result["mpris:length"] = Glib::Variant<long>::create(
|
||||
+ result["mpris:length"] = Glib::Variant<gint64>::create(
|
||||
state.length * 1000);
|
||||
|
||||
const auto audioData = state.id.audio();
|
||||
@@ -159,7 +159,7 @@ void HandleMethodCall(
|
||||
} else if (method_name == "Previous") {
|
||||
Media::Player::instance()->previous();
|
||||
} else if (method_name == "Seek") {
|
||||
- const auto offset = base::Platform::GlibVariantCast<long>(
|
||||
+ const auto offset = base::Platform::GlibVariantCast<gint64>(
|
||||
parametersCopy.get_child(0));
|
||||
|
||||
const auto state = Media::Player::instance()->getState(
|
||||
@@ -170,7 +170,7 @@ void HandleMethodCall(
|
||||
float64(state.position * 1000 + offset)
|
||||
/ (state.length * 1000));
|
||||
} else if (method_name == "SetPosition") {
|
||||
- const auto position = base::Platform::GlibVariantCast<long>(
|
||||
+ const auto position = base::Platform::GlibVariantCast<gint64>(
|
||||
parametersCopy.get_child(1));
|
||||
|
||||
const auto state = Media::Player::instance()->getState(
|
||||
@@ -251,7 +251,7 @@ void HandleGetProperty(
|
||||
const auto state = Media::Player::instance()->getState(
|
||||
kSongType);
|
||||
|
||||
- property = Glib::Variant<long>::create(state.position * 1000);
|
||||
+ property = Glib::Variant<gint64>::create(state.position * 1000);
|
||||
} else if (property_name == "Rate") {
|
||||
property = Glib::Variant<float64>::create(1.0);
|
||||
} else if (property_name == "Volume") {
|
||||
@@ -315,7 +315,7 @@ void PlayerPropertyChanged(
|
||||
}
|
||||
}
|
||||
|
||||
-void Seeked(long position) {
|
||||
+void Seeked(gint64 position) {
|
||||
try {
|
||||
const auto connection = Gio::DBus::Connection::get_sync(
|
||||
Gio::DBus::BusType::BUS_TYPE_SESSION);
|
||||
@@ -348,7 +348,7 @@ class MPRISSupport::Private {
|
||||
|
||||
std::map<Glib::ustring, Glib::VariantBase> metadata;
|
||||
Glib::ustring playbackStatus;
|
||||
- long position = 0;
|
||||
+ gint64 position = 0;
|
||||
|
||||
rpl::lifetime lifetime;
|
||||
};
|
||||
diff --git a/Telegram/SourceFiles/platform/linux/main_window_linux.cpp b/Telegram/SourceFiles/platform/linux/main_window_linux.cpp
|
||||
index 139667ea6ff..624e5107a02 100644
|
||||
--- Telegram/SourceFiles/platform/linux/main_window_linux.cpp
|
||||
+++ Telegram/SourceFiles/platform/linux/main_window_linux.cpp
|
||||
@@ -880,9 +880,9 @@ void MainWindow::updateIconCounters() {
|
||||
|
||||
if (counterSlice > 0) {
|
||||
// According to the spec, it should be of 'x' D-Bus signature,
|
||||
- // which corresponds to gint64 (signed long) type with glib
|
||||
+ // which corresponds to gint64 type with glib
|
||||
// https://wiki.ubuntu.com/Unity/LauncherAPI#Low_level_DBus_API:_com.canonical.Unity.LauncherEntry
|
||||
- dbusUnityProperties["count"] = Glib::Variant<long>::create(
|
||||
+ dbusUnityProperties["count"] = Glib::Variant<gint64>::create(
|
||||
counterSlice);
|
||||
dbusUnityProperties["count-visible"] =
|
||||
Glib::Variant<bool>::create(true);
|
|
@ -1,96 +0,0 @@
|
|||
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'
|
||||
pkgname=telegram-desktop
|
||||
version=2.6.1
|
||||
version=2.7.1
|
||||
revision=1
|
||||
wrksrc="tdesktop-${version}-full"
|
||||
build_style=cmake
|
||||
|
@ -10,15 +10,14 @@ configure_args="-DTDESKTOP_API_ID=209235
|
|||
-DDESKTOP_APP_USE_GLIBC_WRAPS=OFF
|
||||
-DDESKTOP_APP_DISABLE_CRASH_REPORTS=ON
|
||||
-DTDESKTOP_LAUNCHER_BASENAME=org.telegram.desktop.desktop
|
||||
-DDESKTOP_APP_DISABLE_SPELLCHECK=$(vopt_if spellcheck 'false' 'true')
|
||||
-DDESKTOP_APP_DISABLE_WEBRTC_INTEGRATION=$(vopt_if webrtc 'OFF' 'ON')"
|
||||
-DDESKTOP_APP_DISABLE_SPELLCHECK=$(vopt_if spellcheck 'false' 'true')"
|
||||
hostmakedepends="pkg-config qt5-qmake qt5-host-tools python"
|
||||
makedepends="alsa-lib-devel ffmpeg-devel libdbusmenu-glib-devel libopenal-devel
|
||||
minizip-devel opus-devel xxHash-devel pulseaudio-devel qt5-devel range-v3
|
||||
libva-devel rapidjson liblz4-devel liblzma-devel gtk+3-devel
|
||||
MesaLib-devel libdbusmenu-qt5-devel qt5-wayland-devel libatomic-devel
|
||||
xcb-util-keysyms-devel $(vopt_if spellcheck hunspell-devel)
|
||||
$(vopt_if webrtc tg_owt)"
|
||||
kwayland-devel glibmm-devel tg_owt"
|
||||
depends="qt5-imageformats qt5-core>=5.15.2<5.15.3"
|
||||
short_desc="Telegram Desktop messaging app"
|
||||
maintainer="John <me@johnnynator.dev>"
|
||||
|
@ -26,10 +25,10 @@ license="GPL-3.0-or-later, OpenSSL"
|
|||
homepage="https://desktop.telegram.org/"
|
||||
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"
|
||||
checksum=c7878c4d7c621a175b3b27895b3fb8c20a56319214d5030d734b2768390a8b73
|
||||
checksum=41bfbe1ee63da9a6af7cf7d11b1cdd13a6754b51b294ac5a9d56f5f11dfbdd05
|
||||
|
||||
build_options="spellcheck webrtc"
|
||||
build_options_default="spellcheck webrtc"
|
||||
build_options="spellcheck"
|
||||
build_options_default="spellcheck"
|
||||
|
||||
case $XBPS_TARGET_MACHINE in
|
||||
mips*) broken="unsupported";;
|
||||
|
|
Loading…
Reference in a new issue