import nsxiv-28

nsxiv is a fork of now unmaintained sxiv (Simple X Image Viewer) with the
purpose of being a drop-in replacement that adds simple, sensible features.
Some of nsxiv's key features are auto-reloading images on change, freetype2
for the status bar, gif and webp playbacks.

from Thim (thim at cederlund dot de) who is also taking MAINTAINER, with
some tweaks by me and sthen.

ok sthen@
This commit is contained in:
op 2022-02-06 17:14:17 +00:00
parent db8409dea0
commit f377df5c9a
6 changed files with 109 additions and 0 deletions

61
graphics/nsxiv/Makefile Normal file
View File

@ -0,0 +1,61 @@
# $OpenBSD: Makefile,v 1.1.1.1 2022/02/06 17:14:17 op Exp $
COMMENT = neo simple X Image Viewer
GH_PROJECT = nsxiv
GH_ACCOUNT = nsxiv
GH_TAGNAME = v28
CATEGORIES = graphics x11
MAINTAINER = Thim Cederlund <thim@cederlund.de>
# GPLv2+
PERMIT_PACKAGE = Yes
WANTLIB += Imlib2 X11 Xft c exif fontconfig gif lib/inotify/inotify
WANTLIB += webp webpdemux
RUN_DEPENDS = devel/desktop-file-utils \
x11/gtk+3,-guic
LIB_DEPENDS = devel/libinotify \
graphics/imlib2 \
graphics/libexif \
graphics/libwebp
CFLAGS += -I${X11BASE}/include \
-I${X11BASE}/include/freetype2 \
-I${LOCALBASE}/include \
-I${LOCALBASE}/include/inotify
LDFLAGS += -L${X11BASE}/lib \
-L${X11BASE}/lib/freetype2 \
-L${LOCALBASE}/lib \
-L${LOCALBASE}/lib/inotify \
-linotify -Wl,-rpath ${LOCALBASE}/lib/inotify \
-lwebp
MAKE_FLAGS = CC="${CC}" \
V=1 \
PREFIX=${PREFIX} \
MANPREFIX=${PREFIX}/man \
CFLAGS="${CFLAGS}" \
LDFLAGS="${LDFLAGS}"
NO_TEST = Yes
post-patch:
${SUBST_CMD} ${WRKSRC}/nsxiv.1
# 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:
${INSTALL_DATA_DIR} ${PREFIX}/share/applications
${INSTALL_DATA} ${WRKSRC}/nsxiv.desktop ${PREFIX}/share/applications
cd ${PREFIX}/bin && ln -s nsxiv sxiv
.include <bsd.port.mk>

2
graphics/nsxiv/distinfo Normal file
View File

@ -0,0 +1,2 @@
SHA256 (nsxiv-28.tar.gz) = 38047f60e51854363dd98fb7b3bc9f1cfa9b7d6f9e8788508b6f1e317328dd75
SIZE (nsxiv-28.tar.gz) = 60699

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-Makefile,v 1.1.1.1 2022/02/06 17:14:17 op Exp $
Index: Makefile
--- Makefile.orig
+++ Makefile
@@ -58,7 +58,7 @@ all: nsxiv
nsxiv: $(OBJS)
@echo "LINK $@"
- $(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS)
+ $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LDLIBS)
.c.o:
@echo "CC $@"

View File

@ -0,0 +1,16 @@
$OpenBSD: patch-nsxiv_1,v 1.1.1.1 2022/02/06 17:14:17 op Exp $
Corrects the path of keysymdef.h.
Index: nsxiv.1
--- nsxiv.1.orig
+++ nsxiv.1
@@ -450,7 +450,7 @@ By default nsxiv(1) will send one image per-line to st
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.
If KEY has an uppercase equivalent, S-KEY is resolved into it. For instance,
K replaces S-k and Scedilla replaces S-scedilla, but S-Delete is sent as-is.

4
graphics/nsxiv/pkg/DESCR Normal file
View File

@ -0,0 +1,4 @@
nsxiv is a fork of now unmaintained sxiv (Simple X Image Viewer) with the
purpose of being a drop-in replacement that adds simple, sensible features.
Some of nsxiv's key features are auto-reloading images on change, freetype2
for the status bar, gif and webp playbacks.

12
graphics/nsxiv/pkg/PLIST Normal file
View File

@ -0,0 +1,12 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2022/02/06 17:14:17 op Exp $
@conflict sxiv-*
@pkgpath graphics/sxiv
@bin bin/nsxiv
bin/sxiv
@man man/man1/nsxiv.1
share/applications/nsxiv.desktop
share/doc/nsxiv/
share/doc/nsxiv/examples/
share/doc/nsxiv/examples/image-info
share/doc/nsxiv/examples/key-handler
@tag update-desktop-database