Theo Buehler <t...@theobuehler.org> writes:

>> ...and I forgot to cvs add the new patches before re-generating the
>> diff...
>> 
>> thanks sdk@ for noticing :)
>> 
>
> I think this needs either -std=c11 or -std=gnu11, so something like this
> in the m
>
> # C11 with GNU extensions
> COMPILER =    base-clang ports-gcc
> COMPILER_LANGS = c
> CFLAGS +=     -std=c11
>
> due to
>
> src/dbus.c:1059:9: warning: '_Static_assert' is a C11 extension 
> [-Wc11-extensions]
>         g_clear_pointer(&introspection_data, g_dbus_node_info_unref);
>
> etc.
>
> With -std=c11 there are a bunch of compiler warnings on sparc64 about the
> use of variadic macros that go away with -std=gnu11, but I'm unsure if
> that's reason enough to use -std=gnu11...
>
> There are also a couple new time_t format strings warnings in dunst.c and
> notifications.c that should be fixed with the usual %lli + (long long)
> cast.

agreed.  I wasn't sure about adding -std=c11 and the warnings about that
hide the time_t format warnings.  I'll pay more attention next time.

Attaching a diff with these addressed and a couple of extra cast for
gint64 in notifications.c since i was already there.  Now it compiles
without warnings :)

Thanks,

Omar Polo


(both attaching and inlining until I discover why the previous diff was
mangled)


Index: Makefile
===================================================================
RCS file: /home/cvs/ports/x11/dunst/Makefile,v
retrieving revision 1.11
diff -u -p -r1.11 Makefile
--- Makefile    27 Sep 2020 18:37:40 -0000      1.11
+++ Makefile    12 Dec 2021 19:34:36 -0000
@@ -4,7 +4,7 @@ COMMENT =       customizable and lightweight n
 
 GH_ACCOUNT =   dunst-project
 GH_PROJECT =   dunst
-GH_TAGNAME =   v1.5.0
+GH_TAGNAME =   v1.7.3
 
 CATEGORIES =   x11
 
@@ -19,9 +19,15 @@ WANTLIB += X11 Xext Xinerama Xrandr Xss 
 WANTLIB += gio-2.0 glib-2.0 gobject-2.0 harfbuzz intl m notify
 WANTLIB += pango-1.0 pangocairo-1.0 pthread
 
+# C11 with GNU extensions
+COMPILER =     base-clang ports-gcc
+COMPILER_LANGS = c
+CFLAGS +=      -std=c11
+
 USE_GMAKE =    Yes
 
-BUILD_DEPENDS =        x11/dbus
+BUILD_DEPENDS =        graphics/png \
+               x11/dbus
 
 LIB_DEPENDS += devel/gettext,-runtime \
                devel/glib2 \
@@ -32,11 +38,20 @@ LIB_DEPENDS +=      devel/gettext,-runtime \
 
 RUN_DEPENDS += x11/dbus
 
+TEST_DEPENDS = shells/bash
+
+MAKE_FLAGS =   WAYLAND=0
+
 FAKE_FLAGS =   PREFIX="${PREFIX}" \
                MANPREFIX="${PREFIX}/man" \
-               DATADIR="${PREFIX}/share/examples"
+               DATADIR="${PREFIX}/share/examples" \
+               SYSCONFDIR="/etc"
 
 pre-configure:
-       ${SUBST_CMD} ${WRKSRC}/docs/dunst.pod ${WRKSRC}/dunstrc
+       ${SUBST_CMD} ${WRKSRC}/docs/dunst.1.pod \
+               ${WRKSRC}/docs/dunst.5.pod ${WRKSRC}/dunstrc
+
+post-install:
+       mv ${WRKINST}/${SYSCONFDIR}/dunst ${PREFIX}/share
 
 .include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /home/cvs/ports/x11/dunst/distinfo,v
