All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [RFC PATCH/next 0/2] Add Cage and wlroots packages
@ 2019-05-16 22:08 Adrian Perez de Castro
  2019-05-16 22:08 ` [Buildroot] [RFC PATCH/next 1/2] package/wlroots: new package Adrian Perez de Castro
  2019-05-16 22:08 ` [Buildroot] [RFC PATCH/next 2/2] package/cage: " Adrian Perez de Castro
  0 siblings, 2 replies; 9+ messages in thread
From: Adrian Perez de Castro @ 2019-05-16 22:08 UTC (permalink / raw)
  To: buildroot

Hello,

This is a RFC patch series which adds the Cage Wayland compositor, and the
wlroots library which is a dependency.

I find Cage well suited for kiosks and in general "single-application,
fullscreen" use cases. I find it particularly suitable to use in combination
with Cog (the WPE WebKit launcher), for many cases in which a full-fledged
compositor like Weston is not really needed.  A typical example is generating
a small image to run a single Web application from a Raspberry Pi right after
bootup.

I am considering adding one additional patch which enables installation of
a systemd unit for Cage, if there is interest in that.

Cheers,
?Adri?n


Adrian Perez de Castro (2):
  package/wlroots: new package
  package/cage: new package

 package/Config.in                             |   2 +
 .../cage/0001-Updates-for-wlroots-0.6.0.patch | 264 ++++++++++++++++++
 package/cage/Config.in                        |  24 ++
 package/cage/cage.hash                        |   5 +
 package/cage/cage.mk                          |  19 ++
 package/wlroots/Config.in                     |  65 +++++
 package/wlroots/wlroots.hash                  |   5 +
 package/wlroots/wlroots.mk                    |  80 ++++++
 8 files changed, 464 insertions(+)
 create mode 100644 package/cage/0001-Updates-for-wlroots-0.6.0.patch
 create mode 100644 package/cage/Config.in
 create mode 100644 package/cage/cage.hash
 create mode 100644 package/cage/cage.mk
 create mode 100644 package/wlroots/Config.in
 create mode 100644 package/wlroots/wlroots.hash
 create mode 100644 package/wlroots/wlroots.mk

-- 
2.21.0

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] [RFC PATCH/next 1/2] package/wlroots: new package
  2019-05-16 22:08 [Buildroot] [RFC PATCH/next 0/2] Add Cage and wlroots packages Adrian Perez de Castro
@ 2019-05-16 22:08 ` Adrian Perez de Castro
  2019-05-17  7:48   ` Thomas Petazzoni
  2019-05-18 15:47   ` François Perrad
  2019-05-16 22:08 ` [Buildroot] [RFC PATCH/next 2/2] package/cage: " Adrian Perez de Castro
  1 sibling, 2 replies; 9+ messages in thread
From: Adrian Perez de Castro @ 2019-05-16 22:08 UTC (permalink / raw)
  To: buildroot

wlroots is a modular library which provides building blocks to
implement Wayland compositors. wlroots is a dependency of the
Cage Wayland compositor.

https://github.com/swaywm/wlroots/

Signed-off-by: Adrian Perez de Castro <aperez@igalia.com>
---
 package/Config.in            |  1 +
 package/wlroots/Config.in    | 65 +++++++++++++++++++++++++++++
 package/wlroots/wlroots.hash |  5 +++
 package/wlroots/wlroots.mk   | 80 ++++++++++++++++++++++++++++++++++++
 4 files changed, 151 insertions(+)
 create mode 100644 package/wlroots/Config.in
 create mode 100644 package/wlroots/wlroots.hash
 create mode 100644 package/wlroots/wlroots.mk

diff --git a/package/Config.in b/package/Config.in
index f592e74a99..5b1f279b8e 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1341,6 +1341,7 @@ menu "Graphics"
 	source "package/waylandpp/Config.in"
 	source "package/webkitgtk/Config.in"
 	source "package/webp/Config.in"
+	source "package/wlroots/Config.in"
 	source "package/woff2/Config.in"
 	source "package/wpebackend-fdo/Config.in"
 	source "package/wpewebkit/Config.in"
