Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F156936175
D30224.id89179.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
D30224.id89179.diff
View Options
diff --git a/net-im/telegram-desktop/Makefile b/net-im/telegram-desktop/Makefile
--- a/net-im/telegram-desktop/Makefile
+++ b/net-im/telegram-desktop/Makefile
@@ -16,7 +16,6 @@
NOT_FOR_ARCHS_REASON= Only little endian is supported
BUILD_DEPENDS= alsa-lib>0:audio/alsa-lib \
- dee>0:devel/dee \
microsoft-gsl>0:devel/microsoft-gsl \
pulseaudio>0:audio/pulseaudio \
range-v3>0:devel/range-v3 \
@@ -40,7 +39,7 @@
libxxhash.so:devel/xxhash
USES= cmake compiler:c++17-lang desktop-file-utils gl \
- gnome pkgconfig python:3.7,build qt:5 ssl xorg
+ gnome pkgconfig python:3.7+,build qt:5 ssl xorg
USE_GITHUB= nodefault
GH_ACCOUNT= telegramdesktop
@@ -81,16 +80,12 @@
ALSA_LIB_DEPENDS= libasound.so:audio/alsa-lib
GTK_CMAKE_BOOL_OFF= DESKTOP_APP_DISABLE_GTK_INTEGRATION
+GTK_LIB_DEPENDS= libwebkit2gtk-4.0.so:www/webkit2-gtk3
+GTK_USE= GNOME=gtk30
PULSEAUDIO_LIB_DEPENDS= libpulse.so:audio/pulseaudio
# Telegram asks each custom build to have its own API ID and hash.
TELEGRAM_API_HASH= 20a3432aab43f24bb4460fceac5ba38d
TELEGRAM_API_ID= 601761
-.include <bsd.port.options.mk>
-
-.if ${PORT_OPTIONS:MGTK}
-USE_GNOME+= gtk30
-.endif
-
.include <bsd.port.mk>
diff --git a/net-im/telegram-desktop/files/patch-Telegram_lib__webview_webview_platform_linux_webview__linux__webkit__gtk.h b/net-im/telegram-desktop/files/patch-Telegram_lib__webview_webview_platform_linux_webview__linux__webkit__gtk.h
new file mode 100644
--- /dev/null
+++ b/net-im/telegram-desktop/files/patch-Telegram_lib__webview_webview_platform_linux_webview__linux__webkit__gtk.h
@@ -0,0 +1,13 @@
+--- Telegram/lib_webview/webview/platform/linux/webview_linux_webkit_gtk.h.orig 2021-04-14 05:42:51 UTC
++++ Telegram/lib_webview/webview/platform/linux/webview_linux_webkit_gtk.h
+@@ -11,9 +11,9 @@
+ extern "C" {
+ #undef signals
+ #include <JavaScriptCore/JavaScript.h>
++#include <gdk/gdkx.h>
+ #include <gtk/gtk.h>
+ #include <webkit2/webkit2.h>
+-#include <X11/Xlib.h>
+ #define signals public
+ } // extern "C"
+
diff --git a/net-im/telegram-desktop/files/patch-Telegram_lib__webview_webview_platform_linux_webview__linux__webkit__gtk.cpp b/net-im/telegram-desktop/files/patch-Telegram_lib__webview_webview_platform_linux_webview__linux__webkit__gtk.cpp
new file mode 100644
--- /dev/null
+++ b/net-im/telegram-desktop/files/patch-Telegram_lib__webview_webview_platform_linux_webview__linux__webkit__gtk.cpp
@@ -0,0 +1,20 @@
+--- Telegram/lib_webview/webview/platform/linux/webview_linux_webkit_gtk.cpp.orig 2021-04-14 05:42:51 UTC
++++ Telegram/lib_webview/webview/platform/linux/webview_linux_webkit_gtk.cpp
+@@ -26,7 +26,7 @@ bool Resolve() {
+ auto >k = BaseGtkIntegration::Instance()->library();
+
+ auto webkit2gtk = QLibrary();
+- const auto result = LOAD_GTK_SYMBOL(gtk, gtk_widget_get_type)
++ const auto result = LOAD_GTK_SYMBOL(gtk, gtk_widget_get_type)
+ && LOAD_GTK_SYMBOL(gtk, gtk_widget_grab_focus)
+ && LOAD_GTK_SYMBOL(gtk, gtk_container_get_type)
+ && LOAD_GTK_SYMBOL(gtk, gtk_container_add)
+@@ -38,7 +38,7 @@ bool Resolve() {
+ && LOAD_GTK_SYMBOL(gtk, gtk_window_get_type)
+ && LOAD_GTK_SYMBOL(gtk, gtk_window_set_decorated)
+ && LOAD_GTK_SYMBOL(gtk, gdk_x11_window_get_xid)
+- && base::Platform::Gtk::LoadLibrary(webkit2gtk, "libwebkit2gtk-4.0.so.37", 0)
++ && base::Platform::Gtk::LoadGtkLibrary(webkit2gtk, "libwebkit2gtk-4.0.so.37")
+ && LOAD_GTK_SYMBOL(webkit2gtk, webkit_web_view_new)
+ && LOAD_GTK_SYMBOL(webkit2gtk, webkit_web_view_get_type)
+ && LOAD_GTK_SYMBOL(webkit2gtk, webkit_web_view_get_user_content_manager)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, May 18, 11:51 AM (40 m, 6 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33247059
Default Alt Text
D30224.id89179.diff (3 KB)
Attached To
Mode
D30224: net-im/telegram-desktop: fix build with GTK option
Attached
Detach File
Event Timeline
Log In to Comment