pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/x11/xlax
Module Name: pkgsrc
Committed By: vins
Date: Tue Dec 6 21:04:14 UTC 2022
Added Files:
pkgsrc/x11/xlax: DESCR Makefile PLIST distinfo
pkgsrc/x11/xlax/files: stddef.h xlax.ad
pkgsrc/x11/xlax/patches: patch-vroot.h patch-xlax.c patch-xlax.h
Log Message:
x11/xlax: import package from wip.
xlax is an X11 input multiplexer: keyboard input can be set from a xlax
instance to a group of windows simultaneously.
It allows the user to assign a custom string to each window (e.g. a
hostname) that can be sent with a button click.
An included script handles starting up and arranging windows, and
permits to define commonly used window groupings in a config file.
To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 pkgsrc/x11/xlax/DESCR pkgsrc/x11/xlax/Makefile \
pkgsrc/x11/xlax/PLIST pkgsrc/x11/xlax/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/x11/xlax/files/stddef.h \
pkgsrc/x11/xlax/files/xlax.ad
cvs rdiff -u -r0 -r1.1 pkgsrc/x11/xlax/patches/patch-vroot.h \
pkgsrc/x11/xlax/patches/patch-xlax.c pkgsrc/x11/xlax/patches/patch-xlax.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Added files:
Index: pkgsrc/x11/xlax/DESCR
diff -u /dev/null pkgsrc/x11/xlax/DESCR:1.1
--- /dev/null Tue Dec 6 21:04:14 2022
+++ pkgsrc/x11/xlax/DESCR Tue Dec 6 21:04:13 2022
@@ -0,0 +1,10 @@
+xlax is an X11 input multiplexer: keyboard input can be set from a xlax
+instance to a group of windows simultaneously. The tool is designed for
+system administrators who typically have to do the same thing on several
+machines (or in several different directories).
+Windows can be added or deleted interactively, or temporarily
+disconnected and reconnected.
+xlax allows the user to assign a custom string to each window (e.g. a
+hostname) that can be sent with a button click.
+An included script handles starting up and arranging windows, and
+permits to define commonly used window groupings in a config file.
Index: pkgsrc/x11/xlax/Makefile
diff -u /dev/null pkgsrc/x11/xlax/Makefile:1.1
--- /dev/null Tue Dec 6 21:04:14 2022
+++ pkgsrc/x11/xlax/Makefile Tue Dec 6 21:04:13 2022
@@ -0,0 +1,49 @@
+# $NetBSD: Makefile,v 1.1 2022/12/06 21:04:13 vins Exp $
+
+DISTNAME= xlax2.4
+PKGNAME= xlax-2.4
+CATEGORIES= x11
+MASTER_SITES= http://hea-www.harvard.edu/~fine/Tech/
+
+MAINTAINER= vins%NetBSD.org@localhost
+HOMEPAGE= https://hea-www.harvard.edu/~fine/Tech/xlax.html
+COMMENT= Multi-window input software
+LICENSE= mit
+
+USE_IMAKE= yes
+
+MAKE_FLAGS+= CCOPTIONS=${CFLAGS:Q}
+MAKE_FLAGS+= LOCAL_LDFLAGS=${LDFLAGS:Q}
+
+INSTALLATION_DIRS= bin ${PKGMANDIR}/man1
+INSTALLATION_DIRS+= lib/X11/app-defaults
+
+REPLACE_PERL+= mkxlax
+
+post-patch:
+ ${RUN} ${CP} ${FILESDIR}/stddef.h ${WRKSRC}
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/xlax ${DESTDIR}${PREFIX}/bin
+ ${INSTALL_SCRIPT} ${WRKSRC}/mkxlax ${DESTDIR}${PREFIX}/bin
+
+.for m in xlax mkxlax
+ ${INSTALL_MAN} ${WRKSRC}/${m}.man \
+ ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/${m}.1
+.endfor
+
+post-install:
+ ${INSTALL_DATA} ${FILESDIR}/xlax.ad \
+ ${DESTDIR}${PREFIX}/lib/X11/app-defaults/Xlax
+
+.include "../../mk/bsd.prefs.mk"
+
+.if ${OPSYS} == "Linux" # strlcpy()
+.include "../../devel/libbsd/buildlink3.mk"
+.endif
+
+.include "../../x11/libX11/buildlink3.mk"
+.include "../../x11/libXaw/buildlink3.mk"
+.include "../../x11/libXmu/buildlink3.mk"
+.include "../../x11/libXt/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/x11/xlax/PLIST
diff -u /dev/null pkgsrc/x11/xlax/PLIST:1.1
--- /dev/null Tue Dec 6 21:04:14 2022
+++ pkgsrc/x11/xlax/PLIST Tue Dec 6 21:04:13 2022
@@ -0,0 +1,6 @@
+@comment $NetBSD: PLIST,v 1.1 2022/12/06 21:04:13 vins Exp $
+bin/mkxlax
+bin/xlax
+lib/X11/app-defaults/Xlax
+man/man1/mkxlax.1
+man/man1/xlax.1
Index: pkgsrc/x11/xlax/distinfo
diff -u /dev/null pkgsrc/x11/xlax/distinfo:1.1
--- /dev/null Tue Dec 6 21:04:14 2022
+++ pkgsrc/x11/xlax/distinfo Tue Dec 6 21:04:13 2022
@@ -0,0 +1,8 @@
+$NetBSD: distinfo,v 1.1 2022/12/06 21:04:13 vins Exp $
+
+BLAKE2s (xlax2.4.tar.gz) = 90e7169a24fd5c1805ff27576b876cfbc4991be4e95e2bc58644a9d0fcffdb68
+SHA512 (xlax2.4.tar.gz) = 294aad75a5ca8dc396c6e07044f66b36e7a99d6cb10a3d89f39660223e0b5063d302b34dd804b272df9d951a7f2bcf1cf1c8a3746d97ae1fb836c9bbcc9e2dd9
+Size (xlax2.4.tar.gz) = 15804 bytes
+SHA1 (patch-vroot.h) = 86fd4d6637bf37503c21e1891e19bf0b8a579e5e
+SHA1 (patch-xlax.c) = d09739837c4307579a898a2da7d5031992a0d4ff
+SHA1 (patch-xlax.h) = e6e146997a48a2ed6f15b56657e6a911fedee9c9
Index: pkgsrc/x11/xlax/files/stddef.h
diff -u /dev/null pkgsrc/x11/xlax/files/stddef.h:1.1
--- /dev/null Tue Dec 6 21:04:14 2022
+++ pkgsrc/x11/xlax/files/stddef.h Tue Dec 6 21:04:14 2022
@@ -0,0 +1,30 @@
+/*
+ * stddef.h
+ *
+ * Prepocessor defined type definitions.
+ *
+ */
+
+#ifndef __PTRDIFF_TYPE__
+#define __PTRDIFF_TYPE__ long int
+#endif
+typedef __PTRDIFF_TYPE__ ptrdiff_t;
+
+#ifndef __SIZE_TYPE__
+#define __SIZE_TYPE__ long unsigned int
+#endif
+#if !(defined (__GNUG__) && defined (size_t))
+typedef __SIZE_TYPE__ size_t;
+#endif
+
+#ifndef __WCHAR_TYPE__
+#define __WCHAR_TYPE__ int
+#endif
+#ifndef __cplusplus
+typedef __WCHAR_TYPE__ wchar_t;
+#endif
+
+#ifndef __WINT_TYPE__
+#define __WINT_TYPE__ unsigned int
+#endif
+typedef __WINT_TYPE__ wint_t;
Index: pkgsrc/x11/xlax/files/xlax.ad
diff -u /dev/null pkgsrc/x11/xlax/files/xlax.ad:1.1
--- /dev/null Tue Dec 6 21:04:14 2022
+++ pkgsrc/x11/xlax/files/xlax.ad Tue Dec 6 21:04:14 2022
@@ -0,0 +1,10 @@
+! X11 Resources for xlax multi window input utility
+!Default Green on Black, Black on Grey is commented out if you prefer
+
+xlax*foreground: green
+xlax*borderPixmap: gradient:horizontal?dimension=1&start=green&end=green
+xlax*background: black
+
+!xlax*foreground: black
+!xlax*borderPixmap: gradient:horizontal?dimension=512&start=gray40&end=gray20
+!xlax*background: gray
Index: pkgsrc/x11/xlax/patches/patch-vroot.h
diff -u /dev/null pkgsrc/x11/xlax/patches/patch-vroot.h:1.1
--- /dev/null Tue Dec 6 21:04:14 2022
+++ pkgsrc/x11/xlax/patches/patch-vroot.h Tue Dec 6 21:04:14 2022
@@ -0,0 +1,15 @@
+$NetBSD: patch-vroot.h,v 1.1 2022/12/06 21:04:14 vins Exp $
+
+Fix compile-time warnings.
+
+--- vroot.h.orig 2008-07-31 20:18:25.000000000 +0000
++++ vroot.h
+@@ -75,7 +75,7 @@ VirtualRootWindowOfScreen(screen)
+ if (screen != save_screen) {
+ Display *dpy = DisplayOfScreen(screen);
+ Atom __SWM_VROOT = None;
+- int i;
++ unsigned int i;
+ Window rootReturn, parentReturn, *children;
+ unsigned int numChildren;
+
Index: pkgsrc/x11/xlax/patches/patch-xlax.c
diff -u /dev/null pkgsrc/x11/xlax/patches/patch-xlax.c:1.1
--- /dev/null Tue Dec 6 21:04:14 2022
+++ pkgsrc/x11/xlax/patches/patch-xlax.c Tue Dec 6 21:04:14 2022
@@ -0,0 +1,169 @@
+$NetBSD: patch-xlax.c,v 1.1 2022/12/06 21:04:14 vins Exp $
+
+* Fix warnings about int signedness mismatch.
+* Fix warnings about int to pointer conversion.
+* Use libbsd on Linux to support strlcpy().
+
+--- xlax.c.orig 2008-07-31 20:18:25.000000000 +0000
++++ xlax.c
+@@ -30,6 +30,11 @@
+ *
+ */
+
++#ifdef __linux__
++#include <bsd/string.h>
++#endif
++
++#include "stddef.h"
+ #include "xlax.h"
+ #include "vroot.h"
+
+@@ -50,7 +55,7 @@ XKeyEvent tmpevents[MAXEVENTS];
+ int tmpeventindex;
+ int tmpwindex;
+
+-int
++uintptr_t
+ WindowIndex;
+
+ char *prefix="xlax:";
+@@ -70,7 +75,7 @@ XErrorEvent *myerr;
+ XGetErrorText(mydisp, myerr->error_code, msg, 80);
+ (void) fprintf(stderr, "%s\n", msg);
+ if (myerr->error_code == BadWindow) {
+- fprintf(stderr, "Removing window %d\n", myerr->resourceid);
++ fprintf(stderr, "Removing window %lu\n", (unsigned long)myerr->resourceid);
+ Remove_Window(myerr->resourceid);
+ return 0;
+ } else {
+@@ -411,8 +416,8 @@ Display *dpy;
+ Window top;
+ {
+ Window *children, dummy;
+- unsigned int nchildren;
+- int i, x;
++ unsigned int i, nchildren;
++ int x;
+ Window w=0;
+ XClassHint class_hint;
+
+@@ -674,7 +679,7 @@ Display *dpy;
+ int wi;
+ char *str;
+ {
+- int i;
++ size_t i;
+ long m;
+ Window root = RootWindow(dpy,DefaultScreen(dpy));
+
+@@ -686,7 +691,7 @@ char *str;
+ }
+ for (i=0; i<strlen(str)&&i<MAXEVENTS; ++i) {
+ /* skip if we don't have a keycode mapping for this character */
+- if (kcmap[str[i]] < 0) {
++ if (kcmap[(unsigned char)str[i]] < 0) {
+ fprintf(stderr,"No key mapping for %c!\n", str[i]);
+ continue;
+ }
+@@ -702,8 +707,8 @@ char *str;
+ Windows[wi].events[i].x_root=0;
+ Windows[wi].events[i].y_root=0;
+ Windows[wi].events[i].same_screen=1;
+- Windows[wi].events[i].keycode=kcmap[str[i]];
+- Windows[wi].events[i].state=modmap[str[i]];
++ Windows[wi].events[i].keycode=kcmap[(unsigned char)str[i]];
++ Windows[wi].events[i].state=modmap[(unsigned char)str[i]];
+ }
+ Windows[wi].eventindex=i;
+ cnt = 0;
+@@ -746,8 +751,8 @@ Display *disp;
+ evt.state=states[m];
+ len=XLookupString(&evt, out, 32, NULL, NULL);
+ if (len == 1) {
+- kcmap[out[0]] = i;
+- modmap[out[0]] = states[m];
++ kcmap[(unsigned char)out[0]] = i;
++ modmap[(unsigned char)out[0]] = states[m];
+ }
+ }
+ }
+@@ -759,7 +764,7 @@ unsigned char c;
+ long *m;
+ {
+ KeySym ks, ksr;
+- KeyCode kc;
++ KeyCode kc = -1;
+ XKeyEvent evt;
+ long mr, len;
+ char str[2], out[32];
+@@ -802,11 +807,11 @@ long *m;
+ *m = ShiftMask | ControlMask;
+ return(kc);
+ }
+- fprintf(stderr, "Didn't resolve keycode! (c=%d, ks=%d,kc=%d\n",c,ks,kc);
++ fprintf(stderr, "Didn't resolve keycode! (c=%d, ks=%lu,kc=%d\n",c,(unsigned long)ks,kc);
+ *m = ControlMask;
+ return(0);
+ } else if (c>127) {
+- fprintf(stderr, "Didn't resolve keycode! (c=%d, ks=%d,kc=%d\n",c,ks,kc);
++ fprintf(stderr, "Didn't resolve keycode! (c=%d, ks=%lu,kc=%d\n",c,(unsigned long)ks,kc);
+ *m = 0;
+ return(0);
+ } else {
+@@ -826,7 +831,7 @@ long *m;
+ *m = ShiftMask;
+ return(kc);
+ }
+- fprintf(stderr, "Didn't resolve keycode! (c=%d, ks=%d,kc=%d\n",c,ks,kc);
++ fprintf(stderr, "Didn't resolve keycode! (c=%d, ks=%lu,kc=%d\n",c,(unsigned long)ks,kc);
+ *m = 0;
+ return(0);
+ }
+@@ -882,7 +887,7 @@ long *m;
+ *m = ShiftMask | ControlMask;
+ return(kc);
+ }
+- fprintf(stderr, "Didn't resolve keycode! (c=%d, ks=%d,kc=%d\n",c,ks,kc);
++ fprintf(stderr, "Didn't resolve keycode! (c=%d, ks=%lu,kc=%d\n",c,(unsigned long)ks,kc);
+ *m = ControlMask;
+ return(0);
+ } else {
+@@ -902,7 +907,7 @@ long *m;
+ *m = ShiftMask;
+ return(kc);
+ }
+- fprintf(stderr, "Didn't resolve keycode! (c=%d, ks=%d,kc=%d\n",c,ks,kc);
++ fprintf(stderr, "Didn't resolve keycode! (c=%d, ks=%lu,kc=%d\n",c,(unsigned long)ks,kc);
+ *m = 0;
+ return(0);
+ }
+@@ -1040,7 +1045,8 @@ caddr_t client_data; /* unused */
+ caddr_t call_data; /* unused */
+
+ {
+- int x, y, n;
++ int x, n;
++ size_t y;
+ char *sel;
+ XKeyEvent evt;
+ long m;
+@@ -1052,7 +1058,7 @@ caddr_t call_data; /* unused */
+ if (Windows[x].active == 1) {
+ for (y = 0; y < strlen(sel); y++) {
+ /* skip if we don't have a keycode mapping for this character */
+- if (kcmap[sel[y]] < 0) {
++ if (kcmap[(unsigned char)sel[y]] < 0) {
+ fprintf(stderr,"No key mapping for %c!\n", sel[y]);
+ continue;
+ }
+@@ -1068,8 +1074,8 @@ caddr_t call_data; /* unused */
+ evt.x_root=0;
+ evt.y_root=0;
+ evt.same_screen=1;
+- evt.keycode=kcmap[sel[y]];
+- evt.state=modmap[sel[y]];
++ evt.keycode=kcmap[(unsigned char)sel[y]];
++ evt.state=modmap[(unsigned char)sel[y]];
+
+ XSendEvent(dpy, Windows[x].wind, True,
+ KeyPressMask, (XEvent *) &evt);
Index: pkgsrc/x11/xlax/patches/patch-xlax.h
diff -u /dev/null pkgsrc/x11/xlax/patches/patch-xlax.h:1.1
--- /dev/null Tue Dec 6 21:04:14 2022
+++ pkgsrc/x11/xlax/patches/patch-xlax.h Tue Dec 6 21:04:14 2022
@@ -0,0 +1,19 @@
+$NetBSD: patch-xlax.h,v 1.1 2022/12/06 21:04:14 vins Exp $
+
+Avoid redefinitions.
+
+--- xlax.h.orig 2008-07-31 20:18:25.000000000 +0000
++++ xlax.h
+@@ -39,8 +39,12 @@
+ #include <X11/Xmu/WinUtil.h>
+
+ #include <X11/cursorfont.h>
++#ifndef XK_MISCELLANY
+ #define XK_MISCELLANY 1
++#endif
++#ifndef XK_LATIN1
+ #define XK_LATIN1 1
++#endif
+ #include <X11/keysymdef.h>
+
+ #include <stdlib.h>
Home |
Main Index |
Thread Index |
Old Index