From d162ba1860a88062f4cd61f8b52fc303ba0b2991 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 7 Aug 2021 00:16:33 +0100 Subject: gentoo resync : 07.08.2021 --- net-im/telegram-desktop/Manifest | 16 +- .../tdesktop-2.7.3-webview-include-gdkx.patch | 10 - .../tdesktop-2.7.4-disable-webkit-separately.patch | 72 ------ ...esktop-2.7.4-fix-disable-dbus-integration.patch | 21 -- .../files/tdesktop-2.7.4-voice-crash.patch | 262 --------------------- .../files/tdesktop-2.7.4-voice-ffmpeg44.patch | 25 -- .../files/tdesktop-2.7.4-webview-fix-gcc11.patch | 31 --- .../tdesktop-2.8.11-load-gtk-with-qlibrary.patch | 112 +++++++++ ...top-2.9.0-fix-disable-wayland-integration.patch | 11 + .../telegram-desktop-2.7.4-r1.ebuild | 146 ------------ .../telegram-desktop/telegram-desktop-2.8.1.ebuild | 142 ----------- .../telegram-desktop-2.8.11-r1.ebuild | 146 ++++++++++++ .../telegram-desktop-2.8.11.ebuild | 145 ------------ .../telegram-desktop-2.9.0-r1.ebuild | 140 +++++++++++ 14 files changed, 414 insertions(+), 865 deletions(-) delete mode 100644 net-im/telegram-desktop/files/tdesktop-2.7.3-webview-include-gdkx.patch delete mode 100644 net-im/telegram-desktop/files/tdesktop-2.7.4-disable-webkit-separately.patch delete mode 100644 net-im/telegram-desktop/files/tdesktop-2.7.4-fix-disable-dbus-integration.patch delete mode 100644 net-im/telegram-desktop/files/tdesktop-2.7.4-voice-crash.patch delete mode 100644 net-im/telegram-desktop/files/tdesktop-2.7.4-voice-ffmpeg44.patch delete mode 100644 net-im/telegram-desktop/files/tdesktop-2.7.4-webview-fix-gcc11.patch create mode 100644 net-im/telegram-desktop/files/tdesktop-2.8.11-load-gtk-with-qlibrary.patch create mode 100644 net-im/telegram-desktop/files/tdesktop-2.9.0-fix-disable-wayland-integration.patch delete mode 100644 net-im/telegram-desktop/telegram-desktop-2.7.4-r1.ebuild delete mode 100644 net-im/telegram-desktop/telegram-desktop-2.8.1.ebuild create mode 100644 net-im/telegram-desktop/telegram-desktop-2.8.11-r1.ebuild delete mode 100644 net-im/telegram-desktop/telegram-desktop-2.8.11.ebuild create mode 100644 net-im/telegram-desktop/telegram-desktop-2.9.0-r1.ebuild (limited to 'net-im/telegram-desktop') diff --git a/net-im/telegram-desktop/Manifest b/net-im/telegram-desktop/Manifest index bc4090bc2325..cd85bb15647b 100644 --- a/net-im/telegram-desktop/Manifest +++ b/net-im/telegram-desktop/Manifest @@ -1,16 +1,10 @@ -AUX tdesktop-2.7.3-webview-include-gdkx.patch 404 BLAKE2B cb9d282c79bfb7441b5eddf7fa1f3255ed1bee03d00fc71682f6b7acc2624a60d034a536e07c77f01433c93c8afa3383b1e57ba1a474de66078623ce2231b37b SHA512 92a60a59724597ce5daabe6a327a445182d6eac91ed009d72f833216393c7e55789caf88b914b0aa8d62eb11e6449b58c24239372d655af1fbe18a30c72b4ade -AUX tdesktop-2.7.4-disable-webkit-separately.patch 2804 BLAKE2B 71feb3b5ed92fc136236d1c4638330003f7d57427404c72d8e0f83676c58c244b5dd58612b45dd7987615e0f87a5ec9ed29fcd9e75334750b401a4b58ba1137f SHA512 21061e74a54cac1621b701cfdb06c2212136cf135fcb94747dc7c5cdce0f2704e22a16500b360e67cc1bfcd401c143b8f26bccb4bdf18ef0f151ea84e4aead24 -AUX tdesktop-2.7.4-fix-disable-dbus-integration.patch 494 BLAKE2B 75e8be933873cc19a863423cb3996d14512586442abeb56ea83ef1a0ce3b58265611044285a6ebde390581e8206677136b97bd2361eaf612702ebd44411f2eed SHA512 bd223c7afabb72cacb89e689707aaff01509aafa1271aac5533f57ab88b52624b1f08647be51ea5c40123262eaeb3ea5646cecd00872465d5afd66f262e4bd98 -AUX tdesktop-2.7.4-voice-crash.patch 8437 BLAKE2B 6d03b16e8d60318e135340feeb39d6a077bc935f3ca6789da72ab063575128f356f8d4187552ac1ae1c270aed857802375016f84f8d2666facb7ea89c72284c3 SHA512 cabdadddc7a6873c7c6fc8128ceddf2712c0c73d3316520482162e5c67937bda2a627ddb2f078558a52e812c2a876351196488a5a75381d84a43815b873bac5b -AUX tdesktop-2.7.4-voice-ffmpeg44.patch 1118 BLAKE2B 21b34c6fbb002be362beb807a8323119b46bf6875de3367006a981808d4648fa56e859728ee10ae51a5655fc921e49412ac4bb81e17667b2e28017a64a10a3f2 SHA512 72ef9bddef1f40e09b9c4334153f1ab8aaddf63d95d9f25dc1b0a0826b7f2ae24f7c5fc4cb5ce90aae2c3144a5d52c4cb870d643f447d654190c4a2c78079354 -AUX tdesktop-2.7.4-webview-fix-gcc11.patch 1035 BLAKE2B 929ff52fdadc65d7ce8bc53850adc48ec17c80d6f1e450a50e421c2fc28ee4f07ca88f1371f9812f3e7e2ef402d465418755ce392abd60fe032fa31c216c2753 SHA512 545e307974eff96ff27d9e99ba1272ff0094c403bcbfed4f67f72d8c45c2c6d0682edcee873a11d6aaed8d4f2b7dd820cbc13dc89e7c1072e04105b99a638831 AUX tdesktop-2.8.10-jemalloc-only-telegram.patch 973 BLAKE2B 6efc62db44ea8d26f469d937fc91135c77eea38e6e51b1c6cc772bc91afb7372292731b0369544ea52f67075ce9800fdcadc150ec72df571c29f2818b88cc56d SHA512 754e7286aebd183891b3808b66979df4b8e62355147a8f6bd860bf37360e089928247073b7adf9fc8d09ed4edc35746e50a4eff3d0bdc2d74888e8cb74042cf0 +AUX tdesktop-2.8.11-load-gtk-with-qlibrary.patch 4451 BLAKE2B 3d490ce1dd43aed8bf29812b3be5ed916ece4b4da61d8e2a5fdefe0360e5c71580cd5348a5b0dc3977d6f1ac300b4d98881242c8313fa22a3a0d767dae72e2e3 SHA512 080c77c010ea4d5a766f4b9b7f0f321d953d265c2c145ee4cf8fc03a2ba29e2c305521292403f8845308adab67482e4c0c61ce89660eef0af169f5dbf5b0a5f4 AUX tdesktop-2.8.9-disable-webkit-separately.patch 4643 BLAKE2B 7d84cedd4b7b5879fb402193774e40c2b72f6028592e4dc1df1c4a9002dd4e9cbaff505dceb77e443b84c26b4dff6abfc5a99ff28699fb031cc9cb0ea3612280 SHA512 fc3da934e04d19b6f1be42cb095e3aba2a13f0e6a14164558f3da45152b9fa19bc8235d08fd6537933b9fb25d7aee27ec7763173e6395f55bcb9869f71b31088 AUX tdesktop-2.8.9-webview-fix-glib.patch 1838 BLAKE2B 16b861f0fda72ba1725779880eb67b3adfd0a3dad4c7614beb8f96fa55fecc613f248477557569904c44e6875adbf7912ac9281f1ff71b4b8a6e5d97f9f71e97 SHA512 c3932b6471150d71469606bdbc93d26b57e8eb556e24df9366bad9e51aed073ab18dd7ee14b7445f8df180806a0ca591afdc8c00b0ce34db29575d2dc114b58a -DIST tdesktop-2.7.4-full.tar.gz 36894673 BLAKE2B e04749fb0168f8bae69a9ad85c5bff315faf0b355ff5f3a85a34ee36e3305c6b550553284d5179aff9283bbd1a94f9ec3c41e293d0ad8c86e4d08283189e42b3 SHA512 0a796d7a8c5e5982bc60f19c41da53996a609bf794fad224e7beea5fc3816b5cf35f16b0ec2cc7279085c69996063a44085f48e1596dfe746d260a2e8f1b2d14 -DIST tdesktop-2.8.1-full.tar.gz 37129127 BLAKE2B 06f2a3050f0e0f321c766c54e19faf3ea172c41088e2ffdbb5928a41ba01de1fc845a84addded17d113316857c68f265642a8ab32feb79a87beef548c739b56c SHA512 df35cc00dc47a8c65b32b62c139cc3a49333f573aa88fb70cc65197524f9b9b4756c58752866c843704ea4df5d6224eb4cba5b32953dd9a4d721b0ee0e1efc69 +AUX tdesktop-2.9.0-fix-disable-wayland-integration.patch 462 BLAKE2B 5dc8f084dd753459f217849606f09b2a847a0fe13de49a6984bb1aedfadf7091833cd314da59a55ea9ff0d04c25bd23e94bbe2c7896a307564c892eea9d98ae4 SHA512 4e8597575cab639d2d6c19556e2125301b8e3b901900bce6e14945da2746ff40085b721f42f525c645c1094914a84d3f50dd9bc063f10a28a96dbfb23c98671c DIST tdesktop-2.8.11-full.tar.gz 37105468 BLAKE2B 1ec5a0003bd1b948b45213509fa0649dfde5ec8e3dff097bf45aa0951c7963930788b0bee853f286d04b008b78704c464b6614b8391350767affebc2623b25af SHA512 a553313b04fbb562745be2381a84117657172952e46e280980a73c9fcfe2a7cf29c0e012e4b1259816d1e6652418e7a1ddfc4e394544fcc3aeb33704cbe80860 -EBUILD telegram-desktop-2.7.4-r1.ebuild 4589 BLAKE2B fee2f81578a4c774fe33592641a6a19592e8fd67623f3424ea599c2adbf425861478f34f01fad970fca31d9fe7545f15fe3d53ec195f60933e701fe287fa59d5 SHA512 ed7de5b99a43621b38ee7589a1f842647f7a9e2619b6984d061183ea3ec5d891c55df2cc5e04568924e30252de26bd3450ec1abce6e8d8edd2ff8be6104900dd -EBUILD telegram-desktop-2.8.1.ebuild 4362 BLAKE2B 8388d5963edc83635719974c4c1372becc37e3a4c53aab0b63883c0c4b3c49f8f312d6781ce7a976dde5f066738398245b0fddb899e5440e96622ad99b736b2d SHA512 b351769398c4585e65382200954732e4574d0bb19e05899f67a600102e2ec604086cf07cbc724a6d108f42081a367f47170bfef94bdf356cef1de8665e8e9c19 -EBUILD telegram-desktop-2.8.11.ebuild 4340 BLAKE2B 276357e4e6783eee86a125490deb8ddd3e759df56162a65b5f4762ef69f92c92cb757230c997d7aa1a3d13640b1ed949c535450d2f3cbecd67c0d6e283cf5413 SHA512 492610a0170b36b29fe2a64ea4bb6780004499bd3ca87951e362471aada0967c6ce0cfc29e0f0561b5e9e2a1ffc75a56081acd7aba0a4710a939a62aa9e4ec76 +DIST tdesktop-2.9.0-full.tar.gz 37327425 BLAKE2B f47abfd41e71dbf950e6357417fd2725b145286861f6dfc8edc4101b6b232c43ea7a9987d028e57979588bf44919fef2e89b00adae7a9843e52f8f2566013dd8 SHA512 e9be60cdaeffa4efa95ea1e5d8fe50308bff5612b546fa92c02f824f479b42e098fb8fbe713e652578ee2308e3faadaf82e4c101dee0e58b6f3c70d8dcb0bd8e +EBUILD telegram-desktop-2.8.11-r1.ebuild 4401 BLAKE2B 66426f2f964ad5ee3c9b1cfc4d3b1c389a00fea5766de39db94acdf8752edba39a706a63fd210b00bb317c9f4205986c64e77ff5e855d0c6df047acd2077fb9d SHA512 63339b739d3172c9100d40a657c3d49cea31da10e51f05d5138ac837626f616d436cd7d049bc853edb0e7c06b820961bbb4cf864e3a3e8de4a34d25f9265e5d1 +EBUILD telegram-desktop-2.9.0-r1.ebuild 4126 BLAKE2B d269d119e3e33c2af75d0afb78b667f5808a607d3a203629b14dda5ad3555c32c97a913048534b5e5935aa1f089f52022e1f69a12695ea1696a0af24f8489658 SHA512 2abafcabd6aef7bc50c552947d79fc8faf7ec1f4ce37c51b48c16ee65b642f86209651e0ae68222c7a238a8c3a82a01567eb7aff4c12d461678bb41aa1a90426 MISC metadata.xml 587 BLAKE2B 1f49c91d650d26ba9fd95e9cbcb793ed527d58bf0ccc81ebddb624d54c4af38cc7aff3cf799814932a69b2a6f36dad7fe1c5ce4eb82e562e46dcebca9b751308 SHA512 5e74bb555b2b1a513bd8c7450a3db2f46daa426eecc0d3cebf11d46e58124ef117697bc422f7fccd8757f2e6e8ce6bd8ff0e317b58740dd302c1ea2f2476ff3f diff --git a/net-im/telegram-desktop/files/tdesktop-2.7.3-webview-include-gdkx.patch b/net-im/telegram-desktop/files/tdesktop-2.7.3-webview-include-gdkx.patch deleted file mode 100644 index 491a8cd3e1dc..000000000000 --- a/net-im/telegram-desktop/files/tdesktop-2.7.3-webview-include-gdkx.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- tdesktop-2.7.3-full.orig/Telegram/lib_webview/webview/platform/linux/webview_linux_webkit_gtk.h -+++ tdesktop-2.7.3-full/Telegram/lib_webview/webview/platform/linux/webview_linux_webkit_gtk.h -@@ -12,6 +12,7 @@ extern "C" { - #undef signals - #include - #include -+#include - #include - #include - #define signals public diff --git a/net-im/telegram-desktop/files/tdesktop-2.7.4-disable-webkit-separately.patch b/net-im/telegram-desktop/files/tdesktop-2.7.4-disable-webkit-separately.patch deleted file mode 100644 index e54aca2ffa05..000000000000 --- a/net-im/telegram-desktop/files/tdesktop-2.7.4-disable-webkit-separately.patch +++ /dev/null @@ -1,72 +0,0 @@ ---- tdesktop-2.7.4-full.orig/Telegram/lib_webview/CMakeLists.txt -+++ tdesktop-2.7.4-full/Telegram/lib_webview/CMakeLists.txt -@@ -116,7 +116,7 @@ - desktop-app::lib_webview_winrt - ) - elseif (LINUX) -- if (NOT DESKTOP_APP_DISABLE_GTK_INTEGRATION) -+ if (NOT DESKTOP_APP_DISABLE_WEBKIT) - find_package(PkgConfig REQUIRED) - - if (DESKTOP_APP_USE_PACKAGED AND NOT DESKTOP_APP_USE_PACKAGED_LAZY) ---- tdesktop-2.7.4-full.orig/Telegram/lib_webview/webview/platform/linux/webview_linux.cpp -+++ tdesktop-2.7.4-full/Telegram/lib_webview/webview/platform/linux/webview_linux.cpp -@@ -11,14 +11,14 @@ - namespace Webview { - - Available Availability() { --#ifndef DESKTOP_APP_DISABLE_GTK_INTEGRATION -+#ifndef DESKTOP_APP_DISABLE_WEBKIT - return WebKit2Gtk::Availability(); --#else // !DESKTOP_APP_DISABLE_GTK_INTEGRATION -+#else // !DESKTOP_APP_DISABLE_WEBKIT - return Available{ - .error = Available::Error::NoGtkOrWebkit2Gtk, - .details = "This feature was disabled at build time.", - }; --#endif // DESKTOP_APP_DISABLE_GTK_INTEGRATION -+#endif // DESKTOP_APP_DISABLE_WEBKIT - } - - bool SupportsEmbedAfterCreate() { -@@ -26,11 +26,11 @@ - } - - std::unique_ptr CreateInstance(Config config) { --#ifndef DESKTOP_APP_DISABLE_GTK_INTEGRATION -+#ifndef DESKTOP_APP_DISABLE_WEBKIT - return WebKit2Gtk::CreateInstance(std::move(config)); --#else // !DESKTOP_APP_DISABLE_GTK_INTEGRATION -+#else // !DESKTOP_APP_DISABLE_WEBKIT - return nullptr; --#endif // DESKTOP_APP_DISABLE_GTK_INTEGRATION -+#endif // DESKTOP_APP_DISABLE_WEBKIT - } - - } // namespace Webview ---- tdesktop-2.7.4-full.orig/cmake/options.cmake -+++ tdesktop-2.7.4-full/cmake/options.cmake -@@ -49,6 +49,13 @@ - ) - endif() - -+if (DESKTOP_APP_DISABLE_WEBKIT) -+ target_compile_definitions(common_options -+ INTERFACE -+ DESKTOP_APP_DISABLE_WEBKIT -+ ) -+endif() -+ - if (DESKTOP_APP_USE_PACKAGED) - target_compile_definitions(common_options - INTERFACE ---- tdesktop-2.7.4-full.orig/cmake/variables.cmake -+++ tdesktop-2.7.4-full/cmake/variables.cmake -@@ -38,6 +38,7 @@ - option(DESKTOP_APP_USE_PACKAGED_LAZY_PLATFORMTHEMES "Bundle recommended Qt platform themes for self-contained packages. (Linux only)" ${DESKTOP_APP_USE_PACKAGED_LAZY}) - option(DESKTOP_APP_USE_PACKAGED_FFMPEG_STATIC "Link ffmpeg statically in packaged mode." OFF) - option(DESKTOP_APP_DISABLE_SPELLCHECK "Disable spellcheck library." ${osx_special_target}) -+option(DESKTOP_APP_DISABLE_WEBKIT "Disable WebkitGTK library (Linux only)." OFF) - option(DESKTOP_APP_DISABLE_CRASH_REPORTS "Disable crash report generation." ${no_special_target}) - option(DESKTOP_APP_DISABLE_AUTOUPDATE "Disable autoupdate." ${disable_autoupdate}) - option(DESKTOP_APP_USE_HUNSPELL_ONLY "Disable system spellchecker and use bundled Hunspell only. (For debugging purposes)" OFF) diff --git a/net-im/telegram-desktop/files/tdesktop-2.7.4-fix-disable-dbus-integration.patch b/net-im/telegram-desktop/files/tdesktop-2.7.4-fix-disable-dbus-integration.patch deleted file mode 100644 index 941a4ecc09cb..000000000000 --- a/net-im/telegram-desktop/files/tdesktop-2.7.4-fix-disable-dbus-integration.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- tdesktop-2.7.4-full.orig/Telegram/SourceFiles/platform/linux/notifications_manager_linux_dummy.cpp -+++ tdesktop-2.7.4-full/Telegram/SourceFiles/platform/linux/notifications_manager_linux_dummy.cpp -@@ -13,15 +13,15 @@ - namespace Platform { - namespace Notifications { - --bool SkipAudio() { -+bool SkipAudioForCustom() { - return false; - } - --bool SkipToast() { -+bool SkipToastForCustom() { - return false; - } - --bool SkipFlashBounce() { -+bool SkipFlashBounceForCustom() { - return false; - } - diff --git a/net-im/telegram-desktop/files/tdesktop-2.7.4-voice-crash.patch b/net-im/telegram-desktop/files/tdesktop-2.7.4-voice-crash.patch deleted file mode 100644 index 41e447989cb2..000000000000 --- a/net-im/telegram-desktop/files/tdesktop-2.7.4-voice-crash.patch +++ /dev/null @@ -1,262 +0,0 @@ -From 71deaa48afab2bcf9df67b9b347b1f44aad3a9ce Mon Sep 17 00:00:00 2001 -From: John Preston -Date: Thu, 13 May 2021 15:17:54 +0400 -Subject: [PATCH] Don't crash on voice recording error. - -Fixes #16217. ---- - .../media/audio/media_audio_capture.cpp | 89 +++++++++++-------- - 1 file changed, 54 insertions(+), 35 deletions(-) - -diff --git a/Telegram/SourceFiles/media/audio/media_audio_capture.cpp b/Telegram/SourceFiles/media/audio/media_audio_capture.cpp -index a5965e0d1988..deb2474d7891 100644 ---- a/Telegram/SourceFiles/media/audio/media_audio_capture.cpp -+++ b/Telegram/SourceFiles/media/audio/media_audio_capture.cpp -@@ -47,17 +47,17 @@ class Instance::Inner final : public QObject { - void start(Fn updated, Fn error); - void stop(Fn callback = nullptr); - -- void timeout(); -- - private: -- void processFrame(int32 offset, int32 framesize); -+ void process(); -+ -+ [[nodiscard]] bool processFrame(int32 offset, int32 framesize); - void fail(); - -- void writeFrame(AVFrame *frame); -+ [[nodiscard]] bool writeFrame(AVFrame *frame); - - // Writes the packets till EAGAIN is got from av_receive_packet() - // Returns number of packets written or -1 on error -- int writePackets(); -+ [[nodiscard]] int writePackets(); - - Fn _updated; - Fn _error; -@@ -150,6 +150,7 @@ struct Instance::Inner::Private { - AVCodec *codec = nullptr; - AVCodecContext *codecContext = nullptr; - bool opened = false; -+ bool processing = false; - - int srcSamples = 0; - int dstSamples = 0; -@@ -217,7 +218,7 @@ struct Instance::Inner::Private { - - Instance::Inner::Inner(QThread *thread) - : d(std::make_unique()) --, _timer(thread, [=] { timeout(); }) { -+, _timer(thread, [=] { process(); }) { - moveToThread(thread); - } - -@@ -226,10 +227,10 @@ Instance::Inner::~Inner() { - } - - void Instance::Inner::fail() { -- Expects(_error != nullptr); -- - stop(); -- _error(); -+ if (const auto error = base::take(_error)) { -+ InvokeQueued(this, error); -+ } - } - - void Instance::Inner::start(Fn updated, Fn error) { -@@ -384,13 +385,21 @@ void Instance::Inner::stop(Fn callback) { - } - _timer.cancel(); - -- if (d->device) { -+ const auto needResult = (callback != nullptr); -+ const auto hadDevice = (d->device != nullptr); -+ if (hadDevice) { - alcCaptureStop(d->device); -- timeout(); // get last data -+ if (d->processing) { -+ Assert(!needResult); // stop in the middle of processing - error. -+ } else { -+ process(); // get last data -+ } -+ alcCaptureCloseDevice(d->device); -+ d->device = nullptr; - } - - // Write what is left -- if (!_captured.isEmpty()) { -+ if (needResult && !_captured.isEmpty()) { - auto fadeSamples = kCaptureFadeInDuration * kCaptureFrequency / 1000; - auto capturedSamples = static_cast(_captured.size() / sizeof(short)); - if ((_captured.size() % sizeof(short)) || (d->fullSamples + capturedSamples < kCaptureFrequency) || (capturedSamples < fadeSamples)) { -@@ -414,11 +423,13 @@ void Instance::Inner::stop(Fn callback) { - - int32 framesize = d->srcSamples * d->codecContext->channels * sizeof(short), encoded = 0; - while (_captured.size() >= encoded + framesize) { -- processFrame(encoded, framesize); -+ if (!processFrame(encoded, framesize)) { -+ break; -+ } - encoded += framesize; - } -- writeFrame(nullptr); // drain the codec -- if (encoded != _captured.size()) { -+ // Drain the codec. -+ if (!writeFrame(nullptr) || encoded != _captured.size()) { - d->fullSamples = 0; - d->dataPos = 0; - d->data.clear(); -@@ -436,14 +447,14 @@ void Instance::Inner::stop(Fn callback) { - _captured = QByteArray(); - - // Finish stream -- if (d->device) { -+ if (needResult && hadDevice) { - av_write_trailer(d->fmtContext); - } - - QByteArray result = d->fullSamples ? d->data : QByteArray(); - VoiceWaveform waveform; - qint32 samples = d->fullSamples; -- if (samples && !d->waveform.isEmpty()) { -+ if (needResult && samples && !d->waveform.isEmpty()) { - int64 count = d->waveform.size(), sum = 0; - if (count >= Player::kWaveformSamplesCount) { - QVector peaks; -@@ -472,11 +483,7 @@ void Instance::Inner::stop(Fn callback) { - } - } - } -- if (d->device) { -- alcCaptureStop(d->device); -- alcCaptureCloseDevice(d->device); -- d->device = nullptr; -- -+ if (hadDevice) { - if (d->codecContext) { - avcodec_free_context(&d->codecContext); - d->codecContext = nullptr; -@@ -528,12 +535,17 @@ void Instance::Inner::stop(Fn callback) { - d->waveform.clear(); - } - -- if (callback) { -+ if (needResult) { - callback({ result, waveform, samples }); - } - } - --void Instance::Inner::timeout() { -+void Instance::Inner::process() { -+ Expects(!d->processing); -+ -+ d->processing = true; -+ const auto guard = gsl::finally([&] { d->processing = false; }); -+ - if (!d->device) { - _timer.cancel(); - return; -@@ -582,7 +594,9 @@ void Instance::Inner::timeout() { - // Write frames - int32 framesize = d->srcSamples * d->codecContext->channels * sizeof(short), encoded = 0; - while (uint32(_captured.size()) >= encoded + framesize + fadeSamples * sizeof(short)) { -- processFrame(encoded, framesize); -+ if (!processFrame(encoded, framesize)) { -+ return; -+ } - encoded += framesize; - } - -@@ -597,13 +611,13 @@ void Instance::Inner::timeout() { - } - } - --void Instance::Inner::processFrame(int32 offset, int32 framesize) { -+bool Instance::Inner::processFrame(int32 offset, int32 framesize) { - // Prepare audio frame - - if (framesize % sizeof(short)) { // in the middle of a sample - LOG(("Audio Error: Bad framesize in writeFrame() for capture, framesize %1, %2").arg(framesize)); - fail(); -- return; -+ return false; - } - auto samplesCnt = static_cast(framesize / sizeof(short)); - -@@ -650,7 +664,7 @@ void Instance::Inner::processFrame(int32 offset, int32 framesize) { - if ((res = av_samples_alloc(d->dstSamplesData, 0, d->codecContext->channels, d->dstSamples, d->codecContext->sample_fmt, 1)) < 0) { - LOG(("Audio Error: Unable to av_samples_alloc for capture, error %1, %2").arg(res).arg(av_make_error_string(err, sizeof(err), res))); - fail(); -- return; -+ return false; - } - d->dstSamplesSize = av_samples_get_buffer_size(0, d->codecContext->channels, d->maxDstSamples, d->codecContext->sample_fmt, 0); - } -@@ -658,7 +672,7 @@ void Instance::Inner::processFrame(int32 offset, int32 framesize) { - if ((res = swr_convert(d->swrContext, d->dstSamplesData, d->dstSamples, (const uint8_t **)srcSamplesData, d->srcSamples)) < 0) { - LOG(("Audio Error: Unable to swr_convert for capture, error %1, %2").arg(res).arg(av_make_error_string(err, sizeof(err), res))); - fail(); -- return; -+ return false; - } - - // Write audio frame -@@ -670,45 +684,50 @@ void Instance::Inner::processFrame(int32 offset, int32 framesize) { - - avcodec_fill_audio_frame(frame, d->codecContext->channels, d->codecContext->sample_fmt, d->dstSamplesData[0], d->dstSamplesSize, 0); - -- writeFrame(frame); -+ if (!writeFrame(frame)) { -+ return false; -+ } - - d->fullSamples += samplesCnt; - - av_frame_free(&frame); -+ return true; - } - --void Instance::Inner::writeFrame(AVFrame *frame) { -+bool Instance::Inner::writeFrame(AVFrame *frame) { - int res = 0; - char err[AV_ERROR_MAX_STRING_SIZE] = { 0 }; - - res = avcodec_send_frame(d->codecContext, frame); - if (res == AVERROR(EAGAIN)) { -- int packetsWritten = writePackets(); -+ const auto packetsWritten = writePackets(); - if (packetsWritten < 0) { - if (frame && packetsWritten == AVERROR_EOF) { - LOG(("Audio Error: EOF in packets received when EAGAIN was got in avcodec_send_frame()")); - fail(); - } -- return; -+ return false; - } else if (!packetsWritten) { - LOG(("Audio Error: No packets received when EAGAIN was got in avcodec_send_frame()")); - fail(); -- return; -+ return false; - } - res = avcodec_send_frame(d->codecContext, frame); - } - if (res < 0) { - LOG(("Audio Error: Unable to avcodec_send_frame for capture, error %1, %2").arg(res).arg(av_make_error_string(err, sizeof(err), res))); - fail(); -- return; -+ return false; - } - - if (!frame) { // drain - if ((res = writePackets()) != AVERROR_EOF) { - LOG(("Audio Error: not EOF in packets received when draining the codec, result %1").arg(res)); - fail(); -+ return false; - } - } -+ return true; - } - - int Instance::Inner::writePackets() { diff --git a/net-im/telegram-desktop/files/tdesktop-2.7.4-voice-ffmpeg44.patch b/net-im/telegram-desktop/files/tdesktop-2.7.4-voice-ffmpeg44.patch deleted file mode 100644 index 4156956032d4..000000000000 --- a/net-im/telegram-desktop/files/tdesktop-2.7.4-voice-ffmpeg44.patch +++ /dev/null @@ -1,25 +0,0 @@ -From a8807bc915f2439acc7c84f06d931d96d6ca602a Mon Sep 17 00:00:00 2001 -From: John Preston -Date: Thu, 13 May 2021 15:33:42 +0400 -Subject: [PATCH] Fix voice recoding with FFmpeg 4.4. - -Fixes #16217. ---- - Telegram/SourceFiles/media/audio/media_audio_capture.cpp | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/Telegram/SourceFiles/media/audio/media_audio_capture.cpp b/Telegram/SourceFiles/media/audio/media_audio_capture.cpp -index deb2474d789..d129168783d 100644 ---- a/Telegram/SourceFiles/media/audio/media_audio_capture.cpp -+++ b/Telegram/SourceFiles/media/audio/media_audio_capture.cpp -@@ -679,6 +679,10 @@ bool Instance::Inner::processFrame(int32 offset, int32 framesize) { - - AVFrame *frame = av_frame_alloc(); - -+ frame->format = d->codecContext->sample_fmt; -+ frame->channels = d->codecContext->channels; -+ frame->channel_layout = d->codecContext->channel_layout; -+ frame->sample_rate = d->codecContext->sample_rate; - frame->nb_samples = d->dstSamples; - frame->pts = av_rescale_q(d->fullSamples, AVRational { 1, d->codecContext->sample_rate }, d->codecContext->time_base); - diff --git a/net-im/telegram-desktop/files/tdesktop-2.7.4-webview-fix-gcc11.patch b/net-im/telegram-desktop/files/tdesktop-2.7.4-webview-fix-gcc11.patch deleted file mode 100644 index 7f4b3f2601f5..000000000000 --- a/net-im/telegram-desktop/files/tdesktop-2.7.4-webview-fix-gcc11.patch +++ /dev/null @@ -1,31 +0,0 @@ ---- tdesktop-2.7.4-full.orig/Telegram/lib_webview/webview/platform/linux/webview_linux_webkit_gtk.cpp -+++ tdesktop-2.7.4-full/Telegram/lib_webview/webview/platform/linux/webview_linux_webkit_gtk.cpp -@@ -6,6 +6,7 @@ - // - #include "webview/platform/linux/webview_linux_webkit_gtk.h" - -+#include "base/optional.h" - #include "base/platform/linux/base_linux_gtk_integration.h" - #include "base/platform/linux/base_linux_gtk_integration_p.h" - ---- tdesktop-2.7.4-full.orig/Telegram/lib_webview/webview/webview_embed.cpp -+++ tdesktop-2.7.4-full/Telegram/lib_webview/webview/webview_embed.cpp -@@ -14,7 +14,6 @@ - - #include - #include --#include - - namespace Webview { - namespace { ---- tdesktop-2.7.4-full.orig/Telegram/lib_webview/webview/webview_embed.h -+++ tdesktop-2.7.4-full/Telegram/lib_webview/webview/webview_embed.h -@@ -9,6 +9,8 @@ - #include "base/unique_qptr.h" - #include "base/basic_types.h" - -+#include -+ - class QString; - class QWidget; - class QWindow; diff --git a/net-im/telegram-desktop/files/tdesktop-2.8.11-load-gtk-with-qlibrary.patch b/net-im/telegram-desktop/files/tdesktop-2.8.11-load-gtk-with-qlibrary.patch new file mode 100644 index 000000000000..91e3f859eebc --- /dev/null +++ b/net-im/telegram-desktop/files/tdesktop-2.8.11-load-gtk-with-qlibrary.patch @@ -0,0 +1,112 @@ +Fix running with QT_QPA_PLATFORMTHEME=gtk2 + +From: https://bugs.archlinux.org/task/71541 + +--- tdesktop-2.8.11-full.orig/Telegram/CMakeLists.txt ++++ tdesktop-2.8.11-full/Telegram/CMakeLists.txt +@@ -114,25 +114,16 @@ + endif() + + if (NOT DESKTOP_APP_DISABLE_GTK_INTEGRATION) +- target_link_libraries(Telegram PRIVATE rt) + find_package(PkgConfig REQUIRED) + +- if (DESKTOP_APP_USE_PACKAGED AND NOT DESKTOP_APP_USE_PACKAGED_LAZY) +- pkg_check_modules(GTK3 REQUIRED IMPORTED_TARGET gtk+-3.0) +- target_link_libraries(Telegram PRIVATE PkgConfig::GTK3) +- +- if (NOT DESKTOP_APP_DISABLE_X11_INTEGRATION) +- pkg_check_modules(X11 REQUIRED IMPORTED_TARGET x11) +- target_link_libraries(Telegram PRIVATE PkgConfig::X11) +- endif() +- else() +- pkg_check_modules(GTK REQUIRED gtk+-3.0) +- target_include_directories(Telegram PRIVATE ${GTK_INCLUDE_DIRS}) ++ pkg_check_modules(GTK REQUIRED gtk+-3.0) ++ target_include_directories(Telegram PRIVATE ${GTK_INCLUDE_DIRS}) + +- if (NOT DESKTOP_APP_DISABLE_X11_INTEGRATION) +- target_link_libraries(Telegram PRIVATE X11) +- endif() ++ if (NOT DESKTOP_APP_DISABLE_X11_INTEGRATION) ++ target_link_libraries(Telegram PRIVATE X11) + endif() ++ ++ target_link_libraries(Telegram PRIVATE rt) + endif() + endif() + +--- tdesktop-2.8.11-full.orig/Telegram/lib_base/CMakeLists.txt ++++ tdesktop-2.8.11-full/Telegram/lib_base/CMakeLists.txt +@@ -254,13 +254,8 @@ + if (NOT DESKTOP_APP_DISABLE_GTK_INTEGRATION) + find_package(PkgConfig REQUIRED) + +- if (DESKTOP_APP_USE_PACKAGED AND NOT DESKTOP_APP_USE_PACKAGED_LAZY) +- pkg_check_modules(GTK3 REQUIRED IMPORTED_TARGET gtk+-3.0) +- target_link_libraries(lib_base PUBLIC PkgConfig::GTK3) +- else() +- pkg_check_modules(GTK REQUIRED gtk+-3.0) +- target_include_directories(lib_base PUBLIC ${GTK_INCLUDE_DIRS}) +- endif() ++ pkg_check_modules(GTK REQUIRED gtk+-3.0) ++ target_include_directories(lib_base PUBLIC ${GTK_INCLUDE_DIRS}) + endif() + endif() + +--- tdesktop-2.8.11-full.orig/Telegram/lib_base/base/platform/linux/base_linux_gtk_integration_p.h ++++ tdesktop-2.8.11-full/Telegram/lib_base/base/platform/linux/base_linux_gtk_integration_p.h +@@ -13,15 +13,7 @@ + #include + } // extern "C" + +-#if defined DESKTOP_APP_USE_PACKAGED && !defined DESKTOP_APP_USE_PACKAGED_LAZY +-#define LINK_TO_GTK +-#endif // DESKTOP_APP_USE_PACKAGED && !DESKTOP_APP_USE_PACKAGED_LAZY +- +-#ifdef LINK_TO_GTK +-#define LOAD_GTK_SYMBOL(lib, func) (func = ::func) +-#else // LINK_TO_GTK + #define LOAD_GTK_SYMBOL LOAD_LIBRARY_SYMBOL +-#endif // !LINK_TO_GTK + + namespace base { + namespace Platform { +@@ -31,11 +23,7 @@ + QLibrary &lib, + const char *name, + std::optional version = std::nullopt) { +-#ifdef LINK_TO_GTK +- return true; +-#else // LINK_TO_GTK + return LoadLibrary(lib, name, version); +-#endif // LINK_TO_GTK + } + + inline gboolean (*gtk_init_check)(int *argc, char ***argv) = nullptr; +--- tdesktop-2.8.11-full.orig/Telegram/lib_webview/CMakeLists.txt ++++ tdesktop-2.8.11-full/Telegram/lib_webview/CMakeLists.txt +@@ -51,19 +51,11 @@ + if (NOT DESKTOP_APP_DISABLE_WEBKIT) + find_package(PkgConfig REQUIRED) + +- if (DESKTOP_APP_USE_PACKAGED AND NOT DESKTOP_APP_USE_PACKAGED_LAZY) +- pkg_check_modules(GTK3 REQUIRED IMPORTED_TARGET gtk+-3.0) +- target_link_libraries(lib_webview PUBLIC PkgConfig::GTK3) ++ pkg_check_modules(GTK3 REQUIRED gtk+-3.0) ++ target_include_directories(lib_webview PUBLIC ${GTK3_INCLUDE_DIRS}) + +- pkg_check_modules(WEBKIT REQUIRED IMPORTED_TARGET webkit2gtk-4.0) +- target_link_libraries(lib_webview PUBLIC PkgConfig::WEBKIT) +- else() +- pkg_check_modules(GTK3 REQUIRED gtk+-3.0) +- target_include_directories(lib_webview PUBLIC ${GTK3_INCLUDE_DIRS}) +- +- pkg_check_modules(WEBKIT REQUIRED webkit2gtk-4.0) +- target_include_directories(lib_webview PUBLIC ${WEBKIT_INCLUDE_DIRS}) +- endif() ++ pkg_check_modules(WEBKIT REQUIRED webkit2gtk-4.0) ++ target_include_directories(lib_webview PUBLIC ${WEBKIT_INCLUDE_DIRS}) + else() + remove_target_sources(lib_webview ${src_loc} + webview/platform/linux/webview_linux_webkit_gtk.cpp diff --git a/net-im/telegram-desktop/files/tdesktop-2.9.0-fix-disable-wayland-integration.patch b/net-im/telegram-desktop/files/tdesktop-2.9.0-fix-disable-wayland-integration.patch new file mode 100644 index 000000000000..c76bcc06dfdb --- /dev/null +++ b/net-im/telegram-desktop/files/tdesktop-2.9.0-fix-disable-wayland-integration.patch @@ -0,0 +1,11 @@ +--- tdesktop-2.9.0-full.orig/Telegram/lib_ui/ui/platform/linux/ui_linux_wayland_integration_dummy.cpp ++++ tdesktop-2.9.0-full/Telegram/lib_ui/ui/platform/linux/ui_linux_wayland_integration_dummy.cpp +@@ -18,6 +18,8 @@ + WaylandIntegration::WaylandIntegration() { + } + ++WaylandIntegration::~WaylandIntegration() = default; ++ + WaylandIntegration *WaylandIntegration::Instance() { + if (!::Platform::IsWayland()) return nullptr; + static WaylandIntegration instance; diff --git a/net-im/telegram-desktop/telegram-desktop-2.7.4-r1.ebuild b/net-im/telegram-desktop/telegram-desktop-2.7.4-r1.ebuild deleted file mode 100644 index 1f51780319cc..000000000000 --- a/net-im/telegram-desktop/telegram-desktop-2.7.4-r1.ebuild +++ /dev/null @@ -1,146 +0,0 @@ -# Copyright 2020-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{7,8,9} ) - -inherit xdg cmake python-any-r1 flag-o-matic - -MY_P="tdesktop-${PV}-full" - -DESCRIPTION="Official desktop client for Telegram" -HOMEPAGE="https://desktop.telegram.org" -SRC_URI="https://github.com/telegramdesktop/tdesktop/releases/download/v${PV}/${MY_P}.tar.gz" - -LICENSE="BSD GPL-3-with-openssl-exception LGPL-2+" -SLOT="0" -KEYWORDS="amd64 ~ppc64" -IUSE="+dbus enchant +gtk +hunspell +spell wayland webkit +X" - -RDEPEND=" - !net-im/telegram-desktop-bin - app-arch/lz4:= - dev-cpp/glibmm:2 - dev-libs/xxhash - dev-qt/qtcore:5 - dev-qt/qtgui:5[dbus?,jpeg,png,wayland?,X(-)?] - dev-qt/qtimageformats:5 - dev-qt/qtnetwork:5[ssl] - dev-qt/qtsvg:5 - dev-qt/qtwidgets:5[png,X(-)?] - media-fonts/open-sans - media-libs/fontconfig:= - media-libs/opus:= - ~media-libs/libtgvoip-2.4.4_p20210302 - media-libs/openal - ~media-libs/tg_owt-0_pre20210422 - media-video/ffmpeg:=[opus] - sys-libs/zlib:=[minizip] - dbus? ( - dev-qt/qtdbus:5 - dev-libs/libdbusmenu-qt[qt5(+)] - ) - enchant? ( app-text/enchant:= ) - gtk? ( x11-libs/gtk+:3[X?] ) - hunspell? ( >=app-text/hunspell-1.7:= ) - wayland? ( kde-frameworks/kwayland:= ) - webkit? ( net-libs/webkit-gtk:= ) - X? ( x11-libs/libxcb:= ) -" -DEPEND="${RDEPEND} - dev-cpp/range-v3 - =dev-cpp/ms-gsl-3* -" -BDEPEND=" - ${PYTHON_DEPS} - >=dev-util/cmake-3.16 - virtual/pkgconfig -" -REQUIRED_USE=" - spell? ( - ^^ ( enchant hunspell ) - ) - webkit? ( gtk ) -" - -S="${WORKDIR}/${MY_P}" - -PATCHES=( - # https://github.com/desktop-app/cmake_helpers/pull/91 - # https://github.com/desktop-app/lib_webview/pull/2 - "${FILESDIR}/tdesktop-2.7.4-disable-webkit-separately.patch" - # https://github.com/desktop-app/lib_webview/commit/0b4100d7cecc4e748c51f3f51ebfd1392ec3978a - "${FILESDIR}/tdesktop-2.7.3-webview-include-gdkx.patch" - # https://github.com/desktop-app/lib_webview/pull/3 - "${FILESDIR}/tdesktop-2.7.4-webview-fix-gcc11.patch" - # https://github.com/telegramdesktop/tdesktop/issues/16217 - "${FILESDIR}/tdesktop-2.7.4-voice-crash.patch" - "${FILESDIR}/tdesktop-2.7.4-voice-ffmpeg44.patch" - # https://github.com/telegramdesktop/tdesktop/commit/404538c98968d44d207671de3adde91b8df50721 - "${FILESDIR}/tdesktop-2.7.4-fix-disable-dbus-integration.patch" -) - -pkg_pretend() { - if has ccache ${FEATURES}; then - ewarn - ewarn "ccache does not work with ${PN} out of the box" - ewarn "due to usage of precompiled headers" - ewarn "check bug https://bugs.gentoo.org/715114 for more info" - ewarn - fi -} - -src_prepare() { - # no explicit toggle, doesn't build with the system one #752417 - sed -i 's/DESKTOP_APP_USE_PACKAGED/NO_ONE_WILL_EVER_SET_THIS/' \ - cmake/external/rlottie/CMakeLists.txt || die - - cmake_src_prepare -} - -src_configure() { - # gtk is really needed for image copy-paste due to https://bugreports.qt.io/browse/QTBUG-56595 - local mycmakeargs=( - -DTDESKTOP_LAUNCHER_BASENAME="${PN}" - -DCMAKE_DISABLE_FIND_PACKAGE_tl-expected=ON # header only lib, some git version. prevents warnings. - - -DDESKTOP_APP_DISABLE_X11_INTEGRATION=$(usex X OFF ON) - -DDESKTOP_APP_DISABLE_WAYLAND_INTEGRATION=$(usex wayland OFF ON) - -DDESKTOP_APP_DISABLE_DBUS_INTEGRATION=$(usex dbus OFF ON) - -DDESKTOP_APP_DISABLE_GTK_INTEGRATION=$(usex gtk OFF ON) - -DDESKTOP_APP_DISABLE_WEBKIT=$(usex webkit OFF ON) - -DDESKTOP_APP_DISABLE_SPELLCHECK=$(usex spell OFF ON) # enables hunspell (recommended) - -DDESKTOP_APP_USE_ENCHANT=$(usex enchant ON OFF) # enables enchant and disables hunspell - ) - - if [[ -n ${MY_TDESKTOP_API_ID} && -n ${MY_TDESKTOP_API_HASH} ]]; then - einfo "Found custom API credentials" - mycmakeargs+=( - -DTDESKTOP_API_ID="${MY_TDESKTOP_API_ID}" - -DTDESKTOP_API_HASH="${MY_TDESKTOP_API_HASH}" - ) - else - # https://github.com/telegramdesktop/tdesktop/blob/dev/snap/snapcraft.yaml - # Building with snapcraft API credentials by default - # Custom API credentials can be obtained here: - # https://github.com/telegramdesktop/tdesktop/blob/dev/docs/api_credentials.md - # After getting credentials you can export variables: - # export MY_TDESKTOP_API_ID="17349"" - # export MY_TDESKTOP_API_HASH="344583e45741c457fe1862106095a5eb" - # and restart the build" - # you can set above variables (without export) in /etc/portage/env/net-im/telegram-desktop - # portage will use custom variable every build automatically - mycmakeargs+=( - -DTDESKTOP_API_ID="611335" - -DTDESKTOP_API_HASH="d524b414d21f4d37f08684c1df41ac9c" - ) - fi - - cmake_src_configure -} - -pkg_postinst() { - xdg_pkg_postinst - use gtk || elog "enable 'gtk' useflag if you have image copy-paste problems" -} diff --git a/net-im/telegram-desktop/telegram-desktop-2.8.1.ebuild b/net-im/telegram-desktop/telegram-desktop-2.8.1.ebuild deleted file mode 100644 index ceaf8f8b8b03..000000000000 --- a/net-im/telegram-desktop/telegram-desktop-2.8.1.ebuild +++ /dev/null @@ -1,142 +0,0 @@ -# Copyright 2020-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{7,8,9} ) - -inherit xdg cmake python-any-r1 flag-o-matic - -DESCRIPTION="Official desktop client for Telegram" -HOMEPAGE="https://desktop.telegram.org" - -MY_P="tdesktop-${PV}-full" -SRC_URI="https://github.com/telegramdesktop/tdesktop/releases/download/v${PV}/${MY_P}.tar.gz" - -LICENSE="BSD GPL-3-with-openssl-exception LGPL-2+" -SLOT="0" -KEYWORDS="~amd64 ~ppc64" -IUSE="+dbus enchant +gtk +hunspell +spell wayland webkit +X" -REQUIRED_USE=" - spell? ( - ^^ ( enchant hunspell ) - ) - webkit? ( gtk ) -" - -RDEPEND=" - !net-im/telegram-desktop-bin - app-arch/lz4:= - dev-cpp/glibmm:2 - dev-libs/xxhash - >=dev-qt/qtcore-5.15:5 - >=dev-qt/qtgui-5.15:5[dbus?,jpeg,png,wayland?,X(-)?] - >=dev-qt/qtimageformats-5.15:5 - >=dev-qt/qtnetwork-5.15:5[ssl] - >=dev-qt/qtsvg-5.15:5 - >=dev-qt/qtwidgets-5.15:5[png,X(-)?] - media-fonts/open-sans - media-libs/fontconfig:= - ~media-libs/libtgvoip-2.4.4_p20210302 - >=media-libs/libtgvoip-2.4.4_p20210302-r2 - media-libs/openal - media-libs/opus:= - media-libs/rnnoise - ~media-libs/tg_owt-0_pre20210626 - media-video/ffmpeg:=[opus] - sys-libs/zlib:=[minizip] - dbus? ( - dev-qt/qtdbus:5 - dev-libs/libdbusmenu-qt[qt5(+)] - ) - enchant? ( app-text/enchant:= ) - gtk? ( x11-libs/gtk+:3[X?,wayland?] ) - hunspell? ( >=app-text/hunspell-1.7:= ) - wayland? ( kde-frameworks/kwayland:= ) - webkit? ( net-libs/webkit-gtk:= ) - X? ( x11-libs/libxcb:= ) -" -DEPEND="${RDEPEND} - dev-cpp/range-v3 - =dev-cpp/ms-gsl-3* -" -BDEPEND=" - ${PYTHON_DEPS} - >=dev-util/cmake-3.16 - virtual/pkgconfig -" - -S="${WORKDIR}/${MY_P}" - -PATCHES=( - # https://github.com/desktop-app/cmake_helpers/pull/91 - # https://github.com/desktop-app/lib_webview/pull/2 - "${FILESDIR}/tdesktop-2.7.4-disable-webkit-separately.patch" - # https://github.com/desktop-app/lib_webview/pull/3 - # https://github.com/desktop-app/lib_base/commit/01d152af4c6282756585f1405c4bcbb75960a509 (landed in 2.8.0, patch is harmless) - "${FILESDIR}/tdesktop-2.7.4-webview-fix-gcc11.patch" -) - -pkg_pretend() { - if has ccache ${FEATURES}; then - ewarn - ewarn "ccache does not work with ${PN} out of the box" - ewarn "due to usage of precompiled headers" - ewarn "check bug https://bugs.gentoo.org/715114 for more info" - ewarn - fi -} - -src_prepare() { - # no explicit toggle, doesn't build with the system one #752417 - sed -i 's/DESKTOP_APP_USE_PACKAGED/NO_ONE_WILL_EVER_SET_THIS/' \ - cmake/external/rlottie/CMakeLists.txt || die - - cmake_src_prepare -} - -src_configure() { - # gtk is really needed for image copy-paste due to https://bugreports.qt.io/browse/QTBUG-56595 - local mycmakeargs=( - -DTDESKTOP_LAUNCHER_BASENAME="${PN}" - -DCMAKE_DISABLE_FIND_PACKAGE_tl-expected=ON # header only lib, some git version. prevents warnings. - - -DDESKTOP_APP_DISABLE_X11_INTEGRATION=$(usex X OFF ON) - -DDESKTOP_APP_DISABLE_WAYLAND_INTEGRATION=$(usex wayland OFF ON) - -DDESKTOP_APP_DISABLE_DBUS_INTEGRATION=$(usex dbus OFF ON) - -DDESKTOP_APP_DISABLE_GTK_INTEGRATION=$(usex gtk OFF ON) - -DDESKTOP_APP_DISABLE_WEBKIT=$(usex webkit OFF ON) - -DDESKTOP_APP_DISABLE_SPELLCHECK=$(usex spell OFF ON) # enables hunspell (recommended) - -DDESKTOP_APP_USE_ENCHANT=$(usex enchant ON OFF) # enables enchant and disables hunspell - ) - - if [[ -n ${MY_TDESKTOP_API_ID} && -n ${MY_TDESKTOP_API_HASH} ]]; then - einfo "Found custom API credentials" - mycmakeargs+=( - -DTDESKTOP_API_ID="${MY_TDESKTOP_API_ID}" - -DTDESKTOP_API_HASH="${MY_TDESKTOP_API_HASH}" - ) - else - # https://github.com/telegramdesktop/tdesktop/blob/dev/snap/snapcraft.yaml - # Building with snapcraft API credentials by default - # Custom API credentials can be obtained here: - # https://github.com/telegramdesktop/tdesktop/blob/dev/docs/api_credentials.md - # After getting credentials you can export variables: - # export MY_TDESKTOP_API_ID="17349"" - # export MY_TDESKTOP_API_HASH="344583e45741c457fe1862106095a5eb" - # and restart the build" - # you can set above variables (without export) in /etc/portage/env/net-im/telegram-desktop - # portage will use custom variable every build automatically - mycmakeargs+=( - -DTDESKTOP_API_ID="611335" - -DTDESKTOP_API_HASH="d524b414d21f4d37f08684c1df41ac9c" - ) - fi - - cmake_src_configure -} - -pkg_postinst() { - xdg_pkg_postinst - use gtk || elog "enable 'gtk' useflag if you have image copy-paste problems" -} diff --git a/net-im/telegram-desktop/telegram-desktop-2.8.11-r1.ebuild b/net-im/telegram-desktop/telegram-desktop-2.8.11-r1.ebuild new file mode 100644 index 000000000000..7987cc94ec85 --- /dev/null +++ b/net-im/telegram-desktop/telegram-desktop-2.8.11-r1.ebuild @@ -0,0 +1,146 @@ +# Copyright 2020-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{7..10} ) + +inherit xdg cmake python-any-r1 flag-o-matic + +DESCRIPTION="Official desktop client for Telegram" +HOMEPAGE="https://desktop.telegram.org" + +MY_P="tdesktop-${PV}-full" +SRC_URI="https://github.com/telegramdesktop/tdesktop/releases/download/v${PV}/${MY_P}.tar.gz" + +LICENSE="BSD GPL-3-with-openssl-exception LGPL-2+" +SLOT="0" +KEYWORDS="amd64 ~ppc64" +IUSE="+dbus enchant +gtk +hunspell +spell wayland webkit +X" +REQUIRED_USE=" + spell? ( + ^^ ( enchant hunspell ) + ) + webkit? ( gtk ) + gtk? ( dbus ) +" + +RDEPEND=" + !net-im/telegram-desktop-bin + app-arch/lz4:= + dev-cpp/glibmm:2 + dev-libs/jemalloc:=[-lazy-lock] + dev-libs/xxhash + >=dev-qt/qtcore-5.15:5 + >=dev-qt/qtgui-5.15:5[dbus?,jpeg,png,wayland?,X?] + >=dev-qt/qtimageformats-5.15:5 + >=dev-qt/qtnetwork-5.15:5[ssl] + >=dev-qt/qtsvg-5.15:5 + >=dev-qt/qtwidgets-5.15:5[png,X?] + media-fonts/open-sans + media-libs/fontconfig:= + ~media-libs/libtgvoip-2.4.4_p20210302 + >=media-libs/libtgvoip-2.4.4_p20210302-r2 + media-libs/openal + media-libs/opus:= + media-libs/rnnoise + ~media-libs/tg_owt-0_pre20210626 + media-video/ffmpeg:=[opus] + sys-libs/zlib:=[minizip] + dbus? ( + dev-qt/qtdbus:5 + dev-libs/libdbusmenu-qt[qt5(+)] + ) + enchant? ( app-text/enchant:= ) + gtk? ( x11-libs/gtk+:3[X?,wayland?] ) + hunspell? ( >=app-text/hunspell-1.7:= ) + wayland? ( kde-frameworks/kwayland:= ) + webkit? ( net-libs/webkit-gtk:= ) + X? ( x11-libs/libxcb:= ) +" +DEPEND="${RDEPEND} + dev-cpp/range-v3 + =dev-cpp/ms-gsl-3* +" +BDEPEND=" + ${PYTHON_DEPS} + >=dev-util/cmake-3.16 + virtual/pkgconfig +" + +S="${WORKDIR}/${MY_P}" + +PATCHES=( + # https://github.com/desktop-app/cmake_helpers/pull/91 + # https://github.com/desktop-app/lib_webview/pull/2 + "${FILESDIR}/tdesktop-2.8.9-disable-webkit-separately.patch" + # Not a proper fix, not upstreamed + "${FILESDIR}/tdesktop-2.8.9-webview-fix-glib.patch" + "${FILESDIR}/tdesktop-2.8.10-jemalloc-only-telegram.patch" + # Already upstream + "${FILESDIR}/tdesktop-2.8.11-load-gtk-with-qlibrary.patch" +) + +pkg_pretend() { + if has ccache ${FEATURES}; then + ewarn + ewarn "ccache does not work with ${PN} out of the box" + ewarn "due to usage of precompiled headers" + ewarn "check bug https://bugs.gentoo.org/715114 for more info" + ewarn + fi +} + +src_prepare() { + # no explicit toggle, doesn't build with the system one #752417 + sed -i 's/DESKTOP_APP_USE_PACKAGED/NO_ONE_WILL_EVER_SET_THIS/' \ + cmake/external/rlottie/CMakeLists.txt || die + + cmake_src_prepare +} + +src_configure() { + # gtk is really needed for image copy-paste due to https://bugreports.qt.io/browse/QTBUG-56595 + local mycmakeargs=( + -DTDESKTOP_LAUNCHER_BASENAME="${PN}" + -DCMAKE_DISABLE_FIND_PACKAGE_tl-expected=ON # header only lib, some git version. prevents warnings. + + -DDESKTOP_APP_DISABLE_X11_INTEGRATION=$(usex X OFF ON) + -DDESKTOP_APP_DISABLE_WAYLAND_INTEGRATION=$(usex wayland OFF ON) + -DDESKTOP_APP_DISABLE_DBUS_INTEGRATION=$(usex dbus OFF ON) + -DDESKTOP_APP_DISABLE_GTK_INTEGRATION=$(usex gtk OFF ON) + -DDESKTOP_APP_DISABLE_WEBKIT=$(usex webkit OFF ON) + -DDESKTOP_APP_DISABLE_SPELLCHECK=$(usex spell OFF ON) # enables hunspell (recommended) + -DDESKTOP_APP_USE_ENCHANT=$(usex enchant ON OFF) # enables enchant and disables hunspell + ) + + if [[ -n ${MY_TDESKTOP_API_ID} && -n ${MY_TDESKTOP_API_HASH} ]]; then + einfo "Found custom API credentials" + mycmakeargs+=( + -DTDESKTOP_API_ID="${MY_TDESKTOP_API_ID}" + -DTDESKTOP_API_HASH="${MY_TDESKTOP_API_HASH}" + ) + else + # https://github.com/telegramdesktop/tdesktop/blob/dev/snap/snapcraft.yaml + # Building with snapcraft API credentials by default + # Custom API credentials can be obtained here: + # https://github.com/telegramdesktop/tdesktop/blob/dev/docs/api_credentials.md + # After getting credentials you can export variables: + # export MY_TDESKTOP_API_ID="17349"" + # export MY_TDESKTOP_API_HASH="344583e45741c457fe1862106095a5eb" + # and restart the build" + # you can set above variables (without export) in /etc/portage/env/net-im/telegram-desktop + # portage will use custom variable every build automatically + mycmakeargs+=( + -DTDESKTOP_API_ID="611335" + -DTDESKTOP_API_HASH="d524b414d21f4d37f08684c1df41ac9c" + ) + fi + + cmake_src_configure +} + +pkg_postinst() { + xdg_pkg_postinst + use gtk || elog "enable the 'gtk' useflag if you have image copy-paste problems" +} diff --git a/net-im/telegram-desktop/telegram-desktop-2.8.11.ebuild b/net-im/telegram-desktop/telegram-desktop-2.8.11.ebuild deleted file mode 100644 index aaa30fc0f334..000000000000 --- a/net-im/telegram-desktop/telegram-desktop-2.8.11.ebuild +++ /dev/null @@ -1,145 +0,0 @@ -# Copyright 2020-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{7..10} ) - -inherit xdg cmake python-any-r1 flag-o-matic - -DESCRIPTION="Official desktop client for Telegram" -HOMEPAGE="https://desktop.telegram.org" - -MY_P="tdesktop-${PV}-full" -SRC_URI="https://github.com/telegramdesktop/tdesktop/releases/download/v${PV}/${MY_P}.tar.gz" - -LICENSE="BSD GPL-3-with-openssl-exception LGPL-2+" -SLOT="0" -KEYWORDS="~amd64 ~ppc64" -IUSE="+dbus enchant +gtk +hunspell +spell wayland webkit +X" -REQUIRED_USE=" - spell? ( - ^^ ( enchant hunspell ) - ) - webkit? ( gtk ) - gtk? ( dbus ) -" - -RDEPEND=" - !net-im/telegram-desktop-bin - app-arch/lz4:= - dev-cpp/glibmm:2 - dev-libs/jemalloc:= - dev-libs/xxhash - >=dev-qt/qtcore-5.15:5 - >=dev-qt/qtgui-5.15:5[dbus?,jpeg,png,wayland?,X(-)?] - >=dev-qt/qtimageformats-5.15:5 - >=dev-qt/qtnetwork-5.15:5[ssl] - >=dev-qt/qtsvg-5.15:5 - >=dev-qt/qtwidgets-5.15:5[png,X(-)?] - media-fonts/open-sans - media-libs/fontconfig:= - ~media-libs/libtgvoip-2.4.4_p20210302 - >=media-libs/libtgvoip-2.4.4_p20210302-r2 - media-libs/openal - media-libs/opus:= - media-libs/rnnoise - ~media-libs/tg_owt-0_pre20210626 - media-video/ffmpeg:=[opus] - sys-libs/zlib:=[minizip] - dbus? ( - dev-qt/qtdbus:5 - dev-libs/libdbusmenu-qt[qt5(+)] - ) - enchant? ( app-text/enchant:= ) - gtk? ( x11-libs/gtk+:3[X?,wayland?] ) - hunspell? ( >=app-text/hunspell-1.7:= ) - wayland? ( kde-frameworks/kwayland:= ) - webkit? ( net-libs/webkit-gtk:= ) - X? ( x11-libs/libxcb:= ) -" -DEPEND="${RDEPEND} - dev-cpp/range-v3 - =dev-cpp/ms-gsl-3* -" -BDEPEND=" - ${PYTHON_DEPS} - >=dev-util/cmake-3.16 - virtual/pkgconfig -" - -S="${WORKDIR}/${MY_P}" - -PATCHES=( - # https://github.com/desktop-app/cmake_helpers/pull/91 - # https://github.com/desktop-app/lib_webview/pull/2 - "${FILESDIR}/tdesktop-2.8.9-disable-webkit-separately.patch" - # Not a proper fix, not upstreamed - "${FILESDIR}/tdesktop-2.8.9-webview-fix-glib.patch" - # Not upstreamed (yet) - "${FILESDIR}/tdesktop-2.8.10-jemalloc-only-telegram.patch" -) - -pkg_pretend() { - if has ccache ${FEATURES}; then - ewarn - ewarn "ccache does not work with ${PN} out of the box" - ewarn "due to usage of precompiled headers" - ewarn "check bug https://bugs.gentoo.org/715114 for more info" - ewarn - fi -} - -src_prepare() { - # no explicit toggle, doesn't build with the system one #752417 - sed -i 's/DESKTOP_APP_USE_PACKAGED/NO_ONE_WILL_EVER_SET_THIS/' \ - cmake/external/rlottie/CMakeLists.txt || die - - cmake_src_prepare -} - -src_configure() { - # gtk is really needed for image copy-paste due to https://bugreports.qt.io/browse/QTBUG-56595 - local mycmakeargs=( - -DTDESKTOP_LAUNCHER_BASENAME="${PN}" - -DCMAKE_DISABLE_FIND_PACKAGE_tl-expected=ON # header only lib, some git version. prevents warnings. - - -DDESKTOP_APP_DISABLE_X11_INTEGRATION=$(usex X OFF ON) - -DDESKTOP_APP_DISABLE_WAYLAND_INTEGRATION=$(usex wayland OFF ON) - -DDESKTOP_APP_DISABLE_DBUS_INTEGRATION=$(usex dbus OFF ON) - -DDESKTOP_APP_DISABLE_GTK_INTEGRATION=$(usex gtk OFF ON) - -DDESKTOP_APP_DISABLE_WEBKIT=$(usex webkit OFF ON) - -DDESKTOP_APP_DISABLE_SPELLCHECK=$(usex spell OFF ON) # enables hunspell (recommended) - -DDESKTOP_APP_USE_ENCHANT=$(usex enchant ON OFF) # enables enchant and disables hunspell - ) - - if [[ -n ${MY_TDESKTOP_API_ID} && -n ${MY_TDESKTOP_API_HASH} ]]; then - einfo "Found custom API credentials" - mycmakeargs+=( - -DTDESKTOP_API_ID="${MY_TDESKTOP_API_ID}" - -DTDESKTOP_API_HASH="${MY_TDESKTOP_API_HASH}" - ) - else - # https://github.com/telegramdesktop/tdesktop/blob/dev/snap/snapcraft.yaml - # Building with snapcraft API credentials by default - # Custom API credentials can be obtained here: - # https://github.com/telegramdesktop/tdesktop/blob/dev/docs/api_credentials.md - # After getting credentials you can export variables: - # export MY_TDESKTOP_API_ID="17349"" - # export MY_TDESKTOP_API_HASH="344583e45741c457fe1862106095a5eb" - # and restart the build" - # you can set above variables (without export) in /etc/portage/env/net-im/telegram-desktop - # portage will use custom variable every build automatically - mycmakeargs+=( - -DTDESKTOP_API_ID="611335" - -DTDESKTOP_API_HASH="d524b414d21f4d37f08684c1df41ac9c" - ) - fi - - cmake_src_configure -} - -pkg_postinst() { - xdg_pkg_postinst - use gtk || elog "enable the 'gtk' useflag if you have image copy-paste problems" -} diff --git a/net-im/telegram-desktop/telegram-desktop-2.9.0-r1.ebuild b/net-im/telegram-desktop/telegram-desktop-2.9.0-r1.ebuild new file mode 100644 index 000000000000..7ed38b44c9db --- /dev/null +++ b/net-im/telegram-desktop/telegram-desktop-2.9.0-r1.ebuild @@ -0,0 +1,140 @@ +# Copyright 2020-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{7..10} ) + +inherit xdg cmake python-any-r1 flag-o-matic + +DESCRIPTION="Official desktop client for Telegram" +HOMEPAGE="https://desktop.telegram.org" + +MY_P="tdesktop-${PV}-full" +SRC_URI="https://github.com/telegramdesktop/tdesktop/releases/download/v${PV}/${MY_P}.tar.gz" + +LICENSE="BSD GPL-3-with-openssl-exception LGPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~ppc64" +IUSE="+dbus enchant +gtk +hunspell +spell wayland webkit +X" +REQUIRED_USE=" + spell? ( + ^^ ( enchant hunspell ) + ) + webkit? ( gtk ) + gtk? ( dbus ) +" + +RDEPEND=" + !net-im/telegram-desktop-bin + app-arch/lz4:= + dev-cpp/glibmm:2 + dev-libs/jemalloc:=[-lazy-lock] + dev-libs/xxhash + >=dev-qt/qtcore-5.15:5 + >=dev-qt/qtgui-5.15:5[dbus?,jpeg,png,wayland?,X?] + >=dev-qt/qtimageformats-5.15:5 + >=dev-qt/qtnetwork-5.15:5[ssl] + >=dev-qt/qtsvg-5.15:5 + >=dev-qt/qtwidgets-5.15:5[png,X?] + media-fonts/open-sans + media-libs/fontconfig:= + ~media-libs/libtgvoip-2.4.4_p20210302 + >=media-libs/libtgvoip-2.4.4_p20210302-r2 + media-libs/openal + media-libs/opus:= + media-libs/rnnoise + ~media-libs/tg_owt-0_pre20210626 + media-video/ffmpeg:=[opus] + sys-libs/zlib:=[minizip] + dbus? ( + dev-qt/qtdbus:5 + dev-libs/libdbusmenu-qt[qt5(+)] + ) + enchant? ( app-text/enchant:= ) + gtk? ( x11-libs/gtk+:3[X?,wayland?] ) + hunspell? ( >=app-text/hunspell-1.7:= ) + wayland? ( kde-frameworks/kwayland:= ) + webkit? ( net-libs/webkit-gtk:= ) + X? ( x11-libs/libxcb:= ) +" +DEPEND="${RDEPEND} + dev-cpp/range-v3 + =dev-cpp/ms-gsl-3* +" +BDEPEND=" + ${PYTHON_DEPS} + >=dev-util/cmake-3.16 + virtual/pkgconfig +" + +S="${WORKDIR}/${MY_P}" + +PATCHES=( + "${FILESDIR}/tdesktop-2.8.10-jemalloc-only-telegram.patch" + "${FILESDIR}/tdesktop-2.9.0-fix-disable-wayland-integration.patch" +) + +pkg_pretend() { + if has ccache ${FEATURES}; then + ewarn + ewarn "ccache does not work with ${PN} out of the box" + ewarn "due to usage of precompiled headers" + ewarn "check bug https://bugs.gentoo.org/715114 for more info" + ewarn + fi +} + +src_prepare() { + # no explicit toggle, doesn't build with the system one #752417 + sed -i 's/DESKTOP_APP_USE_PACKAGED/NO_ONE_WILL_EVER_SET_THIS/' \ + cmake/external/rlottie/CMakeLists.txt || die + + cmake_src_prepare +} + +src_configure() { + # gtk is really needed for image copy-paste due to https://bugreports.qt.io/browse/QTBUG-56595 + local mycmakeargs=( + -DTDESKTOP_LAUNCHER_BASENAME="${PN}" + -DCMAKE_DISABLE_FIND_PACKAGE_tl-expected=ON # header only lib, some git version. prevents warnings. + + -DDESKTOP_APP_DISABLE_X11_INTEGRATION=$(usex X no yes) + -DDESKTOP_APP_DISABLE_WAYLAND_INTEGRATION=$(usex wayland no yes) + -DDESKTOP_APP_DISABLE_DBUS_INTEGRATION=$(usex dbus no yes) + -DDESKTOP_APP_DISABLE_GTK_INTEGRATION=$(usex gtk no yes) + -DDESKTOP_APP_DISABLE_WEBKITGTK=$(usex webkit no yes) + -DDESKTOP_APP_DISABLE_SPELLCHECK=$(usex spell no yes) # enables hunspell (recommended) + -DDESKTOP_APP_USE_ENCHANT=$(usex enchant) # enables enchant and disables hunspell + ) + + if [[ -n ${MY_TDESKTOP_API_ID} && -n ${MY_TDESKTOP_API_HASH} ]]; then + einfo "Found custom API credentials" + mycmakeargs+=( + -DTDESKTOP_API_ID="${MY_TDESKTOP_API_ID}" + -DTDESKTOP_API_HASH="${MY_TDESKTOP_API_HASH}" + ) + else + # https://github.com/telegramdesktop/tdesktop/blob/dev/snap/snapcraft.yaml + # Building with snapcraft API credentials by default + # Custom API credentials can be obtained here: + # https://github.com/telegramdesktop/tdesktop/blob/dev/docs/api_credentials.md + # After getting credentials you can export variables: + # export MY_TDESKTOP_API_ID="17349"" + # export MY_TDESKTOP_API_HASH="344583e45741c457fe1862106095a5eb" + # and restart the build" + # you can set above variables (without export) in /etc/portage/env/net-im/telegram-desktop + # portage will use custom variable every build automatically + mycmakeargs+=( + -DTDESKTOP_API_ID="611335" + -DTDESKTOP_API_HASH="d524b414d21f4d37f08684c1df41ac9c" + ) + fi + + cmake_src_configure +} + +pkg_postinst() { + xdg_pkg_postinst + use gtk || elog "enable the 'gtk' useflag if you have image copy-paste problems" +} -- cgit v1.2.3