Created attachment 182272 [details] Patch to add wayland-backend to gtk30 Enable wayland backend for GTK30. Required to run GTK3 applications on Wayland based compositors. Adds dependency to libEGL and wayland for gtk30.
Created attachment 182273 [details] Patch to add wayland files to pkg-plist
Created attachment 191807 [details] gtk30-wayland.diff The previous patches don't build correctly (anymore). I'm attaching a new one that builds on 11.1-RELEASE and 12.0-CURRENT. It however doesn't build on 10.3 because it misses dev/evdev/input.h. The WAYLAND option should probably be marked as BROKEN on anything < 11.1. WAYLAND isn't on by default in this patch because that would require graphics/mesa-libs to turn it on by default too which hasn't happened yet :-(
Created attachment 191817 [details] v2 - Add wayland-protocols to run dependencies When gtk3 is built with WAYLAND building any gtk3 application will require wayland-protocols too.
A commit references this bug: Author: tobik Date: Mon Mar 26 22:49:59 UTC 2018 New revision: 465644 URL: https://svnweb.freebsd.org/changeset/ports/465644 Log: x11-toolkits/gtk30: Add new non-default WAYLAND option It enables building of Gdk's Wayland backend. PR: 219040 Submitted by: Johannes Lundberg <johalun0@gmail.com> (based on) Approved by: gnome (maintainer timeout, ~9 months) Changes: head/x11-toolkits/gtk30/Makefile head/x11-toolkits/gtk30/files/patch-gdk_wayland_Makefile.in head/x11-toolkits/gtk30/files/patch-gdk_wayland_gdkdevice-wayland.c head/x11-toolkits/gtk30/pkg-plist
(In reply to Tobias Kortkamp from comment #3) Are you going to modify patch-gdk_wayland_gdkdevice-wayland.c with a proper check and submit it to upstream? It seems that I didn't catch this error because I have v4l_compat installed.
(In reply to Ting-Wei Lan from comment #5) No, I currently have no plans to upstream it. What exactly do you mean by proper check? If there something wrong with how I patched it in the port please explain and I can amend the last commit.
(In reply to Tobias Kortkamp from comment #6) I meant making it possible for upstream to review and accept it by adding header checks. If you don't want to do so, I may do it when I find some time.
The patch for gdk/wayland/gdkdevice-wayland.c is now merged upstream. GTK3: https://gitlab.gnome.org/GNOME/gtk/commit/a9f0704ae1a8ac2a5e7086d8bd8c62aa2e93fb27 GTK4: https://gitlab.gnome.org/GNOME/gtk/commit/7fed0b74ed9f9c2d2e39a2776719f93cca8f6043