On 2026/03/02 19:54, Timo Myyrä wrote:
> 
> I'm not sure if it is worth the hassle to add wayland support as a
> flavor if it supports X11 and wayland at the same time.

correct - if it supports both then this is the right way to go.

> Here's quick diff to update the dunst version and adding the wayland
> support for it. Needed to patch few files under wayland for
> input-events.
> 
> timo
> 
> diff /usr/ports
> path + /usr/ports
> commit - 2ae8b084f97bfcff301cf1f8f9611c0e3383bb01
> blob - 845ec348ff390bcda6e379faacb22605fff03f02
> file + x11/dunst/Makefile
> --- x11/dunst/Makefile
> +++ x11/dunst/Makefile
> @@ -2,7 +2,7 @@ COMMENT =     customizable and lightweight notification-da
>  
>  GH_ACCOUNT = dunst-project
>  GH_PROJECT = dunst
> -GH_TAGNAME = v1.13.0
> +GH_TAGNAME = v1.13.1
>  
>  CATEGORIES = x11
>  
> @@ -15,7 +15,8 @@ PERMIT_PACKAGE =    Yes
>  
>  WANTLIB += X11 Xext Xinerama Xrandr Xss c cairo gdk_pixbuf-2.0
>  WANTLIB += gio-2.0 glib-2.0 gobject-2.0 harfbuzz intl m notify
> -WANTLIB += pango-1.0 pangocairo-1.0 pthread
> +WANTLIB += pango-1.0 pangocairo-1.0 pthread wayland-client
> +WANTLIB += wayland-cursor
>  
>  # C11 with GNU extensions
>  COMPILER =   base-clang ports-gcc
> @@ -32,7 +33,8 @@ LIB_DEPENDS +=      devel/gettext,-runtime \
>               devel/libnotify \
>               devel/pango \
>               graphics/cairo \
> -             graphics/gdk-pixbuf2
> +             graphics/gdk-pixbuf2 \
> +             wayland/wayland
>  
>  RUN_DEPENDS +=       x11/dbus
>  
> @@ -44,8 +46,7 @@ MAKE_FLAGS =        PREFIX="${PREFIX}" \
>               SYSCONFDIR="/etc" \
>               
> BASHCOMPLETIONDIR="${LOCALBASE}/share/bash-completion/completions" \
>               
> FISHCOMPLETIONDIR="${LOCALBASE}/share/fish/vendor_completions.d" \
> -             ZSHCOMPLETIONDIR="${LOCALBASE}/share/zsh/site-functions" \
> -             WAYLAND=0
> +             ZSHCOMPLETIONDIR="${LOCALBASE}/share/zsh/site-functions"
>  
>  pre-configure:
>       ${SUBST_CMD} ${WRKSRC}/docs/dunst.1.pod.in \
> commit - 2ae8b084f97bfcff301cf1f8f9611c0e3383bb01
> blob - 378d1a756bd8c0435db3f17cc7704a13196975c8
> file + x11/dunst/distinfo
> --- x11/dunst/distinfo
> +++ x11/dunst/distinfo
> @@ -1,2 +1,2 @@
> -SHA256 (dunst-1.13.0.tar.gz) = eooYE5d61ZQUiMZrkUUBcD/A9uEuYx3BhQatYXJC56A=
> -SIZE (dunst-1.13.0.tar.gz) = 4664717
> +SHA256 (dunst-1.13.1.tar.gz) = pXjlws21RhhzVccQ8aqExHLm4jgo5pL+HLDruWNbEaY=
> +SIZE (dunst-1.13.1.tar.gz) = 4666210
> commit - 2ae8b084f97bfcff301cf1f8f9611c0e3383bb01
> blob - 76d1844ec450a61156ec005c7edd90f922b50f50
> file + x11/dunst/patches/patch-config_mk
> --- x11/dunst/patches/patch-config_mk
> +++ x11/dunst/patches/patch-config_mk
> @@ -5,9 +5,9 @@ Index: config.mk
>   
>   # flags
>   DEFAULT_CPPFLAGS = -Wno-gnu-zero-variadic-macro-arguments -D_DEFAULT_SOURCE 
> -DVERSION=\"${VERSION}\" -DSYSCONFDIR=\"${SYSCONFDIR}\" ${ENABLE_WAYLAND} 
> ${ENABLE_X11}
> --DEFAULT_CFLAGS   = -g -std=gnu11 -pedantic -Wall -Wno-overlength-strings 
> -Os ${EXTRA_CFLAGS}
> +-DEFAULT_CFLAGS   = -g -std=gnu11 -pedantic -Wall -Wno-overlength-strings 
> -Wno-expansion-to-defined -Os ${EXTRA_CFLAGS}
>  -DEFAULT_LDFLAGS  = -lm -lrt
> -+DEFAULT_CFLAGS   = -g -std=gnu11 -pedantic -Wall -Wno-overlength-strings 
> ${EXTRA_CFLAGS}
> ++DEFAULT_CFLAGS   = -g -std=gnu11 -pedantic -Wall -Wno-overlength-strings 
> -Wno-expansion-to-defined ${EXTRA_CFLAGS}
>  +DEFAULT_LDFLAGS  = -lm
>   
>   CPPFLAGS_DEBUG :=
> commit - 2ae8b084f97bfcff301cf1f8f9611c0e3383bb01
> blob - /dev/null
> file + x11/dunst/patches/patch-src_wayland_wl_c (mode 644)
> --- /dev/null
> +++ x11/dunst/patches/patch-src_wayland_wl_c
> @@ -0,0 +1,19 @@
> +Index: src/wayland/wl.c
> +--- src/wayland/wl.c.orig
> ++++ src/wayland/wl.c
> +@@ -14,7 +14,15 @@
> + #include <sys/mman.h>
> + #include <time.h>
> + #include <unistd.h>
> ++#if defined(__linux__) || defined(__FreeBSD__)
> + #include <linux/input-event-codes.h>
> ++#else
> ++#define BTN_LEFT        (0x110)
> ++#define BTN_RIGHT       (0x111)
> ++#define BTN_MIDDLE      (0x112)
> ++#define BTN_TOUCH       (0x14a)
> ++#endif
> ++
> + #include <string.h>
> + #include <glib.h>
> + 
> commit - 2ae8b084f97bfcff301cf1f8f9611c0e3383bb01
> blob - /dev/null
> file + x11/dunst/patches/patch-src_wayland_wl_seat_c (mode 644)
> --- /dev/null
> +++ x11/dunst/patches/patch-src_wayland_wl_seat_c
> @@ -0,0 +1,18 @@
> +Index: src/wayland/wl_seat.c
> +--- src/wayland/wl_seat.c.orig
> ++++ src/wayland/wl_seat.c
> +@@ -1,7 +1,14 @@
> + #define _POSIX_C_SOURCE 200112L
> + #include "wl_seat.h"
> + 
> ++#if defined(__linux__) || defined(__FreeBSD__)
> + #include <linux/input-event-codes.h>
> ++#else
> ++#define BTN_LEFT    (0x110)
> ++#define BTN_RIGHT   (0x111)
> ++#define BTN_MIDDLE  (0x112)
> ++#define BTN_TOUCH   (0x14a)
> ++#endif
> + 
> + #include "protocols/idle.h"
> + 
> commit - 2ae8b084f97bfcff301cf1f8f9611c0e3383bb01
> blob - 2c1e8aa2ea3d03a69003a1683b117151875cfc93
> file + x11/dunst/pkg/PLIST
> --- x11/dunst/pkg/PLIST
> +++ x11/dunst/pkg/PLIST
> @@ -7,6 +7,7 @@ bin/dunstctl
>  @man man/man5/dunst.5
>  share/bash-completion/completions/dunst
>  share/bash-completion/completions/dunstctl
> +share/bash-completion/completions/dunstify
>  share/dunst/
>  @sample ${SYSCONFDIR}/dunst/
>  share/dunst/dunstrc
> @@ -23,3 +24,4 @@ share/zsh/
>  share/zsh/site-functions/
>  share/zsh/site-functions/_dunst
>  share/zsh/site-functions/_dunstctl
> +share/zsh/site-functions/_dunstify

Reply via email to