Gentoo Archives: gentoo-commits

From: Georgy Yakovlev <gyakovlev@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-im/telegram-desktop/, net-im/telegram-desktop/files/
Date: Sat, 12 Jun 2021 22:49:21
Message-Id: 1623538120.9211d19aab7f33d7fff393be4c4e9e1286cb3550.gyakovlev@gentoo
1 commit: 9211d19aab7f33d7fff393be4c4e9e1286cb3550
2 Author: Esteve Varela Colominas <esteve.varela <AT> gmail <DOT> com>
3 AuthorDate: Sat Jun 12 16:45:32 2021 +0000
4 Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
5 CommitDate: Sat Jun 12 22:48:40 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9211d19a
7
8 net-im/telegram-desktop: Require USE=gtk for USE=webkit
9
10 No sense in leaving out the "gtk" in "webkit-gtk", even though the
11 current build error can be patched around.
12
13 Also synced the patch with the pull request, which is a simple rename,
14 no revbump necessary.
15
16 Signed-off-by: Esteve Varela Colominas <esteve.varela <AT> gmail.com>
17 Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
18
19 .../tdesktop-2.7.3-disable-webkit-separately.patch | 72 ----------------------
20 .../tdesktop-2.7.4-disable-webkit-separately.patch | 72 ++++++++++++++++++++++
21 .../telegram-desktop-2.7.4-r1.ebuild | 5 +-
22 3 files changed, 75 insertions(+), 74 deletions(-)
23
24 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
25 deleted file mode 100644
26 index 8e56d10f0de..00000000000
27 --- a/net-im/telegram-desktop/files/tdesktop-2.7.3-disable-webkit-separately.patch
28 +++ /dev/null
29 @@ -1,72 +0,0 @@
30 ---- tdesktop-2.7.3-full.orig/Telegram/lib_webview/CMakeLists.txt
31 -+++ tdesktop-2.7.3-full/Telegram/lib_webview/CMakeLists.txt
32 -@@ -116,7 +116,7 @@ if (WIN32)
33 - desktop-app::lib_webview_winrt
34 - )
35 - elseif (LINUX)
36 -- if (NOT DESKTOP_APP_DISABLE_GTK_INTEGRATION)
37 -+ if (NOT DESKTOP_APP_DISABLE_WEBKIT_INTEGRATION)
38 - find_package(PkgConfig REQUIRED)
39 -
40 - if (DESKTOP_APP_USE_PACKAGED AND NOT DESKTOP_APP_USE_PACKAGED_LAZY)
41 ---- tdesktop-2.7.3-full.orig/Telegram/lib_webview/webview/platform/linux/webview_linux.cpp
42 -+++ tdesktop-2.7.3-full/Telegram/lib_webview/webview/platform/linux/webview_linux.cpp
43 -@@ -11,14 +11,14 @@
44 - namespace Webview {
45 -
46 - Available Availability() {
47 --#ifndef DESKTOP_APP_DISABLE_GTK_INTEGRATION
48 -+#ifndef DESKTOP_APP_DISABLE_WEBKIT_INTEGRATION
49 - return WebKit2Gtk::Availability();
50 --#else // !DESKTOP_APP_DISABLE_GTK_INTEGRATION
51 -+#else // !DESKTOP_APP_DISABLE_WEBKIT_INTEGRATION
52 - return Available{
53 - .error = Available::Error::NoGtkOrWebkit2Gtk,
54 - .details = "This feature was disabled at build time.",
55 - };
56 --#endif // DESKTOP_APP_DISABLE_GTK_INTEGRATION
57 -+#endif // DESKTOP_APP_DISABLE_WEBKIT_INTEGRATION
58 - }
59 -
60 - bool SupportsEmbedAfterCreate() {
61 -@@ -26,11 +26,11 @@ bool SupportsEmbedAfterCreate() {
62 - }
63 -
64 - std::unique_ptr<Interface> CreateInstance(Config config) {
65 --#ifndef DESKTOP_APP_DISABLE_GTK_INTEGRATION
66 -+#ifndef DESKTOP_APP_DISABLE_WEBKIT_INTEGRATION
67 - return WebKit2Gtk::CreateInstance(std::move(config));
68 --#else // !DESKTOP_APP_DISABLE_GTK_INTEGRATION
69 -+#else // !DESKTOP_APP_DISABLE_WEBKIT_INTEGRATION
70 - return nullptr;
71 --#endif // DESKTOP_APP_DISABLE_GTK_INTEGRATION
72 -+#endif // DESKTOP_APP_DISABLE_WEBKIT_INTEGRATION
73 - }
74 -
75 - } // namespace Webview
76 ---- tdesktop-2.7.3-full.orig/cmake/options.cmake
77 -+++ tdesktop-2.7.3-full/cmake/options.cmake
78 -@@ -49,6 +49,13 @@ if (DESKTOP_APP_DISABLE_GTK_INTEGRATION)
79 - )
80 - endif()
81 -
82 -+if (DESKTOP_APP_DISABLE_WEBKIT_INTEGRATION)
83 -+ target_compile_definitions(common_options
84 -+ INTERFACE
85 -+ DESKTOP_APP_DISABLE_WEBKIT_INTEGRATION
86 -+ )
87 -+endif()
88 -+
89 - if (DESKTOP_APP_USE_PACKAGED)
90 - target_compile_definitions(common_options
91 - INTERFACE
92 ---- tdesktop-2.7.3-full.orig/cmake/variables.cmake
93 -+++ tdesktop-2.7.3-full/cmake/variables.cmake
94 -@@ -32,6 +32,7 @@ option(DESKTOP_APP_DISABLE_DBUS_INTEGRAT
95 - option(DESKTOP_APP_DISABLE_X11_INTEGRATION "Disable all code for X11 integration (Linux only)." OFF)
96 - option(DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION "Disable all code for Wayland integration (Linux only)." OFF)
97 - option(DESKTOP_APP_DISABLE_GTK_INTEGRATION "Disable all code for GTK integration (Linux only)." OFF)
98 -+option(DESKTOP_APP_DISABLE_WEBKIT_INTEGRATION "Disable all code for WebkitGTK integration (Linux only)." OFF)
99 - option(DESKTOP_APP_USE_GLIBC_WRAPS "Use wraps for new GLIBC features." OFF)
100 - option(DESKTOP_APP_USE_PACKAGED "Find libraries using CMake instead of exact paths." ${no_special_target})
101 - option(DESKTOP_APP_USE_PACKAGED_LAZY "Bundle recommended Qt plugins for self-contained packages. (Linux only)" OFF)
102
103 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
104 new file mode 100644
105 index 00000000000..e54aca2ffa0
106 --- /dev/null
107 +++ b/net-im/telegram-desktop/files/tdesktop-2.7.4-disable-webkit-separately.patch
108 @@ -0,0 +1,72 @@
109 +--- tdesktop-2.7.4-full.orig/Telegram/lib_webview/CMakeLists.txt
110 ++++ tdesktop-2.7.4-full/Telegram/lib_webview/CMakeLists.txt
111 +@@ -116,7 +116,7 @@
112 + desktop-app::lib_webview_winrt
113 + )
114 + elseif (LINUX)
115 +- if (NOT DESKTOP_APP_DISABLE_GTK_INTEGRATION)
116 ++ if (NOT DESKTOP_APP_DISABLE_WEBKIT)
117 + find_package(PkgConfig REQUIRED)
118 +
119 + if (DESKTOP_APP_USE_PACKAGED AND NOT DESKTOP_APP_USE_PACKAGED_LAZY)
120 +--- tdesktop-2.7.4-full.orig/Telegram/lib_webview/webview/platform/linux/webview_linux.cpp
121 ++++ tdesktop-2.7.4-full/Telegram/lib_webview/webview/platform/linux/webview_linux.cpp
122 +@@ -11,14 +11,14 @@
123 + namespace Webview {
124 +
125 + Available Availability() {
126 +-#ifndef DESKTOP_APP_DISABLE_GTK_INTEGRATION
127 ++#ifndef DESKTOP_APP_DISABLE_WEBKIT
128 + return WebKit2Gtk::Availability();
129 +-#else // !DESKTOP_APP_DISABLE_GTK_INTEGRATION
130 ++#else // !DESKTOP_APP_DISABLE_WEBKIT
131 + return Available{
132 + .error = Available::Error::NoGtkOrWebkit2Gtk,
133 + .details = "This feature was disabled at build time.",
134 + };
135 +-#endif // DESKTOP_APP_DISABLE_GTK_INTEGRATION
136 ++#endif // DESKTOP_APP_DISABLE_WEBKIT
137 + }
138 +
139 + bool SupportsEmbedAfterCreate() {
140 +@@ -26,11 +26,11 @@
141 + }
142 +
143 + std::unique_ptr<Interface> CreateInstance(Config config) {
144 +-#ifndef DESKTOP_APP_DISABLE_GTK_INTEGRATION
145 ++#ifndef DESKTOP_APP_DISABLE_WEBKIT
146 + return WebKit2Gtk::CreateInstance(std::move(config));
147 +-#else // !DESKTOP_APP_DISABLE_GTK_INTEGRATION
148 ++#else // !DESKTOP_APP_DISABLE_WEBKIT
149 + return nullptr;
150 +-#endif // DESKTOP_APP_DISABLE_GTK_INTEGRATION
151 ++#endif // DESKTOP_APP_DISABLE_WEBKIT
152 + }
153 +
154 + } // namespace Webview
155 +--- tdesktop-2.7.4-full.orig/cmake/options.cmake
156 ++++ tdesktop-2.7.4-full/cmake/options.cmake
157 +@@ -49,6 +49,13 @@
158 + )
159 + endif()
160 +
161 ++if (DESKTOP_APP_DISABLE_WEBKIT)
162 ++ target_compile_definitions(common_options
163 ++ INTERFACE
164 ++ DESKTOP_APP_DISABLE_WEBKIT
165 ++ )
166 ++endif()
167 ++
168 + if (DESKTOP_APP_USE_PACKAGED)
169 + target_compile_definitions(common_options
170 + INTERFACE
171 +--- tdesktop-2.7.4-full.orig/cmake/variables.cmake
172 ++++ tdesktop-2.7.4-full/cmake/variables.cmake
173 +@@ -38,6 +38,7 @@
174 + option(DESKTOP_APP_USE_PACKAGED_LAZY_PLATFORMTHEMES "Bundle recommended Qt platform themes for self-contained packages. (Linux only)" ${DESKTOP_APP_USE_PACKAGED_LAZY})
175 + option(DESKTOP_APP_USE_PACKAGED_FFMPEG_STATIC "Link ffmpeg statically in packaged mode." OFF)
176 + option(DESKTOP_APP_DISABLE_SPELLCHECK "Disable spellcheck library." ${osx_special_target})
177 ++option(DESKTOP_APP_DISABLE_WEBKIT "Disable WebkitGTK library (Linux only)." OFF)
178 + option(DESKTOP_APP_DISABLE_CRASH_REPORTS "Disable crash report generation." ${no_special_target})
179 + option(DESKTOP_APP_DISABLE_AUTOUPDATE "Disable autoupdate." ${disable_autoupdate})
180 + option(DESKTOP_APP_USE_HUNSPELL_ONLY "Disable system spellchecker and use bundled Hunspell only. (For debugging purposes)" OFF)
181
182 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
183 index ba8f3836006..1f51780319c 100644
184 --- a/net-im/telegram-desktop/telegram-desktop-2.7.4-r1.ebuild
185 +++ b/net-im/telegram-desktop/telegram-desktop-2.7.4-r1.ebuild
186 @@ -61,6 +61,7 @@ REQUIRED_USE="
187 spell? (
188 ^^ ( enchant hunspell )
189 )
190 + webkit? ( gtk )
191 "
192
193 S="${WORKDIR}/${MY_P}"
194 @@ -68,7 +69,7 @@ S="${WORKDIR}/${MY_P}"
195 PATCHES=(
196 # https://github.com/desktop-app/cmake_helpers/pull/91
197 # https://github.com/desktop-app/lib_webview/pull/2
198 - "${FILESDIR}/tdesktop-2.7.3-disable-webkit-separately.patch"
199 + "${FILESDIR}/tdesktop-2.7.4-disable-webkit-separately.patch"
200 # https://github.com/desktop-app/lib_webview/commit/0b4100d7cecc4e748c51f3f51ebfd1392ec3978a
201 "${FILESDIR}/tdesktop-2.7.3-webview-include-gdkx.patch"
202 # https://github.com/desktop-app/lib_webview/pull/3
203 @@ -108,7 +109,7 @@ src_configure() {
204 -DDESKTOP_APP_DISABLE_WAYLAND_INTEGRATION=$(usex wayland OFF ON)
205 -DDESKTOP_APP_DISABLE_DBUS_INTEGRATION=$(usex dbus OFF ON)
206 -DDESKTOP_APP_DISABLE_GTK_INTEGRATION=$(usex gtk OFF ON)
207 - -DDESKTOP_APP_DISABLE_WEBKIT_INTEGRATION=$(usex webkit OFF ON)
208 + -DDESKTOP_APP_DISABLE_WEBKIT=$(usex webkit OFF ON)
209 -DDESKTOP_APP_DISABLE_SPELLCHECK=$(usex spell OFF ON) # enables hunspell (recommended)
210 -DDESKTOP_APP_USE_ENCHANT=$(usex enchant ON OFF) # enables enchant and disables hunspell
211 )