From 9732ed008c0daf5febb084ed837a25970e80dae5 Mon Sep 17 00:00:00 2001 From: John Date: Mon, 8 Mar 2021 19:59:09 +0100 Subject: [PATCH 1/4] libvpx6: update to 1.10.0. --- srcpkgs/libvpx6/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/libvpx6/template b/srcpkgs/libvpx6/template index a929b3ebcc20..cde8810988b2 100644 --- a/srcpkgs/libvpx6/template +++ b/srcpkgs/libvpx6/template @@ -1,6 +1,6 @@ # Template file for 'libvpx6' pkgname=libvpx6 -version=1.9.0 +version=1.10.0 revision=1 wrksrc=libvpx-${version} hostmakedepends="perl yasm" @@ -9,7 +9,7 @@ maintainer="q66 " license="BSD-3-Clause-Clear" homepage="http://www.webmproject.org" distfiles="https://github.com/webmproject/libvpx/archive/v${version}.tar.gz" -checksum=d279c10e4b9316bf11a570ba16c3d55791e1ad6faa4404c67422eb631782c80a +checksum=85803ccbdbdd7a3b03d930187cb055f1353596969c1f92ebec2db839fa4f834a replaces="libvpx<1.8.0" do_configure() { From c194d2f1122c748b2170640a8392f8313db3b746 Mon Sep 17 00:00:00 2001 From: John Date: Sun, 7 Mar 2021 11:06:52 +0100 Subject: [PATCH 2/4] telegram-desktop: update to 2.6.1. --- srcpkgs/telegram-desktop/template | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/srcpkgs/telegram-desktop/template b/srcpkgs/telegram-desktop/template index 5778f4c2d76a..7cd6ff771584 100644 --- a/srcpkgs/telegram-desktop/template +++ b/srcpkgs/telegram-desktop/template @@ -1,7 +1,7 @@ # Template file for 'telegram-desktop' pkgname=telegram-desktop -version=2.5.1 -revision=2 +version=2.6.1 +revision=1 wrksrc="tdesktop-${version}-full" build_style=cmake build_helper="qemu" @@ -26,7 +26,7 @@ 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=f1cc5e876deaa4fa4eaafbba95f127d5a3114c166802902b8584099852b9eae2 +checksum=c7878c4d7c621a175b3b27895b3fb8c20a56319214d5030d734b2768390a8b73 build_options="spellcheck webrtc" build_options_default="spellcheck webrtc" From 6a5db5fe9fe5d517d4abca33d9c82eb4b3b21df5 Mon Sep 17 00:00:00 2001 From: John Date: Sun, 7 Mar 2021 11:17:37 +0100 Subject: [PATCH 3/4] tg_owt: update to 0.0.0.20210203. --- srcpkgs/tg_owt/patches/libressl.patch | 70 ---------------------- srcpkgs/tg_owt/patches/libressl.patch.args | 1 - srcpkgs/tg_owt/template | 9 ++- 3 files changed, 4 insertions(+), 76 deletions(-) delete mode 100644 srcpkgs/tg_owt/patches/libressl.patch delete mode 100644 srcpkgs/tg_owt/patches/libressl.patch.args diff --git a/srcpkgs/tg_owt/patches/libressl.patch b/srcpkgs/tg_owt/patches/libressl.patch deleted file mode 100644 index fc352a2a64c2..000000000000 --- a/srcpkgs/tg_owt/patches/libressl.patch +++ /dev/null @@ -1,70 +0,0 @@ -From 3f2d8238846d4795f1292c05923b9f212dc4d022 Mon Sep 17 00:00:00 2001 -From: Charlie Li -Date: Sat, 21 Nov 2020 14:24:04 -0500 -Subject: [PATCH] Fix build with LibreSSL - -LibreSSL's dtls1.h uses some definitions from ssl.h and ssl3.h, but -expects consumers to include them. Reorder and include them before -dtls1.h. - -LibreSSL does not define DTLS1_2_VERSION. Remove them from view. ---- - src/rtc_base/openssl_stream_adapter.cc | 19 ++++++++++++++++++- - 1 file changed, 18 insertions(+), 1 deletion(-) - -diff --git a/src/rtc_base/openssl_stream_adapter.cc b/src/rtc_base/openssl_stream_adapter.cc -index 7f4b79a5..037002bc 100644 ---- a/src/rtc_base/openssl_stream_adapter.cc -+++ b/src/rtc_base/openssl_stream_adapter.cc -@@ -17,8 +17,11 @@ - #include - #include - #ifndef OPENSSL_IS_BORINGSSL --#include - #include -+#ifdef LIBRESSL_VERSION_NUMBER -+#include -+#endif -+#include - #endif - - #include -@@ -392,8 +395,10 @@ SSLProtocolVersion OpenSSLStreamAdapter::GetSslVersion() const { - if (ssl_mode_ == SSL_MODE_DTLS) { - if (ssl_version == DTLS1_VERSION) { - return SSL_PROTOCOL_DTLS_10; -+#ifndef LIBRESSL_VERSION_NUMBER - } else if (ssl_version == DTLS1_2_VERSION) { - return SSL_PROTOCOL_DTLS_12; -+#endif - } - } else { - if (ssl_version == TLS1_VERSION) { -@@ -985,15 +990,27 @@ SSL_CTX* OpenSSLStreamAdapter::SetupSSLContext() { - case SSL_PROTOCOL_TLS_12: - default: - SSL_CTX_set_max_proto_version( -+#ifdef LIBRESSL_VERSION_NUMBER -+ ctx, TLS1_2_VERSION); -+#else - ctx, ssl_mode_ == SSL_MODE_DTLS ? DTLS1_2_VERSION : TLS1_2_VERSION); -+#endif - break; - } - } else { - // TODO(https://bugs.webrtc.org/10261): Make this the default in M84. - SSL_CTX_set_min_proto_version( -+#ifdef LIBRESSL_VERSION_NUMBER -+ ctx, TLS1_2_VERSION); -+#else - ctx, ssl_mode_ == SSL_MODE_DTLS ? DTLS1_2_VERSION : TLS1_2_VERSION); -+#endif - SSL_CTX_set_max_proto_version( -+#ifdef LIBRESSL_VERSION_NUMBER -+ ctx, TLS1_2_VERSION); -+#else - ctx, ssl_mode_ == SSL_MODE_DTLS ? DTLS1_2_VERSION : TLS1_2_VERSION); -+#endif - } - - #ifdef OPENSSL_IS_BORINGSSL diff --git a/srcpkgs/tg_owt/patches/libressl.patch.args b/srcpkgs/tg_owt/patches/libressl.patch.args deleted file mode 100644 index 2eba1cb3c5ce..000000000000 --- a/srcpkgs/tg_owt/patches/libressl.patch.args +++ /dev/null @@ -1 +0,0 @@ --Np1 diff --git a/srcpkgs/tg_owt/template b/srcpkgs/tg_owt/template index fa0d55fc4aec..b63fd17281a4 100644 --- a/srcpkgs/tg_owt/template +++ b/srcpkgs/tg_owt/template @@ -1,9 +1,8 @@ # Template file for 'tg_owt' pkgname=tg_owt -version=0.0.0.1 -revision=2 -_commit=756fd0fb5f40ffb4244c675208e84de781f766f3 -_libvpx_commit=5b63f0f821e94f8072eb483014cfc33b05978bb9 +version=0.0.0.20210321 +revision=1 +_commit=2d804d2c9c5d05324c8ab22f2e6ff8306521b3c3 _libyuv_commit=ad890067f661dc747a975bc55ba3767fe30d4452 wrksrc="tg_owt-$_commit" build_style=cmake @@ -18,7 +17,7 @@ license="GPL-3.0-or-later" homepage="https://github.com/desktop-app/tg_owt" distfiles="https://github.com/desktop-app/tg_owt/archive/${_commit}.tar.gz https://chromium.googlesource.com/libyuv/libyuv/+archive/${_libyuv_commit}.tar.gz" -checksum="@43d09b00a43f9206b1f04c6d6697f4b0cb3be0285100bf5df91144b1d689c89a +checksum="@2873f3c9a6e5a93976623d4502af59bf6c8a3536aa9928acf45cea0a20e23ec0 @1dd51820852df840c339bf3f18e6cf1166de33d5631a69cd1eae5b2b34c113e3" skip_extraction="${_libvpx_commit}.tar.gz ${_libyuv_commit}.tar.gz" From 2c3b87d166d6f2dfbfcb30fb498ee75bcf7e7f8c Mon Sep 17 00:00:00 2001 From: John Date: Sun, 21 Mar 2021 20:55:31 +0100 Subject: [PATCH 4/4] telegram-desktop: update to 2.7.1. --- .../patches/0002-use-vendored-gsl.patch | 11 +++ .../patches/0003-stdint.patch | 10 ++ ...148bafc27f35011b805e773993300c55713f.patch | 84 ++++++++++++++++ .../patches/no-webrtc-build.patch | 96 ------------------- srcpkgs/telegram-desktop/template | 13 ++- 5 files changed, 111 insertions(+), 103 deletions(-) create mode 100644 srcpkgs/telegram-desktop/patches/0002-use-vendored-gsl.patch create mode 100644 srcpkgs/telegram-desktop/patches/0003-stdint.patch create mode 100644 srcpkgs/telegram-desktop/patches/c08a148bafc27f35011b805e773993300c55713f.patch delete mode 100644 srcpkgs/telegram-desktop/patches/no-webrtc-build.patch diff --git a/srcpkgs/telegram-desktop/patches/0002-use-vendored-gsl.patch b/srcpkgs/telegram-desktop/patches/0002-use-vendored-gsl.patch new file mode 100644 index 000000000000..dfb0d743d8f5 --- /dev/null +++ b/srcpkgs/telegram-desktop/patches/0002-use-vendored-gsl.patch @@ -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) diff --git a/srcpkgs/telegram-desktop/patches/0003-stdint.patch b/srcpkgs/telegram-desktop/patches/0003-stdint.patch new file mode 100644 index 000000000000..e73238fc0341 --- /dev/null +++ b/srcpkgs/telegram-desktop/patches/0003-stdint.patch @@ -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 ++#include + + namespace tgcalls { + diff --git a/srcpkgs/telegram-desktop/patches/c08a148bafc27f35011b805e773993300c55713f.patch b/srcpkgs/telegram-desktop/patches/c08a148bafc27f35011b805e773993300c55713f.patch new file mode 100644 index 000000000000..e8cc81c0a1fc --- /dev/null +++ b/srcpkgs/telegram-desktop/patches/c08a148bafc27f35011b805e773993300c55713f.patch @@ -0,0 +1,84 @@ +From c08a148bafc27f35011b805e773993300c55713f Mon Sep 17 00:00:00 2001 +From: Ilya Fedin +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::create( ++ result["mpris:length"] = Glib::Variant::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( ++ const auto offset = base::Platform::GlibVariantCast( + 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( ++ const auto position = base::Platform::GlibVariantCast( + 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::create(state.position * 1000); ++ property = Glib::Variant::create(state.position * 1000); + } else if (property_name == "Rate") { + property = Glib::Variant::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 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::create( ++ dbusUnityProperties["count"] = Glib::Variant::create( + counterSlice); + dbusUnityProperties["count-visible"] = + Glib::Variant::create(true); diff --git a/srcpkgs/telegram-desktop/patches/no-webrtc-build.patch b/srcpkgs/telegram-desktop/patches/no-webrtc-build.patch deleted file mode 100644 index 3d8ab8f98272..000000000000 --- a/srcpkgs/telegram-desktop/patches/no-webrtc-build.patch +++ /dev/null @@ -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 Instance::getVideoCapture() { - return result; - } - auto result = std::shared_ptr( -+ #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> _maxSample; -+#ifndef DESKTOP_APP_DISABLE_WEBRTC_INTEGRATION - crl::object_on_thread _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>(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 GetVideoInputList() { return std::vector(); }; -+std::vector GetAudioInputList() { return std::vector(); }; -+std::vector GetAudioOutputList() { return std::vector(); }; -+} diff --git a/srcpkgs/telegram-desktop/template b/srcpkgs/telegram-desktop/template index 7cd6ff771584..9f74895d695c 100644 --- a/srcpkgs/telegram-desktop/template +++ b/srcpkgs/telegram-desktop/template @@ -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 " @@ -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";;