Klemens Nanni <k...@posteo.org> writes: > On Sat, Jan 13, 2018 at 05:21:56PM +0200, Timo Myyrä wrote: >> 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. > The update works but needs further work as indicated by > `make port-lib-depends-check'. > > 1.3.0 installs systemd files only if systemctl is present so we can drop > the @comment lines in PLIST. > > Paths in the example dunst.rc need to be adjusted so copying it over > will work without manually fixing them. > > diff --git a/x11/dunst/Makefile b/x11/dunst/Makefile > index 04fce54839a..40568fe1b36 100644 > --- a/x11/dunst/Makefile > +++ b/x11/dunst/Makefile > @@ -4,23 +4,21 @@ COMMENT= customizable and lightweight notification-daemon > > 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 <timo.my...@wickedbsd.net> > +MAINTAINER = Timo Myyra <timo.my...@bittivirhe.fi> > > # BSD > PERMIT_PACKAGE_CDROM= Yes > > # uses pledge() > -WANTLIB += X11 Xcomposite Xcursor Xdamage Xext Xfixes Xi Xinerama > -WANTLIB += Xrandr Xrender Xss c cairo dbus-1 fontconfig freetype > -WANTLIB += gdk-x11-2.0 gdk_pixbuf-2.0 gio-2.0 glib-2.0 gobject-2.0 > -WANTLIB += intl m pango-1.0 pangocairo-1.0 pthread xdg-basedir > -WANTLIB += z > +WANTLIB += X11 Xinerama Xrandr Xss c cairo dbus-1 gdk_pixbuf-2.0 > +WANTLIB += gio-2.0 glib-2.0 gobject-2.0 intl m pango-1.0 > +WANTLIB += pangocairo-1.0 pthread xdg-basedir > > USE_GMAKE = Yes > > @@ -29,12 +27,14 @@ LIB_DEPENDS += devel/gettext \ > devel/pango \ > graphics/cairo \ > graphics/gdk-pixbuf2 \ > - x11/gtk+2 \ > - x11/libxdg-basedir \ > - x11/dbus > + x11/dbus \ > + x11/libxdg-basedir > > MAKE_FLAGS = V=1 PREFIX="${PREFIX}" MANPREFIX="${PREFIX}/man" > > +pre-configure: > + ${SUBST_CMD} ${WRKSRC}/docs/dunst.pod > + > post-install: > mv ${PREFIX}/share/dunst ${PREFIX}/share/examples/dunst > > diff --git a/x11/dunst/distinfo b/x11/dunst/distinfo > index c4ce11f412d..538648e5292 100644 > --- a/x11/dunst/distinfo > +++ b/x11/dunst/distinfo > @@ -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 > diff --git a/x11/dunst/patches/patch-config_mk > b/x11/dunst/patches/patch-config_mk > index d65ac67549d..367fbe15450 100644 > --- a/x11/dunst/patches/patch-config_mk > +++ b/x11/dunst/patches/patch-config_mk > @@ -2,12 +2,12 @@ $OpenBSD: patch-config_mk,v 1.2 2017/08/31 20:57:00 sthen > Exp $ > 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 > diff --git a/x11/dunst/patches/patch-docs_dunst_pod > b/x11/dunst/patches/patch-docs_dunst_pod > new file mode 100644 > index 00000000000..f0749ca680c > --- /dev/null > +++ b/x11/dunst/patches/patch-docs_dunst_pod > @@ -0,0 +1,38 @@ > +$OpenBSD$ > + > +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 at > ${PREFIX}/share/examples/dunst/dunstrc. > + To change the configuration, copy this file to ~/.config/dunst/dunstrc and > edit > + it accordingly. > + > +@@ -395,7 +395,7 @@ Set to 0 to disable icon scaling. (default) > + > + 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: > "${LOCALBASE}/share/icons/gnome/16x16/status/:${LOCALBASE}/share/icons/gnome/16x16/devices/") > + > + Can be set to a colon-separated list of paths to search for icons to use > with > + notifications. > +@@ -414,12 +414,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/firefox") > ++=item B<browser> (default: "${LOCALBASE}/bin/firefox") > + > + 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. > diff --git a/x11/dunst/patches/patch-src_dunst_c > b/x11/dunst/patches/patch-src_dunst_c > index e2b46883757..9da0e81ed23 100644 > --- a/x11/dunst/patches/patch-src_dunst_c > +++ b/x11/dunst/patches/patch-src_dunst_c > @@ -3,23 +3,34 @@ $OpenBSD: patch-src_dunst_c,v 1.1 2017/08/31 20:57:00 sthen > Exp $ > 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); > diff --git a/x11/dunst/patches/patch-src_menu_c > b/x11/dunst/patches/patch-src_menu_c > index a6892343a73..22eaa7d44bc 100644 > --- a/x11/dunst/patches/patch-src_menu_c > +++ b/x11/dunst/patches/patch-src_menu_c > @@ -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); > diff --git a/x11/dunst/patches/patch-src_notification_c > b/x11/dunst/patches/patch-src_notification_c > deleted file mode 100644 > index 9e4b2160397..00000000000 > --- a/x11/dunst/patches/patch-src_notification_c > +++ /dev/null > @@ -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> > diff --git a/x11/dunst/pkg/PLIST b/x11/dunst/pkg/PLIST > index ecb8fea98fd..e3a2550bb5d 100644 > --- a/x11/dunst/pkg/PLIST > +++ b/x11/dunst/pkg/PLIST > @@ -1,8 +1,5 @@ > @comment $OpenBSD: PLIST,v 1.2 2017/08/31 20:57:01 sthen Exp $ > @bin bin/dunst > -@comment lib/systemd/ > -@comment lib/systemd/user/ > -@comment lib/systemd/user/dunst.service > @man man/man1/dunst.1 > share/dbus-1/services/org.knopwob.dunst.service > share/examples/dunst/
seems good to me. timo