All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joseph Telaak <joseph@telaak.dev>
To: buildroot@buildroot.org
Cc: Adrian Perez de Castro <aperez@igalia.com>
Subject: [Buildroot] [PATCH 2/2] package/wpewebkit: add WPE Platform options
Date: Mon,  2 Nov 2026 17:49:15 -0500	[thread overview]
Message-ID: <20261102224915.69302-3-joseph@telaak.dev> (raw)
In-Reply-To: <20261102224915.69302-1-joseph@telaak.dev>

WPE Platform is the newer embedding API of WPE WebKit: the application
creates a WPEDisplay and WebKit renders through it, without libwpe or
a WPE backend. In 2.50 it is only enabled by default in developer
mode, so add an option for it, with sub-options for the DRM and
Wayland platforms. The headless platform has no dependencies and is
always built.

WPE Platform uses libmanette for gamepads when it finds it, so build
libmanette first when it is enabled.

The DRM platform needs libinput and libudev. It also needs GBM and
libdrm, which the existing USE_GBM and USE_LIBDRM blocks handle. It
imports buffers for scanout with GBM format modifiers, which not every
GBM provider supports, so, like cog, it depends on
BR2_PACKAGE_LIBGBM_HAS_FEATURE_FORMAT_MODIFIER_PLANE_COUNT, the
closest feature symbol. It does not use gbm_bo_get_fd, so unlike cog
it does not need the DMA_BUF feature.

The Wayland platform selects wayland and wayland-protocols even though
wpewebkit itself selects them today: that is only for wpebackend-fdo,
and the Wayland platform needs them on its own.

Every WPE Platform display compiles an XKB keymap with libxkbcommon.
Without the xkeyboard-config data this fails and the application
crashes, so select xkeyboard-config.

Pass ENABLE_WPE_PLATFORM explicitly in both cases, as upstream
enables it by default starting with 2.54.

Signed-off-by: Joseph Telaak <joseph@telaak.dev>
---
 package/wpewebkit/Config.in    | 38 ++++++++++++++++++++++++++++++++++
 package/wpewebkit/wpewebkit.mk | 24 +++++++++++++++++++++
 2 files changed, 62 insertions(+)

diff --git a/package/wpewebkit/Config.in b/package/wpewebkit/Config.in
index c624c697..3b7ea4fc 100644
--- a/package/wpewebkit/Config.in
+++ b/package/wpewebkit/Config.in
@@ -86,6 +86,44 @@ comment "sandboxing supports needs a toolchain w/ headers >= 3.17"
 	depends on BR2_PACKAGE_LIBSECCOMP_ARCH_SUPPORTS
 	depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
 
+config BR2_PACKAGE_WPEWEBKIT_WPE_PLATFORM
+	bool "WPE Platform API"
+	select BR2_PACKAGE_XKEYBOARD_CONFIG # runtime
+	help
+	  Build the WPE Platform API, an alternative to libwpe and WPE
+	  backends: the application creates a WPEDisplay (DRM, headless
+	  or Wayland) and WebKit renders through it. The headless
+	  platform is always included.
+
+	  The libwpe API remains available.
+
+if BR2_PACKAGE_WPEWEBKIT_WPE_PLATFORM
+
+config BR2_PACKAGE_WPEWEBKIT_WPE_PLATFORM_DRM
+	bool "DRM platform"
+	depends on BR2_PACKAGE_HAS_LIBGBM
+	depends on BR2_PACKAGE_LIBGBM_HAS_FEATURE_FORMAT_MODIFIER_PLANE_COUNT
+	depends on BR2_PACKAGE_HAS_LIBUDEV # libinput
+	select BR2_PACKAGE_LIBDRM
+	select BR2_PACKAGE_LIBINPUT
+	help
+	  Display directly through kernel mode-setting (KMS), without
+	  a compositor, with input from libinput.
+
+comment "DRM platform needs GBM w/ format modifiers and libudev"
+	depends on !BR2_PACKAGE_HAS_LIBGBM || \
+		!BR2_PACKAGE_LIBGBM_HAS_FEATURE_FORMAT_MODIFIER_PLANE_COUNT || \
+		!BR2_PACKAGE_HAS_LIBUDEV
+
+config BR2_PACKAGE_WPEWEBKIT_WPE_PLATFORM_WAYLAND
+	bool "Wayland platform"
+	select BR2_PACKAGE_WAYLAND
+	select BR2_PACKAGE_WAYLAND_PROTOCOLS
+	help
+	  Display as a client of a Wayland compositor.
+
+endif
+
 config BR2_PACKAGE_WPEWEBKIT_MULTIMEDIA
 	bool "multimedia support"
 	depends on BR2_PACKAGE_FFMPEG_ARCH_SUPPORTS # gst1-libav