diff --git a/package/wlroots/Config.in b/package/wlroots/Config.in
new file mode 100644
index 0000000000..45db63f62c
--- /dev/null
+++ b/package/wlroots/Config.in
@@ -0,0 +1,65 @@
+config BR2_PACKAGE_WLROOTS
+	bool "wlroots"
+	depends on !BR2_STATIC_LIBS # mesa3d, wayland
+	depends on BR2_INSTALL_LIBSTDCPP # freedrp, mesa3d
+	depends on BR2_TOOLCHAIN_HAS_THREADS # libdrm, wayland
+	depends on BR2_TOOLCHAIN_HAS_SYNC_1 # mesa3d
+	depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # mesa3d
+	depends on BR2_ENABLE_LOCALE # libinput
+	depends on BR2_PACKAGE_HAS_UDEV # libinput
+	depends on BR2_PACKAGE_HAS_LIBEGL
+	depends on BR2_PACKAGE_HAS_LIBEGL_WAYLAND
+	depends on BR2_PACKAGE_HAS_LIBGLES
+	select BR2_PACKAGE_LIBDRM
+	select BR2_PACKAGE_LIBINPUT
+	select BR2_PACKAGE_LIBXKBCOMMON
+	select BR2_PACKAGE_PIXMAN
+	select BR2_PACKAGE_WAYLAND
+	select BR2_PACKAGE_WAYLAND_PROTOCOLS
+	help
+	  wlroots is a modular Wayland library for building compositors
+	  which implements many of their common features.
+
+	  https://github.com/swaywm/wlroots
+
+if BR2_PACKAGE_WLROOTS
+
+config BR2_PACKAGE_WLROOTS_RDP
+	bool "RDP backend support"
+	depends on BR2_PACKAGE_FREERDP
+	depends on BR2_USE_WCHAR # freerdp
+	depends on BR2_USE_MMU # libglib2
+	depends on BR2_TOOLCHAIN_HAS_SYNC_4 # freerdp
+	help
+	  Support Wayland sessions served using the RDP protocol
+
+comment "RDP backend support needs FreeRDP"
+	depends on !BR2_PACKAGE_FREERDP
+
+config BR2_PACKAGE_WLROOTS_X11
+	bool "X11 backend support"
+	depends on BR2_PACKAGE_XORG7
+	select BR2_PACKAGE_LIBXCB
+	select BR2_PACKAGE_XLIB_LIBX11
+	help
+	  Support Wayland sessions nested inside a X11 window
+
+comment "X11 backend support needs X.org enabled"
+	depends on !BR2_PACKAGE_XORG7
+
+config BR2_PACKAGE_WLROOTS_XWAYLAND
+	bool "XWayland support"
+	depends on BR2_PACKAGE_XORG7
+	select BR2_PACKAGE_LIBXCB
+	help
+	  Enable support for XWayland
+
+comment "XWayland support needs X.org enabled"
+	depends on !BR2_PACKAGE_XORG7
+
+config BR2_PACKAGE_WLROOTS_ROOTSTON
+	bool "rootston"
+	help
+	  Build and install the rootston example compositor
+
+endif
diff --git a/package/wlroots/wlroots.hash b/package/wlroots/wlroots.hash
new file mode 100644
index 0000000000..dbb387a865
--- /dev/null
+++ b/package/wlroots/wlroots.hash
@@ -0,0 +1,5 @@
+# Generated locally
+sha256 9cf3716f3683d800df8b150f256ff66dad65faf13a9d67c284f67a9444d28c70  0.6.0.tar.gz
+
+# Hashes for license files:
+sha256 ffd3737a478b83a8b51b42757d3bf909ef36694508355879722e11fc1fa6736b  LICENSE
diff --git a/package/wlroots/wlroots.mk b/package/wlroots/wlroots.mk
new file mode 100644
index 0000000000..9d3581fd6f
--- /dev/null
+++ b/package/wlroots/wlroots.mk
@@ -0,0 +1,80 @@
+################################################################################
+#
+# wlroots
+#
+################################################################################
+
+WLROOTS_VERSION = 0.6.0
+WLROOTS_SITE = https://github.com/swaywm/wlroots/archive
+WLROOTS_SOURCE = $(WLROOTS_VERSION).tar.gz
+WLROOTS_LICENSE = MIT
+WLROOTS_INSTALL_STAGING = YES
+
+WLROOTS_DEPENDENCIES = host-pkgconf host-wayland libegl libinput \
+					   libxkbcommon mesa3d pixman udev \
+					   wayland wayland-protocols
+
+WLROOTS_CONF_OPTS = -Dexamples=false
+
+ifeq ($(BR2_PACKAGE_FFMPEG),y)
+WLROOTS_DEPENDENCIES += ffmpeg
+endif
+
+ifeq ($(BR2_PACKAGE_LIBCAP),y)
+WLROOTS_CONF_OPTS += -Dlibcap=enabled
+WLROOTS_DEPENDENCIES += libcap
+else
+WLROOTS_CONF_OPTS += -Dlibcap=disabled
+endif
+
+ifeq ($(BR2_PACKAGE_LIBPNG),y)
+WLROOTS_DEPENDENCIES += libpng
+endif
+
+ifeq ($(BR2_PACKAGE_SYSTEMD_LOGIND),y)
+WLROOTS_CONF_OPTS += -Dlogind=enabled -Dlogind-provider=systemd
+WLROOTS_DEPENDENCIES += systemd
+else
+WLROOTS_CONF_OPTS += -Dlogind=disabled
+endif
+
+ifeq ($(BR2_PACKAGE_WLROOTS_RDP),y)
+WLROOTS_CONF_OPTS += -Dfreerdp=enabled
+WLROOTS_DEPENDENCIES += freerdp
+else
+WLROOTS_CONF_OPTS += -Dfreerdp=disabled
+endif
+
+ifeq ($(BR2_PACKAGE_WLROOTS_X11),y)
+WLROOTS_CONF_OPTS += -Dx11-backend=enabled
+WLROOTS_DEPENDENCIES += xlib_libX11
+else
+WLROOTS_CONF_OPTS += -Dx11-backend=disabled
+endif
+
+ifeq ($(BR2_PACKAGE_WLROOTS_XWAYLAND),y)
+WLROOTS_CONF_OPTS += -Dxwayland=enabled
+WLROOTS_DEPENDENCIES += libxcb
+ifeq ($(BR2_PACKAGE_XCB_UTIL),y)
+WLROOTS_CONF_OPTS += -Dxcb-errors=enabled
+WLROOTS_DEPENDENCIES += xcb-util
+else
+WLROOTS_CONF_OPTS += -Dxcb-errors=disabled
+endif
+ifeq ($(BR2_PACKAGE_XCB_UTIL_WM),y)
+WLROOTS_CONF_OPTS += -Dxcb-icccm=enabled
+WLROOTS_DEPENDENCIES += xcb-util-wm
+else
+WLROOTS_CONF_OPTS += -Dxcb-icccm=disabled
+endif
+else
+WLROOTS_CONF_OPTS += -Dxwayland=disabled -Dxcb-errors=disabled -Dxcb-icccm=disabled
+endif
+
+ifeq ($(BR2_PACKAGE_WLROOTS_ROOTSTON),y)
+WLROOTS_CONF_OPTS += -Drootston=true
+else
+WLROOTS_CONF_OPTS += -Drootston=false
+endif
+
+$(eval $(meson-package))
-- 
2.21.0

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [Buildroot] [RFC PATCH/next 2/2] package/cage: new package
  2019-05-16 22:08 [Buildroot] [RFC PATCH/next 0/2] Add Cage and wlroots packages Adrian Perez de Castro
  2019-05-16 22:08 ` [Buildroot] [RFC PATCH/next 1/2] package/wlroots: new package Adrian Perez de Castro
@ 2019-05-16 22:08 ` Adrian Perez de Castro
  2019-05-17  9:21   ` Thomas Petazzoni
  1 sibling, 1 reply; 9+ messages in thread
From: Adrian Perez de Castro @ 2019-05-16 22:08 UTC (permalink / raw)
  To: buildroot

Cage is a "kiosk" Wayland compositor, which shows a single maximized
application at a time and limits user interaction to that application.

https://www.hjdskes.nl/projects/cage/

Signed-off-by: Adrian Perez de Castro <aperez@igalia.com>
---
 package/Config.in                             |   1 +
 .../cage/0001-Updates-for-wlroots-0.6.0.patch | 264 ++++++++++++++++++
 package/cage/Config.in                        |  24 ++
 package/cage/cage.hash                        |   5 +
 package/cage/cage.mk                          |  19 ++
 5 files changed, 313 insertions(+)
 create mode 100644 package/cage/0001-Updates-for-wlroots-0.6.0.patch
 create mode 100644 package/cage/Config.in
 create mode 100644 package/cage/cage.hash
 create mode 100644 package/cage/cage.mk

diff --git a/package/Config.in b/package/Config.in
index 5b1f279b8e..7cac6de79f 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -328,6 +328,7 @@ comment "QT libraries and helper libraries"
 	source "package/quazip/Config.in"
 	source "package/qwt/Config.in"
 endif
+	source "package/cage/Config.in"
 	source "package/tekui/Config.in"
 	source "package/weston/Config.in"
 	source "package/x11r7/Config.in"
diff --git a/package/cage/0001-Updates-for-wlroots-0.6.0.patch b/package/cage/0001-Updates-for-wlroots-0.6.0.patch
new file mode 100644
index 0000000000..57e5a1289a
--- /dev/null
+++ b/package/cage/0001-Updates-for-wlroots-0.6.0.patch
@@ -0,0 +1,264 @@
+From 86b9d6719e52cbddda4fb6d055e60e9caf9a57ff Mon Sep 17 00:00:00 2001
+From: Jente Hidskes <hjdskes@gmail.com>
+Date: Fri, 3 May 2019 19:39:19 +0200
+Subject: [PATCH 1/3] CI: use wlroots 0.6.0
+
+Signed-off-by: Adrian Perez de Castro <aperez@igalia.com>
+[Upstream status: https://github.com/Hjdskes/cage/pull/65]
+
+---
+ .builds/alpine.yml    | 4 ++--
+ .builds/archlinux.yml | 4 ++--
+ .builds/freebsd.yml   | 4 ++--
+ 3 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/.builds/alpine.yml b/.builds/alpine.yml
+index 909bd0e..2c6d089 100644
+--- a/.builds/alpine.yml
++++ b/.builds/alpine.yml
+@@ -17,8 +17,8 @@ tasks:
+   # version, instead of master, to avoid any breaking changes in wlroots.
+   - wlroots: |
+       cd wlroots
+-      # This corresponds to the tag of 0.5.0
+-      git checkout c9137cba691b57c3eaf3ff94f9bf8e623f66ccc5
++      # This corresponds to the tag of 0.6.0
++      git checkout c0305f4f864543f8c3fea6f302e91c9b1d3396f3
+       meson --prefix=/usr build -Drootston=false -Dexamples=false
+       ninja -C build
+       sudo ninja -C build install
+diff --git a/.builds/archlinux.yml b/.builds/archlinux.yml
+index b270c40..e052118 100644
+--- a/.builds/archlinux.yml
++++ b/.builds/archlinux.yml
+@@ -15,8 +15,8 @@ tasks:
+   # version, instead of master, to avoid any breaking changes in wlroots.
+   - wlroots: |
+       cd wlroots
+-      # This corresponds to the tag of 0.5.0
+-      git checkout c9137cba691b57c3eaf3ff94f9bf8e623f66ccc5
++      # This corresponds to the tag of 0.6.0
++      git checkout c0305f4f864543f8c3fea6f302e91c9b1d3396f3
+       meson --prefix=/usr build -Drootston=false -Dexamples=false
+       ninja -C build
+       sudo ninja -C build install
+diff --git a/.builds/freebsd.yml b/.builds/freebsd.yml
+index f1a4f52..274eaaa 100644
+--- a/.builds/freebsd.yml
++++ b/.builds/freebsd.yml
+@@ -18,8 +18,8 @@ tasks:
+   # version, instead of master, to avoid any breaking changes in wlroots.
+   - wlroots: |
+       cd wlroots
+-      # This corresponds to the tag of 0.5.0
+-      git checkout c9137cba691b57c3eaf3ff94f9bf8e623f66ccc5
++      # This corresponds to the tag of 0.6.0
++      git checkout c0305f4f864543f8c3fea6f302e91c9b1d3396f3
+       meson --prefix=/usr/local build -Drootston=false -Dexamples=false
+       ninja -C build
+       sudo ninja -C build install
+
+From 08ecd52a3313d00d06cc4e12d4d3243865af5dd0 Mon Sep 17 00:00:00 2001
+From: Drew DeVault <sir@cmpwn.com>
+Date: Thu, 25 Apr 2019 11:40:25 -0400
+Subject: [PATCH 2/3] Update to wlroots 0.6.0
+
+---
+ output.c    | 15 ++++++++-------
+ xdg_shell.c | 12 ++++++------
+ 2 files changed, 14 insertions(+), 13 deletions(-)
+
+diff --git a/output.c b/output.c
+index c682dcc..1849486 100644
+--- a/output.c
++++ b/output.c
+@@ -198,23 +198,23 @@ handle_output_damage_frame(struct wl_listener *listener, void *data)
+ 	struct timespec now;
+ 	clock_gettime(CLOCK_MONOTONIC, &now);
+ 
+-	bool needs_swap;
++	bool needs_frame;
+ 	pixman_region32_t damage;
+ 	pixman_region32_init(&damage);
+-	if (!wlr_output_damage_make_current(output->damage, &needs_swap, &damage)) {
++	if (!wlr_output_damage_attach_render(output->damage, &needs_frame, &damage)) {
+ 		wlr_log(WLR_ERROR, "Cannot make damage output current");
+ 		goto damage_finish;
+ 	}
+ 
+-	if (!needs_swap) {
+-		wlr_log(WLR_DEBUG, "Output doesn't need swap and isn't damaged");
++	if (!needs_frame) {
++		wlr_log(WLR_DEBUG, "Output doesn't need frame and isn't damaged");
+ 		goto damage_finish;
+ 	}
+ 
+ 	wlr_renderer_begin(renderer, output->wlr_output->width, output->wlr_output->height);
+ 
+ 	if (!pixman_region32_not_empty(&damage)) {
+-		wlr_log(WLR_DEBUG, "Output isn't damaged but needs a buffer swap");
++		wlr_log(WLR_DEBUG, "Output isn't damaged but needs a buffer frame");
+ 		goto renderer_end;
+ 	}
+ 
+@@ -267,8 +267,9 @@ handle_output_damage_frame(struct wl_listener *listener, void *data)
+ 	enum wl_output_transform transform = wlr_output_transform_invert(output->wlr_output->transform);
+ 	wlr_region_transform(&damage, &damage, transform, output_width, output_height);
+ 
+-	if (!wlr_output_damage_swap_buffers(output->damage, &now, &damage)) {
+-	        wlr_log(WLR_ERROR, "Could not swap buffers");
++	wlr_output_set_damage(output->wlr_output, &damage);
++	if (!wlr_output_commit(output->wlr_output)) {
++	        wlr_log(WLR_ERROR, "Could not commit output");
+ 	}
+ 
+  damage_finish:
+diff --git a/xdg_shell.c b/xdg_shell.c
+index 4fcb00e..f964f76 100644
+--- a/xdg_shell.c
++++ b/xdg_shell.c
+@@ -94,15 +94,15 @@ popup_unconstrain(struct cg_xdg_popup *popup)
+ {
+ 	struct cg_view *view = popup->view_child.view;
+ 	struct wlr_output *output = view->server->output->wlr_output;
++	struct wlr_output_layout *output_layout = view->server->output_layout;
+ 
+-	int width, height;
+-	wlr_output_effective_resolution(output, &width, &height);
++	struct wlr_box *output_box = wlr_output_layout_get_box(output_layout, output);
+ 
+ 	struct wlr_box output_toplevel_box = {
+-		.x = output->lx - view->x,
+-		.y = output->ly - view->y,
+-		.width = width,
+-		.height = height
++		.x = output_box->x - view->x,
++		.y = output_box->y - view->y,
++		.width = output_box->width,
++		.height = output_box->height
+ 	};
+ 
+ 	wlr_xdg_popup_unconstrain_from_box(popup->wlr_popup, &output_toplevel_box);
+
+From 711aebb4d20848d2d9052e0483cd301c7022b844 Mon Sep 17 00:00:00 2001
+From: Jente Hidskes <hjdskes@gmail.com>
+Date: Fri, 3 May 2019 20:53:19 +0200
+Subject: [PATCH 3/3] output: don't submit too much damage
+
+See https://github.com/swaywm/wlroots/issues/1666#issue-436967396 and
+the linked changes
+https://github.com/swaywm/wlroots/pull/1668/files#diff-95fe5e5b411cc64a5dc31e2b72669a0d
+---
+ output.c | 38 ++++++++++++++++++++++----------------
+ 1 file changed, 22 insertions(+), 16 deletions(-)
+
+diff --git a/output.c b/output.c
+index 1849486..bfb4822 100644
+--- a/output.c
++++ b/output.c
+@@ -152,7 +152,7 @@ render_surface(struct wlr_surface *surface, int sx, int sy, void *data)
+ 	pixman_region32_union_rect(&damage, &damage, box.x, box.y, box.width, box.height);
+ 	pixman_region32_intersect(&damage, &damage, rdata->damage);
+ 	if (!pixman_region32_not_empty(&damage)) {
+-		goto damage_finish;
++		goto buffer_damage_finish;
+ 	}
+ 
+ 	float matrix[9];
+@@ -166,7 +166,7 @@ render_surface(struct wlr_surface *surface, int sx, int sy, void *data)
+ 		wlr_render_texture_with_matrix(surface->renderer, texture, matrix, 1);
+ 	}
+ 
+- damage_finish:
++ buffer_damage_finish:
+ 	pixman_region32_fini(&damage);
+ }
+ 
+@@ -199,21 +199,21 @@ handle_output_damage_frame(struct wl_listener *listener, void *data)
+ 	clock_gettime(CLOCK_MONOTONIC, &now);
+ 
+ 	bool needs_frame;
+-	pixman_region32_t damage;
+-	pixman_region32_init(&damage);
+-	if (!wlr_output_damage_attach_render(output->damage, &needs_frame, &damage)) {
++	pixman_region32_t buffer_damage;
++	pixman_region32_init(&buffer_damage);
++	if (!wlr_output_damage_attach_render(output->damage, &needs_frame, &buffer_damage)) {
+ 		wlr_log(WLR_ERROR, "Cannot make damage output current");
+-		goto damage_finish;
++		goto buffer_damage_finish;
+ 	}
+ 
+ 	if (!needs_frame) {
+ 		wlr_log(WLR_DEBUG, "Output doesn't need frame and isn't damaged");
+-		goto damage_finish;
++		goto buffer_damage_finish;
+ 	}
+ 
+ 	wlr_renderer_begin(renderer, output->wlr_output->width, output->wlr_output->height);
+ 
+-	if (!pixman_region32_not_empty(&damage)) {
++	if (!pixman_region32_not_empty(&buffer_damage)) {
+ 		wlr_log(WLR_DEBUG, "Output isn't damaged but needs a buffer frame");
+ 		goto renderer_end;
+ 	}
+@@ -226,7 +226,7 @@ handle_output_damage_frame(struct wl_listener *listener, void *data)
+ 
+ 	float color[4] = {0.3, 0.3, 0.3, 1.0};
+ 	int nrects;
+-	pixman_box32_t *rects = pixman_region32_rectangles(&damage, &nrects);
++	pixman_box32_t *rects = pixman_region32_rectangles(&buffer_damage, &nrects);
+ 	for (int i = 0; i < nrects; i++) {
+ 		scissor_output(output->wlr_output, &rects[i]);
+ 		wlr_renderer_clear(renderer, color);
+@@ -236,7 +236,7 @@ handle_output_damage_frame(struct wl_listener *listener, void *data)
+ 		.output_layout = output->server->output_layout,
+ 		.output = output->wlr_output,
+ 		.when = &now,
+-		.damage = &damage,
++		.damage = &buffer_damage,
+ 	};
+ 
+ 	struct cg_view *view;
+@@ -251,29 +251,35 @@ handle_output_damage_frame(struct wl_listener *listener, void *data)
+  renderer_end:
+ 	/* Draw software cursor in case hardware cursors aren't
+ 	   available. This is a no-op when they are. */
+-	wlr_output_render_software_cursors(output->wlr_output, &damage);
++	wlr_output_render_software_cursors(output->wlr_output, &buffer_damage);
+ 	wlr_renderer_scissor(renderer, NULL);
+ 	wlr_renderer_end(renderer);
+ 
+ 	int output_width, output_height;
+ 	wlr_output_transformed_resolution(output->wlr_output, &output_width, &output_height);
+ 
++	pixman_region32_t output_damage;
++	pixman_region32_init(&output_damage);
++
+ #ifdef DEBUG
+ 	if (output->server->debug_damage_tracking) {
+-		pixman_region32_union_rect(&damage, &damage, 0, 0, output_width, output_height);
++		pixman_region32_union_rect(&output_damage, &output_damage, 0, 0, output_width, output_height);
+ 	}
+ #endif
+ 
+ 	enum wl_output_transform transform = wlr_output_transform_invert(output->wlr_output->transform);
+-	wlr_region_transform(&damage, &damage, transform, output_width, output_height);
++	wlr_region_transform(&output_damage, &output->damage->current, transform, output_width, output_height);
++
++	wlr_output_set_damage(output->wlr_output, &output_damage);
++	pixman_region32_fini(&output_damage);
+ 
+-	wlr_output_set_damage(output->wlr_output, &damage);
+ 	if (!wlr_output_commit(output->wlr_output)) {
+ 	        wlr_log(WLR_ERROR, "Could not commit output");
++		goto buffer_damage_finish;
+ 	}
+ 
+- damage_finish:
+-	pixman_region32_fini(&damage);
++ buffer_damage_finish:
++	pixman_region32_fini(&buffer_damage);
+ 
+ 	wl_list_for_each_reverse(view, &output->server->views, link) {
+ 		view_for_each_surface(view, send_frame_done, &now);
diff --git a/package/cage/Config.in b/package/cage/Config.in
new file mode 100644
index 0000000000..07dc4c9da3
--- /dev/null
+++ b/package/cage/Config.in
@@ -0,0 +1,24 @@
+config BR2_PACKAGE_CAGE
+	bool "cage"
+	depends on !BR2_STATIC_LIBS # wlroots
+	depends on BR2_TOOLCHAIN_HAS_THREADS # wlroots
+	select BR2_PACKAGE_WLROOTS
+	help
+	  Kiosk compositor for Wayland, which displays a single
+	  maximized application at a time.
+
+	  https://www.hjdskes.nl/projects/cage/
+
+if BR2_PACKAGE_CAGE
+
+config BR2_PACKAGE_CAGE_XWAYLAND
+	bool "XWayland support"
+	depends on BR2_PACKAGE_XORG7 # wlroots
+	depends on BR2_PACKAGE_WLROOTS_XWAYLAND
+	help
+	  Enable support for running X11 applications through XWayland
+
+comment "XWayland supports needs X.org and support in wlroots enabled"
+	depends on !BR2_PACKAGE_XORG7 || !BR2_PACKAGE_WLROOTS_XWAYLAND
+
+endif
diff --git a/package/cage/cage.hash b/package/cage/cage.hash
new file mode 100644
index 0000000000..5609b073d6
--- /dev/null
+++ b/package/cage/cage.hash
@@ -0,0 +1,5 @@
+# Generated locally
+sha256 03e2b4d97744aead935f4a289e5cfda4888dd06c6586982f4a25c8f435ef4166  v0.1.tar.gz
+
+# Hashes for license files:
+sha256 1fd28695090b961ed2846627365489228d84f784bff60a90e933febcedaeb65d  LICENSE
diff --git a/package/cage/cage.mk b/package/cage/cage.mk
new file mode 100644
index 0000000000..b24eb743ee
--- /dev/null
+++ b/package/cage/cage.mk
@@ -0,0 +1,19 @@
+################################################################################
+#
+# cage
+#
+################################################################################
+
+CAGE_VERSION = 0.1
+CAGE_SITE = https://github.com/Hjdskes/cage/archive
+CAGE_SOURCE = v$(CAGE_VERSION).tar.gz
+CAGE_LICENSE = MIT
+CAGE_DEPENDENCIES = host-pkgconf wlroots
+
+ifeq ($(BR2_PACKAGE_CAGE_XWAYLAND),y)
+CAGE_CONF_OPTS = -Dxwayland=true
+else
+CAGE_CONF_OPTS = -Dxwayland=false
+endif
+
+$(eval $(meson-package))
-- 
2.21.0

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [Buildroot] [RFC PATCH/next 1/2] package/wlroots: new package
  2019-05-16 22:08 ` [Buildroot] [RFC PATCH/next 1/2] package/wlroots: new package Adrian Perez de Castro