retrieving revision 1.6
diff -u -p -r1.6 distinfo
--- distinfo    25 Sep 2020 13:53:53 -0000      1.6
+++ distinfo    12 Dec 2021 18:33:45 -0000
@@ -1,2 +1,2 @@
-SHA256 (dunst-1.5.0.tar.gz) = LDkK3xRLX6D/AH6jYWyQ8btTffaoBCGWmT9VhdG8jJo=
-SIZE (dunst-1.5.0.tar.gz) = 169272
+SHA256 (dunst-1.7.3.tar.gz) = FQx4JpAobhY2Y7DrJgW3M5JyQBWXOLg2WAi4UeCvu+4=
+SIZE (dunst-1.7.3.tar.gz) = 4596283
Index: patches/patch-config_mk
===================================================================
RCS file: /home/cvs/ports/x11/dunst/patches/patch-config_mk,v
retrieving revision 1.4
diff -u -p -r1.4 patch-config_mk
--- patches/patch-config_mk     2 Aug 2019 13:49:29 -0000       1.4
+++ patches/patch-config_mk     12 Dec 2021 19:48:48 -0000
@@ -3,12 +3,14 @@ $OpenBSD: patch-config_mk,v 1.4 2019/08/
 Index: config.mk
 --- config.mk.orig
 +++ config.mk
-@@ -26,7 +26,7 @@ VALGRIND ?= valgrind
+@@ -36,8 +36,8 @@ endif
  
  # flags
- DEFAULT_CPPFLAGS = -D_DEFAULT_SOURCE -DVERSION=\"${VERSION}\"
--DEFAULT_CFLAGS   = -g --std=gnu99 -pedantic -Wall -Wno-overlength-strings -Os 
${STATIC}
-+DEFAULT_CFLAGS   = -g --std=gnu99 -pedantic -Wall -Wno-overlength-strings 
${STATIC}
- DEFAULT_LDFLAGS  = -lm
+ DEFAULT_CPPFLAGS = -D_DEFAULT_SOURCE -DVERSION=\"${VERSION}\" 
-DSYSCONFDIR=\"${SYSCONFDIR}\"
+-DEFAULT_CFLAGS   = -g -std=gnu99 -pedantic -Wall -Wno-overlength-strings -Os 
${ENABLE_WAYLAND} ${EXTRA_CFLAGS}
+-DEFAULT_LDFLAGS  = -lm -lrt
++DEFAULT_CFLAGS   = -g -std=gnu99 -pedantic -Wall -Wno-overlength-strings 
${ENABLE_WAYLAND} ${EXTRA_CFLAGS}
++DEFAULT_LDFLAGS  = -lm
  
  CPPFLAGS_DEBUG := -DDEBUG_BUILD
