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/
Date: Wed, 01 Sep 2021 16:32:10
Message-Id: 1630513907.a20fc4ba69f15b2d25edf7023da53e44b584f024.gyakovlev@gentoo
1 commit: a20fc4ba69f15b2d25edf7023da53e44b584f024
2 Author: Esteve Varela Colominas <esteve.varela <AT> gmail <DOT> com>
3 AuthorDate: Wed Sep 1 10:50:11 2021 +0000
4 Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
5 CommitDate: Wed Sep 1 16:31:47 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a20fc4ba
7
8 net-im/telegram-desktop: Bump to 3.0.0
9
10 Closes: https://github.com/gentoo/gentoo/pull/22177
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 | 1 +
15 .../telegram-desktop/telegram-desktop-3.0.0.ebuild | 142 +++++++++++++++++++++
16 2 files changed, 143 insertions(+)
17
18 diff --git a/net-im/telegram-desktop/Manifest b/net-im/telegram-desktop/Manifest
19 index 19aaf880f2c..a990aaa57a5 100644
20 --- a/net-im/telegram-desktop/Manifest
21 +++ b/net-im/telegram-desktop/Manifest
22 @@ -1,2 +1,3 @@
23 DIST tdesktop-2.8.11-full.tar.gz 37105468 BLAKE2B 1ec5a0003bd1b948b45213509fa0649dfde5ec8e3dff097bf45aa0951c7963930788b0bee853f286d04b008b78704c464b6614b8391350767affebc2623b25af SHA512 a553313b04fbb562745be2381a84117657172952e46e280980a73c9fcfe2a7cf29c0e012e4b1259816d1e6652418e7a1ddfc4e394544fcc3aeb33704cbe80860
24 DIST tdesktop-2.9.3-full.tar.gz 37335782 BLAKE2B 197583ba6568c455218c51f590c1ba1a3f10c390caa4fd03657098f499ce113a4f5f57ca9dd53bc4baba31992d4229768ed35e68ad6b0685010bc335817edcac SHA512 810cfac5d7e6ce9413b1b2406927e89c1383ea5b725233a68b2cb29dd374b4c3386c22186640afde4492c844516c88889a5db8e5b167a09d6d6c1270ac965ac4
25 +DIST tdesktop-3.0.0-full.tar.gz 37531734 BLAKE2B 0def1fe0b34cde30c7b2a0afb3b6cc10cd44a64a5145fee4ff44e1b507c11cebd6b8752bd5c3b6a23798ef0755e26630813c65092e2793efd3ea95a987195738 SHA512 2439de9e11fa6150f4306a0da79a20b1552e4432cf669764669e4bf2eca7311b031e8b22c23cde1efe640e1ef2ac71916fd7151d31b475cbaabc78d79ee50415
26
27 diff --git a/net-im/telegram-desktop/telegram-desktop-3.0.0.ebuild b/net-im/telegram-desktop/telegram-desktop-3.0.0.ebuild
28 new file mode 100644
29 index 00000000000..4c3ae78f28d
30 --- /dev/null
31 +++ b/net-im/telegram-desktop/telegram-desktop-3.0.0.ebuild
32 @@ -0,0 +1,142 @@
33 +# Copyright 2020-2021 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=7
37 +
38 +PYTHON_COMPAT=( python3_{7..10} )
39 +
40 +inherit xdg cmake python-any-r1 flag-o-matic
41 +
42 +DESCRIPTION="Official desktop client for Telegram"
43 +HOMEPAGE="https://desktop.telegram.org"
44 +
45 +MY_P="tdesktop-${PV}-full"
46 +SRC_URI="https://github.com/telegramdesktop/tdesktop/releases/download/v${PV}/${MY_P}.tar.gz"
47 +
48 +LICENSE="BSD GPL-3-with-openssl-exception LGPL-2+"
49 +SLOT="0"
50 +KEYWORDS="~amd64 ~ppc64"
51 +IUSE="+dbus enchant +gtk +hunspell screencast +spell wayland webkit +X"
52 +REQUIRED_USE="
53 + spell? (
54 + ^^ ( enchant hunspell )
55 + )
56 + gtk? ( dbus )
57 + webkit? ( dbus )
58 +"
59 +
60 +RDEPEND="
61 + !net-im/telegram-desktop-bin
62 + app-arch/lz4:=
63 + dev-cpp/glibmm:2
64 + dev-libs/jemalloc:=[-lazy-lock]
65 + dev-libs/xxhash
66 + >=dev-qt/qtcore-5.15:5
67 + >=dev-qt/qtgui-5.15:5[dbus?,jpeg,png,wayland?,X?]
68 + >=dev-qt/qtimageformats-5.15:5
69 + >=dev-qt/qtnetwork-5.15:5[ssl]
70 + >=dev-qt/qtsvg-5.15:5
71 + >=dev-qt/qtwidgets-5.15:5[png,X?]
72 + media-fonts/open-sans
73 + media-libs/fontconfig:=
74 + ~media-libs/libtgvoip-2.4.4_p20210302
75 + >=media-libs/libtgvoip-2.4.4_p20210302-r2
76 + media-libs/openal
77 + media-libs/opus:=
78 + media-libs/rnnoise
79 + ~media-libs/tg_owt-0_pre20210626[screencast=,X=]
80 + media-video/ffmpeg:=[opus]
81 + sys-libs/zlib:=[minizip]
82 + dbus? (
83 + dev-qt/qtdbus:5
84 + dev-libs/libdbusmenu-qt[qt5(+)]
85 + )
86 + enchant? ( app-text/enchant:= )
87 + gtk? ( x11-libs/gtk+:3[X?,wayland?] )
88 + hunspell? ( >=app-text/hunspell-1.7:= )
89 + wayland? ( kde-frameworks/kwayland:= )
90 + webkit? ( net-libs/webkit-gtk:= )
91 + X? ( x11-libs/libxcb:= )
92 +"
93 +DEPEND="${RDEPEND}
94 + dev-cpp/range-v3
95 + =dev-cpp/ms-gsl-3*
96 +"
97 +BDEPEND="
98 + ${PYTHON_DEPS}
99 + >=dev-util/cmake-3.16
100 + virtual/pkgconfig
101 +"
102 +
103 +S="${WORKDIR}/${MY_P}"
104 +
105 +PATCHES=(
106 + "${FILESDIR}/tdesktop-2.9.3-jemalloc-only-telegram.patch"
107 +)
108 +
109 +pkg_pretend() {
110 + if has ccache ${FEATURES}; then
111 + ewarn
112 + ewarn "ccache does not work with ${PN} out of the box"
113 + ewarn "due to usage of precompiled headers"
114 + ewarn "check bug https://bugs.gentoo.org/715114 for more info"
115 + ewarn
116 + fi
117 +}
118 +
119 +src_prepare() {
120 + # no explicit toggle, doesn't build with the system one #752417
121 + sed -i 's/DESKTOP_APP_USE_PACKAGED/NO_ONE_WILL_EVER_SET_THIS/' \
122 + cmake/external/rlottie/CMakeLists.txt || die
123 +
124 + cmake_src_prepare
125 +}
126 +
127 +src_configure() {
128 + # gtk is really needed for image copy-paste due to https://bugreports.qt.io/browse/QTBUG-56595
129 + local mycmakeargs=(
130 + -DTDESKTOP_LAUNCHER_BASENAME="${PN}"
131 + -DCMAKE_DISABLE_FIND_PACKAGE_tl-expected=ON # header only lib, some git version. prevents warnings.
132 +
133 + -DDESKTOP_APP_DISABLE_X11_INTEGRATION=$(usex X no yes)
134 + -DDESKTOP_APP_DISABLE_WAYLAND_INTEGRATION=$(usex wayland no yes)
135 + -DDESKTOP_APP_DISABLE_DBUS_INTEGRATION=$(usex dbus no yes)
136 + -DDESKTOP_APP_DISABLE_GTK_INTEGRATION=$(usex gtk no yes)
137 + -DDESKTOP_APP_DISABLE_WEBKITGTK=$(usex webkit no yes)
138 + -DDESKTOP_APP_DISABLE_SPELLCHECK=$(usex spell no yes) # enables hunspell (recommended)
139 + -DDESKTOP_APP_USE_ENCHANT=$(usex enchant) # enables enchant and disables hunspell
140 + )
141 +
142 + if [[ -n ${MY_TDESKTOP_API_ID} && -n ${MY_TDESKTOP_API_HASH} ]]; then
143 + einfo "Found custom API credentials"
144 + mycmakeargs+=(
145 + -DTDESKTOP_API_ID="${MY_TDESKTOP_API_ID}"
146 + -DTDESKTOP_API_HASH="${MY_TDESKTOP_API_HASH}"
147 + )
148 + else
149 + # https://github.com/telegramdesktop/tdesktop/blob/dev/snap/snapcraft.yaml
150 + # Building with snapcraft API credentials by default
151 + # Custom API credentials can be obtained here:
152 + # https://github.com/telegramdesktop/tdesktop/blob/dev/docs/api_credentials.md
153 + # After getting credentials you can export variables:
154 + # export MY_TDESKTOP_API_ID="17349""
155 + # export MY_TDESKTOP_API_HASH="344583e45741c457fe1862106095a5eb"
156 + # and restart the build"
157 + # you can set above variables (without export) in /etc/portage/env/net-im/telegram-desktop
158 + # portage will use custom variable every build automatically
159 + mycmakeargs+=(
160 + -DTDESKTOP_API_ID="611335"
161 + -DTDESKTOP_API_HASH="d524b414d21f4d37f08684c1df41ac9c"
162 + )
163 + fi
164 +
165 + cmake_src_configure
166 +}
167 +
168 +pkg_postinst() {
169 + xdg_pkg_postinst
170 + use gtk || elog "enable the 'gtk' useflag if you have image copy-paste problems"
171 + if ! use X && ! use screencast; then
172 + elog "both the 'X' and 'screencast' useflags are disabled, screen sharing won't work!"
173 + fi
174 +}