@ 2019-05-17  7:48   ` Thomas Petazzoni
  2019-06-12 23:41     ` Adrian Perez de Castro
  2019-05-18 15:47   ` François Perrad
  1 sibling, 1 reply; 9+ messages in thread
From: Thomas Petazzoni @ 2019-05-17  7:48 UTC (permalink / raw)
  To: buildroot

Hello,

On Fri, 17 May 2019 01:08:35 +0300
Adrian Perez de Castro <aperez@igalia.com> wrote:

> diff --git a/package/wlroots/Config.in b/package/wlroots/Config.in
> new file mode 100644
> index 0000000000..45db63f62c
> --- /dev/null
> +++ b/package/wlroots/Config.in
> @@ -0,0 +1,65 @@
> +config BR2_PACKAGE_WLROOTS
> +	bool "wlroots"
> +	depends on !BR2_STATIC_LIBS # mesa3d, wayland

You're not selecting "mesa3d", so this "mesa3d" comment doesn't make
sense.

> +	depends on BR2_INSTALL_LIBSTDCPP # freedrp, mesa3d

You're not selecting freerdp nor mesa3d, so the comment doesn't make
sense either. This dependency doesn't seem to be needed at all.

> +	depends on BR2_TOOLCHAIN_HAS_THREADS # libdrm, wayland
> +	depends on BR2_TOOLCHAIN_HAS_SYNC_1 # mesa3d

This dependency doesn't seem to be needed, at least you don't use
mesa3d, and none of the packages you select has a "depends on
BR2_TOOLCHAIN_HAS_SYNC".

> +	depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # mesa3d

Same.


> +if BR2_PACKAGE_WLROOTS
> +
> +config BR2_PACKAGE_WLROOTS_RDP
> +	bool "RDP backend support"
> +	depends on BR2_PACKAGE_FREERDP

If you "depends on" something...

> +	depends on BR2_USE_WCHAR # freerdp
> +	depends on BR2_USE_MMU # libglib2
> +	depends on BR2_TOOLCHAIN_HAS_SYNC_4 # freerdp

... there's no point in replicating its dependencies.

> +WLROOTS_VERSION = 0.6.0
> +WLROOTS_SITE = https://github.com/swaywm/wlroots/archive
> +WLROOTS_SOURCE = $(WLROOTS_VERSION).tar.gz
> +WLROOTS_LICENSE = MIT
> +WLROOTS_INSTALL_STAGING = YES
> +
> +WLROOTS_DEPENDENCIES = host-pkgconf host-wayland libegl libinput \
> +					   libxkbcommon mesa3d pixman udev \

Ah, so you have mesa3d in your dependencies, but you don't select it ?

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] [RFC PATCH/next 2/2] package/cage: new package
  2019-05-16 22:08 ` [Buildroot] [RFC PATCH/next 2/2] package/cage: " Adrian Perez de Castro
