On Mon, Nov 27, 2017 at 08:28:29PM +0100, Klemens Nanni wrote: > On Tue, Nov 21, 2017 at 11:15:38AM +0100, Klemens Nanni wrote: > > On Tue, Nov 21, 2017 at 01:44:44AM -0700, Anthony J. Bentley wrote: > > > Klemens Nanni writes: > > > > On Mon, Nov 06, 2017 at 02:21:41AM +0100, Klemens Nanni wrote: > > > > > 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. > > > > > (snip) > > > > > -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} \ > > > > > > No need to set PREFIX. > > PREFIX is hard coded to /usr/local in sxiv's Makefile and MANPATH uses > > it so why not letting users set PREFIX as they wish? Not passing it via > > MAKE_FLAGS would honor the user's PREFIX for MANPATH only. > > > > > Also, I set V=1 so we can actually see the compiler commands. > > > > > > > > + CFLAGS="${CFLAGS} -I${X11BASE}/include > > > > > -I${X11BASE}/include/fre > > > > etype2 -I${LOCALBASE}/include -I${LOCALBASE}/include/inotify" \ > > > > > + LDFLAGS="${LDFLAGS} -L${X11BASE}/lib -L${LOCALBASE}/lib > > > > > -L${LOC > > > > ALBASE}/lib/inotify -lX11 -lXft -lImlib2 -lexif -linotify -lgif > > > > -Wl,-rpath ${ > > > > LOCALBASE}/lib/inotify" > > > > > > Couple things. Existing LDFLAGS don't need to be passed to LDFLAGS, > > > because unlike CFLAGS it's not a standard variable likely to be in > > > mk.conf. Also, sxiv uses LDLIBS for the -l chain so we don't have to > > > repeat it. > > Thanks, that's better. > > > > > > > > post-install: > > > > > - cd ${WRKSRC}/icon && make install > > > > > + make -C ${WRKSRC}/icon install > > > > > > No need for a cosmetic change like this... > > > > > > > > > Here's a (very) slightly modified version of your diff per above. I > > > don't understand the inotify stuff, but it matches what existing ports > > > do, so... > > Using inotify sxiv can automatically reload the currently displayed > > image if it changes on disk. > Bump; I'd like to get this in. > > Anthony's diff seems fine but I still prefer to set PREFIX when we also > set MANPREFIX so here's his diff with that on top. > > Does anyone want to commit any of the two versions? > > diff --git a/graphics/sxiv/Makefile b/graphics/sxiv/Makefile > index eeb5fd17888..560018d753c 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,17 +13,21 @@ 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}" \ > + V=1 \ > + PREFIX=${PREFIX} \ > + MANPREFIX=${PREFIX}/man \ > + CFLAGS="${CFLAGS} -I${X11BASE}/include > -I${X11BASE}/include/freetype2 -I${LOCALBASE}/include > -I${LOCALBASE}/include/inotify" \ > + LDFLAGS="-L${X11BASE}/lib -L${LOCALBASE}/lib > -L${LOCALBASE}/lib/inotify -linotify -Wl,-rpath ${LOCALBASE}/lib/inotify" > > NO_TEST = Yes > > 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..1d9ea24ea00 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. > Another one week bump. I've contacted Matthew (maintainer) on 12.11.2017 but haven't received a reply.
Feedback? Any takers for either of Anthony's diff or mine?