git: eb0c36ff34ed - main - sysutils/keyd: update to 2.4.0

From: Jan Beich <jbeich_at_FreeBSD.org>
Date: Wed, 20 Apr 2022 21:27:05 UTC
The branch main has been updated by jbeich:

URL: https://cgit.FreeBSD.org/ports/commit/?id=eb0c36ff34ed16cad1f7d78bbcb4787e4a634e19

commit eb0c36ff34ed16cad1f7d78bbcb4787e4a634e19
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2022-04-20 01:41:49 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2022-04-20 21:25:59 +0000

    sysutils/keyd: update to 2.4.0
    
    Changes:        https://github.com/rvaiya/keyd/compare/v1.3.0...v2.4.0
    Reported by:    portscout
---
 GIDs                    |  2 +-
 UIDs                    |  1 +
 sysutils/keyd/Makefile  | 40 +++++++++++++++++++++++++++-------------
 sysutils/keyd/distinfo  |  6 +++---
 sysutils/keyd/pkg-descr | 18 +++++++++++-------
 5 files changed, 43 insertions(+), 24 deletions(-)

diff --git a/GIDs b/GIDs
index 120c8a098fe0..08f4ad6ecfb9 100644
--- a/GIDs
+++ b/GIDs
@@ -810,7 +810,7 @@ opensearch:*:855:
 # free: 866
 # free: 867
 # free: 868
-# free: 869
+keyd:*:869:
 buildbot:*:870:
 # free: 871
 bitmark:*:872:
diff --git a/UIDs b/UIDs
index e6fe80da3c93..e4bb254b6450 100644
--- a/UIDs
+++ b/UIDs
@@ -816,6 +816,7 @@ opensearch:*:855:855::0:0:opensearch user:/nonexistent:/usr/sbin/nologin
 # free: 867
 # free: 868
 # free: 869
+keyd:*:869:869::0:0:Key remapping daemon for evdev:/nonexistent:/usr/sbin/nologin
 buildbot:*:870:870::0:0:Buildbot user:/var/db/buildbot:/usr/sbin/nologin
 archiva:*:871:871::0:0:Apache Archiva Daemon:/nonexistent:/usr/sbin/nologin
 bitmark:*:872:872::0:0:Bitmark Property System:/var/lib/bitmarkd:/usr/sbin/nologin
diff --git a/sysutils/keyd/Makefile b/sysutils/keyd/Makefile
index 1c3aec41664b..bbbcd170530d 100644
--- a/sysutils/keyd/Makefile
+++ b/sysutils/keyd/Makefile
@@ -1,40 +1,54 @@
 PORTNAME=	keyd
 DISTVERSIONPREFIX=	v
-DISTVERSION=	1.3.0
+DISTVERSION=	2.4.0
 CATEGORIES=	sysutils
 
 MAINTAINER=	jbeich@FreeBSD.org
 COMMENT=	Key remapping daemon for evdev
 
 BUILD_DEPENDS=	evdev-proto>0:devel/evdev-proto
-LIB_DEPENDS=	libudev.so:devel/libudev-devd
+LIB_DEPENDS=	libinotify.so:devel/libinotify
 
 LICENSE=	MIT
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
+USES=		gmake python:env shebangfix
 USE_GITHUB=	yes
 USE_RC_SUBR=	${PORTNAME}
 GH_ACCOUNT=	rvaiya