@ 2019-05-17  9:21   ` Thomas Petazzoni
  2019-06-12 22:43     ` Adrian Perez de Castro
  0 siblings, 1 reply; 9+ messages in thread
From: Thomas Petazzoni @ 2019-05-17  9:21 UTC (permalink / raw)
  To: buildroot

Hello Adrian,

On Fri, 17 May 2019 01:08:36 +0300
Adrian Perez de Castro <aperez@igalia.com> wrote:

> diff --git a/package/cage/0001-Updates-for-wlroots-0.6.0.patch b/package/cage/0001-Updates-for-wlroots-0.6.0.patch
> new file mode 100644
> index 0000000000..57e5a1289a
> --- /dev/null
> +++ b/package/cage/0001-Updates-for-wlroots-0.6.0.patch
> @@ -0,0 +1,264 @@
> +From 86b9d6719e52cbddda4fb6d055e60e9caf9a57ff Mon Sep 17 00:00:00 2001
> +From: Jente Hidskes <hjdskes@gmail.com>
> +Date: Fri, 3 May 2019 19:39:19 +0200
> +Subject: [PATCH 1/3] CI: use wlroots 0.6.0
> +
> +Signed-off-by: Adrian Perez de Castro <aperez@igalia.com>
> +[Upstream status: https://github.com/Hjdskes/cage/pull/65]
> +
> +---
> + .builds/alpine.yml    | 4 ++--
> + .builds/archlinux.yml | 4 ++--
> + .builds/freebsd.yml   | 4 ++--
> + 3 files changed, 6 insertions(+), 6 deletions(-)

These CI related changes are really not relevant in the context of
Buildroot.

> +From 08ecd52a3313d00d06cc4e12d4d3243865af5dd0 Mon Sep 17 00:00:00 2001
> +From: Drew DeVault <sir@cmpwn.com>
> +Date: Thu, 25 Apr 2019 11:40:25 -0400
> +Subject: [PATCH 2/3] Update to wlroots 0.6.0

Please use one .patch file for each patch.

Your SoB is missing.


> +From 711aebb4d20848d2d9052e0483cd301c7022b844 Mon Sep 17 00:00:00 2001
> +From: Jente Hidskes <hjdskes@gmail.com>
> +Date: Fri, 3 May 2019 20:53:19 +0200
> +Subject: [PATCH 3/3] output: don't submit too much damage
> +
> +See https://github.com/swaywm/wlroots/issues/1666#issue-436967396 and
> +the linked changes
> +https://github.com/swaywm/wlroots/pull/1668/files#diff-95fe5e5b411cc64a5dc31e2b72669a0d

Ditto.


> + 		view_for_each_surface(view, send_frame_done, &now);
> diff --git a/package/cage/Config.in b/package/cage/Config.in
> new file mode 100644
> index 0000000000..07dc4c9da3
> --- /dev/null
> +++ b/package/cage/Config.in
> @@ -0,0 +1,24 @@
> +config BR2_PACKAGE_CAGE
> +	bool "cage"
> +	depends on !BR2_STATIC_LIBS # wlroots
> +	depends on BR2_TOOLCHAIN_HAS_THREADS # wlroots

wlroots (in your submission) has plenty of other depends on you need to
replicate:

+	depends on !BR2_STATIC_LIBS # mesa3d, wayland
+	depends on BR2_INSTALL_LIBSTDCPP # freedrp, mesa3d
+	depends on BR2_TOOLCHAIN_HAS_THREADS # libdrm, wayland
+	depends on BR2_TOOLCHAIN_HAS_SYNC_1 # mesa3d
+	depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # mesa3d
+	depends on BR2_ENABLE_LOCALE # libinput
+	depends on BR2_PACKAGE_HAS_UDEV # libinput
+	depends on BR2_PACKAGE_HAS_LIBEGL
+	depends on BR2_PACKAGE_HAS_LIBEGL_WAYLAND
+	depends on BR2_PACKAGE_HAS_LIBGLES

> +	select BR2_PACKAGE_WLROOTS
> +	help
> +	  Kiosk compositor for Wayland, which displays a single
> +	  maximized application at a time.
> +
> +	  https://www.hjdskes.nl/projects/cage/
> +
> +if BR2_PACKAGE_CAGE
> +
> +config BR2_PACKAGE_CAGE_XWAYLAND
> +	bool "XWayland support"
> +	depends on BR2_PACKAGE_XORG7 # wlroots

Not necessary, because you have a "depends on
BR2_PACKAGE_WLROOTS_XWAYLAND" below.

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] [RFC PATCH/next 1/2] package/wlroots: new package
  2019-05-16 22:08 ` [Buildroot] [RFC PATCH/next 1/2] package/wlroots: new package Adrian Perez de Castro
  2019-05-17  7:48   ` Thomas Petazzoni
