This update still sits in my tree; I forgot to send mail back then and forgot about the update alltogether...
Just works as before: - Support font fallback for missing glyphs - Fix busy loop when built without inotify - Use background/foreground colors from X resource database I also replaced the Makefile patch with simpler DESTDIR='' passing in our post-install. The helper scripts moved from examples/ to exec/; here I noticed that one of them uses realpath(1) which we do not have, so I patched that to use readlink(1) instead. Feedback? OK? Index: Makefile =================================================================== RCS file: /cvs/ports/graphics/sxiv/Makefile,v retrieving revision 1.15 diff -u -p -r1.15 Makefile --- Makefile 12 Jul 2019 20:47:10 -0000 1.15 +++ Makefile 3 Oct 2019 10:04:20 -0000 @@ -4,17 +4,16 @@ COMMENT = simple X Image Viewer GH_PROJECT = sxiv GH_ACCOUNT = muennich -GH_TAGNAME = v24 -REVISION = 2 +GH_TAGNAME = v25 CATEGORIES = graphics x11 -MAINTAINER = Klemens Nanni <k...@posteo.org> +MAINTAINER = Klemens Nanni <k...@openbsd.org> # GPLv2+ PERMIT_PACKAGE = Yes -WANTLIB += Imlib2 X11 Xft c exif gif lib/inotify/inotify +WANTLIB += Imlib2 X11 Xft c exif fontconfig gif lib/inotify/inotify RUN_DEPENDS = devel/desktop-file-utils \ x11/gtk+3,-guic @@ -32,8 +31,12 @@ MAKE_FLAGS = CC="${CC}" \ NO_TEST = Yes +# Git errors break version.h build; this makes it fall back to a hardcoded value +pre-build: + ln -sf /usr/bin/true ${WRKDIR}/bin/git + post-install: - cd ${WRKSRC}/icon && make install + ${MAKE_PROGRAM} -C ${WRKSRC}/icon/ DESTDIR='' ${FAKE_TARGET} ${INSTALL_DATA_DIR} ${PREFIX}/share/applications ${INSTALL_DATA} ${WRKSRC}/sxiv.desktop ${PREFIX}/share/applications Index: distinfo =================================================================== RCS file: /cvs/ports/graphics/sxiv/distinfo,v retrieving revision 1.6 diff -u -p -r1.6 distinfo --- distinfo 12 Dec 2017 00:25:48 -0000 1.6 +++ distinfo 5 May 2019 18:04:52 -0000 @@ -1,2 +1,2 @@ -SHA256 (sxiv-24.tar.gz) = UR3EXRKWKvnDHDBozmvKS4MqYmOUaye+/qSaSM8BkRA= -SIZE (sxiv-24.tar.gz) = 47148 +SHA256 (sxiv-25.tar.gz) = FtGsoaF54cCHWETv4uUc+jlqRANGfDiffpIhpzOuXiY= +SIZE (sxiv-25.tar.gz) = 48814 Index: patches/patch-Makefile =================================================================== RCS file: patches/patch-Makefile diff -N patches/patch-Makefile --- patches/patch-Makefile 12 Dec 2017 00:25:48 -0000 1.5 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,31 +0,0 @@ -$OpenBSD: patch-Makefile,v 1.5 2017/12/12 00:25:48 jca Exp $ -Index: Makefile ---- Makefile.orig -+++ Makefile -@@ -60,19 +60,13 @@ clean: - rm -f *.o sxiv - - install: all -- @echo "INSTALL bin/sxiv" -- mkdir -p $(DESTDIR)$(PREFIX)/bin -- cp sxiv $(DESTDIR)$(PREFIX)/bin/ -- chmod 755 $(DESTDIR)$(PREFIX)/bin/sxiv -- @echo "INSTALL sxiv.1" -- mkdir -p $(DESTDIR)$(MANPREFIX)/man1 -- sed "s!PREFIX!$(PREFIX)!g; s!VERSION!$(VERSION)!g" sxiv.1 \ -- >$(DESTDIR)$(MANPREFIX)/man1/sxiv.1 -- chmod 644 $(DESTDIR)$(MANPREFIX)/man1/sxiv.1 -- @echo "INSTALL share/sxiv/" -- mkdir -p $(DESTDIR)$(PREFIX)/share/sxiv/exec -- cp exec/* $(DESTDIR)$(PREFIX)/share/sxiv/exec/ -- chmod 755 $(DESTDIR)$(PREFIX)/share/sxiv/exec/* -+ ${BSD_INSTALL_PROGRAM_DIR} ${DESTDIR}${PREFIX}/bin -+ ${BSD_INSTALL_PROGRAM} sxiv ${DESTDIR}${PREFIX}/bin -+ sed -i "s!PREFIX!$(PREFIX)!g; s!VERSION!$(VERSION)!g" sxiv.1 -+ ${BSD_INSTALL_MAN_DIR} ${DESTDIR}${MANPREFIX}/man1 -+ ${BSD_INSTALL_MAN} sxiv.1 ${DESTDIR}${MANPREFIX}/man1 -+ ${BSD_INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/share/examples/sxiv -+ ${BSD_INSTALL_DATA} exec/* ${DESTDIR}${PREFIX}/share/examples/sxiv - - uninstall: - @echo "REMOVE bin/sxiv" Index: patches/patch-exec_key-handler =================================================================== RCS file: patches/patch-exec_key-handler diff -N patches/patch-exec_key-handler --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-exec_key-handler 3 Oct 2019 10:09:14 -0000 @@ -0,0 +1,14 @@ +$OpenBSD$ + +Index: exec/key-handler +--- exec/key-handler.orig ++++ exec/key-handler +@@ -14,7 +14,7 @@ + + rotate() { + degree="$1" +- tr '\n' '\0' | xargs -0 realpath | sort | uniq | while read file; do ++ tr '\n' '\0' | xargs -0 readlink -f | sort | uniq | while read file; do + case "$(file -b -i "$file")" in + image/jpeg*) jpegtran -rotate "$degree" -copy all -outfile "$file" "$file" ;; + *) mogrify -rotate "$degree" "$file" ;; Index: patches/patch-icon_Makefile =================================================================== RCS file: patches/patch-icon_Makefile diff -N patches/patch-icon_Makefile --- patches/patch-icon_Makefile 6 May 2017 13:45:49 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,14 +0,0 @@ -$OpenBSD: patch-icon_Makefile,v 1.1 2017/05/06 13:45:49 fcambus Exp $ - -Index: icon/Makefile ---- icon/Makefile.orig -+++ icon/Makefile -@@ -5,7 +5,7 @@ all: - - install: - for f in $(ICONS); do \ -- dir="$(DESTDIR)$(PREFIX)/share/icons/hicolor/$${f%.png}/apps"; \ -+ dir="$(PREFIX)/share/icons/hicolor/$${f%.png}/apps"; \ - mkdir -p "$$dir"; \ - cp "$$f" "$$dir/sxiv.png"; \ - chmod 644 "$$dir/sxiv.png"; \ Index: patches/patch-sxiv_1 =================================================================== RCS file: /cvs/ports/graphics/sxiv/patches/patch-sxiv_1,v retrieving revision 1.2 diff -u -p -r1.2 patch-sxiv_1 --- patches/patch-sxiv_1 12 Dec 2017 00:25:48 -0000 1.2 +++ patches/patch-sxiv_1 3 Oct 2019 10:02:40 -0000 @@ -1,22 +1,29 @@ $OpenBSD: patch-sxiv_1,v 1.2 2017/12/12 00:25:48 jca Exp $ + +Substitute paths. + Index: sxiv.1 --- sxiv.1.orig +++ sxiv.1 -@@ -381,7 +381,7 @@ and the arguments given to it are: 1) path to image fi +@@ -384,7 +384,7 @@ and the arguments given to it are: 1) path to image fi 3) image height. .P There is also an example script installed together with sxiv as -.IR PREFIX/share/sxiv/exec/image-info . -+.IR PREFIX/share/examples/sxiv/image-info . ++.IR ${PREFIX}/share/sxiv/exec/image-info . .SH EXTERNAL KEY HANDLER Additional external keyboard commands can be defined using a handler program located in -@@ -399,7 +399,7 @@ where C/M/S indicate Ctrl/Meta(Alt)/Shift modifier sta - keysym as listed in /usr/include/X11/keysymdef.h without the "XK_" prefix. +@@ -399,10 +399,10 @@ have been modified and reloads them. + + The key combo argument has the following form: "[C-][M-][S-]KEY", + where C/M/S indicate Ctrl/Meta(Alt)/Shift modifier states and KEY is the X +-keysym as listed in /usr/include/X11/keysymdef.h without the "XK_" prefix. ++keysym as listed in ${X11BASE}/include/X11/keysymdef.h without the "XK_" prefix. There is also an example script installed together with sxiv as -.IR PREFIX/share/sxiv/exec/key-handler . -+.IR PREFIX/share/examples/sxiv/key-handler . ++.IR {PREFIX}/share/sxiv/exec/key-handler . .SH THUMBNAIL CACHING sxiv stores all thumbnails under .IR $XDG_CACHE_HOME/sxiv/ . Index: pkg/PLIST =================================================================== RCS file: /cvs/ports/graphics/sxiv/pkg/PLIST,v retrieving revision 1.6 diff -u -p -r1.6 PLIST --- pkg/PLIST 29 Jun 2018 22:16:17 -0000 1.6 +++ pkg/PLIST 3 Oct 2019 09:47:31 -0000 @@ -2,9 +2,6 @@ @bin bin/sxiv @man man/man1/sxiv.1 share/applications/sxiv.desktop -share/examples/sxiv/ -share/examples/sxiv/image-info -share/examples/sxiv/key-handler share/icons/hicolor/128x128/apps/sxiv.png share/icons/hicolor/16x16/apps/sxiv.png share/icons/hicolor/32x32/apps/sxiv.png @@ -12,3 +9,7 @@ share/icons/hicolor/48x48/apps/sxiv.png share/icons/hicolor/64x64/apps/sxiv.png @tag update-desktop-database @tag gtk-update-icon-cache %D/share/icons/hicolor +share/sxiv/ +share/sxiv/exec/ +share/sxiv/exec/image-info +share/sxiv/exec/key-handler