Gentoo Archives: gentoo-commits

From: Georgy Yakovlev <gyakovlev@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-im/telegram-desktop/, net-im/telegram-desktop/files/
Date: Fri, 23 Apr 2021 19:06:45
Message-Id: 1619204738.599beaa6d3b62e8849fde028fea9b37f1a183deb.gyakovlev@gentoo
1 commit: 599beaa6d3b62e8849fde028fea9b37f1a183deb
2 Author: Esteve Varela Colominas <esteve.varela <AT> gmail <DOT> com>
3 AuthorDate: Thu Apr 22 16:22:00 2021 +0000
4 Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
5 CommitDate: Fri Apr 23 19:05:38 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=599beaa6
7
8 net-im/telegram-desktop: drop old
9
10 Bug: https://bugs.gentoo.org/771684
11 Signed-off-by: Esteve Varela Colominas <esteve.varela <AT> gmail.com>
12 Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
13
14 net-im/telegram-desktop/Manifest | 2 -
15 .../telegram-desktop/files/no-webrtc-build.patch | 96 ------------
16 net-im/telegram-desktop/metadata.xml | 2 -
17 .../telegram-desktop-2.4.11.ebuild | 174 ---------------------
18 .../telegram-desktop-2.4.7-r1.ebuild | 173 --------------------
19 5 files changed, 447 deletions(-)
20
21 diff --git a/net-im/telegram-desktop/Manifest b/net-im/telegram-desktop/Manifest
22 index dac600068a1..9e1071af1e4 100644
23 --- a/net-im/telegram-desktop/Manifest
24 +++ b/net-im/telegram-desktop/Manifest
25 @@ -1,3 +1 @@
26 -DIST tdesktop-2.4.11-full.tar.gz 36405312 BLAKE2B 7c4239d4a2193c910aeb918f40d4c196702bffb4236f7702a5573840b8d4a1a9183e3c91fd97c5d9e4ab5950d96e99b427746ffb18ed5bbef16b240dfc873e2e SHA512 b6452c39ea1b1b794c61ec2fc700356c9ee314250d73b895d297ad66602a93676d3cf74d695ac53965719ddb54da9e290f4f638bbf2e0fb21fec8995b6788a1c
27 -DIST tdesktop-2.4.7-full.tar.gz 36355613 BLAKE2B 5b60bddd81d5472aaa303817be280604d5dcb4a5f7260c6b6fbd7ca075a46972adb4439e58e2f5b7877c10b3cb6420a7bc95ffe36ab0b3cf531a46758046f7c1 SHA512 712ab6896f89f7df0c7ac297039ee3b3532c159e17f66e4539b701a35d04d4709b558755d592d3cd91df541a2d2ca9f0485cf073c32f0b69a18848ab2ccd1993
28 DIST tdesktop-2.7.1-full.tar.gz 36770178 BLAKE2B 21379cc970da07725e7a46d18a4f0bc459b1da1b730587595448b8f78133ce701e374e7faefc649a973342c203eee510872b5a4ed2ff6be92daec25157e400a4 SHA512 dffd184c4369c5c5947b1ca085add533e54313ce39aebcdca4f0958431a305aa5e95c2f2b48592f6992e666b2d33eeba5697f9e09f6048a53b807f2950fbd17b
29
30 diff --git a/net-im/telegram-desktop/files/no-webrtc-build.patch b/net-im/telegram-desktop/files/no-webrtc-build.patch
31 deleted file mode 100644
32 index 8ae4113f440..00000000000
33 --- a/net-im/telegram-desktop/files/no-webrtc-build.patch
34 +++ /dev/null
35 @@ -1,96 +0,0 @@
36 -diff --git a/Telegram/SourceFiles/calls/calls_instance.cpp b/Telegram/SourceFiles/calls/calls_instance.cpp
37 -index e99958109..bb7678d3c 100644
38 ---- a/Telegram/SourceFiles/calls/calls_instance.cpp
39 -+++ b/Telegram/SourceFiles/calls/calls_instance.cpp
40 -@@ -350,8 +350,11 @@ std::shared_ptr<tgcalls::VideoCaptureInterface> Instance::getVideoCapture() {
41 - return result;
42 - }
43 - auto result = std::shared_ptr<tgcalls::VideoCaptureInterface>(
44 -+ #ifndef DESKTOP_APP_DISABLE_WEBRTC_INTEGRATION
45 - tgcalls::VideoCaptureInterface::Create(
46 -- Core::App().settings().callVideoInputDeviceId().toStdString()));
47 -+ Core::App().settings().callVideoInputDeviceId().toStdString())
48 -+ #endif
49 -+ );
50 - _videoCapture = result;
51 - return result;
52 - }
53 -diff --git Telegram/lib_webrtc/CMakeLists.txt b/CMakeLists.txt
54 -index 47796f1..1f54c21 100644
55 ---- a/Telegram/lib_webrtc/CMakeLists.txt
56 -+++ b/Telegram/lib_webrtc/CMakeLists.txt
57 -@@ -14,8 +14,10 @@ target_precompile_headers(lib_webrtc PRIVATE ${src_loc}/webrtc/webrtc_pch.h)
58 - nice_target_sources(lib_webrtc ${src_loc}
59 - PRIVATE
60 - webrtc/webrtc_audio_input_tester.cpp
61 -+ webrtc/webrtc_audio_input_tester_dummy.cpp
62 - webrtc/webrtc_audio_input_tester.h
63 - webrtc/webrtc_media_devices.cpp
64 -+ webrtc/webrtc_media_devices_dummy.cpp
65 - webrtc/webrtc_media_devices.h
66 - webrtc/webrtc_video_track.cpp
67 - webrtc/webrtc_video_track.h
68 -@@ -40,10 +42,14 @@ PUBLIC
69 - if (DESKTOP_APP_DISABLE_WEBRTC_INTEGRATION)
70 - remove_target_sources(lib_webrtc ${src_loc}
71 - webrtc/webrtc_video_track.cpp
72 -+ webrtc/webrtc_media_devices.cpp
73 -+ webrtc/webrtc_audio_input_tester.cpp
74 - )
75 - else()
76 - remove_target_sources(lib_webrtc ${src_loc}
77 - webrtc/webrtc_video_track_dummy.cpp
78 -+ webrtc/webrtc_media_devices_dummy.cpp
79 -+ webrtc/webrtc_audio_input_tester_dummy.cpp
80 - )
81 - target_link_libraries(lib_webrtc
82 - PRIVATE
83 -diff --git Telegram/lib_webrtc/webrtc/webrtc_audio_input_tester.h b/webrtc/webrtc_audio_input_tester.h
84 -index 1ae8d30..008df7e 100644
85 ---- a/Telegram/lib_webrtc/webrtc/webrtc_audio_input_tester.h
86 -+++ b/Telegram/lib_webrtc/webrtc/webrtc_audio_input_tester.h
87 -@@ -20,11 +20,13 @@ public:
88 - [[nodiscard]] float getAndResetLevel();
89 -
90 - private:
91 -+#ifndef DESKTOP_APP_DISABLE_WEBRTC_INTEGRATION
92 - class Impl;
93 --
94 -+#endif
95 - std::shared_ptr<std::atomic<int>> _maxSample;
96 -+#ifndef DESKTOP_APP_DISABLE_WEBRTC_INTEGRATION
97 - crl::object_on_thread<Impl> _impl;
98 --
99 -+#endif
100 - };
101 -
102 - } // namespace Webrtc
103 -diff --git Telegram/lib_webrtc/webrtc/webrtc_audio_input_tester_dummy.cpp b/webrtc/webrtc_audio_input_tester_dummy.cpp
104 -new file mode 100644
105 -index 0000000..4e47eaa
106 ---- a//dev/null
107 -+++ b/Telegram/lib_webrtc/webrtc/webrtc_audio_input_tester_dummy.cpp
108 -@@ -0,0 +1,11 @@
109 -+#include "webrtc/webrtc_audio_input_tester.h"
110 -+
111 -+namespace Webrtc {
112 -+AudioInputTester::AudioInputTester(const QString &deviceId)
113 -+: _maxSample(std::make_shared<std::atomic<int>>(0)) {}
114 -+AudioInputTester::~AudioInputTester() {}
115 -+void AudioInputTester::setDeviceId(const QString &deviceId) {};
116 -+float AudioInputTester::getAndResetLevel() {
117 -+ return _maxSample->exchange(0) / float(INT16_MAX);\
118 -+}
119 -+}
120 -diff --git Telegram/lib_webrtc/webrtc/webrtc_media_devices_dummy.cpp b/webrtc/webrtc_media_devices_dummy.cpp
121 -new file mode 100644
122 -index 0000000..8d5d245
123 ---- a/dev/null
124 -+++ b/Telegram/lib_webrtc/webrtc/webrtc_media_devices_dummy.cpp
125 -@@ -0,0 +1,6 @@
126 -+#include "webrtc/webrtc_media_devices.h"
127 -+namespace Webrtc {
128 -+std::vector<VideoInput> GetVideoInputList() { return std::vector<VideoInput>(); };
129 -+std::vector<AudioInput> GetAudioInputList() { return std::vector<AudioInput>(); };
130 -+std::vector<AudioOutput> GetAudioOutputList() { return std::vector<AudioOutput>(); };
131 -+}
132
133 diff --git a/net-im/telegram-desktop/metadata.xml b/net-im/telegram-desktop/metadata.xml
134 index 81134efc2a6..bb15e2ab9e5 100644
135 --- a/net-im/telegram-desktop/metadata.xml
136 +++ b/net-im/telegram-desktop/metadata.xml
137 @@ -12,7 +12,5 @@
138 <use>
139 <flag name="enchant">Enable the app-text/aspell spell-checking backend</flag>
140 <flag name="hunspell">Enable the app-text/hunspell spell-checking backend</flag>
141 - <flag name="lto">Enable Link Time Optimization (LTO / IPO)</flag>
142 - <flag name="webrtc">WebRTC based audio/video call support ( via <pkg>media-libs/tg_owt</pkg> )</flag>
143 </use>
144 </pkgmetadata>
145
146 diff --git a/net-im/telegram-desktop/telegram-desktop-2.4.11.ebuild b/net-im/telegram-desktop/telegram-desktop-2.4.11.ebuild
147 deleted file mode 100644
148 index c0423ed32f1..00000000000
149 --- a/net-im/telegram-desktop/telegram-desktop-2.4.11.ebuild
150 +++ /dev/null
151 @@ -1,174 +0,0 @@
152 -# Copyright 2020-2021 Gentoo Authors
153 -# Distributed under the terms of the GNU General Public License v2
154 -
155 -EAPI=7
156 -
157 -PYTHON_COMPAT=( python3_{7,8,9} )
158 -
159 -inherit cmake desktop flag-o-matic ninja-utils python-any-r1 xdg-utils
160 -
161 -MY_P="tdesktop-${PV}-full"
162 -
163 -DESCRIPTION="Official desktop client for Telegram"
164 -HOMEPAGE="https://desktop.telegram.org"
165 -SRC_URI="https://github.com/telegramdesktop/tdesktop/releases/download/v${PV}/${MY_P}.tar.gz"
166 -
167 -LICENSE="BSD GPL-3-with-openssl-exception LGPL-2+"
168 -SLOT="0"
169 -KEYWORDS="amd64 ~ppc64"
170 -IUSE="+dbus enchant +gtk +hunspell libressl lto pulseaudio +spell wayland +webrtc +X"
171 -
172 -RDEPEND="
173 - !net-im/telegram-desktop-bin
174 - app-arch/lz4:=
175 - app-arch/xz-utils
176 - !libressl? ( dev-libs/openssl:0= )
177 - libressl? ( dev-libs/libressl:0= )
178 - dev-libs/xxhash
179 - dev-qt/qtcore:5
180 - dev-qt/qtgui:5[dbus?,jpeg,png,wayland?,X(-)?]
181 - dev-qt/qtimageformats:5
182 - dev-qt/qtnetwork:5
183 - dev-qt/qtsvg:5
184 - dev-qt/qtwidgets:5[png,X(-)?]
185 - media-fonts/open-sans
186 - media-libs/alsa-lib
187 - media-libs/fontconfig:=
188 - ~media-libs/libtgvoip-2.4.4_p20201030[pulseaudio=]
189 - media-libs/openal[alsa]
190 - media-libs/opus:=
191 - media-video/ffmpeg:=[alsa,opus]
192 - sys-libs/zlib[minizip]
193 - virtual/libiconv
194 - x11-libs/libxcb:=
195 - dbus? (
196 - dev-qt/qtdbus:5
197 - dev-libs/libdbusmenu-qt[qt5(+)]
198 - )
199 - enchant? ( app-text/enchant:= )
200 - gtk? (
201 - dev-libs/glib:2
202 - x11-libs/gdk-pixbuf:2[jpeg]
203 - x11-libs/gtk+:3[X?]
204 - x11-libs/libX11
205 - )
206 - hunspell? ( >=app-text/hunspell-1.7:= )
207 - !pulseaudio? ( media-sound/apulse[sdk] )
208 - pulseaudio? ( media-sound/pulseaudio )
209 - webrtc? (
210 - media-libs/libjpeg-turbo:=
211 - ~media-libs/tg_owt-0_pre20201112[pulseaudio=]
212 - )
213 -"
214 -
215 -DEPEND="
216 - ${PYTHON_DEPS}
217 - ${RDEPEND}
218 - dev-cpp/range-v3
219 - =dev-cpp/ms-gsl-3*
220 -"
221 -
222 -BDEPEND="
223 - >=dev-util/cmake-3.16
224 - virtual/pkgconfig
225 - amd64? ( dev-lang/yasm )
226 -"
227 -
228 -REQUIRED_USE="
229 - spell? (
230 - ^^ ( enchant hunspell )
231 - )
232 - webrtc? ( !libressl )
233 -"
234 -
235 -S="${WORKDIR}/${MY_P}"
236 -
237 -pkg_pretend() {
238 - if has ccache ${FEATURES}; then
239 - ewarn
240 - ewarn "ccache does not work with ${PN} out of the box"
241 - ewarn "due to usage of precompiled headers"
242 - ewarn "check bug https://bugs.gentoo.org/715114 for more info"
243 - ewarn
244 - fi
245 -}
246 -
247 -src_prepare() {
248 - # conditional patching is bad, but we want vanilla telegram with webrtc.
249 - use webrtc || local PATCHES=( "${FILESDIR}/no-webrtc-build.patch" )
250 -
251 - # no explicit toggle #752417
252 - sed -i 's/DESKTOP_APP_USE_PACKAGED/NO_ONE_WILL_EVER_SET_THIS/' \
253 - cmake/external/rlottie/CMakeLists.txt || die
254 -
255 - cmake_src_prepare
256 -}
257 -
258 -src_configure() {
259 - local mycxxflags=(
260 - -Wno-deprecated-declarations
261 - -Wno-error=deprecated-declarations
262 - -Wno-switch
263 - -Wno-unknown-warning-option
264 - )
265 -
266 - append-cxxflags "${mycxxflags[@]}"
267 -
268 - # TODO: unbundle header-only libs, ofc telegram uses git versions...
269 - # it fals with tl-expected-1.0.0, so we use bundled for now to avoid git rev snapshots
270 - # EXPECTED VARIANT
271 - # gtk is really needed for image copy-paste due to https://bugreports.qt.io/browse/QTBUG-56595
272 - local mycmakeargs=(
273 - -DCMAKE_DISABLE_FIND_PACKAGE_tl-expected=ON # header only lib, some git version. prevents warnings.
274 - -DDESKTOP_APP_DISABLE_CRASH_REPORTS=ON
275 - -DDESKTOP_APP_USE_GLIBC_WRAPS=OFF
276 - -DDESKTOP_APP_USE_PACKAGED=ON
277 - -DDESKTOP_APP_USE_PACKAGED_FONTS=ON
278 - -DTDESKTOP_DISABLE_GTK_INTEGRATION="$(usex gtk OFF ON)"
279 - -DTDESKTOP_LAUNCHER_BASENAME="${PN}"
280 - -DDESKTOP_APP_DISABLE_DBUS_INTEGRATION="$(usex dbus OFF ON)"
281 - -DDESKTOP_APP_DISABLE_SPELLCHECK="$(usex spell OFF ON)" # enables hunspell (recommended)
282 - -DDESKTOP_APP_DISABLE_WAYLAND_INTEGRATION="$(usex wayland OFF ON)"
283 - -DDESKTOP_APP_DISABLE_WEBRTC_INTEGRATION="$(usex webrtc OFF ON)"
284 - -DDESKTOP_APP_USE_ENCHANT="$(usex enchant ON OFF)" # enables enchant and disables hunspell
285 - $(usex lto "-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON" '')
286 - )
287 -
288 - if [[ -n ${MY_TDESKTOP_API_ID} && -n ${MY_TDESKTOP_API_HASH} ]]; then
289 - einfo "Found custom API credentials"
290 - mycmakeargs+=(
291 - -DTDESKTOP_API_ID="${MY_TDESKTOP_API_ID}"
292 - -DTDESKTOP_API_HASH="${MY_TDESKTOP_API_HASH}"
293 - )
294 - else
295 - # https://github.com/telegramdesktop/tdesktop/blob/dev/snap/snapcraft.yaml
296 - # Building with snapcraft API credentials by default
297 - # Custom API credentials can be obtained here:
298 - # https://github.com/telegramdesktop/tdesktop/blob/dev/docs/api_credentials.md
299 - # After getting credentials you can export variables:
300 - # export MY_TDESKTOP_API_ID="17349""
301 - # export MY_TDESKTOP_API_HASH="344583e45741c457fe1862106095a5eb"
302 - # and restart the build"
303 - # you can set above variables (without export) in /etc/portage/env/net-im/telegram-desktop
304 - # portage will use custom variable every build automatically
305 - mycmakeargs+=(
306 - -DTDESKTOP_API_ID="611335"
307 - -DTDESKTOP_API_HASH="d524b414d21f4d37f08684c1df41ac9c"
308 - )
309 - fi
310 -
311 - cmake_src_configure
312 -}
313 -
314 -pkg_postinst() {
315 - xdg_desktop_database_update
316 - xdg_icon_cache_update
317 - xdg_mimeinfo_database_update
318 - use gtk || einfo "enable 'gtk' useflag if you have image copy-paste problems"
319 -}
320 -
321 -pkg_postrm() {
322 - xdg_desktop_database_update
323 - xdg_icon_cache_update
324 - xdg_mimeinfo_database_update
325 -}
326
327 diff --git a/net-im/telegram-desktop/telegram-desktop-2.4.7-r1.ebuild b/net-im/telegram-desktop/telegram-desktop-2.4.7-r1.ebuild
328 deleted file mode 100644
329 index 57c34aa583f..00000000000
330 --- a/net-im/telegram-desktop/telegram-desktop-2.4.7-r1.ebuild
331 +++ /dev/null
332 @@ -1,173 +0,0 @@
333 -# Copyright 2020 Gentoo Authors
334 -# Distributed under the terms of the GNU General Public License v2
335 -
336 -EAPI=7
337 -
338 -PYTHON_COMPAT=( python3_{7,8,9} )
339 -
340 -inherit cmake desktop flag-o-matic ninja-utils python-any-r1 xdg-utils
341 -
342 -MY_P="tdesktop-${PV}-full"
343 -
344 -DESCRIPTION="Official desktop client for Telegram"
345 -HOMEPAGE="https://desktop.telegram.org"
346 -SRC_URI="https://github.com/telegramdesktop/tdesktop/releases/download/v${PV}/${MY_P}.tar.gz"
347 -
348 -LICENSE="BSD GPL-3-with-openssl-exception LGPL-2+"
349 -SLOT="0"
350 -KEYWORDS="amd64 ~ppc64"
351 -IUSE="+dbus enchant +gtk +hunspell libressl lto pulseaudio +spell +webrtc +X"
352 -
353 -RDEPEND="
354 - !net-im/telegram-desktop-bin
355 - app-arch/lz4:=
356 - app-arch/xz-utils
357 - !libressl? ( dev-libs/openssl:0= )
358 - libressl? ( dev-libs/libressl:0= )
359 - dev-libs/xxhash
360 - dev-qt/qtcore:5
361 - dev-qt/qtgui:5[dbus?,jpeg,png,wayland,X(-)?]
362 - dev-qt/qtimageformats:5
363 - dev-qt/qtnetwork:5
364 - dev-qt/qtsvg:5
365 - dev-qt/qtwidgets:5[png,X(-)?]
366 - media-fonts/open-sans
367 - media-libs/alsa-lib
368 - media-libs/fontconfig:=
369 - ~media-libs/libtgvoip-2.4.4_p20201030[pulseaudio=]
370 - media-libs/openal[alsa]
371 - media-libs/opus:=
372 - media-video/ffmpeg:=[alsa,opus]
373 - sys-libs/zlib[minizip]
374 - virtual/libiconv
375 - x11-libs/libxcb:=
376 - dbus? (
377 - dev-qt/qtdbus:5
378 - dev-libs/libdbusmenu-qt[qt5(+)]
379 - )
380 - enchant? ( app-text/enchant:= )
381 - gtk? (
382 - dev-libs/glib:2
383 - x11-libs/gdk-pixbuf:2[jpeg]
384 - x11-libs/gtk+:3[X?]
385 - x11-libs/libX11
386 - )
387 - hunspell? ( >=app-text/hunspell-1.7:= )
388 - !pulseaudio? ( media-sound/apulse[sdk] )
389 - pulseaudio? ( media-sound/pulseaudio )
390 - webrtc? (
391 - media-libs/libjpeg-turbo:=
392 - ~media-libs/tg_owt-0_pre20201105[pulseaudio=]
393 - )
394 -"
395 -
396 -DEPEND="
397 - ${PYTHON_DEPS}
398 - ${RDEPEND}
399 - dev-cpp/range-v3
400 - =dev-cpp/ms-gsl-3*
401 -"
402 -
403 -BDEPEND="
404 - >=dev-util/cmake-3.16
405 - virtual/pkgconfig
406 - amd64? ( dev-lang/yasm )
407 -"
408 -
409 -REQUIRED_USE="
410 - spell? (
411 - ^^ ( enchant hunspell )
412 - )
413 - webrtc? ( !libressl )
414 -"
415 -
416 -S="${WORKDIR}/${MY_P}"
417 -
418 -pkg_pretend() {
419 - if has ccache ${FEATURES}; then
420 - ewarn
421 - ewarn "ccache does not work with ${PN} out of the box"
422 - ewarn "due to usage of precompiled headers"
423 - ewarn "check bug https://bugs.gentoo.org/715114 for more info"
424 - ewarn
425 - fi
426 -}
427 -
428 -src_prepare() {
429 - # conditional patching is bad, but we want vanilla telegram with webrtc.
430 - use webrtc || local PATCHES=( "${FILESDIR}/no-webrtc-build.patch" )
431 -
432 - # no explicit toggle #752417
433 - sed -i 's/DESKTOP_APP_USE_PACKAGED/NO_ONE_WILL_EVER_SET_THIS/' \
434 - cmake/external/rlottie/CMakeLists.txt || die
435 -
436 - cmake_src_prepare
437 -}
438 -
439 -src_configure() {
440 - local mycxxflags=(
441 - -Wno-deprecated-declarations
442 - -Wno-error=deprecated-declarations
443 - -Wno-switch
444 - -Wno-unknown-warning-option
445 - )
446 -
447 - append-cxxflags "${mycxxflags[@]}"
448 -
449 - # TODO: unbundle header-only libs, ofc telegram uses git versions...
450 - # it fals with tl-expected-1.0.0, so we use bundled for now to avoid git rev snapshots
451 - # EXPECTED VARIANT
452 - # gtk is really needed for image copy-paste due to https://bugreports.qt.io/browse/QTBUG-56595
453 - local mycmakeargs=(
454 - -DCMAKE_DISABLE_FIND_PACKAGE_tl-expected=ON # header only lib, some git version. prevents warnings.
455 - -DDESKTOP_APP_DISABLE_CRASH_REPORTS=ON
456 - -DDESKTOP_APP_USE_GLIBC_WRAPS=OFF
457 - -DDESKTOP_APP_USE_PACKAGED=ON
458 - -DDESKTOP_APP_USE_PACKAGED_FONTS=ON
459 - -DTDESKTOP_DISABLE_GTK_INTEGRATION="$(usex gtk OFF ON)"
460 - -DTDESKTOP_LAUNCHER_BASENAME="${PN}"
461 - -DDESKTOP_APP_DISABLE_DBUS_INTEGRATION="$(usex dbus OFF ON)"
462 - -DDESKTOP_APP_DISABLE_SPELLCHECK="$(usex spell OFF ON)" # enables hunspell (recommended)
463 - -DDESKTOP_APP_DISABLE_WEBRTC_INTEGRATION="$(usex webrtc OFF ON)"
464 - -DDESKTOP_APP_USE_ENCHANT="$(usex enchant ON OFF)" # enables enchant and disables hunspell
465 - $(usex lto "-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON" '')
466 - )
467 -
468 - if [[ -n ${MY_TDESKTOP_API_ID} && -n ${MY_TDESKTOP_API_HASH} ]]; then
469 - einfo "Found custom API credentials"
470 - mycmakeargs+=(
471 - -DTDESKTOP_API_ID="${MY_TDESKTOP_API_ID}"
472 - -DTDESKTOP_API_HASH="${MY_TDESKTOP_API_HASH}"
473 - )
474 - else
475 - # https://github.com/telegramdesktop/tdesktop/blob/dev/snap/snapcraft.yaml
476 - # Building with snapcraft API credentials by default
477 - # Custom API credentials can be obtained here:
478 - # https://github.com/telegramdesktop/tdesktop/blob/dev/docs/api_credentials.md
479 - # After getting credentials you can export variables:
480 - # export MY_TDESKTOP_API_ID="17349""
481 - # export MY_TDESKTOP_API_HASH="344583e45741c457fe1862106095a5eb"
482 - # and restart the build"
483 - # you can set above variables (without export) in /etc/portage/env/net-im/telegram-desktop
484 - # portage will use custom variable every build automatically
485 - mycmakeargs+=(
486 - -DTDESKTOP_API_ID="611335"
487 - -DTDESKTOP_API_HASH="d524b414d21f4d37f08684c1df41ac9c"
488 - )
489 - fi
490 -
491 - cmake_src_configure
492 -}
493 -
494 -pkg_postinst() {
495 - xdg_desktop_database_update
496 - xdg_icon_cache_update
497 - xdg_mimeinfo_database_update
498 - use gtk || einfo "enable 'gtk' useflag if you have image copy-paste problems"
499 -}
500 -
501 -pkg_postrm() {
502 - xdg_desktop_database_update
503 - xdg_icon_cache_update
504 - xdg_mimeinfo_database_update
505 -}