@ 2019-05-18 15:47   ` François Perrad
  2019-06-12 23:31     ` Adrian Perez de Castro
  1 sibling, 1 reply; 9+ messages in thread
From: François Perrad @ 2019-05-18 15:47 UTC (permalink / raw)
  To: buildroot

Le ven. 17 mai 2019 ? 00:09, Adrian Perez de Castro <aperez@igalia.com> a
?crit :

> wlroots is a modular library which provides building blocks to
> implement Wayland compositors. wlroots is a dependency of the
> Cage Wayland compositor.
>
> https://github.com/swaywm/wlroots/
>
> Signed-off-by: Adrian Perez de Castro <aperez@igalia.com>
> ---
>  package/Config.in            |  1 +
>  package/wlroots/Config.in    | 65 +++++++++++++++++++++++++++++
>  package/wlroots/wlroots.hash |  5 +++
>  package/wlroots/wlroots.mk   | 80 ++++++++++++++++++++++++++++++++++++
>  4 files changed, 151 insertions(+)
>  create mode 100644 package/wlroots/Config.in
>  create mode 100644 package/wlroots/wlroots.hash
>  create mode 100644 package/wlroots/wlroots.mk
>
> diff --git a/package/Config.in b/package/Config.in
> index f592e74a99..5b1f279b8e 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -1341,6 +1341,7 @@ menu "Graphics"
>         source "package/waylandpp/Config.in"
>         source "package/webkitgtk/Config.in"
>         source "package/webp/Config.in"
> +       source "package/wlroots/Config.in"
>         source "package/woff2/Config.in"
>         source "package/wpebackend-fdo/Config.in"
>         source "package/wpewebkit/Config.in"
> diff --git a/package/wlroots/Config.in b/package/wlroots/Config.in
> new file mode 100644
> index 0000000000..45db63f62c
> --- /dev/null
> +++ b/package/wlroots/Config.in
> @@ -0,0 +1,65 @@
> +config BR2_PACKAGE_WLROOTS
> +       bool "wlroots"
> +       depends on !BR2_STATIC_LIBS # mesa3d, wayland
> +       depends on BR2_INSTALL_LIBSTDCPP # freedrp, mesa3d
> +       depends on BR2_TOOLCHAIN_HAS_THREADS # libdrm, wayland
> +       depends on BR2_TOOLCHAIN_HAS_SYNC_1 # mesa3d
> +       depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # mesa3d
> +       depends on BR2_ENABLE_LOCALE # libinput
> +       depends on BR2_PACKAGE_HAS_UDEV # libinput
> +       depends on BR2_PACKAGE_HAS_LIBEGL
> +       depends on BR2_PACKAGE_HAS_LIBEGL_WAYLAND
> +       depends on BR2_PACKAGE_HAS_LIBGLES
> +       select BR2_PACKAGE_LIBDRM
> +       select BR2_PACKAGE_LIBINPUT
> +       select BR2_PACKAGE_LIBXKBCOMMON
> +       select BR2_PACKAGE_PIXMAN
> +       select BR2_PACKAGE_WAYLAND
> +       select BR2_PACKAGE_WAYLAND_PROTOCOLS
> +       help
> +         wlroots is a modular Wayland library for building compositors
> +         which implements many of their common features.
> +
> +         https://github.com/swaywm/wlroots
> +
> +if BR2_PACKAGE_WLROOTS
> +
> +config BR2_PACKAGE_WLROOTS_RDP
> +       bool "RDP backend support"
> +       depends on BR2_PACKAGE_FREERDP
> +       depends on BR2_USE_WCHAR # freerdp
> +       depends on BR2_USE_MMU # libglib2
> +       depends on BR2_TOOLCHAIN_HAS_SYNC_4 # freerdp
> +       help
> +         Support Wayland sessions served using the RDP protocol
> +
> +comment "RDP backend support needs FreeRDP"
> +       depends on !BR2_PACKAGE_FREERDP
> +
> +config BR2_PACKAGE_WLROOTS_X11
> +       bool "X11 backend support"
> +       depends on BR2_PACKAGE_XORG7
> +       select BR2_PACKAGE_LIBXCB
> +       select BR2_PACKAGE_XLIB_LIBX11
> +       help
> +         Support Wayland sessions nested inside a X11 window
> +
> +comment "X11 backend support needs X.org enabled"
> +       depends on !BR2_PACKAGE_XORG7
> +
> +config BR2_PACKAGE_WLROOTS_XWAYLAND
> +       bool "XWayland support"
> +       depends on BR2_PACKAGE_XORG7
> +       select BR2_PACKAGE_LIBXCB
> +       help
> +         Enable support for XWayland
> +
> +comment "XWayland support needs X.org enabled"
> +       depends on !BR2_PACKAGE_XORG7
> +
> +config BR2_PACKAGE_WLROOTS_ROOTSTON
> +       bool "rootston"
> +       help
> +         Build and install the rootston example compositor
> +
> +endif
> diff --git a/package/wlroots/wlroots.hash b/package/wlroots/wlroots.hash
> new file mode 100644
> index 0000000000..dbb387a865
> --- /dev/null
> +++ b/package/wlroots/wlroots.hash
> @@ -0,0 +1,5 @@
> +# Generated locally
> +sha256 9cf3716f3683d800df8b150f256ff66dad65faf13a9d67c284f67a9444d28c70
> 0.6.0.tar.gz
> +
> +# Hashes for license files:
> +sha256 ffd3737a478b83a8b51b42757d3bf909ef36694508355879722e11fc1fa6736b
> LICENSE
> diff --git a/package/wlroots/wlroots.mk b/package/wlroots/wlroots.mk
> new file mode 100644
> index 0000000000..9d3581fd6f
> --- /dev/null
> +++ b/package/wlroots/wlroots.mk
> @@ -0,0 +1,80 @@
>
> +################################################################################
> +#
> +# wlroots
> +#
>
> +################################################################################
> +
> +WLROOTS_VERSION = 0.6.0
> +WLROOTS_SITE = https://github.com/swaywm/wlroots/archive
> +WLROOTS_SOURCE = $(WLROOTS_VERSION).tar.gz
> +WLROOTS_LICENSE = MIT
> +WLROOTS_INSTALL_STAGING = YES
> +
> +WLROOTS_DEPENDENCIES = host-pkgconf host-wayland libegl libinput \
> +                                          libxkbcommon mesa3d pixman udev
> \
> +                                          wayland wayland-protocols
>