+ CFLAGS_DEBUG   := -O0
Index: patches/patch-docs_dunst_1_pod
===================================================================
RCS file: patches/patch-docs_dunst_1_pod
diff -N patches/patch-docs_dunst_1_pod
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-docs_dunst_1_pod      12 Dec 2021 18:33:45 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: docs/dunst.1.pod
+--- docs/dunst.1.pod.orig
++++ docs/dunst.1.pod
+@@ -61,7 +61,7 @@ Display a notification on startup.
+ 
+ A default configuration file is included (usually 
##SYSCONFDIR##/dunst/dunstrc)
+ and serves as the least important configuration file. Note: this was 
previously
+-/usr/share/dunst/dunstrc. You can edit this file to change the system-wide
++${PREFIX}/share/dunst/dunstrc. You can edit this file to change the 
system-wide
+ defaults or copy it to a more important location to override its settings. See
+ the FILES section for more details on where dunst searches for its
+ configuration files and how settings get applied.
Index: patches/patch-docs_dunst_5_pod
===================================================================
RCS file: patches/patch-docs_dunst_5_pod
diff -N patches/patch-docs_dunst_5_pod
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-docs_dunst_5_pod      12 Dec 2021 18:33:45 -0000
@@ -0,0 +1,38 @@
+$OpenBSD$
+
+Index: docs/dunst.5.pod
+--- docs/dunst.5.pod.orig
++++ docs/dunst.5.pod
+@@ -384,7 +384,7 @@ gets the last say.
+ 
+ If B<icon_position> is set to off, this setting is ignored.
+ 
+-=item B<icon_path> (default: 
"/usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/")
++=item B<icon_path> (default: 
"${PREFIX}/share/icons/gnome/16x16/status/:${PREFIX}/share/icons/gnome/16x16/devices/")
+ 
+ Can be set to a colon-separated list of paths to search for icons to use with
+ notifications.
+@@ -398,7 +398,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
+ 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
+@@ -438,12 +438,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.
+ 
+-=item B<dmenu> (default: "/usr/bin/dmenu")
++=item B<dmenu> (default: "${LOCALBASE}/bin/dmenu")
+ 
+ The command that will be run when opening the context menu. Should be either
+ a dmenu command or a dmenu-compatible menu.
+ 
+-=item B<browser> (default: "/usr/bin/xdg-open")
++=item B<browser> (default: "${LOCALBASE}/bin/xdg-open")
+ 
+ The command that will be run when opening a URL. The URL to be opened will be
+ appended to the end of the value of this setting.
Index: patches/patch-docs_dunst_pod
===================================================================
RCS file: patches/patch-docs_dunst_pod
diff -N patches/patch-docs_dunst_pod
--- patches/patch-docs_dunst_pod        2 Aug 2019 13:49:29 -0000       1.2
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,14 +0,0 @@
-$OpenBSD: patch-docs_dunst_pod,v 1.2 2019/08/02 13:49:29 sthen Exp $
-
-Index: docs/dunst.pod
---- docs/dunst.pod.orig
-+++ docs/dunst.pod
-@@ -35,7 +35,7 @@ rules or using the output in other scripts.
- 
- =head1 CONFIGURATION
- 
--An example configuration file is included (usually /usr/share/dunst/dunstrc).
-+An example configuration file is included in 
${PREFIX}/share/examples/dunst/dunstrc.
- To change the configuration, copy this file to ~/.config/dunst/dunstrc and 
edit
- it accordingly.
- 
Index: patches/patch-dunstrc
===================================================================
RCS file: /home/cvs/ports/x11/dunst/patches/patch-dunstrc,v
retrieving revision 1.3
diff -u -p -r1.3 patch-dunstrc
--- patches/patch-dunstrc       25 Sep 2020 13:53:53 -0000      1.3
+++ patches/patch-dunstrc       12 Dec 2021 18:33:45 -0000
@@ -3,7 +3,7 @@ $OpenBSD: patch-dunstrc,v 1.3 2020/09/25
 Index: dunstrc
 --- dunstrc.orig
 +++ dunstrc
-@@ -175,7 +175,7 @@
+@@ -196,7 +196,7 @@
      max_icon_size = 32
  
      # Paths to default icons.
@@ -12,16 +12,16 @@ Index: dunstrc
  
      ### History ###
  
-@@ -189,10 +189,10 @@
+@@ -210,10 +210,10 @@
      ### Misc/Advanced ###
  
      # dmenu path.
 -    dmenu = /usr/bin/dmenu -p dunst:
-+    dmenu = ${PREFIX}/bin/dmenu -p dunst:
++    dmenu = ${LOCALBASE}/bin/dmenu -p dunst:
  
      # Browser for opening urls in context menu.
--    browser = /usr/bin/firefox -new-tab
-+    browser = ${PREFIX}/bin/firefox -new-tab
+-    browser = /usr/bin/xdg-open
++    browser = ${LOCALBASE}/bin/xdg-open
  
      # Always run rule-defined scripts, even if the notification is suppressed
      always_run_script = true
Index: patches/patch-src_dunst_c
===================================================================
RCS file: patches/patch-src_dunst_c
diff -N patches/patch-src_dunst_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_dunst_c   12 Dec 2021 19:39:47 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: src/dunst.c
+--- src/dunst.c.orig
++++ src/dunst.c
+@@ -95,7 +95,7 @@ static gboolean run(void *data)
+                 gint64 sleep = queues_get_next_datachange(now);
+                 gint64 timeout_at = now + sleep;
+ 
+-                LOG_D("Sleeping for %li ms", sleep/1000);
++                LOG_D("Sleeping for %lli ms", (long long)sleep/1000);
+ 
+                 if (sleep >= 0) {
+                         if (next_timeout < now || timeout_at < next_timeout) {
Index: patches/patch-src_icon-lookup_c
===================================================================
RCS file: patches/patch-src_icon-lookup_c
diff -N patches/patch-src_icon-lookup_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_icon-lookup_c     12 Dec 2021 18:33:45 -0000
@@ -0,0 +1,15 @@
+$OpenBSD$
+
+Don't use malloc.h header on OpenBSD.
+
+Index: src/icon-lookup.c
+--- src/icon-lookup.c.orig
++++ src/icon-lookup.c
+@@ -3,7 +3,6 @@
+ 
+ #include <glib.h>
+ #include <stdio.h>
+-#include <malloc.h>
+ #include <unistd.h>
+ #include <assert.h>
+ 
Index: patches/patch-src_input_c
===================================================================
RCS file: patches/patch-src_input_c
diff -N patches/patch-src_input_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_input_c   12 Dec 2021 18:33:45 -0000
@@ -0,0 +1,15 @@
+$OpenBSD$
+
+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
+ 
+ struct notification *get_notification_at(const int y) {
+         int curr_y = settings.frame_width;
Index: patches/patch-src_notification_c
===================================================================
RCS file: /home/cvs/ports/x11/dunst/patches/patch-src_notification_c,v
retrieving revision 1.3
diff -u -p -r1.3 patch-src_notification_c
--- patches/patch-src_notification_c    25 Sep 2020 13:53:53 -0000      1.3
+++ patches/patch-src_notification_c    12 Dec 2021 19:52:16 -0000
@@ -3,7 +3,7 @@ $OpenBSD: patch-src_notification_c,v 1.3
 Index: src/notification.c
 --- src/notification.c.orig
 +++ src/notification.c
-@@ -58,7 +58,7 @@ void notification_print(const struct notification *n)
+@@ -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);
@@ -12,23 +12,32 @@ Index: src/notification.c
          printf("\turgency: %s\n", notification_urgency_to_string(n->urgency));
          printf("\ttransient: %d\n", n->transient);
          printf("\tformatted: '%s'\n", n->msg);
-@@ -574,14 +574,14 @@ void notification_update_text_to_render(struct notific
+@@ -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);
+@@ -668,14 +668,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,
--                                            minutes, seconds);
-+                            g_strdup_printf("%s (%lldh %lldm %llds old)", 
buf, (long long)hours,
-+                                            (long long)minutes, (long 
long)seconds);
++                            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,
--                                            seconds);
-+                            g_strdup_printf("%s (%lldm %llds old)", buf, 
(long long)minutes,
-+                                            (long long)seconds);
++                            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, 
(long long)seconds);
++                        new_buf = g_strdup_printf("%s (%llds old)", buf, 
seconds);
                  }
  
                  g_free(buf);