+SHEBANG_FILES=	scripts/*
 MAKE_ARGS=	DESTDIR="${DESTDIR}" PREFIX="${PREFIX}" \
 		GIT_HASH="${DISTVERSIONFULL}"
 PLIST_FILES=	bin/${PORTNAME} \
-		share/man/man1/${PORTNAME}.1.gz \
-		"@dir ${ETCDIR}"
+		bin/${PORTNAME}-application-mapper \
+		${ETCDIR}/${PORTNAME}.compose
+PORTDOCS=	*
+PORTEXAMPLES=	*
+
+USERS=		${PORTNAME}
+GROUPS=		${PORTNAME}
+
+OPTIONS_DEFINE=	DOCS EXAMPLES MANPAGES
+OPTIONS_DEFAULT=MANPAGES
+
+MANPAGES_BUILD_DEPENDS=	scdoc:textproc/scdoc
+MANPAGES_ALL_TARGET=	all man
+MANPAGES_PLIST_FILES=	share/man/man1/${PORTNAME}.1.gz \
+			share/man/man1/${PORTNAME}-application-mapper.1.gz \
 
 post-patch:
-	@${REINPLACE_CMD} -e 's,/etc,${PREFIX}&,' \
-		-e 's,/var/lock,/var/run,' \
+	@${REINPLACE_CMD} -e 's,/etc,$$(PREFIX)&,' \
 		-e 's,/usr/local,${LOCALBASE},' \
-		-e '/systemd/d' \
-		-e '/^CFLAGS/s/=/+=/' \
-		-e '/-l/s/$$/ $$(LDFLAGS)/' \
+		-e 's,${DOCSDIR_REL}/examples,${EXAMPLESDIR_REL},' \
 		-e 's/ -O3//' \
 		${WRKSRC}/Makefile
+	@${REINPLACE_CMD} -e 's,/usr,${PREFIX}&,' \
+		-e 's,/etc,${PREFIX}&,' \
+		${WRKSRC}/docs/*.scdoc \
+		${WRKSRC}/examples/*.conf \
+		${WRKSRC}/src/${PORTNAME}.c
 # https://lists.freebsd.org/pipermail/freebsd-x11/2019-March/023097.html
 	@${REINPLACE_CMD} -e 's,__FreeBSD,&_disabled,' \
-		${WRKSRC}/src/config.h \
-		${WRKSRC}/src/keys.h \
-		${WRKSRC}/src/main.c \
-		${NULL}
+		${WRKSRC}/src/vkbd/uinput.c
 
 .include <bsd.port.mk>
diff --git a/sysutils/keyd/distinfo b/sysutils/keyd/distinfo
index 4bb954607d58..eeb188bc1ef3 100644
--- a/sysutils/keyd/distinfo
+++ b/sysutils/keyd/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1637913336
-SHA256 (rvaiya-keyd-v1.3.0_GH0.tar.gz) = 9b2195e69f407f08b9aa377d0bca2cd877c5aa9d67a606b81194941ff4ee8b11
-SIZE (rvaiya-keyd-v1.3.0_GH0.tar.gz) = 30789
+TIMESTAMP = 1650418909
+SHA256 (rvaiya-keyd-v2.4.0_GH0.tar.gz) = 100007894ac4fa6e95f5de5c2fe992c8b00e68d9df76c4bcdd8402a29d7b4058
+SIZE (rvaiya-keyd-v2.4.0_GH0.tar.gz) = 625319
diff --git a/sysutils/keyd/pkg-descr b/sysutils/keyd/pkg-descr
index 76437d427072..e40a8e68675f 100644
--- a/sysutils/keyd/pkg-descr
+++ b/sysutils/keyd/pkg-descr
@@ -1,12 +1,16 @@
 keyd has several unique features many of which are traditionally only
-found in custom keyboard firmware like QMK. Some of the more
-interesting ones include:
+found in custom keyboard firmware like QMK as well as some which are
+unique to keyd. Some of the more interesting ones include:
 
-- Layers.
+- Layers (with support for hybrid modifiers).
 - Key overloading (different behaviour on tap/hold).
-- Per keyboard configuration.
-- Instantaneous remapping (no flashing required).
-- A simple and intuitive config format.
-- Being display server agnostic (works on wayland and virtual console alike).
+- Keyboard specific configuration.
+- Instantaneous remapping (no more flashing :)).
+- A client-server model that facilitates scripting and display server
+  agnostic application remapping. (Currently ships with support for X,
+  sway, and gnome).
+- System wide config (works in a VT).
+- First class support for modifier overloading.
+- Unicode support.
 
 WWW: https://github.com/rvaiya/keyd