From: yaydn@protonmail.com Subject: Re: update: wayland/wev 1.1.0 To: Matthieu Herrb Cc: "ports@openbsd.org" Date: Thu, 31 Jul 2025 08:38:27 +0000 På torsdag 31. juli 2025 kl. 10:13, Matthieu Herrb skrev: > Hi, > > update wev to 1.1.0. the wev.c patch was to get a commit that appeared > upstream after the 1.0 release. So it can be removed. ok ? > Tested on current/amd64 with: cd /usr/ports/wayland/wev/ && patch -l -p0 -E < /tmp/wev-1.1.0.patch cd /usr/ports/wayland/wev/ && make update clean && make distclean Built fine and light testing shows no obvious problems. For what it is worth, okay on my end. > Index: Makefile > =================================================================== > RCS file: /local/cvs/ports/wayland/wev/Makefile,v > diff -u -p -u -r1.6 Makefile > --- Makefile 29 Nov 2023 13:10:18 -0000 1.6 > +++ Makefile 31 Jul 2025 08:03:48 -0000 > @@ -1,6 +1,6 @@ > COMMENT = utility to show Wayland events > > -V = 1.0.0 > +V = 1.1.0 > DISTNAME = wev-${V} > > CATEGORIES = wayland > @@ -9,7 +9,7 @@ HOMEPAGE = https://git.sr.ht/~sircmpwn/w > SITES = https://git.sr.ht/~sircmpwn/wev/ > DISTFILES = wev-{archive/}${V}${EXTRACT_SUFX} > > -WANTLIB = epoll-shim ffi wayland-client xkbcommon c > +WANTLIB = wayland-client xkbcommon m c > > # MIT > PERMIT_PACKAGE = Yes > Index: distinfo > =================================================================== > RCS file: /local/cvs/ports/wayland/wev/distinfo,v > diff -u -p -u -r1.1.1.1 distinfo > --- distinfo 2 Sep 2023 09:51:22 -0000 1.1.1.1 > +++ distinfo 31 Jul 2025 08:03:48 -0000 > @@ -1,2 +1,2 @@ > -SHA256 (wev-1.0.0.tar.gz) = YTod8aSHnVDOcgI94UqvBb4ub1E0boSmn1D8bYUCu/Q= > -SIZE (wev-1.0.0.tar.gz) = 8647 > +SHA256 (wev-1.1.0.tar.gz) = ibjZvHVmMXle6RyZoNWwh3yfXDrP6B93oraez8FdrxY= > +SIZE (wev-1.1.0.tar.gz) = 11163 > Index: patches/patch-Makefile > =================================================================== > RCS file: /local/cvs/ports/wayland/wev/patches/patch-Makefile,v > diff -u -p -u -r1.1.1.1 patch-Makefile > --- patches/patch-Makefile 2 Sep 2023 09:51:22 -0000 1.1.1.1 > +++ patches/patch-Makefile 31 Jul 2025 08:03:48 -0000 > @@ -3,16 +3,16 @@ Simple OpenBSD build fix > Index: Makefile > --- Makefile.orig > +++ Makefile > -@@ -17,7 +17,7 @@ wev: wev.c shm.c xdg-shell-protocol.h xdg-shell-protoc > +@@ -25,7 +25,7 @@ wev: wev.c shm.c xdg-shell-protocol.c wayland-tablet-p > $(CC) $(CFLAGS) \ > -g -std=c11 -I. \ > - -o wev wev.c shm.c xdg-shell-protocol.c \ > + -o wev wev.c shm.c xdg-shell-protocol.c wayland-tablet-protocol.c \ > - $(LIBS) -lrt > + $(LIBS) > > wev.1: wev.1.scd > $(SCDOC) < wev.1.scd > wev.1 > > -@@ -33,8 +33,8 @@ DESTDIR?= > +@@ -41,8 +41,8 @@ DESTDIR?= > install: wev > mkdir -p $(DESTDIR)$(BINDIR) > mkdir -p $(DESTDIR)$(MANDIR)/man1 > @@ -22,4 +22,4 @@ Index: Makefile > + install -c -m644 wev.1 $(DESTDIR)$(MANDIR)/man1/wev.1 > > clean: > - rm -f wev wev.1 xdg-shell-protocol.h xdg-shell-protocol.c > + rm -f wev wev.1 xdg-shell-protocol.h xdg-shell-protocol.c wayland-tablet-protocol.h wayland-tablet-protocol.c > Index: patches/patch-wev_c > =================================================================== > RCS file: patches/patch-wev_c > diff -N patches/patch-wev_c > --- patches/patch-wev_c 2 Sep 2023 09:51:22 -0000 1.1.1.1 > +++ /dev/null 1 Jan 1970 00:00:00 -0000 > @@ -1,86 +0,0 @@ > -Patches from SourceHut HEAD > - > -- remember to close and unmap buffer after drawing > -- escape control characters > -- Fix logging of modifiers serial/group > - > -Index: wev.c > ---- wev.c.orig > -+++ wev.c > -@@ -99,6 +99,26 @@ static int proxy_log(struct wev_state *state, > - return n; > - } > - > -+static void escape_utf8(char *buf) { > -+ if (strcmp(buf, "\a") == 0) { > -+ strcpy(buf, "\\a"); > -+ } else if (strcmp(buf, "\b") == 0) { > -+ strcpy(buf, "\\b"); > -+ } else if (strcmp(buf, "\e") == 0) { > -+ strcpy(buf, "\\e"); > -+ } else if (strcmp(buf, "\f") == 0) { > -+ strcpy(buf, "\\f"); > -+ } else if (strcmp(buf, "\n") == 0) { > -+ strcpy(buf, "\\n"); > -+ } else if (strcmp(buf, "\r") == 0) { > -+ strcpy(buf, "\\r"); > -+ } else if (strcmp(buf, "\t") == 0) { > -+ strcpy(buf, "\\t"); > -+ } else if (strcmp(buf, "\v") == 0) { > -+ strcpy(buf, "\\v"); > -+ } > -+} > -+ > - static void wl_pointer_enter(void *data, struct wl_pointer *wl_pointer, > - uint32_t serial, struct wl_surface *surface, > - wl_fixed_t surface_x, wl_fixed_t surface_y) { > -@@ -227,7 +247,7 @@ static void wl_pointer_axis_stop(void *data, struct wl > - static void wl_pointer_axis_discrete(void *data, struct wl_pointer *wl_pointer, > - uint32_t axis, int32_t discrete) { > - struct wev_state *state = data; > -- proxy_log(state, (struct wl_proxy *)wl_pointer, "axis_stop", > -+ proxy_log(state, (struct wl_proxy *)wl_pointer, "axis_discrete", > - "axis: %d (%s), discrete: %d\n", > - axis, pointer_axis_str(axis), discrete); > - } > -@@ -307,6 +327,7 @@ static void wl_keyboard_enter(void *data, struct wl_ke > - printf(SPACER "sym: %-12s (%d), ", buf, sym); > - xkb_state_key_get_utf8( > - state->xkb_state, *key + 8, buf, sizeof(buf)); > > -+ escape_utf8(buf); > - printf("utf8: '%s'\n", buf); > - } > - } > -@@ -347,6 +368,7 @@ static void wl_keyboard_key(void *data, struct wl_keyb > - printf(SPACER "sym: %-12s (%d), ", buf, sym); > - > - xkb_state_key_get_utf8(wev_state->xkb_state, keycode, buf, sizeof(buf)); > > -+ escape_utf8(buf); > - printf("utf8: '%s'\n", buf); > - } > - } > -@@ -368,7 +390,7 @@ static void wl_keyboard_modifiers(void *data, struct w > - uint32_t mods_locked, uint32_t group) { > - struct wev_state *state = data; > - int n = proxy_log(state, (struct wl_proxy *)wl_keyboard, "modifiers", > -- "serial: %d; group: %d\n", group); > -+ "serial: %d; group: %d\n", serial, group); > - if (n != 0) { > - printf(SPACER "depressed: %08X", mods_depressed); > - print_modifiers(state, mods_depressed); > -@@ -531,6 +553,7 @@ static struct wl_buffer *create_buffer(struct wev_stat > - struct wl_buffer *buffer = wl_shm_pool_create_buffer(pool, 0, > - state->width, state->height, stride, WL_SHM_FORMAT_XRGB8888); > > - wl_shm_pool_destroy(pool); > -+ close(fd); > - > - for (int y = 0; y < state->height; ++y) { > > - for (int x = 0; x < state->width; ++x) { > > -@@ -541,6 +564,7 @@ static struct wl_buffer *create_buffer(struct wev_stat > - } > - } > - } > -+ munmap(data, size); > - > - wl_buffer_add_listener(buffer, &wl_buffer_listener, NULL); > - > > -- > Matthieu Herrb