Download raw body.
update: x11/dunst to 1.12.2
Friendly ping.
I am using the updated port since the day I have first submitted it
here. Seems to work fine. Or is there anything left to do?
On Mon Mar 24, 2025 at 8:30 PM CET, Alvar Penning wrote:
> On Mon Mar 24, 2025 at 10:13 AM CET, Stuart Henderson wrote:
>> The completions files would be better in the standard locations
>> (probably easiest to mv in post-install).
>
> Thanks for the feedback. I have attached an updated patch.
>
> Best,
> Alvar
>
>
> diff --git Makefile Makefile
> index 775e475ea5c..03413c0556d 100644
> --- Makefile
> +++ Makefile
> @@ -2,8 +2,7 @@ COMMENT = customizable and lightweight notification-daemon
>
> GH_ACCOUNT = dunst-project
> GH_PROJECT = dunst
> -GH_TAGNAME = v1.9.2
> -REVISION = 2
> +GH_TAGNAME = v1.12.2
>
> CATEGORIES = x11
>
> @@ -52,5 +51,8 @@ pre-configure:
>
> post-install:
> mv ${WRKINST}/${SYSCONFDIR}/dunst ${PREFIX}/share
> + mv ${PREFIX}/share/examples/bash-completion ${PREFIX}/share/bash-completion
> + mv ${PREFIX}/share/examples/fish ${PREFIX}/share/fish
> + mv ${PREFIX}/share/examples/zsh ${PREFIX}/share/zsh
>
> .include <bsd.port.mk>
> diff --git distinfo distinfo
> index 093bbc84211..131aa727da1 100644
> --- distinfo
> +++ distinfo
> @@ -1,2 +1,2 @@
> -SHA256 (dunst-1.9.2.tar.gz) = +mzkXAr0uuGIsNZ5pbqS+Pm35DAbsbtHboLfJrzp5xo=
> -SIZE (dunst-1.9.2.tar.gz) = 4614703
> +SHA256 (dunst-1.12.2.tar.gz) = j3ZkvU5gg+lgTighRf5bje52VfoLCZpbaColSeHzPTI=
> +SIZE (dunst-1.12.2.tar.gz) = 4657260
> diff --git patches/patch-config_mk patches/patch-config_mk
> index 958ea426173..c010fc861b3 100644
> --- patches/patch-config_mk
> +++ patches/patch-config_mk
> @@ -1,13 +1,13 @@
> Index: config.mk
> --- config.mk.orig
> +++ config.mk
> -@@ -42,8 +42,8 @@ endif
> +@@ -52,8 +52,8 @@ endif
>
> # flags
> - DEFAULT_CPPFLAGS = -Wno-gnu-zero-variadic-macro-arguments -D_DEFAULT_SOURCE -DVERSION=\"${VERSION}\" -DSYSCONFDIR=\"${SYSCONFDIR}\"
> --DEFAULT_CFLAGS = -g -std=gnu99 -pedantic -Wall -Wno-overlength-strings -Os ${ENABLE_WAYLAND} ${EXTRA_CFLAGS}
> + 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_LDFLAGS = -lm -lrt
> -+DEFAULT_CFLAGS = -g -std=gnu99 -pedantic -Wall -Wno-overlength-strings ${ENABLE_WAYLAND} ${EXTRA_CFLAGS}
> ++DEFAULT_CFLAGS = -g -std=gnu11 -pedantic -Wall -Wno-overlength-strings ${EXTRA_CFLAGS}
> +DEFAULT_LDFLAGS = -lm
>
> CPPFLAGS_DEBUG := -DDEBUG_BUILD
> diff --git patches/patch-docs_dunst_1_pod patches/patch-docs_dunst_1_pod
> index e6662fa63ed..f78cc4119e3 100644
> --- patches/patch-docs_dunst_1_pod
> +++ patches/patch-docs_dunst_1_pod
> @@ -1,7 +1,7 @@
> Index: docs/dunst.1.pod
> --- docs/dunst.1.pod.orig
> +++ docs/dunst.1.pod
> -@@ -61,7 +61,7 @@ Display a notification on startup.
> +@@ -94,7 +94,7 @@ Set notification timeout time.
>
> A default configuration file is included (usually ##SYSCONFDIR##/dunst/dunstrc)
> and serves as the least important configuration file. Note: this was previously
> diff --git patches/patch-docs_dunst_5_pod patches/patch-docs_dunst_5_pod
> index 76eb300d292..df6ae772052 100644
> --- patches/patch-docs_dunst_5_pod
> +++ patches/patch-docs_dunst_5_pod
> @@ -1,7 +1,7 @@
> Index: docs/dunst.5.pod
> --- docs/dunst.5.pod.orig
> +++ docs/dunst.5.pod
> -@@ -409,7 +409,7 @@ Hide the count of stacked duplicate notifications.
> +@@ -463,7 +463,7 @@ Hide the count of stacked duplicate notifications.
> Show an indicator if a notification contains actions and/or open-able URLs. See
> ACTIONS below for further details.
>
> @@ -10,16 +10,16 @@ Index: docs/dunst.5.pod
>
> Can be set to a colon-separated list of paths to search for icons to use with
> notifications.
> -@@ -423,7 +423,7 @@ replace this and will need new settings.
> - Comma-separated of names of the the themes to use for looking up icons. This has
> - to be the name of the directory in which the theme is located, not the
> +@@ -477,7 +477,7 @@ replace icon_path search.
> + Comma-separated list of names of the themes to use for looking up icons. This
> + has to be the name of the directory in which the theme is located, not the
> human-friendly name of the theme. So for example, the theme B<Breeze Dark> is
> -located in F</usr/share/icons/breeze-dark>. In this case you have to set the
> +located in F<${PREFIX}/share/icons/breeze-dark>. In this case you have to set the
> theme to B<breeze-dark>.
>
> The first theme in the list is the most important. Only if the icon cannot be
> -@@ -461,12 +461,12 @@ Maximum number of notifications that will be kept in h
> +@@ -515,12 +515,12 @@ Maximum number of notifications that will be kept in h
> is reached, older notifications will be deleted once a new one arrives. See
> HISTORY.
>
> diff --git patches/patch-dunstify_c patches/patch-dunstify_c
> deleted file mode 100644
> index 16accda91f0..00000000000
> --- patches/patch-dunstify_c
> +++ /dev/null
> @@ -1,75 +0,0 @@
> -From 09501e55cfde0b10f8950adb2a94762198b5fcc9 Mon Sep 17 00:00:00 2001
> -From: bynect <68197565+bynect@users.noreply.github.com>
> -Date: Mon, 24 Feb 2025 17:45:03 +0100
> -Subject: [PATCH 1/2] Use properties instead of private fields in dunstify
> -
> -From 20992966f6c00edb4b0233906971307d8d73148c Mon Sep 17 00:00:00 2001
> -From: bynect <68197565+bynect@users.noreply.github.com>
> -Date: Tue, 25 Feb 2025 19:38:02 +0100
> -Subject: [PATCH 2/2] Fix warning with cast
> -
> -Index: dunstify.c
> ---- dunstify.c.orig
> -+++ dunstify.c
> -@@ -171,53 +171,20 @@ void parse_commandline(int argc, char *argv[])
> - }
> - }
> -
> --typedef struct _NotifyNotificationPrivate
> --{
> -- guint32 id;
> -- char *app_name;
> -- char *summary;
> -- char *body;
> --
> -- /* NULL to use icon data. Anything else to have server lookup icon */
> -- char *icon_name;
> --
> -- /*
> -- * -1 = use server default
> -- * 0 = never timeout
> -- * > 0 = Number of milliseconds before we timeout
> -- */
> -- gint timeout;
> --
> -- GSList *actions;
> -- GHashTable *action_map;
> -- GHashTable *hints;
> --
> -- gboolean has_nondefault_actions;
> -- gboolean updates_pending;
> --
> -- gulong proxy_signal_handler;
> --
> -- gint closed_reason;
> --} knickers;
> --
> - int get_id(NotifyNotification *n)
> - {
> -- knickers *kn = n->priv;
> --
> -- /* I'm sorry for taking a peek */
> -- return kn->id;
> -+ GValue value = G_VALUE_INIT;
> -+ g_value_init(&value, G_TYPE_UINT);
> -+ g_object_get_property(G_OBJECT(n), "id", &value);
> -+ return g_value_get_int(&value);
> - }
> -
> - void put_id(NotifyNotification *n, guint32 id)
> - {
> -- knickers *kn = n->priv;
> --
> -- /* And know I'm putting stuff into
> -- * your knickers. I'm sorry.
> -- * I'm so sorry.
> -- * */
> --
> -- kn->id = id;
> -+ GValue value = G_VALUE_INIT;
> -+ g_value_init(&value, G_TYPE_UINT);
> -+ g_value_set_uint(&value, id);
> -+ g_object_set_property(G_OBJECT(n), "id", &value);
> - }
> -
> - void actioned(NotifyNotification *n, char *a, gpointer foo)
> diff --git patches/patch-dunstrc patches/patch-dunstrc
> index fed4e50ecba..74ca9bd6eed 100644
> --- patches/patch-dunstrc
> +++ patches/patch-dunstrc
> @@ -1,16 +1,16 @@
> Index: dunstrc
> --- dunstrc.orig
> +++ dunstrc
> -@@ -217,7 +217,7 @@
> +@@ -238,7 +238,7 @@
> max_icon_size = 128
>
> - # Paths to default icons (only neccesary when not using recursive icon lookup)
> + # Paths to default icons (only necessary when not using recursive icon lookup)
> - icon_path = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/
> + icon_path = ${LOCALBASE}/share/icons/gnome/16x16/status/:${LOCALBASE}/share/icons/gnome/16x16/devices/
>
> ### History ###
>
> -@@ -231,10 +231,10 @@
> +@@ -252,10 +252,10 @@
> ### Misc/Advanced ###
>
> # dmenu path.
> diff --git patches/patch-src_dunst_c patches/patch-src_dunst_c
> deleted file mode 100644
> index cba0c845fee..00000000000
> --- patches/patch-src_dunst_c
> +++ /dev/null
> @@ -1,12 +0,0 @@
> -Index: src/dunst.c
> ---- src/dunst.c.orig
> -+++ src/dunst.c
> -@@ -100,7 +100,7 @@ static gboolean run(void *data)
> - gint64 sleep = timeout_at - now;
> - sleep = MAX(sleep, 1000); // Sleep at least 1ms
> -
> -- LOG_D("Sleeping for %li ms", sleep/1000);
> -+ LOG_D("Sleeping for %lli ms", (long long)sleep/1000);
> -
> - if (sleep >= 0) {
> - if (reason == 0 || next_timeout < now || timeout_at < next_timeout) {
> diff --git patches/patch-src_input_c patches/patch-src_input_c
> deleted file mode 100644
> index f49421b7619..00000000000
> --- patches/patch-src_input_c
> +++ /dev/null
> @@ -1,13 +0,0 @@
> -Index: src/input.c
> ---- src/input.c.orig
> -+++ src/input.c
> -@@ -4,7 +4,9 @@
> - #include "settings.h"
> - #include "queues.h"
> - #include <stddef.h>
> -+#ifdef __linux__
> - #include <linux/input-event-codes.h>
> -+#endif
> -
> - int get_notification_clickable_height(struct notification *n, bool first, bool last)
> - {
> diff --git patches/patch-src_notification_c patches/patch-src_notification_c
> deleted file mode 100644
> index 715b6f4731c..00000000000
> --- patches/patch-src_notification_c
> +++ /dev/null
> @@ -1,41 +0,0 @@
> -Index: src/notification.c
> ---- src/notification.c.orig
> -+++ src/notification.c
> -@@ -60,7 +60,7 @@ void notification_print(const struct notification *n)
> - printf("\ticon_id: '%s'\n", n->icon_id);
> - printf("\tdesktop_entry: '%s'\n", n->desktop_entry ? n->desktop_entry : "");
> - printf("\tcategory: %s\n", n->category);
> -- printf("\ttimeout: %ld\n", n->timeout/1000);
> -+ printf("\ttimeout: %lld\n", (long long)n->timeout/1000);
> - printf("\turgency: %s\n", notification_urgency_to_string(n->urgency));
> - printf("\ttransient: %d\n", n->transient);
> - printf("\tformatted: '%s'\n", n->msg);
> -@@ -140,8 +140,8 @@ void notification_run_script(struct notification *n)
> - // Set environment variables
> - gchar *n_id_str = g_strdup_printf("%i", n->id);
> - gchar *n_progress_str = g_strdup_printf("%i", n->progress);
> -- gchar *n_timeout_str = g_strdup_printf("%li", n->timeout/1000);
> -- gchar *n_timestamp_str = g_strdup_printf("%li", n->timestamp / 1000);
> -+ gchar *n_timeout_str = g_strdup_printf("%lli", (long long)n->timeout/1000);
> -+ gchar *n_timestamp_str = g_strdup_printf("%lli", (long long)n->timestamp / 1000);
> - safe_setenv("DUNST_APP_NAME", appname);
> - safe_setenv("DUNST_SUMMARY", summary);
> - safe_setenv("DUNST_BODY", body);
> -@@ -684,14 +684,14 @@ void notification_update_text_to_render(struct notific
> - char *new_buf;
> - if (hours > 0) {
> - new_buf =
> -- g_strdup_printf("%s (%ldh %ldm %lds old)", buf, hours,
> -+ g_strdup_printf("%s (%lldh %lldm %llds old)", buf, hours,
> - minutes, seconds);
> - } else if (minutes > 0) {
> - new_buf =
> -- g_strdup_printf("%s (%ldm %lds old)", buf, minutes,
> -+ g_strdup_printf("%s (%lldm %llds old)", buf, minutes,
> - seconds);
> - } else {
> -- new_buf = g_strdup_printf("%s (%lds old)", buf, seconds);
> -+ new_buf = g_strdup_printf("%s (%llds old)", buf, seconds);
> - }
> -
> - g_free(buf);
> diff --git patches/patch-src_settings_h patches/patch-src_settings_h
> deleted file mode 100644
> index e7f4abb95bf..00000000000
> --- patches/patch-src_settings_h
> +++ /dev/null
> @@ -1,12 +0,0 @@
> -Index: src/settings.h
> ---- src/settings.h.orig
> -+++ src/settings.h
> -@@ -13,6 +13,8 @@
> -
> - #define LIST_END (-1)
> -
> -+enum mouse_button { BTN_LEFT=1, BTN_RIGHT, BTN_MIDDLE, BTN_TOUCH };
> -+
> - enum alignment { ALIGN_LEFT, ALIGN_CENTER, ALIGN_RIGHT };
> - enum vertical_alignment { VERTICAL_TOP, VERTICAL_CENTER, VERTICAL_BOTTOM };
> - enum separator_color { SEP_FOREGROUND, SEP_AUTO, SEP_FRAME, SEP_CUSTOM };
> diff --git patches/patch-src_utils_c patches/patch-src_utils_c
> new file mode 100644
> index 00000000000..75f20a35473
> --- /dev/null
> +++ patches/patch-src_utils_c
> @@ -0,0 +1,51 @@
> +Index: src/utils.c
> +--- src/utils.c.orig
> ++++ src/utils.c
> +@@ -13,7 +13,6 @@
> + #include <sys/stat.h>
> + #include <time.h>
> + #include <unistd.h>
> +-#include <wordexp.h>
> +
> + #include "log.h"
> + #include "settings_data.h"
> +@@ -180,34 +179,13 @@ int string_array_length(char **s)
> + /* see utils.h */
> + char *string_to_path(char *string)
> + {
> +- ASSERT_OR_RET(string, string);
> +-
> +- wordexp_t we;
> +- switch (wordexp(string, &we, WRDE_NOCMD | WRDE_UNDEF)) {
> +- case 0:
> +- break;
> +- case WRDE_BADCHAR:
> +- LOG_W("Expansion of \"%s\" failed. It contains invalid characters.", string);
> +- return string;
> +- case WRDE_BADVAL:
> +- LOG_W("Expansion of \"%s\" failed. It contains an undefined variable.", string);
> +- return string;
> +- case WRDE_CMDSUB:
> +- LOG_W("Expansion of \"%s\" failed. The requested command substitution is currently not supported.", string);
> +- return string;
> +- case WRDE_NOSPACE:
> +- LOG_W("Expansion of \"%s\" failed. We ran out of memory.", string);
> +- return string;
> +- case WRDE_SYNTAX:
> +- LOG_W("Expansion of \"%s\" failed. It contains invalid syntax.", string);
> +- return string;
> ++ if (string && STRN_EQ(string, "~/", 2)) {
> ++ char *home = g_strconcat(user_get_home(), "/", NULL);
> ++ string = string_replace_at(string, 0, 2, home);
> ++ g_free(home);
> + }
> +- g_free(string);
> +
> +- char *res = g_strjoinv(" ", we.we_wordv);
> +- wordfree(&we);
> +-
> +- return res;
> ++ return string;
> + }
> +
> + /* see utils.h */
> diff --git patches/patch-src_x11_x_c patches/patch-src_x11_x_c
> deleted file mode 100644
> index 7fd20d0e4ed..00000000000
> --- patches/patch-src_x11_x_c
> +++ /dev/null
> @@ -1,13 +0,0 @@
> -Index: src/x11/x.c
> ---- src/x11/x.c.orig
> -+++ src/x11/x.c
> -@@ -19,7 +19,9 @@
> - #include <X11/Xlib.h>
> - #include <X11/Xresource.h>
> - #include <X11/Xutil.h>
> -+#ifdef __linux__
> - #include <linux/input-event-codes.h>
> -+#endif
> -
> - #include "../dbus.h"
> - #include "../draw.h"
> diff --git pkg/PLIST pkg/PLIST
> index 118752ce994..2c1e8aa2ea3 100644
> --- pkg/PLIST
> +++ pkg/PLIST
> @@ -3,7 +3,10 @@ bin/dunstctl
> @bin bin/dunstify
> @man man/man1/dunst.1
> @man man/man1/dunstctl.1
> +@man man/man1/dunstify.1
> @man man/man5/dunst.5
> +share/bash-completion/completions/dunst
> +share/bash-completion/completions/dunstctl
> share/dunst/
> @sample ${SYSCONFDIR}/dunst/
> share/dunst/dunstrc
> @@ -11,3 +14,12 @@ share/dunst/dunstrc
> share/examples/dbus-1/
> share/examples/dbus-1/services/
> share/examples/dbus-1/services/org.knopwob.dunst.service
> +share/fish/
> +share/fish/vendor_completions.d/
> +share/fish/vendor_completions.d/dunst.fish
> +share/fish/vendor_completions.d/dunstctl.fish
> +share/fish/vendor_completions.d/dunstify.fish
> +share/zsh/
> +share/zsh/site-functions/
> +share/zsh/site-functions/_dunst
> +share/zsh/site-functions/_dunstctl
update: x11/dunst to 1.12.2