Index: patches/patch-src_settings_h
===================================================================
RCS file: patches/patch-src_settings_h
diff -N patches/patch-src_settings_h
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_settings_h        12 Dec 2021 18:33:45 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: src/settings.h
+--- src/settings.h.orig
++++ src/settings.h
+@@ -13,6 +13,8 @@
+ 
+ #define LIST_END (-1)
+ 
++enum mouse_button { BTN_LEFT, BTN_RIGHT, BTN_MIDDLE, BTN_TOUCH };
++
+ enum alignment { ALIGN_LEFT, ALIGN_CENTER, ALIGN_RIGHT };
+ enum icon_position { ICON_LEFT, ICON_RIGHT, ICON_OFF };
+ enum vertical_alignment { VERTICAL_TOP, VERTICAL_CENTER, VERTICAL_BOTTOM };
Index: patches/patch-src_x11_x_c
===================================================================
RCS file: patches/patch-src_x11_x_c
diff -N patches/patch-src_x11_x_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_x11_x_c   12 Dec 2021 18:33:45 -0000
@@ -0,0 +1,15 @@
+$OpenBSD$
+
+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"
Index: pkg/PLIST
===================================================================
RCS file: /home/cvs/ports/x11/dunst/pkg/PLIST,v
retrieving revision 1.4
diff -u -p -r1.4 PLIST
--- pkg/PLIST   25 Sep 2020 13:53:53 -0000      1.4
+++ pkg/PLIST   12 Dec 2021 18:33:45 -0000
@@ -4,6 +4,11 @@ bin/dunstctl
 @bin bin/dunstify
 @man man/man1/dunst.1
 @man man/man1/dunstctl.1
