diff --git a/board/recalbox/patches/cage/0001-cage-hide-cursor.patch b/board/recalbox/patches/cage/0001-cage-hide-cursor.patch new file mode 100644 index 0000000000000000000000000000000000000000..9373abea8efd7ab77f96195c784f1f376c97b65a --- /dev/null +++ b/board/recalbox/patches/cage/0001-cage-hide-cursor.patch @@ -0,0 +1,58 @@ +diff --git a/cage.c b/cage.c +index f109788..6d27935 100644 +--- a/cage.c ++++ b/cage.c +@@ -208,6 +208,7 @@ usage(FILE *file, const char *cage) + fprintf(file, + "Usage: %s [OPTIONS] [--] APPLICATION\n" + "\n" ++ " -c\t Hide cursor\n" + " -d\t Don't draw client side decorations, when possible\n" + " -h\t Display this help message\n" + " -m extend Extend the display across all connected outputs (default)\n" +@@ -223,8 +224,11 @@ static bool + parse_args(struct cg_server *server, int argc, char *argv[]) + { + int c; +- while ((c = getopt(argc, argv, "dhm:sv")) != -1) { ++ while ((c = getopt(argc, argv, "cdhm:sv")) != -1) { + switch (c) { ++ case 'c': ++ server->hide_cursor = true; ++ break; + case 'd': + server->xdg_decoration = true; + break; +diff --git a/seat.c b/seat.c +index 8008dd9..9d068d0 100644 +--- a/seat.c ++++ b/seat.c +@@ -127,7 +127,7 @@ update_capabilities(struct cg_seat *seat) + wlr_seat_set_capabilities(seat->seat, caps); + + /* Hide cursor if the seat doesn't have pointer capability. */ +- if ((caps & WL_SEAT_CAPABILITY_POINTER) == 0) { ++ if ((caps & WL_SEAT_CAPABILITY_POINTER) == 0 || seat->server->hide_cursor == true) { + wlr_cursor_unset_image(seat->cursor); + } else { + wlr_cursor_set_xcursor(seat->cursor, seat->xcursor_manager, DEFAULT_XCURSOR); +@@ -482,7 +482,7 @@ handle_request_set_cursor(struct wl_listener *listener, void *data) + + /* This can be sent by any client, so we check to make sure + * this one actually has pointer focus first. */ +- if (focused_client == event->seat_client->client) { ++ if (focused_client == event->seat_client->client && seat->server->hide_cursor == false) { + wlr_cursor_set_surface(seat->cursor, event->surface, event->hotspot_x, event->hotspot_y); + } + } +index 9bf4430..ded1e8c 100644 +--- a/server.h ++++ b/server.h +@@ -60,6 +60,7 @@ struct cg_server { + bool allow_vt_switch; + bool return_app_code; + bool terminated; ++ bool hide_cursor; + }; + + #endif diff --git a/board/recalbox/patches/wlroots/0001-wlroots-fix-c23.patch b/board/recalbox/patches/wlroots/0001-wlroots-fix-c23.patch new file mode 100644 index 0000000000000000000000000000000000000000..f1cf2e8b3f3e9dde639d6ad4048ea6810bfb54b6 --- /dev/null +++ b/board/recalbox/patches/wlroots/0001-wlroots-fix-c23.patch @@ -0,0 +1,11 @@ +--- a/meson.build 2024-09-20 12:51:54.000000000 +0200 ++++ b/meson.build 2024-11-16 17:21:28.899996489 +0100 +@@ -5,7 +5,7 @@ + license: 'MIT', + meson_version: '>=0.59.0', + default_options: [ +- 'c_std=' + (meson.version().version_compare('>=1.3.0') ? 'c23,c11' : 'c11'), ++ 'c_std=' + (meson.version().version_compare('>=1.3.0') ? 'c2x,c11' : 'c11'), + 'warning_level=2', + 'werror=true', + ], diff --git a/board/recalbox/patches/wlroots/9999-backend-fix-build-against-gcc-14.patch b/board/recalbox/patches/wlroots/9999-backend-fix-build-against-gcc-14.patch deleted file mode 100644 index b8dccd2a14db1287a2b76adb7afa5dad805fc76a..0000000000000000000000000000000000000000 --- a/board/recalbox/patches/wlroots/9999-backend-fix-build-against-gcc-14.patch +++ /dev/null @@ -1,52 +0,0 @@ -From f3e1f7b2a70a500b740bfc406e893eba0852699a Mon Sep 17 00:00:00 2001 -From: Sergei Trofimovich -Date: Thu, 21 Dec 2023 21:06:20 +0000 -Subject: [PATCH] backend: fix build against upcoming `gcc-14` - (`-Werror=calloc-transposed-args`) - -`gcc-14` added a new `-Wcalloc-transposed-args` warning recently. It -detected minor infelicity in `calloc()` API usage in `wlroots`: - - ../backend/libinput/tablet_pad.c: In function 'add_pad_group_from_libinput': - ../backend/libinput/tablet_pad.c:36:38: error: 'calloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Werror=calloc-transposed-args] - 36 | group->rings = calloc(sizeof(unsigned int), group->ring_count); - | ^~~~~~~~ - ../backend/libinput/tablet_pad.c:36:38: note: earlier argument should specify number of elements, later size of each element ---- - backend/libinput/tablet_pad.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/backend/libinput/tablet_pad.c b/backend/libinput/tablet_pad.c -index 2e74022a58..e532752815 100644 ---- a/backend/libinput/tablet_pad.c -+++ b/backend/libinput/tablet_pad.c -@@ -33,7 +33,7 @@ static void add_pad_group_from_libinput(struct wlr_tablet_pad *pad, - ++group->ring_count; - } - } -- group->rings = calloc(sizeof(unsigned int), group->ring_count); -+ group->rings = calloc(group->ring_count, sizeof(unsigned int)); - if (group->rings == NULL) { - goto group_fail; - } -@@ -50,7 +50,7 @@ static void add_pad_group_from_libinput(struct wlr_tablet_pad *pad, - ++group->strip_count; - } - } -- group->strips = calloc(sizeof(unsigned int), group->strip_count); -+ group->strips = calloc(group->strip_count, sizeof(unsigned int)); - if (group->strips == NULL) { - goto group_fail; - } -@@ -66,7 +66,7 @@ static void add_pad_group_from_libinput(struct wlr_tablet_pad *pad, - ++group->button_count; - } - } -- group->buttons = calloc(sizeof(unsigned int), group->button_count); -+ group->buttons = calloc(group->button_count, sizeof(unsigned int)); - if (group->buttons == NULL) { - goto group_fail; - } --- -GitLab - diff --git a/custom/list.hash b/custom/list.hash index cfcad904db61e5eaffc6175e7f4a0b890f8af2b3..1154fe92bb68b8c74c162171fc878376b8ca6925 100644 --- a/custom/list.hash +++ b/custom/list.hash @@ -13,6 +13,8 @@ e18acb2d94df50bf67ca15ebc33ef590 package/Config.in c17b2548c35cffbd487ade70e272015c package/bcm2835/Config.in 5a9deb88e7e597a746ee333e858caaca package/binutils/binutils.mk da90ab5754ec8fcf94fb0dc8048ef344 package/bluez5_utils/bluez5_utils.mk +faf08a205f1164af783126885f52805d package/cage/cage.hash +dd53398dbdb08ddb84ee4084818b2142 package/cage/cage.mk 139c28fb0a041898208f176f918bf135 package/dhcpcd/dhcpcd.mk c445390118f5d058dd372a8b2beb25a8 package/dropbear/S50dropbear f8f1d83caf51791602eeefd554506bdf package/ffmpeg/ffmpeg.mk @@ -51,6 +53,8 @@ f976cbc5a7299cfc48ec83f255ddf85b package/sdl2_mixer/sdl2_mixer.mk 503c8043fd40aa5486cd99bc9ccfdc75 package/skeleton-init-common/skeleton-init-common.mk f3586b2f134ef6ef8f4b9ed2b8d03b6c package/spirv-llvm-translator/spirv-llvm-translator.mk 99028d214327d553f874843d456ef0d2 package/spirv-tools/spirv-tools.mk +017839944b82f8d55f1a53fa35cf26a1 package/wayland/wayland.hash +e5dcd6f5e632c3c6db8b2beef3f10368 package/wayland/wayland.mk 7d75ef4bb83efa9de526c3d1ba09884e package/wlroots/Config.in 2cf0c56bbf21a27a146c534f0c4b5fbb package/wlroots/wlroots.hash 7deca18b80b621e96934bb187cdc54fe package/wlroots/wlroots.mk diff --git a/custom/package/cage/cage.hash b/custom/package/cage/cage.hash new file mode 100644 index 0000000000000000000000000000000000000000..a3bd954f93f1ab4d4daa4b479ea3051c161f0847 --- /dev/null +++ b/custom/package/cage/cage.hash @@ -0,0 +1,5 @@ +# Generated locally after checking GPG signature from https://github.com/cage-kiosk/cage/releases/download/v0.1.5/cage-0.1.5.tar.gz.sig +sha256 557c194d18af7202a9ec2e8be6dd7129f6c16d0f4528f4079ba26ccd57b6ef88 cage-0.2.0.tar.gz + +# Hashes for license files: +sha256 e117104073335dbaf78596fb1bedf89dda63c71f60f0b665947b2d369c77ecee LICENSE diff --git a/custom/package/cage/cage.hash.patch b/custom/package/cage/cage.hash.patch new file mode 100644 index 0000000000000000000000000000000000000000..c5363addfd57d892599a17148384e54a479cc85b --- /dev/null +++ b/custom/package/cage/cage.hash.patch @@ -0,0 +1,11 @@ +diff --git a/package/cage/cage.hash b/package/cage/cage.hash +index d5517bd918..a3bd954f93 100644 +--- a/package/cage/cage.hash ++++ b/package/cage/cage.hash +@@ -1,5 +1,5 @@ + # Generated locally after checking GPG signature from https://github.com/cage-kiosk/cage/releases/download/v0.1.5/cage-0.1.5.tar.gz.sig +-sha256 ece0312e559289df0238289ea6c60e9fed32d27fe3ae8a8f83eeff26ddc239e1 cage-0.1.5.tar.gz ++sha256 557c194d18af7202a9ec2e8be6dd7129f6c16d0f4528f4079ba26ccd57b6ef88 cage-0.2.0.tar.gz + + # Hashes for license files: + sha256 e117104073335dbaf78596fb1bedf89dda63c71f60f0b665947b2d369c77ecee LICENSE diff --git a/custom/package/cage/cage.mk b/custom/package/cage/cage.mk new file mode 100644 index 0000000000000000000000000000000000000000..79c8c50276c9542152c633ef4f42c4eec3e83c2b --- /dev/null +++ b/custom/package/cage/cage.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# cage +# +################################################################################ + +CAGE_VERSION = 0.2.0 +CAGE_SITE = https://github.com/Hjdskes/cage/releases/download/v$(CAGE_VERSION) +CAGE_LICENSE = MIT +CAGE_LICENSE_FILES = LICENSE +CAGE_DEPENDENCIES = host-pkgconf wlroots +CAGE_CONF_OPTS = -Dman-pages=disabled + +$(eval $(meson-package)) diff --git a/custom/package/cage/cage.mk.patch b/custom/package/cage/cage.mk.patch new file mode 100644 index 0000000000000000000000000000000000000000..f4767bb8678b29c195d6c181e2aabd22ed7b1630 --- /dev/null +++ b/custom/package/cage/cage.mk.patch @@ -0,0 +1,23 @@ +diff --git a/package/cage/cage.mk b/package/cage/cage.mk +index 119950bc00..79c8c50276 100644 +--- a/package/cage/cage.mk ++++ b/package/cage/cage.mk +@@ -4,17 +4,11 @@ + # + ################################################################################ + +-CAGE_VERSION = 0.1.5 ++CAGE_VERSION = 0.2.0 + CAGE_SITE = https://github.com/Hjdskes/cage/releases/download/v$(CAGE_VERSION) + CAGE_LICENSE = MIT + CAGE_LICENSE_FILES = LICENSE + CAGE_DEPENDENCIES = host-pkgconf wlroots + CAGE_CONF_OPTS = -Dman-pages=disabled + +-ifeq ($(BR2_PACKAGE_WLROOTS_X11),y) +-CAGE_CONF_OPTS += -Dxwayland=true +-else +-CAGE_CONF_OPTS += -Dxwayland=false +-endif +- + $(eval $(meson-package)) diff --git a/custom/package/wayland/wayland.hash b/custom/package/wayland/wayland.hash new file mode 100644 index 0000000000000000000000000000000000000000..3de3f9f81146ce4853754de84fb6740cc51e74d3 --- /dev/null +++ b/custom/package/wayland/wayland.hash @@ -0,0 +1,6 @@ +# From https://lists.freedesktop.org/archives/wayland-devel/2023-April/042647.html +sha256 05b3e1574d3e67626b5974f862f36b5b427c7ceeb965cb36a4e6c2d342e45ab2 wayland-1.23.0.tar.xz +sha512 9c525231a7ea3e68d3178230d476285a960d23e38571ac96d885f86c0588c52ef01460bff6833db5adb9456ce8db7b996613611187aac972736748ba91b8fd81 wayland-1.23.0.tar.xz + +# Locally calculated +sha256 6eefcb023622a463168a5c20add95fd24a38c7482622a9254a23b99b7c153061 COPYING diff --git a/custom/package/wayland/wayland.hash.patch b/custom/package/wayland/wayland.hash.patch new file mode 100644 index 0000000000000000000000000000000000000000..04ccf5f370940e77c2124bc721d2ff19359dd0a4 --- /dev/null +++ b/custom/package/wayland/wayland.hash.patch @@ -0,0 +1,13 @@ +diff --git a/package/wayland/wayland.hash b/package/wayland/wayland.hash +index 5da527e318..3de3f9f811 100644 +--- a/package/wayland/wayland.hash ++++ b/package/wayland/wayland.hash +@@ -1,6 +1,6 @@ + # From https://lists.freedesktop.org/archives/wayland-devel/2023-April/042647.html +-sha256 1540af1ea698a471c2d8e9d288332c7e0fd360c8f1d12936ebb7e7cbc2425842 wayland-1.22.0.tar.xz +-sha512 fb1974efc8433e97254eb83fe28974198f2b4d8246418eb3d34ce657055461e0c97bc06dd52e5066ae91bbe05bac611dc49a0937ba226ac6388d5a47241efb12 wayland-1.22.0.tar.xz ++sha256 05b3e1574d3e67626b5974f862f36b5b427c7ceeb965cb36a4e6c2d342e45ab2 wayland-1.23.0.tar.xz ++sha512 9c525231a7ea3e68d3178230d476285a960d23e38571ac96d885f86c0588c52ef01460bff6833db5adb9456ce8db7b996613611187aac972736748ba91b8fd81 wayland-1.23.0.tar.xz + + # Locally calculated + sha256 6eefcb023622a463168a5c20add95fd24a38c7482622a9254a23b99b7c153061 COPYING diff --git a/custom/package/wayland/wayland.mk b/custom/package/wayland/wayland.mk new file mode 100644 index 0000000000000000000000000000000000000000..06adafc3e103079351cd73f6d8aad4ecffbf8b17 --- /dev/null +++ b/custom/package/wayland/wayland.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# wayland +# +################################################################################ + +WAYLAND_VERSION = 1.23.0 +WAYLAND_SITE = https://gitlab.freedesktop.org/wayland/wayland/-/releases/$(WAYLAND_VERSION)/downloads +WAYLAND_SOURCE = wayland-$(WAYLAND_VERSION).tar.xz +WAYLAND_LICENSE = MIT +WAYLAND_LICENSE_FILES = COPYING +WAYLAND_CPE_ID_VENDOR = wayland +WAYLAND_INSTALL_STAGING = YES +WAYLAND_DEPENDENCIES = host-pkgconf host-wayland expat libffi libxml2 +HOST_WAYLAND_DEPENDENCIES = host-pkgconf host-expat host-libffi host-libxml2 + +WAYLAND_CONF_OPTS = -Dtests=false -Ddocumentation=false +HOST_WAYLAND_CONF_OPTS = -Dtests=false -Ddocumentation=false + +# Remove the DTD from the target, it's not needed at runtime +define WAYLAND_TARGET_CLEANUP + rm -rf $(TARGET_DIR)/usr/share/wayland +endef +WAYLAND_POST_INSTALL_TARGET_HOOKS += WAYLAND_TARGET_CLEANUP + +$(eval $(meson-package)) +$(eval $(host-meson-package)) diff --git a/custom/package/wayland/wayland.mk.patch b/custom/package/wayland/wayland.mk.patch new file mode 100644 index 0000000000000000000000000000000000000000..e01f5d35a2f04161761553104ccac7583555aa26 --- /dev/null +++ b/custom/package/wayland/wayland.mk.patch @@ -0,0 +1,13 @@ +diff --git a/package/wayland/wayland.mk b/package/wayland/wayland.mk +index 1a764d5580..06adafc3e1 100644 +--- a/package/wayland/wayland.mk ++++ b/package/wayland/wayland.mk +@@ -4,7 +4,7 @@ + # + ################################################################################ + +-WAYLAND_VERSION = 1.22.0 ++WAYLAND_VERSION = 1.23.0 + WAYLAND_SITE = https://gitlab.freedesktop.org/wayland/wayland/-/releases/$(WAYLAND_VERSION)/downloads + WAYLAND_SOURCE = wayland-$(WAYLAND_VERSION).tar.xz + WAYLAND_LICENSE = MIT diff --git a/custom/package/wlroots/wlroots.hash b/custom/package/wlroots/wlroots.hash index dbc5f7b3e630db8e7c8597e4950c7c9bce08a586..e94521b2f92c8abee899884c3d68148d95bd56aa 100644 --- a/custom/package/wlroots/wlroots.hash +++ b/custom/package/wlroots/wlroots.hash @@ -1,5 +1,5 @@ # Generated locally, after checking https://gitlab.freedesktop.org/wlroots/wlroots/-/releases/0.16.2/downloads/wlroots-0.16.2.tar.gz.sig -sha256 d58d68e3f90d92de4d49fa43b4d75dc78f8af1d920d090729331cefbdfcf361b wlroots-0.17.1.tar.gz +sha256 b9c4bfef4123fe9f8662280b851e3c5741927457174315826827bfbb70612878 wlroots-0.18.1.tar.gz # Hashes for license files: -sha256 ffd3737a478b83a8b51b42757d3bf909ef36694508355879722e11fc1fa6736b LICENSE +sha256 35d427c043dcafe8893b9e7247348f599847c81d9a067703587c80707f3d58df LICENSE diff --git a/custom/package/wlroots/wlroots.hash.patch b/custom/package/wlroots/wlroots.hash.patch index 24a685f7956dc86994340aeee4a6558e4ade1ca2..7f136e0cb94a6253596b12ce1fa6c51dc1bce738 100644 --- a/custom/package/wlroots/wlroots.hash.patch +++ b/custom/package/wlroots/wlroots.hash.patch @@ -1,11 +1,12 @@ diff --git a/package/wlroots/wlroots.hash b/package/wlroots/wlroots.hash -index 8ab05393b1..dbc5f7b3e6 100644 +index 8ab05393b1..e94521b2f9 100644 --- a/package/wlroots/wlroots.hash +++ b/package/wlroots/wlroots.hash @@ -1,5 +1,5 @@ # Generated locally, after checking https://gitlab.freedesktop.org/wlroots/wlroots/-/releases/0.16.2/downloads/wlroots-0.16.2.tar.gz.sig -sha256 83e9a11605f23d4bf781ab1947089483d9ec3f7e9ba65398e0609593b77d44aa wlroots-0.16.2.tar.gz -+sha256 d58d68e3f90d92de4d49fa43b4d75dc78f8af1d920d090729331cefbdfcf361b wlroots-0.17.1.tar.gz ++sha256 b9c4bfef4123fe9f8662280b851e3c5741927457174315826827bfbb70612878 wlroots-0.18.1.tar.gz # Hashes for license files: - sha256 ffd3737a478b83a8b51b42757d3bf909ef36694508355879722e11fc1fa6736b LICENSE +-sha256 ffd3737a478b83a8b51b42757d3bf909ef36694508355879722e11fc1fa6736b LICENSE ++sha256 35d427c043dcafe8893b9e7247348f599847c81d9a067703587c80707f3d58df LICENSE diff --git a/custom/package/wlroots/wlroots.mk b/custom/package/wlroots/wlroots.mk index 485f92f6985be04df877105ce35fda72c42b4132..824967c57150c44252e023d0e77ce1c22e496f4f 100644 --- a/custom/package/wlroots/wlroots.mk +++ b/custom/package/wlroots/wlroots.mk @@ -4,7 +4,7 @@ # ################################################################################ -WLROOTS_VERSION = 0.17.1 +WLROOTS_VERSION = 0.18.1 WLROOTS_SITE = https://gitlab.freedesktop.org/wlroots/wlroots/-/releases/$(WLROOTS_VERSION)/downloads WLROOTS_LICENSE = MIT WLROOTS_LICENSE_FILES = LICENSE diff --git a/custom/package/wlroots/wlroots.mk.patch b/custom/package/wlroots/wlroots.mk.patch index 1a929c39aebcfd127c4c1de05f87fef2c46fc3db..7f82becee6fd3d398c0009095f12a4815a078086 100644 --- a/custom/package/wlroots/wlroots.mk.patch +++ b/custom/package/wlroots/wlroots.mk.patch @@ -1,5 +1,5 @@ diff --git a/package/wlroots/wlroots.mk b/package/wlroots/wlroots.mk -index fdd2fb8250..485f92f698 100644 +index fdd2fb8250..824967c571 100644 --- a/package/wlroots/wlroots.mk +++ b/package/wlroots/wlroots.mk @@ -4,7 +4,7 @@ @@ -7,7 +7,7 @@ index fdd2fb8250..485f92f698 100644 ################################################################################ -WLROOTS_VERSION = 0.16.2 -+WLROOTS_VERSION = 0.17.1 ++WLROOTS_VERSION = 0.18.1 WLROOTS_SITE = https://gitlab.freedesktop.org/wlroots/wlroots/-/releases/$(WLROOTS_VERSION)/downloads WLROOTS_LICENSE = MIT WLROOTS_LICENSE_FILES = LICENSE diff --git a/package/recalbox-system/Config.in b/package/recalbox-system/Config.in index 3149fe6e4e713dc384b22676d28638952a8be976..9c2e5f13b621fdf641cb15dd07215eb7205fc23e 100644 --- a/package/recalbox-system/Config.in +++ b/package/recalbox-system/Config.in @@ -261,7 +261,7 @@ config BR2_PACKAGE_RECALBOX_VIDEO_XORG_SERVER config BR2_PACKAGE_RECALBOX_VIDEO_XWAYLAND bool - select BR2_PACKAGE_DWL + select BR2_PACKAGE_CAGE select BR2_PACKAGE_XORG7 select BR2_PACKAGE_LIBEPOXY select BR2_PACKAGE_XWAYLAND diff --git a/projects/configgen/configgen/utils/runner.py b/projects/configgen/configgen/utils/runner.py index 2ea98a63079cd17da227016790253da1cb7d81c5..cfcf67307433f3bf9279613d2c420d1f6ff9cf61 100644 --- a/projects/configgen/configgen/utils/runner.py +++ b/projects/configgen/configgen/utils/runner.py @@ -26,7 +26,7 @@ def runCommand(command, args, demoStartButtons, recalboxOptions, fixedScreenSize match video_backend: case "wayland": - emulator_command: list = ["/usr/bin/dwl", "-s", " ".join('"{}"'.format(item) for item in command.array)] + emulator_command: list = ["/usr/bin/cage", "--" ] + command.array case _: emulator_command: list = command.array