1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-02 01:20:54 +00:00

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)
This commit is contained in:
Tobias Kortkamp 2018-03-26 22:49:58 +00:00
parent 9ee3100454
commit 43e7d70764
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=465644
4 changed files with 56 additions and 2 deletions

View File

@ -44,7 +44,6 @@ USES+= compiler:c11 gettext gmake gnome libtool localbase \
USE_XORG= xext xrender x11 xinerama xi xrandr xcursor xfixes xdamage \
xcomposite
CONFIGURE_ARGS= --enable-x11-backend \
--disable-wayland-backend \
--enable-introspection
CPPFLAGS+= -fno-omit-frame-pointer
INSTALLS_ICONS= yes
@ -58,8 +57,9 @@ GLIB_SCHEMAS= org.gtk.Demo.gschema.xml \
org.gtk.Settings.Debug.gschema.xml \
org.gtk.Settings.FileChooser.gschema.xml
OPTIONS_DEFINE= CUPS CLOUDPRINT COLORD DEBUG BROADWAY
OPTIONS_DEFINE= CUPS CLOUDPRINT COLORD DEBUG BROADWAY WAYLAND
OPTIONS_DEFAULT=CUPS COLORD BROADWAY
OPTIONS_EXCLUDE_FreeBSD_10= WAYLAND
OPTIONS_SUB= yes
BROADWAY_DESC= Enable GDK Broadway backend for showing GTK+ in the webbrowser using HTML5 and web sockets.
@ -80,6 +80,13 @@ CLOUDPRINT_LIB_DEPENDS= librest-0.7.so:devel/librest \
# don't explicitly disable debug, this causes segfaults. ports r437293
DEBUG_CONFIGURE_ON= --enable-debug=yes
WAYLAND_BUILD_DEPENDS= wayland-protocols>=0:graphics/wayland-protocols
WAYLAND_CONFIGURE_ENABLE= wayland-backend
WAYLAND_LIB_DEPENDS= libwayland-client.so:graphics/wayland \
libwayland-egl.so:graphics/mesa-libs \
libxkbcommon.so:x11/libxkbcommon
WAYLAND_RUN_DEPENDS= wayland-protocols>=0:graphics/wayland-protocols
post-patch:
@${REINPLACE_CMD} -e 's|[{]libdir[}]/locale|{datadir}/locale|g' \
${WRKSRC}/configure

View File

@ -0,0 +1,23 @@
Use portable sed syntax in gdk/wayland/Makefile.in
Replace non-portable \<, \>, \+ with \(, \), \{, \} to avoid build
failure on systems not using GNU sed.
https://git.gnome.org/browse/gtk/commit/gdk/wayland/Makefile.am?h=gtk-3-22&id=b68e55ecce38dec47c3f9119e603b81773e5294a
--- gdk/wayland/Makefile.in.orig 2018-03-25 16:20:44 UTC
+++ gdk/wayland/Makefile.in
@@ -1028,11 +1028,11 @@ check-local: test-cwd
.SECONDEXPANSION:
define protostability
-$(shell echo $1 | sed 's/.*\(\<unstable\>\|\<stable\>\).*/\1/')
+$(if $(findstring unstable,$1),unstable,stable)
endef
define protoname
-$(shell echo $1 | sed 's/\([a-z\-]\+\)-[a-z]\+-v[0-9]\+/\1/')
+$(shell echo $1 | sed 's/\([a-z\-]\{1,\}\)-[a-z]\{1,\}-v[0-9]\{1,\}/\1/')
endef
%-protocol.c : $(WAYLAND_PROTOCOLS_DATADIR)/$$(call protostability,$$*)/$$(call protoname,$$*)/$$*.xml

View File

@ -0,0 +1,15 @@
--- gdk/wayland/gdkdevice-wayland.c.orig 2018-03-25 16:25:12 UTC
+++ gdk/wayland/gdkdevice-wayland.c
@@ -38,11 +38,9 @@
#include <xkbcommon/xkbcommon.h>
-#include <linux/input.h>
-
#include <sys/time.h>
#include <sys/mman.h>
-#include <linux/input.h>
+#include <dev/evdev/input.h>
#define BUTTON_BASE (BTN_LEFT - 1) /* Used to translate to 1-indexed buttons */

View File

@ -58,8 +58,15 @@ include/gtk-3.0/gdk/gdkthreads.h
include/gtk-3.0/gdk/gdktypes.h
include/gtk-3.0/gdk/gdkversionmacros.h
include/gtk-3.0/gdk/gdkvisual.h
%%WAYLAND%%include/gtk-3.0/gdk/gdkwayland.h
include/gtk-3.0/gdk/gdkwindow.h
include/gtk-3.0/gdk/gdkx.h
%%WAYLAND%%include/gtk-3.0/gdk/wayland/gdkwaylanddevice.h
%%WAYLAND%%include/gtk-3.0/gdk/wayland/gdkwaylanddisplay.h
%%WAYLAND%%include/gtk-3.0/gdk/wayland/gdkwaylandglcontext.h
%%WAYLAND%%include/gtk-3.0/gdk/wayland/gdkwaylandmonitor.h
%%WAYLAND%%include/gtk-3.0/gdk/wayland/gdkwaylandselection.h
%%WAYLAND%%include/gtk-3.0/gdk/wayland/gdkwaylandwindow.h
include/gtk-3.0/gdk/x11/gdkx-autocleanups.h
include/gtk-3.0/gdk/x11/gdkx11applaunchcontext.h
include/gtk-3.0/gdk/x11/gdkx11cursor.h
@ -434,10 +441,12 @@ lib/libgtk-3.so.%%LIBVERSION%%
libdata/pkgconfig/gail-3.0.pc
libdata/pkgconfig/gdk-3.0.pc
%%BROADWAY%%libdata/pkgconfig/gdk-broadway-3.0.pc
%%WAYLAND%%libdata/pkgconfig/gdk-wayland-3.0.pc
libdata/pkgconfig/gdk-x11-3.0.pc
libdata/pkgconfig/gtk+-3.0.pc
%%BROADWAY%%libdata/pkgconfig/gtk+-broadway-3.0.pc
libdata/pkgconfig/gtk+-unix-print-3.0.pc
%%WAYLAND%%libdata/pkgconfig/gtk+-wayland-3.0.pc
libdata/pkgconfig/gtk+-x11-3.0.pc
man/man1/gtk-query-immodules-3.0.1.gz
share/aclocal/gtk-3.0.m4