From: "Georgy Yakovlev" <gyakovlev@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: net-im/telegram-desktop/files/, net-im/telegram-desktop/
Date: Sat, 31 Oct 2020 21:17:15 +0000 (UTC) [thread overview]
Message-ID: <1604178876.052e291b89bd1ccba37c8ba8cca4c4df8e5266c5.gyakovlev@gentoo> (raw)
commit: 052e291b89bd1ccba37c8ba8cca4c4df8e5266c5
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 31 21:06:29 2020 +0000
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Sat Oct 31 21:14:36 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=052e291b
net-im/telegram-desktop: add webrtc flag back to 2.4.5
Closes: https://bugs.gentoo.org/751481
Thanks-to: Joe Kappus
Package-Manager: Portage-3.0.8, Repoman-3.0.2
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
.../telegram-desktop/files/no-webrtc-build.patch | 96 ++++++++++++++++++++++
net-im/telegram-desktop/metadata.xml | 1 +
.../telegram-desktop/telegram-desktop-2.4.5.ebuild | 16 +++-
3 files changed, 110 insertions(+), 3 deletions(-)
diff --git a/net-im/telegram-desktop/files/no-webrtc-build.patch b/net-im/telegram-desktop/files/no-webrtc-build.patch
new file mode 100644
index 00000000000..8ae4113f440
--- /dev/null
+++ b/net-im/telegram-desktop/files/no-webrtc-build.patch
@@ -0,0 +1,96 @@
+diff --git a/Telegram/SourceFiles/calls/calls_instance.cpp b/Telegram/SourceFiles/calls/calls_instance.cpp
+index e99958109..bb7678d3c 100644
+--- a/Telegram/SourceFiles/calls/calls_instance.cpp
++++ b/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
+--- a/Telegram/lib_webrtc/CMakeLists.txt
++++ b/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
+--- a/Telegram/lib_webrtc/webrtc/webrtc_audio_input_tester.h
++++ b/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
+--- a//dev/null
++++ b/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
+--- a/dev/null
++++ b/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>(); };
++}
diff --git a/net-im/telegram-desktop/metadata.xml b/net-im/telegram-desktop/metadata.xml
index f7ab5b26ef9..4e1022a426d 100644
--- a/net-im/telegram-desktop/metadata.xml
+++ b/net-im/telegram-desktop/metadata.xml
@@ -9,5 +9,6 @@
<flag name="enchant">Enable the app-text/aspell spell-checking backend</flag>
<flag name="hunspell">Enable the app-text/hunspell spell-checking backend</flag>
<flag name="lto">Enable Link Time Optimization (LTO / IPO)</flag>
+ <flag name="webrtc">WebRTC based video call support</flag>
</use>
</pkgmetadata>
diff --git a/net-im/telegram-desktop/telegram-desktop-2.4.5.ebuild b/net-im/telegram-desktop/telegram-desktop-2.4.5.ebuild
index 953d5820864..ca2ff2db3af 100644
--- a/net-im/telegram-desktop/telegram-desktop-2.4.5.ebuild
+++ b/net-im/telegram-desktop/telegram-desktop-2.4.5.ebuild
@@ -17,7 +17,7 @@ SRC_URI="https://github.com/telegramdesktop/tdesktop/releases/download/v${PV}/${
LICENSE="BSD GPL-3-with-openssl-exception LGPL-2+"
SLOT="0"
KEYWORDS="~amd64 ~ppc64"
-IUSE="+dbus enchant +gtk +hunspell libressl lto pulseaudio +spell +X"
+IUSE="+dbus enchant +gtk +hunspell libressl lto pulseaudio +spell +webrtc +X"
RDEPEND="
!net-im/telegram-desktop-bin
@@ -35,11 +35,9 @@ RDEPEND="
media-fonts/open-sans
media-libs/alsa-lib
media-libs/fontconfig:=
- media-libs/libjpeg-turbo:=
~media-libs/libtgvoip-2.4.4_p20201030[pulseaudio=]
media-libs/openal[alsa]
media-libs/opus:=
- ~media-libs/tg_owt-0_pre20201030[pulseaudio=]
media-video/ffmpeg:=[alsa,opus]
sys-libs/zlib[minizip]
virtual/libiconv
@@ -58,6 +56,10 @@ RDEPEND="
hunspell? ( >=app-text/hunspell-1.7:= )
!pulseaudio? ( media-sound/apulse[sdk] )
pulseaudio? ( media-sound/pulseaudio )
+ webrtc? (
+ media-libs/libjpeg-turbo:=
+ ~media-libs/tg_owt-0_pre20201030[pulseaudio=]
+ )
"
DEPEND="
@@ -77,6 +79,7 @@ REQUIRED_USE="
spell? (
^^ ( enchant hunspell )
)
+ webrtc? ( !libressl )
"
S="${WORKDIR}/${MY_P}"
@@ -91,6 +94,12 @@ pkg_pretend() {
fi
}
+src_prepare() {
+ # conditional patching is bad, but we want vanilla telegram with webrtc.
+ use webrtc || local PATCHES=( "${FILESDIR}/no-webrtc-build.patch" )
+ cmake_src_prepare
+}
+
src_configure() {
local mycxxflags=(
-Wno-deprecated-declarations
@@ -116,6 +125,7 @@ src_configure() {
-DTDESKTOP_LAUNCHER_BASENAME="${PN}"
-DDESKTOP_APP_DISABLE_DBUS_INTEGRATION="$(usex dbus OFF ON)"
-DDESKTOP_APP_DISABLE_SPELLCHECK="$(usex spell OFF ON)" # enables hunspell (recommended)
+ -DDESKTOP_APP_DISABLE_WEBRTC_INTEGRATION="$(usex webrtc OFF ON)"
-DDESKTOP_APP_USE_ENCHANT="$(usex enchant ON OFF)" # enables enchant and disables hunspell
$(usex lto "-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON" '')
)
next reply other threads:[~2020-10-31 21:17 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-31 21:17 Georgy Yakovlev [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-03-30 21:58 [gentoo-commits] repo/gentoo:master commit in: net-im/telegram-desktop/files/, net-im/telegram-desktop/ Andreas Sturmlechner
2025-03-25 10:20 Yixun Lan
2024-05-15 8:51 Yixun Lan
2024-05-14 2:08 Yixun Lan
2024-04-10 23:34 Yixun Lan
2023-12-28 13:58 Yixun Lan
2023-12-11 13:25 Yixun Lan
2023-12-11 13:25 Yixun Lan
2023-10-28 15:01 Yixun Lan
2023-07-15 16:25 Sam James
2023-06-10 13:43 Sam James
2023-05-16 17:07 Sam James
2023-04-17 20:16 Georgy Yakovlev
2023-02-13 21:03 Georgy Yakovlev
2022-12-13 3:13 John Helmert III
2022-10-03 22:52 Georgy Yakovlev
2022-08-23 5:24 Sam James
2022-08-23 5:24 Sam James
2022-04-25 1:43 Georgy Yakovlev
2022-04-15 6:04 Sam James
2022-04-15 6:04 Sam James
2022-01-28 20:02 Georgy Yakovlev
2021-12-10 21:31 Georgy Yakovlev
2021-09-16 12:07 Georgy Yakovlev
2021-08-12 17:56 Georgy Yakovlev
2021-08-05 16:42 Georgy Yakovlev
2021-08-04 8:31 Georgy Yakovlev
2021-07-17 20:05 Georgy Yakovlev
2021-07-17 0:06 Georgy Yakovlev
2021-06-28 8:38 Georgy Yakovlev
2021-06-03 2:11 Stefan Strogin
2021-05-09 8:05 Georgy Yakovlev
2021-05-03 17:01 Georgy Yakovlev
2021-03-25 19:31 Georgy Yakovlev
2020-05-28 6:14 Georgy Yakovlev
2020-03-31 8:33 Georgy Yakovlev
2020-03-19 17:47 Georgy Yakovlev
2020-03-15 19:14 Georgy Yakovlev
2020-02-25 2:53 Georgy Yakovlev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1604178876.052e291b89bd1ccba37c8ba8cca4c4df8e5266c5.gyakovlev@gentoo \
--to=gyakovlev@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox