Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh
CTL_FILE="/tmp/wpe-exported-wayland"
Comment thread
psaavedra marked this conversation as resolved.

if [ ! -p "$CTL_FILE" ]; then
echo "wpe-ctl: control FIFO not found: $CTL_FILE" >&2
exit 1
fi

printf '%s\n' "$*" >"$CTL_FILE"
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#!/bin/sh

# Disable sandboxing for WebKit (dangerous, use with caution)
# export WEBKIT_DISABLE_SANDBOX_THIS_IS_DANGEROUS=1

# Lower rank of AV1 decoder to disable it
export GST_PLUGIN_FEATURE_RANK="avdec_av1:0"

# Set directory for GStreamer debug output
# export GST_DEBUG_DUMP_DOT_DIR=/tmp/gst-out/
# mkdir -p /tmp/gst-out
# chmod 777 /tmp/gst-out

# FIFO path used for the wpe-simple-launcher --ctrl channel (see wpe-ctl)
CTL_FILE="/tmp/wpe-exported-wayland"
Comment thread
psaavedra marked this conversation as resolved.

# Enable DMA-BUF video sink in WebKit for efficient rendering.
# WebKitDMABufVideoSink sink that is able to accept decode
# dmabuf or raw data in a range of RGB-like or YUV formats.
# Bug: https://bugs.webkit.org/show_bug.cgi?id=279819
#
# Apply workaround only if running on raspberrypi5
if [ "$(hostname)" = "raspberrypi5" ]; then
export WEBKIT_GST_DMABUF_SINK_ENABLED=1
fi

# Regression in 2.48.X since
# [GStreamer] Add support for DMA-BUF to GL video sink
# https://bugs.webkit.org/show_bug.cgi?id=279672
# XXX Reported in : https://bugs.webkit.org/show_bug.cgi?id=288464
#
# Apply regression workaround only if running on raspberrypi5
if [ "$(hostname)" = "raspberrypi5" ]; then
export WEBKIT_GST_DISABLE_GL_SINK=1
fi

# Ensure Wayland and XDG runtime environment variables are propagated
WESTON_PID="$(pidof -s weston-keyboard 2>/dev/null || true)"
if [ -z "$WESTON_PID" ] || [ ! -r "/proc/$WESTON_PID/environ" ]; then
echo "wpe-exported-wayland: unable to read weston-keyboard environment" >&2
exit 1
fi

WAYLAND_DISPLAY="$(tr '\0' '\n' < "/proc/$WESTON_PID/environ" | grep -m1 '^WAYLAND_DISPLAY=')"
XDG_RUNTIME_DIR="$(tr '\0' '\n' < "/proc/$WESTON_PID/environ" | grep -m1 '^XDG_RUNTIME_DIR=')"
export "${WAYLAND_DISPLAY?}"
export "${XDG_RUNTIME_DIR?}"
Comment thread
Copilot marked this conversation as resolved.

# Check if the script is run as root and switch to the 'weston' user if needed
if [ "$(id -u)" -eq 0 ]; then
su -s /bin/sh weston -c 'ctl="$1"; shift; exec /usr/bin/wpe-simple-launcher --ctrl "$ctl" "$@"' sh "$CTL_FILE" "$@"
else
exec /usr/bin/wpe-simple-launcher --ctrl "$CTL_FILE" "$@"
fi
Comment thread
Copilot marked this conversation as resolved.
Comment on lines +49 to +54
24 changes: 24 additions & 0 deletions recipes-browser/wpe-simple-launcher/wpe-simple-launcher_git.bb
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
SUMMARY = "Simple WPE-based web launcher"
DESCRIPTION = "On-device WPEWebKit launcher that opens a URL and exposes a FIFO control channel through the wpe-ctl helper."
HOMEPAGE = "https://github.com/psaavedra/wpe-simple-launcher"

LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=dd93f6e0496294f589c3d561f96ffee4"

inherit meson pkgconfig

DEPENDS += "glib-2.0 wpewebkit"

SRC_URI = "git://github.com/psaavedra/wpe-simple-launcher.git;protocol=https;branch=main;destsuffix=${BP} \
file://wpe-ctl \
file://wpe-exported-wayland \
"
SRCREV = "522488025d1e68d039667bd897b3e8f4ee820061"

do_install:append() {
install -d ${D}${bindir}
install -m 0755 ${B}/wpe-simple-launcher ${D}${bindir}/wpe-simple-launcher
install -m 0755 ${UNPACKDIR}/wpe-ctl ${D}${bindir}/wpe-ctl
install -m 0755 ${UNPACKDIR}/wpe-exported-wayland ${D}${bindir}/wpe-exported-wayland
Comment on lines +18 to +22
}

2 changes: 1 addition & 1 deletion recipes-devtools/python/python-is-python3_1.0.bb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ do_install() {
}

FILES:${PN} += "${bindir}/python"
RDEPENDS:${PN} = "python3"
RDEPENDS:${PN} = "python3-core"
Comment thread
psaavedra marked this conversation as resolved.
RCONFLICTS:${PN} = "python"

BBCLASSEXTEND = "native nativesdk"
Loading