[email protected] (Timo Myyrä) writes:

> Hi,
>
> As mentioned, here's update to dunst to bring it to latest version.
> Also includes pledge tweak to fix the port when using icons in notifications.
>
> Quickly tested on amd64 where icons work. More tests would be welcome.
>
> Timo
>
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/x11/dunst/Makefile,v
> retrieving revision 1.3
> diff -u -p -r1.3 Makefile
> --- Makefile  31 Aug 2017 20:57:00 -0000      1.3
> +++ Makefile  13 Jan 2018 15:18:53 -0000
> @@ -4,13 +4,13 @@ COMMENT=    customizable and lightweight no
>  
>  GH_ACCOUNT = dunst-project
>  GH_PROJECT = dunst
> -GH_TAGNAME = v1.2.0
> +GH_TAGNAME = v1.3.0
>  
>  CATEGORIES = x11
>  
>  HOMEPAGE=    https://dunst-project.org/
>  
> -MAINTAINER = Timo Myyra <[email protected]>
> +MAINTAINER = Timo Myyra <[email protected]>
>  
>  # BSD
>  PERMIT_PACKAGE_CDROM=        Yes
> Index: distinfo
> ===================================================================
> RCS file: /cvs/ports/x11/dunst/distinfo,v
> retrieving revision 1.2
> diff -u -p -r1.2 distinfo
> --- distinfo  31 Aug 2017 20:57:00 -0000      1.2
> +++ distinfo  13 Jan 2018 15:18:53 -0000
> @@ -1,2 +1,2 @@
> -SHA256 (dunst-1.2.0.tar.gz) = o8BbXvh+iHBKYgcjbkJ3PfvPUMsjx89R5JSnI2t1xa0=
> -SIZE (dunst-1.2.0.tar.gz) = 110628
> +SHA256 (dunst-1.3.0.tar.gz) = dMCxFlz3qccfVivZdpeXBSjq5iXTTIcU+LmVG9XKW+Y=
> +SIZE (dunst-1.3.0.tar.gz) = 121499
> Index: patches/patch-config_mk
> ===================================================================
> RCS file: /cvs/ports/x11/dunst/patches/patch-config_mk,v
> retrieving revision 1.2
> diff -u -p -r1.2 patch-config_mk
> --- patches/patch-config_mk   31 Aug 2017 20:57:00 -0000      1.2
> +++ patches/patch-config_mk   13 Jan 2018 15:18:53 -0000
> @@ -2,12 +2,12 @@ $OpenBSD: patch-config_mk,v 1.2 2017/08/
>  Index: config.mk
>  --- config.mk.orig
>  +++ config.mk
> -@@ -28,7 +28,7 @@ endif
> +@@ -12,7 +12,7 @@ MANPREFIX = ${PREFIX}/share/man
>   
>   # flags
>   CPPFLAGS += -D_DEFAULT_SOURCE -DVERSION=\"${VERSION}\"
>  -CFLAGS   += -g --std=gnu99 -pedantic -Wall -Wno-overlength-strings -Os 
> ${STATIC} ${CPPFLAGS}
>  +CFLAGS   += -g --std=gnu99 -pedantic -Wall -Wno-overlength-strings 
> ${STATIC} ${CPPFLAGS}
> + LDFLAGS  += -lm -L${X11LIB}
>   
> - pkg_config_packs := dbus-1 x11 xscrnsaver \
> -                     "glib-2.0 >= 2.36" gio-2.0 \
> + CPPFLAGS_DEBUG := -DDEBUG_BUILD
> Index: patches/patch-src_dunst_c
> ===================================================================
> RCS file: /cvs/ports/x11/dunst/patches/patch-src_dunst_c,v
> retrieving revision 1.1
> diff -u -p -r1.1 patch-src_dunst_c
> --- patches/patch-src_dunst_c 31 Aug 2017 20:57:00 -0000      1.1
> +++ patches/patch-src_dunst_c 13 Jan 2018 15:18:53 -0000
> @@ -3,23 +3,34 @@ $OpenBSD: patch-src_dunst_c,v 1.1 2017/0
>  Index: src/dunst.c
>  --- src/dunst.c.orig
>  +++ src/dunst.c
> -@@ -14,6 +14,9 @@
> - #include <stdlib.h>
> - #include <time.h>
> +@@ -5,12 +5,14 @@
> + #include "dunst.h"
>   
> + #include <X11/Xlib.h>
>  +#include <err.h>
> + #include <glib-unix.h>
> + #include <glib.h>
> + #include <signal.h>
> + #include <stdbool.h>
> + #include <stdio.h>
> + #include <stdlib.h>
>  +#include <unistd.h>
> -+
> + 
>   #include "dbus.h"
>   #include "menu.h"
> - #include "notification.h"
> -@@ -325,6 +328,9 @@ int dunst_main(int argc, char *argv[])
> -         int owner_id = initdbus();
> - 
> -         x_setup();
> -+    
> -+        if (pledge("stdio rpath proc exec", NULL) == -1)
> -+                err(1, "pledge");
> +@@ -193,6 +195,15 @@ int dunst_main(int argc, char *argv[])
> +          * graceful termination */
> +         guint term_src = g_unix_signal_add(SIGTERM, quit_signal, NULL);
> +         guint int_src = g_unix_signal_add(SIGINT, quit_signal, NULL);
> ++
> ++        /* allow prot_exec if icons are used */
> ++        if (settings.icon_position != icons_off) {
> ++                if (pledge("stdio rpath proc exec prot_exec", NULL) == -1)
> ++                        err(1, "pledge");
> ++        } else {
> ++                if (pledge("stdio rpath proc exec", NULL) == -1)
> ++                        err(1, "pledge");
> ++        }
>   
> -         if (settings.startup_notification) {
> -                 notification *n = notification_create();
> +         run(NULL);
> +         g_main_loop_run(mainloop);
> Index: patches/patch-src_menu_c
> ===================================================================
> RCS file: /cvs/ports/x11/dunst/patches/patch-src_menu_c,v
> retrieving revision 1.1
> diff -u -p -r1.1 patch-src_menu_c
> --- patches/patch-src_menu_c  31 Aug 2017 20:57:00 -0000      1.1
> +++ patches/patch-src_menu_c  13 Jan 2018 15:18:53 -0000
> @@ -11,7 +11,7 @@ Index: src/menu.c
>  -            "\\b(https?://|ftps?://|news://|mailto:|file://|www\\.)"
>  -            "[-[:alnum:]_\\@;/?:&=%$.+!*\x27,~#]*"
>  -            
> "(\\([-[:alnum:]_\\@;/?:&=%$.+!*\x27,~#]*\\)|[-[:alnum:]_\\@;/?:&=%$+*~])+";
> -+    char *regex = 
> "[[:<:]](https?://|ftps?://|news://|mailto:|file://|www\\.)[0-9a-zA-Z_/.@]+[a-zA-Z/]";
> ++        char *regex = 
> "[[:<:]](https?://|ftps?://|news://|mailto:|file://|www\\.)[0-9a-zA-Z_/.@]+[a-zA-Z/]";
>           int ret = regcomp(&cregex, regex, REG_EXTENDED | REG_ICASE);
>           if (ret != 0) {
>                   fputs("failed to compile regex", stderr);
> Index: patches/patch-src_notification_c
> ===================================================================
> RCS file: patches/patch-src_notification_c
> diff -N patches/patch-src_notification_c
> --- patches/patch-src_notification_c  31 Aug 2017 20:57:00 -0000      1.1
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,13 +0,0 @@
> -$OpenBSD: patch-src_notification_c,v 1.1 2017/08/31 20:57:00 sthen Exp $
> -
> -Index: src/notification.c
> ---- src/notification.c.orig
> -+++ src/notification.c
> -@@ -5,6 +5,7 @@
> - 
> - #include <assert.h>
> - #include <errno.h>
> -+#include <libgen.h>
> - #include <glib.h>
> - #include <stdbool.h>
> - #include <stdio.h>

ping, so far this has worked fine on amd64.

timo

Reply via email to