-share/dbus-1/services/org.knopwob.dunst.service
-share/examples/dunst/
-share/examples/dunst/dunstrc
+@man man/man5/dunst.5
+share/dunst/
+@sample ${SYSCONFDIR}/dunst/
+share/dunst/dunstrc
+@sample ${SYSCONFDIR}/dunst/dunstrc
+share/examples/dbus-1/
+share/examples/dbus-1/services/
+share/examples/dbus-1/services/org.knopwob.dunst.service

Index: Makefile
===================================================================
RCS file: /home/cvs/ports/x11/dunst/Makefile,v
retrieving revision 1.11
diff -u -p -r1.11 Makefile
--- Makefile	27 Sep 2020 18:37:40 -0000	1.11
+++ Makefile	12 Dec 2021 19:34:36 -0000
@@ -4,7 +4,7 @@ COMMENT =	customizable and lightweight n
 
 GH_ACCOUNT =	dunst-project
 GH_PROJECT =	dunst
-GH_TAGNAME =	v1.5.0
+GH_TAGNAME =	v1.7.3
 
 CATEGORIES =	x11
 
@@ -19,9 +19,15 @@ WANTLIB += X11 Xext Xinerama Xrandr Xss 
 WANTLIB += gio-2.0 glib-2.0 gobject-2.0 harfbuzz intl m notify
 WANTLIB += pango-1.0 pangocairo-1.0 pthread
 
+# C11 with GNU extensions
+COMPILER =	base-clang ports-gcc
+COMPILER_LANGS = c
+CFLAGS +=	-std=c11
+
 USE_GMAKE =	Yes
 
-BUILD_DEPENDS =	x11/dbus
+BUILD_DEPENDS =	graphics/png \
+		x11/dbus
 
 LIB_DEPENDS +=	devel/gettext,-runtime \
 		devel/glib2 \
@@ -32,11 +38,20 @@ LIB_DEPENDS +=	devel/gettext,-runtime \
 
 RUN_DEPENDS +=	x11/dbus
 
+TEST_DEPENDS =	shells/bash
+
+MAKE_FLAGS =	WAYLAND=0
+
 FAKE_FLAGS =	PREFIX="${PREFIX}" \
 		MANPREFIX="${PREFIX}/man" \
-		DATADIR="${PREFIX}/share/examples"
+		DATADIR="${PREFIX}/share/examples" \
+		SYSCONFDIR="/etc"
 
 pre-configure:
-	${SUBST_CMD} ${WRKSRC}/docs/dunst.pod ${WRKSRC}/dunstrc
+	${SUBST_CMD} ${WRKSRC}/docs/dunst.1.pod \
+		${WRKSRC}/docs/dunst.5.pod ${WRKSRC}/dunstrc
+
+post-install:
+	mv ${WRKINST}/${SYSCONFDIR}/dunst ${PREFIX}/share
 
 .include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /home/cvs/ports/x11/dunst/distinfo,v
retrieving revision 1.6
diff -u -p -r1.6 distinfo
--- distinfo	25 Sep 2020 13:53:53 -0000	1.6
+++ distinfo	12 Dec 2021 18:33:45 -0000
@@ -1,2 +1,2 @@
-SHA256 (dunst-1.5.0.tar.gz) = LDkK3xRLX6D/AH6jYWyQ8btTffaoBCGWmT9VhdG8jJo=
-SIZE (dunst-1.5.0.tar.gz) = 169272
+SHA256 (dunst-1.7.3.tar.gz) = FQx4JpAobhY2Y7DrJgW3M5JyQBWXOLg2WAi4UeCvu+4=
+SIZE (dunst-1.7.3.tar.gz) = 4596283
Index: patches/patch-config_mk
===================================================================
RCS file: /home/cvs/ports/x11/dunst/patches/patch-config_mk,v
retrieving revision 1.4
diff -u -p -r1.4 patch-config_mk
--- patches/patch-config_mk	2 Aug 2019 13:49:29 -0000	1.4
+++ patches/patch-config_mk	12 Dec 2021 19:48:48 -0000
@@ -3,12 +3,14 @@ $OpenBSD: patch-config_mk,v 1.4 2019/08/
 Index: config.mk
 --- config.mk.orig
 +++ config.mk