diff --git a/package/wpewebkit/wpewebkit.mk b/package/wpewebkit/wpewebkit.mk
index ce4d1ad9..f9266d1a 100644
--- a/package/wpewebkit/wpewebkit.mk
+++ b/package/wpewebkit/wpewebkit.mk
@@ -94,6 +94,30 @@ else
 WPEWEBKIT_CONF_OPTS += -DENABLE_WEBDRIVER=OFF
 endif
 
+ifeq ($(BR2_PACKAGE_WPEWEBKIT_WPE_PLATFORM),y)
+WPEWEBKIT_CONF_OPTS += \
+	-DENABLE_WPE_PLATFORM=ON \
+	-DENABLE_WPE_PLATFORM_HEADLESS=ON
+# Gamepad support uses libmanette when it is found
+ifeq ($(BR2_PACKAGE_LIBMANETTE),y)
+WPEWEBKIT_DEPENDENCIES += libmanette
+endif
+ifeq ($(BR2_PACKAGE_WPEWEBKIT_WPE_PLATFORM_DRM),y)
+WPEWEBKIT_CONF_OPTS += -DENABLE_WPE_PLATFORM_DRM=ON
+WPEWEBKIT_DEPENDENCIES += libinput libudev
+else
+WPEWEBKIT_CONF_OPTS += -DENABLE_WPE_PLATFORM_DRM=OFF
+endif
+ifeq ($(BR2_PACKAGE_WPEWEBKIT_WPE_PLATFORM_WAYLAND),y)
+WPEWEBKIT_CONF_OPTS += -DENABLE_WPE_PLATFORM_WAYLAND=ON
+WPEWEBKIT_DEPENDENCIES += wayland wayland-protocols
+else
+WPEWEBKIT_CONF_OPTS += -DENABLE_WPE_PLATFORM_WAYLAND=OFF
+endif
+else
+WPEWEBKIT_CONF_OPTS += -DENABLE_WPE_PLATFORM=OFF
+endif
+
 ifeq ($(BR2_PACKAGE_FLITE),y)
 WPEWEBKIT_CONF_OPTS += -DENABLE_SPEECH_SYNTHESIS=ON
 WPEWEBKIT_DEPENDENCIES += flite
-- 
2.50.1 (Apple Git-155)

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  parent reply	other threads:[~2026-11-02 22:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-02 22:49 [Buildroot] [PATCH 0/2] package/wpewebkit: WPE Platform support Joseph Telaak
2026-11-02 22:49 ` [Buildroot] [PATCH 1/2] package/wpewebkit: add missing libxkbcommon dependency Joseph Telaak
2026-11-04 22:04   ` Thomas Petazzoni via buildroot
2026-11-05  0:21     ` Joseph Telaak
2026-11-02 22:49 ` Joseph Telaak [this message]
2026-11-04 22:09   ` [Buildroot] [PATCH 2/2] package/wpewebkit: add WPE Platform options Thomas Petazzoni via buildroot
2026-11-05  0:23     ` Joseph Telaak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261102224915.69302-3-joseph@telaak.dev \
    --to=joseph@telaak.dev \
    --cc=aperez@igalia.com \
    --cc=buildroot@buildroot.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.