wlroots has the same issue as WPEBackend-fdo:
>>> wlroots 0.6.0 Configuring

Native dependency wayland-scanner found: YES 1.17.0
Program /usr/bin/wayland-scanner found: NO

protocol/meson.build:5:1: ERROR: Program(s) ['/usr/bin/wayland-scanner']
not found or not executable

Fran?ois


> +
> +WLROOTS_CONF_OPTS = -Dexamples=false
> +
> +ifeq ($(BR2_PACKAGE_FFMPEG),y)
> +WLROOTS_DEPENDENCIES += ffmpeg
> +endif
> +
> +ifeq ($(BR2_PACKAGE_LIBCAP),y)
> +WLROOTS_CONF_OPTS += -Dlibcap=enabled
> +WLROOTS_DEPENDENCIES += libcap
> +else
> +WLROOTS_CONF_OPTS += -Dlibcap=disabled
> +endif
> +
> +ifeq ($(BR2_PACKAGE_LIBPNG),y)
> +WLROOTS_DEPENDENCIES += libpng
> +endif
> +
> +ifeq ($(BR2_PACKAGE_SYSTEMD_LOGIND),y)
> +WLROOTS_CONF_OPTS += -Dlogind=enabled -Dlogind-provider=systemd
> +WLROOTS_DEPENDENCIES += systemd
> +else
> +WLROOTS_CONF_OPTS += -Dlogind=disabled
> +endif
> +
> +ifeq ($(BR2_PACKAGE_WLROOTS_RDP),y)
> +WLROOTS_CONF_OPTS += -Dfreerdp=enabled
> +WLROOTS_DEPENDENCIES += freerdp
> +else
> +WLROOTS_CONF_OPTS += -Dfreerdp=disabled
> +endif
> +
> +ifeq ($(BR2_PACKAGE_WLROOTS_X11),y)
> +WLROOTS_CONF_OPTS += -Dx11-backend=enabled
> +WLROOTS_DEPENDENCIES += xlib_libX11
> +else
> +WLROOTS_CONF_OPTS += -Dx11-backend=disabled
> +endif
> +
> +ifeq ($(BR2_PACKAGE_WLROOTS_XWAYLAND),y)
> +WLROOTS_CONF_OPTS += -Dxwayland=enabled
> +WLROOTS_DEPENDENCIES += libxcb
> +ifeq ($(BR2_PACKAGE_XCB_UTIL),y)
> +WLROOTS_CONF_OPTS += -Dxcb-errors=enabled
> +WLROOTS_DEPENDENCIES += xcb-util
> +else
> +WLROOTS_CONF_OPTS += -Dxcb-errors=disabled
> +endif
> +ifeq ($(BR2_PACKAGE_XCB_UTIL_WM),y)
> +WLROOTS_CONF_OPTS += -Dxcb-icccm=enabled
> +WLROOTS_DEPENDENCIES += xcb-util-wm
> +else
> +WLROOTS_CONF_OPTS += -Dxcb-icccm=disabled
> +endif
> +else
> +WLROOTS_CONF_OPTS += -Dxwayland=disabled -Dxcb-errors=disabled
> -Dxcb-icccm=disabled
> +endif
> +
> +ifeq ($(BR2_PACKAGE_WLROOTS_ROOTSTON),y)
> +WLROOTS_CONF_OPTS += -Drootston=true
> +else
> +WLROOTS_CONF_OPTS += -Drootston=false
> +endif
> +
> +$(eval $(meson-package))
> --
> 2.21.0
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20190518/1f00d5f1/attachment.html>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] [RFC PATCH/next 2/2] package/cage: new package
  2019-05-17  9:21   ` Thomas Petazzoni
@ 2019-06-12 22:43     ` Adrian Perez de Castro
  0 siblings, 0 replies; 9+ messages in thread
From: Adrian Perez de Castro @ 2019-06-12 22:43 UTC (permalink / raw)
  To: buildroot

Hi,

On Fri, 17 May 2019 11:21:07 +0200, Thomas Petazzoni <thomas.petazzoni@bootlin.com> wrote:
> Hello Adrian,
> 
> On Fri, 17 May 2019 01:08:36 +0300
> Adrian Perez de Castro <aperez@igalia.com> wrote:
> 
> > diff --git a/package/cage/0001-Updates-for-wlroots-0.6.0.patch b/package/cage/0001-Updates-for-wlroots-0.6.0.patch
> > new file mode 100644
> > index 0000000000..57e5a1289a
> > --- /dev/null
> > +++ b/package/cage/0001-Updates-for-wlroots-0.6.0.patch
> > @@ -0,0 +1,264 @@
> > +From 86b9d6719e52cbddda4fb6d055e60e9caf9a57ff Mon Sep 17 00:00:00 2001
> > +From: Jente Hidskes <hjdskes@gmail.com>
> > +Date: Fri, 3 May 2019 19:39:19 +0200
> > +Subject: [PATCH 1/3] CI: use wlroots 0.6.0
> > +
> > +Signed-off-by: Adrian Perez de Castro <aperez@igalia.com>
> > +[Upstream status: https://github.com/Hjdskes/cage/pull/65]
> > +
> > +---
> > + .builds/alpine.yml    | 4 ++--
> > + .builds/archlinux.yml | 4 ++--
> > + .builds/freebsd.yml   | 4 ++--
> > + 3 files changed, 6 insertions(+), 6 deletions(-)
> 
> These CI related changes are really not relevant in the context of
> Buildroot.
> 
> > +From 08ecd52a3313d00d06cc4e12d4d3243865af5dd0 Mon Sep 17 00:00:00 2001
> > +From: Drew DeVault <sir@cmpwn.com>
> > +Date: Thu, 25 Apr 2019 11:40:25 -0400
> > +Subject: [PATCH 2/3] Update to wlroots 0.6.0
> 
> Please use one .patch file for each patch.
> 
> Your SoB is missing.

I have been waiting for the release of Cage 0.1.1 [1], which makes this
patch unneeded and I will drop it in v2 of the patch set.


> > +From 711aebb4d20848d2d9052e0483cd301c7022b844 Mon Sep 17 00:00:00 2001
> > +From: Jente Hidskes <hjdskes@gmail.com>
> > +Date: Fri, 3 May 2019 20:53:19 +0200
> > +Subject: [PATCH 3/3] output: don't submit too much damage
> > +
> > +See https://github.com/swaywm/wlroots/issues/1666#issue-436967396 and
> > +the linked changes
> > +https://github.com/swaywm/wlroots/pull/1668/files#diff-95fe5e5b411cc64a5dc31e2b72669a0d
> 
> Ditto.
> 
> 
> > + 		view_for_each_surface(view, send_frame_done, &now);
> > diff --git a/package/cage/Config.in b/package/cage/Config.in
> > new file mode 100644
> > index 0000000000..07dc4c9da3
> > --- /dev/null
> > +++ b/package/cage/Config.in
> > @@ -0,0 +1,24 @@
> > +config BR2_PACKAGE_CAGE
> > +	bool "cage"
> > +	depends on !BR2_STATIC_LIBS # wlroots
> > +	depends on BR2_TOOLCHAIN_HAS_THREADS # wlroots
> 
> wlroots (in your submission) has plenty of other depends on you need to
> replicate:
> 
> +	depends on !BR2_STATIC_LIBS # mesa3d, wayland
> +	depends on BR2_INSTALL_LIBSTDCPP # freedrp, mesa3d
> +	depends on BR2_TOOLCHAIN_HAS_THREADS # libdrm, wayland
> +	depends on BR2_TOOLCHAIN_HAS_SYNC_1 # mesa3d
> +	depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # mesa3d
> +	depends on BR2_ENABLE_LOCALE # libinput
> +	depends on BR2_PACKAGE_HAS_UDEV # libinput
> +	depends on BR2_PACKAGE_HAS_LIBEGL
> +	depends on BR2_PACKAGE_HAS_LIBEGL_WAYLAND
> +	depends on BR2_PACKAGE_HAS_LIBGLES

It would be nice if those would be automagically propagated?I always end
up messing them in one way or another when adding new packages O:-)

