Bug 219040 - [PATCH] x11-toolkits/gtk30: Add wayland backend option and enable by default
Summary: [PATCH] x11-toolkits/gtk30: Add wayland backend option and enable by default
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-gnome (Nobody)
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2017-05-03 11:40 UTC by Johannes Lundberg
Modified: 2018-05-02 12:33 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (gnome)


Attachments
Patch to add wayland-backend to gtk30 (1.55 KB, patch)
2017-05-03 11:40 UTC, Johannes Lundberg
no flags Details | Diff
Patch to add wayland files to pkg-plist (1.37 KB, patch)
2017-05-03 11:48 UTC, Johannes Lundberg
no flags Details | Diff
gtk30-wayland.diff (4.90 KB, patch)
2018-03-25 17:10 UTC, Tobias Kortkamp
no flags Details | Diff
v2 (4.97 KB, patch)
2018-03-25 21:26 UTC, Tobias Kortkamp
tobik: maintainer-approval? (gnome)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Johannes Lundberg 2017-05-03 11:40:55 UTC
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.
Comment 1 Johannes Lundberg 2017-05-03 11:48:57 UTC
Created attachment 182273 [details]
Patch to add wayland files to pkg-plist
Comment 2 Tobias Kortkamp freebsd_committer freebsd_triage 2018-03-25 17:10:37 UTC
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 :-(
Comment 3 Tobias Kortkamp freebsd_committer freebsd_triage 2018-03-25 21:26:15 UTC
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.
Comment 4 commit-hook freebsd_committer freebsd_triage 2018-03-26 22:50:10 UTC
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
Comment 5 Ting-Wei Lan 2018-03-27 15:57:54 UTC
(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.
Comment 6 Tobias Kortkamp freebsd_committer freebsd_triage 2018-03-27 16:13:09 UTC
(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.
Comment 7 Ting-Wei Lan 2018-03-28 15:08:06 UTC
(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.
Comment 8 Ting-Wei Lan 2018-05-02 12:33:14 UTC
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