Hi, keynav now depends on glib2, cairo and x11/xdotool (the previous version included its own libxdo copy - same upstream). Makefile patching not needed if we use MAKE_FLAGS. Add an EPOCH bump and a segfault fix while here.
ok? Index: Makefile =================================================================== RCS file: /cvs/ports/x11/keynav/Makefile,v retrieving revision 1.7 diff -u -p -r1.7 Makefile --- Makefile 7 Aug 2013 21:33:04 -0000 1.7 +++ Makefile 26 Jan 2015 08:40:36 -0000 @@ -1,10 +1,9 @@ # $OpenBSD: Makefile,v 1.7 2013/08/07 21:33:04 naddy Exp $ -COMMENT= turns your keyboard into an fast pointer mover +COMMENT= turns your keyboard into a fast pointer mover -DISTNAME= keynav-20080614.01 -PKGNAME= ${DISTNAME:S/.//} -REVISION= 1 +DISTNAME= keynav-0.20101014.3067 +EPOCH= 0 CATEGORIES= x11 @@ -15,11 +14,16 @@ PERMIT_PACKAGE_CDROM= Yes MASTER_SITES= https://semicomplete.googlecode.com/files/ -WANTLIB= X11 Xau Xdmcp Xext Xtst c pthread-stubs xcb -NO_TEST= Yes +WANTLIB += X11 Xext Xinerama c cairo glib-2.0 intl pthread xdo + +LIB_DEPENDS= devel/glib2 \ + graphics/cairo \ + x11/xdotool -pre-configure: - ${SUBST_CMD} ${WRKSRC}/Makefile +MAKE_FLAGS= CFLAGS="$$(pkg-config --cflags cairo-xlib xinerama glib-2.0) ${CFLAGS}" \ + LDFLAGS="$$(pkg-config --libs cairo-xlib xinerama glib-2.0) ${LDFLAGS}" + +NO_TEST= Yes do-install: ${INSTALL_PROGRAM} ${WRKSRC}/keynav ${PREFIX}/bin Index: distinfo =================================================================== RCS file: /cvs/ports/x11/keynav/distinfo,v retrieving revision 1.2 diff -u -p -r1.2 distinfo --- distinfo 18 Jan 2015 03:15:57 -0000 1.2 +++ distinfo 25 Jan 2015 23:45:10 -0000 @@ -1,2 +1,2 @@ -SHA256 (keynav-20080614.01.tar.gz) = con/SPShyRvaXBcA4ukxFHvO9BaEb7mQ+3hmLf0Z2EE= -SIZE (keynav-20080614.01.tar.gz) = 26300 +SHA256 (keynav-0.20101014.3067.tar.gz) = UwwUsF2PfH2wcjkR7CdFmmAuSX1ZYJzrSZsx3E/AVxY= +SIZE (keynav-0.20101014.3067.tar.gz) = 20968 Index: patches/patch-Makefile =================================================================== RCS file: patches/patch-Makefile diff -N patches/patch-Makefile --- patches/patch-Makefile 6 Jun 2009 04:53:39 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,26 +0,0 @@ -$OpenBSD: patch-Makefile,v 1.2 2009/06/06 04:53:39 ajacoutot Exp $ ---- Makefile.orig Fri Jun 5 22:27:03 2009 -+++ Makefile Fri Jun 5 22:31:54 2009 -@@ -1,5 +1,5 @@ --CFLAGS=`pkg-config --cflags x11 xtst 2> /dev/null || echo -I/usr/X11R6/include -I/usr/local/include` --LDFLAGS=`pkg-config --libs x11 xtst 2> /dev/null || echo -L/usr/X11R6/lib -L/usr/local/lib -lX11 -lXtst` -+CFLAGS+=`pkg-config --cflags x11 xtst 2> /dev/null || echo -I${X11BASE}/include -I${LOCALBASE}/include` -+LDFLAGS+=`pkg-config --libs x11 xtst 2> /dev/null || echo -L${X11BASE}/lib -L${LOCALBASE}/lib -lX11 -lXtst` - - #CFLAGS+=-g - OTHERFILES=README CHANGELIST COPYRIGHT \ -@@ -13,12 +13,8 @@ clean: - rm *.o || true; - make -C xdotool clean || true - --keynav: xdo.o keynav.o -- gcc $(LDFLAGS) xdo.o keynav.o -o $@ -- --xdo.o: -- make -C xdotool xdo.o -- cp xdotool/xdo.o . -+keynav: -+ ${CC} ${CFLAGS} xdotool/xdo.c keynav.c ${LDFLAGS} -o $@ - - package: clean - NAME=keynav-`date +%Y%m%d`.$(MICROVERSION); \ Index: patches/patch-keynav_c =================================================================== RCS file: patches/patch-keynav_c diff -N patches/patch-keynav_c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-keynav_c 26 Jan 2015 00:39:52 -0000 @@ -0,0 +1,12 @@ +$OpenBSD$ +--- keynav.c.orig Wed Oct 13 09:27:51 2010 ++++ keynav.c Mon Jan 26 01:39:45 2015 +@@ -526,7 +526,7 @@ int parse_config_line(char *orig_line) { + + tokctx = line; + keyseq = strdup(strtok_r(line, " ", &tokctx)); +- commands = strdup(tokctx); ++ commands = (tokctx != NULL) ? strdup(tokctx) : NULL; + + /* A special config option that will clear all keybindings */ + if (strcmp(keyseq, "clear") == 0) { -- jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE