aboutsummaryrefslogtreecommitdiff
path: root/x11/inputplug
diff options
context:
space:
mode:
authorMateusz Piotrowski <0mp@FreeBSD.org>2020-10-10 11:53:46 +0000
committerMateusz Piotrowski <0mp@FreeBSD.org>2020-10-10 11:53:46 +0000
commit1f9979e09ed41bb2f02c1b735f44a99d15f0131a (patch)
treed4925d1868616c887d7cb7ec50d126e322029592 /x11/inputplug
parent65f41e9981cd9f95133b36087b17441f051e41e5 (diff)
downloadports-1f9979e09ed41bb2f02c1b735f44a99d15f0131a.tar.gz
ports-1f9979e09ed41bb2f02c1b735f44a99d15f0131a.zip
Add x11/inputplug
inputplug is a very simple daemon which monitors XInput events and runs arbitrary scripts on hierarchy change events (such as a device being attached, removed, enabled or disabled). For example, inputplug can be used in shell scripts which monitor attachments of keyboards in order to run change keyboard mappings with commands like "setxkbmap -option ctrl:nocaps". WWW: https://github.com/andrewshadura/inputplug
Notes
Notes: svn path=/head/; revision=551917
Diffstat (limited to 'x11/inputplug')
-rw-r--r--x11/inputplug/Makefile26
-rw-r--r--x11/inputplug/distinfo3
-rw-r--r--x11/inputplug/files/patch-inputplug.c12
-rw-r--r--x11/inputplug/pkg-descr9
4 files changed, 50 insertions, 0 deletions
diff --git a/x11/inputplug/Makefile b/x11/inputplug/Makefile
new file mode 100644
index 000000000000..e8791764ab9e
--- /dev/null
+++ b/x11/inputplug/Makefile
@@ -0,0 +1,26 @@
+# $FreeBSD$
+
+PORTNAME= inputplug
+DISTVERSION= 0.3
+CATEGORIES= x11
+
+MAINTAINER= 0mp@FreeBSD.org
+COMMENT= XInput event monitor daemon
+
+LICENSE= MIT
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+BUILD_DEPENDS= mk-configure>=0:devel/mk-configure
+
+USES= localbase perl5 pkgconfig xorg
+USE_GITHUB= yes
+GH_ACCOUNT= andrewshadura
+USE_PERL5= build
+USE_XORG= x11 xcb xi
+MAKE_CMD= mkcmake
+MAKE_ARGS= MANDIR="${PREFIX}/share/man"
+
+PLIST_FILES= bin/inputplug \
+ share/man/man1/inputplug.1.gz
+
+.include <bsd.port.mk>
diff --git a/x11/inputplug/distinfo b/x11/inputplug/distinfo
new file mode 100644
index 000000000000..ca4c1bd2ba95
--- /dev/null
+++ b/x11/inputplug/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1602328140
+SHA256 (andrewshadura-inputplug-0.3_GH0.tar.gz) = acac8e3972f3f10f9b6791321d2441e6b54d93d97c2de81e13eb14734a635ef7
+SIZE (andrewshadura-inputplug-0.3_GH0.tar.gz) = 7003
diff --git a/x11/inputplug/files/patch-inputplug.c b/x11/inputplug/files/patch-inputplug.c
new file mode 100644
index 000000000000..ff925db96e55
--- /dev/null
+++ b/x11/inputplug/files/patch-inputplug.c
@@ -0,0 +1,12 @@
+--- inputplug.c.orig 2020-10-10 11:36:14 UTC
++++ inputplug.c
+@@ -3,6 +3,9 @@
+ #include <assert.h>
+ #include <unistd.h>
+ #include <errno.h>
++#if __FreeBSD__
++#include <signal.h>
++#endif
+ #include <stdio.h>
+ #include <stdbool.h>
+ #include <stdint.h>
diff --git a/x11/inputplug/pkg-descr b/x11/inputplug/pkg-descr
new file mode 100644
index 000000000000..d210519b4b86
--- /dev/null
+++ b/x11/inputplug/pkg-descr
@@ -0,0 +1,9 @@
+inputplug is a very simple daemon which monitors XInput events and runs
+arbitrary scripts on hierarchy change events (such as a device being attached,
+removed, enabled or disabled).
+
+For example, inputplug can be used in shell scripts which monitor attachments
+of keyboards in order to run change keyboard mappings with commands like
+"setxkbmap -option ctrl:nocaps".
+
+WWW: https://github.com/andrewshadura/inputplug