-@@ -26,7 +26,7 @@ VALGRIND ?= valgrind
+@@ -36,8 +36,8 @@ endif
  
  # flags
- DEFAULT_CPPFLAGS = -D_DEFAULT_SOURCE -DVERSION=\"${VERSION}\"
--DEFAULT_CFLAGS   = -g --std=gnu99 -pedantic -Wall -Wno-overlength-strings -Os ${STATIC}
-+DEFAULT_CFLAGS   = -g --std=gnu99 -pedantic -Wall -Wno-overlength-strings ${STATIC}
- DEFAULT_LDFLAGS  = -lm
+ DEFAULT_CPPFLAGS = -D_DEFAULT_SOURCE -DVERSION=\"${VERSION}\" -DSYSCONFDIR=\"${SYSCONFDIR}\"
+-DEFAULT_CFLAGS   = -g -std=gnu99 -pedantic -Wall -Wno-overlength-strings -Os ${ENABLE_WAYLAND} ${EXTRA_CFLAGS}
+-DEFAULT_LDFLAGS  = -lm -lrt
++DEFAULT_CFLAGS   = -g -std=gnu99 -pedantic -Wall -Wno-overlength-strings ${ENABLE_WAYLAND} ${EXTRA_CFLAGS}
++DEFAULT_LDFLAGS  = -lm
  
  CPPFLAGS_DEBUG := -DDEBUG_BUILD
