Hey ports@, here's a simple diff updating sxiv to the newest release; Yes, upstream jumped from 2.3.1 to 24 not 2.4. These are mostly mechanical changes, I've also updated the description as upstream did.
Changes: - Automatically reload the current image whenever it changes - Support embedding into other X windows with -e (e.g. tabbed) - New option -p prevents sxiv from creating cache and temporary files - Simpler mouse mappings, the most basic features are accessible with the mouse only (navigate, zoom, pan) sxiv now uses freetype2 and inotify, tested successfully on amd64. Feedback, comments? --- graphics/sxiv/Makefile | 20 ++++++++------- graphics/sxiv/distinfo | 4 +-- graphics/sxiv/patches/patch-Makefile | 48 ++++++++++-------------------------- graphics/sxiv/patches/patch-sxiv_1 | 11 +++++---- graphics/sxiv/pkg/DESCR | 12 ++++----- 5 files changed, 37 insertions(+), 58 deletions(-) diff --git a/graphics/sxiv/Makefile b/graphics/sxiv/Makefile index eeb5fd17888..d6a636ac9b0 100644 --- a/graphics/sxiv/Makefile +++ b/graphics/sxiv/Makefile @@ -1,11 +1,10 @@ # $OpenBSD: Makefile,v 1.10 2017/05/06 13:45:49 fcambus Exp $ -COMMENT = simple (or small or suckless) X Image Viewer +COMMENT = simple X Image Viewer GH_PROJECT = sxiv GH_ACCOUNT = muennich -GH_TAGNAME = v1.3.2 -REVISION = 0 +GH_TAGNAME = v24 CATEGORIES = graphics x11 @@ -14,22 +13,25 @@ MAINTAINER = Matthew Via <v...@matthewvia.info> # GPLv2+ PERMIT_PACKAGE_CDROM = Yes -WANTLIB += Imlib2 exif gif X11 c +WANTLIB += Imlib2 X11 Xft c exif gif lib/inotify/inotify RUN_DEPENDS = devel/desktop-file-utils \ x11/gtk+3,-guic -LIB_DEPENDS = graphics/imlib2 \ +LIB_DEPENDS = devel/libinotify \ + graphics/imlib2 \ graphics/libexif -MAKE_FLAGS = CC=${CC} MANPREFIX=${PREFIX}/man \ - CFLAGS="${CFLAGS} -I${X11BASE}/include -I${PREFIX}/include" \ - LDFLAGS="-L${PREFIX}/lib -L${X11BASE}/lib -lX11 -lImlib2 -lexif -lgif" +MAKE_FLAGS = CC=${CC} \ + PREFIX=${PREFIX} \ + MANPREFIX=${PREFIX}/man \ + CFLAGS="${CFLAGS} -I${X11BASE}/include -I${X11BASE}/include/freetype2 -I${LOCALBASE}/include -I${LOCALBASE}/include/inotify" \ + LDFLAGS="${LDFLAGS} -L${X11BASE}/lib -L${LOCALBASE}/lib -L${LOCALBASE}/lib/inotify -lX11 -lXft -lImlib2 -lexif -linotify -lgif -Wl,-rpath ${LOCALBASE}/lib/inotify" NO_TEST = Yes post-install: - cd ${WRKSRC}/icon && make install + make -C ${WRKSRC}/icon install ${INSTALL_DATA_DIR} ${PREFIX}/share/applications ${INSTALL_DATA} ${WRKSRC}/sxiv.desktop ${PREFIX}/share/applications diff --git a/graphics/sxiv/distinfo b/graphics/sxiv/distinfo index 78b5985c9ec..dcf76b04c13 100644 --- a/graphics/sxiv/distinfo +++ b/graphics/sxiv/distinfo @@ -1,2 +1,2 @@ -SHA256 (sxiv-1.3.2.tar.gz) = n1No3o8PV+eOvgLLUxoxEHqZPydpzsUbzI1w9cZotlM= -SIZE (sxiv-1.3.2.tar.gz) = 46560 +SHA256 (sxiv-24.tar.gz) = UR3EXRKWKvnDHDBozmvKS4MqYmOUaye+/qSaSM8BkRA= +SIZE (sxiv-24.tar.gz) = 47148 diff --git a/graphics/sxiv/patches/patch-Makefile b/graphics/sxiv/patches/patch-Makefile index af27a365942..717afe06ea5 100644 --- a/graphics/sxiv/patches/patch-Makefile +++ b/graphics/sxiv/patches/patch-Makefile @@ -1,53 +1,31 @@ $OpenBSD: patch-Makefile,v 1.4 2015/12/24 21:54:09 mmcc Exp $ ---- Makefile.orig Sun Dec 20 07:21:25 2015 -+++ Makefile Wed Dec 23 20:01:02 2015 -@@ -11,11 +11,11 @@ LIBS := -lX11 -lImlib2 - - # optional dependencies: - # giflib: gif animations -- CPPFLAGS += -DHAVE_GIFLIB -- LIBS += -lgif -+CPPFLAGS += -DHAVE_GIFLIB -+LIBS += -lgif - # libexif: jpeg auto-orientation, exif thumbnails -- CPPFLAGS += -DHAVE_LIBEXIF -- LIBS += -lexif -+CPPFLAGS += -DHAVE_LIBEXIF -+LIBS += -lexif - - - .PHONY: clean install uninstall -@@ -30,7 +30,7 @@ $(OBJ): Makefile - - -include $(DEP) - --%.o: %.c -+.c.o: - $(CC) $(CFLAGS) $(CPPFLAGS) -DVERSION=\"$(VERSION)\" -MMD -MP -c -o $@ $< - - config.h: -@@ -43,15 +43,15 @@ clean: - rm -f $(OBJ) $(DEP) sxiv +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 +- 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 -+ sed "s!PREFIX!$(PREFIX)!g; s!VERSION!$(VERSION)!g" sxiv.1 > sxiv.1.tmp -+ mv sxiv.1.tmp sxiv.1 + ${BSD_INSTALL_MAN} sxiv.1 ${DESTDIR}${MANPREFIX}/man1 + ${BSD_INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/share/examples/sxiv -+ ${BSD_INSTALL_DATA} exec/image-info ${DESTDIR}${PREFIX}/share/examples/sxiv -+ ${BSD_INSTALL_DATA} exec/key-handler ${DESTDIR}${PREFIX}/share/examples/sxiv ++ ${BSD_INSTALL_DATA} exec/* ${DESTDIR}${PREFIX}/share/examples/sxiv uninstall: - rm -f $(DESTDIR)$(PREFIX)/bin/sxiv + @echo "REMOVE bin/sxiv" diff --git a/graphics/sxiv/patches/patch-sxiv_1 b/graphics/sxiv/patches/patch-sxiv_1 index 44a20000734..a97d8e8cd65 100644 --- a/graphics/sxiv/patches/patch-sxiv_1 +++ b/graphics/sxiv/patches/patch-sxiv_1 @@ -1,8 +1,9 @@ $OpenBSD: patch-sxiv_1,v 1.1 2015/12/25 02:03:00 mmcc Exp $ ---- sxiv.1.orig Sun Dec 20 07:21:25 2015 -+++ sxiv.1 Wed Dec 23 20:11:36 2015 -@@ -354,7 +354,7 @@ image gets loaded. The path of this script is - and the first argument to this script is the path of the loaded image. +Index: sxiv.1 +--- sxiv.1.orig ++++ sxiv.1 +@@ -381,7 +381,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 . @@ -10,7 +11,7 @@ $OpenBSD: patch-sxiv_1,v 1.1 2015/12/25 02:03:00 mmcc Exp $ .SH EXTERNAL KEY HANDLER Additional external keyboard commands can be defined using a handler program located in -@@ -372,7 +372,7 @@ where C/M/S indicate Ctrl/Meta(Alt)/Shift modifier sta +@@ -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. There is also an example script installed together with sxiv as diff --git a/graphics/sxiv/pkg/DESCR b/graphics/sxiv/pkg/DESCR index 654b4f00d87..9a32eb47e9b 100644 --- a/graphics/sxiv/pkg/DESCR +++ b/graphics/sxiv/pkg/DESCR @@ -1,7 +1,5 @@ -sxiv is an alternative to feh and qiv. Its only dependencies besides -xlib are imlib2, libexif and giflib. The primary goal for writing sxiv -is to create an image viewer, which only has the most basic features -required for fast image viewing (the ones I want). It has vi key -bindings and works nicely with tiling window managers. Its code base -should be kept small and clean to make it easy for you to dig into it -and customize it for your needs. +The primary goal of sxiv is to create an image viewer, which only has the most +basic features required for fast image viewing (the ones I want). It has vi key +bindings and works nicely with tiling window managers. Its code base should be +kept small and clean to make it easy for you to dig into it and customize it for +your needs.