Monday, March 02, 2026

Re: x11/dunst - add wayland FLAVOR?

On Sun, Mar 01 2026, yaydn@protonmail.com wrote:

> På søndag 1. mars 2026 kl. 19:37, skrev Volker Schlecht
> <openbsd-ports@schlecht.dev>:
>
>> I don't have strong opinions on wayland support being a flavor or not, but I
>> assumed that there were reasons to disable wayland in the first place ...
>>
>> Having said that, this is the remaining puzzle piece for me to switch from my
>> old herbstluftwm setup to niri as my daily driver, so I hope one way or another,
>> that we'll get wayland support into dunst ;-)
>>
>> On 3/1/26 6:37 PM, Tobias Heider wrote:
>> > On Sun, Mar 01, 2026 at 02:57:08PM +0100, Volker Schlecht wrote:
>> >> To use dunst on niri, we need wayland support built in (the non-wayland version
>> >> works with XWayland under wayland/sway, but with xwayland-satellite as used by
>> >> niri, notifications appear as regular windows with decorations and all.
>> >>
>> >> Therefore I'd like to propose a wayland FLAVOR for x11/dunst.
>> >>
>> >> What do you think?
>> >>
>> >
>> > Works here. I have no partiuclar opinion on making wayland support
>> > a flavor but the diff is ok with me if Timo agrees.
>> >
>
> Shrugging: There are those who use either arcan or x11 exclusively, so
> options are useful. Unlike important libraries like sdl*, this do not
> affect a large amount of reverse dependencies requiring the most general
> support, I think.
>
> Don't know if a second tester will help.
>
> Privsep with other user:
> cd /usr/ports/x11/dunst/ && patch -l -p0 -E -C < /tmp/dunst-wayland.diff
> cd /usr/ports/x11/dunst/ && patch -l -p0 -E < /tmp/dunst-wayland.diff
> cd /usr/ports/x11/dunst/ && FLAVOR=wayland make test port-lib-depends-check package clean
>
> Root:
> pkg_add -Dsnap -Dunsigned -r /usr/ports/packages/amd64/all/dunst-1.13.0-wayland.tgz
>
> Regression tests:
>
> cc -o test/test test/dbus.o test/draw.o test/dunst.o test/helpers.o
> test/icon-lookup.o test/icon.o test/ini.o test/input.o test/log.o
> test/markup.o test/menu.o test/misc.o test/notification.o
> test/option_parser.o test/queues.o test/rules.o test/setting.o
> test/settings_data.o test/test.o test/utils.o src/output.o
> src/settings.o src/wayland/foreign_toplevel.o
> src/wayland/libgwater-wayland.o src/wayland/pool-buffer.o
> src/wayland/wl.o src/wayland/wl_output.o src/wayland/wl_seat.o
> src/x11/screen.o src/x11/x.o -g -std=gnu11 -pedantic -Wall
> -Wno-overlength-strings -O2 -pipe -std=gnu11
> -I/usr/local/include/gdk-pixbuf-2.0 -I/usr/local/include
> -I/usr/local/include/pango-1.0 -I/usr/local/include/cairo
> -I/usr/local/include/libpng16 -I/usr/X11R6/include
> -I/usr/X11R6/include/pixman-1 -pthread -I/usr/local/include/fribidi
> -I/usr/local/include/harfbuzz -I/usr/X11R6/include/freetype2
> -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include
> -I/usr/local/include/libepoll-shim -MMD -MP -lm -L/usr/local/lib
> -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lpango-1.0 -lcairo
> -Wl,-rpath-link,/usr/X11R6/lib -lgio-2.0 -lharfbuzz -lgobject-2.0
> -lglib-2.0 -lintl -lwayland-cursor -lwayland-client -lm -L/usr/X11R6/lib
> -lXinerama -lXrandr -lXss -lXext -lX11
> ld: warning: x.c:158 (src/x11/x.c:158)(src/x11/x.o:(x_display_surface)): warning: sprintf() is often misused, please use snprintf()
> ld: warning: queues.c:256 (test/queues.c:256)(test/queues.o:(suite_queues)): warning: rand() may return deterministic values, is that what you want?
> find . -type f -name '*.gcov' -delete
> find . -type f -name '*.gcda' -delete
> # Make sure an error code is returned when the test fails
> /usr/bin/env bash -c 'set -euo pipefail;\
> TESTDIR=./test ./test/test -v | ./test/greenest.awk '
> init_second_pass: a 647131161, c 2147483647, state 161782790
> init_second_pass: a 647131161, c 2147483647, state 161782790
>
> * Suite suite_utils:
> PASS test_string_replace_char: (0 ticks, 0.000 sec)
> PASS test_string_replace_all: (0 ticks, 0.000 sec)
> PASS test_string_append: (0 ticks, 0.000 sec)
> PASS test_string_strip_quotes: (0 ticks, 0.000 sec)
> PASS test_string_strip_delimited: (0 ticks, 0.000 sec)
>
> Expected: /dunst-1.13.0_writes_to_HOME/.path/with/HOME environment variable
> Got: $HOME/.path/with/HOME environment variable
> FAIL test_string_to_path: (exp = g_strconcat(home, "/.path/with/HOME
> environment variable", NULL)) != (ptr =
> string_to_path(g_strdup("$HOME/.path/with/HOME environment variable")))
> (test/utils.c:175) (0 ticks, 0.000 sec)
> PASS test_string_to_time: (0 ticks, 0.000 sec)
>
> 7 tests - 6 passed, 1 failed, 0 skipped (0 ticks, 0.000 sec)
>
> * Suite suite_option_parser:
> PASS test_cmdline_get_string: (0 ticks, 0.000 sec)
> PASS test_cmdline_get_list: (0 ticks, 0.000 sec)
> PASS test_cmdline_get_path: (0 ticks, 0.000 sec)
> PASS test_cmdline_get_int: (0 ticks, 0.000 sec)
> PASS test_cmdline_get_double: (0 ticks, 0.000 sec)
> PASS test_cmdline_get_bool: (0 ticks, 0.000 sec)
> PASS test_cmdline_create_usage: (0 ticks, 0.000 sec)
> PASS test_string_to_int: (0 ticks, 0.000 sec)
> PASS test_string_to_int_invalid: (0 ticks, 0.000 sec)
> PASS test_string_to_double: (0 ticks, 0.000 sec)
> PASS test_string_to_double_invalid: (0 ticks, 0.000 sec)
> PASS test_string_to_enum: (0 ticks, 0.000 sec)
> PASS test_string_to_enum_invalid: (0 ticks, 0.000 sec)
> PASS test_string_to_boolean: (0 ticks, 0.000 sec)
> PASS test_string_to_boolean_invalid: (0 ticks, 0.000 sec)
> PASS test_string_to_list: (0 ticks, 0.000 sec)
> PASS test_string_to_list_invalid: (0 ticks, 0.000 sec)
> PASS test_string_to_time: (0 ticks, 0.000 sec)
> PASS test_string_to_time_invalid: (0 ticks, 0.000 sec)
> FAIL test_string_to_path: Failed in round 6. $HOME/p/p should be /dunst-1.13.0_writes_to_HOME/p/p (test/option_parser.c:562) (0 ticks, 0.000 sec)
> PASS test_string_to_corners: (0 ticks, 0.000 sec)
> PASS test_string_to_corners_invalid: (0 ticks, 0.000 sec)
> PASS test_string_to_sepcolor: (0 ticks, 0.000 sec)
> PASS test_string_to_sepcolor_invalid: (0 ticks, 0.000 sec)
> PASS test_string_to_color: (0 ticks, 0.000 sec)
> PASS test_string_to_color_invalid: (0 ticks, 0.000 sec)
> PASS test_string_to_gradient: (0 ticks, 0.000 sec)
> PASS test_enum_size: (0 ticks, 0.000 sec)
> PASS test_string_to_length: (0 ticks, 0.000 sec)
> PASS test_string_to_length_invalid: (0 ticks, 0.000 sec)
> PASS test_string_to_maybe_int: (0 ticks, 0.000 sec)
>
> 31 tests - 30 passed, 1 failed, 0 skipped (0 ticks, 0.000 sec)
>
> * Suite suite_notification:
> PASS test_notification_is_duplicate: (0 ticks, 0.000 sec)
> PASS test_notification_replace_single_field: (0 ticks, 0.000 sec)
> PASS test_notification_referencing: (0 ticks, 0.000 sec)
> PASS test_notification_icon_scaling_toosmall: (1 ticks, 0.010 sec)
> PASS test_notification_icon_scaling_toolarge: (1 ticks, 0.010 sec)
> PASS test_notification_icon_scaling_notconfigured: (0 ticks, 0.000 sec)
> PASS test_notification_icon_scaling_notneeded: (0 ticks, 0.000 sec)
> PASS test_notification_format_message: (0 ticks, 0.000 sec)
> PASS test_notification_format_message: (0 ticks, 0.000 sec)
> PASS test_notification_format_message: (0 ticks, 0.000 sec)
> PASS test_notification_format_message: (0 ticks, 0.000 sec)
> PASS test_notification_format_message: (0 ticks, 0.000 sec)
> PASS test_notification_format_message: (0 ticks, 0.000 sec)
> PASS test_notification_format_message: (0 ticks, 0.000 sec)
> PASS test_notification_format_message: (0 ticks, 0.000 sec)
> PASS test_notification_format_message: (0 ticks, 0.000 sec)
> PASS test_notification_format_message: (0 ticks, 0.000 sec)
> PASS test_notification_format_message: (0 ticks, 0.000 sec)
> PASS test_notification_format_message: (0 ticks, 0.000 sec)
> PASS test_notification_maxlength: (0 ticks, 0.000 sec)
>
> 20 tests - 20 passed, 0 failed, 0 skipped (2 ticks, 0.020 sec)
>
> * Suite suite_markup:
> PASS test_markup_strip: (0 ticks, 0.000 sec)
> PASS helper_markup_strip_a: (0 ticks, 0.000 sec)
> PASS helper_markup_strip_a: (0 ticks, 0.000 sec)
> PASS helper_markup_strip_a: (0 ticks, 0.000 sec)
> PASS helper_markup_strip_a: (0 ticks, 0.000 sec)
> PASS helper_markup_strip_a: (0 ticks, 0.000 sec)
> PASS helper_markup_strip_a: (0 ticks, 0.000 sec)
> PASS helper_markup_strip_img: (0 ticks, 0.000 sec)
> PASS helper_markup_strip_img: (0 ticks, 0.000 sec)
> PASS helper_markup_strip_img: (0 ticks, 0.000 sec)
> PASS helper_markup_strip_img: (0 ticks, 0.000 sec)
> PASS helper_markup_strip_img: (0 ticks, 0.000 sec)
> PASS helper_markup_strip_img: (0 ticks, 0.000 sec)
> PASS helper_markup_strip_img: (0 ticks, 0.000 sec)
> PASS helper_markup_strip_img: (0 ticks, 0.000 sec)
> PASS helper_markup_strip_img: (0 ticks, 0.000 sec)
> PASS helper_markup_strip_img: (0 ticks, 0.000 sec)
> PASS helper_markup_strip_img: (0 ticks, 0.000 sec)
> PASS helper_markup_strip_img: (0 ticks, 0.000 sec)
> PASS helper_markup_strip_img: (0 ticks, 0.000 sec)
> PASS test_markup_transform: (0 ticks, 0.000 sec)
>
> 21 tests - 21 passed, 0 failed, 0 skipped (0 ticks, 0.000 sec)
>
> * Suite suite_misc:
> PASS assert_version_number: (0 ticks, 0.000 sec)
>
> 1 test - 1 passed, 0 failed, 0 skipped (0 ticks, 0.000 sec)
>
> * Suite suite_icon:
> Icon path: /usr/ports/pobj/dunst-1.13.0-wayland/dunst-1.13.0/test/data
> PASS test_get_path_from_icon_null: (0 ticks, 0.000 sec)
> PASS test_get_path_from_icon_name_full: (0 ticks, 0.000 sec)
> PASS test_icon_size_clamp_not_necessary: (0 ticks, 0.000 sec)
> PASS test_icon_size_clamp_too_small: (0 ticks, 0.000 sec)
> PASS test_icon_size_clamp_not_necessary: (0 ticks, 0.000 sec)
> PASS test_icon_size_clamp_too_big: (0 ticks, 0.000 sec)
> PASS test_icon_size_clamp_too_small_then_too_big: (0 ticks, 0.000 sec)
> PASS test_icon_size_clamp_too_small: (0 ticks, 0.000 sec)
> PASS test_icon_size_clamp_not_necessary: (0 ticks, 0.000 sec)
> PASS test_icon_size_clamp_not_necessary: (0 ticks, 0.000 sec)
> PASS test_icon_size_clamp_too_big: (0 ticks, 0.000 sec)
>
> 11 tests - 11 passed, 0 failed, 0 skipped (0 ticks, 0.000 sec)
>
> * Suite suite_queues:
> PASS test_datachange_beginning_empty: (0 ticks, 0.000 sec)
> PASS test_datachange_endless: (0 ticks, 0.000 sec)
> PASS test_datachange_endless_agethreshold: (0 ticks, 0.000 sec)
> PASS test_datachange_agethreshold_at_second: (0 ticks, 0.000 sec)
> PASS test_datachange_queues: (0 ticks, 0.000 sec)
> PASS test_datachange_ttl: (0 ticks, 0.000 sec)
> PASS test_queue_history_clear: (0 ticks, 0.000 sec)
> PASS test_queue_history_overfull: (0 ticks, 0.000 sec)
> PASS test_queue_history_pushall: (0 ticks, 0.000 sec)
> PASS test_queue_history_remove_by_id: (0 ticks, 0.000 sec)
> PASS test_queue_init: (0 ticks, 0.000 sec)
> PASS test_queue_insert_id_invalid: (0 ticks, 0.000 sec)
> PASS test_queue_insert_id_replacement: (0 ticks, 0.000 sec)
> PASS test_queue_insert_id_valid_newid: (0 ticks, 0.000 sec)
> PASS test_queue_length: (0 ticks, 0.000 sec)
> PASS test_queue_notification_close: (0 ticks, 0.000 sec)
> PASS test_queue_notification_close_histignore: (0 ticks, 0.000 sec)
> PASS test_queue_notification_skip_display: (0 ticks, 0.000 sec)
> PASS test_queue_notification_skip_display_redisplayed: (0 ticks, 0.000 sec)
> PASS test_queue_notification_skip_display_redisplayed_by_random_id: (0 ticks, 0.000 sec)
> PASS test_queue_stacking: (0 ticks, 0.000 sec)
> PASS test_queue_stacktag: (0 ticks, 0.000 sec)
> queue 0
> PASS test_queue_different_stacktag: (0 ticks, 0.000 sec)
> PASS test_queue_stacktag_different_appid: (0 ticks, 0.000 sec)
> PASS test_queue_teardown: (0 ticks, 0.000 sec)
> PASS test_queue_timeout: (0 ticks, 0.000 sec)
> PASS test_queues_update_fullscreen: (0 ticks, 0.000 sec)
> PASS test_queues_update_paused: (0 ticks, 0.000 sec)
> PASS test_queues_update_pause_level: (0 ticks, 0.000 sec)
> PASS test_queues_update_seep_showlowurg: (0 ticks, 0.000 sec)
> PASS test_queues_update_seeping: (0 ticks, 0.000 sec)
> PASS test_queues_update_xmore: (0 ticks, 0.000 sec)
> PASS test_queues_timeout_before_paused: (0 ticks, 0.000 sec)
> PASS test_queue_find_by_id: (0 ticks, 0.000 sec)
> PASS test_queue_no_sort_and_pause: (0 ticks, 0.000 sec)
> PASS test_queue_get_history: (0 ticks, 0.000 sec)
>
> 36 tests - 36 passed, 0 failed, 0 skipped (0 ticks, 0.000 sec)
>
> * Suite suite_dunst:
> PASS test_dunst_status: (0 ticks, 0.000 sec)
>
> 1 test - 1 passed, 0 failed, 0 skipped (0 ticks, 0.000 sec)
>
> * Suite suite_log:
> PASS test_log_level: (0 ticks, 0.000 sec)
> PASS test_log_level: (0 ticks, 0.000 sec)
> PASS test_log_level: (0 ticks, 0.000 sec)
> PASS test_log_level: (0 ticks, 0.000 sec)
> PASS test_log_level: (0 ticks, 0.000 sec)
> PASS test_log_level: (0 ticks, 0.000 sec)
>
> 6 tests - 6 passed, 0 failed, 0 skipped (0 ticks, 0.000 sec)
>
> * Suite suite_menu:
> PASS test_extract_urls_from_empty_string: (0 ticks, 0.000 sec)
> PASS test_extract_urls_from_no_urls_string: (0 ticks, 0.000 sec)
> PASS test_extract_urls_from_one_url_string: (0 ticks, 0.000 sec)
> PASS test_extract_urls_from_two_url_string: (0 ticks, 0.000 sec)
> PASS test_extract_urls_from_one_url_port: (0 ticks, 0.000 sec)
> PASS test_extract_urls_from_one_url_path: (0 ticks, 0.000 sec)
> PASS test_extract_urls_from_one_url_anchor: (0 ticks, 0.000 sec)
>
> 7 tests - 7 passed, 0 failed, 0 skipped (0 ticks, 0.000 sec)
>
> * Suite suite_settings_data:
> PASS test_names_valid: (0 ticks, 0.000 sec)
> PASS test_description_valid: (0 ticks, 0.000 sec)
> PASS test_type_valid: (0 ticks, 0.000 sec)
> PASS test_section_valid: (0 ticks, 0.000 sec)
> PASS test_default_value_valid: (0 ticks, 0.000 sec)
> PASS test_value_non_null: (0 ticks, 0.000 sec)
> PASS test_valid_parser_and_data_per_type: (0 ticks, 0.000 sec)
>
> 7 tests - 7 passed, 0 failed, 0 skipped (0 ticks, 0.000 sec)
>
> * Suite suite_dbus:
> PASS test_dbus_init: (0 ticks, 0.000 sec)
> PASS test_get_fdn_daemon_info: (0 ticks, 0.000 sec)
> PASS test_dbus_cb_dunst_Properties_Get: (0 ticks, 0.000 sec)
> PASS test_dbus_cb_dunst_Properties_Set: (0 ticks, 0.000 sec)
> PASS test_dbus_cb_dunst_Properties_Set_pause_level: (2 ticks, 0.020 sec)
> PASS test_empty_notification: (1 ticks, 0.010 sec)
> PASS test_basic_notification: (0 ticks, 0.000 sec)
> PASS test_invalid_notification: (0 ticks, 0.000 sec)
> PASS test_hint_transient: (2 ticks, 0.020 sec)
> PASS test_hint_progress: (2 ticks, 0.020 sec)
> PASS test_hint_icons: (0 ticks, 0.000 sec)
> PASS test_hint_category: (0 ticks, 0.000 sec)
> PASS test_hint_desktop_entry: (0 ticks, 0.000 sec)
> PASS test_hint_urgency: (1 ticks, 0.010 sec)
> PASS test_hint_raw_image: (1 ticks, 0.010 sec)
> PASS test_dbus_notify_colors: (0 ticks, 0.000 sec)
> PASS test_server_caps: (0 ticks, 0.000 sec)
> PASS test_server_caps: (0 ticks, 0.000 sec)
> PASS test_server_caps: (0 ticks, 0.000 sec)
> PASS test_close_and_signal: (0 ticks, 0.000 sec)
> PASS test_signal_actioninvoked: (2 ticks, 0.020 sec)
> PASS test_signal_length_propertieschanged: (1 ticks, 0.010 sec)
> PASS test_timeout_overflow: (0 ticks, 0.000 sec)
> PASS test_override_dbus_timeout: (0 ticks, 0.000 sec)
> PASS test_match_dbus_timeout: (0 ticks, 0.000 sec)
> PASS test_timeout: (0 ticks, 0.000 sec)
> PASS test_clearhistory_and_signal: (0 ticks, 0.000 sec)
> PASS test_removehistory_and_signal: (0 ticks, 0.000 sec)
> PASS test_dbus_cb_dunst_NotificationListHistory: (0 ticks, 0.000 sec)
> PASS test_dbus_cb_dunst_RuleEnable: (0 ticks, 0.000 sec)
> PASS test_dbus_cb_dunst_RuleList: (0 ticks, 0.000 sec)
> PASS assert_methodlists_sorted: (0 ticks, 0.000 sec)
> PASS test_dbus_teardown: (0 ticks, 0.000 sec)
>
> 33 tests - 33 passed, 0 failed, 0 skipped (12 ticks, 0.120 sec)
>
> * Suite suite_setting:
> PASS test_dunstrc_markup: (0 ticks, 0.000 sec)
> PASS test_dunstrc_nomarkup: (0 ticks, 0.000 sec)
> PASS test_dunstrc_defaults: (0 ticks, 0.000 sec)
>
> 3 tests - 3 passed, 0 failed, 0 skipped (0 ticks, 0.000 sec)
>
> * Suite suite_icon_lookup:
> PASS test_load_theme_from_dir: (2 ticks, 0.020 sec)
> PASS test_find_icon: (1 ticks, 0.010 sec)
> PASS test_new_icon_overrides_raw_icon: (1 ticks, 0.010 sec)
>
> 3 tests - 3 passed, 0 failed, 0 skipped (4 ticks, 0.040 sec)
>
> * Suite suite_draw:
> PASS test_calculate_dimensions_height_min: (7 ticks, 0.070 sec)
> PASS test_calculate_dimensions_height_gaps: (0 ticks, 0.000 sec)
> PASS test_calculate_dimensions_height_no_gaps: (0 ticks, 0.000 sec)
> PASS test_layout_from_notification_no_icon: (0 ticks, 0.000 sec)
> PASS test_layout_from_notification_icon_off: (0 ticks, 0.000 sec)
> PASS test_layout_from_notification: (0 ticks, 0.000 sec)
> PASS test_layout_render_gaps: (0 ticks, 0.000 sec)
> PASS test_layout_render_no_gaps: (0 ticks, 0.000 sec)
>
> 8 tests - 8 passed, 0 failed, 0 skipped (7 ticks, 0.070 sec)
>
> * Suite suite_rules:
> PASS test_pattern_match: (0 ticks, 0.000 sec)
> PASS test_pattern_match: (0 ticks, 0.000 sec)
>
> 2 tests - 2 passed, 0 failed, 0 skipped (0 ticks, 0.000 sec)
>
> * Suite suite_input:
> PASS test_notification_at: (0 ticks, 0.000 sec)
> PASS test_get_notification_clickable_height_gaps: (0 ticks, 0.000 sec)
> PASS test_get_notification_clickable_height_last: (0 ticks, 0.000 sec)
> PASS test_get_notification_clickable_height_middle: (0 ticks, 0.000 sec)
> PASS test_get_notification_clickable_height_first: (0 ticks, 0.000 sec)
>
> 5 tests - 5 passed, 0 failed, 0 skipped (0 ticks, 0.000 sec)
>
> Total: 202 tests (25 ticks, 0.250 sec), 2651 assertions
> Pass: 200, fail: 2, skip: 0.
>
> --
>
> Running:
> dunst -startup_notification
>
> gives a notification without decorations.
>
> Not sure on those two failed tests, but the x11 flavor has the same
> results. Looks fine otherwise.
>
> May you all have a good one.
>
> --
> yaydn
>
>> >> Index: Makefile
>> >> ===================================================================
>> >> RCS file: /cvs/ports/x11/dunst/Makefile,v
>> >> retrieving revision 1.20
>> >> diff -u -p -r1.20 Makefile
>> >> --- Makefile 31 Dec 2025 14:23:22 -0000 1.20
>> >> +++ Makefile 1 Mar 2026 13:48:36 -0000
>> >> @@ -10,6 +10,8 @@ HOMEPAGE= https://dunst-project.org/
>> >>
>> >> MAINTAINER = Timo Myyra <timo.myyra@bittivirhe.fi>
>> >>
>> >> +FLAVORS = wayland
>> >> +FLAVOR ?=
>> >> # BSD
>> >> PERMIT_PACKAGE = Yes
>> >>
>> >> @@ -44,8 +46,14 @@ 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"
>> >> +
>> >> +.if ${FLAVOR:Mwayland}
>> >> +LIB_DEPENDS += wayland/wayland
>> >> +WANTLIB += wayland-client wayland-cursor
>> >> +.else
>> >> +MAKE_FLAGS += WAYLAND=0
>> >> +.endif
>> >>
>> >> pre-configure:
>> >> ${SUBST_CMD} ${WRKSRC}/docs/dunst.1.pod.in \
>> >
>>
>>

Hi,

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.

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)
++

No comments:

Post a Comment