+ CFLAGS_DEBUG   := -O0
Index: patches/patch-docs_dunst_1_pod
===================================================================
RCS file: patches/patch-docs_dunst_1_pod
diff -N patches/patch-docs_dunst_1_pod
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-docs_dunst_1_pod	12 Dec 2021 18:33:45 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: docs/dunst.1.pod
+--- docs/dunst.1.pod.orig
++++ docs/dunst.1.pod
+@@ -61,7 +61,7 @@ Display a notification on startup.
+ 
+ A default configuration file is included (usually ##SYSCONFDIR##/dunst/dunstrc)
+ and serves as the least important configuration file. Note: this was previously
+-/usr/share/dunst/dunstrc. You can edit this file to change the system-wide
++${PREFIX}/share/dunst/dunstrc. You can edit this file to change the system-wide
+ defaults or copy it to a more important location to override its settings. See
+ the FILES section for more details on where dunst searches for its
+ configuration files and how settings get applied.
Index: patches/patch-docs_dunst_5_pod
===================================================================
RCS file: patches/patch-docs_dunst_5_pod
diff -N patches/patch-docs_dunst_5_pod
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-docs_dunst_5_pod	12 Dec 2021 18:33:45 -0000
@@ -0,0 +1,38 @@
+$OpenBSD$
+
+Index: docs/dunst.5.pod
+--- docs/dunst.5.pod.orig
++++ docs/dunst.5.pod
+@@ -384,7 +384,7 @@ gets the last say.
+ 
+ If B<icon_position> is set to off, this setting is ignored.
+ 
+-=item B<icon_path> (default: "/usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/")
++=item B<icon_path> (default: "${PREFIX}/share/icons/gnome/16x16/status/:${PREFIX}/share/icons/gnome/16x16/devices/")
+ 
+ Can be set to a colon-separated list of paths to search for icons to use with
+ notifications.
+@@ -398,7 +398,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
+ 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
+@@ -438,12 +438,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.
+ 
+-=item B<dmenu> (default: "/usr/bin/dmenu")
++=item B<dmenu> (default: "${LOCALBASE}/bin/dmenu")
+ 
+ The command that will be run when opening the context menu. Should be either
+ a dmenu command or a dmenu-compatible menu.
+ 
+-=item B<browser> (default: "/usr/bin/xdg-open")
++=item B<browser> (default: "${LOCALBASE}/bin/xdg-open")
+ 
+ The command that will be run when opening a URL. The URL to be opened will be
+ appended to the end of the value of this setting.
Index: patches/patch-docs_dunst_pod
===================================================================
RCS file: patches/patch-docs_dunst_pod
diff -N patches/patch-docs_dunst_pod
--- patches/patch-docs_dunst_pod	2 Aug 2019 13:49:29 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,14 +0,0 @@
-$OpenBSD: patch-docs_dunst_pod,v 1.2 2019/08/02 13:49:29 sthen Exp $
-
-Index: docs/dunst.pod
---- docs/dunst.pod.orig
-+++ docs/dunst.pod
-@@ -35,7 +35,7 @@ rules or using the output in other scripts.
- 
- =head1 CONFIGURATION
- 
--An example configuration file is included (usually /usr/share/dunst/dunstrc).
-+An example configuration file is included in ${PREFIX}/share/examples/dunst/dunstrc.
- To change the configuration, copy this file to ~/.config/dunst/dunstrc and edit
- it accordingly.
- 
Index: patches/patch-dunstrc
===================================================================
RCS file: /home/cvs/ports/x11/dunst/patches/patch-dunstrc,v
retrieving revision 1.3
diff -u -p -r1.3 patch-dunstrc
--- patches/patch-dunstrc	25 Sep 2020 13:53:53 -0000	1.3
+++ patches/patch-dunstrc	12 Dec 2021 18:33:45 -0000
@@ -3,7 +3,7 @@ $OpenBSD: patch-dunstrc,v 1.3 2020/09/25
 Index: dunstrc
 --- dunstrc.orig
 +++ dunstrc
-@@ -175,7 +175,7 @@
+@@ -196,7 +196,7 @@
      max_icon_size = 32
  
      # Paths to default icons.
@@ -12,16 +12,16 @@ Index: dunstrc
  
      ### History ###
  
-@@ -189,10 +189,10 @@
+@@ -210,10 +210,10 @@
      ### Misc/Advanced ###
  
      # dmenu path.
 -    dmenu = /usr/bin/dmenu -p dunst:
-+    dmenu = ${PREFIX}/bin/dmenu -p dunst:
++    dmenu = ${LOCALBASE}/bin/dmenu -p dunst:
  
      # Browser for opening urls in context menu.
--    browser = /usr/bin/firefox -new-tab
-+    browser = ${PREFIX}/bin/firefox -new-tab
+-    browser = /usr/bin/xdg-open
++    browser = ${LOCALBASE}/bin/xdg-open
  
      # Always run rule-defined scripts, even if the notification is suppressed
      always_run_script = true
Index: patches/patch-src_dunst_c
===================================================================
RCS file: patches/patch-src_dunst_c
diff -N patches/patch-src_dunst_c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_dunst_c	12 Dec 2021 19:39:47 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: src/dunst.c
+--- src/dunst.c.orig
++++ src/dunst.c
+@@ -95,7 +95,7 @@ static gboolean run(void *data)
+                 gint64 sleep = queues_get_next_datachange(now);
+                 gint64 timeout_at = now + sleep;
+ 
+-                LOG_D("Sleeping for %li ms", sleep/1000);
++                LOG_D("Sleeping for %lli ms", (long long)sleep/1000);
+ 
+                 if (sleep >= 0) {
+                         if (next_timeout < now || timeout_at < next_timeout) {
Index: patches/patch-src_icon-lookup_c
===================================================================
RCS file: patches/patch-src_icon-lookup_c
diff -N patches/patch-src_icon-lookup_c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_icon-lookup_c	12 Dec 2021 18:33:45 -0000
@@ -0,0 +1,15 @@
+$OpenBSD$
+
+Don't use malloc.h header on OpenBSD.
+
+Index: src/icon-lookup.c
+--- src/icon-lookup.c.orig
++++ src/icon-lookup.c
+@@ -3,7 +3,6 @@
+ 
+ #include <glib.h>
+ #include <stdio.h>
+-#include <malloc.h>
+ #include <unistd.h>
+ #include <assert.h>
+ 
Index: patches/patch-src_input_c
===================================================================
RCS file: patches/patch-src_input_c
diff -N patches/patch-src_input_c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_input_c	12 Dec 2021 18:33:45 -0000
@@ -0,0 +1,15 @@
+$OpenBSD$
+
+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
+ 
+ struct notification *get_notification_at(const int y) {
+         int curr_y = settings.frame_width;
Index: patches/patch-src_notification_c
===================================================================
RCS file: /home/cvs/ports/x11/dunst/patches/patch-src_notification_c,v
retrieving revision 1.3
diff -u -p -r1.3 patch-src_notification_c
--- patches/patch-src_notification_c	25 Sep 2020 13:53:53 -0000	1.3
+++ patches/patch-src_notification_c	12 Dec 2021 19:52:16 -0000
@@ -3,7 +3,7 @@ $OpenBSD: patch-src_notification_c,v 1.3
 Index: src/notification.c
 --- src/notification.c.orig
 +++ src/notification.c
-@@ -58,7 +58,7 @@ void notification_print(const struct notification *n)
+@@ -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);
@@ -12,23 +12,32 @@ Index: src/notification.c
          printf("\turgency: %s\n", notification_urgency_to_string(n->urgency));
          printf("\ttransient: %d\n", n->transient);
          printf("\tformatted: '%s'\n", n->msg);
-@@ -574,14 +574,14 @@ void notification_update_text_to_render(struct notific
+@@ -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);
+@@ -668,14 +668,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,
--                                            minutes, seconds);
-+                            g_strdup_printf("%s (%lldh %lldm %llds old)", buf, (long long)hours,
-+                                            (long long)minutes, (long long)seconds);
++                            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,
--                                            seconds);
-+                            g_strdup_printf("%s (%lldm %llds old)", buf, (long long)minutes,
-+                                            (long long)seconds);
++                            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, (long long)seconds);
++                        new_buf = g_strdup_printf("%s (%llds old)", buf, seconds);
                  }
  
                  g_free(buf);