I'll review them for v2.

> > +	select BR2_PACKAGE_WLROOTS
> > +	help
> > +	  Kiosk compositor for Wayland, which displays a single
> > +	  maximized application at a time.
> > +
> > +	  https://www.hjdskes.nl/projects/cage/
> > +
> > +if BR2_PACKAGE_CAGE
> > +
> > +config BR2_PACKAGE_CAGE_XWAYLAND
> > +	bool "XWayland support"
> > +	depends on BR2_PACKAGE_XORG7 # wlroots
> 
> Not necessary, because you have a "depends on
> BR2_PACKAGE_WLROOTS_XWAYLAND" below.

True.

Thanks for the review,
?Adri?n

---
[1] https://github.com/Hjdskes/cage/releases/tag/v0.1.1

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20190613/1c93ffa6/attachment.asc>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] [RFC PATCH/next 1/2] package/wlroots: new package
  2019-05-18 15:47   ` François Perrad
@ 2019-06-12 23:31     ` Adrian Perez de Castro
  0 siblings, 0 replies; 9+ messages in thread
From: Adrian Perez de Castro @ 2019-06-12 23:31 UTC (permalink / raw)
  To: buildroot

Hello Fran?ois,

On Sat, 18 May 2019 17:47:09 +0200, Fran?ois Perrad <francois.perrad@gadz.org> wrote:
> Le ven. 17 mai 2019 ? 00:09, Adrian Perez de Castro <aperez@igalia.com> a
> ?crit :
> 
> > wlroots is a modular library which provides building blocks to
> > implement Wayland compositors. wlroots is a dependency of the
> > Cage Wayland compositor.
> >
> > https://github.com/swaywm/wlroots/
> >
> > Signed-off-by: Adrian Perez de Castro <aperez@igalia.com>
> > ---
> >  package/Config.in            |  1 +
> >  package/wlroots/Config.in    | 65 +++++++++++++++++++++++++++++
> >  package/wlroots/wlroots.hash |  5 +++
> >  package/wlroots/wlroots.mk   | 80 ++++++++++++++++++++++++++++++++++++
> >  4 files changed, 151 insertions(+)
> >  create mode 100644 package/wlroots/Config.in
> >  create mode 100644 package/wlroots/wlroots.hash
> >  create mode 100644 package/wlroots/wlroots.mk
> >
> > diff --git a/package/Config.in b/package/Config.in
> > index f592e74a99..5b1f279b8e 100644
> > --- a/package/Config.in
> > +++ b/package/Config.in
> > @@ -1341,6 +1341,7 @@ menu "Graphics"
> >         source "package/waylandpp/Config.in"
> >         source "package/webkitgtk/Config.in"
> >         source "package/webp/Config.in"
> > +       source "package/wlroots/Config.in"
> >         source "package/woff2/Config.in"
> >         source "package/wpebackend-fdo/Config.in"
> >         source "package/wpewebkit/Config.in"
> > diff --git a/package/wlroots/Config.in b/package/wlroots/Config.in
> > new file mode 100644
> > index 0000000000..45db63f62c
> > --- /dev/null
> > +++ b/package/wlroots/Config.in
> > @@ -0,0 +1,65 @@
> > +config BR2_PACKAGE_WLROOTS
> > +       bool "wlroots"
> > +       depends on !BR2_STATIC_LIBS # mesa3d, wayland
> > +       depends on BR2_INSTALL_LIBSTDCPP # freedrp, mesa3d
> > +       depends on BR2_TOOLCHAIN_HAS_THREADS # libdrm, wayland
> > +       depends on BR2_TOOLCHAIN_HAS_SYNC_1 # mesa3d
> > +       depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # mesa3d
> > +       depends on BR2_ENABLE_LOCALE # libinput
> > +       depends on BR2_PACKAGE_HAS_UDEV # libinput
> > +       depends on BR2_PACKAGE_HAS_LIBEGL
> > +       depends on BR2_PACKAGE_HAS_LIBEGL_WAYLAND
> > +       depends on BR2_PACKAGE_HAS_LIBGLES
> > +       select BR2_PACKAGE_LIBDRM
> > +       select BR2_PACKAGE_LIBINPUT
> > +       select BR2_PACKAGE_LIBXKBCOMMON
> > +       select BR2_PACKAGE_PIXMAN
> > +       select BR2_PACKAGE_WAYLAND
> > +       select BR2_PACKAGE_WAYLAND_PROTOCOLS
> > +       help
> > +         wlroots is a modular Wayland library for building compositors
> > +         which implements many of their common features.
> > +
> > +         https://github.com/swaywm/wlroots
> > +
> > +if BR2_PACKAGE_WLROOTS
> > +
> > +config BR2_PACKAGE_WLROOTS_RDP
> > +       bool "RDP backend support"
> > +       depends on BR2_PACKAGE_FREERDP
> > +       depends on BR2_USE_WCHAR # freerdp
> > +       depends on BR2_USE_MMU # libglib2
> > +       depends on BR2_TOOLCHAIN_HAS_SYNC_4 # freerdp
> > +       help
> > +         Support Wayland sessions served using the RDP protocol
> > +
> > +comment "RDP backend support needs FreeRDP"
> > +       depends on !BR2_PACKAGE_FREERDP
> > +
> > +config BR2_PACKAGE_WLROOTS_X11
> > +       bool "X11 backend support"
> > +       depends on BR2_PACKAGE_XORG7
> > +       select BR2_PACKAGE_LIBXCB
> > +       select BR2_PACKAGE_XLIB_LIBX11
> > +       help
> > +         Support Wayland sessions nested inside a X11 window
> > +
> > +comment "X11 backend support needs X.org enabled"
> > +       depends on !BR2_PACKAGE_XORG7
> > +
> > +config BR2_PACKAGE_WLROOTS_XWAYLAND
> > +       bool "XWayland support"
> > +       depends on BR2_PACKAGE_XORG7
> > +       select BR2_PACKAGE_LIBXCB
> > +       help
> > +         Enable support for XWayland
> > +
> > +comment "XWayland support needs X.org enabled"
> > +       depends on !BR2_PACKAGE_XORG7
> > +
> > +config BR2_PACKAGE_WLROOTS_ROOTSTON
> > +       bool "rootston"
> > +       help
> > +         Build and install the rootston example compositor
> > +
> > +endif
> > diff --git a/package/wlroots/wlroots.hash b/package/wlroots/wlroots.hash
> > new file mode 100644
> > index 0000000000..dbb387a865
> > --- /dev/null
> > +++ b/package/wlroots/wlroots.hash
> > @@ -0,0 +1,5 @@
> > +# Generated locally
> > +sha256 9cf3716f3683d800df8b150f256ff66dad65faf13a9d67c284f67a9444d28c70
> > 0.6.0.tar.gz
> > +
> > +# Hashes for license files:
> > +sha256 ffd3737a478b83a8b51b42757d3bf909ef36694508355879722e11fc1fa6736b
> > LICENSE
> > diff --git a/package/wlroots/wlroots.mk b/package/wlroots/wlroots.mk
> > new file mode 100644
> > index 0000000000..9d3581fd6f
> > --- /dev/null
> > +++ b/package/wlroots/wlroots.mk
> > @@ -0,0 +1,80 @@
> >
> > +################################################################################
> > +#
> > +# wlroots
> > +#
> >
> > +################################################################################
> > +
> > +WLROOTS_VERSION = 0.6.0
> > +WLROOTS_SITE = https://github.com/swaywm/wlroots/archive
> > +WLROOTS_SOURCE = $(WLROOTS_VERSION).tar.gz
> > +WLROOTS_LICENSE = MIT
> > +WLROOTS_INSTALL_STAGING = YES
> > +
> > +WLROOTS_DEPENDENCIES = host-pkgconf host-wayland libegl libinput \
> > +                                          libxkbcommon mesa3d pixman udev
> > \
> > +                                          wayland wayland-protocols
> >
> 
> wlroots has the same issue as WPEBackend-fdo:
> >>> wlroots 0.6.0 Configuring
> 
> Native dependency wayland-scanner found: YES 1.17.0
> Program /usr/bin/wayland-scanner found: NO
> 
> protocol/meson.build:5:1: ERROR: Program(s) ['/usr/bin/wayland-scanner']
> not found or not executable

