Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Mar 2018 22:49:58 +0000 (UTC)
From:      Tobias Kortkamp <tobik@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r465644 - in head/x11-toolkits/gtk30: . files
Message-ID:  <201803262249.w2QMnwJC088518@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tobik
Date: Mon Mar 26 22:49:58 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)

Added:
  head/x11-toolkits/gtk30/files/patch-gdk_wayland_Makefile.in   (contents, props changed)
  head/x11-toolkits/gtk30/files/patch-gdk_wayland_gdkdevice-wayland.c   (contents, props changed)
Modified:
  head/x11-toolkits/gtk30/Makefile
  head/x11-toolkits/gtk30/pkg-plist

Modified: head/x11-toolkits/gtk30/Makefile
==============================================================================
--- head/x11-toolkits/gtk30/Makefile	Mon Mar 26 22:36:06 2018	(r465643)
+++ head/x11-toolkits/gtk30/Makefile	Mon Mar 26 22:49:58 2018	(r465644)
@@ -44,7 +44,6 @@ USES+=		compiler:c11 gettext gmake gnome libtool local
 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.
@@ -79,6 +79,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' \

Added: head/x11-toolkits/gtk30/files/patch-gdk_wayland_Makefile.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/x11-toolkits/gtk30/files/patch-gdk_wayland_Makefile.in	Mon Mar 26 22:49:58 2018	(r465644)
@@ -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

Added: head/x11-toolkits/gtk30/files/patch-gdk_wayland_gdkdevice-wayland.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/x11-toolkits/gtk30/files/patch-gdk_wayland_gdkdevice-wayland.c	Mon Mar 26 22:49:58 2018	(r465644)
@@ -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 */
+ 

Modified: head/x11-toolkits/gtk30/pkg-plist
==============================================================================
--- head/x11-toolkits/gtk30/pkg-plist	Mon Mar 26 22:36:06 2018	(r465643)
+++ head/x11-toolkits/gtk30/pkg-plist	Mon Mar 26 22:49:58 2018	(r465644)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201803262249.w2QMnwJC088518>