Index: patches/patch-src_settings_h
===================================================================
RCS file: patches/patch-src_settings_h
diff -N patches/patch-src_settings_h
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_settings_h	12 Dec 2021 18:33:45 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: src/settings.h
+--- src/settings.h.orig
++++ src/settings.h
+@@ -13,6 +13,8 @@
+ 
+ #define LIST_END (-1)
+ 
++enum mouse_button { BTN_LEFT, BTN_RIGHT, BTN_MIDDLE, BTN_TOUCH };
++
+ enum alignment { ALIGN_LEFT, ALIGN_CENTER, ALIGN_RIGHT };
+ enum icon_position { ICON_LEFT, ICON_RIGHT, ICON_OFF };
+ enum vertical_alignment { VERTICAL_TOP, VERTICAL_CENTER, VERTICAL_BOTTOM };
Index: patches/patch-src_x11_x_c
===================================================================
RCS file: patches/patch-src_x11_x_c
diff -N patches/patch-src_x11_x_c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_x11_x_c	12 Dec 2021 18:33:45 -0000
@@ -0,0 +1,15 @@
+$OpenBSD$
+
+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"
Index: pkg/PLIST
===================================================================
RCS file: /home/cvs/ports/x11/dunst/pkg/PLIST,v
retrieving revision 1.4
diff -u -p -r1.4 PLIST
--- pkg/PLIST	25 Sep 2020 13:53:53 -0000	1.4
+++ pkg/PLIST	12 Dec 2021 18:33:45 -0000
@@ -4,6 +4,11 @@ bin/dunstctl
 @bin bin/dunstify
 @man man/man1/dunst.1
 @man man/man1/dunstctl.1
-share/dbus-1/services/org.knopwob.dunst.service
-share/examples/dunst/
-share/examples/dunst/dunstrc
+@man man/man5/dunst.5
+share/dunst/
+@sample ${SYSCONFDIR}/dunst/
+share/dunst/dunstrc
+@sample ${SYSCONFDIR}/dunst/dunstrc
+share/examples/dbus-1/
+share/examples/dbus-1/services/
+share/examples/dbus-1/services/org.knopwob.dunst.service

Reply via email to