1 |
commit: f54e597c8b62c21a2e1fc1df07a425872b78383b |
2 |
Author: Esteve Varela Colominas <esteve.varela <AT> gmail <DOT> com> |
3 |
AuthorDate: Wed Apr 28 12:42:46 2021 +0000 |
4 |
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon May 3 17:01:38 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f54e597c |
7 |
|
8 |
net-im/telegram-desktop: bump to 2.7.4 |
9 |
|
10 |
Also removed now-defunct alsa/pulseaudio dependencies. Telegram uses |
11 |
openal these days. |
12 |
|
13 |
Signed-off-by: Esteve Varela Colominas <esteve.varela <AT> gmail.com> |
14 |
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org> |
15 |
|
16 |
net-im/telegram-desktop/Manifest | 1 + |
17 |
.../tdesktop-2.7.3-disable-webkit-separately.patch | 80 ++++++++++++ |
18 |
.../tdesktop-2.7.3-webview-include-gdkx.patch | 12 ++ |
19 |
.../telegram-desktop/telegram-desktop-2.7.4.ebuild | 135 +++++++++++++++++++++ |
20 |
4 files changed, 228 insertions(+) |
21 |
|
22 |
diff --git a/net-im/telegram-desktop/Manifest b/net-im/telegram-desktop/Manifest |
23 |
index 9e1071af1e4..5e50ddbe47e 100644 |
24 |
--- a/net-im/telegram-desktop/Manifest |
25 |
+++ b/net-im/telegram-desktop/Manifest |
26 |
@@ -1 +1,2 @@ |
27 |
DIST tdesktop-2.7.1-full.tar.gz 36770178 BLAKE2B 21379cc970da07725e7a46d18a4f0bc459b1da1b730587595448b8f78133ce701e374e7faefc649a973342c203eee510872b5a4ed2ff6be92daec25157e400a4 SHA512 dffd184c4369c5c5947b1ca085add533e54313ce39aebcdca4f0958431a305aa5e95c2f2b48592f6992e666b2d33eeba5697f9e09f6048a53b807f2950fbd17b |
28 |
+DIST tdesktop-2.7.4-full.tar.gz 36894673 BLAKE2B e04749fb0168f8bae69a9ad85c5bff315faf0b355ff5f3a85a34ee36e3305c6b550553284d5179aff9283bbd1a94f9ec3c41e293d0ad8c86e4d08283189e42b3 SHA512 0a796d7a8c5e5982bc60f19c41da53996a609bf794fad224e7beea5fc3816b5cf35f16b0ec2cc7279085c69996063a44085f48e1596dfe746d260a2e8f1b2d14 |
29 |
|
30 |
diff --git a/net-im/telegram-desktop/files/tdesktop-2.7.3-disable-webkit-separately.patch b/net-im/telegram-desktop/files/tdesktop-2.7.3-disable-webkit-separately.patch |
31 |
new file mode 100644 |
32 |
index 00000000000..a143071401a |
33 |
--- /dev/null |
34 |
+++ b/net-im/telegram-desktop/files/tdesktop-2.7.3-disable-webkit-separately.patch |
35 |
@@ -0,0 +1,80 @@ |
36 |
+Index: tdesktop-2.7.3-full/Telegram/lib_webview/CMakeLists.txt |
37 |
+=================================================================== |
38 |
+--- tdesktop-2.7.3-full.orig/Telegram/lib_webview/CMakeLists.txt |
39 |
++++ tdesktop-2.7.3-full/Telegram/lib_webview/CMakeLists.txt |
40 |
+@@ -116,7 +116,7 @@ if (WIN32) |
41 |
+ desktop-app::lib_webview_winrt |
42 |
+ ) |
43 |
+ elseif (LINUX) |
44 |
+- if (NOT DESKTOP_APP_DISABLE_GTK_INTEGRATION) |
45 |
++ if (NOT DESKTOP_APP_DISABLE_WEBKIT_INTEGRATION) |
46 |
+ find_package(PkgConfig REQUIRED) |
47 |
+ |
48 |
+ if (DESKTOP_APP_USE_PACKAGED AND NOT DESKTOP_APP_USE_PACKAGED_LAZY) |
49 |
+Index: tdesktop-2.7.3-full/Telegram/lib_webview/webview/platform/linux/webview_linux.cpp |
50 |
+=================================================================== |
51 |
+--- tdesktop-2.7.3-full.orig/Telegram/lib_webview/webview/platform/linux/webview_linux.cpp |
52 |
++++ tdesktop-2.7.3-full/Telegram/lib_webview/webview/platform/linux/webview_linux.cpp |
53 |
+@@ -11,14 +11,14 @@ |
54 |
+ namespace Webview { |
55 |
+ |
56 |
+ Available Availability() { |
57 |
+-#ifndef DESKTOP_APP_DISABLE_GTK_INTEGRATION |
58 |
++#ifndef DESKTOP_APP_DISABLE_WEBKIT_INTEGRATION |
59 |
+ return WebKit2Gtk::Availability(); |
60 |
+-#else // !DESKTOP_APP_DISABLE_GTK_INTEGRATION |
61 |
++#else // !DESKTOP_APP_DISABLE_WEBKIT_INTEGRATION |
62 |
+ return Available{ |
63 |
+ .error = Available::Error::NoGtkOrWebkit2Gtk, |
64 |
+ .details = "This feature was disabled at build time.", |
65 |
+ }; |
66 |
+-#endif // DESKTOP_APP_DISABLE_GTK_INTEGRATION |
67 |
++#endif // DESKTOP_APP_DISABLE_WEBKIT_INTEGRATION |
68 |
+ } |
69 |
+ |
70 |
+ bool SupportsEmbedAfterCreate() { |
71 |
+@@ -26,11 +26,11 @@ bool SupportsEmbedAfterCreate() { |
72 |
+ } |
73 |
+ |
74 |
+ std::unique_ptr<Interface> CreateInstance(Config config) { |
75 |
+-#ifndef DESKTOP_APP_DISABLE_GTK_INTEGRATION |
76 |
++#ifndef DESKTOP_APP_DISABLE_WEBKIT_INTEGRATION |
77 |
+ return WebKit2Gtk::CreateInstance(std::move(config)); |
78 |
+-#else // !DESKTOP_APP_DISABLE_GTK_INTEGRATION |
79 |
++#else // !DESKTOP_APP_DISABLE_WEBKIT_INTEGRATION |
80 |
+ return nullptr; |
81 |
+-#endif // DESKTOP_APP_DISABLE_GTK_INTEGRATION |
82 |
++#endif // DESKTOP_APP_DISABLE_WEBKIT_INTEGRATION |
83 |
+ } |
84 |
+ |
85 |
+ } // namespace Webview |
86 |
+Index: tdesktop-2.7.3-full/cmake/options.cmake |
87 |
+=================================================================== |
88 |
+--- tdesktop-2.7.3-full.orig/cmake/options.cmake |
89 |
++++ tdesktop-2.7.3-full/cmake/options.cmake |
90 |
+@@ -49,6 +49,13 @@ if (DESKTOP_APP_DISABLE_GTK_INTEGRATION) |
91 |
+ ) |
92 |
+ endif() |
93 |
+ |
94 |
++if (DESKTOP_APP_DISABLE_WEBKIT_INTEGRATION) |
95 |
++ target_compile_definitions(common_options |
96 |
++ INTERFACE |
97 |
++ DESKTOP_APP_DISABLE_WEBKIT_INTEGRATION |
98 |
++ ) |
99 |
++endif() |
100 |
++ |
101 |
+ if (DESKTOP_APP_USE_PACKAGED) |
102 |
+ target_compile_definitions(common_options |
103 |
+ INTERFACE |
104 |
+Index: tdesktop-2.7.3-full/cmake/variables.cmake |
105 |
+=================================================================== |
106 |
+--- tdesktop-2.7.3-full.orig/cmake/variables.cmake |
107 |
++++ tdesktop-2.7.3-full/cmake/variables.cmake |
108 |
+@@ -32,6 +32,7 @@ option(DESKTOP_APP_DISABLE_DBUS_INTEGRAT |
109 |
+ option(DESKTOP_APP_DISABLE_X11_INTEGRATION "Disable all code for X11 integration (Linux only)." OFF) |
110 |
+ option(DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION "Disable all code for Wayland integration (Linux only)." OFF) |
111 |
+ option(DESKTOP_APP_DISABLE_GTK_INTEGRATION "Disable all code for GTK integration (Linux only)." OFF) |
112 |
++option(DESKTOP_APP_DISABLE_WEBKIT_INTEGRATION "Disable all code for WebkitGTK integration (Linux only)." OFF) |
113 |
+ option(DESKTOP_APP_USE_GLIBC_WRAPS "Use wraps for new GLIBC features." OFF) |
114 |
+ option(DESKTOP_APP_USE_PACKAGED "Find libraries using CMake instead of exact paths." ${no_special_target}) |
115 |
+ option(DESKTOP_APP_USE_PACKAGED_LAZY "Bundle recommended Qt plugins for self-contained packages. (Linux only)" OFF) |
116 |
|
117 |
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 |
118 |
new file mode 100644 |
119 |
index 00000000000..2f06bda3272 |
120 |
--- /dev/null |
121 |
+++ b/net-im/telegram-desktop/files/tdesktop-2.7.3-webview-include-gdkx.patch |
122 |
@@ -0,0 +1,12 @@ |
123 |
+Index: tdesktop-2.7.3-full/Telegram/lib_webview/webview/platform/linux/webview_linux_webkit_gtk.h |
124 |
+=================================================================== |
125 |
+--- tdesktop-2.7.3-full.orig/Telegram/lib_webview/webview/platform/linux/webview_linux_webkit_gtk.h |
126 |
++++ tdesktop-2.7.3-full/Telegram/lib_webview/webview/platform/linux/webview_linux_webkit_gtk.h |
127 |
+@@ -12,6 +12,7 @@ extern "C" { |
128 |
+ #undef signals |
129 |
+ #include <JavaScriptCore/JavaScript.h> |
130 |
+ #include <gtk/gtk.h> |
131 |
++#include <gdk/gdkx.h> |
132 |
+ #include <webkit2/webkit2.h> |
133 |
+ #include <X11/Xlib.h> |
134 |
+ #define signals public |
135 |
|
136 |
diff --git a/net-im/telegram-desktop/telegram-desktop-2.7.4.ebuild b/net-im/telegram-desktop/telegram-desktop-2.7.4.ebuild |
137 |
new file mode 100644 |
138 |
index 00000000000..63ffd479879 |
139 |
--- /dev/null |
140 |
+++ b/net-im/telegram-desktop/telegram-desktop-2.7.4.ebuild |
141 |
@@ -0,0 +1,135 @@ |
142 |
+# Copyright 2020-2021 Gentoo Authors |
143 |
+# Distributed under the terms of the GNU General Public License v2 |
144 |
+ |
145 |
+EAPI=7 |
146 |
+ |
147 |
+PYTHON_COMPAT=( python3_{7,8,9} ) |
148 |
+ |
149 |
+inherit xdg cmake python-any-r1 flag-o-matic |
150 |
+ |
151 |
+MY_P="tdesktop-${PV}-full" |
152 |
+ |
153 |
+DESCRIPTION="Official desktop client for Telegram" |
154 |
+HOMEPAGE="https://desktop.telegram.org" |
155 |
+SRC_URI="https://github.com/telegramdesktop/tdesktop/releases/download/v${PV}/${MY_P}.tar.gz" |
156 |
+ |
157 |
+LICENSE="BSD GPL-3-with-openssl-exception LGPL-2+" |
158 |
+SLOT="0" |
159 |
+KEYWORDS="~amd64 ~ppc64" |
160 |
+IUSE="+dbus enchant +gtk +hunspell +spell wayland webkit +X" |
161 |
+ |
162 |
+RDEPEND=" |
163 |
+ !net-im/telegram-desktop-bin |
164 |
+ app-arch/lz4:= |
165 |
+ dev-cpp/glibmm:2 |
166 |
+ dev-libs/xxhash |
167 |
+ dev-qt/qtcore:5 |
168 |
+ dev-qt/qtgui:5[dbus?,jpeg,png,wayland?,X(-)?] |
169 |
+ dev-qt/qtimageformats:5 |
170 |
+ dev-qt/qtnetwork:5[ssl] |
171 |
+ dev-qt/qtsvg:5 |
172 |
+ dev-qt/qtwidgets:5[png,X(-)?] |
173 |
+ media-fonts/open-sans |
174 |
+ media-libs/fontconfig:= |
175 |
+ media-libs/opus:= |
176 |
+ ~media-libs/libtgvoip-2.4.4_p20210302 |
177 |
+ media-libs/openal |
178 |
+ ~media-libs/tg_owt-0_pre20210422 |
179 |
+ media-video/ffmpeg:=[opus] |
180 |
+ sys-libs/zlib:=[minizip] |
181 |
+ dbus? ( |
182 |
+ dev-qt/qtdbus:5 |
183 |
+ dev-libs/libdbusmenu-qt[qt5(+)] |
184 |
+ ) |
185 |
+ enchant? ( app-text/enchant:= ) |
186 |
+ gtk? ( x11-libs/gtk+:3[X?] ) |
187 |
+ hunspell? ( >=app-text/hunspell-1.7:= ) |
188 |
+ wayland? ( kde-frameworks/kwayland:= ) |
189 |
+ webkit? ( net-libs/webkit-gtk:= ) |
190 |
+ X? ( x11-libs/libxcb:= ) |
191 |
+" |
192 |
+DEPEND="${RDEPEND} |
193 |
+ dev-cpp/range-v3 |
194 |
+ =dev-cpp/ms-gsl-3* |
195 |
+" |
196 |
+BDEPEND=" |
197 |
+ ${PYTHON_DEPS} |
198 |
+ >=dev-util/cmake-3.16 |
199 |
+ virtual/pkgconfig |
200 |
+" |
201 |
+REQUIRED_USE=" |
202 |
+ spell? ( |
203 |
+ ^^ ( enchant hunspell ) |
204 |
+ ) |
205 |
+" |
206 |
+ |
207 |
+S="${WORKDIR}/${MY_P}" |
208 |
+ |
209 |
+PATCHES=( |
210 |
+ "${FILESDIR}/tdesktop-2.7.3-disable-webkit-separately.patch" |
211 |
+ "${FILESDIR}/tdesktop-2.7.3-webview-include-gdkx.patch" |
212 |
+) |
213 |
+ |
214 |
+pkg_pretend() { |
215 |
+ if has ccache ${FEATURES}; then |
216 |
+ ewarn |
217 |
+ ewarn "ccache does not work with ${PN} out of the box" |
218 |
+ ewarn "due to usage of precompiled headers" |
219 |
+ ewarn "check bug https://bugs.gentoo.org/715114 for more info" |
220 |
+ ewarn |
221 |
+ fi |
222 |
+} |
223 |
+ |
224 |
+src_prepare() { |
225 |
+ # no explicit toggle, doesn't build with the system one #752417 |
226 |
+ sed -i 's/DESKTOP_APP_USE_PACKAGED/NO_ONE_WILL_EVER_SET_THIS/' \ |
227 |
+ cmake/external/rlottie/CMakeLists.txt || die |
228 |
+ |
229 |
+ cmake_src_prepare |
230 |
+} |
231 |
+ |
232 |
+src_configure() { |
233 |
+ # gtk is really needed for image copy-paste due to https://bugreports.qt.io/browse/QTBUG-56595 |
234 |
+ local mycmakeargs=( |
235 |
+ -DTDESKTOP_LAUNCHER_BASENAME="${PN}" |
236 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_tl-expected=ON # header only lib, some git version. prevents warnings. |
237 |
+ |
238 |
+ -DDESKTOP_APP_DISABLE_X11_INTEGRATION=$(usex X OFF ON) |
239 |
+ -DDESKTOP_APP_DISABLE_WAYLAND_INTEGRATION=$(usex wayland OFF ON) |
240 |
+ -DDESKTOP_APP_DISABLE_DBUS_INTEGRATION=$(usex dbus OFF ON) |
241 |
+ -DDESKTOP_APP_DISABLE_GTK_INTEGRATION=$(usex gtk OFF ON) |
242 |
+ -DDESKTOP_APP_DISABLE_WEBKIT_INTEGRATION=$(usex webkit OFF ON) |
243 |
+ -DDESKTOP_APP_DISABLE_SPELLCHECK=$(usex spell OFF ON) # enables hunspell (recommended) |
244 |
+ -DDESKTOP_APP_USE_ENCHANT=$(usex enchant ON OFF) # enables enchant and disables hunspell |
245 |
+ ) |
246 |
+ |
247 |
+ if [[ -n ${MY_TDESKTOP_API_ID} && -n ${MY_TDESKTOP_API_HASH} ]]; then |
248 |
+ einfo "Found custom API credentials" |
249 |
+ mycmakeargs+=( |
250 |
+ -DTDESKTOP_API_ID="${MY_TDESKTOP_API_ID}" |
251 |
+ -DTDESKTOP_API_HASH="${MY_TDESKTOP_API_HASH}" |
252 |
+ ) |
253 |
+ else |
254 |
+ # https://github.com/telegramdesktop/tdesktop/blob/dev/snap/snapcraft.yaml |
255 |
+ # Building with snapcraft API credentials by default |
256 |
+ # Custom API credentials can be obtained here: |
257 |
+ # https://github.com/telegramdesktop/tdesktop/blob/dev/docs/api_credentials.md |
258 |
+ # After getting credentials you can export variables: |
259 |
+ # export MY_TDESKTOP_API_ID="17349"" |
260 |
+ # export MY_TDESKTOP_API_HASH="344583e45741c457fe1862106095a5eb" |
261 |
+ # and restart the build" |
262 |
+ # you can set above variables (without export) in /etc/portage/env/net-im/telegram-desktop |
263 |
+ # portage will use custom variable every build automatically |
264 |
+ mycmakeargs+=( |
265 |
+ -DTDESKTOP_API_ID="611335" |
266 |
+ -DTDESKTOP_API_HASH="d524b414d21f4d37f08684c1df41ac9c" |
267 |
+ ) |
268 |
+ fi |
269 |
+ |
270 |
+ cmake_src_configure |
271 |
+} |
272 |
+ |
273 |
+pkg_postinst() { |
274 |
+ xdg_pkg_postinst |
275 |
+ use gtk || elog "enable 'gtk' useflag if you have image copy-paste problems" |
276 |
+} |