Good catch, somehow I missed this when checking the build logs for my test
build before submitting.

I have proposed a patch to be applied upstream [1], which I will include
as part of the improvements in v2 of the patchset =)

> > +
> > +WLROOTS_CONF_OPTS = -Dexamples=false
> > +
> > +ifeq ($(BR2_PACKAGE_FFMPEG),y)
> > +WLROOTS_DEPENDENCIES += ffmpeg
> > +endif
> > +
> > +ifeq ($(BR2_PACKAGE_LIBCAP),y)
> > +WLROOTS_CONF_OPTS += -Dlibcap=enabled
> > +WLROOTS_DEPENDENCIES += libcap
> > +else
> > +WLROOTS_CONF_OPTS += -Dlibcap=disabled
> > +endif
> > +
> > +ifeq ($(BR2_PACKAGE_LIBPNG),y)
> > +WLROOTS_DEPENDENCIES += libpng
> > +endif
> > +
> > +ifeq ($(BR2_PACKAGE_SYSTEMD_LOGIND),y)
> > +WLROOTS_CONF_OPTS += -Dlogind=enabled -Dlogind-provider=systemd
> > +WLROOTS_DEPENDENCIES += systemd
> > +else
> > +WLROOTS_CONF_OPTS += -Dlogind=disabled
> > +endif
> > +
> > +ifeq ($(BR2_PACKAGE_WLROOTS_RDP),y)
> > +WLROOTS_CONF_OPTS += -Dfreerdp=enabled
> > +WLROOTS_DEPENDENCIES += freerdp
> > +else
> > +WLROOTS_CONF_OPTS += -Dfreerdp=disabled
> > +endif
> > +
> > +ifeq ($(BR2_PACKAGE_WLROOTS_X11),y)
> > +WLROOTS_CONF_OPTS += -Dx11-backend=enabled
> > +WLROOTS_DEPENDENCIES += xlib_libX11
> > +else
> > +WLROOTS_CONF_OPTS += -Dx11-backend=disabled
> > +endif
> > +
> > +ifeq ($(BR2_PACKAGE_WLROOTS_XWAYLAND),y)
> > +WLROOTS_CONF_OPTS += -Dxwayland=enabled
> > +WLROOTS_DEPENDENCIES += libxcb
> > +ifeq ($(BR2_PACKAGE_XCB_UTIL),y)
> > +WLROOTS_CONF_OPTS += -Dxcb-errors=enabled
> > +WLROOTS_DEPENDENCIES += xcb-util
> > +else
> > +WLROOTS_CONF_OPTS += -Dxcb-errors=disabled
> > +endif
> > +ifeq ($(BR2_PACKAGE_XCB_UTIL_WM),y)
> > +WLROOTS_CONF_OPTS += -Dxcb-icccm=enabled
> > +WLROOTS_DEPENDENCIES += xcb-util-wm
> > +else
> > +WLROOTS_CONF_OPTS += -Dxcb-icccm=disabled
> > +endif
> > +else
> > +WLROOTS_CONF_OPTS += -Dxwayland=disabled -Dxcb-errors=disabled
> > -Dxcb-icccm=disabled
> > +endif
> > +
> > +ifeq ($(BR2_PACKAGE_WLROOTS_ROOTSTON),y)
> > +WLROOTS_CONF_OPTS += -Drootston=true
> > +else
> > +WLROOTS_CONF_OPTS += -Drootston=false
> > +endif
> > +
> > +$(eval $(meson-package))
> > --
> > 2.21.0

Cheers,
?Adri?n

---
[1] https://github.com/swaywm/wlroots/pull/1722
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20190613/2572c9cc/attachment.asc>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] [RFC PATCH/next 1/2] package/wlroots: new package
  2019-05-17  7:48   ` Thomas Petazzoni
@ 2019-06-12 23:41     ` Adrian Perez de Castro
  0 siblings, 0 replies; 9+ messages in thread
From: Adrian Perez de Castro @ 2019-06-12 23:41 UTC (permalink / raw)
  To: buildroot

On Fri, 17 May 2019 09:48:23 +0200, Thomas Petazzoni <thomas.petazzoni@bootlin.com> wrote:
> Hello,
> 
> On Fri, 17 May 2019 01:08:35 +0300
> Adrian Perez de Castro <aperez@igalia.com> wrote:
> 
> > diff --git a/package/wlroots/Config.in b/package/wlroots/Config.in
> > new file mode 100644
> > index 0000000000..45db63f62c
> > --- /dev/null
> > +++ b/package/wlroots/Config.in
> > @@ -0,0 +1,65 @@
> > +config BR2_PACKAGE_WLROOTS
> > +	bool "wlroots"
> > +	depends on !BR2_STATIC_LIBS # mesa3d, wayland
> 
> You're not selecting "mesa3d", so this "mesa3d" comment doesn't make
> sense.
> 
> > +	depends on BR2_INSTALL_LIBSTDCPP # freedrp, mesa3d
> 
> You're not selecting freerdp nor mesa3d, so the comment doesn't make
> sense either. This dependency doesn't seem to be needed at all.
> 
> > +	depends on BR2_TOOLCHAIN_HAS_THREADS # libdrm, wayland
> > +	depends on BR2_TOOLCHAIN_HAS_SYNC_1 # mesa3d
> 
> This dependency doesn't seem to be needed, at least you don't use
> mesa3d, and none of the packages you select has a "depends on
> BR2_TOOLCHAIN_HAS_SYNC".
> 
> > +	depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # mesa3d
> 
> Same.
> 
> 
> > +if BR2_PACKAGE_WLROOTS
> > +
> > +config BR2_PACKAGE_WLROOTS_RDP
> > +	bool "RDP backend support"
> > +	depends on BR2_PACKAGE_FREERDP
> 
> If you "depends on" something...
> 
> > +	depends on BR2_USE_WCHAR # freerdp
> > +	depends on BR2_USE_MMU # libglib2
> > +	depends on BR2_TOOLCHAIN_HAS_SYNC_4 # freerdp
> 
> ... there's no point in replicating its dependencies.
> 
> > +WLROOTS_VERSION = 0.6.0
> > +WLROOTS_SITE = https://github.com/swaywm/wlroots/archive
> > +WLROOTS_SOURCE = $(WLROOTS_VERSION).tar.gz
> > +WLROOTS_LICENSE = MIT
> > +WLROOTS_INSTALL_STAGING = YES
> > +
> > +WLROOTS_DEPENDENCIES = host-pkgconf host-wayland libegl libinput \
> > +					   libxkbcommon mesa3d pixman udev \
> 
> Ah, so you have mesa3d in your dependencies, but you don't select it ?

I was just double checking now and... it's complicated. While in theory
Mesa is not strictly needed (any EGL driver with Wayland support should
do), then wlroots wants to *also* have libgbm which is part of Mesa...

While in theory other implementations of libgbm should work, there is none
other than Mesa's in Buildroot. Probably the best option here is to use:

    depends on BR2_PACKAGE_MESA3D_OPENGL_EGL
	depends on BR2_PACKAGE_MESA3D_OPENGL_ES

At least that's what other packages do ?\_(?)_/?

?Adri?n


P.S: I'll fix the depends/selects before submitting v2 of the patchset.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20190613/df430892/attachment.asc>

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-06-12 23:41 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-16 22:08 [Buildroot] [RFC PATCH/next 0/2] Add Cage and wlroots packages Adrian Perez de Castro
2019-05-16 22:08 ` [Buildroot] [RFC PATCH/next 1/2] package/wlroots: new package Adrian Perez de Castro
2019-05-17  7:48   ` Thomas Petazzoni
2019-06-12 23:41     ` Adrian Perez de Castro
2019-05-18 15:47   ` François Perrad
2019-06-12 23:31     ` Adrian Perez de Castro
2019-05-16 22:08 ` [Buildroot] [RFC PATCH/next 2/2] package/cage: " Adrian Perez de Castro
2019-05-17  9:21   ` Thomas Petazzoni
2019-06-12 22:43     ` Adrian Perez de Castro

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.