From 616579b5d773c50af31ee56f00105d96ce641ca2 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 14 Aug 2021 10:30:13 +0100 Subject: gentoo resync : 14.08.2021 --- net-im/telegram-desktop/Manifest | 11 +- ...desktop-2.8.11-fix-build-without-pipewire.patch | 26 ++++ ...top-2.9.0-fix-disable-wayland-integration.patch | 11 -- .../tdesktop-2.9.3-jemalloc-only-telegram.patch | 31 +++++ net-im/telegram-desktop/metadata.xml | 1 + .../telegram-desktop-2.8.11-r1.ebuild | 146 -------------------- .../telegram-desktop-2.8.11-r2.ebuild | 150 +++++++++++++++++++++ .../telegram-desktop-2.9.0-r1.ebuild | 140 ------------------- .../telegram-desktop/telegram-desktop-2.9.3.ebuild | 143 ++++++++++++++++++++ 9 files changed, 357 insertions(+), 302 deletions(-) create mode 100644 net-im/telegram-desktop/files/tdesktop-2.8.11-fix-build-without-pipewire.patch delete mode 100644 net-im/telegram-desktop/files/tdesktop-2.9.0-fix-disable-wayland-integration.patch create mode 100644 net-im/telegram-desktop/files/tdesktop-2.9.3-jemalloc-only-telegram.patch delete mode 100644 net-im/telegram-desktop/telegram-desktop-2.8.11-r1.ebuild create mode 100644 net-im/telegram-desktop/telegram-desktop-2.8.11-r2.ebuild delete mode 100644 net-im/telegram-desktop/telegram-desktop-2.9.0-r1.ebuild create mode 100644 net-im/telegram-desktop/telegram-desktop-2.9.3.ebuild (limited to 'net-im/telegram-desktop') diff --git a/net-im/telegram-desktop/Manifest b/net-im/telegram-desktop/Manifest index cd85bb15647b..a486151b8370 100644 --- a/net-im/telegram-desktop/Manifest +++ b/net-im/telegram-desktop/Manifest @@ -1,10 +1,11 @@ AUX tdesktop-2.8.10-jemalloc-only-telegram.patch 973 BLAKE2B 6efc62db44ea8d26f469d937fc91135c77eea38e6e51b1c6cc772bc91afb7372292731b0369544ea52f67075ce9800fdcadc150ec72df571c29f2818b88cc56d SHA512 754e7286aebd183891b3808b66979df4b8e62355147a8f6bd860bf37360e089928247073b7adf9fc8d09ed4edc35746e50a4eff3d0bdc2d74888e8cb74042cf0 +AUX tdesktop-2.8.11-fix-build-without-pipewire.patch 1171 BLAKE2B c6d9bf98363e17e1da04c8540c1ea9a187dbfea9fb80849a9c54ead8f43b21b0a8b83ff31d0127e7d4b144b8353be9918d8c631a347fcad340bacfb0b438f01c SHA512 7e43d53a8f601a2bf5d4b3a3b3888329cc1162967ac75fda2769c8c4b25982a1cdc991d22b445842dbb97b874af724b458db8c861b9df12fe739fbca6a08641e 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 -AUX tdesktop-2.9.0-fix-disable-wayland-integration.patch 462 BLAKE2B 5dc8f084dd753459f217849606f09b2a847a0fe13de49a6984bb1aedfadf7091833cd314da59a55ea9ff0d04c25bd23e94bbe2c7896a307564c892eea9d98ae4 SHA512 4e8597575cab639d2d6c19556e2125301b8e3b901900bce6e14945da2746ff40085b721f42f525c645c1094914a84d3f50dd9bc063f10a28a96dbfb23c98671c +AUX tdesktop-2.9.3-jemalloc-only-telegram.patch 988 BLAKE2B 487ce32454a5bfb51a081c7bd6803ff6cc956b349569d5ddf17d2abb7d7d5f0714002de654e149d8aefe6880e6b827c2ffb42c22e3ffa3fc6f10286c3e805463 SHA512 a1645bac4b715bad17a78226b9e76e30117f64715b1833df17950c882940a2ebbf18c70ab9ec628002408859292b57b9c4a48f9212bd15d9d2903867012eb3cf DIST tdesktop-2.8.11-full.tar.gz 37105468 BLAKE2B 1ec5a0003bd1b948b45213509fa0649dfde5ec8e3dff097bf45aa0951c7963930788b0bee853f286d04b008b78704c464b6614b8391350767affebc2623b25af SHA512 a553313b04fbb562745be2381a84117657172952e46e280980a73c9fcfe2a7cf29c0e012e4b1259816d1e6652418e7a1ddfc4e394544fcc3aeb33704cbe80860 -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 +DIST tdesktop-2.9.3-full.tar.gz 37335782 BLAKE2B 197583ba6568c455218c51f590c1ba1a3f10c390caa4fd03657098f499ce113a4f5f57ca9dd53bc4baba31992d4229768ed35e68ad6b0685010bc335817edcac SHA512 810cfac5d7e6ce9413b1b2406927e89c1383ea5b725233a68b2cb29dd374b4c3386c22186640afde4492c844516c88889a5db8e5b167a09d6d6c1270ac965ac4 +EBUILD telegram-desktop-2.8.11-r2.ebuild 4623 BLAKE2B 8726574359a9c4f222f10a676f27f2fa2e0870fefec15598393f6933b899a2bd3a71c5467a02ef021deb50ad468a50901a18a43199fe099a7b535e61c8e1ce84 SHA512 57a93a202b69851b37ddaf7a54e4ec8c02464eb297bf4716ec291e43bd58d84ee6749cf34222a3e494b9dc3b387b9f6b768aa020cbcb2408788073d087a8703c +EBUILD telegram-desktop-2.9.3.ebuild 4280 BLAKE2B 12525c38e8c2dc09fe79115576fc88ca4cc98a085ef06cd89f9924d680a287bfd3bc13d8dd68722e766e261ff26185ce349ebd2a3f76cb5a033d1fe5dbf5a603 SHA512 67367fe897db0914777063092d810540126a3366ac7f4ad86e36391aa65ec1944e54bbb6197a9c36dc832b6dcac18f56beea1ecc25fdfb2a9efc079f39952a33 +MISC metadata.xml 708 BLAKE2B 9aab7bce0728ac85db3d20f58d0f4360e01f133570d42145a43e2eb0b41e275888764fd7da0a749dd37ce72c6e0286f47be36c57adc6330e74a36308197fc202 SHA512 cad9265a882e0c9cda070cebdbcd5c6c096f2b7242772a1e9877eb0a4210a98768c8de75f197a1649e08f68010aa450d043a9decfaf976d90bf147458fbbb086 diff --git a/net-im/telegram-desktop/files/tdesktop-2.8.11-fix-build-without-pipewire.patch b/net-im/telegram-desktop/files/tdesktop-2.8.11-fix-build-without-pipewire.patch new file mode 100644 index 000000000000..ecfc63abeb58 --- /dev/null +++ b/net-im/telegram-desktop/files/tdesktop-2.8.11-fix-build-without-pipewire.patch @@ -0,0 +1,26 @@ +Fix build without pipewire + +set_allow_pipewire isn't available if WEBRTC_USE_PIPEWIRE isn't set + +--- tdesktop-2.8.11-full.orig/Telegram/ThirdParty/tgcalls/tgcalls/desktop_capturer/DesktopCaptureSourceHelper.cpp ++++ tdesktop-2.8.11-full/Telegram/ThirdParty/tgcalls/tgcalls/desktop_capturer/DesktopCaptureSourceHelper.cpp +@@ -286,7 +286,7 @@ + options.set_allow_use_magnification_api(false); + #elif defined WEBRTC_MAC + options.set_allow_iosurface(true); +-#elif defined WEBRTC_LINUX ++#elif defined WEBRTC_USE_PIPEWIRE + options.set_allow_pipewire(true); + #endif // WEBRTC_WIN || WEBRTC_MAC + +--- tdesktop-2.8.11-full.orig/Telegram/ThirdParty/tgcalls/tgcalls/desktop_capturer/DesktopCaptureSourceManager.cpp ++++ tdesktop-2.8.11-full/Telegram/ThirdParty/tgcalls/tgcalls/desktop_capturer/DesktopCaptureSourceManager.cpp +@@ -33,7 +33,7 @@ + result.set_allow_use_magnification_api(false); + #elif defined WEBRTC_MAC + result.set_allow_iosurface(type == DesktopCaptureType::Screen); +-#elif defined WEBRTC_LINUX ++#elif defined WEBRTC_USE_PIPEWIRE + result.set_allow_pipewire(true); + #endif // WEBRTC_WIN || WEBRTC_MAC + result.set_detect_updated_region(true); 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 deleted file mode 100644 index c76bcc06dfdb..000000000000 --- a/net-im/telegram-desktop/files/tdesktop-2.9.0-fix-disable-wayland-integration.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- 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/files/tdesktop-2.9.3-jemalloc-only-telegram.patch b/net-im/telegram-desktop/files/tdesktop-2.9.3-jemalloc-only-telegram.patch new file mode 100644 index 000000000000..f90270fccee3 --- /dev/null +++ b/net-im/telegram-desktop/files/tdesktop-2.9.3-jemalloc-only-telegram.patch @@ -0,0 +1,31 @@ +Only link jemalloc for the Telegram binary + +Some combination of factors is making the different codegen tools hang when +jemalloc is linked for those, and they're ran under portage's sandbox. Since +this is only used during build-time, and jemalloc is merely necessary to +improve runtime memory use, it's unnecessary to use it for anything else. + +--- tdesktop-2.9.3-full.orig/Telegram/CMakeLists.txt ++++ tdesktop-2.9.3-full/Telegram/CMakeLists.txt +@@ -1264,6 +1264,7 @@ + PRIVATE + desktop-app::external_glibmm + desktop-app::external_glib ++ desktop-app::external_jemalloc + ) + + if (NOT DESKTOP_APP_DISABLE_DBUS_INTEGRATION) +--- tdesktop-2.9.3-full.orig/cmake/options_linux.cmake ++++ tdesktop-2.9.3-full/cmake/options_linux.cmake +@@ -45,11 +45,6 @@ + endif() + endif() + +-target_link_libraries(common_options +-INTERFACE +- desktop-app::external_jemalloc +-) +- + if (DESKTOP_APP_USE_ALLOCATION_TRACER) + target_link_options(common_options + INTERFACE diff --git a/net-im/telegram-desktop/metadata.xml b/net-im/telegram-desktop/metadata.xml index bb15e2ab9e52..ffde9e742c69 100644 --- a/net-im/telegram-desktop/metadata.xml +++ b/net-im/telegram-desktop/metadata.xml @@ -12,5 +12,6 @@ Enable the app-text/aspell spell-checking backend Enable the app-text/hunspell spell-checking backend + Enable support for remote desktop and screen cast using media-video/pipewire 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 deleted file mode 100644 index 7987cc94ec85..000000000000 --- a/net-im/telegram-desktop/telegram-desktop-2.8.11-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..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-r2.ebuild b/net-im/telegram-desktop/telegram-desktop-2.8.11-r2.ebuild new file mode 100644 index 000000000000..940c5b1aed20 --- /dev/null +++ b/net-im/telegram-desktop/telegram-desktop-2.8.11-r2.ebuild @@ -0,0 +1,150 @@ +# 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 screencast +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[screencast=,X=] + 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" + "${FILESDIR}/tdesktop-2.8.11-fix-build-without-pipewire.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" + if ! use X && ! use screencast; then + elog "both the 'X' and 'screencast' useflags are disabled, screen sharing won't work!" + fi +} 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 deleted file mode 100644 index 7ed38b44c9db..000000000000 --- a/net-im/telegram-desktop/telegram-desktop-2.9.0-r1.ebuild +++ /dev/null @@ -1,140 +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:=[-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" -} diff --git a/net-im/telegram-desktop/telegram-desktop-2.9.3.ebuild b/net-im/telegram-desktop/telegram-desktop-2.9.3.ebuild new file mode 100644 index 000000000000..aa80c6771855 --- /dev/null +++ b/net-im/telegram-desktop/telegram-desktop-2.9.3.ebuild @@ -0,0 +1,143 @@ +# 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 screencast +spell wayland webkit +X" +REQUIRED_USE=" + spell? ( + ^^ ( enchant hunspell ) + ) + webkit? ( gtk ) + gtk? ( dbus ) +" +# Future: webkit doesn't depend on gtk anymore (version: >2.9.3) + +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[screencast=,X=] + 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.9.3-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 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" + if ! use X && ! use screencast; then + elog "both the 'X' and 'screencast' useflags are disabled, screen sharing won't work!" + fi +} -- cgit v1.2.3